x-runtime-lib 0.7.32 → 0.7.34
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/composables/element/common/size/v1/index.d.ts +2 -1
- package/dist/{i18n-en.kt9hy7ly.js → i18n-en.gzfmjy3s.js} +12 -0
- package/dist/{i18n-zhHans.d5y1j94g.js → i18n-zhHans.iikqghyl.js} +12 -0
- package/dist/index.js +757 -748
- package/dist/interpreter/bind/view.d.ts +1 -1
- package/dist/types/basic.d.ts +3 -7
- package/dist/types/element.d.ts +7 -7
- package/dist/types/meta.d.ts +5 -5
- package/dist/types/sandbox.d.ts +2 -2
- package/dist/utils/provideInject.d.ts +7 -3
- package/package.json +1 -1
- package/dist/composables/element/common/theme/v1/index.d.ts +0 -4
- package/dist/composables/element/misc/method.d.ts +0 -2
- package/dist/composables/element/misc/reactive.d.ts +0 -3
package/dist/types/basic.d.ts
CHANGED
|
@@ -1,9 +1,5 @@
|
|
|
1
1
|
export type Env = 'dev' | 'prod';
|
|
2
2
|
export type Mode = 'runtime' | 'preview' | 'editor';
|
|
3
|
-
export
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
};
|
|
7
|
-
export type Type = 'page' | 'comp';
|
|
8
|
-
export declare const fieldTypes: readonly ["string", "number", "boolean", "array", "object"];
|
|
9
|
-
export type FieldType = (typeof fieldTypes)[number];
|
|
3
|
+
export declare const types: readonly ["string", "number", "boolean", "array", "object"];
|
|
4
|
+
export type Type = (typeof types)[number];
|
|
5
|
+
export declare function getTypeColor(type: Type): string;
|
package/dist/types/element.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Type } from './basic';
|
|
2
2
|
import { Node } from './data';
|
|
3
3
|
export type ZItem = {
|
|
4
4
|
title: string;
|
|
@@ -144,7 +144,7 @@ export type ZEvent = {
|
|
|
144
144
|
params: {
|
|
145
145
|
key: string;
|
|
146
146
|
name: string;
|
|
147
|
-
type:
|
|
147
|
+
type: Type;
|
|
148
148
|
}[];
|
|
149
149
|
};
|
|
150
150
|
export type ZMethod = {
|
|
@@ -153,12 +153,12 @@ export type ZMethod = {
|
|
|
153
153
|
inputs: {
|
|
154
154
|
key: string;
|
|
155
155
|
name: string;
|
|
156
|
-
type:
|
|
156
|
+
type: Type;
|
|
157
157
|
}[];
|
|
158
158
|
outputs: {
|
|
159
159
|
key: string;
|
|
160
160
|
name: string;
|
|
161
|
-
type:
|
|
161
|
+
type: Type;
|
|
162
162
|
}[];
|
|
163
163
|
};
|
|
164
164
|
export type ZSlot = {
|
|
@@ -167,7 +167,7 @@ export type ZSlot = {
|
|
|
167
167
|
props: {
|
|
168
168
|
key: string;
|
|
169
169
|
name: string;
|
|
170
|
-
type:
|
|
170
|
+
type: Type;
|
|
171
171
|
}[];
|
|
172
172
|
methods: {
|
|
173
173
|
key: string;
|
|
@@ -175,12 +175,12 @@ export type ZSlot = {
|
|
|
175
175
|
inputs: {
|
|
176
176
|
key: string;
|
|
177
177
|
name: string;
|
|
178
|
-
type:
|
|
178
|
+
type: Type;
|
|
179
179
|
}[];
|
|
180
180
|
outputs: {
|
|
181
181
|
key: string;
|
|
182
182
|
name: string;
|
|
183
|
-
type:
|
|
183
|
+
type: Type;
|
|
184
184
|
}[];
|
|
185
185
|
}[];
|
|
186
186
|
};
|
package/dist/types/meta.d.ts
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Type } from './basic';
|
|
2
2
|
export type Field = {
|
|
3
3
|
id: string;
|
|
4
4
|
name: string;
|
|
5
|
-
type:
|
|
5
|
+
type: Type;
|
|
6
6
|
desc: string;
|
|
7
7
|
};
|
|
8
8
|
export type State = {
|
|
9
9
|
id: string;
|
|
10
10
|
name: string;
|
|
11
|
-
type:
|
|
11
|
+
type: Type;
|
|
12
12
|
desc: string;
|
|
13
13
|
};
|
|
14
14
|
export type Argument = {
|
|
15
15
|
id: string;
|
|
16
16
|
name: string;
|
|
17
|
-
type:
|
|
17
|
+
type: Type;
|
|
18
18
|
desc: string;
|
|
19
19
|
};
|
|
20
20
|
export type PageMeta = {
|
|
@@ -25,7 +25,7 @@ export type PageMeta = {
|
|
|
25
25
|
export type Property = {
|
|
26
26
|
id: string;
|
|
27
27
|
name: string;
|
|
28
|
-
type:
|
|
28
|
+
type: Type;
|
|
29
29
|
desc: string;
|
|
30
30
|
};
|
|
31
31
|
export type Method = {
|
package/dist/types/sandbox.d.ts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import Interpreter from 'js-interpreter';
|
|
2
2
|
import { Emitter, EventType } from 'mitt';
|
|
3
|
-
import { Env, Mode
|
|
3
|
+
import { Env, Mode } from './basic';
|
|
4
4
|
import { Data } from './data';
|
|
5
5
|
type EventBus = Emitter<Record<EventType, unknown>>;
|
|
6
6
|
export interface SandboxContext {
|
|
7
7
|
org: string;
|
|
8
8
|
env: Env;
|
|
9
9
|
mode: Mode;
|
|
10
|
-
type:
|
|
10
|
+
type: 'page' | 'comp';
|
|
11
11
|
data: Data;
|
|
12
12
|
eventBus?: EventBus;
|
|
13
13
|
}
|
|
@@ -1,17 +1,21 @@
|
|
|
1
1
|
import { Ref } from 'vue';
|
|
2
|
-
import { Data, Depends,
|
|
2
|
+
import { Data, Depends, Env, Mode, Sandbox } from '@/types';
|
|
3
3
|
export declare function provideOrg(org: string): void;
|
|
4
4
|
export declare function injectOrg(): string;
|
|
5
5
|
export declare function provideEnv(env: Env): void;
|
|
6
6
|
export declare function injectEnv(): Env;
|
|
7
7
|
export declare function provideMode(mode: Mode): void;
|
|
8
8
|
export declare function injectMode(): Mode;
|
|
9
|
+
export type Device = {
|
|
10
|
+
width: number;
|
|
11
|
+
height: number;
|
|
12
|
+
};
|
|
9
13
|
export declare function provideDevice(device: Ref<Device>): void;
|
|
10
14
|
export declare function injectDevice(): Ref<Device>;
|
|
11
15
|
export declare function provideDark(dark: Ref<boolean>): void;
|
|
12
16
|
export declare function injectDark(): Ref<boolean>;
|
|
13
|
-
export declare function provideType(type:
|
|
14
|
-
export declare function injectType():
|
|
17
|
+
export declare function provideType(type: 'page' | 'comp'): void;
|
|
18
|
+
export declare function injectType(): "page" | "comp";
|
|
15
19
|
export declare function provideData(data: Ref<Data>): void;
|
|
16
20
|
export declare function injectData(): Ref<Data>;
|
|
17
21
|
export declare function provideDepends(depends: Ref<Depends>): void;
|
package/package.json
CHANGED