@statelyai/sdk 0.20.3 → 0.22.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +11 -0
- package/dist/{editorHostSession-CCTwvUOB.mjs → editorHostSession-HRuIaZ2G.mjs} +2 -2
- package/dist/editorHostSession.mjs +3 -2
- package/dist/embed.d.mts +50 -3
- package/dist/embed.mjs +147 -4
- package/dist/{graph-yDK-MM3G.d.mts → graph-DYjfFztq.d.mts} +1 -1
- package/dist/graph.d.mts +1 -1
- package/dist/{index-BAkQThnl.d.mts → index-Bakx1tkW.d.mts} +474 -408
- package/dist/index.d.mts +5 -5
- package/dist/index.mjs +7 -6
- package/dist/{inspect-DU-gHyef.mjs → inspect-DDl5w1sy.mjs} +1 -1
- package/dist/inspect.mjs +2 -2
- package/dist/openapi-BTDjYWXd.mjs +13950 -0
- package/dist/patchTypes.d.mts +1 -1
- package/dist/protocol.d.mts +47 -4
- package/dist/{statelyPragma-Cesya0Pk.mjs → statelyPragma-CokFTPgT.mjs} +125 -439
- package/dist/{studio-YSppd-am.d.mts → studio-DYI613t_.d.mts} +1 -1
- package/dist/{studio-DHGspwII.mjs → studio-iNSHtNmP.mjs} +1 -1
- package/dist/studio.d.mts +1 -1
- package/dist/studio.mjs +2 -1
- package/dist/sync.d.mts +2 -2
- package/dist/sync.mjs +3 -2
- package/dist/{version-DoNMw8g6.mjs → version-3cKMfysA.mjs} +6 -3
- package/package.json +3 -3
- package/dist/schemas-b9wG-zYl.mjs +0 -4344
- /package/dist/{editorHostProtocol-D_h4y3rX.mjs → editorHostProtocol-Bko7wge8.mjs} +0 -0
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-DYjfFztq.mjs";
|
|
2
|
+
import { C as StudioMachineRecord, L as XStateVersion, g as ProjectData, o as CreateProjectInput, x as StudioClient } from "./studio-DYI613t_.mjs";
|
|
3
3
|
import { GraphDiff } from "@statelyai/graph";
|
|
4
4
|
|
|
5
5
|
//#region src/sync.d.ts
|
package/dist/sync.mjs
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
1
|
+
import "./openapi-BTDjYWXd.mjs";
|
|
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-CokFTPgT.mjs";
|
|
3
4
|
import { fromStudioMachine, toStudioMachine } from "./graph.mjs";
|
|
4
5
|
import * as ts$1 from "typescript";
|
|
5
6
|
import ts from "typescript";
|
|
@@ -127,6 +127,7 @@ function toInitMessage(options) {
|
|
|
127
127
|
rightPanels: options.panels?.rightPanels,
|
|
128
128
|
activePanels: options.panels?.activePanels,
|
|
129
129
|
commentsByMachineId: options.commentsByMachineId,
|
|
130
|
+
settings: options.settings,
|
|
130
131
|
unsavedIndicator: options.unsavedIndicator
|
|
131
132
|
};
|
|
132
133
|
return {
|
|
@@ -134,6 +135,7 @@ function toInitMessage(options) {
|
|
|
134
135
|
machine: options.machine,
|
|
135
136
|
documents: options.documents,
|
|
136
137
|
format: options.format,
|
|
138
|
+
extensions: options.extensions,
|
|
137
139
|
mode: options.mode,
|
|
138
140
|
theme: options.theme,
|
|
139
141
|
readOnly: options.readOnly,
|
|
@@ -145,6 +147,7 @@ function toInitMessage(options) {
|
|
|
145
147
|
activePanels: options.panels?.activePanels,
|
|
146
148
|
comments: options.comments,
|
|
147
149
|
sourceLocations: options.sourceLocations,
|
|
150
|
+
settings: options.settings,
|
|
148
151
|
unsavedIndicator: options.unsavedIndicator
|
|
149
152
|
};
|
|
150
153
|
}
|
|
@@ -159,9 +162,9 @@ function createPostMessageTransport(options) {
|
|
|
159
162
|
const messageHandlers = /* @__PURE__ */ new Set();
|
|
160
163
|
function handleMessage(e) {
|
|
161
164
|
if (destroyed) return;
|
|
165
|
+
const expectedSource = options.source ?? iframe.contentWindow;
|
|
166
|
+
if (e.source !== expectedSource) return;
|
|
162
167
|
if (targetOrigin !== "*") {
|
|
163
|
-
const expectedSource = options.source ?? iframe.contentWindow;
|
|
164
|
-
if (e.source !== expectedSource) return;
|
|
165
168
|
if (e.origin !== targetOrigin) return;
|
|
166
169
|
}
|
|
167
170
|
const data = e.data;
|
|
@@ -328,7 +331,7 @@ function createWebSocketTransport(options) {
|
|
|
328
331
|
|
|
329
332
|
//#endregion
|
|
330
333
|
//#region src/version.ts
|
|
331
|
-
const SDK_VERSION = "0.
|
|
334
|
+
const SDK_VERSION = "0.22.0";
|
|
332
335
|
function inspectionRuntime() {
|
|
333
336
|
if (typeof window !== "undefined") return "browser";
|
|
334
337
|
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.22.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"bin": {
|
|
6
6
|
"stately-sdk": "./dist/bin.mjs"
|
|
@@ -93,8 +93,8 @@
|
|
|
93
93
|
"jsdom": "^27.4.0",
|
|
94
94
|
"tsdown": "0.21.0-beta.2",
|
|
95
95
|
"vitest": "^3.2.4",
|
|
96
|
-
"@statelyai/api-contract": "0.3.
|
|
97
|
-
"@statelyai/graph-tools": "0.
|
|
96
|
+
"@statelyai/api-contract": "0.3.6",
|
|
97
|
+
"@statelyai/graph-tools": "0.2.0"
|
|
98
98
|
},
|
|
99
99
|
"engines": {
|
|
100
100
|
"node": ">=22.4"
|