x-runtime-lib 0.6.20 → 0.6.21

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.
@@ -1,14 +1,18 @@
1
1
  export type ZItem = {
2
2
  title: string;
3
- value: string;
3
+ value: undefined | string;
4
4
  };
5
5
  type ZTypeBase = {
6
6
  name: string;
7
- validator: (v: string) => boolean;
8
- default: string;
7
+ validator: (v: any) => boolean;
9
8
  };
9
+ type ZTypeUndefined = {
10
+ ui: 'undefined';
11
+ default: undefined;
12
+ } & ZTypeBase;
10
13
  type ZTypeWord = {
11
14
  ui: 'word';
15
+ default: string;
12
16
  } & ZTypeBase;
13
17
  type ZTypeNumInput = {
14
18
  ui: 'pixelInput' | 'percentInput';
@@ -16,8 +20,9 @@ type ZTypeNumInput = {
16
20
  min: number;
17
21
  max: number;
18
22
  step: number;
23
+ default: string;
19
24
  } & ZTypeBase;
20
- export type ZType = ZTypeWord | ZTypeNumInput;
25
+ export type ZType = ZTypeUndefined | ZTypeWord | ZTypeNumInput;
21
26
  export type ZSlot = {
22
27
  key: string;
23
28
  name: string;
@@ -77,24 +82,24 @@ type ZPropNumInput = {
77
82
  type ZPropSwitch = {
78
83
  ui: 'switch';
79
84
  readonly?: boolean;
80
- default: boolean;
85
+ default: undefined | boolean;
81
86
  } & ZPropBase;
82
87
  type ZPropSelect = {
83
88
  ui: 'select';
84
89
  items: ZItem[];
85
90
  readonly?: boolean;
86
- default: string;
91
+ default: undefined | string;
87
92
  } & ZPropBase;
88
93
  type ZPropColorPicker = {
89
94
  ui: 'colorPicker';
90
95
  readonly?: boolean;
91
- default: string;
96
+ default: undefined | string;
92
97
  } & ZPropBase;
93
98
  type ZPropMultiTypes = {
94
99
  ui: 'multiTypes';
95
100
  types: ZType[];
96
101
  readonly?: boolean;
97
- default: string;
102
+ default: undefined | string;
98
103
  } & ZPropBase;
99
104
  type ZPropCompSelect = {
100
105
  ui: 'compSelect';
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "x-runtime-lib",
3
3
  "private": false,
4
- "version": "0.6.20",
4
+ "version": "0.6.21",
5
5
  "type": "module",
6
6
  "module": "dist/index.js",
7
7
  "types": "dist/index.d.ts",