@statelyai/sdk 0.37.3 → 0.38.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.
package/README.md CHANGED
@@ -464,6 +464,16 @@ from graph data. Source generation is part of the private Editor Sync workflow.
464
464
  For pricing and support, contact
465
465
  [team@stately.ai](mailto:team@stately.ai).
466
466
 
467
+ ## Machine JSON schemas
468
+
469
+ <!-- JSON schema exports from package.json and schemas/ -->
470
+
471
+ Use `@statelyai/sdk/xstate-v6.schema.json` to validate the `MachineJSON` loader format accepted by XState v6's `createMachineFromConfig`, including `@expr` expressions and `@xstate.*` action objects. It uses JSON Schema draft 2020-12.
472
+
473
+ This loader format has its own contract: transition `actions` must be arrays, history states require a non-empty fallback `target`, and state `onDone` and root `options` are unsupported. Code-authored `createMachine` configurations and the editor's general `xstate-json` exports can contain fields or shorthand outside this loader format.
474
+
475
+ `@statelyai/sdk/xstate.schema.json` and `xstate-json.schema.json` continue to describe v5 definitions. The schemas are also available under the `schemas/` export paths.
476
+
467
477
  ## Self-hosting
468
478
 
469
479
  <!-- self-host configuration from the editor app auth and editor-sync routes -->
@@ -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-Bdi39PxU.mjs";
2
+ import { c as createPendingExportManager, l as settingsWithViewMode, r as createPostMessageTransport, s as createEventRegistry, t as SDK_VERSION, u as toInitMessage } from "./version-DdcBDv8b.mjs";
3
3
  import { EDITOR_PROTOCOL_VERSION } from "./editorHostProtocol.mjs";
4
4
 
5
5
  //#region src/embed.ts
@@ -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
@@ -488,12 +489,29 @@ function createStatelyEmbed(options) {
488
489
  extensions: opts.extensions ?? bundledExtensions
489
490
  } : opts));
490
491
  },
491
- updateMachine(machine, format, sourceLocations) {
492
+ updateMachine(machine, format, sourceLocations, options) {
492
493
  send({
493
494
  type: "@statelyai.update",
494
495
  machine,
495
496
  format,
496
- sourceLocations
497
+ sourceLocations,
498
+ ...options
499
+ });
500
+ },
501
+ applyPatches(patches, options) {
502
+ send({
503
+ type: "@statelyai.update",
504
+ machine: void 0,
505
+ patches,
506
+ ...options
507
+ });
508
+ },
509
+ highlight(ids, options) {
510
+ send({
511
+ type: "@statelyai.highlight",
512
+ ids,
513
+ ...options?.kind ? { kind: options.kind } : {},
514
+ ...options?.focus?.length ? { focus: options.focus } : {}
497
515
  });
498
516
  },
499
517
  updateProject(machines, currentMachineId, commentsByMachineId, projectOptions) {
@@ -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-Bdi39PxU.mjs";
3
+ import { i as createWebSocketTransport, r as createPostMessageTransport } from "./version-DdcBDv8b.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-C2F95TDZ.mjs";
7
+ import { n as createStatelyInspector, t as createInspector } from "./inspect-IxL93uKX.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-Bdi39PxU.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-DdcBDv8b.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-Bdi39PxU.mjs";
3
- import { n as createStatelyInspector, t as createInspector } from "./inspect-C2F95TDZ.mjs";
2
+ import "./version-DdcBDv8b.mjs";
3
+ import { n as createStatelyInspector, t as createInspector } from "./inspect-IxL93uKX.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.3";
382
+ const SDK_VERSION = "0.38.0";
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.3",
3
+ "version": "0.38.0",
4
4
  "license": "MIT",
5
5
  "bin": {
6
6
  "stately-sdk": "./dist/bin.mjs"
@@ -74,7 +74,9 @@
74
74
  "./editor-host-protocol": {
75
75
  "types": "./dist/editorHostProtocol.d.mts",
76
76
  "import": "./dist/editorHostProtocol.mjs"
77
- }
77
+ },
78
+ "./xstate-v6.schema.json": "./schemas/xstate-v6.schema.json",
79
+ "./schemas/xstate-v6.schema.json": "./schemas/xstate-v6.schema.json"
78
80
  },
79
81
  "dependencies": {
80
82
  "@statelyai/graph": "^2.1.0"
@@ -82,18 +84,16 @@
82
84
  "devDependencies": {
83
85
  "@types/json-schema": "^7.0.15",
84
86
  "@types/ws": "^8.18.1",
87
+ "ajv": "8.20.0",
85
88
  "jsdom": "^27.4.0",
86
89
  "tsdown": "0.21.0-beta.2",
87
- "vitest": "^3.2.4",
88
- "xstate-v6": "npm:xstate@6.0.0-alpha.63",
89
90
  "typescript": "^5.9.3",
91
+ "vitest": "^3.2.4",
90
92
  "ws": "^8.19.0",
91
93
  "xstate": "^5.0.0",
92
- "@statelyai/api-contract": "0.5.6",
93
- "@statelyai/graph-tools": "0.9.4"
94
- },
95
- "engines": {
96
- "node": ">=22.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"
@@ -103,6 +103,9 @@
103
103
  "optional": true
104
104
  }
105
105
  },
106
+ "engines": {
107
+ "node": ">=22.4"
108
+ },
106
109
  "scripts": {
107
110
  "build": "tsdown",
108
111
  "test": "vitest run",
@@ -0,0 +1,674 @@
1
+ {
2
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
3
+ "title": "XState v6 machine definition (MachineJSON)",
4
+ "description": "The JSON-serializable XState machine definition accepted by createMachineFromConfig. Expressions use reserved @ keys: @exprLang on the machine and @expr/@code with optional @lang in value slots.",
5
+ "$ref": "#/$defs/machine",
6
+ "$defs": {
7
+ "jsonSchema": {
8
+ "type": "object",
9
+ "additionalProperties": true
10
+ },
11
+ "eventPayloadSchema": {
12
+ "allOf": [
13
+ {
14
+ "$ref": "#/$defs/jsonSchema"
15
+ },
16
+ {
17
+ "not": {
18
+ "type": "object",
19
+ "properties": {
20
+ "properties": {
21
+ "type": "object",
22
+ "required": ["type"]
23
+ }
24
+ },
25
+ "required": ["properties"]
26
+ }
27
+ }
28
+ ]
29
+ },
30
+ "expression": {
31
+ "type": "object",
32
+ "properties": {
33
+ "@expr": {
34
+ "type": "string"
35
+ },
36
+ "@lang": {
37
+ "type": "string"
38
+ }
39
+ },
40
+ "required": ["@expr"],
41
+ "additionalProperties": false
42
+ },
43
+ "code": {
44
+ "type": "object",
45
+ "properties": {
46
+ "@code": {
47
+ "type": "string"
48
+ },
49
+ "@lang": {
50
+ "type": "string"
51
+ }
52
+ },
53
+ "required": ["@code"],
54
+ "additionalProperties": false
55
+ },
56
+ "resolvable": {
57
+ "oneOf": [
58
+ {
59
+ "$ref": "#/$defs/expression"
60
+ },
61
+ {
62
+ "$ref": "#/$defs/code"
63
+ }
64
+ ]
65
+ },
66
+ "condition": {
67
+ "oneOf": [
68
+ {
69
+ "$ref": "#/$defs/resolvable"
70
+ },
71
+ {
72
+ "$ref": "#/$defs/guardObject"
73
+ }
74
+ ]
75
+ },
76
+ "guardObject": {
77
+ "type": "object",
78
+ "properties": {
79
+ "type": {
80
+ "type": "string"
81
+ },
82
+ "params": {}
83
+ },
84
+ "required": ["type"],
85
+ "additionalProperties": false
86
+ },
87
+ "actionObject": {
88
+ "type": "object",
89
+ "properties": {
90
+ "type": {
91
+ "type": "string"
92
+ }
93
+ },
94
+ "required": ["type"],
95
+ "additionalProperties": true
96
+ },
97
+ "action": {
98
+ "oneOf": [
99
+ {
100
+ "$ref": "#/$defs/actionObject"
101
+ },
102
+ {
103
+ "$ref": "#/$defs/resolvable"
104
+ }
105
+ ]
106
+ },
107
+ "actionList": {
108
+ "type": "array",
109
+ "items": {
110
+ "$ref": "#/$defs/action"
111
+ }
112
+ },
113
+ "transitionObject": {
114
+ "type": "object",
115
+ "properties": {
116
+ "target": {
117
+ "oneOf": [
118
+ {
119
+ "type": "string"
120
+ },
121
+ {
122
+ "type": "array",
123
+ "items": {
124
+ "type": "string"
125
+ }
126
+ }
127
+ ]
128
+ },
129
+ "actions": {
130
+ "$ref": "#/$defs/actionList"
131
+ },
132
+ "context": {
133
+ "type": "object"
134
+ },
135
+ "matches": {
136
+ "type": "object"
137
+ },
138
+ "guard": {
139
+ "$ref": "#/$defs/condition"
140
+ },
141
+ "input": {},
142
+ "description": {
143
+ "type": "string"
144
+ },
145
+ "reenter": {
146
+ "type": "boolean"
147
+ },
148
+ "meta": {
149
+ "type": "object"
150
+ }
151
+ },
152
+ "additionalProperties": false
153
+ },
154
+ "transition": {
155
+ "oneOf": [
156
+ {
157
+ "$ref": "#/$defs/transitionObject"
158
+ },
159
+ {
160
+ "$ref": "#/$defs/resolvable"
161
+ }
162
+ ]
163
+ },
164
+ "transitionOrArray": {
165
+ "oneOf": [
166
+ {
167
+ "$ref": "#/$defs/transition"
168
+ },
169
+ {
170
+ "type": "array",
171
+ "items": {
172
+ "$ref": "#/$defs/transition"
173
+ }
174
+ }
175
+ ]
176
+ },
177
+ "transitionMap": {
178
+ "type": "object",
179
+ "additionalProperties": {
180
+ "$ref": "#/$defs/transitionOrArray"
181
+ }
182
+ },
183
+ "choiceBranch": {
184
+ "type": "object",
185
+ "properties": {
186
+ "when": {
187
+ "$ref": "#/$defs/condition"
188
+ },
189
+ "target": {
190
+ "oneOf": [
191
+ {
192
+ "type": "string"
193
+ },
194
+ {
195
+ "type": "array",
196
+ "items": {
197
+ "type": "string"
198
+ }
199
+ }
200
+ ]
201
+ },
202
+ "context": {
203
+ "type": "object"
204
+ },
205
+ "input": {},
206
+ "description": {
207
+ "type": "string"
208
+ },
209
+ "reenter": {
210
+ "type": "boolean"
211
+ },
212
+ "meta": {
213
+ "type": "object"
214
+ }
215
+ },
216
+ "required": ["target"],
217
+ "additionalProperties": false
218
+ },
219
+ "choice": {
220
+ "oneOf": [
221
+ {
222
+ "type": "array",
223
+ "items": {
224
+ "$ref": "#/$defs/choiceBranch"
225
+ }
226
+ },
227
+ {
228
+ "$ref": "#/$defs/resolvable"
229
+ }
230
+ ]
231
+ },
232
+ "invokeObject": {
233
+ "type": "object",
234
+ "properties": {
235
+ "id": {
236
+ "type": "string"
237
+ },
238
+ "registryKey": {
239
+ "type": "string"
240
+ },
241
+ "src": {
242
+ "type": "string"
243
+ },
244
+ "input": {},
245
+ "onDone": {
246
+ "$ref": "#/$defs/transitionOrArray"
247
+ },
248
+ "onError": {
249
+ "$ref": "#/$defs/transitionOrArray"
250
+ },
251
+ "onSnapshot": {
252
+ "$ref": "#/$defs/transitionOrArray"
253
+ },
254
+ "onTimeout": {
255
+ "$ref": "#/$defs/transitionOrArray"
256
+ },
257
+ "timeout": {
258
+ "$ref": "#/$defs/duration"
259
+ }
260
+ },
261
+ "required": ["src"],
262
+ "additionalProperties": false
263
+ },
264
+ "invoke": {
265
+ "oneOf": [
266
+ {
267
+ "$ref": "#/$defs/invokeObject"
268
+ },
269
+ {
270
+ "type": "array",
271
+ "items": {
272
+ "$ref": "#/$defs/invokeObject"
273
+ }
274
+ }
275
+ ]
276
+ },
277
+ "duration": {
278
+ "oneOf": [
279
+ {
280
+ "type": "number"
281
+ },
282
+ {
283
+ "type": "string"
284
+ },
285
+ {
286
+ "$ref": "#/$defs/resolvable"
287
+ }
288
+ ]
289
+ },
290
+ "initial": {
291
+ "oneOf": [
292
+ {
293
+ "type": "string"
294
+ },
295
+ {
296
+ "type": "object",
297
+ "properties": {
298
+ "target": {
299
+ "type": "string"
300
+ },
301
+ "input": {}
302
+ },
303
+ "required": ["target"],
304
+ "additionalProperties": false
305
+ }
306
+ ]
307
+ },
308
+ "actionDefinitions": {
309
+ "type": "object",
310
+ "additionalProperties": {
311
+ "oneOf": [
312
+ {
313
+ "$ref": "#/$defs/action"
314
+ },
315
+ {
316
+ "$ref": "#/$defs/actionList"
317
+ }
318
+ ]
319
+ }
320
+ },
321
+ "guardDefinitions": {
322
+ "type": "object",
323
+ "additionalProperties": {
324
+ "type": "object",
325
+ "properties": {
326
+ "when": {
327
+ "$ref": "#/$defs/condition"
328
+ }
329
+ },
330
+ "required": ["when"],
331
+ "additionalProperties": false
332
+ }
333
+ },
334
+ "delayDefinitions": {
335
+ "type": "object",
336
+ "additionalProperties": {
337
+ "oneOf": [
338
+ {
339
+ "type": "number"
340
+ },
341
+ {
342
+ "type": "string"
343
+ },
344
+ {
345
+ "type": "object",
346
+ "properties": {
347
+ "duration": {
348
+ "$ref": "#/$defs/duration"
349
+ }
350
+ },
351
+ "required": ["duration"],
352
+ "additionalProperties": false
353
+ }
354
+ ]
355
+ }
356
+ },
357
+ "schemas": {
358
+ "type": "object",
359
+ "properties": {
360
+ "context": {
361
+ "$ref": "#/$defs/jsonSchema"
362
+ },
363
+ "events": {
364
+ "type": "object",
365
+ "additionalProperties": {
366
+ "$ref": "#/$defs/eventPayloadSchema"
367
+ }
368
+ },
369
+ "actions": {
370
+ "type": "object",
371
+ "additionalProperties": {
372
+ "type": "object",
373
+ "properties": {
374
+ "params": {
375
+ "$ref": "#/$defs/jsonSchema"
376
+ }
377
+ },
378
+ "required": ["params"],
379
+ "additionalProperties": false
380
+ }
381
+ },
382
+ "guards": {
383
+ "type": "object",
384
+ "additionalProperties": {
385
+ "type": "object",
386
+ "properties": {
387
+ "params": {
388
+ "$ref": "#/$defs/jsonSchema"
389
+ }
390
+ },
391
+ "required": ["params"],
392
+ "additionalProperties": false
393
+ }
394
+ },
395
+ "actors": {
396
+ "type": "object",
397
+ "additionalProperties": {
398
+ "type": "object",
399
+ "properties": {
400
+ "input": {
401
+ "$ref": "#/$defs/jsonSchema"
402
+ },
403
+ "output": {
404
+ "$ref": "#/$defs/jsonSchema"
405
+ },
406
+ "emitted": {
407
+ "type": "object",
408
+ "additionalProperties": {
409
+ "$ref": "#/$defs/eventPayloadSchema"
410
+ }
411
+ }
412
+ },
413
+ "additionalProperties": false
414
+ }
415
+ },
416
+ "emitted": {
417
+ "type": "object",
418
+ "additionalProperties": {
419
+ "$ref": "#/$defs/eventPayloadSchema"
420
+ }
421
+ },
422
+ "input": {
423
+ "$ref": "#/$defs/jsonSchema"
424
+ },
425
+ "output": {
426
+ "$ref": "#/$defs/jsonSchema"
427
+ },
428
+ "meta": {
429
+ "$ref": "#/$defs/jsonSchema"
430
+ },
431
+ "tags": {
432
+ "$ref": "#/$defs/jsonSchema"
433
+ },
434
+ "children": {
435
+ "type": "object",
436
+ "additionalProperties": {
437
+ "$ref": "#/$defs/jsonSchema"
438
+ }
439
+ }
440
+ },
441
+ "additionalProperties": true
442
+ },
443
+ "stateNode": {
444
+ "type": "object",
445
+ "properties": {
446
+ "@exprLang": {
447
+ "type": "string"
448
+ },
449
+ "id": {
450
+ "type": "string"
451
+ },
452
+ "key": {
453
+ "type": "string"
454
+ },
455
+ "type": {
456
+ "type": "string",
457
+ "enum": [
458
+ "atomic",
459
+ "compound",
460
+ "parallel",
461
+ "final",
462
+ "history",
463
+ "choice"
464
+ ]
465
+ },
466
+ "initial": {
467
+ "$ref": "#/$defs/initial"
468
+ },
469
+ "states": {
470
+ "type": "object",
471
+ "additionalProperties": {
472
+ "$ref": "#/$defs/stateNode"
473
+ }
474
+ },
475
+ "on": {
476
+ "$ref": "#/$defs/transitionMap"
477
+ },
478
+ "onError": {
479
+ "$ref": "#/$defs/transitionOrArray"
480
+ },
481
+ "after": {
482
+ "$ref": "#/$defs/transitionMap"
483
+ },
484
+ "always": {
485
+ "$ref": "#/$defs/transitionOrArray"
486
+ },
487
+ "choice": {
488
+ "$ref": "#/$defs/choice"
489
+ },
490
+ "route": {
491
+ "oneOf": [
492
+ {
493
+ "type": "object",
494
+ "properties": {
495
+ "description": {
496
+ "type": "string"
497
+ },
498
+ "reenter": {
499
+ "type": "boolean"
500
+ },
501
+ "meta": {
502
+ "type": "object"
503
+ },
504
+ "guard": {
505
+ "type": "string"
506
+ },
507
+ "input": {
508
+ "type": "object"
509
+ }
510
+ },
511
+ "additionalProperties": false
512
+ },
513
+ {
514
+ "$ref": "#/$defs/resolvable"
515
+ }
516
+ ]
517
+ },
518
+ "invoke": {
519
+ "$ref": "#/$defs/invoke"
520
+ },
521
+ "entry": {
522
+ "oneOf": [
523
+ {
524
+ "$ref": "#/$defs/actionList"
525
+ },
526
+ {
527
+ "$ref": "#/$defs/action"
528
+ }
529
+ ]
530
+ },
531
+ "exit": {
532
+ "oneOf": [
533
+ {
534
+ "$ref": "#/$defs/actionList"
535
+ },
536
+ {
537
+ "$ref": "#/$defs/action"
538
+ }
539
+ ]
540
+ },
541
+ "timeout": {
542
+ "$ref": "#/$defs/duration"
543
+ },
544
+ "onTimeout": {
545
+ "$ref": "#/$defs/transitionOrArray"
546
+ },
547
+ "meta": {
548
+ "type": "object"
549
+ },
550
+ "description": {
551
+ "type": "string"
552
+ },
553
+ "history": {
554
+ "type": "string",
555
+ "enum": ["shallow", "deep"]
556
+ },
557
+ "target": {
558
+ "oneOf": [
559
+ {
560
+ "type": "string",
561
+ "minLength": 1
562
+ },
563
+ {
564
+ "type": "array",
565
+ "minItems": 1,
566
+ "items": {
567
+ "type": "string",
568
+ "minLength": 1
569
+ }
570
+ }
571
+ ]
572
+ },
573
+ "output": {},
574
+ "input": {},
575
+ "tags": {
576
+ "oneOf": [
577
+ {
578
+ "type": "string"
579
+ },
580
+ {
581
+ "type": "array",
582
+ "items": {
583
+ "type": "string"
584
+ }
585
+ }
586
+ ]
587
+ },
588
+ "context": {
589
+ "type": "object"
590
+ },
591
+ "version": {
592
+ "type": "string"
593
+ },
594
+ "internalEvents": {
595
+ "type": "array",
596
+ "items": {
597
+ "type": "string"
598
+ }
599
+ },
600
+ "schemas": {
601
+ "$ref": "#/$defs/schemas"
602
+ },
603
+ "actions": {
604
+ "$ref": "#/$defs/actionDefinitions"
605
+ },
606
+ "guards": {
607
+ "$ref": "#/$defs/guardDefinitions"
608
+ },
609
+ "actors": {
610
+ "type": "object"
611
+ },
612
+ "delays": {
613
+ "$ref": "#/$defs/delayDefinitions"
614
+ }
615
+ },
616
+ "allOf": [
617
+ {
618
+ "if": {
619
+ "properties": {
620
+ "type": {
621
+ "const": "history"
622
+ }
623
+ },
624
+ "required": ["type"]
625
+ },
626
+ "then": {
627
+ "required": ["target"]
628
+ }
629
+ },
630
+ {
631
+ "if": {
632
+ "required": ["history"]
633
+ },
634
+ "then": {
635
+ "required": ["target"]
636
+ }
637
+ }
638
+ ],
639
+ "additionalProperties": false
640
+ },
641
+ "machine": {
642
+ "$ref": "#/$defs/stateNode"
643
+ }
644
+ },
645
+ "$id": "https://stately.ai/schemas/xstate-v6.json",
646
+ "examples": [
647
+ {
648
+ "initial": "idle",
649
+ "context": {
650
+ "count": 0
651
+ },
652
+ "states": {
653
+ "idle": {
654
+ "on": {
655
+ "INC": {
656
+ "target": "done",
657
+ "actions": [
658
+ {
659
+ "type": "@xstate.assign",
660
+ "context": {
661
+ "count": 1
662
+ }
663
+ }
664
+ ]
665
+ }
666
+ }
667
+ },
668
+ "done": {
669
+ "type": "final"
670
+ }
671
+ }
672
+ }
673
+ ]
674
+ }