@shijiu/jsview-vue 2.2.128 → 2.2.201
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/bin/browser/BrowserApic.vue.mjs +2 -2
- package/bin/browser/BrowserApic2.vue.mjs +2 -2
- package/bin/browser/BrowserApicLib.mjs +8 -2
- package/bin/browser/BrowserJsvFragShaderView.vue.mjs +63 -0
- package/bin/jsview-vue.mjs +1604 -423
- package/bin/types/JsViewEngineWidget/JsvFocus/JsvFocusManager.d.ts +8 -6
- package/bin/types/JsViewEngineWidget/MetroWidget/Dispatcher.d.ts +10 -12
- package/bin/types/JsViewEngineWidget/MetroWidget/ListWidget.vue.d.ts +3 -3
- package/bin/types/JsViewEngineWidget/MetroWidget/MetroWidget.vue.d.ts +3 -3
- package/bin/types/JsViewEngineWidget/MetroWidget/MetroWidgetSetup.d.ts +2 -2
- package/bin/types/JsViewEngineWidget/MetroWidget/RenderItem.d.ts +3 -0
- package/bin/types/JsViewEngineWidget/TemplateParser/ListMetroTemplate.d.ts +1 -0
- package/bin/types/JsViewEngineWidget/TemplateParser/TemplateItemAdder.d.ts +1 -1
- package/bin/types/JsViewEngineWidget/index.d.ts +10 -1
- package/bin/types/JsViewVueTools/ConstSymbol.d.ts +2 -2
- package/bin/types/JsViewVueTools/JsvFederationTools.d.ts +16 -0
- package/bin/types/JsViewVueTools/JsvPerformance.d.ts +5 -0
- package/bin/types/JsViewVueTools/JsvPreDownloader.d.ts +33 -0
- package/bin/types/JsViewVueTools/JsvTextureStore/JsvTextureStore.d.ts +45 -1
- package/bin/types/JsViewVueTools/index.d.ts +19 -11
- package/bin/types/JsViewVueWidget/JsvApic/JsvApic/BrowserApic.vue.d.ts +1 -1
- package/bin/types/JsViewVueWidget/JsvApic/JsvApic/JsvApic.vue.d.ts +1 -1
- package/bin/types/JsViewVueWidget/JsvApic/JsvApic2/BrowserApic2.vue.d.ts +1 -1
- package/bin/types/JsViewVueWidget/JsvApic/JsvApic2/JsvApic2.vue.d.ts +1 -1
- package/bin/types/JsViewVueWidget/JsvApic/JsvBrowserApicLib/Viewer.d.ts +2 -1
- package/bin/types/JsViewVueWidget/JsvClipDiv/JsvClipDiv.vue.d.ts +70 -0
- package/bin/types/JsViewVueWidget/JsvClipDiv/index.d.ts +1 -0
- package/bin/types/JsViewVueWidget/JsvDriftScope/JsvDriftScope.vue.d.ts +104 -0
- package/bin/types/JsViewVueWidget/JsvDriftScope/index.d.ts +1 -0
- package/bin/types/JsViewVueWidget/JsvFragShaderView/BrowserJsvFragShaderView.vue.d.ts +13 -0
- package/bin/types/JsViewVueWidget/JsvFragShaderView/JsvFragShaderView.vue.d.ts +13 -0
- package/bin/types/JsViewVueWidget/JsvFragShaderView/index.d.ts +2 -0
- package/bin/types/JsViewVueWidget/JsvFreeMoveActor/ActorControl.d.ts +43 -17
- package/bin/types/JsViewVueWidget/JsvFreeMoveActor/SetAction.d.ts +5 -5
- package/bin/types/JsViewVueWidget/JsvFreeMoveActor/SetCondition.d.ts +4 -2
- package/bin/types/JsViewVueWidget/JsvFreeMoveActor/SetState.d.ts +7 -7
- package/bin/types/JsViewVueWidget/JsvFreeMoveActor/SyncLinkManager.d.ts +18 -0
- package/bin/types/JsViewVueWidget/JsvFreeMoveActor/index.d.ts +2 -0
- package/bin/types/JsViewVueWidget/JsvNinePatch.vue.d.ts +1 -0
- package/bin/types/JsViewVueWidget/JsvScrollBox/JsvScrollBox.vue.d.ts +61 -1
- package/bin/types/JsViewVueWidget/JsvScrollBox/JsvScrollFollow.vue.d.ts +153 -0
- package/bin/types/JsViewVueWidget/JsvScrollBox/ScrollInnerSymbol.d.ts +4 -0
- package/bin/types/JsViewVueWidget/JsvScrollBox/ScrollSymbol.d.ts +9 -4
- package/bin/types/JsViewVueWidget/JsvScrollBox/index.d.ts +2 -0
- package/bin/types/JsViewVueWidget/index.d.ts +3 -0
- package/package.json +1 -1
- package/tools/config/rollup.config.mjs +1 -0
- package/utils/JsViewEngineWidget/JsvFocus/{JsvFocusManager.js → JsvFocusManager.ts} +12 -12
- package/utils/JsViewEngineWidget/MetroWidget/Dispatcher.ts +20 -0
- package/utils/JsViewEngineWidget/MetroWidget/ListWidget.vue +27 -10
- package/utils/JsViewEngineWidget/MetroWidget/MetroWidget.vue +42 -10
- package/utils/JsViewEngineWidget/MetroWidget/MetroWidgetSetup.js +320 -203
- package/utils/JsViewEngineWidget/MetroWidget/RenderItem.ts +11 -0
- package/utils/JsViewEngineWidget/MetroWidget/TaskManager.ts +8 -0
- package/utils/JsViewEngineWidget/TemplateParser/CommonMetroTemplate.ts +20 -10
- package/utils/JsViewEngineWidget/TemplateParser/ListMetroTemplate.ts +18 -0
- package/utils/JsViewEngineWidget/TemplateParser/TemplateItemAdder.ts +7 -0
- package/utils/JsViewEngineWidget/{index.js → index.ts} +1 -1
- package/utils/JsViewPlugin/JsvAudio/AudioProxy.js +21 -2
- package/utils/JsViewVueTools/ConstSymbol.ts +2 -2
- package/utils/JsViewVueTools/JsvPreDownloader.ts +3 -3
- package/utils/JsViewVueTools/JsvTextureStore/JsvTextureStore.ts +1 -1
- package/utils/JsViewVueTools/index.js +19 -19
- package/utils/JsViewVueWidget/JsvApic/JsvApic/BrowserApic.vue +2 -2
- package/utils/JsViewVueWidget/JsvApic/JsvApic/JsvApic.vue +3 -3
- package/utils/JsViewVueWidget/JsvApic/JsvApic2/BrowserApic2.vue +2 -2
- package/utils/JsViewVueWidget/JsvApic/JsvApic2/JsvApic2.vue +3 -3
- package/utils/JsViewVueWidget/JsvApic/JsvBrowserApicLib/Viewer.js +8 -3
- package/utils/JsViewVueWidget/JsvClipDiv/JsvClipDiv.vue +42 -0
- package/utils/JsViewVueWidget/JsvClipDiv/index.ts +1 -0
- package/utils/JsViewVueWidget/JsvConnectLine/JsvConnectLine.vue +5 -1
- package/utils/JsViewVueWidget/JsvDriftScope/JsvDriftScope.vue +82 -0
- package/utils/JsViewVueWidget/JsvDriftScope/index.ts +1 -0
- package/utils/JsViewVueWidget/JsvFragShaderView/BrowserJsvFragShaderView.vue +48 -0
- package/utils/JsViewVueWidget/JsvFragShaderView/JsvFragShaderView.vue +145 -0
- package/utils/JsViewVueWidget/JsvFragShaderView/index.js +18 -0
- package/utils/JsViewVueWidget/JsvFreeMoveActor/ActorControl.ts +142 -63
- package/utils/JsViewVueWidget/JsvFreeMoveActor/SetAction.ts +15 -6
- package/utils/JsViewVueWidget/JsvFreeMoveActor/SetCondition.ts +19 -7
- package/utils/JsViewVueWidget/JsvFreeMoveActor/SetState.ts +15 -11
- package/utils/JsViewVueWidget/JsvFreeMoveActor/SyncLinkManager.ts +120 -0
- package/utils/JsViewVueWidget/JsvFreeMoveActor/index.js +5 -1
- package/utils/JsViewVueWidget/JsvNinePatch.vue +13 -1
- package/utils/JsViewVueWidget/JsvScrollBox/JsvScrollBox.vue +257 -48
- package/utils/JsViewVueWidget/JsvScrollBox/JsvScrollFollow.vue +468 -0
- package/utils/JsViewVueWidget/JsvScrollBox/ScrollInnerSymbol.ts +9 -0
- package/utils/JsViewVueWidget/JsvScrollBox/ScrollSymbol.ts +13 -4
- package/utils/JsViewVueWidget/JsvScrollBox/index.ts +3 -0
- package/utils/JsViewVueWidget/index.js +3 -0
- package/utils/JsViewEngineWidget/MetroWidget/Dispatcher.js +0 -19
- package/utils/JsViewVueWidget/JsvScrollBox/index.js +0 -2
|
@@ -1,33 +1,27 @@
|
|
|
1
1
|
import ConditionPackBuilder from "./SetCondition";
|
|
2
2
|
import ActionPackBuilder from "./SetAction";
|
|
3
3
|
import StatePackBuilder from "./SetState";
|
|
4
|
+
import CallbackManager from "./CallbackManager";
|
|
4
5
|
import { NexusNode } from "./NexusNode";
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
private _SelfNexusRecv;
|
|
10
|
-
private _SizeMode;
|
|
6
|
+
interface CmdListCreator {
|
|
7
|
+
(builders: BuilderFactory): Array<Object>;
|
|
8
|
+
}
|
|
9
|
+
declare class BuilderFactory {
|
|
11
10
|
private _SharedQuickConditionPackBuilder;
|
|
12
11
|
private _SharedQuickActionPackBuilder;
|
|
13
12
|
private _StatePackBuilder;
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
* run 执行编排好的intent集合
|
|
19
|
-
*
|
|
20
|
-
* @param {Array} cmdPackList 内容来自 Condition(), State(), Action() 这些工厂类创建的Command pack
|
|
21
|
-
*/
|
|
22
|
-
run(cmdPackList: Array<Object>): void;
|
|
23
|
-
_WrappedRun(cmdPackList: Array<Object>): void;
|
|
13
|
+
private _Callbacks;
|
|
14
|
+
private _SelfNexusRecv;
|
|
15
|
+
private _OwnerControl;
|
|
16
|
+
constructor(owner: ActorControl, callbackManager: CallbackManager, selfNexusRecv: NexusNode);
|
|
24
17
|
/**
|
|
25
18
|
* Condition
|
|
26
19
|
* 获取创建 ConditionPack 的工厂对象
|
|
27
20
|
* ConditionPack对应支持 .then(cmdPackList), 可传入同 Run 的处理队列
|
|
28
21
|
* 可用方法见 ./SetCondition.js
|
|
29
22
|
* @param {int} group 可选参数,默认为0, 有效值为0~3, 对应默认组, 1组, 2组, 3组, 便于remove时,按组进行清理
|
|
30
|
-
* @param {boolean} multiTimes 可选参数,默认为false, 是否要多次执行,
|
|
23
|
+
* @param {boolean} multiTimes 可选参数,默认为false, 是否要多次执行,
|
|
24
|
+
* 若为单次, 当group未设定时自动作废,当group设定时,不作废但改为deactive状态
|
|
31
25
|
* @param {string} specName 可选参数,默认null, 命名condition, 用于指定名字进行active/deactive动作的场景
|
|
32
26
|
* @param {boolean} shoudRenderBreak 可选参数,默认false, 关联的回调是否会发起RenderBreak
|
|
33
27
|
* @return {ConditionPackBuilder} ConditionPack 的工厂对象
|
|
@@ -57,8 +51,40 @@ declare class ActorControl {
|
|
|
57
51
|
* @return {StatePackBuilder} StatePack 的工厂对象
|
|
58
52
|
*/
|
|
59
53
|
state(): StatePackBuilder;
|
|
54
|
+
}
|
|
55
|
+
declare class ActorControl {
|
|
56
|
+
private _BindView;
|
|
57
|
+
private _BindAnim;
|
|
58
|
+
private _Callbacks;
|
|
59
|
+
private _SelfNexusRecv;
|
|
60
|
+
private _SizeMode;
|
|
61
|
+
private _CondCycleStartList;
|
|
62
|
+
private _CondCycleEndList;
|
|
63
|
+
private _Builders;
|
|
64
|
+
constructor();
|
|
65
|
+
asSizeMode(): void;
|
|
66
|
+
bindForgeView(bindView: any, instantActive: boolean): void;
|
|
67
|
+
/**
|
|
68
|
+
* run 执行编排好的intent集合
|
|
69
|
+
*
|
|
70
|
+
* @param {CmdListCreator} commandsCreator
|
|
71
|
+
* 命令指令队列创建回调
|
|
72
|
+
* 此回调返回值为一个数组,数组内容内容来自 Condition(), State(), Action()
|
|
73
|
+
* 这些工厂类创建的Command pack
|
|
74
|
+
*/
|
|
75
|
+
run(commandsCreator: CmdListCreator | undefined): void;
|
|
76
|
+
_WrappedRun(cmdPackList: Array<Object>): void;
|
|
60
77
|
getBindedAnim(): any;
|
|
61
78
|
getBindedView(): any;
|
|
79
|
+
/**
|
|
80
|
+
* addCondCycleListener
|
|
81
|
+
* 追加 cond cycle listener,可以根据start和end来进行callback时序排序
|
|
82
|
+
*
|
|
83
|
+
* @param {Function} startCycleCallback 开始执行一帧的js回调(condition的callback)
|
|
84
|
+
* @param {Function} endCycleCallback 执行一帧的js回调完毕
|
|
85
|
+
*/
|
|
86
|
+
addCondCycleListener(startCycleCallback: Function, endCycleCallback: Function): void;
|
|
87
|
+
removeCondCycleListener(startCycleCallback: Function, endCycleCallback: Function): void;
|
|
62
88
|
_OnEchoEvent(retJson: string): void;
|
|
63
89
|
_EnsureAnim(): void;
|
|
64
90
|
}
|
|
@@ -54,16 +54,16 @@ declare class ActorPackBuilder {
|
|
|
54
54
|
* 只能放在 movementSync 的then中,用于将Sync同步信息按比例转化成
|
|
55
55
|
* (注意): 如果触发链条上有自己发出的信息,则将不再产生动作,规避循环触发
|
|
56
56
|
*
|
|
57
|
-
* @param {int}
|
|
58
|
-
* @param {int}
|
|
59
|
-
* @param {int}
|
|
60
|
-
* @param {int}
|
|
57
|
+
* @param {int} horizontalStart 横向运动识别区域的0%对应位置, 可以为负
|
|
58
|
+
* @param {int} horizontalEnd 横向运动识别区域的100%对应位置, 可以为负,可以小于start
|
|
59
|
+
* @param {int} verticalStart 纵向运动识别区域的0%对应位置, 可以为负
|
|
60
|
+
* @param {int} verticalEnd 纵向运动识别区域的100%对应位置, 可以为负,可以小于end
|
|
61
61
|
* @param {int} xyEnable x,y是否都触发, 0b01对应x, 0b10对应y, 可以或运算在一起
|
|
62
62
|
* @param {int} syncType 换算公式:
|
|
63
63
|
* 1: 正比公式:selfPercent = givenPercent
|
|
64
64
|
* 2: 反比公式:selfPercent = (1 - givenPercent)
|
|
65
65
|
*/
|
|
66
|
-
ackMovementSync(
|
|
66
|
+
ackMovementSync(horizontalStart: number, horizontalEnd: number, verticalStart: number, verticalEnd: number, xyEnable: number, syncType: number): any;
|
|
67
67
|
_BuildAccelOnPole(builderThis: ActorPackBuilder, cmdList: Array<Object>, nexusRecv: NexusNode | null, onRevertX: Function | null, onRevertY: Function | null): void;
|
|
68
68
|
_BasicPreProcess(procName: string): boolean;
|
|
69
69
|
private _TeleportToInner;
|
|
@@ -7,7 +7,8 @@ declare class ConditionPackBuilder {
|
|
|
7
7
|
private _CommonInfo;
|
|
8
8
|
private _CommonInfoValid;
|
|
9
9
|
private _ContorlSlefNexus;
|
|
10
|
-
|
|
10
|
+
private _BuildersFactory;
|
|
11
|
+
constructor(callbackManager: CallbackManager, selfNexus: NexusNode, buildersFactory: any);
|
|
11
12
|
isInUsing(): boolean;
|
|
12
13
|
updateCommandInfo(group: number, multiTimes: boolean, specName: string | null, shoudRenderBreak: boolean): void;
|
|
13
14
|
/**
|
|
@@ -47,7 +48,7 @@ declare class ConditionPackBuilder {
|
|
|
47
48
|
* @param {NexusNode} nexusRecv 由 FreeMoveFunc.newNexus() 创建, 作为通讯句柄,类似电话号,被fireNexusEvent调用
|
|
48
49
|
* @param {number} detailEventType 监听的事件类型, 类比与分机号,和fireNexusEvent发出的id约定, 自定义内容要求1000以上
|
|
49
50
|
*/
|
|
50
|
-
onNexusEvent(nexusRecv: NexusNode, detailEventType: number):
|
|
51
|
+
onNexusEvent(nexusRecv: NexusNode, detailEventType: number): any;
|
|
51
52
|
/**
|
|
52
53
|
* OnHitBlock
|
|
53
54
|
* 监听Actor关联的LayoutView与blocker碰撞的状态
|
|
@@ -59,6 +60,7 @@ declare class ConditionPackBuilder {
|
|
|
59
60
|
/**
|
|
60
61
|
* onNextTick
|
|
61
62
|
* 用于对一些Condition激活进行延迟,例如teleportTo处理后延迟激活 OnHitBlock 动作,规避teleportTo处理直接触发OnHitBlocker
|
|
63
|
+
* 特别场景: onNextTick(0) 可用于充当前帧命令执行完毕的回调,相当于为命令执行完毕做一个callback
|
|
62
64
|
*
|
|
63
65
|
*/
|
|
64
66
|
onNextTick(tickGap?: number): any;
|
|
@@ -43,20 +43,20 @@ declare class StatePackBuilder {
|
|
|
43
43
|
*
|
|
44
44
|
* 发出进度同步信号(可以一个FreeMove绑定多个信号发生器,但目前场景估计只需要一个发生器即可)
|
|
45
45
|
* 计算当前freeMove的postion和运动识别区域的比值
|
|
46
|
-
* xPercent = (xPos -
|
|
47
|
-
* yPercent = (yPos -
|
|
46
|
+
* xPercent = (xPos - horizontalStart) / (horizontalEnd - horizontalStart)
|
|
47
|
+
* yPercent = (yPos - verticalStart) / (verticalEnd - verticalStart)
|
|
48
48
|
* x和y可以为负数,也可能>100%
|
|
49
49
|
*
|
|
50
50
|
* 当多次调用时,nexusRef相同时,则为更新运动识别区域,nexusRef不同时则为新建信号发起器
|
|
51
51
|
*
|
|
52
52
|
* @param {NexusNode} nexusRef 绑定的nexus句柄,接受者用这个句柄来进行监听
|
|
53
|
-
* @param {int}
|
|
54
|
-
* @param {int}
|
|
55
|
-
* @param {int}
|
|
56
|
-
* @param {int}
|
|
53
|
+
* @param {int} horizontalStart 横向运动识别区域的0%对应位置, 可以为负
|
|
54
|
+
* @param {int} horizontalEnd 横向运动识别区域的100%对应位置, 可以为负,可以小于start
|
|
55
|
+
* @param {int} verticalStart 纵向运动识别区域的0%对应位置, 可以为负
|
|
56
|
+
* @param {int} verticalEnd 纵向运动识别区域的100%对应位置, 可以为负,可以小于end
|
|
57
57
|
* @param {int} xyEnable x,y是否都触发, 0b01对应x, 0b10对应y, 可以或运算在一起
|
|
58
58
|
*/
|
|
59
|
-
startMovementSync(nexusRef: NexusNode,
|
|
59
|
+
startMovementSync(nexusRef: NexusNode, horizontalStart: number, horizontalEnd: number, verticalStart: number, verticalEnd: number, xyEnable: number): any;
|
|
60
60
|
stopMovementSync(): any;
|
|
61
61
|
}
|
|
62
62
|
export default StatePackBuilder;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { NexusNode } from "./NexusNode";
|
|
2
|
+
declare class SyncLinkSource {
|
|
3
|
+
nexusNode: NexusNode;
|
|
4
|
+
linkName: String;
|
|
5
|
+
constructor(name: string, node: NexusNode);
|
|
6
|
+
}
|
|
7
|
+
declare class SyncLinkManager {
|
|
8
|
+
private pendingPromiseList;
|
|
9
|
+
private syncSourceMap;
|
|
10
|
+
constructor();
|
|
11
|
+
SourceOnMounted(syncSource: SyncLinkSource | null): void;
|
|
12
|
+
SourceOnUnmounted(linkName: String): void;
|
|
13
|
+
WaitSourceMounted(name: String): Promise<void>;
|
|
14
|
+
UnListen(waitPromise: Promise<void>): void;
|
|
15
|
+
GetSourceNexusNode(linkName: String): NexusNode | null;
|
|
16
|
+
}
|
|
17
|
+
declare function GetSyncLinkManager(): SyncLinkManager;
|
|
18
|
+
export { GetSyncLinkManager, SyncLinkSource };
|
|
@@ -7,6 +7,8 @@ export namespace FreeMoveDef {
|
|
|
7
7
|
export namespace FreeMoveFunc {
|
|
8
8
|
export { newNexus };
|
|
9
9
|
export { ActControlDebug };
|
|
10
|
+
export { GetSyncLinkManager };
|
|
11
|
+
export { SyncLinkSource };
|
|
10
12
|
}
|
|
11
13
|
import { newNexus } from "./NexusNode";
|
|
12
14
|
export { JsvFreeMoveActor, JsvFreeMoveActor as JsvFreeMoveDiv, JsvEnvBlocker };
|
|
@@ -12,6 +12,7 @@ declare const _default: import("vue").DefineComponent<{}, {
|
|
|
12
12
|
readonly borderOutset?: number | undefined;
|
|
13
13
|
readonly animTime?: number | undefined;
|
|
14
14
|
readonly imageBlendType?: string | undefined;
|
|
15
|
+
readonly onDivRef?: Function | undefined;
|
|
15
16
|
readonly animation?: string | undefined;
|
|
16
17
|
readonly onTransitionEnd?: Function | undefined;
|
|
17
18
|
};
|
|
@@ -6,6 +6,9 @@ declare const _default: {
|
|
|
6
6
|
mode: symbol;
|
|
7
7
|
initPercent: number;
|
|
8
8
|
enableFling: boolean;
|
|
9
|
+
linkName: string;
|
|
10
|
+
syncWith: string;
|
|
11
|
+
syncType: symbol;
|
|
9
12
|
}> & Omit<Readonly<import("vue").ExtractPropTypes<{
|
|
10
13
|
style: {
|
|
11
14
|
type: ObjectConstructor;
|
|
@@ -31,7 +34,19 @@ declare const _default: {
|
|
|
31
34
|
type: BooleanConstructor;
|
|
32
35
|
default: boolean;
|
|
33
36
|
};
|
|
34
|
-
|
|
37
|
+
linkName: {
|
|
38
|
+
type: StringConstructor;
|
|
39
|
+
default: null;
|
|
40
|
+
};
|
|
41
|
+
syncWith: {
|
|
42
|
+
type: StringConstructor;
|
|
43
|
+
default: null;
|
|
44
|
+
};
|
|
45
|
+
syncType: {
|
|
46
|
+
type: SymbolConstructor;
|
|
47
|
+
default: symbol;
|
|
48
|
+
};
|
|
49
|
+
}>> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, "mode" | "initPercent" | "enableFling" | "linkName" | "syncWith" | "syncType">;
|
|
35
50
|
$attrs: {
|
|
36
51
|
[x: string]: unknown;
|
|
37
52
|
};
|
|
@@ -70,13 +85,29 @@ declare const _default: {
|
|
|
70
85
|
type: BooleanConstructor;
|
|
71
86
|
default: boolean;
|
|
72
87
|
};
|
|
88
|
+
linkName: {
|
|
89
|
+
type: StringConstructor;
|
|
90
|
+
default: null;
|
|
91
|
+
};
|
|
92
|
+
syncWith: {
|
|
93
|
+
type: StringConstructor;
|
|
94
|
+
default: null;
|
|
95
|
+
};
|
|
96
|
+
syncType: {
|
|
97
|
+
type: SymbolConstructor;
|
|
98
|
+
default: symbol;
|
|
99
|
+
};
|
|
73
100
|
}>>, {
|
|
74
101
|
setSensor: (callback: Function, sensitivity: number) => void;
|
|
75
102
|
updatePercent: (percent: number) => void;
|
|
103
|
+
currentPercent: () => number;
|
|
76
104
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, {
|
|
77
105
|
mode: symbol;
|
|
78
106
|
initPercent: number;
|
|
79
107
|
enableFling: boolean;
|
|
108
|
+
linkName: string;
|
|
109
|
+
syncWith: string;
|
|
110
|
+
syncType: symbol;
|
|
80
111
|
}, {}, string> & {
|
|
81
112
|
beforeCreate?: ((() => void) | (() => void)[]) | undefined;
|
|
82
113
|
created?: ((() => void) | (() => void)[]) | undefined;
|
|
@@ -122,9 +153,22 @@ declare const _default: {
|
|
|
122
153
|
type: BooleanConstructor;
|
|
123
154
|
default: boolean;
|
|
124
155
|
};
|
|
156
|
+
linkName: {
|
|
157
|
+
type: StringConstructor;
|
|
158
|
+
default: null;
|
|
159
|
+
};
|
|
160
|
+
syncWith: {
|
|
161
|
+
type: StringConstructor;
|
|
162
|
+
default: null;
|
|
163
|
+
};
|
|
164
|
+
syncType: {
|
|
165
|
+
type: SymbolConstructor;
|
|
166
|
+
default: symbol;
|
|
167
|
+
};
|
|
125
168
|
}>> & import("vue").ShallowUnwrapRef<{
|
|
126
169
|
setSensor: (callback: Function, sensitivity: number) => void;
|
|
127
170
|
updatePercent: (percent: number) => void;
|
|
171
|
+
currentPercent: () => number;
|
|
128
172
|
}> & {} & import("vue").ComponentCustomProperties & {};
|
|
129
173
|
__isFragment?: undefined;
|
|
130
174
|
__isTeleport?: undefined;
|
|
@@ -154,13 +198,29 @@ declare const _default: {
|
|
|
154
198
|
type: BooleanConstructor;
|
|
155
199
|
default: boolean;
|
|
156
200
|
};
|
|
201
|
+
linkName: {
|
|
202
|
+
type: StringConstructor;
|
|
203
|
+
default: null;
|
|
204
|
+
};
|
|
205
|
+
syncWith: {
|
|
206
|
+
type: StringConstructor;
|
|
207
|
+
default: null;
|
|
208
|
+
};
|
|
209
|
+
syncType: {
|
|
210
|
+
type: SymbolConstructor;
|
|
211
|
+
default: symbol;
|
|
212
|
+
};
|
|
157
213
|
}>>, {
|
|
158
214
|
setSensor: (callback: Function, sensitivity: number) => void;
|
|
159
215
|
updatePercent: (percent: number) => void;
|
|
216
|
+
currentPercent: () => number;
|
|
160
217
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, {
|
|
161
218
|
mode: symbol;
|
|
162
219
|
initPercent: number;
|
|
163
220
|
enableFling: boolean;
|
|
221
|
+
linkName: string;
|
|
222
|
+
syncWith: string;
|
|
223
|
+
syncType: symbol;
|
|
164
224
|
}, {}, string> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & (new () => {
|
|
165
225
|
$slots: {
|
|
166
226
|
FixedBox: (_: {
|
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
new (...args: any[]): {
|
|
3
|
+
$: import("vue").ComponentInternalInstance;
|
|
4
|
+
$data: {};
|
|
5
|
+
$props: Partial<{
|
|
6
|
+
syncType: symbol;
|
|
7
|
+
varLeft: number | object;
|
|
8
|
+
varTop: number | object;
|
|
9
|
+
varWidth: number | object;
|
|
10
|
+
varHeight: number | object;
|
|
11
|
+
}> & Omit<Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
|
|
12
|
+
proxyType: symbol;
|
|
13
|
+
proxyProps?: Object | undefined;
|
|
14
|
+
varLeft?: number | object | undefined;
|
|
15
|
+
varTop?: number | object | undefined;
|
|
16
|
+
varWidth?: number | object | undefined;
|
|
17
|
+
varHeight?: number | object | undefined;
|
|
18
|
+
syncWith: string;
|
|
19
|
+
syncType?: symbol | undefined;
|
|
20
|
+
}>, {
|
|
21
|
+
varMode: symbol;
|
|
22
|
+
varLeft: number;
|
|
23
|
+
varTop: number;
|
|
24
|
+
varWidth: number;
|
|
25
|
+
varHeight: number;
|
|
26
|
+
syncType: symbol;
|
|
27
|
+
}>>> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, "syncType" | "varLeft" | "varTop" | "varWidth" | "varHeight">;
|
|
28
|
+
$attrs: {
|
|
29
|
+
[x: string]: unknown;
|
|
30
|
+
};
|
|
31
|
+
$refs: {
|
|
32
|
+
[x: string]: unknown;
|
|
33
|
+
};
|
|
34
|
+
$slots: Readonly<{
|
|
35
|
+
[name: string]: import("vue").Slot | undefined;
|
|
36
|
+
}>;
|
|
37
|
+
$root: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}, {}, string>, {}> | null;
|
|
38
|
+
$parent: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}, {}, string>, {}> | null;
|
|
39
|
+
$emit: (event: string, ...args: any[]) => void;
|
|
40
|
+
$el: any;
|
|
41
|
+
$options: import("vue").ComponentOptionsBase<Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
|
|
42
|
+
proxyType: symbol;
|
|
43
|
+
proxyProps?: Object | undefined;
|
|
44
|
+
varLeft?: number | object | undefined;
|
|
45
|
+
varTop?: number | object | undefined;
|
|
46
|
+
varWidth?: number | object | undefined;
|
|
47
|
+
varHeight?: number | object | undefined;
|
|
48
|
+
syncWith: string;
|
|
49
|
+
syncType?: symbol | undefined;
|
|
50
|
+
}>, {
|
|
51
|
+
varMode: symbol;
|
|
52
|
+
varLeft: number;
|
|
53
|
+
varTop: number;
|
|
54
|
+
varWidth: number;
|
|
55
|
+
varHeight: number;
|
|
56
|
+
syncType: symbol;
|
|
57
|
+
}>>>, {
|
|
58
|
+
setSensor: (callback: Function, sensitivity: number) => void;
|
|
59
|
+
currentPercent: () => number;
|
|
60
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, {
|
|
61
|
+
syncType: symbol;
|
|
62
|
+
varLeft: number | object;
|
|
63
|
+
varTop: number | object;
|
|
64
|
+
varWidth: number | object;
|
|
65
|
+
varHeight: number | object;
|
|
66
|
+
}, {}, string> & {
|
|
67
|
+
beforeCreate?: ((() => void) | (() => void)[]) | undefined;
|
|
68
|
+
created?: ((() => void) | (() => void)[]) | undefined;
|
|
69
|
+
beforeMount?: ((() => void) | (() => void)[]) | undefined;
|
|
70
|
+
mounted?: ((() => void) | (() => void)[]) | undefined;
|
|
71
|
+
beforeUpdate?: ((() => void) | (() => void)[]) | undefined;
|
|
72
|
+
updated?: ((() => void) | (() => void)[]) | undefined;
|
|
73
|
+
activated?: ((() => void) | (() => void)[]) | undefined;
|
|
74
|
+
deactivated?: ((() => void) | (() => void)[]) | undefined;
|
|
75
|
+
beforeDestroy?: ((() => void) | (() => void)[]) | undefined;
|
|
76
|
+
beforeUnmount?: ((() => void) | (() => void)[]) | undefined;
|
|
77
|
+
destroyed?: ((() => void) | (() => void)[]) | undefined;
|
|
78
|
+
unmounted?: ((() => void) | (() => void)[]) | undefined;
|
|
79
|
+
renderTracked?: (((e: import("vue").DebuggerEvent) => void) | ((e: import("vue").DebuggerEvent) => void)[]) | undefined;
|
|
80
|
+
renderTriggered?: (((e: import("vue").DebuggerEvent) => void) | ((e: import("vue").DebuggerEvent) => void)[]) | undefined;
|
|
81
|
+
errorCaptured?: (((err: unknown, instance: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}, {}, string>, {}> | null, info: string) => boolean | void) | ((err: unknown, instance: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}, {}, string>, {}> | null, info: string) => boolean | void)[]) | undefined;
|
|
82
|
+
};
|
|
83
|
+
$forceUpdate: () => void;
|
|
84
|
+
$nextTick: typeof import("vue").nextTick;
|
|
85
|
+
$watch<T extends string | ((...args: any) => any)>(source: T, cb: T extends (...args: any) => infer R ? (args_0: R, args_1: R) => any : (...args: any) => any, options?: import("vue").WatchOptions<boolean> | undefined): import("vue").WatchStopHandle;
|
|
86
|
+
} & Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
|
|
87
|
+
proxyType: symbol;
|
|
88
|
+
proxyProps?: Object | undefined;
|
|
89
|
+
varLeft?: number | object | undefined;
|
|
90
|
+
varTop?: number | object | undefined;
|
|
91
|
+
varWidth?: number | object | undefined;
|
|
92
|
+
varHeight?: number | object | undefined;
|
|
93
|
+
syncWith: string;
|
|
94
|
+
syncType?: symbol | undefined;
|
|
95
|
+
}>, {
|
|
96
|
+
varMode: symbol;
|
|
97
|
+
varLeft: number;
|
|
98
|
+
varTop: number;
|
|
99
|
+
varWidth: number;
|
|
100
|
+
varHeight: number;
|
|
101
|
+
syncType: symbol;
|
|
102
|
+
}>>> & import("vue").ShallowUnwrapRef<{
|
|
103
|
+
setSensor: (callback: Function, sensitivity: number) => void;
|
|
104
|
+
currentPercent: () => number;
|
|
105
|
+
}> & {} & import("vue").ComponentCustomProperties & {};
|
|
106
|
+
__isFragment?: undefined;
|
|
107
|
+
__isTeleport?: undefined;
|
|
108
|
+
__isSuspense?: undefined;
|
|
109
|
+
} & import("vue").ComponentOptionsBase<Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
|
|
110
|
+
proxyType: symbol;
|
|
111
|
+
proxyProps?: Object | undefined;
|
|
112
|
+
varLeft?: number | object | undefined;
|
|
113
|
+
varTop?: number | object | undefined;
|
|
114
|
+
varWidth?: number | object | undefined;
|
|
115
|
+
varHeight?: number | object | undefined;
|
|
116
|
+
syncWith: string;
|
|
117
|
+
syncType?: symbol | undefined;
|
|
118
|
+
}>, {
|
|
119
|
+
varMode: symbol;
|
|
120
|
+
varLeft: number;
|
|
121
|
+
varTop: number;
|
|
122
|
+
varWidth: number;
|
|
123
|
+
varHeight: number;
|
|
124
|
+
syncType: symbol;
|
|
125
|
+
}>>>, {
|
|
126
|
+
setSensor: (callback: Function, sensitivity: number) => void;
|
|
127
|
+
currentPercent: () => number;
|
|
128
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, {
|
|
129
|
+
syncType: symbol;
|
|
130
|
+
varLeft: number | object;
|
|
131
|
+
varTop: number | object;
|
|
132
|
+
varWidth: number | object;
|
|
133
|
+
varHeight: number | object;
|
|
134
|
+
}, {}, string> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & (new () => {
|
|
135
|
+
$slots: {
|
|
136
|
+
default: (_: {}) => any;
|
|
137
|
+
};
|
|
138
|
+
});
|
|
139
|
+
export default _default;
|
|
140
|
+
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
|
|
141
|
+
type __VLS_TypePropsToRuntimeProps<T> = {
|
|
142
|
+
[K in keyof T]-?: {} extends Pick<T, K> ? {
|
|
143
|
+
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
|
|
144
|
+
} : {
|
|
145
|
+
type: import('vue').PropType<T[K]>;
|
|
146
|
+
required: true;
|
|
147
|
+
};
|
|
148
|
+
};
|
|
149
|
+
type __VLS_WithDefaults<P, D> = {
|
|
150
|
+
[K in keyof Pick<P, keyof P>]: K extends keyof D ? P[K] & {
|
|
151
|
+
default: D[K];
|
|
152
|
+
} : P[K];
|
|
153
|
+
};
|
|
@@ -1,7 +1,12 @@
|
|
|
1
|
-
declare const
|
|
1
|
+
declare const ScrollBoxStyle: {
|
|
2
2
|
DrawerMode: symbol;
|
|
3
3
|
PinMode: symbol;
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
SyncForward: symbol;
|
|
5
|
+
SyncReverse: symbol;
|
|
6
|
+
Position: symbol;
|
|
7
|
+
Size: symbol;
|
|
8
|
+
SizeDiv: symbol;
|
|
9
|
+
SizeClip: symbol;
|
|
10
|
+
JsvNinePatch: symbol;
|
|
6
11
|
};
|
|
7
|
-
export {
|
|
12
|
+
export { ScrollBoxStyle };
|
|
@@ -2,6 +2,8 @@ export * from "./JsvFreeMoveActor";
|
|
|
2
2
|
export * from "./JsvFlexCell";
|
|
3
3
|
export * from "./JsvSpriteAnim";
|
|
4
4
|
export * from "./JsvScrollBox";
|
|
5
|
+
export * from "./JsvClipDiv";
|
|
6
|
+
export * from "./JsvDriftScope";
|
|
5
7
|
export { default as JsvApic } from "./JsvApic/JsvApic";
|
|
6
8
|
export { default as JsvApic2 } from "./JsvApic/JsvApic2";
|
|
7
9
|
export { default as JsvQrcode } from "./JsvQrcode";
|
|
@@ -27,6 +29,7 @@ export { default as JsvConnectLine } from "./JsvConnectLine";
|
|
|
27
29
|
export { default as JsvProgressBar } from "./JsvProgressBar.vue";
|
|
28
30
|
export { default as JsvEnableRenderBreak } from "./JsvEnableRenderBreak.vue";
|
|
29
31
|
export { JsvMindMap } from "./JsvMindMap";
|
|
32
|
+
export { default as JsvFragShaderView } from "./JsvFragShaderView";
|
|
30
33
|
import JsvNativeSharedDiv from "./JsvNativeSharedDiv.vue";
|
|
31
34
|
export { JsvNativeSharedDiv as JsvTransparentDiv, JsvNativeSharedDiv };
|
|
32
35
|
export { default as JsvActorMove, JsvActorMoveControl } from "./JsvActorMove";
|
package/package.json
CHANGED
|
@@ -5,15 +5,15 @@ import {
|
|
|
5
5
|
JsvFocusHubApi,
|
|
6
6
|
ROOT_HUB_PROVIDE_NAME,
|
|
7
7
|
HUB_NS_PROVIDE_NAME
|
|
8
|
-
} from "./JsvFocusHub
|
|
8
|
+
} from "./JsvFocusHub";
|
|
9
9
|
import { inject } from "vue";
|
|
10
10
|
|
|
11
|
-
const useFocusHub = (withNameSpace) => {
|
|
11
|
+
const useFocusHub = (withNameSpace: any) => {
|
|
12
12
|
if (withNameSpace) {
|
|
13
|
-
let nameSpace = inject(HUB_NS_PROVIDE_NAME); // nameSpace变更由JsvFocusBlock设置namespace时变更
|
|
13
|
+
let nameSpace: any = inject(HUB_NS_PROVIDE_NAME); // nameSpace变更由JsvFocusBlock设置namespace时变更
|
|
14
14
|
if (nameSpace && nameSpace.length > 0) {
|
|
15
15
|
// 使用带有namespace的hub
|
|
16
|
-
return new JsvFocusHubApi((inject(ROOT_HUB_PROVIDE_NAME)).getOrigin().wrapWithNameSpace(nameSpace));
|
|
16
|
+
return new JsvFocusHubApi((inject(ROOT_HUB_PROVIDE_NAME) as any).getOrigin().wrapWithNameSpace(nameSpace));
|
|
17
17
|
}
|
|
18
18
|
}
|
|
19
19
|
|
|
@@ -22,9 +22,13 @@ const useFocusHub = (withNameSpace) => {
|
|
|
22
22
|
};
|
|
23
23
|
|
|
24
24
|
export class JsvFocusManager {
|
|
25
|
+
// #aliasMap = {}
|
|
26
|
+
private $_appMount: any = undefined;
|
|
27
|
+
private $_topFDiv: any = undefined;
|
|
28
|
+
|
|
25
29
|
constructor() { }
|
|
26
30
|
|
|
27
|
-
install(app, ...options) {
|
|
31
|
+
install(app: any, ...options: any) {
|
|
28
32
|
console.log("JsvFocusManager install");
|
|
29
33
|
if (typeof options[0] !== "string") {
|
|
30
34
|
throw new Error(
|
|
@@ -91,15 +95,15 @@ export class JsvFocusManager {
|
|
|
91
95
|
// focusNode.requestFocus(exact);
|
|
92
96
|
// }
|
|
93
97
|
|
|
94
|
-
$_hookMount(app, rootNodeId) {
|
|
98
|
+
$_hookMount(app: any, rootNodeId: any) {
|
|
95
99
|
rootNodeId = rootNodeId.replace("#", "");
|
|
96
|
-
this.$_topFDiv = document.jsvInitFDivRoot(rootNodeId);
|
|
100
|
+
this.$_topFDiv = (document as any).jsvInitFDivRoot(rootNodeId);
|
|
97
101
|
this.$_appMount = app.mount.bind(app);
|
|
98
102
|
|
|
99
103
|
return this.$_doAppMount.bind(this);
|
|
100
104
|
}
|
|
101
105
|
|
|
102
|
-
$_doAppMount(rootContainer) {
|
|
106
|
+
$_doAppMount(rootContainer: any) {
|
|
103
107
|
// 调用app原有的mount函数
|
|
104
108
|
const rootComponent = this.$_appMount(rootContainer);
|
|
105
109
|
// console.log('FocusManager: do mount')
|
|
@@ -109,10 +113,6 @@ export class JsvFocusManager {
|
|
|
109
113
|
|
|
110
114
|
return rootComponent;
|
|
111
115
|
}
|
|
112
|
-
|
|
113
|
-
// #aliasMap = {}
|
|
114
|
-
$_appMount = undefined;
|
|
115
|
-
$_topFDiv = undefined;
|
|
116
116
|
}
|
|
117
117
|
|
|
118
118
|
function jsvCreateFocusManager() {
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* @Author: ChenChanghua
|
|
3
|
+
* @Date: 2021-09-22 16:50:09
|
|
4
|
+
* @LastEditors: ChenChanghua
|
|
5
|
+
* @LastEditTime: 2022-01-26 10:17:47
|
|
6
|
+
* @Description: file content
|
|
7
|
+
*/
|
|
8
|
+
import { BaseDispatcher } from "../WidgetCommon";
|
|
9
|
+
|
|
10
|
+
class Dispatcher extends BaseDispatcher {
|
|
11
|
+
public static Type = {
|
|
12
|
+
setFocusId: Symbol("setFocusId"),
|
|
13
|
+
updateItem: Symbol("updateItem"),
|
|
14
|
+
slideToItem: Symbol("slideTo"),
|
|
15
|
+
setEnterFocusId: Symbol("setEnterFocusId"),
|
|
16
|
+
setEnterFocusRect: Symbol("setEnterFocusRect"),
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
export { Dispatcher as SWidgetDispatcher };
|
|
20
|
+
export default Dispatcher;
|