@forgeax/interface 0.4.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/LICENSE +202 -0
- package/NOTICE +9 -0
- package/README.md +111 -0
- package/dist/package/browser/App.css +192 -0
- package/dist/package/browser/App.d.ts +11 -0
- package/dist/package/browser/App.js +11 -0
- package/dist/package/browser/ApplicationDetachedShell.d.ts +13 -0
- package/dist/package/browser/ApplicationDetachedShell.js +10 -0
- package/dist/package/browser/ApplicationShell.d.ts +19 -0
- package/dist/package/browser/ApplicationShell.js +62 -0
- package/dist/package/browser/app-kit.d.ts +1 -0
- package/dist/package/browser/app-kit.js +4 -0
- package/dist/package/browser/appHostBootstrap.d.ts +16 -0
- package/dist/package/browser/appHostBootstrap.js +145 -0
- package/dist/package/browser/application.d.ts +35 -0
- package/dist/package/browser/application.js +64 -0
- package/dist/package/browser/assets/icons/agent-icon.png +0 -0
- package/dist/package/browser/assets/icons/at.svg +3 -0
- package/dist/package/browser/assets/icons/chevron-collapse.svg +3 -0
- package/dist/package/browser/assets/icons/chevron-expand.svg +3 -0
- package/dist/package/browser/assets/icons/chevron-up.svg +3 -0
- package/dist/package/browser/assets/icons/close-x.svg +3 -0
- package/dist/package/browser/assets/icons/close.svg +3 -0
- package/dist/package/browser/assets/icons/copy.svg +4 -0
- package/dist/package/browser/assets/icons/edit.svg +3 -0
- package/dist/package/browser/assets/icons/fullscreen.svg +3 -0
- package/dist/package/browser/assets/icons/pause.svg +4 -0
- package/dist/package/browser/assets/icons/play.svg +3 -0
- package/dist/package/browser/assets/icons/select.svg +3 -0
- package/dist/package/browser/assets/icons/sendMessage-enable.svg +4 -0
- package/dist/package/browser/assets/icons/sendMessage.svg +4 -0
- package/dist/package/browser/assets/icons/status-done.svg +11 -0
- package/dist/package/browser/assets/icons/status-running.svg +10 -0
- package/dist/package/browser/assets/icons/status-waiting.svg +10 -0
- package/dist/package/browser/assets/icons/tool-execute-script.svg +3 -0
- package/dist/package/browser/assets/icons/tool-other.svg +10 -0
- package/dist/package/browser/assets/icons/tool-read-file.svg +3 -0
- package/dist/package/browser/assets/icons/tool-resource-search.svg +3 -0
- package/dist/package/browser/assets/icons/tool-task-todo.svg +4 -0
- package/dist/package/browser/assets/icons/tool-write-file.svg +3 -0
- package/dist/package/browser/boot/SettingsSection.d.ts +14 -0
- package/dist/package/browser/boot/SettingsSection.js +82 -0
- package/dist/package/browser/boot/broadcast.d.ts +2 -0
- package/dist/package/browser/boot/broadcast.js +32 -0
- package/dist/package/browser/boot/driver.d.ts +22 -0
- package/dist/package/browser/boot/driver.js +47 -0
- package/dist/package/browser/boot/store.d.ts +29 -0
- package/dist/package/browser/boot/store.js +114 -0
- package/dist/package/browser/boot/themes.d.ts +19 -0
- package/dist/package/browser/boot/themes.js +21 -0
- package/dist/package/browser/boot/types.d.ts +22 -0
- package/dist/package/browser/boot/types.js +30 -0
- package/dist/package/browser/brand/BrandProvider.d.ts +19 -0
- package/dist/package/browser/brand/BrandProvider.js +35 -0
- package/dist/package/browser/brand/index.d.ts +4 -0
- package/dist/package/browser/brand/index.js +3 -0
- package/dist/package/browser/brand/runtime.d.ts +17 -0
- package/dist/package/browser/brand/runtime.js +71 -0
- package/dist/package/browser/brand/types.d.ts +77 -0
- package/dist/package/browser/brand/types.js +9 -0
- package/dist/package/browser/components/ActivityRail/ActivityRail.css +294 -0
- package/dist/package/browser/components/ActivityRail/ActivityRail.d.ts +2 -0
- package/dist/package/browser/components/ActivityRail/ActivityRail.js +164 -0
- package/dist/package/browser/components/ActivityRail/activity-rail-model.d.ts +18 -0
- package/dist/package/browser/components/ActivityRail/activity-rail-model.js +144 -0
- package/dist/package/browser/components/AgentAvatar/AgentAvatar.d.ts +17 -0
- package/dist/package/browser/components/AgentAvatar/AgentAvatar.js +50 -0
- package/dist/package/browser/components/BuildBadge/BuildBadge.d.ts +1 -0
- package/dist/package/browser/components/BuildBadge/BuildBadge.js +279 -0
- package/dist/package/browser/components/Bus/BusAdminPanel.css +2425 -0
- package/dist/package/browser/components/Bus/BusAdminPanel.d.ts +2 -0
- package/dist/package/browser/components/Bus/BusAdminPanel.js +1385 -0
- package/dist/package/browser/components/Bus/CapabilityOverview.d.ts +3 -0
- package/dist/package/browser/components/Bus/CapabilityOverview.js +50 -0
- package/dist/package/browser/components/ChatColumn/ChatColumn.d.ts +2 -0
- package/dist/package/browser/components/ChatColumn/ChatColumn.js +18 -0
- package/dist/package/browser/components/ChatColumn/SessionTabStrip.d.ts +1 -0
- package/dist/package/browser/components/ChatColumn/SessionTabStrip.js +103 -0
- package/dist/package/browser/components/ChatColumn/useChatWidth.d.ts +5 -0
- package/dist/package/browser/components/ChatColumn/useChatWidth.js +13 -0
- package/dist/package/browser/components/CommandPalette/CommandPalette.css +199 -0
- package/dist/package/browser/components/CommandPalette/CommandPalette.d.ts +2 -0
- package/dist/package/browser/components/CommandPalette/CommandPalette.js +242 -0
- package/dist/package/browser/components/Confirm/ConfirmDialog.d.ts +2 -0
- package/dist/package/browser/components/Confirm/ConfirmDialog.js +113 -0
- package/dist/package/browser/components/ContextMenu/ContextMenu.d.ts +10 -0
- package/dist/package/browser/components/ContextMenu/ContextMenu.js +218 -0
- package/dist/package/browser/components/ContextMenu/menuRegistry.d.ts +18 -0
- package/dist/package/browser/components/ContextMenu/menuRegistry.js +152 -0
- package/dist/package/browser/components/DetachedSurface.d.ts +20 -0
- package/dist/package/browser/components/DetachedSurface.js +102 -0
- package/dist/package/browser/components/DockShell/DockPanelHost.d.ts +4 -0
- package/dist/package/browser/components/DockShell/DockPanelHost.js +7 -0
- package/dist/package/browser/components/DockShell/DockRegion.d.ts +7 -0
- package/dist/package/browser/components/DockShell/DockRegion.js +315 -0
- package/dist/package/browser/components/DockShell/DockShell.css +1018 -0
- package/dist/package/browser/components/DockShell/DockTab.d.ts +3 -0
- package/dist/package/browser/components/DockShell/DockTab.js +139 -0
- package/dist/package/browser/components/DockShell/ExtensionHostPanel.d.ts +9 -0
- package/dist/package/browser/components/DockShell/ExtensionHostPanel.js +68 -0
- package/dist/package/browser/components/DockShell/ExtensionRuntimeFrame.d.ts +14 -0
- package/dist/package/browser/components/DockShell/ExtensionRuntimeFrame.js +56 -0
- package/dist/package/browser/components/DockShell/PanelWindowingBoundary.d.ts +6 -0
- package/dist/package/browser/components/DockShell/PanelWindowingBoundary.js +9 -0
- package/dist/package/browser/components/DockShell/chatDockAnimation.d.ts +45 -0
- package/dist/package/browser/components/DockShell/chatDockAnimation.js +101 -0
- package/dist/package/browser/components/DockShell/chatDockFullscreen.d.ts +17 -0
- package/dist/package/browser/components/DockShell/chatDockFullscreen.js +22 -0
- package/dist/package/browser/components/DockShell/chatDockLayout.d.ts +10 -0
- package/dist/package/browser/components/DockShell/chatDockLayout.js +11 -0
- package/dist/package/browser/components/DockShell/compact-empty-dock-groups.d.ts +16 -0
- package/dist/package/browser/components/DockShell/compact-empty-dock-groups.js +28 -0
- package/dist/package/browser/components/DockShell/crossInstanceDrop.d.ts +1 -0
- package/dist/package/browser/components/DockShell/crossInstanceDrop.js +1 -0
- package/dist/package/browser/components/DockShell/dockResetEpoch.d.ts +2 -0
- package/dist/package/browser/components/DockShell/dockResetEpoch.js +13 -0
- package/dist/package/browser/components/DockShell/dockTitle.d.ts +12 -0
- package/dist/package/browser/components/DockShell/dockTitle.js +36 -0
- package/dist/package/browser/components/DockShell/dockviewRegistry.d.ts +1 -0
- package/dist/package/browser/components/DockShell/dockviewRegistry.js +1 -0
- package/dist/package/browser/components/DockShell/edgeDrawer.d.ts +24 -0
- package/dist/package/browser/components/DockShell/edgeDrawer.js +1144 -0
- package/dist/package/browser/components/DockShell/edgePinStore.d.ts +12 -0
- package/dist/package/browser/components/DockShell/edgePinStore.js +37 -0
- package/dist/package/browser/components/DockShell/extension-editor-bridge.d.ts +13 -0
- package/dist/package/browser/components/DockShell/extension-editor-bridge.js +100 -0
- package/dist/package/browser/components/DockShell/extension-runtime-selection.d.ts +8 -0
- package/dist/package/browser/components/DockShell/extension-runtime-selection.js +6 -0
- package/dist/package/browser/components/DockShell/extensionRuntime.d.ts +17 -0
- package/dist/package/browser/components/DockShell/extensionRuntime.js +84 -0
- package/dist/package/browser/components/DockShell/footer-panel-visibility.d.ts +7 -0
- package/dist/package/browser/components/DockShell/footer-panel-visibility.js +43 -0
- package/dist/package/browser/components/DockShell/footer-panels.d.ts +2 -0
- package/dist/package/browser/components/DockShell/footer-panels.js +7 -0
- package/dist/package/browser/components/DockShell/panelRegistry.d.ts +37 -0
- package/dist/package/browser/components/DockShell/panelRegistry.js +126 -0
- package/dist/package/browser/components/DockShell/panelRenderers.d.ts +325 -0
- package/dist/package/browser/components/DockShell/panelRenderers.js +25 -0
- package/dist/package/browser/components/DockShell/panelTabCommands.d.ts +18 -0
- package/dist/package/browser/components/DockShell/panelTabCommands.js +133 -0
- package/dist/package/browser/components/DockShell/panelWindowing.d.ts +32 -0
- package/dist/package/browser/components/DockShell/panelWindowing.js +42 -0
- package/dist/package/browser/components/DockShell/regions.d.ts +1 -0
- package/dist/package/browser/components/DockShell/regions.js +1 -0
- package/dist/package/browser/components/DockShell/resolveRegion.d.ts +1 -0
- package/dist/package/browser/components/DockShell/resolveRegion.js +1 -0
- package/dist/package/browser/components/DockShell/sanitizeDockLayout.d.ts +3 -0
- package/dist/package/browser/components/DockShell/sanitizeDockLayout.js +46 -0
- package/dist/package/browser/components/DockShell/sideEdgeMove.d.ts +1 -0
- package/dist/package/browser/components/DockShell/sideEdgeMove.js +1 -0
- package/dist/package/browser/components/DockShell/studioTabMenuProvider.d.ts +13 -0
- package/dist/package/browser/components/DockShell/studioTabMenuProvider.js +39 -0
- package/dist/package/browser/components/DockShell/tabContextMenu.d.ts +29 -0
- package/dist/package/browser/components/DockShell/tabContextMenu.js +68 -0
- package/dist/package/browser/components/DockShell/ueDrag/controller.d.ts +80 -0
- package/dist/package/browser/components/DockShell/ueDrag/controller.js +785 -0
- package/dist/package/browser/components/DockShell/ueDrag/geometry.d.ts +94 -0
- package/dist/package/browser/components/DockShell/ueDrag/geometry.js +217 -0
- package/dist/package/browser/components/DockShell/ueDrag/overlay.d.ts +32 -0
- package/dist/package/browser/components/DockShell/ueDrag/overlay.js +206 -0
- package/dist/package/browser/components/DockShell/ueDrag/ueDrag.css +199 -0
- package/dist/package/browser/components/DockShell/useAuxBarWidth.d.ts +5 -0
- package/dist/package/browser/components/DockShell/useAuxBarWidth.js +13 -0
- package/dist/package/browser/components/Drawer/DrawerHostView.css +143 -0
- package/dist/package/browser/components/Drawer/DrawerHostView.d.ts +19 -0
- package/dist/package/browser/components/Drawer/DrawerHostView.js +93 -0
- package/dist/package/browser/components/Drawer/DrawerLauncher.d.ts +12 -0
- package/dist/package/browser/components/Drawer/DrawerLauncher.js +22 -0
- package/dist/package/browser/components/Drawer/useDrawerStore.d.ts +15 -0
- package/dist/package/browser/components/Drawer/useDrawerStore.js +80 -0
- package/dist/package/browser/components/ErrorBoundary.d.ts +55 -0
- package/dist/package/browser/components/ErrorBoundary.js +131 -0
- package/dist/package/browser/components/ExtensionHost/ExtensionIframeHost.d.ts +28 -0
- package/dist/package/browser/components/ExtensionHost/ExtensionIframeHost.js +179 -0
- package/dist/package/browser/components/ExtensionHost/NativeExtensionHost.d.ts +14 -0
- package/dist/package/browser/components/ExtensionHost/NativeExtensionHost.js +152 -0
- package/dist/package/browser/components/Feedback/FeedbackPanel.css +640 -0
- package/dist/package/browser/components/Feedback/FeedbackPanel.d.ts +8 -0
- package/dist/package/browser/components/Feedback/FeedbackPanel.js +118 -0
- package/dist/package/browser/components/Feedback/PassiveFeedback.css +179 -0
- package/dist/package/browser/components/Feedback/PassiveFeedback.d.ts +2 -0
- package/dist/package/browser/components/Feedback/PassiveFeedback.js +218 -0
- package/dist/package/browser/components/Feedback/collect.d.ts +15 -0
- package/dist/package/browser/components/Feedback/collect.js +80 -0
- package/dist/package/browser/components/Feedback/store.d.ts +61 -0
- package/dist/package/browser/components/Feedback/store.js +174 -0
- package/dist/package/browser/components/LangSwitcher/LangSwitcher.css +78 -0
- package/dist/package/browser/components/LangSwitcher/LangSwitcher.d.ts +14 -0
- package/dist/package/browser/components/LangSwitcher/LangSwitcher.js +44 -0
- package/dist/package/browser/components/MainArea/ConsolePanel.d.ts +1 -0
- package/dist/package/browser/components/MainArea/ConsolePanel.js +16 -0
- package/dist/package/browser/components/MainArea/MainArea.css +2130 -0
- package/dist/package/browser/components/MainArea/MainArea.d.ts +2 -0
- package/dist/package/browser/components/MainArea/MainArea.js +20 -0
- package/dist/package/browser/components/MainArea/StandaloneExtensionIframe.d.ts +25 -0
- package/dist/package/browser/components/MainArea/StandaloneExtensionIframe.js +155 -0
- package/dist/package/browser/components/MainArea/SurfacePanels.d.ts +3 -0
- package/dist/package/browser/components/MainArea/SurfacePanels.js +27 -0
- package/dist/package/browser/components/MainArea/TelemetryViewer.css +122 -0
- package/dist/package/browser/components/MainArea/TelemetryViewer.d.ts +36 -0
- package/dist/package/browser/components/MainArea/TelemetryViewer.js +116 -0
- package/dist/package/browser/components/MenuBar/MenuBar.css +186 -0
- package/dist/package/browser/components/MenuBar/MenuBar.d.ts +27 -0
- package/dist/package/browser/components/MenuBar/MenuBar.js +286 -0
- package/dist/package/browser/components/MenuBar/index.d.ts +1 -0
- package/dist/package/browser/components/MenuBar/index.js +1 -0
- package/dist/package/browser/components/MenuBar/menubar-open-state.d.ts +8 -0
- package/dist/package/browser/components/MenuBar/menubar-open-state.js +11 -0
- package/dist/package/browser/components/MenuBar/menubar-surface.d.ts +30 -0
- package/dist/package/browser/components/MenuBar/menubar-surface.js +201 -0
- package/dist/package/browser/components/ModelPicker/index.d.ts +1 -0
- package/dist/package/browser/components/ModelPicker/index.js +1 -0
- package/dist/package/browser/components/ModelPicker/useModelCatalog.d.ts +22 -0
- package/dist/package/browser/components/ModelPicker/useModelCatalog.js +100 -0
- package/dist/package/browser/components/Onboarding/ConnectModelPrompt.d.ts +2 -0
- package/dist/package/browser/components/Onboarding/ConnectModelPrompt.js +40 -0
- package/dist/package/browser/components/Onboarding/Onboarding.css +232 -0
- package/dist/package/browser/components/Onboarding/OnboardingController.d.ts +10 -0
- package/dist/package/browser/components/Onboarding/OnboardingController.js +549 -0
- package/dist/package/browser/components/Onboarding/connect-selection.d.ts +17 -0
- package/dist/package/browser/components/Onboarding/connect-selection.js +18 -0
- package/dist/package/browser/components/Onboarding/home-transition.d.ts +9 -0
- package/dist/package/browser/components/Onboarding/home-transition.js +20 -0
- package/dist/package/browser/components/Onboarding/index.d.ts +4 -0
- package/dist/package/browser/components/Onboarding/index.js +3 -0
- package/dist/package/browser/components/Onboarding/prepareTourShell.d.ts +5 -0
- package/dist/package/browser/components/Onboarding/prepareTourShell.js +11 -0
- package/dist/package/browser/components/Onboarding/project-name.d.ts +17 -0
- package/dist/package/browser/components/Onboarding/project-name.js +29 -0
- package/dist/package/browser/components/Onboarding/types.d.ts +31 -0
- package/dist/package/browser/components/Onboarding/types.js +77 -0
- package/dist/package/browser/components/PageTabs/PageTabStrip.css +221 -0
- package/dist/package/browser/components/PageTabs/PageTabStrip.d.ts +3 -0
- package/dist/package/browser/components/PageTabs/PageTabStrip.js +214 -0
- package/dist/package/browser/components/PageTabs/openablePageTypes.d.ts +9 -0
- package/dist/package/browser/components/PageTabs/openablePageTypes.js +13 -0
- package/dist/package/browser/components/PanelShell/PanelShell.css +517 -0
- package/dist/package/browser/components/PanelShell/PanelShell.d.ts +7 -0
- package/dist/package/browser/components/PanelShell/PanelShell.js +459 -0
- package/dist/package/browser/components/Resize/ResizeHandle.d.ts +1 -0
- package/dist/package/browser/components/Resize/ResizeHandle.js +1 -0
- package/dist/package/browser/components/SceneBackground/SceneBackground.d.ts +2 -0
- package/dist/package/browser/components/SceneBackground/SceneBackground.js +5 -0
- package/dist/package/browser/components/SchemaForm/SchemaForm.css +138 -0
- package/dist/package/browser/components/SchemaForm/SchemaForm.d.ts +17 -0
- package/dist/package/browser/components/SchemaForm/SchemaForm.js +86 -0
- package/dist/package/browser/components/SchemaForm/schema-form-utils.d.ts +30 -0
- package/dist/package/browser/components/SchemaForm/schema-form-utils.js +51 -0
- package/dist/package/browser/components/SettingsPrimitives.d.ts +24 -0
- package/dist/package/browser/components/SettingsPrimitives.js +145 -0
- package/dist/package/browser/components/Sidebar/BusHealthLamp.d.ts +1 -0
- package/dist/package/browser/components/Sidebar/BusHealthLamp.js +72 -0
- package/dist/package/browser/components/Sidebar/FilesPanel.d.ts +1 -0
- package/dist/package/browser/components/Sidebar/FilesPanel.js +234 -0
- package/dist/package/browser/components/Sidebar/Sidebar.css +1393 -0
- package/dist/package/browser/components/Sidebar/Sidebar.d.ts +3 -0
- package/dist/package/browser/components/Sidebar/Sidebar.js +8 -0
- package/dist/package/browser/components/Sidebar/sidebar-types.d.ts +18 -0
- package/dist/package/browser/components/Sidebar/sidebar-types.js +1 -0
- package/dist/package/browser/components/SlotDebugOverlay/SlotDebugOverlay.d.ts +1 -0
- package/dist/package/browser/components/SlotDebugOverlay/SlotDebugOverlay.js +1 -0
- package/dist/package/browser/components/SlotDebugOverlay/hashHue.d.ts +1 -0
- package/dist/package/browser/components/SlotDebugOverlay/hashHue.js +1 -0
- package/dist/package/browser/components/SlotDebugOverlay/index.d.ts +1 -0
- package/dist/package/browser/components/SlotDebugOverlay/index.js +1 -0
- package/dist/package/browser/components/SlotDebugOverlay/isSlotDebugEnabled.d.ts +1 -0
- package/dist/package/browser/components/SlotDebugOverlay/isSlotDebugEnabled.js +1 -0
- package/dist/package/browser/components/StatusBar/FatalBanner.d.ts +25 -0
- package/dist/package/browser/components/StatusBar/FatalBanner.js +52 -0
- package/dist/package/browser/components/StatusBar/GlobalStatusBar.css +304 -0
- package/dist/package/browser/components/StatusBar/InfoPanel.css +174 -0
- package/dist/package/browser/components/StatusBar/InfoPanel.d.ts +19 -0
- package/dist/package/browser/components/StatusBar/InfoPanel.js +128 -0
- package/dist/package/browser/components/StatusBar/StatusChip.css +52 -0
- package/dist/package/browser/components/StatusBar/StatusChip.d.ts +40 -0
- package/dist/package/browser/components/StatusBar/StatusChip.js +13 -0
- package/dist/package/browser/components/StatusBar/StripHostView.d.ts +2 -0
- package/dist/package/browser/components/StatusBar/StripHostView.js +91 -0
- package/dist/package/browser/components/StatusBar/StripPopover.css +58 -0
- package/dist/package/browser/components/StatusBar/StripPopover.d.ts +16 -0
- package/dist/package/browser/components/StatusBar/StripPopover.js +15 -0
- package/dist/package/browser/components/StatusBar/feeds/PulseFeeds.d.ts +16 -0
- package/dist/package/browser/components/StatusBar/feeds/PulseFeeds.js +88 -0
- package/dist/package/browser/components/StatusBar/footer/CheckpointsDrawer.d.ts +4 -0
- package/dist/package/browser/components/StatusBar/footer/CheckpointsDrawer.js +77 -0
- package/dist/package/browser/components/StatusBar/footer/DiagnosticsPopover.d.ts +4 -0
- package/dist/package/browser/components/StatusBar/footer/DiagnosticsPopover.js +108 -0
- package/dist/package/browser/components/StatusBar/footer/EventsDrawer.d.ts +14 -0
- package/dist/package/browser/components/StatusBar/footer/EventsDrawer.js +25 -0
- package/dist/package/browser/components/StatusBar/footer/ForgeaxBuildPopover.d.ts +4 -0
- package/dist/package/browser/components/StatusBar/footer/ForgeaxBuildPopover.js +62 -0
- package/dist/package/browser/components/StatusBar/footer/footer.css +178 -0
- package/dist/package/browser/components/StatusBar/healthBridge.d.ts +38 -0
- package/dist/package/browser/components/StatusBar/healthBridge.js +245 -0
- package/dist/package/browser/components/StatusBar/healthStore.d.ts +80 -0
- package/dist/package/browser/components/StatusBar/healthStore.js +129 -0
- package/dist/package/browser/components/StatusBar/useStatusItem.d.ts +10 -0
- package/dist/package/browser/components/StatusBar/useStatusItem.js +35 -0
- package/dist/package/browser/components/Surfaces/SurfaceKeepAlive.css +34 -0
- package/dist/package/browser/components/Surfaces/SurfaceKeepAliveLayer.d.ts +3 -0
- package/dist/package/browser/components/Surfaces/SurfaceKeepAliveLayer.js +218 -0
- package/dist/package/browser/components/Surfaces/SurfaceOverlay.css +160 -0
- package/dist/package/browser/components/Surfaces/SurfaceOverlay.d.ts +9 -0
- package/dist/package/browser/components/Surfaces/SurfaceOverlay.js +144 -0
- package/dist/package/browser/components/TopBar/AndroidPackageDialog.d.ts +23 -0
- package/dist/package/browser/components/TopBar/AndroidPackageDialog.js +115 -0
- package/dist/package/browser/components/TopBar/FsBrowser.css +156 -0
- package/dist/package/browser/components/TopBar/FsBrowser.d.ts +8 -0
- package/dist/package/browser/components/TopBar/FsBrowser.js +93 -0
- package/dist/package/browser/components/TopBar/GameSwitcher.d.ts +29 -0
- package/dist/package/browser/components/TopBar/GameSwitcher.js +157 -0
- package/dist/package/browser/components/TopBar/IosPackageDialog.d.ts +23 -0
- package/dist/package/browser/components/TopBar/IosPackageDialog.js +115 -0
- package/dist/package/browser/components/TopBar/ProjectSwitcher.d.ts +3 -0
- package/dist/package/browser/components/TopBar/ProjectSwitcher.js +41 -0
- package/dist/package/browser/components/TopBar/PublishOnboarding.css +133 -0
- package/dist/package/browser/components/TopBar/PublishOnboarding.d.ts +10 -0
- package/dist/package/browser/components/TopBar/PublishOnboarding.js +144 -0
- package/dist/package/browser/components/TopBar/SessionSwitcher.d.ts +2 -0
- package/dist/package/browser/components/TopBar/SessionSwitcher.js +124 -0
- package/dist/package/browser/components/TopBar/TopBar.css +1672 -0
- package/dist/package/browser/components/TopBar/TopBar.d.ts +2 -0
- package/dist/package/browser/components/TopBar/TopBar.js +606 -0
- package/dist/package/browser/components/TopBar/publish-options.d.ts +20 -0
- package/dist/package/browser/components/TopBar/publish-options.js +28 -0
- package/dist/package/browser/components/TourOverlay/TourOverlay.css +122 -0
- package/dist/package/browser/components/TourOverlay/TourOverlay.d.ts +26 -0
- package/dist/package/browser/components/TourOverlay/TourOverlay.js +233 -0
- package/dist/package/browser/components/TourOverlay/index.d.ts +2 -0
- package/dist/package/browser/components/TourOverlay/index.js +1 -0
- package/dist/package/browser/components/ownership.d.ts +7 -0
- package/dist/package/browser/components/ownership.js +7 -0
- package/dist/package/browser/components/ui/SearchableMenu.css +143 -0
- package/dist/package/browser/components/ui/SearchableMenu.d.ts +30 -0
- package/dist/package/browser/components/ui/SearchableMenu.js +40 -0
- package/dist/package/browser/components/ui/alert-dialog.d.ts +20 -0
- package/dist/package/browser/components/ui/alert-dialog.js +38 -0
- package/dist/package/browser/components/ui/button.d.ts +11 -0
- package/dist/package/browser/components/ui/button.js +33 -0
- package/dist/package/browser/components/ui/checkbox.d.ts +4 -0
- package/dist/package/browser/components/ui/checkbox.js +8 -0
- package/dist/package/browser/components/ui/command.d.ts +74 -0
- package/dist/package/browser/components/ui/command.js +20 -0
- package/dist/package/browser/components/ui/dialog.d.ts +21 -0
- package/dist/package/browser/components/ui/dialog.js +34 -0
- package/dist/package/browser/components/ui/dropdown-menu.d.ts +18 -0
- package/dist/package/browser/components/ui/dropdown-menu.js +30 -0
- package/dist/package/browser/components/ui/input.d.ts +3 -0
- package/dist/package/browser/components/ui/input.js +8 -0
- package/dist/package/browser/components/ui/label.d.ts +4 -0
- package/dist/package/browser/components/ui/label.js +7 -0
- package/dist/package/browser/components/ui/popover.d.ts +7 -0
- package/dist/package/browser/components/ui/popover.js +10 -0
- package/dist/package/browser/components/ui/select.d.ts +11 -0
- package/dist/package/browser/components/ui/select.js +31 -0
- package/dist/package/browser/components/ui/tabs.d.ts +7 -0
- package/dist/package/browser/components/ui/tabs.js +12 -0
- package/dist/package/browser/components/ui/textarea.d.ts +3 -0
- package/dist/package/browser/components/ui/textarea.js +8 -0
- package/dist/package/browser/components/ui/tooltip.d.ts +7 -0
- package/dist/package/browser/components/ui/tooltip.js +10 -0
- package/dist/package/browser/core/app-shell/catalog-page-extensions.d.ts +28 -0
- package/dist/package/browser/core/app-shell/catalog-page-extensions.js +234 -0
- package/dist/package/browser/core/app-shell/derive-panel-renderers.d.ts +2 -0
- package/dist/package/browser/core/app-shell/derive-panel-renderers.js +17 -0
- package/dist/package/browser/core/app-shell/host.d.ts +31 -0
- package/dist/package/browser/core/app-shell/host.js +188 -0
- package/dist/package/browser/core/app-shell/index.d.ts +7 -0
- package/dist/package/browser/core/app-shell/index.js +8 -0
- package/dist/package/browser/core/app-shell/logger.d.ts +2 -0
- package/dist/package/browser/core/app-shell/logger.js +6 -0
- package/dist/package/browser/core/app-shell/ownership.d.ts +7 -0
- package/dist/package/browser/core/app-shell/ownership.js +7 -0
- package/dist/package/browser/core/app-shell/react/HostProvider.d.ts +10 -0
- package/dist/package/browser/core/app-shell/react/HostProvider.js +35 -0
- package/dist/package/browser/core/app-shell/surface-extension.d.ts +17 -0
- package/dist/package/browser/core/app-shell/surface-extension.js +33 -0
- package/dist/package/browser/core/app-shell/types.d.ts +176 -0
- package/dist/package/browser/core/app-shell/types.js +1 -0
- package/dist/package/browser/core/contextual-keybindings.d.ts +71 -0
- package/dist/package/browser/core/contextual-keybindings.js +198 -0
- package/dist/package/browser/core/extension-foundation/bus.d.ts +2 -0
- package/dist/package/browser/core/extension-foundation/bus.js +3 -0
- package/dist/package/browser/core/extension-foundation/capabilities.d.ts +2 -0
- package/dist/package/browser/core/extension-foundation/capabilities.js +3 -0
- package/dist/package/browser/core/extension-foundation/commands.d.ts +2 -0
- package/dist/package/browser/core/extension-foundation/commands.js +3 -0
- package/dist/package/browser/core/extension-foundation/context-keys.d.ts +2 -0
- package/dist/package/browser/core/extension-foundation/context-keys.js +3 -0
- package/dist/package/browser/core/extension-foundation/contribution-registry.d.ts +2 -0
- package/dist/package/browser/core/extension-foundation/contribution-registry.js +3 -0
- package/dist/package/browser/core/extension-foundation/errors.d.ts +2 -0
- package/dist/package/browser/core/extension-foundation/errors.js +3 -0
- package/dist/package/browser/core/extension-foundation/index.d.ts +8 -0
- package/dist/package/browser/core/extension-foundation/index.js +9 -0
- package/dist/package/browser/core/extension-foundation/loader.d.ts +2 -0
- package/dist/package/browser/core/extension-foundation/loader.js +3 -0
- package/dist/package/browser/core/extension-foundation/storage.d.ts +2 -0
- package/dist/package/browser/core/extension-foundation/storage.js +3 -0
- package/dist/package/browser/core/extension-foundation/types.d.ts +2 -0
- package/dist/package/browser/core/extension-foundation/types.js +1 -0
- package/dist/package/browser/core/extensions/builtin-commands.d.ts +2 -0
- package/dist/package/browser/core/extensions/builtin-commands.js +256 -0
- package/dist/package/browser/core/extensions/builtin-menus.d.ts +2 -0
- package/dist/package/browser/core/extensions/builtin-menus.js +252 -0
- package/dist/package/browser/core/extensions/chrome-drawer.d.ts +3 -0
- package/dist/package/browser/core/extensions/chrome-drawer.js +45 -0
- package/dist/package/browser/core/extensions/chrome-statusbar.d.ts +6 -0
- package/dist/package/browser/core/extensions/chrome-statusbar.js +26 -0
- package/dist/package/browser/core/extensions/detached-agents-browser.d.ts +3 -0
- package/dist/package/browser/core/extensions/detached-agents-browser.js +9 -0
- package/dist/package/browser/core/extensions/detached-files-browser.d.ts +3 -0
- package/dist/package/browser/core/extensions/detached-files-browser.js +6 -0
- package/dist/package/browser/core/extensions/editor-commands.d.ts +2 -0
- package/dist/package/browser/core/extensions/editor-commands.js +182 -0
- package/dist/package/browser/core/extensions/foundation-bus.d.ts +2 -0
- package/dist/package/browser/core/extensions/foundation-bus.js +3 -0
- package/dist/package/browser/core/extensions/foundation-commands.d.ts +2 -0
- package/dist/package/browser/core/extensions/foundation-commands.js +6 -0
- package/dist/package/browser/core/extensions/foundation-storage.d.ts +2 -0
- package/dist/package/browser/core/extensions/foundation-storage.js +3 -0
- package/dist/package/browser/core/extensions/host-commands.d.ts +18 -0
- package/dist/package/browser/core/extensions/host-commands.js +52 -0
- package/dist/package/browser/core/extensions/observability.d.ts +14 -0
- package/dist/package/browser/core/extensions/observability.js +18 -0
- package/dist/package/browser/core/extensions/panels-chat.d.ts +2 -0
- package/dist/package/browser/core/extensions/panels-chat.js +41 -0
- package/dist/package/browser/core/extensions/panels-editor.d.ts +8 -0
- package/dist/package/browser/core/extensions/panels-editor.js +26 -0
- package/dist/package/browser/core/extensions/panels-viewport.d.ts +2 -0
- package/dist/package/browser/core/extensions/panels-viewport.js +20 -0
- package/dist/package/browser/core/extensions/session-client.d.ts +29 -0
- package/dist/package/browser/core/extensions/session-client.js +42 -0
- package/dist/package/browser/core/extensions/slots-corner-agent-picker.d.ts +5 -0
- package/dist/package/browser/core/extensions/slots-corner-agent-picker.js +6 -0
- package/dist/package/browser/core/extensions/slots-main-area-body.d.ts +3 -0
- package/dist/package/browser/core/extensions/slots-main-area-body.js +6 -0
- package/dist/package/browser/core/extensions/slots-sidebar-agents.d.ts +3 -0
- package/dist/package/browser/core/extensions/slots-sidebar-agents.js +6 -0
- package/dist/package/browser/core/extensions/studio-domain-clients.d.ts +12 -0
- package/dist/package/browser/core/extensions/studio-domain-clients.js +15 -0
- package/dist/package/browser/core/extensions/surfaces-scene-editor.d.ts +3 -0
- package/dist/package/browser/core/extensions/surfaces-scene-editor.js +6 -0
- package/dist/package/browser/core/extensions/trajectory.d.ts +2 -0
- package/dist/package/browser/core/extensions/trajectory.js +50 -0
- package/dist/package/browser/core/page-navigation.d.ts +1 -0
- package/dist/package/browser/core/page-navigation.js +1 -0
- package/dist/package/browser/core/page-platform/activity.d.ts +4 -0
- package/dist/package/browser/core/page-platform/activity.js +46 -0
- package/dist/package/browser/core/page-platform/dockview-layout.d.ts +7 -0
- package/dist/package/browser/core/page-platform/dockview-layout.js +63 -0
- package/dist/package/browser/core/page-platform/index.d.ts +8 -0
- package/dist/package/browser/core/page-platform/index.js +8 -0
- package/dist/package/browser/core/page-platform/layout-store.d.ts +18 -0
- package/dist/package/browser/core/page-platform/layout-store.js +54 -0
- package/dist/package/browser/core/page-platform/page-dirty-probe.d.ts +1 -0
- package/dist/package/browser/core/page-platform/page-dirty-probe.js +4 -0
- package/dist/package/browser/core/page-platform/registry.d.ts +3 -0
- package/dist/package/browser/core/page-platform/registry.js +194 -0
- package/dist/package/browser/core/page-platform/resource-editor.d.ts +3 -0
- package/dist/package/browser/core/page-platform/resource-editor.js +74 -0
- package/dist/package/browser/core/page-platform/session.d.ts +10 -0
- package/dist/package/browser/core/page-platform/session.js +327 -0
- package/dist/package/browser/core/page-platform/types.d.ts +242 -0
- package/dist/package/browser/core/page-platform/types.js +10 -0
- package/dist/package/browser/core/panels/context-expression.d.ts +1 -0
- package/dist/package/browser/core/panels/context-expression.js +1 -0
- package/dist/package/browser/core/panels/drawer.d.ts +23 -0
- package/dist/package/browser/core/panels/drawer.js +1 -0
- package/dist/package/browser/core/panels/index.d.ts +7 -0
- package/dist/package/browser/core/panels/index.js +7 -0
- package/dist/package/browser/core/panels/panel-action-registry.d.ts +6 -0
- package/dist/package/browser/core/panels/panel-action-registry.js +62 -0
- package/dist/package/browser/core/panels/panel-control-registry.d.ts +6 -0
- package/dist/package/browser/core/panels/panel-control-registry.js +54 -0
- package/dist/package/browser/core/panels/resolve-panel-action-state.d.ts +10 -0
- package/dist/package/browser/core/panels/resolve-panel-action-state.js +9 -0
- package/dist/package/browser/core/panels/strip.d.ts +40 -0
- package/dist/package/browser/core/panels/strip.js +1 -0
- package/dist/package/browser/core/panels/types.d.ts +143 -0
- package/dist/package/browser/core/panels/types.js +1 -0
- package/dist/package/browser/i18n/index.d.ts +50 -0
- package/dist/package/browser/i18n/index.js +207 -0
- package/dist/package/browser/i18n/locales/en.json +1959 -0
- package/dist/package/browser/i18n/locales/zh.json +1959 -0
- package/dist/package/browser/index.d.ts +2 -0
- package/dist/package/browser/index.js +2 -0
- package/dist/package/browser/lib/a11y-summary.d.ts +17 -0
- package/dist/package/browser/lib/a11y-summary.js +66 -0
- package/dist/package/browser/lib/action-dom-discovery.d.ts +2 -0
- package/dist/package/browser/lib/action-dom-discovery.js +84 -0
- package/dist/package/browser/lib/action-registry.d.ts +94 -0
- package/dist/package/browser/lib/action-registry.js +210 -0
- package/dist/package/browser/lib/aegis.d.ts +40 -0
- package/dist/package/browser/lib/aegis.js +230 -0
- package/dist/package/browser/lib/agent-catalog-url.d.ts +9 -0
- package/dist/package/browser/lib/agent-catalog-url.js +24 -0
- package/dist/package/browser/lib/agent-cli-provider.d.ts +10 -0
- package/dist/package/browser/lib/agent-cli-provider.js +81 -0
- package/dist/package/browser/lib/ai-intents.d.ts +30 -0
- package/dist/package/browser/lib/ai-intents.js +52 -0
- package/dist/package/browser/lib/broadcast-stream.d.ts +17 -0
- package/dist/package/browser/lib/broadcast-stream.js +163 -0
- package/dist/package/browser/lib/browser-prefs-sync.d.ts +16 -0
- package/dist/package/browser/lib/browser-prefs-sync.js +151 -0
- package/dist/package/browser/lib/builtin-actions.d.ts +2 -0
- package/dist/package/browser/lib/builtin-actions.js +558 -0
- package/dist/package/browser/lib/bus.d.ts +25 -0
- package/dist/package/browser/lib/bus.js +71 -0
- package/dist/package/browser/lib/checkpoint-api.d.ts +54 -0
- package/dist/package/browser/lib/checkpoint-api.js +41 -0
- package/dist/package/browser/lib/cli-providers.d.ts +33 -0
- package/dist/package/browser/lib/cli-providers.js +61 -0
- package/dist/package/browser/lib/command-palette-store.d.ts +5 -0
- package/dist/package/browser/lib/command-palette-store.js +22 -0
- package/dist/package/browser/lib/composer-bridge.d.ts +103 -0
- package/dist/package/browser/lib/composer-bridge.js +448 -0
- package/dist/package/browser/lib/dashboard-api.d.ts +104 -0
- package/dist/package/browser/lib/dashboard-api.js +125 -0
- package/dist/package/browser/lib/deep-link-bus.d.ts +10 -0
- package/dist/package/browser/lib/deep-link-bus.js +35 -0
- package/dist/package/browser/lib/dialog.d.ts +40 -0
- package/dist/package/browser/lib/dialog.js +103 -0
- package/dist/package/browser/lib/editor-facts-bus.d.ts +27 -0
- package/dist/package/browser/lib/editor-facts-bus.js +25 -0
- package/dist/package/browser/lib/extension-api.d.ts +140 -0
- package/dist/package/browser/lib/extension-api.js +90 -0
- package/dist/package/browser/lib/file-activity-stream.d.ts +54 -0
- package/dist/package/browser/lib/file-activity-stream.js +123 -0
- package/dist/package/browser/lib/file-family.d.ts +15 -0
- package/dist/package/browser/lib/file-family.js +25 -0
- package/dist/package/browser/lib/game-templates.d.ts +7 -0
- package/dist/package/browser/lib/game-templates.js +15 -0
- package/dist/package/browser/lib/global-shortcuts.d.ts +121 -0
- package/dist/package/browser/lib/global-shortcuts.js +551 -0
- package/dist/package/browser/lib/logSink.d.ts +16 -0
- package/dist/package/browser/lib/logSink.js +128 -0
- package/dist/package/browser/lib/lucide-icon.d.ts +5 -0
- package/dist/package/browser/lib/lucide-icon.js +20 -0
- package/dist/package/browser/lib/menu-registry.d.ts +113 -0
- package/dist/package/browser/lib/menu-registry.js +197 -0
- package/dist/package/browser/lib/model-config.d.ts +89 -0
- package/dist/package/browser/lib/model-config.js +72 -0
- package/dist/package/browser/lib/model-prefs.d.ts +5 -0
- package/dist/package/browser/lib/model-prefs.js +53 -0
- package/dist/package/browser/lib/model-route/index.d.ts +81 -0
- package/dist/package/browser/lib/model-route/index.js +175 -0
- package/dist/package/browser/lib/narrative-copilot.d.ts +20 -0
- package/dist/package/browser/lib/narrative-copilot.js +105 -0
- package/dist/package/browser/lib/native-menu-bridge.d.ts +37 -0
- package/dist/package/browser/lib/native-menu-bridge.js +151 -0
- package/dist/package/browser/lib/page-tab-icons.d.ts +21 -0
- package/dist/package/browser/lib/page-tab-icons.js +64 -0
- package/dist/package/browser/lib/panel-tab-icons.d.ts +21 -0
- package/dist/package/browser/lib/panel-tab-icons.js +49 -0
- package/dist/package/browser/lib/passive-feedback.d.ts +50 -0
- package/dist/package/browser/lib/passive-feedback.js +171 -0
- package/dist/package/browser/lib/perception-stream.d.ts +27 -0
- package/dist/package/browser/lib/perception-stream.js +42 -0
- package/dist/package/browser/lib/platform/index.d.ts +14 -0
- package/dist/package/browser/lib/platform/index.js +13 -0
- package/dist/package/browser/lib/platform/runtime.d.ts +22 -0
- package/dist/package/browser/lib/platform/runtime.js +42 -0
- package/dist/package/browser/lib/platform/shell-adapter.d.ts +24 -0
- package/dist/package/browser/lib/platform/shell-adapter.js +74 -0
- package/dist/package/browser/lib/platform/surface-windowing.d.ts +4 -0
- package/dist/package/browser/lib/platform/surface-windowing.js +16 -0
- package/dist/package/browser/lib/platform/surface.d.ts +13 -0
- package/dist/package/browser/lib/platform/surface.js +27 -0
- package/dist/package/browser/lib/platform/use-surface-windowing.d.ts +1 -0
- package/dist/package/browser/lib/platform/use-surface-windowing.js +6 -0
- package/dist/package/browser/lib/platform/window-manager.d.ts +2 -0
- package/dist/package/browser/lib/platform/window-manager.js +82 -0
- package/dist/package/browser/lib/project-context.d.ts +4 -0
- package/dist/package/browser/lib/project-context.js +42 -0
- package/dist/package/browser/lib/project.d.ts +5 -0
- package/dist/package/browser/lib/project.js +8 -0
- package/dist/package/browser/lib/recent-games.d.ts +24 -0
- package/dist/package/browser/lib/recent-games.js +50 -0
- package/dist/package/browser/lib/repair-builtin-menus.d.ts +6 -0
- package/dist/package/browser/lib/repair-builtin-menus.js +18 -0
- package/dist/package/browser/lib/reply-language.d.ts +9 -0
- package/dist/package/browser/lib/reply-language.js +11 -0
- package/dist/package/browser/lib/resilient-polling.d.ts +9 -0
- package/dist/package/browser/lib/resilient-polling.js +16 -0
- package/dist/package/browser/lib/session-time.d.ts +8 -0
- package/dist/package/browser/lib/session-time.js +40 -0
- package/dist/package/browser/lib/shell-live-data.d.ts +12 -0
- package/dist/package/browser/lib/shell-live-data.js +66 -0
- package/dist/package/browser/lib/sse.d.ts +5 -0
- package/dist/package/browser/lib/sse.js +42 -0
- package/dist/package/browser/lib/storageKeys.d.ts +70 -0
- package/dist/package/browser/lib/storageKeys.js +89 -0
- package/dist/package/browser/lib/surface-store.d.ts +38 -0
- package/dist/package/browser/lib/surface-store.js +62 -0
- package/dist/package/browser/lib/surface.d.ts +56 -0
- package/dist/package/browser/lib/surface.js +225 -0
- package/dist/package/browser/lib/surfaceAnchors.d.ts +16 -0
- package/dist/package/browser/lib/surfaceAnchors.js +76 -0
- package/dist/package/browser/lib/surfaceKeepAliveLayout.d.ts +7 -0
- package/dist/package/browser/lib/surfaceKeepAliveLayout.js +12 -0
- package/dist/package/browser/lib/telemetry-test-prelude.d.ts +0 -0
- package/dist/package/browser/lib/telemetry-test-prelude.js +14 -0
- package/dist/package/browser/lib/text-edit-actions.d.ts +14 -0
- package/dist/package/browser/lib/text-edit-actions.js +184 -0
- package/dist/package/browser/lib/trace.d.ts +34 -0
- package/dist/package/browser/lib/trace.js +273 -0
- package/dist/package/browser/lib/trustedOrigins.d.ts +4 -0
- package/dist/package/browser/lib/trustedOrigins.js +36 -0
- package/dist/package/browser/lib/ui-action-highlight.d.ts +2 -0
- package/dist/package/browser/lib/ui-action-highlight.js +93 -0
- package/dist/package/browser/lib/ui-bridge.d.ts +2 -0
- package/dist/package/browser/lib/ui-bridge.js +224 -0
- package/dist/package/browser/lib/ui-screenshot.d.ts +31 -0
- package/dist/package/browser/lib/ui-screenshot.js +155 -0
- package/dist/package/browser/lib/ui-trajectory.d.ts +47 -0
- package/dist/package/browser/lib/ui-trajectory.js +99 -0
- package/dist/package/browser/lib/use-bus-snapshot.d.ts +3 -0
- package/dist/package/browser/lib/use-bus-snapshot.js +13 -0
- package/dist/package/browser/lib/use-extension-manifest.d.ts +19 -0
- package/dist/package/browser/lib/use-extension-manifest.js +67 -0
- package/dist/package/browser/lib/useConfirmToast.d.ts +26 -0
- package/dist/package/browser/lib/useConfirmToast.js +120 -0
- package/dist/package/browser/lib/utils.d.ts +2 -0
- package/dist/package/browser/lib/utils.js +5 -0
- package/dist/package/browser/lib/vag-action-bridge.d.ts +2 -0
- package/dist/package/browser/lib/vag-action-bridge.js +130 -0
- package/dist/package/browser/main.d.ts +1 -0
- package/dist/package/browser/main.js +157 -0
- package/dist/package/browser/store-parts/domain-clients.d.ts +149 -0
- package/dist/package/browser/store-parts/domain-clients.js +17 -0
- package/dist/package/browser/store-parts/observability.d.ts +4 -0
- package/dist/package/browser/store-parts/observability.js +35 -0
- package/dist/package/browser/store-parts/persistence.d.ts +40 -0
- package/dist/package/browser/store-parts/persistence.js +245 -0
- package/dist/package/browser/store-parts/session-client.d.ts +73 -0
- package/dist/package/browser/store-parts/session-client.js +17 -0
- package/dist/package/browser/store-parts/session-pick.d.ts +8 -0
- package/dist/package/browser/store-parts/session-pick.js +21 -0
- package/dist/package/browser/store-parts/shell.d.ts +5 -0
- package/dist/package/browser/store-parts/shell.js +37 -0
- package/dist/package/browser/store.d.ts +455 -0
- package/dist/package/browser/store.js +890 -0
- package/dist/package/browser/styles/forgeax-preview/agent-avatar.css +69 -0
- package/dist/package/browser/styles/forgeax-preview/aliases.css +21 -0
- package/dist/package/browser/styles/forgeax-preview/chat-popover.css +141 -0
- package/dist/package/browser/styles/forgeax-preview/chat-session.css +896 -0
- package/dist/package/browser/styles/forgeax-preview/composer-port.css +531 -0
- package/dist/package/browser/styles/forgeax-preview/design-tokens.css +25 -0
- package/dist/package/browser/styles/forgeax-preview/index.css +9 -0
- package/dist/package/browser/styles/forgeax-preview/scene-fx.css +117 -0
- package/dist/package/browser/styles/forgeax-preview/shell-layout.css +280 -0
- package/dist/package/browser/styles/forgeax-preview/shell-skin.css +128 -0
- package/dist/package/browser/styles/foundation.tokens.json +2755 -0
- package/dist/package/browser/styles/global.css +196 -0
- package/dist/package/browser/styles/motion.css +558 -0
- package/dist/package/browser/styles/plugin-token-bridge.css +19 -0
- package/dist/package/browser/styles/primitive.css +197 -0
- package/dist/package/browser/styles/semantic.tokens.json +1524 -0
- package/dist/package/browser/styles/tokens.css +304 -0
- package/dist/package/node/App.js +11 -0
- package/dist/package/node/ApplicationDetachedShell.js +10 -0
- package/dist/package/node/ApplicationShell.js +62 -0
- package/dist/package/node/app-kit.js +4 -0
- package/dist/package/node/appHostBootstrap.js +145 -0
- package/dist/package/node/application.js +64 -0
- package/dist/package/node/boot/SettingsSection.js +82 -0
- package/dist/package/node/boot/broadcast.js +32 -0
- package/dist/package/node/boot/driver.js +47 -0
- package/dist/package/node/boot/store.js +114 -0
- package/dist/package/node/boot/themes.js +21 -0
- package/dist/package/node/boot/types.js +30 -0
- package/dist/package/node/brand/BrandProvider.js +35 -0
- package/dist/package/node/brand/index.js +3 -0
- package/dist/package/node/brand/runtime.js +71 -0
- package/dist/package/node/brand/types.js +9 -0
- package/dist/package/node/components/ActivityRail/ActivityRail.js +164 -0
- package/dist/package/node/components/ActivityRail/activity-rail-model.js +144 -0
- package/dist/package/node/components/AgentAvatar/AgentAvatar.js +50 -0
- package/dist/package/node/components/BuildBadge/BuildBadge.js +279 -0
- package/dist/package/node/components/Bus/BusAdminPanel.js +1385 -0
- package/dist/package/node/components/Bus/CapabilityOverview.js +50 -0
- package/dist/package/node/components/ChatColumn/ChatColumn.js +18 -0
- package/dist/package/node/components/ChatColumn/SessionTabStrip.js +103 -0
- package/dist/package/node/components/ChatColumn/useChatWidth.js +13 -0
- package/dist/package/node/components/CommandPalette/CommandPalette.js +242 -0
- package/dist/package/node/components/Confirm/ConfirmDialog.js +113 -0
- package/dist/package/node/components/ContextMenu/ContextMenu.js +218 -0
- package/dist/package/node/components/ContextMenu/menuRegistry.js +152 -0
- package/dist/package/node/components/DetachedSurface.js +102 -0
- package/dist/package/node/components/DockShell/DockPanelHost.js +7 -0
- package/dist/package/node/components/DockShell/DockRegion.js +315 -0
- package/dist/package/node/components/DockShell/DockTab.js +139 -0
- package/dist/package/node/components/DockShell/ExtensionHostPanel.js +68 -0
- package/dist/package/node/components/DockShell/ExtensionRuntimeFrame.js +56 -0
- package/dist/package/node/components/DockShell/PanelWindowingBoundary.js +9 -0
- package/dist/package/node/components/DockShell/chatDockAnimation.js +101 -0
- package/dist/package/node/components/DockShell/chatDockFullscreen.js +22 -0
- package/dist/package/node/components/DockShell/chatDockLayout.js +11 -0
- package/dist/package/node/components/DockShell/compact-empty-dock-groups.js +28 -0
- package/dist/package/node/components/DockShell/crossInstanceDrop.js +1 -0
- package/dist/package/node/components/DockShell/dockResetEpoch.js +13 -0
- package/dist/package/node/components/DockShell/dockTitle.js +36 -0
- package/dist/package/node/components/DockShell/dockviewRegistry.js +1 -0
- package/dist/package/node/components/DockShell/edgeDrawer.js +1144 -0
- package/dist/package/node/components/DockShell/edgePinStore.js +37 -0
- package/dist/package/node/components/DockShell/extension-editor-bridge.js +100 -0
- package/dist/package/node/components/DockShell/extension-runtime-selection.js +6 -0
- package/dist/package/node/components/DockShell/extensionRuntime.js +84 -0
- package/dist/package/node/components/DockShell/footer-panel-visibility.js +43 -0
- package/dist/package/node/components/DockShell/footer-panels.js +7 -0
- package/dist/package/node/components/DockShell/panelRegistry.js +126 -0
- package/dist/package/node/components/DockShell/panelRenderers.js +25 -0
- package/dist/package/node/components/DockShell/panelTabCommands.js +133 -0
- package/dist/package/node/components/DockShell/panelWindowing.js +42 -0
- package/dist/package/node/components/DockShell/regions.js +1 -0
- package/dist/package/node/components/DockShell/resolveRegion.js +1 -0
- package/dist/package/node/components/DockShell/sanitizeDockLayout.js +46 -0
- package/dist/package/node/components/DockShell/sideEdgeMove.js +1 -0
- package/dist/package/node/components/DockShell/studioTabMenuProvider.js +39 -0
- package/dist/package/node/components/DockShell/tabContextMenu.js +68 -0
- package/dist/package/node/components/DockShell/ueDrag/controller.js +785 -0
- package/dist/package/node/components/DockShell/ueDrag/geometry.js +217 -0
- package/dist/package/node/components/DockShell/ueDrag/overlay.js +206 -0
- package/dist/package/node/components/DockShell/useAuxBarWidth.js +13 -0
- package/dist/package/node/components/Drawer/DrawerHostView.js +93 -0
- package/dist/package/node/components/Drawer/DrawerLauncher.js +22 -0
- package/dist/package/node/components/Drawer/useDrawerStore.js +80 -0
- package/dist/package/node/components/ErrorBoundary.js +131 -0
- package/dist/package/node/components/ExtensionHost/ExtensionIframeHost.js +179 -0
- package/dist/package/node/components/ExtensionHost/NativeExtensionHost.js +152 -0
- package/dist/package/node/components/Feedback/FeedbackPanel.js +118 -0
- package/dist/package/node/components/Feedback/PassiveFeedback.js +218 -0
- package/dist/package/node/components/Feedback/collect.js +80 -0
- package/dist/package/node/components/Feedback/store.js +174 -0
- package/dist/package/node/components/LangSwitcher/LangSwitcher.js +44 -0
- package/dist/package/node/components/MainArea/ConsolePanel.js +16 -0
- package/dist/package/node/components/MainArea/MainArea.js +20 -0
- package/dist/package/node/components/MainArea/StandaloneExtensionIframe.js +155 -0
- package/dist/package/node/components/MainArea/SurfacePanels.js +27 -0
- package/dist/package/node/components/MainArea/TelemetryViewer.js +116 -0
- package/dist/package/node/components/MenuBar/MenuBar.js +286 -0
- package/dist/package/node/components/MenuBar/index.js +1 -0
- package/dist/package/node/components/MenuBar/menubar-open-state.js +11 -0
- package/dist/package/node/components/MenuBar/menubar-surface.js +201 -0
- package/dist/package/node/components/ModelPicker/index.js +1 -0
- package/dist/package/node/components/ModelPicker/useModelCatalog.js +100 -0
- package/dist/package/node/components/Onboarding/ConnectModelPrompt.js +40 -0
- package/dist/package/node/components/Onboarding/OnboardingController.js +549 -0
- package/dist/package/node/components/Onboarding/connect-selection.js +18 -0
- package/dist/package/node/components/Onboarding/home-transition.js +20 -0
- package/dist/package/node/components/Onboarding/index.js +3 -0
- package/dist/package/node/components/Onboarding/prepareTourShell.js +11 -0
- package/dist/package/node/components/Onboarding/project-name.js +29 -0
- package/dist/package/node/components/Onboarding/types.js +77 -0
- package/dist/package/node/components/PageTabs/PageTabStrip.js +214 -0
- package/dist/package/node/components/PageTabs/openablePageTypes.js +13 -0
- package/dist/package/node/components/PanelShell/PanelShell.js +459 -0
- package/dist/package/node/components/Resize/ResizeHandle.js +1 -0
- package/dist/package/node/components/SceneBackground/SceneBackground.js +5 -0
- package/dist/package/node/components/SchemaForm/SchemaForm.js +86 -0
- package/dist/package/node/components/SchemaForm/schema-form-utils.js +51 -0
- package/dist/package/node/components/SettingsPrimitives.js +145 -0
- package/dist/package/node/components/Sidebar/BusHealthLamp.js +72 -0
- package/dist/package/node/components/Sidebar/FilesPanel.js +234 -0
- package/dist/package/node/components/Sidebar/Sidebar.js +8 -0
- package/dist/package/node/components/Sidebar/sidebar-types.js +1 -0
- package/dist/package/node/components/SlotDebugOverlay/SlotDebugOverlay.js +1 -0
- package/dist/package/node/components/SlotDebugOverlay/hashHue.js +1 -0
- package/dist/package/node/components/SlotDebugOverlay/index.js +1 -0
- package/dist/package/node/components/SlotDebugOverlay/isSlotDebugEnabled.js +1 -0
- package/dist/package/node/components/StatusBar/FatalBanner.js +52 -0
- package/dist/package/node/components/StatusBar/InfoPanel.js +128 -0
- package/dist/package/node/components/StatusBar/StatusChip.js +13 -0
- package/dist/package/node/components/StatusBar/StripHostView.js +91 -0
- package/dist/package/node/components/StatusBar/StripPopover.js +15 -0
- package/dist/package/node/components/StatusBar/feeds/PulseFeeds.js +88 -0
- package/dist/package/node/components/StatusBar/footer/CheckpointsDrawer.js +77 -0
- package/dist/package/node/components/StatusBar/footer/DiagnosticsPopover.js +108 -0
- package/dist/package/node/components/StatusBar/footer/EventsDrawer.js +25 -0
- package/dist/package/node/components/StatusBar/footer/ForgeaxBuildPopover.js +62 -0
- package/dist/package/node/components/StatusBar/healthBridge.js +245 -0
- package/dist/package/node/components/StatusBar/healthStore.js +129 -0
- package/dist/package/node/components/StatusBar/useStatusItem.js +35 -0
- package/dist/package/node/components/Surfaces/SurfaceKeepAliveLayer.js +218 -0
- package/dist/package/node/components/Surfaces/SurfaceOverlay.js +144 -0
- package/dist/package/node/components/TopBar/AndroidPackageDialog.js +115 -0
- package/dist/package/node/components/TopBar/FsBrowser.js +93 -0
- package/dist/package/node/components/TopBar/GameSwitcher.js +157 -0
- package/dist/package/node/components/TopBar/IosPackageDialog.js +115 -0
- package/dist/package/node/components/TopBar/ProjectSwitcher.js +41 -0
- package/dist/package/node/components/TopBar/PublishOnboarding.js +144 -0
- package/dist/package/node/components/TopBar/SessionSwitcher.js +124 -0
- package/dist/package/node/components/TopBar/TopBar.js +606 -0
- package/dist/package/node/components/TopBar/publish-options.js +28 -0
- package/dist/package/node/components/TourOverlay/TourOverlay.js +233 -0
- package/dist/package/node/components/TourOverlay/index.js +1 -0
- package/dist/package/node/components/ownership.js +7 -0
- package/dist/package/node/components/ui/SearchableMenu.js +40 -0
- package/dist/package/node/components/ui/alert-dialog.js +38 -0
- package/dist/package/node/components/ui/button.js +33 -0
- package/dist/package/node/components/ui/checkbox.js +8 -0
- package/dist/package/node/components/ui/command.js +20 -0
- package/dist/package/node/components/ui/dialog.js +34 -0
- package/dist/package/node/components/ui/dropdown-menu.js +30 -0
- package/dist/package/node/components/ui/input.js +8 -0
- package/dist/package/node/components/ui/label.js +7 -0
- package/dist/package/node/components/ui/popover.js +10 -0
- package/dist/package/node/components/ui/select.js +31 -0
- package/dist/package/node/components/ui/tabs.js +12 -0
- package/dist/package/node/components/ui/textarea.js +8 -0
- package/dist/package/node/components/ui/tooltip.js +10 -0
- package/dist/package/node/core/app-shell/catalog-page-extensions.js +234 -0
- package/dist/package/node/core/app-shell/derive-panel-renderers.js +17 -0
- package/dist/package/node/core/app-shell/host.js +188 -0
- package/dist/package/node/core/app-shell/index.js +8 -0
- package/dist/package/node/core/app-shell/logger.js +6 -0
- package/dist/package/node/core/app-shell/ownership.js +7 -0
- package/dist/package/node/core/app-shell/react/HostProvider.js +35 -0
- package/dist/package/node/core/app-shell/surface-extension.js +33 -0
- package/dist/package/node/core/app-shell/types.js +1 -0
- package/dist/package/node/core/contextual-keybindings.js +198 -0
- package/dist/package/node/core/extension-foundation/bus.js +3 -0
- package/dist/package/node/core/extension-foundation/capabilities.js +3 -0
- package/dist/package/node/core/extension-foundation/commands.js +3 -0
- package/dist/package/node/core/extension-foundation/context-keys.js +3 -0
- package/dist/package/node/core/extension-foundation/contribution-registry.js +3 -0
- package/dist/package/node/core/extension-foundation/errors.js +3 -0
- package/dist/package/node/core/extension-foundation/index.js +9 -0
- package/dist/package/node/core/extension-foundation/loader.js +3 -0
- package/dist/package/node/core/extension-foundation/storage.js +3 -0
- package/dist/package/node/core/extension-foundation/types.js +1 -0
- package/dist/package/node/core/extensions/builtin-commands.js +256 -0
- package/dist/package/node/core/extensions/builtin-menus.js +252 -0
- package/dist/package/node/core/extensions/chrome-drawer.js +45 -0
- package/dist/package/node/core/extensions/chrome-statusbar.js +26 -0
- package/dist/package/node/core/extensions/detached-agents-browser.js +9 -0
- package/dist/package/node/core/extensions/detached-files-browser.js +6 -0
- package/dist/package/node/core/extensions/editor-commands.js +182 -0
- package/dist/package/node/core/extensions/foundation-bus.js +3 -0
- package/dist/package/node/core/extensions/foundation-commands.js +6 -0
- package/dist/package/node/core/extensions/foundation-storage.js +3 -0
- package/dist/package/node/core/extensions/host-commands.js +52 -0
- package/dist/package/node/core/extensions/observability.js +18 -0
- package/dist/package/node/core/extensions/panels-chat.js +41 -0
- package/dist/package/node/core/extensions/panels-editor.js +26 -0
- package/dist/package/node/core/extensions/panels-viewport.js +20 -0
- package/dist/package/node/core/extensions/session-client.js +42 -0
- package/dist/package/node/core/extensions/slots-corner-agent-picker.js +6 -0
- package/dist/package/node/core/extensions/slots-main-area-body.js +6 -0
- package/dist/package/node/core/extensions/slots-sidebar-agents.js +6 -0
- package/dist/package/node/core/extensions/studio-domain-clients.js +15 -0
- package/dist/package/node/core/extensions/surfaces-scene-editor.js +6 -0
- package/dist/package/node/core/extensions/trajectory.js +50 -0
- package/dist/package/node/core/page-navigation.js +1 -0
- package/dist/package/node/core/page-platform/activity.js +46 -0
- package/dist/package/node/core/page-platform/dockview-layout.js +63 -0
- package/dist/package/node/core/page-platform/index.js +8 -0
- package/dist/package/node/core/page-platform/layout-store.js +54 -0
- package/dist/package/node/core/page-platform/page-dirty-probe.js +4 -0
- package/dist/package/node/core/page-platform/registry.js +194 -0
- package/dist/package/node/core/page-platform/resource-editor.js +74 -0
- package/dist/package/node/core/page-platform/session.js +327 -0
- package/dist/package/node/core/page-platform/types.js +10 -0
- package/dist/package/node/core/panels/context-expression.js +1 -0
- package/dist/package/node/core/panels/drawer.js +1 -0
- package/dist/package/node/core/panels/index.js +7 -0
- package/dist/package/node/core/panels/panel-action-registry.js +62 -0
- package/dist/package/node/core/panels/panel-control-registry.js +54 -0
- package/dist/package/node/core/panels/resolve-panel-action-state.js +9 -0
- package/dist/package/node/core/panels/strip.js +1 -0
- package/dist/package/node/core/panels/types.js +1 -0
- package/dist/package/node/i18n/index.js +207 -0
- package/dist/package/node/i18n/locales/en.json +1959 -0
- package/dist/package/node/i18n/locales/zh.json +1959 -0
- package/dist/package/node/index.js +2 -0
- package/dist/package/node/lib/a11y-summary.js +66 -0
- package/dist/package/node/lib/action-dom-discovery.js +84 -0
- package/dist/package/node/lib/action-registry.js +210 -0
- package/dist/package/node/lib/aegis.js +230 -0
- package/dist/package/node/lib/agent-catalog-url.js +24 -0
- package/dist/package/node/lib/agent-cli-provider.js +81 -0
- package/dist/package/node/lib/ai-intents.js +52 -0
- package/dist/package/node/lib/broadcast-stream.js +163 -0
- package/dist/package/node/lib/browser-prefs-sync.js +151 -0
- package/dist/package/node/lib/builtin-actions.js +558 -0
- package/dist/package/node/lib/bus.js +71 -0
- package/dist/package/node/lib/checkpoint-api.js +41 -0
- package/dist/package/node/lib/cli-providers.js +61 -0
- package/dist/package/node/lib/command-palette-store.js +22 -0
- package/dist/package/node/lib/composer-bridge.js +448 -0
- package/dist/package/node/lib/dashboard-api.js +125 -0
- package/dist/package/node/lib/deep-link-bus.js +35 -0
- package/dist/package/node/lib/dialog.js +103 -0
- package/dist/package/node/lib/editor-facts-bus.js +25 -0
- package/dist/package/node/lib/extension-api.js +90 -0
- package/dist/package/node/lib/file-activity-stream.js +123 -0
- package/dist/package/node/lib/file-family.js +25 -0
- package/dist/package/node/lib/game-templates.js +15 -0
- package/dist/package/node/lib/global-shortcuts.js +551 -0
- package/dist/package/node/lib/logSink.js +128 -0
- package/dist/package/node/lib/lucide-icon.js +20 -0
- package/dist/package/node/lib/menu-registry.js +197 -0
- package/dist/package/node/lib/model-config.js +72 -0
- package/dist/package/node/lib/model-prefs.js +53 -0
- package/dist/package/node/lib/model-route/index.js +175 -0
- package/dist/package/node/lib/narrative-copilot.js +105 -0
- package/dist/package/node/lib/native-menu-bridge.js +151 -0
- package/dist/package/node/lib/page-tab-icons.js +64 -0
- package/dist/package/node/lib/panel-tab-icons.js +49 -0
- package/dist/package/node/lib/passive-feedback.js +171 -0
- package/dist/package/node/lib/perception-stream.js +42 -0
- package/dist/package/node/lib/platform/index.js +13 -0
- package/dist/package/node/lib/platform/runtime.js +42 -0
- package/dist/package/node/lib/platform/shell-adapter.js +74 -0
- package/dist/package/node/lib/platform/surface-windowing.js +16 -0
- package/dist/package/node/lib/platform/surface.js +27 -0
- package/dist/package/node/lib/platform/use-surface-windowing.js +6 -0
- package/dist/package/node/lib/platform/window-manager.js +82 -0
- package/dist/package/node/lib/project-context.js +42 -0
- package/dist/package/node/lib/project.js +8 -0
- package/dist/package/node/lib/recent-games.js +50 -0
- package/dist/package/node/lib/repair-builtin-menus.js +18 -0
- package/dist/package/node/lib/reply-language.js +11 -0
- package/dist/package/node/lib/resilient-polling.js +16 -0
- package/dist/package/node/lib/session-time.js +40 -0
- package/dist/package/node/lib/shell-live-data.js +66 -0
- package/dist/package/node/lib/sse.js +42 -0
- package/dist/package/node/lib/storageKeys.js +89 -0
- package/dist/package/node/lib/surface-store.js +62 -0
- package/dist/package/node/lib/surface.js +225 -0
- package/dist/package/node/lib/surfaceAnchors.js +76 -0
- package/dist/package/node/lib/surfaceKeepAliveLayout.js +12 -0
- package/dist/package/node/lib/telemetry-test-prelude.js +14 -0
- package/dist/package/node/lib/text-edit-actions.js +184 -0
- package/dist/package/node/lib/trace.js +273 -0
- package/dist/package/node/lib/trustedOrigins.js +36 -0
- package/dist/package/node/lib/ui-action-highlight.js +93 -0
- package/dist/package/node/lib/ui-bridge.js +224 -0
- package/dist/package/node/lib/ui-screenshot.js +155 -0
- package/dist/package/node/lib/ui-trajectory.js +99 -0
- package/dist/package/node/lib/use-bus-snapshot.js +13 -0
- package/dist/package/node/lib/use-extension-manifest.js +67 -0
- package/dist/package/node/lib/useConfirmToast.js +120 -0
- package/dist/package/node/lib/utils.js +5 -0
- package/dist/package/node/lib/vag-action-bridge.js +130 -0
- package/dist/package/node/main.js +157 -0
- package/dist/package/node/store-parts/domain-clients.js +17 -0
- package/dist/package/node/store-parts/observability.js +35 -0
- package/dist/package/node/store-parts/persistence.js +245 -0
- package/dist/package/node/store-parts/session-client.js +17 -0
- package/dist/package/node/store-parts/session-pick.js +21 -0
- package/dist/package/node/store-parts/shell.js +37 -0
- package/dist/package/node/store.js +890 -0
- package/dist/package/node/styles/foundation.tokens.json +2755 -0
- package/dist/package/node/styles/semantic.tokens.json +1524 -0
- package/dist/package/packages/design/styles/fx-bridge.css +25 -0
- package/dist/package/packages/design/styles/primitive.css +199 -0
- package/dist/package/packages/design/styles/semantic.css +262 -0
- package/dist/package/packages/design/theme.d.ts +15 -0
- package/dist/package/packages/design/theme.js +31 -0
- package/dist/package/packages/design/tokens.css +14 -0
- package/package.json +145 -0
|
@@ -0,0 +1,186 @@
|
|
|
1
|
+
/* MenuBar (T2) — Web menu bar rendered inside TopBar's `.tb-left`.
|
|
2
|
+
Sits before ProjectSwitcher, uses the same 12px font-size / secondary text
|
|
3
|
+
color idiom as the rest of TopBar. Under Tauri, only the brand row renders
|
|
4
|
+
(or nothing) — the OS draws the real menu bar. */
|
|
5
|
+
|
|
6
|
+
.fx-menubar {
|
|
7
|
+
display: inline-flex;
|
|
8
|
+
align-items: center;
|
|
9
|
+
gap: 2px;
|
|
10
|
+
flex-shrink: 0;
|
|
11
|
+
height: 100%;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.fx-menubar-btn {
|
|
15
|
+
/* Full-bar-height cell: the hover/open highlight fills the whole menubar
|
|
16
|
+
height instead of a short chip. Only horizontal padding (9px); the label
|
|
17
|
+
stays vertically centred via align-items, so its position doesn't shift. */
|
|
18
|
+
display: inline-flex;
|
|
19
|
+
align-items: center;
|
|
20
|
+
height: 100%;
|
|
21
|
+
padding: 0 9px;
|
|
22
|
+
background: transparent;
|
|
23
|
+
border: none;
|
|
24
|
+
/* Square hover/open highlight (no 倒角) to match the flush, square-cornered
|
|
25
|
+
top bar + dock chrome. */
|
|
26
|
+
border-radius: 0;
|
|
27
|
+
color: var(--color-text-secondary);
|
|
28
|
+
font-size: 12px;
|
|
29
|
+
cursor: pointer;
|
|
30
|
+
flex-shrink: 0;
|
|
31
|
+
white-space: nowrap;
|
|
32
|
+
transition:
|
|
33
|
+
background var(--motion-duration-instant) var(--motion-ease-standard),
|
|
34
|
+
color var(--motion-duration-instant) var(--motion-ease-standard);
|
|
35
|
+
}
|
|
36
|
+
.fx-menubar-btn:hover {
|
|
37
|
+
/* Bumped from --color-interaction-hover (0.05) to the neutral-selected surface
|
|
38
|
+
(0.10) so the top-level pill highlight is legible against TopBar — the 0.05
|
|
39
|
+
overlay read as almost invisible here. */
|
|
40
|
+
background: var(--color-interaction-selected-neutral, var(--color-interaction-hover));
|
|
41
|
+
color: var(--color-text-primary);
|
|
42
|
+
}
|
|
43
|
+
/* Open menu (UE-style): the trigger whose panel is showing stays lit in the
|
|
44
|
+
brand theme colour, so it's obvious which top-level menu owns the open panel
|
|
45
|
+
even while you sweep the pointer across siblings. Placed after :hover so the
|
|
46
|
+
brand tint wins when the open trigger is also hovered. */
|
|
47
|
+
.fx-menubar-btn[data-state="open"] {
|
|
48
|
+
background: var(--color-interaction-selected-brand);
|
|
49
|
+
color: var(--color-brand-primary);
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
/* Brand entry — mirrors the prototype `.mb-brand`: a glowing rounded mark plus
|
|
53
|
+
the product name in brand colour. Web only (desktop uses the native menu).
|
|
54
|
+
Placed after the base rule so its resting colour wins; :hover still lifts the
|
|
55
|
+
name to primary (like the prototype), while the mark keeps its own fill. */
|
|
56
|
+
.fx-menubar-btn--brand {
|
|
57
|
+
gap: 5px;
|
|
58
|
+
color: var(--color-brand-primary);
|
|
59
|
+
font-weight: 600;
|
|
60
|
+
}
|
|
61
|
+
.fx-menubar-brand-mark {
|
|
62
|
+
display: grid;
|
|
63
|
+
place-items: center;
|
|
64
|
+
width: 18px;
|
|
65
|
+
height: 18px;
|
|
66
|
+
border-radius: 5px;
|
|
67
|
+
background: var(--color-brand-primary);
|
|
68
|
+
color: var(--color-text-on-bright-primary);
|
|
69
|
+
font-weight: 800;
|
|
70
|
+
font-size: 11px;
|
|
71
|
+
box-shadow: 0 0 12px rgba(212, 255, 72, 0.35);
|
|
72
|
+
flex-shrink: 0;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
/* Dropdown content — mirrors the prototype's `.fe-ctx` floating panel
|
|
76
|
+
(5px padding, 9px radius). Rows lay out check / icon / label / keybinding. */
|
|
77
|
+
.fx-menubar-content {
|
|
78
|
+
min-width: 200px;
|
|
79
|
+
padding: 5px;
|
|
80
|
+
border-radius: 9px;
|
|
81
|
+
background: var(--color-background-elevated, #242424);
|
|
82
|
+
color: var(--color-text-primary, #fff);
|
|
83
|
+
border: 1px solid var(--color-border-default, rgba(255, 255, 255, 0.1));
|
|
84
|
+
box-shadow: 0 12px 30px rgba(0, 0, 0, 0.48);
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
.fx-menubar-content .fx-menubar-item-check {
|
|
88
|
+
display: inline-flex;
|
|
89
|
+
align-items: center;
|
|
90
|
+
justify-content: center;
|
|
91
|
+
width: 14px;
|
|
92
|
+
min-width: 14px;
|
|
93
|
+
color: var(--color-text-primary);
|
|
94
|
+
}
|
|
95
|
+
.fx-menubar-content .fx-menubar-item-icon {
|
|
96
|
+
display: inline-flex;
|
|
97
|
+
align-items: center;
|
|
98
|
+
justify-content: center;
|
|
99
|
+
width: 14px;
|
|
100
|
+
min-width: 14px;
|
|
101
|
+
/* No margin — the row's flex `gap` spaces the glyph from the label.
|
|
102
|
+
Prototype `.fe-ctx-item svg`: dim at rest, lifts to secondary on hover. */
|
|
103
|
+
color: var(--color-text-tertiary, rgba(255, 255, 255, 0.3));
|
|
104
|
+
flex-shrink: 0;
|
|
105
|
+
}
|
|
106
|
+
.fx-menubar-content .fx-menubar-item-icon svg {
|
|
107
|
+
width: 14px;
|
|
108
|
+
height: 14px;
|
|
109
|
+
}
|
|
110
|
+
.fx-menubar-content .fx-menubar-item-label {
|
|
111
|
+
flex: 1;
|
|
112
|
+
min-width: 0;
|
|
113
|
+
overflow: hidden;
|
|
114
|
+
text-overflow: ellipsis;
|
|
115
|
+
white-space: nowrap;
|
|
116
|
+
}
|
|
117
|
+
.fx-menubar-content .fx-menubar-item-kbd {
|
|
118
|
+
margin-left: 24px;
|
|
119
|
+
font-family: var(--font-mono);
|
|
120
|
+
font-size: 10px;
|
|
121
|
+
letter-spacing: 0.02em;
|
|
122
|
+
color: var(--color-text-tertiary, rgba(255, 255, 255, 0.2));
|
|
123
|
+
flex-shrink: 0;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
.fx-menubar-item--danger {
|
|
127
|
+
color: var(--destructive, #e05260);
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
/* Disabled rows (unsatisfied capabilities) show a not-allowed cursor. The shared
|
|
131
|
+
dropdown primitive sets `data-[disabled]:pointer-events-none`, which would
|
|
132
|
+
suppress the cursor entirely — so re-enable pointer events in the menubar
|
|
133
|
+
scope. Radix still blocks onSelect for disabled items, so no action fires.
|
|
134
|
+
Selector specificity (0,3,0) beats the primitive utility (0,2,0). */
|
|
135
|
+
.fx-menubar-content .fx-menubar-item[data-disabled] {
|
|
136
|
+
pointer-events: auto;
|
|
137
|
+
cursor: not-allowed;
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
/* Dropdown rows aligned to the prototype's `.fe-ctx-item`: 6px/9px padding,
|
|
141
|
+
5px radius, 12px text. Scoped to `.fx-menubar-content` so the shared dropdown
|
|
142
|
+
primitive used elsewhere is untouched. Colour is split by kind so danger and
|
|
143
|
+
disabled rows keep their own treatment (see below). */
|
|
144
|
+
.fx-menubar-content .fx-menubar-item {
|
|
145
|
+
gap: 9px;
|
|
146
|
+
/* Left padding trimmed vs right so the leading icon sits closer to the edge. */
|
|
147
|
+
padding: 6px 9px 6px 7px;
|
|
148
|
+
border-radius: 5px;
|
|
149
|
+
font-size: 12px;
|
|
150
|
+
}
|
|
151
|
+
.fx-menubar-content .fx-menubar-item:not(.fx-menubar-item--danger) {
|
|
152
|
+
color: var(--color-text-secondary);
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
/* Hover / keyboard-highlight (Radix moves focus to the pointed row). Normal rows
|
|
156
|
+
paint the neutral-selected surface with primary text; danger rows keep red on
|
|
157
|
+
a red tint (prototype `.fe-ctx-item.danger:hover`). `:not([data-disabled])`
|
|
158
|
+
leaves disabled rows greyed with no hover paint. `[data-state="open"]` covers
|
|
159
|
+
a SubTrigger whose submenu is open (e.g. 打开最近) — without it, the ui/dropdown
|
|
160
|
+
default `data-[state=open]:bg-accent` (brand-green) would leak through. */
|
|
161
|
+
.fx-menubar-content .fx-menubar-item:not(.fx-menubar-item--danger):not([data-disabled]):hover,
|
|
162
|
+
.fx-menubar-content .fx-menubar-item:not(.fx-menubar-item--danger):not([data-disabled]):focus,
|
|
163
|
+
.fx-menubar-content .fx-menubar-item:not(.fx-menubar-item--danger):not([data-disabled])[data-highlighted],
|
|
164
|
+
.fx-menubar-content .fx-menubar-item:not(.fx-menubar-item--danger):not([data-disabled])[data-state="open"] {
|
|
165
|
+
background: var(--color-interaction-selected-neutral, var(--color-interaction-hover));
|
|
166
|
+
color: var(--color-text-primary);
|
|
167
|
+
}
|
|
168
|
+
.fx-menubar-content .fx-menubar-item:not(.fx-menubar-item--danger):not([data-disabled]):hover .fx-menubar-item-icon,
|
|
169
|
+
.fx-menubar-content .fx-menubar-item:not(.fx-menubar-item--danger):not([data-disabled]):focus .fx-menubar-item-icon,
|
|
170
|
+
.fx-menubar-content .fx-menubar-item:not(.fx-menubar-item--danger):not([data-disabled])[data-highlighted] .fx-menubar-item-icon,
|
|
171
|
+
.fx-menubar-content .fx-menubar-item:not(.fx-menubar-item--danger):not([data-disabled])[data-state="open"] .fx-menubar-item-icon {
|
|
172
|
+
color: var(--color-text-secondary);
|
|
173
|
+
}
|
|
174
|
+
.fx-menubar-content .fx-menubar-item--danger:not([data-disabled]):hover,
|
|
175
|
+
.fx-menubar-content .fx-menubar-item--danger:not([data-disabled]):focus,
|
|
176
|
+
.fx-menubar-content .fx-menubar-item--danger:not([data-disabled])[data-highlighted] {
|
|
177
|
+
background: rgba(242, 106, 106, 0.14);
|
|
178
|
+
color: var(--color-accent-error, var(--destructive, #e05260));
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
/* Group-boundary separator — prototype `.fe-ctx-sep`. */
|
|
182
|
+
.fx-menubar-content [role="separator"] {
|
|
183
|
+
height: 1px;
|
|
184
|
+
margin: 4px 6px;
|
|
185
|
+
background: var(--color-divider-subtle, var(--color-border-subtle));
|
|
186
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { type TFunction } from '../../i18n';
|
|
2
|
+
import { type MenuId, type MenuItemDef } from '../../lib/menu-registry';
|
|
3
|
+
import './MenuBar.css';
|
|
4
|
+
/** 第三个参数 itemId 是**记账用**的稳定菜单项 id(如 file.save)。可选,所以
|
|
5
|
+
* 只传两参的既有调用点照常编译。为什么需要它:人机同账要求两侧记录形状一致 ——
|
|
6
|
+
* AI 那路按 itemId 派发,人这路手上只有解析后的 commandId,不带上 itemId 的话
|
|
7
|
+
* 两条记录对不上号(help.shortcuts 与 overlay.open 是同一动作的两个名字),
|
|
8
|
+
* 比对"人和 AI 是不是做了同一件事"就得二次查菜单注册表。 */
|
|
9
|
+
type Execute = (id: string, args?: unknown, itemId?: string) => void;
|
|
10
|
+
interface TopMenuProps {
|
|
11
|
+
menu: MenuId;
|
|
12
|
+
items: MenuItemDef[];
|
|
13
|
+
t: TFunction;
|
|
14
|
+
execute: Execute;
|
|
15
|
+
/** Controlled open flag — the whole bar shares one "which menu is open"
|
|
16
|
+
* value so sibling hover can steal the open panel (UE-style). */
|
|
17
|
+
open: boolean;
|
|
18
|
+
onOpenChange: (open: boolean) => void;
|
|
19
|
+
/** Pointer-down claims ownership before Radix evaluates its controlled root. */
|
|
20
|
+
onTriggerPointerDown: (event: React.PointerEvent<HTMLButtonElement>) => void;
|
|
21
|
+
/** Pointer entered this trigger. The bar decides whether to switch the open
|
|
22
|
+
* panel here (only when some OTHER menu is already open). */
|
|
23
|
+
onTriggerEnter: () => void;
|
|
24
|
+
}
|
|
25
|
+
export declare function TopMenu({ menu, items, t, execute, open, onOpenChange, onTriggerPointerDown, onTriggerEnter }: TopMenuProps): import("react/jsx-runtime").JSX.Element | null;
|
|
26
|
+
export declare function MenuBar(): import("react/jsx-runtime").JSX.Element | null;
|
|
27
|
+
export {};
|
|
@@ -0,0 +1,286 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
+
/**
|
|
3
|
+
* MenuBar — Web renderer for the menu registry (T2).
|
|
4
|
+
*
|
|
5
|
+
* Subscribes to `lib/menu-registry` via `useSyncExternalStore` and renders
|
|
6
|
+
* top-level dropdowns for `file` / `edit` / `window` / `build` / `select` /
|
|
7
|
+
* `help` (in that order). `brand` renders first as a small app-menu dropdown.
|
|
8
|
+
* `publish` is intentionally excluded — TopBar already owns a Publish button.
|
|
9
|
+
*
|
|
10
|
+
* Platform guard: under Tauri the OS draws the real menu bar (T5's native
|
|
11
|
+
* bridge), so we render ONLY the brand entry (or nothing when brand is empty).
|
|
12
|
+
* On web we render the full bar.
|
|
13
|
+
*
|
|
14
|
+
* Commands: clicking a leaf item dispatches through the SAME accessor TopBar
|
|
15
|
+
* uses — `useHost().commands.execute(id, args)` (`useCommand<T>(id)` bakes the
|
|
16
|
+
* id into the callback, which doesn't fit here since ids are dynamic at click
|
|
17
|
+
* time; the underlying accessor is identical). This keeps keyboard shortcuts,
|
|
18
|
+
* command palette, and menu clicks on one entry.
|
|
19
|
+
*/
|
|
20
|
+
import { useCallback, useEffect, useState, useSyncExternalStore } from 'react';
|
|
21
|
+
import { BookOpen, BoxSelect, Check, Clipboard, Clock, Code, Copy, FilePlus, FlipHorizontal2, Focus, FolderOpen, FolderSearch, Gamepad2, Github, Globe, GraduationCap, Hash, Info, Keyboard, LayoutGrid, Maximize, MessageCircle, Newspaper, Package, Pencil, Play, Redo2, RefreshCw, RotateCcw, Save, SaveAll, Scale, Scan, Scissors, ScrollText, Search, Settings, Shapes, Sparkles, Square, SquareDashed, Store, Trash2, Undo2, Upload, X, } from 'lucide-react';
|
|
22
|
+
import { useTranslation } from '../../i18n';
|
|
23
|
+
import { useHost } from '../../core/app-shell';
|
|
24
|
+
import { useBrand } from '../../brand/BrandProvider';
|
|
25
|
+
import { DropdownMenu, DropdownMenuTrigger, DropdownMenuContent, DropdownMenuItem, DropdownMenuSeparator, DropdownMenuSub, DropdownMenuSubTrigger, DropdownMenuSubContent, } from '../ui/dropdown-menu';
|
|
26
|
+
import { onMenuChange, snapshotAllMenus, } from '../../lib/menu-registry';
|
|
27
|
+
import { prettyCombo } from '../../lib/global-shortcuts';
|
|
28
|
+
import { useMenubarSurface } from './menubar-surface';
|
|
29
|
+
import { openMenuFromTriggerPointerDown } from './menubar-open-state';
|
|
30
|
+
import { isTauri } from '../../lib/platform/runtime';
|
|
31
|
+
import { captureFocusedTextEditTarget } from '../../lib/text-edit-actions';
|
|
32
|
+
import { getRecentGamesRevision, subscribeRecentGames, warmRecentGames, } from '../../lib/recent-games';
|
|
33
|
+
import { repairBuiltinMenusIfEmpty } from '../../lib/repair-builtin-menus';
|
|
34
|
+
import './MenuBar.css';
|
|
35
|
+
// Icon name → lucide component. Mirrors ContextMenu.tsx's MENU_ICONS pattern
|
|
36
|
+
// (single-file lookup so an unknown name gracefully renders no icon rather
|
|
37
|
+
// than crashing). Static import — never dynamic — so the bundle keeps only
|
|
38
|
+
// the icons actually referenced from builtin-menus.ts.
|
|
39
|
+
const MENU_ICONS = {
|
|
40
|
+
'book-open': BookOpen,
|
|
41
|
+
'box-select': BoxSelect,
|
|
42
|
+
clipboard: Clipboard,
|
|
43
|
+
clock: Clock,
|
|
44
|
+
code: Code,
|
|
45
|
+
copy: Copy,
|
|
46
|
+
'file-plus': FilePlus,
|
|
47
|
+
'flip-horizontal-2': FlipHorizontal2,
|
|
48
|
+
focus: Focus,
|
|
49
|
+
'folder-open': FolderOpen,
|
|
50
|
+
'folder-search': FolderSearch,
|
|
51
|
+
'gamepad-2': Gamepad2,
|
|
52
|
+
github: Github,
|
|
53
|
+
globe: Globe,
|
|
54
|
+
'graduation-cap': GraduationCap,
|
|
55
|
+
hash: Hash,
|
|
56
|
+
info: Info,
|
|
57
|
+
keyboard: Keyboard,
|
|
58
|
+
'layout-grid': LayoutGrid,
|
|
59
|
+
maximize: Maximize,
|
|
60
|
+
'message-circle': MessageCircle,
|
|
61
|
+
newspaper: Newspaper,
|
|
62
|
+
package: Package,
|
|
63
|
+
pencil: Pencil,
|
|
64
|
+
play: Play,
|
|
65
|
+
'redo-2': Redo2,
|
|
66
|
+
'refresh-cw': RefreshCw,
|
|
67
|
+
'rotate-ccw': RotateCcw,
|
|
68
|
+
save: Save,
|
|
69
|
+
'save-all': SaveAll,
|
|
70
|
+
scale: Scale,
|
|
71
|
+
scan: Scan,
|
|
72
|
+
scissors: Scissors,
|
|
73
|
+
'scroll-text': ScrollText,
|
|
74
|
+
search: Search,
|
|
75
|
+
settings: Settings,
|
|
76
|
+
shapes: Shapes,
|
|
77
|
+
sparkles: Sparkles,
|
|
78
|
+
square: Square,
|
|
79
|
+
'square-dashed': SquareDashed,
|
|
80
|
+
store: Store,
|
|
81
|
+
'trash-2': Trash2,
|
|
82
|
+
'undo-2': Undo2,
|
|
83
|
+
upload: Upload,
|
|
84
|
+
x: X,
|
|
85
|
+
};
|
|
86
|
+
// ── snapshot cache (stable identity across getSnapshot calls) ────────────
|
|
87
|
+
// snapshotAllMenus() computes a fresh object each call; useSyncExternalStore
|
|
88
|
+
// requires that repeated getSnapshot() reads return the SAME identity until
|
|
89
|
+
// the store actually changes, else React re-renders on every read (potential
|
|
90
|
+
// infinite loop). Module-level cache + a single change-listener keeps identity
|
|
91
|
+
// stable between registrations. Registry lives as long as this module, so a
|
|
92
|
+
// single unbound listener at import time is fine (no cleanup handle needed).
|
|
93
|
+
let cachedSnapshot = snapshotAllMenus();
|
|
94
|
+
onMenuChange(() => { cachedSnapshot = snapshotAllMenus(); });
|
|
95
|
+
function getSnapshot() {
|
|
96
|
+
return cachedSnapshot;
|
|
97
|
+
}
|
|
98
|
+
// SSR/server snapshot — stable identity across calls. This app is a pure
|
|
99
|
+
// client build, so this branch never actually fires; providing it satisfies
|
|
100
|
+
// the useSyncExternalStore contract and future-proofs against SSR.
|
|
101
|
+
const EMPTY_SNAPSHOT = Object.freeze({
|
|
102
|
+
brand: [], file: [], edit: [], window: [], build: [], select: [], help: [], publish: [],
|
|
103
|
+
});
|
|
104
|
+
function getServerSnapshot() {
|
|
105
|
+
return EMPTY_SNAPSHOT;
|
|
106
|
+
}
|
|
107
|
+
function subscribe(cb) {
|
|
108
|
+
return onMenuChange(cb);
|
|
109
|
+
}
|
|
110
|
+
// Top-level dropdowns rendered on web, in order. `publish` is excluded (TopBar
|
|
111
|
+
// owns the Publish CTA at the far right); `brand` renders separately at the
|
|
112
|
+
// far left.
|
|
113
|
+
const TOP_MENUS = [
|
|
114
|
+
'file', 'edit', 'window', 'build', 'select', 'help',
|
|
115
|
+
];
|
|
116
|
+
/** Compute the resolved enabled flag for one item.
|
|
117
|
+
* - Explicit `enabled()` always wins.
|
|
118
|
+
* - Items with children (static or dynamic) default to enabled (a submenu
|
|
119
|
+
* opener needs no cmd).
|
|
120
|
+
* - Leaf items default to `!!commandId` (no command = no-op = disabled). */
|
|
121
|
+
function resolveEnabled(item) {
|
|
122
|
+
if (item.enabled)
|
|
123
|
+
return item.enabled();
|
|
124
|
+
if ((item.children && item.children.length > 0) || item.dynamicChildren)
|
|
125
|
+
return true;
|
|
126
|
+
return !!item.commandId;
|
|
127
|
+
}
|
|
128
|
+
function MenuItemRow({ item, t, execute }) {
|
|
129
|
+
// when=false items are hidden entirely (caller also skips their separator).
|
|
130
|
+
if (item.when && !item.when())
|
|
131
|
+
return null;
|
|
132
|
+
const enabled = resolveEnabled(item);
|
|
133
|
+
const label = t(item.labelKey);
|
|
134
|
+
const combo = item.keybinding ? prettyCombo(item.keybinding) : '';
|
|
135
|
+
const checked = item.checked ? item.checked() : false;
|
|
136
|
+
const hasStaticChildren = !!item.children && item.children.length > 0;
|
|
137
|
+
const hasChildren = hasStaticChildren || !!item.dynamicChildren;
|
|
138
|
+
const dangerCls = item.danger ? 'fx-menubar-item--danger text-destructive focus:text-destructive' : '';
|
|
139
|
+
// Left glyph — a SINGLE slot, like the prototype's `.fe-ctx-item`: a checkable
|
|
140
|
+
// item shows its check state there, every other item shows its icon. Rendering
|
|
141
|
+
// both a check column AND an icon would reserve an empty column that shoves the
|
|
142
|
+
// icon right, so we pick one. Unknown / missing icon name renders nothing.
|
|
143
|
+
const Icon = item.icon ? MENU_ICONS[item.icon] : undefined;
|
|
144
|
+
const iconNode = Icon
|
|
145
|
+
? _jsx("span", { className: "fx-menubar-item-icon", "aria-hidden": "true", children: _jsx(Icon, { size: 14 }) })
|
|
146
|
+
: null;
|
|
147
|
+
const leftNode = item.checked
|
|
148
|
+
? (_jsx("span", { className: "fx-menubar-item-check", "aria-hidden": "true", children: checked ? _jsx(Check, { size: 12 }) : null }))
|
|
149
|
+
: iconNode;
|
|
150
|
+
if (hasChildren) {
|
|
151
|
+
// Dynamic children are evaluated fresh on each render of the SubContent.
|
|
152
|
+
// Radix mounts SubContent lazily (on hover-open) and unmounts on close, so
|
|
153
|
+
// `item.dynamicChildren()` runs at open-time — the caller must have the data
|
|
154
|
+
// ready synchronously (see file-menu game-list prefetch). Empty result → a
|
|
155
|
+
// single disabled "no recent" placeholder so the submenu never looks broken.
|
|
156
|
+
const kids = hasStaticChildren ? item.children : item.dynamicChildren();
|
|
157
|
+
return (_jsxs(DropdownMenuSub, { children: [_jsxs(DropdownMenuSubTrigger, { disabled: !enabled, className: ['fx-menubar-item', dangerCls].filter(Boolean).join(' '), children: [leftNode, _jsx("span", { className: "fx-menubar-item-label", children: label })] }), _jsx(DropdownMenuSubContent, { className: "fx-menubar-content", children: kids.length > 0
|
|
158
|
+
? renderMenuChildren(kids, t, execute)
|
|
159
|
+
: (_jsx(DropdownMenuItem, { disabled: true, className: "fx-menubar-item", children: _jsx("span", { className: "fx-menubar-item-label", children: t('menu.file.openRecentEmpty') }) })) })] }));
|
|
160
|
+
}
|
|
161
|
+
// Leaf. Disabled leaves render as text-only rows: greyed, no click handler,
|
|
162
|
+
// still showing label + keybinding. Radix `disabled` prop applies pointer-
|
|
163
|
+
// events-none + opacity via the ui/dropdown-menu component styling.
|
|
164
|
+
return (_jsxs(DropdownMenuItem, { disabled: !enabled, className: ['fx-menubar-item', dangerCls].filter(Boolean).join(' '), onSelect: (e) => {
|
|
165
|
+
if (!enabled || !item.commandId) {
|
|
166
|
+
e.preventDefault();
|
|
167
|
+
return;
|
|
168
|
+
}
|
|
169
|
+
execute(item.commandId, item.args, item.id);
|
|
170
|
+
}, children: [leftNode, _jsx("span", { className: "fx-menubar-item-label", children: label }), combo && _jsx("span", { className: "fx-menubar-item-kbd", children: combo })] }));
|
|
171
|
+
}
|
|
172
|
+
/** Walk a sorted item list, inserting a `DropdownMenuSeparator` at each
|
|
173
|
+
* group boundary. Boundary rule mirrors `serializeMenusForNative` in the
|
|
174
|
+
* registry: `prevGroup` is updated even for hidden items so the separator
|
|
175
|
+
* policy stays identical between the two renderers (§SSOT / §Derive). */
|
|
176
|
+
function renderMenuChildren(items, t, execute) {
|
|
177
|
+
const rows = [];
|
|
178
|
+
let prevGroup = null;
|
|
179
|
+
for (const it of items) {
|
|
180
|
+
const hidden = it.when ? !it.when() : false;
|
|
181
|
+
if (!hidden && prevGroup !== null && it.group !== prevGroup) {
|
|
182
|
+
rows.push(_jsx(DropdownMenuSeparator, {}, `sep-${it.id}`));
|
|
183
|
+
}
|
|
184
|
+
if (!hidden) {
|
|
185
|
+
rows.push(_jsx(MenuItemRow, { item: it, t: t, execute: execute }, it.id));
|
|
186
|
+
}
|
|
187
|
+
prevGroup = it.group;
|
|
188
|
+
}
|
|
189
|
+
return rows;
|
|
190
|
+
}
|
|
191
|
+
export function TopMenu({ menu, items, t, execute, open, onOpenChange, onTriggerPointerDown, onTriggerEnter }) {
|
|
192
|
+
const brand = useBrand();
|
|
193
|
+
// The async warm completes after File has rendered. Subscribe so an
|
|
194
|
+
// already-open recent submenu replaces its empty placeholder immediately.
|
|
195
|
+
useSyncExternalStore(subscribeRecentGames, getRecentGamesRevision, getRecentGamesRevision);
|
|
196
|
+
if (items.length === 0)
|
|
197
|
+
return null;
|
|
198
|
+
const isBrand = menu === 'brand';
|
|
199
|
+
// Top-level titles are fixed labels (`menubar.<menu>`). If i18n hasn't been
|
|
200
|
+
// populated yet (T3 owns that), `t()` falls back to returning the key so we
|
|
201
|
+
// don't crash — we just show "menubar.file" in place of "File" until T3.
|
|
202
|
+
const titleKey = `menubar.${menu}`;
|
|
203
|
+
return (_jsxs(DropdownMenu, { open: open, onOpenChange: onOpenChange, modal: false, children: [_jsx(DropdownMenuTrigger, { asChild: true, children: _jsx("button", { type: "button", className: isBrand ? 'fx-menubar-btn fx-menubar-btn--brand no-motion-lift' : 'fx-menubar-btn no-motion-lift', "data-menu": menu, onPointerDown: (event) => {
|
|
204
|
+
if (menu === 'edit' || menu === 'select') {
|
|
205
|
+
captureFocusedTextEditTarget(event.currentTarget.ownerDocument);
|
|
206
|
+
}
|
|
207
|
+
onTriggerPointerDown(event);
|
|
208
|
+
}, onPointerEnter: onTriggerEnter, children: isBrand ? (_jsxs(_Fragment, { children: [_jsx("span", { className: "fx-menubar-brand-mark", "aria-hidden": "true", children: brand.product.name.charAt(0).toUpperCase() }), _jsx("span", { className: "fx-menubar-brand-name", children: brand.product.name })] })) : (t(titleKey)) }) }), _jsx(DropdownMenuContent, { align: "start", sideOffset: 4, className: "fx-menubar-content", children: renderMenuChildren(items, t, execute) })] }));
|
|
209
|
+
}
|
|
210
|
+
// ── Public component ─────────────────────────────────────────────────────
|
|
211
|
+
export function MenuBar() {
|
|
212
|
+
// StrictMode dispose / Vite HMR can leave the registry empty while chrome
|
|
213
|
+
// stays mounted — repair synchronously so the first render sees menus.
|
|
214
|
+
repairBuiltinMenusIfEmpty();
|
|
215
|
+
const { t, i18n } = useTranslation();
|
|
216
|
+
const menus = useSyncExternalStore(subscribe, getSnapshot, getServerSnapshot);
|
|
217
|
+
const host = useHost();
|
|
218
|
+
// Same command bus TopBar uses. Fire-and-forget: menu clicks never await
|
|
219
|
+
// the command result — that would block dropdown-close animation.
|
|
220
|
+
// 纯执行,不记账。AI 经 host.menubar.invoke 走的就是这一个 —— 它那一路已经由
|
|
221
|
+
// dispatchToSurface 记了 source:'ai',这里再补一次会变成同一次操作在账本里既是
|
|
222
|
+
// ai 又是 user(而 /dispatched 端点无条件打 source:'user',分不出调用方)。
|
|
223
|
+
const execute = useCallback((id, args) => { void host.commands.execute(id, args); }, [host]);
|
|
224
|
+
// 人点菜单项才走这个:先补账再执行。人机同账的语义是"同一条 handler、只用 source
|
|
225
|
+
// 区分",所以记账必须挂在**人这条调用点**上,不能挂在两路共用的 execute 里。
|
|
226
|
+
// 两侧统一记 { itemId, commandId } —— 不统一的话账本里 AI 记 itemId、人记
|
|
227
|
+
// commandId,同一个动作两种名字,离线比对还得回查注册表(2026-08-05 实测)。
|
|
228
|
+
// fire-and-forget,失败静默(账本是观测面,不是功能依赖)。
|
|
229
|
+
const executeFromClick = useCallback((id, args, itemId) => {
|
|
230
|
+
void fetch('/api/bus/ui/surfaces/host.menubar/dispatched', {
|
|
231
|
+
method: 'POST',
|
|
232
|
+
headers: { 'content-type': 'application/json' },
|
|
233
|
+
body: JSON.stringify({ action: 'invoke', args: { itemId, commandId: id, args } }),
|
|
234
|
+
}).catch(() => { });
|
|
235
|
+
execute(id, args);
|
|
236
|
+
}, [execute]);
|
|
237
|
+
// AI 面(host.menubar.invoke)的执行器:**await 命令本体** —— 命令失败要变成
|
|
238
|
+
// ack ok=false,agent 才不会把失败说成"已完成"(2026-08-06 外审 B6①:此前同步
|
|
239
|
+
// 返回,file.save 失败也被 ack 成功)。人点击仍走上面的 fire-and-forget(不卡
|
|
240
|
+
// 下拉动画);两者只差等不等结果,handler 是同一个 commands.execute。
|
|
241
|
+
const executeForSurface = useCallback((id, args) => Promise.resolve(host.commands.execute(id, args)), [host]);
|
|
242
|
+
// Dual-modality projection: publish the menu tree + an `invoke` action that
|
|
243
|
+
// runs the SAME execute a human click runs. Must sit before the isTauri()
|
|
244
|
+
// early return (hooks rule); the registry stays the SSOT either way.
|
|
245
|
+
// 传 i18n.language 而不是 t:`t` 是模块级恒定标识(i18n/index.ts 刻意如此,
|
|
246
|
+
// 免得列进依赖数组造成无限重渲染),用它当依赖等于永不重投影 —— 切语言后 DOM
|
|
247
|
+
// 变了、snapshot 还是旧语言,AI 按 label 导航与用户所见错位(2026-08-06 探测)。
|
|
248
|
+
useMenubarSurface(menus, t, executeForSurface, i18n.language);
|
|
249
|
+
// One shared "which top-level menu is open" value for the whole bar. This is
|
|
250
|
+
// what makes it behave like a native/UE menu bar rather than N unrelated
|
|
251
|
+
// dropdowns: only one panel is open at a time, and once ANY panel is open,
|
|
252
|
+
// pointer-entering a sibling trigger steals the open state to it (see
|
|
253
|
+
// `handleTriggerEnter`). `null` = closed bar (idle: hover just highlights,
|
|
254
|
+
// it does NOT open — matching UE, where you must click to arm the bar).
|
|
255
|
+
const [openMenu, setOpenMenu] = useState(null);
|
|
256
|
+
// File owns a dynamic 打开最近 submenu backed by an async game list. Warm the
|
|
257
|
+
// cache whenever File becomes the open menu — via click OR hover-steal — so
|
|
258
|
+
// `getRecentGames()` is populated by the time the user reaches the submenu.
|
|
259
|
+
useEffect(() => {
|
|
260
|
+
if (openMenu === 'file')
|
|
261
|
+
void warmRecentGames();
|
|
262
|
+
}, [openMenu]);
|
|
263
|
+
const handleOpenChange = useCallback((menu) => (isOpen) => {
|
|
264
|
+
// Radix fires (false) on the previously-open menu when we steal focus to
|
|
265
|
+
// a sibling; only honour a close if THIS menu is still the current one,
|
|
266
|
+
// else the steal would immediately re-close the bar.
|
|
267
|
+
setOpenMenu((cur) => (isOpen ? menu : cur === menu ? null : cur));
|
|
268
|
+
}, []);
|
|
269
|
+
const handleTriggerEnter = useCallback((menu) => () => {
|
|
270
|
+
// Steal the open panel to the hovered trigger, but only while the bar is
|
|
271
|
+
// already armed (some other menu open). Idle hover must not auto-open.
|
|
272
|
+
setOpenMenu((cur) => (cur !== null && cur !== menu ? menu : cur));
|
|
273
|
+
}, []);
|
|
274
|
+
const handleTriggerPointerDown = useCallback((menu) => (event) => {
|
|
275
|
+
setOpenMenu((cur) => openMenuFromTriggerPointerDown(cur, menu, event.nativeEvent));
|
|
276
|
+
}, []);
|
|
277
|
+
// Under Tauri the OS native menu is the SSOT for the whole menu bar (T5
|
|
278
|
+
// bridge) — brand/app menu included — so the HTML bar renders nothing at all
|
|
279
|
+
// (no brand chip, no dropdowns). The trailing divider goes with it.
|
|
280
|
+
if (isTauri())
|
|
281
|
+
return null;
|
|
282
|
+
return (_jsxs(_Fragment, { children: [_jsxs("div", { className: "fx-menubar", children: [menus.brand.length > 0 && (_jsx(TopMenu, { menu: "brand", items: menus.brand, t: t,
|
|
283
|
+
// 人点击走 executeFromClick(先补账再执行),不是共用的 execute ——
|
|
284
|
+
// 人机同账靠的就是记账挂在人这条调用点上。main 新加的悬停切换 props 照收。
|
|
285
|
+
execute: executeFromClick, open: openMenu === 'brand', onOpenChange: handleOpenChange('brand'), onTriggerPointerDown: handleTriggerPointerDown('brand'), onTriggerEnter: handleTriggerEnter('brand') })), TOP_MENUS.map((m) => (_jsx(TopMenu, { menu: m, items: menus[m], t: t, execute: executeFromClick, open: openMenu === m, onOpenChange: handleOpenChange(m), onTriggerPointerDown: handleTriggerPointerDown(m), onTriggerEnter: handleTriggerEnter(m) }, m)))] }), _jsx("span", { className: "tb-divider", "aria-hidden": "true" })] }));
|
|
286
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { MenuBar } from './MenuBar';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { MenuBar } from './MenuBar';
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { MenuId } from '../../lib/menu-registry';
|
|
2
|
+
/**
|
|
3
|
+
* A top-level trigger must claim the shared menubar state on pointer-down.
|
|
4
|
+
* Radix still owns the matching open/close notification; this eager claim
|
|
5
|
+
* prevents the controlled roots from dropping the first pointer interaction
|
|
6
|
+
* while ownership moves between independent DropdownMenu roots.
|
|
7
|
+
*/
|
|
8
|
+
export declare function openMenuFromTriggerPointerDown(current: MenuId | null, menu: MenuId, event: Pick<PointerEvent, 'button' | 'ctrlKey'>): MenuId | null;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A top-level trigger must claim the shared menubar state on pointer-down.
|
|
3
|
+
* Radix still owns the matching open/close notification; this eager claim
|
|
4
|
+
* prevents the controlled roots from dropping the first pointer interaction
|
|
5
|
+
* while ownership moves between independent DropdownMenu roots.
|
|
6
|
+
*/
|
|
7
|
+
export function openMenuFromTriggerPointerDown(current, menu, event) {
|
|
8
|
+
// Match Radix Trigger's own activation gate. In particular, Ctrl+click is a
|
|
9
|
+
// context-menu gesture on macOS and secondary buttons must not arm the bar.
|
|
10
|
+
return event.button === 0 && !event.ctrlKey ? menu : current;
|
|
11
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import type { TFunction } from '../../i18n';
|
|
2
|
+
export interface MenuTreeNode {
|
|
3
|
+
id: string;
|
|
4
|
+
label: string;
|
|
5
|
+
/** command = 可执行叶子;submenu = 可展开;placeholder = 未接线的禁用占位。 */
|
|
6
|
+
kind: 'command' | 'submenu' | 'placeholder';
|
|
7
|
+
/** 叶子背后的命令 id —— 让"某个 catalog action 有没有可见的门"变成可对账的问题
|
|
8
|
+
* (ui_invoke 的返回体用它反查可见路径)。 */
|
|
9
|
+
commandId?: string;
|
|
10
|
+
keybinding?: string;
|
|
11
|
+
/** 派发给 commands.execute 的参数 —— 等价性对账用(同 commandId 且同 args 才算同一能力)。 */
|
|
12
|
+
args?: unknown;
|
|
13
|
+
/** 子菜单内容在展开时运行时求值(如最近游戏列表)——树里只标不展。 */
|
|
14
|
+
dynamic?: boolean;
|
|
15
|
+
/** 动态子项共用的 commandId / 子项 id 构成规则 —— 见 MenuItemDef 同名字段。 */
|
|
16
|
+
childCommandId?: string;
|
|
17
|
+
childIdFromArg?: string;
|
|
18
|
+
children?: MenuTreeNode[];
|
|
19
|
+
}
|
|
20
|
+
/** AI 路径的执行器**必须返回 promise**:run 会 await 它,命令失败 → throw →
|
|
21
|
+
* ack ok=false。人路径的 fire-and-forget 版本(不卡下拉动画)不在此签名内。 */
|
|
22
|
+
type Execute = (commandId: string, args?: unknown) => Promise<unknown>;
|
|
23
|
+
export declare function projectMenuTree(t: TFunction): Record<string, MenuTreeNode[]>;
|
|
24
|
+
/** MenuBar 挂载时注册 host.menubar。menusRevision 传注册表快照对象,引用一变
|
|
25
|
+
* (注册表变更触发的重渲染)就重新投影 PUT。 */
|
|
26
|
+
export declare function useMenubarSurface(menusRevision: unknown, t: TFunction, execute: Execute,
|
|
27
|
+
/** 当前语言。**必须**由调用方传:`t` 的标识是模块级恒定的(见 i18n/index.ts
|
|
28
|
+
* 的注释:列进依赖会造成无限重渲染),拿它当依赖 = 永不重投影。 */
|
|
29
|
+
language?: string): void;
|
|
30
|
+
export {};
|