vrtalk-web-sdk 0.1.602 → 0.1.604

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.
@@ -86,6 +86,7 @@ export declare class XrApiEventMeta {
86
86
  platform: XrApiPlatform;
87
87
  legacySignalSource?: string;
88
88
  legacySignalType?: string;
89
+ sourceScope?: 'image' | 'video' | 'panel_button';
89
90
  }
90
91
  /** 类的种类:静态类(无实例、全静态方法)/ 实体类(空间实体或其子件,可作 entity_ref 变量类型) */
91
92
  export declare type XrApiClassKind = 'static' | 'entity';
@@ -113,6 +114,7 @@ export declare class XrApiClassMeta {
113
114
  entityInfo?: XrApiEntityInfo;
114
115
  methods: XrApiMethodMeta[];
115
116
  events: XrApiEventMeta[];
117
+ excludeInheritedEventKeys?: string[];
116
118
  methodGroups: XrApiGroupMeta[];
117
119
  }
118
120
  export declare function apiParam(p: Partial<XrApiParamMeta> & {
@@ -75,7 +75,7 @@ export declare class XrVariable {
75
75
  * - event: 事件载荷(监听回调期间临时压入的事件数据,泛化自 broadcast_msg);表达式 _事件.$
76
76
  * 老 global/local/step/flow/ability/broadcast_msg/agent 保留,供迁移与向后兼容读老格式(plan §1.23)。
77
77
  */
78
- export declare type XrVariableScopeType = 'global' | 'shared' | 'local' | 'step' | 'flow' | 'ability' | 'broadcast_msg' | 'agent' | 'scene' | 'module' | 'func' | 'event';
78
+ export declare type XrVariableScopeType = 'global' | 'shared' | 'local' | 'step' | 'flow' | 'ability' | 'broadcast_msg' | 'agent' | 'scene' | 'module' | 'file' | 'func' | 'event';
79
79
  export declare class XrVariableScopeTypeDefine {
80
80
  static readonly GLOBAL: XrVariableScopeType;
81
81
  static readonly SHARED: XrVariableScopeType;
@@ -87,6 +87,7 @@ export declare class XrVariableScopeTypeDefine {
87
87
  static readonly BROADCAST_MSG: XrVariableScopeType;
88
88
  static readonly SCENE: XrVariableScopeType;
89
89
  static readonly MODULE: XrVariableScopeType;
90
+ static readonly FILE: XrVariableScopeType;
90
91
  static readonly FUNC: XrVariableScopeType;
91
92
  static readonly EVENT: XrVariableScopeType;
92
93
  }
@@ -14,14 +14,18 @@ import type { XrAnyAction } from './vr-action';
14
14
  * └─ programSceneList 场景(真隔离逻辑,多场景并发,plan §4.8)
15
15
  * └─ XrProgramScene
16
16
  * ├─ sceneVariableList 场景变量(场景内所有模块可见)
17
- * ├─ moduleList 模块(.java 式;模块变量私有,plan §1.15)
17
+ * ├─ moduleList 模块(= Java 包;模块变量私有,plan §1.15)
18
18
  * └─ entityHandlerBindingList 组件函数绑定关系(实体事件↔本场景某模块的 handler 函数,plan §4.9)
19
19
  * └─ XrProgramModule
20
- * ├─ moduleVariableList
21
- * ├─ functionList 函数(调用即返回;组件事件监听也是这里的函数,plan §4.6)
22
- * ├─ subprogramList 常驻子程序(有生命周期,plan §4.6)
23
- * └─ folderList 可选的组织文件夹(plan §1.40)
20
+ * ├─ moduleVariableList 模块变量(_模块.$,本模块所有文件可见)
21
+ * └─ fileList 代码文件(= .java 文件;一个文件含多个函数)
22
+ * └─ XrProgramFile
23
+ * ├─ fileVariableList 文件级变量(_文件.$,本文件内可见)
24
+ * ├─ functionList 函数(调用即返回;组件事件监听也是这里的函数,plan §4.6)
25
+ * ├─ subprogramList 常驻子程序(有生命周期,plan §4.6)
26
+ * └─ folderList 可选的组织文件夹(plan §1.40)
24
27
  *
28
+ * 作用域链(方案甲+文件层):共享 → 场景 → 模块 → 文件 → 函数 → 回调。
25
29
  * 说明:动作体暂用 XrAnyAction[](现有 AST);后续 Block AST 演进自 XrAnyAction,向后兼容。
26
30
  */
27
31
  /** 顶层「场景」——真隔离的逻辑工程,多个可并发运行,仅隔离逻辑(空间内容各场景共用,plan §1.6/§1.13) */
@@ -37,17 +41,24 @@ export declare class XrProgramScene extends VRTalkBaseData {
37
41
  moduleList: XrProgramModule[];
38
42
  entityHandlerBindingList: XrEntityHandlerBinding[];
39
43
  }
40
- /** 场景内「模块」——类似一个 .java 文件;模块变量私有,跨模块调用公开函数(plan §1.15 */
44
+ /** 场景内「模块」——对应 Java 的「包」;模块变量私有,跨模块调用公开函数(plan §1.15)。模块内含多个代码文件。 */
41
45
  export declare class XrProgramModule extends VRTalkBaseData {
42
46
  name: MultiLanguageStr;
43
47
  remark: string;
44
48
  moduleVariableList: XrVariable[];
49
+ fileList: XrProgramFile[];
50
+ }
51
+ /** 模块内「代码文件」——对应 Java 的一个 .java 文件;一个文件含多个函数/子程序,并有文件级变量。 */
52
+ export declare class XrProgramFile extends VRTalkBaseData {
53
+ name: MultiLanguageStr;
54
+ remark: string;
55
+ fileVariableList: XrVariable[];
45
56
  functionList: XrProgramFunction[];
46
57
  subprogramList: XrSubprogram[];
47
58
  folderList: XrProgramFolder[];
48
59
  sortMode: 'by-type' | 'by-name';
49
60
  }
50
- /** 模块内的组织文件夹(纯 UI 分组,plan §1.40) */
61
+ /** 文件内的组织文件夹(纯 UI 分组,plan §1.40) */
51
62
  export declare class XrProgramFolder extends VRTalkBaseData {
52
63
  name: string;
53
64
  parentFolderId: string;
@@ -123,6 +134,7 @@ export declare class XrEntityHandlerBinding extends VRTalkBaseData {
123
134
  entityId: string;
124
135
  entityParentPath: string[];
125
136
  eventName: string;
137
+ eventSourceId: string;
126
138
  handlerFunctionId: string;
127
139
  moduleId: string;
128
140
  }