x-runtime-lib 0.7.46 → 0.8.0

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,4 +1,4 @@
1
1
  import Interpreter from 'js-interpreter';
2
- import { SandboxContext } from '../../types';
3
- declare function bind(context: SandboxContext, interpreter: Interpreter, globalObject: object): void;
2
+ import { InterpreterContext } from '@/types';
3
+ declare function bind(context: InterpreterContext, interpreter: Interpreter, globalObject: object): void;
4
4
  export default bind;
@@ -1,3 +1,3 @@
1
1
  import Interpreter from 'js-interpreter';
2
- import { SandboxContext } from '@/types';
3
- export declare function bindView(context: SandboxContext, interpreter: Interpreter, globalObject: object): void;
2
+ import { InterpreterContext } from '@/types';
3
+ export declare function bindView(context: InterpreterContext, interpreter: Interpreter, globalObject: object): void;
@@ -1,4 +1,4 @@
1
1
  import Interpreter from 'js-interpreter';
2
- import { SandboxContext } from '../types';
3
- export declare function startInterpreter(context: SandboxContext, code: string): Interpreter;
2
+ import { InterpreterContext } from '@/types';
3
+ export declare function startInterpreter(context: InterpreterContext, code: string): Interpreter;
4
4
  export declare function stopInterpreter(interpreter: Interpreter): void;
@@ -5,7 +5,7 @@ export interface Node {
5
5
  alias?: string;
6
6
  };
7
7
  ref?: {
8
- id: undefined | string;
8
+ comp: undefined | string;
9
9
  };
10
10
  children?: Node[];
11
11
  }
@@ -3,17 +3,21 @@ import { Emitter, EventType } from 'mitt';
3
3
  import { Env, Mode } from './basic';
4
4
  import { Data } from './data';
5
5
  type EventBus = Emitter<Record<EventType, unknown>>;
6
- export interface SandboxContext {
6
+ export declare function newEventBus(): Emitter<Record<EventType, unknown>>;
7
+ export interface Sandbox {
8
+ eventBus?: EventBus;
9
+ interpreter?: Interpreter;
10
+ setCustomProp?: (key: string, value: any) => void;
11
+ getCustomProp?: (key: string) => any;
12
+ setCustomState?: (key: string, value: any) => void;
13
+ getCustomState?: (key: string) => any;
14
+ }
15
+ export interface InterpreterContext {
7
16
  org: string;
8
17
  env: Env;
9
18
  mode: Mode;
10
19
  type: 'page' | 'comp';
11
20
  data: Data;
12
- eventBus?: EventBus;
21
+ sandbox: Sandbox;
13
22
  }
14
- export interface Sandbox {
15
- eventBus?: EventBus;
16
- interpreter?: Interpreter;
17
- }
18
- export declare function newEventBus(): Emitter<Record<EventType, unknown>>;
19
23
  export {};
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "x-runtime-lib",
3
3
  "private": false,
4
- "version": "0.7.46",
4
+ "version": "0.8.0",
5
5
  "type": "module",
6
6
  "module": "dist/index.js",
7
7
  "types": "dist/index.d.ts",
@@ -22,38 +22,38 @@
22
22
  "*": "prettier --write ."
23
23
  },
24
24
  "dependencies": {
25
- "axios": "^1.11.0",
25
+ "axios": "^1.12.1",
26
26
  "echarts": "^6.0.0",
27
27
  "js-interpreter": "^6.0.1",
28
28
  "lodash-es": "^4.17.21",
29
29
  "mitt": "^3.0.1",
30
- "vue": "^3.5.20",
31
- "vue-i18n": "^11.1.11",
32
- "vuetify": "^3.9.6",
33
- "x-error-lib": "^0.5.8",
34
- "x-essential-lib": "^0.8.31"
30
+ "vue": "^3.5.21",
31
+ "vue-i18n": "^11.1.12",
32
+ "vuetify": "^3.10.0",
33
+ "x-error-lib": "^0.5.9",
34
+ "x-essential-lib": "^0.9.0"
35
35
  },
36
36
  "devDependencies": {
37
- "@eslint/js": "^9.34.0",
37
+ "@eslint/js": "^9.35.0",
38
38
  "@types/lodash-es": "^4.17.12",
39
- "@types/node": "^24.3.0",
39
+ "@types/node": "^24.3.3",
40
40
  "@vitejs/plugin-vue": "^6.0.1",
41
- "eslint": "^9.34.0",
41
+ "eslint": "^9.35.0",
42
42
  "eslint-config-prettier": "^10.1.8",
43
43
  "eslint-plugin-prettier": "^5.5.4",
44
44
  "eslint-plugin-vue": "^10.4.0",
45
- "globals": "^16.3.0",
45
+ "globals": "^16.4.0",
46
46
  "husky": "^9.1.7",
47
- "lint-staged": "^16.1.5",
47
+ "lint-staged": "^16.1.6",
48
48
  "prettier": "3.6.2",
49
- "sass": "^1.91.0",
49
+ "sass": "^1.92.1",
50
50
  "typescript": "^5.9.2",
51
- "typescript-eslint": "^8.41.0",
52
- "vite": "^7.1.3",
51
+ "typescript-eslint": "^8.43.0",
52
+ "vite": "^7.1.5",
53
53
  "vite-plugin-css-injected-by-js": "^3.5.2",
54
54
  "vite-plugin-vuetify": "^2.1.2",
55
55
  "vue-eslint-parser": "^10.2.0",
56
56
  "vue-router": "^4.5.1",
57
- "vue-tsc": "^3.0.6"
57
+ "vue-tsc": "^3.0.7"
58
58
  }
59
59
  }
@@ -1,3 +0,0 @@
1
- import { BaseProps } from '@/types';
2
- declare const _default: import("vue").DefineComponent<BaseProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<BaseProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
3
- export default _default;
@@ -1,2 +0,0 @@
1
- import { BaseProps, Sandbox } from '../../../types';
2
- export declare function useCallMethod(sandbox: Sandbox, props: BaseProps, hook: (params: unknown) => void): void;
@@ -1,4 +0,0 @@
1
- import { BaseProps, Mode, Sandbox } from '../../../types';
2
- export declare function useProp(mode: Mode, sandbox: Sandbox, props: BaseProps, keys: string[], json?: boolean): {
3
- prop: import("vue").Ref<any, any>;
4
- };
@@ -1,3 +0,0 @@
1
- export declare function useReactive(): {
2
- reactives: any;
3
- };
@@ -1 +0,0 @@
1
- export * from './meta';
@@ -1,2 +0,0 @@
1
- import { ZElement } from '@/types';
2
- export declare const listV1: ZElement;
@@ -1,3 +0,0 @@
1
- import Interpreter from 'js-interpreter';
2
- import { SandboxContext } from '../../types';
3
- export declare function bindReactivity(context: SandboxContext, interpreter: Interpreter, globalObject: object): void;