@statelyai/sdk 0.31.0 → 0.31.2
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 +9 -0
- package/dist/assetStorage.d.mts +1 -1
- package/dist/{dist-BQEaIgBI.mjs → dist-wbhkeGh6.mjs} +356 -71
- package/dist/{editorHostSession-Dm5i4mg_.mjs → editorHostSession-DfmHzpls.mjs} +17 -8
- package/dist/{editorHostSession-BHr3WBHT.d.mts → editorHostSession-UdKBWr0I.d.mts} +12 -1
- package/dist/editorHostSession.d.mts +1 -1
- package/dist/editorHostSession.mjs +2 -2
- package/dist/embed.d.mts +6 -4
- package/dist/embed.mjs +2 -1
- package/dist/{graph-CehpcL7P.d.mts → graph-CR_g-mOq.d.mts} +1 -1
- package/dist/graph.d.mts +1 -1
- package/dist/{index-ZlKF1x_z.d.mts → index-DlOZxzrW.d.mts} +12 -1
- package/dist/index.d.mts +6 -6
- package/dist/index.mjs +4 -4
- package/dist/{inspect-BgYRNJF9.d.mts → inspect-DVRwYKva.d.mts} +3 -1
- package/dist/{inspect-BD6fDWzd.mjs → inspect-Dcjy_T2E.mjs} +25 -1
- package/dist/inspect.d.mts +2 -2
- package/dist/inspect.mjs +2 -2
- package/dist/patchTypes.d.mts +1 -1
- package/dist/{protocol-DOt1Vz-5.d.mts → protocol-DC7XJtw_.d.mts} +21 -4
- package/dist/protocol.d.mts +2 -2
- package/dist/relay.d.mts +1 -1
- package/dist/{studio-GZ6E_xns.d.mts → studio-DV5IIGhV.d.mts} +1 -1
- package/dist/studio.d.mts +1 -1
- package/dist/sync.d.mts +2 -2
- package/dist/sync.mjs +347 -13
- package/dist/{version-DbnY8nLV.mjs → version-CsJTVKWN.mjs} +2 -1
- package/package.json +3 -3
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { c as object, f as unknown, i as custom, l as record, n as array, o as literal, r as boolean, s as number, t as _enum, u as string } from "./openapi-BTDjYWXd.mjs";
|
|
2
2
|
import { t as EDITOR_PROTOCOL_VERSION } from "./editorHostProtocol-Bko7wge8.mjs";
|
|
3
|
-
import {
|
|
3
|
+
import { p as graphChangeToPatchesResult } from "./dist-wbhkeGh6.mjs";
|
|
4
4
|
import * as ts$1 from "typescript";
|
|
5
5
|
|
|
6
6
|
//#region ../api-contract/dist/editor-sync.mjs
|
|
@@ -181,6 +181,7 @@ function assertEditorSyncResponseProtocol(response) {
|
|
|
181
181
|
if (selectedVersion === null || selectedVersion === String(EDITOR_SYNC_PROTOCOL_VERSION)) return;
|
|
182
182
|
throw new Error(`Editor Sync protocol ${selectedVersion} is unsupported; this client supports ${EDITOR_SYNC_PROTOCOL_VERSION}.`);
|
|
183
183
|
}
|
|
184
|
+
const SOURCE_SAVE_REMINDER_ID = "source-save-reminder";
|
|
184
185
|
var EditorHostSession = class {
|
|
185
186
|
editorProtocolState = "awaiting";
|
|
186
187
|
currentGraph;
|
|
@@ -197,17 +198,14 @@ var EditorHostSession = class {
|
|
|
197
198
|
this.options = options;
|
|
198
199
|
this.saveReminderState = saveReminderState;
|
|
199
200
|
this.selfEditState = selfEditState;
|
|
200
|
-
this.watcher = options.source.watchSavedDocuments?.((uri) =>
|
|
201
|
-
this.saveReminderState.shown = false;
|
|
202
|
-
return this.handleSavedDocument(uri);
|
|
203
|
-
});
|
|
201
|
+
this.watcher = options.source.watchSavedDocuments?.((uri) => this.handleSavedDocument(uri));
|
|
204
202
|
this.changeWatcher = options.source.watchChangedDocuments?.((uri) => {
|
|
205
|
-
if (
|
|
206
|
-
if (this.selfEditState.count > 0) return;
|
|
203
|
+
if (!this.isExternalSourceDocument(uri)) return;
|
|
207
204
|
if (this.saveReminderState.shown) return;
|
|
208
205
|
this.saveReminderState.shown = true;
|
|
209
206
|
this.options.send({
|
|
210
207
|
type: "@statelyai.toast",
|
|
208
|
+
id: SOURCE_SAVE_REMINDER_ID,
|
|
211
209
|
message: "Save code to see changes.",
|
|
212
210
|
toastType: "warning"
|
|
213
211
|
});
|
|
@@ -451,9 +449,17 @@ var EditorHostSession = class {
|
|
|
451
449
|
graph: message.graph
|
|
452
450
|
});
|
|
453
451
|
}
|
|
452
|
+
isExternalSourceDocument(uri) {
|
|
453
|
+
return (uri === this.options.source.rootUri || this.watchedSourceUris.has(uri)) && this.selfEditState.count === 0;
|
|
454
|
+
}
|
|
454
455
|
async handleSavedDocument(uri) {
|
|
456
|
+
if (!this.isExternalSourceDocument(uri)) return;
|
|
457
|
+
if (this.saveReminderState.shown) this.options.send({
|
|
458
|
+
type: "@statelyai.toast.dismiss",
|
|
459
|
+
id: SOURCE_SAVE_REMINDER_ID
|
|
460
|
+
});
|
|
461
|
+
this.saveReminderState.shown = false;
|
|
455
462
|
if (this.editorProtocolState !== "compatible") return;
|
|
456
|
-
if (uri !== this.options.source.rootUri && !this.watchedSourceUris.has(uri) || this.selfEditState.count > 0) return;
|
|
457
463
|
try {
|
|
458
464
|
const documents = await this.options.source.collectDocuments(sourceLocationUris(this.currentSourceLocations));
|
|
459
465
|
const update = await this.options.sync.parse({
|
|
@@ -643,6 +649,7 @@ var EditorHostWorkspaceSession = class {
|
|
|
643
649
|
if (this.initialized) this.options.send({
|
|
644
650
|
type: "@statelyai.project.update",
|
|
645
651
|
machines: this.getProjectMachines(),
|
|
652
|
+
source: "external",
|
|
646
653
|
currentMachineId: this.selectedMachineId,
|
|
647
654
|
projectWorkspace: this.getProjectWorkspace(),
|
|
648
655
|
projectWorkspaceOpen: this.projectWorkspaceOpen
|
|
@@ -674,6 +681,7 @@ var EditorHostWorkspaceSession = class {
|
|
|
674
681
|
}
|
|
675
682
|
case "@statelyai.saved":
|
|
676
683
|
case "@statelyai.toast":
|
|
684
|
+
case "@statelyai.toast.dismiss":
|
|
677
685
|
case "@statelyai.error":
|
|
678
686
|
this.options.send({
|
|
679
687
|
...message,
|
|
@@ -696,6 +704,7 @@ var EditorHostWorkspaceSession = class {
|
|
|
696
704
|
this.options.send({
|
|
697
705
|
type: "@statelyai.project.init",
|
|
698
706
|
machines: this.getProjectMachines(),
|
|
707
|
+
chrome: this.options.showHeader ? { header: true } : void 0,
|
|
699
708
|
currentMachineId: this.selectedMachineId,
|
|
700
709
|
mode: first.mode,
|
|
701
710
|
theme: first.theme,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Qt as EmbedPanelConfig, Y as ProjectEmbedMachine, ot as ProjectWorkspaceConfig } from "./protocol-DC7XJtw_.mjs";
|
|
2
2
|
import { a as EditorSyncParseRequest, d as EditorSyncTextReplacement, f as MachineSourceLocations, i as EditorSyncApplyResponse, n as EditorSyncAccess, o as EditorSyncParseResponse, r as EditorSyncApplyRequest, s as EditorSyncSourceDocument, t as EditorCapabilities } from "./editor-sync-types-CPpzTSnT.mjs";
|
|
3
3
|
|
|
4
4
|
//#region src/editorHostProtocol.d.ts
|
|
@@ -114,6 +114,9 @@ type EditorHostOutboundMessage = {
|
|
|
114
114
|
} | {
|
|
115
115
|
type: '@statelyai.project.init';
|
|
116
116
|
machines: ProjectEmbedMachine[];
|
|
117
|
+
chrome?: {
|
|
118
|
+
header?: boolean;
|
|
119
|
+
};
|
|
117
120
|
currentMachineId?: string;
|
|
118
121
|
mode?: 'editing' | 'viewing';
|
|
119
122
|
theme?: 'light' | 'dark';
|
|
@@ -131,6 +134,7 @@ type EditorHostOutboundMessage = {
|
|
|
131
134
|
} | {
|
|
132
135
|
type: '@statelyai.project.update';
|
|
133
136
|
machines: ProjectEmbedMachine[];
|
|
137
|
+
source?: 'external';
|
|
134
138
|
currentMachineId?: string;
|
|
135
139
|
projectWorkspace?: ProjectWorkspaceConfig;
|
|
136
140
|
projectWorkspaceOpen?: boolean;
|
|
@@ -167,6 +171,11 @@ type EditorHostOutboundMessage = {
|
|
|
167
171
|
type: '@statelyai.toast';
|
|
168
172
|
message: string;
|
|
169
173
|
toastType?: 'success' | 'error' | 'info' | 'warning';
|
|
174
|
+
id?: string;
|
|
175
|
+
machineId?: string;
|
|
176
|
+
} | {
|
|
177
|
+
type: '@statelyai.toast.dismiss';
|
|
178
|
+
id: string;
|
|
170
179
|
machineId?: string;
|
|
171
180
|
} | {
|
|
172
181
|
type: '@statelyai.error';
|
|
@@ -263,6 +272,7 @@ declare class EditorHostSession {
|
|
|
263
272
|
receive(message: EditorHostInboundMessage): Promise<void>;
|
|
264
273
|
private initialize;
|
|
265
274
|
private save;
|
|
275
|
+
private isExternalSourceDocument;
|
|
266
276
|
private handleSavedDocument;
|
|
267
277
|
private reportSourceSyncError;
|
|
268
278
|
private updateWatchedSourceUris;
|
|
@@ -282,6 +292,7 @@ type EditorHostWorkspaceSessionOptions = Omit<EditorHostSessionOptions, 'source'
|
|
|
282
292
|
currentMachineId?: string;
|
|
283
293
|
workspaceName?: string;
|
|
284
294
|
projectWorkspaceOpen?: boolean;
|
|
295
|
+
showHeader?: boolean;
|
|
285
296
|
};
|
|
286
297
|
/**
|
|
287
298
|
* Runs one source-sync session per discovered machine while presenting the
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { _ as EditorHostOutboundMessage, a as EditorHostWorkspaceSessionOptions, c as EditorSyncError, d as fetchEditorSyncAccess, f as EDITOR_PROTOCOL_VERSION, g as EditorHostInitOptions, h as EditorHostInboundMessage, i as EditorHostWorkspaceSession, l as RemoteEditorSyncBackendOptions, m as EditorHostExportFormat, n as EditorHostSessionOptions, o as EditorSourceHost, p as EditorHostDiagnostic, r as EditorHostWorkspaceMachine, s as EditorSyncBackend, t as EditorHostSession, u as createRemoteEditorSyncBackend, v as EditorHostValidationIssue } from "./editorHostSession-
|
|
1
|
+
import { _ as EditorHostOutboundMessage, a as EditorHostWorkspaceSessionOptions, c as EditorSyncError, d as fetchEditorSyncAccess, f as EDITOR_PROTOCOL_VERSION, g as EditorHostInitOptions, h as EditorHostInboundMessage, i as EditorHostWorkspaceSession, l as RemoteEditorSyncBackendOptions, m as EditorHostExportFormat, n as EditorHostSessionOptions, o as EditorSourceHost, p as EditorHostDiagnostic, r as EditorHostWorkspaceMachine, s as EditorSyncBackend, t as EditorHostSession, u as createRemoteEditorSyncBackend, v as EditorHostValidationIssue } from "./editorHostSession-UdKBWr0I.mjs";
|
|
2
2
|
export { EDITOR_PROTOCOL_VERSION, EditorHostDiagnostic, EditorHostExportFormat, EditorHostInboundMessage, EditorHostInitOptions, EditorHostOutboundMessage, EditorHostSession, EditorHostSessionOptions, EditorHostValidationIssue, EditorHostWorkspaceMachine, EditorHostWorkspaceSession, EditorHostWorkspaceSessionOptions, EditorSourceHost, EditorSyncBackend, EditorSyncError, RemoteEditorSyncBackendOptions, createRemoteEditorSyncBackend, fetchEditorSyncAccess };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import "./openapi-BTDjYWXd.mjs";
|
|
2
2
|
import { t as EDITOR_PROTOCOL_VERSION } from "./editorHostProtocol-Bko7wge8.mjs";
|
|
3
|
-
import { a as fetchEditorSyncAccess, i as createRemoteEditorSyncBackend, n as EditorHostWorkspaceSession, r as EditorSyncError, t as EditorHostSession } from "./editorHostSession-
|
|
4
|
-
import "./dist-
|
|
3
|
+
import { a as fetchEditorSyncAccess, i as createRemoteEditorSyncBackend, n as EditorHostWorkspaceSession, r as EditorSyncError, t as EditorHostSession } from "./editorHostSession-DfmHzpls.mjs";
|
|
4
|
+
import "./dist-wbhkeGh6.mjs";
|
|
5
5
|
|
|
6
6
|
export { EDITOR_PROTOCOL_VERSION, EditorHostSession, EditorHostWorkspaceSession, EditorSyncError, createRemoteEditorSyncBackend, fetchEditorSyncAccess };
|
package/dist/embed.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { i as ProfileManifest } from "./index-
|
|
2
|
-
import { i as StatelyGraph } from "./graph-
|
|
3
|
-
import {
|
|
1
|
+
import { i as ProfileManifest } from "./index-DlOZxzrW.mjs";
|
|
2
|
+
import { i as StatelyGraph } from "./graph-CR_g-mOq.mjs";
|
|
3
|
+
import { $t as EmbedPanelPosition, D as ExportCallOptions, F as InitOptions, G as MachineVersionAutoSaveOptions, O as ExportFormat, Qt as EmbedPanelConfig, S as EmbedExtensionsManifest, U as MachineInitOptions, Vt as UploadResult, W as MachineSourceLocations, Y as ProjectEmbedMachine, Z as ProjectInitOptions, _ as EmbedDocumentLanguage, at as ProjectWorkspaceCapabilities, b as EmbedEventName, ct as ProjectWorkspaceMachineOrigin, d as CommentsConfig, g as EmbedDocument, k as ExportFormatMap, m as EditorCapabilities, nt as ProjectWorkspaceAction, ot as ProjectWorkspaceConfig, r as CapabilityDeniedEvent, rt as ProjectWorkspaceActionIcon, st as ProjectWorkspaceMachine, ut as ProjectWorkspaceProject, v as EmbedEventHandler, w as EmbedMode, y as EmbedEventMap } from "./protocol-DC7XJtw_.mjs";
|
|
4
4
|
import { AssetUploadAdapter } from "./assetStorage.mjs";
|
|
5
5
|
|
|
6
6
|
//#region src/embed.d.ts
|
|
@@ -86,6 +86,8 @@ interface StatelyEmbedOptions extends Partial<MachineInitOptions> {
|
|
|
86
86
|
* auto-sent on attach using these machines.
|
|
87
87
|
*/
|
|
88
88
|
machines?: ProjectEmbedMachine[];
|
|
89
|
+
/** Project mode only — optional project-level editor chrome. */
|
|
90
|
+
chrome?: ProjectInitOptions['chrome'];
|
|
89
91
|
/** Project mode only — initially selected machine id. */
|
|
90
92
|
currentMachineId?: string;
|
|
91
93
|
/** Project mode only — initial comments keyed by machine id. */
|
|
@@ -150,4 +152,4 @@ interface StatelyEmbed {
|
|
|
150
152
|
}
|
|
151
153
|
declare function createStatelyEmbed(options: StatelyEmbedOptions): StatelyEmbed;
|
|
152
154
|
//#endregion
|
|
153
|
-
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 ProjectWorkspaceAction, type ProjectWorkspaceActionIcon, type ProjectWorkspaceCapabilities, type ProjectWorkspaceConfig, type ProjectWorkspaceMachine, type ProjectWorkspaceMachineOrigin, type ProjectWorkspaceProject, StatelyEmbed, StatelyEmbedOptions, type UploadResult, createStatelyEmbed };
|
|
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, createStatelyEmbed };
|
package/dist/embed.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as createEventRegistry, o as createPendingExportManager, r as createPostMessageTransport, s as toInitMessage, t as SDK_VERSION } from "./version-
|
|
1
|
+
import { a as createEventRegistry, o as createPendingExportManager, r as createPostMessageTransport, s as toInitMessage, t as SDK_VERSION } from "./version-CsJTVKWN.mjs";
|
|
2
2
|
import { t as EDITOR_PROTOCOL_VERSION } from "./editorHostProtocol-Bko7wge8.mjs";
|
|
3
3
|
|
|
4
4
|
//#region src/embed.ts
|
|
@@ -90,6 +90,7 @@ function extractInitOptions(options) {
|
|
|
90
90
|
commentsByMachineId: options.commentsByMachineId,
|
|
91
91
|
projectWorkspace: options.projectWorkspace,
|
|
92
92
|
projectWorkspaceOpen: options.projectWorkspaceOpen,
|
|
93
|
+
chrome: options.chrome,
|
|
93
94
|
settings: options.settings,
|
|
94
95
|
unsavedIndicator: options.unsavedIndicator,
|
|
95
96
|
versionAutoSave: options.versionAutoSave
|
package/dist/graph.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { _ as studioMachineConverter, a as StatelyGraphData, c as StatelyInvoke, d as StudioAction, f as StudioEdge, g as fromStudioMachine, h as StudioNode, i as StatelyGraph, l as StatelyNodeData, m as StudioMachine, n as StatelyActorImplementation, o as StatelyGuard, p as StudioEventTypeData, r as StatelyEdgeData, s as StatelyImplementation, t as StatelyAction, u as StatelyTagImplementation, v as toStudioMachine } from "./graph-
|
|
1
|
+
import { _ as studioMachineConverter, a as StatelyGraphData, c as StatelyInvoke, d as StudioAction, f as StudioEdge, g as fromStudioMachine, h as StudioNode, i as StatelyGraph, l as StatelyNodeData, m as StudioMachine, n as StatelyActorImplementation, o as StatelyGuard, p as StudioEventTypeData, r as StatelyEdgeData, s as StatelyImplementation, t as StatelyAction, u as StatelyTagImplementation, v as toStudioMachine } from "./graph-CR_g-mOq.mjs";
|
|
2
2
|
export { StatelyAction, StatelyActorImplementation, StatelyEdgeData, StatelyGraph, StatelyGraphData, StatelyGuard, StatelyImplementation, StatelyInvoke, StatelyNodeData, StatelyTagImplementation, StudioAction, StudioEdge, StudioEventTypeData, StudioMachine, StudioNode, fromStudioMachine, studioMachineConverter, toStudioMachine };
|
|
@@ -2787,6 +2787,8 @@ interface CodeGenNodeData {
|
|
|
2787
2787
|
}
|
|
2788
2788
|
interface CodeGenEdgeData {
|
|
2789
2789
|
eventType: string;
|
|
2790
|
+
/** Additional resolved targets for a parallel multi-target transition. */
|
|
2791
|
+
additionalTargetIds?: string[];
|
|
2790
2792
|
matches?: Record<string, unknown>;
|
|
2791
2793
|
transitionType?: 'normal' | 'targetless' | 'reenter';
|
|
2792
2794
|
guard?: CodeGenGuard | null;
|
|
@@ -2831,12 +2833,20 @@ interface CodeGenGraphData {
|
|
|
2831
2833
|
options?: {
|
|
2832
2834
|
maxIterations?: number;
|
|
2833
2835
|
} | null;
|
|
2836
|
+
internalEvents?: string[] | null;
|
|
2834
2837
|
context?: Record<string, unknown> | `{{${string}}}` | CodeExpression | null;
|
|
2835
2838
|
schemas?: {
|
|
2836
2839
|
context?: Record<string, JSONSchema7> | null;
|
|
2837
2840
|
events?: Record<string, JSONSchema7> | null;
|
|
2841
|
+
internalEvents?: Record<string, JSONSchema7> | null;
|
|
2842
|
+
emitted?: Record<string, JSONSchema7> | null;
|
|
2843
|
+
actions?: Record<string, unknown> | null;
|
|
2844
|
+
guards?: Record<string, unknown> | null;
|
|
2845
|
+
children?: Record<string, JSONSchema7> | null;
|
|
2838
2846
|
input?: JSONSchema7 | null;
|
|
2839
2847
|
output?: JSONSchema7 | null;
|
|
2848
|
+
tags?: JSONSchema7 | null;
|
|
2849
|
+
meta?: JSONSchema7 | null;
|
|
2840
2850
|
} | null;
|
|
2841
2851
|
implementations?: {
|
|
2842
2852
|
actions: CodeGenImplementation[];
|
|
@@ -3046,7 +3056,8 @@ interface XStateTSOptions extends MachineConfigOptions {
|
|
|
3046
3056
|
xstateVersion?: 5 | 6;
|
|
3047
3057
|
xstateV6SchemaFormat?: 'types' | 'zod';
|
|
3048
3058
|
}
|
|
3049
|
-
declare function graphToXStateTS(graph: CodeGenGraph, options?: XStateTSOptions): string;
|
|
3059
|
+
declare function graphToXStateTS(graph: CodeGenGraph, options?: XStateTSOptions): string;
|
|
3060
|
+
//#endregion
|
|
3050
3061
|
//#region src/graphToXStateV4TS.d.ts
|
|
3051
3062
|
interface XStateV4TSOptions extends MachineConfigOptions {
|
|
3052
3063
|
exportStyle?: 'named' | 'default' | 'none';
|
package/dist/index.d.mts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { StatelyApiClientOptions, StatelyApiError, StatelyApiUrlOptions, createStatelyApiClient, createStatelyApiUrl } from "./api.mjs";
|
|
2
|
-
import { S as GraphPatch, _ as raw, a as RawCode, c as XStateV4TSOptions, d as getXStateFSMCompatibilityIssues, f as graphToMachineConfig, g as jsonSchemaToTSType, h as graphToXStateV4TS, l as contextSchemaToTSType, m as graphToXStateTS, n as CodeGenGraph, o as XStateFSMOptions, p as graphToXStateFSM, r as MachineConfigOptions, s as XStateTSOptions, u as eventsSchemaToTSType, v as serializeJS, y as ActionLocation } from "./index-
|
|
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-
|
|
4
|
-
import {
|
|
2
|
+
import { S as GraphPatch, _ as raw, a as RawCode, c as XStateV4TSOptions, d as getXStateFSMCompatibilityIssues, f as graphToMachineConfig, g as jsonSchemaToTSType, h as graphToXStateV4TS, l as contextSchemaToTSType, m as graphToXStateTS, n as CodeGenGraph, o as XStateFSMOptions, p as graphToXStateFSM, r as MachineConfigOptions, s as XStateTSOptions, u as eventsSchemaToTSType, v as serializeJS, y as ActionLocation } from "./index-DlOZxzrW.mjs";
|
|
3
|
+
import { C as EventTypeData, S as DigraphNodeConfig, _ as studioMachineConverter, a as StatelyGraphData, b as DigraphConfig, c as StatelyInvoke, d as StudioAction, f as StudioEdge, g as fromStudioMachine, h as StudioNode, i as StatelyGraph, l as StatelyNodeData, m as StudioMachine, o as StatelyGuard, r as StatelyEdgeData, t as StatelyAction, v as toStudioMachine, w as StateNodeJSONData, x as DigraphEdgeConfig, y as DigraphAction } from "./graph-CR_g-mOq.mjs";
|
|
4
|
+
import { $t as EmbedPanelPosition, B as InspectionSentEvent, D as ExportCallOptions, F as InitOptions, G as MachineVersionAutoSaveOptions, Jt as createInspectionRoomUrls, Kt as assertEmbedExamples, L as InspectionAction, M as INSPECTION_PROTOCOL_VERSION, N as INSPECTION_ROOM_QUERY_PARAM, O as ExportFormat, Qt as EmbedPanelConfig, V as InspectionTakenTransition, Vt as UploadResult, Xt as isEmbedExample, Y as ProjectEmbedMachine, Yt as getInspectionRoomId, Zt as isEmbedExampleMachine, _ as EmbedDocumentLanguage, at as ProjectWorkspaceCapabilities, b as EmbedEventName, ct as ProjectWorkspaceMachineOrigin, d as CommentsConfig, f as EMBED_DOCUMENT_LANGUAGES, g as EmbedDocument, k as ExportFormatMap, m as EditorCapabilities, n as CapabilityDeniedCapability, nt as ProjectWorkspaceAction, ot as ProjectWorkspaceConfig, p as EMBED_DOCUMENT_LIMITS, qt as createInspectionActorId, r as CapabilityDeniedEvent, rt as ProjectWorkspaceActionIcon, st as ProjectWorkspaceMachine, ut as ProjectWorkspaceProject, v as EmbedEventHandler, w as EmbedMode, x as EmbedExample, y as EmbedEventMap } from "./protocol-DC7XJtw_.mjs";
|
|
5
5
|
import { AssetUploadAdapter, AssetUploadContext, AssetUploadRequest, CreateS3AssetUploadAdapterOptions, CreateSupabaseAssetUploadAdapterOptions, S3UploadTarget, SupabaseStorageClient, createS3AssetUploadAdapter, createSupabaseAssetUploadAdapter } from "./assetStorage.mjs";
|
|
6
6
|
import { i as getCredentialToken, n as StatelyCredential, r as createAuthorizationHeader, t as StatelyAuthMode } from "./auth-Dg7prjeL.mjs";
|
|
7
|
-
import { _ as EditorHostOutboundMessage, a as EditorHostWorkspaceSessionOptions, d as fetchEditorSyncAccess, f as EDITOR_PROTOCOL_VERSION, g as EditorHostInitOptions, h as EditorHostInboundMessage, i as EditorHostWorkspaceSession, l as RemoteEditorSyncBackendOptions, m as EditorHostExportFormat, n as EditorHostSessionOptions, o as EditorSourceHost, p as EditorHostDiagnostic, r as EditorHostWorkspaceMachine, s as EditorSyncBackend, t as EditorHostSession, u as createRemoteEditorSyncBackend, v as EditorHostValidationIssue } from "./editorHostSession-
|
|
7
|
+
import { _ as EditorHostOutboundMessage, a as EditorHostWorkspaceSessionOptions, d as fetchEditorSyncAccess, f as EDITOR_PROTOCOL_VERSION, g as EditorHostInitOptions, h as EditorHostInboundMessage, i as EditorHostWorkspaceSession, l as RemoteEditorSyncBackendOptions, m as EditorHostExportFormat, n as EditorHostSessionOptions, o as EditorSourceHost, p as EditorHostDiagnostic, r as EditorHostWorkspaceMachine, s as EditorSyncBackend, t as EditorHostSession, u as createRemoteEditorSyncBackend, v as EditorHostValidationIssue } from "./editorHostSession-UdKBWr0I.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-DVRwYKva.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-DV5IIGhV.mjs";
|
|
11
11
|
import { OAuthAuthorizationServerMetadata, OAuthClientRegistrationResponse, OAuthProtectedResourceMetadata, OAuthTokenResponse, PkcePair, buildAuthorizeUrl, createPkcePair, discoverAuthorizationServer, discoverProtectedResource, exchangeCodeForToken, refreshToken, registerOAuthClient } from "./oauth.mjs";
|
|
12
12
|
import { PlanSyncOptions, PullSyncResult, PushLocalMachineLinksResult, PushSyncOptions, PushSyncProjectOptions, PushSyncResult, ResolvedSyncInput, SyncInputFormat, SyncPlan, SyncPlanSummary } from "./sync.mjs";
|
|
13
13
|
import { CreateInspectionRelayOptions, InspectionRelay, InspectionRelayEffect, InspectionRelayPeer, InspectionRelayRole, InspectionRelaySnapshot, createInspectionRelay } from "./relay.mjs";
|
package/dist/index.mjs
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import "./openapi-BTDjYWXd.mjs";
|
|
2
2
|
import { EMBED_DOCUMENT_LANGUAGES, EMBED_DOCUMENT_LIMITS, INSPECTION_PROTOCOL_VERSION, INSPECTION_ROOM_QUERY_PARAM, assertEmbedExamples, createInspectionActorId, createInspectionRoomUrls, getInspectionRoomId, isEmbedExample, isEmbedExampleMachine } from "./protocol.mjs";
|
|
3
|
-
import { i as createWebSocketTransport, r as createPostMessageTransport } from "./version-
|
|
3
|
+
import { i as createWebSocketTransport, r as createPostMessageTransport } from "./version-CsJTVKWN.mjs";
|
|
4
4
|
import { t as EDITOR_PROTOCOL_VERSION } from "./editorHostProtocol-Bko7wge8.mjs";
|
|
5
5
|
import { createStatelyEmbed } from "./embed.mjs";
|
|
6
|
-
import { a as fetchEditorSyncAccess, i as createRemoteEditorSyncBackend, n as EditorHostWorkspaceSession, t as EditorHostSession } from "./editorHostSession-
|
|
6
|
+
import { a as fetchEditorSyncAccess, i as createRemoteEditorSyncBackend, n as EditorHostWorkspaceSession, t as EditorHostSession } from "./editorHostSession-DfmHzpls.mjs";
|
|
7
7
|
import { n as StudioApiError, r as createStatelyClient, t as DEFAULT_STATELY_BASE_URL } from "./studio-rSI54Ese.mjs";
|
|
8
|
-
import { _ as
|
|
8
|
+
import { _ as graphToXStateV4TS, b as raw, f as getXStateFSMCompatibilityIssues, g as graphToXStateTS, h as graphToXStateFSM, l as eventsSchemaToTSType, m as graphToMachineConfig, n as RawCode, o as contextSchemaToTSType, v as jsonSchemaToTSType, x as serializeJS } from "./dist-wbhkeGh6.mjs";
|
|
9
9
|
import { createS3AssetUploadAdapter, createSupabaseAssetUploadAdapter } from "./assetStorage.mjs";
|
|
10
|
-
import { n as createStatelyInspector, t as createInspector } from "./inspect-
|
|
10
|
+
import { n as createStatelyInspector, t as createInspector } from "./inspect-Dcjy_T2E.mjs";
|
|
11
11
|
import { createAuthorizationHeader, getCredentialToken } from "./auth.mjs";
|
|
12
12
|
import { buildAuthorizeUrl, createPkcePair, discoverAuthorizationServer, discoverProtectedResource, exchangeCodeForToken, refreshToken, registerOAuthClient } from "./oauth.mjs";
|
|
13
13
|
import { StatelyApiError, createStatelyApiClient, createStatelyApiUrl } from "./api.mjs";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { B as InspectionSentEvent, D as ExportCallOptions, L as InspectionAction, O as ExportFormat,
|
|
1
|
+
import { B as InspectionSentEvent, D as ExportCallOptions, L as InspectionAction, O as ExportFormat, Qt as EmbedPanelConfig, R as InspectionClientMetadata, V as InspectionTakenTransition, dt as ProtocolMessage, k as ExportFormatMap, m as EditorCapabilities, y as EmbedEventMap } from "./protocol-DC7XJtw_.mjs";
|
|
2
2
|
|
|
3
3
|
//#region src/transport.d.ts
|
|
4
4
|
interface TransportFailure {
|
|
@@ -66,6 +66,8 @@ interface AdoptedActor {
|
|
|
66
66
|
sessionId: string;
|
|
67
67
|
/** System-local `actor.id`. */
|
|
68
68
|
actorId: string;
|
|
69
|
+
/** Optional invocation label; the runtime actor ID remains unchanged. */
|
|
70
|
+
displayName?: string;
|
|
69
71
|
/** Parent actor's sessionId, or `null` for the root. */
|
|
70
72
|
parentSessionId: string | null;
|
|
71
73
|
/** Root actor's sessionId. */
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { INSPECTION_PROTOCOL_VERSION, createInspectionRoomUrls, getInspectionRoomId } from "./protocol.mjs";
|
|
2
|
-
import { a as createEventRegistry, i as createWebSocketTransport, n as inspectionRuntime, o as createPendingExportManager, t as SDK_VERSION } from "./version-
|
|
2
|
+
import { a as createEventRegistry, i as createWebSocketTransport, n as inspectionRuntime, o as createPendingExportManager, t as SDK_VERSION } from "./version-CsJTVKWN.mjs";
|
|
3
3
|
|
|
4
4
|
//#region src/openBrowser.ts
|
|
5
5
|
async function openBrowser(url) {
|
|
@@ -26,6 +26,27 @@ async function openBrowser(url) {
|
|
|
26
26
|
});
|
|
27
27
|
}
|
|
28
28
|
|
|
29
|
+
//#endregion
|
|
30
|
+
//#region src/actorDisplayName.ts
|
|
31
|
+
/** Read resolved invocation metadata instead of parsing runtime-generated IDs.
|
|
32
|
+
* XState v5 and v6 currently expose these declarations on the parent machine.
|
|
33
|
+
* Unrecognized runtimes retain their original actor IDs in the viewer.
|
|
34
|
+
*/
|
|
35
|
+
function deriveActorDisplayName(parentLogic, actorId) {
|
|
36
|
+
const machine = parentLogic;
|
|
37
|
+
if (!(machine?.idMap instanceof Map)) return void 0;
|
|
38
|
+
for (const node of machine.idMap.values()) {
|
|
39
|
+
if (!Array.isArray(node.invoke)) continue;
|
|
40
|
+
const index = node.invoke.findIndex((invoke) => invoke.id === actorId);
|
|
41
|
+
if (index < 0) continue;
|
|
42
|
+
const raw = node.config?.invoke;
|
|
43
|
+
const config = Array.isArray(raw) ? raw[index] : index === 0 ? raw : void 0;
|
|
44
|
+
if (!config || typeof config !== "object" || config.id !== void 0) return void 0;
|
|
45
|
+
if (typeof node.id !== "string" || !node.id) return void 0;
|
|
46
|
+
return `${typeof config.src === "string" && config.src ? config.src : "Invocation"} · ${node.id}${node.invoke.length > 1 ? ` [${index + 1}]` : ""}`;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
|
|
29
50
|
//#endregion
|
|
30
51
|
//#region src/inspect.ts
|
|
31
52
|
const defaultSerializeSnapshot = (snapshot) => ({
|
|
@@ -267,6 +288,7 @@ function createInspector(options = {}) {
|
|
|
267
288
|
return {
|
|
268
289
|
sessionId,
|
|
269
290
|
actorId: details?.id ?? actorRef.id ?? sessionId,
|
|
291
|
+
displayName: deriveActorDisplayName(parentRef?.logic, details?.id ?? actorRef.id),
|
|
270
292
|
parentSessionId: parentRef ? sessionIdOf(parentRef) : null,
|
|
271
293
|
rootSessionId: rootActorId,
|
|
272
294
|
systemId: actorRef.systemId,
|
|
@@ -279,6 +301,7 @@ function createInspector(options = {}) {
|
|
|
279
301
|
return {
|
|
280
302
|
sessionId: entry.sessionId,
|
|
281
303
|
actorId: entry.actorId,
|
|
304
|
+
...entry.displayName && { displayName: entry.displayName },
|
|
282
305
|
parentSessionId: entry.parentSessionId,
|
|
283
306
|
machine: entry.machineConfig,
|
|
284
307
|
snapshot: entry.snapshot ?? void 0,
|
|
@@ -341,6 +364,7 @@ function createInspector(options = {}) {
|
|
|
341
364
|
type: "@statelyai.system.actorRegistered",
|
|
342
365
|
sessionId: entry.sessionId,
|
|
343
366
|
actorId: entry.actorId,
|
|
367
|
+
...entry.displayName && { displayName: entry.displayName },
|
|
344
368
|
parentSessionId: entry.parentSessionId,
|
|
345
369
|
machine: entry.machineConfig,
|
|
346
370
|
snapshot: entry.snapshot ?? void 0
|
package/dist/inspect.d.mts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { B as InspectionSentEvent, D as ExportCallOptions, L as InspectionAction, O as ExportFormat, V as InspectionTakenTransition, b as EmbedEventName, k as ExportFormatMap, m as EditorCapabilities, v as EmbedEventHandler, w as EmbedMode, y as EmbedEventMap } from "./protocol-
|
|
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, L as InspectionAction, O as ExportFormat, V as InspectionTakenTransition, b as EmbedEventName, k as ExportFormatMap, m as EditorCapabilities, v as EmbedEventHandler, w as EmbedMode, y as EmbedEventMap } from "./protocol-DC7XJtw_.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-DVRwYKva.mjs";
|
|
3
3
|
export { AdoptedActor, CreateInspectorOptions, EditorCapabilities, EmbedEventHandler, EmbedEventMap, EmbedEventName, EmbedMode, ExportCallOptions, ExportFormat, ExportFormatMap, InspectedEvent, InspectedSnapshot, InspectedTransition, InspectionAction, InspectionSentEvent, InspectionTakenTransition, Inspector, InspectorConnection, InspectorDiscoveryEntry, InspectorEvents, InspectorInspectionEvent, ManualActorOptions, Transport, createInspector, createStatelyInspector };
|
package/dist/inspect.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import "./version-
|
|
2
|
-
import { n as createStatelyInspector, t as createInspector } from "./inspect-
|
|
1
|
+
import "./version-CsJTVKWN.mjs";
|
|
2
|
+
import { n as createStatelyInspector, t as createInspector } from "./inspect-Dcjy_T2E.mjs";
|
|
3
3
|
|
|
4
4
|
export { createInspector, createStatelyInspector };
|
package/dist/patchTypes.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { C as ImplementationSourceType, S as GraphPatch, b as CanvasColor, x as EditorStateType, y as ActionLocation } from "./index-
|
|
1
|
+
import { C as ImplementationSourceType, S as GraphPatch, b as CanvasColor, x as EditorStateType, y as ActionLocation } from "./index-DlOZxzrW.mjs";
|
|
2
2
|
export { type ActionLocation, type CanvasColor, type EditorStateType, type GraphPatch, type ImplementationSourceType };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { i as ProfileManifest } from "./index-
|
|
2
|
-
import { i as StatelyGraph } from "./graph-
|
|
1
|
+
import { i as ProfileManifest } from "./index-DlOZxzrW.mjs";
|
|
2
|
+
import { i as StatelyGraph } from "./graph-CR_g-mOq.mjs";
|
|
3
3
|
import { c as EditorSyncSourceLocation, f as MachineSourceLocations$1, l as EditorSyncSourceRange, t as EditorCapabilities$1, u as EditorSyncStateSourceLocation } from "./editor-sync-types-CPpzTSnT.mjs";
|
|
4
4
|
|
|
5
5
|
//#region src/embedPanel.d.ts
|
|
@@ -383,6 +383,10 @@ interface MachineInitOptions {
|
|
|
383
383
|
}
|
|
384
384
|
interface ProjectInitOptions {
|
|
385
385
|
machines: ProjectEmbedMachine[];
|
|
386
|
+
/** Optional project-level chrome owned by the embed host. */
|
|
387
|
+
chrome?: {
|
|
388
|
+
/** Reserve a header row above the editor canvas. */header?: boolean;
|
|
389
|
+
};
|
|
386
390
|
/** Ephemeral, read-only reference documents shared across the project. */
|
|
387
391
|
documents?: EmbedDocument[];
|
|
388
392
|
currentMachineId?: string;
|
|
@@ -467,6 +471,9 @@ interface ClipboardWriteMessage {
|
|
|
467
471
|
interface ProjectInitMessage {
|
|
468
472
|
type: '@statelyai.project.init';
|
|
469
473
|
machines: ProjectEmbedMachine[];
|
|
474
|
+
chrome?: {
|
|
475
|
+
header?: boolean;
|
|
476
|
+
};
|
|
470
477
|
documents?: EmbedDocument[];
|
|
471
478
|
currentMachineId?: string;
|
|
472
479
|
mode?: EmbedMode;
|
|
@@ -497,6 +504,7 @@ interface ProjectInitMessage {
|
|
|
497
504
|
interface ProjectUpdateMessage {
|
|
498
505
|
type: '@statelyai.project.update';
|
|
499
506
|
machines: ProjectEmbedMachine[];
|
|
507
|
+
source?: 'external';
|
|
500
508
|
currentMachineId?: string;
|
|
501
509
|
commentsByMachineId?: Record<string, CommentsConfig>;
|
|
502
510
|
projectWorkspace?: ProjectWorkspaceConfig;
|
|
@@ -538,6 +546,11 @@ interface ToastMessage {
|
|
|
538
546
|
type: '@statelyai.toast';
|
|
539
547
|
message: string;
|
|
540
548
|
toastType?: 'success' | 'error' | 'info' | 'warning';
|
|
549
|
+
id?: string;
|
|
550
|
+
}
|
|
551
|
+
interface ToastDismissMessage {
|
|
552
|
+
type: '@statelyai.toast.dismiss';
|
|
553
|
+
id: string;
|
|
541
554
|
}
|
|
542
555
|
interface InspectSnapshotMessage {
|
|
543
556
|
type: '@statelyai.inspectSnapshot';
|
|
@@ -551,6 +564,8 @@ interface ActorSystemEntry {
|
|
|
551
564
|
sessionId: string;
|
|
552
565
|
/** System-local xstate `actor.id`. */
|
|
553
566
|
actorId: string;
|
|
567
|
+
/** Optional readable label; never replaces the runtime actor ID. */
|
|
568
|
+
displayName?: string;
|
|
554
569
|
/** Parent actor's sessionId, or `null` for the root. */
|
|
555
570
|
parentSessionId: string | null;
|
|
556
571
|
/** Machine configuration used to render the state chart. */
|
|
@@ -612,6 +627,8 @@ interface SystemActorRegisteredMessage {
|
|
|
612
627
|
type: '@statelyai.system.actorRegistered';
|
|
613
628
|
sessionId: string;
|
|
614
629
|
actorId: string;
|
|
630
|
+
/** Optional readable label; never replaces the runtime actor ID. */
|
|
631
|
+
displayName?: string;
|
|
615
632
|
parentSessionId: string | null;
|
|
616
633
|
machine: unknown;
|
|
617
634
|
snapshot?: unknown;
|
|
@@ -808,7 +825,7 @@ interface ExtensionResultMessage {
|
|
|
808
825
|
error?: string;
|
|
809
826
|
}
|
|
810
827
|
/** All messages a client (embed/inspector) can send to the viz. */
|
|
811
|
-
type ClientMessage = InitMessage | SetApiKeyMessage | EditorHandshakeMessage | SavedMessage | ClipboardReadResponseMessage | ClipboardWriteResponseMessage | ProjectInitMessage | ProjectUpdateMessage | ProjectSelectMachineMessage | ProjectSetWorkspaceOpenMessage | UpdateMessage | SetModeMessage | SetThemeMessage | SetSettingsMessage | RetrieveMessage | ToastMessage | InspectSnapshotMessage | SystemInitMessage | SystemSelectActorMessage | SystemActorRegisteredMessage | SystemActorEventMessage | SystemActorSnapshotMessage | SystemActorStoppedMessage | UploadCapabilitiesMessage | UploadResponseMessage | ExtensionResultMessage | ErrorMessage;
|
|
828
|
+
type ClientMessage = InitMessage | SetApiKeyMessage | EditorHandshakeMessage | SavedMessage | ClipboardReadResponseMessage | ClipboardWriteResponseMessage | ProjectInitMessage | ProjectUpdateMessage | ProjectSelectMachineMessage | ProjectSetWorkspaceOpenMessage | UpdateMessage | SetModeMessage | SetThemeMessage | SetSettingsMessage | RetrieveMessage | ToastMessage | ToastDismissMessage | InspectSnapshotMessage | SystemInitMessage | SystemSelectActorMessage | SystemActorRegisteredMessage | SystemActorEventMessage | SystemActorSnapshotMessage | SystemActorStoppedMessage | UploadCapabilitiesMessage | UploadResponseMessage | ExtensionResultMessage | ErrorMessage;
|
|
812
829
|
/** All messages the viz can send back to a client. */
|
|
813
830
|
type VizMessage = ReadyMessage | LoadedMessage | ChangeMessage | SaveMessage | VersionSaveRequestedMessage | ProjectMachineSelectedMessage | ProjectWorkspaceActionMessage | ProjectWorkspaceOpenChangedMessage | ViewModeChangedMessage | PanelChangedMessage | ModeChangedMessage | RetrievedMessage | ErrorMessage | CapabilityDeniedMessage | ClipboardReadMessage | ClipboardWriteMessage | UploadRequestMessage | ExtensionCallMessage;
|
|
814
831
|
interface InspectionClientMetadata {
|
|
@@ -839,4 +856,4 @@ declare const PREFIX = "@statelyai.";
|
|
|
839
856
|
/** Current WebSocket inspection protocol version. */
|
|
840
857
|
declare const INSPECTION_PROTOCOL_VERSION = 2;
|
|
841
858
|
//#endregion
|
|
842
|
-
export { ProjectSelectMachineMessage as $, ExtensionCallMessage as A, SystemActorSnapshotMessage as At, InspectionSentEvent as B,
|
|
859
|
+
export { ProjectSelectMachineMessage as $, EmbedPanelPosition as $t, ExtensionCallMessage as A, SystemActorSnapshotMessage as At, InspectionSentEvent as B, UploadResponseMessage as Bt, EmbedFormatManifest as C, SetSettingsMessage as Ct, ExportCallOptions as D, StateSourceLocation as Dt, ErrorMessage as E, SourceRange as Et, InitOptions as F, ToastMessage as Ft, MachineVersionAutoSaveOptions as G, VizMessage as Gt, LoadedMessage as H, ValidationIssue as Ht, InspectSnapshotMessage as I, UpdateMessage as It, PanelChangedMessage as J, createInspectionRoomUrls as Jt, ModeChangedMessage as K, assertEmbedExamples as Kt, InspectionAction as L, UploadCapabilitiesMessage as Lt, INSPECTION_PROTOCOL_VERSION as M, SystemInitMessage as Mt, INSPECTION_ROOM_QUERY_PARAM as N, SystemSelectActorMessage as Nt, ExportFormat as O, SystemActorEventMessage as Ot, InitMessage as P, ToastDismissMessage as Pt, ProjectMachineSelectedMessage as Q, EmbedPanelConfig as Qt, InspectionClientMetadata as R, UploadFileInfo as Rt, EmbedExtensionsManifest as S, SetModeMessage as St, ErrorCode as T, SourceLocation as Tt, MachineInitOptions as U, VersionSaveRequestedMessage as Ut, InspectionTakenTransition as V, UploadResult as Vt, MachineSourceLocations as W, ViewModeChangedMessage as Wt, ProjectInitMessage as X, isEmbedExample as Xt, ProjectEmbedMachine as Y, getInspectionRoomId as Yt, ProjectInitOptions as Z, isEmbedExampleMachine as Zt, EmbedDocumentLanguage as _, RetrievedMessage as _t, ChangeMessage as a, ProjectWorkspaceCapabilities as at, EmbedEventName as b, SessionMessage as bt, ClipboardReadResponseMessage as c, ProjectWorkspaceMachineOrigin as ct, CommentsConfig as d, ProtocolMessage as dt, ProjectSetWorkspaceOpenMessage as et, EMBED_DOCUMENT_LANGUAGES as f, ReadOnlyReason as ft, EmbedDocument as g, RetrieveMessage as gt, EditorHandshakeMessage as h, RegisteredMessage as ht, CapabilityDeniedMessage as i, ProjectWorkspaceActionMessage as it, ExtensionResultMessage as j, SystemActorStoppedMessage as jt, ExportFormatMap as k, SystemActorRegisteredMessage as kt, ClipboardWriteMessage as l, ProjectWorkspaceOpenChangedMessage as lt, EditorCapabilities as m, RegisterMessage as mt, CapabilityDeniedCapability as n, ProjectWorkspaceAction as nt, ClientMessage as o, ProjectWorkspaceConfig as ot, EMBED_DOCUMENT_LIMITS as p, ReadyMessage as pt, PREFIX as q, createInspectionActorId as qt, CapabilityDeniedEvent as r, ProjectWorkspaceActionIcon as rt, ClipboardReadMessage as s, ProjectWorkspaceMachine as st, ActorSystemEntry as t, ProjectUpdateMessage as tt, ClipboardWriteResponseMessage as u, ProjectWorkspaceProject as ut, EmbedEventHandler as v, SaveMessage as vt, EmbedMode as w, SetThemeMessage as wt, EmbedExample as x, SetApiKeyMessage as xt, EmbedEventMap as y, SavedMessage as yt, InspectionRoomUrls as z, UploadRequestMessage as zt };
|
package/dist/protocol.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { $ as ProjectSelectMachineMessage, A as ExtensionCallMessage, At as SystemActorSnapshotMessage, B as InspectionSentEvent, Bt as
|
|
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, LoadedMessage, MachineInitOptions, 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, SystemSelectActorMessage, ToastMessage, UpdateMessage, UploadCapabilitiesMessage, UploadFileInfo, UploadRequestMessage, UploadResponseMessage, UploadResult, ValidationIssue, VersionSaveRequestedMessage, ViewModeChangedMessage, VizMessage, assertEmbedExamples, createInspectionActorId, createInspectionRoomUrls, getInspectionRoomId, isEmbedExample, isEmbedExampleMachine };
|
|
1
|
+
import { $ as ProjectSelectMachineMessage, $t as EmbedPanelPosition, A as ExtensionCallMessage, At as SystemActorSnapshotMessage, B as InspectionSentEvent, Bt as UploadResponseMessage, C as EmbedFormatManifest, Ct as SetSettingsMessage, D as ExportCallOptions, Dt as StateSourceLocation, E as ErrorMessage, Et as SourceRange, F as InitOptions, Ft as ToastMessage, G as MachineVersionAutoSaveOptions, Gt as VizMessage, H as LoadedMessage, Ht as ValidationIssue, I as InspectSnapshotMessage, It as UpdateMessage, J as PanelChangedMessage, Jt as createInspectionRoomUrls, K as ModeChangedMessage, Kt as assertEmbedExamples, L as InspectionAction, Lt as UploadCapabilitiesMessage, M as INSPECTION_PROTOCOL_VERSION, Mt as SystemInitMessage, N as INSPECTION_ROOM_QUERY_PARAM, Nt as SystemSelectActorMessage, O as ExportFormat, Ot as SystemActorEventMessage, P as InitMessage, Pt as ToastDismissMessage, Q as ProjectMachineSelectedMessage, Qt as EmbedPanelConfig, R as InspectionClientMetadata, Rt as UploadFileInfo, S as EmbedExtensionsManifest, St as SetModeMessage, T as ErrorCode, Tt as SourceLocation, U as MachineInitOptions, Ut as VersionSaveRequestedMessage, V as InspectionTakenTransition, Vt as UploadResult, W as MachineSourceLocations, Wt as ViewModeChangedMessage, X as ProjectInitMessage, Xt as isEmbedExample, Y as ProjectEmbedMachine, Yt as getInspectionRoomId, Z as ProjectInitOptions, Zt as isEmbedExampleMachine, _ as EmbedDocumentLanguage, _t as RetrievedMessage, a as ChangeMessage, at as ProjectWorkspaceCapabilities, b as EmbedEventName, bt as SessionMessage, c as ClipboardReadResponseMessage, ct as ProjectWorkspaceMachineOrigin, d as CommentsConfig, dt as ProtocolMessage, et as ProjectSetWorkspaceOpenMessage, f as EMBED_DOCUMENT_LANGUAGES, ft as ReadOnlyReason, g as EmbedDocument, gt as RetrieveMessage, h as EditorHandshakeMessage, ht as RegisteredMessage, i as CapabilityDeniedMessage, it as ProjectWorkspaceActionMessage, j as ExtensionResultMessage, jt as SystemActorStoppedMessage, k as ExportFormatMap, kt as SystemActorRegisteredMessage, l as ClipboardWriteMessage, lt as ProjectWorkspaceOpenChangedMessage, m as EditorCapabilities, mt as RegisterMessage, n as CapabilityDeniedCapability, nt as ProjectWorkspaceAction, o as ClientMessage, ot as ProjectWorkspaceConfig, p as EMBED_DOCUMENT_LIMITS, pt as ReadyMessage, q as PREFIX, qt as createInspectionActorId, r as CapabilityDeniedEvent, rt as ProjectWorkspaceActionIcon, s as ClipboardReadMessage, st as ProjectWorkspaceMachine, t as ActorSystemEntry, tt as ProjectUpdateMessage, u as ClipboardWriteResponseMessage, ut as ProjectWorkspaceProject, v as EmbedEventHandler, vt as SaveMessage, w as EmbedMode, wt as SetThemeMessage, x as EmbedExample, xt as SetApiKeyMessage, y as EmbedEventMap, yt as SavedMessage, z as InspectionRoomUrls, zt as UploadRequestMessage } from "./protocol-DC7XJtw_.mjs";
|
|
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, LoadedMessage, MachineInitOptions, 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, SystemSelectActorMessage, ToastDismissMessage, ToastMessage, UpdateMessage, UploadCapabilitiesMessage, UploadFileInfo, UploadRequestMessage, UploadResponseMessage, UploadResult, ValidationIssue, VersionSaveRequestedMessage, ViewModeChangedMessage, VizMessage, assertEmbedExamples, createInspectionActorId, createInspectionRoomUrls, getInspectionRoomId, isEmbedExample, isEmbedExampleMachine };
|
package/dist/relay.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A as ZodObject, D as ZodLiteral, E as ZodEnum, F as ZodUnknown, I as output, L as $loose, M as ZodRecord, N as ZodString, O as ZodNullable, P as ZodUnion, R as $strip, T as ZodBoolean, j as ZodOptional, k as ZodNumber, w as ZodArray } from "./index-
|
|
1
|
+
import { A as ZodObject, D as ZodLiteral, E as ZodEnum, F as ZodUnknown, I as output, L as $loose, M as ZodRecord, N as ZodString, O as ZodNullable, P as ZodUnion, R as $strip, T as ZodBoolean, j as ZodOptional, k as ZodNumber, w as ZodArray } from "./index-DlOZxzrW.mjs";
|
|
2
2
|
import { n as StatelyCredential, t as StatelyAuthMode } from "./auth-Dg7prjeL.mjs";
|
|
3
3
|
|
|
4
4
|
//#region ../api-contract/dist/errors.d.mts
|
package/dist/studio.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { A as Machine, C as StudioMachineRecord, D as VerifyApiKeyResponse, E as UpdateProjectInput, F as ProjectVisibility, I as VerifyResult, L as XStateVersion, M as Project, N as ProjectMachineSummary, O as createStatelyClient, P as ProjectSummary, R as ResourceErrorCode, S as StudioClientOptions, T as UpdateMachineInput, _ as ProjectMachine, a as CreateMachineTemplate, b as StudioApiErrorOptions, c as EnsureProjectInput, d as ExtractedMachine, f as GetMachineOptions, g as ProjectData, h as LegacyUpdateMachineInput, i as CreateMachineInput, j as MachineVersion, k as ExtractedMachines, l as ExtractMachinesInput, m as LegacyProjectVisibility, n as CreateMachineFromDefinitionInput, o as CreateProjectInput, p as LegacyExtractMachinesOptions, r as CreateMachineFromTemplateInput, s as DEFAULT_STATELY_BASE_URL, t as ConnectedRepo, u as ExtractMachinesResponse, v as RepoType, w as StudioRequestOptions, x as StudioClient, y as StudioApiError } from "./studio-
|
|
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-DV5IIGhV.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/sync.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { b as DigraphConfig, i as StatelyGraph } from "./graph-
|
|
2
|
-
import { C as StudioMachineRecord, L as XStateVersion, g as ProjectData, o as CreateProjectInput, x as StudioClient } from "./studio-
|
|
1
|
+
import { b as DigraphConfig, i as StatelyGraph } from "./graph-CR_g-mOq.mjs";
|
|
2
|
+
import { C as StudioMachineRecord, L as XStateVersion, g as ProjectData, o as CreateProjectInput, x as StudioClient } from "./studio-DV5IIGhV.mjs";
|
|
3
3
|
import { GraphDiff } from "@statelyai/graph";
|
|
4
4
|
|
|
5
5
|
//#region src/sync.d.ts
|