x-state-lib 0.3.43 → 0.3.44
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.d.ts +243 -275
- package/dist/index.js +1 -146
- package/package.json +38 -45
package/dist/index.d.ts
CHANGED
|
@@ -1,275 +1,243 @@
|
|
|
1
|
-
import { Type } from
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
};
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
};
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
};
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
};
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
};
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
export declare type Table = {
|
|
245
|
-
id: string;
|
|
246
|
-
spaceId: string;
|
|
247
|
-
groupId: string;
|
|
248
|
-
name: string;
|
|
249
|
-
columns: {
|
|
250
|
-
id: string;
|
|
251
|
-
name: string;
|
|
252
|
-
type: string;
|
|
253
|
-
extend: string;
|
|
254
|
-
}[];
|
|
255
|
-
indexes: {
|
|
256
|
-
id: string;
|
|
257
|
-
columns: string[];
|
|
258
|
-
unique: boolean;
|
|
259
|
-
}[];
|
|
260
|
-
position: number;
|
|
261
|
-
};
|
|
262
|
-
|
|
263
|
-
export declare type TableGroup = {
|
|
264
|
-
id: string;
|
|
265
|
-
name: string;
|
|
266
|
-
position: number;
|
|
267
|
-
};
|
|
268
|
-
|
|
269
|
-
export declare function toCompMeta(src: CompMeta): CompMeta;
|
|
270
|
-
|
|
271
|
-
export declare function toFields(srcFields?: Field_2[]): Field_2[] | undefined;
|
|
272
|
-
|
|
273
|
-
export declare function toPageMeta(src: PageMeta): PageMeta;
|
|
274
|
-
|
|
275
|
-
export { }
|
|
1
|
+
import { Type } from "x-essential-lib";
|
|
2
|
+
|
|
3
|
+
//#region src/state/app.d.ts
|
|
4
|
+
type AppListEntry = {
|
|
5
|
+
id: string;
|
|
6
|
+
name: string;
|
|
7
|
+
pages: {
|
|
8
|
+
id: string;
|
|
9
|
+
name: string;
|
|
10
|
+
}[];
|
|
11
|
+
};
|
|
12
|
+
type CompGroup = {
|
|
13
|
+
id: string;
|
|
14
|
+
name: string;
|
|
15
|
+
position: number;
|
|
16
|
+
};
|
|
17
|
+
type Comp = {
|
|
18
|
+
id: string;
|
|
19
|
+
groupId: string;
|
|
20
|
+
name: string;
|
|
21
|
+
position: number;
|
|
22
|
+
};
|
|
23
|
+
type ActiveApp = {
|
|
24
|
+
id: string;
|
|
25
|
+
compGroups: CompGroup[];
|
|
26
|
+
comps: Comp[];
|
|
27
|
+
};
|
|
28
|
+
type Field$1 = {
|
|
29
|
+
id: string;
|
|
30
|
+
name: string;
|
|
31
|
+
type: Type;
|
|
32
|
+
};
|
|
33
|
+
type PageMeta = {
|
|
34
|
+
version: string;
|
|
35
|
+
arguments?: Field$1[];
|
|
36
|
+
states?: Field$1[];
|
|
37
|
+
};
|
|
38
|
+
type ActivePage = {
|
|
39
|
+
id: string;
|
|
40
|
+
meta: PageMeta;
|
|
41
|
+
};
|
|
42
|
+
declare function toPageMeta(src: PageMeta): PageMeta;
|
|
43
|
+
type Method = {
|
|
44
|
+
id: string;
|
|
45
|
+
name: string;
|
|
46
|
+
inputs?: Field$1[];
|
|
47
|
+
outputs?: Field$1[];
|
|
48
|
+
};
|
|
49
|
+
type Event = {
|
|
50
|
+
id: string;
|
|
51
|
+
name: string;
|
|
52
|
+
params?: Field$1[];
|
|
53
|
+
};
|
|
54
|
+
type Slot = {
|
|
55
|
+
id: string;
|
|
56
|
+
name: string;
|
|
57
|
+
properties?: Field$1[];
|
|
58
|
+
methods?: Method[];
|
|
59
|
+
events?: Event[];
|
|
60
|
+
};
|
|
61
|
+
type CompMeta = {
|
|
62
|
+
version: string;
|
|
63
|
+
properties?: Field$1[];
|
|
64
|
+
methods?: Method[];
|
|
65
|
+
events?: Event[];
|
|
66
|
+
slots?: Slot[];
|
|
67
|
+
states?: Field$1[];
|
|
68
|
+
};
|
|
69
|
+
type ActiveComp = {
|
|
70
|
+
id: string;
|
|
71
|
+
meta: CompMeta;
|
|
72
|
+
};
|
|
73
|
+
declare function toCompMeta(src: CompMeta): CompMeta;
|
|
74
|
+
type ActiveObjectApp = {
|
|
75
|
+
type: 'page' | 'comp';
|
|
76
|
+
subtype: string;
|
|
77
|
+
version: string;
|
|
78
|
+
nodes: {
|
|
79
|
+
id: string;
|
|
80
|
+
key: string;
|
|
81
|
+
alias: string;
|
|
82
|
+
slot?: string;
|
|
83
|
+
comp?: string;
|
|
84
|
+
adaptSlot?: string;
|
|
85
|
+
}[];
|
|
86
|
+
};
|
|
87
|
+
type Depend = {
|
|
88
|
+
name: string;
|
|
89
|
+
meta: CompMeta;
|
|
90
|
+
};
|
|
91
|
+
type App = {
|
|
92
|
+
appList: AppListEntry[];
|
|
93
|
+
activeApp: ActiveApp;
|
|
94
|
+
activePage: ActivePage;
|
|
95
|
+
activeComp: ActiveComp;
|
|
96
|
+
activeObject: ActiveObjectApp;
|
|
97
|
+
depends: {
|
|
98
|
+
[key: string]: Depend;
|
|
99
|
+
};
|
|
100
|
+
};
|
|
101
|
+
declare function initApp(): App;
|
|
102
|
+
//#endregion
|
|
103
|
+
//#region src/state/compute.d.ts
|
|
104
|
+
type FuncGroup = {
|
|
105
|
+
id: string;
|
|
106
|
+
name: string;
|
|
107
|
+
position: number;
|
|
108
|
+
};
|
|
109
|
+
type Func = {
|
|
110
|
+
id: string;
|
|
111
|
+
spaceId: string;
|
|
112
|
+
groupId: string;
|
|
113
|
+
name: string;
|
|
114
|
+
inputs: {
|
|
115
|
+
id: string;
|
|
116
|
+
name: string;
|
|
117
|
+
type: Type;
|
|
118
|
+
}[];
|
|
119
|
+
outputs: {
|
|
120
|
+
id: string;
|
|
121
|
+
name: string;
|
|
122
|
+
type: Type;
|
|
123
|
+
}[];
|
|
124
|
+
position: number;
|
|
125
|
+
};
|
|
126
|
+
type FlowGroup = {
|
|
127
|
+
id: string;
|
|
128
|
+
name: string;
|
|
129
|
+
position: number;
|
|
130
|
+
};
|
|
131
|
+
type Flow = {
|
|
132
|
+
id: string;
|
|
133
|
+
spaceId: string;
|
|
134
|
+
groupId: string;
|
|
135
|
+
name: string;
|
|
136
|
+
position: number;
|
|
137
|
+
};
|
|
138
|
+
type ComputeSpace = {
|
|
139
|
+
id: string;
|
|
140
|
+
name: string;
|
|
141
|
+
funcGroups: FuncGroup[];
|
|
142
|
+
funcs: Func[];
|
|
143
|
+
flowGroups: FlowGroup[];
|
|
144
|
+
flows: Flow[];
|
|
145
|
+
position: number;
|
|
146
|
+
};
|
|
147
|
+
type Field = {
|
|
148
|
+
id: string;
|
|
149
|
+
name: string;
|
|
150
|
+
type: Type;
|
|
151
|
+
};
|
|
152
|
+
type ActiveFunc = {
|
|
153
|
+
id: string;
|
|
154
|
+
name: string;
|
|
155
|
+
inputs?: Field[];
|
|
156
|
+
outputs?: Field[];
|
|
157
|
+
};
|
|
158
|
+
declare function toFields(srcFields?: Field[]): Field[] | undefined;
|
|
159
|
+
type ActiveFlow = {
|
|
160
|
+
id: string;
|
|
161
|
+
name: string;
|
|
162
|
+
};
|
|
163
|
+
type ActiveObjectCompute = {
|
|
164
|
+
type: 'func' | 'flow';
|
|
165
|
+
version: string;
|
|
166
|
+
};
|
|
167
|
+
type Compute = {
|
|
168
|
+
spaces: ComputeSpace[];
|
|
169
|
+
activeFunc: ActiveFunc;
|
|
170
|
+
activeFlow: ActiveFlow;
|
|
171
|
+
activeObject: ActiveObjectCompute;
|
|
172
|
+
};
|
|
173
|
+
declare function initCompute(): Compute;
|
|
174
|
+
//#endregion
|
|
175
|
+
//#region src/state/data.d.ts
|
|
176
|
+
type TableGroup = {
|
|
177
|
+
id: string;
|
|
178
|
+
name: string;
|
|
179
|
+
position: number;
|
|
180
|
+
};
|
|
181
|
+
type Table = {
|
|
182
|
+
id: string;
|
|
183
|
+
spaceId: string;
|
|
184
|
+
groupId: string;
|
|
185
|
+
name: string;
|
|
186
|
+
columns: {
|
|
187
|
+
id: string;
|
|
188
|
+
name: string;
|
|
189
|
+
type: string;
|
|
190
|
+
extend: string;
|
|
191
|
+
}[];
|
|
192
|
+
indexes: {
|
|
193
|
+
id: string;
|
|
194
|
+
columns: string[];
|
|
195
|
+
unique: boolean;
|
|
196
|
+
}[];
|
|
197
|
+
position: number;
|
|
198
|
+
};
|
|
199
|
+
type DataSpace = {
|
|
200
|
+
id: string;
|
|
201
|
+
name: string;
|
|
202
|
+
tableGroups: TableGroup[];
|
|
203
|
+
tables: Table[];
|
|
204
|
+
position: number;
|
|
205
|
+
};
|
|
206
|
+
type Data = {
|
|
207
|
+
spaces: DataSpace[];
|
|
208
|
+
};
|
|
209
|
+
declare function initData(): Data;
|
|
210
|
+
//#endregion
|
|
211
|
+
//#region src/state/resource.d.ts
|
|
212
|
+
interface DirEntry {
|
|
213
|
+
id: string;
|
|
214
|
+
name: string;
|
|
215
|
+
children: DirEntry[];
|
|
216
|
+
}
|
|
217
|
+
interface ResourceEntry {
|
|
218
|
+
id: string;
|
|
219
|
+
dirid: string;
|
|
220
|
+
name: string;
|
|
221
|
+
}
|
|
222
|
+
type ResourceSpace = {
|
|
223
|
+
id: string;
|
|
224
|
+
name: string;
|
|
225
|
+
dirTree: DirEntry;
|
|
226
|
+
resources: ResourceEntry[];
|
|
227
|
+
position: number;
|
|
228
|
+
};
|
|
229
|
+
type Resource = {
|
|
230
|
+
spaces: ResourceSpace[];
|
|
231
|
+
};
|
|
232
|
+
declare function initResource(): Resource;
|
|
233
|
+
//#endregion
|
|
234
|
+
//#region src/state/state.d.ts
|
|
235
|
+
type State = {
|
|
236
|
+
app: App;
|
|
237
|
+
compute: Compute;
|
|
238
|
+
data: Data;
|
|
239
|
+
resource: Resource;
|
|
240
|
+
};
|
|
241
|
+
declare const globalState: State;
|
|
242
|
+
//#endregion
|
|
243
|
+
export { ActiveApp, ActiveComp, ActiveFlow, ActiveFunc, ActiveObjectApp, ActiveObjectCompute, ActivePage, App, AppListEntry, Compute, ComputeSpace, Data, DataSpace, Depend, DirEntry, Flow, FlowGroup, Func, FuncGroup, Resource, ResourceEntry, ResourceSpace, State, Table, TableGroup, globalState, initApp, initCompute, initData, initResource, toCompMeta, toFields, toPageMeta };
|
package/dist/index.js
CHANGED
|
@@ -1,146 +1 @@
|
|
|
1
|
-
import
|
|
2
|
-
//#region src/state/app.ts
|
|
3
|
-
function e({ id: e, name: t, type: n }) {
|
|
4
|
-
return {
|
|
5
|
-
id: e,
|
|
6
|
-
name: t,
|
|
7
|
-
type: n
|
|
8
|
-
};
|
|
9
|
-
}
|
|
10
|
-
function t(t) {
|
|
11
|
-
if (!t) return;
|
|
12
|
-
let n = [];
|
|
13
|
-
for (let r of t) n.push(e(r));
|
|
14
|
-
return n;
|
|
15
|
-
}
|
|
16
|
-
function n(e) {
|
|
17
|
-
return {
|
|
18
|
-
version: e.version,
|
|
19
|
-
arguments: t(e.arguments),
|
|
20
|
-
states: t(e.states)
|
|
21
|
-
};
|
|
22
|
-
}
|
|
23
|
-
function r(e) {
|
|
24
|
-
if (!e) return;
|
|
25
|
-
let n = [];
|
|
26
|
-
for (let { id: r, name: i, inputs: a, outputs: o } of e) n.push({
|
|
27
|
-
id: r,
|
|
28
|
-
name: i,
|
|
29
|
-
inputs: t(a),
|
|
30
|
-
outputs: t(o)
|
|
31
|
-
});
|
|
32
|
-
return n;
|
|
33
|
-
}
|
|
34
|
-
function i(e) {
|
|
35
|
-
if (!e) return;
|
|
36
|
-
let n = [];
|
|
37
|
-
for (let { id: r, name: i, params: a } of e) n.push({
|
|
38
|
-
id: r,
|
|
39
|
-
name: i,
|
|
40
|
-
params: t(a)
|
|
41
|
-
});
|
|
42
|
-
return n;
|
|
43
|
-
}
|
|
44
|
-
function a(e) {
|
|
45
|
-
if (!e) return;
|
|
46
|
-
let n = [];
|
|
47
|
-
for (let { id: a, name: o, properties: s, methods: c, events: l } of e) n.push({
|
|
48
|
-
id: a,
|
|
49
|
-
name: o,
|
|
50
|
-
properties: t(s),
|
|
51
|
-
methods: r(c),
|
|
52
|
-
events: i(l)
|
|
53
|
-
});
|
|
54
|
-
return n;
|
|
55
|
-
}
|
|
56
|
-
function o(e) {
|
|
57
|
-
return {
|
|
58
|
-
version: e.version,
|
|
59
|
-
properties: t(e.properties),
|
|
60
|
-
methods: r(e.methods),
|
|
61
|
-
events: i(e.events),
|
|
62
|
-
slots: a(e.slots),
|
|
63
|
-
states: t(e.states)
|
|
64
|
-
};
|
|
65
|
-
}
|
|
66
|
-
function s() {
|
|
67
|
-
return {
|
|
68
|
-
appList: [],
|
|
69
|
-
activeApp: {
|
|
70
|
-
id: "",
|
|
71
|
-
compGroups: [],
|
|
72
|
-
comps: []
|
|
73
|
-
},
|
|
74
|
-
activePage: {
|
|
75
|
-
id: "",
|
|
76
|
-
meta: { version: "" }
|
|
77
|
-
},
|
|
78
|
-
activeComp: {
|
|
79
|
-
id: "",
|
|
80
|
-
meta: { version: "" }
|
|
81
|
-
},
|
|
82
|
-
activeObject: {
|
|
83
|
-
type: "page",
|
|
84
|
-
subtype: "",
|
|
85
|
-
version: "",
|
|
86
|
-
nodes: []
|
|
87
|
-
},
|
|
88
|
-
depends: {}
|
|
89
|
-
};
|
|
90
|
-
}
|
|
91
|
-
//#endregion
|
|
92
|
-
//#region src/state/compute.ts
|
|
93
|
-
function c({ id: e, name: t, type: n }) {
|
|
94
|
-
return {
|
|
95
|
-
id: e,
|
|
96
|
-
name: t,
|
|
97
|
-
type: n
|
|
98
|
-
};
|
|
99
|
-
}
|
|
100
|
-
function l(e) {
|
|
101
|
-
if (!e) return;
|
|
102
|
-
let t = [];
|
|
103
|
-
for (let n of e) t.push(c(n));
|
|
104
|
-
return t;
|
|
105
|
-
}
|
|
106
|
-
function u() {
|
|
107
|
-
return {
|
|
108
|
-
spaces: [],
|
|
109
|
-
activeFunc: {
|
|
110
|
-
id: "",
|
|
111
|
-
name: "",
|
|
112
|
-
inputs: [],
|
|
113
|
-
outputs: []
|
|
114
|
-
},
|
|
115
|
-
activeFlow: {
|
|
116
|
-
id: "",
|
|
117
|
-
name: ""
|
|
118
|
-
},
|
|
119
|
-
activeObject: {
|
|
120
|
-
type: "func",
|
|
121
|
-
version: ""
|
|
122
|
-
}
|
|
123
|
-
};
|
|
124
|
-
}
|
|
125
|
-
//#endregion
|
|
126
|
-
//#region src/state/data.ts
|
|
127
|
-
function d() {
|
|
128
|
-
return { spaces: [] };
|
|
129
|
-
}
|
|
130
|
-
//#endregion
|
|
131
|
-
//#region src/state/resource.ts
|
|
132
|
-
function f() {
|
|
133
|
-
return { spaces: [] };
|
|
134
|
-
}
|
|
135
|
-
//#endregion
|
|
136
|
-
//#region src/state/state.ts
|
|
137
|
-
var p = (function() {
|
|
138
|
-
return window.globalState || (window.globalState = {
|
|
139
|
-
app: s(),
|
|
140
|
-
compute: u(),
|
|
141
|
-
data: d(),
|
|
142
|
-
resource: f()
|
|
143
|
-
}), window.globalState;
|
|
144
|
-
})();
|
|
145
|
-
//#endregion
|
|
146
|
-
export { p as globalState, s as initApp, u as initCompute, d as initData, f as initResource, o as toCompMeta, l as toFields, n as toPageMeta };
|
|
1
|
+
import"x-essential-lib";function e({id:e,name:t,type:n}){return{id:e,name:t,type:n}}function t(t){if(!t)return;let n=[];for(let r of t)n.push(e(r));return n}function n(e){return{version:e.version,arguments:t(e.arguments),states:t(e.states)}}function r(e){if(!e)return;let n=[];for(let{id:r,name:i,inputs:a,outputs:o}of e)n.push({id:r,name:i,inputs:t(a),outputs:t(o)});return n}function i(e){if(!e)return;let n=[];for(let{id:r,name:i,params:a}of e)n.push({id:r,name:i,params:t(a)});return n}function a(e){if(!e)return;let n=[];for(let{id:a,name:o,properties:s,methods:c,events:l}of e)n.push({id:a,name:o,properties:t(s),methods:r(c),events:i(l)});return n}function o(e){return{version:e.version,properties:t(e.properties),methods:r(e.methods),events:i(e.events),slots:a(e.slots),states:t(e.states)}}function s(){return{appList:[],activeApp:{id:``,compGroups:[],comps:[]},activePage:{id:``,meta:{version:``}},activeComp:{id:``,meta:{version:``}},activeObject:{type:`page`,subtype:``,version:``,nodes:[]},depends:{}}}function c({id:e,name:t,type:n}){return{id:e,name:t,type:n}}function l(e){if(!e)return;let t=[];for(let n of e)t.push(c(n));return t}function u(){return{spaces:[],activeFunc:{id:``,name:``,inputs:[],outputs:[]},activeFlow:{id:``,name:``},activeObject:{type:`func`,version:``}}}function d(){return{spaces:[]}}function f(){return{spaces:[]}}const p=(function(){return window.globalState||(window.globalState={app:s(),compute:u(),data:d(),resource:f()}),window.globalState})();export{p as globalState,s as initApp,u as initCompute,d as initData,f as initResource,o as toCompMeta,l as toFields,n as toPageMeta};
|
package/package.json
CHANGED
|
@@ -1,60 +1,53 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "x-state-lib",
|
|
3
|
-
"
|
|
4
|
-
"version": "0.3.43",
|
|
5
|
-
"type": "module",
|
|
6
|
-
"module": "dist/index.js",
|
|
7
|
-
"types": "dist/index.d.ts",
|
|
3
|
+
"version": "0.3.44",
|
|
8
4
|
"files": [
|
|
9
5
|
"dist"
|
|
10
6
|
],
|
|
7
|
+
"type": "module",
|
|
8
|
+
"main": "./dist/index.js",
|
|
9
|
+
"module": "./dist/index.js",
|
|
10
|
+
"types": "./dist/index.d.ts",
|
|
11
|
+
"exports": {
|
|
12
|
+
".": "./dist/index.js",
|
|
13
|
+
"./package.json": "./package.json"
|
|
14
|
+
},
|
|
15
|
+
"publishConfig": {
|
|
16
|
+
"registry": "https://registry.npmjs.org"
|
|
17
|
+
},
|
|
11
18
|
"scripts": {
|
|
12
|
-
"
|
|
13
|
-
"
|
|
14
|
-
"
|
|
15
|
-
"
|
|
16
|
-
"
|
|
19
|
+
"play": "vite",
|
|
20
|
+
"test": "vitest",
|
|
21
|
+
"lint": "oxlint",
|
|
22
|
+
"fmt": "oxfmt",
|
|
23
|
+
"build": "tsdown",
|
|
17
24
|
"lint-staged": "lint-staged",
|
|
18
25
|
"prepare": "husky"
|
|
19
26
|
},
|
|
20
|
-
"lint-staged": {
|
|
21
|
-
"*.{vue,js,jsx,cjs,mjs,ts,tsx,cts,mts}": "eslint --fix --ignore-pattern dist/ --ignore-pattern public/ .",
|
|
22
|
-
"*": "prettier --write ."
|
|
23
|
-
},
|
|
24
27
|
"dependencies": {
|
|
25
|
-
"
|
|
26
|
-
"
|
|
27
|
-
"vuetify": "^4.0.2"
|
|
28
|
-
},
|
|
29
|
-
"peerDependencies": {
|
|
30
|
-
"x-error-lib": "^0.5.17",
|
|
31
|
-
"x-essential-lib": "^0.9.30",
|
|
32
|
-
"x-runtime-lib": "^0.9.31"
|
|
28
|
+
"vue": "^3.5.38",
|
|
29
|
+
"vuetify": "^4.1.2"
|
|
33
30
|
},
|
|
34
31
|
"devDependencies": {
|
|
35
|
-
"@
|
|
36
|
-
"@tsconfig/node24": "^24.0.4",
|
|
37
|
-
"@types/lodash-es": "^4.17.12",
|
|
38
|
-
"@types/node": "^25.4.0",
|
|
39
|
-
"@vitejs/plugin-vue": "^6.0.4",
|
|
40
|
-
"@vue/tsconfig": "^0.9.1",
|
|
41
|
-
"eslint": "^10.0.3",
|
|
42
|
-
"eslint-config-prettier": "^10.1.8",
|
|
43
|
-
"eslint-plugin-prettier": "^5.5.5",
|
|
44
|
-
"eslint-plugin-simple-import-sort": "^12.1.1",
|
|
45
|
-
"eslint-plugin-vue": "^10.8.0",
|
|
46
|
-
"globals": "^17.4.0",
|
|
32
|
+
"@types/node": "^25.9.3",
|
|
47
33
|
"husky": "^9.1.7",
|
|
48
|
-
"lint-staged": "^
|
|
49
|
-
"
|
|
50
|
-
"
|
|
51
|
-
"
|
|
52
|
-
"
|
|
53
|
-
"
|
|
54
|
-
"vite
|
|
55
|
-
"
|
|
56
|
-
"
|
|
57
|
-
"
|
|
58
|
-
|
|
34
|
+
"lint-staged": "^17.0.7",
|
|
35
|
+
"oxfmt": "^0.55.0",
|
|
36
|
+
"oxlint": "^1.70.0",
|
|
37
|
+
"sass": "^1.101.0",
|
|
38
|
+
"tsdown": "^0.22.3",
|
|
39
|
+
"typescript": "^6.0.3",
|
|
40
|
+
"vite": "^8.0.16",
|
|
41
|
+
"x-config-oxfmt": "^0.1.3",
|
|
42
|
+
"x-config-oxlint": "^0.1.2",
|
|
43
|
+
"x-config-vite-lib": "^0.1.8"
|
|
44
|
+
},
|
|
45
|
+
"peerDependencies": {
|
|
46
|
+
"x-error-lib": "^0.5.19",
|
|
47
|
+
"x-essential-lib": "^0.9.36",
|
|
48
|
+
"x-runtime-lib": "^0.9.59"
|
|
49
|
+
},
|
|
50
|
+
"lint-staged": {
|
|
51
|
+
"*": "oxfmt --no-error-on-unmatched-pattern"
|
|
59
52
|
}
|
|
60
53
|
}
|