@statelyai/sdk 0.34.1 → 0.35.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.
Files changed (40) hide show
  1. package/README.md +32 -26
  2. package/dist/assetStorage.d.mts +1 -1
  3. package/dist/auth.d.mts +14 -1
  4. package/dist/bin.mjs +1 -3
  5. package/dist/editor-sync-types-DNFk7Xtj.d.mts +53 -0
  6. package/dist/editorHostProtocol.d.mts +197 -0
  7. package/dist/{editorHostProtocol-B2_t3Le7.mjs → editorHostProtocol.mjs} +1 -1
  8. package/dist/embed.d.mts +3 -3
  9. package/dist/embed.mjs +2 -2
  10. package/dist/{graph-Ciocekxl.d.mts → graph-B6xUxqR5.d.mts} +1 -1
  11. package/dist/graph.d.mts +1 -1
  12. package/dist/{index-DZivqh0u.d.mts → index-CoxF4Saw.d.mts} +36 -252
  13. package/dist/index.d.mts +8 -31
  14. package/dist/index.mjs +5 -9
  15. package/dist/{inspect-BbvfH0Q1.d.mts → inspect-DCdu0ST3.d.mts} +1 -1
  16. package/dist/{inspect-DW30GMge.mjs → inspect-GSXRhzOx.mjs} +48 -32
  17. package/dist/inspect.d.mts +2 -2
  18. package/dist/inspect.mjs +2 -2
  19. package/dist/patchTypes.d.mts +1 -1
  20. package/dist/{protocol-B7q2lWj_.d.mts → protocol-nOWsz3UV.d.mts} +3 -3
  21. package/dist/protocol.d.mts +1 -1
  22. package/dist/relay.d.mts +1 -1
  23. package/dist/relay.mjs +40 -1
  24. package/dist/{studio-CKdEPGKY.d.mts → studio-3ujfe2z0.d.mts} +2 -2
  25. package/dist/{openapi-BTDjYWXd.mjs → studio-Bn3alVku.mjs} +637 -1
  26. package/dist/studio.d.mts +1 -1
  27. package/dist/studio.mjs +2 -2
  28. package/dist/{version-BEfUEyPL.mjs → version-DECst76A.mjs} +1 -1
  29. package/package.json +21 -17
  30. package/dist/auth-CVFc85uF.d.mts +0 -15
  31. package/dist/dist-NJFkDQjK.mjs +0 -8134
  32. package/dist/editor-sync-types-D7YYz6fb.d.mts +0 -98
  33. package/dist/editorHostSession-Bj5YcijC.mjs +0 -912
  34. package/dist/editorHostSession-DBLSyHJs.d.mts +0 -325
  35. package/dist/editorHostSession.d.mts +0 -2
  36. package/dist/editorHostSession.mjs +0 -6
  37. package/dist/statelyPragma-YtVaBuIe.mjs +0 -102
  38. package/dist/studio-BZP6DaIO.mjs +0 -638
  39. package/dist/sync.d.mts +0 -86
  40. package/dist/sync.mjs +0 -4646
@@ -1,98 +0,0 @@
1
- //#region ../api-contract/dist/editor-sync-types.d.mts
2
- //#region src/editor-sync-types.d.ts
3
- interface EditorCapabilities {
4
- edit?: boolean;
5
- export?: boolean;
6
- ai?: boolean;
7
- simulate?: boolean;
8
- inspect?: boolean;
9
- maxDepth?: number;
10
- panels?: string[];
11
- commands?: string[];
12
- }
13
- interface EditorSyncAccess {
14
- level: 'full' | 'restricted';
15
- readOnly: boolean;
16
- readOnlyReason?: 'free-plan' | 'access-unverified';
17
- capabilities: EditorCapabilities;
18
- }
19
- interface EditorSyncSourceRange {
20
- startLine: number;
21
- startChar: number;
22
- endLine: number;
23
- endChar: number;
24
- }
25
- interface EditorSyncSourceLocation {
26
- uri: string;
27
- range: EditorSyncSourceRange;
28
- }
29
- interface EditorSyncStateSourceLocation extends EditorSyncSourceLocation {
30
- path: string[];
31
- kind: 'inline' | 'objectReference' | 'createStateConfig';
32
- symbol?: string;
33
- keyRange?: EditorSyncSourceRange;
34
- referenceRange?: EditorSyncSourceRange;
35
- keySource?: {
36
- kind: 'const' | 'enumMember' | 'computedLiteral';
37
- symbol?: string;
38
- valueRange?: EditorSyncSourceRange;
39
- machineLocal?: boolean;
40
- };
41
- keyReplacementText?: string;
42
- }
43
- interface MachineSourceLocations {
44
- version: 1;
45
- profile?: 'xstate-v5' | 'xstate-v6-alpha';
46
- profileRef?: `@statelyai/xstate@${string}`;
47
- root?: EditorSyncSourceLocation;
48
- statesObject?: EditorSyncStateSourceLocation;
49
- states: EditorSyncStateSourceLocation[];
50
- staticValues?: Array<EditorSyncSourceLocation & {
51
- value: string;
52
- }>;
53
- transitionFunctions?: Array<EditorSyncSourceLocation & {
54
- symbol: string;
55
- sourcePaths: string[][];
56
- }>;
57
- }
58
- interface EditorSyncSourceDocument {
59
- uri: string;
60
- fileName: string;
61
- text: string;
62
- }
63
- interface EditorSyncDocumentContext {
64
- rootUri: string;
65
- rootFileName: string;
66
- rootDir: string;
67
- documents: EditorSyncSourceDocument[];
68
- /** Zero-based machine occurrence within the root source document. */
69
- machineIndex?: number;
70
- }
71
- type EditorSyncParseRequest = EditorSyncDocumentContext;
72
- interface EditorSyncParseResponse {
73
- machine: unknown;
74
- format: string;
75
- sourceLocations?: MachineSourceLocations;
76
- access?: EditorSyncAccess;
77
- }
78
- interface EditorSyncApplyRequest extends EditorSyncDocumentContext {
79
- machineConfig?: unknown;
80
- patches?: unknown[];
81
- prevGraph?: unknown;
82
- nextGraph?: unknown;
83
- sourceLocations?: MachineSourceLocations;
84
- serialized?: Record<string, string>;
85
- preserveStatelyMetadata?: boolean;
86
- sourceUpdateStrategy?: SourceUpdateStrategy;
87
- }
88
- type SourceUpdateStrategy = 'preserve' | 'rewrite';
89
- interface EditorSyncTextReplacement {
90
- uri?: string;
91
- range: EditorSyncSourceRange;
92
- newText: string;
93
- }
94
- interface EditorSyncApplyResponse {
95
- replacements: EditorSyncTextReplacement[];
96
- } //#endregion
97
- //#endregion
98
- export { EditorSyncParseRequest as a, EditorSyncSourceLocation as c, EditorSyncTextReplacement as d, MachineSourceLocations as f, EditorSyncApplyResponse as i, EditorSyncSourceRange as l, EditorSyncAccess as n, EditorSyncParseResponse as o, EditorSyncApplyRequest as r, EditorSyncSourceDocument as s, EditorCapabilities as t, EditorSyncStateSourceLocation as u };