x-state-lib 0.3.7 → 0.3.9

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
@@ -42,6 +42,10 @@ function Ct() {
42
42
  activeFlow: {
43
43
  id: "",
44
44
  name: ""
45
+ },
46
+ activeObject: {
47
+ type: "func",
48
+ version: ""
45
49
  }
46
50
  };
47
51
  }
@@ -564,15 +568,7 @@ var no = 1, oo = 4;
564
568
  function ao(t) {
565
569
  return E(t, no | oo);
566
570
  }
567
- function io() {
568
- return {
569
- props: {},
570
- methods: {},
571
- events: {},
572
- slots: {}
573
- };
574
- }
575
- function so(t) {
571
+ function io(t) {
576
572
  const e = [], r = (n, i, s) => {
577
573
  if (i !== "" && (i += "."), i += n.key, s = ao(s), s.push(n.name), !n.ui && !n.array)
578
574
  n.children.forEach((c) => r(c, i, s));
@@ -591,17 +587,17 @@ function so(t) {
591
587
  r(n, "", []);
592
588
  }), e;
593
589
  }
594
- function uo() {
590
+ function so() {
595
591
  const t = {};
596
592
  for (const e in d) {
597
593
  const r = {}, n = d[e];
598
594
  for (const i in n.props)
599
- r[i] = so(n.props[i]);
595
+ r[i] = io(n.props[i]);
600
596
  t[e] = r;
601
597
  }
602
598
  return t;
603
599
  }
604
- function fo() {
600
+ function co() {
605
601
  const t = {};
606
602
  for (const e in d) {
607
603
  const r = d[e];
@@ -609,7 +605,7 @@ function fo() {
609
605
  }
610
606
  return t;
611
607
  }
612
- function po() {
608
+ function uo() {
613
609
  const t = {};
614
610
  for (const e in d) {
615
611
  const r = d[e];
@@ -617,7 +613,7 @@ function po() {
617
613
  }
618
614
  return t;
619
615
  }
620
- function lo() {
616
+ function fo() {
621
617
  const t = {};
622
618
  for (const e in d) {
623
619
  const r = d[e];
@@ -625,9 +621,18 @@ function lo() {
625
621
  }
626
622
  return t;
627
623
  }
624
+ function po() {
625
+ const t = so(), e = co(), r = uo(), n = fo();
626
+ return {
627
+ props: t,
628
+ methods: e,
629
+ events: r,
630
+ slots: n
631
+ };
632
+ }
628
633
  const go = function() {
629
634
  return window.globalState || (window.globalState = {
630
- runtime: io(),
635
+ runtime: po(),
631
636
  app: xt(),
632
637
  compute: Ct(),
633
638
  data: Et(),
@@ -635,14 +640,10 @@ const go = function() {
635
640
  }), window.globalState;
636
641
  }();
637
642
  export {
638
- po as buildEvents,
639
- fo as buildMethods,
640
- uo as buildProps,
641
- lo as buildSlots,
642
643
  go as globalState,
643
644
  xt as initApp,
644
645
  Ct as initCompute,
645
646
  Et as initData,
646
647
  It as initResource,
647
- io as initRuntime
648
+ po as initRuntime
648
649
  };
@@ -76,7 +76,7 @@ export type CompMeta = {
76
76
  export type ActiveComp = {
77
77
  meta: CompMeta;
78
78
  };
79
- export type ActiveObject = {
79
+ export type ActiveObjectApp = {
80
80
  type: 'page' | 'comp';
81
81
  subtype: string;
82
82
  version: string;
@@ -95,7 +95,7 @@ export type App = {
95
95
  activeApp: ActiveApp;
96
96
  activePage: ActivePage;
97
97
  activeComp: ActiveComp;
98
- activeObject: ActiveObject;
98
+ activeObject: ActiveObjectApp;
99
99
  depends: {
100
100
  [key: string]: Depend;
101
101
  };
@@ -59,9 +59,14 @@ export type ActiveFlow = {
59
59
  id: string;
60
60
  name: string;
61
61
  };
62
+ export type ActiveObjectCompute = {
63
+ type: 'func' | 'flow';
64
+ version: string;
65
+ };
62
66
  export type Compute = {
63
67
  spaces: ComputeSpace[];
64
68
  activeFunc: ActiveFunc;
65
69
  activeFlow: ActiveFlow;
70
+ activeObject: ActiveObjectCompute;
66
71
  };
67
72
  export declare function initCompute(): Compute;
@@ -25,7 +25,3 @@ export type Runtime = {
25
25
  slots: Slots;
26
26
  };
27
27
  export declare function initRuntime(): Runtime;
28
- export declare function buildProps(): Props;
29
- export declare function buildMethods(): Methods;
30
- export declare function buildEvents(): Events;
31
- export declare function buildSlots(): Slots;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "x-state-lib",
3
3
  "private": false,
4
- "version": "0.3.7",
4
+ "version": "0.3.9",
5
5
  "type": "module",
6
6
  "module": "dist/index.js",
7
7
  "types": "dist/index.d.ts",
@@ -25,7 +25,7 @@
25
25
  "lodash-es": "^4.17.21",
26
26
  "vue": "^3.5.18",
27
27
  "vuetify": "^3.9.4",
28
- "x-runtime-lib": "^0.7.33"
28
+ "x-runtime-lib": "^0.7.34"
29
29
  },
30
30
  "devDependencies": {
31
31
  "@eslint/js": "^9.33.0",
@@ -1,5 +0,0 @@
1
- export type Base = {
2
- router: any;
3
- i18n: any;
4
- };
5
- export declare function initBase(): Base;