@mica-js/editor 0.9.3 → 0.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -125,6 +125,9 @@ declare type FusedResolvedPresentationProps = Readonly<Record<string, string | n
125
125
  /** Session status the host mirrors; `idle` means no models are mounted (edit mode). */
126
126
  export declare type FusedSessionStatus = 'idle' | 'paused' | 'running' | 'faulted' | 'disposed';
127
127
 
128
+ /** Wall-clock pacing of continuous simulation in the editor worker. */
129
+ export declare type FusedSimulationPacing = 'realtime' | 'unlimited';
130
+
128
131
  /** Wire name of the simulation guest. */
129
132
  export declare const fusedSimulationService: RpcServiceId<IFusedSimulationService>;
130
133
 
@@ -376,6 +379,7 @@ export declare interface IFusedLoadRequest {
376
379
  readonly document: FusedDocument;
377
380
  /** Fixed positive step of every advance, in picoseconds. */
378
381
  readonly step: TimePs;
382
+ readonly simulationPacing?: FusedSimulationPacing;
379
383
  /** Explicit simulator batch-execution switch; omitted uses the board default. */
380
384
  readonly batchExecution?: boolean;
381
385
  }
@@ -515,6 +519,8 @@ export declare interface IFusedRuntimeOptions {
515
519
  readonly registry: DeviceRegistry;
516
520
  /** Fixed positive step of every advance, in picoseconds. */
517
521
  readonly step: TimePs;
522
+ /** Pacing of continuous run sessions. Defaults to `unlimited`. */
523
+ readonly simulationPacing?: FusedSimulationPacing;
518
524
  /** Explicit simulator batch-execution switch; omitted uses the board default and is kept across reset. */
519
525
  readonly batchExecution?: boolean;
520
526
  /** Presentation mode prepared on creation; defaults to `edit`. */
@@ -1,3 +1,3 @@
1
1
  import { c as toWireFailure, i as isFusedBridgeError, n as FusedBridgeError, o as mapWireFailure, r as fromWireFailure, t as FUSED_WIRE_FAILURE } from "./wire-BDHL5Aj9.js";
2
- import { _ as fusedModelSinkService, a as createFusedRuntime, c as createModelEventRouter, d as createHostPackageGateway, f as packageLockKey, g as fusedModelChannelService, h as fusedHostResourceService, i as startFusedSimulationGuest, l as createFusedDisplay, m as fusedHostPackageService, n as startFusedDisplayGuest, o as createHostModelRouter, p as fusedDisplayService, r as createViewSession, s as channelKey, t as loadFusedWorkerFactories, u as connectFusedWorkbench, v as fusedSimulationService } from "./runtime-D8j9rxno.js";
2
+ import { _ as fusedModelSinkService, a as createFusedRuntime, c as createModelEventRouter, d as createHostPackageGateway, f as packageLockKey, g as fusedModelChannelService, h as fusedHostResourceService, i as startFusedSimulationGuest, l as createFusedDisplay, m as fusedHostPackageService, n as startFusedDisplayGuest, o as createHostModelRouter, p as fusedDisplayService, r as createViewSession, s as channelKey, t as loadFusedWorkerFactories, u as connectFusedWorkbench, v as fusedSimulationService } from "./runtime-BrGlkcGO.js";
3
3
  export { FUSED_WIRE_FAILURE, FusedBridgeError, channelKey, connectFusedWorkbench, createFusedDisplay, createFusedRuntime, createHostModelRouter, createHostPackageGateway, createModelEventRouter, createViewSession, fromWireFailure, fusedDisplayService, fusedHostPackageService, fusedHostResourceService, fusedModelChannelService, fusedModelSinkService, fusedSimulationService, isFusedBridgeError, loadFusedWorkerFactories, mapWireFailure, packageLockKey, startFusedDisplayGuest, startFusedSimulationGuest, toWireFailure };
package/dist/fused.d.ts CHANGED
@@ -109,6 +109,9 @@ declare type FusedPresentationValue = string | number | boolean | null | Uint8Ar
109
109
  /** Session status the host mirrors; `idle` means no models are mounted (edit mode). */
110
110
  declare type FusedSessionStatus = 'idle' | 'paused' | 'running' | 'faulted' | 'disposed';
111
111
 
112
+ /** Wall-clock pacing of continuous simulation in the editor worker. */
113
+ export declare type FusedSimulationPacing = 'realtime' | 'unlimited';
114
+
112
115
  export declare interface IAssetInfo {
113
116
  readonly id: string;
114
117
  /** File name including its extension; used to identify program formats. */
@@ -515,6 +518,8 @@ export declare interface IWorkbenchOptions {
515
518
  readonly theme?: WorkbenchTheme;
516
519
  readonly readOnly?: boolean;
517
520
  readonly step?: TimePs;
521
+ /** Defaults to `realtime`, targeting one second of simulation per elapsed wall-clock second. */
522
+ readonly simulationPacing?: FusedSimulationPacing;
518
523
  /**
519
524
  * Overlay extent of one instance; defaults to its geometry bounds at one pixel per local unit.
520
525
  *
package/dist/fused.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { c as planPolylineSegmentDrag, n as orthogonalWaypoints, t as extendWirePath } from "./wire-JZIiIOI0.js";
2
2
  import { Q as isHtmlViewError, _ as resolveTheme, a as createHtmlViewHost, f as WORKBENCH_DARK_COLORS, g as readCanvasTheme, h as normalizeTheme, m as WORKBENCH_THEME_CSS_VARIABLES, p as WORKBENCH_LIGHT_COLORS, v as themeStyle } from "./html-HXwZq1my.js";
3
- import { a as createFusedRuntime } from "./runtime-D8j9rxno.js";
3
+ import { a as createFusedRuntime } from "./runtime-BrGlkcGO.js";
4
4
  import { DisposableStore, Emitter } from "@mica-js/core/lifecycle";
5
5
  import { projectOnSegment } from "@mica-js/document/schematic";
6
6
  import { timePs } from "@mica-js/core";
@@ -6482,6 +6482,7 @@ async function createWorkbench(options) {
6482
6482
  document,
6483
6483
  registry: options.deviceProvider,
6484
6484
  step,
6485
+ simulationPacing: options.simulationPacing ?? "realtime",
6485
6486
  mode: targetMode,
6486
6487
  container: environment,
6487
6488
  ...options.programs === void 0 ? {} : { programs: options.programs },