x-runtime-lib 0.5.6 → 0.5.8

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.
@@ -47,16 +47,19 @@ type ZPropBase = {
47
47
  type ZPropBranch = {
48
48
  ui?: undefined;
49
49
  children: ZProp[];
50
+ default?: undefined;
50
51
  } & ZPropBase;
51
52
  type ZPropDummy = {
52
53
  ui: 'dummy';
53
54
  readonly?: boolean;
55
+ default: string | number | boolean | object;
54
56
  } & ZPropBase;
55
57
  type ZPropStrInput = {
56
58
  ui: 'strInput';
57
59
  readonly?: boolean;
58
60
  static?: boolean;
59
61
  value?: unknown;
62
+ default: string;
60
63
  } & ZPropBase;
61
64
  type ZPropNumInput = {
62
65
  ui: 'numInput';
@@ -65,83 +68,80 @@ type ZPropNumInput = {
65
68
  max: number;
66
69
  step: number;
67
70
  readonly?: boolean;
71
+ default: number;
68
72
  } & ZPropBase;
69
73
  type ZPropSwitch = {
70
74
  ui: 'switch';
71
75
  readonly?: boolean;
76
+ default: boolean;
72
77
  } & ZPropBase;
73
78
  type ZPropSelect = {
74
79
  ui: 'select';
75
80
  items: ZItem[];
76
81
  readonly?: boolean;
82
+ default: string;
77
83
  } & ZPropBase;
78
84
  type ZPropColorPicker = {
79
85
  ui: 'colorPicker';
80
86
  readonly?: boolean;
87
+ default: string;
81
88
  } & ZPropBase;
82
89
  type ZPropMultiTypes = {
83
90
  ui: 'multiTypes';
84
91
  types: ZType[];
85
92
  readonly?: boolean;
93
+ default: string;
86
94
  } & ZPropBase;
87
95
  type ZPropCompSelect = {
88
96
  ui: 'compSelect';
89
97
  readonly?: boolean;
98
+ default: string;
90
99
  } & ZPropBase;
91
100
  export type ZProp = ({
92
101
  array?: false;
93
- default?: undefined;
94
102
  } & ZPropBranch) | ({
95
103
  array: true;
96
- default: object[];
104
+ defaultArray: object[];
97
105
  } & ZPropBranch) | ({
98
106
  array?: false;
99
- default: string | number | boolean | object;
100
107
  } & ZPropDummy) | ({
101
108
  array: true;
102
- default: string[] | number[] | boolean | object[];
109
+ defaultArray: string[] | number[] | boolean | object[];
103
110
  } & ZPropDummy) | ({
104
111
  array?: false;
105
- default: string;
106
112
  } & ZPropStrInput) | ({
107
113
  array: true;
108
- default: string[];
114
+ defaultArray: string[];
109
115
  } & ZPropStrInput) | ({
110
116
  array?: false;
111
- default: number;
112
117
  } & ZPropNumInput) | ({
113
118
  array: true;
114
- default: number[];
119
+ defaultArray: number[];
115
120
  } & ZPropNumInput) | ({
116
121
  array?: false;
117
- default: boolean;
118
122
  } & ZPropSwitch) | ({
119
123
  array: true;
120
- default: boolean[];
124
+ defaultArray: boolean[];
121
125
  } & ZPropSwitch) | ({
122
126
  array?: false;
123
- default: string;
124
127
  } & ZPropSelect) | ({
125
128
  array: true;
126
- default: string[];
129
+ defaultArray: string[];
127
130
  } & ZPropSelect) | ({
128
131
  array?: false;
129
- default: string;
130
132
  } & ZPropColorPicker) | ({
131
133
  array: true;
132
- default: string[];
134
+ defaultArray: string[];
133
135
  } & ZPropColorPicker) | ({
134
136
  array?: false;
135
- default: string;
136
137
  } & ZPropMultiTypes) | ({
137
138
  array: true;
138
- default: string[];
139
+ defaultArray: string[];
139
140
  } & ZPropMultiTypes) | ({
140
141
  array?: false;
141
- default: string;
142
142
  } & ZPropCompSelect) | ({
143
143
  array: true;
144
- default: string[];
144
+ defaultArray: string[];
145
145
  } & ZPropCompSelect);
146
146
  export type ZProps = {
147
147
  [key: string]: ZProp[];
@@ -1,4 +1,4 @@
1
1
  import { ZProp } from '../types';
2
2
  export declare function getPropTag(type: string, subtype: string): string | undefined;
3
- export declare function getPropDefault(prop: ZProp): unknown;
3
+ export declare function getPropDefault(prop: ZProp, arrayEntry?: boolean): unknown;
4
4
  export declare function initProps(node: any, props: ZProp[]): void;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "x-runtime-lib",
3
3
  "private": false,
4
- "version": "0.5.6",
4
+ "version": "0.5.8",
5
5
  "type": "module",
6
6
  "module": "dist/index.js",
7
7
  "types": "dist/index.d.ts",
@@ -24,7 +24,7 @@
24
24
  "dependencies": {
25
25
  "js-interpreter": "^5.1.2",
26
26
  "lodash-es": "^4.17.21",
27
- "x-essential-lib": "^0.7.3"
27
+ "x-essential-lib": "^0.7.10"
28
28
  },
29
29
  "peerDependencies": {
30
30
  "vue": "^3.5.12",