@statelyai/sdk 0.35.0 → 0.36.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 +3 -0
- package/dist/assetStorage.d.mts +1 -1
- package/dist/{editor-sync-types-DNFk7Xtj.d.mts → editor-sync-types-U5uryWOk.d.mts} +2 -0
- package/dist/editorHostProtocol.d.mts +10 -4
- package/dist/embed.d.mts +1 -1
- package/dist/embed.mjs +1 -1
- package/dist/index.d.mts +4 -4
- package/dist/index.mjs +3 -3
- package/dist/{inspect-GSXRhzOx.mjs → inspect-BoMln78S.mjs} +1 -1
- package/dist/{inspect-DCdu0ST3.d.mts → inspect-Douvt5k_.d.mts} +1 -1
- package/dist/inspect.d.mts +2 -2
- package/dist/inspect.mjs +2 -2
- package/dist/{protocol-nOWsz3UV.d.mts → protocol-CP3DSl5u.d.mts} +26 -4
- package/dist/protocol.d.mts +1 -1
- package/dist/relay.d.mts +1 -1
- package/dist/{studio-Bn3alVku.mjs → studio-DhzM6zFx.mjs} +4 -2
- package/dist/{studio-3ujfe2z0.d.mts → studio-DvEgrtk1.d.mts} +2 -0
- package/dist/studio.d.mts +1 -1
- package/dist/studio.mjs +1 -1
- package/dist/{version-DECst76A.mjs → version-DS2izNeF.mjs} +1 -1
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -124,6 +124,7 @@ Key capabilities:
|
|
|
124
124
|
|
|
125
125
|
- **Mount or attach** to any container element or existing iframe
|
|
126
126
|
- **Two-way sync** - push machine configs in, get changes and saves back via event callbacks
|
|
127
|
+
- **Draft-aware events** - change callbacks report the visible graph, even when a retained draft has a separate source baseline
|
|
127
128
|
- **Export** to multiple formats: XState v5, XState v6 alpha, XState JSON, Mermaid, Redux, Zustand, ASL, SCXML, and more
|
|
128
129
|
- **Access policies** for read-only, no-export, no-AI, shallow-viewer embeds
|
|
129
130
|
- **Reference documents** supplied as ordered, read-only Markdown, code, or text
|
|
@@ -182,6 +183,8 @@ The client namespaces map one-to-one onto the server-owned `/api/v1` contract:
|
|
|
182
183
|
|
|
183
184
|
`machines.get(machineId)` preserves the stored `definition` and also exposes a
|
|
184
185
|
public `graph` property when the server can provide a canonical XGraph.
|
|
186
|
+
Pass that record's `updatedAt` as `expectedUpdatedAt` to reject a stale machine
|
|
187
|
+
update atomically.
|
|
185
188
|
|
|
186
189
|
`baseUrl` defaults to `https://editor.stately.ai`. Do not target
|
|
187
190
|
`stately.ai/registry` directly: Registry URLs are deprecated for clients, and
|
package/dist/assetStorage.d.mts
CHANGED
|
@@ -41,8 +41,10 @@ interface MachineSourceLocations {
|
|
|
41
41
|
root?: EditorSyncSourceLocation;
|
|
42
42
|
statesObject?: EditorSyncStateSourceLocation;
|
|
43
43
|
states: EditorSyncStateSourceLocation[];
|
|
44
|
+
dependencyUris?: string[];
|
|
44
45
|
staticValues?: Array<EditorSyncSourceLocation & {
|
|
45
46
|
value: string;
|
|
47
|
+
definitionUri?: string;
|
|
46
48
|
}>;
|
|
47
49
|
transitionFunctions?: Array<EditorSyncSourceLocation & {
|
|
48
50
|
symbol: string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Q as ProjectEmbedMachine, an as
|
|
2
|
-
import { a as MachineSourceLocations, t as EditorCapabilities } from "./editor-sync-types-
|
|
1
|
+
import { Q as ProjectEmbedMachine, an as PresentationMetadataInitializer, lt as ProjectWorkspaceConfig, on as EmbedPanelConfig } from "./protocol-CP3DSl5u.mjs";
|
|
2
|
+
import { a as MachineSourceLocations, t as EditorCapabilities } from "./editor-sync-types-U5uryWOk.mjs";
|
|
3
3
|
|
|
4
4
|
//#region src/editorHostProtocol.d.ts
|
|
5
5
|
declare const EDITOR_PROTOCOL_VERSION = 1;
|
|
@@ -24,13 +24,16 @@ type EditorHostInboundMessage = {
|
|
|
24
24
|
} | {
|
|
25
25
|
type: '@statelyai.loaded';
|
|
26
26
|
graph: unknown;
|
|
27
|
+
sourceBaselineGraph?: unknown;
|
|
27
28
|
machineId?: string;
|
|
28
29
|
sourceLocations?: MachineSourceLocations;
|
|
29
30
|
} | {
|
|
30
31
|
type: '@statelyai.change';
|
|
31
32
|
graph: unknown;
|
|
32
33
|
machineConfig: unknown;
|
|
33
|
-
machineId?: string;
|
|
34
|
+
machineId?: string; /** The editor has applied a host source refresh, not a visual edit. */
|
|
35
|
+
source?: 'external';
|
|
36
|
+
sourceBaselineGraph?: unknown;
|
|
34
37
|
patches?: unknown[];
|
|
35
38
|
sourceLocations?: MachineSourceLocations;
|
|
36
39
|
} | {
|
|
@@ -95,6 +98,7 @@ interface EditorHostInitOptions {
|
|
|
95
98
|
type EditorHostOutboundMessage = {
|
|
96
99
|
type: '@statelyai.init';
|
|
97
100
|
machine: unknown;
|
|
101
|
+
presentation?: PresentationMetadataInitializer;
|
|
98
102
|
format?: string;
|
|
99
103
|
mode?: 'editing' | 'viewing';
|
|
100
104
|
theme?: 'light' | 'dark';
|
|
@@ -134,7 +138,8 @@ type EditorHostOutboundMessage = {
|
|
|
134
138
|
} | {
|
|
135
139
|
type: '@statelyai.project.update';
|
|
136
140
|
machines: ProjectEmbedMachine[];
|
|
137
|
-
source?: 'external';
|
|
141
|
+
source?: 'external' | 'presentation';
|
|
142
|
+
updatedMachineId?: string;
|
|
138
143
|
currentMachineId?: string;
|
|
139
144
|
projectWorkspace?: ProjectWorkspaceConfig;
|
|
140
145
|
projectWorkspaceOpen?: boolean;
|
|
@@ -155,6 +160,7 @@ type EditorHostOutboundMessage = {
|
|
|
155
160
|
type: '@statelyai.update';
|
|
156
161
|
machine: unknown;
|
|
157
162
|
format?: string;
|
|
163
|
+
source?: 'presentation';
|
|
158
164
|
machineId?: string;
|
|
159
165
|
sourceLocations?: MachineSourceLocations;
|
|
160
166
|
} | {
|
package/dist/embed.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { n as ProfileManifest } from "./index-CoxF4Saw.mjs";
|
|
2
2
|
import { i as StatelyGraph } from "./graph-B6xUxqR5.mjs";
|
|
3
|
-
import { D as ExportCallOptions, F as InitOptions, G as MachineInitOptions, Gt as UploadResult, J as MachineVersionAutoSaveOptions, O as ExportFormat, Q as ProjectEmbedMachine, S as EmbedExtensionsManifest, Yt as ViewerOptions, _ as EmbedDocumentLanguage,
|
|
3
|
+
import { D as ExportCallOptions, F as InitOptions, G as MachineInitOptions, Gt as UploadResult, J as MachineVersionAutoSaveOptions, O as ExportFormat, Q as ProjectEmbedMachine, S as EmbedExtensionsManifest, Yt as ViewerOptions, _ as EmbedDocumentLanguage, at as ProjectWorkspaceAction, b as EmbedEventName, ct as ProjectWorkspaceCapabilities, d as CommentsConfig, dt as ProjectWorkspaceMachineOrigin, et as ProjectInitOptions, g as EmbedDocument, k as ExportFormatMap, lt as ProjectWorkspaceConfig, m as EditorCapabilities, on as EmbedPanelConfig, ot as ProjectWorkspaceActionIcon, pt as ProjectWorkspaceProject, q as MachineSourceLocations, r as CapabilityDeniedEvent, sn as EmbedPanelPosition, ut as ProjectWorkspaceMachine, v as EmbedEventHandler, w as EmbedMode, y as EmbedEventMap } from "./protocol-CP3DSl5u.mjs";
|
|
4
4
|
import { AssetUploadAdapter } from "./assetStorage.mjs";
|
|
5
5
|
|
|
6
6
|
//#region src/embed.d.ts
|
package/dist/embed.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import "./protocol-BsBGRISR.mjs";
|
|
2
|
-
import { c as createPendingExportManager, l as settingsWithViewMode, r as createPostMessageTransport, s as createEventRegistry, t as SDK_VERSION, u as toInitMessage } from "./version-
|
|
2
|
+
import { c as createPendingExportManager, l as settingsWithViewMode, r as createPostMessageTransport, s as createEventRegistry, t as SDK_VERSION, u as toInitMessage } from "./version-DS2izNeF.mjs";
|
|
3
3
|
import { EDITOR_PROTOCOL_VERSION } from "./editorHostProtocol.mjs";
|
|
4
4
|
|
|
5
5
|
//#region src/embed.ts
|
package/dist/index.d.mts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { StatelyApiClientOptions, StatelyApiError, StatelyApiUrlOptions, createStatelyApiClient, createStatelyApiUrl } from "./api.mjs";
|
|
2
2
|
import { o as GraphPatch, r as ActionLocation } from "./index-CoxF4Saw.mjs";
|
|
3
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-B6xUxqR5.mjs";
|
|
4
|
-
import { $t as createInspectionRoomUrls, B as InspectionSentEvent, D as ExportCallOptions, F as InitOptions, Gt as UploadResult, H as InspectorLoadedEvent, J as MachineVersionAutoSaveOptions, L as InspectionAction, M as INSPECTION_PROTOCOL_VERSION, N as INSPECTION_ROOM_QUERY_PARAM, O as ExportFormat, Q as ProjectEmbedMachine, Qt as createInspectionActorId, U as InspectorSettings, V as InspectionTakenTransition, Yt as ViewerOptions, Zt as assertEmbedExamples, _ as EmbedDocumentLanguage, an as
|
|
4
|
+
import { $t as createInspectionRoomUrls, B as InspectionSentEvent, D as ExportCallOptions, F as InitOptions, Gt as UploadResult, H as InspectorLoadedEvent, J as MachineVersionAutoSaveOptions, L as InspectionAction, M as INSPECTION_PROTOCOL_VERSION, N as INSPECTION_ROOM_QUERY_PARAM, O as ExportFormat, Q as ProjectEmbedMachine, Qt as createInspectionActorId, U as InspectorSettings, V as InspectionTakenTransition, Yt as ViewerOptions, Zt as assertEmbedExamples, _ as EmbedDocumentLanguage, an as PresentationMetadataInitializer, at as ProjectWorkspaceAction, b as EmbedEventName, ct as ProjectWorkspaceCapabilities, d as CommentsConfig, dt as ProjectWorkspaceMachineOrigin, en as getInspectionRoomId, f as EMBED_DOCUMENT_LANGUAGES, g as EmbedDocument, in as resolveInspectorSettings, k as ExportFormatMap, lt as ProjectWorkspaceConfig, m as EditorCapabilities, n as CapabilityDeniedCapability, nn as isEmbedExampleMachine, on as EmbedPanelConfig, ot as ProjectWorkspaceActionIcon, p as EMBED_DOCUMENT_LIMITS, pt as ProjectWorkspaceProject, r as CapabilityDeniedEvent, rn as mergeInspectorSettings, sn as EmbedPanelPosition, tn as isEmbedExample, ut as ProjectWorkspaceMachine, v as EmbedEventHandler, w as EmbedMode, x as EmbedExample, y as EmbedEventMap } from "./protocol-CP3DSl5u.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, 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-
|
|
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-
|
|
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-Douvt5k_.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-DvEgrtk1.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 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 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 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 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 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
|
-
import { n as StudioApiError, r as createStatelyClient, t as DEFAULT_STATELY_BASE_URL } from "./studio-
|
|
1
|
+
import { n as StudioApiError, r as createStatelyClient, t as DEFAULT_STATELY_BASE_URL } from "./studio-DhzM6zFx.mjs";
|
|
2
2
|
import { c as createInspectionRoomUrls, d as isEmbedExampleMachine, f as mergeInspectorSettings, i as INSPECTION_ROOM_QUERY_PARAM, l as getInspectionRoomId, n as EMBED_DOCUMENT_LIMITS, o as assertEmbedExamples, p as resolveInspectorSettings, r as INSPECTION_PROTOCOL_VERSION, s as createInspectionActorId, t as EMBED_DOCUMENT_LANGUAGES, u as isEmbedExample } from "./protocol-BsBGRISR.mjs";
|
|
3
|
-
import { i as createWebSocketTransport, r as createPostMessageTransport } from "./version-
|
|
3
|
+
import { i as createWebSocketTransport, r as createPostMessageTransport } from "./version-DS2izNeF.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-
|
|
7
|
+
import { n as createStatelyInspector, t as createInspector } from "./inspect-BoMln78S.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,5 +1,5 @@
|
|
|
1
1
|
import { c as createInspectionRoomUrls, f as mergeInspectorSettings, l as getInspectionRoomId, p as resolveInspectorSettings, r as INSPECTION_PROTOCOL_VERSION } from "./protocol-BsBGRISR.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-
|
|
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-DS2izNeF.mjs";
|
|
3
3
|
|
|
4
4
|
//#region src/openBrowser.ts
|
|
5
5
|
async function openBrowser(url) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { B as InspectionSentEvent, D as ExportCallOptions, H as InspectorLoadedEvent, K as MachinePayload, L as InspectionAction, O as ExportFormat, R as InspectionClientMetadata, U as InspectorSettings, V as InspectionTakenTransition, Yt as ViewerOptions, k as ExportFormatMap, mt as ProtocolMessage, y as EmbedEventMap } from "./protocol-
|
|
1
|
+
import { B as InspectionSentEvent, D as ExportCallOptions, H as InspectorLoadedEvent, K as MachinePayload, L as InspectionAction, O as ExportFormat, R as InspectionClientMetadata, U as InspectorSettings, V as InspectionTakenTransition, Yt as ViewerOptions, k as ExportFormatMap, mt as ProtocolMessage, y as EmbedEventMap } from "./protocol-CP3DSl5u.mjs";
|
|
2
2
|
|
|
3
3
|
//#region src/transport.d.ts
|
|
4
4
|
interface TransportFailure {
|
package/dist/inspect.d.mts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { B as InspectionSentEvent, D as ExportCallOptions, H as InspectorLoadedEvent, K as MachinePayload, L as InspectionAction, O as ExportFormat, U as InspectorSettings, V as InspectionTakenTransition, Yt as ViewerOptions,
|
|
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-
|
|
1
|
+
import { B as InspectionSentEvent, D as ExportCallOptions, H as InspectorLoadedEvent, K as MachinePayload, L as InspectionAction, O as ExportFormat, U as InspectorSettings, V as InspectionTakenTransition, Yt as ViewerOptions, b as EmbedEventName, g as EmbedDocument, k as ExportFormatMap, m as EditorCapabilities, on as EmbedPanelConfig, v as EmbedEventHandler, w as EmbedMode, y as EmbedEventMap } from "./protocol-CP3DSl5u.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-Douvt5k_.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-BsBGRISR.mjs";
|
|
2
|
-
import "./version-
|
|
3
|
-
import { n as createStatelyInspector, t as createInspector } from "./inspect-
|
|
2
|
+
import "./version-DS2izNeF.mjs";
|
|
3
|
+
import { n as createStatelyInspector, t as createInspector } from "./inspect-BoMln78S.mjs";
|
|
4
4
|
|
|
5
5
|
export { createInspector, createStatelyInspector };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { n as ProfileManifest } from "./index-CoxF4Saw.mjs";
|
|
2
|
-
import { i as StatelyGraph } from "./graph-B6xUxqR5.mjs";
|
|
3
|
-
import { a as MachineSourceLocations$1, i as EditorSyncStateSourceLocation, n as EditorSyncSourceLocation, r as EditorSyncSourceRange, t as EditorCapabilities$1 } from "./editor-sync-types-
|
|
2
|
+
import { b as DigraphConfig, i as StatelyGraph } from "./graph-B6xUxqR5.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";
|
|
4
4
|
|
|
5
5
|
//#region src/embedPanel.d.ts
|
|
6
6
|
type EmbedPanelPosition = 'left' | 'right' | 'bottom';
|
|
@@ -14,6 +14,16 @@ interface EmbedPanelConfig {
|
|
|
14
14
|
initiallyOpen?: boolean;
|
|
15
15
|
}
|
|
16
16
|
//#endregion
|
|
17
|
+
//#region src/presentationMetadataTypes.d.ts
|
|
18
|
+
/** Presentation supplied by a source host before the editor mounts. */
|
|
19
|
+
type PresentationMetadataInitializer = {
|
|
20
|
+
type: 'overlay';
|
|
21
|
+
overlay: unknown;
|
|
22
|
+
} | {
|
|
23
|
+
type: 'studio';
|
|
24
|
+
definition: DigraphConfig;
|
|
25
|
+
};
|
|
26
|
+
//#endregion
|
|
17
27
|
//#region src/inspectorSettings.d.ts
|
|
18
28
|
/** Also filters untrusted wire data to the inspection presentation subset. */
|
|
19
29
|
declare function mergeInspectorSettings(previous: InspectorSettings, value: unknown): InspectorSettings;
|
|
@@ -62,6 +72,8 @@ interface ProjectEmbedMachine {
|
|
|
62
72
|
updatedAt?: number;
|
|
63
73
|
origin?: ProjectWorkspaceMachineOrigin;
|
|
64
74
|
machine: unknown;
|
|
75
|
+
/** Presentation applied to the converted graph before the editor mounts. */
|
|
76
|
+
presentation?: PresentationMetadataInitializer;
|
|
65
77
|
/** Source format used by source-backed project hosts. */
|
|
66
78
|
format?: string;
|
|
67
79
|
/** Per-machine writeback locations used by source-backed project hosts. */
|
|
@@ -383,6 +395,8 @@ interface SystemLoadedMessage extends InspectorLoadedEvent {
|
|
|
383
395
|
}
|
|
384
396
|
interface MachineInitOptions extends ViewerOptions {
|
|
385
397
|
machine: unknown;
|
|
398
|
+
/** Presentation applied to the converted graph before the editor mounts. */
|
|
399
|
+
presentation?: PresentationMetadataInitializer;
|
|
386
400
|
format?: string;
|
|
387
401
|
extensions?: EmbedExtensionsManifest;
|
|
388
402
|
mode?: EmbedMode;
|
|
@@ -480,7 +494,9 @@ interface ProjectInitMessage extends ProjectInitOptions {
|
|
|
480
494
|
interface ProjectUpdateMessage {
|
|
481
495
|
type: '@statelyai.project.update';
|
|
482
496
|
machines: ProjectEmbedMachine[];
|
|
483
|
-
source?: 'external';
|
|
497
|
+
source?: 'external' | 'presentation';
|
|
498
|
+
/** Machine whose source was successfully refreshed; absent for metadata-only updates. */
|
|
499
|
+
updatedMachineId?: string;
|
|
484
500
|
currentMachineId?: string;
|
|
485
501
|
commentsByMachineId?: Record<string, CommentsConfig>;
|
|
486
502
|
projectWorkspace?: ProjectWorkspaceConfig;
|
|
@@ -657,6 +673,8 @@ interface EditorHandshakeMessage {
|
|
|
657
673
|
interface LoadedMessage {
|
|
658
674
|
type: '@statelyai.loaded';
|
|
659
675
|
graph: StatelyGraph;
|
|
676
|
+
/** Source version beneath a restored visual draft. */
|
|
677
|
+
sourceBaselineGraph?: StatelyGraph;
|
|
660
678
|
machineId?: string;
|
|
661
679
|
sourceLocations?: MachineSourceLocations;
|
|
662
680
|
}
|
|
@@ -665,6 +683,10 @@ interface ChangeMessage {
|
|
|
665
683
|
graph: StatelyGraph;
|
|
666
684
|
machineConfig: unknown;
|
|
667
685
|
machineId?: string;
|
|
686
|
+
/** The editor has applied a host source refresh, not a visual edit. */
|
|
687
|
+
source?: 'external';
|
|
688
|
+
/** Source version beneath the visible graph when a draft is retained. */
|
|
689
|
+
sourceBaselineGraph?: StatelyGraph;
|
|
668
690
|
patches?: unknown[];
|
|
669
691
|
sourceLocations?: MachineSourceLocations;
|
|
670
692
|
}
|
|
@@ -834,4 +856,4 @@ declare const PREFIX = "@statelyai.";
|
|
|
834
856
|
/** Current WebSocket inspection protocol version. */
|
|
835
857
|
declare const INSPECTION_PROTOCOL_VERSION = 2;
|
|
836
858
|
//#endregion
|
|
837
|
-
export { ProjectInitMessage as $, createInspectionRoomUrls as $t, ExtensionCallMessage as A, StateSourceLocation as At, InspectionSentEvent as B, UpdateMessage as Bt, EmbedFormatManifest as C, SessionMessage as Ct, ExportCallOptions as D, SetThemeMessage as Dt, ErrorMessage as E, SetSettingsMessage as Et, InitOptions as F, SystemInitMessage as Ft, MachineInitOptions as G, UploadResult as Gt, InspectorLoadedEvent as H, UploadFileInfo as Ht, InspectSnapshotMessage as I, SystemLoadedMessage as It, MachineVersionAutoSaveOptions as J, ViewModeChangedMessage as Jt, MachinePayload as K, ValidationIssue as Kt, InspectionAction as L, SystemSelectActorMessage as Lt, INSPECTION_PROTOCOL_VERSION as M, SystemActorRegisteredMessage as Mt, INSPECTION_ROOM_QUERY_PARAM as N, SystemActorSnapshotMessage as Nt, ExportFormat as O, SourceLocation as Ot, InitMessage as P, SystemActorStoppedMessage as Pt, ProjectEmbedMachine as Q, createInspectionActorId as Qt, InspectionClientMetadata as R, ToastDismissMessage as Rt, EmbedExtensionsManifest as S, SavedMessage as St, ErrorCode as T, SetModeMessage as Tt, InspectorSettings as U, UploadRequestMessage as Ut, InspectionTakenTransition as V, UploadCapabilitiesMessage as Vt, LoadedMessage as W, UploadResponseMessage as Wt, PREFIX as X, VizMessage as Xt, ModeChangedMessage as Y, ViewerOptions as Yt, PanelChangedMessage as Z, assertEmbedExamples as Zt, EmbedDocumentLanguage as _, RegisterMessage as _t, ChangeMessage as a,
|
|
859
|
+
export { ProjectInitMessage as $, createInspectionRoomUrls as $t, ExtensionCallMessage as A, StateSourceLocation as At, InspectionSentEvent as B, UpdateMessage as Bt, EmbedFormatManifest as C, SessionMessage as Ct, ExportCallOptions as D, SetThemeMessage as Dt, ErrorMessage as E, SetSettingsMessage as Et, InitOptions as F, SystemInitMessage as Ft, MachineInitOptions as G, UploadResult as Gt, InspectorLoadedEvent as H, UploadFileInfo as Ht, InspectSnapshotMessage as I, SystemLoadedMessage as It, MachineVersionAutoSaveOptions as J, ViewModeChangedMessage as Jt, MachinePayload as K, ValidationIssue as Kt, InspectionAction as L, SystemSelectActorMessage as Lt, INSPECTION_PROTOCOL_VERSION as M, SystemActorRegisteredMessage as Mt, INSPECTION_ROOM_QUERY_PARAM as N, SystemActorSnapshotMessage as Nt, ExportFormat as O, SourceLocation as Ot, InitMessage as P, SystemActorStoppedMessage as Pt, ProjectEmbedMachine as Q, createInspectionActorId as Qt, InspectionClientMetadata as R, ToastDismissMessage as Rt, EmbedExtensionsManifest as S, SavedMessage as St, ErrorCode as T, SetModeMessage as Tt, InspectorSettings as U, UploadRequestMessage as Ut, InspectionTakenTransition as V, UploadCapabilitiesMessage as Vt, LoadedMessage as W, UploadResponseMessage as Wt, PREFIX as X, VizMessage as Xt, ModeChangedMessage as Y, ViewerOptions as Yt, PanelChangedMessage as Z, assertEmbedExamples as Zt, EmbedDocumentLanguage as _, RegisterMessage as _t, ChangeMessage as a, PresentationMetadataInitializer as an, ProjectWorkspaceAction as at, EmbedEventName as b, RetrievedMessage as bt, ClipboardReadResponseMessage as c, ProjectWorkspaceCapabilities as ct, CommentsConfig as d, ProjectWorkspaceMachineOrigin as dt, getInspectionRoomId as en, ProjectInitOptions as et, EMBED_DOCUMENT_LANGUAGES as f, ProjectWorkspaceOpenChangedMessage as ft, EmbedDocument as g, ReadyMessage as gt, EditorHandshakeMessage as h, ReadOnlyReason as ht, CapabilityDeniedMessage as i, resolveInspectorSettings as in, ProjectUpdateMessage as it, ExtensionResultMessage as j, SystemActorEventMessage as jt, ExportFormatMap as k, SourceRange as kt, ClipboardWriteMessage as l, ProjectWorkspaceConfig as lt, EditorCapabilities as m, ProtocolMessage as mt, CapabilityDeniedCapability as n, isEmbedExampleMachine as nn, ProjectSelectMachineMessage as nt, ClientMessage as o, EmbedPanelConfig as on, ProjectWorkspaceActionIcon as ot, EMBED_DOCUMENT_LIMITS as p, ProjectWorkspaceProject as pt, MachineSourceLocations as q, VersionSaveRequestedMessage as qt, CapabilityDeniedEvent as r, mergeInspectorSettings as rn, ProjectSetWorkspaceOpenMessage as rt, ClipboardReadMessage as s, EmbedPanelPosition as sn, ProjectWorkspaceActionMessage as st, ActorSystemEntry as t, isEmbedExample as tn, ProjectMachineSelectedMessage as tt, ClipboardWriteResponseMessage as u, ProjectWorkspaceMachine as ut, EmbedEventHandler as v, RegisteredMessage as vt, EmbedMode as w, SetApiKeyMessage as wt, EmbedExample as x, SaveMessage as xt, EmbedEventMap as y, RetrieveMessage as yt, InspectionRoomUrls as z, ToastMessage as zt };
|
package/dist/protocol.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { $ as ProjectInitMessage, $t as createInspectionRoomUrls, A as ExtensionCallMessage, At as StateSourceLocation, B as InspectionSentEvent, Bt as UpdateMessage, C as EmbedFormatManifest, Ct as SessionMessage, D as ExportCallOptions, Dt as SetThemeMessage, E as ErrorMessage, Et as SetSettingsMessage, F as InitOptions, Ft as SystemInitMessage, G as MachineInitOptions, Gt as UploadResult, H as InspectorLoadedEvent, Ht as UploadFileInfo, I as InspectSnapshotMessage, It as SystemLoadedMessage, J as MachineVersionAutoSaveOptions, Jt as ViewModeChangedMessage, K as MachinePayload, Kt as ValidationIssue, L as InspectionAction, Lt as SystemSelectActorMessage, M as INSPECTION_PROTOCOL_VERSION, Mt as SystemActorRegisteredMessage, N as INSPECTION_ROOM_QUERY_PARAM, Nt as SystemActorSnapshotMessage, O as ExportFormat, Ot as SourceLocation, P as InitMessage, Pt as SystemActorStoppedMessage, Q as ProjectEmbedMachine, Qt as createInspectionActorId, R as InspectionClientMetadata, Rt as ToastDismissMessage, S as EmbedExtensionsManifest, St as SavedMessage, T as ErrorCode, Tt as SetModeMessage, U as InspectorSettings, Ut as UploadRequestMessage, V as InspectionTakenTransition, Vt as UploadCapabilitiesMessage, W as LoadedMessage, Wt as UploadResponseMessage, X as PREFIX, Xt as VizMessage, Y as ModeChangedMessage, Yt as ViewerOptions, Z as PanelChangedMessage, Zt as assertEmbedExamples, _ as EmbedDocumentLanguage, _t as RegisterMessage, a as ChangeMessage,
|
|
1
|
+
import { $ as ProjectInitMessage, $t as createInspectionRoomUrls, A as ExtensionCallMessage, At as StateSourceLocation, B as InspectionSentEvent, Bt as UpdateMessage, C as EmbedFormatManifest, Ct as SessionMessage, D as ExportCallOptions, Dt as SetThemeMessage, E as ErrorMessage, Et as SetSettingsMessage, F as InitOptions, Ft as SystemInitMessage, G as MachineInitOptions, Gt as UploadResult, H as InspectorLoadedEvent, Ht as UploadFileInfo, I as InspectSnapshotMessage, It as SystemLoadedMessage, J as MachineVersionAutoSaveOptions, Jt as ViewModeChangedMessage, K as MachinePayload, Kt as ValidationIssue, L as InspectionAction, Lt as SystemSelectActorMessage, M as INSPECTION_PROTOCOL_VERSION, Mt as SystemActorRegisteredMessage, N as INSPECTION_ROOM_QUERY_PARAM, Nt as SystemActorSnapshotMessage, O as ExportFormat, Ot as SourceLocation, P as InitMessage, Pt as SystemActorStoppedMessage, Q as ProjectEmbedMachine, Qt as createInspectionActorId, R as InspectionClientMetadata, Rt as ToastDismissMessage, S as EmbedExtensionsManifest, St as SavedMessage, T as ErrorCode, Tt as SetModeMessage, U as InspectorSettings, Ut as UploadRequestMessage, V as InspectionTakenTransition, Vt as UploadCapabilitiesMessage, W as LoadedMessage, Wt as UploadResponseMessage, X as PREFIX, Xt as VizMessage, Y as ModeChangedMessage, Yt as ViewerOptions, Z as PanelChangedMessage, Zt as assertEmbedExamples, _ as EmbedDocumentLanguage, _t as RegisterMessage, a as ChangeMessage, at as ProjectWorkspaceAction, b as EmbedEventName, bt as RetrievedMessage, c as ClipboardReadResponseMessage, ct as ProjectWorkspaceCapabilities, d as CommentsConfig, dt as ProjectWorkspaceMachineOrigin, en as getInspectionRoomId, et as ProjectInitOptions, f as EMBED_DOCUMENT_LANGUAGES, ft as ProjectWorkspaceOpenChangedMessage, g as EmbedDocument, gt as ReadyMessage, h as EditorHandshakeMessage, ht as ReadOnlyReason, i as CapabilityDeniedMessage, in as resolveInspectorSettings, it as ProjectUpdateMessage, j as ExtensionResultMessage, jt as SystemActorEventMessage, k as ExportFormatMap, kt as SourceRange, l as ClipboardWriteMessage, lt as ProjectWorkspaceConfig, m as EditorCapabilities, mt as ProtocolMessage, n as CapabilityDeniedCapability, nn as isEmbedExampleMachine, nt as ProjectSelectMachineMessage, o as ClientMessage, on as EmbedPanelConfig, ot as ProjectWorkspaceActionIcon, p as EMBED_DOCUMENT_LIMITS, pt as ProjectWorkspaceProject, q as MachineSourceLocations, qt as VersionSaveRequestedMessage, r as CapabilityDeniedEvent, rn as mergeInspectorSettings, rt as ProjectSetWorkspaceOpenMessage, s as ClipboardReadMessage, sn as EmbedPanelPosition, st as ProjectWorkspaceActionMessage, t as ActorSystemEntry, tn as isEmbedExample, tt as ProjectMachineSelectedMessage, u as ClipboardWriteResponseMessage, ut as ProjectWorkspaceMachine, v as EmbedEventHandler, vt as RegisteredMessage, w as EmbedMode, wt as SetApiKeyMessage, x as EmbedExample, xt as SaveMessage, y as EmbedEventMap, yt as RetrieveMessage, z as InspectionRoomUrls, zt as ToastMessage } from "./protocol-CP3DSl5u.mjs";
|
|
2
2
|
export { ActorSystemEntry, 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, 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, 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, mergeInspectorSettings, resolveInspectorSettings };
|
package/dist/relay.d.mts
CHANGED
|
@@ -14247,7 +14247,8 @@ const machinesCreateRequestSchema = object({
|
|
|
14247
14247
|
});
|
|
14248
14248
|
const machinesUpdateRequestSchema = object({
|
|
14249
14249
|
name: string$1().min(1).optional(),
|
|
14250
|
-
definition: unknown().optional()
|
|
14250
|
+
definition: unknown().optional(),
|
|
14251
|
+
expectedUpdatedAt: string$1().min(1).optional()
|
|
14251
14252
|
}).refine((value) => value.name !== void 0 || value.definition !== void 0, { message: "At least one of `name` or `definition` is required." });
|
|
14252
14253
|
/**
|
|
14253
14254
|
* `status` is canonical lowercase; providers map it to their own casing.
|
|
@@ -14548,7 +14549,8 @@ function createStatelyClient(options = {}) {
|
|
|
14548
14549
|
const requestOptions = typeof machineIdOrInput === "string" ? maybeOptions : inputOrOptions;
|
|
14549
14550
|
return request(`/machines/${encodeURIComponent(machineId)}`, jsonInit("PATCH", {
|
|
14550
14551
|
...input.name !== void 0 ? { name: input.name } : {},
|
|
14551
|
-
...input.definition !== void 0 ? { definition: input.definition } : {}
|
|
14552
|
+
...input.definition !== void 0 ? { definition: input.definition } : {},
|
|
14553
|
+
...input.expectedUpdatedAt !== void 0 ? { expectedUpdatedAt: input.expectedUpdatedAt } : {}
|
|
14552
14554
|
}), machineSchema, requestOptions).then((machine) => withMachineAlias(machine));
|
|
14553
14555
|
}
|
|
14554
14556
|
};
|
|
@@ -343,6 +343,8 @@ type CreateMachineTemplate = 'blank' | 'starter';
|
|
|
343
343
|
interface UpdateMachineInput<TDefinition = unknown> {
|
|
344
344
|
name?: string;
|
|
345
345
|
definition?: TDefinition;
|
|
346
|
+
/** Reject the write if the machine changed after this timestamp. */
|
|
347
|
+
expectedUpdatedAt?: string;
|
|
346
348
|
}
|
|
347
349
|
/** @deprecated Pass the machine id as the first argument instead. */
|
|
348
350
|
interface LegacyUpdateMachineInput<TDefinition = unknown> extends UpdateMachineInput<TDefinition> {
|
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-
|
|
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-DvEgrtk1.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 };
|
package/dist/studio.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as StudioApiError, r as createStatelyClient, t as DEFAULT_STATELY_BASE_URL } from "./studio-
|
|
1
|
+
import { n as StudioApiError, r as createStatelyClient, t as DEFAULT_STATELY_BASE_URL } from "./studio-DhzM6zFx.mjs";
|
|
2
2
|
import "./auth.mjs";
|
|
3
3
|
|
|
4
4
|
export { DEFAULT_STATELY_BASE_URL, StudioApiError, createStatelyClient };
|
|
@@ -378,7 +378,7 @@ function createWebSocketTransport(options) {
|
|
|
378
378
|
|
|
379
379
|
//#endregion
|
|
380
380
|
//#region src/version.ts
|
|
381
|
-
const SDK_VERSION = "0.
|
|
381
|
+
const SDK_VERSION = "0.36.0";
|
|
382
382
|
function inspectionRuntime() {
|
|
383
383
|
if (typeof window !== "undefined") return "browser";
|
|
384
384
|
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.
|
|
3
|
+
"version": "0.36.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"bin": {
|
|
6
6
|
"stately-sdk": "./dist/bin.mjs"
|
|
@@ -89,8 +89,8 @@
|
|
|
89
89
|
"typescript": "^5.9.3",
|
|
90
90
|
"ws": "^8.19.0",
|
|
91
91
|
"xstate": "^5.0.0",
|
|
92
|
-
"@statelyai/
|
|
93
|
-
"@statelyai/
|
|
92
|
+
"@statelyai/graph-tools": "0.9.1",
|
|
93
|
+
"@statelyai/api-contract": "0.5.3"
|
|
94
94
|
},
|
|
95
95
|
"engines": {
|
|
96
96
|
"node": ">=22.4"
|