x-runtime-lib 0.5.0 → 0.5.2
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/components/element/container/v1/index.vue.d.ts +17 -0
- package/dist/composables/element/basic/{border.d.ts → borderV1.d.ts} +1 -1
- package/dist/composables/element/basic/{margin.d.ts → marginV1.d.ts} +1 -1
- package/dist/composables/element/basic/{padding.d.ts → paddingV1.d.ts} +1 -1
- package/dist/composables/element/basic/{size.d.ts → sizeV1.d.ts} +1 -1
- package/dist/element/_common/keys.d.ts +4 -0
- package/dist/element/_common/props/margin/v1/index.d.ts +3 -0
- package/dist/element/_common/props/padding/v1/index.d.ts +3 -0
- package/dist/element/_common/props/size/v1/index.d.ts +3 -0
- package/dist/element/basic/container/v1/index.d.ts +3 -0
- package/dist/element/index.d.ts +1 -1
- package/dist/{i18n-en-j2twg2xy.js → i18n-en-gana12hn.js} +9 -1
- package/dist/{i18n-zhHans-hdbgtmk2.js → i18n-zhHans-elu3m97j.js} +9 -1
- package/dist/index.js +1778 -1595
- package/dist/types/element.d.ts +65 -18
- package/dist/utils/node.d.ts +4 -3
- package/dist/utils/provideInject.d.ts +12 -12
- package/package.json +1 -1
package/dist/types/element.d.ts
CHANGED
|
@@ -24,33 +24,79 @@ export type ZItem = {
|
|
|
24
24
|
title: string;
|
|
25
25
|
value: string;
|
|
26
26
|
};
|
|
27
|
-
|
|
27
|
+
type ZTypeBase = {
|
|
28
28
|
name: string;
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
default: unknown;
|
|
32
|
-
precision?: number;
|
|
33
|
-
min?: number;
|
|
34
|
-
max?: number;
|
|
35
|
-
step?: number;
|
|
29
|
+
validator: (v: string) => boolean;
|
|
30
|
+
default: string;
|
|
36
31
|
};
|
|
37
|
-
|
|
32
|
+
type ZTypeWord = {
|
|
33
|
+
ui: 'word';
|
|
34
|
+
} & ZTypeBase;
|
|
35
|
+
type ZTypeInput = {
|
|
36
|
+
ui: 'pixelInput' | 'percentInput';
|
|
37
|
+
precision: number;
|
|
38
|
+
min: number;
|
|
39
|
+
max: number;
|
|
40
|
+
step: number;
|
|
41
|
+
} & ZTypeBase;
|
|
42
|
+
export type ZType = ZTypeWord | ZTypeInput;
|
|
43
|
+
type ZPropBase = {
|
|
38
44
|
key: string;
|
|
39
45
|
name: string;
|
|
40
46
|
children?: ZProp[];
|
|
41
|
-
ui?: 'void' | 'strInput' | 'numInput' | 'switch' | 'select' | 'colorPicker' | 'multiTypes' | 'compSelect';
|
|
42
47
|
array?: boolean;
|
|
43
|
-
|
|
48
|
+
};
|
|
49
|
+
type ZPropBranch = {
|
|
50
|
+
ui?: undefined;
|
|
51
|
+
default?: object[];
|
|
52
|
+
} & ZPropBase;
|
|
53
|
+
type ZPropDummy = {
|
|
54
|
+
ui: 'dummy';
|
|
55
|
+
default: string | number | boolean | object;
|
|
56
|
+
} & ZPropBase;
|
|
57
|
+
type ZPropStrInput = {
|
|
58
|
+
ui: 'strInput';
|
|
44
59
|
readonly?: boolean;
|
|
45
60
|
static?: boolean;
|
|
46
61
|
value?: unknown;
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
62
|
+
default: string;
|
|
63
|
+
} & ZPropBase;
|
|
64
|
+
type ZPropNumInput = {
|
|
65
|
+
ui: 'numInput';
|
|
66
|
+
precision: number;
|
|
67
|
+
min: number;
|
|
68
|
+
max: number;
|
|
69
|
+
step: number;
|
|
70
|
+
readonly?: boolean;
|
|
71
|
+
default: number;
|
|
72
|
+
} & ZPropBase;
|
|
73
|
+
type ZPropSwitch = {
|
|
74
|
+
ui: 'switch';
|
|
75
|
+
readonly?: boolean;
|
|
76
|
+
default: boolean;
|
|
77
|
+
} & ZPropBase;
|
|
78
|
+
type ZPropSelect = {
|
|
79
|
+
ui: 'select';
|
|
80
|
+
items: ZItem[];
|
|
81
|
+
readonly?: boolean;
|
|
82
|
+
default: string;
|
|
83
|
+
} & ZPropBase;
|
|
84
|
+
type ZPropColorPicker = {
|
|
85
|
+
ui: 'colorPicker';
|
|
86
|
+
readonly?: boolean;
|
|
87
|
+
default: string;
|
|
88
|
+
} & ZPropBase;
|
|
89
|
+
type ZPropMultiTypes = {
|
|
90
|
+
ui: 'multiTypes';
|
|
91
|
+
types: ZType[];
|
|
92
|
+
readonly?: boolean;
|
|
93
|
+
default: string;
|
|
94
|
+
} & ZPropBase;
|
|
95
|
+
type ZPropCompSelect = {
|
|
96
|
+
ui: 'compSelect';
|
|
97
|
+
default: string;
|
|
98
|
+
} & ZPropBase;
|
|
99
|
+
export type ZProp = ZPropBranch | ZPropDummy | ZPropStrInput | ZPropNumInput | ZPropSwitch | ZPropSelect | ZPropColorPicker | ZPropMultiTypes | ZPropCompSelect;
|
|
54
100
|
export type ZProps = {
|
|
55
101
|
[key: string]: ZProp[];
|
|
56
102
|
};
|
|
@@ -82,3 +128,4 @@ export type ZPkg = {
|
|
|
82
128
|
export type ZPkgs = {
|
|
83
129
|
[key: string]: ZPkg;
|
|
84
130
|
};
|
|
131
|
+
export {};
|
package/dist/utils/node.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
export declare function
|
|
3
|
-
export declare function
|
|
1
|
+
import { Node } from '../types';
|
|
2
|
+
export declare function spawnNode(type: string, subtype: string, version: string, ref: boolean, keyOrRefid: string): Node | undefined;
|
|
3
|
+
export declare function getNode(nodes: Node[], id: string): Node | undefined;
|
|
4
|
+
export declare function duplicateNode(src: Node): Node;
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import Interpreter from 'js-interpreter';
|
|
2
2
|
import { Ref } from 'vue';
|
|
3
3
|
import { Data, Depends, Device, Env, Mode, Type } from '../types';
|
|
4
|
-
export declare function provideEnv(env:
|
|
5
|
-
export declare function injectEnv():
|
|
6
|
-
export declare function provideMode(mode:
|
|
7
|
-
export declare function injectMode():
|
|
4
|
+
export declare function provideEnv(env: Env): void;
|
|
5
|
+
export declare function injectEnv(): Env;
|
|
6
|
+
export declare function provideMode(mode: Mode): void;
|
|
7
|
+
export declare function injectMode(): Mode;
|
|
8
8
|
export declare function provideDevice(device: Ref<Device>): void;
|
|
9
9
|
export declare function injectDevice(): Ref<Device>;
|
|
10
10
|
export declare function provideDark(dark: Ref<boolean>): void;
|
|
11
11
|
export declare function injectDark(): Ref<boolean>;
|
|
12
|
-
export declare function provideType(type:
|
|
13
|
-
export declare function injectType():
|
|
14
|
-
export declare function provideData(data:
|
|
15
|
-
export declare function injectData():
|
|
16
|
-
export declare function provideDepends(depends:
|
|
17
|
-
export declare function injectDepends():
|
|
18
|
-
export declare function provideInterpreter(interpreter:
|
|
19
|
-
export declare function injectInterpreter():
|
|
12
|
+
export declare function provideType(type: Type): void;
|
|
13
|
+
export declare function injectType(): Type;
|
|
14
|
+
export declare function provideData(data: Data): void;
|
|
15
|
+
export declare function injectData(): Data;
|
|
16
|
+
export declare function provideDepends(depends: Depends): void;
|
|
17
|
+
export declare function injectDepends(): Depends;
|
|
18
|
+
export declare function provideInterpreter(interpreter: Interpreter | undefined): void;
|
|
19
|
+
export declare function injectInterpreter(): Interpreter | undefined;
|