@konitif/workbench 0.284.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.md +21 -0
- package/README.md +54 -0
- package/dist/application/boot/applicationBoot.d.ts +48 -0
- package/dist/application/boot/applicationBoot.js +174 -0
- package/dist/application/experiment/ControlledExperimentCampaign.d.ts +12 -0
- package/dist/application/experiment/ControlledExperimentCampaign.js +159 -0
- package/dist/application/experiment/ControlledExperimentRecorder.d.ts +17 -0
- package/dist/application/experiment/ControlledExperimentRecorder.js +215 -0
- package/dist/application/i18n/WorkbenchTranslationRegistry.d.ts +19 -0
- package/dist/application/i18n/WorkbenchTranslationRegistry.js +179 -0
- package/dist/application/layout/surfaceCommandRouter.d.ts +18 -0
- package/dist/application/layout/surfaceCommandRouter.js +247 -0
- package/dist/application/physics/NoopPhysicsBackend.d.ts +2 -0
- package/dist/application/physics/NoopPhysicsBackend.js +2 -0
- package/dist/application/physics/PhysicsService.d.ts +2 -0
- package/dist/application/physics/PhysicsService.js +2 -0
- package/dist/application/project/ProjectManifest.d.ts +15 -0
- package/dist/application/project/ProjectManifest.js +107 -0
- package/dist/application/repository/RepositoryPreflightEngine.d.ts +6 -0
- package/dist/application/repository/RepositoryPreflightEngine.js +301 -0
- package/dist/application/runtime/RuntimeBackendConnection.d.ts +9 -0
- package/dist/application/runtime/RuntimeBackendConnection.js +34 -0
- package/dist/application/runtime/RuntimeBackendSubscription.d.ts +8 -0
- package/dist/application/runtime/RuntimeBackendSubscription.js +52 -0
- package/dist/application/runtime/RuntimeCheckpointStore.d.ts +20 -0
- package/dist/application/runtime/RuntimeCheckpointStore.js +65 -0
- package/dist/application/runtime/RuntimeLaunchProgress.d.ts +3 -0
- package/dist/application/runtime/RuntimeLaunchProgress.js +38 -0
- package/dist/application/runtime/RuntimeLaunchStateSnapshot.d.ts +48 -0
- package/dist/application/runtime/RuntimeLaunchStateSnapshot.js +73 -0
- package/dist/application/runtime/RuntimeObservabilityHub.d.ts +28 -0
- package/dist/application/runtime/RuntimeObservabilityHub.js +262 -0
- package/dist/application/runtime/RuntimeObservationEvents.d.ts +15 -0
- package/dist/application/runtime/RuntimeObservationEvents.js +18 -0
- package/dist/application/runtime/RuntimeOffloadManager.d.ts +24 -0
- package/dist/application/runtime/RuntimeOffloadManager.js +96 -0
- package/dist/application/runtime/RuntimePlanEngine.d.ts +11 -0
- package/dist/application/runtime/RuntimePlanEngine.js +67 -0
- package/dist/application/runtime/RuntimeProjectionCatalog.d.ts +5 -0
- package/dist/application/runtime/RuntimeProjectionCatalog.js +48 -0
- package/dist/application/runtime/RuntimeProjectionSession.d.ts +5 -0
- package/dist/application/runtime/RuntimeProjectionSession.js +4 -0
- package/dist/application/runtime/RuntimeProjectionSessionKeys.d.ts +5 -0
- package/dist/application/runtime/RuntimeProjectionSessionKeys.js +10 -0
- package/dist/application/runtime/RuntimeProjectionSessionReducers.d.ts +7 -0
- package/dist/application/runtime/RuntimeProjectionSessionReducers.js +101 -0
- package/dist/application/runtime/RuntimeProjectionSessionSerialization.d.ts +5 -0
- package/dist/application/runtime/RuntimeProjectionSessionSerialization.js +89 -0
- package/dist/application/runtime/RuntimeProjectionSessionSharedState.d.ts +3 -0
- package/dist/application/runtime/RuntimeProjectionSessionSharedState.js +53 -0
- package/dist/application/runtime/RuntimeProjectionSessionTypes.d.ts +38 -0
- package/dist/application/runtime/RuntimeProjectionSessionTypes.js +1 -0
- package/dist/application/runtime/RuntimeProjectionViewerSessionSync.d.ts +29 -0
- package/dist/application/runtime/RuntimeProjectionViewerSessionSync.js +39 -0
- package/dist/application/runtime/RuntimeProjectionViewerSessionUpdates.d.ts +27 -0
- package/dist/application/runtime/RuntimeProjectionViewerSessionUpdates.js +38 -0
- package/dist/application/runtime/RuntimeRegistryOwner.d.ts +20 -0
- package/dist/application/runtime/RuntimeRegistryOwner.js +71 -0
- package/dist/application/runtime/RuntimeRegistrySnapshots.d.ts +6 -0
- package/dist/application/runtime/RuntimeRegistrySnapshots.js +51 -0
- package/dist/application/runtime/RuntimeRegistryTypes.d.ts +29 -0
- package/dist/application/runtime/RuntimeRegistryTypes.js +1 -0
- package/dist/application/runtime/RuntimeSharedState.d.ts +6 -0
- package/dist/application/runtime/RuntimeSharedState.js +47 -0
- package/dist/application/runtime/WorkbenchRuntimeCore.d.ts +82 -0
- package/dist/application/runtime/WorkbenchRuntimeCore.js +463 -0
- package/dist/application/runtime/WorkbenchRuntimeSanitizers.d.ts +9 -0
- package/dist/application/runtime/WorkbenchRuntimeSanitizers.js +62 -0
- package/dist/application/shell/state.d.ts +22 -0
- package/dist/application/shell/state.js +308 -0
- package/dist/application/widgets/createWorkbenchWidgetAdapter.d.ts +9 -0
- package/dist/application/widgets/createWorkbenchWidgetAdapter.js +30 -0
- package/dist/application/workspace/canonicalizeLayout.d.ts +2 -0
- package/dist/application/workspace/canonicalizeLayout.js +91 -0
- package/dist/application/workspace/closePanel.d.ts +6 -0
- package/dist/application/workspace/closePanel.js +43 -0
- package/dist/application/workspace/collapseSplit.d.ts +7 -0
- package/dist/application/workspace/collapseSplit.js +45 -0
- package/dist/application/workspace/collapseSplitBoundary.d.ts +8 -0
- package/dist/application/workspace/collapseSplitBoundary.js +106 -0
- package/dist/application/workspace/commands.d.ts +71 -0
- package/dist/application/workspace/commands.js +216 -0
- package/dist/application/workspace/createPeripheralBands.d.ts +14 -0
- package/dist/application/workspace/createPeripheralBands.js +62 -0
- package/dist/application/workspace/createWorkspace.d.ts +7 -0
- package/dist/application/workspace/createWorkspace.js +12 -0
- package/dist/application/workspace/detachPanelToWindow.d.ts +12 -0
- package/dist/application/workspace/detachPanelToWindow.js +57 -0
- package/dist/application/workspace/dockPanel.d.ts +10 -0
- package/dist/application/workspace/dockPanel.js +399 -0
- package/dist/application/workspace/finalizeWorkspace.d.ts +4 -0
- package/dist/application/workspace/finalizeWorkspace.js +23 -0
- package/dist/application/workspace/focusPanel.d.ts +2 -0
- package/dist/application/workspace/focusPanel.js +19 -0
- package/dist/application/workspace/joinPanelArea.d.ts +13 -0
- package/dist/application/workspace/joinPanelArea.js +281 -0
- package/dist/application/workspace/layoutInteraction.d.ts +176 -0
- package/dist/application/workspace/layoutInteraction.js +852 -0
- package/dist/application/workspace/layoutTree.d.ts +34 -0
- package/dist/application/workspace/layoutTree.js +135 -0
- package/dist/application/workspace/openTool.d.ts +15 -0
- package/dist/application/workspace/openTool.js +89 -0
- package/dist/application/workspace/presetArtifacts.d.ts +60 -0
- package/dist/application/workspace/presetArtifacts.js +231 -0
- package/dist/application/workspace/presets.d.ts +5 -0
- package/dist/application/workspace/presets.js +12 -0
- package/dist/application/workspace/reattachWorkspaceWindow.d.ts +7 -0
- package/dist/application/workspace/reattachWorkspaceWindow.js +24 -0
- package/dist/application/workspace/resizeSplit.d.ts +7 -0
- package/dist/application/workspace/resizeSplit.js +12 -0
- package/dist/application/workspace/resizeSplitBoundary.d.ts +10 -0
- package/dist/application/workspace/resizeSplitBoundary.js +115 -0
- package/dist/application/workspace/runToolShellCommand.d.ts +11 -0
- package/dist/application/workspace/runToolShellCommand.js +133 -0
- package/dist/application/workspace/session.d.ts +9 -0
- package/dist/application/workspace/session.js +36 -0
- package/dist/application/workspace/setActiveStackChild.d.ts +7 -0
- package/dist/application/workspace/setActiveStackChild.js +12 -0
- package/dist/application/workspace/setDesignSystemThemeSession.d.ts +3 -0
- package/dist/application/workspace/setDesignSystemThemeSession.js +12 -0
- package/dist/application/workspace/setPanelFullscreenToggleVisibility.d.ts +7 -0
- package/dist/application/workspace/setPanelFullscreenToggleVisibility.js +7 -0
- package/dist/application/workspace/setStackHeaderVisibility.d.ts +7 -0
- package/dist/application/workspace/setStackHeaderVisibility.js +7 -0
- package/dist/application/workspace/setToolPanelTitleOverride.d.ts +9 -0
- package/dist/application/workspace/setToolPanelTitleOverride.js +33 -0
- package/dist/application/workspace/setToolShellStatus.d.ts +8 -0
- package/dist/application/workspace/setToolShellStatus.js +32 -0
- package/dist/application/workspace/setWorkspaceFullscreenPanel.d.ts +3 -0
- package/dist/application/workspace/setWorkspaceFullscreenPanel.js +26 -0
- package/dist/application/workspace/snapshots.d.ts +10 -0
- package/dist/application/workspace/snapshots.js +34 -0
- package/dist/application/workspace/splitPanel.d.ts +10 -0
- package/dist/application/workspace/splitPanel.js +21 -0
- package/dist/application/workspace/subdividePanel.d.ts +39 -0
- package/dist/application/workspace/subdividePanel.js +128 -0
- package/dist/application/workspace/swapPanelArea.d.ts +11 -0
- package/dist/application/workspace/swapPanelArea.js +163 -0
- package/dist/application/workspace/targetWindow.d.ts +4 -0
- package/dist/application/workspace/targetWindow.js +22 -0
- package/dist/application/workspace/toolCapabilities.d.ts +11 -0
- package/dist/application/workspace/toolCapabilities.js +59 -0
- package/dist/application/workspace/toolRuntime.d.ts +32 -0
- package/dist/application/workspace/toolRuntime.js +65 -0
- package/dist/application/workspace/updateToolState.d.ts +8 -0
- package/dist/application/workspace/updateToolState.js +20 -0
- package/dist/boot/applicationBoot.d.ts +1 -0
- package/dist/boot/applicationBoot.js +2 -0
- package/dist/boot/events.d.ts +43 -0
- package/dist/boot/events.js +16 -0
- package/dist/boot/executor.d.ts +13 -0
- package/dist/boot/executor.js +210 -0
- package/dist/boot/graph.d.ts +16 -0
- package/dist/boot/graph.js +126 -0
- package/dist/boot/index.d.ts +2 -0
- package/dist/boot/index.js +3 -0
- package/dist/boot/mechanism.d.ts +5 -0
- package/dist/boot/mechanism.js +6 -0
- package/dist/boot/projection.d.ts +72 -0
- package/dist/boot/projection.js +398 -0
- package/dist/boot/types.d.ts +80 -0
- package/dist/boot/types.js +46 -0
- package/dist/domain/composition/dockArrangement.d.ts +57 -0
- package/dist/domain/composition/dockArrangement.js +304 -0
- package/dist/domain/composition/docking.d.ts +68 -0
- package/dist/domain/composition/docking.js +187 -0
- package/dist/domain/design-system/themeSession.d.ts +12 -0
- package/dist/domain/design-system/themeSession.js +42 -0
- package/dist/domain/experiment/model.d.ts +149 -0
- package/dist/domain/experiment/model.js +1 -0
- package/dist/domain/i18n/languageRegistry.d.ts +57 -0
- package/dist/domain/i18n/languageRegistry.js +1 -0
- package/dist/domain/i18n/model.d.ts +31 -0
- package/dist/domain/i18n/model.js +1 -0
- package/dist/domain/icon/model.d.ts +8 -0
- package/dist/domain/icon/model.js +1 -0
- package/dist/domain/input/interactionBindings.d.ts +2 -0
- package/dist/domain/input/interactionBindings.js +2 -0
- package/dist/domain/launch/model.d.ts +58 -0
- package/dist/domain/launch/model.js +109 -0
- package/dist/domain/layout/interaction.d.ts +90 -0
- package/dist/domain/layout/interaction.js +1 -0
- package/dist/domain/layout/model.d.ts +28 -0
- package/dist/domain/layout/model.js +1 -0
- package/dist/domain/layout/selectors.d.ts +12 -0
- package/dist/domain/layout/selectors.js +84 -0
- package/dist/domain/layout/surfaceProjection.d.ts +56 -0
- package/dist/domain/layout/surfaceProjection.js +249 -0
- package/dist/domain/layout/validation.d.ts +9 -0
- package/dist/domain/layout/validation.js +71 -0
- package/dist/domain/panel/model.d.ts +9 -0
- package/dist/domain/panel/model.js +1 -0
- package/dist/domain/physics/colliderGeometry.d.ts +2 -0
- package/dist/domain/physics/colliderGeometry.js +1 -0
- package/dist/domain/physics/contracts.d.ts +2 -0
- package/dist/domain/physics/contracts.js +1 -0
- package/dist/domain/physics/kinematicBinding.d.ts +22 -0
- package/dist/domain/physics/kinematicBinding.js +1 -0
- package/dist/domain/physics/model.d.ts +4 -0
- package/dist/domain/physics/model.js +1 -0
- package/dist/domain/physics/mujoco.d.ts +5 -0
- package/dist/domain/physics/mujoco.js +1 -0
- package/dist/domain/physics/observationProfile.d.ts +2 -0
- package/dist/domain/physics/observationProfile.js +1 -0
- package/dist/domain/physics/presentationBinding.d.ts +6 -0
- package/dist/domain/physics/presentationBinding.js +1 -0
- package/dist/domain/physics/simulationProfile.d.ts +2 -0
- package/dist/domain/physics/simulationProfile.js +1 -0
- package/dist/domain/physics/visualAlignment.d.ts +17 -0
- package/dist/domain/physics/visualAlignment.js +1 -0
- package/dist/domain/presentation/readingLevel.d.ts +12 -0
- package/dist/domain/presentation/readingLevel.js +29 -0
- package/dist/domain/project/model.d.ts +55 -0
- package/dist/domain/project/model.js +1 -0
- package/dist/domain/repo-quality/model.d.ts +111 -0
- package/dist/domain/repo-quality/model.js +1 -0
- package/dist/domain/repository/model.d.ts +110 -0
- package/dist/domain/repository/model.js +1 -0
- package/dist/domain/runtime/checkpoint.d.ts +37 -0
- package/dist/domain/runtime/checkpoint.js +87 -0
- package/dist/domain/runtime/hydration.d.ts +26 -0
- package/dist/domain/runtime/hydration.js +92 -0
- package/dist/domain/runtime/initialization.d.ts +25 -0
- package/dist/domain/runtime/initialization.js +87 -0
- package/dist/domain/runtime/lifecycle.d.ts +51 -0
- package/dist/domain/runtime/lifecycle.js +118 -0
- package/dist/domain/runtime/model.d.ts +252 -0
- package/dist/domain/runtime/model.js +13 -0
- package/dist/domain/runtime/observability.d.ts +142 -0
- package/dist/domain/runtime/observability.js +1 -0
- package/dist/domain/runtime/offload.d.ts +56 -0
- package/dist/domain/runtime/offload.js +129 -0
- package/dist/domain/runtime/plan.d.ts +26 -0
- package/dist/domain/runtime/plan.js +1 -0
- package/dist/domain/runtime/qualityPolicy.d.ts +28 -0
- package/dist/domain/runtime/qualityPolicy.js +97 -0
- package/dist/domain/runtime/recovery.d.ts +61 -0
- package/dist/domain/runtime/recovery.js +129 -0
- package/dist/domain/runtime/suspension.d.ts +32 -0
- package/dist/domain/runtime/suspension.js +107 -0
- package/dist/domain/runtime/teardown.d.ts +33 -0
- package/dist/domain/runtime/teardown.js +109 -0
- package/dist/domain/shared/id.d.ts +1 -0
- package/dist/domain/shared/id.js +5 -0
- package/dist/domain/shared/json.d.ts +9 -0
- package/dist/domain/shared/json.js +24 -0
- package/dist/domain/shell/model.d.ts +40 -0
- package/dist/domain/shell/model.js +1 -0
- package/dist/domain/shell/runtime.d.ts +76 -0
- package/dist/domain/shell/runtime.js +40 -0
- package/dist/domain/surface/model.d.ts +97 -0
- package/dist/domain/surface/model.js +71 -0
- package/dist/domain/temporal/model.d.ts +95 -0
- package/dist/domain/temporal/model.js +45 -0
- package/dist/domain/tool/internalTab.d.ts +11 -0
- package/dist/domain/tool/internalTab.js +20 -0
- package/dist/domain/tool/model.d.ts +207 -0
- package/dist/domain/tool/model.js +1 -0
- package/dist/domain/tool/runtime.d.ts +122 -0
- package/dist/domain/tool/runtime.js +2 -0
- package/dist/domain/tool/shell.d.ts +38 -0
- package/dist/domain/tool/shell.js +175 -0
- package/dist/domain/widget/composition.d.ts +79 -0
- package/dist/domain/widget/composition.js +250 -0
- package/dist/domain/widget/model.d.ts +35 -0
- package/dist/domain/widget/model.js +8 -0
- package/dist/domain/widget/toolDock.d.ts +30 -0
- package/dist/domain/widget/toolDock.js +52 -0
- package/dist/domain/workbench/model.d.ts +35 -0
- package/dist/domain/workbench/model.js +1 -0
- package/dist/domain/workbench/routing.d.ts +17 -0
- package/dist/domain/workbench/routing.js +72 -0
- package/dist/domain/workspace/factories.d.ts +9 -0
- package/dist/domain/workspace/factories.js +47 -0
- package/dist/domain/workspace/model.d.ts +23 -0
- package/dist/domain/workspace/model.js +1 -0
- package/dist/domain/workspace/persistence.d.ts +5 -0
- package/dist/domain/workspace/persistence.js +1 -0
- package/dist/domain/workspace/selectors.d.ts +19 -0
- package/dist/domain/workspace/selectors.js +90 -0
- package/dist/domain/workspace/session.d.ts +9 -0
- package/dist/domain/workspace/session.js +1 -0
- package/dist/domain/workspace/validation.d.ts +10 -0
- package/dist/domain/workspace/validation.js +231 -0
- package/dist/hosting.d.ts +15 -0
- package/dist/hosting.js +12 -0
- package/dist/index.d.ts +111 -0
- package/dist/index.js +111 -0
- package/dist/infrastructure/audio/WorkbenchAudioManager.d.ts +36 -0
- package/dist/infrastructure/audio/WorkbenchAudioManager.js +100 -0
- package/dist/infrastructure/backend/HttpWorkbenchBackendClient.d.ts +30 -0
- package/dist/infrastructure/backend/HttpWorkbenchBackendClient.js +314 -0
- package/dist/infrastructure/persistence/LocalWorkspacePersistence.d.ts +8 -0
- package/dist/infrastructure/persistence/LocalWorkspacePersistence.js +29 -0
- package/dist/infrastructure/surfaces/InMemorySurfaceViewerRegistry.d.ts +58 -0
- package/dist/infrastructure/surfaces/InMemorySurfaceViewerRegistry.js +121 -0
- package/dist/infrastructure/temporal/InMemoryTemporalDialectRegistry.d.ts +8 -0
- package/dist/infrastructure/temporal/InMemoryTemporalDialectRegistry.js +38 -0
- package/dist/infrastructure/tools/InMemoryToolRegistry.d.ts +46 -0
- package/dist/infrastructure/tools/InMemoryToolRegistry.js +82 -0
- package/dist/infrastructure/widgets/InMemoryShellWidgetRegistry.d.ts +42 -0
- package/dist/infrastructure/widgets/InMemoryShellWidgetRegistry.js +66 -0
- package/dist/infrastructure/widgets/InMemoryWorkbenchWidgetRegistry.d.ts +20 -0
- package/dist/infrastructure/widgets/InMemoryWorkbenchWidgetRegistry.js +35 -0
- package/dist/infrastructure/workbenches/InMemoryWorkbenchRegistry.d.ts +7 -0
- package/dist/infrastructure/workbenches/InMemoryWorkbenchRegistry.js +28 -0
- package/dist/physics-runtime.d.ts +4 -0
- package/dist/physics-runtime.js +2 -0
- package/dist/stage/easing.d.ts +5 -0
- package/dist/stage/easing.js +15 -0
- package/dist/stage/index.d.ts +6 -0
- package/dist/stage/index.js +6 -0
- package/dist/stage/projection.d.ts +4 -0
- package/dist/stage/projection.js +74 -0
- package/dist/stage/stageRuntime.d.ts +2 -0
- package/dist/stage/stageRuntime.js +32 -0
- package/dist/stage/timeline.d.ts +3 -0
- package/dist/stage/timeline.js +69 -0
- package/dist/stage/tween.d.ts +3 -0
- package/dist/stage/tween.js +104 -0
- package/dist/stage/types.d.ts +104 -0
- package/dist/stage/types.js +30 -0
- package/dist/temporal/clock/audioClock.d.ts +1 -0
- package/dist/temporal/clock/audioClock.js +1 -0
- package/dist/temporal/clock/clockGraph.d.ts +1 -0
- package/dist/temporal/clock/clockGraph.js +1 -0
- package/dist/temporal/clock/clockTypes.d.ts +1 -0
- package/dist/temporal/clock/clockTypes.js +1 -0
- package/dist/temporal/clock/fixedStepClock.d.ts +1 -0
- package/dist/temporal/clock/fixedStepClock.js +1 -0
- package/dist/temporal/clock/musicalClock.d.ts +7 -0
- package/dist/temporal/clock/musicalClock.js +35 -0
- package/dist/temporal/clock/rootClock.d.ts +1 -0
- package/dist/temporal/clock/rootClock.js +1 -0
- package/dist/temporal/clock/videoClock.d.ts +1 -0
- package/dist/temporal/clock/videoClock.js +1 -0
- package/dist/temporal/easing/easingFunctions.d.ts +2 -0
- package/dist/temporal/easing/easingFunctions.js +19 -0
- package/dist/temporal/easing/easingRegistry.d.ts +10 -0
- package/dist/temporal/easing/easingRegistry.js +32 -0
- package/dist/temporal/easing/easingShaderSource.d.ts +2 -0
- package/dist/temporal/easing/easingShaderSource.js +16 -0
- package/dist/temporal/easing/easingTypes.d.ts +9 -0
- package/dist/temporal/easing/easingTypes.js +1 -0
- package/dist/temporal/history/runtimeHistory.d.ts +77 -0
- package/dist/temporal/history/runtimeHistory.js +5 -0
- package/dist/temporal/history/temporalHistoryCore.d.ts +1 -0
- package/dist/temporal/history/temporalHistoryCore.js +1 -0
- package/dist/temporal/index.d.ts +20 -0
- package/dist/temporal/index.js +20 -0
- package/dist/temporal/invalidation/invalidationController.d.ts +1 -0
- package/dist/temporal/invalidation/invalidationController.js +1 -0
- package/dist/temporal/scheduler/browserSchedulerHost.d.ts +3 -0
- package/dist/temporal/scheduler/browserSchedulerHost.js +19 -0
- package/dist/temporal/scheduler/frameBudget.d.ts +1 -0
- package/dist/temporal/scheduler/frameBudget.js +1 -0
- package/dist/temporal/scheduler/temporalScheduler.d.ts +4 -0
- package/dist/temporal/scheduler/temporalScheduler.js +6 -0
- package/dist/temporal/scheduler/temporalSchedulerCore.d.ts +1 -0
- package/dist/temporal/scheduler/temporalSchedulerCore.js +1 -0
- package/dist/temporal/scheduler/visibilityPolicy.d.ts +2 -0
- package/dist/temporal/scheduler/visibilityPolicy.js +1 -0
- package/dist/temporal/transport/temporalTransport.d.ts +1 -0
- package/dist/temporal/transport/temporalTransport.js +1 -0
- package/dist/temporal/transport/transportScope.d.ts +7 -0
- package/dist/temporal/transport/transportScope.js +3 -0
- package/dist/temporal/transport/transportTimeline.d.ts +22 -0
- package/dist/temporal/transport/transportTimeline.js +36 -0
- package/dist/temporal/transport/transportTypes.d.ts +1 -0
- package/dist/temporal/transport/transportTypes.js +1 -0
- package/dist/workspace-contracts.d.ts +36 -0
- package/dist/workspace-contracts.js +28 -0
- package/package.json +57 -0
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
import type { JsonObject, JsonValue } from "../shared/json.js";
|
|
2
|
+
export type ControlledExperimentMetricDirection = 'higher' | 'lower' | 'neutral';
|
|
3
|
+
export type ControlledExperimentRunStatus = 'completed' | 'invalid' | 'cancelled';
|
|
4
|
+
export interface ControlledExperimentConditionDefinition {
|
|
5
|
+
id: string;
|
|
6
|
+
label: string;
|
|
7
|
+
parameters: JsonObject;
|
|
8
|
+
}
|
|
9
|
+
export interface ControlledExperimentMetricDefinition {
|
|
10
|
+
id: string;
|
|
11
|
+
label: string;
|
|
12
|
+
unit: string;
|
|
13
|
+
direction: ControlledExperimentMetricDirection;
|
|
14
|
+
}
|
|
15
|
+
export interface ControlledExperimentPhaseDefinition {
|
|
16
|
+
id: string;
|
|
17
|
+
label: string;
|
|
18
|
+
}
|
|
19
|
+
export interface ControlledExperimentDefinition {
|
|
20
|
+
id: string;
|
|
21
|
+
version: number;
|
|
22
|
+
title: string;
|
|
23
|
+
hypothesis: string;
|
|
24
|
+
independentVariable: string;
|
|
25
|
+
conditions: readonly ControlledExperimentConditionDefinition[];
|
|
26
|
+
metrics: readonly ControlledExperimentMetricDefinition[];
|
|
27
|
+
phases: readonly ControlledExperimentPhaseDefinition[];
|
|
28
|
+
controlledVariables: readonly string[];
|
|
29
|
+
maxObservations: number;
|
|
30
|
+
}
|
|
31
|
+
export interface ControlledExperimentObservationInput {
|
|
32
|
+
observedAtMs: number;
|
|
33
|
+
metrics: Readonly<Record<string, number | null | undefined>>;
|
|
34
|
+
provenance?: JsonObject;
|
|
35
|
+
}
|
|
36
|
+
export interface ControlledExperimentObservation {
|
|
37
|
+
sequence: number;
|
|
38
|
+
observedAtMs: number;
|
|
39
|
+
phaseId: string | null;
|
|
40
|
+
metrics: Record<string, number | null>;
|
|
41
|
+
provenance: JsonObject;
|
|
42
|
+
}
|
|
43
|
+
export interface ControlledExperimentPhaseMarker {
|
|
44
|
+
sequence: number;
|
|
45
|
+
phaseId: string;
|
|
46
|
+
observedAtMs: number;
|
|
47
|
+
provenance: JsonObject;
|
|
48
|
+
}
|
|
49
|
+
export interface ControlledExperimentMetricSummary {
|
|
50
|
+
count: number;
|
|
51
|
+
minimum: number | null;
|
|
52
|
+
maximum: number | null;
|
|
53
|
+
mean: number | null;
|
|
54
|
+
p01: number | null;
|
|
55
|
+
p50: number | null;
|
|
56
|
+
p95: number | null;
|
|
57
|
+
p99: number | null;
|
|
58
|
+
}
|
|
59
|
+
export interface ControlledExperimentRunStart {
|
|
60
|
+
runId: string;
|
|
61
|
+
conditionId: string;
|
|
62
|
+
startedAtMs: number;
|
|
63
|
+
environment: JsonObject;
|
|
64
|
+
}
|
|
65
|
+
export interface ControlledExperimentRunStop {
|
|
66
|
+
endedAtMs: number;
|
|
67
|
+
status?: ControlledExperimentRunStatus;
|
|
68
|
+
reason?: string | null;
|
|
69
|
+
}
|
|
70
|
+
export interface ControlledExperimentRunArtifact {
|
|
71
|
+
schemaVersion: 1;
|
|
72
|
+
experiment: {
|
|
73
|
+
id: string;
|
|
74
|
+
version: number;
|
|
75
|
+
title: string;
|
|
76
|
+
hypothesis: string;
|
|
77
|
+
independentVariable: string;
|
|
78
|
+
conditions: readonly ControlledExperimentConditionDefinition[];
|
|
79
|
+
condition: ControlledExperimentConditionDefinition;
|
|
80
|
+
metrics: readonly ControlledExperimentMetricDefinition[];
|
|
81
|
+
phases: readonly ControlledExperimentPhaseDefinition[];
|
|
82
|
+
controlledVariables: readonly string[];
|
|
83
|
+
};
|
|
84
|
+
run: {
|
|
85
|
+
id: string;
|
|
86
|
+
status: ControlledExperimentRunStatus;
|
|
87
|
+
reason: string | null;
|
|
88
|
+
startedAtMs: number;
|
|
89
|
+
endedAtMs: number;
|
|
90
|
+
durationMs: number;
|
|
91
|
+
environment: JsonObject;
|
|
92
|
+
};
|
|
93
|
+
observations: readonly ControlledExperimentObservation[];
|
|
94
|
+
phaseMarkers: readonly ControlledExperimentPhaseMarker[];
|
|
95
|
+
metricSummaries: Readonly<Record<string, ControlledExperimentMetricSummary>>;
|
|
96
|
+
retention: {
|
|
97
|
+
maxObservations: number;
|
|
98
|
+
recordedObservations: number;
|
|
99
|
+
droppedObservations: number;
|
|
100
|
+
truncated: boolean;
|
|
101
|
+
};
|
|
102
|
+
}
|
|
103
|
+
export interface ControlledExperimentRecorderSnapshot {
|
|
104
|
+
recording: boolean;
|
|
105
|
+
runId: string | null;
|
|
106
|
+
conditionId: string | null;
|
|
107
|
+
phaseId: string | null;
|
|
108
|
+
observationCount: number;
|
|
109
|
+
droppedObservationCount: number;
|
|
110
|
+
}
|
|
111
|
+
export interface ControlledExperimentCampaignRunDefinition {
|
|
112
|
+
runId: string;
|
|
113
|
+
blindId: string;
|
|
114
|
+
conditionId: string;
|
|
115
|
+
}
|
|
116
|
+
export interface ControlledExperimentEnvironmentRequirement {
|
|
117
|
+
path: readonly string[];
|
|
118
|
+
value: JsonValue;
|
|
119
|
+
}
|
|
120
|
+
export interface ControlledExperimentCampaignDefinition {
|
|
121
|
+
id: string;
|
|
122
|
+
version: number;
|
|
123
|
+
experimentId: string;
|
|
124
|
+
experimentVersion: number;
|
|
125
|
+
expectedDurationMs: number;
|
|
126
|
+
durationToleranceMs: number;
|
|
127
|
+
validRunsRequiredPerCondition: number;
|
|
128
|
+
requiredPhaseIds: readonly string[];
|
|
129
|
+
requiredMetricIds: readonly string[];
|
|
130
|
+
environmentRequirements: readonly ControlledExperimentEnvironmentRequirement[];
|
|
131
|
+
runs: readonly ControlledExperimentCampaignRunDefinition[];
|
|
132
|
+
}
|
|
133
|
+
export type ControlledExperimentCampaignRunDisposition = 'pending' | 'accepted' | 'rejected';
|
|
134
|
+
export interface ControlledExperimentCampaignRunAssessment {
|
|
135
|
+
runId: string;
|
|
136
|
+
blindId: string;
|
|
137
|
+
conditionId: string;
|
|
138
|
+
disposition: ControlledExperimentCampaignRunDisposition;
|
|
139
|
+
reasons: readonly string[];
|
|
140
|
+
artifactStatus: ControlledExperimentRunStatus | null;
|
|
141
|
+
}
|
|
142
|
+
export interface ControlledExperimentCampaignSnapshot {
|
|
143
|
+
campaignId: string;
|
|
144
|
+
campaignVersion: number;
|
|
145
|
+
readyForReview: boolean;
|
|
146
|
+
acceptedRunCounts: Readonly<Record<string, number>>;
|
|
147
|
+
runs: readonly ControlledExperimentCampaignRunAssessment[];
|
|
148
|
+
nextRun: ControlledExperimentCampaignRunDefinition | null;
|
|
149
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import type { TranslationLayer, WorkbenchLocale } from "./model.js";
|
|
2
|
+
export type LanguageRegistryStatus = 'covered' | 'partial' | 'missing';
|
|
3
|
+
export interface LanguageRegistryLocaleCoverage {
|
|
4
|
+
locale: WorkbenchLocale;
|
|
5
|
+
totalKeys: number;
|
|
6
|
+
translatedKeys: number;
|
|
7
|
+
missingKeys: number;
|
|
8
|
+
coverage: number;
|
|
9
|
+
status: LanguageRegistryStatus;
|
|
10
|
+
}
|
|
11
|
+
export interface LanguageRegistryNamespaceCoverage {
|
|
12
|
+
namespace: string;
|
|
13
|
+
layer: TranslationLayer | 'unknown';
|
|
14
|
+
source: string;
|
|
15
|
+
totalKeys: number;
|
|
16
|
+
locales: Record<WorkbenchLocale, LanguageRegistryLocaleCoverage>;
|
|
17
|
+
}
|
|
18
|
+
export interface LanguageRegistryTranslationValue {
|
|
19
|
+
status: LanguageRegistryStatus;
|
|
20
|
+
value?: string;
|
|
21
|
+
source?: string;
|
|
22
|
+
}
|
|
23
|
+
export interface LanguageRegistryTranslationEntry {
|
|
24
|
+
id: string;
|
|
25
|
+
namespace: string;
|
|
26
|
+
key: string;
|
|
27
|
+
layer: TranslationLayer | 'unknown';
|
|
28
|
+
source: string;
|
|
29
|
+
locales: Record<WorkbenchLocale, LanguageRegistryTranslationValue>;
|
|
30
|
+
}
|
|
31
|
+
export interface LanguageRegistryHistorySnapshot {
|
|
32
|
+
step: number;
|
|
33
|
+
generatedAt: 'deterministic';
|
|
34
|
+
totals: {
|
|
35
|
+
bundles: number;
|
|
36
|
+
namespaces: number;
|
|
37
|
+
keys: number;
|
|
38
|
+
sources: number;
|
|
39
|
+
};
|
|
40
|
+
coverage: Record<WorkbenchLocale, LanguageRegistryLocaleCoverage>;
|
|
41
|
+
}
|
|
42
|
+
export interface LanguageRegistryEvaluation {
|
|
43
|
+
schemaVersion: 'language-registry.v1';
|
|
44
|
+
generatedAt: 'deterministic';
|
|
45
|
+
fallbackLocale: WorkbenchLocale;
|
|
46
|
+
locales: WorkbenchLocale[];
|
|
47
|
+
totals: {
|
|
48
|
+
bundles: number;
|
|
49
|
+
namespaces: number;
|
|
50
|
+
keys: number;
|
|
51
|
+
sources: number;
|
|
52
|
+
};
|
|
53
|
+
coverage: LanguageRegistryLocaleCoverage[];
|
|
54
|
+
namespaces: LanguageRegistryNamespaceCoverage[];
|
|
55
|
+
entries: LanguageRegistryTranslationEntry[];
|
|
56
|
+
history: LanguageRegistryHistorySnapshot[];
|
|
57
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
export type WorkbenchLocale = string;
|
|
2
|
+
export type TranslationLayer = 'core' | 'domain' | 'ui' | 'app' | 'docs' | 'tests' | 'infra' | 'tool' | 'widget';
|
|
3
|
+
export type TranslationValues = Record<string, string | number | boolean | null | undefined>;
|
|
4
|
+
export interface TranslationBundle {
|
|
5
|
+
locale: WorkbenchLocale;
|
|
6
|
+
namespace: string;
|
|
7
|
+
messages: Record<string, string>;
|
|
8
|
+
layer?: TranslationLayer;
|
|
9
|
+
source?: string;
|
|
10
|
+
/**
|
|
11
|
+
* Higher priority bundles override lower priority bundles for the same locale/key.
|
|
12
|
+
* Suggested bands: core/ui=0, tool/widget=20, app=40, runtime/session=80.
|
|
13
|
+
*/
|
|
14
|
+
priority?: number;
|
|
15
|
+
}
|
|
16
|
+
export interface TranslationLookupOptions {
|
|
17
|
+
locale?: WorkbenchLocale | null;
|
|
18
|
+
default?: string;
|
|
19
|
+
values?: TranslationValues;
|
|
20
|
+
}
|
|
21
|
+
export interface TranslationRegistryOptions {
|
|
22
|
+
fallbackLocale?: WorkbenchLocale;
|
|
23
|
+
}
|
|
24
|
+
export interface TranslationMatch {
|
|
25
|
+
key: string;
|
|
26
|
+
locale: WorkbenchLocale;
|
|
27
|
+
namespace: string;
|
|
28
|
+
messageKey: string;
|
|
29
|
+
value: string;
|
|
30
|
+
source?: string;
|
|
31
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export type WorkbenchIconTone = 'default' | 'action' | 'danger' | 'design' | 'product' | 'runtime' | 'template' | 'shared';
|
|
2
|
+
export interface WorkbenchIconRef {
|
|
3
|
+
id: string;
|
|
4
|
+
label?: string;
|
|
5
|
+
tone?: WorkbenchIconTone;
|
|
6
|
+
fallback?: string;
|
|
7
|
+
}
|
|
8
|
+
export type WorkbenchIconInput = string | WorkbenchIconRef;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import type { RuntimeHydrationSnapshot } from "../runtime/hydration.js";
|
|
2
|
+
import type { RuntimeInitializationSnapshot } from "../runtime/initialization.js";
|
|
3
|
+
import type { RuntimePlan } from "../runtime/plan.js";
|
|
4
|
+
import type { RuntimeRecoverySnapshot, RuntimeSafeModeSnapshot } from "../runtime/recovery.js";
|
|
5
|
+
import type { RuntimeSuspensionSnapshot } from "../runtime/suspension.js";
|
|
6
|
+
import type { RuntimeTeardownSnapshot } from "../runtime/teardown.js";
|
|
7
|
+
import type { RepositoryInspectionSnapshot } from "../repository/model.js";
|
|
8
|
+
export type LaunchTargetKind = 'self' | 'project';
|
|
9
|
+
export type LaunchProjectKind = 'app' | 'repository';
|
|
10
|
+
export type LaunchProfile = 'core-only' | 'project-workbench' | 'repo-inspect-only' | 'app-safe-mode' | 'app-full-runtime' | 'sandbox-runtime' | 'recovery-mode';
|
|
11
|
+
export type LaunchPhase = 'BOOT' | 'LAUNCH_GATE' | 'CONTEXT_RESOLVED' | 'PREFLIGHT' | 'PLANNED' | 'INITIALIZING' | 'HYDRATING' | 'RUNNING' | 'SUSPENDING' | 'SUSPENDED' | 'RESUMING' | 'TEARDOWN' | 'RECOVERY' | 'SAFE_MODE';
|
|
12
|
+
export type LaunchScreen = 'gate' | 'dashboard' | 'preflight' | 'initializing' | 'running' | 'safe-mode';
|
|
13
|
+
export declare const LAUNCH_OBSERVABLE_PHASES: readonly ["PREFLIGHT", "PLANNED", "INITIALIZING", "HYDRATING", "RUNNING", "TEARDOWN", "RECOVERY"];
|
|
14
|
+
export type LaunchObservablePhase = (typeof LAUNCH_OBSERVABLE_PHASES)[number];
|
|
15
|
+
export interface LaunchProjectOption {
|
|
16
|
+
id: string;
|
|
17
|
+
kind: LaunchProjectKind;
|
|
18
|
+
label: string;
|
|
19
|
+
root: string;
|
|
20
|
+
description?: string | null;
|
|
21
|
+
icon?: string | null;
|
|
22
|
+
}
|
|
23
|
+
export interface LaunchTarget {
|
|
24
|
+
kind: LaunchTargetKind;
|
|
25
|
+
profile: LaunchProfile;
|
|
26
|
+
project?: LaunchProjectOption | null;
|
|
27
|
+
}
|
|
28
|
+
export interface LaunchPreflightCheck {
|
|
29
|
+
id: string;
|
|
30
|
+
label: string;
|
|
31
|
+
status: 'pending' | 'ready' | 'warning' | 'blocked';
|
|
32
|
+
message: string;
|
|
33
|
+
}
|
|
34
|
+
export interface LaunchPreflightSummary {
|
|
35
|
+
target: LaunchTarget;
|
|
36
|
+
checks: LaunchPreflightCheck[];
|
|
37
|
+
generatedAt: string;
|
|
38
|
+
repository: RepositoryInspectionSnapshot | null;
|
|
39
|
+
}
|
|
40
|
+
export interface LaunchState {
|
|
41
|
+
phase: LaunchPhase;
|
|
42
|
+
screen: LaunchScreen;
|
|
43
|
+
target: LaunchTarget | null;
|
|
44
|
+
preflight: LaunchPreflightSummary | null;
|
|
45
|
+
plan: RuntimePlan | null;
|
|
46
|
+
initialization: RuntimeInitializationSnapshot | null;
|
|
47
|
+
hydration: RuntimeHydrationSnapshot | null;
|
|
48
|
+
suspension: RuntimeSuspensionSnapshot | null;
|
|
49
|
+
teardown: RuntimeTeardownSnapshot | null;
|
|
50
|
+
recovery: RuntimeRecoverySnapshot | null;
|
|
51
|
+
safeMode: RuntimeSafeModeSnapshot | null;
|
|
52
|
+
error: string | null;
|
|
53
|
+
}
|
|
54
|
+
export declare function createInitialLaunchState(): LaunchState;
|
|
55
|
+
export declare function transitionLaunchState(state: LaunchState, phase: LaunchPhase, patch?: Partial<LaunchState>): LaunchState;
|
|
56
|
+
export declare function createSelfLaunchTarget(): LaunchTarget;
|
|
57
|
+
export declare function createProjectLaunchTarget(project: LaunchProjectOption, profile?: LaunchProfile): LaunchTarget;
|
|
58
|
+
export declare function createLaunchPreflightSummary(target: LaunchTarget, now?: string): LaunchPreflightSummary;
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
export const LAUNCH_OBSERVABLE_PHASES = [
|
|
2
|
+
'PREFLIGHT',
|
|
3
|
+
'PLANNED',
|
|
4
|
+
'INITIALIZING',
|
|
5
|
+
'HYDRATING',
|
|
6
|
+
'RUNNING',
|
|
7
|
+
'TEARDOWN',
|
|
8
|
+
'RECOVERY'
|
|
9
|
+
];
|
|
10
|
+
export function createInitialLaunchState() {
|
|
11
|
+
return {
|
|
12
|
+
phase: 'LAUNCH_GATE',
|
|
13
|
+
screen: 'gate',
|
|
14
|
+
target: null,
|
|
15
|
+
preflight: null,
|
|
16
|
+
plan: null,
|
|
17
|
+
initialization: null,
|
|
18
|
+
hydration: null,
|
|
19
|
+
suspension: null,
|
|
20
|
+
teardown: null,
|
|
21
|
+
recovery: null,
|
|
22
|
+
safeMode: null,
|
|
23
|
+
error: null
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
export function transitionLaunchState(state, phase, patch = {}) {
|
|
27
|
+
return {
|
|
28
|
+
...state,
|
|
29
|
+
...patch,
|
|
30
|
+
phase,
|
|
31
|
+
screen: patch.screen ?? resolveLaunchScreenForPhase(phase, state.screen)
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
export function createSelfLaunchTarget() {
|
|
35
|
+
return {
|
|
36
|
+
kind: 'self',
|
|
37
|
+
profile: 'core-only',
|
|
38
|
+
project: null
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
export function createProjectLaunchTarget(project, profile = 'project-workbench') {
|
|
42
|
+
return {
|
|
43
|
+
kind: 'project',
|
|
44
|
+
profile,
|
|
45
|
+
project
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
export function createLaunchPreflightSummary(target, now = new Date().toISOString()) {
|
|
49
|
+
const checks = target.kind === 'self'
|
|
50
|
+
? [
|
|
51
|
+
{
|
|
52
|
+
id: 'launch.self.profile',
|
|
53
|
+
label: 'Core profile',
|
|
54
|
+
status: 'ready',
|
|
55
|
+
message: 'Reduced self-inspection environment selected.'
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
id: 'launch.self.runtime',
|
|
59
|
+
label: 'Runtime',
|
|
60
|
+
status: 'ready',
|
|
61
|
+
message: 'Workspace runtime will initialize after confirmation.'
|
|
62
|
+
}
|
|
63
|
+
]
|
|
64
|
+
: [
|
|
65
|
+
{
|
|
66
|
+
id: 'launch.project.target',
|
|
67
|
+
label: 'Project target',
|
|
68
|
+
status: target.project?.root ? 'ready' : 'blocked',
|
|
69
|
+
message: target.project?.root ?? 'No project root selected.'
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
id: 'launch.project.scan',
|
|
73
|
+
label: 'Repository projection',
|
|
74
|
+
status: 'pending',
|
|
75
|
+
message: 'Repository metadata will hydrate when an inspection projection is available.'
|
|
76
|
+
}
|
|
77
|
+
];
|
|
78
|
+
return {
|
|
79
|
+
target,
|
|
80
|
+
checks,
|
|
81
|
+
generatedAt: now,
|
|
82
|
+
repository: null
|
|
83
|
+
};
|
|
84
|
+
}
|
|
85
|
+
function resolveLaunchScreenForPhase(phase, fallback) {
|
|
86
|
+
switch (phase) {
|
|
87
|
+
case 'BOOT':
|
|
88
|
+
case 'LAUNCH_GATE':
|
|
89
|
+
case 'CONTEXT_RESOLVED':
|
|
90
|
+
return 'gate';
|
|
91
|
+
case 'PREFLIGHT':
|
|
92
|
+
case 'PLANNED':
|
|
93
|
+
return 'preflight';
|
|
94
|
+
case 'INITIALIZING':
|
|
95
|
+
case 'HYDRATING':
|
|
96
|
+
return 'initializing';
|
|
97
|
+
case 'RUNNING':
|
|
98
|
+
case 'SUSPENDING':
|
|
99
|
+
case 'SUSPENDED':
|
|
100
|
+
case 'RESUMING':
|
|
101
|
+
case 'TEARDOWN':
|
|
102
|
+
case 'RECOVERY':
|
|
103
|
+
return 'running';
|
|
104
|
+
case 'SAFE_MODE':
|
|
105
|
+
return 'safe-mode';
|
|
106
|
+
default:
|
|
107
|
+
return fallback;
|
|
108
|
+
}
|
|
109
|
+
}
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import type { SplitOrientation } from "./model.js";
|
|
2
|
+
export type LayoutEdge = 'top' | 'right' | 'bottom' | 'left';
|
|
3
|
+
export type LayoutDockSide = 'top' | 'right' | 'bottom' | 'left';
|
|
4
|
+
export type LayoutDockPlacement = LayoutDockSide | 'center';
|
|
5
|
+
export type LayoutInteractionSourceKind = 'workspace-edge' | 'split-boundary' | 'panel-menu';
|
|
6
|
+
export type LayoutMenuActionId = 'split:vertical' | 'split:horizontal' | 'join-areas' | 'swap-areas';
|
|
7
|
+
export type BoundaryPullSourceKind = 'edge' | 'corner';
|
|
8
|
+
export interface LayoutInteractionAnchor {
|
|
9
|
+
x: number;
|
|
10
|
+
y: number;
|
|
11
|
+
}
|
|
12
|
+
export interface LayoutInteractionPointer {
|
|
13
|
+
x: number;
|
|
14
|
+
y: number;
|
|
15
|
+
}
|
|
16
|
+
export interface LayoutMenuTarget {
|
|
17
|
+
id: string;
|
|
18
|
+
panelId: string;
|
|
19
|
+
areaId: string;
|
|
20
|
+
areaPanelIds: readonly string[];
|
|
21
|
+
edge: LayoutEdge;
|
|
22
|
+
label: string;
|
|
23
|
+
joinSide: LayoutDockSide;
|
|
24
|
+
joinSiblingPanelIds: readonly string[];
|
|
25
|
+
swapSiblingPanelIds: readonly string[];
|
|
26
|
+
}
|
|
27
|
+
export type LayoutDockTarget = {
|
|
28
|
+
kind: 'workspace-edge';
|
|
29
|
+
side: LayoutDockSide;
|
|
30
|
+
} | {
|
|
31
|
+
kind: 'stack';
|
|
32
|
+
stackId: string;
|
|
33
|
+
placement: LayoutDockPlacement;
|
|
34
|
+
tabIndex?: number | null;
|
|
35
|
+
};
|
|
36
|
+
export type LayoutInteractionState = {
|
|
37
|
+
mode: 'idle';
|
|
38
|
+
} | {
|
|
39
|
+
mode: 'split-menu';
|
|
40
|
+
source: LayoutInteractionSourceKind;
|
|
41
|
+
panelId: string | null;
|
|
42
|
+
edge: LayoutEdge;
|
|
43
|
+
anchor: LayoutInteractionAnchor;
|
|
44
|
+
targets: LayoutMenuTarget[];
|
|
45
|
+
initialActionId: LayoutMenuActionId | null;
|
|
46
|
+
} | {
|
|
47
|
+
mode: 'split-side-pick';
|
|
48
|
+
panelId: string | null;
|
|
49
|
+
edge: LayoutEdge;
|
|
50
|
+
orientation: SplitOrientation;
|
|
51
|
+
hoveredSide: LayoutDockSide | null;
|
|
52
|
+
} | {
|
|
53
|
+
mode: 'split-preview';
|
|
54
|
+
panelId: string | null;
|
|
55
|
+
edge: LayoutEdge;
|
|
56
|
+
orientation: SplitOrientation;
|
|
57
|
+
cuts: number;
|
|
58
|
+
pointerRatio: number;
|
|
59
|
+
} | {
|
|
60
|
+
mode: 'boundary-pull';
|
|
61
|
+
windowId?: string;
|
|
62
|
+
source: BoundaryPullSourceKind;
|
|
63
|
+
anchor: LayoutInteractionAnchor;
|
|
64
|
+
pointer: LayoutInteractionPointer;
|
|
65
|
+
horizontalEdge: 'left' | 'right' | null;
|
|
66
|
+
verticalEdge: 'top' | 'bottom' | null;
|
|
67
|
+
neutralThreshold: number;
|
|
68
|
+
creationThreshold: number;
|
|
69
|
+
horizontalDistance: number;
|
|
70
|
+
verticalDistance: number;
|
|
71
|
+
horizontalBandRatio: number | null;
|
|
72
|
+
verticalBandRatio: number | null;
|
|
73
|
+
} | {
|
|
74
|
+
mode: 'intersection-resize';
|
|
75
|
+
anchor: LayoutInteractionAnchor;
|
|
76
|
+
pointer: LayoutInteractionPointer;
|
|
77
|
+
columnSplitId: string;
|
|
78
|
+
rowSplitId: string;
|
|
79
|
+
columnBaseSizes: [number, number];
|
|
80
|
+
rowBaseSizes: [number, number];
|
|
81
|
+
columnPreviewSizes: [number, number];
|
|
82
|
+
rowPreviewSizes: [number, number];
|
|
83
|
+
} | {
|
|
84
|
+
mode: 'drag-panel';
|
|
85
|
+
panelId: string;
|
|
86
|
+
sourceStackId: string;
|
|
87
|
+
anchor: LayoutInteractionAnchor;
|
|
88
|
+
pointer: LayoutInteractionPointer;
|
|
89
|
+
hoveredTarget: LayoutDockTarget | null;
|
|
90
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { PanelNode } from "../panel/model.js";
|
|
2
|
+
export type SplitOrientation = 'horizontal' | 'vertical';
|
|
3
|
+
export type NonEmptyArray<T> = readonly [T, ...T[]];
|
|
4
|
+
/**
|
|
5
|
+
* Invariants:
|
|
6
|
+
* - split nodes always have exactly two children
|
|
7
|
+
* - `sizes` are finite, positive, and normalized by domain helpers
|
|
8
|
+
*/
|
|
9
|
+
export interface SplitNode {
|
|
10
|
+
id: string;
|
|
11
|
+
kind: 'split';
|
|
12
|
+
orientation: SplitOrientation;
|
|
13
|
+
sizes: [number, number];
|
|
14
|
+
children: readonly [LayoutNode, LayoutNode];
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Invariants:
|
|
18
|
+
* - stack nodes always contain at least one panel
|
|
19
|
+
* - `activeChildId` always points at one of `children`
|
|
20
|
+
*/
|
|
21
|
+
export interface StackNode {
|
|
22
|
+
id: string;
|
|
23
|
+
kind: 'stack';
|
|
24
|
+
activeChildId: string;
|
|
25
|
+
headerVisible?: boolean;
|
|
26
|
+
children: NonEmptyArray<PanelNode>;
|
|
27
|
+
}
|
|
28
|
+
export type LayoutNode = SplitNode | StackNode;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { LayoutNode, SplitNode, StackNode } from "./model.js";
|
|
2
|
+
import type { PanelNode } from "../panel/model.js";
|
|
3
|
+
export declare function visitLayoutNodes(node: LayoutNode, visitor: (node: LayoutNode) => void): void;
|
|
4
|
+
export declare function findLayoutNode(node: LayoutNode, targetId: string): LayoutNode | undefined;
|
|
5
|
+
export declare function findPanel(node: LayoutNode, panelId: string): PanelNode | undefined;
|
|
6
|
+
export declare function findStack(node: LayoutNode, stackId: string): StackNode | undefined;
|
|
7
|
+
export declare function findSplit(node: LayoutNode, splitId: string): SplitNode | undefined;
|
|
8
|
+
export declare function containsPanel(node: LayoutNode, panelId: string): boolean;
|
|
9
|
+
export declare function findStackContainingPanel(node: LayoutNode, panelId: string): StackNode | undefined;
|
|
10
|
+
export declare function listPanels(node: LayoutNode): PanelNode[];
|
|
11
|
+
export declare function listStacks(node: LayoutNode): StackNode[];
|
|
12
|
+
export declare function listSplits(node: LayoutNode): SplitNode[];
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
export function visitLayoutNodes(node, visitor) {
|
|
2
|
+
visitor(node);
|
|
3
|
+
if (node.kind === 'split') {
|
|
4
|
+
for (const child of node.children) {
|
|
5
|
+
visitLayoutNodes(child, visitor);
|
|
6
|
+
}
|
|
7
|
+
}
|
|
8
|
+
}
|
|
9
|
+
export function findLayoutNode(node, targetId) {
|
|
10
|
+
if (node.id === targetId) {
|
|
11
|
+
return node;
|
|
12
|
+
}
|
|
13
|
+
if (node.kind === 'split') {
|
|
14
|
+
for (const child of node.children) {
|
|
15
|
+
const match = findLayoutNode(child, targetId);
|
|
16
|
+
if (match) {
|
|
17
|
+
return match;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
return undefined;
|
|
22
|
+
}
|
|
23
|
+
export function findPanel(node, panelId) {
|
|
24
|
+
if (node.kind === 'stack') {
|
|
25
|
+
return node.children.find((panel) => panel.id === panelId);
|
|
26
|
+
}
|
|
27
|
+
for (const child of node.children) {
|
|
28
|
+
const match = findPanel(child, panelId);
|
|
29
|
+
if (match) {
|
|
30
|
+
return match;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
return undefined;
|
|
34
|
+
}
|
|
35
|
+
export function findStack(node, stackId) {
|
|
36
|
+
const match = findLayoutNode(node, stackId);
|
|
37
|
+
return match?.kind === 'stack' ? match : undefined;
|
|
38
|
+
}
|
|
39
|
+
export function findSplit(node, splitId) {
|
|
40
|
+
const match = findLayoutNode(node, splitId);
|
|
41
|
+
return match?.kind === 'split' ? match : undefined;
|
|
42
|
+
}
|
|
43
|
+
export function containsPanel(node, panelId) {
|
|
44
|
+
return !!findPanel(node, panelId);
|
|
45
|
+
}
|
|
46
|
+
export function findStackContainingPanel(node, panelId) {
|
|
47
|
+
if (node.kind === 'stack') {
|
|
48
|
+
return node.children.some((panel) => panel.id === panelId) ? node : undefined;
|
|
49
|
+
}
|
|
50
|
+
for (const child of node.children) {
|
|
51
|
+
const match = findStackContainingPanel(child, panelId);
|
|
52
|
+
if (match) {
|
|
53
|
+
return match;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
return undefined;
|
|
57
|
+
}
|
|
58
|
+
export function listPanels(node) {
|
|
59
|
+
const panels = [];
|
|
60
|
+
visitLayoutNodes(node, (entry) => {
|
|
61
|
+
if (entry.kind === 'stack') {
|
|
62
|
+
panels.push(...entry.children);
|
|
63
|
+
}
|
|
64
|
+
});
|
|
65
|
+
return panels;
|
|
66
|
+
}
|
|
67
|
+
export function listStacks(node) {
|
|
68
|
+
const stacks = [];
|
|
69
|
+
visitLayoutNodes(node, (entry) => {
|
|
70
|
+
if (entry.kind === 'stack') {
|
|
71
|
+
stacks.push(entry);
|
|
72
|
+
}
|
|
73
|
+
});
|
|
74
|
+
return stacks;
|
|
75
|
+
}
|
|
76
|
+
export function listSplits(node) {
|
|
77
|
+
const splits = [];
|
|
78
|
+
visitLayoutNodes(node, (entry) => {
|
|
79
|
+
if (entry.kind === 'split') {
|
|
80
|
+
splits.push(entry);
|
|
81
|
+
}
|
|
82
|
+
});
|
|
83
|
+
return splits;
|
|
84
|
+
}
|