@shijiu/jsview-vue 2.3.151-test.0 → 3.0.0-test.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/browser/BrowserAudio.mjs +200 -0
- package/bin/browser/BrowserJsvLatex.mjs +61 -0
- package/bin/export-sfc.mjs +8 -9
- package/bin/jsview-vue-common.mjs +9 -35
- package/bin/jsview-vue.mjs +22246 -23643
- package/bin/types/utils/JsViewEngineWidget/JsvFocus/JsvFocusBlock.vue.d.ts +9 -71
- package/bin/types/utils/JsViewEngineWidget/JsvFocus/JsvFocusHub.d.ts +18 -2
- package/bin/types/utils/JsViewEngineWidget/MetroWidget/Const.d.ts +4 -1
- package/bin/types/utils/JsViewEngineWidget/MetroWidget/DebugFrame.vue.d.ts +10 -7
- package/bin/types/utils/JsViewEngineWidget/MetroWidget/ListWidget.vue.d.ts +19 -178
- package/bin/types/utils/JsViewEngineWidget/MetroWidget/MetroWidget.vue.d.ts +19 -178
- package/bin/types/utils/JsViewEngineWidget/MetroWidget/MetroWidgetSetup.d.ts +24 -3
- package/bin/types/utils/JsViewEngineWidget/MetroWidget/PageUpdater.d.ts +7 -1
- package/bin/types/utils/JsViewEngineWidget/MetroWidget/RenderItem.d.ts +25 -5
- package/bin/types/utils/JsViewEngineWidget/MetroWidget/SlotComponent.vue.d.ts +9 -47
- package/bin/types/utils/JsViewEngineWidget/MetroWidget/TaskManager.d.ts +2 -1
- package/bin/types/utils/JsViewEngineWidget/MetroWidget/Utils.d.ts +2 -0
- package/bin/types/utils/JsViewEngineWidget/MetroWidget/WidgetRectInfo.d.ts +1 -1
- package/bin/types/utils/JsViewEngineWidget/SpatialNavigator/SpatialNavProvider.vue.d.ts +40 -0
- package/bin/types/utils/JsViewEngineWidget/SpatialNavigator/SpatialNavigationAlgorithm.d.ts +24 -0
- package/bin/types/utils/JsViewEngineWidget/SpatialNavigator/SpatialNavigationNode.d.ts +19 -0
- package/bin/types/utils/JsViewEngineWidget/SpatialNavigator/SpatialNavigator.d.ts +42 -0
- package/bin/types/utils/JsViewEngineWidget/TemplateParser/CommonMetroTemplate.d.ts +2 -1
- package/bin/types/utils/JsViewEngineWidget/TemplateParser/ListMetroTemplate.d.ts +2 -1
- package/bin/types/utils/JsViewEngineWidget/TemplateParser/MetroTemplate.d.ts +6 -4
- package/bin/types/utils/JsViewEngineWidget/TemplateParser/TemplateItemAdder.d.ts +9 -7
- package/bin/types/utils/JsViewEngineWidget/WidgetCommon.d.ts +17 -7
- package/bin/types/utils/JsViewEngineWidget/index.d.ts +3 -1
- package/bin/types/utils/JsViewPlugin/JsvAudio/BrowserAudio/BrowserAudio.vue.d.ts +140 -7
- package/bin/types/utils/JsViewPlugin/JsvAudio/BrowserAudio/JsvSystemAudio.vue.d.ts +12 -11
- package/bin/types/utils/JsViewPlugin/JsvAudio/Events.d.ts +10 -10
- package/bin/types/utils/JsViewPlugin/JsvAudio/JsvAudio.vue.d.ts +204 -17
- package/bin/types/utils/JsViewPlugin/JsvAudio/JsvAudioProxy.vue.d.ts +2 -1
- package/bin/types/utils/JsViewPlugin/JsvAudio/version.d.mts +11 -11
- package/bin/types/utils/JsViewPlugin/JsvAudio/version.d.ts +11 -11
- package/bin/types/utils/JsViewPlugin/JsvLatex/BrowserDomBuilder.d.ts +0 -1
- package/bin/types/utils/JsViewPlugin/JsvLatex/BrowserJsvLatex.vue.d.ts +75 -12
- package/bin/types/utils/JsViewPlugin/JsvLatex/GetVersion.d.ts +14 -0
- package/bin/types/utils/JsViewPlugin/JsvLatex/JsvLatex.vue.d.ts +88 -13
- package/bin/types/utils/JsViewPlugin/JsvLatex/JsvLatexBridgeProxy.d.ts +1 -0
- package/bin/types/utils/JsViewPlugin/JsvLatex/JsvLatexProxy.vue.d.ts +5 -1
- package/bin/types/utils/JsViewPlugin/JsvLatex/version.d.mts +39 -12
- package/bin/types/utils/JsViewPlugin/JsvPlayer/JsvMedia.d.ts +120 -17
- package/bin/types/utils/JsViewPlugin/JsvPlayer/JsvMediaBrowserInterface.d.ts +62 -0
- package/bin/types/utils/JsViewPlugin/JsvPlayer/JsvPlayer.vue.d.ts +108 -29
- package/bin/types/utils/JsViewPlugin/JsvPlayer/{BrowserJsvPlayer-0.9.vue.d.ts → JsvPlayerBrowser-0.9.vue.d.ts} +8 -7
- package/bin/types/utils/JsViewPlugin/JsvPlayer/JsvPlayerBrowser-wasm.vue.d.ts +614 -0
- package/bin/types/utils/JsViewPlugin/JsvPlayer/{BrowserJsvPlayer.vue.d.ts → JsvPlayerBrowser.vue.d.ts} +36 -34
- package/bin/types/utils/JsViewPlugin/JsvPlayer/index-0.9.d.ts +89 -30
- package/bin/types/utils/JsViewPlugin/JsvPlayer/index.d.ts +89 -30
- package/bin/types/utils/JsViewPlugin/JsvPlayer/version.d.mts +11 -11
- package/bin/types/utils/JsViewVueTools/BlobApi.d.ts +38 -0
- package/bin/types/utils/JsViewVueTools/DebugTool.d.ts +1 -1
- package/bin/types/utils/JsViewVueTools/DefaultKeyMap.d.ts +7 -7
- package/bin/types/utils/JsViewVueTools/FeatureActive.d.ts +1 -0
- package/bin/types/utils/JsViewVueTools/JsvInteractionMode.d.ts +6 -0
- package/bin/types/utils/JsViewVueTools/JsvRuntimeBridge.d.ts +3 -3
- package/bin/types/utils/JsViewVueTools/JsvTextTools.d.ts +1 -0
- package/bin/types/utils/JsViewVueTools/JsvTextureStore/BitPalette/BitPalette.d.ts +43 -0
- package/bin/types/utils/JsViewVueTools/JsvTextureStore/CanvasTexture/CommandList.d.ts +1 -0
- package/bin/types/utils/JsViewVueTools/JsvTextureStore/CanvasTexture/DrawHelper.d.ts +54 -0
- package/bin/types/utils/JsViewVueTools/JsvTextureStore/CanvasTexture/Path.d.ts +13 -0
- package/bin/types/utils/JsViewVueTools/JsvTextureStore/CapturedTexture/CapturedTexture.d.ts +2 -0
- package/bin/types/utils/JsViewVueTools/JsvTextureStore/JsvTextureStore.d.ts +76 -26
- package/bin/types/utils/JsViewVueTools/JsvTextureStore/TextureBuilder.d.ts +49 -0
- package/bin/types/utils/JsViewVueTools/JsvTextureStore/index.d.ts +2 -0
- package/bin/types/utils/JsViewVueTools/index.d.ts +4 -1
- package/bin/types/utils/JsViewVueWidget/Jsv3dDiv.vue.d.ts +10 -98
- package/bin/types/utils/JsViewVueWidget/Jsv3dStage.vue.d.ts +10 -114
- package/bin/types/utils/JsViewVueWidget/JsvActorMove/JsvActorMove.vue.d.ts +20 -61
- package/bin/types/utils/JsViewVueWidget/JsvApic/JsvApic/BrowserApic.vue.d.ts +44 -13
- package/bin/types/utils/JsViewVueWidget/JsvApic/JsvApic/JsvApic.vue.d.ts +12 -11
- package/bin/types/utils/JsViewVueWidget/JsvApic/JsvApic/index.d.ts +5 -5
- package/bin/types/utils/JsViewVueWidget/JsvApic/JsvApic2/BrowserApic2.vue.d.ts +16 -10
- package/bin/types/utils/JsViewVueWidget/JsvApic/JsvApic2/JsvApic2.vue.d.ts +21 -17
- package/bin/types/utils/JsViewVueWidget/JsvApic/JsvApic2/index.d.ts +19 -16
- package/bin/types/utils/JsViewVueWidget/JsvApic/JsvCommonLoopToolBase.d.ts +7 -7
- package/bin/types/utils/JsViewVueWidget/JsvClipDiv/JsvClipDiv.vue.d.ts +12 -66
- package/bin/types/utils/JsViewVueWidget/JsvConnectLine/JsvConnectLine.vue.d.ts +73 -12
- package/bin/types/utils/JsViewVueWidget/JsvDashPath.vue.d.ts +59 -10
- package/bin/types/utils/JsViewVueWidget/JsvDragBox/JsvDragBox.vue.d.ts +41 -81
- package/bin/types/utils/JsViewVueWidget/JsvDriftScope/JsvDriftScope.vue.d.ts +17 -100
- package/bin/types/utils/JsViewVueWidget/JsvEnableRenderBreak.vue.d.ts +13 -50
- package/bin/types/utils/JsViewVueWidget/JsvFilterView.vue.d.ts +50 -70
- package/bin/types/utils/JsViewVueWidget/JsvFlexCell/JsvFlexDiv.vue.d.ts +32 -68
- package/bin/types/utils/JsViewVueWidget/JsvFlexCell/JsvFullScrAdjust.vue.d.ts +57 -74
- package/bin/types/utils/JsViewVueWidget/JsvFlexCell/JsvScreenFlex.vue.d.ts +41 -71
- package/bin/types/utils/JsViewVueWidget/JsvFragShaderView/JsvFragShaderView.vue.d.ts +83 -14
- package/bin/types/utils/JsViewVueWidget/JsvFreeMoveActor/ActorControl.d.ts +151 -18
- package/bin/types/utils/JsViewVueWidget/JsvFreeMoveActor/JsvEnvBlocker.vue.d.ts +79 -83
- package/bin/types/utils/JsViewVueWidget/JsvFreeMoveActor/JsvFreeMoveActor.vue.d.ts +70 -0
- package/bin/types/utils/JsViewVueWidget/JsvFreeMoveActor/SetAction.d.ts +20 -0
- package/bin/types/utils/JsViewVueWidget/JsvFreeMoveActor/SetCondition.d.ts +108 -5
- package/bin/types/utils/JsViewVueWidget/JsvFreeMoveActor/SetState.d.ts +88 -3
- package/bin/types/utils/JsViewVueWidget/JsvFreeMoveActor/index.d.ts +6 -1
- package/bin/types/utils/JsViewVueWidget/JsvGrid.vue.d.ts +19 -18
- package/bin/types/utils/JsViewVueWidget/JsvInput/Cursor.vue.d.ts +34 -11
- package/bin/types/utils/JsViewVueWidget/JsvInput/EditViewOperator.d.ts +4 -1
- package/bin/types/utils/JsViewVueWidget/JsvInput/JsvInput.vue.d.ts +193 -6
- package/bin/types/utils/JsViewVueWidget/JsvLine/JsvLine.vue.d.ts +54 -11
- package/bin/types/utils/JsViewVueWidget/JsvMarquee.vue.d.ts +89 -11
- package/bin/types/utils/JsViewVueWidget/JsvMaskClipDiv.vue.d.ts +9 -8
- package/bin/types/utils/JsViewVueWidget/JsvMindMap/Geometry.d.ts +2 -2
- package/bin/types/utils/JsViewVueWidget/JsvMindMap/JsvMindMap.vue.d.ts +170 -138
- package/bin/types/utils/JsViewVueWidget/JsvMindMap/rtree.d.ts +5 -5
- package/bin/types/utils/JsViewVueWidget/JsvNativeSharedDiv.vue.d.ts +48 -72
- package/bin/types/utils/JsViewVueWidget/JsvNinePatch.vue.d.ts +139 -20
- package/bin/types/utils/JsViewVueWidget/JsvPieChart.vue.d.ts +56 -8
- package/bin/types/utils/JsViewVueWidget/JsvPreload/JsvPreload.vue.d.ts +20 -11
- package/bin/types/utils/JsViewVueWidget/JsvProgressBar.vue.d.ts +63 -11
- package/bin/types/utils/JsViewVueWidget/JsvQrcode/JsvQrcode.vue.d.ts +8 -7
- package/bin/types/utils/JsViewVueWidget/JsvRadarChart.vue.d.ts +95 -12
- package/bin/types/utils/JsViewVueWidget/JsvRipple/Constant.d.ts +2 -2
- package/bin/types/utils/JsViewVueWidget/JsvRipple/JsvRipple.vue.d.ts +51 -78
- package/bin/types/utils/JsViewVueWidget/JsvScaleTextBox.vue.d.ts +5 -4
- package/bin/types/utils/JsViewVueWidget/JsvScrollBox/JsvScrollBox.vue.d.ts +84 -193
- package/bin/types/utils/JsViewVueWidget/JsvScrollBox/JsvScrollFollow.vue.d.ts +23 -148
- package/bin/types/utils/JsViewVueWidget/JsvSector.vue.d.ts +56 -9
- package/bin/types/utils/JsViewVueWidget/JsvSmoothSlideContainer.vue.d.ts +22 -67
- package/bin/types/utils/JsViewVueWidget/JsvSpray/JsvSpray.vue.d.ts +44 -10
- package/bin/types/utils/JsViewVueWidget/JsvSpriteAnim/JsvSpriteAnim.vue.d.ts +47 -14
- package/bin/types/utils/JsViewVueWidget/JsvSpriteAnim/JsvSpriteLoader.vue.d.ts +26 -67
- package/bin/types/utils/JsViewVueWidget/JsvSwiper/Indicator.vue.d.ts +7 -6
- package/bin/types/utils/JsViewVueWidget/JsvSwiper/JsvSmoothSwiper.vue.d.ts +147 -109
- package/bin/types/utils/JsViewVueWidget/JsvSwiper/JsvSwiper.vue.d.ts +173 -16
- package/bin/types/utils/JsViewVueWidget/JsvSwiper/JsvSwiper2.vue.d.ts +216 -139
- package/bin/types/utils/JsViewVueWidget/JsvSwiper3D/Indicator.vue.d.ts +7 -6
- package/bin/types/utils/JsViewVueWidget/JsvSwiper3D/JsvSwiper.vue.d.ts +101 -96
- package/bin/types/utils/JsViewVueWidget/JsvTextBox.vue.d.ts +89 -74
- package/bin/types/utils/JsViewVueWidget/JsvTextureAnim/JsvTextureAnim.vue.d.ts +21 -20
- package/bin/types/utils/JsViewVueWidget/JsvTouchModeSwitcher.vue.d.ts +43 -70
- package/bin/types/utils/JsViewVueWidget/JsvVideo.vue.d.ts +6 -5
- package/bin/types/utils/JsViewVueWidget/JsvVisibleSensor/JsvVisibleSensor.vue.d.ts +62 -82
- package/bin/types/utils/JsViewVueWidget/JsvVisibleSensor/index.d.ts +95 -74
- package/bin/types/utils/JsViewVueWidget/TypesDiv/JsvPosterDiv.vue.d.ts +51 -0
- package/bin/types/utils/JsViewVueWidget/TypesDiv/JsvPosterImage.vue.d.ts +105 -0
- package/bin/types/utils/JsViewVueWidget/TypesDiv/JsvSmartDiv.vue.d.ts +51 -0
- package/bin/types/utils/JsViewVueWidget/TypesDiv/JsvSmartImage.vue.d.ts +105 -0
- package/bin/types/utils/JsViewVueWidget/index.d.ts +5 -3
- package/package.json +2 -2
- package/tools/jsview-vue-build.mjs +13 -9
- package/tsconfig.json +2 -2
- package/utils/JsViewEngineWidget/JsvFocus/JsvFocusBlock.vue +32 -16
- package/utils/JsViewEngineWidget/JsvFocus/JsvFocusHub.ts +24 -2
- package/utils/JsViewEngineWidget/MetroWidget/Const.ts +5 -0
- package/utils/JsViewEngineWidget/MetroWidget/ListWidget.vue +183 -89
- package/utils/JsViewEngineWidget/MetroWidget/MetroWidget.vue +269 -122
- package/utils/JsViewEngineWidget/MetroWidget/MetroWidgetSetup.js +989 -357
- package/utils/JsViewEngineWidget/MetroWidget/PageUpdater.ts +41 -23
- package/utils/JsViewEngineWidget/MetroWidget/RenderItem.ts +138 -41
- package/utils/JsViewEngineWidget/MetroWidget/TaskManager.ts +1 -0
- package/utils/JsViewEngineWidget/MetroWidget/Utils.ts +6 -0
- package/utils/JsViewEngineWidget/MetroWidget/WidgetRectInfo.ts +2 -1
- package/utils/JsViewEngineWidget/RectUtils.js +1 -1
- package/utils/JsViewEngineWidget/SpatialNavigator/SpatialNavProvider.vue +50 -0
- package/utils/JsViewEngineWidget/SpatialNavigator/SpatialNavigationAlgorithm.ts +260 -0
- package/utils/JsViewEngineWidget/SpatialNavigator/SpatialNavigationNode.ts +32 -0
- package/utils/JsViewEngineWidget/SpatialNavigator/SpatialNavigator.ts +236 -0
- package/utils/JsViewEngineWidget/TemplateParser/CommonMetroTemplate.ts +342 -174
- package/utils/JsViewEngineWidget/TemplateParser/ListMetroTemplate.ts +101 -27
- package/utils/JsViewEngineWidget/TemplateParser/MetroTemplate.ts +12 -5
- package/utils/JsViewEngineWidget/TemplateParser/TemplateItemAdder.ts +109 -41
- package/utils/JsViewEngineWidget/WidgetCommon.ts +17 -7
- package/utils/JsViewEngineWidget/index.ts +7 -2
- package/utils/JsViewPlugin/JsvLatex/BrowserDomBuilder.js +46 -46
- package/utils/JsViewPlugin/JsvLatex/BrowserJsvLatex.vue +54 -41
- package/utils/JsViewPlugin/JsvLatex/GetVersion.js +65 -0
- package/utils/JsViewPlugin/JsvLatex/JsvLatex.vue +54 -12
- package/utils/JsViewPlugin/JsvLatex/JsvLatexBridgeProxy.js +10 -0
- package/utils/JsViewPlugin/JsvLatex/JsvLatexProxy.vue +15 -2
- package/utils/JsViewPlugin/JsvLatex/PluginLoader.js +63 -31
- package/utils/JsViewPlugin/JsvLatex/version.mjs +26 -13
- package/utils/JsViewPlugin/JsvPlayer/GetVersion.js +2 -1
- package/utils/JsViewPlugin/JsvPlayer/JsvMedia.js +402 -23
- package/utils/JsViewPlugin/JsvPlayer/JsvMediaBrowserInterface.js +100 -0
- package/utils/JsViewPlugin/JsvPlayer/JsvPlayer.vue +363 -468
- package/utils/JsViewPlugin/JsvPlayer/{BrowserJsvPlayer.vue → JsvPlayerBrowser-wasm.vue} +60 -10
- package/utils/JsViewPlugin/JsvPlayer/JsvPlayerBrowser.vue +511 -0
- package/utils/JsViewPlugin/JsvPlayer/index-0.9.js +52 -10
- package/utils/JsViewPlugin/JsvPlayer/index.js +58 -9
- package/utils/JsViewPlugin/JsvPlayer/package.json +8 -0
- package/utils/JsViewVueTools/BlobApi.ts +55 -0
- package/utils/JsViewVueTools/FeatureActive.ts +3 -0
- package/utils/JsViewVueTools/ForgeHandles.ts +3 -0
- package/utils/JsViewVueTools/JsvInteractionMode.js +16 -0
- package/utils/JsViewVueTools/JsvPreDownloader.ts +2 -2
- package/utils/JsViewVueTools/JsvRuntimeBridge.js +25 -18
- package/utils/JsViewVueTools/JsvTextTools.ts +9 -1
- package/utils/JsViewVueTools/JsvTextureStore/BitPalette/BitPalette.ts +180 -0
- package/utils/JsViewVueTools/JsvTextureStore/CanvasTexture/CommandList.ts +1 -0
- package/utils/JsViewVueTools/JsvTextureStore/CanvasTexture/DrawHelper.ts +304 -0
- package/utils/JsViewVueTools/JsvTextureStore/CanvasTexture/Path.ts +38 -0
- package/utils/JsViewVueTools/JsvTextureStore/CapturedTexture/CapturedTexture.ts +16 -1
- package/utils/JsViewVueTools/JsvTextureStore/JsvTextureStore.ts +154 -69
- package/utils/JsViewVueTools/JsvTextureStore/Store.ts +1 -1
- package/utils/JsViewVueTools/JsvTextureStore/TextureBuilder.ts +92 -0
- package/utils/JsViewVueTools/JsvTextureStore/index.js +2 -0
- package/utils/JsViewVueTools/index.js +3 -1
- package/utils/JsViewVueWidget/JsvApic/JsvApic2/JsvApic2.vue +111 -86
- package/utils/JsViewVueWidget/JsvClipDiv/JsvClipDiv.vue +1 -1
- package/utils/JsViewVueWidget/JsvDragBox/JsvDragBox.vue +11 -2
- package/utils/JsViewVueWidget/JsvDriftScope/JsvDriftScope.vue +1 -1
- package/utils/JsViewVueWidget/JsvEnableRenderBreak.vue +6 -0
- package/utils/JsViewVueWidget/JsvFlexCell/JsvFlexDiv.vue +11 -5
- package/utils/JsViewVueWidget/JsvFlexCell/JsvScreenFlex.vue +3 -1
- package/utils/JsViewVueWidget/JsvFragShaderView/JsvFragShaderView.vue +23 -11
- package/utils/JsViewVueWidget/JsvFreeMoveActor/ActorControl.ts +242 -25
- package/utils/JsViewVueWidget/JsvFreeMoveActor/{FreeMoveActor.vue → JsvFreeMoveActor.vue} +1 -1
- package/utils/JsViewVueWidget/JsvFreeMoveActor/SetAction.ts +11 -5
- package/utils/JsViewVueWidget/JsvFreeMoveActor/SetCondition.ts +118 -6
- package/utils/JsViewVueWidget/JsvFreeMoveActor/SetState.ts +56 -14
- package/utils/JsViewVueWidget/JsvFreeMoveActor/index.js +2 -1
- package/utils/JsViewVueWidget/JsvInput/EditViewOperator.ts +11 -2
- package/utils/JsViewVueWidget/JsvInput/JsvInput.vue +30 -2
- package/utils/JsViewVueWidget/JsvLine/JsvLine.vue +24 -7
- package/utils/JsViewVueWidget/JsvMarquee.vue +1 -1
- package/utils/JsViewVueWidget/JsvNativeSharedDiv.vue +12 -10
- package/utils/JsViewVueWidget/JsvNinePatch.vue +13 -8
- package/utils/JsViewVueWidget/JsvPieChart.vue +93 -70
- package/utils/JsViewVueWidget/JsvPreload/JsvPreload.vue +32 -29
- package/utils/JsViewVueWidget/JsvQrcode/JsvQrcode.vue +2 -1
- package/utils/JsViewVueWidget/JsvScrollBox/JsvScrollBox.vue +25 -3
- package/utils/JsViewVueWidget/JsvScrollBox/JsvScrollFollow.vue +0 -3
- package/utils/JsViewVueWidget/JsvSector.vue +66 -28
- package/utils/JsViewVueWidget/JsvTextBox.vue +30 -1
- package/utils/JsViewVueWidget/JsvTouchModeSwitcher.vue +56 -14
- package/utils/JsViewVueWidget/JsvVisibleSensor/JsvVisibleSensor.vue +8 -6
- package/utils/JsViewVueWidget/TypesDiv/JsvPosterDiv.vue +54 -0
- package/utils/JsViewVueWidget/TypesDiv/JsvPosterImage.vue +88 -0
- package/utils/JsViewVueWidget/TypesDiv/JsvSmartDiv.vue +177 -0
- package/utils/JsViewVueWidget/TypesDiv/JsvSmartImage.vue +267 -0
- package/utils/JsViewVueWidget/index.js +6 -2
- package/bin/browser/BrowserAudio.vue.mjs +0 -258
- package/bin/browser/BrowserJsvLatex.vue.mjs +0 -145
- package/bin/types/utils/JsViewPlugin/JsvLatex/version.d.ts +0 -10
- package/bin/types/utils/JsViewVueTools/JsvTextureStore/DominantColor/GetDominantColor.d.ts +0 -7
- package/bin/types/utils/JsViewVueWidget/JsvFreeMoveActor/FreeMoveActor.vue.d.ts +0 -78
- package/bin/types/utils/JsViewVueWidget/JsvPosterDiv.vue.d.ts +0 -63
- package/bin/types/utils/JsViewVueWidget/JsvPosterImage.vue.d.ts +0 -78
- package/utils/JsViewPlugin/JsvLatex/version.js +0 -24
- package/utils/JsViewVueTools/JsvTextureStore/DominantColor/GetDominantColor.ts +0 -36
- package/utils/JsViewVueWidget/JsvPosterDiv.vue +0 -56
- package/utils/JsViewVueWidget/JsvPosterImage.vue +0 -105
- /package/utils/JsViewPlugin/JsvPlayer/{BrowserJsvPlayer-0.9.vue → JsvPlayerBrowser-0.9.vue} +0 -0
|
@@ -8,8 +8,8 @@
|
|
|
8
8
|
import { MetroTemplate } from "../TemplateParser/MetroTemplate";
|
|
9
9
|
|
|
10
10
|
export interface PermanentItemInfo {
|
|
11
|
-
index: number
|
|
12
|
-
alreadyShow: boolean
|
|
11
|
+
index: number;
|
|
12
|
+
alreadyShow: boolean;
|
|
13
13
|
}
|
|
14
14
|
|
|
15
15
|
export class PageUpdater {
|
|
@@ -17,13 +17,20 @@ export class PageUpdater {
|
|
|
17
17
|
private rangeSet: Set<number>;
|
|
18
18
|
private updateFunc: (renderSet: Set<number>) => void;
|
|
19
19
|
private count: number = 1;
|
|
20
|
+
private applyedRange: { start: number; end: number } = { start: 0, end: 0 };
|
|
20
21
|
|
|
21
22
|
constructor(updateFunc: (renderSet: Set<number>) => void) {
|
|
22
23
|
this.tmpRangeSet = new Set<number>();
|
|
23
|
-
this.rangeSet = new Set<number>()
|
|
24
|
+
this.rangeSet = new Set<number>();
|
|
24
25
|
this.updateFunc = updateFunc;
|
|
25
26
|
}
|
|
26
27
|
|
|
28
|
+
cleanCache() {
|
|
29
|
+
this.tmpRangeSet.clear();
|
|
30
|
+
this.rangeSet.clear();
|
|
31
|
+
this.applyedRange = { start: 0, end: 0 };
|
|
32
|
+
}
|
|
33
|
+
|
|
27
34
|
update(
|
|
28
35
|
template: MetroTemplate,
|
|
29
36
|
start: number,
|
|
@@ -31,14 +38,17 @@ export class PageUpdater {
|
|
|
31
38
|
anchorId: number,
|
|
32
39
|
mergeTmp: boolean,
|
|
33
40
|
permanentList: Array<PermanentItemInfo> | null,
|
|
34
|
-
|
|
35
|
-
): { apply: Function
|
|
41
|
+
fullDisplayMode: boolean = false
|
|
42
|
+
): { apply: Function; applyTmp: Function; recover: Function } {
|
|
36
43
|
this.count++;
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
44
|
+
|
|
45
|
+
const [visibleStart, visibleEnd] = fullDisplayMode
|
|
46
|
+
? [0, template.templateList.length - 1]
|
|
47
|
+
: template.getVisibleItemList(
|
|
48
|
+
start,
|
|
49
|
+
end,
|
|
50
|
+
anchorId
|
|
51
|
+
);
|
|
42
52
|
const preTmpRangeSet = this.tmpRangeSet;
|
|
43
53
|
const preRangeSet = this.rangeSet;
|
|
44
54
|
|
|
@@ -51,23 +61,25 @@ export class PageUpdater {
|
|
|
51
61
|
}
|
|
52
62
|
|
|
53
63
|
if (permanentList) {
|
|
54
|
-
const permanentShowList = permanentList.filter(
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
item.alreadyShow
|
|
58
|
-
|
|
64
|
+
const permanentShowList = permanentList.filter(
|
|
65
|
+
(item: PermanentItemInfo) => {
|
|
66
|
+
let result = false;
|
|
67
|
+
if (item.alreadyShow || item.index <= visibleEnd) {
|
|
68
|
+
item.alreadyShow = true;
|
|
69
|
+
result = true;
|
|
70
|
+
}
|
|
71
|
+
return result;
|
|
59
72
|
}
|
|
60
|
-
|
|
61
|
-
});
|
|
73
|
+
);
|
|
62
74
|
for (let pItem of permanentShowList) {
|
|
63
75
|
this.rangeSet.add(pItem.index);
|
|
64
76
|
}
|
|
65
77
|
}
|
|
66
|
-
|
|
78
|
+
|
|
67
79
|
if (preRangeSet.size > 0) {
|
|
68
80
|
this.tmpRangeSet = new Set([...this.rangeSet, ...preRangeSet]);
|
|
69
81
|
}
|
|
70
|
-
|
|
82
|
+
|
|
71
83
|
if (mergeTmp) {
|
|
72
84
|
this.tmpRangeSet = new Set([...this.tmpRangeSet, ...preTmpRangeSet]);
|
|
73
85
|
}
|
|
@@ -75,6 +87,7 @@ export class PageUpdater {
|
|
|
75
87
|
return {
|
|
76
88
|
apply: () => {
|
|
77
89
|
if (c == this.count) {
|
|
90
|
+
this.applyedRange = { start: start, end: end };
|
|
78
91
|
this.apply();
|
|
79
92
|
} else {
|
|
80
93
|
// console.log("apply expired data")
|
|
@@ -82,7 +95,8 @@ export class PageUpdater {
|
|
|
82
95
|
},
|
|
83
96
|
applyTmp: () => {
|
|
84
97
|
if (c == this.count) {
|
|
85
|
-
this.
|
|
98
|
+
this.applyedRange = { start: start, end: end };
|
|
99
|
+
this.applyTmp();
|
|
86
100
|
} else {
|
|
87
101
|
// console.log("apply tmp expired data")
|
|
88
102
|
}
|
|
@@ -90,8 +104,12 @@ export class PageUpdater {
|
|
|
90
104
|
recover: () => {
|
|
91
105
|
this.rangeSet = preRangeSet;
|
|
92
106
|
this.tmpRangeSet = preTmpRangeSet;
|
|
93
|
-
}
|
|
94
|
-
}
|
|
107
|
+
},
|
|
108
|
+
};
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
public getApplyedRange(): { start: number; end: number } {
|
|
112
|
+
return this.applyedRange;
|
|
95
113
|
}
|
|
96
114
|
|
|
97
115
|
private apply(): void {
|
|
@@ -111,4 +129,4 @@ export class PageUpdater {
|
|
|
111
129
|
public getTmpRange(): Set<number> {
|
|
112
130
|
return this.tmpRangeSet;
|
|
113
131
|
}
|
|
114
|
-
}
|
|
132
|
+
}
|
|
@@ -1,34 +1,42 @@
|
|
|
1
|
-
import { ref, computed } from "vue";
|
|
1
|
+
import { ref, computed, toRaw, reactive } from "vue";
|
|
2
2
|
import type { Ref } from "vue";
|
|
3
|
-
import { TemplateItem } from "../TemplateParser/MetroTemplate"
|
|
3
|
+
import { TemplateItem } from "../TemplateParser/MetroTemplate";
|
|
4
4
|
import { ForgeConst } from "../../JsViewVueTools/ForgeConstDefine";
|
|
5
|
+
import { Forge } from "@shijiu/jsview/dom/jsv-forge-define.mjs";
|
|
6
|
+
import { SpatialNavigationNode } from "../SpatialNavigator/SpatialNavigationNode";
|
|
5
7
|
|
|
6
8
|
interface RenderItemStyle {
|
|
7
|
-
zIndex: number
|
|
8
|
-
left: number
|
|
9
|
-
top: number
|
|
10
|
-
width: number
|
|
11
|
-
height: number
|
|
12
|
-
}
|
|
9
|
+
zIndex: number;
|
|
10
|
+
left: number;
|
|
11
|
+
top: number;
|
|
12
|
+
width: number;
|
|
13
|
+
height: number;
|
|
14
|
+
}
|
|
13
15
|
|
|
14
16
|
interface ItemConfig {
|
|
15
|
-
focusZIndex: number
|
|
16
|
-
normalZIndex: number
|
|
17
|
-
itemSlide: number
|
|
18
|
-
permanent: boolean
|
|
19
|
-
showSkeleton: boolean
|
|
20
|
-
enableLongPress: boolean
|
|
17
|
+
focusZIndex: number;
|
|
18
|
+
normalZIndex: number;
|
|
19
|
+
itemSlide: number;
|
|
20
|
+
permanent: boolean;
|
|
21
|
+
showSkeleton: boolean;
|
|
22
|
+
enableLongPress: boolean;
|
|
23
|
+
bindSpatialNav: boolean;
|
|
21
24
|
}
|
|
22
25
|
|
|
23
26
|
interface CustomerCallbackMap {
|
|
24
|
-
onFocus?: (rect: object) => void
|
|
25
|
-
onBlur?: () => void
|
|
26
|
-
onClick?: () => void
|
|
27
|
-
onLongPress?: () => void
|
|
28
|
-
onTap?: () => void
|
|
29
|
-
onWidgetEdge?: (rect: object) => void
|
|
30
|
-
onGaze?: (rect: object) => void
|
|
31
|
-
onIgnore?: () => void
|
|
27
|
+
onFocus?: (rect: object) => void;
|
|
28
|
+
onBlur?: () => void;
|
|
29
|
+
onClick?: () => void;
|
|
30
|
+
onLongPress?: () => void;
|
|
31
|
+
onTap?: () => void;
|
|
32
|
+
onWidgetEdge?: (rect: object) => void;
|
|
33
|
+
onGaze?: (rect: object) => void;
|
|
34
|
+
onIgnore?: () => void;
|
|
35
|
+
//获取item内组件item的可视状态
|
|
36
|
+
onGetItemVisibleState?: (
|
|
37
|
+
leftTop: { x: number; y: number },
|
|
38
|
+
rightBottom: { x: number; y: number }
|
|
39
|
+
) => any;
|
|
32
40
|
}
|
|
33
41
|
|
|
34
42
|
export class RenderItem {
|
|
@@ -39,18 +47,25 @@ export class RenderItem {
|
|
|
39
47
|
public renderStyle: RenderItemStyle;
|
|
40
48
|
public itemConfig: ItemConfig;
|
|
41
49
|
|
|
42
|
-
|
|
50
|
+
//NOTE 使用reactive而不是ref是为了可以通过toRaw再访问以避免被watchEffect监听
|
|
51
|
+
public mounted = reactive({ value: false });
|
|
43
52
|
public touchInit: boolean = false;
|
|
44
|
-
public rootDiv: HTMLDivElement |
|
|
53
|
+
public rootDiv: HTMLDivElement | undefined = undefined;
|
|
45
54
|
public enableTap: boolean = false;
|
|
46
55
|
public renderKey: Ref<number> = ref(0);
|
|
47
56
|
public placeHolderLayout = null;
|
|
57
|
+
public rootNativeViewId: number = -1;
|
|
58
|
+
private nativeLayoutView: any = null;
|
|
48
59
|
|
|
49
60
|
private customerCallbackMap: CustomerCallbackMap = {};
|
|
50
61
|
private onRef: (() => void) | null;
|
|
51
|
-
private
|
|
62
|
+
private metroWidgetInfos: any;
|
|
63
|
+
private isFocus: boolean = false;
|
|
52
64
|
public readonly registerObj: object;
|
|
53
65
|
public readonly query: object;
|
|
66
|
+
public enableFboAccelrate: boolean = false;
|
|
67
|
+
public renderBreak: boolean;
|
|
68
|
+
private spatialNavNode: SpatialNavigationNode | undefined = undefined;
|
|
54
69
|
|
|
55
70
|
constructor(
|
|
56
71
|
templateInfo: TemplateItem,
|
|
@@ -59,7 +74,9 @@ export class RenderItem {
|
|
|
59
74
|
itemConfig: ItemConfig,
|
|
60
75
|
onRef: () => void,
|
|
61
76
|
query: object,
|
|
62
|
-
|
|
77
|
+
metroWidgetInfos: any,
|
|
78
|
+
enableFboAccelrate: boolean,
|
|
79
|
+
widgetRenderBreak: boolean
|
|
63
80
|
) {
|
|
64
81
|
this.templateInfo = templateInfo;
|
|
65
82
|
this.customerData = customerData;
|
|
@@ -70,7 +87,9 @@ export class RenderItem {
|
|
|
70
87
|
const unregister = this.unregister.bind(this);
|
|
71
88
|
this.registerObj = { register, unregister };
|
|
72
89
|
this.query = query;
|
|
73
|
-
this.
|
|
90
|
+
this.metroWidgetInfos = metroWidgetInfos;
|
|
91
|
+
this.enableFboAccelrate = enableFboAccelrate;
|
|
92
|
+
this.renderBreak = widgetRenderBreak;
|
|
74
93
|
}
|
|
75
94
|
|
|
76
95
|
get id() {
|
|
@@ -81,6 +100,43 @@ export class RenderItem {
|
|
|
81
100
|
return this.templateInfo.index;
|
|
82
101
|
}
|
|
83
102
|
|
|
103
|
+
public getSpatialNavNode() {
|
|
104
|
+
if (!this.itemConfig.bindSpatialNav) {
|
|
105
|
+
return undefined;
|
|
106
|
+
}
|
|
107
|
+
if (!this.spatialNavNode) {
|
|
108
|
+
this.spatialNavNode = new SpatialNavigationNode(
|
|
109
|
+
(token: number,target: unknown) => {
|
|
110
|
+
if (!this.rootDiv) {
|
|
111
|
+
return undefined;
|
|
112
|
+
}
|
|
113
|
+
const rect = this.metroWidgetInfos.getItemPositionWithCache(token, target, this.templateInfo.index);
|
|
114
|
+
return {
|
|
115
|
+
left: rect.left,
|
|
116
|
+
top: rect.top,
|
|
117
|
+
right: rect.left + rect.width,
|
|
118
|
+
bottom: rect.top + rect.height,
|
|
119
|
+
centerX: rect.left + rect.width / 2,
|
|
120
|
+
centerY: rect.top + rect.height / 2,
|
|
121
|
+
};
|
|
122
|
+
},
|
|
123
|
+
() => {
|
|
124
|
+
return {
|
|
125
|
+
mwChain: this.metroWidgetInfos.getMwChain(),
|
|
126
|
+
itemIndex: this.templateInfo.index,
|
|
127
|
+
};
|
|
128
|
+
},
|
|
129
|
+
() => {
|
|
130
|
+
|
|
131
|
+
},
|
|
132
|
+
() => {
|
|
133
|
+
|
|
134
|
+
}
|
|
135
|
+
);
|
|
136
|
+
}
|
|
137
|
+
return this.spatialNavNode;
|
|
138
|
+
}
|
|
139
|
+
|
|
84
140
|
public updateCustomData(newCustomData: object, newItemConfig: ItemConfig) {
|
|
85
141
|
this.customerData = newCustomData;
|
|
86
142
|
this.itemConfig = newItemConfig;
|
|
@@ -90,14 +146,14 @@ export class RenderItem {
|
|
|
90
146
|
}
|
|
91
147
|
|
|
92
148
|
//TODO item的div ref 会调用多次, 待调查
|
|
93
|
-
public divRef = (ele: HTMLDivElement |
|
|
149
|
+
public divRef = (ele: HTMLDivElement | undefined) => {
|
|
94
150
|
this.rootDiv = ele;
|
|
95
151
|
if (ele) {
|
|
96
152
|
this.onDivMounted();
|
|
97
153
|
} else {
|
|
98
154
|
this.onDivUnmounted();
|
|
99
155
|
}
|
|
100
|
-
}
|
|
156
|
+
};
|
|
101
157
|
|
|
102
158
|
public slotRef = (ele: object | null) => {
|
|
103
159
|
if (!this.mounted.value && ele) {
|
|
@@ -106,7 +162,7 @@ export class RenderItem {
|
|
|
106
162
|
} else if (!ele && this.mounted.value) {
|
|
107
163
|
this.mounted.value = false;
|
|
108
164
|
}
|
|
109
|
-
}
|
|
165
|
+
};
|
|
110
166
|
|
|
111
167
|
public register(name: string, callback: Function) {
|
|
112
168
|
(this.customerCallbackMap as any)[name] = callback;
|
|
@@ -116,9 +172,24 @@ export class RenderItem {
|
|
|
116
172
|
delete (this.customerCallbackMap as any)[name];
|
|
117
173
|
}
|
|
118
174
|
|
|
175
|
+
public onGetItemVisibleState(
|
|
176
|
+
leftTop: { x: number; y: number },
|
|
177
|
+
rightBottom: { x: number; y: number }
|
|
178
|
+
): any {
|
|
179
|
+
return this.customerCallbackMap.onGetItemVisibleState?.(
|
|
180
|
+
leftTop,
|
|
181
|
+
rightBottom
|
|
182
|
+
);
|
|
183
|
+
}
|
|
184
|
+
|
|
119
185
|
public onFocus(rect: object): boolean {
|
|
120
|
-
|
|
186
|
+
//NOTE 为了避免访问响应式对象被watchEffect捕获引起不必要的触发,访问时统一用toRaw
|
|
187
|
+
if (toRaw(this.mounted).value) {
|
|
188
|
+
if (this.rootNativeViewId != -1) {
|
|
189
|
+
this.nativeLayoutView.SetIsFocus(true);
|
|
190
|
+
}
|
|
121
191
|
this.customerCallbackMap.onFocus?.(rect);
|
|
192
|
+
this.isFocus = true;
|
|
122
193
|
return true;
|
|
123
194
|
} else {
|
|
124
195
|
return false;
|
|
@@ -126,8 +197,12 @@ export class RenderItem {
|
|
|
126
197
|
}
|
|
127
198
|
|
|
128
199
|
public onBlur(): boolean {
|
|
129
|
-
if (this.mounted.value) {
|
|
200
|
+
if (toRaw(this.mounted).value && this.isFocus) {
|
|
201
|
+
if (this.rootNativeViewId != -1) {
|
|
202
|
+
this.nativeLayoutView.SetIsFocus(false);
|
|
203
|
+
}
|
|
130
204
|
this.customerCallbackMap.onBlur?.();
|
|
205
|
+
this.isFocus = false;
|
|
131
206
|
return true;
|
|
132
207
|
} else {
|
|
133
208
|
return false;
|
|
@@ -135,7 +210,7 @@ export class RenderItem {
|
|
|
135
210
|
}
|
|
136
211
|
|
|
137
212
|
public onGaze(rect: object): boolean {
|
|
138
|
-
if (this.mounted.value) {
|
|
213
|
+
if (toRaw(this.mounted).value) {
|
|
139
214
|
this.customerCallbackMap.onGaze?.(rect);
|
|
140
215
|
return true;
|
|
141
216
|
} else {
|
|
@@ -144,7 +219,7 @@ export class RenderItem {
|
|
|
144
219
|
}
|
|
145
220
|
|
|
146
221
|
public onIgnore(): boolean {
|
|
147
|
-
if (this.mounted.value) {
|
|
222
|
+
if (toRaw(this.mounted).value) {
|
|
148
223
|
this.customerCallbackMap.onIgnore?.();
|
|
149
224
|
return true;
|
|
150
225
|
} else {
|
|
@@ -154,15 +229,15 @@ export class RenderItem {
|
|
|
154
229
|
|
|
155
230
|
public readonly onTap = computed(() => {
|
|
156
231
|
return this.enableTap ? this.innerOnTap.bind(this) : null;
|
|
157
|
-
})
|
|
232
|
+
});
|
|
158
233
|
|
|
159
234
|
private innerOnTap(): boolean {
|
|
160
|
-
this.
|
|
235
|
+
this.metroWidgetInfos?.onTap?.(this);
|
|
161
236
|
return this.onClick();
|
|
162
237
|
}
|
|
163
238
|
|
|
164
239
|
public onClick(): boolean {
|
|
165
|
-
if (this.mounted.value) {
|
|
240
|
+
if (toRaw(this.mounted).value) {
|
|
166
241
|
this.customerCallbackMap.onClick?.();
|
|
167
242
|
return true;
|
|
168
243
|
} else {
|
|
@@ -171,7 +246,7 @@ export class RenderItem {
|
|
|
171
246
|
}
|
|
172
247
|
|
|
173
248
|
public onLongPress(): boolean {
|
|
174
|
-
if (this.mounted.value) {
|
|
249
|
+
if (toRaw(this.mounted).value) {
|
|
175
250
|
this.customerCallbackMap.onLongPress?.();
|
|
176
251
|
return true;
|
|
177
252
|
} else {
|
|
@@ -180,7 +255,7 @@ export class RenderItem {
|
|
|
180
255
|
}
|
|
181
256
|
|
|
182
257
|
public onWidgetEdge(rect: object): boolean {
|
|
183
|
-
if (this.mounted.value) {
|
|
258
|
+
if (toRaw(this.mounted).value) {
|
|
184
259
|
this.customerCallbackMap.onWidgetEdge?.(rect);
|
|
185
260
|
return true;
|
|
186
261
|
} else {
|
|
@@ -192,6 +267,23 @@ export class RenderItem {
|
|
|
192
267
|
this.divMountedCallback.add(cbk);
|
|
193
268
|
return () => {
|
|
194
269
|
this.divMountedCallback.delete(cbk);
|
|
270
|
+
};
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
public onInRenderRange() {
|
|
274
|
+
if (this.enableFboAccelrate && this.rootNativeViewId == -1) {
|
|
275
|
+
this.nativeLayoutView = new Forge.MetroWidgetItemRootView();
|
|
276
|
+
this.rootNativeViewId = Forge.sViewStore.add(
|
|
277
|
+
new Forge.ViewInfo(this.nativeLayoutView, null)
|
|
278
|
+
);
|
|
279
|
+
}
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
public onOutOfRenderRange() {
|
|
283
|
+
if (this.rootNativeViewId != -1) {
|
|
284
|
+
Forge.sViewStore.remove(this.rootNativeViewId);
|
|
285
|
+
this.rootNativeViewId = -1;
|
|
286
|
+
this.nativeLayoutView = null;
|
|
195
287
|
}
|
|
196
288
|
}
|
|
197
289
|
|
|
@@ -201,7 +293,7 @@ export class RenderItem {
|
|
|
201
293
|
if (this.rootDiv) {
|
|
202
294
|
cbk(this.rootDiv);
|
|
203
295
|
}
|
|
204
|
-
})
|
|
296
|
+
});
|
|
205
297
|
}
|
|
206
298
|
this.divMountedCallback.clear();
|
|
207
299
|
if (this.enableTap && this.rootDiv) {
|
|
@@ -214,5 +306,10 @@ export class RenderItem {
|
|
|
214
306
|
this.touchInit = false;
|
|
215
307
|
this.divMountedCallback.clear();
|
|
216
308
|
this.customerCallbackMap = {};
|
|
309
|
+
if (this.rootNativeViewId != -1) {
|
|
310
|
+
Forge.sViewStore.remove(this.rootNativeViewId);
|
|
311
|
+
this.rootNativeViewId = -1;
|
|
312
|
+
this.nativeLayoutView = null;
|
|
313
|
+
}
|
|
217
314
|
}
|
|
218
|
-
}
|
|
315
|
+
}
|
|
@@ -15,7 +15,7 @@ export class WidgetRectInfo {
|
|
|
15
15
|
bottom: 0
|
|
16
16
|
};
|
|
17
17
|
|
|
18
|
-
constructor(w: number, h: number, padding: any) {
|
|
18
|
+
constructor(w: number, h: number, padding: any, errorLogger: Function) {
|
|
19
19
|
this.mWidth = w;
|
|
20
20
|
this.mHeight = h;
|
|
21
21
|
this.mPadding.left = padding?.left ?? 0;
|
|
@@ -23,6 +23,7 @@ export class WidgetRectInfo {
|
|
|
23
23
|
this.mPadding.right = padding?.right ?? 0;
|
|
24
24
|
this.mPadding.bottom = padding?.bottom ?? 0;
|
|
25
25
|
if (this.contentWidth <= 0 || this.contentHeight <= 0) {
|
|
26
|
+
errorLogger("padding size is large than widget size.");
|
|
26
27
|
throw new Error("padding size is large than widget size.");
|
|
27
28
|
}
|
|
28
29
|
}
|
|
@@ -78,7 +78,7 @@ class RectUtils {
|
|
|
78
78
|
formatted_target_size = size_object;
|
|
79
79
|
} else if (typeof size_object === "object" && size_object !== null) {
|
|
80
80
|
if (isNaN(size_object.width) || isNaN(size_object.height)) {
|
|
81
|
-
throw Error(
|
|
81
|
+
throw new Error(
|
|
82
82
|
"ERROR: target_size format should be {width:XXXX, height:XXXX}"
|
|
83
83
|
);
|
|
84
84
|
}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div ref="rootDiv">
|
|
3
|
+
<slot />
|
|
4
|
+
</div>
|
|
5
|
+
</template>
|
|
6
|
+
|
|
7
|
+
<script setup>
|
|
8
|
+
/**
|
|
9
|
+
* 【界面概述】
|
|
10
|
+
* 用来寻找最近MetroWidget Item的控件
|
|
11
|
+
*
|
|
12
|
+
* 【控件介绍】
|
|
13
|
+
* props:
|
|
14
|
+
* onEdge {({direction: EdgeDirection, rect: {x: number, y: number, width: number, height: number}}) => void}
|
|
15
|
+
* xDefaultMoveType {String} x方向默认移动方式:normal(默认)、layerFirst
|
|
16
|
+
* yDefaultMoveType {String} y方向默认移动方式:normal(默认)、layerFirst
|
|
17
|
+
* provider:
|
|
18
|
+
* SpatialNavigator
|
|
19
|
+
* moveTo
|
|
20
|
+
* @description 移动到最近的item
|
|
21
|
+
* @params {Symbol} direction 移动方向
|
|
22
|
+
*/
|
|
23
|
+
import { provide, shallowRef } from "vue";
|
|
24
|
+
import { SpatialNavigator } from "./SpatialNavigator";
|
|
25
|
+
import { SPATIAL_NAV_PROVIDER_NAME } from "./SpatialNavigator";
|
|
26
|
+
import { useFocusHub } from "../JsvFocus/JsvFocusManager";
|
|
27
|
+
|
|
28
|
+
const props = defineProps({
|
|
29
|
+
onEdge: {
|
|
30
|
+
type: Function,
|
|
31
|
+
},
|
|
32
|
+
xDefaultMoveType: {
|
|
33
|
+
type: String,
|
|
34
|
+
default: "normal",
|
|
35
|
+
},
|
|
36
|
+
yDefaultMoveType: {
|
|
37
|
+
type: String,
|
|
38
|
+
default: "normal",
|
|
39
|
+
},
|
|
40
|
+
});
|
|
41
|
+
|
|
42
|
+
const focusHub = useFocusHub(false);
|
|
43
|
+
const rootDiv = shallowRef(null);
|
|
44
|
+
const spatialNavigator = new SpatialNavigator(rootDiv, focusHub, props.onEdge);
|
|
45
|
+
spatialNavigator.setDefaultMoveType(props.xDefaultMoveType, props.yDefaultMoveType);
|
|
46
|
+
provide(SPATIAL_NAV_PROVIDER_NAME, spatialNavigator);
|
|
47
|
+
defineExpose({
|
|
48
|
+
getSpatialNavigator: () => spatialNavigator,
|
|
49
|
+
});
|
|
50
|
+
</script>
|