@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/dist/sync.d.mts CHANGED
@@ -1,5 +1,5 @@
1
- import { b as DigraphConfig, i as StatelyGraph } from "./graph-yDK-MM3G.mjs";
2
- import { C as StudioMachineRecord, L as XStateVersion, g as ProjectData, o as CreateProjectInput, x as StudioClient } from "./studio-YSppd-am.mjs";
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 { 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-Cesya0Pk.mjs";
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.20.3";
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.20.3",
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.4",
97
- "@statelyai/graph-tools": "0.1.1"
96
+ "@statelyai/api-contract": "0.3.6",
97
+ "@statelyai/graph-tools": "0.2.0"
98
98
  },
99
99
  "engines": {
100
100
  "node": ">=22.4"