@statelyai/sdk 0.35.0 → 0.37.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +31 -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 +33 -2
- package/dist/embed.mjs +27 -1
- package/dist/index.d.mts +5 -5
- package/dist/index.mjs +3 -3
- package/dist/{inspect-DCdu0ST3.d.mts → inspect-Douvt5k_.d.mts} +1 -1
- package/dist/{inspect-GSXRhzOx.mjs → inspect-wHowbxnf.mjs} +16 -6
- 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-olQZ7Dn0.mjs} +1 -1
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -53,8 +53,36 @@ The embed `apiKey` is sent to the iframe over `postMessage` after the editor
|
|
|
53
53
|
handshake; it is not included in the iframe URL. Call `embed.setApiKey(token)`
|
|
54
54
|
when the host refreshes the access token.
|
|
55
55
|
|
|
56
|
+
<!-- source-preserving embed.planSourceUpdate from src/embed.ts and editor-sync route -->
|
|
57
|
+
|
|
58
|
+
For a Git-backed XState JSON or JSONC file, keep the exact blob text in the host.
|
|
59
|
+
On save, pass the edited graph and original blob text to the configured editor:
|
|
60
|
+
|
|
61
|
+
```ts
|
|
62
|
+
const plan = await embed.planSourceUpdate({
|
|
63
|
+
source: { fileName: 'machines/checkout.jsonc', text: originalBlobText },
|
|
64
|
+
nextGraph: savedGraph,
|
|
65
|
+
});
|
|
66
|
+
if (plan.status === 'changed') {
|
|
67
|
+
// Commit plan.text only if the Git blob revision still matches the one read.
|
|
68
|
+
// Advance originalBlobText and the host's graph baseline after commit succeeds.
|
|
69
|
+
}
|
|
70
|
+
if (plan.status === 'unsupported') console.warn(plan.reason);
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
JSON and JSONC contain one machine; omit `source.machineIndex` for this method.
|
|
74
|
+
The call returns the complete updated text, focused zero-based UTF-16
|
|
75
|
+
`edits`, and a semantic graph `diff`. The graph diff is not a Git patch; GitLab
|
|
76
|
+
constructs its merge-request diff from the committed text. The call does not
|
|
77
|
+
read or write Git. It requires the editor-sync endpoint on the editor at
|
|
78
|
+
`baseUrl`, an allowed API origin, and editor-sync write access. This one-file
|
|
79
|
+
method supports XState `.json` and `.jsonc` sources; imported TypeScript
|
|
80
|
+
definitions require the document-based Editor Sync parse/apply APIs.
|
|
81
|
+
|
|
56
82
|
Use `viewMode: 'list'` on `createStatelyEmbed` to add `?view=list` to the
|
|
57
83
|
iframe URL, or subscribe to `viewModeChanged` when the user switches views.
|
|
84
|
+
Pass the initial `theme` or `settings.appearance.colorMode` when creating the
|
|
85
|
+
embed so its loading screen uses that color mode before initialization.
|
|
58
86
|
|
|
59
87
|
Custom profiles and formats can be supplied when the embed is created. Their
|
|
60
88
|
serializable manifests are sent to the iframe; detector, importer, exporter,
|
|
@@ -124,6 +152,7 @@ Key capabilities:
|
|
|
124
152
|
|
|
125
153
|
- **Mount or attach** to any container element or existing iframe
|
|
126
154
|
- **Two-way sync** - push machine configs in, get changes and saves back via event callbacks
|
|
155
|
+
- **Draft-aware events** - change callbacks report the visible graph, even when a retained draft has a separate source baseline
|
|
127
156
|
- **Export** to multiple formats: XState v5, XState v6 alpha, XState JSON, Mermaid, Redux, Zustand, ASL, SCXML, and more
|
|
128
157
|
- **Access policies** for read-only, no-export, no-AI, shallow-viewer embeds
|
|
129
158
|
- **Reference documents** supplied as ordered, read-only Markdown, code, or text
|
|
@@ -182,6 +211,8 @@ The client namespaces map one-to-one onto the server-owned `/api/v1` contract:
|
|
|
182
211
|
|
|
183
212
|
`machines.get(machineId)` preserves the stored `definition` and also exposes a
|
|
184
213
|
public `graph` property when the server can provide a canonical XGraph.
|
|
214
|
+
Pass that record's `updatedAt` as `expectedUpdatedAt` to reject a stale machine
|
|
215
|
+
update atomically.
|
|
185
216
|
|
|
186
217
|
`baseUrl` defaults to `https://editor.stately.ai`. Do not target
|
|
187
218
|
`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,7 +1,8 @@
|
|
|
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
|
+
import { GraphDiff } from "@statelyai/graph";
|
|
5
6
|
|
|
6
7
|
//#region src/embed.d.ts
|
|
7
8
|
interface AssetConfig {
|
|
@@ -37,6 +38,34 @@ type EmbedGraph = EmbedEntity & {
|
|
|
37
38
|
nodes?: EmbedEntity[];
|
|
38
39
|
edges?: EmbedEntity[];
|
|
39
40
|
};
|
|
41
|
+
/** One zero-based UTF-16 source edit, relative to the supplied original text. */
|
|
42
|
+
interface SourceUpdateEdit {
|
|
43
|
+
range: {
|
|
44
|
+
startLine: number;
|
|
45
|
+
startChar: number;
|
|
46
|
+
endLine: number;
|
|
47
|
+
endChar: number;
|
|
48
|
+
};
|
|
49
|
+
newText: string;
|
|
50
|
+
}
|
|
51
|
+
interface SourceUpdatePlan {
|
|
52
|
+
status: 'changed' | 'unchanged' | 'unsupported';
|
|
53
|
+
/** Complete updated file; commit this after checking the Git blob revision. */
|
|
54
|
+
text: string;
|
|
55
|
+
edits: SourceUpdateEdit[];
|
|
56
|
+
/** Semantic graph changes, not a Git patch. */
|
|
57
|
+
diff: GraphDiff;
|
|
58
|
+
reason?: string;
|
|
59
|
+
}
|
|
60
|
+
interface PlanSourceUpdateInput {
|
|
61
|
+
source: {
|
|
62
|
+
fileName: string;
|
|
63
|
+
text: string;
|
|
64
|
+
machineIndex?: number;
|
|
65
|
+
};
|
|
66
|
+
/** Edited graph from the embed, with stable node and edge IDs. */
|
|
67
|
+
nextGraph: StatelyGraph;
|
|
68
|
+
}
|
|
40
69
|
type EmbedFormatContext = {
|
|
41
70
|
profile: EmbedProfileDefinition;
|
|
42
71
|
resolveGraphData(graph: EmbedGraph): Record<string, unknown>;
|
|
@@ -114,6 +143,8 @@ interface StatelyEmbedOptions extends Partial<MachineInitOptions> {
|
|
|
114
143
|
onCapabilityDenied?: (event: CapabilityDeniedEvent) => void;
|
|
115
144
|
}
|
|
116
145
|
interface StatelyEmbed {
|
|
146
|
+
/** Plan one-file XState JSON/JSONC writeback on the configured editor server. Does not write. */
|
|
147
|
+
planSourceUpdate(input: PlanSourceUpdateInput): Promise<SourceUpdatePlan>;
|
|
117
148
|
/** Attach to an existing iframe element. Sets src and begins handshake. */
|
|
118
149
|
attach(iframe: HTMLIFrameElement): void;
|
|
119
150
|
/** Create an iframe and mount it into a container element. */
|
|
@@ -152,4 +183,4 @@ interface StatelyEmbed {
|
|
|
152
183
|
}
|
|
153
184
|
declare function createStatelyEmbed(options: StatelyEmbedOptions): StatelyEmbed;
|
|
154
185
|
//#endregion
|
|
155
|
-
export { AssetConfig, type CapabilityDeniedEvent, type CommentsConfig, type EditorCapabilities, type EmbedDocument, type EmbedDocumentLanguage, EmbedEntity, type EmbedEventHandler, type EmbedEventMap, type EmbedEventName, type EmbedExtensionsManifest, EmbedFormatContext, EmbedFormatDefinition, EmbedGraph, type EmbedMode, type EmbedPanelConfig, type EmbedPanelPosition, EmbedProfileDefinition, type ExportCallOptions, type ExportFormat, type ExportFormatMap, type InitOptions, type MachineInitOptions, type MachineSourceLocations, type MachineVersionAutoSaveOptions, type ProjectEmbedMachine, type ProjectInitOptions, type ProjectWorkspaceAction, type ProjectWorkspaceActionIcon, type ProjectWorkspaceCapabilities, type ProjectWorkspaceConfig, type ProjectWorkspaceMachine, type ProjectWorkspaceMachineOrigin, type ProjectWorkspaceProject, StatelyEmbed, StatelyEmbedOptions, type UploadResult, type ViewerOptions, createStatelyEmbed };
|
|
186
|
+
export { AssetConfig, type CapabilityDeniedEvent, type CommentsConfig, type EditorCapabilities, type EmbedDocument, type EmbedDocumentLanguage, EmbedEntity, type EmbedEventHandler, type EmbedEventMap, type EmbedEventName, type EmbedExtensionsManifest, EmbedFormatContext, EmbedFormatDefinition, EmbedGraph, type EmbedMode, type EmbedPanelConfig, type EmbedPanelPosition, EmbedProfileDefinition, type ExportCallOptions, type ExportFormat, type ExportFormatMap, type InitOptions, type MachineInitOptions, type MachineSourceLocations, type MachineVersionAutoSaveOptions, PlanSourceUpdateInput, type ProjectEmbedMachine, type ProjectInitOptions, type ProjectWorkspaceAction, type ProjectWorkspaceActionIcon, type ProjectWorkspaceCapabilities, type ProjectWorkspaceConfig, type ProjectWorkspaceMachine, type ProjectWorkspaceMachineOrigin, type ProjectWorkspaceProject, SourceUpdateEdit, SourceUpdatePlan, StatelyEmbed, StatelyEmbedOptions, type UploadResult, type ViewerOptions, createStatelyEmbed };
|
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-olQZ7Dn0.mjs";
|
|
3
3
|
import { EDITOR_PROTOCOL_VERSION } from "./editorHostProtocol.mjs";
|
|
4
4
|
|
|
5
5
|
//#region src/embed.ts
|
|
@@ -34,6 +34,10 @@ function buildEmbedUrl(options) {
|
|
|
34
34
|
const url = new URL(base);
|
|
35
35
|
if (normalizeApiKey(options.apiKey)) url.searchParams.set("auth", "message");
|
|
36
36
|
if (options.viewMode) url.searchParams.set("view", options.viewMode);
|
|
37
|
+
const appearance = options.settings?.appearance;
|
|
38
|
+
const settingsMode = appearance && typeof appearance === "object" && "colorMode" in appearance ? appearance.colorMode : void 0;
|
|
39
|
+
const colorMode = options.theme ?? settingsMode;
|
|
40
|
+
if (colorMode === "light" || colorMode === "dark" || colorMode === "system") url.searchParams.set("theme", colorMode);
|
|
37
41
|
return url.toString();
|
|
38
42
|
}
|
|
39
43
|
function serializeExtensions(options) {
|
|
@@ -540,6 +544,28 @@ function createStatelyEmbed(options) {
|
|
|
540
544
|
export(format, callOptions) {
|
|
541
545
|
return exportManager.start(format, callOptions, "Embed is destroyed", () => destroyed);
|
|
542
546
|
},
|
|
547
|
+
async planSourceUpdate(input) {
|
|
548
|
+
if (destroyed) throw new Error("Embed is destroyed");
|
|
549
|
+
const response = await fetch(new URL("/api/editor-sync/plan-source-update", options.baseUrl), {
|
|
550
|
+
method: "POST",
|
|
551
|
+
headers: {
|
|
552
|
+
"Content-Type": "application/json",
|
|
553
|
+
"X-Stately-Editor-Sync-Version": "1",
|
|
554
|
+
...apiKey ? { Authorization: `Bearer ${apiKey}` } : {}
|
|
555
|
+
},
|
|
556
|
+
body: JSON.stringify(input)
|
|
557
|
+
});
|
|
558
|
+
const protocolVersion = response.headers.get("X-Stately-Editor-Sync-Version");
|
|
559
|
+
if (protocolVersion !== null && protocolVersion !== "1") throw new Error(`Unsupported editor-sync protocol ${protocolVersion}`);
|
|
560
|
+
const result = await response.json();
|
|
561
|
+
if (!response.ok) throw new Error(result?.error ?? `Source update failed (${response.status})`);
|
|
562
|
+
if (!result || ![
|
|
563
|
+
"changed",
|
|
564
|
+
"unchanged",
|
|
565
|
+
"unsupported"
|
|
566
|
+
].includes(result.status) || typeof result.text !== "string" || !Array.isArray(result.edits)) throw new Error("Invalid source update response");
|
|
567
|
+
return result;
|
|
568
|
+
},
|
|
543
569
|
on(event, handler) {
|
|
544
570
|
events.on(event, handler);
|
|
545
571
|
},
|
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
|
-
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-
|
|
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-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 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
|
-
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-olQZ7Dn0.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-wHowbxnf.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 { 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 {
|
|
@@ -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-olQZ7Dn0.mjs";
|
|
3
3
|
|
|
4
4
|
//#region src/openBrowser.ts
|
|
5
5
|
async function openBrowser(url) {
|
|
@@ -96,15 +96,22 @@ function createInspector(options = {}) {
|
|
|
96
96
|
inspectorBaseUrl
|
|
97
97
|
});
|
|
98
98
|
const relayUrl = roomUrls?.relayUrl ?? null;
|
|
99
|
-
const
|
|
99
|
+
const getInspectorUrl = () => {
|
|
100
|
+
if (!roomUrls?.inspectorUrl) return null;
|
|
101
|
+
const url = new URL(roomUrls.inspectorUrl);
|
|
102
|
+
url.searchParams.set("theme", viewerSettings.appearance?.colorMode ?? "dark");
|
|
103
|
+
return url.toString();
|
|
104
|
+
};
|
|
100
105
|
const connection = {
|
|
101
|
-
inspectorUrl
|
|
106
|
+
get inspectorUrl() {
|
|
107
|
+
return getInspectorUrl();
|
|
108
|
+
},
|
|
102
109
|
relayUrl,
|
|
103
110
|
roomId,
|
|
104
111
|
producerId
|
|
105
112
|
};
|
|
106
113
|
const displayName = name ?? "system:manual";
|
|
107
|
-
if (inspectorUrl && launch === "none") console.info(`[Stately Inspector] ${inspectorUrl}`);
|
|
114
|
+
if (connection.inspectorUrl && launch === "none") console.info(`[Stately Inspector] ${connection.inspectorUrl}`);
|
|
108
115
|
const browserRegistry = isBrowserRuntime() ? getBrowserInspectorRegistry() : void 0;
|
|
109
116
|
browserRegistry?.set(producerId, connection);
|
|
110
117
|
const browserLaunchUnsupported = launch === "browser" && isBrowserRuntime();
|
|
@@ -189,7 +196,8 @@ function createInspector(options = {}) {
|
|
|
189
196
|
events.emit("error", failure);
|
|
190
197
|
return;
|
|
191
198
|
}
|
|
192
|
-
|
|
199
|
+
const url = connection.inspectorUrl;
|
|
200
|
+
if (url) openBrowser(url).catch((error) => {
|
|
193
201
|
const failure = {
|
|
194
202
|
code: "open_failed",
|
|
195
203
|
message: error instanceof Error ? error.message : "Unable to open the inspector browser"
|
|
@@ -778,7 +786,9 @@ function createInspector(options = {}) {
|
|
|
778
786
|
get sessionId() {
|
|
779
787
|
return roomId;
|
|
780
788
|
},
|
|
781
|
-
inspectorUrl
|
|
789
|
+
get inspectorUrl() {
|
|
790
|
+
return connection.inspectorUrl;
|
|
791
|
+
},
|
|
782
792
|
ready,
|
|
783
793
|
inspect: safelyHandleInspectionEvent,
|
|
784
794
|
attach: attachActor,
|
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-olQZ7Dn0.mjs";
|
|
3
|
+
import { n as createStatelyInspector, t as createInspector } from "./inspect-wHowbxnf.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.37.1";
|
|
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.37.1",
|
|
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"
|