@statelyai/sdk 0.7.1 → 0.8.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 +11 -638
- package/dist/assetStorage.d.mts +1 -1
- package/dist/embed.d.mts +1 -1
- package/dist/embed.mjs +1 -1
- package/dist/graph.d.mts +1 -1
- package/dist/{graphToXStateTS-Gzh0ZqbN.mjs → graphToXStateTS-moihsH_U.mjs} +17 -16
- package/dist/index.d.mts +144 -5
- package/dist/index.mjs +2 -2
- package/dist/{inspect-YoEwfiKb.d.mts → inspect-BLlM3qKf.d.mts} +1 -1
- package/dist/inspect.d.mts +2 -2
- package/dist/inspect.mjs +1 -1
- package/dist/{protocol-s9zwsiCW.d.mts → protocol.d.mts} +2 -1
- package/dist/protocol.mjs +5 -0
- package/dist/sync.d.mts +1 -1
- package/dist/sync.mjs +1254 -3
- package/dist/{transport-C8UTS3Fa.mjs → transport-CVZGF0w9.mjs} +2 -4
- package/package.json +5 -18
- package/dist/cli.d.mts +0 -203
- package/dist/cli.mjs +0 -1760
- package/dist/sync-DLkTmSyA.mjs +0 -2513
- /package/dist/{graph-zuNj3kfa.d.mts → graph-CJ3N2r43.d.mts} +0 -0
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-
|
|
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-CJ3N2r43.mjs";
|
|
2
2
|
export { StatelyAction, StatelyActorImplementation, StatelyEdgeData, StatelyGraph, StatelyGraphData, StatelyGuard, StatelyImplementation, StatelyInvoke, StatelyNodeData, StatelyTagImplementation, StudioAction, StudioEdge, StudioEventTypeData, StudioMachine, StudioNode, fromStudioMachine, studioMachineConverter, toStudioMachine };
|
|
@@ -535,9 +535,10 @@ function stripExportDefault(code) {
|
|
|
535
535
|
//#endregion
|
|
536
536
|
//#region src/graphToXStateTS.ts
|
|
537
537
|
function graphToXStateTS(graph, options = {}) {
|
|
538
|
-
const { exportStyle = "named", ...configOptions } = options;
|
|
538
|
+
const { exportStyle = "named", targetLanguage = "typescript", ...configOptions } = options;
|
|
539
539
|
const schemas = graph.data.schemas;
|
|
540
540
|
const impls = filterInlineImplementations(graph.data.implementations);
|
|
541
|
+
const supportsTypeSyntax = targetLanguage === "typescript";
|
|
541
542
|
const hasSchemas = !!(schemas && (schemas.context || schemas.events || schemas.input || schemas.output));
|
|
542
543
|
const hasActions = !!impls?.actions.length;
|
|
543
544
|
const hasGuards = !!impls?.guards.length;
|
|
@@ -554,7 +555,7 @@ function graphToXStateTS(graph, options = {}) {
|
|
|
554
555
|
const machineConfig = graphToMachineConfig(graph, configOptions);
|
|
555
556
|
let machineExpr;
|
|
556
557
|
if (hasSetup) {
|
|
557
|
-
const setupObj = buildSetupObject(schemas, impls);
|
|
558
|
+
const setupObj = buildSetupObject(schemas, impls, { includeTypeSyntax: supportsTypeSyntax });
|
|
558
559
|
const configStr = serializeJS(machineConfig, 2);
|
|
559
560
|
machineExpr = `setup(${serializeJS(setupObj, 0)}).createMachine(${configStr})`;
|
|
560
561
|
} else machineExpr = `createMachine(${serializeJS(machineConfig, 0)})`;
|
|
@@ -621,22 +622,22 @@ function buildImports({ hasSetup, hasActors, actors, builtInActions }) {
|
|
|
621
622
|
else xstateImports.push("createMachine");
|
|
622
623
|
for (const name of builtInActions) xstateImports.push(name);
|
|
623
624
|
if (hasActors) {
|
|
624
|
-
if (actors.
|
|
625
|
+
if (actors.length > 0) xstateImports.push("fromPromise");
|
|
625
626
|
}
|
|
626
627
|
return `import { ${xstateImports.join(", ")} } from 'xstate';`;
|
|
627
628
|
}
|
|
628
|
-
function buildSetupObject(schemas, impls) {
|
|
629
|
+
function buildSetupObject(schemas, impls, options) {
|
|
629
630
|
const setup = {};
|
|
630
|
-
const types = buildTypesBlock(schemas);
|
|
631
|
+
const types = buildTypesBlock(schemas, options);
|
|
631
632
|
if (types) setup.types = types;
|
|
632
|
-
if (impls?.actions.length) setup.actions = buildActionsBlock(impls.actions);
|
|
633
|
-
if (impls?.guards.length) setup.guards = buildGuardsBlock(impls.guards);
|
|
634
|
-
if (impls?.actors.length) setup.actors = buildActorsBlock(impls.actors);
|
|
633
|
+
if (impls?.actions.length) setup.actions = buildActionsBlock(impls.actions, options);
|
|
634
|
+
if (impls?.guards.length) setup.guards = buildGuardsBlock(impls.guards, options);
|
|
635
|
+
if (impls?.actors.length) setup.actors = buildActorsBlock(impls.actors, options);
|
|
635
636
|
if (impls?.delays.length) setup.delays = buildDelaysBlock(impls.delays);
|
|
636
637
|
return setup;
|
|
637
638
|
}
|
|
638
|
-
function buildTypesBlock(schemas) {
|
|
639
|
-
if (!schemas) return void 0;
|
|
639
|
+
function buildTypesBlock(schemas, options) {
|
|
640
|
+
if (!schemas || !options.includeTypeSyntax) return void 0;
|
|
640
641
|
const types = {};
|
|
641
642
|
const contextType = contextSchemaToTSType(schemas.context);
|
|
642
643
|
if (contextType) types.context = raw(`{} as ${contextType}`);
|
|
@@ -654,7 +655,7 @@ function hasSchemaProperties(schema) {
|
|
|
654
655
|
}
|
|
655
656
|
return true;
|
|
656
657
|
}
|
|
657
|
-
function buildActionsBlock(actions) {
|
|
658
|
+
function buildActionsBlock(actions, options) {
|
|
658
659
|
const block = {};
|
|
659
660
|
for (const implementation of actions) if (implementation.code?.body) {
|
|
660
661
|
const exportedExpression = getExportDefaultExpression(implementation.code.body);
|
|
@@ -662,12 +663,12 @@ function buildActionsBlock(actions) {
|
|
|
662
663
|
block[implementation.name] = raw(exportedExpression);
|
|
663
664
|
continue;
|
|
664
665
|
}
|
|
665
|
-
const params = hasSchemaProperties(implementation.paramsSchema) ? `, params: ${jsonSchemaToTSType(implementation.paramsSchema)}` : "";
|
|
666
|
+
const params = hasSchemaProperties(implementation.paramsSchema) ? options.includeTypeSyntax ? `, params: ${jsonSchemaToTSType(implementation.paramsSchema)}` : ", params" : "";
|
|
666
667
|
block[implementation.name] = raw(`function ({ context, event }${params ? params : ""}) {\n ${dedent(implementation.code.body)}\n}`);
|
|
667
668
|
} else block[implementation.name] = raw(`function ({ context, event }) {\n // TODO: implement ${implementation.name}\n}`);
|
|
668
669
|
return block;
|
|
669
670
|
}
|
|
670
|
-
function buildGuardsBlock(guards) {
|
|
671
|
+
function buildGuardsBlock(guards, options) {
|
|
671
672
|
const block = {};
|
|
672
673
|
for (const guard of guards) if (guard.code?.body) {
|
|
673
674
|
const exportedExpression = getExportDefaultExpression(guard.code.body);
|
|
@@ -675,15 +676,15 @@ function buildGuardsBlock(guards) {
|
|
|
675
676
|
block[guard.name] = raw(exportedExpression);
|
|
676
677
|
continue;
|
|
677
678
|
}
|
|
678
|
-
const params = hasSchemaProperties(guard.paramsSchema) ? `, params: ${jsonSchemaToTSType(guard.paramsSchema)}` : "";
|
|
679
|
+
const params = hasSchemaProperties(guard.paramsSchema) ? options.includeTypeSyntax ? `, params: ${jsonSchemaToTSType(guard.paramsSchema)}` : ", params" : "";
|
|
679
680
|
block[guard.name] = raw(`function ({ context, event }${params ? params : ""}) {\n ${dedent(guard.code.body)}\n}`);
|
|
680
681
|
} else block[guard.name] = raw(`function ({ context, event }) {\n // TODO: implement ${guard.name}\n return false;\n}`);
|
|
681
682
|
return block;
|
|
682
683
|
}
|
|
683
|
-
function buildActorsBlock(actors) {
|
|
684
|
+
function buildActorsBlock(actors, options) {
|
|
684
685
|
const block = {};
|
|
685
686
|
for (const actor of actors) if (actor.code?.body) {
|
|
686
|
-
const inputType = hasSchemaProperties(actor.inputSchema) ? `: ${jsonSchemaToTSType(actor.inputSchema)}` : "";
|
|
687
|
+
const inputType = options.includeTypeSyntax && hasSchemaProperties(actor.inputSchema) ? `: ${jsonSchemaToTSType(actor.inputSchema)}` : "";
|
|
687
688
|
block[actor.name] = raw(`fromPromise(async ({ input }${inputType ? `: { input${inputType} }` : ""}) => {\n ${dedent(actor.code.body)}\n})`);
|
|
688
689
|
} else block[actor.name] = raw(`fromPromise(async ({ input }) => {\n // TODO: implement ${actor.name}\n})`);
|
|
689
690
|
return block;
|
package/dist/index.d.mts
CHANGED
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
import { StatelyApiClientOptions, StatelyApiError, StatelyApiUrlOptions, createStatelyApiClient, createStatelyApiUrl } from "./api.mjs";
|
|
2
|
-
import {
|
|
2
|
+
import { CommentsConfig, EmbedEventHandler, EmbedEventMap, EmbedEventName, EmbedMode, ExportCallOptions, ExportFormat, ExportFormatMap, InitOptions, ProjectEmbedMachine, UploadResult } from "./protocol.mjs";
|
|
3
3
|
import { AssetUploadAdapter, AssetUploadContext, AssetUploadRequest, CreateS3AssetUploadAdapterOptions, CreateSupabaseAssetUploadAdapterOptions, S3UploadTarget, SupabaseStorageClient, createS3AssetUploadAdapter, createSupabaseAssetUploadAdapter } from "./assetStorage.mjs";
|
|
4
|
+
import { AssetConfig, StatelyEmbed, StatelyEmbedOptions, createStatelyEmbed } from "./embed.mjs";
|
|
5
|
+
import { C as EventTypeData, S as DigraphNodeConfig, _ as studioMachineConverter, a as StatelyGraphData, b as DigraphConfig, c as StatelyInvoke, d as StudioAction, f as StudioEdge, g as fromStudioMachine, h as StudioNode, i as StatelyGraph, l as StatelyNodeData, m as StudioMachine, o as StatelyGuard, r as StatelyEdgeData, t as StatelyAction, v as toStudioMachine, w as StateNodeJSONData, x as DigraphEdgeConfig, y as DigraphAction } from "./graph-CJ3N2r43.mjs";
|
|
6
|
+
import { a as ManualActorOptions, c as createPostMessageTransport, i as InspectorEvents, l as createWebSocketTransport, n as CreateInspectorOptions, o as createStatelyInspector, r as Inspector, s as Transport, t as AdoptedActor } from "./inspect-BLlM3qKf.mjs";
|
|
4
7
|
import { ConnectedRepo, CreateMachineFromDefinitionInput, CreateMachineFromTemplateInput, CreateMachineInput, CreateMachineTemplate, CreateProjectInput, EnsureProjectInput, ExtractMachinesResponse, ExtractedMachine, GetMachineOptions, ProjectData, ProjectMachine, ProjectVisibility, RepoType, StudioApiError, StudioClient, StudioClientOptions, StudioMachineRecord, UpdateMachineInput, VerifyApiKeyResponse, XStateVersion, createStatelyClient } from "./studio.mjs";
|
|
5
|
-
import { C as EventTypeData, S as DigraphNodeConfig, _ as studioMachineConverter, a as StatelyGraphData, b as DigraphConfig, c as StatelyInvoke, d as StudioAction, f as StudioEdge, g as fromStudioMachine, h as StudioNode, i as StatelyGraph, l as StatelyNodeData, m as StudioMachine, o as StatelyGuard, r as StatelyEdgeData, t as StatelyAction, v as toStudioMachine, w as StateNodeJSONData, x as DigraphEdgeConfig, y as DigraphAction } from "./graph-zuNj3kfa.mjs";
|
|
6
8
|
import { PlanSyncOptions, PullSyncResult, PushLocalMachineLinksResult, PushSyncOptions, PushSyncProjectOptions, PushSyncResult, ResolvedSyncInput, SyncInputFormat, SyncPlan, SyncPlanSummary } from "./sync.mjs";
|
|
7
|
-
import { AssetConfig, StatelyEmbed, StatelyEmbedOptions, createStatelyEmbed } from "./embed.mjs";
|
|
8
|
-
import { a as ManualActorOptions, c as createPostMessageTransport, i as InspectorEvents, l as createWebSocketTransport, n as CreateInspectorOptions, o as createStatelyInspector, r as Inspector, s as Transport, t as AdoptedActor } from "./inspect-YoEwfiKb.mjs";
|
|
9
9
|
import { ActionLocation, GraphPatch } from "./patchTypes.mjs";
|
|
10
10
|
import { UnknownMachineConfig } from "xstate";
|
|
11
|
-
import { JSONSchema7 } from "json-schema";
|
|
12
11
|
|
|
13
12
|
//#region src/statelyPragma.d.ts
|
|
14
13
|
interface StatelyPragma {
|
|
@@ -32,6 +31,145 @@ declare function findStatelyPragmaAttachments(sourceText: string, fileName?: str
|
|
|
32
31
|
declare function getStatelyPragma(sourceText: string, fileName?: string, machineIndex?: number): StatelyPragma | undefined;
|
|
33
32
|
declare function upsertStatelyPragma(sourceText: string, id: string, options?: UpsertStatelyPragmaOptions): string;
|
|
34
33
|
//#endregion
|
|
34
|
+
//#region ../../node_modules/.pnpm/@types+json-schema@7.0.15/node_modules/@types/json-schema/index.d.ts
|
|
35
|
+
// ==================================================================================================
|
|
36
|
+
// JSON Schema Draft 07
|
|
37
|
+
// ==================================================================================================
|
|
38
|
+
// https://tools.ietf.org/html/draft-handrews-json-schema-validation-01
|
|
39
|
+
// --------------------------------------------------------------------------------------------------
|
|
40
|
+
/**
|
|
41
|
+
* Primitive type
|
|
42
|
+
* @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-6.1.1
|
|
43
|
+
*/
|
|
44
|
+
type JSONSchema7TypeName = "string" //
|
|
45
|
+
| "number" | "integer" | "boolean" | "object" | "array" | "null";
|
|
46
|
+
/**
|
|
47
|
+
* Primitive type
|
|
48
|
+
* @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-6.1.1
|
|
49
|
+
*/
|
|
50
|
+
type JSONSchema7Type = string //
|
|
51
|
+
| number | boolean | JSONSchema7Object | JSONSchema7Array | null;
|
|
52
|
+
// Workaround for infinite type recursion
|
|
53
|
+
interface JSONSchema7Object {
|
|
54
|
+
[key: string]: JSONSchema7Type;
|
|
55
|
+
}
|
|
56
|
+
// Workaround for infinite type recursion
|
|
57
|
+
// https://github.com/Microsoft/TypeScript/issues/3496#issuecomment-128553540
|
|
58
|
+
interface JSONSchema7Array extends Array<JSONSchema7Type> {}
|
|
59
|
+
/**
|
|
60
|
+
* Meta schema
|
|
61
|
+
*
|
|
62
|
+
* Recommended values:
|
|
63
|
+
* - 'http://json-schema.org/schema#'
|
|
64
|
+
* - 'http://json-schema.org/hyper-schema#'
|
|
65
|
+
* - 'http://json-schema.org/draft-07/schema#'
|
|
66
|
+
* - 'http://json-schema.org/draft-07/hyper-schema#'
|
|
67
|
+
*
|
|
68
|
+
* @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-5
|
|
69
|
+
*/
|
|
70
|
+
type JSONSchema7Version = string;
|
|
71
|
+
/**
|
|
72
|
+
* JSON Schema v7
|
|
73
|
+
* @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01
|
|
74
|
+
*/
|
|
75
|
+
type JSONSchema7Definition = JSONSchema7 | boolean;
|
|
76
|
+
interface JSONSchema7 {
|
|
77
|
+
$id?: string | undefined;
|
|
78
|
+
$ref?: string | undefined;
|
|
79
|
+
$schema?: JSONSchema7Version | undefined;
|
|
80
|
+
$comment?: string | undefined;
|
|
81
|
+
/**
|
|
82
|
+
* @see https://datatracker.ietf.org/doc/html/draft-bhutton-json-schema-00#section-8.2.4
|
|
83
|
+
* @see https://datatracker.ietf.org/doc/html/draft-bhutton-json-schema-validation-00#appendix-A
|
|
84
|
+
*/
|
|
85
|
+
$defs?: {
|
|
86
|
+
[key: string]: JSONSchema7Definition;
|
|
87
|
+
} | undefined;
|
|
88
|
+
/**
|
|
89
|
+
* @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-6.1
|
|
90
|
+
*/
|
|
91
|
+
type?: JSONSchema7TypeName | JSONSchema7TypeName[] | undefined;
|
|
92
|
+
enum?: JSONSchema7Type[] | undefined;
|
|
93
|
+
const?: JSONSchema7Type | undefined;
|
|
94
|
+
/**
|
|
95
|
+
* @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-6.2
|
|
96
|
+
*/
|
|
97
|
+
multipleOf?: number | undefined;
|
|
98
|
+
maximum?: number | undefined;
|
|
99
|
+
exclusiveMaximum?: number | undefined;
|
|
100
|
+
minimum?: number | undefined;
|
|
101
|
+
exclusiveMinimum?: number | undefined;
|
|
102
|
+
/**
|
|
103
|
+
* @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-6.3
|
|
104
|
+
*/
|
|
105
|
+
maxLength?: number | undefined;
|
|
106
|
+
minLength?: number | undefined;
|
|
107
|
+
pattern?: string | undefined;
|
|
108
|
+
/**
|
|
109
|
+
* @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-6.4
|
|
110
|
+
*/
|
|
111
|
+
items?: JSONSchema7Definition | JSONSchema7Definition[] | undefined;
|
|
112
|
+
additionalItems?: JSONSchema7Definition | undefined;
|
|
113
|
+
maxItems?: number | undefined;
|
|
114
|
+
minItems?: number | undefined;
|
|
115
|
+
uniqueItems?: boolean | undefined;
|
|
116
|
+
contains?: JSONSchema7Definition | undefined;
|
|
117
|
+
/**
|
|
118
|
+
* @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-6.5
|
|
119
|
+
*/
|
|
120
|
+
maxProperties?: number | undefined;
|
|
121
|
+
minProperties?: number | undefined;
|
|
122
|
+
required?: string[] | undefined;
|
|
123
|
+
properties?: {
|
|
124
|
+
[key: string]: JSONSchema7Definition;
|
|
125
|
+
} | undefined;
|
|
126
|
+
patternProperties?: {
|
|
127
|
+
[key: string]: JSONSchema7Definition;
|
|
128
|
+
} | undefined;
|
|
129
|
+
additionalProperties?: JSONSchema7Definition | undefined;
|
|
130
|
+
dependencies?: {
|
|
131
|
+
[key: string]: JSONSchema7Definition | string[];
|
|
132
|
+
} | undefined;
|
|
133
|
+
propertyNames?: JSONSchema7Definition | undefined;
|
|
134
|
+
/**
|
|
135
|
+
* @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-6.6
|
|
136
|
+
*/
|
|
137
|
+
if?: JSONSchema7Definition | undefined;
|
|
138
|
+
then?: JSONSchema7Definition | undefined;
|
|
139
|
+
else?: JSONSchema7Definition | undefined;
|
|
140
|
+
/**
|
|
141
|
+
* @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-6.7
|
|
142
|
+
*/
|
|
143
|
+
allOf?: JSONSchema7Definition[] | undefined;
|
|
144
|
+
anyOf?: JSONSchema7Definition[] | undefined;
|
|
145
|
+
oneOf?: JSONSchema7Definition[] | undefined;
|
|
146
|
+
not?: JSONSchema7Definition | undefined;
|
|
147
|
+
/**
|
|
148
|
+
* @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-7
|
|
149
|
+
*/
|
|
150
|
+
format?: string | undefined;
|
|
151
|
+
/**
|
|
152
|
+
* @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-8
|
|
153
|
+
*/
|
|
154
|
+
contentMediaType?: string | undefined;
|
|
155
|
+
contentEncoding?: string | undefined;
|
|
156
|
+
/**
|
|
157
|
+
* @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-9
|
|
158
|
+
*/
|
|
159
|
+
definitions?: {
|
|
160
|
+
[key: string]: JSONSchema7Definition;
|
|
161
|
+
} | undefined;
|
|
162
|
+
/**
|
|
163
|
+
* @see https://tools.ietf.org/html/draft-handrews-json-schema-validation-01#section-10
|
|
164
|
+
*/
|
|
165
|
+
title?: string | undefined;
|
|
166
|
+
description?: string | undefined;
|
|
167
|
+
default?: JSONSchema7Type | undefined;
|
|
168
|
+
readOnly?: boolean | undefined;
|
|
169
|
+
writeOnly?: boolean | undefined;
|
|
170
|
+
examples?: JSONSchema7Type | undefined;
|
|
171
|
+
}
|
|
172
|
+
//#endregion
|
|
35
173
|
//#region ../graph-tools/src/codegenTypes.d.ts
|
|
36
174
|
interface CodeGenAction {
|
|
37
175
|
type: string;
|
|
@@ -153,6 +291,7 @@ declare function graphToMachineConfig(graph: CodeGenGraph, options?: MachineConf
|
|
|
153
291
|
//#region src/graphToXStateTS.d.ts
|
|
154
292
|
interface XStateTSOptions extends MachineConfigOptions {
|
|
155
293
|
exportStyle?: 'named' | 'default' | 'none';
|
|
294
|
+
targetLanguage?: 'typescript' | 'javascript';
|
|
156
295
|
}
|
|
157
296
|
declare function graphToXStateTS(graph: CodeGenGraph, options?: XStateTSOptions): string;
|
|
158
297
|
//#endregion
|
package/dist/index.mjs
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { n as createWebSocketTransport, t as createPostMessageTransport } from "./transport-
|
|
1
|
+
import { n as createWebSocketTransport, t as createPostMessageTransport } from "./transport-CVZGF0w9.mjs";
|
|
2
2
|
import { createStatelyEmbed } from "./embed.mjs";
|
|
3
3
|
import { createS3AssetUploadAdapter, createSupabaseAssetUploadAdapter } from "./assetStorage.mjs";
|
|
4
4
|
import { createStatelyInspector } from "./inspect.mjs";
|
|
5
5
|
import { StudioApiError, createStatelyClient } from "./studio.mjs";
|
|
6
6
|
import { StatelyApiError, createStatelyApiClient, createStatelyApiUrl } from "./api.mjs";
|
|
7
|
-
import { a as graphToMachineConfig, c as serializeJS, d as upsertStatelyPragma, i as jsonSchemaToTSType, l as findStatelyPragmaAttachments, n as contextSchemaToTSType, o as RawCode, r as eventsSchemaToTSType, s as raw, t as graphToXStateTS, u as getStatelyPragma } from "./graphToXStateTS-
|
|
7
|
+
import { a as graphToMachineConfig, c as serializeJS, d as upsertStatelyPragma, i as jsonSchemaToTSType, l as findStatelyPragmaAttachments, n as contextSchemaToTSType, o as RawCode, r as eventsSchemaToTSType, s as raw, t as graphToXStateTS, u as getStatelyPragma } from "./graphToXStateTS-moihsH_U.mjs";
|
|
8
8
|
import { fromStudioMachine, studioMachineConverter, toStudioMachine } from "./graph.mjs";
|
|
9
9
|
|
|
10
10
|
export { RawCode, StatelyApiError, StudioApiError, contextSchemaToTSType, createPostMessageTransport, createS3AssetUploadAdapter, createStatelyApiClient, createStatelyApiUrl, createStatelyClient, createStatelyEmbed, createStatelyInspector, createSupabaseAssetUploadAdapter, createWebSocketTransport, eventsSchemaToTSType, findStatelyPragmaAttachments, fromStudioMachine, getStatelyPragma, graphToMachineConfig, graphToXStateTS, jsonSchemaToTSType, raw, serializeJS, studioMachineConverter, toStudioMachine, upsertStatelyPragma };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { EmbedEventMap, ExportCallOptions, ExportFormat, ExportFormatMap, ProtocolMessage } from "./protocol.mjs";
|
|
2
2
|
|
|
3
3
|
//#region src/transport.d.ts
|
|
4
4
|
interface Transport {
|
package/dist/inspect.d.mts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { a as ManualActorOptions, i as InspectorEvents, n as CreateInspectorOptions, o as createStatelyInspector, r as Inspector, s as Transport, t as AdoptedActor } from "./inspect-
|
|
1
|
+
import { EmbedEventHandler, EmbedEventMap, EmbedEventName, EmbedMode, ExportCallOptions, ExportFormat, ExportFormatMap } from "./protocol.mjs";
|
|
2
|
+
import { a as ManualActorOptions, i as InspectorEvents, n as CreateInspectorOptions, o as createStatelyInspector, r as Inspector, s as Transport, t as AdoptedActor } from "./inspect-BLlM3qKf.mjs";
|
|
3
3
|
export { AdoptedActor, CreateInspectorOptions, EmbedEventHandler, EmbedEventMap, EmbedEventName, EmbedMode, ExportCallOptions, ExportFormat, ExportFormatMap, Inspector, InspectorEvents, ManualActorOptions, Transport, createStatelyInspector };
|
package/dist/inspect.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { i as createPendingExportManager, n as createWebSocketTransport, r as createEventRegistry } from "./transport-
|
|
1
|
+
import { i as createPendingExportManager, n as createWebSocketTransport, r as createEventRegistry } from "./transport-CVZGF0w9.mjs";
|
|
2
2
|
|
|
3
3
|
//#region src/inspect.ts
|
|
4
4
|
const defaultSerializeSnapshot = (snapshot) => ({
|
|
@@ -461,5 +461,6 @@ interface SessionAddedMessage {
|
|
|
461
461
|
type SessionMessage = RegisterMessage | RegisteredMessage | RequestOpenMessage | AddSessionMessage | SessionAddedMessage;
|
|
462
462
|
/** Any valid protocol message. */
|
|
463
463
|
type ProtocolMessage = ClientMessage | VizMessage | SessionMessage;
|
|
464
|
+
declare const PREFIX = "@statelyai.";
|
|
464
465
|
//#endregion
|
|
465
|
-
export { EmbedMode
|
|
466
|
+
export { ActorSystemEntry, AddSessionMessage, ChangeMessage, ClientMessage, CommentsConfig, EmbedEventHandler, EmbedEventMap, EmbedEventName, EmbedMode, ErrorMessage, ExportCallOptions, ExportFormat, ExportFormatMap, InitMessage, InitOptions, InspectSnapshotMessage, LoadedMessage, MachineInitOptions, MachineSourceLocations, PREFIX, ProjectEmbedMachine, ProjectInitMessage, ProjectInitOptions, ProjectMachineSelectedMessage, ProjectSelectMachineMessage, ProjectUpdateMessage, ProtocolMessage, ReadyMessage, RegisterMessage, RegisteredMessage, RequestOpenMessage, RetrieveMessage, RetrievedMessage, SaveMessage, SessionAddedMessage, SessionMessage, SetModeMessage, SetSettingsMessage, SetThemeMessage, SourceLocation, SourceRange, StateSourceLocation, SystemActorRegisteredMessage, SystemActorSnapshotMessage, SystemActorStoppedMessage, SystemInitMessage, ToastMessage, UpdateMessage, UploadCapabilitiesMessage, UploadFileInfo, UploadRequestMessage, UploadResponseMessage, UploadResult, ValidationIssue, VizMessage };
|
package/dist/sync.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
import { b as DigraphConfig, i as StatelyGraph } from "./graph-CJ3N2r43.mjs";
|
|
1
2
|
import { CreateProjectInput, ProjectData, StudioClient, StudioMachineRecord, XStateVersion } from "./studio.mjs";
|
|
2
|
-
import { b as DigraphConfig, i as StatelyGraph } from "./graph-zuNj3kfa.mjs";
|
|
3
3
|
import { GraphDiff } from "@statelyai/graph";
|
|
4
4
|
|
|
5
5
|
//#region src/sync.d.ts
|