@statelyai/sdk 0.21.0 → 0.22.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 +7 -0
- package/dist/{editorHostSession-CCTwvUOB.mjs → editorHostSession-BZE_Wm0m.mjs} +24 -11
- package/dist/{editorHostSession-lL7wPLnL.d.mts → editorHostSession-CMwC9KKh.d.mts} +6 -1
- package/dist/editorHostSession.d.mts +2 -2
- package/dist/editorHostSession.mjs +4 -3
- package/dist/embed.d.mts +5 -2
- package/dist/embed.mjs +14 -2
- package/dist/{graph-B4WM_nYg.d.mts → graph-1fwR0Ynl.d.mts} +1 -1
- package/dist/graph.d.mts +1 -1
- package/dist/{index-BABex8NE.d.mts → index-D_pO_Pr8.d.mts} +488 -486
- package/dist/index.d.mts +4 -4
- package/dist/index.mjs +7 -6
- package/dist/{inspect-CnOHdMYX.mjs → inspect-CXkNcKu4.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 +13 -4
- package/dist/{statelyPragma-mii-qTXd.mjs → statelyPragma-DfKQ-kPr.mjs} +46 -418
- package/dist/{studio-CjnsqD8j.d.mts → studio-CkrbMK00.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 +7 -3
- package/dist/{version-CNeiHhaT.mjs → version-yzel-kpS.mjs} +3 -1
- 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.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-DfKQ-kPr.mjs";
|
|
3
4
|
import { fromStudioMachine, toStudioMachine } from "./graph.mjs";
|
|
4
5
|
import * as ts$1 from "typescript";
|
|
5
6
|
import ts from "typescript";
|
|
@@ -154,7 +155,10 @@ function collectXStateSourceLocations(sourceText, document, options = {}) {
|
|
|
154
155
|
const rootProfile = detectXStateSourceProfile(sourceText);
|
|
155
156
|
const referencedStateSymbols = new Set([...states, ...statesObjectLocations].map((state) => state.symbol).filter((symbol) => typeof symbol === "string"));
|
|
156
157
|
const resolvedTransitionFunctions = collectResolvedTransitionFunctions(root, bindings);
|
|
157
|
-
const inferredProfile = rootProfile === "xstate-v6-alpha" || resolvedTransitionFunctions.size > 0 || [...referencedStateSymbols].some((symbol) =>
|
|
158
|
+
const inferredProfile = rootProfile === "xstate-v6-alpha" || resolvedTransitionFunctions.size > 0 || [...referencedStateSymbols].some((symbol) => {
|
|
159
|
+
const binding = bindings.get(symbol);
|
|
160
|
+
return binding?.kind === "createStateConfig" || detectXStateSourceProfile(binding?.sourceFile.text ?? "") === "xstate-v6-alpha";
|
|
161
|
+
}) ? "xstate-v6-alpha" : rootProfile;
|
|
158
162
|
return {
|
|
159
163
|
version: 1,
|
|
160
164
|
profile: packageProfile?.profile ?? inferredProfile,
|
|
@@ -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 {
|
|
@@ -146,6 +147,7 @@ function toInitMessage(options) {
|
|
|
146
147
|
activePanels: options.panels?.activePanels,
|
|
147
148
|
comments: options.comments,
|
|
148
149
|
sourceLocations: options.sourceLocations,
|
|
150
|
+
settings: options.settings,
|
|
149
151
|
unsavedIndicator: options.unsavedIndicator
|
|
150
152
|
};
|
|
151
153
|
}
|
|
@@ -329,7 +331,7 @@ function createWebSocketTransport(options) {
|
|
|
329
331
|
|
|
330
332
|
//#endregion
|
|
331
333
|
//#region src/version.ts
|
|
332
|
-
const SDK_VERSION = "0.
|
|
334
|
+
const SDK_VERSION = "0.22.1";
|
|
333
335
|
function inspectionRuntime() {
|
|
334
336
|
if (typeof window !== "undefined") return "browser";
|
|
335
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.1",
|
|
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.2.
|
|
96
|
+
"@statelyai/api-contract": "0.3.7",
|
|
97
|
+
"@statelyai/graph-tools": "0.2.1"
|
|
98
98
|
},
|
|
99
99
|
"engines": {
|
|
100
100
|
"node": ">=22.4"
|