x-state-lib 0.1.1 → 0.1.3

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/index.js CHANGED
@@ -44,7 +44,7 @@ function Xt() {
44
44
  }
45
45
  function Jt() {
46
46
  return {
47
- spaces: {}
47
+ spaces: []
48
48
  };
49
49
  }
50
50
  var $t = typeof global == "object" && global && global.Object === Object && global, Zt = typeof self == "object" && self && self.Object === Object && self, l = $t || Zt || Function("return this")(), j = l.Symbol, mt = Object.prototype, Qt = mt.hasOwnProperty, kt = mt.toString, A = j ? j.toStringTag : void 0;
@@ -650,22 +650,22 @@ function xa(t) {
650
650
  }), e;
651
651
  }
652
652
  const Ea = function() {
653
- return window.blocklyState || (window.blocklyState = {
653
+ return window.state || (window.state = {
654
654
  base: qt(),
655
655
  runtime: Pa(),
656
656
  app: Wt(),
657
657
  compute: Yt(),
658
658
  data: Xt(),
659
659
  resource: Jt()
660
- }), window.blocklyState;
660
+ }), window.state;
661
661
  }();
662
662
  export {
663
- Ea as blocklyState,
664
663
  Ia as buildProps,
665
664
  Wt as initApp,
666
665
  qt as initBase,
667
666
  Yt as initCompute,
668
667
  Xt as initData,
669
668
  Jt as initResource,
670
- Pa as initRuntime
669
+ Pa as initRuntime,
670
+ Ea as state
671
671
  };
@@ -1,4 +1,4 @@
1
- type AppListEntry = {
1
+ export type AppListEntry = {
2
2
  id: string;
3
3
  name: string;
4
4
  pages: {
@@ -6,23 +6,23 @@ type AppListEntry = {
6
6
  name: string;
7
7
  }[];
8
8
  };
9
- type CompGroup = {
9
+ export type CompGroup = {
10
10
  id: string;
11
11
  name: string;
12
12
  position: number;
13
13
  };
14
- type Comp = {
14
+ export type Comp = {
15
15
  id: string;
16
16
  groupid: string;
17
17
  name: string;
18
18
  position: number;
19
19
  };
20
- type ActiveApp = {
20
+ export type ActiveApp = {
21
21
  id: '';
22
22
  compGroups: CompGroup[];
23
23
  comps: Comp[];
24
24
  };
25
- type ActiveObject = {
25
+ export type ActiveObject = {
26
26
  type: 'page' | 'comp';
27
27
  subtype: string;
28
28
  version: string;
@@ -43,4 +43,3 @@ export type App = {
43
43
  activeObject: ActiveObject;
44
44
  };
45
45
  export declare function initApp(): App;
46
- export {};
@@ -1,9 +1,9 @@
1
- type FuncGroup = {
1
+ export type FuncGroup = {
2
2
  id: string;
3
3
  name: string;
4
4
  position: number;
5
5
  };
6
- type Func = {
6
+ export type Func = {
7
7
  id: string;
8
8
  spaceid: string;
9
9
  groupid: string;
@@ -22,12 +22,12 @@ type Func = {
22
22
  prod: string;
23
23
  position: number;
24
24
  };
25
- type FlowGroup = {
25
+ export type FlowGroup = {
26
26
  id: string;
27
27
  name: string;
28
28
  position: number;
29
29
  };
30
- type Flow = {
30
+ export type Flow = {
31
31
  id: string;
32
32
  spaceid: string;
33
33
  groupid: string;
@@ -36,7 +36,7 @@ type Flow = {
36
36
  prod: string;
37
37
  position: number;
38
38
  };
39
- type Space = {
39
+ export type ComputeSpace = {
40
40
  id: string;
41
41
  name: string;
42
42
  funcGroups: FuncGroup[];
@@ -45,7 +45,7 @@ type Space = {
45
45
  flows: Flow[];
46
46
  position: number;
47
47
  };
48
- type ActiveFunc = {
48
+ export type ActiveFunc = {
49
49
  id: string;
50
50
  name: string;
51
51
  inputs: {
@@ -59,14 +59,13 @@ type ActiveFunc = {
59
59
  type: string;
60
60
  }[];
61
61
  };
62
- type ActiveFlow = {
62
+ export type ActiveFlow = {
63
63
  id: string;
64
64
  name: string;
65
65
  };
66
66
  export type Compute = {
67
- spaces: Space[];
67
+ spaces: ComputeSpace[];
68
68
  activeFunc: ActiveFunc;
69
69
  activeFlow: ActiveFlow;
70
70
  };
71
71
  export declare function initCompute(): Compute;
72
- export {};
@@ -1,4 +1,4 @@
1
- type Table = {
1
+ export type Table = {
2
2
  id: string;
3
3
  spaceid: string;
4
4
  name: string;
@@ -15,14 +15,13 @@ type Table = {
15
15
  }[];
16
16
  position: number;
17
17
  };
18
- type Space = {
18
+ export type DataSpace = {
19
19
  id: string;
20
20
  name: string;
21
21
  tables: Table[];
22
22
  position: number;
23
23
  };
24
24
  export type Data = {
25
- spaces: Space[];
25
+ spaces: DataSpace[];
26
26
  };
27
27
  export declare function initData(): Data;
28
- export {};
@@ -7,18 +7,16 @@ export interface ResourceEntry {
7
7
  id: string;
8
8
  dirid: string;
9
9
  name: string;
10
- sort: number;
10
+ position: number;
11
11
  }
12
12
  export type ResourceSpace = {
13
13
  id: string;
14
14
  name: string;
15
- sort: number;
16
15
  dirTree: DirEntry;
17
16
  resources: ResourceEntry[];
17
+ position: number;
18
18
  };
19
19
  export type Resource = {
20
- spaces: {
21
- [spaceid: string]: ResourceSpace;
22
- };
20
+ spaces: ResourceSpace[];
23
21
  };
24
22
  export declare function initResource(): Resource;
@@ -4,7 +4,7 @@ import { Compute } from './compute';
4
4
  import { Data } from './data';
5
5
  import { Resource } from './resource';
6
6
  import { Runtime } from './runtime';
7
- export type BlocklyState = {
7
+ export type State = {
8
8
  base: Base;
9
9
  runtime: Runtime;
10
10
  app: App;
@@ -12,4 +12,4 @@ export type BlocklyState = {
12
12
  data: Data;
13
13
  resource: Resource;
14
14
  };
15
- export declare const blocklyState: BlocklyState;
15
+ export declare const state: State;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "x-state-lib",
3
3
  "private": false,
4
- "version": "0.1.1",
4
+ "version": "0.1.3",
5
5
  "type": "module",
6
6
  "module": "dist/index.js",
7
7
  "types": "dist/index.d.ts",