@shijiu/jsview-vue 2.1.200 → 2.1.339-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.
Files changed (120) hide show
  1. package/bin/browser/BrowserApic.vue.mjs +124 -0
  2. package/bin/browser/BrowserApic2.vue.mjs +118 -0
  3. package/bin/browser/BrowserApicLib.mjs +424 -0
  4. package/bin/browser/BrowserAudio.vue.mjs +263 -0
  5. package/bin/browser/BrowserJsvLatex.vue.mjs +110 -0
  6. package/bin/browser/BrowserJsvPlayer.vue.mjs +573 -0
  7. package/bin/browser/BrowserPreload.vue.mjs +154 -0
  8. package/bin/browser/BrowserQrcode.vue.mjs +178 -0
  9. package/bin/browser/BrowserSpray.vue.mjs +66 -0
  10. package/bin/browser/BrowserTextureAnim.vue.mjs +324 -0
  11. package/bin/export-sfc.mjs +12 -0
  12. package/bin/jsview-common.mjs +39 -0
  13. package/bin/jsview-vue.mjs +21106 -0
  14. package/index.js +3 -4
  15. package/package.json +1 -2
  16. package/tools/config/rollup.config.mjs +52 -0
  17. package/tools/config/tsconfig.json +18 -0
  18. package/tools/config/vite.config.ts +60 -0
  19. package/tools/jsview-vue-build.mjs +125 -0
  20. package/utils/JsViewEngineWidget/{JsvFocusBlock.vue → JsvFocus/JsvFocusBlock.vue} +11 -11
  21. package/utils/JsViewEngineWidget/{JsvFocusHub.ts → JsvFocus/JsvFocusHub.ts} +9 -3
  22. package/utils/JsViewEngineWidget/{JsvFocusManager.js → JsvFocus/JsvFocusManager.js} +6 -5
  23. package/utils/JsViewEngineWidget/MetroWidget/AnimationManager.ts +33 -10
  24. package/utils/JsViewEngineWidget/MetroWidget/ListWidget.vue +89 -57
  25. package/utils/JsViewEngineWidget/MetroWidget/MetroWidget.vue +118 -62
  26. package/utils/JsViewEngineWidget/MetroWidget/MetroWidgetSetup.js +504 -60
  27. package/utils/JsViewEngineWidget/MetroWidget/RenderItem.ts +11 -1
  28. package/utils/JsViewEngineWidget/MetroWidget/SlotComponent.vue +13 -0
  29. package/utils/JsViewEngineWidget/TemplateParser/CommonMetroTemplate.ts +1 -1
  30. package/utils/JsViewEngineWidget/TemplateParser/ListMetroTemplate.ts +1 -1
  31. package/utils/JsViewEngineWidget/TemplateParser/MetroTemplate.ts +34 -1
  32. package/utils/JsViewEngineWidget/TemplateParser/TemplateItemAdder.ts +52 -11
  33. package/utils/JsViewEngineWidget/index.js +3 -3
  34. package/utils/JsViewPlugin/JsvAudio/AudioProxy.js +9 -0
  35. package/utils/JsViewPlugin/JsvAudio/BrowserAudio/BrowserAudio.vue +11 -3
  36. package/utils/JsViewPlugin/JsvAudio/JsvAudio.vue +1 -0
  37. package/utils/JsViewPlugin/JsvAudio/JsvAudioBridgeProxy.js +8 -0
  38. package/utils/JsViewPlugin/JsvAudio/ScreenLockManager.js +16 -0
  39. package/utils/JsViewPlugin/JsvAudio/version.js +3 -3
  40. package/utils/JsViewPlugin/JsvAudio/version.mjs +3 -3
  41. package/utils/JsViewPlugin/JsvLatex/index.js +1 -1
  42. package/utils/JsViewPlugin/JsvPlayer/JsvPlayer.vue +1 -1
  43. package/utils/JsViewPlugin/JsvPlayer/index-0.9.js +3 -3
  44. package/utils/JsViewPlugin/JsvPlayer/index.js +2 -2
  45. package/utils/JsViewVueTools/DebugTool.js +2 -2
  46. package/utils/JsViewVueTools/DefaultKeyMap.js +1 -1
  47. package/utils/JsViewVueTools/JsvDynamicCssStyle.js +1 -1
  48. package/utils/JsViewVueTools/JsvDynamicKeyFrames.js +2 -2
  49. package/utils/JsViewVueTools/JsvImpactTracer.js +7 -7
  50. package/utils/JsViewVueTools/JsvPreDownloader.ts +1 -1
  51. package/utils/JsViewVueTools/JsvRefTaker.js +2 -1
  52. package/utils/JsViewVueTools/JsvRuntimeBridge.js +29 -29
  53. package/utils/JsViewVueTools/JsvStyleClass.js +3 -3
  54. package/utils/JsViewVueTools/JsvStyleSheetsDeclarer.js +1 -1
  55. package/utils/JsViewVueTools/JsvTextTools.js +4 -4
  56. package/utils/JsViewVueTools/JsvTextureStore/CanvasTexture/CanvasTexture.ts +29 -1
  57. package/utils/JsViewVueTools/JsvTextureStore/CanvasTexture/CommandList.ts +6 -5
  58. package/utils/JsViewVueTools/JsvTextureStore/JsvTextureStore.ts +60 -2
  59. package/utils/JsViewVueTools/NinePatchHelper.js +1 -1
  60. package/utils/JsViewVueWidget/JsvActorMove/ActorControlBase.js +1 -1
  61. package/utils/JsViewVueWidget/JsvActorMove/JsvActorMoveControl.js +1 -1
  62. package/utils/JsViewVueWidget/JsvApic/{BrowserApic → JsvApic}/BrowserApic.vue +20 -23
  63. package/utils/JsViewVueWidget/JsvApic/{JsvApic.vue → JsvApic/JsvApic.vue} +3 -14
  64. package/utils/JsViewVueWidget/JsvApic/{index.js → JsvApic/index.js} +2 -4
  65. package/utils/JsViewVueWidget/JsvApic/JsvApic2/BrowserApic2.vue +116 -0
  66. package/utils/JsViewVueWidget/JsvApic/JsvApic2/JsvApic2.vue +137 -0
  67. package/utils/JsViewVueWidget/JsvApic/JsvApic2/index.js +17 -0
  68. package/utils/JsViewVueWidget/JsvApic/JsvBrowserApicLib/BrowserApicLib.js +4 -0
  69. package/utils/JsViewVueWidget/JsvApic/{BrowserApic → JsvBrowserApicLib}/NormalLoopTool.js +16 -18
  70. package/utils/JsViewVueWidget/JsvApic/JsvBrowserApicLib/PartLoopTool.js +90 -0
  71. package/utils/JsViewVueWidget/JsvApic/JsvBrowserApicLib/SingleLoopTool.js +17 -0
  72. package/utils/JsViewVueWidget/JsvApic/JsvBrowserApicLib/Viewer.js +111 -0
  73. package/utils/JsViewVueWidget/JsvApic/JsvCommonLoopToolBase.js +48 -0
  74. package/utils/JsViewVueWidget/JsvConnectLine/ArcLineManager.js +71 -0
  75. package/utils/JsViewVueWidget/JsvConnectLine/JsvConnectLine.vue +354 -0
  76. package/utils/JsViewVueWidget/JsvConnectLine/index.js +2 -0
  77. package/utils/JsViewVueWidget/JsvFreeMoveActor/ActorControl.ts +37 -18
  78. package/utils/JsViewVueWidget/JsvFreeMoveActor/ForgeTypeDefine.ts +7 -3
  79. package/utils/JsViewVueWidget/JsvFreeMoveActor/FreeMoveActor.vue +28 -2
  80. package/utils/JsViewVueWidget/JsvFreeMoveActor/JsvEnvBlocker.vue +12 -5
  81. package/utils/JsViewVueWidget/JsvFreeMoveActor/NexusNode.ts +21 -0
  82. package/utils/JsViewVueWidget/JsvFreeMoveActor/SetAction.ts +47 -59
  83. package/utils/JsViewVueWidget/JsvFreeMoveActor/SetCondition.ts +129 -12
  84. package/utils/JsViewVueWidget/JsvFreeMoveActor/SetState.ts +45 -0
  85. package/utils/JsViewVueWidget/JsvFreeMoveActor/index.js +10 -2
  86. package/utils/JsViewVueWidget/JsvGrid.vue +1 -1
  87. package/utils/JsViewVueWidget/JsvHole.js +1 -1
  88. package/utils/JsViewVueWidget/JsvInput/JsvInput.vue +1 -1
  89. package/utils/JsViewVueWidget/JsvLine/JsvLine.vue +2 -2
  90. package/utils/JsViewVueWidget/JsvLine/LineManager.js +6 -4
  91. package/utils/JsViewVueWidget/JsvMarquee.vue +7 -4
  92. package/utils/JsViewVueWidget/JsvPieChart.vue +1 -1
  93. package/utils/JsViewVueWidget/JsvPreload/JsvPreload.vue +1 -1
  94. package/utils/JsViewVueWidget/JsvPreload/index.js +1 -1
  95. package/utils/JsViewVueWidget/JsvProgressBar.vue +172 -0
  96. package/utils/JsViewVueWidget/JsvQrcode/JsvQrcode.vue +0 -1
  97. package/utils/JsViewVueWidget/JsvQrcode/index.js +1 -1
  98. package/utils/JsViewVueWidget/JsvRadarChart.vue +1 -1
  99. package/utils/JsViewVueWidget/JsvScaleTextBox.vue +0 -2
  100. package/utils/JsViewVueWidget/JsvSector.vue +1 -1
  101. package/utils/JsViewVueWidget/JsvSoundPool.js +1 -1
  102. package/utils/JsViewVueWidget/JsvSpray/index.js +1 -1
  103. package/utils/JsViewVueWidget/JsvSpriteAnim/FrameBuidler.ts +235 -0
  104. package/utils/JsViewVueWidget/JsvSpriteAnim/JsvSpriteAnim.vue +433 -401
  105. package/utils/JsViewVueWidget/JsvSpriteAnim/JsvSpriteLoader.vue +120 -0
  106. package/utils/JsViewVueWidget/JsvSpriteAnim/index.js +2 -2
  107. package/utils/JsViewVueWidget/JsvSwiper/JsvSwiper.vue +5 -5
  108. package/utils/JsViewVueWidget/JsvSwiper3D/JsvSwiper.vue +425 -422
  109. package/utils/JsViewVueWidget/JsvVisibleSensor/index.js +1 -1
  110. package/utils/JsViewVueWidget/index.js +7 -3
  111. package/utils/index.js +4 -0
  112. package/utils/JsViewVueWidget/JsvApic/BrowserApic/LoopToolBase.js +0 -25
  113. package/utils/JsViewVueWidget/JsvApic/BrowserApic/PartLoopTool.js +0 -119
  114. package/utils/JsViewVueWidget/JsvApic/BrowserApic/Viewer.js +0 -106
  115. /package/utils/JsViewPlugin/JsvLatex/{JsvLatexBrowser.vue → BrowserJsvLatex.vue} +0 -0
  116. /package/utils/JsViewPlugin/JsvPlayer/{JsvPlayerBrowser-0.9.vue → BrowserJsvPlayer-0.9.vue} +0 -0
  117. /package/utils/JsViewPlugin/JsvPlayer/{JsvPlayerBrowser.vue → BrowserJsvPlayer.vue} +0 -0
  118. /package/utils/JsViewVueWidget/JsvApic/{BrowserApic → JsvBrowserApicLib}/ApicDataBase.js +0 -0
  119. /package/utils/JsViewVueWidget/JsvApic/{BrowserApic → JsvBrowserApicLib}/GifData.js +0 -0
  120. /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 };