@shijiu/jsview-vue 2.3.151-test.0 → 2.3.728-alpha.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/BrowserJsvLatex.vue.mjs +9 -90
- package/bin/jsview-vue.mjs +5964 -1833
- 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/ListWidget.vue.d.ts +225 -0
- package/bin/types/utils/JsViewEngineWidget/MetroWidget/MetroWidget.vue.d.ts +225 -0
- package/bin/types/utils/JsViewEngineWidget/MetroWidget/MetroWidgetDebugger.d.ts +5 -0
- package/bin/types/utils/JsViewEngineWidget/MetroWidget/MetroWidgetSetup.d.ts +25 -2
- 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/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 +70 -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 +3 -3
- package/bin/types/utils/JsViewEngineWidget/TemplateParser/ListMetroTemplate.d.ts +2 -1
- package/bin/types/utils/JsViewEngineWidget/TemplateParser/MetroTemplate.d.ts +12 -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/JsvLatex/BrowserDomBuilder.d.ts +0 -1
- package/bin/types/utils/JsViewPlugin/JsvLatex/GetVersion.d.ts +14 -0
- package/bin/types/utils/JsViewPlugin/JsvLatex/JsvLatex.vue.d.ts +3 -0
- package/bin/types/utils/JsViewPlugin/JsvLatex/JsvLatexBridgeProxy.d.ts +1 -0
- package/bin/types/utils/JsViewPlugin/JsvLatex/JsvLatexProxy.vue.d.ts +4 -1
- package/bin/types/utils/JsViewPlugin/JsvLatex/version.d.mts +29 -2
- package/bin/types/utils/JsViewPlugin/JsvPlayer/JsvMedia.d.ts +107 -4
- package/bin/types/utils/JsViewPlugin/JsvPlayer/JsvMediaBrowserInterface.d.ts +62 -0
- package/bin/types/utils/JsViewPlugin/JsvPlayer/JsvPlayer.vue.d.ts +94 -18
- package/bin/types/utils/JsViewPlugin/JsvPlayer/JsvPlayerBrowser-wasm.vue.d.ts +611 -0
- package/bin/types/utils/JsViewPlugin/JsvPlayer/{BrowserJsvPlayer.vue.d.ts → JsvPlayerBrowser.vue.d.ts} +24 -23
- package/bin/types/utils/JsViewPlugin/JsvPlayer/index-0.9.d.ts +77 -20
- package/bin/types/utils/JsViewPlugin/JsvPlayer/index.d.ts +77 -20
- package/bin/types/utils/JsViewVueTools/BlobApi.d.ts +38 -0
- 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 +10 -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 +3 -1
- package/bin/types/utils/JsViewVueWidget/JsvApic/JsvApic2/JsvApic2.vue.d.ts +12 -22
- package/bin/types/utils/JsViewVueWidget/JsvApic/JsvApic2/index.d.ts +12 -22
- package/bin/types/utils/JsViewVueWidget/JsvDomRenderer/JsViewHtmlToVNodesOptions.d.ts +101 -0
- package/bin/types/utils/JsViewVueWidget/JsvDomRenderer/JsvDomRenderer.d.ts +61 -0
- package/bin/types/utils/JsViewVueWidget/JsvDomRenderer/htmlToVNodes.d.ts +58 -0
- package/bin/types/utils/JsViewVueWidget/JsvDomRenderer/index.d.ts +1 -0
- package/bin/types/utils/JsViewVueWidget/JsvFragShaderView/JsvFragShaderView.vue.d.ts +1 -0
- package/bin/types/utils/JsViewVueWidget/JsvFreeMoveActor/ActorControl.d.ts +151 -18
- package/bin/types/utils/JsViewVueWidget/JsvFreeMoveActor/CallbackManager.d.ts +2 -1
- package/bin/types/utils/JsViewVueWidget/JsvFreeMoveActor/CmdTypes.d.ts +16 -0
- package/bin/types/utils/JsViewVueWidget/JsvFreeMoveActor/ForgeTypeDefine.d.ts +2 -1
- package/bin/types/utils/JsViewVueWidget/JsvFreeMoveActor/NexusNode.d.ts +3 -1
- package/bin/types/utils/JsViewVueWidget/JsvFreeMoveActor/SetAction.d.ts +55 -12
- package/bin/types/utils/JsViewVueWidget/JsvFreeMoveActor/SetCondition.d.ts +178 -35
- package/bin/types/utils/JsViewVueWidget/JsvFreeMoveActor/SetState.d.ts +119 -17
- package/bin/types/utils/JsViewVueWidget/JsvFreeMoveActor/index.d.ts +9 -3
- package/bin/types/utils/JsViewVueWidget/JsvInput/EditViewOperator.d.ts +4 -1
- package/bin/types/utils/JsViewVueWidget/JsvInput/JsvInput.vue.d.ts +22 -1
- package/bin/types/utils/JsViewVueWidget/JsvLine/JsvLine.vue.d.ts +1 -1
- package/bin/types/utils/JsViewVueWidget/JsvPieChart.vue.d.ts +2 -0
- package/bin/types/utils/JsViewVueWidget/JsvPreload/JsvPreload.vue.d.ts +5 -2
- package/bin/types/utils/JsViewVueWidget/JsvQrcode/JsvQrcode.vue.d.ts +1 -1
- package/bin/types/utils/JsViewVueWidget/JsvScrollBox/JsvScrollBox.vue.d.ts +39 -1
- package/bin/types/utils/JsViewVueWidget/JsvSector.vue.d.ts +1 -0
- package/bin/types/utils/JsViewVueWidget/JsvTextBox.vue.d.ts +15 -3
- package/bin/types/utils/JsViewVueWidget/JsvTextureAnim/JsvTextureAnim.vue.d.ts +22 -96
- package/bin/types/utils/JsViewVueWidget/JsvTouchModeSwitcher.vue.d.ts +6 -0
- package/bin/types/utils/JsViewVueWidget/{JsvPosterDiv.vue.d.ts → TypesDiv/JsvPosterDiv.vue.d.ts} +9 -0
- package/bin/types/utils/JsViewVueWidget/{JsvPosterImage.vue.d.ts → TypesDiv/JsvPosterImage.vue.d.ts} +15 -3
- package/bin/types/utils/JsViewVueWidget/TypesDiv/JsvSmartDiv.vue.d.ts +72 -0
- package/bin/types/utils/JsViewVueWidget/TypesDiv/JsvSmartImage.vue.d.ts +90 -0
- package/bin/types/utils/JsViewVueWidget/index.d.ts +6 -3
- package/dist/types/utils/JsViewEngineWidget/CheckType.d.ts +7 -0
- package/dist/types/utils/JsViewEngineWidget/JsvFocus/JsvFocusBlock.vue.d.ts +106 -0
- package/dist/types/utils/JsViewEngineWidget/JsvFocus/JsvFocusHub.d.ts +128 -0
- package/dist/types/utils/JsViewEngineWidget/JsvFocus/JsvFocusManager.d.ts +25 -0
- package/dist/types/utils/JsViewEngineWidget/MetroWidget/Const.d.ts +23 -0
- package/dist/types/utils/JsViewEngineWidget/MetroWidget/DebugFrame.vue.d.ts +12 -0
- package/dist/types/utils/JsViewEngineWidget/MetroWidget/DebugTools.d.ts +9 -0
- package/dist/types/utils/JsViewEngineWidget/MetroWidget/Dispatcher.d.ts +16 -0
- package/dist/types/utils/JsViewEngineWidget/MetroWidget/ListWidget.vue.d.ts +412 -0
- package/dist/types/utils/JsViewEngineWidget/MetroWidget/MetroWidget.vue.d.ts +751 -0
- package/dist/types/utils/JsViewEngineWidget/MetroWidget/MetroWidgetDebugger.d.ts +9 -0
- package/dist/types/utils/JsViewEngineWidget/MetroWidget/MetroWidgetSetup.d.ts +82 -0
- package/dist/types/utils/JsViewEngineWidget/MetroWidget/PageUpdater.d.ts +31 -0
- package/dist/types/utils/JsViewEngineWidget/MetroWidget/RenderItem.d.ts +80 -0
- package/dist/types/utils/JsViewEngineWidget/MetroWidget/Slide.d.ts +25 -0
- package/dist/types/utils/JsViewEngineWidget/MetroWidget/SlotComponent.vue.d.ts +52 -0
- package/dist/types/utils/JsViewEngineWidget/MetroWidget/TaskManager.d.ts +69 -0
- package/dist/types/utils/JsViewEngineWidget/MetroWidget/TokenGenerator.d.ts +4 -0
- package/dist/types/utils/JsViewEngineWidget/MetroWidget/Utils.d.ts +6 -0
- package/dist/types/utils/JsViewEngineWidget/MetroWidget/VisibleInfo.d.ts +20 -0
- package/dist/types/utils/JsViewEngineWidget/MetroWidget/WidgetRectInfo.d.ts +21 -0
- package/dist/types/utils/JsViewEngineWidget/RangeModel.d.ts +166 -0
- package/dist/types/utils/JsViewEngineWidget/RectUtils.d.ts +61 -0
- package/dist/types/utils/JsViewEngineWidget/SpatialNavigator/SpatialNavProvider.vue.d.ts +74 -0
- package/dist/types/utils/JsViewEngineWidget/SpatialNavigator/SpatialNavigationAlgorithm.d.ts +28 -0
- package/dist/types/utils/JsViewEngineWidget/SpatialNavigator/SpatialNavigationNode.d.ts +23 -0
- package/dist/types/utils/JsViewEngineWidget/SpatialNavigator/SpatialNavigator.d.ts +46 -0
- package/dist/types/utils/JsViewEngineWidget/TemplateParser/CommonMetroTemplate.d.ts +42 -0
- package/dist/types/utils/JsViewEngineWidget/TemplateParser/Fence.d.ts +62 -0
- package/dist/types/utils/JsViewEngineWidget/TemplateParser/ListMetroTemplate.d.ts +21 -0
- package/dist/types/utils/JsViewEngineWidget/TemplateParser/MetroTemplate.d.ts +103 -0
- package/dist/types/utils/JsViewEngineWidget/TemplateParser/TemplateItemAdder.d.ts +28 -0
- package/dist/types/utils/JsViewEngineWidget/TemplateParser/index.d.ts +8 -0
- package/dist/types/utils/JsViewEngineWidget/WidgetCommon.d.ts +160 -0
- package/dist/types/utils/JsViewEngineWidget/index.d.ts +21 -0
- package/dist/types/utils/JsViewPlugin/JsvAccount/JsvAccount.d.ts +46 -0
- package/dist/types/utils/JsViewPlugin/JsvAudio/AudioProxy.d.ts +6 -0
- package/dist/types/utils/JsViewPlugin/JsvAudio/BrowserAudio/BrowserAudio.vue.d.ts +22 -0
- package/dist/types/utils/JsViewPlugin/JsvAudio/BrowserAudio/JsvSystemAudio.vue.d.ts +212 -0
- package/dist/types/utils/JsViewPlugin/JsvAudio/CheckType.d.ts +6 -0
- package/dist/types/utils/JsViewPlugin/JsvAudio/Events.d.ts +17 -0
- package/dist/types/utils/JsViewPlugin/JsvAudio/JsvAudio.vue.d.ts +22 -0
- package/dist/types/utils/JsViewPlugin/JsvAudio/JsvAudioBridgeProxy.d.ts +12 -0
- package/dist/types/utils/JsViewPlugin/JsvAudio/JsvAudioProxy.vue.d.ts +6 -0
- package/dist/types/utils/JsViewPlugin/JsvAudio/PluginLoader.d.ts +5 -0
- package/dist/types/utils/JsViewPlugin/JsvAudio/ScreenLockManager.d.ts +9 -0
- package/dist/types/utils/JsViewPlugin/JsvAudio/index.d.ts +7 -0
- package/dist/types/utils/JsViewPlugin/JsvAudio/version.d.mts +14 -0
- package/{bin/types/utils/JsViewPlugin/JsvLatex → dist/types/utils/JsViewPlugin/JsvAudio}/version.d.ts +5 -0
- package/dist/types/utils/JsViewPlugin/JsvLatex/BrowserDomBuilder.d.ts +0 -0
- package/dist/types/utils/JsViewPlugin/JsvLatex/BrowserJsvLatex.vue.d.ts +17 -0
- package/dist/types/utils/JsViewPlugin/JsvLatex/Color.d.ts +5 -0
- package/dist/types/utils/JsViewPlugin/JsvLatex/GetVersion.d.ts +18 -0
- package/dist/types/utils/JsViewPlugin/JsvLatex/JsvLatex.vue.d.ts +46 -0
- package/dist/types/utils/JsViewPlugin/JsvLatex/JsvLatexBridgeProxy.d.ts +8 -0
- package/dist/types/utils/JsViewPlugin/JsvLatex/JsvLatexProxy.vue.d.ts +9 -0
- package/dist/types/utils/JsViewPlugin/JsvLatex/PluginLoader.d.ts +5 -0
- package/dist/types/utils/JsViewPlugin/JsvLatex/index.d.ts +8 -0
- package/dist/types/utils/JsViewPlugin/JsvLatex/version.d.mts +40 -0
- package/dist/types/utils/JsViewPlugin/JsvPlayer/AckEventDefine.d.ts +10 -0
- package/dist/types/utils/JsViewPlugin/JsvPlayer/GetVersion.d.ts +13 -0
- package/dist/types/utils/JsViewPlugin/JsvPlayer/JsvMedia.d.ts +523 -0
- package/dist/types/utils/JsViewPlugin/JsvPlayer/JsvMediaBrowserInterface.d.ts +119 -0
- package/dist/types/utils/JsViewPlugin/JsvPlayer/JsvPlayer.vue.d.ts +664 -0
- package/dist/types/utils/JsViewPlugin/JsvPlayer/JsvPlayerBrowser-0.9.vue.d.ts +45 -0
- package/dist/types/utils/JsViewPlugin/JsvPlayer/JsvPlayerBrowser-wasm.vue.d.ts +611 -0
- package/dist/types/utils/JsViewPlugin/JsvPlayer/JsvPlayerBrowser.vue.d.ts +597 -0
- package/dist/types/utils/JsViewPlugin/JsvPlayer/index-0.9.d.ts +415 -0
- package/dist/types/utils/JsViewPlugin/JsvPlayer/index.d.ts +415 -0
- package/dist/types/utils/JsViewPlugin/JsvPlayer/version.d.mts +14 -0
- package/dist/types/utils/JsViewPlugin/index.d.ts +7 -0
- package/dist/types/utils/JsViewVueTools/BlobApi.d.ts +42 -0
- package/dist/types/utils/JsViewVueTools/ConstSymbol.d.ts +6 -0
- package/dist/types/utils/JsViewVueTools/DebugContentShellJBridge.d.ts +10 -0
- package/dist/types/utils/JsViewVueTools/DebugTool.d.ts +12 -0
- package/dist/types/utils/JsViewVueTools/DefaultKeyMap.d.ts +14 -0
- package/dist/types/utils/JsViewVueTools/FeatureActive.d.ts +15 -0
- package/dist/types/utils/JsViewVueTools/ForgeConstDefine.d.ts +15 -0
- package/dist/types/utils/JsViewVueTools/ForgeHandles.d.ts +11 -0
- package/dist/types/utils/JsViewVueTools/JsvDynamicCssStyle.d.ts +33 -0
- package/dist/types/utils/JsViewVueTools/JsvDynamicKeyFrames.d.ts +40 -0
- package/dist/types/utils/JsViewVueTools/JsvFederationTools.d.ts +20 -0
- package/dist/types/utils/JsViewVueTools/JsvHashHistory.d.ts +20 -0
- package/dist/types/utils/JsViewVueTools/JsvImpactTracer.d.ts +44 -0
- package/dist/types/utils/JsViewVueTools/JsvInteractionMode.d.ts +10 -0
- package/dist/types/utils/JsViewVueTools/JsvPerformance.d.ts +9 -0
- package/dist/types/utils/JsViewVueTools/JsvPreDownloader.d.ts +55 -0
- package/dist/types/utils/JsViewVueTools/JsvRefTaker.d.ts +52 -0
- package/dist/types/utils/JsViewVueTools/JsvRuntimeBridge.d.ts +378 -0
- package/dist/types/utils/JsViewVueTools/JsvStyleClass.d.ts +35 -0
- package/dist/types/utils/JsViewVueTools/JsvStyleSheetsDeclarer.d.ts +35 -0
- package/dist/types/utils/JsViewVueTools/JsvTextTools.d.ts +66 -0
- package/dist/types/utils/JsViewVueTools/JsvTextureDefines.d.ts +10 -0
- package/dist/types/utils/JsViewVueTools/JsvTextureLoadTool.d.ts +67 -0
- package/dist/types/utils/JsViewVueTools/JsvTextureStore/BitPalette/BitPalette.d.ts +47 -0
- package/dist/types/utils/JsViewVueTools/JsvTextureStore/CanvasTexture/CanvasTexture.d.ts +99 -0
- package/dist/types/utils/JsViewVueTools/JsvTextureStore/CanvasTexture/CommandList.d.ts +20 -0
- package/dist/types/utils/JsViewVueTools/JsvTextureStore/CanvasTexture/DrawHelper.d.ts +58 -0
- package/dist/types/utils/JsViewVueTools/JsvTextureStore/CanvasTexture/Path.d.ts +113 -0
- package/dist/types/utils/JsViewVueTools/JsvTextureStore/CapturedTexture/CapturedTexture.d.ts +17 -0
- package/dist/types/utils/JsViewVueTools/JsvTextureStore/JsvTextureStore.d.ts +170 -0
- package/dist/types/utils/JsViewVueTools/JsvTextureStore/Store.d.ts +16 -0
- package/dist/types/utils/JsViewVueTools/JsvTextureStore/Texture.d.ts +31 -0
- package/dist/types/utils/JsViewVueTools/JsvTextureStore/TextureBuilder.d.ts +53 -0
- package/dist/types/utils/JsViewVueTools/JsvTextureStore/index.d.ts +6 -0
- package/dist/types/utils/JsViewVueTools/NinePatchHelper.d.ts +25 -0
- package/dist/types/utils/JsViewVueTools/TextureManagerTools.d.ts +11 -0
- package/dist/types/utils/JsViewVueTools/TypeCheckAndSet.d.ts +7 -0
- package/dist/types/utils/JsViewVueTools/index.d.ts +29 -0
- package/dist/types/utils/JsViewVueWidget/Jsv3dDiv.vue.d.ts +124 -0
- package/dist/types/utils/JsViewVueWidget/Jsv3dStage.vue.d.ts +148 -0
- package/dist/types/utils/JsViewVueWidget/JsvActorMove/ActorControlBase.d.ts +35 -0
- package/dist/types/utils/JsViewVueWidget/JsvActorMove/JsvActorMove.vue.d.ts +102 -0
- package/dist/types/utils/JsViewVueWidget/JsvActorMove/JsvActorMoveControl.d.ts +37 -0
- package/dist/types/utils/JsViewVueWidget/JsvActorMove/index.d.ts +8 -0
- package/dist/types/utils/JsViewVueWidget/JsvApic/JsvApic/BrowserApic.vue.d.ts +15 -0
- package/dist/types/utils/JsViewVueWidget/JsvApic/JsvApic/JsvApic.vue.d.ts +77 -0
- package/dist/types/utils/JsViewVueWidget/JsvApic/JsvApic/index.d.ts +54 -0
- package/dist/types/utils/JsViewVueWidget/JsvApic/JsvApic2/BrowserApic2.vue.d.ts +13 -0
- package/dist/types/utils/JsViewVueWidget/JsvApic/JsvApic2/JsvApic2.vue.d.ts +44 -0
- package/dist/types/utils/JsViewVueWidget/JsvApic/JsvApic2/index.d.ts +17 -0
- package/dist/types/utils/JsViewVueWidget/JsvApic/JsvBrowserApicLib/ApicDataBase.d.ts +13 -0
- package/dist/types/utils/JsViewVueWidget/JsvApic/JsvBrowserApicLib/BrowserApicLib.d.ts +3 -0
- package/dist/types/utils/JsViewVueWidget/JsvApic/JsvBrowserApicLib/GifData.d.ts +5 -0
- package/dist/types/utils/JsViewVueWidget/JsvApic/JsvBrowserApicLib/NormalLoopTool.d.ts +7 -0
- package/dist/types/utils/JsViewVueWidget/JsvApic/JsvBrowserApicLib/PartLoopTool.d.ts +12 -0
- package/dist/types/utils/JsViewVueWidget/JsvApic/JsvBrowserApicLib/SingleLoopTool.d.ts +5 -0
- package/dist/types/utils/JsViewVueWidget/JsvApic/JsvBrowserApicLib/Viewer.d.ts +20 -0
- package/dist/types/utils/JsViewVueWidget/JsvApic/JsvBrowserApicLib/WebpData.d.ts +5 -0
- package/dist/types/utils/JsViewVueWidget/JsvApic/JsvCommonLoopToolBase.d.ts +26 -0
- package/dist/types/utils/JsViewVueWidget/JsvClipDiv/JsvClipDiv.vue.d.ts +74 -0
- package/dist/types/utils/JsViewVueWidget/JsvClipDiv/index.d.ts +5 -0
- package/dist/types/utils/JsViewVueWidget/JsvConnectLine/ArcLineManager.d.ts +5 -0
- package/dist/types/utils/JsViewVueWidget/JsvConnectLine/JsvConnectLine.vue.d.ts +34 -0
- package/dist/types/utils/JsViewVueWidget/JsvConnectLine/index.d.ts +6 -0
- package/dist/types/utils/JsViewVueWidget/JsvDashPath.vue.d.ts +33 -0
- package/dist/types/utils/JsViewVueWidget/JsvDomRenderer/JsViewHtmlToVNodesOptions.d.ts +105 -0
- package/dist/types/utils/JsViewVueWidget/JsvDomRenderer/JsvDomRenderer.d.ts +65 -0
- package/dist/types/utils/JsViewVueWidget/JsvDomRenderer/htmlToVNodes.d.ts +62 -0
- package/dist/types/utils/JsViewVueWidget/JsvDomRenderer/index.d.ts +5 -0
- package/dist/types/utils/JsViewVueWidget/JsvDragBox/JsvDragBox.vue.d.ts +109 -0
- package/dist/types/utils/JsViewVueWidget/JsvDriftScope/JsvDriftScope.vue.d.ts +108 -0
- package/dist/types/utils/JsViewVueWidget/JsvDriftScope/index.d.ts +5 -0
- package/dist/types/utils/JsViewVueWidget/JsvEnableRenderBreak.vue.d.ts +61 -0
- package/dist/types/utils/JsViewVueWidget/JsvFilterView.vue.d.ts +91 -0
- package/dist/types/utils/JsViewVueWidget/JsvFlexCell/JsvFlexDiv.vue.d.ts +106 -0
- package/dist/types/utils/JsViewVueWidget/JsvFlexCell/JsvFullScrAdjust.vue.d.ts +100 -0
- package/dist/types/utils/JsViewVueWidget/JsvFlexCell/JsvScreenFlex.vue.d.ts +108 -0
- package/dist/types/utils/JsViewVueWidget/JsvFlexCell/index.d.ts +7 -0
- package/dist/types/utils/JsViewVueWidget/JsvFragShaderView/JsvFragShaderView.vue.d.ts +63 -0
- package/dist/types/utils/JsViewVueWidget/JsvFragShaderView/index.d.ts +5 -0
- package/dist/types/utils/JsViewVueWidget/JsvFreeMoveActor/ActionRefObject.d.ts +4 -0
- package/dist/types/utils/JsViewVueWidget/JsvFreeMoveActor/ActorControl.d.ts +228 -0
- package/dist/types/utils/JsViewVueWidget/JsvFreeMoveActor/ActorState.d.ts +6 -0
- package/dist/types/utils/JsViewVueWidget/JsvFreeMoveActor/CallbackManager.d.ts +16 -0
- package/dist/types/utils/JsViewVueWidget/JsvFreeMoveActor/CmdTypes.d.ts +16 -0
- package/dist/types/utils/JsViewVueWidget/JsvFreeMoveActor/ForgeTypeDefine.d.ts +20 -0
- package/dist/types/utils/JsViewVueWidget/JsvFreeMoveActor/JsvEnvBlocker.vue.d.ts +106 -0
- package/dist/types/utils/JsViewVueWidget/JsvFreeMoveActor/JsvFreeMoveActor.vue.d.ts +107 -0
- package/dist/types/utils/JsViewVueWidget/JsvFreeMoveActor/KeepFlags.d.ts +11 -0
- package/dist/types/utils/JsViewVueWidget/JsvFreeMoveActor/NexusNode.d.ts +12 -0
- package/dist/types/utils/JsViewVueWidget/JsvFreeMoveActor/SetAction.d.ts +118 -0
- package/dist/types/utils/JsViewVueWidget/JsvFreeMoveActor/SetCondition.d.ts +244 -0
- package/dist/types/utils/JsViewVueWidget/JsvFreeMoveActor/SetState.d.ts +169 -0
- package/dist/types/utils/JsViewVueWidget/JsvFreeMoveActor/SyncLinkManager.d.ts +22 -0
- package/dist/types/utils/JsViewVueWidget/JsvFreeMoveActor/index.d.ts +24 -0
- package/dist/types/utils/JsViewVueWidget/JsvGrid.vue.d.ts +241 -0
- package/dist/types/utils/JsViewVueWidget/JsvHole.d.ts +19 -0
- package/dist/types/utils/JsViewVueWidget/JsvInput/Cursor.vue.d.ts +16 -0
- package/dist/types/utils/JsViewVueWidget/JsvInput/EditViewOperator.d.ts +52 -0
- package/dist/types/utils/JsViewVueWidget/JsvInput/EditVisibleArea.d.ts +30 -0
- package/dist/types/utils/JsViewVueWidget/JsvInput/JsvInput.vue.d.ts +98 -0
- package/dist/types/utils/JsViewVueWidget/JsvInput/SharedDefine.d.ts +17 -0
- package/dist/types/utils/JsViewVueWidget/JsvInput/SystemTextTools.d.ts +20 -0
- package/dist/types/utils/JsViewVueWidget/JsvInput/index.d.ts +8 -0
- package/dist/types/utils/JsViewVueWidget/JsvLine/JsvLine.vue.d.ts +32 -0
- package/dist/types/utils/JsViewVueWidget/JsvLine/LineManager.d.ts +5 -0
- package/dist/types/utils/JsViewVueWidget/JsvLine/index.d.ts +6 -0
- package/dist/types/utils/JsViewVueWidget/JsvMarquee.vue.d.ts +33 -0
- package/dist/types/utils/JsViewVueWidget/JsvMaskClipDiv.vue.d.ts +101 -0
- package/dist/types/utils/JsViewVueWidget/JsvMindMap/CommonType.d.ts +1 -0
- package/dist/types/utils/JsViewVueWidget/JsvMindMap/Constant.d.ts +13 -0
- package/dist/types/utils/JsViewVueWidget/JsvMindMap/DataTree.d.ts +75 -0
- package/dist/types/utils/JsViewVueWidget/JsvMindMap/Geometry.d.ts +72 -0
- package/dist/types/utils/JsViewVueWidget/JsvMindMap/JsvMindMap.vue.d.ts +235 -0
- package/dist/types/utils/JsViewVueWidget/JsvMindMap/index.d.ts +5 -0
- package/dist/types/utils/JsViewVueWidget/JsvMindMap/rtree.d.ts +44 -0
- package/dist/types/utils/JsViewVueWidget/JsvNativeSharedDiv.vue.d.ts +93 -0
- package/dist/types/utils/JsViewVueWidget/JsvNinePatch.vue.d.ts +55 -0
- package/dist/types/utils/JsViewVueWidget/JsvPieChart.vue.d.ts +30 -0
- package/dist/types/utils/JsViewVueWidget/JsvPreload/JsvPreload.vue.d.ts +68 -0
- package/dist/types/utils/JsViewVueWidget/JsvPreload/index.d.ts +6 -0
- package/dist/types/utils/JsViewVueWidget/JsvProgressBar.vue.d.ts +31 -0
- package/dist/types/utils/JsViewVueWidget/JsvQrcode/JsvQrcode.vue.d.ts +85 -0
- package/dist/types/utils/JsViewVueWidget/JsvRadarChart.vue.d.ts +37 -0
- package/dist/types/utils/JsViewVueWidget/JsvRipple/Constant.d.ts +8 -0
- package/dist/types/utils/JsViewVueWidget/JsvRipple/JsvRipple.vue.d.ts +129 -0
- package/dist/types/utils/JsViewVueWidget/JsvRipple/index.d.ts +7 -0
- package/dist/types/utils/JsViewVueWidget/JsvScaleTextBox.vue.d.ts +28 -0
- package/dist/types/utils/JsViewVueWidget/JsvScrollBox/JsvScrollBox.vue.d.ts +278 -0
- package/dist/types/utils/JsViewVueWidget/JsvScrollBox/JsvScrollFollow.vue.d.ts +157 -0
- package/dist/types/utils/JsViewVueWidget/JsvScrollBox/ScrollInnerSymbol.d.ts +8 -0
- package/dist/types/utils/JsViewVueWidget/JsvScrollBox/ScrollSymbol.d.ts +16 -0
- package/dist/types/utils/JsViewVueWidget/JsvScrollBox/index.d.ts +7 -0
- package/dist/types/utils/JsViewVueWidget/JsvSector.vue.d.ts +30 -0
- package/dist/types/utils/JsViewVueWidget/JsvSmoothSlideContainer.vue.d.ts +76 -0
- package/dist/types/utils/JsViewVueWidget/JsvSoundPool.d.ts +114 -0
- package/dist/types/utils/JsViewVueWidget/JsvSpray/JsvSpray.vue.d.ts +58 -0
- package/dist/types/utils/JsViewVueWidget/JsvSpriteAnim/FrameBuidler.d.ts +18 -0
- package/dist/types/utils/JsViewVueWidget/JsvSpriteAnim/JsvSpriteAnim.vue.d.ts +70 -0
- package/dist/types/utils/JsViewVueWidget/JsvSpriteAnim/JsvSpriteLoader.vue.d.ts +85 -0
- package/dist/types/utils/JsViewVueWidget/JsvSpriteAnim/JsvSpriteTools.d.ts +15 -0
- package/dist/types/utils/JsViewVueWidget/JsvSpriteAnim/SpriteController.d.ts +21 -0
- package/dist/types/utils/JsViewVueWidget/JsvSpriteAnim/index.d.ts +9 -0
- package/dist/types/utils/JsViewVueWidget/JsvSpriteAnim/sAnimationToken.d.ts +6 -0
- package/dist/types/utils/JsViewVueWidget/JsvSwiper/Indicator.vue.d.ts +16 -0
- package/dist/types/utils/JsViewVueWidget/JsvSwiper/JsvSmoothSwiper.vue.d.ts +141 -0
- package/dist/types/utils/JsViewVueWidget/JsvSwiper/JsvSwiper.vue.d.ts +248 -0
- package/dist/types/utils/JsViewVueWidget/JsvSwiper/JsvSwiper2.vue.d.ts +181 -0
- package/dist/types/utils/JsViewVueWidget/JsvSwiper/index.d.ts +8 -0
- package/dist/types/utils/JsViewVueWidget/JsvSwiper3D/Indicator.vue.d.ts +16 -0
- package/dist/types/utils/JsViewVueWidget/JsvSwiper3D/JsvSwiper.vue.d.ts +121 -0
- package/dist/types/utils/JsViewVueWidget/JsvSwiper3D/index.d.ts +6 -0
- package/dist/types/utils/JsViewVueWidget/JsvTextBox.vue.d.ts +121 -0
- package/dist/types/utils/JsViewVueWidget/JsvTextureAnim/CommonType.d.ts +6 -0
- package/dist/types/utils/JsViewVueWidget/JsvTextureAnim/JsvTextureAnim.vue.d.ts +38 -0
- package/dist/types/utils/JsViewVueWidget/JsvTextureAnim/index.d.ts +8 -0
- package/dist/types/utils/JsViewVueWidget/JsvTouchModeSwitcher.vue.d.ts +109 -0
- package/dist/types/utils/JsViewVueWidget/JsvVideo.vue.d.ts +23 -0
- package/dist/types/utils/JsViewVueWidget/JsvVisibleSensor/JsvVisibleSensor.vue.d.ts +109 -0
- package/dist/types/utils/JsViewVueWidget/JsvVisibleSensor/index.d.ts +88 -0
- package/dist/types/utils/JsViewVueWidget/TypesDiv/JsvPosterDiv.vue.d.ts +94 -0
- package/dist/types/utils/JsViewVueWidget/TypesDiv/JsvPosterImage.vue.d.ts +115 -0
- package/dist/types/utils/JsViewVueWidget/TypesDiv/JsvSmartDiv.vue.d.ts +94 -0
- package/dist/types/utils/JsViewVueWidget/TypesDiv/JsvSmartImage.vue.d.ts +115 -0
- package/dist/types/utils/JsViewVueWidget/index.d.ts +53 -0
- package/dist/types/utils/index.d.ts +8 -0
- package/dist/utils/browser/BrowserAudio.vue.mjs +258 -0
- package/dist/utils/browser/BrowserJsvLatex.vue.mjs +64 -0
- package/dist/utils/export-sfc.mjs +12 -0
- package/dist/utils/index.mjs +29000 -0
- package/dist/utils/jsview-vue-common.mjs +39 -0
- package/package.json +1 -1
- 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 +193 -89
- package/utils/JsViewEngineWidget/MetroWidget/MetroWidget.vue +325 -155
- package/utils/JsViewEngineWidget/MetroWidget/MetroWidgetDebugger.ts +15 -0
- package/utils/JsViewEngineWidget/MetroWidget/MetroWidgetSetup.js +1035 -370
- 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 +62 -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 +329 -230
- package/utils/JsViewEngineWidget/TemplateParser/ListMetroTemplate.ts +101 -27
- package/utils/JsViewEngineWidget/TemplateParser/MetroTemplate.ts +54 -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/Color.ts +104 -39
- package/utils/JsViewPlugin/JsvLatex/GetVersion.js +65 -0
- package/utils/JsViewPlugin/JsvLatex/JsvLatex.vue +71 -17
- package/utils/JsViewPlugin/JsvLatex/JsvLatexBridgeProxy.js +10 -0
- package/utils/JsViewPlugin/JsvLatex/JsvLatexProxy.vue +14 -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 +40 -19
- 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/JsvDomRenderer/JsViewHtmlToVNodesOptions.ts +212 -0
- package/utils/JsViewVueWidget/JsvDomRenderer/JsvDomRenderer.ts +146 -0
- package/utils/JsViewVueWidget/JsvDomRenderer/htmlToVNodes.ts +748 -0
- package/utils/JsViewVueWidget/JsvDomRenderer/index.ts +1 -0
- package/utils/JsViewVueWidget/JsvDragBox/JsvDragBox.vue +10 -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 +269 -26
- package/utils/JsViewVueWidget/JsvFreeMoveActor/CallbackManager.ts +2 -1
- package/utils/JsViewVueWidget/JsvFreeMoveActor/CmdTypes.ts +24 -0
- package/utils/JsViewVueWidget/JsvFreeMoveActor/ForgeTypeDefine.ts +3 -0
- package/utils/JsViewVueWidget/JsvFreeMoveActor/{FreeMoveActor.vue → JsvFreeMoveActor.vue} +5 -1
- package/utils/JsViewVueWidget/JsvFreeMoveActor/NexusNode.ts +10 -2
- package/utils/JsViewVueWidget/JsvFreeMoveActor/SetAction.ts +223 -100
- package/utils/JsViewVueWidget/JsvFreeMoveActor/SetCondition.ts +245 -64
- package/utils/JsViewVueWidget/JsvFreeMoveActor/SetState.ts +95 -29
- package/utils/JsViewVueWidget/JsvFreeMoveActor/index.js +27 -5
- package/utils/JsViewVueWidget/JsvInput/EditViewOperator.ts +11 -2
- package/utils/JsViewVueWidget/JsvInput/JsvInput.vue +29 -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 +22 -12
- 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 +56 -25
- package/utils/JsViewVueWidget/JsvScrollBox/JsvScrollFollow.vue +11 -11
- package/utils/JsViewVueWidget/JsvSector.vue +66 -28
- package/utils/JsViewVueWidget/JsvTextBox.vue +30 -1
- package/utils/JsViewVueWidget/JsvTextureAnim/JsvTextureAnim.vue +315 -305
- 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 +7 -2
- package/bin/types/utils/JsViewVueTools/JsvTextureStore/DominantColor/GetDominantColor.d.ts +0 -7
- 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/bin/types/utils/JsViewPlugin/JsvPlayer/{BrowserJsvPlayer-0.9.vue.d.ts → JsvPlayerBrowser-0.9.vue.d.ts} +0 -0
- /package/bin/types/utils/JsViewVueWidget/JsvFreeMoveActor/{FreeMoveActor.vue.d.ts → JsvFreeMoveActor.vue.d.ts} +0 -0
- /package/utils/JsViewPlugin/JsvPlayer/{BrowserJsvPlayer-0.9.vue → JsvPlayerBrowser-0.9.vue} +0 -0
|
@@ -1,23 +1,35 @@
|
|
|
1
|
-
|
|
1
|
+
//考虑到.vue文件除了export default的component外,还有可能export其他对象,因此使用import * as
|
|
2
2
|
import { default as JsvPlayer } from "./JsvPlayer.vue";
|
|
3
|
-
import { globalLoadJsvPlayerPlugin as initPlugin } from "./
|
|
4
|
-
import { globalPreLoadJsvPlayerPlugin as preLoadPlugin } from "./
|
|
5
|
-
import { getJsvPlayerCapabilitySet as getCapabilitySet } from "./
|
|
6
|
-
import { setJsvPlayerDebugMode as setDebugMode } from "./
|
|
7
|
-
import { getJsvPlayerRunningNum as getRunningPlayerNum } from "./
|
|
8
|
-
import { globalLoadSetOperator as setOperator } from "./
|
|
9
|
-
import {
|
|
10
|
-
|
|
3
|
+
import { globalLoadJsvPlayerPlugin as initPlugin } from "./JsvPlayer.vue"
|
|
4
|
+
import { globalPreLoadJsvPlayerPlugin as preLoadPlugin } from "./JsvPlayer.vue"
|
|
5
|
+
import { getJsvPlayerCapabilitySet as getCapabilitySet } from "./JsvPlayer.vue"
|
|
6
|
+
import { setJsvPlayerDebugMode as setDebugMode } from "./JsvPlayer.vue"
|
|
7
|
+
import { getJsvPlayerRunningNum as getRunningPlayerNum } from "./JsvPlayer.vue"
|
|
8
|
+
import { globalLoadSetOperator as setOperator } from "./JsvPlayer.vue"
|
|
9
|
+
import { setProbeMulticastChannelID as setProbeMulticastChannelID } from "./JsvPlayer.vue"
|
|
10
|
+
import { setProbeMulticastUrl as setProbeMulticastUrl } from "./JsvPlayer.vue"
|
|
11
|
+
import { registerStreamChangedListener as registerStreamChangedListener } from "./JsvPlayer.vue"
|
|
12
|
+
import {default as BrowserPlayer} from "./JsvPlayerBrowser-0.9.vue"
|
|
13
|
+
import { setMobileEventParam as setMobileEventParam } from "./JsvPlayer.vue"
|
|
14
|
+
import { setStbID as setStbID } from "./JsvPlayer.vue"
|
|
15
|
+
import {setGlobalEventListener as setGlobalEventListener} from "./JsvPlayer.vue"
|
|
11
16
|
|
|
17
|
+
let _JsvPlayer = JsvPlayer;
|
|
12
18
|
let globalLoadJsvPlayerPlugin = initPlugin;
|
|
13
19
|
let globalPreLoadJsvPlayerPlugin = preLoadPlugin;
|
|
14
20
|
let getJsvPlayerCapabilitySet = getCapabilitySet;
|
|
15
21
|
let setJsvPlayerDebugMode = setDebugMode;
|
|
16
22
|
let getJsvPlayerRunningNum = getRunningPlayerNum;
|
|
17
23
|
let globalLoadSetOperator = setOperator;
|
|
24
|
+
let globalJsvPlayerProbeMulticastChannelID = setProbeMulticastChannelID;
|
|
25
|
+
let globalJsvPlayerProbeMulticastUrl = setProbeMulticastUrl;
|
|
26
|
+
let globalJsvPlayerRegisterStreamChangedListener = registerStreamChangedListener;
|
|
27
|
+
let setJsvPlayerMobileEventParam = setMobileEventParam;
|
|
28
|
+
let setJsvPlayerStbID = setStbID;
|
|
29
|
+
let SetJsvPlayerGlobalEventListener = setGlobalEventListener;
|
|
18
30
|
|
|
19
31
|
if (window.jsvIsBrowserDebug) {
|
|
20
|
-
// const BrowserPlayer = await import("./
|
|
32
|
+
// const BrowserPlayer = await import("./JsvPlayerBrowser.vue");
|
|
21
33
|
// 浏览器版本
|
|
22
34
|
_JsvPlayer = BrowserPlayer;
|
|
23
35
|
|
|
@@ -47,6 +59,30 @@ if (window.jsvIsBrowserDebug) {
|
|
|
47
59
|
globalLoadSetOperator = (operator)=>{
|
|
48
60
|
console.log("operator is "+operator);
|
|
49
61
|
}
|
|
62
|
+
|
|
63
|
+
globalJsvPlayerProbeMulticastChannelID = (mixNo)=>{
|
|
64
|
+
console.log("mixNo is "+mixNo);
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
globalJsvPlayerProbeMulticastUrl = (url)=>{
|
|
68
|
+
console.log("url is "+url);
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
globalJsvPlayerRegisterStreamChangedListener = (listener)=>{
|
|
72
|
+
console.log("listener is "+listener);
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
setJsvPlayerMobileEventParam = (param)=>{
|
|
76
|
+
console.log("param: "+param);
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
setJsvPlayerStbID = (stbid)=>{
|
|
80
|
+
console.log("param: "+stbid);
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
SetJsvPlayerGlobalEventListener = (listener)=>{
|
|
84
|
+
console.log("SetJsvPlayerGlobalEventListener");
|
|
85
|
+
}
|
|
50
86
|
}
|
|
51
87
|
|
|
52
88
|
export {
|
|
@@ -57,4 +93,10 @@ export {
|
|
|
57
93
|
setJsvPlayerDebugMode, //设置调试模式,可以查看帧率等信息
|
|
58
94
|
getJsvPlayerRunningNum, //获取正在运行的播放器个数
|
|
59
95
|
globalLoadSetOperator,// 设置运营商
|
|
96
|
+
globalJsvPlayerProbeMulticastChannelID, //设置组播网络连通性探测频道号
|
|
97
|
+
globalJsvPlayerProbeMulticastUrl, //设置组播网络连通性探测url
|
|
98
|
+
globalJsvPlayerRegisterStreamChangedListener, //注册视频流重试时的全局事件通知
|
|
99
|
+
setJsvPlayerMobileEventParam,//设置移动探针相关参数
|
|
100
|
+
setJsvPlayerStbID,//设置机顶盒stbid
|
|
101
|
+
SetJsvPlayerGlobalEventListener,//设置全局事件监听
|
|
60
102
|
}
|
|
@@ -1,22 +1,41 @@
|
|
|
1
|
-
|
|
1
|
+
//考虑到.vue文件除了export default的component外,还有可能export其他对象,因此使用import * as
|
|
2
2
|
import { default as JsvPlayer } from "./JsvPlayer.vue";
|
|
3
|
-
import { globalLoadJsvPlayerPlugin as initPlugin } from "./
|
|
4
|
-
import { globalPreLoadJsvPlayerPlugin as preLoadPlugin } from "./
|
|
5
|
-
import { getJsvPlayerCapabilitySet as getCapabilitySet } from "./
|
|
6
|
-
import { setJsvPlayerDebugMode as setDebugMode } from "./
|
|
7
|
-
import { getJsvPlayerRunningNum as getRunningPlayerNum } from "./
|
|
8
|
-
import { globalLoadSetOperator as setOperator } from "./
|
|
9
|
-
|
|
3
|
+
import { globalLoadJsvPlayerPlugin as initPlugin } from "./JsvPlayer.vue"
|
|
4
|
+
import { globalPreLoadJsvPlayerPlugin as preLoadPlugin } from "./JsvPlayer.vue"
|
|
5
|
+
import { getJsvPlayerCapabilitySet as getCapabilitySet } from "./JsvPlayer.vue"
|
|
6
|
+
import { setJsvPlayerDebugMode as setDebugMode } from "./JsvPlayer.vue"
|
|
7
|
+
import { getJsvPlayerRunningNum as getRunningPlayerNum } from "./JsvPlayer.vue"
|
|
8
|
+
import { globalLoadSetOperator as setOperator } from "./JsvPlayer.vue"
|
|
9
|
+
import { setProbeMulticastChannelID as setProbeMulticastChannelID } from "./JsvPlayer.vue"
|
|
10
|
+
import { setProbeMulticastUrl as setProbeMulticastUrl } from "./JsvPlayer.vue"
|
|
11
|
+
import { registerStreamChangedListener as registerStreamChangedListener } from "./JsvPlayer.vue"
|
|
12
|
+
import { setMobileEventParam as setMobileEventParam } from "./JsvPlayer.vue"
|
|
13
|
+
import { setStbID as setStbID } from "./JsvPlayer.vue"
|
|
14
|
+
import {setGlobalEventListener as setGlobalEventListener} from "./JsvPlayer.vue"
|
|
10
15
|
|
|
16
|
+
let _JsvPlayer = JsvPlayer;
|
|
11
17
|
let globalLoadJsvPlayerPlugin = initPlugin;
|
|
12
18
|
let globalPreLoadJsvPlayerPlugin = preLoadPlugin;
|
|
13
19
|
let getJsvPlayerCapabilitySet = getCapabilitySet;
|
|
14
20
|
let setJsvPlayerDebugMode = setDebugMode;
|
|
15
21
|
let getJsvPlayerRunningNum = getRunningPlayerNum;
|
|
16
22
|
let globalLoadSetOperator = setOperator;
|
|
23
|
+
let globalJsvPlayerProbeMulticastChannelID = setProbeMulticastChannelID;
|
|
24
|
+
let globalJsvPlayerProbeMulticastUrl = setProbeMulticastUrl;
|
|
25
|
+
let globalJsvPlayerRegisterStreamChangedListener = registerStreamChangedListener;
|
|
26
|
+
let setJsvPlayerMobileEventParam = setMobileEventParam;
|
|
27
|
+
let setJsvPlayerStbID = setStbID;
|
|
28
|
+
let SetJsvPlayerGlobalEventListener = setGlobalEventListener;
|
|
17
29
|
|
|
18
30
|
if (window.jsvIsBrowserDebug) {
|
|
19
|
-
|
|
31
|
+
let BrowserPlayer = null;
|
|
32
|
+
if(window.JsvCoreApi?.Platform == "pc-wasm"){
|
|
33
|
+
console.log("pc-wasm")
|
|
34
|
+
BrowserPlayer = await import("./JsvPlayerBrowser-wasm.vue");
|
|
35
|
+
}else{
|
|
36
|
+
console.log("no pc-wasm")
|
|
37
|
+
BrowserPlayer = await import("./JsvPlayerBrowser.vue");
|
|
38
|
+
}
|
|
20
39
|
// 浏览器版本
|
|
21
40
|
_JsvPlayer = BrowserPlayer.default;
|
|
22
41
|
|
|
@@ -46,6 +65,30 @@ if (window.jsvIsBrowserDebug) {
|
|
|
46
65
|
globalLoadSetOperator = (operator)=>{
|
|
47
66
|
console.log("operator is "+operator);
|
|
48
67
|
}
|
|
68
|
+
|
|
69
|
+
globalJsvPlayerProbeMulticastChannelID = (mixNo)=>{
|
|
70
|
+
console.log("mixNo is "+mixNo);
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
globalJsvPlayerProbeMulticastUrl = (url)=>{
|
|
74
|
+
console.log("url is "+url);
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
globalJsvPlayerRegisterStreamChangedListener = (listener)=>{
|
|
78
|
+
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
setJsvPlayerMobileEventParam = (param)=>{
|
|
82
|
+
console.log("param: "+param);
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
setJsvPlayerStbID = (stbid)=>{
|
|
86
|
+
console.log("param: "+stbid);
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
SetJsvPlayerGlobalEventListener = (listener)=>{
|
|
90
|
+
console.log("SetJsvPlayerGlobalEventListener");
|
|
91
|
+
}
|
|
49
92
|
}
|
|
50
93
|
|
|
51
94
|
export {
|
|
@@ -56,4 +99,10 @@ export {
|
|
|
56
99
|
setJsvPlayerDebugMode, //设置调试模式,可以查看帧率等信息
|
|
57
100
|
getJsvPlayerRunningNum, //获取正在运行的播放器个数
|
|
58
101
|
globalLoadSetOperator,// 设置运营商
|
|
102
|
+
globalJsvPlayerProbeMulticastChannelID, //设置组播网络连通性探测频道号
|
|
103
|
+
globalJsvPlayerProbeMulticastUrl, //设置组播网络连通性探测url
|
|
104
|
+
globalJsvPlayerRegisterStreamChangedListener, //注册视频流重试时的全局事件通知
|
|
105
|
+
setJsvPlayerMobileEventParam,//设置移动探针相关参数
|
|
106
|
+
setJsvPlayerStbID,//设置机顶盒stbid
|
|
107
|
+
SetJsvPlayerGlobalEventListener,//设置全局事件监听
|
|
59
108
|
}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* BlobApi
|
|
3
|
+
*
|
|
4
|
+
* 说明:
|
|
5
|
+
* - 提供与浏览器 URL.createObjectURL / URL.revokeObjectURL 对齐的接口。
|
|
6
|
+
* 使用场景
|
|
7
|
+
* 1. blob内容是图片并且希望在JsView体系的div或者img元素中展示时使用。
|
|
8
|
+
* 2. 希望获得PC模拟环境和android环境同样的Blob展示和上传需求时
|
|
9
|
+
*
|
|
10
|
+
* 特别说明: 在PC模拟环境中, 第三方库仅在PC上进行Blob展示时, 不用改造,
|
|
11
|
+
* 使用原URL.createObjectURL / URL.revokeObjectURL即可
|
|
12
|
+
* 例如m3u8视频转blob播放的第三方库
|
|
13
|
+
*
|
|
14
|
+
*/
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* createObjectURL
|
|
18
|
+
* 为 Blob 对象创建临时 URL。
|
|
19
|
+
*
|
|
20
|
+
*/
|
|
21
|
+
async function createObjectURL(blob: Blob): Promise<string> {
|
|
22
|
+
// 兼容PC模拟环境下 jsvCreateObjectURL 是异步的情况
|
|
23
|
+
return await (URL as any).jsvCreateObjectURL(blob);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
/**
|
|
27
|
+
* createObjectURLSync
|
|
28
|
+
* 为 Blob 对象创建临时 URL。为在android设备上的同步接口
|
|
29
|
+
*
|
|
30
|
+
*/
|
|
31
|
+
function createObjectURLSync(blob: Blob): undefined | string {
|
|
32
|
+
if ((window as any).JsvCoreApi.ProcessType == "wasm") {
|
|
33
|
+
console.warn("createObjectURLSync: wasm环境不支持同步创建ObjectURL");
|
|
34
|
+
return undefined;
|
|
35
|
+
}
|
|
36
|
+
return (URL as any).jsvCreateObjectURL(blob);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* revokeObjectURL
|
|
41
|
+
* 释放由 createObjectURL 创建的临时 URL。
|
|
42
|
+
*
|
|
43
|
+
*/
|
|
44
|
+
function revokeObjectURL(url: string): void {
|
|
45
|
+
return (URL as any).jsvRevokeObjectURL(url);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
let sBlobApi = {
|
|
49
|
+
createObjectURLSync,
|
|
50
|
+
createObjectURL,
|
|
51
|
+
revokeObjectURL,
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
export default sBlobApi;
|
|
55
|
+
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { ref } from "vue";
|
|
2
|
+
|
|
3
|
+
export const KEY_MODE = 1;
|
|
4
|
+
export const TOUCH_MODE = 2;
|
|
5
|
+
export const JsvInteractionMode = ref(KEY_MODE);
|
|
6
|
+
|
|
7
|
+
let JsvTouchModeSwitcherCount = 0;
|
|
8
|
+
export const jsvTouchModeSwitcherCreate = () => {
|
|
9
|
+
JsvTouchModeSwitcherCount++;
|
|
10
|
+
};
|
|
11
|
+
export const jsvTouchModeSwitcherDestroy = () => {
|
|
12
|
+
JsvTouchModeSwitcherCount--;
|
|
13
|
+
};
|
|
14
|
+
export const hasJsvTouchModeSwitcher = () => {
|
|
15
|
+
return JsvTouchModeSwitcherCount > 0;
|
|
16
|
+
};
|
|
@@ -32,14 +32,14 @@ interface infoObject {
|
|
|
32
32
|
}
|
|
33
33
|
|
|
34
34
|
const TAG = "JSvPreDownload";
|
|
35
|
-
let isNullNumber: number = 0;
|
|
36
|
-
let workNumber: number = 0;
|
|
37
35
|
abstract class JsvPreDownloaderBase {
|
|
38
36
|
public download(url: string | Array<DownloadListItem>, netSetting: string = "", isImage: boolean = false) {
|
|
39
37
|
return new Promise((resolve, reject) => {
|
|
40
38
|
if (typeof url === "string") {
|
|
41
39
|
this.downloadInner(url, netSetting, isImage).then(resolve, reject);
|
|
42
40
|
} else if (Array.isArray(url) && url.length > 0) {
|
|
41
|
+
let isNullNumber: number = 0;
|
|
42
|
+
let workNumber: number = 0;
|
|
43
43
|
const downloadResult = new Array(url.length);
|
|
44
44
|
const check = () => {
|
|
45
45
|
let allDone = false;
|
|
@@ -119,9 +119,9 @@ function openWindow(url, startup_image, startup_video, startup_duration, add_his
|
|
|
119
119
|
* @param {string} startup_video 启动视频url
|
|
120
120
|
* @param {int} startup_duration 启动图时长,默认0
|
|
121
121
|
* @param {int} add_history 是否添加历史,0不添加,1添加
|
|
122
|
-
* @returns {Promise}
|
|
122
|
+
* @returns {Promise} 比openWindow返回信息更丰富, 可获取启动者的更多返回信息
|
|
123
123
|
*/
|
|
124
|
-
function
|
|
124
|
+
function openMiniApp(url, startup_image, startup_video, startup_duration, add_history) {
|
|
125
125
|
let setting = {};
|
|
126
126
|
if (startup_image !== null && startup_image !== "")
|
|
127
127
|
setting.startupImage = startup_image;
|
|
@@ -134,7 +134,7 @@ function openApp(url, startup_image, startup_video, startup_duration, add_histor
|
|
|
134
134
|
setting.addHistory = (add_history ? 1 : 0); // 兼容true/false传值
|
|
135
135
|
|
|
136
136
|
// direct_call("openWindow", url, JSON.stringify(setting));
|
|
137
|
-
return window.jJsvRuntimeBridge.
|
|
137
|
+
return window.jJsvRuntimeBridge.openMiniApp(url, JSON.stringify(setting))
|
|
138
138
|
}
|
|
139
139
|
|
|
140
140
|
/**
|
|
@@ -256,25 +256,25 @@ function getInstalledApps() {
|
|
|
256
256
|
*/
|
|
257
257
|
function startNativeApp(package_name, activity, action, uri, flags, param, category) {
|
|
258
258
|
var obj = {};
|
|
259
|
-
if (package_name
|
|
259
|
+
if (package_name && package_name !== "")
|
|
260
260
|
obj.packageName = package_name;
|
|
261
261
|
|
|
262
|
-
if (activity
|
|
262
|
+
if (activity && activity !== "")
|
|
263
263
|
obj.activity = activity;
|
|
264
264
|
|
|
265
|
-
if (action
|
|
265
|
+
if (action && action !== "")
|
|
266
266
|
obj.action = action;
|
|
267
267
|
|
|
268
|
-
if (uri
|
|
268
|
+
if (uri && uri !== "")
|
|
269
269
|
obj.uri = uri;
|
|
270
270
|
|
|
271
|
-
if (flags
|
|
271
|
+
if (flags && flags.length > 0)
|
|
272
272
|
obj.flags = flags;
|
|
273
273
|
|
|
274
|
-
if (param
|
|
274
|
+
if (param && param.length > 0)
|
|
275
275
|
obj.param = param;
|
|
276
276
|
|
|
277
|
-
if (category
|
|
277
|
+
if (category && category.length > 0)
|
|
278
278
|
obj.category = category
|
|
279
279
|
|
|
280
280
|
direct_call("startNativeApp", JSON.stringify(obj));
|
|
@@ -293,25 +293,25 @@ function startNativeApp(package_name, activity, action, uri, flags, param, categ
|
|
|
293
293
|
*/
|
|
294
294
|
function openNativeApp(package_name, activity, action, uri, flags, param, category) {
|
|
295
295
|
var obj = {};
|
|
296
|
-
if (package_name
|
|
296
|
+
if (package_name && package_name !== "")
|
|
297
297
|
obj.packageName = package_name;
|
|
298
298
|
|
|
299
|
-
if (activity
|
|
299
|
+
if (activity && activity !== "")
|
|
300
300
|
obj.activity = activity;
|
|
301
301
|
|
|
302
|
-
if (action
|
|
302
|
+
if (action && action !== "")
|
|
303
303
|
obj.action = action;
|
|
304
304
|
|
|
305
|
-
if (uri
|
|
305
|
+
if (uri && uri !== "")
|
|
306
306
|
obj.uri = uri;
|
|
307
307
|
|
|
308
|
-
if (flags
|
|
308
|
+
if (flags && flags.length > 0)
|
|
309
309
|
obj.flags = flags;
|
|
310
310
|
|
|
311
|
-
if (param
|
|
311
|
+
if (param && param.length > 0)
|
|
312
312
|
obj.param = param;
|
|
313
313
|
|
|
314
|
-
if (category
|
|
314
|
+
if (category && category.length > 0)
|
|
315
315
|
obj.category = category
|
|
316
316
|
|
|
317
317
|
|
|
@@ -404,6 +404,19 @@ function getAppInfo() {
|
|
|
404
404
|
return direct_call("getAppInfo");
|
|
405
405
|
}
|
|
406
406
|
|
|
407
|
+
/**
|
|
408
|
+
* 通知JsView页面可见性准备好, 主要用于JsView界面从不可见到可见切换时,
|
|
409
|
+
* 避免JsView的未绘制的黑屏被看见, 一般会在android层用张图来进行遮盖, 然后通过此接口来通知拿掉遮盖
|
|
410
|
+
* @returns
|
|
411
|
+
*/
|
|
412
|
+
function notifyVisibleReady() {
|
|
413
|
+
// 触发一次swap, 并在绘制完成后再回调, 以保证绘制界面完整
|
|
414
|
+
window.JsvCoreApi.AddSwappedOnceListener(()=>{
|
|
415
|
+
direct_call("notifyVisibleReady");
|
|
416
|
+
});
|
|
417
|
+
window.Forge.sRenderBridge.RequestSwap();
|
|
418
|
+
}
|
|
419
|
+
|
|
407
420
|
/**
|
|
408
421
|
* 页面加载成功后调用去除启动图
|
|
409
422
|
*
|
|
@@ -414,7 +427,7 @@ function notifyPageLoadDone() {
|
|
|
414
427
|
|
|
415
428
|
function notifyPageLoaded() {
|
|
416
429
|
// 激活JsView的按键优化处理逻辑
|
|
417
|
-
window.JsvCoreApi.
|
|
430
|
+
window.JsvCoreApi.notifyPageLoaded?.();
|
|
418
431
|
|
|
419
432
|
direct_call("notifyPageLoaded");
|
|
420
433
|
}
|
|
@@ -701,6 +714,13 @@ function getBootTime(){
|
|
|
701
714
|
return direct_call("getBootTime")
|
|
702
715
|
}
|
|
703
716
|
|
|
717
|
+
/**
|
|
718
|
+
* reload页面并尝试下一个备份启动地址
|
|
719
|
+
*/
|
|
720
|
+
function tryNextBackupIntent() {
|
|
721
|
+
direct_call("tryNextBackupIntent");
|
|
722
|
+
}
|
|
723
|
+
|
|
704
724
|
|
|
705
725
|
// 显示声明,可以提高执行速度和利用上编辑器的成员名提示功能
|
|
706
726
|
const bridge = {
|
|
@@ -710,7 +730,7 @@ const bridge = {
|
|
|
710
730
|
getDeviceUUID,
|
|
711
731
|
getAndroidId,
|
|
712
732
|
openWindow,
|
|
713
|
-
|
|
733
|
+
openMiniApp,
|
|
714
734
|
startUrlInNewTab,
|
|
715
735
|
openAppInNewTab,
|
|
716
736
|
onWindowResult,
|
|
@@ -725,6 +745,7 @@ const bridge = {
|
|
|
725
745
|
startService,
|
|
726
746
|
getDeviceInfo,
|
|
727
747
|
getAppInfo,
|
|
748
|
+
notifyVisibleReady,
|
|
728
749
|
notifyPageLoadDone,
|
|
729
750
|
notifyPageLoaded,
|
|
730
751
|
hasFavouriteFunction,
|
|
@@ -58,6 +58,13 @@ const getOneLineTextDrawWidth = (text: string, style: FontStyleDefine) => {
|
|
|
58
58
|
return Forge.TextUtils.GetOneLineTextDrawWidth(text, style);
|
|
59
59
|
}
|
|
60
60
|
|
|
61
|
+
const breakLines = (text: string, style: FontStyleDefine, width: number) => {
|
|
62
|
+
if (text && typeof text != "string") {
|
|
63
|
+
text = "" + text; // 规避text为非字符串导致接口调用错误的问题
|
|
64
|
+
}
|
|
65
|
+
return Forge.TextUtils.BreakLines(text, style, width);
|
|
66
|
+
}
|
|
67
|
+
|
|
61
68
|
const isRtl = (str: string) => {
|
|
62
69
|
//arabic
|
|
63
70
|
for (let i = 0; i < str.length; i++) {
|
|
@@ -152,7 +159,8 @@ const TextTools = {
|
|
|
152
159
|
isRtl,
|
|
153
160
|
getCursorPosition,
|
|
154
161
|
getCursorPositionCached,
|
|
155
|
-
recycleCursorPositionCache
|
|
162
|
+
recycleCursorPositionCache,
|
|
163
|
+
breakLines
|
|
156
164
|
}
|
|
157
165
|
|
|
158
166
|
export { getTextWidth, TextTools };
|
|
@@ -0,0 +1,180 @@
|
|
|
1
|
+
import ForgeHandles from "../../../JsViewVueTools/ForgeHandles";
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
const enum BitPaletteCommand {
|
|
5
|
+
Cmd_GetDomainColorSync = 1003, // 同步,return StringPtr
|
|
6
|
+
Cmd_SubMapBlob, // 异步,回调 jse::Function
|
|
7
|
+
Cmd_SubMapTextureSync, // 同步,return StringPtr
|
|
8
|
+
Cmd_ToStoreTmpBufferSync // 同步,return buffer id
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
class BitPaletteCtrl {
|
|
12
|
+
private _texture: any = null;
|
|
13
|
+
private _recycled: boolean = false;
|
|
14
|
+
|
|
15
|
+
constructor(texture: any) {
|
|
16
|
+
this._texture = texture;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* 获取图片的主色调(dominant color),返回一个 Promise,可与 async/await 配合使用。<br>
|
|
21
|
+
* 使用方式示例:
|
|
22
|
+
*
|
|
23
|
+
* 异步/Promise方式:
|
|
24
|
+
* let colorStrJson = await bitPalette.Ctrl.getDomainColorSync();
|
|
25
|
+
* if (colorStrJson) {
|
|
26
|
+
* let colorsList = JSON.parse(colorStrJson);
|
|
27
|
+
* // colorsList 是主色调数组
|
|
28
|
+
* }
|
|
29
|
+
*
|
|
30
|
+
*/
|
|
31
|
+
getDomainColorSync(): Promise<any> {
|
|
32
|
+
let _this = this;
|
|
33
|
+
return new Promise<any>(async (resolve, reject) => {
|
|
34
|
+
// 用await关联, 让doCommand的reject时自动触发本Promise的reject
|
|
35
|
+
await _this.doCommand(BitPaletteCommand.Cmd_GetDomainColorSync, {}, (result: any) => {
|
|
36
|
+
if (_this._recycled) {
|
|
37
|
+
reject();
|
|
38
|
+
return;
|
|
39
|
+
}
|
|
40
|
+
resolve(result);
|
|
41
|
+
});
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
toBlob() : Promise<Blob | null> {
|
|
46
|
+
let bufferId = ForgeHandles.sRenderBridge.GenStoreBufferId();
|
|
47
|
+
// 返回一个Promise,同时支持callback
|
|
48
|
+
let _this = this;
|
|
49
|
+
return new Promise<Blob | null>(async (resolve, reject) => {
|
|
50
|
+
// 用await关联, 让doCommand的reject时自动触发本Promise的reject
|
|
51
|
+
await _this.doCommand(BitPaletteCommand.Cmd_ToStoreTmpBufferSync, {bufId:bufferId}, async () => {
|
|
52
|
+
if (_this._recycled) {
|
|
53
|
+
reject();
|
|
54
|
+
return;
|
|
55
|
+
}
|
|
56
|
+
let newBlob: Blob = await (Blob as any).jsvCreateFromForge(bufferId);
|
|
57
|
+
resolve(newBlob);
|
|
58
|
+
});
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
// 不是对外接口
|
|
63
|
+
private doCommand(command: BitPaletteCommand, params: object, callback: ((result: any) => void) | undefined) {
|
|
64
|
+
// 用asyncPromise来支持 await 语法, 也可以直接用callback
|
|
65
|
+
let asyncPromise = new Promise((resolve, reject) => {
|
|
66
|
+
this._texture.doCommand(command, params? JSON.stringify(params) : "{}", (result: any) => {
|
|
67
|
+
if (this._recycled) {
|
|
68
|
+
reject();
|
|
69
|
+
return;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
callback?.(result); // 先回调callback, 再resolve
|
|
73
|
+
resolve(result);
|
|
74
|
+
});
|
|
75
|
+
});
|
|
76
|
+
return asyncPromise;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
markRecycled() {
|
|
80
|
+
this._recycled = true;
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
/*
|
|
85
|
+
------------------------------------------------------------
|
|
86
|
+
BitPalette使用最佳实践, Ctrl属性在ready后才能使用
|
|
87
|
+
|
|
88
|
+
1. 使用callback方案
|
|
89
|
+
let hdl = new BitPalette(src, () => {
|
|
90
|
+
console.log("ready by callback");
|
|
91
|
+
hdl.Ctrl.doCommand(cmd_id, {...}, (result) => {
|
|
92
|
+
console.log("result:", result);
|
|
93
|
+
});
|
|
94
|
+
});
|
|
95
|
+
|
|
96
|
+
2. 使用Promise方案
|
|
97
|
+
let hdl = new BitPalette(src);
|
|
98
|
+
try {
|
|
99
|
+
await hdl.Ready;
|
|
100
|
+
} catch (error) {
|
|
101
|
+
console.error("canceled");
|
|
102
|
+
}
|
|
103
|
+
let result = await hdl.Ctrl.doCommand(cmd_id, {...});
|
|
104
|
+
|
|
105
|
+
3. 使用完毕要释放资源时
|
|
106
|
+
hdl.recycle(); // 此处理可以在callback之前或者之后都可以, 在callback之前相当于cancel
|
|
107
|
+
|
|
108
|
+
------------------------------------------------------------
|
|
109
|
+
BitPalette的命令行处理:
|
|
110
|
+
1. 使用callback方案
|
|
111
|
+
hdl.Ctrl.doCommand(cmd_id, {...}, (result) => {
|
|
112
|
+
console.log("result:", result);
|
|
113
|
+
});
|
|
114
|
+
|
|
115
|
+
2. 使用Promise方案(同步或者异步都如此调用)
|
|
116
|
+
let result = await hdl.Ctrl.doCommand(cmd_id, {...});
|
|
117
|
+
*/
|
|
118
|
+
|
|
119
|
+
export class BitPalette {
|
|
120
|
+
private _recycled: boolean = false;
|
|
121
|
+
private _readyReject: any = null;
|
|
122
|
+
private _texture: any = null;
|
|
123
|
+
|
|
124
|
+
public Ctrl: BitPaletteCtrl | null = null;
|
|
125
|
+
public Ready: Promise<BitPalette> | null = null;
|
|
126
|
+
|
|
127
|
+
constructor(src: string, callback?: () => void) {
|
|
128
|
+
const setting = { src };
|
|
129
|
+
this._texture = (ForgeHandles.TextureManager as any).GetImageProcessTexture(
|
|
130
|
+
JSON.stringify(setting)
|
|
131
|
+
);
|
|
132
|
+
// 关掉自动卸载, 靠主动的 RequestToUnload 来卸载
|
|
133
|
+
this._texture.DisableAutoRecycle();
|
|
134
|
+
|
|
135
|
+
// 声明 ready 以支持 await 语法
|
|
136
|
+
let _this = this;
|
|
137
|
+
this.Ready = new Promise((resolve, reject) => {
|
|
138
|
+
this._readyReject = reject;
|
|
139
|
+
this._texture.RegisterLoadImageCallback(src, () => {
|
|
140
|
+
if (this._recycled) {
|
|
141
|
+
return;
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
// 完成ready后取消readyReject处理
|
|
145
|
+
this._readyReject = null;
|
|
146
|
+
|
|
147
|
+
// 构建 controller 以支持后续的 doCommand 调用
|
|
148
|
+
this.Ctrl = new BitPaletteCtrl(this._texture);
|
|
149
|
+
|
|
150
|
+
callback?.();
|
|
151
|
+
resolve(_this);
|
|
152
|
+
});
|
|
153
|
+
});
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
recycle() {
|
|
157
|
+
if (this._recycled) {
|
|
158
|
+
return;
|
|
159
|
+
}
|
|
160
|
+
this._recycled = true;
|
|
161
|
+
|
|
162
|
+
// 进行promise的reject处理, 保证ready的reject不被遗漏
|
|
163
|
+
this._readyReject?.();
|
|
164
|
+
this._readyReject = null;
|
|
165
|
+
|
|
166
|
+
// 释放texture资源
|
|
167
|
+
this._texture?.RequestToUnload();
|
|
168
|
+
this._texture = null;
|
|
169
|
+
|
|
170
|
+
// 让Ctrl处于recycle状态, 规避异步回调
|
|
171
|
+
this.Ctrl?.markRecycled();
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
static CommandType = {
|
|
175
|
+
GetDomainColorSync: BitPaletteCommand.Cmd_GetDomainColorSync,
|
|
176
|
+
SubMapBlob: BitPaletteCommand.Cmd_SubMapBlob,
|
|
177
|
+
SubMapTextureSync: BitPaletteCommand.Cmd_SubMapTextureSync,
|
|
178
|
+
ToStoreTmpBuffer: BitPaletteCommand.Cmd_ToStoreTmpBufferSync,
|
|
179
|
+
}
|
|
180
|
+
}
|