@statelyai/sdk 0.34.2 → 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 (39) hide show
  1. package/README.md +17 -34
  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-DVfx7FwN.d.mts → graph-B6xUxqR5.d.mts} +1 -1
  11. package/dist/graph.d.mts +1 -1
  12. package/dist/{index-A5CMACoO.d.mts → index-CoxF4Saw.d.mts} +8 -255
  13. package/dist/index.d.mts +8 -31
  14. package/dist/index.mjs +5 -9
  15. package/dist/{inspect-DBH9oOAd.d.mts → inspect-DCdu0ST3.d.mts} +1 -1
  16. package/dist/{inspect-ZVDq9tK2.mjs → inspect-GSXRhzOx.mjs} +1 -1
  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-CCf9j_SZ.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/{studio-CFN3-0-2.d.mts → studio-3ujfe2z0.d.mts} +2 -2
  24. package/dist/{openapi-BTDjYWXd.mjs → studio-Bn3alVku.mjs} +637 -1
  25. package/dist/studio.d.mts +1 -1
  26. package/dist/studio.mjs +2 -2
  27. package/dist/{version-CUFh-PYe.mjs → version-DECst76A.mjs} +1 -1
  28. package/package.json +18 -14
  29. package/dist/auth-CVFc85uF.d.mts +0 -15
  30. package/dist/dist-DsOTTfYv.mjs +0 -8361
  31. package/dist/editor-sync-types-D7YYz6fb.d.mts +0 -98
  32. package/dist/editorHostSession-DCTHhBqC.mjs +0 -912
  33. package/dist/editorHostSession-yGUKdLjq.d.mts +0 -325
  34. package/dist/editorHostSession.d.mts +0 -2
  35. package/dist/editorHostSession.mjs +0 -6
  36. package/dist/statelyPragma-YtVaBuIe.mjs +0 -102
  37. package/dist/studio-BZP6DaIO.mjs +0 -638
  38. package/dist/sync.d.mts +0 -86
  39. 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 };