@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.
Files changed (373) hide show
  1. package/LICENSE.md +21 -0
  2. package/README.md +54 -0
  3. package/dist/application/boot/applicationBoot.d.ts +48 -0
  4. package/dist/application/boot/applicationBoot.js +174 -0
  5. package/dist/application/experiment/ControlledExperimentCampaign.d.ts +12 -0
  6. package/dist/application/experiment/ControlledExperimentCampaign.js +159 -0
  7. package/dist/application/experiment/ControlledExperimentRecorder.d.ts +17 -0
  8. package/dist/application/experiment/ControlledExperimentRecorder.js +215 -0
  9. package/dist/application/i18n/WorkbenchTranslationRegistry.d.ts +19 -0
  10. package/dist/application/i18n/WorkbenchTranslationRegistry.js +179 -0
  11. package/dist/application/layout/surfaceCommandRouter.d.ts +18 -0
  12. package/dist/application/layout/surfaceCommandRouter.js +247 -0
  13. package/dist/application/physics/NoopPhysicsBackend.d.ts +2 -0
  14. package/dist/application/physics/NoopPhysicsBackend.js +2 -0
  15. package/dist/application/physics/PhysicsService.d.ts +2 -0
  16. package/dist/application/physics/PhysicsService.js +2 -0
  17. package/dist/application/project/ProjectManifest.d.ts +15 -0
  18. package/dist/application/project/ProjectManifest.js +107 -0
  19. package/dist/application/repository/RepositoryPreflightEngine.d.ts +6 -0
  20. package/dist/application/repository/RepositoryPreflightEngine.js +301 -0
  21. package/dist/application/runtime/RuntimeBackendConnection.d.ts +9 -0
  22. package/dist/application/runtime/RuntimeBackendConnection.js +34 -0
  23. package/dist/application/runtime/RuntimeBackendSubscription.d.ts +8 -0
  24. package/dist/application/runtime/RuntimeBackendSubscription.js +52 -0
  25. package/dist/application/runtime/RuntimeCheckpointStore.d.ts +20 -0
  26. package/dist/application/runtime/RuntimeCheckpointStore.js +65 -0
  27. package/dist/application/runtime/RuntimeLaunchProgress.d.ts +3 -0
  28. package/dist/application/runtime/RuntimeLaunchProgress.js +38 -0
  29. package/dist/application/runtime/RuntimeLaunchStateSnapshot.d.ts +48 -0
  30. package/dist/application/runtime/RuntimeLaunchStateSnapshot.js +73 -0
  31. package/dist/application/runtime/RuntimeObservabilityHub.d.ts +28 -0
  32. package/dist/application/runtime/RuntimeObservabilityHub.js +262 -0
  33. package/dist/application/runtime/RuntimeObservationEvents.d.ts +15 -0
  34. package/dist/application/runtime/RuntimeObservationEvents.js +18 -0
  35. package/dist/application/runtime/RuntimeOffloadManager.d.ts +24 -0
  36. package/dist/application/runtime/RuntimeOffloadManager.js +96 -0
  37. package/dist/application/runtime/RuntimePlanEngine.d.ts +11 -0
  38. package/dist/application/runtime/RuntimePlanEngine.js +67 -0
  39. package/dist/application/runtime/RuntimeProjectionCatalog.d.ts +5 -0
  40. package/dist/application/runtime/RuntimeProjectionCatalog.js +48 -0
  41. package/dist/application/runtime/RuntimeProjectionSession.d.ts +5 -0
  42. package/dist/application/runtime/RuntimeProjectionSession.js +4 -0
  43. package/dist/application/runtime/RuntimeProjectionSessionKeys.d.ts +5 -0
  44. package/dist/application/runtime/RuntimeProjectionSessionKeys.js +10 -0
  45. package/dist/application/runtime/RuntimeProjectionSessionReducers.d.ts +7 -0
  46. package/dist/application/runtime/RuntimeProjectionSessionReducers.js +101 -0
  47. package/dist/application/runtime/RuntimeProjectionSessionSerialization.d.ts +5 -0
  48. package/dist/application/runtime/RuntimeProjectionSessionSerialization.js +89 -0
  49. package/dist/application/runtime/RuntimeProjectionSessionSharedState.d.ts +3 -0
  50. package/dist/application/runtime/RuntimeProjectionSessionSharedState.js +53 -0
  51. package/dist/application/runtime/RuntimeProjectionSessionTypes.d.ts +38 -0
  52. package/dist/application/runtime/RuntimeProjectionSessionTypes.js +1 -0
  53. package/dist/application/runtime/RuntimeProjectionViewerSessionSync.d.ts +29 -0
  54. package/dist/application/runtime/RuntimeProjectionViewerSessionSync.js +39 -0
  55. package/dist/application/runtime/RuntimeProjectionViewerSessionUpdates.d.ts +27 -0
  56. package/dist/application/runtime/RuntimeProjectionViewerSessionUpdates.js +38 -0
  57. package/dist/application/runtime/RuntimeRegistryOwner.d.ts +20 -0
  58. package/dist/application/runtime/RuntimeRegistryOwner.js +71 -0
  59. package/dist/application/runtime/RuntimeRegistrySnapshots.d.ts +6 -0
  60. package/dist/application/runtime/RuntimeRegistrySnapshots.js +51 -0
  61. package/dist/application/runtime/RuntimeRegistryTypes.d.ts +29 -0
  62. package/dist/application/runtime/RuntimeRegistryTypes.js +1 -0
  63. package/dist/application/runtime/RuntimeSharedState.d.ts +6 -0
  64. package/dist/application/runtime/RuntimeSharedState.js +47 -0
  65. package/dist/application/runtime/WorkbenchRuntimeCore.d.ts +82 -0
  66. package/dist/application/runtime/WorkbenchRuntimeCore.js +463 -0
  67. package/dist/application/runtime/WorkbenchRuntimeSanitizers.d.ts +9 -0
  68. package/dist/application/runtime/WorkbenchRuntimeSanitizers.js +62 -0
  69. package/dist/application/shell/state.d.ts +22 -0
  70. package/dist/application/shell/state.js +308 -0
  71. package/dist/application/widgets/createWorkbenchWidgetAdapter.d.ts +9 -0
  72. package/dist/application/widgets/createWorkbenchWidgetAdapter.js +30 -0
  73. package/dist/application/workspace/canonicalizeLayout.d.ts +2 -0
  74. package/dist/application/workspace/canonicalizeLayout.js +91 -0
  75. package/dist/application/workspace/closePanel.d.ts +6 -0
  76. package/dist/application/workspace/closePanel.js +43 -0
  77. package/dist/application/workspace/collapseSplit.d.ts +7 -0
  78. package/dist/application/workspace/collapseSplit.js +45 -0
  79. package/dist/application/workspace/collapseSplitBoundary.d.ts +8 -0
  80. package/dist/application/workspace/collapseSplitBoundary.js +106 -0
  81. package/dist/application/workspace/commands.d.ts +71 -0
  82. package/dist/application/workspace/commands.js +216 -0
  83. package/dist/application/workspace/createPeripheralBands.d.ts +14 -0
  84. package/dist/application/workspace/createPeripheralBands.js +62 -0
  85. package/dist/application/workspace/createWorkspace.d.ts +7 -0
  86. package/dist/application/workspace/createWorkspace.js +12 -0
  87. package/dist/application/workspace/detachPanelToWindow.d.ts +12 -0
  88. package/dist/application/workspace/detachPanelToWindow.js +57 -0
  89. package/dist/application/workspace/dockPanel.d.ts +10 -0
  90. package/dist/application/workspace/dockPanel.js +399 -0
  91. package/dist/application/workspace/finalizeWorkspace.d.ts +4 -0
  92. package/dist/application/workspace/finalizeWorkspace.js +23 -0
  93. package/dist/application/workspace/focusPanel.d.ts +2 -0
  94. package/dist/application/workspace/focusPanel.js +19 -0
  95. package/dist/application/workspace/joinPanelArea.d.ts +13 -0
  96. package/dist/application/workspace/joinPanelArea.js +281 -0
  97. package/dist/application/workspace/layoutInteraction.d.ts +176 -0
  98. package/dist/application/workspace/layoutInteraction.js +852 -0
  99. package/dist/application/workspace/layoutTree.d.ts +34 -0
  100. package/dist/application/workspace/layoutTree.js +135 -0
  101. package/dist/application/workspace/openTool.d.ts +15 -0
  102. package/dist/application/workspace/openTool.js +89 -0
  103. package/dist/application/workspace/presetArtifacts.d.ts +60 -0
  104. package/dist/application/workspace/presetArtifacts.js +231 -0
  105. package/dist/application/workspace/presets.d.ts +5 -0
  106. package/dist/application/workspace/presets.js +12 -0
  107. package/dist/application/workspace/reattachWorkspaceWindow.d.ts +7 -0
  108. package/dist/application/workspace/reattachWorkspaceWindow.js +24 -0
  109. package/dist/application/workspace/resizeSplit.d.ts +7 -0
  110. package/dist/application/workspace/resizeSplit.js +12 -0
  111. package/dist/application/workspace/resizeSplitBoundary.d.ts +10 -0
  112. package/dist/application/workspace/resizeSplitBoundary.js +115 -0
  113. package/dist/application/workspace/runToolShellCommand.d.ts +11 -0
  114. package/dist/application/workspace/runToolShellCommand.js +133 -0
  115. package/dist/application/workspace/session.d.ts +9 -0
  116. package/dist/application/workspace/session.js +36 -0
  117. package/dist/application/workspace/setActiveStackChild.d.ts +7 -0
  118. package/dist/application/workspace/setActiveStackChild.js +12 -0
  119. package/dist/application/workspace/setDesignSystemThemeSession.d.ts +3 -0
  120. package/dist/application/workspace/setDesignSystemThemeSession.js +12 -0
  121. package/dist/application/workspace/setPanelFullscreenToggleVisibility.d.ts +7 -0
  122. package/dist/application/workspace/setPanelFullscreenToggleVisibility.js +7 -0
  123. package/dist/application/workspace/setStackHeaderVisibility.d.ts +7 -0
  124. package/dist/application/workspace/setStackHeaderVisibility.js +7 -0
  125. package/dist/application/workspace/setToolPanelTitleOverride.d.ts +9 -0
  126. package/dist/application/workspace/setToolPanelTitleOverride.js +33 -0
  127. package/dist/application/workspace/setToolShellStatus.d.ts +8 -0
  128. package/dist/application/workspace/setToolShellStatus.js +32 -0
  129. package/dist/application/workspace/setWorkspaceFullscreenPanel.d.ts +3 -0
  130. package/dist/application/workspace/setWorkspaceFullscreenPanel.js +26 -0
  131. package/dist/application/workspace/snapshots.d.ts +10 -0
  132. package/dist/application/workspace/snapshots.js +34 -0
  133. package/dist/application/workspace/splitPanel.d.ts +10 -0
  134. package/dist/application/workspace/splitPanel.js +21 -0
  135. package/dist/application/workspace/subdividePanel.d.ts +39 -0
  136. package/dist/application/workspace/subdividePanel.js +128 -0
  137. package/dist/application/workspace/swapPanelArea.d.ts +11 -0
  138. package/dist/application/workspace/swapPanelArea.js +163 -0
  139. package/dist/application/workspace/targetWindow.d.ts +4 -0
  140. package/dist/application/workspace/targetWindow.js +22 -0
  141. package/dist/application/workspace/toolCapabilities.d.ts +11 -0
  142. package/dist/application/workspace/toolCapabilities.js +59 -0
  143. package/dist/application/workspace/toolRuntime.d.ts +32 -0
  144. package/dist/application/workspace/toolRuntime.js +65 -0
  145. package/dist/application/workspace/updateToolState.d.ts +8 -0
  146. package/dist/application/workspace/updateToolState.js +20 -0
  147. package/dist/boot/applicationBoot.d.ts +1 -0
  148. package/dist/boot/applicationBoot.js +2 -0
  149. package/dist/boot/events.d.ts +43 -0
  150. package/dist/boot/events.js +16 -0
  151. package/dist/boot/executor.d.ts +13 -0
  152. package/dist/boot/executor.js +210 -0
  153. package/dist/boot/graph.d.ts +16 -0
  154. package/dist/boot/graph.js +126 -0
  155. package/dist/boot/index.d.ts +2 -0
  156. package/dist/boot/index.js +3 -0
  157. package/dist/boot/mechanism.d.ts +5 -0
  158. package/dist/boot/mechanism.js +6 -0
  159. package/dist/boot/projection.d.ts +72 -0
  160. package/dist/boot/projection.js +398 -0
  161. package/dist/boot/types.d.ts +80 -0
  162. package/dist/boot/types.js +46 -0
  163. package/dist/domain/composition/dockArrangement.d.ts +57 -0
  164. package/dist/domain/composition/dockArrangement.js +304 -0
  165. package/dist/domain/composition/docking.d.ts +68 -0
  166. package/dist/domain/composition/docking.js +187 -0
  167. package/dist/domain/design-system/themeSession.d.ts +12 -0
  168. package/dist/domain/design-system/themeSession.js +42 -0
  169. package/dist/domain/experiment/model.d.ts +149 -0
  170. package/dist/domain/experiment/model.js +1 -0
  171. package/dist/domain/i18n/languageRegistry.d.ts +57 -0
  172. package/dist/domain/i18n/languageRegistry.js +1 -0
  173. package/dist/domain/i18n/model.d.ts +31 -0
  174. package/dist/domain/i18n/model.js +1 -0
  175. package/dist/domain/icon/model.d.ts +8 -0
  176. package/dist/domain/icon/model.js +1 -0
  177. package/dist/domain/input/interactionBindings.d.ts +2 -0
  178. package/dist/domain/input/interactionBindings.js +2 -0
  179. package/dist/domain/launch/model.d.ts +58 -0
  180. package/dist/domain/launch/model.js +109 -0
  181. package/dist/domain/layout/interaction.d.ts +90 -0
  182. package/dist/domain/layout/interaction.js +1 -0
  183. package/dist/domain/layout/model.d.ts +28 -0
  184. package/dist/domain/layout/model.js +1 -0
  185. package/dist/domain/layout/selectors.d.ts +12 -0
  186. package/dist/domain/layout/selectors.js +84 -0
  187. package/dist/domain/layout/surfaceProjection.d.ts +56 -0
  188. package/dist/domain/layout/surfaceProjection.js +249 -0
  189. package/dist/domain/layout/validation.d.ts +9 -0
  190. package/dist/domain/layout/validation.js +71 -0
  191. package/dist/domain/panel/model.d.ts +9 -0
  192. package/dist/domain/panel/model.js +1 -0
  193. package/dist/domain/physics/colliderGeometry.d.ts +2 -0
  194. package/dist/domain/physics/colliderGeometry.js +1 -0
  195. package/dist/domain/physics/contracts.d.ts +2 -0
  196. package/dist/domain/physics/contracts.js +1 -0
  197. package/dist/domain/physics/kinematicBinding.d.ts +22 -0
  198. package/dist/domain/physics/kinematicBinding.js +1 -0
  199. package/dist/domain/physics/model.d.ts +4 -0
  200. package/dist/domain/physics/model.js +1 -0
  201. package/dist/domain/physics/mujoco.d.ts +5 -0
  202. package/dist/domain/physics/mujoco.js +1 -0
  203. package/dist/domain/physics/observationProfile.d.ts +2 -0
  204. package/dist/domain/physics/observationProfile.js +1 -0
  205. package/dist/domain/physics/presentationBinding.d.ts +6 -0
  206. package/dist/domain/physics/presentationBinding.js +1 -0
  207. package/dist/domain/physics/simulationProfile.d.ts +2 -0
  208. package/dist/domain/physics/simulationProfile.js +1 -0
  209. package/dist/domain/physics/visualAlignment.d.ts +17 -0
  210. package/dist/domain/physics/visualAlignment.js +1 -0
  211. package/dist/domain/presentation/readingLevel.d.ts +12 -0
  212. package/dist/domain/presentation/readingLevel.js +29 -0
  213. package/dist/domain/project/model.d.ts +55 -0
  214. package/dist/domain/project/model.js +1 -0
  215. package/dist/domain/repo-quality/model.d.ts +111 -0
  216. package/dist/domain/repo-quality/model.js +1 -0
  217. package/dist/domain/repository/model.d.ts +110 -0
  218. package/dist/domain/repository/model.js +1 -0
  219. package/dist/domain/runtime/checkpoint.d.ts +37 -0
  220. package/dist/domain/runtime/checkpoint.js +87 -0
  221. package/dist/domain/runtime/hydration.d.ts +26 -0
  222. package/dist/domain/runtime/hydration.js +92 -0
  223. package/dist/domain/runtime/initialization.d.ts +25 -0
  224. package/dist/domain/runtime/initialization.js +87 -0
  225. package/dist/domain/runtime/lifecycle.d.ts +51 -0
  226. package/dist/domain/runtime/lifecycle.js +118 -0
  227. package/dist/domain/runtime/model.d.ts +252 -0
  228. package/dist/domain/runtime/model.js +13 -0
  229. package/dist/domain/runtime/observability.d.ts +142 -0
  230. package/dist/domain/runtime/observability.js +1 -0
  231. package/dist/domain/runtime/offload.d.ts +56 -0
  232. package/dist/domain/runtime/offload.js +129 -0
  233. package/dist/domain/runtime/plan.d.ts +26 -0
  234. package/dist/domain/runtime/plan.js +1 -0
  235. package/dist/domain/runtime/qualityPolicy.d.ts +28 -0
  236. package/dist/domain/runtime/qualityPolicy.js +97 -0
  237. package/dist/domain/runtime/recovery.d.ts +61 -0
  238. package/dist/domain/runtime/recovery.js +129 -0
  239. package/dist/domain/runtime/suspension.d.ts +32 -0
  240. package/dist/domain/runtime/suspension.js +107 -0
  241. package/dist/domain/runtime/teardown.d.ts +33 -0
  242. package/dist/domain/runtime/teardown.js +109 -0
  243. package/dist/domain/shared/id.d.ts +1 -0
  244. package/dist/domain/shared/id.js +5 -0
  245. package/dist/domain/shared/json.d.ts +9 -0
  246. package/dist/domain/shared/json.js +24 -0
  247. package/dist/domain/shell/model.d.ts +40 -0
  248. package/dist/domain/shell/model.js +1 -0
  249. package/dist/domain/shell/runtime.d.ts +76 -0
  250. package/dist/domain/shell/runtime.js +40 -0
  251. package/dist/domain/surface/model.d.ts +97 -0
  252. package/dist/domain/surface/model.js +71 -0
  253. package/dist/domain/temporal/model.d.ts +95 -0
  254. package/dist/domain/temporal/model.js +45 -0
  255. package/dist/domain/tool/internalTab.d.ts +11 -0
  256. package/dist/domain/tool/internalTab.js +20 -0
  257. package/dist/domain/tool/model.d.ts +207 -0
  258. package/dist/domain/tool/model.js +1 -0
  259. package/dist/domain/tool/runtime.d.ts +122 -0
  260. package/dist/domain/tool/runtime.js +2 -0
  261. package/dist/domain/tool/shell.d.ts +38 -0
  262. package/dist/domain/tool/shell.js +175 -0
  263. package/dist/domain/widget/composition.d.ts +79 -0
  264. package/dist/domain/widget/composition.js +250 -0
  265. package/dist/domain/widget/model.d.ts +35 -0
  266. package/dist/domain/widget/model.js +8 -0
  267. package/dist/domain/widget/toolDock.d.ts +30 -0
  268. package/dist/domain/widget/toolDock.js +52 -0
  269. package/dist/domain/workbench/model.d.ts +35 -0
  270. package/dist/domain/workbench/model.js +1 -0
  271. package/dist/domain/workbench/routing.d.ts +17 -0
  272. package/dist/domain/workbench/routing.js +72 -0
  273. package/dist/domain/workspace/factories.d.ts +9 -0
  274. package/dist/domain/workspace/factories.js +47 -0
  275. package/dist/domain/workspace/model.d.ts +23 -0
  276. package/dist/domain/workspace/model.js +1 -0
  277. package/dist/domain/workspace/persistence.d.ts +5 -0
  278. package/dist/domain/workspace/persistence.js +1 -0
  279. package/dist/domain/workspace/selectors.d.ts +19 -0
  280. package/dist/domain/workspace/selectors.js +90 -0
  281. package/dist/domain/workspace/session.d.ts +9 -0
  282. package/dist/domain/workspace/session.js +1 -0
  283. package/dist/domain/workspace/validation.d.ts +10 -0
  284. package/dist/domain/workspace/validation.js +231 -0
  285. package/dist/hosting.d.ts +15 -0
  286. package/dist/hosting.js +12 -0
  287. package/dist/index.d.ts +111 -0
  288. package/dist/index.js +111 -0
  289. package/dist/infrastructure/audio/WorkbenchAudioManager.d.ts +36 -0
  290. package/dist/infrastructure/audio/WorkbenchAudioManager.js +100 -0
  291. package/dist/infrastructure/backend/HttpWorkbenchBackendClient.d.ts +30 -0
  292. package/dist/infrastructure/backend/HttpWorkbenchBackendClient.js +314 -0
  293. package/dist/infrastructure/persistence/LocalWorkspacePersistence.d.ts +8 -0
  294. package/dist/infrastructure/persistence/LocalWorkspacePersistence.js +29 -0
  295. package/dist/infrastructure/surfaces/InMemorySurfaceViewerRegistry.d.ts +58 -0
  296. package/dist/infrastructure/surfaces/InMemorySurfaceViewerRegistry.js +121 -0
  297. package/dist/infrastructure/temporal/InMemoryTemporalDialectRegistry.d.ts +8 -0
  298. package/dist/infrastructure/temporal/InMemoryTemporalDialectRegistry.js +38 -0
  299. package/dist/infrastructure/tools/InMemoryToolRegistry.d.ts +46 -0
  300. package/dist/infrastructure/tools/InMemoryToolRegistry.js +82 -0
  301. package/dist/infrastructure/widgets/InMemoryShellWidgetRegistry.d.ts +42 -0
  302. package/dist/infrastructure/widgets/InMemoryShellWidgetRegistry.js +66 -0
  303. package/dist/infrastructure/widgets/InMemoryWorkbenchWidgetRegistry.d.ts +20 -0
  304. package/dist/infrastructure/widgets/InMemoryWorkbenchWidgetRegistry.js +35 -0
  305. package/dist/infrastructure/workbenches/InMemoryWorkbenchRegistry.d.ts +7 -0
  306. package/dist/infrastructure/workbenches/InMemoryWorkbenchRegistry.js +28 -0
  307. package/dist/physics-runtime.d.ts +4 -0
  308. package/dist/physics-runtime.js +2 -0
  309. package/dist/stage/easing.d.ts +5 -0
  310. package/dist/stage/easing.js +15 -0
  311. package/dist/stage/index.d.ts +6 -0
  312. package/dist/stage/index.js +6 -0
  313. package/dist/stage/projection.d.ts +4 -0
  314. package/dist/stage/projection.js +74 -0
  315. package/dist/stage/stageRuntime.d.ts +2 -0
  316. package/dist/stage/stageRuntime.js +32 -0
  317. package/dist/stage/timeline.d.ts +3 -0
  318. package/dist/stage/timeline.js +69 -0
  319. package/dist/stage/tween.d.ts +3 -0
  320. package/dist/stage/tween.js +104 -0
  321. package/dist/stage/types.d.ts +104 -0
  322. package/dist/stage/types.js +30 -0
  323. package/dist/temporal/clock/audioClock.d.ts +1 -0
  324. package/dist/temporal/clock/audioClock.js +1 -0
  325. package/dist/temporal/clock/clockGraph.d.ts +1 -0
  326. package/dist/temporal/clock/clockGraph.js +1 -0
  327. package/dist/temporal/clock/clockTypes.d.ts +1 -0
  328. package/dist/temporal/clock/clockTypes.js +1 -0
  329. package/dist/temporal/clock/fixedStepClock.d.ts +1 -0
  330. package/dist/temporal/clock/fixedStepClock.js +1 -0
  331. package/dist/temporal/clock/musicalClock.d.ts +7 -0
  332. package/dist/temporal/clock/musicalClock.js +35 -0
  333. package/dist/temporal/clock/rootClock.d.ts +1 -0
  334. package/dist/temporal/clock/rootClock.js +1 -0
  335. package/dist/temporal/clock/videoClock.d.ts +1 -0
  336. package/dist/temporal/clock/videoClock.js +1 -0
  337. package/dist/temporal/easing/easingFunctions.d.ts +2 -0
  338. package/dist/temporal/easing/easingFunctions.js +19 -0
  339. package/dist/temporal/easing/easingRegistry.d.ts +10 -0
  340. package/dist/temporal/easing/easingRegistry.js +32 -0
  341. package/dist/temporal/easing/easingShaderSource.d.ts +2 -0
  342. package/dist/temporal/easing/easingShaderSource.js +16 -0
  343. package/dist/temporal/easing/easingTypes.d.ts +9 -0
  344. package/dist/temporal/easing/easingTypes.js +1 -0
  345. package/dist/temporal/history/runtimeHistory.d.ts +77 -0
  346. package/dist/temporal/history/runtimeHistory.js +5 -0
  347. package/dist/temporal/history/temporalHistoryCore.d.ts +1 -0
  348. package/dist/temporal/history/temporalHistoryCore.js +1 -0
  349. package/dist/temporal/index.d.ts +20 -0
  350. package/dist/temporal/index.js +20 -0
  351. package/dist/temporal/invalidation/invalidationController.d.ts +1 -0
  352. package/dist/temporal/invalidation/invalidationController.js +1 -0
  353. package/dist/temporal/scheduler/browserSchedulerHost.d.ts +3 -0
  354. package/dist/temporal/scheduler/browserSchedulerHost.js +19 -0
  355. package/dist/temporal/scheduler/frameBudget.d.ts +1 -0
  356. package/dist/temporal/scheduler/frameBudget.js +1 -0
  357. package/dist/temporal/scheduler/temporalScheduler.d.ts +4 -0
  358. package/dist/temporal/scheduler/temporalScheduler.js +6 -0
  359. package/dist/temporal/scheduler/temporalSchedulerCore.d.ts +1 -0
  360. package/dist/temporal/scheduler/temporalSchedulerCore.js +1 -0
  361. package/dist/temporal/scheduler/visibilityPolicy.d.ts +2 -0
  362. package/dist/temporal/scheduler/visibilityPolicy.js +1 -0
  363. package/dist/temporal/transport/temporalTransport.d.ts +1 -0
  364. package/dist/temporal/transport/temporalTransport.js +1 -0
  365. package/dist/temporal/transport/transportScope.d.ts +7 -0
  366. package/dist/temporal/transport/transportScope.js +3 -0
  367. package/dist/temporal/transport/transportTimeline.d.ts +22 -0
  368. package/dist/temporal/transport/transportTimeline.js +36 -0
  369. package/dist/temporal/transport/transportTypes.d.ts +1 -0
  370. package/dist/temporal/transport/transportTypes.js +1 -0
  371. package/dist/workspace-contracts.d.ts +36 -0
  372. package/dist/workspace-contracts.js +28 -0
  373. package/package.json +57 -0
@@ -0,0 +1,56 @@
1
+ import type { LayoutDockSide } from "./interaction.js";
2
+ import type { SplitOrientation } from "./model.js";
3
+ import type { JsonObject } from "../shared/json.js";
4
+ import type { ShellState } from "../shell/model.js";
5
+ import type { Workspace } from "../workspace/model.js";
6
+ export type LayoutSurfaceKind = 'shell' | 'workspace';
7
+ export type LayoutSurfaceAreaRole = 'root' | 'region' | 'split' | 'stack' | 'panel';
8
+ export type LayoutSurfaceActionKind = 'activate' | 'collapse' | 'close' | 'dock' | 'move' | 'resize' | 'split' | 'toggle-open' | 'toggle-visibility';
9
+ export interface LayoutSurfaceActionProjection {
10
+ kind: LayoutSurfaceActionKind;
11
+ targetId: string;
12
+ label: string;
13
+ metadata?: JsonObject;
14
+ }
15
+ export interface LayoutSurfaceAreaProjection {
16
+ id: string;
17
+ sourceId: string;
18
+ surfaceId: string;
19
+ role: LayoutSurfaceAreaRole;
20
+ title: string;
21
+ parentId: string | null;
22
+ childIds: string[];
23
+ isActive: boolean;
24
+ isVisible: boolean;
25
+ isOpen: boolean;
26
+ actions: LayoutSurfaceActionProjection[];
27
+ metadata?: JsonObject;
28
+ }
29
+ export interface LayoutSurfaceBoundaryProjection {
30
+ id: string;
31
+ sourceId: string;
32
+ surfaceId: string;
33
+ orientation: SplitOrientation;
34
+ areaIds: [string, string];
35
+ actions: LayoutSurfaceActionProjection[];
36
+ metadata?: JsonObject;
37
+ }
38
+ export interface LayoutSurfaceProjection {
39
+ id: string;
40
+ kind: LayoutSurfaceKind;
41
+ title: string;
42
+ rootAreaId: string;
43
+ areas: Record<string, LayoutSurfaceAreaProjection>;
44
+ boundaries: Record<string, LayoutSurfaceBoundaryProjection>;
45
+ }
46
+ export interface LayoutUserActionIntent {
47
+ kind: LayoutSurfaceActionKind;
48
+ surfaceId: string;
49
+ targetId: string;
50
+ side?: LayoutDockSide;
51
+ orientation?: SplitOrientation;
52
+ metadata?: JsonObject;
53
+ }
54
+ export declare function createShellLayoutSurfaceProjection(shellState: ShellState): LayoutSurfaceProjection;
55
+ export declare function createWorkspaceLayoutSurfaceProjection(workspace: Workspace, windowId?: string): LayoutSurfaceProjection;
56
+ export declare function createLayoutSurfaceAction(kind: LayoutSurfaceActionKind, targetId: string, label: string, metadata?: JsonObject): LayoutSurfaceActionProjection;
@@ -0,0 +1,249 @@
1
+ const shellRegionOrder = ['left', 'right', 'bottom'];
2
+ export function createShellLayoutSurfaceProjection(shellState) {
3
+ const surfaceId = 'shell:core';
4
+ const rootAreaId = `${surfaceId}:root`;
5
+ const areas = {};
6
+ const boundaries = {};
7
+ const childIds = shellRegionOrder.map((regionId) => createShellRegionAreaId(surfaceId, regionId));
8
+ areas[rootAreaId] = {
9
+ id: rootAreaId,
10
+ sourceId: 'shell',
11
+ surfaceId,
12
+ role: 'root',
13
+ title: 'Core shell',
14
+ parentId: null,
15
+ childIds,
16
+ isActive: true,
17
+ isVisible: true,
18
+ isOpen: true,
19
+ actions: [],
20
+ metadata: {
21
+ regionIds: shellRegionOrder
22
+ }
23
+ };
24
+ for (const regionId of shellRegionOrder) {
25
+ const region = shellState.regions[regionId];
26
+ const areaId = createShellRegionAreaId(surfaceId, regionId);
27
+ const boundaryId = `${surfaceId}:boundary:${regionId}`;
28
+ areas[areaId] = {
29
+ id: areaId,
30
+ sourceId: regionId,
31
+ surfaceId,
32
+ role: 'region',
33
+ title: `${regionId} region`,
34
+ parentId: rootAreaId,
35
+ childIds: [],
36
+ isActive: region.isOpen,
37
+ isVisible: region.isVisible,
38
+ isOpen: region.isOpen,
39
+ actions: [
40
+ createLayoutSurfaceAction('toggle-open', areaId, 'Toggle region'),
41
+ createLayoutSurfaceAction('toggle-visibility', areaId, 'Toggle visibility'),
42
+ createLayoutSurfaceAction('resize', boundaryId, 'Resize region')
43
+ ],
44
+ metadata: {
45
+ activeWidgetId: region.activeWidgetId,
46
+ regionId,
47
+ size: region.size,
48
+ widgetIds: [...region.widgetIds]
49
+ }
50
+ };
51
+ boundaries[boundaryId] = {
52
+ id: boundaryId,
53
+ sourceId: regionId,
54
+ surfaceId,
55
+ orientation: regionId === 'bottom' ? 'vertical' : 'horizontal',
56
+ areaIds: [rootAreaId, areaId],
57
+ actions: [createLayoutSurfaceAction('resize', boundaryId, 'Resize region')],
58
+ metadata: {
59
+ regionId
60
+ }
61
+ };
62
+ }
63
+ return {
64
+ id: surfaceId,
65
+ kind: 'shell',
66
+ title: 'Core shell',
67
+ rootAreaId,
68
+ areas,
69
+ boundaries
70
+ };
71
+ }
72
+ export function createWorkspaceLayoutSurfaceProjection(workspace, windowId = workspace.activeWindowId) {
73
+ const activeWindow = resolveWorkspaceWindow(workspace, windowId);
74
+ const surfaceId = `workspace:${workspace.id}:${activeWindow?.id ?? 'missing-window'}`;
75
+ const areas = {};
76
+ const boundaries = {};
77
+ if (!activeWindow) {
78
+ const rootAreaId = `${surfaceId}:root`;
79
+ areas[rootAreaId] = {
80
+ id: rootAreaId,
81
+ sourceId: workspace.id,
82
+ surfaceId,
83
+ role: 'root',
84
+ title: 'Workspace',
85
+ parentId: null,
86
+ childIds: [],
87
+ isActive: false,
88
+ isVisible: true,
89
+ isOpen: true,
90
+ actions: [],
91
+ metadata: {
92
+ activeWindowId: workspace.activeWindowId
93
+ }
94
+ };
95
+ return {
96
+ id: surfaceId,
97
+ kind: 'workspace',
98
+ title: 'Workspace',
99
+ rootAreaId,
100
+ areas,
101
+ boundaries
102
+ };
103
+ }
104
+ const rootAreaId = projectWorkspaceLayoutNode({
105
+ node: activeWindow.root,
106
+ surfaceId,
107
+ parentId: null,
108
+ workspace,
109
+ areas,
110
+ boundaries
111
+ });
112
+ return {
113
+ id: surfaceId,
114
+ kind: 'workspace',
115
+ title: activeWindow.title,
116
+ rootAreaId,
117
+ areas,
118
+ boundaries
119
+ };
120
+ }
121
+ export function createLayoutSurfaceAction(kind, targetId, label, metadata) {
122
+ return {
123
+ kind,
124
+ targetId,
125
+ label,
126
+ ...(metadata ? { metadata } : {})
127
+ };
128
+ }
129
+ function resolveWorkspaceWindow(workspace, windowId) {
130
+ return workspace.windows.find((entry) => entry.id === windowId) ?? workspace.windows[0];
131
+ }
132
+ function projectWorkspaceLayoutNode(input) {
133
+ if (input.node.kind === 'split') {
134
+ return projectWorkspaceSplit(input.node, input);
135
+ }
136
+ return projectWorkspaceStack(input.node, input);
137
+ }
138
+ function projectWorkspaceSplit(split, input) {
139
+ const areaId = createWorkspaceAreaId(input.surfaceId, split.id);
140
+ const childIds = split.children.map((child) => projectWorkspaceLayoutNode({
141
+ ...input,
142
+ node: child,
143
+ parentId: areaId
144
+ }));
145
+ const boundaryId = `${input.surfaceId}:boundary:${split.id}`;
146
+ input.areas[areaId] = {
147
+ id: areaId,
148
+ sourceId: split.id,
149
+ surfaceId: input.surfaceId,
150
+ role: 'split',
151
+ title: `${split.orientation} split`,
152
+ parentId: input.parentId,
153
+ childIds,
154
+ isActive: false,
155
+ isVisible: true,
156
+ isOpen: true,
157
+ actions: [
158
+ createLayoutSurfaceAction('resize', boundaryId, 'Resize split'),
159
+ createLayoutSurfaceAction('collapse', boundaryId, 'Collapse split')
160
+ ],
161
+ metadata: {
162
+ orientation: split.orientation,
163
+ sizes: [...split.sizes]
164
+ }
165
+ };
166
+ input.boundaries[boundaryId] = {
167
+ id: boundaryId,
168
+ sourceId: split.id,
169
+ surfaceId: input.surfaceId,
170
+ orientation: split.orientation,
171
+ areaIds: childIds,
172
+ actions: [
173
+ createLayoutSurfaceAction('resize', boundaryId, 'Resize split'),
174
+ createLayoutSurfaceAction('collapse', boundaryId, 'Collapse split')
175
+ ],
176
+ metadata: {
177
+ splitId: split.id,
178
+ sizes: [...split.sizes]
179
+ }
180
+ };
181
+ return areaId;
182
+ }
183
+ function projectWorkspaceStack(stack, input) {
184
+ const areaId = createWorkspaceAreaId(input.surfaceId, stack.id);
185
+ const childIds = stack.children.map((panel) => projectWorkspacePanel(panel, {
186
+ ...input,
187
+ parentId: areaId,
188
+ activePanelId: stack.activeChildId
189
+ }));
190
+ input.areas[areaId] = {
191
+ id: areaId,
192
+ sourceId: stack.id,
193
+ surfaceId: input.surfaceId,
194
+ role: 'stack',
195
+ title: 'Panel stack',
196
+ parentId: input.parentId,
197
+ childIds,
198
+ isActive: true,
199
+ isVisible: true,
200
+ isOpen: true,
201
+ actions: [
202
+ createLayoutSurfaceAction('activate', areaId, 'Activate stack'),
203
+ createLayoutSurfaceAction('dock', areaId, 'Dock panel'),
204
+ createLayoutSurfaceAction('split', areaId, 'Split stack'),
205
+ createLayoutSurfaceAction('move', areaId, 'Move stack')
206
+ ],
207
+ metadata: {
208
+ activeChildId: stack.activeChildId,
209
+ headerVisible: stack.headerVisible ?? true,
210
+ panelIds: stack.children.map((panel) => panel.id)
211
+ }
212
+ };
213
+ return areaId;
214
+ }
215
+ function projectWorkspacePanel(panel, input) {
216
+ const areaId = createWorkspaceAreaId(input.surfaceId, panel.id);
217
+ const toolInstance = panel.toolInstanceId ? input.workspace.toolInstances[panel.toolInstanceId] : undefined;
218
+ input.areas[areaId] = {
219
+ id: areaId,
220
+ sourceId: panel.id,
221
+ surfaceId: input.surfaceId,
222
+ role: 'panel',
223
+ title: panel.title,
224
+ parentId: input.parentId,
225
+ childIds: [],
226
+ isActive: input.activePanelId === panel.id,
227
+ isVisible: input.workspace.fullscreenPanelId ? input.workspace.fullscreenPanelId === panel.id : true,
228
+ isOpen: true,
229
+ actions: [
230
+ createLayoutSurfaceAction('activate', areaId, 'Activate panel'),
231
+ createLayoutSurfaceAction('dock', areaId, 'Dock panel'),
232
+ createLayoutSurfaceAction('move', areaId, 'Move panel'),
233
+ createLayoutSurfaceAction('split', areaId, 'Split panel'),
234
+ createLayoutSurfaceAction('close', areaId, 'Close panel')
235
+ ],
236
+ metadata: {
237
+ showFullscreenToggle: panel.showFullscreenToggle ?? true,
238
+ toolId: toolInstance?.toolId ?? null,
239
+ toolInstanceId: panel.toolInstanceId
240
+ }
241
+ };
242
+ return areaId;
243
+ }
244
+ function createShellRegionAreaId(surfaceId, regionId) {
245
+ return `${surfaceId}:region:${regionId}`;
246
+ }
247
+ function createWorkspaceAreaId(surfaceId, sourceId) {
248
+ return `${surfaceId}:area:${sourceId}`;
249
+ }
@@ -0,0 +1,9 @@
1
+ import type { LayoutNode } from "./model.js";
2
+ export declare const LAYOUT_MIN_SPLIT_SIZE = 0.02;
3
+ export interface LayoutValidationIssue {
4
+ path: string;
5
+ message: string;
6
+ }
7
+ export declare function normalizeSplitSizes([left, right]: [number, number]): [number, number];
8
+ export declare function isNormalizedSplitSizes([left, right]: [number, number]): boolean;
9
+ export declare function validateLayout(node: LayoutNode): LayoutValidationIssue[];
@@ -0,0 +1,71 @@
1
+ import { listSplits, listStacks } from "./selectors.js";
2
+ export const LAYOUT_MIN_SPLIT_SIZE = 0.02;
3
+ export function normalizeSplitSizes([left, right]) {
4
+ const safeLeft = Number.isFinite(left) ? left : 1;
5
+ const safeRight = Number.isFinite(right) ? right : 1;
6
+ const total = safeLeft + safeRight;
7
+ if (!Number.isFinite(total) || total <= 0) {
8
+ return [0.5, 0.5];
9
+ }
10
+ const normalizedLeft = safeLeft / total;
11
+ const normalizedRight = safeRight / total;
12
+ if (normalizedLeft < LAYOUT_MIN_SPLIT_SIZE) {
13
+ return [LAYOUT_MIN_SPLIT_SIZE, 1 - LAYOUT_MIN_SPLIT_SIZE];
14
+ }
15
+ if (normalizedRight < LAYOUT_MIN_SPLIT_SIZE) {
16
+ return [1 - LAYOUT_MIN_SPLIT_SIZE, LAYOUT_MIN_SPLIT_SIZE];
17
+ }
18
+ return [normalizedLeft, normalizedRight];
19
+ }
20
+ export function isNormalizedSplitSizes([left, right]) {
21
+ if (!Number.isFinite(left) || !Number.isFinite(right)) {
22
+ return false;
23
+ }
24
+ if (left < LAYOUT_MIN_SPLIT_SIZE || right < LAYOUT_MIN_SPLIT_SIZE) {
25
+ return false;
26
+ }
27
+ return Math.abs(left + right - 1) < 0.0001;
28
+ }
29
+ export function validateLayout(node) {
30
+ const issues = [];
31
+ const panelIds = new Set();
32
+ const stackIds = new Set();
33
+ const splitIds = new Set();
34
+ for (const stack of listStacks(node)) {
35
+ if (stackIds.has(stack.id)) {
36
+ issues.push({ path: stack.id, message: 'Duplicate stack id.' });
37
+ }
38
+ stackIds.add(stack.id);
39
+ if (!stack.children.length) {
40
+ issues.push({ path: stack.id, message: 'Stack must contain at least one panel.' });
41
+ }
42
+ if (!stack.children.some((panel) => panel.id === stack.activeChildId)) {
43
+ issues.push({ path: stack.id, message: 'Stack activeChildId must reference a child panel.' });
44
+ }
45
+ for (const panel of stack.children) {
46
+ if (panelIds.has(panel.id)) {
47
+ issues.push({ path: panel.id, message: 'Duplicate panel id.' });
48
+ }
49
+ panelIds.add(panel.id);
50
+ if (!panel.title.trim()) {
51
+ issues.push({ path: panel.id, message: 'Panel title must not be empty.' });
52
+ }
53
+ if (panel.toolInstanceId !== null && typeof panel.toolInstanceId !== 'string') {
54
+ issues.push({ path: panel.id, message: 'Panel toolInstanceId must be a string or null.' });
55
+ }
56
+ if (panel.showFullscreenToggle !== undefined && typeof panel.showFullscreenToggle !== 'boolean') {
57
+ issues.push({ path: panel.id, message: 'Panel showFullscreenToggle must be a boolean when provided.' });
58
+ }
59
+ }
60
+ }
61
+ for (const split of listSplits(node)) {
62
+ if (splitIds.has(split.id)) {
63
+ issues.push({ path: split.id, message: 'Duplicate split id.' });
64
+ }
65
+ splitIds.add(split.id);
66
+ if (!isNormalizedSplitSizes(split.sizes)) {
67
+ issues.push({ path: split.id, message: 'Split sizes must be finite, clamped, and normalized.' });
68
+ }
69
+ }
70
+ return issues;
71
+ }
@@ -0,0 +1,9 @@
1
+ export interface PanelNode {
2
+ id: string;
3
+ /**
4
+ * Panels own their display title so layout snapshots stay serializable even when a tool definition changes later.
5
+ */
6
+ title: string;
7
+ toolInstanceId: string | null;
8
+ showFullscreenToggle?: boolean;
9
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,2 @@
1
+ /** Compatibility entry; canonical geometry belongs to the physics package. */
2
+ export type { PhysicsColliderProxy, PhysicsColliderProxyShape } from '@konitif/physics';
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,2 @@
1
+ /** Compatibility export from the physical domain owner. */
2
+ export type * from '@konitif/physics';
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,22 @@
1
+ /** Bidirectional coordinate/joint correspondence, not only display settings. */
2
+ export type PhysicsCoordinateFrame = 'viewer-y-up' | 'mujoco-z-up' | 'z-up' | 'custom';
3
+ export type PhysicsJointMappingMode = 'direct' | 'mimic' | 'fixed' | 'visual-only' | 'physics-only';
4
+ /** @deprecated Historical compatibility shape; source providers own authored correspondences. */
5
+ export interface PhysicsJointMapping {
6
+ mode: PhysicsJointMappingMode;
7
+ visualJointName?: string;
8
+ physicsJointName?: string;
9
+ sourceJointName?: string;
10
+ scale?: number;
11
+ sign?: number;
12
+ offset?: number;
13
+ lowerLimit?: number | null;
14
+ upperLimit?: number | null;
15
+ label?: string;
16
+ }
17
+ /** @deprecated Historical compatibility shape, not workspace authority. */
18
+ export interface PhysicsKinematicBinding {
19
+ coordinateFrame?: PhysicsCoordinateFrame | string;
20
+ sceneYawRadians?: number;
21
+ jointMappings?: PhysicsJointMapping[];
22
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,4 @@
1
+ /** Compatibility entry point. New internal boundaries can import their specific contract module. */
2
+ export type * from "./contracts.js";
3
+ export type * from "./visualAlignment.js";
4
+ export type * from "./mujoco.js";
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,5 @@
1
+ /** @deprecated Compatibility shape only. Module locations belong to the consuming MuJoCo adapter. */
2
+ export interface MujocoPhysicsInitOptions {
3
+ moduleUrl?: string;
4
+ moduleUrlCandidates?: string[];
5
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,2 @@
1
+ /** Compatibility entry; canonical observation scope belongs to physics. */
2
+ export type { PhysicsObservationProfile } from '@konitif/physics';
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,6 @@
1
+ /** @deprecated Historical visual binding shape. Source providers own these declarations. */
2
+ export interface PhysicsPresentationBinding {
3
+ visualRootBodyName?: string;
4
+ bodyVisualObjectNames?: Record<string, string[]>;
5
+ debugHiddenBodyNames?: string[];
6
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,2 @@
1
+ /** Compatibility entry; canonical simulation inputs belong to physics. */
2
+ export type { PhysicsSimulationProfile } from '@konitif/physics';
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,17 @@
1
+ import type { PhysicsPresentationBinding } from './presentationBinding.js';
2
+ import type { PhysicsKinematicBinding } from './kinematicBinding.js';
3
+ import type { PhysicsSimulationProfile } from './simulationProfile.js';
4
+ import type { PhysicsObservationProfile } from './observationProfile.js';
5
+ export type * from './presentationBinding.js';
6
+ export type * from './kinematicBinding.js';
7
+ export type * from './simulationProfile.js';
8
+ export type * from './observationProfile.js';
9
+ export type * from './colliderGeometry.js';
10
+ /**
11
+ * Legacy aggregate retained for source compatibility and existing metadata.
12
+ * The name is historical: these fields also affect commands and simulation.
13
+ * Runtime adapters retain their existing fallbacks (notably COM to visual root).
14
+ * @deprecated Historical source encoding; not a Workbench-owned model.
15
+ */
16
+ export interface PhysicsVisualAlignmentProfile extends PhysicsPresentationBinding, PhysicsKinematicBinding, PhysicsSimulationProfile, PhysicsObservationProfile {
17
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,12 @@
1
+ export declare const WORKBENCH_READING_LEVELS: readonly ["casual", "advanced", "expert"];
2
+ export declare const DEFAULT_WORKBENCH_READING_LEVEL: WorkbenchReadingLevel;
3
+ export type WorkbenchReadingLevel = (typeof WORKBENCH_READING_LEVELS)[number];
4
+ export interface WorkbenchReadingLevelPresentation {
5
+ /** Optional authored override of the inherited user preference. */
6
+ defaultLevel?: WorkbenchReadingLevel;
7
+ availableLevels?: readonly WorkbenchReadingLevel[];
8
+ }
9
+ export declare function isWorkbenchReadingLevel(value: unknown): value is WorkbenchReadingLevel;
10
+ export declare function normalizeWorkbenchReadingLevels(presentation: WorkbenchReadingLevelPresentation | null | undefined): WorkbenchReadingLevel[];
11
+ export declare function resolveWorkbenchReadingLevel(value: unknown, presentation: WorkbenchReadingLevelPresentation | null | undefined, inheritedDefault?: WorkbenchReadingLevel): WorkbenchReadingLevel;
12
+ export declare function isAudienceVisibleAtReadingLevel(audience: WorkbenchReadingLevel, readingLevel: WorkbenchReadingLevel): boolean;
@@ -0,0 +1,29 @@
1
+ export const WORKBENCH_READING_LEVELS = ['casual', 'advanced', 'expert'];
2
+ export const DEFAULT_WORKBENCH_READING_LEVEL = 'casual';
3
+ export function isWorkbenchReadingLevel(value) {
4
+ return typeof value === 'string' && WORKBENCH_READING_LEVELS.includes(value);
5
+ }
6
+ export function normalizeWorkbenchReadingLevels(presentation) {
7
+ if (!presentation)
8
+ return [];
9
+ const requested = presentation.availableLevels ?? WORKBENCH_READING_LEVELS;
10
+ const normalized = WORKBENCH_READING_LEVELS.filter((level) => requested.includes(level));
11
+ if (presentation.defaultLevel && !normalized.includes(presentation.defaultLevel)) {
12
+ normalized.push(presentation.defaultLevel);
13
+ normalized.sort((left, right) => WORKBENCH_READING_LEVELS.indexOf(left) - WORKBENCH_READING_LEVELS.indexOf(right));
14
+ }
15
+ return normalized;
16
+ }
17
+ export function resolveWorkbenchReadingLevel(value, presentation, inheritedDefault = DEFAULT_WORKBENCH_READING_LEVEL) {
18
+ const availableLevels = normalizeWorkbenchReadingLevels(presentation);
19
+ const requestedFallback = presentation?.defaultLevel ?? inheritedDefault;
20
+ const fallback = availableLevels.length === 0 || availableLevels.includes(requestedFallback)
21
+ ? requestedFallback
22
+ : availableLevels[0] ?? DEFAULT_WORKBENCH_READING_LEVEL;
23
+ return isWorkbenchReadingLevel(value) && (availableLevels.length === 0 || availableLevels.includes(value))
24
+ ? value
25
+ : fallback;
26
+ }
27
+ export function isAudienceVisibleAtReadingLevel(audience, readingLevel) {
28
+ return WORKBENCH_READING_LEVELS.indexOf(audience) <= WORKBENCH_READING_LEVELS.indexOf(readingLevel);
29
+ }
@@ -0,0 +1,55 @@
1
+ export type WorkbenchProjectTargetKind = 'app' | 'repository';
2
+ export type WorkbenchProjectLaunchProfileKind = 'core-only' | 'repo-inspect-only' | 'app-safe-mode' | 'app-full-runtime' | 'sandbox-runtime' | 'recovery-mode';
3
+ export interface WorkbenchProjectRepository {
4
+ id: string;
5
+ label: string;
6
+ root: string;
7
+ defaultLaunchProfileId?: string | null;
8
+ }
9
+ export interface WorkbenchProjectApp {
10
+ id: string;
11
+ label: string;
12
+ root: string;
13
+ repositoryId?: string | null;
14
+ defaultLaunchProfileId?: string | null;
15
+ faviconDataUrl?: string | null;
16
+ }
17
+ export interface WorkbenchProjectLaunchProfile {
18
+ id: string;
19
+ label: string;
20
+ kind: WorkbenchProjectLaunchProfileKind;
21
+ targetKind: WorkbenchProjectTargetKind | 'self';
22
+ defaultFor?: WorkbenchProjectTargetKind | 'self' | null;
23
+ inspectOnly: boolean;
24
+ safeMode: boolean;
25
+ }
26
+ export interface WorkbenchProjectPolicies {
27
+ allowLocalRepositories: boolean;
28
+ allowSandboxRepositories: boolean;
29
+ requirePreflight: boolean;
30
+ }
31
+ export interface WorkbenchProjectObservabilityPreferences {
32
+ quality: 'off' | 'low' | 'medium' | 'high';
33
+ persistSnapshots: boolean;
34
+ captureStackTraces: boolean;
35
+ }
36
+ export interface WorkbenchProjectRecentSession {
37
+ id: string;
38
+ targetId: string;
39
+ targetKind: WorkbenchProjectTargetKind | 'self';
40
+ profileId: string;
41
+ updatedAt: string;
42
+ }
43
+ export interface WorkbenchProjectManifest {
44
+ id: string;
45
+ label: string;
46
+ version: 1;
47
+ apps: WorkbenchProjectApp[];
48
+ repositories: WorkbenchProjectRepository[];
49
+ launchProfiles: WorkbenchProjectLaunchProfile[];
50
+ policies: WorkbenchProjectPolicies;
51
+ recentSessions: WorkbenchProjectRecentSession[];
52
+ observability: WorkbenchProjectObservabilityPreferences;
53
+ createdAt: string;
54
+ updatedAt: string;
55
+ }
@@ -0,0 +1 @@
1
+ export {};