@statelyai/sdk 0.37.4 → 0.38.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/README.md CHANGED
@@ -90,6 +90,15 @@ Use `viewMode: 'list'` on `createStatelyEmbed` to add `?view=list` to the
90
90
  iframe URL, or subscribe to `viewModeChanged` when the user switches views.
91
91
  Pass the initial `theme` or `settings.appearance.colorMode` when creating the
92
92
  embed so its loading screen uses that color mode before initialization.
93
+ The default is dark, matching the editor. Attached and mounted iframes use the
94
+ same color scheme while their document loads; `setTheme` and appearance settings
95
+ also update that frame surface.
96
+ If the initial theme is omitted, the SDK keeps the iframe hidden until the
97
+ machine loads or reports an error, so a theme supplied only to `init` cannot
98
+ flash the default theme. The surrounding host supplies the waiting surface.
99
+ Source conversion failures notify `onError` and reveal the editor's error screen.
100
+ Protocol incompatibility also restores the frame's visibility and reports the
101
+ failure to the host.
93
102
 
94
103
  Custom profiles and formats can be supplied when the embed is created. Their
95
104
  serializable manifests are sent to the iframe; detector, importer, exporter,
@@ -1,5 +1,4 @@
1
- import { Jt as UploadResult } from "./protocol-Dlo9C3lj.mjs";
2
-
1
+ import { Zt as UploadResult } from "./protocol-weYUfy3l.mjs";
3
2
  //#region src/assetStorage.d.ts
4
3
  interface AssetUploadContext {
5
4
  stateNodeId: string;
@@ -1,5 +1,6 @@
1
- import { dt as ProjectWorkspaceConfig, et as ProjectEmbedMachine, ln as PresentationMetadataInitializer, n as AuthenticationRecovery, un as EmbedPanelConfig } from "./protocol-Dlo9C3lj.mjs";
2
- import { a as MachineSourceLocations, t as EditorCapabilities } from "./editor-sync-types-U5uryWOk.mjs";
1
+ import { o as GraphPatch } from "./index-DfMkVP94.mjs";
2
+ import { fn as PresentationMetadataInitializer, mt as ProjectWorkspaceConfig, n as AuthenticationRecovery, pn as EmbedPanelConfig, rt as ProjectEmbedMachine } from "./protocol-weYUfy3l.mjs";
3
+ import { a as MachineSourceLocations, t as EditorCapabilities } from "./editor-sync-types-Ch5P5XRj.mjs";
3
4
 
4
5
  //#region src/editorHostProtocol.d.ts
5
6
  declare const EDITOR_PROTOCOL_VERSION = 1;
@@ -111,6 +112,9 @@ type EditorHostOutboundMessage = {
111
112
  capabilities?: EditorCapabilities;
112
113
  sourceLocations?: MachineSourceLocations;
113
114
  settings?: Record<string, unknown>;
115
+ chrome?: {
116
+ controls?: 'full' | 'minimal' | 'none';
117
+ };
114
118
  panels?: EmbedPanelConfig[]; /** @deprecated Use `panels`. */
115
119
  leftPanels?: string[]; /** @deprecated Use `panels`. */
116
120
  rightPanels?: string[]; /** @deprecated Use `panels[].initiallyOpen`. */
@@ -124,6 +128,7 @@ type EditorHostOutboundMessage = {
124
128
  machines: ProjectEmbedMachine[];
125
129
  chrome?: {
126
130
  header?: boolean;
131
+ controls?: 'full' | 'minimal' | 'none';
127
132
  };
128
133
  currentMachineId?: string;
129
134
  mode?: 'editing' | 'viewing';
@@ -167,6 +172,16 @@ type EditorHostOutboundMessage = {
167
172
  source?: 'presentation';
168
173
  machineId?: string;
169
174
  sourceLocations?: MachineSourceLocations;
175
+ patches?: GraphPatch[];
176
+ mode?: 'reconcile' | 'replace';
177
+ layout?: 'preserve' | 'auto';
178
+ fit?: boolean;
179
+ animate?: boolean;
180
+ } | {
181
+ type: '@statelyai.highlight';
182
+ ids: string[];
183
+ kind?: 'active' | 'divergence';
184
+ focus?: string[];
170
185
  } | {
171
186
  type: '@statelyai.saved';
172
187
  requestId?: string;
package/dist/embed.d.mts CHANGED
@@ -1,6 +1,6 @@
1
- import { n as ProfileManifest } from "./index-P3fyMvvk.mjs";
2
- import { i as StatelyGraph } from "./graph-C_G5qXKW.mjs";
3
- import { A as ExportFormatMap, C as EmbedExtensionsManifest, I as InitOptions, Jt as UploadResult, O as ExportCallOptions, Qt as ViewerOptions, T as EmbedMode, X as MachineVersionAutoSaveOptions, Y as MachineSourceLocations, _ as EmbedDocument, b as EmbedEventMap, ct as ProjectWorkspaceActionIcon, dn as EmbedPanelPosition, dt as ProjectWorkspaceConfig, et as ProjectEmbedMachine, f as CommentsConfig, ft as ProjectWorkspaceMachine, h as EditorCapabilities, ht as ProjectWorkspaceProject, i as CapabilityDeniedEvent, k as ExportFormat, nt as ProjectInitOptions, pt as ProjectWorkspaceMachineOrigin, q as MachineInitOptions, st as ProjectWorkspaceAction, un as EmbedPanelConfig, ut as ProjectWorkspaceCapabilities, v as EmbedDocumentLanguage, x as EmbedEventName, y as EmbedEventHandler } from "./protocol-Dlo9C3lj.mjs";
1
+ import { n as ProfileManifest, o as GraphPatch } from "./index-DfMkVP94.mjs";
2
+ import { i as StatelyGraph } from "./graph-C--idnZO.mjs";
3
+ import { $ as MachineVersionAutoSaveOptions, A as ExportFormat, E as EmbedMode, F as HostUpdateOptions, Q as MachineSourceLocations, S as EmbedEventName, X as MachineInitOptions, Zt as UploadResult, at as ProjectInitOptions, b as EmbedEventHandler, dt as ProjectWorkspaceActionIcon, f as CommentsConfig, gt as ProjectWorkspaceMachineOrigin, h as EditorCapabilities, ht as ProjectWorkspaceMachine, i as CapabilityDeniedEvent, j as ExportFormatMap, k as ExportCallOptions, mn as EmbedPanelPosition, mt as ProjectWorkspaceConfig, pn as EmbedPanelConfig, pt as ProjectWorkspaceCapabilities, rt as ProjectEmbedMachine, tn as ViewerOptions, ut as ProjectWorkspaceAction, v as EmbedDocument, vt as ProjectWorkspaceProject, w as EmbedExtensionsManifest, x as EmbedEventMap, y as EmbedDocumentLanguage, z as InitOptions } from "./protocol-weYUfy3l.mjs";
4
4
  import { AssetUploadAdapter } from "./assetStorage.mjs";
5
5
  import { GraphDiff } from "@statelyai/graph";
6
6
 
@@ -117,7 +117,7 @@ interface StatelyEmbedOptions extends Partial<MachineInitOptions> {
117
117
  * auto-sent on attach using these machines.
118
118
  */
119
119
  machines?: ProjectEmbedMachine[];
120
- /** Project mode only — optional project-level editor chrome. */
120
+ /** Editor UI around the canvas. `header` applies to project mode only. */
121
121
  chrome?: ProjectInitOptions['chrome'];
122
122
  /** Project mode only — initially selected machine id. */
123
123
  currentMachineId?: string;
@@ -156,7 +156,17 @@ interface StatelyEmbed {
156
156
  /** Send init message (queued if iframe not ready yet). */
157
157
  init(options: InitOptions): void;
158
158
  /** Update the machine (shorthand for update message). */
159
- updateMachine(machine: unknown, format?: string, sourceLocations?: MachineSourceLocations): void;
159
+ updateMachine(machine: unknown, format?: string, sourceLocations?: MachineSourceLocations, options?: HostUpdateOptions): void;
160
+ /** Apply patches to the current graph, with the same options as `updateMachine`. */
161
+ applyPatches(patches: GraphPatch[], options?: Omit<HostUpdateOptions, 'mode'>): void;
162
+ /**
163
+ * Highlight states or transitions by id, replacing the previous host highlight.
164
+ * An empty list clears it. `focus` moves the camera to keep those ids in view.
165
+ */
166
+ highlight(ids: string[], options?: {
167
+ kind?: 'active' | 'divergence';
168
+ focus?: string[];
169
+ }): void;
160
170
  /** Update the project machine list without re-creating the iframe. */
161
171
  updateProject(machines: ProjectEmbedMachine[], currentMachineId?: string, commentsByMachineId?: Record<string, CommentsConfig>, projectOptions?: {
162
172
  projectWorkspace?: ProjectWorkspaceConfig;
package/dist/embed.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  import "./protocol-M3Zeun3o.mjs";
2
- import { c as createPendingExportManager, l as settingsWithViewMode, r as createPostMessageTransport, s as createEventRegistry, t as SDK_VERSION, u as toInitMessage } from "./version-BeGmL5w7.mjs";
2
+ import { c as createPendingExportManager, l as settingsWithViewMode, r as createPostMessageTransport, s as createEventRegistry, t as SDK_VERSION, u as toInitMessage } from "./version-IE72VxaP.mjs";
3
3
  import { EDITOR_PROTOCOL_VERSION } from "./editorHostProtocol.mjs";
4
4
 
5
5
  //#region src/embed.ts
@@ -36,7 +36,7 @@ function buildEmbedUrl(options) {
36
36
  if (options.viewMode) url.searchParams.set("view", options.viewMode);
37
37
  const appearance = options.settings?.appearance;
38
38
  const settingsMode = appearance && typeof appearance === "object" && "colorMode" in appearance ? appearance.colorMode : void 0;
39
- const colorMode = options.theme ?? settingsMode;
39
+ const colorMode = options.theme ?? settingsMode ?? "dark";
40
40
  if (colorMode === "light" || colorMode === "dark" || colorMode === "system") url.searchParams.set("theme", colorMode);
41
41
  return url.toString();
42
42
  }
@@ -115,6 +115,7 @@ function extractInitOptions(options) {
115
115
  panels: options.panels,
116
116
  comments: options.comments,
117
117
  sourceLocations: options.sourceLocations,
118
+ chrome: options.chrome?.controls ? { controls: options.chrome.controls } : void 0,
118
119
  settings: settingsWithViewMode(options),
119
120
  unsavedIndicator: options.unsavedIndicator,
120
121
  versionAutoSave: options.versionAutoSave
@@ -125,6 +126,7 @@ function createStatelyEmbed(options) {
125
126
  const embedUrl = buildEmbedUrl(options);
126
127
  const targetOrigin = options.origin ?? new URL(embedUrl).origin;
127
128
  let iframe = null;
129
+ let restoreIframeVisibility;
128
130
  let transport = null;
129
131
  let ownedIframe = false;
130
132
  let sourceUpdateBaseline;
@@ -237,6 +239,8 @@ function createStatelyEmbed(options) {
237
239
  if (ready.protocolVersion !== void 0) {
238
240
  if (ready.protocolVersion !== EDITOR_PROTOCOL_VERSION) {
239
241
  editorProtocolCompatible = false;
242
+ restoreIframeVisibility?.();
243
+ restoreIframeVisibility = void 0;
240
244
  const error = {
241
245
  code: "unsupported_protocol",
242
246
  message: `Editor protocol ${ready.protocolVersion} is unsupported; this SDK supports ${EDITOR_PROTOCOL_VERSION}.`
@@ -268,6 +272,8 @@ function createStatelyEmbed(options) {
268
272
  break;
269
273
  }
270
274
  case "@statelyai.loaded": {
275
+ restoreIframeVisibility?.();
276
+ restoreIframeVisibility = void 0;
271
277
  const loaded = data;
272
278
  sourceUpdateBaseline = structuredClone(loaded.graph);
273
279
  options.onLoaded?.(loaded.graph);
@@ -373,6 +379,8 @@ function createStatelyEmbed(options) {
373
379
  break;
374
380
  }
375
381
  case "@statelyai.error": {
382
+ restoreIframeVisibility?.();
383
+ restoreIframeVisibility = void 0;
376
384
  const error = data;
377
385
  const err = {
378
386
  code: error.code,
@@ -450,6 +458,23 @@ function createStatelyEmbed(options) {
450
458
  flush();
451
459
  });
452
460
  }
461
+ function applyIframeColorMode(el, mode) {
462
+ el.style.colorScheme = mode === "system" ? "light dark" : mode;
463
+ el.style.backgroundColor = "light-dark(#eff1f3, #15151d)";
464
+ }
465
+ function prepareIframe(el) {
466
+ restoreIframeVisibility?.();
467
+ restoreIframeVisibility = void 0;
468
+ applyIframeColorMode(el, new URL(embedUrl).searchParams.get("theme") ?? "dark");
469
+ const explicitMode = options.theme ?? (options.settings?.appearance)?.colorMode;
470
+ if (explicitMode !== "light" && explicitMode !== "dark" && explicitMode !== "system") {
471
+ const previous = el.style.visibility;
472
+ el.style.visibility = "hidden";
473
+ restoreIframeVisibility = () => {
474
+ el.style.visibility = previous;
475
+ };
476
+ }
477
+ }
453
478
  const embed = {
454
479
  attach(el) {
455
480
  if (destroyed) return;
@@ -460,16 +485,19 @@ function createStatelyEmbed(options) {
460
485
  });
461
486
  iframe = el;
462
487
  ownedIframe = false;
488
+ prepareIframe(el);
463
489
  el.src = embedUrl;
464
490
  setupTransport(el);
465
491
  },
466
492
  mount(container) {
467
493
  if (destroyed) throw new Error("Embed is destroyed");
468
494
  const el = document.createElement("iframe");
495
+ prepareIframe(el);
469
496
  el.src = embedUrl;
470
497
  el.style.border = "none";
471
498
  el.style.width = "100%";
472
499
  el.style.height = "100%";
500
+ el.style.display = "block";
473
501
  el.setAttribute("sandbox", "allow-scripts allow-same-origin allow-forms allow-popups allow-popups-to-escape-sandbox");
474
502
  el.setAttribute("allow", "clipboard-read; clipboard-write");
475
503
  container.appendChild(el);
@@ -483,17 +511,36 @@ function createStatelyEmbed(options) {
483
511
  sendApiKey();
484
512
  },
485
513
  init(opts) {
514
+ const colorMode = opts.theme ?? (opts.settings?.appearance)?.colorMode;
515
+ if (iframe && (colorMode === "light" || colorMode === "dark" || colorMode === "system")) applyIframeColorMode(iframe, colorMode);
486
516
  send(toInitMessage("machine" in opts ? {
487
517
  ...opts,
488
518
  extensions: opts.extensions ?? bundledExtensions
489
519
  } : opts));
490
520
  },
491
- updateMachine(machine, format, sourceLocations) {
521
+ updateMachine(machine, format, sourceLocations, options) {
492
522
  send({
493
523
  type: "@statelyai.update",
494
524
  machine,
495
525
  format,
496
- sourceLocations
526
+ sourceLocations,
527
+ ...options
528
+ });
529
+ },
530
+ applyPatches(patches, options) {
531
+ send({
532
+ type: "@statelyai.update",
533
+ machine: void 0,
534
+ patches,
535
+ ...options
536
+ });
537
+ },
538
+ highlight(ids, options) {
539
+ send({
540
+ type: "@statelyai.highlight",
541
+ ids,
542
+ ...options?.kind ? { kind: options.kind } : {},
543
+ ...options?.focus?.length ? { focus: options.focus } : {}
497
544
  });
498
545
  },
499
546
  updateProject(machines, currentMachineId, commentsByMachineId, projectOptions) {
@@ -525,12 +572,15 @@ function createStatelyEmbed(options) {
525
572
  });
526
573
  },
527
574
  setTheme(theme) {
575
+ if (iframe) applyIframeColorMode(iframe, theme);
528
576
  send({
529
577
  type: "@statelyai.setTheme",
530
578
  theme
531
579
  });
532
580
  },
533
581
  setSettings(settings) {
582
+ const mode = settings.appearance?.colorMode;
583
+ if (iframe && (mode === "light" || mode === "dark" || mode === "system")) applyIframeColorMode(iframe, mode);
534
584
  send({
535
585
  type: "@statelyai.setSettings",
536
586
  settings
@@ -588,6 +638,8 @@ function createStatelyEmbed(options) {
588
638
  exportManager.clear("Embed destroyed");
589
639
  events.clear();
590
640
  pendingMessages.length = 0;
641
+ restoreIframeVisibility?.();
642
+ restoreIframeVisibility = void 0;
591
643
  if (ownedIframe && iframe) iframe.remove();
592
644
  iframe = null;
593
645
  }
@@ -1,4 +1,4 @@
1
- import { t as CodeExpression } from "./index-P3fyMvvk.mjs";
1
+ import { t as CodeExpression } from "./index-DfMkVP94.mjs";
2
2
  import * as _statelyai_graph0 from "@statelyai/graph";
3
3
  import { Graph } from "@statelyai/graph";
4
4
 
package/dist/graph.d.mts CHANGED
@@ -1,2 +1,2 @@
1
- import { _ as studioMachineConverter, a as StatelyGraphData, c as StatelyInvoke, d as StudioAction, f as StudioEdge, g as fromStudioMachine, h as StudioNode, i as StatelyGraph, l as StatelyNodeData, m as StudioMachine, n as StatelyActorImplementation, o as StatelyGuard, p as StudioEventTypeData, r as StatelyEdgeData, s as StatelyImplementation, t as StatelyAction, u as StatelyTagImplementation, v as toStudioMachine } from "./graph-C_G5qXKW.mjs";
1
+ import { _ as studioMachineConverter, a as StatelyGraphData, c as StatelyInvoke, d as StudioAction, f as StudioEdge, g as fromStudioMachine, h as StudioNode, i as StatelyGraph, l as StatelyNodeData, m as StudioMachine, n as StatelyActorImplementation, o as StatelyGuard, p as StudioEventTypeData, r as StatelyEdgeData, s as StatelyImplementation, t as StatelyAction, u as StatelyTagImplementation, v as toStudioMachine } from "./graph-C--idnZO.mjs";
2
2
  export { StatelyAction, StatelyActorImplementation, StatelyEdgeData, StatelyGraph, StatelyGraphData, StatelyGuard, StatelyImplementation, StatelyInvoke, StatelyNodeData, StatelyTagImplementation, StudioAction, StudioEdge, StudioEventTypeData, StudioMachine, StudioNode, fromStudioMachine, studioMachineConverter, toStudioMachine };
@@ -2558,7 +2558,7 @@ declare global {
2558
2558
  }
2559
2559
  }
2560
2560
  //#endregion
2561
- //#region ../../node_modules/.pnpm/xstate@6.0.0-alpha.64/node_modules/xstate/dist/declarations/src/base.types.d.ts
2561
+ //#region ../../node_modules/.pnpm/xstate@6.0.0-alpha.65/node_modules/xstate/dist/declarations/src/base.types.d.ts
2562
2562
  declare global {
2563
2563
  interface SymbolConstructor {
2564
2564
  readonly observable: symbol;
package/dist/index.d.mts CHANGED
@@ -1,13 +1,13 @@
1
1
  import { StatelyApiClientOptions, StatelyApiError, StatelyApiUrlOptions, createStatelyApiClient, createStatelyApiUrl } from "./api.mjs";
2
- import { o as GraphPatch, r as ActionLocation } from "./index-P3fyMvvk.mjs";
3
- import { C as EventTypeData, S as DigraphNodeConfig, _ as studioMachineConverter, a as StatelyGraphData, b as DigraphConfig, c as StatelyInvoke, d as StudioAction, f as StudioEdge, g as fromStudioMachine, h as StudioNode, i as StatelyGraph, l as StatelyNodeData, m as StudioMachine, o as StatelyGuard, r as StatelyEdgeData, t as StatelyAction, v as toStudioMachine, w as StateNodeJSONData, x as DigraphEdgeConfig, y as DigraphAction } from "./graph-C_G5qXKW.mjs";
4
- import { A as ExportFormatMap, H as InspectionTakenTransition, I as InitOptions, Jt as UploadResult, N as INSPECTION_PROTOCOL_VERSION, O as ExportCallOptions, P as INSPECTION_ROOM_QUERY_PARAM, Qt as ViewerOptions, R as InspectionAction, S as EmbedExample, T as EmbedMode, U as InspectorLoadedEvent, V as InspectionSentEvent, W as InspectorSettings, X as MachineVersionAutoSaveOptions, _ as EmbedDocument, an as isEmbedExampleMachine, b as EmbedEventMap, cn as resolveInspectorSettings, ct as ProjectWorkspaceActionIcon, dn as EmbedPanelPosition, dt as ProjectWorkspaceConfig, en as assertEmbedExamples, et as ProjectEmbedMachine, f as CommentsConfig, ft as ProjectWorkspaceMachine, h as EditorCapabilities, ht as ProjectWorkspaceProject, i as CapabilityDeniedEvent, in as isEmbedExample, k as ExportFormat, ln as PresentationMetadataInitializer, m as EMBED_DOCUMENT_LIMITS, nn as createInspectionRoomUrls, p as EMBED_DOCUMENT_LANGUAGES, pt as ProjectWorkspaceMachineOrigin, r as CapabilityDeniedCapability, rn as getInspectionRoomId, sn as mergeInspectorSettings, st as ProjectWorkspaceAction, tn as createInspectionActorId, un as EmbedPanelConfig, ut as ProjectWorkspaceCapabilities, v as EmbedDocumentLanguage, x as EmbedEventName, y as EmbedEventHandler } from "./protocol-Dlo9C3lj.mjs";
2
+ import { o as GraphPatch, r as ActionLocation } from "./index-DfMkVP94.mjs";
3
+ import { C as EventTypeData, S as DigraphNodeConfig, _ as studioMachineConverter, a as StatelyGraphData, b as DigraphConfig, c as StatelyInvoke, d as StudioAction, f as StudioEdge, g as fromStudioMachine, h as StudioNode, i as StatelyGraph, l as StatelyNodeData, m as StudioMachine, o as StatelyGuard, r as StatelyEdgeData, t as StatelyAction, v as toStudioMachine, w as StateNodeJSONData, x as DigraphEdgeConfig, y as DigraphAction } from "./graph-C--idnZO.mjs";
4
+ import { $ as MachineVersionAutoSaveOptions, A as ExportFormat, C as EmbedExample, E as EmbedMode, F as HostUpdateOptions, G as InspectionTakenTransition, I as INSPECTION_PROTOCOL_VERSION, K as InspectorLoadedEvent, L as INSPECTION_ROOM_QUERY_PARAM, S as EmbedEventName, V as InspectionAction, W as InspectionSentEvent, Zt as UploadResult, _ as EmbedChromeOptions, an as createInspectionRoomUrls, b as EmbedEventHandler, cn as isEmbedExampleMachine, dn as resolveInspectorSettings, dt as ProjectWorkspaceActionIcon, f as CommentsConfig, fn as PresentationMetadataInitializer, gt as ProjectWorkspaceMachineOrigin, h as EditorCapabilities, ht as ProjectWorkspaceMachine, i as CapabilityDeniedEvent, in as createInspectionActorId, j as ExportFormatMap, k as ExportCallOptions, m as EMBED_DOCUMENT_LIMITS, mn as EmbedPanelPosition, mt as ProjectWorkspaceConfig, on as getInspectionRoomId, p as EMBED_DOCUMENT_LANGUAGES, pn as EmbedPanelConfig, pt as ProjectWorkspaceCapabilities, q as InspectorSettings, r as CapabilityDeniedCapability, rn as assertEmbedExamples, rt as ProjectEmbedMachine, sn as isEmbedExample, tn as ViewerOptions, un as mergeInspectorSettings, ut as ProjectWorkspaceAction, v as EmbedDocument, vt as ProjectWorkspaceProject, x as EmbedEventMap, y as EmbedDocumentLanguage, z as InitOptions } from "./protocol-weYUfy3l.mjs";
5
5
  import { AssetUploadAdapter, AssetUploadContext, AssetUploadRequest, CreateS3AssetUploadAdapterOptions, CreateSupabaseAssetUploadAdapterOptions, S3UploadTarget, SupabaseStorageClient, createS3AssetUploadAdapter, createSupabaseAssetUploadAdapter } from "./assetStorage.mjs";
6
6
  import { StatelyAuthMode, StatelyCredential, createAuthorizationHeader, getCredentialToken } from "./auth.mjs";
7
7
  import { EDITOR_PROTOCOL_VERSION, EditorHostDiagnostic, EditorHostExportFormat, EditorHostInboundMessage, EditorHostInitOptions, EditorHostOutboundMessage, EditorHostValidationIssue } from "./editorHostProtocol.mjs";
8
8
  import { AssetConfig, EmbedEntity, EmbedFormatContext, EmbedFormatDefinition, EmbedGraph, EmbedProfileDefinition, PlanSourceUpdateInput, SourceUpdateEdit, SourceUpdatePlan, StatelyEmbed, StatelyEmbedOptions, createStatelyEmbed } from "./embed.mjs";
9
- import { _ as createWebSocketTransport, a as InspectedTransition, c as InspectorDiscoveryEntry, d as ManualActorOptions, f as createInspector, g as createPostMessageTransport, h as TransportFailure, i as InspectedSnapshot, l as InspectorEvents, m as Transport, n as CreateInspectorOptions, o as Inspector, p as createStatelyInspector, r as InspectedEvent, s as InspectorConnection, t as AdoptedActor, u as InspectorInspectionEvent } from "./inspect-ChP5FD65.mjs";
10
- import { A as Machine, C as StudioMachineRecord, D as VerifyApiKeyResponse, E as UpdateProjectInput, F as ProjectVisibility, I as VerifyResult, L as XStateVersion, M as Project, N as ProjectMachineSummary, O as createStatelyClient, P as ProjectSummary, R as ResourceErrorCode, S as StudioClientOptions, T as UpdateMachineInput, _ as ProjectMachine, a as CreateMachineTemplate, b as StudioApiErrorOptions, c as EnsureProjectInput, d as ExtractedMachine, f as GetMachineOptions, g as ProjectData, h as LegacyUpdateMachineInput, i as CreateMachineInput, j as MachineVersion, k as ExtractedMachines, l as ExtractMachinesInput, m as LegacyProjectVisibility, n as CreateMachineFromDefinitionInput, o as CreateProjectInput, r as CreateMachineFromTemplateInput, s as DEFAULT_STATELY_BASE_URL, t as ConnectedRepo, u as ExtractMachinesResponse, v as RepoType, w as StudioRequestOptions, x as StudioClient, y as StudioApiError } from "./studio-WmN72ERY.mjs";
9
+ import { _ as createWebSocketTransport, a as InspectedTransition, c as InspectorDiscoveryEntry, d as ManualActorOptions, f as createInspector, g as createPostMessageTransport, h as TransportFailure, i as InspectedSnapshot, l as InspectorEvents, m as Transport, n as CreateInspectorOptions, o as Inspector, p as createStatelyInspector, r as InspectedEvent, s as InspectorConnection, t as AdoptedActor, u as InspectorInspectionEvent } from "./inspect-BEboOFmE.mjs";
10
+ import { A as Machine, C as StudioMachineRecord, D as VerifyApiKeyResponse, E as UpdateProjectInput, F as ProjectVisibility, I as VerifyResult, L as XStateVersion, M as Project, N as ProjectMachineSummary, O as createStatelyClient, P as ProjectSummary, R as ResourceErrorCode, S as StudioClientOptions, T as UpdateMachineInput, _ as ProjectMachine, a as CreateMachineTemplate, b as StudioApiErrorOptions, c as EnsureProjectInput, d as ExtractedMachine, f as GetMachineOptions, g as ProjectData, h as LegacyUpdateMachineInput, i as CreateMachineInput, j as MachineVersion, k as ExtractedMachines, l as ExtractMachinesInput, m as LegacyProjectVisibility, n as CreateMachineFromDefinitionInput, o as CreateProjectInput, r as CreateMachineFromTemplateInput, s as DEFAULT_STATELY_BASE_URL, t as ConnectedRepo, u as ExtractMachinesResponse, v as RepoType, w as StudioRequestOptions, x as StudioClient, y as StudioApiError } from "./studio-DSwp5rXP.mjs";
11
11
  import { OAuthAuthorizationServerMetadata, OAuthClientRegistrationResponse, OAuthProtectedResourceMetadata, OAuthTokenResponse, PkcePair, buildAuthorizeUrl, createPkcePair, discoverAuthorizationServer, discoverProtectedResource, exchangeCodeForToken, refreshToken, registerOAuthClient } from "./oauth.mjs";
12
12
  import { CreateInspectionRelayOptions, InspectionRelay, InspectionRelayEffect, InspectionRelayPeer, InspectionRelayRole, InspectionRelaySnapshot, createInspectionRelay } from "./relay.mjs";
13
- export { type ActionLocation, type AdoptedActor, type AssetConfig, type AssetUploadAdapter, type AssetUploadContext, type AssetUploadRequest, type CapabilityDeniedCapability, type CapabilityDeniedEvent, type CommentsConfig, type ConnectedRepo, type CreateInspectionRelayOptions, type CreateInspectorOptions, type CreateMachineFromDefinitionInput, type CreateMachineFromTemplateInput, type CreateMachineInput, type CreateMachineTemplate, type CreateProjectInput, type CreateS3AssetUploadAdapterOptions, type CreateSupabaseAssetUploadAdapterOptions, DEFAULT_STATELY_BASE_URL, type DigraphAction, type DigraphConfig, type DigraphEdgeConfig, type DigraphNodeConfig, EDITOR_PROTOCOL_VERSION, EMBED_DOCUMENT_LANGUAGES, EMBED_DOCUMENT_LIMITS, type EditorCapabilities, type EditorHostDiagnostic, type EditorHostExportFormat, type EditorHostInboundMessage, type EditorHostInitOptions, type EditorHostOutboundMessage, type EditorHostValidationIssue, type EmbedDocument, type EmbedDocumentLanguage, type EmbedEntity, type EmbedEventHandler, type EmbedEventMap, type EmbedEventName, type EmbedExample, type EmbedFormatContext, type EmbedFormatDefinition, type EmbedGraph, type EmbedMode, type EmbedPanelConfig, type EmbedPanelPosition, type EmbedProfileDefinition, type EnsureProjectInput, type EventTypeData, type ExportCallOptions, type ExportFormat, type ExportFormatMap, type ExtractMachinesInput, type ExtractMachinesResponse, type ExtractedMachine, type ExtractedMachines, type GetMachineOptions, type GraphPatch, INSPECTION_PROTOCOL_VERSION, INSPECTION_ROOM_QUERY_PARAM, type InitOptions, type InspectedEvent, type InspectedSnapshot, type InspectedTransition, type InspectionAction, type InspectionRelay, type InspectionRelayEffect, type InspectionRelayPeer, type InspectionRelayRole, type InspectionRelaySnapshot, type InspectionSentEvent, type InspectionTakenTransition, type Inspector, type InspectorConnection, type InspectorDiscoveryEntry, type InspectorEvents, type InspectorInspectionEvent, type InspectorLoadedEvent, type InspectorSettings, type LegacyProjectVisibility, type LegacyUpdateMachineInput, type Machine, type MachineVersion, type MachineVersionAutoSaveOptions, type ManualActorOptions, type OAuthAuthorizationServerMetadata, type OAuthClientRegistrationResponse, type OAuthProtectedResourceMetadata, type OAuthTokenResponse, type PkcePair, type PlanSourceUpdateInput, type PresentationMetadataInitializer, type Project, type ProjectData, type ProjectEmbedMachine, type ProjectMachine, type ProjectMachineSummary, type ProjectSummary, type ProjectVisibility, type ProjectWorkspaceAction, type ProjectWorkspaceActionIcon, type ProjectWorkspaceCapabilities, type ProjectWorkspaceConfig, type ProjectWorkspaceMachine, type ProjectWorkspaceMachineOrigin, type ProjectWorkspaceProject, type RepoType, type ResourceErrorCode, type S3UploadTarget, type SourceUpdateEdit, type SourceUpdatePlan, type StateNodeJSONData, type StatelyAction, type StatelyApiClientOptions, StatelyApiError, type StatelyApiUrlOptions, type StatelyAuthMode, type StatelyCredential, type StatelyEdgeData, type StatelyEmbed, type StatelyEmbedOptions, type StatelyGraph, type StatelyGraphData, type StatelyGuard, type StatelyInvoke, type StatelyNodeData, type StudioAction, StudioApiError, type StudioApiErrorOptions, type StudioClient, type StudioClientOptions, type StudioEdge, type StudioMachine, type StudioMachineRecord, type StudioNode, type StudioRequestOptions, type SupabaseStorageClient, type Transport, type TransportFailure, type UpdateMachineInput, type UpdateProjectInput, type UploadResult, type VerifyApiKeyResponse, type VerifyResult, type ViewerOptions, type XStateVersion, assertEmbedExamples, buildAuthorizeUrl, createAuthorizationHeader, createInspectionActorId, createInspectionRelay, createInspectionRoomUrls, createInspector, createPkcePair, createPostMessageTransport, createS3AssetUploadAdapter, createStatelyApiClient, createStatelyApiUrl, createStatelyClient, createStatelyEmbed, createStatelyInspector, createSupabaseAssetUploadAdapter, createWebSocketTransport, discoverAuthorizationServer, discoverProtectedResource, exchangeCodeForToken, fromStudioMachine, getCredentialToken, getInspectionRoomId, isEmbedExample, isEmbedExampleMachine, mergeInspectorSettings, refreshToken, registerOAuthClient, resolveInspectorSettings, studioMachineConverter, toStudioMachine };
13
+ export { type ActionLocation, type AdoptedActor, type AssetConfig, type AssetUploadAdapter, type AssetUploadContext, type AssetUploadRequest, type CapabilityDeniedCapability, type CapabilityDeniedEvent, type CommentsConfig, type ConnectedRepo, type CreateInspectionRelayOptions, type CreateInspectorOptions, type CreateMachineFromDefinitionInput, type CreateMachineFromTemplateInput, type CreateMachineInput, type CreateMachineTemplate, type CreateProjectInput, type CreateS3AssetUploadAdapterOptions, type CreateSupabaseAssetUploadAdapterOptions, DEFAULT_STATELY_BASE_URL, type DigraphAction, type DigraphConfig, type DigraphEdgeConfig, type DigraphNodeConfig, EDITOR_PROTOCOL_VERSION, EMBED_DOCUMENT_LANGUAGES, EMBED_DOCUMENT_LIMITS, type EditorCapabilities, type EditorHostDiagnostic, type EditorHostExportFormat, type EditorHostInboundMessage, type EditorHostInitOptions, type EditorHostOutboundMessage, type EditorHostValidationIssue, type EmbedChromeOptions, type EmbedDocument, type EmbedDocumentLanguage, type EmbedEntity, type EmbedEventHandler, type EmbedEventMap, type EmbedEventName, type EmbedExample, type EmbedFormatContext, type EmbedFormatDefinition, type EmbedGraph, type EmbedMode, type EmbedPanelConfig, type EmbedPanelPosition, type EmbedProfileDefinition, type EnsureProjectInput, type EventTypeData, type ExportCallOptions, type ExportFormat, type ExportFormatMap, type ExtractMachinesInput, type ExtractMachinesResponse, type ExtractedMachine, type ExtractedMachines, type GetMachineOptions, type GraphPatch, type HostUpdateOptions, INSPECTION_PROTOCOL_VERSION, INSPECTION_ROOM_QUERY_PARAM, type InitOptions, type InspectedEvent, type InspectedSnapshot, type InspectedTransition, type InspectionAction, type InspectionRelay, type InspectionRelayEffect, type InspectionRelayPeer, type InspectionRelayRole, type InspectionRelaySnapshot, type InspectionSentEvent, type InspectionTakenTransition, type Inspector, type InspectorConnection, type InspectorDiscoveryEntry, type InspectorEvents, type InspectorInspectionEvent, type InspectorLoadedEvent, type InspectorSettings, type LegacyProjectVisibility, type LegacyUpdateMachineInput, type Machine, type MachineVersion, type MachineVersionAutoSaveOptions, type ManualActorOptions, type OAuthAuthorizationServerMetadata, type OAuthClientRegistrationResponse, type OAuthProtectedResourceMetadata, type OAuthTokenResponse, type PkcePair, type PlanSourceUpdateInput, type PresentationMetadataInitializer, type Project, type ProjectData, type ProjectEmbedMachine, type ProjectMachine, type ProjectMachineSummary, type ProjectSummary, type ProjectVisibility, type ProjectWorkspaceAction, type ProjectWorkspaceActionIcon, type ProjectWorkspaceCapabilities, type ProjectWorkspaceConfig, type ProjectWorkspaceMachine, type ProjectWorkspaceMachineOrigin, type ProjectWorkspaceProject, type RepoType, type ResourceErrorCode, type S3UploadTarget, type SourceUpdateEdit, type SourceUpdatePlan, type StateNodeJSONData, type StatelyAction, type StatelyApiClientOptions, StatelyApiError, type StatelyApiUrlOptions, type StatelyAuthMode, type StatelyCredential, type StatelyEdgeData, type StatelyEmbed, type StatelyEmbedOptions, type StatelyGraph, type StatelyGraphData, type StatelyGuard, type StatelyInvoke, type StatelyNodeData, type StudioAction, StudioApiError, type StudioApiErrorOptions, type StudioClient, type StudioClientOptions, type StudioEdge, type StudioMachine, type StudioMachineRecord, type StudioNode, type StudioRequestOptions, type SupabaseStorageClient, type Transport, type TransportFailure, type UpdateMachineInput, type UpdateProjectInput, type UploadResult, type VerifyApiKeyResponse, type VerifyResult, type ViewerOptions, type XStateVersion, assertEmbedExamples, buildAuthorizeUrl, createAuthorizationHeader, createInspectionActorId, createInspectionRelay, createInspectionRoomUrls, createInspector, createPkcePair, createPostMessageTransport, createS3AssetUploadAdapter, createStatelyApiClient, createStatelyApiUrl, createStatelyClient, createStatelyEmbed, createStatelyInspector, createSupabaseAssetUploadAdapter, createWebSocketTransport, discoverAuthorizationServer, discoverProtectedResource, exchangeCodeForToken, fromStudioMachine, getCredentialToken, getInspectionRoomId, isEmbedExample, isEmbedExampleMachine, mergeInspectorSettings, refreshToken, registerOAuthClient, resolveInspectorSettings, studioMachineConverter, toStudioMachine };
package/dist/index.mjs CHANGED
@@ -1,10 +1,10 @@
1
1
  import { n as StudioApiError, r as createStatelyClient, t as DEFAULT_STATELY_BASE_URL } from "./studio-uGK1kS0n.mjs";
2
2
  import { c as createInspectionRoomUrls, d as isEmbedExampleMachine, i as INSPECTION_ROOM_QUERY_PARAM, l as getInspectionRoomId, m as resolveInspectorSettings, n as EMBED_DOCUMENT_LIMITS, o as assertEmbedExamples, p as mergeInspectorSettings, r as INSPECTION_PROTOCOL_VERSION, s as createInspectionActorId, t as EMBED_DOCUMENT_LANGUAGES, u as isEmbedExample } from "./protocol-M3Zeun3o.mjs";
3
- import { i as createWebSocketTransport, r as createPostMessageTransport } from "./version-BeGmL5w7.mjs";
3
+ import { i as createWebSocketTransport, r as createPostMessageTransport } from "./version-IE72VxaP.mjs";
4
4
  import { EDITOR_PROTOCOL_VERSION } from "./editorHostProtocol.mjs";
5
5
  import { createStatelyEmbed } from "./embed.mjs";
6
6
  import { createS3AssetUploadAdapter, createSupabaseAssetUploadAdapter } from "./assetStorage.mjs";
7
- import { n as createStatelyInspector, t as createInspector } from "./inspect-CGMew487.mjs";
7
+ import { n as createStatelyInspector, t as createInspector } from "./inspect-Ca_ZPcrf.mjs";
8
8
  import { createAuthorizationHeader, getCredentialToken } from "./auth.mjs";
9
9
  import { buildAuthorizeUrl, createPkcePair, discoverAuthorizationServer, discoverProtectedResource, exchangeCodeForToken, refreshToken, registerOAuthClient } from "./oauth.mjs";
10
10
  import { StatelyApiError, createStatelyApiClient, createStatelyApiUrl } from "./api.mjs";
@@ -1,4 +1,4 @@
1
- import { A as ExportFormatMap, H as InspectionTakenTransition, J as MachinePayload, O as ExportCallOptions, Qt as ViewerOptions, R as InspectionAction, U as InspectorLoadedEvent, V as InspectionSentEvent, W as InspectorSettings, b as EmbedEventMap, gt as ProtocolMessage, k as ExportFormat, z as InspectionClientMetadata } from "./protocol-Dlo9C3lj.mjs";
1
+ import { A as ExportFormat, G as InspectionTakenTransition, H as InspectionClientMetadata, K as InspectorLoadedEvent, V as InspectionAction, W as InspectionSentEvent, Z as MachinePayload, j as ExportFormatMap, k as ExportCallOptions, q as InspectorSettings, tn as ViewerOptions, x as EmbedEventMap, yt as ProtocolMessage } from "./protocol-weYUfy3l.mjs";
2
2
 
3
3
  //#region src/transport.d.ts
4
4
  interface TransportFailure {
@@ -1,5 +1,5 @@
1
1
  import { c as createInspectionRoomUrls, l as getInspectionRoomId, m as resolveInspectorSettings, p as mergeInspectorSettings, r as INSPECTION_PROTOCOL_VERSION } from "./protocol-M3Zeun3o.mjs";
2
- import { a as assertEmbedDocuments, c as createPendingExportManager, i as createWebSocketTransport, n as inspectionRuntime, o as assertEmbedPanels, s as createEventRegistry, t as SDK_VERSION } from "./version-BeGmL5w7.mjs";
2
+ import { a as assertEmbedDocuments, c as createPendingExportManager, i as createWebSocketTransport, n as inspectionRuntime, o as assertEmbedPanels, s as createEventRegistry, t as SDK_VERSION } from "./version-IE72VxaP.mjs";
3
3
 
4
4
  //#region src/openBrowser.ts
5
5
  async function openBrowser(url) {
@@ -1,3 +1,3 @@
1
- import { A as ExportFormatMap, H as InspectionTakenTransition, J as MachinePayload, O as ExportCallOptions, Qt as ViewerOptions, R as InspectionAction, T as EmbedMode, U as InspectorLoadedEvent, V as InspectionSentEvent, W as InspectorSettings, _ as EmbedDocument, b as EmbedEventMap, h as EditorCapabilities, k as ExportFormat, un as EmbedPanelConfig, x as EmbedEventName, y as EmbedEventHandler } from "./protocol-Dlo9C3lj.mjs";
2
- import { a as InspectedTransition, c as InspectorDiscoveryEntry, d as ManualActorOptions, f as createInspector, i as InspectedSnapshot, l as InspectorEvents, m as Transport, n as CreateInspectorOptions, o as Inspector, p as createStatelyInspector, r as InspectedEvent, s as InspectorConnection, t as AdoptedActor, u as InspectorInspectionEvent } from "./inspect-ChP5FD65.mjs";
1
+ import { A as ExportFormat, E as EmbedMode, G as InspectionTakenTransition, K as InspectorLoadedEvent, S as EmbedEventName, V as InspectionAction, W as InspectionSentEvent, Z as MachinePayload, b as EmbedEventHandler, h as EditorCapabilities, j as ExportFormatMap, k as ExportCallOptions, pn as EmbedPanelConfig, q as InspectorSettings, tn as ViewerOptions, v as EmbedDocument, x as EmbedEventMap } from "./protocol-weYUfy3l.mjs";
2
+ import { a as InspectedTransition, c as InspectorDiscoveryEntry, d as ManualActorOptions, f as createInspector, i as InspectedSnapshot, l as InspectorEvents, m as Transport, n as CreateInspectorOptions, o as Inspector, p as createStatelyInspector, r as InspectedEvent, s as InspectorConnection, t as AdoptedActor, u as InspectorInspectionEvent } from "./inspect-BEboOFmE.mjs";
3
3
  export { AdoptedActor, CreateInspectorOptions, EditorCapabilities, EmbedDocument, EmbedEventHandler, EmbedEventMap, EmbedEventName, EmbedMode, EmbedPanelConfig, ExportCallOptions, ExportFormat, ExportFormatMap, InspectedEvent, InspectedSnapshot, InspectedTransition, InspectionAction, InspectionSentEvent, InspectionTakenTransition, Inspector, InspectorConnection, InspectorDiscoveryEntry, InspectorEvents, InspectorInspectionEvent, InspectorLoadedEvent, InspectorSettings, MachinePayload, ManualActorOptions, Transport, ViewerOptions, createInspector, createStatelyInspector };
package/dist/inspect.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  import "./protocol-M3Zeun3o.mjs";
2
- import "./version-BeGmL5w7.mjs";
3
- import { n as createStatelyInspector, t as createInspector } from "./inspect-CGMew487.mjs";
2
+ import "./version-IE72VxaP.mjs";
3
+ import { n as createStatelyInspector, t as createInspector } from "./inspect-Ca_ZPcrf.mjs";
4
4
 
5
5
  export { createInspector, createStatelyInspector };
@@ -0,0 +1 @@
1
+ export { };
@@ -1,2 +1,2 @@
1
- import { a as EditorStateType, i as CanvasColor, o as GraphPatch, r as ActionLocation, s as ImplementationSourceType } from "./index-P3fyMvvk.mjs";
2
- export { type ActionLocation, type CanvasColor, type EditorStateType, type GraphPatch, type ImplementationSourceType };
1
+ import { a as EditorStateType, i as CanvasColor, o as GraphPatch, r as ActionLocation, s as ImplementationSourceType } from "./index-DfMkVP94.mjs";
2
+ export { ActionLocation, CanvasColor, EditorStateType, GraphPatch, ImplementationSourceType };
@@ -1,6 +1,6 @@
1
- import { n as ProfileManifest } from "./index-P3fyMvvk.mjs";
2
- import { b as DigraphConfig, i as StatelyGraph } from "./graph-C_G5qXKW.mjs";
3
- import { a as MachineSourceLocations$1, i as EditorSyncStateSourceLocation, n as EditorSyncSourceLocation, r as EditorSyncSourceRange, t as EditorCapabilities$1 } from "./editor-sync-types-U5uryWOk.mjs";
1
+ import { n as ProfileManifest, o as GraphPatch } from "./index-DfMkVP94.mjs";
2
+ import { b as DigraphConfig, i as StatelyGraph } from "./graph-C--idnZO.mjs";
3
+ import { a as MachineSourceLocations$1, i as EditorSyncStateSourceLocation, n as EditorSyncSourceLocation, r as EditorSyncSourceRange, t as EditorCapabilities$1 } from "./editor-sync-types-Ch5P5XRj.mjs";
4
4
 
5
5
  //#region src/embedPanel.d.ts
6
6
  type EmbedPanelPosition = 'left' | 'right' | 'bottom';
@@ -394,7 +394,17 @@ interface InspectorLoadedEvent {
394
394
  interface SystemLoadedMessage extends InspectorLoadedEvent {
395
395
  type: '@statelyai.system.loaded';
396
396
  }
397
+ /** Editor UI around the canvas, owned by the embed host. */
398
+ interface EmbedChromeOptions {
399
+ /**
400
+ * `'full'` (default) shows the usual embed chrome. `'minimal'` keeps only the zoom controls
401
+ * and the context menu. `'none'` shows only the canvas, for recordings, slides, and kiosks.
402
+ * Dialogs and toasts appear in every level.
403
+ */
404
+ controls?: 'full' | 'minimal' | 'none';
405
+ }
397
406
  interface MachineInitOptions extends ViewerOptions {
407
+ chrome?: EmbedChromeOptions;
398
408
  machine: unknown;
399
409
  /** Presentation applied to the converted graph before the editor mounts. */
400
410
  presentation?: PresentationMetadataInitializer;
@@ -427,7 +437,7 @@ interface MachineInitOptions extends ViewerOptions {
427
437
  interface ProjectInitOptions extends ViewerOptions {
428
438
  machines: ProjectEmbedMachine[];
429
439
  /** Optional project-level chrome owned by the embed host. */
430
- chrome?: {
440
+ chrome?: EmbedChromeOptions & {
431
441
  /** Reserve a header row above the editor canvas. */header?: boolean;
432
442
  };
433
443
  currentMachineId?: string;
@@ -446,6 +456,8 @@ interface ProjectInitOptions extends ViewerOptions {
446
456
  }
447
457
  type InitOptions = MachineInitOptions | ProjectInitOptions;
448
458
  interface InitMessage extends MachineInitOptions {
459
+ /** The source host handles session-local description image requests. */
460
+ descriptionImages?: boolean;
449
461
  type: '@statelyai.init';
450
462
  /** @deprecated Use `panels`. */
451
463
  leftPanels?: string[];
@@ -483,6 +495,8 @@ interface ClipboardWriteMessage {
483
495
  text: string;
484
496
  }
485
497
  interface ProjectInitMessage extends ProjectInitOptions {
498
+ /** The source host handles session-local description image requests. */
499
+ descriptionImages?: boolean;
486
500
  type: '@statelyai.project.init';
487
501
  /** @deprecated Use `panels`. */
488
502
  leftPanels?: string[];
@@ -511,11 +525,37 @@ interface ProjectSetWorkspaceOpenMessage {
511
525
  type: '@statelyai.project.setWorkspaceOpen';
512
526
  open: boolean;
513
527
  }
514
- interface UpdateMessage {
528
+ /** How the editor applies a host update to the graph it is showing. */
529
+ interface HostUpdateOptions {
530
+ /**
531
+ * `'reconcile'` (default) diffs against the current graph and changes only what differs,
532
+ * keeping the layout of everything that is still there. `'replace'` takes the new graph
533
+ * as is and lays it out from scratch, without reloading the editor.
534
+ */
535
+ mode?: 'reconcile' | 'replace';
536
+ /** `'auto'` re-runs auto-layout (animated) when the update adds or removes states or transitions. */
537
+ layout?: 'preserve' | 'auto';
538
+ /** Fit the canvas to the whole graph once the update, and any layout, settles. */
539
+ fit?: boolean;
540
+ /** Fade in states and transitions that the update adds. Default: true. */
541
+ animate?: boolean;
542
+ }
543
+ interface UpdateMessage extends HostUpdateOptions {
515
544
  type: '@statelyai.update';
516
545
  machine: unknown;
517
546
  format?: string;
518
547
  sourceLocations?: MachineSourceLocations;
548
+ /** Patches against the current graph, sent instead of a whole `machine`. */
549
+ patches?: GraphPatch[];
550
+ }
551
+ /** Highlight states or transitions from the host, e.g. the step a crawler or test is on. */
552
+ interface HighlightMessage {
553
+ type: '@statelyai.highlight';
554
+ /** Node or edge ids. An empty list clears the host's highlights. */
555
+ ids: string[];
556
+ kind?: 'active' | 'divergence';
557
+ /** Move the camera to keep these node or edge ids in view. */
558
+ focus?: string[];
519
559
  }
520
560
  interface SetModeMessage {
521
561
  type: '@statelyai.setMode';
@@ -846,7 +886,7 @@ interface ExtensionResultMessage {
846
886
  error?: string;
847
887
  }
848
888
  /** All messages a client (embed/inspector) can send to the viz. */
849
- type ClientMessage = InitMessage | SetApiKeyMessage | EditorHandshakeMessage | SavedMessage | ClipboardReadResponseMessage | ClipboardWriteResponseMessage | ProjectInitMessage | ProjectUpdateMessage | ProjectSelectMachineMessage | ProjectSetWorkspaceOpenMessage | UpdateMessage | SetModeMessage | SetThemeMessage | SetSettingsMessage | RetrieveMessage | ToastMessage | ToastDismissMessage | InspectSnapshotMessage | SystemInitMessage | SystemSelectActorMessage | SystemActorRegisteredMessage | SystemActorEventMessage | SystemActorSnapshotMessage | SystemActorStoppedMessage | UploadCapabilitiesMessage | UploadResponseMessage | ExtensionResultMessage | ErrorMessage;
889
+ type ClientMessage = InitMessage | SetApiKeyMessage | EditorHandshakeMessage | SavedMessage | ClipboardReadResponseMessage | ClipboardWriteResponseMessage | ProjectInitMessage | ProjectUpdateMessage | ProjectSelectMachineMessage | ProjectSetWorkspaceOpenMessage | UpdateMessage | HighlightMessage | SetModeMessage | SetThemeMessage | SetSettingsMessage | RetrieveMessage | ToastMessage | ToastDismissMessage | InspectSnapshotMessage | SystemInitMessage | SystemSelectActorMessage | SystemActorRegisteredMessage | SystemActorEventMessage | SystemActorSnapshotMessage | SystemActorStoppedMessage | UploadCapabilitiesMessage | UploadResponseMessage | ExtensionResultMessage | ErrorMessage;
850
890
  /** All messages the viz can send back to a client. */
851
891
  type VizMessage = LoginMessage | SystemLoadedMessage | ReadyMessage | LoadedMessage | ChangeMessage | SaveMessage | VersionSaveRequestedMessage | ProjectMachineSelectedMessage | ProjectWorkspaceActionMessage | ProjectWorkspaceOpenChangedMessage | ViewModeChangedMessage | PanelChangedMessage | ModeChangedMessage | RetrievedMessage | ErrorMessage | CapabilityDeniedMessage | ClipboardReadMessage | ClipboardWriteMessage | UploadRequestMessage | ExtensionCallMessage;
852
892
  interface InspectionClientMetadata {
@@ -877,4 +917,4 @@ declare const PREFIX = "@statelyai.";
877
917
  /** Current WebSocket inspection protocol version. */
878
918
  declare const INSPECTION_PROTOCOL_VERSION = 2;
879
919
  //#endregion
880
- export { PanelChangedMessage as $, VizMessage as $t, ExportFormatMap as A, SetThemeMessage as At, InspectionRoomUrls as B, SystemSelectActorMessage as Bt, EmbedExtensionsManifest as C, SaveMessage as Ct, ErrorMessage as D, SetApiKeyMessage as Dt, ErrorCode as E, SessionMessage as Et, InitMessage as F, SystemActorRegisteredMessage as Ft, LoadedMessage as G, UploadFileInfo as Gt, InspectionTakenTransition as H, ToastMessage as Ht, InitOptions as I, SystemActorSnapshotMessage as It, MachinePayload as J, UploadResult as Jt, LoginMessage as K, UploadRequestMessage as Kt, InspectSnapshotMessage as L, SystemActorStoppedMessage as Lt, ExtensionResultMessage as M, SourceRange as Mt, INSPECTION_PROTOCOL_VERSION as N, StateSourceLocation as Nt, ExportCallOptions as O, SetModeMessage as Ot, INSPECTION_ROOM_QUERY_PARAM as P, SystemActorEventMessage as Pt, PREFIX as Q, ViewerOptions as Qt, InspectionAction as R, SystemInitMessage as Rt, EmbedExample as S, RetrievedMessage as St, EmbedMode as T, SerializedInspectionMachine as Tt, InspectorLoadedEvent as U, UpdateMessage as Ut, InspectionSentEvent as V, ToastDismissMessage as Vt, InspectorSettings as W, UploadCapabilitiesMessage as Wt, MachineVersionAutoSaveOptions as X, VersionSaveRequestedMessage as Xt, MachineSourceLocations as Y, ValidationIssue as Yt, ModeChangedMessage as Z, ViewModeChangedMessage as Zt, EmbedDocument as _, ReadOnlyReason as _t, CapabilityDeniedMessage as a, isEmbedExampleMachine as an, ProjectSetWorkspaceOpenMessage as at, EmbedEventMap as b, RegisteredMessage as bt, ClipboardReadMessage as c, resolveInspectorSettings as cn, ProjectWorkspaceActionIcon as ct, ClipboardWriteResponseMessage as d, EmbedPanelPosition as dn, ProjectWorkspaceConfig as dt, assertEmbedExamples as en, ProjectEmbedMachine as et, CommentsConfig as f, ProjectWorkspaceMachine as ft, EditorHandshakeMessage as g, ProtocolMessage as gt, EditorCapabilities as h, ProjectWorkspaceProject as ht, CapabilityDeniedEvent as i, isEmbedExample as in, ProjectSelectMachineMessage as it, ExtensionCallMessage as j, SourceLocation as jt, ExportFormat as k, SetSettingsMessage as kt, ClipboardReadResponseMessage as l, PresentationMetadataInitializer as ln, ProjectWorkspaceActionMessage as lt, EMBED_DOCUMENT_LIMITS as m, ProjectWorkspaceOpenChangedMessage as mt, AuthenticationRecovery as n, createInspectionRoomUrls as nn, ProjectInitOptions as nt, ChangeMessage as o, isSerializedInspectionMachine as on, ProjectUpdateMessage as ot, EMBED_DOCUMENT_LANGUAGES as p, ProjectWorkspaceMachineOrigin as pt, MachineInitOptions as q, UploadResponseMessage as qt, CapabilityDeniedCapability as r, getInspectionRoomId as rn, ProjectMachineSelectedMessage as rt, ClientMessage as s, mergeInspectorSettings as sn, ProjectWorkspaceAction as st, ActorSystemEntry as t, createInspectionActorId as tn, ProjectInitMessage as tt, ClipboardWriteMessage as u, EmbedPanelConfig as un, ProjectWorkspaceCapabilities as ut, EmbedDocumentLanguage as v, ReadyMessage as vt, EmbedFormatManifest as w, SavedMessage as wt, EmbedEventName as x, RetrieveMessage as xt, EmbedEventHandler as y, RegisterMessage as yt, InspectionClientMetadata as z, SystemLoadedMessage as zt };
920
+ export { MachineVersionAutoSaveOptions as $, VersionSaveRequestedMessage as $t, ExportFormat as A, SetApiKeyMessage as At, InspectSnapshotMessage as B, SystemActorStoppedMessage as Bt, EmbedExample as C, RegisteredMessage as Ct, ErrorCode as D, SavedMessage as Dt, EmbedMode as E, SaveMessage as Et, HostUpdateOptions as F, SourceRange as Ft, InspectionTakenTransition as G, ToastMessage as Gt, InspectionClientMetadata as H, SystemLoadedMessage as Ht, INSPECTION_PROTOCOL_VERSION as I, StateSourceLocation as It, LoadedMessage as J, UploadFileInfo as Jt, InspectorLoadedEvent as K, UpdateMessage as Kt, INSPECTION_ROOM_QUERY_PARAM as L, SystemActorEventMessage as Lt, ExtensionCallMessage as M, SetSettingsMessage as Mt, ExtensionResultMessage as N, SetThemeMessage as Nt, ErrorMessage as O, SerializedInspectionMachine as Ot, HighlightMessage as P, SourceLocation as Pt, MachineSourceLocations as Q, ValidationIssue as Qt, InitMessage as R, SystemActorRegisteredMessage as Rt, EmbedEventName as S, RegisterMessage as St, EmbedFormatManifest as T, RetrievedMessage as Tt, InspectionRoomUrls as U, SystemSelectActorMessage as Ut, InspectionAction as V, SystemInitMessage as Vt, InspectionSentEvent as W, ToastDismissMessage as Wt, MachineInitOptions as X, UploadResponseMessage as Xt, LoginMessage as Y, UploadRequestMessage as Yt, MachinePayload as Z, UploadResult as Zt, EmbedChromeOptions as _, ProjectWorkspaceOpenChangedMessage as _t, CapabilityDeniedMessage as a, createInspectionRoomUrls as an, ProjectInitOptions as at, EmbedEventHandler as b, ReadOnlyReason as bt, ClipboardReadMessage as c, isEmbedExampleMachine as cn, ProjectSetWorkspaceOpenMessage as ct, ClipboardWriteResponseMessage as d, resolveInspectorSettings as dn, ProjectWorkspaceActionIcon as dt, ViewModeChangedMessage as en, ModeChangedMessage as et, CommentsConfig as f, PresentationMetadataInitializer as fn, ProjectWorkspaceActionMessage as ft, EditorHandshakeMessage as g, ProjectWorkspaceMachineOrigin as gt, EditorCapabilities as h, ProjectWorkspaceMachine as ht, CapabilityDeniedEvent as i, createInspectionActorId as in, ProjectInitMessage as it, ExportFormatMap as j, SetModeMessage as jt, ExportCallOptions as k, SessionMessage as kt, ClipboardReadResponseMessage as l, isSerializedInspectionMachine as ln, ProjectUpdateMessage as lt, EMBED_DOCUMENT_LIMITS as m, EmbedPanelPosition as mn, ProjectWorkspaceConfig as mt, AuthenticationRecovery as n, VizMessage as nn, PanelChangedMessage as nt, ChangeMessage as o, getInspectionRoomId as on, ProjectMachineSelectedMessage as ot, EMBED_DOCUMENT_LANGUAGES as p, EmbedPanelConfig as pn, ProjectWorkspaceCapabilities as pt, InspectorSettings as q, UploadCapabilitiesMessage as qt, CapabilityDeniedCapability as r, assertEmbedExamples as rn, ProjectEmbedMachine as rt, ClientMessage as s, isEmbedExample as sn, ProjectSelectMachineMessage as st, ActorSystemEntry as t, ViewerOptions as tn, PREFIX as tt, ClipboardWriteMessage as u, mergeInspectorSettings as un, ProjectWorkspaceAction as ut, EmbedDocument as v, ProjectWorkspaceProject as vt, EmbedExtensionsManifest as w, RetrieveMessage as wt, EmbedEventMap as x, ReadyMessage as xt, EmbedDocumentLanguage as y, ProtocolMessage as yt, InitOptions as z, SystemActorSnapshotMessage as zt };
@@ -1,2 +1,2 @@
1
- import { $ as PanelChangedMessage, $t as VizMessage, A as ExportFormatMap, At as SetThemeMessage, B as InspectionRoomUrls, Bt as SystemSelectActorMessage, C as EmbedExtensionsManifest, Ct as SaveMessage, D as ErrorMessage, Dt as SetApiKeyMessage, E as ErrorCode, Et as SessionMessage, F as InitMessage, Ft as SystemActorRegisteredMessage, G as LoadedMessage, Gt as UploadFileInfo, H as InspectionTakenTransition, Ht as ToastMessage, I as InitOptions, It as SystemActorSnapshotMessage, J as MachinePayload, Jt as UploadResult, K as LoginMessage, Kt as UploadRequestMessage, L as InspectSnapshotMessage, Lt as SystemActorStoppedMessage, M as ExtensionResultMessage, Mt as SourceRange, N as INSPECTION_PROTOCOL_VERSION, Nt as StateSourceLocation, O as ExportCallOptions, Ot as SetModeMessage, P as INSPECTION_ROOM_QUERY_PARAM, Pt as SystemActorEventMessage, Q as PREFIX, Qt as ViewerOptions, R as InspectionAction, Rt as SystemInitMessage, S as EmbedExample, St as RetrievedMessage, T as EmbedMode, Tt as SerializedInspectionMachine, U as InspectorLoadedEvent, Ut as UpdateMessage, V as InspectionSentEvent, Vt as ToastDismissMessage, W as InspectorSettings, Wt as UploadCapabilitiesMessage, X as MachineVersionAutoSaveOptions, Xt as VersionSaveRequestedMessage, Y as MachineSourceLocations, Yt as ValidationIssue, Z as ModeChangedMessage, Zt as ViewModeChangedMessage, _ as EmbedDocument, _t as ReadOnlyReason, a as CapabilityDeniedMessage, an as isEmbedExampleMachine, at as ProjectSetWorkspaceOpenMessage, b as EmbedEventMap, bt as RegisteredMessage, c as ClipboardReadMessage, cn as resolveInspectorSettings, ct as ProjectWorkspaceActionIcon, d as ClipboardWriteResponseMessage, dn as EmbedPanelPosition, dt as ProjectWorkspaceConfig, en as assertEmbedExamples, et as ProjectEmbedMachine, f as CommentsConfig, ft as ProjectWorkspaceMachine, g as EditorHandshakeMessage, gt as ProtocolMessage, h as EditorCapabilities, ht as ProjectWorkspaceProject, i as CapabilityDeniedEvent, in as isEmbedExample, it as ProjectSelectMachineMessage, j as ExtensionCallMessage, jt as SourceLocation, k as ExportFormat, kt as SetSettingsMessage, l as ClipboardReadResponseMessage, lt as ProjectWorkspaceActionMessage, m as EMBED_DOCUMENT_LIMITS, mt as ProjectWorkspaceOpenChangedMessage, n as AuthenticationRecovery, nn as createInspectionRoomUrls, nt as ProjectInitOptions, o as ChangeMessage, on as isSerializedInspectionMachine, ot as ProjectUpdateMessage, p as EMBED_DOCUMENT_LANGUAGES, pt as ProjectWorkspaceMachineOrigin, q as MachineInitOptions, qt as UploadResponseMessage, r as CapabilityDeniedCapability, rn as getInspectionRoomId, rt as ProjectMachineSelectedMessage, s as ClientMessage, sn as mergeInspectorSettings, st as ProjectWorkspaceAction, t as ActorSystemEntry, tn as createInspectionActorId, tt as ProjectInitMessage, u as ClipboardWriteMessage, un as EmbedPanelConfig, ut as ProjectWorkspaceCapabilities, v as EmbedDocumentLanguage, vt as ReadyMessage, w as EmbedFormatManifest, wt as SavedMessage, x as EmbedEventName, xt as RetrieveMessage, y as EmbedEventHandler, yt as RegisterMessage, z as InspectionClientMetadata, zt as SystemLoadedMessage } from "./protocol-Dlo9C3lj.mjs";
2
- export { ActorSystemEntry, AuthenticationRecovery, CapabilityDeniedCapability, CapabilityDeniedEvent, CapabilityDeniedMessage, ChangeMessage, ClientMessage, ClipboardReadMessage, ClipboardReadResponseMessage, ClipboardWriteMessage, ClipboardWriteResponseMessage, CommentsConfig, EMBED_DOCUMENT_LANGUAGES, EMBED_DOCUMENT_LIMITS, EditorCapabilities, EditorHandshakeMessage, EmbedDocument, EmbedDocumentLanguage, EmbedEventHandler, EmbedEventMap, EmbedEventName, EmbedExample, EmbedExtensionsManifest, EmbedFormatManifest, EmbedMode, EmbedPanelConfig, EmbedPanelPosition, ErrorCode, ErrorMessage, ExportCallOptions, ExportFormat, ExportFormatMap, ExtensionCallMessage, ExtensionResultMessage, INSPECTION_PROTOCOL_VERSION, INSPECTION_ROOM_QUERY_PARAM, InitMessage, InitOptions, InspectSnapshotMessage, InspectionAction, InspectionClientMetadata, InspectionRoomUrls, InspectionSentEvent, InspectionTakenTransition, InspectorLoadedEvent, InspectorSettings, LoadedMessage, LoginMessage, MachineInitOptions, MachinePayload, MachineSourceLocations, MachineVersionAutoSaveOptions, ModeChangedMessage, PREFIX, PanelChangedMessage, ProjectEmbedMachine, ProjectInitMessage, ProjectInitOptions, ProjectMachineSelectedMessage, ProjectSelectMachineMessage, ProjectSetWorkspaceOpenMessage, ProjectUpdateMessage, ProjectWorkspaceAction, ProjectWorkspaceActionIcon, ProjectWorkspaceActionMessage, ProjectWorkspaceCapabilities, ProjectWorkspaceConfig, ProjectWorkspaceMachine, ProjectWorkspaceMachineOrigin, ProjectWorkspaceOpenChangedMessage, ProjectWorkspaceProject, ProtocolMessage, ReadOnlyReason, ReadyMessage, RegisterMessage, RegisteredMessage, RetrieveMessage, RetrievedMessage, SaveMessage, SavedMessage, SerializedInspectionMachine, SessionMessage, SetApiKeyMessage, SetModeMessage, SetSettingsMessage, SetThemeMessage, SourceLocation, SourceRange, StateSourceLocation, SystemActorEventMessage, SystemActorRegisteredMessage, SystemActorSnapshotMessage, SystemActorStoppedMessage, SystemInitMessage, SystemLoadedMessage, SystemSelectActorMessage, ToastDismissMessage, ToastMessage, UpdateMessage, UploadCapabilitiesMessage, UploadFileInfo, UploadRequestMessage, UploadResponseMessage, UploadResult, ValidationIssue, VersionSaveRequestedMessage, ViewModeChangedMessage, ViewerOptions, VizMessage, assertEmbedExamples, createInspectionActorId, createInspectionRoomUrls, getInspectionRoomId, isEmbedExample, isEmbedExampleMachine, isSerializedInspectionMachine, mergeInspectorSettings, resolveInspectorSettings };
1
+ import { $ as MachineVersionAutoSaveOptions, $t as VersionSaveRequestedMessage, A as ExportFormat, At as SetApiKeyMessage, B as InspectSnapshotMessage, Bt as SystemActorStoppedMessage, C as EmbedExample, Ct as RegisteredMessage, D as ErrorCode, Dt as SavedMessage, E as EmbedMode, Et as SaveMessage, F as HostUpdateOptions, Ft as SourceRange, G as InspectionTakenTransition, Gt as ToastMessage, H as InspectionClientMetadata, Ht as SystemLoadedMessage, I as INSPECTION_PROTOCOL_VERSION, It as StateSourceLocation, J as LoadedMessage, Jt as UploadFileInfo, K as InspectorLoadedEvent, Kt as UpdateMessage, L as INSPECTION_ROOM_QUERY_PARAM, Lt as SystemActorEventMessage, M as ExtensionCallMessage, Mt as SetSettingsMessage, N as ExtensionResultMessage, Nt as SetThemeMessage, O as ErrorMessage, Ot as SerializedInspectionMachine, P as HighlightMessage, Pt as SourceLocation, Q as MachineSourceLocations, Qt as ValidationIssue, R as InitMessage, Rt as SystemActorRegisteredMessage, S as EmbedEventName, St as RegisterMessage, T as EmbedFormatManifest, Tt as RetrievedMessage, U as InspectionRoomUrls, Ut as SystemSelectActorMessage, V as InspectionAction, Vt as SystemInitMessage, W as InspectionSentEvent, Wt as ToastDismissMessage, X as MachineInitOptions, Xt as UploadResponseMessage, Y as LoginMessage, Yt as UploadRequestMessage, Z as MachinePayload, Zt as UploadResult, _ as EmbedChromeOptions, _t as ProjectWorkspaceOpenChangedMessage, a as CapabilityDeniedMessage, an as createInspectionRoomUrls, at as ProjectInitOptions, b as EmbedEventHandler, bt as ReadOnlyReason, c as ClipboardReadMessage, cn as isEmbedExampleMachine, ct as ProjectSetWorkspaceOpenMessage, d as ClipboardWriteResponseMessage, dn as resolveInspectorSettings, dt as ProjectWorkspaceActionIcon, en as ViewModeChangedMessage, et as ModeChangedMessage, f as CommentsConfig, ft as ProjectWorkspaceActionMessage, g as EditorHandshakeMessage, gt as ProjectWorkspaceMachineOrigin, h as EditorCapabilities, ht as ProjectWorkspaceMachine, i as CapabilityDeniedEvent, in as createInspectionActorId, it as ProjectInitMessage, j as ExportFormatMap, jt as SetModeMessage, k as ExportCallOptions, kt as SessionMessage, l as ClipboardReadResponseMessage, ln as isSerializedInspectionMachine, lt as ProjectUpdateMessage, m as EMBED_DOCUMENT_LIMITS, mn as EmbedPanelPosition, mt as ProjectWorkspaceConfig, n as AuthenticationRecovery, nn as VizMessage, nt as PanelChangedMessage, o as ChangeMessage, on as getInspectionRoomId, ot as ProjectMachineSelectedMessage, p as EMBED_DOCUMENT_LANGUAGES, pn as EmbedPanelConfig, pt as ProjectWorkspaceCapabilities, q as InspectorSettings, qt as UploadCapabilitiesMessage, r as CapabilityDeniedCapability, rn as assertEmbedExamples, rt as ProjectEmbedMachine, s as ClientMessage, sn as isEmbedExample, st as ProjectSelectMachineMessage, t as ActorSystemEntry, tn as ViewerOptions, tt as PREFIX, u as ClipboardWriteMessage, un as mergeInspectorSettings, ut as ProjectWorkspaceAction, v as EmbedDocument, vt as ProjectWorkspaceProject, w as EmbedExtensionsManifest, wt as RetrieveMessage, x as EmbedEventMap, xt as ReadyMessage, y as EmbedDocumentLanguage, yt as ProtocolMessage, z as InitOptions, zt as SystemActorSnapshotMessage } from "./protocol-weYUfy3l.mjs";
2
+ export { ActorSystemEntry, AuthenticationRecovery, CapabilityDeniedCapability, CapabilityDeniedEvent, CapabilityDeniedMessage, ChangeMessage, ClientMessage, ClipboardReadMessage, ClipboardReadResponseMessage, ClipboardWriteMessage, ClipboardWriteResponseMessage, CommentsConfig, EMBED_DOCUMENT_LANGUAGES, EMBED_DOCUMENT_LIMITS, EditorCapabilities, EditorHandshakeMessage, EmbedChromeOptions, EmbedDocument, EmbedDocumentLanguage, EmbedEventHandler, EmbedEventMap, EmbedEventName, EmbedExample, EmbedExtensionsManifest, EmbedFormatManifest, EmbedMode, EmbedPanelConfig, EmbedPanelPosition, ErrorCode, ErrorMessage, ExportCallOptions, ExportFormat, ExportFormatMap, ExtensionCallMessage, ExtensionResultMessage, HighlightMessage, HostUpdateOptions, INSPECTION_PROTOCOL_VERSION, INSPECTION_ROOM_QUERY_PARAM, InitMessage, InitOptions, InspectSnapshotMessage, InspectionAction, InspectionClientMetadata, InspectionRoomUrls, InspectionSentEvent, InspectionTakenTransition, InspectorLoadedEvent, InspectorSettings, LoadedMessage, LoginMessage, MachineInitOptions, MachinePayload, MachineSourceLocations, MachineVersionAutoSaveOptions, ModeChangedMessage, PREFIX, PanelChangedMessage, ProjectEmbedMachine, ProjectInitMessage, ProjectInitOptions, ProjectMachineSelectedMessage, ProjectSelectMachineMessage, ProjectSetWorkspaceOpenMessage, ProjectUpdateMessage, ProjectWorkspaceAction, ProjectWorkspaceActionIcon, ProjectWorkspaceActionMessage, ProjectWorkspaceCapabilities, ProjectWorkspaceConfig, ProjectWorkspaceMachine, ProjectWorkspaceMachineOrigin, ProjectWorkspaceOpenChangedMessage, ProjectWorkspaceProject, ProtocolMessage, ReadOnlyReason, ReadyMessage, RegisterMessage, RegisteredMessage, RetrieveMessage, RetrievedMessage, SaveMessage, SavedMessage, SerializedInspectionMachine, SessionMessage, SetApiKeyMessage, SetModeMessage, SetSettingsMessage, SetThemeMessage, SourceLocation, SourceRange, StateSourceLocation, SystemActorEventMessage, SystemActorRegisteredMessage, SystemActorSnapshotMessage, SystemActorStoppedMessage, SystemInitMessage, SystemLoadedMessage, SystemSelectActorMessage, ToastDismissMessage, ToastMessage, UpdateMessage, UploadCapabilitiesMessage, UploadFileInfo, UploadRequestMessage, UploadResponseMessage, UploadResult, ValidationIssue, VersionSaveRequestedMessage, ViewModeChangedMessage, ViewerOptions, VizMessage, assertEmbedExamples, createInspectionActorId, createInspectionRoomUrls, getInspectionRoomId, isEmbedExample, isEmbedExampleMachine, isSerializedInspectionMachine, mergeInspectorSettings, resolveInspectorSettings };
package/dist/relay.d.mts CHANGED
@@ -1,5 +1,4 @@
1
- import { gt as ProtocolMessage } from "./protocol-Dlo9C3lj.mjs";
2
-
1
+ import { yt as ProtocolMessage } from "./protocol-weYUfy3l.mjs";
3
2
  //#region src/relay.d.ts
4
3
  type InspectionRelayRole = 'producer' | 'viewer';
5
4
  interface InspectionRelayPeer {
@@ -1,4 +1,4 @@
1
- import { S as $strip, _ as ZodString, b as output, c as ZodArray, d as ZodLiteral, f as ZodNullable, g as ZodRecord, h as ZodOptional, l as ZodBoolean, m as ZodObject, p as ZodNumber, u as ZodEnum, v as ZodUnion, x as $loose, y as ZodUnknown } from "./index-P3fyMvvk.mjs";
1
+ import { S as $strip, _ as ZodString, b as output, c as ZodArray, d as ZodLiteral, f as ZodNullable, g as ZodRecord, h as ZodOptional, l as ZodBoolean, m as ZodObject, p as ZodNumber, u as ZodEnum, v as ZodUnion, x as $loose, y as ZodUnknown } from "./index-DfMkVP94.mjs";
2
2
  import { StatelyAuthMode, StatelyCredential } from "./auth.mjs";
3
3
 
4
4
  //#region ../api-contract/dist/errors.d.mts
package/dist/studio.d.mts CHANGED
@@ -1,2 +1,2 @@
1
- import { A as Machine, C as StudioMachineRecord, D as VerifyApiKeyResponse, E as UpdateProjectInput, F as ProjectVisibility, I as VerifyResult, L as XStateVersion, M as Project, N as ProjectMachineSummary, O as createStatelyClient, P as ProjectSummary, R as ResourceErrorCode, S as StudioClientOptions, T as UpdateMachineInput, _ as ProjectMachine, a as CreateMachineTemplate, b as StudioApiErrorOptions, c as EnsureProjectInput, d as ExtractedMachine, f as GetMachineOptions, g as ProjectData, h as LegacyUpdateMachineInput, i as CreateMachineInput, j as MachineVersion, k as ExtractedMachines, l as ExtractMachinesInput, m as LegacyProjectVisibility, n as CreateMachineFromDefinitionInput, o as CreateProjectInput, p as LegacyExtractMachinesOptions, r as CreateMachineFromTemplateInput, s as DEFAULT_STATELY_BASE_URL, t as ConnectedRepo, u as ExtractMachinesResponse, v as RepoType, w as StudioRequestOptions, x as StudioClient, y as StudioApiError } from "./studio-WmN72ERY.mjs";
1
+ import { A as Machine, C as StudioMachineRecord, D as VerifyApiKeyResponse, E as UpdateProjectInput, F as ProjectVisibility, I as VerifyResult, L as XStateVersion, M as Project, N as ProjectMachineSummary, O as createStatelyClient, P as ProjectSummary, R as ResourceErrorCode, S as StudioClientOptions, T as UpdateMachineInput, _ as ProjectMachine, a as CreateMachineTemplate, b as StudioApiErrorOptions, c as EnsureProjectInput, d as ExtractedMachine, f as GetMachineOptions, g as ProjectData, h as LegacyUpdateMachineInput, i as CreateMachineInput, j as MachineVersion, k as ExtractedMachines, l as ExtractMachinesInput, m as LegacyProjectVisibility, n as CreateMachineFromDefinitionInput, o as CreateProjectInput, p as LegacyExtractMachinesOptions, r as CreateMachineFromTemplateInput, s as DEFAULT_STATELY_BASE_URL, t as ConnectedRepo, u as ExtractMachinesResponse, v as RepoType, w as StudioRequestOptions, x as StudioClient, y as StudioApiError } from "./studio-DSwp5rXP.mjs";
2
2
  export { ConnectedRepo, CreateMachineFromDefinitionInput, CreateMachineFromTemplateInput, CreateMachineInput, CreateMachineTemplate, CreateProjectInput, DEFAULT_STATELY_BASE_URL, EnsureProjectInput, ExtractMachinesInput, ExtractMachinesResponse, ExtractedMachine, ExtractedMachines, GetMachineOptions, LegacyExtractMachinesOptions, LegacyProjectVisibility, LegacyUpdateMachineInput, Machine, MachineVersion, Project, ProjectData, ProjectMachine, ProjectMachineSummary, ProjectSummary, ProjectVisibility, RepoType, ResourceErrorCode, StudioApiError, StudioApiErrorOptions, StudioClient, StudioClientOptions, StudioMachineRecord, StudioRequestOptions, UpdateMachineInput, UpdateProjectInput, VerifyApiKeyResponse, VerifyResult, XStateVersion, createStatelyClient };
@@ -167,6 +167,7 @@ function toInitMessage(options) {
167
167
  panels: options.panels,
168
168
  comments: options.comments,
169
169
  sourceLocations: options.sourceLocations,
170
+ chrome: options.chrome,
170
171
  settings: settingsWithViewMode(options),
171
172
  unsavedIndicator: options.unsavedIndicator,
172
173
  versionAutoSave: options.versionAutoSave
@@ -378,7 +379,7 @@ function createWebSocketTransport(options) {
378
379
 
379
380
  //#endregion
380
381
  //#region src/version.ts
381
- const SDK_VERSION = "0.37.4";
382
+ const SDK_VERSION = "0.38.1";
382
383
  function inspectionRuntime() {
383
384
  if (typeof window !== "undefined") return "browser";
384
385
  if (typeof process !== "undefined" && process.versions?.node) return "node";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@statelyai/sdk",
3
- "version": "0.37.4",
3
+ "version": "0.38.1",
4
4
  "license": "MIT",
5
5
  "bin": {
6
6
  "stately-sdk": "./dist/bin.mjs"
@@ -91,9 +91,9 @@
91
91
  "vitest": "^3.2.4",
92
92
  "ws": "^8.19.0",
93
93
  "xstate": "^5.0.0",
94
- "xstate-v6": "npm:xstate@6.0.0-alpha.63",
95
- "@statelyai/api-contract": "0.6.0",
96
- "@statelyai/graph-tools": "0.9.4"
94
+ "xstate-v6": "npm:xstate@6.0.0-alpha.65",
95
+ "@statelyai/api-contract": "0.6.2",
96
+ "@statelyai/graph-tools": "0.9.6"
97
97
  },
98
98
  "peerDependencies": {
99
99
  "ws": "^8.19.0"