x-runtime-lib 0.6.16 → 0.6.18
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/misc/method.d.ts +2 -2
- package/dist/index.js +1771 -1725
- package/dist/types/sandbox.d.ts +6 -0
- package/dist/utils/misc.d.ts +8 -0
- package/package.json +2 -1
package/dist/types/sandbox.d.ts
CHANGED
|
@@ -1,11 +1,17 @@
|
|
|
1
1
|
import Interpreter from 'js-interpreter';
|
|
2
|
+
import { Emitter, EventType } from 'mitt';
|
|
2
3
|
import { Env, Type } from './basic';
|
|
3
4
|
import { Data } from './data';
|
|
5
|
+
type EventBus = Emitter<Record<EventType, unknown>>;
|
|
4
6
|
export interface SandboxContext {
|
|
5
7
|
env: Env;
|
|
6
8
|
type: Type;
|
|
7
9
|
data: Data;
|
|
10
|
+
eventBus?: EventBus;
|
|
8
11
|
}
|
|
9
12
|
export interface Sandbox {
|
|
13
|
+
eventBus?: EventBus;
|
|
10
14
|
interpreter?: Interpreter;
|
|
11
15
|
}
|
|
16
|
+
export declare function newEventBus(): Emitter<Record<EventType, unknown>>;
|
|
17
|
+
export {};
|
package/dist/utils/misc.d.ts
CHANGED
|
@@ -4,3 +4,11 @@ export declare function isPixelStr(v: unknown): boolean;
|
|
|
4
4
|
export declare function isPercentStr(v: unknown): boolean;
|
|
5
5
|
export declare function parsePixelStr(v: unknown): number | undefined;
|
|
6
6
|
export declare function parsePercentStr(v: unknown): number | undefined;
|
|
7
|
+
export declare const breakpoints: string[];
|
|
8
|
+
export declare const reverseBreakpoints: string[];
|
|
9
|
+
export type Breakpoint = (typeof breakpoints)[number];
|
|
10
|
+
export declare function calcBreakpoint(width: number): Breakpoint;
|
|
11
|
+
export declare function getIndexOfBreakpoint(breakpoint: Breakpoint): number;
|
|
12
|
+
export declare function getBreakpointProp(current: Breakpoint, props: {
|
|
13
|
+
[bp: Breakpoint]: any;
|
|
14
|
+
}): any;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "x-runtime-lib",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "0.6.
|
|
4
|
+
"version": "0.6.18",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"module": "dist/index.js",
|
|
7
7
|
"types": "dist/index.d.ts",
|
|
@@ -25,6 +25,7 @@
|
|
|
25
25
|
"echarts": "^5.6.0",
|
|
26
26
|
"js-interpreter": "^6.0.1",
|
|
27
27
|
"lodash-es": "^4.17.21",
|
|
28
|
+
"mitt": "^3.0.1",
|
|
28
29
|
"vue": "^3.5.13",
|
|
29
30
|
"vue-i18n": "^11.1.3",
|
|
30
31
|
"vuetify": "^3.8.1",
|