x-runtime-lib 0.7.32 → 0.7.33
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/index.js +25 -16
- 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
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { CSSProperties, Ref } from 'vue';
|
|
2
2
|
import { BaseProps, Mode } from '@/types';
|
|
3
|
-
|
|
3
|
+
import { Device } from '@/utils';
|
|
4
|
+
export declare function useSizeV1(mode: Mode, device: Ref<Device>, props: BaseProps): {
|
|
4
5
|
width: import("vue").ComputedRef<any>;
|
|
5
6
|
minWidth: import("vue").ComputedRef<any>;
|
|
6
7
|
maxWidth: import("vue").ComputedRef<any>;
|
package/dist/index.js
CHANGED
|
@@ -1009,14 +1009,22 @@ __triggerEvent__('globality', 'startup');
|
|
|
1009
1009
|
function Oi(i) {
|
|
1010
1010
|
i.appendCode("__destroy__();"), i.run();
|
|
1011
1011
|
}
|
|
1012
|
-
const Ja = [
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1012
|
+
const Ja = ["string", "number", "boolean", "array", "object"];
|
|
1013
|
+
function Xa(i) {
|
|
1014
|
+
switch (i) {
|
|
1015
|
+
case "string":
|
|
1016
|
+
return "#5ba58c";
|
|
1017
|
+
case "number":
|
|
1018
|
+
return "#5b67a5";
|
|
1019
|
+
case "boolean":
|
|
1020
|
+
return "#5b80a5";
|
|
1021
|
+
case "array":
|
|
1022
|
+
return "#745ba5";
|
|
1023
|
+
case "object":
|
|
1024
|
+
return "#80a55b";
|
|
1025
|
+
}
|
|
1026
|
+
}
|
|
1027
|
+
function Ya(i, e, t, r, n) {
|
|
1020
1028
|
let s = i;
|
|
1021
1029
|
for (let u = 0; u < e.length; u++)
|
|
1022
1030
|
if (s = s.children[e[u]], !s) {
|
|
@@ -3498,7 +3506,7 @@ const wn = {
|
|
|
3498
3506
|
default: !1
|
|
3499
3507
|
}
|
|
3500
3508
|
]
|
|
3501
|
-
},
|
|
3509
|
+
}, Qa = {
|
|
3502
3510
|
key: Gi,
|
|
3503
3511
|
name: "x-runtime-lib.badge",
|
|
3504
3512
|
comp: er,
|
|
@@ -4331,7 +4339,7 @@ const En = {
|
|
|
4331
4339
|
key: "settings",
|
|
4332
4340
|
name: "x-runtime-lib.settings",
|
|
4333
4341
|
children: []
|
|
4334
|
-
},
|
|
4342
|
+
}, eu = {
|
|
4335
4343
|
key: it,
|
|
4336
4344
|
name: "x-runtime-lib.fileInput",
|
|
4337
4345
|
comp: gr,
|
|
@@ -7201,11 +7209,11 @@ const Xl = [
|
|
|
7201
7209
|
(typeof queueMicrotask == "function" ? queueMicrotask : setTimeout)(s.bind(null, /* @__PURE__ */ new Error("Unknown variable dynamic import: " + e + (e.split("/").length !== t ? ". Note that variables only represent file names one level deep." : ""))));
|
|
7202
7210
|
});
|
|
7203
7211
|
};
|
|
7204
|
-
async function
|
|
7212
|
+
async function tu(i) {
|
|
7205
7213
|
return (await Na(/* @__PURE__ */ Object.assign({ "./locales/en/index.ts": () => import("./i18n-en.kt9hy7ly.js"), "./locales/zhHans/index.ts": () => import("./i18n-zhHans.d5y1j94g.js") }), `./locales/${i}/index.ts`, 4)).default;
|
|
7206
7214
|
}
|
|
7207
7215
|
export {
|
|
7208
|
-
|
|
7216
|
+
Qa as badgeV1,
|
|
7209
7217
|
$t as barChartV1,
|
|
7210
7218
|
$i as breakpoints,
|
|
7211
7219
|
cl as btnGroupV1,
|
|
@@ -7225,9 +7233,8 @@ export {
|
|
|
7225
7233
|
zo as duplicateNode,
|
|
7226
7234
|
Fa as duplicateNodes,
|
|
7227
7235
|
ye as elements,
|
|
7228
|
-
|
|
7229
|
-
|
|
7230
|
-
Qa as fileInputV1,
|
|
7236
|
+
Ya as ensureContext,
|
|
7237
|
+
eu as fileInputV1,
|
|
7231
7238
|
At as flexLayoutEntryV1,
|
|
7232
7239
|
$e as flexLayoutV1,
|
|
7233
7240
|
Lt as formV1,
|
|
@@ -7237,6 +7244,7 @@ export {
|
|
|
7237
7244
|
Ma as getNode,
|
|
7238
7245
|
hn as getPropDefault,
|
|
7239
7246
|
D as getPropTag,
|
|
7247
|
+
Xa as getTypeColor,
|
|
7240
7248
|
rl as globalityV1,
|
|
7241
7249
|
Cl as iconV1,
|
|
7242
7250
|
R as initProps,
|
|
@@ -7252,7 +7260,7 @@ export {
|
|
|
7252
7260
|
on as isPercentStr,
|
|
7253
7261
|
Pe as isPixelStr,
|
|
7254
7262
|
Ct as lineChartV1,
|
|
7255
|
-
|
|
7263
|
+
tu as loadLocaleMessageRuntime,
|
|
7256
7264
|
Il as menuV1,
|
|
7257
7265
|
Ui as newEventBus,
|
|
7258
7266
|
Et as numberInputV1,
|
|
@@ -7293,6 +7301,7 @@ export {
|
|
|
7293
7301
|
Gt as textareaV1,
|
|
7294
7302
|
Kt as timelineItemV1,
|
|
7295
7303
|
jt as timelineV1,
|
|
7304
|
+
Ja as types,
|
|
7296
7305
|
Zt as windowItemV1,
|
|
7297
7306
|
qt as windowV1
|
|
7298
7307
|
};
|
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;
|