@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
|
@@ -0,0 +1,260 @@
|
|
|
1
|
+
import { EdgeDirection } from "../WidgetCommon";
|
|
2
|
+
export interface Rect {
|
|
3
|
+
left: number;
|
|
4
|
+
top: number;
|
|
5
|
+
right: number;
|
|
6
|
+
bottom: number;
|
|
7
|
+
centerX: number;
|
|
8
|
+
centerY: number;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export interface SpatialNavigationCandidate<T> {
|
|
12
|
+
data: T;
|
|
13
|
+
rect: Rect;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
interface CandidateScore<T> {
|
|
17
|
+
candidate: SpatialNavigationCandidate<T>;
|
|
18
|
+
primaryDistance: number;
|
|
19
|
+
secondaryDistance: number;
|
|
20
|
+
secondaryOverlapRange: number;
|
|
21
|
+
centerDistance: number;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
*
|
|
26
|
+
* @param current 当前元素
|
|
27
|
+
* @param candidates 候选元素列表
|
|
28
|
+
* @param direction 移动方向
|
|
29
|
+
* @description 寻找逻辑(以往下找为例子):
|
|
30
|
+
* 1. 先寻找主方向最近的元素(item.top - cur.bottom 为正且最小的)tagItem
|
|
31
|
+
* 2. 寻找与tagItem在主方向重叠的元素(与tagItem纵向有重叠的元素,构成一个待选行)
|
|
32
|
+
* 3. 选择待选行中的离current副方向最近的元素(x距离最小的)
|
|
33
|
+
*/
|
|
34
|
+
export function findNextLayerFirst<T>(
|
|
35
|
+
current: SpatialNavigationCandidate<T>,
|
|
36
|
+
candidates: SpatialNavigationCandidate<T>[],
|
|
37
|
+
direction: Symbol
|
|
38
|
+
): SpatialNavigationCandidate<T> | null {
|
|
39
|
+
const scored: CandidateScore<T>[] = [];
|
|
40
|
+
|
|
41
|
+
for (const candidate of candidates) {
|
|
42
|
+
const primaryDistance = getPrimaryDistance(
|
|
43
|
+
current.rect,
|
|
44
|
+
candidate.rect,
|
|
45
|
+
direction
|
|
46
|
+
);
|
|
47
|
+
//在direction相反方向的,全部忽略
|
|
48
|
+
if (primaryDistance < 0) {
|
|
49
|
+
continue;
|
|
50
|
+
}
|
|
51
|
+
const sInfo = getSecondaryDistance(current.rect, candidate.rect, direction);
|
|
52
|
+
let secondaryDistance = 0;
|
|
53
|
+
if (sInfo.type == 1 || sInfo.type == 2) {
|
|
54
|
+
secondaryDistance = sInfo.distance;
|
|
55
|
+
} else {
|
|
56
|
+
secondaryDistance = 0;
|
|
57
|
+
}
|
|
58
|
+
scored.push({
|
|
59
|
+
candidate,
|
|
60
|
+
primaryDistance,
|
|
61
|
+
secondaryDistance,
|
|
62
|
+
secondaryOverlapRange: sInfo.type === 0 ? sInfo.distance : 0,
|
|
63
|
+
centerDistance: getCenterDistance(current.rect, candidate.rect),
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
if (scored.length === 0) {
|
|
67
|
+
return null;
|
|
68
|
+
}
|
|
69
|
+
let minItem = scored[0];
|
|
70
|
+
for (let i = 1; i < scored.length; i++) {
|
|
71
|
+
if (scored[i].primaryDistance < minItem.primaryDistance) {
|
|
72
|
+
minItem = scored[i];
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
const filteredScored = scored
|
|
76
|
+
.filter(
|
|
77
|
+
(item) =>
|
|
78
|
+
getPrimaryOverlay(
|
|
79
|
+
minItem.candidate.rect,
|
|
80
|
+
item.candidate.rect,
|
|
81
|
+
direction
|
|
82
|
+
) > 0
|
|
83
|
+
)
|
|
84
|
+
.sort((a, b) => {
|
|
85
|
+
if (a.secondaryOverlapRange != b.secondaryOverlapRange) {
|
|
86
|
+
return b.secondaryOverlapRange - a.secondaryOverlapRange;
|
|
87
|
+
}
|
|
88
|
+
if (Math.abs(a.secondaryDistance) != Math.abs(b.secondaryDistance)) {
|
|
89
|
+
return Math.abs(a.secondaryDistance) - Math.abs(b.secondaryDistance);
|
|
90
|
+
}
|
|
91
|
+
if (a.centerDistance != b.centerDistance) {
|
|
92
|
+
return a.centerDistance - b.centerDistance;
|
|
93
|
+
}
|
|
94
|
+
return 0;
|
|
95
|
+
});
|
|
96
|
+
|
|
97
|
+
return filteredScored[0]?.candidate ?? null;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
export function findNextCandidate<T>(
|
|
101
|
+
current: SpatialNavigationCandidate<T>,
|
|
102
|
+
candidates: SpatialNavigationCandidate<T>[],
|
|
103
|
+
direction: Symbol
|
|
104
|
+
): SpatialNavigationCandidate<T> | null {
|
|
105
|
+
const scored: CandidateScore<T>[] = [];
|
|
106
|
+
|
|
107
|
+
for (const candidate of candidates) {
|
|
108
|
+
const primaryDistance = getPrimaryDistance(
|
|
109
|
+
current.rect,
|
|
110
|
+
candidate.rect,
|
|
111
|
+
direction
|
|
112
|
+
);
|
|
113
|
+
if (primaryDistance < 0) {
|
|
114
|
+
continue;
|
|
115
|
+
}
|
|
116
|
+
const secondaryDistance = getSecondaryDistance(
|
|
117
|
+
current.rect,
|
|
118
|
+
candidate.rect,
|
|
119
|
+
direction
|
|
120
|
+
);
|
|
121
|
+
// 必须要在次方向(与主方向垂直的方向)上与当前元素有重叠才能被视为是可移动的
|
|
122
|
+
if (secondaryDistance.type !== 0) {
|
|
123
|
+
continue;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
scored.push({
|
|
127
|
+
candidate,
|
|
128
|
+
primaryDistance,
|
|
129
|
+
secondaryDistance:
|
|
130
|
+
secondaryDistance.type === 0 ? 0 : secondaryDistance.distance,
|
|
131
|
+
secondaryOverlapRange:
|
|
132
|
+
secondaryDistance.type === 0 ? secondaryDistance.distance : 0,
|
|
133
|
+
centerDistance: getCenterDistance(current.rect, candidate.rect),
|
|
134
|
+
});
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
if (scored.length === 0) {
|
|
138
|
+
return null;
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
//选择逻辑
|
|
142
|
+
//选择primaryDistance最近的item,待选的item中与其在primary方向有重叠的认为是同一行的元素,获取同一行中占比最大的item
|
|
143
|
+
let baseItem = scored[0];
|
|
144
|
+
for (const item of scored) {
|
|
145
|
+
if (item.primaryDistance < baseItem.primaryDistance) {
|
|
146
|
+
baseItem = item;
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
const filteredScored = scored
|
|
151
|
+
.filter(
|
|
152
|
+
(item) =>
|
|
153
|
+
getPrimaryOverlay(
|
|
154
|
+
baseItem.candidate.rect,
|
|
155
|
+
item.candidate.rect,
|
|
156
|
+
direction
|
|
157
|
+
) > 0
|
|
158
|
+
)
|
|
159
|
+
.sort((a, b) => {
|
|
160
|
+
if (a.secondaryOverlapRange != b.secondaryOverlapRange) {
|
|
161
|
+
return b.secondaryOverlapRange - a.secondaryOverlapRange;
|
|
162
|
+
}
|
|
163
|
+
if (Math.abs(a.secondaryDistance) != Math.abs(b.secondaryDistance)) {
|
|
164
|
+
return Math.abs(a.secondaryDistance) - Math.abs(b.secondaryDistance);
|
|
165
|
+
}
|
|
166
|
+
if (a.centerDistance != b.centerDistance) {
|
|
167
|
+
return a.centerDistance - b.centerDistance;
|
|
168
|
+
}
|
|
169
|
+
return 0;
|
|
170
|
+
});
|
|
171
|
+
return filteredScored[0]?.candidate ?? null;
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
function getPrimaryDistance(
|
|
175
|
+
current: Rect,
|
|
176
|
+
candidate: Rect,
|
|
177
|
+
direction: Symbol
|
|
178
|
+
): number {
|
|
179
|
+
switch (direction) {
|
|
180
|
+
case EdgeDirection.left:
|
|
181
|
+
return current.left - candidate.right;
|
|
182
|
+
case EdgeDirection.right:
|
|
183
|
+
return candidate.left - current.right;
|
|
184
|
+
case EdgeDirection.top:
|
|
185
|
+
return current.top - candidate.bottom;
|
|
186
|
+
case EdgeDirection.bottom:
|
|
187
|
+
return candidate.top - current.bottom;
|
|
188
|
+
default:
|
|
189
|
+
return -1;
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
function getPrimaryOverlay(current: Rect, candidate: Rect, direction: Symbol) {
|
|
194
|
+
if (direction === EdgeDirection.left || direction === EdgeDirection.right) {
|
|
195
|
+
return Math.max(
|
|
196
|
+
0,
|
|
197
|
+
Math.min(current.right, candidate.right) -
|
|
198
|
+
Math.max(current.left, candidate.left)
|
|
199
|
+
);
|
|
200
|
+
}
|
|
201
|
+
return Math.max(
|
|
202
|
+
0,
|
|
203
|
+
Math.min(current.bottom, candidate.bottom) -
|
|
204
|
+
Math.max(current.top, candidate.top)
|
|
205
|
+
);
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
function getSecondaryDistance(
|
|
209
|
+
current: Rect,
|
|
210
|
+
candidate: Rect,
|
|
211
|
+
direction: Symbol
|
|
212
|
+
) {
|
|
213
|
+
if (direction === EdgeDirection.left || direction === EdgeDirection.right) {
|
|
214
|
+
return getAxisDistance(
|
|
215
|
+
current.top,
|
|
216
|
+
current.bottom,
|
|
217
|
+
candidate.top,
|
|
218
|
+
candidate.bottom
|
|
219
|
+
);
|
|
220
|
+
}
|
|
221
|
+
return getAxisDistance(
|
|
222
|
+
current.left,
|
|
223
|
+
current.right,
|
|
224
|
+
candidate.left,
|
|
225
|
+
candidate.right
|
|
226
|
+
);
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
function getCenterDistance(current: Rect, candidate: Rect) {
|
|
230
|
+
return Math.hypot(
|
|
231
|
+
current.centerX - candidate.centerX,
|
|
232
|
+
current.centerY - candidate.centerY
|
|
233
|
+
);
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
function getAxisDistance(
|
|
237
|
+
startA: number,
|
|
238
|
+
endA: number,
|
|
239
|
+
startB: number,
|
|
240
|
+
endB: number
|
|
241
|
+
) {
|
|
242
|
+
const overlapStart = Math.max(startA, startB);
|
|
243
|
+
const overlapEnd = Math.min(endA, endB);
|
|
244
|
+
if (overlapStart <= overlapEnd) {
|
|
245
|
+
return {
|
|
246
|
+
type: 0,
|
|
247
|
+
distance: overlapEnd - overlapStart,
|
|
248
|
+
};
|
|
249
|
+
}
|
|
250
|
+
if (endB < startA) {
|
|
251
|
+
return {
|
|
252
|
+
type: 1,
|
|
253
|
+
distance: startA - endB,
|
|
254
|
+
};
|
|
255
|
+
}
|
|
256
|
+
return {
|
|
257
|
+
type: 2,
|
|
258
|
+
distance: startB - endA,
|
|
259
|
+
};
|
|
260
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import type { Ref } from "vue";
|
|
2
|
+
import type { Rect } from "./SpatialNavigationAlgorithm";
|
|
3
|
+
export class SpatialNavigationNode {
|
|
4
|
+
private mRect: Rect | undefined;
|
|
5
|
+
constructor(
|
|
6
|
+
private getPosition: (token: number,div: unknown) => Rect | undefined,
|
|
7
|
+
public getMwInfo: () => {
|
|
8
|
+
mwChain: any[],
|
|
9
|
+
itemIndex: number,
|
|
10
|
+
},
|
|
11
|
+
private mOnFocus: () => void,
|
|
12
|
+
private mOnBlur: () => void,
|
|
13
|
+
) {
|
|
14
|
+
this.mRect = undefined;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
public onFocus() {
|
|
18
|
+
this.mOnFocus();
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
public onBlur() {
|
|
22
|
+
this.mOnBlur();
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
public updateRect(token: number,root: unknown) {
|
|
26
|
+
this.mRect = this.getPosition(token, root);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
public getRect() {
|
|
30
|
+
return this.mRect;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
@@ -0,0 +1,236 @@
|
|
|
1
|
+
import { EdgeDirection } from "../WidgetCommon";
|
|
2
|
+
import {
|
|
3
|
+
findNextCandidate,
|
|
4
|
+
Rect,
|
|
5
|
+
findNextLayerFirst,
|
|
6
|
+
SpatialNavigationCandidate,
|
|
7
|
+
} from "./SpatialNavigationAlgorithm";
|
|
8
|
+
import { SpatialNavigationNode } from "./SpatialNavigationNode";
|
|
9
|
+
import type { Ref } from "vue";
|
|
10
|
+
|
|
11
|
+
export const SPATIAL_NAV_PROVIDER_NAME = "__jsv_spatialNavProvider";
|
|
12
|
+
|
|
13
|
+
type MoveType = "normal" | "layerFirst";
|
|
14
|
+
export interface MoveOptions {
|
|
15
|
+
xMoveType?: MoveType;
|
|
16
|
+
yMoveType?: MoveType;
|
|
17
|
+
moveType?: MoveType;
|
|
18
|
+
}
|
|
19
|
+
export class SpatialNavigator {
|
|
20
|
+
private nodes = new Set<SpatialNavigationNode>();
|
|
21
|
+
private currentNode: SpatialNavigationNode | undefined = undefined;
|
|
22
|
+
private divRef: Ref<unknown> | undefined = undefined;
|
|
23
|
+
private mFocusHub: any;
|
|
24
|
+
private mFindNextToken: number = 0;
|
|
25
|
+
private mOnEdge: Function | undefined = undefined;
|
|
26
|
+
private mXDefaultMoveType: MoveType = "normal";
|
|
27
|
+
private mYDefaultMoveType: MoveType = "normal";
|
|
28
|
+
|
|
29
|
+
constructor(divRef: Ref<unknown>, focusHub: any, onEdge: Function) {
|
|
30
|
+
this.divRef = divRef;
|
|
31
|
+
this.mFocusHub = focusHub;
|
|
32
|
+
this.mOnEdge = onEdge;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
public getDiv() {
|
|
36
|
+
return this.divRef?.value;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
*
|
|
41
|
+
* @param moveType 默认移动方式:normal(默认)、layerFirst
|
|
42
|
+
*/
|
|
43
|
+
public setDefaultMoveType(xMoveType: MoveType, yMoveType: MoveType) {
|
|
44
|
+
if (xMoveType !== "normal" && xMoveType !== "layerFirst") {
|
|
45
|
+
console.warn("SpatialNavigator: xMoveType is not valid");
|
|
46
|
+
return;
|
|
47
|
+
}
|
|
48
|
+
if (yMoveType !== "normal" && yMoveType !== "layerFirst") {
|
|
49
|
+
console.warn("SpatialNavigator: yMoveType is not valid");
|
|
50
|
+
return;
|
|
51
|
+
}
|
|
52
|
+
this.mXDefaultMoveType = xMoveType;
|
|
53
|
+
this.mYDefaultMoveType = yMoveType;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
public setFocus(node: SpatialNavigationNode) {
|
|
57
|
+
if (!node) {
|
|
58
|
+
return;
|
|
59
|
+
}
|
|
60
|
+
if (this.currentNode === node) {
|
|
61
|
+
return;
|
|
62
|
+
}
|
|
63
|
+
this.currentNode?.onBlur();
|
|
64
|
+
this.currentNode = node;
|
|
65
|
+
this.currentNode.onFocus();
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
public registerNode(node: SpatialNavigationNode) {
|
|
69
|
+
if (!node) {
|
|
70
|
+
return;
|
|
71
|
+
}
|
|
72
|
+
this.nodes.add(node);
|
|
73
|
+
if (!this.currentNode) {
|
|
74
|
+
this.currentNode = node;
|
|
75
|
+
this.currentNode.onFocus();
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
public unregisterNode(node: SpatialNavigationNode) {
|
|
80
|
+
if (!node) {
|
|
81
|
+
return;
|
|
82
|
+
}
|
|
83
|
+
if (this.currentNode === node) {
|
|
84
|
+
this.currentNode.onBlur();
|
|
85
|
+
this.currentNode = undefined;
|
|
86
|
+
}
|
|
87
|
+
this.nodes.delete(node);
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
/**
|
|
91
|
+
*
|
|
92
|
+
* @param direction 移动方向
|
|
93
|
+
* @param options 移动选项
|
|
94
|
+
* @param options.xMoveType x方向移动方式:normal(默认)、layerFirst
|
|
95
|
+
* @param options.yMoveType y方向移动方式:normal(默认)、layerFirst
|
|
96
|
+
* @param options.moveType 移动方式:normal(默认)、layerFirst
|
|
97
|
+
* @returns
|
|
98
|
+
*/
|
|
99
|
+
public moveTo(direction: Symbol, options?: MoveOptions) {
|
|
100
|
+
if (!this.divRef?.value) {
|
|
101
|
+
console.warn("SpatialNavigator: divRef is not set");
|
|
102
|
+
return;
|
|
103
|
+
}
|
|
104
|
+
let xMoveType = options?.moveType ?? options?.xMoveType ?? this.mXDefaultMoveType;
|
|
105
|
+
let yMoveType = options?.moveType ?? options?.yMoveType ?? this.mYDefaultMoveType;
|
|
106
|
+
let moveType =
|
|
107
|
+
direction == EdgeDirection.top || direction == EdgeDirection.bottom
|
|
108
|
+
? yMoveType
|
|
109
|
+
: xMoveType;
|
|
110
|
+
const nextNode = this.findNode(direction, this.divRef?.value, moveType);
|
|
111
|
+
if (!nextNode || nextNode === this.currentNode) {
|
|
112
|
+
const rect = this.currentNode?.getRect();
|
|
113
|
+
let exportRect = null;
|
|
114
|
+
if (rect) {
|
|
115
|
+
exportRect = {
|
|
116
|
+
x: rect.left,
|
|
117
|
+
y: rect.top,
|
|
118
|
+
width: rect.right - rect.left,
|
|
119
|
+
height: rect.bottom - rect.top,
|
|
120
|
+
};
|
|
121
|
+
}
|
|
122
|
+
this.mOnEdge?.({
|
|
123
|
+
direction: direction,
|
|
124
|
+
rect: exportRect,
|
|
125
|
+
});
|
|
126
|
+
return;
|
|
127
|
+
}
|
|
128
|
+
let preNode = this.currentNode;
|
|
129
|
+
// this.currentNode?.onBlur();
|
|
130
|
+
this.currentNode = nextNode;
|
|
131
|
+
// this.currentNode.onFocus();
|
|
132
|
+
this.updateMetroWidgetFocus(preNode, this.currentNode);
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
private updateMetroWidgetFocus(
|
|
136
|
+
oldNode: SpatialNavigationNode | undefined,
|
|
137
|
+
newNode: SpatialNavigationNode
|
|
138
|
+
) {
|
|
139
|
+
let newIndex = -1;
|
|
140
|
+
let oldIndex = -1;
|
|
141
|
+
const newMwChain = newNode.getMwInfo().mwChain;
|
|
142
|
+
const newItemIndex = newNode.getMwInfo().itemIndex;
|
|
143
|
+
|
|
144
|
+
if (!oldNode) {
|
|
145
|
+
newIndex = 0;
|
|
146
|
+
oldIndex = 0;
|
|
147
|
+
} else {
|
|
148
|
+
const oldMwChain = oldNode.getMwInfo().mwChain;
|
|
149
|
+
for (let i = newMwChain.length - 1; i >= 0; i--) {
|
|
150
|
+
const index = oldMwChain.findIndex(
|
|
151
|
+
(item) => item.id === newMwChain[i].id
|
|
152
|
+
);
|
|
153
|
+
if (index !== -1) {
|
|
154
|
+
newIndex = i;
|
|
155
|
+
oldIndex = index;
|
|
156
|
+
break;
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
const preFocusToken = this.mFocusHub.getFocusCallToken();
|
|
162
|
+
const headIndex = Math.max(0, newIndex);
|
|
163
|
+
for (let i = newMwChain.length - 1; i >= headIndex; i--) {
|
|
164
|
+
const item = newMwChain[i];
|
|
165
|
+
if (i == newMwChain.length - 1) {
|
|
166
|
+
item.handler.setFocusId(newItemIndex, false, false);
|
|
167
|
+
} else {
|
|
168
|
+
const childItem = newMwChain[i + 1];
|
|
169
|
+
const childIndex = childItem.getSelfChildIndex();
|
|
170
|
+
item.handler.setFocusId(childIndex, false, false);
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
const postFocusToken = this.mFocusHub.getFocusCallToken();
|
|
174
|
+
const currentFocusStack = this.mFocusHub.getCurrentFocusStack();
|
|
175
|
+
const targetFocusName = newMwChain[newMwChain.length - 1].handler.getName();
|
|
176
|
+
//检查setFocusId操作有没有设置焦点
|
|
177
|
+
/**
|
|
178
|
+
* 不直接setFocus的原由:
|
|
179
|
+
* 南传epg楼层中有自定义的focusable组件时,发现这里会在custom设置了焦点后又把焦点抢到楼层MetroWidget上
|
|
180
|
+
*
|
|
181
|
+
* 修改逻辑:
|
|
182
|
+
* focusToken不变,说明在custom没有更改焦点,可以直接设置
|
|
183
|
+
* focusToken改变,说明在custom更改了焦点,但要保证targetFocusName在焦点链中,所以不在焦点链时可以设置,否则就不设置以防抢焦点
|
|
184
|
+
*/
|
|
185
|
+
if (preFocusToken === postFocusToken) {
|
|
186
|
+
this.mFocusHub.setFocus(targetFocusName);
|
|
187
|
+
} else {
|
|
188
|
+
if (
|
|
189
|
+
!currentFocusStack.some((item: any) => item.name === targetFocusName)
|
|
190
|
+
) {
|
|
191
|
+
this.mFocusHub.setFocus(targetFocusName);
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
private findNode(
|
|
197
|
+
direction: Symbol,
|
|
198
|
+
root: unknown,
|
|
199
|
+
moveType?: "normal" | "layerFirst"
|
|
200
|
+
) {
|
|
201
|
+
const currentNode = this.currentNode;
|
|
202
|
+
if (!currentNode) {
|
|
203
|
+
return null;
|
|
204
|
+
}
|
|
205
|
+
this.mFindNextToken++;
|
|
206
|
+
for (const node of this.nodes) {
|
|
207
|
+
node.updateRect(this.mFindNextToken, root);
|
|
208
|
+
}
|
|
209
|
+
const currentRect = currentNode.getRect();
|
|
210
|
+
if (!currentRect) {
|
|
211
|
+
return undefined;
|
|
212
|
+
}
|
|
213
|
+
const candidates = Array.from(this.nodes)
|
|
214
|
+
.filter((node) => node !== currentNode && node.getRect() !== undefined)
|
|
215
|
+
.map((node) => ({
|
|
216
|
+
data: node,
|
|
217
|
+
rect: node.getRect() as Rect,
|
|
218
|
+
}));
|
|
219
|
+
let targetNode: SpatialNavigationCandidate<SpatialNavigationNode> | null =
|
|
220
|
+
null;
|
|
221
|
+
if (moveType === "layerFirst") {
|
|
222
|
+
targetNode = findNextLayerFirst(
|
|
223
|
+
{ data: currentNode, rect: currentRect },
|
|
224
|
+
candidates,
|
|
225
|
+
direction
|
|
226
|
+
);
|
|
227
|
+
} else {
|
|
228
|
+
targetNode = findNextCandidate(
|
|
229
|
+
{ data: currentNode, rect: currentRect },
|
|
230
|
+
candidates,
|
|
231
|
+
direction
|
|
232
|
+
);
|
|
233
|
+
}
|
|
234
|
+
return targetNode?.data ?? null;
|
|
235
|
+
}
|
|
236
|
+
}
|