@statelyai/sdk 0.26.2 → 0.26.3
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/dist/embed.mjs +1 -1
- package/dist/index.mjs +3 -3
- package/dist/{inspect-BA3EPIz9.mjs → inspect-CiPPDR7Q.mjs} +1 -1
- package/dist/inspect.mjs +2 -2
- package/dist/{statelyPragma-CWxhEIcZ.mjs → statelyPragma-B-axv279.mjs} +1 -0
- package/dist/sync.mjs +1 -1
- package/dist/{version-DKSLBwJ9.mjs → version-At1lONTa.mjs} +16 -2
- package/package.json +1 -1
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-At1lONTa.mjs";
|
|
2
2
|
import { t as EDITOR_PROTOCOL_VERSION } from "./editorHostProtocol-Bko7wge8.mjs";
|
|
3
3
|
|
|
4
4
|
//#region src/embed.ts
|
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-At1lONTa.mjs";
|
|
4
4
|
import { t as EDITOR_PROTOCOL_VERSION } from "./editorHostProtocol-Bko7wge8.mjs";
|
|
5
5
|
import { createStatelyEmbed } from "./embed.mjs";
|
|
6
6
|
import { i as fetchEditorSyncAccess, r as createRemoteEditorSyncBackend, t as EditorHostSession } from "./editorHostSession-CwGeXJ6g.mjs";
|
|
7
7
|
import { n as StudioApiError, r as createStatelyClient, t as DEFAULT_STATELY_BASE_URL } from "./studio-iNSHtNmP.mjs";
|
|
8
|
-
import { a as RawCode, c as eventsSchemaToTSType, d as jsonSchemaToTSType, l as graphToMachineConfig, m as serializeJS, n as getStatelyPragma, o as contextSchemaToTSType, p as raw, r as upsertStatelyPragma, t as findStatelyPragmaAttachments, u as graphToXStateTS } from "./statelyPragma-
|
|
8
|
+
import { a as RawCode, c as eventsSchemaToTSType, d as jsonSchemaToTSType, l as graphToMachineConfig, m as serializeJS, n as getStatelyPragma, o as contextSchemaToTSType, p as raw, r as upsertStatelyPragma, t as findStatelyPragmaAttachments, u as graphToXStateTS } from "./statelyPragma-B-axv279.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-CiPPDR7Q.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,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-At1lONTa.mjs";
|
|
3
3
|
|
|
4
4
|
//#region src/openBrowser.ts
|
|
5
5
|
async function openBrowser(url) {
|
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-At1lONTa.mjs";
|
|
2
|
+
import { n as createStatelyInspector, t as createInspector } from "./inspect-CiPPDR7Q.mjs";
|
|
3
3
|
|
|
4
4
|
export { createInspector, createStatelyInspector };
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { a as discriminatedUnion, c as object, d as union, 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 ts from "typescript";
|
|
3
|
+
import "xstate";
|
|
3
4
|
import "xstate/graph";
|
|
4
5
|
|
|
5
6
|
//#region ../../node_modules/.pnpm/js-yaml@4.2.0/node_modules/js-yaml/dist/js-yaml.mjs
|
package/dist/sync.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import "./openapi-BTDjYWXd.mjs";
|
|
2
2
|
import { r as createStatelyClient } from "./studio-iNSHtNmP.mjs";
|
|
3
|
-
import { f as normalizeMachineProfile, h as xstateSourceToConfig, i as INLINE_EXPRESSION_DIRECTIVE_FIELDS, m as serializeJS, n as getStatelyPragma, r as upsertStatelyPragma, s as detectXStateSourceProfile, t as findStatelyPragmaAttachments, u as graphToXStateTS } from "./statelyPragma-
|
|
3
|
+
import { f as normalizeMachineProfile, h as xstateSourceToConfig, i as INLINE_EXPRESSION_DIRECTIVE_FIELDS, m as serializeJS, n as getStatelyPragma, r as upsertStatelyPragma, s as detectXStateSourceProfile, t as findStatelyPragmaAttachments, u as graphToXStateTS } from "./statelyPragma-B-axv279.mjs";
|
|
4
4
|
import { fromStudioMachine, toStudioMachine } from "./graph.mjs";
|
|
5
5
|
import * as ts$1 from "typescript";
|
|
6
6
|
import ts from "typescript";
|
|
@@ -242,8 +242,22 @@ function createWebSocketTransport(options) {
|
|
|
242
242
|
reconnectAttempts++;
|
|
243
243
|
reconnectTimer = setTimeout(connect, delay);
|
|
244
244
|
}
|
|
245
|
+
function disposeSocket(socket) {
|
|
246
|
+
socket.onmessage = null;
|
|
247
|
+
socket.onclose = null;
|
|
248
|
+
socket.onerror = null;
|
|
249
|
+
if (socket.readyState === WebSocket.CONNECTING) socket.onopen = () => socket.close();
|
|
250
|
+
else {
|
|
251
|
+
socket.onopen = null;
|
|
252
|
+
socket.close();
|
|
253
|
+
}
|
|
254
|
+
}
|
|
245
255
|
function connect() {
|
|
246
256
|
if (destroyed || terminalFailure) return;
|
|
257
|
+
if (ws) {
|
|
258
|
+
disposeSocket(ws);
|
|
259
|
+
ws = null;
|
|
260
|
+
}
|
|
247
261
|
try {
|
|
248
262
|
ws = new WebSocket(url);
|
|
249
263
|
} catch {
|
|
@@ -315,7 +329,7 @@ function createWebSocketTransport(options) {
|
|
|
315
329
|
if (destroyed) return;
|
|
316
330
|
destroyed = true;
|
|
317
331
|
if (reconnectTimer) clearTimeout(reconnectTimer);
|
|
318
|
-
ws
|
|
332
|
+
if (ws) disposeSocket(ws);
|
|
319
333
|
ws = null;
|
|
320
334
|
messageHandlers.clear();
|
|
321
335
|
readyHandlers.clear();
|
|
@@ -338,7 +352,7 @@ function createWebSocketTransport(options) {
|
|
|
338
352
|
|
|
339
353
|
//#endregion
|
|
340
354
|
//#region src/version.ts
|
|
341
|
-
const SDK_VERSION = "0.26.
|
|
355
|
+
const SDK_VERSION = "0.26.3";
|
|
342
356
|
function inspectionRuntime() {
|
|
343
357
|
if (typeof window !== "undefined") return "browser";
|
|
344
358
|
if (typeof process !== "undefined" && process.versions?.node) return "node";
|