vrtalk-web-sdk 0.1.530 → 0.1.532
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/src/model/general/index.d.ts +1 -0
- package/dist/src/model/general/tintable-icon-ref.d.ts +18 -0
- package/dist/src/model/vr/index.d.ts +2 -1
- package/dist/src/model/vr/vr-action.d.ts +3 -113
- package/dist/src/model/vr/xr-bound-variable-control.d.ts +25 -0
- package/dist/src/model/vr/xr-hamburger-menu.d.ts +24 -14
- package/dist/src/model/vr/xr-interaction-control.d.ts +132 -0
- package/dist/src/model/vr/xr-logic.d.ts +3 -2
- package/dist/src/model/vr/xr-monitor.d.ts +18 -2
- package/dist/src/model/vr-component/vr-component-tag-data.d.ts +3 -5
- package/dist/src/vue/common/pick-str.d.ts +12 -0
- package/dist/vrtalk-web-sdk.js +1 -1
- package/dist/vue/common/pick-str.ts +33 -0
- package/dist/vue/fields/field-boolean-card-pair.vue +80 -0
- package/dist/vue/fields/field-boolean-checkbox.vue +12 -0
- package/dist/vue/fields/field-boolean-segment.vue +17 -0
- package/dist/vue/fields/field-boolean-switch.vue +9 -0
- package/dist/vue/fields/field-boolean-thumb.vue +107 -0
- package/dist/vue/fields/field-color-picker.vue +119 -0
- package/dist/vue/fields/field-color-swatch-picker.vue +102 -0
- package/dist/vue/fields/field-css-color-advanced.vue +390 -0
- package/dist/vue/fields/field-css-color-input.vue +66 -0
- package/dist/vue/fields/field-css-color-swatch-picker.vue +81 -0
- package/dist/vue/fields/field-number-chip-tile.vue +63 -0
- package/dist/vue/fields/field-number-dial.vue +144 -0
- package/dist/vue/fields/field-number-emoji-scale.vue +60 -0
- package/dist/vue/fields/field-number-input.vue +17 -0
- package/dist/vue/fields/field-number-progress-tap.vue +205 -0
- package/dist/vue/fields/field-number-segment.vue +17 -0
- package/dist/vue/fields/field-number-slider-vertical.vue +40 -0
- package/dist/vue/fields/field-number-slider.vue +46 -0
- package/dist/vue/fields/field-number-star-rating.vue +161 -0
- package/dist/vue/fields/field-number-stepper.vue +97 -0
- package/dist/vue/fields/field-string-autocomplete.vue +18 -0
- package/dist/vue/fields/field-string-avatar-list.vue +96 -0
- package/dist/vue/fields/field-string-card-grid.vue +110 -0
- package/dist/vue/fields/field-string-color-swatch.vue +61 -0
- package/dist/vue/fields/field-string-input.vue +12 -0
- package/dist/vue/fields/field-string-radio.vue +37 -0
- package/dist/vue/fields/field-string-segment.vue +17 -0
- package/dist/vue/fields/field-string-select.vue +20 -0
- package/dist/vue/fields/field-string-tag.vue +74 -0
- package/dist/vue/fields/field-string-textarea.vue +15 -0
- package/dist/vue/interaction-control/vrtalk-interaction-control-renderer.vue +104 -0
- package/dist/vue/primitives/vrtalk-autocomplete.vue +126 -0
- package/dist/vue/primitives/vrtalk-button.vue +68 -0
- package/dist/vue/primitives/vrtalk-checkbox.vue +70 -0
- package/dist/vue/primitives/vrtalk-input-number.vue +152 -0
- package/dist/vue/primitives/vrtalk-input.vue +59 -0
- package/dist/vue/primitives/vrtalk-radio-group.vue +101 -0
- package/dist/vue/primitives/vrtalk-segmented.vue +98 -0
- package/dist/vue/primitives/vrtalk-select.vue +90 -0
- package/dist/vue/primitives/vrtalk-slider.vue +137 -0
- package/dist/vue/primitives/vrtalk-switch.vue +72 -0
- package/dist/vue/primitives/vrtalk-textarea.vue +71 -0
- package/dist/vue/tintable-icon/vrtalk-tintable-icon.vue +61 -0
- package/dist/webpack.config.d.ts +2 -1
- package/package.json +10 -1
- package/dist/src/model/vr/popup-user-form-icons.d.ts +0 -26
|
@@ -7,6 +7,7 @@ export * from './goto-position';
|
|
|
7
7
|
export * from './hover-border-settings';
|
|
8
8
|
export * from './multi-language-str';
|
|
9
9
|
export * from './renderer';
|
|
10
|
+
export * from './tintable-icon-ref';
|
|
10
11
|
export * from './vector';
|
|
11
12
|
export * from './vr-media';
|
|
12
13
|
export * from './vrtalk-base-data';
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Color } from './color';
|
|
2
|
+
/**
|
|
3
|
+
* 可染色图标引用
|
|
4
|
+
*
|
|
5
|
+
* 用于"图标库 + 媒体库"双选场景。url 是最终 src(无论来自哪边都填这个),
|
|
6
|
+
* 当图标来自图标库时再额外写 iconCategory / iconFilename 用于回显已选项;
|
|
7
|
+
* 从媒体库选的图标,这两个字段留空即可。
|
|
8
|
+
*
|
|
9
|
+
* colorEnabled = true 时渲染端用 mask-image 把不透明像素 tint 成 color
|
|
10
|
+
*(适合 mono 图标;color 图标可关掉 colorEnabled 保持原色)。
|
|
11
|
+
*/
|
|
12
|
+
export declare class TintableIconRef {
|
|
13
|
+
url: string;
|
|
14
|
+
iconCategory: string;
|
|
15
|
+
iconFilename: string;
|
|
16
|
+
colorEnabled: boolean;
|
|
17
|
+
color: Color;
|
|
18
|
+
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export * from './vr-action';
|
|
2
2
|
export * from './vr-action-platform-capability';
|
|
3
|
-
export * from './
|
|
3
|
+
export * from './xr-interaction-control';
|
|
4
|
+
export * from './xr-bound-variable-control';
|
|
4
5
|
export * from './vr-ad-channel';
|
|
5
6
|
export * from './vr-ad-item';
|
|
6
7
|
export * from './vr-ai-settings';
|
|
@@ -3,6 +3,7 @@ import { XrMessageCard } from './xr-message-card';
|
|
|
3
3
|
import { VrComponent2dDeformationSettings } from '../vr-component/vr-component-data';
|
|
4
4
|
import { XrTypedValue, XrVariableScopeType, XrVariableTarget } from './xr-logic';
|
|
5
5
|
import { MultiLanguageStr } from '../general/multi-language-str';
|
|
6
|
+
import { XrInteractionControlConfig, XrInteractionDataType } from './xr-interaction-control';
|
|
6
7
|
export declare type XrActionCategory = 'basic' | 'condition' | 'count_loop' | 'expression_loop';
|
|
7
8
|
export declare class XrActionCategoryDefine {
|
|
8
9
|
static readonly BASIC: XrActionCategory;
|
|
@@ -581,126 +582,15 @@ export declare class VrActionParamsHitAnalyticsEvent {
|
|
|
581
582
|
analyticsEventDataKey: string;
|
|
582
583
|
fieldBindings: VrActionHitAnalyticsEventFieldBinding[];
|
|
583
584
|
}
|
|
584
|
-
export declare type PopupUserFormDataType = 'string' | 'number' | 'boolean' | 'enum' | 'color' | 'css_color';
|
|
585
|
-
export declare class PopupUserFormDataTypeDefine {
|
|
586
|
-
static readonly STRING: PopupUserFormDataType;
|
|
587
|
-
static readonly NUMBER: PopupUserFormDataType;
|
|
588
|
-
static readonly BOOLEAN: PopupUserFormDataType;
|
|
589
|
-
static readonly ENUM: PopupUserFormDataType;
|
|
590
|
-
static readonly COLOR: PopupUserFormDataType;
|
|
591
|
-
static readonly CSS_COLOR: PopupUserFormDataType;
|
|
592
|
-
}
|
|
593
|
-
export declare type PopupUserFormControlVariant = 'number_input' | 'number_slider' | 'number_slider_vertical' | 'number_stepper' | 'number_star_rating' | 'number_segment' | 'number_emoji_scale' | 'number_dial' | 'number_progress_tap' | 'number_chip_tile' | 'string_input' | 'string_textarea' | 'string_select' | 'string_autocomplete' | 'string_segment' | 'string_radio' | 'string_tag' | 'string_card_grid' | 'string_avatar_list' | 'string_color_swatch' | 'boolean_switch' | 'boolean_checkbox' | 'boolean_segment' | 'boolean_thumb' | 'boolean_card_pair' | 'color_picker' | 'color_swatch_picker' | 'css_color_input' | 'css_color_swatch_picker' | 'css_color_advanced';
|
|
594
|
-
export declare class PopupUserFormControlVariantDefine {
|
|
595
|
-
static readonly NUMBER_INPUT: PopupUserFormControlVariant;
|
|
596
|
-
static readonly NUMBER_SLIDER: PopupUserFormControlVariant;
|
|
597
|
-
static readonly NUMBER_SLIDER_VERTICAL: PopupUserFormControlVariant;
|
|
598
|
-
static readonly NUMBER_STEPPER: PopupUserFormControlVariant;
|
|
599
|
-
static readonly NUMBER_STAR_RATING: PopupUserFormControlVariant;
|
|
600
|
-
static readonly NUMBER_SEGMENT: PopupUserFormControlVariant;
|
|
601
|
-
static readonly NUMBER_EMOJI_SCALE: PopupUserFormControlVariant;
|
|
602
|
-
static readonly NUMBER_DIAL: PopupUserFormControlVariant;
|
|
603
|
-
static readonly NUMBER_PROGRESS_TAP: PopupUserFormControlVariant;
|
|
604
|
-
static readonly NUMBER_CHIP_TILE: PopupUserFormControlVariant;
|
|
605
|
-
static readonly STRING_INPUT: PopupUserFormControlVariant;
|
|
606
|
-
static readonly STRING_TEXTAREA: PopupUserFormControlVariant;
|
|
607
|
-
static readonly STRING_SELECT: PopupUserFormControlVariant;
|
|
608
|
-
static readonly STRING_AUTOCOMPLETE: PopupUserFormControlVariant;
|
|
609
|
-
static readonly STRING_SEGMENT: PopupUserFormControlVariant;
|
|
610
|
-
static readonly STRING_RADIO: PopupUserFormControlVariant;
|
|
611
|
-
static readonly STRING_TAG: PopupUserFormControlVariant;
|
|
612
|
-
static readonly STRING_CARD_GRID: PopupUserFormControlVariant;
|
|
613
|
-
static readonly STRING_AVATAR_LIST: PopupUserFormControlVariant;
|
|
614
|
-
static readonly STRING_COLOR_SWATCH: PopupUserFormControlVariant;
|
|
615
|
-
static readonly BOOLEAN_SWITCH: PopupUserFormControlVariant;
|
|
616
|
-
static readonly BOOLEAN_CHECKBOX: PopupUserFormControlVariant;
|
|
617
|
-
static readonly BOOLEAN_SEGMENT: PopupUserFormControlVariant;
|
|
618
|
-
static readonly BOOLEAN_THUMB: PopupUserFormControlVariant;
|
|
619
|
-
static readonly BOOLEAN_CARD_PAIR: PopupUserFormControlVariant;
|
|
620
|
-
static readonly COLOR_PICKER: PopupUserFormControlVariant;
|
|
621
|
-
static readonly COLOR_SWATCH_PICKER: PopupUserFormControlVariant;
|
|
622
|
-
static readonly CSS_COLOR_INPUT: PopupUserFormControlVariant;
|
|
623
|
-
static readonly CSS_COLOR_SWATCH_PICKER: PopupUserFormControlVariant;
|
|
624
|
-
static readonly CSS_COLOR_ADVANCED: PopupUserFormControlVariant;
|
|
625
|
-
}
|
|
626
|
-
export declare class PopupUserFormDataTypeDefaultVariant {
|
|
627
|
-
static getDefault(dataType: PopupUserFormDataType): PopupUserFormControlVariant;
|
|
628
|
-
}
|
|
629
|
-
export declare class PopupUserFormOption {
|
|
630
|
-
label: MultiLanguageStr;
|
|
631
|
-
value: string | number;
|
|
632
|
-
iconUrl: string;
|
|
633
|
-
imageUrl: string;
|
|
634
|
-
description: MultiLanguageStr;
|
|
635
|
-
badge: MultiLanguageStr;
|
|
636
|
-
color: string;
|
|
637
|
-
disabled: boolean;
|
|
638
|
-
}
|
|
639
|
-
export declare class PopupUserFormControlConfig {
|
|
640
|
-
variant: PopupUserFormControlVariant;
|
|
641
|
-
min: number | null;
|
|
642
|
-
max: number | null;
|
|
643
|
-
step: number | null;
|
|
644
|
-
precision: number | null;
|
|
645
|
-
sliderShowTicks: boolean;
|
|
646
|
-
sliderActiveColor: string;
|
|
647
|
-
sliderTrackColor: string;
|
|
648
|
-
sliderShowTooltip: boolean;
|
|
649
|
-
starCount: number;
|
|
650
|
-
starAllowHalf: boolean;
|
|
651
|
-
starIcon: 'star' | 'heart' | 'thumb' | 'like' | 'fire' | 'crown' | 'flower' | 'custom';
|
|
652
|
-
starCustomIconUrl: string;
|
|
653
|
-
starActiveColor: string;
|
|
654
|
-
starInactiveColor: string;
|
|
655
|
-
starSize: number;
|
|
656
|
-
starShowValueLabel: boolean;
|
|
657
|
-
emojiScaleEmojis: string[];
|
|
658
|
-
emojiScaleSize: number;
|
|
659
|
-
emojiScaleAnimateOnSelect: boolean;
|
|
660
|
-
dialSize: number;
|
|
661
|
-
dialActiveColor: string;
|
|
662
|
-
dialShowValueInCenter: boolean;
|
|
663
|
-
dialStartAngle: number;
|
|
664
|
-
progressTapHeight: number;
|
|
665
|
-
progressTapGradientFrom: string;
|
|
666
|
-
progressTapGradientTo: string;
|
|
667
|
-
progressTapShowMarks: boolean;
|
|
668
|
-
chipTileSize: number;
|
|
669
|
-
chipTileColumns: number;
|
|
670
|
-
chipTileActiveColor: string;
|
|
671
|
-
options: PopupUserFormOption[];
|
|
672
|
-
textareaRows: number;
|
|
673
|
-
textareaMaxLength: number | null;
|
|
674
|
-
textareaShowCount: boolean;
|
|
675
|
-
tagMode: 'pill' | 'card';
|
|
676
|
-
cardGridColumns: number;
|
|
677
|
-
cardGridImageRatio: '1:1' | '4:3' | '16:9';
|
|
678
|
-
cardGridShowDescription: boolean;
|
|
679
|
-
avatarListShowSubtitle: boolean;
|
|
680
|
-
avatarListSize: number;
|
|
681
|
-
colorSwatchSize: number;
|
|
682
|
-
colorSwatchShape: 'square' | 'circle';
|
|
683
|
-
colorSwatchColumns: number;
|
|
684
|
-
booleanTrueLabel: MultiLanguageStr;
|
|
685
|
-
booleanFalseLabel: MultiLanguageStr;
|
|
686
|
-
booleanTrueIconUrl: string;
|
|
687
|
-
booleanFalseIconUrl: string;
|
|
688
|
-
booleanTrueColor: string;
|
|
689
|
-
booleanFalseColor: string;
|
|
690
|
-
colorSwatchOptions: Color[];
|
|
691
|
-
cssColorSwatchOptions: string[];
|
|
692
|
-
borderRadius: number | null;
|
|
693
|
-
accentColor: string;
|
|
694
|
-
}
|
|
695
585
|
export declare class PopupUserFormField {
|
|
696
586
|
fieldKey: string;
|
|
697
587
|
label: MultiLanguageStr;
|
|
698
588
|
description: MultiLanguageStr;
|
|
699
589
|
placeholder: MultiLanguageStr;
|
|
700
590
|
required: boolean;
|
|
701
|
-
dataType:
|
|
591
|
+
dataType: XrInteractionDataType;
|
|
702
592
|
defaultValue: string | number | boolean | object | null;
|
|
703
|
-
control:
|
|
593
|
+
control: XrInteractionControlConfig;
|
|
704
594
|
boundVariableScope: XrVariableScopeType | '';
|
|
705
595
|
boundVariableKey: string;
|
|
706
596
|
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { MultiLanguageStr } from '../general/multi-language-str';
|
|
2
|
+
import { XrInteractionControlConfig, XrInteractionDataType } from './xr-interaction-control';
|
|
3
|
+
import { XrVariableScopeType } from './xr-logic';
|
|
4
|
+
/**
|
|
5
|
+
* 绑定变量控件
|
|
6
|
+
*
|
|
7
|
+
* 用在「监控面板」和「汉堡菜单画布节点」内,把一个 XrInteractionControlConfig
|
|
8
|
+
* 与 XrRuntimeState 中的某个变量双向绑定 —— 用户操作控件即写变量;
|
|
9
|
+
* 变量被其他地方改也会回灌到控件上。
|
|
10
|
+
*
|
|
11
|
+
* 与表单 Action 里的 PopupUserFormField 关系:
|
|
12
|
+
* - 两者内嵌同一个 XrInteractionControlConfig(控件外观 / 配置共用一套)
|
|
13
|
+
* - PopupUserFormField 是「填表上下文」(required / defaultValue / fieldKey / 同步提交)
|
|
14
|
+
* - XrBoundVariableControl 是「持久 widget 上下文」(实时绑定变量;可选 label / description / placeholder)
|
|
15
|
+
*/
|
|
16
|
+
export declare class XrBoundVariableControl {
|
|
17
|
+
boundVariableScope: XrVariableScopeType | '';
|
|
18
|
+
boundVariableKey: string;
|
|
19
|
+
dataType: XrInteractionDataType;
|
|
20
|
+
control: XrInteractionControlConfig;
|
|
21
|
+
label: MultiLanguageStr;
|
|
22
|
+
description: MultiLanguageStr;
|
|
23
|
+
placeholder: MultiLanguageStr;
|
|
24
|
+
commitTextOnBlur: boolean;
|
|
25
|
+
}
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import { VRTalkBaseData } from '../general/vrtalk-base-data';
|
|
2
2
|
import { MultiLanguageStr } from '../general/multi-language-str';
|
|
3
3
|
import { XrAnyAction } from './vr-action';
|
|
4
|
+
import { TintableIconRef } from '../general/tintable-icon-ref';
|
|
4
5
|
import { FreeButton } from '../general/free-button';
|
|
6
|
+
import { XrBoundVariableControl } from './xr-bound-variable-control';
|
|
5
7
|
export declare const XR_HAMBURGER_MENU_DEFAULT_COLOR = "#262626";
|
|
6
8
|
export declare type XrHamburgerMenuNodeType = 'group' | 'text_item' | 'media_carousel_item' | 'grid_media_item' | 'waterfall_media_item' | 'webview_item' | 'rich_text_item' | 'canvas_item' | 'image_item' | 'grid_image_item' | 'waterfall_image_item' | 'video_item';
|
|
7
9
|
export declare class XrHamburgerMenuNodeTypeDefine {
|
|
@@ -65,25 +67,20 @@ export declare class XrHamburgerMenuNodeBase extends VRTalkBaseData {
|
|
|
65
67
|
requireXrReady: boolean;
|
|
66
68
|
}
|
|
67
69
|
/**
|
|
68
|
-
* 中间基类:在 NodeBase 之上加 title(多语言显示标题)+
|
|
70
|
+
* 中间基类:在 NodeBase 之上加 title(多语言显示标题)+ 图标
|
|
69
71
|
* 除 RichTextItem 之外的全部节点类型都继承自此类
|
|
70
72
|
*
|
|
71
|
-
*
|
|
72
|
-
* 既然都有标题,理应都能在标题左侧配图标。
|
|
73
|
+
* 图标采用统一的 TintableIconRef 结构(图标库 / 媒体库 + 可选 tint 颜色)
|
|
73
74
|
*/
|
|
74
75
|
export declare class XrHamburgerMenuNode extends XrHamburgerMenuNodeBase {
|
|
75
76
|
title: MultiLanguageStr;
|
|
76
|
-
icon:
|
|
77
|
-
iconCategory: string;
|
|
78
|
-
iconFilename: string;
|
|
79
|
-
iconColorEnabled: boolean;
|
|
80
|
-
iconColor: import("../general/color").Color;
|
|
77
|
+
icon: TintableIconRef;
|
|
81
78
|
}
|
|
82
79
|
/**
|
|
83
80
|
* 文字菜单项 — 点击后执行 actionList
|
|
84
81
|
*
|
|
85
|
-
* 图标字段已上移至 XrHamburgerMenuNode 基类(icon
|
|
86
|
-
*
|
|
82
|
+
* 图标字段已上移至 XrHamburgerMenuNode 基类(icon: TintableIconRef),
|
|
83
|
+
* 本类只保留自己独有的 actionList。
|
|
87
84
|
*/
|
|
88
85
|
export declare class XrHamburgerMenuTextItem extends XrHamburgerMenuNode {
|
|
89
86
|
constructor();
|
|
@@ -272,8 +269,7 @@ export declare class XrHamburgerMenuWebViewItem extends XrHamburgerMenuNode {
|
|
|
272
269
|
* 分组节点 — 可包含子节点
|
|
273
270
|
* SDK 不限深度,5 级限制由 console 编辑端实施
|
|
274
271
|
*
|
|
275
|
-
* 图标字段已上移至 XrHamburgerMenuNode 基类(icon
|
|
276
|
-
* / iconColorEnabled / iconColor)。
|
|
272
|
+
* 图标字段已上移至 XrHamburgerMenuNode 基类(icon: TintableIconRef)。
|
|
277
273
|
*/
|
|
278
274
|
export declare class XrHamburgerMenuGroup extends XrHamburgerMenuNode {
|
|
279
275
|
constructor();
|
|
@@ -325,13 +321,14 @@ export declare class XrHamburgerMenu {
|
|
|
325
321
|
pcWidth: number;
|
|
326
322
|
openedByDefault: boolean;
|
|
327
323
|
}
|
|
328
|
-
export declare type XrHamburgerCanvasComponentType = 'image' | 'text' | 'progress-bar' | 'video' | 'button';
|
|
324
|
+
export declare type XrHamburgerCanvasComponentType = 'image' | 'text' | 'progress-bar' | 'video' | 'button' | 'variable-control';
|
|
329
325
|
export declare class XrHamburgerCanvasComponentTypeDefine {
|
|
330
326
|
static readonly IMAGE: XrHamburgerCanvasComponentType;
|
|
331
327
|
static readonly TEXT: XrHamburgerCanvasComponentType;
|
|
332
328
|
static readonly PROGRESS_BAR: XrHamburgerCanvasComponentType;
|
|
333
329
|
static readonly VIDEO: XrHamburgerCanvasComponentType;
|
|
334
330
|
static readonly BUTTON: XrHamburgerCanvasComponentType;
|
|
331
|
+
static readonly VARIABLE_CONTROL: XrHamburgerCanvasComponentType;
|
|
335
332
|
}
|
|
336
333
|
export declare type XrHamburgerCanvasComponentImageMode = 'contain' | 'cover' | 'fill' | 'scale-down' | 'none';
|
|
337
334
|
export declare class XrHamburgerCanvasComponentImageModeDefine {
|
|
@@ -460,6 +457,19 @@ export declare class XrHamburgerCanvasComponentButton extends XrHamburgerCanvasC
|
|
|
460
457
|
textBold: boolean;
|
|
461
458
|
textItalic: boolean;
|
|
462
459
|
textUnderline: boolean;
|
|
463
|
-
|
|
460
|
+
icon: TintableIconRef;
|
|
464
461
|
iconPosition: XrHamburgerCanvasComponentButtonIconPosition;
|
|
465
462
|
}
|
|
463
|
+
/**
|
|
464
|
+
* 绑定变量控件 —— 在画布上摆放一个与变量双向绑定的交互控件。
|
|
465
|
+
*
|
|
466
|
+
* 内嵌共享的 XrBoundVariableControl(包含变量绑定 + XrInteractionControlConfig)。
|
|
467
|
+
* 编辑器:复用 vrtalk-bound-variable-control-edit。
|
|
468
|
+
* 运行时:复用 vrtalk-bound-variable-control 渲染。
|
|
469
|
+
*/
|
|
470
|
+
export declare class XrHamburgerCanvasComponentVariableControl extends XrHamburgerCanvasComponentBase {
|
|
471
|
+
type: XrHamburgerCanvasComponentType;
|
|
472
|
+
width: number;
|
|
473
|
+
height: number;
|
|
474
|
+
bound: XrBoundVariableControl;
|
|
475
|
+
}
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
import { Color, TintableIconRef } from '../general';
|
|
2
|
+
import { MultiLanguageStr } from '../general/multi-language-str';
|
|
3
|
+
/**
|
|
4
|
+
* 交互控件(Interaction Control)共享 schema
|
|
5
|
+
*
|
|
6
|
+
* 本文件描述「一个用户可交互的控件该长什么样」的抽象 —— 包括:
|
|
7
|
+
* - 数据类型(dataType)
|
|
8
|
+
* - 控件外观变体(variant;如滑块 / 旋钮 / 评分 / 卡片网格 / ...)
|
|
9
|
+
* - 变体相关配置(min/max/options/颜色 等)
|
|
10
|
+
*
|
|
11
|
+
* 三个消费者各自再加自己的"上下文"字段:
|
|
12
|
+
* - 表单字段 (PopupUserFormField):fieldKey / label / required / defaultValue / 绑定变量
|
|
13
|
+
* - 监控面板节点 / 汉堡菜单画布节点 (XrBoundVariableControl):变量绑定 + 可选 label
|
|
14
|
+
*
|
|
15
|
+
* 重命名自旧的 PopupUserFormControl* / PopupUserFormDataType* / PopupUserFormOption。
|
|
16
|
+
*/
|
|
17
|
+
export declare type XrInteractionDataType = 'string' | 'number' | 'boolean' | 'enum' | 'color' | 'css_color';
|
|
18
|
+
export declare class XrInteractionDataTypeDefine {
|
|
19
|
+
static readonly STRING: XrInteractionDataType;
|
|
20
|
+
static readonly NUMBER: XrInteractionDataType;
|
|
21
|
+
static readonly BOOLEAN: XrInteractionDataType;
|
|
22
|
+
static readonly ENUM: XrInteractionDataType;
|
|
23
|
+
static readonly COLOR: XrInteractionDataType;
|
|
24
|
+
static readonly CSS_COLOR: XrInteractionDataType;
|
|
25
|
+
}
|
|
26
|
+
export declare type XrInteractionControlVariant = 'number_input' | 'number_slider' | 'number_slider_vertical' | 'number_stepper' | 'number_star_rating' | 'number_segment' | 'number_emoji_scale' | 'number_dial' | 'number_progress_tap' | 'number_chip_tile' | 'string_input' | 'string_textarea' | 'string_select' | 'string_autocomplete' | 'string_segment' | 'string_radio' | 'string_tag' | 'string_card_grid' | 'string_avatar_list' | 'string_color_swatch' | 'boolean_switch' | 'boolean_checkbox' | 'boolean_segment' | 'boolean_thumb' | 'boolean_card_pair' | 'color_picker' | 'color_swatch_picker' | 'css_color_input' | 'css_color_swatch_picker' | 'css_color_advanced';
|
|
27
|
+
export declare class XrInteractionControlVariantDefine {
|
|
28
|
+
static readonly NUMBER_INPUT: XrInteractionControlVariant;
|
|
29
|
+
static readonly NUMBER_SLIDER: XrInteractionControlVariant;
|
|
30
|
+
static readonly NUMBER_SLIDER_VERTICAL: XrInteractionControlVariant;
|
|
31
|
+
static readonly NUMBER_STEPPER: XrInteractionControlVariant;
|
|
32
|
+
static readonly NUMBER_STAR_RATING: XrInteractionControlVariant;
|
|
33
|
+
static readonly NUMBER_SEGMENT: XrInteractionControlVariant;
|
|
34
|
+
static readonly NUMBER_EMOJI_SCALE: XrInteractionControlVariant;
|
|
35
|
+
static readonly NUMBER_DIAL: XrInteractionControlVariant;
|
|
36
|
+
static readonly NUMBER_PROGRESS_TAP: XrInteractionControlVariant;
|
|
37
|
+
static readonly NUMBER_CHIP_TILE: XrInteractionControlVariant;
|
|
38
|
+
static readonly STRING_INPUT: XrInteractionControlVariant;
|
|
39
|
+
static readonly STRING_TEXTAREA: XrInteractionControlVariant;
|
|
40
|
+
static readonly STRING_SELECT: XrInteractionControlVariant;
|
|
41
|
+
static readonly STRING_AUTOCOMPLETE: XrInteractionControlVariant;
|
|
42
|
+
static readonly STRING_SEGMENT: XrInteractionControlVariant;
|
|
43
|
+
static readonly STRING_RADIO: XrInteractionControlVariant;
|
|
44
|
+
static readonly STRING_TAG: XrInteractionControlVariant;
|
|
45
|
+
static readonly STRING_CARD_GRID: XrInteractionControlVariant;
|
|
46
|
+
static readonly STRING_AVATAR_LIST: XrInteractionControlVariant;
|
|
47
|
+
static readonly STRING_COLOR_SWATCH: XrInteractionControlVariant;
|
|
48
|
+
static readonly BOOLEAN_SWITCH: XrInteractionControlVariant;
|
|
49
|
+
static readonly BOOLEAN_CHECKBOX: XrInteractionControlVariant;
|
|
50
|
+
static readonly BOOLEAN_SEGMENT: XrInteractionControlVariant;
|
|
51
|
+
static readonly BOOLEAN_THUMB: XrInteractionControlVariant;
|
|
52
|
+
static readonly BOOLEAN_CARD_PAIR: XrInteractionControlVariant;
|
|
53
|
+
static readonly COLOR_PICKER: XrInteractionControlVariant;
|
|
54
|
+
static readonly COLOR_SWATCH_PICKER: XrInteractionControlVariant;
|
|
55
|
+
static readonly CSS_COLOR_INPUT: XrInteractionControlVariant;
|
|
56
|
+
static readonly CSS_COLOR_SWATCH_PICKER: XrInteractionControlVariant;
|
|
57
|
+
static readonly CSS_COLOR_ADVANCED: XrInteractionControlVariant;
|
|
58
|
+
}
|
|
59
|
+
export declare class XrInteractionControlDefaultVariant {
|
|
60
|
+
static getDefault(dataType: XrInteractionDataType): XrInteractionControlVariant;
|
|
61
|
+
}
|
|
62
|
+
export declare type XrInteractionControlVariantTierLevel = 'A' | 'B' | 'C';
|
|
63
|
+
export declare class XrInteractionControlVariantTier {
|
|
64
|
+
private static readonly TIER_A;
|
|
65
|
+
private static readonly TIER_B;
|
|
66
|
+
static getTier(variant: XrInteractionControlVariant): XrInteractionControlVariantTierLevel;
|
|
67
|
+
}
|
|
68
|
+
export declare class XrInteractionOption {
|
|
69
|
+
label: MultiLanguageStr;
|
|
70
|
+
value: string | number;
|
|
71
|
+
icon: TintableIconRef;
|
|
72
|
+
imageUrl: string;
|
|
73
|
+
description: MultiLanguageStr;
|
|
74
|
+
badge: MultiLanguageStr;
|
|
75
|
+
color: string;
|
|
76
|
+
disabled: boolean;
|
|
77
|
+
}
|
|
78
|
+
export declare class XrInteractionControlConfig {
|
|
79
|
+
variant: XrInteractionControlVariant;
|
|
80
|
+
min: number | null;
|
|
81
|
+
max: number | null;
|
|
82
|
+
step: number | null;
|
|
83
|
+
precision: number | null;
|
|
84
|
+
sliderShowTicks: boolean;
|
|
85
|
+
sliderActiveColor: string;
|
|
86
|
+
sliderTrackColor: string;
|
|
87
|
+
sliderShowTooltip: boolean;
|
|
88
|
+
starCount: number;
|
|
89
|
+
starAllowHalf: boolean;
|
|
90
|
+
starIcon: TintableIconRef;
|
|
91
|
+
starActiveColor: string;
|
|
92
|
+
starInactiveColor: string;
|
|
93
|
+
starSize: number;
|
|
94
|
+
starShowValueLabel: boolean;
|
|
95
|
+
emojiScaleEmojis: string[];
|
|
96
|
+
emojiScaleSize: number;
|
|
97
|
+
emojiScaleAnimateOnSelect: boolean;
|
|
98
|
+
dialSize: number;
|
|
99
|
+
dialActiveColor: string;
|
|
100
|
+
dialShowValueInCenter: boolean;
|
|
101
|
+
dialStartAngle: number;
|
|
102
|
+
progressTapHeight: number;
|
|
103
|
+
progressTapGradientFrom: string;
|
|
104
|
+
progressTapGradientTo: string;
|
|
105
|
+
progressTapShowMarks: boolean;
|
|
106
|
+
chipTileSize: number;
|
|
107
|
+
chipTileColumns: number;
|
|
108
|
+
chipTileActiveColor: string;
|
|
109
|
+
options: XrInteractionOption[];
|
|
110
|
+
textareaRows: number;
|
|
111
|
+
textareaMaxLength: number | null;
|
|
112
|
+
textareaShowCount: boolean;
|
|
113
|
+
tagMode: 'pill' | 'card';
|
|
114
|
+
cardGridColumns: number;
|
|
115
|
+
cardGridImageRatio: '1:1' | '4:3' | '16:9';
|
|
116
|
+
cardGridShowDescription: boolean;
|
|
117
|
+
avatarListShowSubtitle: boolean;
|
|
118
|
+
avatarListSize: number;
|
|
119
|
+
colorSwatchSize: number;
|
|
120
|
+
colorSwatchShape: 'square' | 'circle';
|
|
121
|
+
colorSwatchColumns: number;
|
|
122
|
+
booleanTrueLabel: MultiLanguageStr;
|
|
123
|
+
booleanFalseLabel: MultiLanguageStr;
|
|
124
|
+
booleanTrueIcon: TintableIconRef;
|
|
125
|
+
booleanFalseIcon: TintableIconRef;
|
|
126
|
+
booleanTrueColor: string;
|
|
127
|
+
booleanFalseColor: string;
|
|
128
|
+
colorSwatchOptions: Color[];
|
|
129
|
+
cssColorSwatchOptions: string[];
|
|
130
|
+
borderRadius: number | null;
|
|
131
|
+
accentColor: string;
|
|
132
|
+
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Color, type MediaLoopMode, MultiLanguageStr, Vector3, VRTalkBaseData } from '../general';
|
|
1
|
+
import { Color, type MediaLoopMode, MultiLanguageStr, TintableIconRef, Vector3, VRTalkBaseData } from '../general';
|
|
2
2
|
import type { XrMonitorComponentType, XrMonitorComponentImageMode, XrMonitorComponentTextAlign, XrMonitorComponentVerticalAlign, XrMonitorComponentProgressBarDirection, XrMonitorComponentVideoObjectFit, XrMonitorComponentButtonIconPosition } from './xr-monitor';
|
|
3
3
|
import { VrSignalTrigger } from '@/model';
|
|
4
4
|
import type { XrAnyAction } from './vr-action';
|
|
@@ -276,8 +276,9 @@ export declare class XrMonitorComponentRuntimeState {
|
|
|
276
276
|
loop: boolean;
|
|
277
277
|
controls: boolean;
|
|
278
278
|
objectFit: XrMonitorComponentVideoObjectFit;
|
|
279
|
-
|
|
279
|
+
icon: TintableIconRef;
|
|
280
280
|
iconPosition: XrMonitorComponentButtonIconPosition;
|
|
281
|
+
bound: any;
|
|
281
282
|
}
|
|
282
283
|
/**
|
|
283
284
|
* 监控面板运行时状态
|
|
@@ -1,13 +1,16 @@
|
|
|
1
1
|
import { Vector2, VRTalkBaseData } from '../../model';
|
|
2
2
|
import type { XrAnyAction } from './vr-action';
|
|
3
3
|
import { MultiLanguageStr } from '../general/multi-language-str';
|
|
4
|
-
|
|
4
|
+
import { TintableIconRef } from '../general/tintable-icon-ref';
|
|
5
|
+
import { XrBoundVariableControl } from './xr-bound-variable-control';
|
|
6
|
+
export declare type XrMonitorComponentType = 'image' | 'text' | 'progress-bar' | 'video' | 'button' | 'variable-control';
|
|
5
7
|
export declare class XrMonitorComponentTypeDefine {
|
|
6
8
|
static readonly IMAGE: XrMonitorComponentType;
|
|
7
9
|
static readonly TEXT: XrMonitorComponentType;
|
|
8
10
|
static readonly PROGRESS_BAR: XrMonitorComponentType;
|
|
9
11
|
static readonly VIDEO: XrMonitorComponentType;
|
|
10
12
|
static readonly BUTTON: XrMonitorComponentType;
|
|
13
|
+
static readonly VARIABLE_CONTROL: XrMonitorComponentType;
|
|
11
14
|
}
|
|
12
15
|
export declare type XrMonitorComponentImageMode = 'contain' | 'cover' | 'fill' | 'scale-down' | 'none';
|
|
13
16
|
export declare class XrMonitorComponentImageModeDefine {
|
|
@@ -125,9 +128,22 @@ export declare class XrMonitorComponentButton extends XrMonitorComponentBase {
|
|
|
125
128
|
textBold: boolean;
|
|
126
129
|
textItalic: boolean;
|
|
127
130
|
textUnderline: boolean;
|
|
128
|
-
|
|
131
|
+
icon: TintableIconRef;
|
|
129
132
|
iconPosition: XrMonitorComponentButtonIconPosition;
|
|
130
133
|
}
|
|
134
|
+
/**
|
|
135
|
+
* 绑定变量控件 —— 把一个交互控件与某个变量双向绑定。
|
|
136
|
+
*
|
|
137
|
+
* 内嵌共享的 XrBoundVariableControl(包含变量绑定 + XrInteractionControlConfig)。
|
|
138
|
+
* 编辑器:复用 vrtalk-bound-variable-control-edit。
|
|
139
|
+
* 运行时:复用 vrtalk-bound-variable-control 渲染。
|
|
140
|
+
*/
|
|
141
|
+
export declare class XrMonitorComponentVariableControl extends XrMonitorComponentBase {
|
|
142
|
+
type: XrMonitorComponentType;
|
|
143
|
+
width: number;
|
|
144
|
+
height: number;
|
|
145
|
+
bound: XrBoundVariableControl;
|
|
146
|
+
}
|
|
131
147
|
export declare class XrMonitor extends VRTalkBaseData {
|
|
132
148
|
name: string;
|
|
133
149
|
remark: string;
|
|
@@ -2,6 +2,7 @@ import { VrComponentData } from '../vr-component/vr-component-data';
|
|
|
2
2
|
import { Vector3 } from '../general/vector';
|
|
3
3
|
import { VrContentCardShowStyle } from '../vr';
|
|
4
4
|
import { MultiLanguageStr } from '../general/multi-language-str';
|
|
5
|
+
import { TintableIconRef } from '../general/tintable-icon-ref';
|
|
5
6
|
export declare type VrComponentTagTextLocation = 'none' | 'top' | 'bottom';
|
|
6
7
|
export declare class VrComponentTagTextLocationDefine {
|
|
7
8
|
static readonly NONE: VrComponentTagTextLocation;
|
|
@@ -19,11 +20,8 @@ export declare class VrComponentTagData extends VrComponentData {
|
|
|
19
20
|
enabledBackground: boolean;
|
|
20
21
|
backgroundColor: import("../general/color").Color;
|
|
21
22
|
enabledCustomIcon: boolean;
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
iconFilename: string;
|
|
25
|
-
enabledIconColorOverride: boolean;
|
|
26
|
-
overrideIconColor: import("../general/color").Color;
|
|
23
|
+
icon: TintableIconRef;
|
|
24
|
+
constructor();
|
|
27
25
|
enabledStem: boolean;
|
|
28
26
|
stemColor: import("../general/color").Color;
|
|
29
27
|
stemLength: number;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* SDK 共享 Vue 组件统一取值 helper:
|
|
3
|
+
* - MultiLanguageStr 对象 → 按当前语言挑出 string
|
|
4
|
+
* - string / null / undefined → 老数据兼容兜底
|
|
5
|
+
*
|
|
6
|
+
* 注意:此文件被 SDK build 时类型检查,并会原样 copy 到 dist/vue/common/pick-str.ts。
|
|
7
|
+
* 因此 *不能* import 'vrtalk-web-sdk'(自引用)。MultiLanguageStr 的解析逻辑直接 inline。
|
|
8
|
+
*
|
|
9
|
+
* 消费方通过 setPickStrLanguageGetter 注入当前语言 getter,避免 SDK 反向依赖业务 store。
|
|
10
|
+
*/
|
|
11
|
+
export declare function setPickStrLanguageGetter(fn: () => string): void;
|
|
12
|
+
export declare function pickStr(v: any): string;
|