@statelyai/sdk 0.20.2 → 0.21.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 +7 -0
- package/dist/embed.d.mts +47 -3
- package/dist/embed.mjs +134 -3
- package/dist/{graph-yDK-MM3G.d.mts → graph-B4WM_nYg.d.mts} +1 -1
- package/dist/graph.d.mts +1 -1
- package/dist/{index-BAkQThnl.d.mts → index-BABex8NE.d.mts} +65 -1
- package/dist/index.d.mts +5 -5
- package/dist/index.mjs +3 -3
- package/dist/{inspect-CwN52e61.mjs → inspect-CnOHdMYX.mjs} +1 -1
- package/dist/inspect.mjs +2 -2
- package/dist/patchTypes.d.mts +1 -1
- package/dist/protocol.d.mts +38 -4
- package/dist/{statelyPragma-Cnj58Rua.mjs → statelyPragma-mii-qTXd.mjs} +825 -65
- package/dist/{studio-YSppd-am.d.mts → studio-CjnsqD8j.d.mts} +1 -1
- package/dist/studio.d.mts +1 -1
- package/dist/sync.d.mts +2 -2
- package/dist/sync.mjs +1 -1
- package/dist/{version-C-1n7MoR.mjs → version-CNeiHhaT.mjs} +4 -3
- package/package.json +3 -3
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A as
|
|
1
|
+
import { A as output, C as ZodNumber, D as ZodString, E as ZodRecord, O as ZodUnion, S as ZodNullable, T as ZodOptional, b as ZodEnum, j as $strip, k as ZodUnknown, w as ZodObject, x as ZodLiteral, y as ZodArray } from "./index-BABex8NE.mjs";
|
|
2
2
|
import { n as StatelyCredential, t as StatelyAuthMode } from "./auth-B0ZTKri2.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-CjnsqD8j.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-B4WM_nYg.mjs";
|
|
2
|
+
import { C as StudioMachineRecord, L as XStateVersion, g as ProjectData, o as CreateProjectInput, x as StudioClient } from "./studio-CjnsqD8j.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,5 @@
|
|
|
1
1
|
import { r as createStatelyClient } from "./studio-DHGspwII.mjs";
|
|
2
|
-
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-
|
|
2
|
+
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-mii-qTXd.mjs";
|
|
3
3
|
import { fromStudioMachine, toStudioMachine } from "./graph.mjs";
|
|
4
4
|
import * as ts$1 from "typescript";
|
|
5
5
|
import ts from "typescript";
|
|
@@ -134,6 +134,7 @@ function toInitMessage(options) {
|
|
|
134
134
|
machine: options.machine,
|
|
135
135
|
documents: options.documents,
|
|
136
136
|
format: options.format,
|
|
137
|
+
extensions: options.extensions,
|
|
137
138
|
mode: options.mode,
|
|
138
139
|
theme: options.theme,
|
|
139
140
|
readOnly: options.readOnly,
|
|
@@ -159,9 +160,9 @@ function createPostMessageTransport(options) {
|
|
|
159
160
|
const messageHandlers = /* @__PURE__ */ new Set();
|
|
160
161
|
function handleMessage(e) {
|
|
161
162
|
if (destroyed) return;
|
|
163
|
+
const expectedSource = options.source ?? iframe.contentWindow;
|
|
164
|
+
if (e.source !== expectedSource) return;
|
|
162
165
|
if (targetOrigin !== "*") {
|
|
163
|
-
const expectedSource = options.source ?? iframe.contentWindow;
|
|
164
|
-
if (e.source !== expectedSource) return;
|
|
165
166
|
if (e.origin !== targetOrigin) return;
|
|
166
167
|
}
|
|
167
168
|
const data = e.data;
|
|
@@ -328,7 +329,7 @@ function createWebSocketTransport(options) {
|
|
|
328
329
|
|
|
329
330
|
//#endregion
|
|
330
331
|
//#region src/version.ts
|
|
331
|
-
const SDK_VERSION = "0.
|
|
332
|
+
const SDK_VERSION = "0.21.0";
|
|
332
333
|
function inspectionRuntime() {
|
|
333
334
|
if (typeof window !== "undefined") return "browser";
|
|
334
335
|
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.21.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"
|