@statelyai/sdk 0.39.0 → 0.40.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.
@@ -1,4 +1,4 @@
1
- import { Qt as UploadResult } from "./protocol-D3XQmmmv.mjs";
1
+ import { Qt as UploadResult } from "./protocol-DUehXGus.mjs";
2
2
  //#region src/assetStorage.d.ts
3
3
  interface AssetUploadContext {
4
4
  stateNodeId: string;
@@ -1,5 +1,5 @@
1
- import { o as GraphPatch } from "./index-DfMkVP94.mjs";
2
- import { mn as EmbedPanelConfig, mt as ProjectWorkspaceConfig, n as AuthenticationRecovery, pn as PresentationMetadataInitializer, rt as ProjectEmbedMachine } from "./protocol-D3XQmmmv.mjs";
1
+ import { i as GraphPatch } from "./index-gyYPC8rD.mjs";
2
+ import { mn as EmbedPanelConfig, mt as ProjectWorkspaceConfig, n as AuthenticationRecovery, pn as PresentationMetadataInitializer, rt as ProjectEmbedMachine } from "./protocol-DUehXGus.mjs";
3
3
  import { a as MachineSourceLocations, t as EditorCapabilities } from "./editor-sync-types-Ch5P5XRj.mjs";
4
4
 
5
5
  //#region src/editorHostProtocol.d.ts
package/dist/embed.d.mts CHANGED
@@ -1,6 +1,6 @@
1
- import { n as ProfileManifest, o as GraphPatch } from "./index-DfMkVP94.mjs";
2
- import { i as StatelyGraph } from "./graph-CfWCJS4m.mjs";
3
- import { $ as MachineVersionAutoSaveOptions, A as ExportFormat, E as EmbedMode, F as HostUpdateOptions, Q as MachineSourceLocations, Qt as UploadResult, S as EmbedEventName, X as MachineInitOptions, at as ProjectInitOptions, b as EmbedEventHandler, dt as ProjectWorkspaceActionIcon, f as CommentsConfig, gt as ProjectWorkspaceMachineOrigin, h as EditorCapabilities, hn as EmbedPanelPosition, ht as ProjectWorkspaceMachine, i as CapabilityDeniedEvent, j as ExportFormatMap, k as ExportCallOptions, mn as EmbedPanelConfig, mt as ProjectWorkspaceConfig, nn as ViewerOptions, pt as ProjectWorkspaceCapabilities, rt as ProjectEmbedMachine, ut as ProjectWorkspaceAction, v as EmbedDocument, vt as ProjectWorkspaceProject, w as EmbedExtensionsManifest, x as EmbedEventMap, y as EmbedDocumentLanguage, z as InitOptions } from "./protocol-D3XQmmmv.mjs";
1
+ import { i as GraphPatch, s as ProfileManifest } from "./index-gyYPC8rD.mjs";
2
+ import { i as StatelyGraph } from "./graph-9CApplKH.mjs";
3
+ import { $ as MachineVersionAutoSaveOptions, A as ExportFormat, E as EmbedMode, F as HostUpdateOptions, Q as MachineSourceLocations, Qt as UploadResult, S as EmbedEventName, X as MachineInitOptions, at as ProjectInitOptions, b as EmbedEventHandler, dt as ProjectWorkspaceActionIcon, f as CommentsConfig, gt as ProjectWorkspaceMachineOrigin, h as EditorCapabilities, hn as EmbedPanelPosition, ht as ProjectWorkspaceMachine, i as CapabilityDeniedEvent, j as ExportFormatMap, k as ExportCallOptions, mn as EmbedPanelConfig, mt as ProjectWorkspaceConfig, nn as ViewerOptions, pt as ProjectWorkspaceCapabilities, rt as ProjectEmbedMachine, ut as ProjectWorkspaceAction, v as EmbedDocument, vt as ProjectWorkspaceProject, w as EmbedExtensionsManifest, x as EmbedEventMap, y as EmbedDocumentLanguage, z as InitOptions } from "./protocol-DUehXGus.mjs";
4
4
  import { AssetUploadAdapter } from "./assetStorage.mjs";
5
5
  import { GraphDiff } from "@statelyai/graph";
6
6
 
package/dist/embed.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  import "./protocol-M3Zeun3o.mjs";
2
- import { c as createPendingExportManager, l as settingsWithViewMode, r as createPostMessageTransport, s as createEventRegistry, t as SDK_VERSION, u as toInitMessage } from "./version-hQHX5bet.mjs";
2
+ import { c as createPendingExportManager, l as settingsWithViewMode, r as createPostMessageTransport, s as createEventRegistry, t as SDK_VERSION, u as toInitMessage } from "./version-CRlxeCo2.mjs";
3
3
  import { EDITOR_PROTOCOL_VERSION } from "./editorHostProtocol.mjs";
4
4
 
5
5
  //#region src/embed.ts
@@ -34,6 +34,10 @@ function buildEmbedUrl(options) {
34
34
  const url = new URL(base);
35
35
  if (normalizeApiKey(options.apiKey)) url.searchParams.set("auth", "message");
36
36
  if (options.viewMode) url.searchParams.set("view", options.viewMode);
37
+ if (!options.machines && options.chrome?.controls === "plain") {
38
+ url.searchParams.set("chrome", "plain");
39
+ if (options.chrome.interactive) url.searchParams.set("interactive", "1");
40
+ }
37
41
  const appearance = options.settings?.appearance;
38
42
  const settingsMode = appearance && typeof appearance === "object" && "colorMode" in appearance ? appearance.colorMode : void 0;
39
43
  const colorMode = options.theme ?? settingsMode ?? "dark";
@@ -119,7 +123,10 @@ function extractInitOptions(options) {
119
123
  defaultPanelSide: options.defaultPanelSide,
120
124
  comments: options.comments,
121
125
  sourceLocations: options.sourceLocations,
122
- chrome: options.chrome?.controls ? { controls: options.chrome.controls } : void 0,
126
+ chrome: options.chrome?.controls ? {
127
+ controls: options.chrome.controls,
128
+ ...options.chrome.interactive !== void 0 && { interactive: options.chrome.interactive }
129
+ } : void 0,
123
130
  settings: settingsWithViewMode(options),
124
131
  unsavedIndicator: options.unsavedIndicator,
125
132
  versionAutoSave: options.versionAutoSave
@@ -465,7 +472,7 @@ function createStatelyEmbed(options) {
465
472
  }
466
473
  function applyIframeColorMode(el, mode) {
467
474
  el.style.colorScheme = mode === "system" ? "light dark" : mode;
468
- el.style.backgroundColor = "light-dark(#eff1f3, #15151d)";
475
+ el.style.backgroundColor = new URL(embedUrl).searchParams.get("chrome") === "plain" ? "transparent" : "light-dark(#eff1f3, #15151d)";
469
476
  }
470
477
  function prepareIframe(el) {
471
478
  restoreIframeVisibility?.();
@@ -1,4 +1,4 @@
1
- import { t as CodeExpression } from "./index-DfMkVP94.mjs";
1
+ import { o as CodeExpression } from "./index-gyYPC8rD.mjs";
2
2
  import * as _statelyai_graph0 from "@statelyai/graph";
3
3
  import { Graph } from "@statelyai/graph";
4
4
 
package/dist/graph.d.mts CHANGED
@@ -1,2 +1,2 @@
1
- import { _ as studioMachineConverter, a as StatelyGraphData, c as StatelyInvoke, d as StudioAction, f as StudioEdge, g as fromStudioMachine, h as StudioNode, i as StatelyGraph, l as StatelyNodeData, m as StudioMachine, n as StatelyActorImplementation, o as StatelyGuard, p as StudioEventTypeData, r as StatelyEdgeData, s as StatelyImplementation, t as StatelyAction, u as StatelyTagImplementation, v as toStudioMachine } from "./graph-CfWCJS4m.mjs";
1
+ import { _ as studioMachineConverter, a as StatelyGraphData, c as StatelyInvoke, d as StudioAction, f as StudioEdge, g as fromStudioMachine, h as StudioNode, i as StatelyGraph, l as StatelyNodeData, m as StudioMachine, n as StatelyActorImplementation, o as StatelyGuard, p as StudioEventTypeData, r as StatelyEdgeData, s as StatelyImplementation, t as StatelyAction, u as StatelyTagImplementation, v as toStudioMachine } from "./graph-9CApplKH.mjs";
2
2
  export { StatelyAction, StatelyActorImplementation, StatelyEdgeData, StatelyGraph, StatelyGraphData, StatelyGuard, StatelyImplementation, StatelyInvoke, StatelyNodeData, StatelyTagImplementation, StudioAction, StudioEdge, StudioEventTypeData, StudioMachine, StudioNode, fromStudioMachine, studioMachineConverter, toStudioMachine };