@shijiu/jsview-vue 2.3.151-test.0 → 3.0.0-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/BrowserAudio.mjs +200 -0
- package/bin/browser/BrowserJsvLatex.mjs +61 -0
- package/bin/export-sfc.mjs +8 -9
- package/bin/jsview-vue-common.mjs +9 -35
- package/bin/jsview-vue.mjs +22246 -23643
- package/bin/types/utils/JsViewEngineWidget/JsvFocus/JsvFocusBlock.vue.d.ts +9 -71
- package/bin/types/utils/JsViewEngineWidget/JsvFocus/JsvFocusHub.d.ts +18 -2
- package/bin/types/utils/JsViewEngineWidget/MetroWidget/Const.d.ts +4 -1
- package/bin/types/utils/JsViewEngineWidget/MetroWidget/DebugFrame.vue.d.ts +10 -7
- package/bin/types/utils/JsViewEngineWidget/MetroWidget/ListWidget.vue.d.ts +19 -178
- package/bin/types/utils/JsViewEngineWidget/MetroWidget/MetroWidget.vue.d.ts +19 -178
- package/bin/types/utils/JsViewEngineWidget/MetroWidget/MetroWidgetSetup.d.ts +24 -3
- package/bin/types/utils/JsViewEngineWidget/MetroWidget/PageUpdater.d.ts +7 -1
- package/bin/types/utils/JsViewEngineWidget/MetroWidget/RenderItem.d.ts +25 -5
- package/bin/types/utils/JsViewEngineWidget/MetroWidget/SlotComponent.vue.d.ts +9 -47
- package/bin/types/utils/JsViewEngineWidget/MetroWidget/TaskManager.d.ts +2 -1
- package/bin/types/utils/JsViewEngineWidget/MetroWidget/Utils.d.ts +2 -0
- package/bin/types/utils/JsViewEngineWidget/MetroWidget/WidgetRectInfo.d.ts +1 -1
- package/bin/types/utils/JsViewEngineWidget/SpatialNavigator/SpatialNavProvider.vue.d.ts +40 -0
- package/bin/types/utils/JsViewEngineWidget/SpatialNavigator/SpatialNavigationAlgorithm.d.ts +24 -0
- package/bin/types/utils/JsViewEngineWidget/SpatialNavigator/SpatialNavigationNode.d.ts +19 -0
- package/bin/types/utils/JsViewEngineWidget/SpatialNavigator/SpatialNavigator.d.ts +42 -0
- package/bin/types/utils/JsViewEngineWidget/TemplateParser/CommonMetroTemplate.d.ts +2 -1
- package/bin/types/utils/JsViewEngineWidget/TemplateParser/ListMetroTemplate.d.ts +2 -1
- package/bin/types/utils/JsViewEngineWidget/TemplateParser/MetroTemplate.d.ts +6 -4
- package/bin/types/utils/JsViewEngineWidget/TemplateParser/TemplateItemAdder.d.ts +9 -7
- package/bin/types/utils/JsViewEngineWidget/WidgetCommon.d.ts +17 -7
- package/bin/types/utils/JsViewEngineWidget/index.d.ts +3 -1
- package/bin/types/utils/JsViewPlugin/JsvAudio/BrowserAudio/BrowserAudio.vue.d.ts +140 -7
- package/bin/types/utils/JsViewPlugin/JsvAudio/BrowserAudio/JsvSystemAudio.vue.d.ts +12 -11
- package/bin/types/utils/JsViewPlugin/JsvAudio/Events.d.ts +10 -10
- package/bin/types/utils/JsViewPlugin/JsvAudio/JsvAudio.vue.d.ts +204 -17
- package/bin/types/utils/JsViewPlugin/JsvAudio/JsvAudioProxy.vue.d.ts +2 -1
- package/bin/types/utils/JsViewPlugin/JsvAudio/version.d.mts +11 -11
- package/bin/types/utils/JsViewPlugin/JsvAudio/version.d.ts +11 -11
- package/bin/types/utils/JsViewPlugin/JsvLatex/BrowserDomBuilder.d.ts +0 -1
- package/bin/types/utils/JsViewPlugin/JsvLatex/BrowserJsvLatex.vue.d.ts +75 -12
- package/bin/types/utils/JsViewPlugin/JsvLatex/GetVersion.d.ts +14 -0
- package/bin/types/utils/JsViewPlugin/JsvLatex/JsvLatex.vue.d.ts +88 -13
- package/bin/types/utils/JsViewPlugin/JsvLatex/JsvLatexBridgeProxy.d.ts +1 -0
- package/bin/types/utils/JsViewPlugin/JsvLatex/JsvLatexProxy.vue.d.ts +5 -1
- package/bin/types/utils/JsViewPlugin/JsvLatex/version.d.mts +39 -12
- package/bin/types/utils/JsViewPlugin/JsvPlayer/JsvMedia.d.ts +120 -17
- package/bin/types/utils/JsViewPlugin/JsvPlayer/JsvMediaBrowserInterface.d.ts +62 -0
- package/bin/types/utils/JsViewPlugin/JsvPlayer/JsvPlayer.vue.d.ts +108 -29
- package/bin/types/utils/JsViewPlugin/JsvPlayer/{BrowserJsvPlayer-0.9.vue.d.ts → JsvPlayerBrowser-0.9.vue.d.ts} +8 -7
- package/bin/types/utils/JsViewPlugin/JsvPlayer/JsvPlayerBrowser-wasm.vue.d.ts +614 -0
- package/bin/types/utils/JsViewPlugin/JsvPlayer/{BrowserJsvPlayer.vue.d.ts → JsvPlayerBrowser.vue.d.ts} +36 -34
- package/bin/types/utils/JsViewPlugin/JsvPlayer/index-0.9.d.ts +89 -30
- package/bin/types/utils/JsViewPlugin/JsvPlayer/index.d.ts +89 -30
- package/bin/types/utils/JsViewPlugin/JsvPlayer/version.d.mts +11 -11
- package/bin/types/utils/JsViewVueTools/BlobApi.d.ts +38 -0
- package/bin/types/utils/JsViewVueTools/DebugTool.d.ts +1 -1
- package/bin/types/utils/JsViewVueTools/DefaultKeyMap.d.ts +7 -7
- package/bin/types/utils/JsViewVueTools/FeatureActive.d.ts +1 -0
- package/bin/types/utils/JsViewVueTools/JsvInteractionMode.d.ts +6 -0
- package/bin/types/utils/JsViewVueTools/JsvRuntimeBridge.d.ts +3 -3
- package/bin/types/utils/JsViewVueTools/JsvTextTools.d.ts +1 -0
- package/bin/types/utils/JsViewVueTools/JsvTextureStore/BitPalette/BitPalette.d.ts +43 -0
- package/bin/types/utils/JsViewVueTools/JsvTextureStore/CanvasTexture/CommandList.d.ts +1 -0
- package/bin/types/utils/JsViewVueTools/JsvTextureStore/CanvasTexture/DrawHelper.d.ts +54 -0
- package/bin/types/utils/JsViewVueTools/JsvTextureStore/CanvasTexture/Path.d.ts +13 -0
- package/bin/types/utils/JsViewVueTools/JsvTextureStore/CapturedTexture/CapturedTexture.d.ts +2 -0
- package/bin/types/utils/JsViewVueTools/JsvTextureStore/JsvTextureStore.d.ts +76 -26
- package/bin/types/utils/JsViewVueTools/JsvTextureStore/TextureBuilder.d.ts +49 -0
- package/bin/types/utils/JsViewVueTools/JsvTextureStore/index.d.ts +2 -0
- package/bin/types/utils/JsViewVueTools/index.d.ts +4 -1
- package/bin/types/utils/JsViewVueWidget/Jsv3dDiv.vue.d.ts +10 -98
- package/bin/types/utils/JsViewVueWidget/Jsv3dStage.vue.d.ts +10 -114
- package/bin/types/utils/JsViewVueWidget/JsvActorMove/JsvActorMove.vue.d.ts +20 -61
- package/bin/types/utils/JsViewVueWidget/JsvApic/JsvApic/BrowserApic.vue.d.ts +44 -13
- package/bin/types/utils/JsViewVueWidget/JsvApic/JsvApic/JsvApic.vue.d.ts +12 -11
- package/bin/types/utils/JsViewVueWidget/JsvApic/JsvApic/index.d.ts +5 -5
- package/bin/types/utils/JsViewVueWidget/JsvApic/JsvApic2/BrowserApic2.vue.d.ts +16 -10
- package/bin/types/utils/JsViewVueWidget/JsvApic/JsvApic2/JsvApic2.vue.d.ts +21 -17
- package/bin/types/utils/JsViewVueWidget/JsvApic/JsvApic2/index.d.ts +19 -16
- package/bin/types/utils/JsViewVueWidget/JsvApic/JsvCommonLoopToolBase.d.ts +7 -7
- package/bin/types/utils/JsViewVueWidget/JsvClipDiv/JsvClipDiv.vue.d.ts +12 -66
- package/bin/types/utils/JsViewVueWidget/JsvConnectLine/JsvConnectLine.vue.d.ts +73 -12
- package/bin/types/utils/JsViewVueWidget/JsvDashPath.vue.d.ts +59 -10
- package/bin/types/utils/JsViewVueWidget/JsvDragBox/JsvDragBox.vue.d.ts +41 -81
- package/bin/types/utils/JsViewVueWidget/JsvDriftScope/JsvDriftScope.vue.d.ts +17 -100
- package/bin/types/utils/JsViewVueWidget/JsvEnableRenderBreak.vue.d.ts +13 -50
- package/bin/types/utils/JsViewVueWidget/JsvFilterView.vue.d.ts +50 -70
- package/bin/types/utils/JsViewVueWidget/JsvFlexCell/JsvFlexDiv.vue.d.ts +32 -68
- package/bin/types/utils/JsViewVueWidget/JsvFlexCell/JsvFullScrAdjust.vue.d.ts +57 -74
- package/bin/types/utils/JsViewVueWidget/JsvFlexCell/JsvScreenFlex.vue.d.ts +41 -71
- package/bin/types/utils/JsViewVueWidget/JsvFragShaderView/JsvFragShaderView.vue.d.ts +83 -14
- package/bin/types/utils/JsViewVueWidget/JsvFreeMoveActor/ActorControl.d.ts +151 -18
- package/bin/types/utils/JsViewVueWidget/JsvFreeMoveActor/JsvEnvBlocker.vue.d.ts +79 -83
- package/bin/types/utils/JsViewVueWidget/JsvFreeMoveActor/JsvFreeMoveActor.vue.d.ts +70 -0
- package/bin/types/utils/JsViewVueWidget/JsvFreeMoveActor/SetAction.d.ts +20 -0
- package/bin/types/utils/JsViewVueWidget/JsvFreeMoveActor/SetCondition.d.ts +108 -5
- package/bin/types/utils/JsViewVueWidget/JsvFreeMoveActor/SetState.d.ts +88 -3
- package/bin/types/utils/JsViewVueWidget/JsvFreeMoveActor/index.d.ts +6 -1
- package/bin/types/utils/JsViewVueWidget/JsvGrid.vue.d.ts +19 -18
- package/bin/types/utils/JsViewVueWidget/JsvInput/Cursor.vue.d.ts +34 -11
- package/bin/types/utils/JsViewVueWidget/JsvInput/EditViewOperator.d.ts +4 -1
- package/bin/types/utils/JsViewVueWidget/JsvInput/JsvInput.vue.d.ts +193 -6
- package/bin/types/utils/JsViewVueWidget/JsvLine/JsvLine.vue.d.ts +54 -11
- package/bin/types/utils/JsViewVueWidget/JsvMarquee.vue.d.ts +89 -11
- package/bin/types/utils/JsViewVueWidget/JsvMaskClipDiv.vue.d.ts +9 -8
- package/bin/types/utils/JsViewVueWidget/JsvMindMap/Geometry.d.ts +2 -2
- package/bin/types/utils/JsViewVueWidget/JsvMindMap/JsvMindMap.vue.d.ts +170 -138
- package/bin/types/utils/JsViewVueWidget/JsvMindMap/rtree.d.ts +5 -5
- package/bin/types/utils/JsViewVueWidget/JsvNativeSharedDiv.vue.d.ts +48 -72
- package/bin/types/utils/JsViewVueWidget/JsvNinePatch.vue.d.ts +139 -20
- package/bin/types/utils/JsViewVueWidget/JsvPieChart.vue.d.ts +56 -8
- package/bin/types/utils/JsViewVueWidget/JsvPreload/JsvPreload.vue.d.ts +20 -11
- package/bin/types/utils/JsViewVueWidget/JsvProgressBar.vue.d.ts +63 -11
- package/bin/types/utils/JsViewVueWidget/JsvQrcode/JsvQrcode.vue.d.ts +8 -7
- package/bin/types/utils/JsViewVueWidget/JsvRadarChart.vue.d.ts +95 -12
- package/bin/types/utils/JsViewVueWidget/JsvRipple/Constant.d.ts +2 -2
- package/bin/types/utils/JsViewVueWidget/JsvRipple/JsvRipple.vue.d.ts +51 -78
- package/bin/types/utils/JsViewVueWidget/JsvScaleTextBox.vue.d.ts +5 -4
- package/bin/types/utils/JsViewVueWidget/JsvScrollBox/JsvScrollBox.vue.d.ts +84 -193
- package/bin/types/utils/JsViewVueWidget/JsvScrollBox/JsvScrollFollow.vue.d.ts +23 -148
- package/bin/types/utils/JsViewVueWidget/JsvSector.vue.d.ts +56 -9
- package/bin/types/utils/JsViewVueWidget/JsvSmoothSlideContainer.vue.d.ts +22 -67
- package/bin/types/utils/JsViewVueWidget/JsvSpray/JsvSpray.vue.d.ts +44 -10
- package/bin/types/utils/JsViewVueWidget/JsvSpriteAnim/JsvSpriteAnim.vue.d.ts +47 -14
- package/bin/types/utils/JsViewVueWidget/JsvSpriteAnim/JsvSpriteLoader.vue.d.ts +26 -67
- package/bin/types/utils/JsViewVueWidget/JsvSwiper/Indicator.vue.d.ts +7 -6
- package/bin/types/utils/JsViewVueWidget/JsvSwiper/JsvSmoothSwiper.vue.d.ts +147 -109
- package/bin/types/utils/JsViewVueWidget/JsvSwiper/JsvSwiper.vue.d.ts +173 -16
- package/bin/types/utils/JsViewVueWidget/JsvSwiper/JsvSwiper2.vue.d.ts +216 -139
- package/bin/types/utils/JsViewVueWidget/JsvSwiper3D/Indicator.vue.d.ts +7 -6
- package/bin/types/utils/JsViewVueWidget/JsvSwiper3D/JsvSwiper.vue.d.ts +101 -96
- package/bin/types/utils/JsViewVueWidget/JsvTextBox.vue.d.ts +89 -74
- package/bin/types/utils/JsViewVueWidget/JsvTextureAnim/JsvTextureAnim.vue.d.ts +21 -20
- package/bin/types/utils/JsViewVueWidget/JsvTouchModeSwitcher.vue.d.ts +43 -70
- package/bin/types/utils/JsViewVueWidget/JsvVideo.vue.d.ts +6 -5
- package/bin/types/utils/JsViewVueWidget/JsvVisibleSensor/JsvVisibleSensor.vue.d.ts +62 -82
- package/bin/types/utils/JsViewVueWidget/JsvVisibleSensor/index.d.ts +95 -74
- package/bin/types/utils/JsViewVueWidget/TypesDiv/JsvPosterDiv.vue.d.ts +51 -0
- package/bin/types/utils/JsViewVueWidget/TypesDiv/JsvPosterImage.vue.d.ts +105 -0
- package/bin/types/utils/JsViewVueWidget/TypesDiv/JsvSmartDiv.vue.d.ts +51 -0
- package/bin/types/utils/JsViewVueWidget/TypesDiv/JsvSmartImage.vue.d.ts +105 -0
- package/bin/types/utils/JsViewVueWidget/index.d.ts +5 -3
- package/package.json +2 -2
- package/tools/jsview-vue-build.mjs +13 -9
- package/tsconfig.json +2 -2
- package/utils/JsViewEngineWidget/JsvFocus/JsvFocusBlock.vue +32 -16
- package/utils/JsViewEngineWidget/JsvFocus/JsvFocusHub.ts +24 -2
- package/utils/JsViewEngineWidget/MetroWidget/Const.ts +5 -0
- package/utils/JsViewEngineWidget/MetroWidget/ListWidget.vue +183 -89
- package/utils/JsViewEngineWidget/MetroWidget/MetroWidget.vue +269 -122
- package/utils/JsViewEngineWidget/MetroWidget/MetroWidgetSetup.js +989 -357
- package/utils/JsViewEngineWidget/MetroWidget/PageUpdater.ts +41 -23
- package/utils/JsViewEngineWidget/MetroWidget/RenderItem.ts +138 -41
- package/utils/JsViewEngineWidget/MetroWidget/TaskManager.ts +1 -0
- package/utils/JsViewEngineWidget/MetroWidget/Utils.ts +6 -0
- package/utils/JsViewEngineWidget/MetroWidget/WidgetRectInfo.ts +2 -1
- package/utils/JsViewEngineWidget/RectUtils.js +1 -1
- package/utils/JsViewEngineWidget/SpatialNavigator/SpatialNavProvider.vue +50 -0
- package/utils/JsViewEngineWidget/SpatialNavigator/SpatialNavigationAlgorithm.ts +260 -0
- package/utils/JsViewEngineWidget/SpatialNavigator/SpatialNavigationNode.ts +32 -0
- package/utils/JsViewEngineWidget/SpatialNavigator/SpatialNavigator.ts +236 -0
- package/utils/JsViewEngineWidget/TemplateParser/CommonMetroTemplate.ts +342 -174
- package/utils/JsViewEngineWidget/TemplateParser/ListMetroTemplate.ts +101 -27
- package/utils/JsViewEngineWidget/TemplateParser/MetroTemplate.ts +12 -5
- package/utils/JsViewEngineWidget/TemplateParser/TemplateItemAdder.ts +109 -41
- package/utils/JsViewEngineWidget/WidgetCommon.ts +17 -7
- package/utils/JsViewEngineWidget/index.ts +7 -2
- package/utils/JsViewPlugin/JsvLatex/BrowserDomBuilder.js +46 -46
- package/utils/JsViewPlugin/JsvLatex/BrowserJsvLatex.vue +54 -41
- package/utils/JsViewPlugin/JsvLatex/GetVersion.js +65 -0
- package/utils/JsViewPlugin/JsvLatex/JsvLatex.vue +54 -12
- package/utils/JsViewPlugin/JsvLatex/JsvLatexBridgeProxy.js +10 -0
- package/utils/JsViewPlugin/JsvLatex/JsvLatexProxy.vue +15 -2
- package/utils/JsViewPlugin/JsvLatex/PluginLoader.js +63 -31
- package/utils/JsViewPlugin/JsvLatex/version.mjs +26 -13
- package/utils/JsViewPlugin/JsvPlayer/GetVersion.js +2 -1
- package/utils/JsViewPlugin/JsvPlayer/JsvMedia.js +402 -23
- package/utils/JsViewPlugin/JsvPlayer/JsvMediaBrowserInterface.js +100 -0
- package/utils/JsViewPlugin/JsvPlayer/JsvPlayer.vue +363 -468
- package/utils/JsViewPlugin/JsvPlayer/{BrowserJsvPlayer.vue → JsvPlayerBrowser-wasm.vue} +60 -10
- package/utils/JsViewPlugin/JsvPlayer/JsvPlayerBrowser.vue +511 -0
- package/utils/JsViewPlugin/JsvPlayer/index-0.9.js +52 -10
- package/utils/JsViewPlugin/JsvPlayer/index.js +58 -9
- package/utils/JsViewPlugin/JsvPlayer/package.json +8 -0
- package/utils/JsViewVueTools/BlobApi.ts +55 -0
- package/utils/JsViewVueTools/FeatureActive.ts +3 -0
- package/utils/JsViewVueTools/ForgeHandles.ts +3 -0
- package/utils/JsViewVueTools/JsvInteractionMode.js +16 -0
- package/utils/JsViewVueTools/JsvPreDownloader.ts +2 -2
- package/utils/JsViewVueTools/JsvRuntimeBridge.js +25 -18
- package/utils/JsViewVueTools/JsvTextTools.ts +9 -1
- package/utils/JsViewVueTools/JsvTextureStore/BitPalette/BitPalette.ts +180 -0
- package/utils/JsViewVueTools/JsvTextureStore/CanvasTexture/CommandList.ts +1 -0
- package/utils/JsViewVueTools/JsvTextureStore/CanvasTexture/DrawHelper.ts +304 -0
- package/utils/JsViewVueTools/JsvTextureStore/CanvasTexture/Path.ts +38 -0
- package/utils/JsViewVueTools/JsvTextureStore/CapturedTexture/CapturedTexture.ts +16 -1
- package/utils/JsViewVueTools/JsvTextureStore/JsvTextureStore.ts +154 -69
- package/utils/JsViewVueTools/JsvTextureStore/Store.ts +1 -1
- package/utils/JsViewVueTools/JsvTextureStore/TextureBuilder.ts +92 -0
- package/utils/JsViewVueTools/JsvTextureStore/index.js +2 -0
- package/utils/JsViewVueTools/index.js +3 -1
- package/utils/JsViewVueWidget/JsvApic/JsvApic2/JsvApic2.vue +111 -86
- package/utils/JsViewVueWidget/JsvClipDiv/JsvClipDiv.vue +1 -1
- package/utils/JsViewVueWidget/JsvDragBox/JsvDragBox.vue +11 -2
- package/utils/JsViewVueWidget/JsvDriftScope/JsvDriftScope.vue +1 -1
- package/utils/JsViewVueWidget/JsvEnableRenderBreak.vue +6 -0
- package/utils/JsViewVueWidget/JsvFlexCell/JsvFlexDiv.vue +11 -5
- package/utils/JsViewVueWidget/JsvFlexCell/JsvScreenFlex.vue +3 -1
- package/utils/JsViewVueWidget/JsvFragShaderView/JsvFragShaderView.vue +23 -11
- package/utils/JsViewVueWidget/JsvFreeMoveActor/ActorControl.ts +242 -25
- package/utils/JsViewVueWidget/JsvFreeMoveActor/{FreeMoveActor.vue → JsvFreeMoveActor.vue} +1 -1
- package/utils/JsViewVueWidget/JsvFreeMoveActor/SetAction.ts +11 -5
- package/utils/JsViewVueWidget/JsvFreeMoveActor/SetCondition.ts +118 -6
- package/utils/JsViewVueWidget/JsvFreeMoveActor/SetState.ts +56 -14
- package/utils/JsViewVueWidget/JsvFreeMoveActor/index.js +2 -1
- package/utils/JsViewVueWidget/JsvInput/EditViewOperator.ts +11 -2
- package/utils/JsViewVueWidget/JsvInput/JsvInput.vue +30 -2
- package/utils/JsViewVueWidget/JsvLine/JsvLine.vue +24 -7
- package/utils/JsViewVueWidget/JsvMarquee.vue +1 -1
- package/utils/JsViewVueWidget/JsvNativeSharedDiv.vue +12 -10
- package/utils/JsViewVueWidget/JsvNinePatch.vue +13 -8
- package/utils/JsViewVueWidget/JsvPieChart.vue +93 -70
- package/utils/JsViewVueWidget/JsvPreload/JsvPreload.vue +32 -29
- package/utils/JsViewVueWidget/JsvQrcode/JsvQrcode.vue +2 -1
- package/utils/JsViewVueWidget/JsvScrollBox/JsvScrollBox.vue +25 -3
- package/utils/JsViewVueWidget/JsvScrollBox/JsvScrollFollow.vue +0 -3
- package/utils/JsViewVueWidget/JsvSector.vue +66 -28
- package/utils/JsViewVueWidget/JsvTextBox.vue +30 -1
- package/utils/JsViewVueWidget/JsvTouchModeSwitcher.vue +56 -14
- package/utils/JsViewVueWidget/JsvVisibleSensor/JsvVisibleSensor.vue +8 -6
- package/utils/JsViewVueWidget/TypesDiv/JsvPosterDiv.vue +54 -0
- package/utils/JsViewVueWidget/TypesDiv/JsvPosterImage.vue +88 -0
- package/utils/JsViewVueWidget/TypesDiv/JsvSmartDiv.vue +177 -0
- package/utils/JsViewVueWidget/TypesDiv/JsvSmartImage.vue +267 -0
- package/utils/JsViewVueWidget/index.js +6 -2
- package/bin/browser/BrowserAudio.vue.mjs +0 -258
- package/bin/browser/BrowserJsvLatex.vue.mjs +0 -145
- package/bin/types/utils/JsViewPlugin/JsvLatex/version.d.ts +0 -10
- package/bin/types/utils/JsViewVueTools/JsvTextureStore/DominantColor/GetDominantColor.d.ts +0 -7
- package/bin/types/utils/JsViewVueWidget/JsvFreeMoveActor/FreeMoveActor.vue.d.ts +0 -78
- package/bin/types/utils/JsViewVueWidget/JsvPosterDiv.vue.d.ts +0 -63
- package/bin/types/utils/JsViewVueWidget/JsvPosterImage.vue.d.ts +0 -78
- package/utils/JsViewPlugin/JsvLatex/version.js +0 -24
- package/utils/JsViewVueTools/JsvTextureStore/DominantColor/GetDominantColor.ts +0 -36
- package/utils/JsViewVueWidget/JsvPosterDiv.vue +0 -56
- package/utils/JsViewVueWidget/JsvPosterImage.vue +0 -105
- /package/utils/JsViewPlugin/JsvPlayer/{BrowserJsvPlayer-0.9.vue → JsvPlayerBrowser-0.9.vue} +0 -0
|
@@ -0,0 +1,267 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
* @file
|
|
3
|
+
*
|
|
4
|
+
* 【模块 export 内容】
|
|
5
|
+
* JsvSmartImage:Vue高阶组件,可配置默认背景图(通过slot), 支持AB图片切换, 并设置color space 和 texture size
|
|
6
|
+
* props说明:
|
|
7
|
+
* style {Object} 包含left/top/width/height/border-radius的style设置
|
|
8
|
+
* colorSpace {String} 颜色空间,调整其他颜色空间可以节省内存,默认RGBA_8888
|
|
9
|
+
* imageCompress {boolean} 是否压缩图片, 默认关闭
|
|
10
|
+
* src {string} 图片的加载地址
|
|
11
|
+
* fadeIn: {boolean} 图片加载完成是否有淡入效果,默认为关闭
|
|
12
|
+
* enableAA: {boolean} 启用非全局的抗锯齿处理,不过这个处理会使绘制的矩形比原尺寸每边少2~3像素点, 默认为关闭
|
|
13
|
+
* syncDraw: {boolean} 是否同步绘制,默认false,表示异步绘制,如果设置为true,则表示将尝试同步绘制
|
|
14
|
+
* (与JsvDownloader完成预下载的图片会进行同步绘制,以确保图片的完整性)
|
|
15
|
+
* altImages: {Array<string>} AB图片地址组, 当非null时, style中的backgroundImage/backgroundColor将被忽略,
|
|
16
|
+
* altIndex: {number} AB图片索引, 当altImages不为null时, 有效, 默认为0
|
|
17
|
+
* altSync: {boolean} AB图片是否同步绘制,默认false
|
|
18
|
+
false:异步模式: b图加载完成后再进行自动切换, 建议大尺寸海报使用此模式
|
|
19
|
+
true:同步模式: 同时加载a图和b图(但b图不可见), 同时加载更耗内存, 建议小尺寸的button使用
|
|
20
|
+
-->
|
|
21
|
+
|
|
22
|
+
<script setup>
|
|
23
|
+
import {
|
|
24
|
+
reactive,
|
|
25
|
+
watch,
|
|
26
|
+
watchEffect,
|
|
27
|
+
computed,
|
|
28
|
+
shallowRef,
|
|
29
|
+
toRaw,
|
|
30
|
+
useAttrs,
|
|
31
|
+
} from "vue";
|
|
32
|
+
import { JsvPerformance } from "../../JsViewVueTools/JsvPerformance.ts";
|
|
33
|
+
|
|
34
|
+
const props = defineProps({
|
|
35
|
+
colorSpace: {
|
|
36
|
+
type: String,
|
|
37
|
+
default: "RGBA_8888",
|
|
38
|
+
},
|
|
39
|
+
imageCompress: {
|
|
40
|
+
type: Boolean,
|
|
41
|
+
default: false,
|
|
42
|
+
},
|
|
43
|
+
// isPosterImage废弃...
|
|
44
|
+
isPosterImage: {
|
|
45
|
+
type: Boolean,
|
|
46
|
+
default: false,
|
|
47
|
+
},
|
|
48
|
+
fadeIn: {
|
|
49
|
+
type: Boolean,
|
|
50
|
+
default: false,
|
|
51
|
+
},
|
|
52
|
+
src: {
|
|
53
|
+
type: String,
|
|
54
|
+
default: null,
|
|
55
|
+
},
|
|
56
|
+
enableAA: {
|
|
57
|
+
type: Boolean,
|
|
58
|
+
default: false,
|
|
59
|
+
},
|
|
60
|
+
style: Object,
|
|
61
|
+
syncDraw: {
|
|
62
|
+
type: Boolean,
|
|
63
|
+
default: false,
|
|
64
|
+
},
|
|
65
|
+
altImages: {
|
|
66
|
+
type: Array,
|
|
67
|
+
default: null,
|
|
68
|
+
},
|
|
69
|
+
altIndex: {
|
|
70
|
+
type: Number,
|
|
71
|
+
default: 0,
|
|
72
|
+
},
|
|
73
|
+
altSync: {
|
|
74
|
+
type: Boolean,
|
|
75
|
+
default: false,
|
|
76
|
+
},
|
|
77
|
+
});
|
|
78
|
+
|
|
79
|
+
const getScaleddown = () => {
|
|
80
|
+
return props.imageCompress ? "true" : "false";
|
|
81
|
+
};
|
|
82
|
+
|
|
83
|
+
const getIsPosterImage = () => {
|
|
84
|
+
return JsvPerformance.getPosterSingleThreadDecode() || props.isPosterImage
|
|
85
|
+
? "true"
|
|
86
|
+
: "false";
|
|
87
|
+
};
|
|
88
|
+
|
|
89
|
+
let rCommonStyle = reactive({});
|
|
90
|
+
let rEnableAA = shallowRef("0");
|
|
91
|
+
|
|
92
|
+
let rImageStyle = reactive({});
|
|
93
|
+
|
|
94
|
+
const cMyAttars = useAttrs();
|
|
95
|
+
|
|
96
|
+
const rFrontEndImageAttr = computed(() => {
|
|
97
|
+
let frontEndImageAttr = {
|
|
98
|
+
"data-jsv-vw-enable-fade": props.fadeIn,
|
|
99
|
+
"data-jsv-img-scaledown-tex": getScaleddown(),
|
|
100
|
+
"data-jsv-img-color-space": props.colorSpace,
|
|
101
|
+
"data-jsv-img-poster-image": getIsPosterImage(),
|
|
102
|
+
"data-jsv-img-enable-aa": rEnableAA,
|
|
103
|
+
"data-jsv-perf-loadtex": props.syncDraw ? "sync" : "auto",
|
|
104
|
+
...cMyAttars, // 接管 onload 等额外定义attr
|
|
105
|
+
};
|
|
106
|
+
return frontEndImageAttr;
|
|
107
|
+
});
|
|
108
|
+
|
|
109
|
+
const rBackendImageAttr = computed(() => {
|
|
110
|
+
// backEnd不能被 $attrs中onload覆盖, 在此先不引入 $attrs
|
|
111
|
+
return {
|
|
112
|
+
"data-jsv-img-scaledown-tex": getScaleddown(),
|
|
113
|
+
"data-jsv-img-color-space": props.colorSpace,
|
|
114
|
+
"data-jsv-img-poster-image": getIsPosterImage(),
|
|
115
|
+
"data-jsv-perf-loadtex": "async",
|
|
116
|
+
"data-jsv-vw-hide-keep": "true",
|
|
117
|
+
};
|
|
118
|
+
});
|
|
119
|
+
|
|
120
|
+
|
|
121
|
+
let rImageSetList = shallowRef([]);
|
|
122
|
+
const rebuildSrcArray = () => {
|
|
123
|
+
if (props.altImages && props.altImages.length > 0) {
|
|
124
|
+
if (props.altImages.length != rImageSetList.value.length) {
|
|
125
|
+
rImageSetList.value = Array.from({ length: props.altImages.length },
|
|
126
|
+
() => (shallowRef(null))
|
|
127
|
+
);
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
// 遍历 props.altImages,如果变化则进行填充
|
|
131
|
+
for (let i = 0; i < props.altImages.length; i++) {
|
|
132
|
+
if (rImageSetList.value[i].value != props.altImages[i]) {
|
|
133
|
+
rImageSetList.value[i].value = toRaw(props.altImages[i]);
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
} else {
|
|
137
|
+
if (rImageSetList.value.length != 1) {
|
|
138
|
+
rImageSetList.value = [shallowRef(toRaw(props.src))];
|
|
139
|
+
} else if (rImageSetList.value[0].value != props.src) {
|
|
140
|
+
rImageSetList.value[0].value = toRaw(props.src);
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
};
|
|
144
|
+
watch(
|
|
145
|
+
() => ({
|
|
146
|
+
srcArray: props.altImages,
|
|
147
|
+
src: props.src,
|
|
148
|
+
}),
|
|
149
|
+
() => {
|
|
150
|
+
rebuildSrcArray();
|
|
151
|
+
resetAsyncFrontEndImageUrl();
|
|
152
|
+
}
|
|
153
|
+
);
|
|
154
|
+
rebuildSrcArray();
|
|
155
|
+
|
|
156
|
+
const rebuildStyle = () => {
|
|
157
|
+
if (props.style) {
|
|
158
|
+
// 提取left, top, width, height, 并去掉干扰项 backgroundImage backgroundColor(会引起同位置重复图片绘制)
|
|
159
|
+
let {
|
|
160
|
+
left,
|
|
161
|
+
top,
|
|
162
|
+
width,
|
|
163
|
+
height,
|
|
164
|
+
transformStyle,
|
|
165
|
+
backgroundImage,
|
|
166
|
+
backgroundColor,
|
|
167
|
+
...others
|
|
168
|
+
} = props.style;
|
|
169
|
+
|
|
170
|
+
// 承接x,y偏移和动画设置, 规避默认淡出动画被影响
|
|
171
|
+
rCommonStyle.left = left;
|
|
172
|
+
rCommonStyle.top = top;
|
|
173
|
+
rCommonStyle.transformStyle = transformStyle;
|
|
174
|
+
|
|
175
|
+
// 设置style
|
|
176
|
+
rImageStyle.width = width;
|
|
177
|
+
rImageStyle.height = height;
|
|
178
|
+
Object.assign(rImageStyle, others);
|
|
179
|
+
}
|
|
180
|
+
};
|
|
181
|
+
// 第一次进行style创建
|
|
182
|
+
rebuildStyle();
|
|
183
|
+
watch(
|
|
184
|
+
() => props.style,
|
|
185
|
+
() => {
|
|
186
|
+
rebuildStyle();
|
|
187
|
+
}
|
|
188
|
+
);
|
|
189
|
+
|
|
190
|
+
// 监听enableAA变化
|
|
191
|
+
watchEffect(() => {
|
|
192
|
+
rEnableAA.value = props.enableAA ? "1" : "0";
|
|
193
|
+
});
|
|
194
|
+
|
|
195
|
+
const rActiveIndex = computed(() => {
|
|
196
|
+
let index = 0;
|
|
197
|
+
if (props.altIndex >= rImageSetList.value.length) {
|
|
198
|
+
index = rImageSetList.value.length - 1;
|
|
199
|
+
} else if (props.altIndex >= 0) {
|
|
200
|
+
index = props.altIndex;
|
|
201
|
+
}
|
|
202
|
+
return index;
|
|
203
|
+
});
|
|
204
|
+
|
|
205
|
+
// 小模块, 处理asyncLoad图片加载
|
|
206
|
+
let rBackendImageUrl = shallowRef(null);
|
|
207
|
+
let rFrontEndImageUrl = shallowRef(null);
|
|
208
|
+
|
|
209
|
+
const onBackendImageLoad = () => {
|
|
210
|
+
rFrontEndImageUrl.value = rBackendImageUrl.value;
|
|
211
|
+
rBackendImageUrl.value = null;
|
|
212
|
+
};
|
|
213
|
+
|
|
214
|
+
watch(
|
|
215
|
+
() => rActiveIndex.value,
|
|
216
|
+
(newVal, oldVal) => {
|
|
217
|
+
if (newVal !== oldVal) {
|
|
218
|
+
// 设置backend image url, 等待加载完成后, 替换前端图片
|
|
219
|
+
rBackendImageUrl.value = rImageSetList.value[newVal].value;
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
);
|
|
223
|
+
|
|
224
|
+
// 初始化首帧的FrontEndImageUrl
|
|
225
|
+
const resetAsyncFrontEndImageUrl = () => {
|
|
226
|
+
if (rImageSetList.value.length > 0) {
|
|
227
|
+
rFrontEndImageUrl.value = rImageSetList.value[rActiveIndex.value].value;
|
|
228
|
+
} else {
|
|
229
|
+
rFrontEndImageUrl.value = null;
|
|
230
|
+
}
|
|
231
|
+
};
|
|
232
|
+
resetAsyncFrontEndImageUrl();
|
|
233
|
+
</script>
|
|
234
|
+
|
|
235
|
+
<template>
|
|
236
|
+
<div :style="rCommonStyle">
|
|
237
|
+
<slot />
|
|
238
|
+
<div
|
|
239
|
+
v-if="rImageSetList.length > 1 || rImageSetList[0].value"
|
|
240
|
+
:data-jsv-vw-mask-poster-on-top="true"
|
|
241
|
+
>
|
|
242
|
+
<div v-if="altSync">
|
|
243
|
+
<img
|
|
244
|
+
v-for="(image_set, idx) in rImageSetList"
|
|
245
|
+
:key="image_set.value"
|
|
246
|
+
:data-jsv-vw-hide-keep="rActiveIndex !== idx ? 'true' : 'false'"
|
|
247
|
+
:style="rImageStyle"
|
|
248
|
+
:src="image_set.value"
|
|
249
|
+
v-bind="rFrontEndImageAttr"
|
|
250
|
+
/>
|
|
251
|
+
</div>
|
|
252
|
+
<div v-else>
|
|
253
|
+
<img
|
|
254
|
+
:style="rImageStyle"
|
|
255
|
+
:src="rBackendImageUrl"
|
|
256
|
+
@load="onBackendImageLoad"
|
|
257
|
+
v-bind="rBackendImageAttr"
|
|
258
|
+
/>
|
|
259
|
+
<img
|
|
260
|
+
:style="rImageStyle"
|
|
261
|
+
:src="rFrontEndImageUrl"
|
|
262
|
+
v-bind="rFrontEndImageAttr"
|
|
263
|
+
/>
|
|
264
|
+
</div>
|
|
265
|
+
</div>
|
|
266
|
+
</div>
|
|
267
|
+
</template>
|
|
@@ -14,7 +14,9 @@ export { LoopType, ApicEndState } from "./JsvApic/JsvCommonLoopToolBase.js";
|
|
|
14
14
|
export { default as JsvInput, InputType } from "./JsvInput";
|
|
15
15
|
export {
|
|
16
16
|
default as JsvPreload,
|
|
17
|
+
default as JsvPicKeepAlive,
|
|
17
18
|
buildPreloadInfo,
|
|
19
|
+
buildLoadInfo,
|
|
18
20
|
buildDownloadInfo,
|
|
19
21
|
} from "./JsvPreload";
|
|
20
22
|
export { default as JsvQrcode } from "./JsvQrcode/JsvQrcode.vue";
|
|
@@ -35,8 +37,10 @@ export { default as JsvHole } from "./JsvHole.js";
|
|
|
35
37
|
export { default as JsvMarquee } from "./JsvMarquee.vue";
|
|
36
38
|
export { default as JsvMaskClipDiv } from "./JsvMaskClipDiv.vue";
|
|
37
39
|
export { default as JsvNinePatch } from "./JsvNinePatch.vue";
|
|
38
|
-
export { default as JsvPosterDiv } from "./JsvPosterDiv.vue";
|
|
39
|
-
export { default as JsvPosterImage } from "./JsvPosterImage.vue";
|
|
40
|
+
export { default as JsvPosterDiv } from "./TypesDiv/JsvPosterDiv.vue";
|
|
41
|
+
export { default as JsvPosterImage } from "./TypesDiv/JsvPosterImage.vue";
|
|
42
|
+
export { default as JsvSmartDiv } from "./TypesDiv/JsvSmartDiv.vue";
|
|
43
|
+
export { default as JsvSmartImage } from "./TypesDiv/JsvSmartImage.vue";
|
|
40
44
|
export { default as JsvScaleTextBox } from "./JsvScaleTextBox.vue";
|
|
41
45
|
export { JsvSoundPool } from "./JsvSoundPool.js";
|
|
42
46
|
export { default as JsvTextBox } from "./JsvTextBox.vue";
|
|
@@ -1,258 +0,0 @@
|
|
|
1
|
-
import { openBlock, createElementBlock, resolveComponent, createBlock, mergeProps } from 'vue';
|
|
2
|
-
import { _ as _export_sfc } from '../export-sfc.mjs';
|
|
3
|
-
|
|
4
|
-
/*
|
|
5
|
-
+ @file {@link file://./../../../../../utils/JsViewPlugin/JsvAudio/BrowserAudio/JsvSystemAudio.vue}
|
|
6
|
-
*/
|
|
7
|
-
const _sfc_main$1 = {
|
|
8
|
-
props: {
|
|
9
|
-
/**
|
|
10
|
-
* 回调函数,播放器对象通知接口
|
|
11
|
-
* @param {Object} video对象,可以通过此video对象调用video相关属性和方法,具体属性和方法定义见JsvMedia.js文件里相关说明。
|
|
12
|
-
*/
|
|
13
|
-
onRef: { type: Function, default: () => {
|
|
14
|
-
} },
|
|
15
|
-
/**
|
|
16
|
-
* 属性,Boolean类型,true表示自动播放,默认false。
|
|
17
|
-
*/
|
|
18
|
-
autoplay: { type: Boolean, default: false },
|
|
19
|
-
/**
|
|
20
|
-
* 属性,Boolean类型,true表示静音,默认false。
|
|
21
|
-
*/
|
|
22
|
-
muted: { type: Boolean, default: false },
|
|
23
|
-
/**
|
|
24
|
-
* 属性,Boolean类型,true表示循环播放,默认false。
|
|
25
|
-
*/
|
|
26
|
-
loop: { type: Boolean, default: false },
|
|
27
|
-
/**
|
|
28
|
-
* 属性,String类型,播放地址。
|
|
29
|
-
*/
|
|
30
|
-
src: { type: String, default: "" },
|
|
31
|
-
/**
|
|
32
|
-
* 回调函数,播放结束时通过此回调接口通知。
|
|
33
|
-
*/
|
|
34
|
-
onEnded: {
|
|
35
|
-
type: Function,
|
|
36
|
-
default: () => {
|
|
37
|
-
return {};
|
|
38
|
-
}
|
|
39
|
-
},
|
|
40
|
-
/**
|
|
41
|
-
* 回调函数,播放错误时通过此接口通知。
|
|
42
|
-
* @param {int} 错误类型,当前定义了四种错误。1是异常中断;2是网络错误;3是解码错误;4是格式不支持。
|
|
43
|
-
*/
|
|
44
|
-
onError: {
|
|
45
|
-
type: Function,
|
|
46
|
-
default: () => {
|
|
47
|
-
return {};
|
|
48
|
-
}
|
|
49
|
-
},
|
|
50
|
-
/**
|
|
51
|
-
* 回调函数,开始加载,设置完播放地址后,上报此事件。
|
|
52
|
-
*/
|
|
53
|
-
onLoadStart: {
|
|
54
|
-
type: Function,
|
|
55
|
-
default: () => {
|
|
56
|
-
return {};
|
|
57
|
-
}
|
|
58
|
-
},
|
|
59
|
-
/**
|
|
60
|
-
* 回调函数,视频准备好后触发。
|
|
61
|
-
*/
|
|
62
|
-
onLoadedMetaData: {
|
|
63
|
-
type: Function,
|
|
64
|
-
default: () => {
|
|
65
|
-
return {};
|
|
66
|
-
}
|
|
67
|
-
},
|
|
68
|
-
/**
|
|
69
|
-
* 回调函数,视频准备好后触发,这个时候可以正常seek。
|
|
70
|
-
*/
|
|
71
|
-
onLoad: {
|
|
72
|
-
type: Function,
|
|
73
|
-
default: () => {
|
|
74
|
-
return {};
|
|
75
|
-
}
|
|
76
|
-
},
|
|
77
|
-
/**
|
|
78
|
-
* 回调函数,音频失去焦点后触发此事件,可能会导致pause(点播)或者离开频道(直播)。
|
|
79
|
-
*/
|
|
80
|
-
onAudioFocusLoss: {
|
|
81
|
-
type: Function,
|
|
82
|
-
default: () => {
|
|
83
|
-
return {};
|
|
84
|
-
}
|
|
85
|
-
},
|
|
86
|
-
/**
|
|
87
|
-
* 回调函数,音频获取焦点后触发此事件,可能会触发resume(点播)或者加入频道(直播)。
|
|
88
|
-
*/
|
|
89
|
-
onAudioFocusGain: {
|
|
90
|
-
type: Function,
|
|
91
|
-
default: () => {
|
|
92
|
-
return {};
|
|
93
|
-
}
|
|
94
|
-
},
|
|
95
|
-
/*
|
|
96
|
-
*预下载音频
|
|
97
|
-
*/
|
|
98
|
-
preDownload: {
|
|
99
|
-
type: Boolean,
|
|
100
|
-
default: false
|
|
101
|
-
}
|
|
102
|
-
},
|
|
103
|
-
setup() {
|
|
104
|
-
return {
|
|
105
|
-
audio: null
|
|
106
|
-
};
|
|
107
|
-
},
|
|
108
|
-
mounted() {
|
|
109
|
-
this.Jsvinit();
|
|
110
|
-
},
|
|
111
|
-
beforeUnmount() {
|
|
112
|
-
if (this.audio != null) {
|
|
113
|
-
this.audio.unload?.();
|
|
114
|
-
this.audio.releaseResource?.();
|
|
115
|
-
this.audio.onPlatformDestroy?.();
|
|
116
|
-
this.onRef?.(null);
|
|
117
|
-
this.unregisterOnVisibilityChange();
|
|
118
|
-
}
|
|
119
|
-
},
|
|
120
|
-
methods: {
|
|
121
|
-
registerEvent() {
|
|
122
|
-
if (this.audio) {
|
|
123
|
-
this.audio.addEventListener("ended", this.onEnded);
|
|
124
|
-
this.audio.addEventListener("error", this.onError);
|
|
125
|
-
this.audio.addEventListener("loadstart", this.onLoadStart);
|
|
126
|
-
this.audio.addEventListener("loadedmetadata", this.onLoadedMetaData);
|
|
127
|
-
this.audio.addEventListener("loadeddata", this.onLoad);
|
|
128
|
-
this.audio.addEventListener("audiofocusloss", this.onAudioFocusLoss);
|
|
129
|
-
this.audio.addEventListener("audiofocusgain", this.onAudioFocusGain);
|
|
130
|
-
}
|
|
131
|
-
},
|
|
132
|
-
onVisibilityChange(status) {
|
|
133
|
-
if (status.status === "show") {
|
|
134
|
-
this.onJsViewShow();
|
|
135
|
-
} else if (status.status === "hide") {
|
|
136
|
-
this.onJsViewHide();
|
|
137
|
-
}
|
|
138
|
-
},
|
|
139
|
-
registerOnVisibilityChange() {
|
|
140
|
-
if (window.JsView) {
|
|
141
|
-
window.JsView.onVisibilityChange(this.onVisibilityChange);
|
|
142
|
-
}
|
|
143
|
-
},
|
|
144
|
-
unregisterOnVisibilityChange() {
|
|
145
|
-
if (window.JsView) {
|
|
146
|
-
window.JsView.removeEventCallback(this.onVisibilityChange);
|
|
147
|
-
}
|
|
148
|
-
},
|
|
149
|
-
onJsViewHide() {
|
|
150
|
-
if (this.audio) {
|
|
151
|
-
if (!this.audio.paused) {
|
|
152
|
-
this.stopByOnHide = true;
|
|
153
|
-
}
|
|
154
|
-
this.audio.unload();
|
|
155
|
-
}
|
|
156
|
-
},
|
|
157
|
-
onJsViewShow() {
|
|
158
|
-
if (!this.audio) {
|
|
159
|
-
this.Jsvinit();
|
|
160
|
-
}
|
|
161
|
-
if (this.stopByOnHide) {
|
|
162
|
-
this.stopByOnHide = false;
|
|
163
|
-
this.Jsvinit();
|
|
164
|
-
}
|
|
165
|
-
},
|
|
166
|
-
Jsvinit() {
|
|
167
|
-
this.audio = new Audio();
|
|
168
|
-
this.registerEvent();
|
|
169
|
-
if (this.src && this.src !== "") {
|
|
170
|
-
let realUrl;
|
|
171
|
-
if (window.JsView) {
|
|
172
|
-
realUrl = new window.JsView.Dom.UrlRef(this.src).href;
|
|
173
|
-
} else {
|
|
174
|
-
realUrl = this.src;
|
|
175
|
-
}
|
|
176
|
-
this.audio.src = realUrl;
|
|
177
|
-
}
|
|
178
|
-
if (this.autoplay) {
|
|
179
|
-
this.audio.autoplay = this.autoplay;
|
|
180
|
-
}
|
|
181
|
-
if (this.muted) {
|
|
182
|
-
this.audio.muted = this.muted;
|
|
183
|
-
}
|
|
184
|
-
if (this.loop) {
|
|
185
|
-
this.audio.loop = this.loop;
|
|
186
|
-
}
|
|
187
|
-
if (this.preDownload) {
|
|
188
|
-
this.audio.predownload = this.preDownload;
|
|
189
|
-
}
|
|
190
|
-
this.onRef?.(this.audio);
|
|
191
|
-
Promise.resolve().then(() => {
|
|
192
|
-
if (this.audio) {
|
|
193
|
-
this.audio.confirmInitSetup?.();
|
|
194
|
-
}
|
|
195
|
-
});
|
|
196
|
-
this.registerOnVisibilityChange();
|
|
197
|
-
}
|
|
198
|
-
}
|
|
199
|
-
};
|
|
200
|
-
function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
|
|
201
|
-
return openBlock(), createElementBlock("div", {
|
|
202
|
-
style: { width: 1, height: 1 },
|
|
203
|
-
backgroundColor: "rgba(0,0,0,1)"
|
|
204
|
-
});
|
|
205
|
-
}
|
|
206
|
-
const JsvSystemAudio = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["render", _sfc_render$1]]);
|
|
207
|
-
|
|
208
|
-
/*
|
|
209
|
-
+ @file {@link file://./../../../../../utils/JsViewPlugin/JsvAudio/BrowserAudio/BrowserAudio.vue}
|
|
210
|
-
*/
|
|
211
|
-
const _sfc_main = {
|
|
212
|
-
components: {
|
|
213
|
-
JsvSystemAudio
|
|
214
|
-
},
|
|
215
|
-
props: {
|
|
216
|
-
onRef: { type: Function, default: () => {
|
|
217
|
-
} }
|
|
218
|
-
},
|
|
219
|
-
setup() {
|
|
220
|
-
return {
|
|
221
|
-
audioRef: null
|
|
222
|
-
};
|
|
223
|
-
},
|
|
224
|
-
methods: {
|
|
225
|
-
onRefProxy(audio_ref) {
|
|
226
|
-
if (audio_ref != null) {
|
|
227
|
-
audio_ref.closeScreenSaver = () => {
|
|
228
|
-
};
|
|
229
|
-
audio_ref.openScreenSaver = () => {
|
|
230
|
-
};
|
|
231
|
-
audio_ref.unload = () => {
|
|
232
|
-
audio_ref.src = "";
|
|
233
|
-
};
|
|
234
|
-
}
|
|
235
|
-
this.audioRef = audio_ref;
|
|
236
|
-
}
|
|
237
|
-
},
|
|
238
|
-
mounted() {
|
|
239
|
-
if (this.audioRef && this.onRef) {
|
|
240
|
-
let audio_ref = this.audioRef;
|
|
241
|
-
this.audioRef = null;
|
|
242
|
-
this.onRef(audio_ref);
|
|
243
|
-
}
|
|
244
|
-
},
|
|
245
|
-
beforeUnmount() {
|
|
246
|
-
this.audioRef?.closeScreenSaver();
|
|
247
|
-
if (this.onRef) {
|
|
248
|
-
this.onRef(null);
|
|
249
|
-
}
|
|
250
|
-
}
|
|
251
|
-
};
|
|
252
|
-
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
253
|
-
const _component_jsv_system_audio = resolveComponent("jsv-system-audio");
|
|
254
|
-
return openBlock(), createBlock(_component_jsv_system_audio, mergeProps({ onRef: $options.onRefProxy }, _ctx.$attrs), null, 16, ["onRef"]);
|
|
255
|
-
}
|
|
256
|
-
const BrowserAudio = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
|
|
257
|
-
|
|
258
|
-
export { BrowserAudio as default };
|
|
@@ -1,145 +0,0 @@
|
|
|
1
|
-
import { shallowRef, ref, onBeforeUnmount, openBlock, createElementBlock, normalizeStyle, createElementVNode, unref } from 'vue';
|
|
2
|
-
import { Forge } from '@shijiu/jsview/dom/jsv-forge-define';
|
|
3
|
-
|
|
4
|
-
/*
|
|
5
|
-
+ @file {@link file://./../../../../utils/JsViewPlugin/JsvLatex/BrowserDomBuilder.js}
|
|
6
|
-
*/
|
|
7
|
-
const getHtmlStr = (libPath, latexStr, fontSize, width, height, color) => {
|
|
8
|
-
return `<html>
|
|
9
|
-
<head>
|
|
10
|
-
<style>
|
|
11
|
-
mjx-container[display="true"] {
|
|
12
|
-
margin: 0 0 !important;
|
|
13
|
-
}
|
|
14
|
-
body {
|
|
15
|
-
margin: 0 !important;
|
|
16
|
-
}
|
|
17
|
-
</style>
|
|
18
|
-
<script type="text/javascript">
|
|
19
|
-
MathJax = {
|
|
20
|
-
tex: {
|
|
21
|
-
inlineMath: [['$', '$'], ['\\\\(', '\\\\)']]
|
|
22
|
-
},
|
|
23
|
-
svg: {
|
|
24
|
-
fontCache: 'global'
|
|
25
|
-
}
|
|
26
|
-
};
|
|
27
|
-
function bodyOnLoad() {
|
|
28
|
-
let divElement = document.createElement("div");
|
|
29
|
-
divElement.style.display = "inline-block";
|
|
30
|
-
divElement.style.fontSize = "${fontSize}px";
|
|
31
|
-
divElement.style.color = "${color}";
|
|
32
|
-
divElement.innerHTML = String.raw\`${latexStr}\`;
|
|
33
|
-
//divElement.style.width = ${width} + "px";
|
|
34
|
-
document.body.appendChild(divElement);
|
|
35
|
-
|
|
36
|
-
MathJax.typesetPromise().then(() => {
|
|
37
|
-
// modify the DOM here
|
|
38
|
-
let formulaMetrics = MathJax.getMetricsFor(divElement, true);
|
|
39
|
-
let w = Math.min(${width}, divElement.clientWidth);
|
|
40
|
-
let scale = w / divElement.clientWidth;
|
|
41
|
-
divElement.style.fontSize = Math.floor(scale * ${fontSize}) + "px";
|
|
42
|
-
MathJax.typeset();
|
|
43
|
-
}).catch((err) => console.error(err.message));
|
|
44
|
-
}
|
|
45
|
-
<\/script>
|
|
46
|
-
<script type="text/javascript" src="${libPath}"><\/script>
|
|
47
|
-
</head>
|
|
48
|
-
<body onload="bodyOnLoad()">
|
|
49
|
-
</body>
|
|
50
|
-
</html>`;
|
|
51
|
-
};
|
|
52
|
-
|
|
53
|
-
/*
|
|
54
|
-
+ @file {@link file://./../../../../utils/JsViewPlugin/JsvLatex/BrowserJsvLatex.vue}
|
|
55
|
-
*/
|
|
56
|
-
const _sfc_main = {
|
|
57
|
-
__name: "BrowserJsvLatex",
|
|
58
|
-
props: {
|
|
59
|
-
latexStr: {
|
|
60
|
-
type: String,
|
|
61
|
-
required: true
|
|
62
|
-
},
|
|
63
|
-
width: {
|
|
64
|
-
type: Number,
|
|
65
|
-
required: true
|
|
66
|
-
},
|
|
67
|
-
height: {
|
|
68
|
-
type: Number,
|
|
69
|
-
default: 0
|
|
70
|
-
},
|
|
71
|
-
fontSize: {
|
|
72
|
-
type: Number,
|
|
73
|
-
default: 25
|
|
74
|
-
},
|
|
75
|
-
lineSpace: {
|
|
76
|
-
type: Number,
|
|
77
|
-
default: 10
|
|
78
|
-
},
|
|
79
|
-
color: {
|
|
80
|
-
type: String,
|
|
81
|
-
default: "#FFFFFF"
|
|
82
|
-
},
|
|
83
|
-
left: {
|
|
84
|
-
type: Number,
|
|
85
|
-
default: 0
|
|
86
|
-
},
|
|
87
|
-
top: {
|
|
88
|
-
type: Number,
|
|
89
|
-
default: 0
|
|
90
|
-
}
|
|
91
|
-
},
|
|
92
|
-
setup(__props) {
|
|
93
|
-
const props = __props;
|
|
94
|
-
function precessString(original) {
|
|
95
|
-
return "\\[\\begin{array}{l}" + original.replaceAll(/\\[\(\)\[\]]/g, "") + "\\end{array}\\]";
|
|
96
|
-
}
|
|
97
|
-
let innerViewId = shallowRef(-1);
|
|
98
|
-
const clientWidth = ref(props.width);
|
|
99
|
-
const clientHeight = ref(props.height);
|
|
100
|
-
let layoutView = new Forge.IFrameView();
|
|
101
|
-
layoutView.SetIframeSize(props.width, props.height);
|
|
102
|
-
layoutView.SetInnerHtml(
|
|
103
|
-
getHtmlStr(
|
|
104
|
-
"https://qcast-image.oss-cn-qingdao.aliyuncs.com/JsViewTestResource/DocResource/mathjax-tex-svg.txt",
|
|
105
|
-
precessString(props.latexStr),
|
|
106
|
-
props.fontSize,
|
|
107
|
-
props.width,
|
|
108
|
-
props.height,
|
|
109
|
-
props.color
|
|
110
|
-
)
|
|
111
|
-
);
|
|
112
|
-
const resizeObserver = new ResizeObserver((entries) => {
|
|
113
|
-
if (entries.length > 0) {
|
|
114
|
-
const e = entries[0];
|
|
115
|
-
if (clientHeight.value == 0) {
|
|
116
|
-
clientHeight.value = e.contentRect.height;
|
|
117
|
-
}
|
|
118
|
-
}
|
|
119
|
-
});
|
|
120
|
-
resizeObserver.observe(layoutView.GetIFrame());
|
|
121
|
-
innerViewId.value = Forge.sViewStore.add(new Forge.ViewInfo(layoutView));
|
|
122
|
-
onBeforeUnmount(() => {
|
|
123
|
-
if (innerViewId.value != -1) {
|
|
124
|
-
Forge.sViewStore.remove(innerViewId.value);
|
|
125
|
-
innerViewId.value = -1;
|
|
126
|
-
console.log("success remove innerview");
|
|
127
|
-
}
|
|
128
|
-
resizeObserver.unobserve(layoutView.GetIFrame());
|
|
129
|
-
});
|
|
130
|
-
return (_ctx, _cache) => {
|
|
131
|
-
return openBlock(), createElementBlock("div", {
|
|
132
|
-
style: normalizeStyle({
|
|
133
|
-
left: __props.left,
|
|
134
|
-
top: __props.top,
|
|
135
|
-
width: clientWidth.value,
|
|
136
|
-
height: clientHeight.value
|
|
137
|
-
})
|
|
138
|
-
}, [
|
|
139
|
-
createElementVNode("div", { "data-jsv-vw-innerview": unref(innerViewId) }, null, 8, ["data-jsv-vw-innerview"])
|
|
140
|
-
], 4);
|
|
141
|
-
};
|
|
142
|
-
}
|
|
143
|
-
};
|
|
144
|
-
|
|
145
|
-
export { _sfc_main as default };
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
export const packageName: string;
|
|
2
|
-
export const name: string;
|
|
3
|
-
export const version: string;
|
|
4
|
-
export const versionCodeMin: number;
|
|
5
|
-
export const versionCodeMax: number;
|
|
6
|
-
export const bridgeName: string;
|
|
7
|
-
export const className: string;
|
|
8
|
-
export const initMethod: string;
|
|
9
|
-
export const listener: string;
|
|
10
|
-
export const listener2: string;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* 使用ForgeTexture获取图片的dominant color, 注意, 此方法会hold住texture资源, 需要保证组件unmount时调用释放处理
|
|
3
|
-
* @param src 图片的src
|
|
4
|
-
* @param cbk 回调函数, 参数: info
|
|
5
|
-
* @returns 用于cancel的句柄,当cancel时,会清理对div和Callback的引用
|
|
6
|
-
*/
|
|
7
|
-
export declare function getDominantColorByForgeTexture(src: string, cbk: (i: any) => void): () => void;
|