@shijiu/jsview-vue 2.1.200 → 2.1.340-test.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.
- package/bin/browser/BrowserApic.vue.mjs +124 -0
- package/bin/browser/BrowserApic2.vue.mjs +118 -0
- package/bin/browser/BrowserApicLib.mjs +424 -0
- package/bin/browser/BrowserAudio.vue.mjs +263 -0
- package/bin/browser/BrowserJsvLatex.vue.mjs +110 -0
- package/bin/browser/BrowserJsvPlayer.vue.mjs +573 -0
- package/bin/browser/BrowserPreload.vue.mjs +154 -0
- package/bin/browser/BrowserQrcode.vue.mjs +178 -0
- package/bin/browser/BrowserSpray.vue.mjs +66 -0
- package/bin/browser/BrowserTextureAnim.vue.mjs +324 -0
- package/bin/export-sfc.mjs +12 -0
- package/bin/jsview-common.mjs +39 -0
- package/bin/jsview-vue.mjs +21106 -0
- package/index.js +3 -4
- package/package.json +1 -2
- package/tools/config/rollup.config.mjs +52 -0
- package/tools/config/tsconfig.json +18 -0
- package/tools/config/vite.config.ts +60 -0
- package/tools/jsview-vue-build.mjs +125 -0
- package/utils/JsViewEngineWidget/{JsvFocusBlock.vue → JsvFocus/JsvFocusBlock.vue} +11 -11
- package/utils/JsViewEngineWidget/{JsvFocusHub.ts → JsvFocus/JsvFocusHub.ts} +9 -3
- package/utils/JsViewEngineWidget/{JsvFocusManager.js → JsvFocus/JsvFocusManager.js} +6 -5
- package/utils/JsViewEngineWidget/MetroWidget/AnimationManager.ts +33 -10
- package/utils/JsViewEngineWidget/MetroWidget/ListWidget.vue +89 -57
- package/utils/JsViewEngineWidget/MetroWidget/MetroWidget.vue +118 -62
- package/utils/JsViewEngineWidget/MetroWidget/MetroWidgetSetup.js +504 -60
- package/utils/JsViewEngineWidget/MetroWidget/RenderItem.ts +11 -1
- package/utils/JsViewEngineWidget/MetroWidget/SlotComponent.vue +13 -0
- package/utils/JsViewEngineWidget/TemplateParser/CommonMetroTemplate.ts +1 -1
- package/utils/JsViewEngineWidget/TemplateParser/ListMetroTemplate.ts +1 -1
- package/utils/JsViewEngineWidget/TemplateParser/MetroTemplate.ts +34 -1
- package/utils/JsViewEngineWidget/TemplateParser/TemplateItemAdder.ts +52 -11
- package/utils/JsViewEngineWidget/index.js +3 -3
- package/utils/JsViewPlugin/JsvAudio/AudioProxy.js +9 -0
- package/utils/JsViewPlugin/JsvAudio/BrowserAudio/BrowserAudio.vue +11 -3
- package/utils/JsViewPlugin/JsvAudio/JsvAudio.vue +1 -0
- package/utils/JsViewPlugin/JsvAudio/JsvAudioBridgeProxy.js +8 -0
- package/utils/JsViewPlugin/JsvAudio/ScreenLockManager.js +16 -0
- package/utils/JsViewPlugin/JsvAudio/version.js +3 -3
- package/utils/JsViewPlugin/JsvAudio/version.mjs +3 -3
- package/utils/JsViewPlugin/JsvLatex/index.js +1 -1
- package/utils/JsViewPlugin/JsvPlayer/JsvPlayer.vue +1 -1
- package/utils/JsViewPlugin/JsvPlayer/index-0.9.js +3 -3
- package/utils/JsViewPlugin/JsvPlayer/index.js +2 -2
- package/utils/JsViewVueTools/DebugTool.js +2 -2
- package/utils/JsViewVueTools/DefaultKeyMap.js +1 -1
- package/utils/JsViewVueTools/JsvDynamicCssStyle.js +1 -1
- package/utils/JsViewVueTools/JsvDynamicKeyFrames.js +2 -2
- package/utils/JsViewVueTools/JsvImpactTracer.js +7 -7
- package/utils/JsViewVueTools/JsvPreDownloader.ts +1 -1
- package/utils/JsViewVueTools/JsvRefTaker.js +2 -1
- package/utils/JsViewVueTools/JsvRuntimeBridge.js +29 -29
- package/utils/JsViewVueTools/JsvStyleClass.js +3 -3
- package/utils/JsViewVueTools/JsvStyleSheetsDeclarer.js +1 -1
- package/utils/JsViewVueTools/JsvTextTools.js +4 -4
- package/utils/JsViewVueTools/JsvTextureStore/CanvasTexture/CanvasTexture.ts +29 -1
- package/utils/JsViewVueTools/JsvTextureStore/CanvasTexture/CommandList.ts +6 -5
- package/utils/JsViewVueTools/JsvTextureStore/JsvTextureStore.ts +60 -2
- package/utils/JsViewVueTools/NinePatchHelper.js +1 -1
- package/utils/JsViewVueWidget/JsvActorMove/ActorControlBase.js +1 -1
- package/utils/JsViewVueWidget/JsvActorMove/JsvActorMoveControl.js +1 -1
- package/utils/JsViewVueWidget/JsvApic/{BrowserApic → JsvApic}/BrowserApic.vue +20 -23
- package/utils/JsViewVueWidget/JsvApic/{JsvApic.vue → JsvApic/JsvApic.vue} +3 -14
- package/utils/JsViewVueWidget/JsvApic/{index.js → JsvApic/index.js} +2 -4
- package/utils/JsViewVueWidget/JsvApic/JsvApic2/BrowserApic2.vue +116 -0
- package/utils/JsViewVueWidget/JsvApic/JsvApic2/JsvApic2.vue +137 -0
- package/utils/JsViewVueWidget/JsvApic/JsvApic2/index.js +17 -0
- package/utils/JsViewVueWidget/JsvApic/JsvBrowserApicLib/BrowserApicLib.js +4 -0
- package/utils/JsViewVueWidget/JsvApic/{BrowserApic → JsvBrowserApicLib}/NormalLoopTool.js +16 -18
- package/utils/JsViewVueWidget/JsvApic/JsvBrowserApicLib/PartLoopTool.js +90 -0
- package/utils/JsViewVueWidget/JsvApic/JsvBrowserApicLib/SingleLoopTool.js +17 -0
- package/utils/JsViewVueWidget/JsvApic/JsvBrowserApicLib/Viewer.js +111 -0
- package/utils/JsViewVueWidget/JsvApic/JsvCommonLoopToolBase.js +48 -0
- package/utils/JsViewVueWidget/JsvConnectLine/ArcLineManager.js +71 -0
- package/utils/JsViewVueWidget/JsvConnectLine/JsvConnectLine.vue +354 -0
- package/utils/JsViewVueWidget/JsvConnectLine/index.js +2 -0
- package/utils/JsViewVueWidget/JsvFreeMoveActor/ActorControl.ts +37 -18
- package/utils/JsViewVueWidget/JsvFreeMoveActor/ForgeTypeDefine.ts +7 -3
- package/utils/JsViewVueWidget/JsvFreeMoveActor/FreeMoveActor.vue +28 -2
- package/utils/JsViewVueWidget/JsvFreeMoveActor/JsvEnvBlocker.vue +12 -5
- package/utils/JsViewVueWidget/JsvFreeMoveActor/NexusNode.ts +21 -0
- package/utils/JsViewVueWidget/JsvFreeMoveActor/SetAction.ts +47 -59
- package/utils/JsViewVueWidget/JsvFreeMoveActor/SetCondition.ts +129 -12
- package/utils/JsViewVueWidget/JsvFreeMoveActor/SetState.ts +45 -0
- package/utils/JsViewVueWidget/JsvFreeMoveActor/index.js +10 -2
- package/utils/JsViewVueWidget/JsvGrid.vue +1 -1
- package/utils/JsViewVueWidget/JsvHole.js +1 -1
- package/utils/JsViewVueWidget/JsvInput/JsvInput.vue +1 -1
- package/utils/JsViewVueWidget/JsvLine/JsvLine.vue +2 -2
- package/utils/JsViewVueWidget/JsvLine/LineManager.js +6 -4
- package/utils/JsViewVueWidget/JsvMarquee.vue +7 -4
- package/utils/JsViewVueWidget/JsvPieChart.vue +1 -1
- package/utils/JsViewVueWidget/JsvPreload/JsvPreload.vue +1 -1
- package/utils/JsViewVueWidget/JsvPreload/index.js +1 -1
- package/utils/JsViewVueWidget/JsvProgressBar.vue +172 -0
- package/utils/JsViewVueWidget/JsvQrcode/JsvQrcode.vue +0 -1
- package/utils/JsViewVueWidget/JsvQrcode/index.js +1 -1
- package/utils/JsViewVueWidget/JsvRadarChart.vue +1 -1
- package/utils/JsViewVueWidget/JsvScaleTextBox.vue +0 -2
- package/utils/JsViewVueWidget/JsvSector.vue +1 -1
- package/utils/JsViewVueWidget/JsvSoundPool.js +1 -1
- package/utils/JsViewVueWidget/JsvSpray/index.js +1 -1
- package/utils/JsViewVueWidget/JsvSpriteAnim/FrameBuidler.ts +235 -0
- package/utils/JsViewVueWidget/JsvSpriteAnim/JsvSpriteAnim.vue +433 -401
- package/utils/JsViewVueWidget/JsvSpriteAnim/JsvSpriteLoader.vue +120 -0
- package/utils/JsViewVueWidget/JsvSpriteAnim/index.js +2 -2
- package/utils/JsViewVueWidget/JsvSwiper/JsvSwiper.vue +5 -5
- package/utils/JsViewVueWidget/JsvSwiper3D/JsvSwiper.vue +425 -422
- package/utils/JsViewVueWidget/JsvVisibleSensor/index.js +1 -1
- package/utils/JsViewVueWidget/index.js +7 -3
- package/utils/index.js +4 -0
- package/utils/JsViewVueWidget/JsvApic/BrowserApic/LoopToolBase.js +0 -25
- package/utils/JsViewVueWidget/JsvApic/BrowserApic/PartLoopTool.js +0 -119
- package/utils/JsViewVueWidget/JsvApic/BrowserApic/Viewer.js +0 -106
- /package/utils/JsViewPlugin/JsvLatex/{JsvLatexBrowser.vue → BrowserJsvLatex.vue} +0 -0
- /package/utils/JsViewPlugin/JsvPlayer/{JsvPlayerBrowser-0.9.vue → BrowserJsvPlayer-0.9.vue} +0 -0
- /package/utils/JsViewPlugin/JsvPlayer/{JsvPlayerBrowser.vue → BrowserJsvPlayer.vue} +0 -0
- /package/utils/JsViewVueWidget/JsvApic/{BrowserApic → JsvBrowserApicLib}/ApicDataBase.js +0 -0
- /package/utils/JsViewVueWidget/JsvApic/{BrowserApic → JsvBrowserApicLib}/GifData.js +0 -0
- /package/utils/JsViewVueWidget/JsvApic/{BrowserApic → JsvBrowserApicLib}/WebpData.js +0 -0
|
@@ -0,0 +1,263 @@
|
|
|
1
|
+
import { openBlock, createElementBlock, resolveComponent, mergeProps, createBlock } from 'vue';
|
|
2
|
+
import { _ as _export_sfc } from '../export-sfc.mjs';
|
|
3
|
+
|
|
4
|
+
//!
|
|
5
|
+
//! utils/JsViewPlugin/JsvAudio/BrowserAudio/JsvSystemAudio.vue;
|
|
6
|
+
//!
|
|
7
|
+
/*!
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
*/
|
|
11
|
+
const _sfc_main$1 = {
|
|
12
|
+
props: {
|
|
13
|
+
/**
|
|
14
|
+
* 回调函数,播放器对象通知接口
|
|
15
|
+
* @param {Object} video对象,可以通过此video对象调用video相关属性和方法,具体属性和方法定义见JsvMedia.js文件里相关说明。
|
|
16
|
+
*/
|
|
17
|
+
onRef: { type: Function, default: () => {
|
|
18
|
+
} },
|
|
19
|
+
/**
|
|
20
|
+
* 属性,Boolean类型,true表示自动播放,默认false。
|
|
21
|
+
*/
|
|
22
|
+
autoplay: { type: Boolean, default: false },
|
|
23
|
+
/**
|
|
24
|
+
* 属性,Boolean类型,true表示静音,默认false。
|
|
25
|
+
*/
|
|
26
|
+
muted: { type: Boolean, default: false },
|
|
27
|
+
/**
|
|
28
|
+
* 属性,Boolean类型,true表示循环播放,默认false。
|
|
29
|
+
*/
|
|
30
|
+
loop: { type: Boolean, default: false },
|
|
31
|
+
/**
|
|
32
|
+
* 属性,String类型,播放地址。
|
|
33
|
+
*/
|
|
34
|
+
src: { type: String, default: "" },
|
|
35
|
+
/**
|
|
36
|
+
* 回调函数,播放结束时通过此回调接口通知。
|
|
37
|
+
*/
|
|
38
|
+
onEnded: {
|
|
39
|
+
type: Function,
|
|
40
|
+
default: () => {
|
|
41
|
+
return {};
|
|
42
|
+
}
|
|
43
|
+
},
|
|
44
|
+
/**
|
|
45
|
+
* 回调函数,播放错误时通过此接口通知。
|
|
46
|
+
* @param {int} 错误类型,当前定义了四种错误。1是异常中断;2是网络错误;3是解码错误;4是格式不支持。
|
|
47
|
+
*/
|
|
48
|
+
onError: {
|
|
49
|
+
type: Function,
|
|
50
|
+
default: () => {
|
|
51
|
+
return {};
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
/**
|
|
55
|
+
* 回调函数,开始加载,设置完播放地址后,上报此事件。
|
|
56
|
+
*/
|
|
57
|
+
onLoadStart: {
|
|
58
|
+
type: Function,
|
|
59
|
+
default: () => {
|
|
60
|
+
return {};
|
|
61
|
+
}
|
|
62
|
+
},
|
|
63
|
+
/**
|
|
64
|
+
* 回调函数,视频准备好后触发。
|
|
65
|
+
*/
|
|
66
|
+
onLoadedMetaData: {
|
|
67
|
+
type: Function,
|
|
68
|
+
default: () => {
|
|
69
|
+
return {};
|
|
70
|
+
}
|
|
71
|
+
},
|
|
72
|
+
/**
|
|
73
|
+
* 回调函数,视频准备好后触发,这个时候可以正常seek。
|
|
74
|
+
*/
|
|
75
|
+
onLoad: {
|
|
76
|
+
type: Function,
|
|
77
|
+
default: () => {
|
|
78
|
+
return {};
|
|
79
|
+
}
|
|
80
|
+
},
|
|
81
|
+
/**
|
|
82
|
+
* 回调函数,音频失去焦点后触发此事件,可能会导致pause(点播)或者离开频道(直播)。
|
|
83
|
+
*/
|
|
84
|
+
onAudioFocusLoss: {
|
|
85
|
+
type: Function,
|
|
86
|
+
default: () => {
|
|
87
|
+
return {};
|
|
88
|
+
}
|
|
89
|
+
},
|
|
90
|
+
/**
|
|
91
|
+
* 回调函数,音频获取焦点后触发此事件,可能会触发resume(点播)或者加入频道(直播)。
|
|
92
|
+
*/
|
|
93
|
+
onAudioFocusGain: {
|
|
94
|
+
type: Function,
|
|
95
|
+
default: () => {
|
|
96
|
+
return {};
|
|
97
|
+
}
|
|
98
|
+
},
|
|
99
|
+
/*
|
|
100
|
+
*预下载音频
|
|
101
|
+
*/
|
|
102
|
+
preDownload: {
|
|
103
|
+
type: Boolean,
|
|
104
|
+
default: false
|
|
105
|
+
}
|
|
106
|
+
},
|
|
107
|
+
setup() {
|
|
108
|
+
return {
|
|
109
|
+
audio: null
|
|
110
|
+
};
|
|
111
|
+
},
|
|
112
|
+
mounted() {
|
|
113
|
+
this.Jsvinit();
|
|
114
|
+
},
|
|
115
|
+
beforeUnmount() {
|
|
116
|
+
if (this.audio != null) {
|
|
117
|
+
this.audio.unload?.();
|
|
118
|
+
this.audio.releaseResource?.();
|
|
119
|
+
this.audio.onPlatformDestroy?.();
|
|
120
|
+
this.onRef?.(null);
|
|
121
|
+
this.unregisterOnVisibilityChange();
|
|
122
|
+
}
|
|
123
|
+
},
|
|
124
|
+
methods: {
|
|
125
|
+
registerEvent() {
|
|
126
|
+
if (this.audio) {
|
|
127
|
+
this.audio.addEventListener("ended", this.onEnded);
|
|
128
|
+
this.audio.addEventListener("error", this.onError);
|
|
129
|
+
this.audio.addEventListener("loadstart", this.onLoadStart);
|
|
130
|
+
this.audio.addEventListener("loadedmetadata", this.onLoadedMetaData);
|
|
131
|
+
this.audio.addEventListener("load", this.onLoad);
|
|
132
|
+
this.audio.addEventListener("audiofocusloss", this.onAudioFocusLoss);
|
|
133
|
+
this.audio.addEventListener("audiofocusgain", this.onAudioFocusGain);
|
|
134
|
+
}
|
|
135
|
+
},
|
|
136
|
+
onVisibilityChange(status) {
|
|
137
|
+
if (status.status === "show") {
|
|
138
|
+
this.onJsViewShow();
|
|
139
|
+
} else if (status.status === "hide") {
|
|
140
|
+
this.onJsViewHide();
|
|
141
|
+
}
|
|
142
|
+
},
|
|
143
|
+
registerOnVisibilityChange() {
|
|
144
|
+
if (window.JsView) {
|
|
145
|
+
window.JsView.onVisibilityChange(this.onVisibilityChange);
|
|
146
|
+
}
|
|
147
|
+
},
|
|
148
|
+
unregisterOnVisibilityChange() {
|
|
149
|
+
if (window.JsView) {
|
|
150
|
+
window.JsView.removeEventCallback(this.onVisibilityChange);
|
|
151
|
+
}
|
|
152
|
+
},
|
|
153
|
+
onJsViewHide() {
|
|
154
|
+
if (this.audio) {
|
|
155
|
+
if (!this.audio.paused) {
|
|
156
|
+
this.stopByOnHide = true;
|
|
157
|
+
}
|
|
158
|
+
this.audio.unload();
|
|
159
|
+
}
|
|
160
|
+
},
|
|
161
|
+
onJsViewShow() {
|
|
162
|
+
if (!this.audio) {
|
|
163
|
+
this.Jsvinit();
|
|
164
|
+
}
|
|
165
|
+
if (this.stopByOnHide) {
|
|
166
|
+
this.stopByOnHide = false;
|
|
167
|
+
this.Jsvinit();
|
|
168
|
+
}
|
|
169
|
+
},
|
|
170
|
+
Jsvinit() {
|
|
171
|
+
this.audio = new Audio();
|
|
172
|
+
this.registerEvent();
|
|
173
|
+
if (this.src && this.src !== "") {
|
|
174
|
+
let realUrl;
|
|
175
|
+
if (window.JsView) {
|
|
176
|
+
realUrl = new window.JsView.Dom.UrlRef(this.src).href;
|
|
177
|
+
} else {
|
|
178
|
+
realUrl = this.src;
|
|
179
|
+
}
|
|
180
|
+
this.audio.src = realUrl;
|
|
181
|
+
}
|
|
182
|
+
if (this.autoplay) {
|
|
183
|
+
this.audio.autoplay = this.autoplay;
|
|
184
|
+
}
|
|
185
|
+
if (this.muted) {
|
|
186
|
+
this.audio.muted = this.muted;
|
|
187
|
+
}
|
|
188
|
+
if (this.loop) {
|
|
189
|
+
this.audio.loop = this.loop;
|
|
190
|
+
}
|
|
191
|
+
if (this.preDownload) {
|
|
192
|
+
this.audio.predownload = this.preDownload;
|
|
193
|
+
}
|
|
194
|
+
this.onRef?.(this.audio);
|
|
195
|
+
Promise.resolve().then(() => {
|
|
196
|
+
if (this.audio) {
|
|
197
|
+
this.audio.confirmInitSetup?.();
|
|
198
|
+
}
|
|
199
|
+
});
|
|
200
|
+
this.registerOnVisibilityChange();
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
};
|
|
204
|
+
function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
|
|
205
|
+
return openBlock(), createElementBlock("div", {
|
|
206
|
+
style: { width: 1, height: 1 },
|
|
207
|
+
backgroundColor: "rgba(0,0,0,1)"
|
|
208
|
+
});
|
|
209
|
+
}
|
|
210
|
+
const JsvSystemAudio = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["render", _sfc_render$1]]);
|
|
211
|
+
|
|
212
|
+
//!
|
|
213
|
+
//! utils/JsViewPlugin/JsvAudio/BrowserAudio/BrowserAudio.vue;
|
|
214
|
+
//!
|
|
215
|
+
/*!
|
|
216
|
+
|
|
217
|
+
|
|
218
|
+
*/
|
|
219
|
+
const _sfc_main = {
|
|
220
|
+
components: {
|
|
221
|
+
JsvSystemAudio
|
|
222
|
+
},
|
|
223
|
+
props: {
|
|
224
|
+
onRef: { type: Function, default: () => {
|
|
225
|
+
} }
|
|
226
|
+
},
|
|
227
|
+
setup() {
|
|
228
|
+
return {
|
|
229
|
+
audioRef: null
|
|
230
|
+
};
|
|
231
|
+
},
|
|
232
|
+
methods: {
|
|
233
|
+
onRefProxy(audio_ref) {
|
|
234
|
+
if (audio_ref != null) {
|
|
235
|
+
audio_ref.closeScreenSaver = () => {
|
|
236
|
+
};
|
|
237
|
+
audio_ref.openScreenSaver = () => {
|
|
238
|
+
};
|
|
239
|
+
}
|
|
240
|
+
this.audioRef = audio_ref;
|
|
241
|
+
}
|
|
242
|
+
},
|
|
243
|
+
mounted() {
|
|
244
|
+
if (this.audioRef && this.onRef) {
|
|
245
|
+
let audio_ref = this.audioRef;
|
|
246
|
+
this.audioRef = null;
|
|
247
|
+
this.onRef(audio_ref);
|
|
248
|
+
}
|
|
249
|
+
},
|
|
250
|
+
beforeUnmount() {
|
|
251
|
+
this.audioRef?.closeScreenSaver();
|
|
252
|
+
if (this.onRef) {
|
|
253
|
+
this.onRef(null);
|
|
254
|
+
}
|
|
255
|
+
}
|
|
256
|
+
};
|
|
257
|
+
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
258
|
+
const _component_jsv_system_audio = resolveComponent("jsv-system-audio");
|
|
259
|
+
return openBlock(), createBlock(_component_jsv_system_audio, mergeProps({ onRef: $options.onRefProxy }, _ctx.$attrs), null, 16, ["onRef"]);
|
|
260
|
+
}
|
|
261
|
+
const BrowserAudio = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
262
|
+
|
|
263
|
+
export { BrowserAudio as default };
|