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 CHANGED
@@ -1,67 +1,68 @@
1
- function toField$1({ id: e, name: a, type: o }) {
1
+ //#region src/state/app.ts
2
+ function e({ id: e, name: t, type: n }) {
2
3
  return {
3
4
  id: e,
4
- name: a,
5
- type: o
5
+ name: t,
6
+ type: n
6
7
  };
7
8
  }
8
- function toFields$1(a) {
9
- if (!a) return;
10
- let o = [];
11
- for (let s of a) o.push(toField$1(s));
12
- return o;
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 toPageMeta(e) {
15
+ function n(e) {
15
16
  return {
16
17
  version: e.version,
17
- arguments: toFields$1(e.arguments),
18
- states: toFields$1(e.states)
18
+ arguments: t(e.arguments),
19
+ states: t(e.states)
19
20
  };
20
21
  }
21
- function toMethods(e) {
22
+ function r(e) {
22
23
  if (!e) return;
23
- let o = [];
24
- for (let { id: s, name: c, inputs: l, outputs: u } of e) o.push({
25
- id: s,
26
- name: c,
27
- inputs: toFields$1(l),
28
- outputs: toFields$1(u)
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 o;
31
+ return n;
31
32
  }
32
- function toEvents(e) {
33
+ function i(e) {
33
34
  if (!e) return;
34
- let o = [];
35
- for (let { id: s, name: c, params: l } of e) o.push({
36
- id: s,
37
- name: c,
38
- params: toFields$1(l)
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 o;
41
+ return n;
41
42
  }
42
- function toSlots(e) {
43
+ function a(e) {
43
44
  if (!e) return;
44
- let o = [];
45
- for (let { id: l, name: u, properties: d, methods: f, events: p } of e) o.push({
46
- id: l,
47
- name: u,
48
- properties: toFields$1(d),
49
- methods: toMethods(f),
50
- events: toEvents(p)
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 o;
53
+ return n;
53
54
  }
54
- function toCompMeta(e) {
55
+ function o(e) {
55
56
  return {
56
57
  version: e.version,
57
- properties: toFields$1(e.properties),
58
- methods: toMethods(e.methods),
59
- events: toEvents(e.events),
60
- slots: toSlots(e.slots),
61
- states: toFields$1(e.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 initApp() {
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
- function toField({ id: e, name: a, type: o }) {
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: a,
93
- type: o
95
+ name: t,
96
+ type: n
94
97
  };
95
98
  }
96
- function toFields(e) {
99
+ function l(e) {
97
100
  if (!e) return;
98
- let a = [];
99
- for (let o of e) a.push(toField(o));
100
- return a;
101
+ let t = [];
102
+ for (let n of e) t.push(c(n));
103
+ return t;
101
104
  }
102
- function initCompute() {
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
- function initData() {
124
+ //#endregion
125
+ //#region src/state/data.ts
126
+ function d() {
122
127
  return { spaces: [] };
123
128
  }
124
- function initResource() {
129
+ //#endregion
130
+ //#region src/state/resource.ts
131
+ function f() {
125
132
  return { spaces: [] };
126
133
  }
127
- const globalState = (function() {
134
+ //#endregion
135
+ //#region src/state/state.ts
136
+ var p = (function() {
128
137
  return window.globalState || (window.globalState = {
129
- app: initApp(),
130
- compute: initCompute(),
131
- data: initData(),
132
- resource: initResource()
138
+ app: s(),
139
+ compute: u(),
140
+ data: d(),
141
+ resource: f()
133
142
  }), window.globalState;
134
143
  })();
135
- export { globalState, initApp, initCompute, initData, initResource, toCompMeta, toFields, toPageMeta };
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 };
@@ -77,9 +77,9 @@ export type ActiveObjectApp = {
77
77
  id: string;
78
78
  key: string;
79
79
  alias: string;
80
- slot?: string | undefined;
81
- comp?: string | undefined;
82
- adaptSlot?: string | undefined;
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.40",
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.29",
27
- "vuetify": "^4.0.0"
26
+ "vue": "^3.5.30",
27
+ "vuetify": "^4.0.2"
28
28
  },
29
29
  "peerDependencies": {
30
- "x-essential-lib": "^0.9.26",
31
- "x-runtime-lib": "^0.8.216"
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.3.0",
37
+ "@types/node": "^25.4.0",
37
38
  "@vitejs/plugin-vue": "^6.0.4",
38
- "eslint": "^10.0.2",
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.3.0",
43
+ "globals": "^17.4.0",
43
44
  "husky": "^9.1.7",
44
- "lint-staged": "^16.2.7",
45
+ "lint-staged": "^16.3.3",
45
46
  "prettier": "3.8.1",
46
- "sass": "^1.97.3",
47
+ "sass": "^1.98.0",
47
48
  "typescript": "^5.9.3",
48
- "typescript-eslint": "^8.56.1",
49
- "vite": "npm:rolldown-vite@7.3.1",
50
- "vite-plugin-css-injected-by-js": "^3.5.2",
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
  }