x-state-lib 0.3.40 → 0.3.42
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 +68 -58
- package/dist/state/app.d.ts +3 -3
- package/package.json +14 -16
package/dist/index.js
CHANGED
|
@@ -1,67 +1,68 @@
|
|
|
1
|
-
|
|
1
|
+
//#region src/state/app.ts
|
|
2
|
+
function e({ id: e, name: t, type: n }) {
|
|
2
3
|
return {
|
|
3
4
|
id: e,
|
|
4
|
-
name:
|
|
5
|
-
type:
|
|
5
|
+
name: t,
|
|
6
|
+
type: n
|
|
6
7
|
};
|
|
7
8
|
}
|
|
8
|
-
function
|
|
9
|
-
if (!
|
|
10
|
-
let
|
|
11
|
-
for (let
|
|
12
|
-
return
|
|
9
|
+
function t(t) {
|
|
10
|
+
if (!t) return;
|
|
11
|
+
let n = [];
|
|
12
|
+
for (let r of t) n.push(e(r));
|
|
13
|
+
return n;
|
|
13
14
|
}
|
|
14
|
-
function
|
|
15
|
+
function n(e) {
|
|
15
16
|
return {
|
|
16
17
|
version: e.version,
|
|
17
|
-
arguments:
|
|
18
|
-
states:
|
|
18
|
+
arguments: t(e.arguments),
|
|
19
|
+
states: t(e.states)
|
|
19
20
|
};
|
|
20
21
|
}
|
|
21
|
-
function
|
|
22
|
+
function r(e) {
|
|
22
23
|
if (!e) return;
|
|
23
|
-
let
|
|
24
|
-
for (let { id:
|
|
25
|
-
id:
|
|
26
|
-
name:
|
|
27
|
-
inputs:
|
|
28
|
-
outputs:
|
|
24
|
+
let n = [];
|
|
25
|
+
for (let { id: r, name: i, inputs: a, outputs: o } of e) n.push({
|
|
26
|
+
id: r,
|
|
27
|
+
name: i,
|
|
28
|
+
inputs: t(a),
|
|
29
|
+
outputs: t(o)
|
|
29
30
|
});
|
|
30
|
-
return
|
|
31
|
+
return n;
|
|
31
32
|
}
|
|
32
|
-
function
|
|
33
|
+
function i(e) {
|
|
33
34
|
if (!e) return;
|
|
34
|
-
let
|
|
35
|
-
for (let { id:
|
|
36
|
-
id:
|
|
37
|
-
name:
|
|
38
|
-
params:
|
|
35
|
+
let n = [];
|
|
36
|
+
for (let { id: r, name: i, params: a } of e) n.push({
|
|
37
|
+
id: r,
|
|
38
|
+
name: i,
|
|
39
|
+
params: t(a)
|
|
39
40
|
});
|
|
40
|
-
return
|
|
41
|
+
return n;
|
|
41
42
|
}
|
|
42
|
-
function
|
|
43
|
+
function a(e) {
|
|
43
44
|
if (!e) return;
|
|
44
|
-
let
|
|
45
|
-
for (let { id:
|
|
46
|
-
id:
|
|
47
|
-
name:
|
|
48
|
-
properties:
|
|
49
|
-
methods:
|
|
50
|
-
events:
|
|
45
|
+
let n = [];
|
|
46
|
+
for (let { id: a, name: o, properties: s, methods: c, events: l } of e) n.push({
|
|
47
|
+
id: a,
|
|
48
|
+
name: o,
|
|
49
|
+
properties: t(s),
|
|
50
|
+
methods: r(c),
|
|
51
|
+
events: i(l)
|
|
51
52
|
});
|
|
52
|
-
return
|
|
53
|
+
return n;
|
|
53
54
|
}
|
|
54
|
-
function
|
|
55
|
+
function o(e) {
|
|
55
56
|
return {
|
|
56
57
|
version: e.version,
|
|
57
|
-
properties:
|
|
58
|
-
methods:
|
|
59
|
-
events:
|
|
60
|
-
slots:
|
|
61
|
-
states:
|
|
58
|
+
properties: t(e.properties),
|
|
59
|
+
methods: r(e.methods),
|
|
60
|
+
events: i(e.events),
|
|
61
|
+
slots: a(e.slots),
|
|
62
|
+
states: t(e.states)
|
|
62
63
|
};
|
|
63
64
|
}
|
|
64
|
-
function
|
|
65
|
+
function s() {
|
|
65
66
|
return {
|
|
66
67
|
appList: [],
|
|
67
68
|
activeApp: {
|
|
@@ -86,20 +87,22 @@ function initApp() {
|
|
|
86
87
|
depends: {}
|
|
87
88
|
};
|
|
88
89
|
}
|
|
89
|
-
|
|
90
|
+
//#endregion
|
|
91
|
+
//#region src/state/compute.ts
|
|
92
|
+
function c({ id: e, name: t, type: n }) {
|
|
90
93
|
return {
|
|
91
94
|
id: e,
|
|
92
|
-
name:
|
|
93
|
-
type:
|
|
95
|
+
name: t,
|
|
96
|
+
type: n
|
|
94
97
|
};
|
|
95
98
|
}
|
|
96
|
-
function
|
|
99
|
+
function l(e) {
|
|
97
100
|
if (!e) return;
|
|
98
|
-
let
|
|
99
|
-
for (let
|
|
100
|
-
return
|
|
101
|
+
let t = [];
|
|
102
|
+
for (let n of e) t.push(c(n));
|
|
103
|
+
return t;
|
|
101
104
|
}
|
|
102
|
-
function
|
|
105
|
+
function u() {
|
|
103
106
|
return {
|
|
104
107
|
spaces: [],
|
|
105
108
|
activeFunc: {
|
|
@@ -118,18 +121,25 @@ function initCompute() {
|
|
|
118
121
|
}
|
|
119
122
|
};
|
|
120
123
|
}
|
|
121
|
-
|
|
124
|
+
//#endregion
|
|
125
|
+
//#region src/state/data.ts
|
|
126
|
+
function d() {
|
|
122
127
|
return { spaces: [] };
|
|
123
128
|
}
|
|
124
|
-
|
|
129
|
+
//#endregion
|
|
130
|
+
//#region src/state/resource.ts
|
|
131
|
+
function f() {
|
|
125
132
|
return { spaces: [] };
|
|
126
133
|
}
|
|
127
|
-
|
|
134
|
+
//#endregion
|
|
135
|
+
//#region src/state/state.ts
|
|
136
|
+
var p = (function() {
|
|
128
137
|
return window.globalState || (window.globalState = {
|
|
129
|
-
app:
|
|
130
|
-
compute:
|
|
131
|
-
data:
|
|
132
|
-
resource:
|
|
138
|
+
app: s(),
|
|
139
|
+
compute: u(),
|
|
140
|
+
data: d(),
|
|
141
|
+
resource: f()
|
|
133
142
|
}), window.globalState;
|
|
134
143
|
})();
|
|
135
|
-
|
|
144
|
+
//#endregion
|
|
145
|
+
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/dist/state/app.d.ts
CHANGED
|
@@ -77,9 +77,9 @@ export type ActiveObjectApp = {
|
|
|
77
77
|
id: string;
|
|
78
78
|
key: string;
|
|
79
79
|
alias: string;
|
|
80
|
-
slot?: string
|
|
81
|
-
comp?: string
|
|
82
|
-
adaptSlot?: string
|
|
80
|
+
slot?: string;
|
|
81
|
+
comp?: string;
|
|
82
|
+
adaptSlot?: string;
|
|
83
83
|
}[];
|
|
84
84
|
};
|
|
85
85
|
export type Depend = {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "x-state-lib",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "0.3.
|
|
4
|
+
"version": "0.3.42",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"module": "dist/index.js",
|
|
7
7
|
"types": "dist/index.d.ts",
|
|
@@ -23,36 +23,34 @@
|
|
|
23
23
|
},
|
|
24
24
|
"dependencies": {
|
|
25
25
|
"lodash-es": "^4.17.23",
|
|
26
|
-
"vue": "^3.5.
|
|
27
|
-
"vuetify": "^4.0.
|
|
26
|
+
"vue": "^3.5.30",
|
|
27
|
+
"vuetify": "^4.0.2"
|
|
28
28
|
},
|
|
29
29
|
"peerDependencies": {
|
|
30
|
-
"x-
|
|
31
|
-
"x-
|
|
30
|
+
"x-error-lib": "^0.5.16",
|
|
31
|
+
"x-essential-lib": "^0.9.29",
|
|
32
|
+
"x-runtime-lib": "^0.8.223"
|
|
32
33
|
},
|
|
33
34
|
"devDependencies": {
|
|
34
35
|
"@eslint/js": "^10.0.1",
|
|
35
36
|
"@types/lodash-es": "^4.17.12",
|
|
36
|
-
"@types/node": "^25.
|
|
37
|
+
"@types/node": "^25.4.0",
|
|
37
38
|
"@vitejs/plugin-vue": "^6.0.4",
|
|
38
|
-
"eslint": "^10.0.
|
|
39
|
+
"eslint": "^10.0.3",
|
|
39
40
|
"eslint-config-prettier": "^10.1.8",
|
|
40
41
|
"eslint-plugin-prettier": "^5.5.5",
|
|
41
42
|
"eslint-plugin-vue": "^10.8.0",
|
|
42
|
-
"globals": "^17.
|
|
43
|
+
"globals": "^17.4.0",
|
|
43
44
|
"husky": "^9.1.7",
|
|
44
|
-
"lint-staged": "^16.
|
|
45
|
+
"lint-staged": "^16.3.3",
|
|
45
46
|
"prettier": "3.8.1",
|
|
46
|
-
"sass": "^1.
|
|
47
|
+
"sass": "^1.98.0",
|
|
47
48
|
"typescript": "^5.9.3",
|
|
48
|
-
"typescript-eslint": "^8.
|
|
49
|
-
"vite": "
|
|
50
|
-
"vite-plugin-css-injected-by-js": "^
|
|
49
|
+
"typescript-eslint": "^8.57.0",
|
|
50
|
+
"vite": "^8.0.0",
|
|
51
|
+
"vite-plugin-css-injected-by-js": "^4.0.1",
|
|
51
52
|
"vite-plugin-vuetify": "^2.1.3",
|
|
52
53
|
"vue-eslint-parser": "^10.4.0",
|
|
53
54
|
"vue-tsc": "^3.2.5"
|
|
54
|
-
},
|
|
55
|
-
"overrides": {
|
|
56
|
-
"vite": "npm:rolldown-vite@7.3.1"
|
|
57
55
|
}
|
|
58
56
|
}
|