vrtalk-web-sdk 0.1.603 → 0.1.605

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,7 +86,7 @@ export declare class XrApiEventMeta {
86
86
  platform: XrApiPlatform;
87
87
  legacySignalSource?: string;
88
88
  legacySignalType?: string;
89
- sourceScope?: 'image' | 'video';
89
+ sourceScope?: 'image' | 'video' | 'panel_button';
90
90
  }
91
91
  /** 类的种类:静态类(无实例、全静态方法)/ 实体类(空间实体或其子件,可作 entity_ref 变量类型) */
92
92
  export declare type XrApiClassKind = 'static' | 'entity';
@@ -114,6 +114,7 @@ export declare class XrApiClassMeta {
114
114
  entityInfo?: XrApiEntityInfo;
115
115
  methods: XrApiMethodMeta[];
116
116
  events: XrApiEventMeta[];
117
+ excludeInheritedEventKeys?: string[];
117
118
  methodGroups: XrApiGroupMeta[];
118
119
  }
119
120
  export declare function apiParam(p: Partial<XrApiParamMeta> & {
@@ -6,7 +6,7 @@ import { MultiLanguageStr } from '../general/multi-language-str';
6
6
  import { FreeButton } from '../general/free-button';
7
7
  import { VrAppearanceStyle } from './vr-appearance-style';
8
8
  import { XrInteractionControlConfig, XrInteractionDataType } from './xr-interaction-control';
9
- export declare type XrActionCategory = 'basic' | 'condition' | 'count_loop' | 'expression_loop' | 'switch' | 'object_call' | 'foreach_loop';
9
+ export declare type XrActionCategory = 'basic' | 'condition' | 'count_loop' | 'expression_loop' | 'switch' | 'object_call' | 'foreach_loop' | 'comment';
10
10
  export declare class XrActionCategoryDefine {
11
11
  static readonly BASIC: XrActionCategory;
12
12
  static readonly CONDITION: XrActionCategory;
@@ -15,6 +15,7 @@ export declare class XrActionCategoryDefine {
15
15
  static readonly SWITCH: XrActionCategory;
16
16
  static readonly OBJECT_CALL: XrActionCategory;
17
17
  static readonly FOREACH_LOOP: XrActionCategory;
18
+ static readonly COMMENT: XrActionCategory;
18
19
  }
19
20
  export declare type XrPlatform = 'VR' | 'AR';
20
21
  export declare class XrPlatformDefine {
@@ -25,7 +26,7 @@ export declare class XrBaseAction {
25
26
  actionCategory: XrActionCategory;
26
27
  backgroundColorMark: string;
27
28
  }
28
- export declare type XrAnyAction = XrConditionAction | XrCountLoopAction | XrExpressionLoopAction | XrSwitchAction | VrAction | XrObjectCallAction | XrForEachLoopAction;
29
+ export declare type XrAnyAction = XrConditionAction | XrCountLoopAction | XrExpressionLoopAction | XrSwitchAction | VrAction | XrObjectCallAction | XrForEachLoopAction | XrCommentAction;
29
30
  /**
30
31
  * VR动作
31
32
  */
@@ -145,11 +146,12 @@ export declare class XrSwitchAction {
145
146
  caseList: XrSwitchCase[];
146
147
  defaultActionList: XrAnyAction[];
147
148
  }
148
- export declare type XrReceiverFrom = 'picker' | 'variable' | 'static_class';
149
+ export declare type XrReceiverFrom = 'picker' | 'variable' | 'static_class' | 'user_function';
149
150
  export declare class XrReceiverFromDefine {
150
151
  static readonly PICKER: XrReceiverFrom;
151
152
  static readonly VARIABLE: XrReceiverFrom;
152
153
  static readonly STATIC_CLASS: XrReceiverFrom;
154
+ static readonly USER_FUNCTION: XrReceiverFrom;
153
155
  }
154
156
  /**
155
157
  * 接收者引用——「对象.方法」里的对象。
@@ -163,6 +165,7 @@ export declare class XrReceiverRef {
163
165
  entityParentPath: string[];
164
166
  variableScope?: XrVariableScopeType;
165
167
  variableKey?: string;
168
+ functionId: string;
166
169
  }
167
170
  export declare type XrCallArgKind = 'literal' | 'var_ref' | 'call' | 'closure';
168
171
  export declare class XrCallArgKindDefine {
@@ -214,6 +217,14 @@ export declare class XrForEachLoopAction {
214
217
  indexVarKey: string;
215
218
  actionList: XrAnyAction[];
216
219
  }
220
+ /**
221
+ * 注释块(actionCategory='comment'):仅用于在编辑器里给动作列表加一段说明文字,
222
+ * 运行时为纯 no-op —— player / Unity 遍历到直接跳过,不产生任何副作用(plan 纯加法)。
223
+ */
224
+ export declare class XrCommentAction extends XrBaseAction {
225
+ actionCategory: XrActionCategory;
226
+ commentText: string;
227
+ }
217
228
  export declare type VrActionType = 'system_common_wait' | 'system_set_interactive_state' | 'system_ui_settings_change' | 'system_color_space_scene_tint' | 'system_color_space_display_brightness' | 'component_general_change_visibility' | 'component_general_change_transform' | 'component_general_play_transition_animation' | 'component_general_stop_transition_animation' | 'component_2d_general_change_deformation_settings' | 'component_general_audio_source_play_control' | 'component_general_audio_source_pause' | 'component_general_audio_source_change_loop_mode' | 'component_2d_image_change_source' | 'component_2d_video_change_source' | 'component_2d_video_change_play_state' | 'component_2d_video_change_mute_state' | 'component_2d_text_change_source' | 'component_2d_panel_change_scene' | 'component_2d_panel_button_change_enabled' | 'component_tag_simulate_click' | 'component_3d_box_change_color' | 'component_3d_model_play_animation_clip' | 'component_3d_model_stop_animation_clip' | 'information_content_card_show' | 'information_content_card_close' | 'information_link_open' | 'information_link_close' | 'audio_center_play_list' | 'audio_center_pause' | 'audio_center_set_volume' | 'sweep_change_enabled' | 'sweep_change_panorama' | 'sweep_marker_change_enabled' | 'sweep_reset_to_default' | 'sweep_only_enable_current' | 'camera_move_to' | 'camera_dolly_move' | 'camera_dolly_stop' | 'navigation_start' | 'navigation_stop' | 'logic_variable_modify' | 'logic_variable_number_add' | 'logic_variable_number_subtract' | 'logic_variable_string_append' | 'logic_variable_string_trim_end' | 'logic_variable_string_advanced' | 'logic_variable_boolean_toggle' | 'flow_enter' | 'flow_exit' | 'send_broadcast' | 'system_state_scope_create' | 'system_state_scope_switch' | 'system_state_scope_destroy' | 'monitor_change_enabled' | 'monitor_switch_active_tab' | 'monitor_component_change_visibility' | 'monitor_video_change_play_state' | 'monitor_video_change_mute_state' | 'monitor_change_badge_text' | 'monitor_change_badge_style' | 'monitor_switch_active_scene' | 'monitor_change_popup_visible' | 'layer_change_visibility' | 'hamburger_menu_node_change_visibility' | 'hamburger_menu_change_open_state' | 'hamburger_menu_group_change_expanded' | 'canvas_component_change_visibility' | 'message_card_change_show_state' | 'message_card_show' | 'message_card_hide' | 'message_card_create_temporary' | 'message_card_destroy_temporary' | 'tts_play_voice' | 'tts_realtime_stream' | 'background_thread_start' | 'background_thread_pause' | 'background_thread_stop' | 'ai_agent_activate' | 'ai_agent_hide' | 'ai_agent_wake' | 'ai_agent_activate_and_send_user_message' | 'ai_agent_activate_and_inject_dialogue' | 'ai_agent_inject_hidden_state_message' | 'ai_agent_activate_and_inject_assistant_message' | 'system_open_webpage' | 'ability_enable' | 'ability_stop' | 'cloud_form_show_dialog' | 'cloud_form_collect_field' | 'cloud_form_submit' | 'cloud_form_reset' | 'hit_analytics_event' | 'popup_user_form_show_dialog' | 'logic_random_number' | 'logic_random_color' | 'logic_current_time' | 'logic_random_pick_string' | 'logic_random_pick_number' | 'logic_random_pick_boolean' | 'logic_random_pick_enum' | 'logic_random_pick_color' | 'logic_random_pick_css_color' | 'logic_random_pick_from_recommend_options' | 'visualization_controller_pop' | 'visualization_controller_hide' | 'visualization_controller_close_all' | 'ai_check_take_photo' | 'ai_check_run' | 'ray_hitter_activate' | 'ray_hitter_deactivate';
218
229
  export declare class VrActionTypeDefine {
219
230
  static readonly SYSTEM_COMMON_WAIT: VrActionType;
@@ -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;