@shijiu/jsview-vue 2.2.201 → 2.2.426-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/BrowserApic.vue.mjs +2 -13
- package/bin/browser/BrowserApic2.vue.mjs +2 -13
- package/bin/browser/BrowserApicLib.mjs +24 -24
- package/bin/browser/BrowserAudio.vue.mjs +2 -10
- package/bin/browser/BrowserJsvLatex.vue.mjs +39 -16
- package/bin/export-sfc.mjs +3 -3
- package/bin/jsview-vue-common.mjs +3 -3
- package/bin/jsview-vue.mjs +3288 -2312
- package/bin/types/utils/JsViewEngineWidget/JsvFocus/JsvFocusBlock.vue.d.ts +72 -0
- package/bin/types/{JsViewEngineWidget → utils/JsViewEngineWidget}/MetroWidget/ListWidget.vue.d.ts +6 -3
- package/bin/types/{JsViewEngineWidget → utils/JsViewEngineWidget}/MetroWidget/MetroWidget.vue.d.ts +6 -3
- package/bin/types/{JsViewEngineWidget → utils/JsViewEngineWidget}/MetroWidget/MetroWidgetSetup.d.ts +3 -1
- package/bin/types/utils/JsViewEngineWidget/MetroWidget/TaskManager.d.ts +64 -0
- package/bin/types/utils/JsViewEngineWidget/MetroWidget/TokenGenerator.d.ts +4 -0
- package/bin/types/utils/JsViewEngineWidget/RectUtils.d.ts +61 -0
- package/bin/types/{JsViewEngineWidget → utils/JsViewEngineWidget}/TemplateParser/Fence.d.ts +2 -2
- package/bin/types/{JsViewEngineWidget → utils/JsViewEngineWidget}/TemplateParser/MetroTemplate.d.ts +3 -3
- package/bin/types/{JsViewEngineWidget → utils/JsViewEngineWidget}/index.d.ts +1 -1
- package/bin/types/utils/JsViewPlugin/JsvAudio/version.d.mts +13 -0
- package/bin/types/{JsViewPlugin → utils/JsViewPlugin}/JsvLatex/index.d.ts +1 -0
- package/bin/types/utils/JsViewPlugin/JsvLatex/version.d.mts +13 -0
- package/bin/types/utils/JsViewPlugin/JsvPlayer/BrowserJsvPlayer-0.9.vue.d.ts +45 -0
- package/bin/types/utils/JsViewPlugin/JsvPlayer/BrowserJsvPlayer.vue.d.ts +597 -0
- package/bin/types/utils/JsViewPlugin/JsvPlayer/GetVersion.d.ts +13 -0
- package/bin/types/utils/JsViewPlugin/JsvPlayer/JsvMedia.d.ts +420 -0
- package/bin/types/utils/JsViewPlugin/JsvPlayer/JsvMediaBrowserInterface.d.ts +57 -0
- package/bin/types/utils/JsViewPlugin/JsvPlayer/JsvPlayer.vue.d.ts +588 -0
- package/bin/types/utils/JsViewPlugin/JsvPlayer/index-0.9.d.ts +358 -0
- package/bin/types/utils/JsViewPlugin/JsvPlayer/index.d.ts +358 -0
- package/bin/types/utils/JsViewPlugin/JsvPlayer/version.d.mts +14 -0
- package/bin/types/utils/JsViewVueTools/FeatureActive.d.ts +10 -0
- package/bin/types/utils/JsViewVueTools/ForgeHandles.d.ts +6 -0
- package/bin/types/{JsViewVueTools → utils/JsViewVueTools}/JsvDynamicCssStyle.d.ts +3 -1
- package/bin/types/{JsViewVueTools → utils/JsViewVueTools}/JsvDynamicKeyFrames.d.ts +4 -2
- package/bin/types/{JsViewVueTools → utils/JsViewVueTools}/JsvImpactTracer.d.ts +4 -4
- package/bin/types/{JsViewVueTools → utils/JsViewVueTools}/JsvPreDownloader.d.ts +3 -2
- package/bin/types/{JsViewVueTools → utils/JsViewVueTools}/JsvRefTaker.d.ts +2 -3
- package/bin/types/{JsViewVueTools → utils/JsViewVueTools}/JsvRuntimeBridge.d.ts +42 -0
- package/bin/types/{JsViewVueTools → utils/JsViewVueTools}/JsvStyleSheetsDeclarer.d.ts +3 -1
- package/bin/types/utils/JsViewVueTools/JsvTextTools.d.ts +61 -0
- package/bin/types/utils/JsViewVueTools/JsvTextureLoadTool.d.ts +63 -0
- package/bin/types/{JsViewVueTools → utils/JsViewVueTools}/JsvTextureStore/JsvTextureStore.d.ts +8 -4
- package/bin/types/{JsViewVueTools → utils/JsViewVueTools}/NinePatchHelper.d.ts +1 -1
- package/bin/types/utils/JsViewVueTools/TextureManagerTools.d.ts +7 -0
- package/bin/types/utils/JsViewVueTools/TypeCheckAndSet.d.ts +3 -0
- package/bin/types/{JsViewVueTools → utils/JsViewVueTools}/index.d.ts +3 -1
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvApic/JsvApic/JsvApic.vue.d.ts +7 -0
- package/bin/types/utils/JsViewVueWidget/JsvDragBox/JsvDragBox.vue.d.ts +84 -0
- package/bin/types/utils/JsViewVueWidget/JsvFlexCell/JsvScreenFlex.vue.d.ts +75 -0
- package/bin/types/utils/JsViewVueWidget/JsvFlexCell/index.d.ts +2 -0
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvFragShaderView/JsvFragShaderView.vue.d.ts +3 -1
- package/bin/types/utils/JsViewVueWidget/JsvFragShaderView/index.d.ts +1 -0
- package/bin/types/utils/JsViewVueWidget/JsvFreeMoveActor/KeepFlags.d.ts +7 -0
- package/bin/types/utils/JsViewVueWidget/JsvInput/Cursor.vue.d.ts +12 -0
- package/bin/types/utils/JsViewVueWidget/JsvInput/EditViewOperator.d.ts +45 -0
- package/bin/types/utils/JsViewVueWidget/JsvInput/EditVisibleArea.d.ts +26 -0
- package/bin/types/{JsViewVueWidget/JsvPreload/BrowserPreload.vue.d.ts → utils/JsViewVueWidget/JsvInput/JsvInput.vue.d.ts} +7 -5
- package/bin/types/utils/JsViewVueWidget/JsvInput/SharedDefine.d.ts +13 -0
- package/bin/types/utils/JsViewVueWidget/JsvInput/SystemTextTools.d.ts +16 -0
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvMaskClipDiv.vue.d.ts +0 -2
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvMindMap/DataTree.d.ts +3 -1
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvMindMap/Geometry.d.ts +2 -2
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvMindMap/JsvMindMap.vue.d.ts +16 -9
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvNativeSharedDiv.vue.d.ts +6 -0
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvNinePatch.vue.d.ts +2 -1
- package/bin/types/utils/JsViewVueWidget/JsvPreload/index.d.ts +2 -0
- package/bin/types/utils/JsViewVueWidget/JsvSwiper/Indicator.vue.d.ts +16 -0
- package/bin/types/utils/JsViewVueWidget/JsvSwiper3D/Indicator.vue.d.ts +16 -0
- package/bin/types/utils/JsViewVueWidget/JsvTextureAnim/index.d.ts +4 -0
- package/bin/types/utils/JsViewVueWidget/JsvTouchModeSwitcher.vue.d.ts +75 -0
- package/bin/types/utils/JsViewVueWidget/JsvVideo.vue.d.ts +23 -0
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/index.d.ts +4 -2
- package/index.d.ts +9 -1
- package/package.json +1 -1
- package/tools/config/toolkit.mjs +81 -0
- package/tools/config/vite.config.ts +24 -14
- package/tools/jsview-vue-build.mjs +67 -21
- package/tsconfig.json +27 -0
- package/utils/JsViewEngineWidget/JsvFocus/JsvFocusBlock.vue +6 -2
- package/utils/JsViewEngineWidget/MetroWidget/ListWidget.vue +3 -1
- package/utils/JsViewEngineWidget/MetroWidget/MetroWidget.vue +12 -5
- package/utils/JsViewEngineWidget/MetroWidget/MetroWidgetSetup.js +175 -65
- package/utils/JsViewEngineWidget/MetroWidget/TaskManager.ts +1 -1
- package/utils/JsViewEngineWidget/TemplateParser/Fence.ts +2 -2
- package/utils/JsViewEngineWidget/TemplateParser/ListMetroTemplate.ts +15 -9
- package/utils/JsViewEngineWidget/TemplateParser/MetroTemplate.ts +4 -6
- package/utils/JsViewPlugin/JsvLatex/BrowserDomBuilder.js +13 -3
- package/utils/JsViewPlugin/JsvLatex/BrowserJsvLatex.vue +27 -6
- package/utils/JsViewPlugin/JsvLatex/JsvLatex.vue +34 -28
- package/utils/JsViewPlugin/JsvLatex/index.js +22 -0
- package/utils/JsViewVueTools/FeatureActive.ts +84 -0
- package/utils/JsViewVueTools/ForgeHandles.ts +7 -3
- package/utils/JsViewVueTools/JsvDynamicCssStyle.js +2 -0
- package/utils/JsViewVueTools/JsvDynamicKeyFrames.ts +2 -0
- package/utils/JsViewVueTools/JsvHashHistory.js +26 -29
- package/utils/JsViewVueTools/JsvImpactTracer.js +2 -0
- package/utils/JsViewVueTools/JsvPreDownloader.ts +2 -1
- package/utils/JsViewVueTools/JsvRefTaker.js +1 -2
- package/utils/JsViewVueTools/JsvRuntimeBridge.js +125 -59
- package/utils/JsViewVueTools/JsvStyleClass.js +2 -0
- package/utils/JsViewVueTools/JsvStyleSheetsDeclarer.js +2 -0
- package/utils/JsViewVueTools/JsvTextTools.ts +156 -0
- package/utils/JsViewVueTools/JsvTextureLoadTool.ts +233 -0
- package/utils/JsViewVueTools/JsvTextureStore/CapturedTexture/CapturedTexture.ts +4 -1
- package/utils/JsViewVueTools/JsvTextureStore/JsvTextureStore.ts +7 -3
- package/utils/JsViewVueTools/JsvTextureStore/Texture.ts +1 -0
- package/utils/JsViewVueTools/TextureManagerTools.ts +17 -0
- package/utils/JsViewVueTools/TypeCheckAndSet.ts +66 -0
- package/utils/JsViewVueTools/index.js +4 -1
- package/utils/JsViewVueWidget/JsvActorMove/JsvActorMove.vue +2 -0
- package/utils/JsViewVueWidget/JsvApic/JsvApic/JsvApic.vue +10 -2
- package/utils/JsViewVueWidget/JsvApic/JsvApic2/JsvApic2.vue +12 -1
- package/utils/JsViewVueWidget/JsvClipDiv/JsvClipDiv.vue +4 -2
- package/utils/JsViewVueWidget/JsvConnectLine/JsvConnectLine.vue +2 -0
- package/utils/JsViewVueWidget/JsvDragBox/JsvDragBox.vue +219 -0
- package/utils/JsViewVueWidget/JsvDriftScope/JsvDriftScope.vue +11 -9
- package/utils/JsViewVueWidget/JsvFilterView.vue +2 -0
- package/utils/JsViewVueWidget/JsvFlexCell/JsvFlexDiv.vue +5 -2
- package/utils/JsViewVueWidget/JsvFlexCell/JsvScreenFlex.vue +140 -0
- package/utils/JsViewVueWidget/JsvFlexCell/index.js +2 -5
- package/utils/JsViewVueWidget/JsvFragShaderView/JsvFragShaderView.vue +214 -63
- package/utils/JsViewVueWidget/JsvFragShaderView/index.js +2 -9
- package/utils/JsViewVueWidget/JsvFreeMoveActor/FreeMoveActor.vue +9 -0
- package/utils/JsViewVueWidget/JsvFreeMoveActor/JsvEnvBlocker.vue +2 -0
- package/utils/JsViewVueWidget/JsvGrid.vue +2 -0
- package/utils/JsViewVueWidget/JsvHole.js +2 -0
- package/utils/JsViewVueWidget/JsvInput/Cursor.vue +49 -45
- package/utils/JsViewVueWidget/JsvInput/EditViewOperator.ts +353 -0
- package/utils/JsViewVueWidget/JsvInput/EditVisibleArea.ts +255 -0
- package/utils/JsViewVueWidget/JsvInput/JsvInput.vue +294 -681
- package/utils/JsViewVueWidget/JsvInput/SharedDefine.ts +17 -0
- package/utils/JsViewVueWidget/JsvInput/SystemTextTools.ts +61 -0
- package/utils/JsViewVueWidget/JsvLine/JsvLine.vue +2 -0
- package/utils/JsViewVueWidget/JsvMarquee.vue +2 -0
- package/utils/JsViewVueWidget/JsvMaskClipDiv.vue +5 -48
- package/utils/JsViewVueWidget/JsvMindMap/DataTree.ts +14 -1
- package/utils/JsViewVueWidget/JsvMindMap/JsvMindMap.vue +277 -117
- package/utils/JsViewVueWidget/JsvNativeSharedDiv.vue +91 -68
- package/utils/JsViewVueWidget/JsvNinePatch.vue +5 -0
- package/utils/JsViewVueWidget/JsvPieChart.vue +2 -0
- package/utils/JsViewVueWidget/JsvPosterDiv.vue +2 -0
- package/utils/JsViewVueWidget/JsvPosterImage.vue +3 -2
- package/utils/JsViewVueWidget/JsvPreload/JsvPreload.vue +23 -44
- package/utils/JsViewVueWidget/JsvPreload/index.js +2 -13
- package/utils/JsViewVueWidget/JsvProgressBar.vue +2 -0
- package/utils/JsViewVueWidget/JsvQrcode/JsvQrcode.vue +12 -12
- package/utils/JsViewVueWidget/JsvRadarChart.vue +2 -0
- package/utils/JsViewVueWidget/JsvRipple/Constant.js +2 -2
- package/utils/JsViewVueWidget/JsvRipple/JsvRipple.vue +3 -1
- package/utils/JsViewVueWidget/JsvScaleTextBox.vue +2 -0
- package/utils/JsViewVueWidget/JsvScrollBox/JsvScrollBox.vue +9 -0
- package/utils/JsViewVueWidget/JsvScrollBox/JsvScrollFollow.vue +9 -0
- package/utils/JsViewVueWidget/JsvSector.vue +2 -0
- package/utils/JsViewVueWidget/JsvSoundPool.js +5 -7
- package/utils/JsViewVueWidget/JsvSpray/JsvSpray.vue +43 -23
- package/utils/JsViewVueWidget/JsvSpriteAnim/JsvSpriteAnim.vue +2 -5
- package/utils/JsViewVueWidget/JsvSpriteAnim/JsvSpriteLoader.vue +2 -0
- package/utils/JsViewVueWidget/JsvSwiper/JsvSwiper.vue +2 -0
- package/utils/JsViewVueWidget/JsvSwiper3D/JsvSwiper.vue +2 -0
- package/utils/JsViewVueWidget/JsvTextBox.vue +2 -4
- package/utils/JsViewVueWidget/JsvTextureAnim/JsvTextureAnim.vue +48 -50
- package/utils/JsViewVueWidget/JsvTextureAnim/index.js +2 -9
- package/utils/JsViewVueWidget/JsvTouchModeSwitcher.vue +101 -0
- package/utils/JsViewVueWidget/JsvVideo.vue +2 -2
- package/utils/JsViewVueWidget/JsvVisibleSensor/JsvVisibleSensor.vue +2 -0
- package/utils/JsViewVueWidget/index.js +4 -2
- package/bin/browser/BrowserJsvFragShaderView.vue.mjs +0 -63
- package/bin/browser/BrowserPreload.vue.mjs +0 -143
- package/bin/browser/BrowserQrcode.vue.mjs +0 -180
- package/bin/browser/BrowserSpray.vue.mjs +0 -66
- package/bin/browser/BrowserTextureAnim.vue.mjs +0 -332
- package/bin/types/JsViewEngineWidget/JsvFocus/JsvFocusBlock.vue.d.ts +0 -102
- package/bin/types/JsViewVueTools/ForgeHandles.d.ts +0 -6
- package/bin/types/JsViewVueTools/JsvTextTools.d.ts +0 -37
- package/bin/types/JsViewVueTools/TypeCheckAndSet.d.ts +0 -2
- package/bin/types/JsViewVueWidget/JsvFlexCell/index.d.ts +0 -2
- package/bin/types/JsViewVueWidget/JsvFragShaderView/BrowserJsvFragShaderView.vue.d.ts +0 -13
- package/bin/types/JsViewVueWidget/JsvFragShaderView/index.d.ts +0 -2
- package/bin/types/JsViewVueWidget/JsvInput/Cursor.vue.d.ts +0 -36
- package/bin/types/JsViewVueWidget/JsvInput/JsvInput.vue.d.ts +0 -210
- package/bin/types/JsViewVueWidget/JsvPreload/index.d.ts +0 -17
- package/bin/types/JsViewVueWidget/JsvQrcode/BrowserQrcode.vue.d.ts +0 -11
- package/bin/types/JsViewVueWidget/JsvQrcode/index.d.ts +0 -2
- package/bin/types/JsViewVueWidget/JsvSpray/BrowserSpray.vue.d.ts +0 -25
- package/bin/types/JsViewVueWidget/JsvSpray/index.d.ts +0 -2
- package/bin/types/JsViewVueWidget/JsvTextureAnim/BrowserTextureAnim.vue.d.ts +0 -151
- package/bin/types/JsViewVueWidget/JsvTextureAnim/index.d.ts +0 -14
- package/tools/config/tsconfig.json +0 -15
- package/utils/JsViewVueTools/JsvTextTools.js +0 -89
- package/utils/JsViewVueTools/TypeCheckAndSet.js +0 -27
- package/utils/JsViewVueWidget/JsvFragShaderView/BrowserJsvFragShaderView.vue +0 -48
- package/utils/JsViewVueWidget/JsvPreload/BrowserPreload.vue +0 -144
- package/utils/JsViewVueWidget/JsvQrcode/BrowserQrcode.vue +0 -189
- package/utils/JsViewVueWidget/JsvQrcode/index.js +0 -18
- package/utils/JsViewVueWidget/JsvSpray/BrowserSpray.vue +0 -55
- package/utils/JsViewVueWidget/JsvSpray/index.js +0 -17
- package/utils/JsViewVueWidget/JsvTextureAnim/BrowserTextureAnim.vue +0 -359
- package/bin/types/{JsViewEngineWidget → utils/JsViewEngineWidget}/CheckType.d.ts +0 -0
- package/bin/types/{JsViewEngineWidget → utils/JsViewEngineWidget}/JsvFocus/JsvFocusHub.d.ts +0 -0
- package/bin/types/{JsViewEngineWidget → utils/JsViewEngineWidget}/JsvFocus/JsvFocusManager.d.ts +0 -0
- package/bin/types/{JsViewEngineWidget → utils/JsViewEngineWidget}/MetroWidget/Const.d.ts +0 -0
- package/bin/types/{JsViewEngineWidget → utils/JsViewEngineWidget}/MetroWidget/Dispatcher.d.ts +0 -0
- package/bin/types/{JsViewEngineWidget → utils/JsViewEngineWidget}/MetroWidget/PageUpdater.d.ts +0 -0
- package/bin/types/{JsViewEngineWidget → utils/JsViewEngineWidget}/MetroWidget/RenderItem.d.ts +0 -0
- package/bin/types/{JsViewEngineWidget → utils/JsViewEngineWidget}/MetroWidget/Slide.d.ts +0 -0
- package/bin/types/{JsViewEngineWidget → utils/JsViewEngineWidget}/MetroWidget/SlotComponent.vue.d.ts +0 -0
- package/bin/types/{JsViewEngineWidget → utils/JsViewEngineWidget}/MetroWidget/VisibleInfo.d.ts +0 -0
- package/bin/types/{JsViewEngineWidget → utils/JsViewEngineWidget}/MetroWidget/WidgetRectInfo.d.ts +0 -0
- package/bin/types/{JsViewEngineWidget → utils/JsViewEngineWidget}/RangeModel.d.ts +0 -0
- package/bin/types/{JsViewEngineWidget → utils/JsViewEngineWidget}/TemplateParser/CommonMetroTemplate.d.ts +0 -0
- package/bin/types/{JsViewEngineWidget → utils/JsViewEngineWidget}/TemplateParser/ListMetroTemplate.d.ts +0 -0
- package/bin/types/{JsViewEngineWidget → utils/JsViewEngineWidget}/TemplateParser/TemplateItemAdder.d.ts +0 -0
- package/bin/types/{JsViewEngineWidget → utils/JsViewEngineWidget}/TemplateParser/index.d.ts +0 -0
- package/bin/types/{JsViewEngineWidget → utils/JsViewEngineWidget}/WidgetCommon.d.ts +0 -0
- package/bin/types/{JsViewPlugin → utils/JsViewPlugin}/JsvAccount/JsvAccount.d.ts +0 -0
- package/bin/types/{JsViewPlugin → utils/JsViewPlugin}/JsvAudio/AudioProxy.d.ts +0 -0
- package/bin/types/{JsViewPlugin → utils/JsViewPlugin}/JsvAudio/BrowserAudio/BrowserAudio.vue.d.ts +0 -0
- package/bin/types/{JsViewPlugin → utils/JsViewPlugin}/JsvAudio/BrowserAudio/JsvSystemAudio.vue.d.ts +4 -4
- package/bin/types/{JsViewPlugin → utils/JsViewPlugin}/JsvAudio/CheckType.d.ts +0 -0
- package/bin/types/{JsViewPlugin → utils/JsViewPlugin}/JsvAudio/Events.d.ts +0 -0
- package/bin/types/{JsViewPlugin → utils/JsViewPlugin}/JsvAudio/JsvAudio.vue.d.ts +4 -4
- package/bin/types/{JsViewPlugin → utils/JsViewPlugin}/JsvAudio/JsvAudioBridgeProxy.d.ts +0 -0
- package/bin/types/{JsViewPlugin → utils/JsViewPlugin}/JsvAudio/JsvAudioProxy.vue.d.ts +0 -0
- package/bin/types/{JsViewPlugin → utils/JsViewPlugin}/JsvAudio/PluginLoader.d.ts +0 -0
- package/bin/types/{JsViewPlugin → utils/JsViewPlugin}/JsvAudio/ScreenLockManager.d.ts +0 -0
- package/bin/types/{JsViewPlugin → utils/JsViewPlugin}/JsvAudio/index.d.ts +0 -0
- package/bin/types/{JsViewPlugin → utils/JsViewPlugin}/JsvAudio/version.d.ts +0 -0
- package/bin/types/{JsViewPlugin → utils/JsViewPlugin}/JsvLatex/BrowserDomBuilder.d.ts +0 -0
- package/bin/types/{JsViewPlugin → utils/JsViewPlugin}/JsvLatex/BrowserJsvLatex.vue.d.ts +4 -4
- package/bin/types/{JsViewPlugin → utils/JsViewPlugin}/JsvLatex/Color.d.ts +0 -0
- package/bin/types/{JsViewPlugin → utils/JsViewPlugin}/JsvLatex/JsvLatex.vue.d.ts +4 -4
- package/bin/types/{JsViewPlugin → utils/JsViewPlugin}/JsvLatex/JsvLatexBridgeProxy.d.ts +0 -0
- package/bin/types/{JsViewPlugin → utils/JsViewPlugin}/JsvLatex/JsvLatexProxy.vue.d.ts +0 -0
- package/bin/types/{JsViewPlugin → utils/JsViewPlugin}/JsvLatex/PluginLoader.d.ts +0 -0
- package/bin/types/{JsViewPlugin → utils/JsViewPlugin}/JsvLatex/version.d.ts +0 -0
- package/bin/types/{JsViewPlugin → utils/JsViewPlugin}/index.d.ts +0 -0
- package/bin/types/{JsViewVueTools → utils/JsViewVueTools}/ConstSymbol.d.ts +0 -0
- package/bin/types/{JsViewVueTools → utils/JsViewVueTools}/DebugContentShellJBridge.d.ts +0 -0
- package/bin/types/{JsViewVueTools → utils/JsViewVueTools}/DebugTool.d.ts +0 -0
- package/bin/types/{JsViewVueTools → utils/JsViewVueTools}/DefaultKeyMap.d.ts +0 -0
- package/bin/types/{JsViewVueTools → utils/JsViewVueTools}/ForgeConstDefine.d.ts +0 -0
- package/bin/types/{JsViewVueTools → utils/JsViewVueTools}/JsvDemoTester.d.ts +0 -0
- package/bin/types/{JsViewVueTools → utils/JsViewVueTools}/JsvFederationTools.d.ts +0 -0
- package/bin/types/{JsViewVueTools → utils/JsViewVueTools}/JsvHashHistory.d.ts +0 -0
- package/bin/types/{JsViewVueTools → utils/JsViewVueTools}/JsvPerformance.d.ts +0 -0
- package/bin/types/{JsViewVueTools → utils/JsViewVueTools}/JsvStyleClass.d.ts +0 -0
- package/bin/types/{JsViewVueTools → utils/JsViewVueTools}/JsvTextureDefines.d.ts +0 -0
- package/bin/types/{JsViewVueTools → utils/JsViewVueTools}/JsvTextureStore/CanvasTexture/CanvasTexture.d.ts +0 -0
- package/bin/types/{JsViewVueTools → utils/JsViewVueTools}/JsvTextureStore/CanvasTexture/CommandList.d.ts +0 -0
- package/bin/types/{JsViewVueTools → utils/JsViewVueTools}/JsvTextureStore/CanvasTexture/Path.d.ts +0 -0
- package/bin/types/{JsViewVueTools → utils/JsViewVueTools}/JsvTextureStore/CapturedTexture/CapturedTexture.d.ts +0 -0
- package/bin/types/{JsViewVueTools → utils/JsViewVueTools}/JsvTextureStore/Store.d.ts +0 -0
- package/bin/types/{JsViewVueTools → utils/JsViewVueTools}/JsvTextureStore/Texture.d.ts +0 -0
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvActorMove/ActorControlBase.d.ts +0 -0
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvActorMove/JsvActorMove.vue.d.ts +0 -0
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvActorMove/JsvActorMoveControl.d.ts +0 -0
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvActorMove/index.d.ts +0 -0
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvApic/JsvApic/BrowserApic.vue.d.ts +1 -1
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvApic/JsvApic/index.d.ts +0 -0
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvApic/JsvApic2/BrowserApic2.vue.d.ts +1 -1
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvApic/JsvApic2/JsvApic2.vue.d.ts +0 -0
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvApic/JsvApic2/index.d.ts +0 -0
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvApic/JsvBrowserApicLib/ApicDataBase.d.ts +0 -0
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvApic/JsvBrowserApicLib/BrowserApicLib.d.ts +0 -0
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvApic/JsvBrowserApicLib/GifData.d.ts +0 -0
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvApic/JsvBrowserApicLib/NormalLoopTool.d.ts +0 -0
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvApic/JsvBrowserApicLib/PartLoopTool.d.ts +0 -0
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvApic/JsvBrowserApicLib/SingleLoopTool.d.ts +0 -0
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvApic/JsvBrowserApicLib/Viewer.d.ts +0 -0
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvApic/JsvBrowserApicLib/WebpData.d.ts +0 -0
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvApic/JsvCommonLoopToolBase.d.ts +0 -0
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvClipDiv/JsvClipDiv.vue.d.ts +0 -0
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvClipDiv/index.d.ts +0 -0
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvConnectLine/ArcLineManager.d.ts +0 -0
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvConnectLine/JsvConnectLine.vue.d.ts +2 -2
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvConnectLine/index.d.ts +0 -0
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvDriftScope/JsvDriftScope.vue.d.ts +0 -0
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvDriftScope/index.d.ts +0 -0
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvEnableRenderBreak.vue.d.ts +0 -0
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvFilterView.vue.d.ts +3 -3
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvFlexCell/JsvFlexDiv.vue.d.ts +0 -0
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvFreeMoveActor/ActionRefObject.d.ts +0 -0
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvFreeMoveActor/ActorControl.d.ts +0 -0
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvFreeMoveActor/ActorState.d.ts +0 -0
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvFreeMoveActor/CallbackManager.d.ts +0 -0
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvFreeMoveActor/ForgeTypeDefine.d.ts +0 -0
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvFreeMoveActor/FreeMoveActor.vue.d.ts +9 -9
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvFreeMoveActor/JsvEnvBlocker.vue.d.ts +3 -3
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvFreeMoveActor/NexusNode.d.ts +0 -0
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvFreeMoveActor/SetAction.d.ts +0 -0
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvFreeMoveActor/SetCondition.d.ts +0 -0
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvFreeMoveActor/SetState.d.ts +0 -0
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvFreeMoveActor/SyncLinkManager.d.ts +0 -0
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvFreeMoveActor/index.d.ts +0 -0
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvGrid.vue.d.ts +0 -0
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvHole.d.ts +0 -0
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvInput/index.d.ts +0 -0
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvLine/JsvLine.vue.d.ts +3 -3
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvLine/LineManager.d.ts +0 -0
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvLine/index.d.ts +0 -0
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvMarquee.vue.d.ts +0 -0
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvMindMap/CommonType.d.ts +0 -0
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvMindMap/Constant.d.ts +0 -0
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvMindMap/index.d.ts +0 -0
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvMindMap/rtree.d.ts +0 -0
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvPieChart.vue.d.ts +0 -0
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvPosterDiv.vue.d.ts +0 -0
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvPosterImage.vue.d.ts +0 -0
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvPreload/JsvPreload.vue.d.ts +0 -0
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvProgressBar.vue.d.ts +1 -1
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvQrcode/JsvQrcode.vue.d.ts +1 -1
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvRadarChart.vue.d.ts +1 -1
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvRipple/Constant.d.ts +0 -0
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvRipple/JsvRipple.vue.d.ts +3 -3
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvRipple/index.d.ts +0 -0
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvScaleTextBox.vue.d.ts +0 -0
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvScrollBox/JsvScrollBox.vue.d.ts +0 -0
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvScrollBox/JsvScrollFollow.vue.d.ts +0 -0
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvScrollBox/ScrollInnerSymbol.d.ts +0 -0
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvScrollBox/ScrollSymbol.d.ts +0 -0
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvScrollBox/index.d.ts +0 -0
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvSector.vue.d.ts +0 -0
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvSoundPool.d.ts +0 -0
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvSpray/JsvSpray.vue.d.ts +0 -0
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvSpriteAnim/FrameBuidler.d.ts +0 -0
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvSpriteAnim/JsvSpriteAnim.vue.d.ts +0 -0
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvSpriteAnim/JsvSpriteLoader.vue.d.ts +0 -0
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvSpriteAnim/JsvSpriteTools.d.ts +0 -0
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvSpriteAnim/SpriteController.d.ts +0 -0
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvSpriteAnim/index.d.ts +0 -0
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvSpriteAnim/sAnimationToken.d.ts +0 -0
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvSwiper/JsvSwiper.vue.d.ts +1 -1
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvSwiper/index.d.ts +0 -0
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvSwiper3D/JsvSwiper.vue.d.ts +3 -3
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvSwiper3D/index.d.ts +0 -0
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvTextBox.vue.d.ts +0 -0
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvTextureAnim/CommonType.d.ts +0 -0
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvTextureAnim/JsvTextureAnim.vue.d.ts +0 -0
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvVisibleSensor/JsvVisibleSensor.vue.d.ts +6 -6
- package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvVisibleSensor/index.d.ts +6 -6
- /package/bin/types/{index.d.ts → utils/index.d.ts} +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<script setup>
|
|
2
2
|
// import "./mathjax-tex-svg.js";
|
|
3
3
|
import { Forge } from "@shijiu/jsview/dom/jsv-forge-define";
|
|
4
|
-
import { shallowRef, onBeforeUnmount } from "vue";
|
|
4
|
+
import { ref, shallowRef, onBeforeUnmount } from "vue";
|
|
5
5
|
import { getHtmlStr } from "./BrowserDomBuilder.js";
|
|
6
6
|
|
|
7
7
|
const props = defineProps({
|
|
@@ -39,20 +39,39 @@ const props = defineProps({
|
|
|
39
39
|
},
|
|
40
40
|
});
|
|
41
41
|
|
|
42
|
+
function precessString(original) {
|
|
43
|
+
return (
|
|
44
|
+
"\\[\\begin{array}{l}" +
|
|
45
|
+
original.replaceAll(/\\[\(\)\[\]]/g, "") +
|
|
46
|
+
"\\end{array}\\]"
|
|
47
|
+
);
|
|
48
|
+
}
|
|
42
49
|
let innerViewId = shallowRef(-1);
|
|
50
|
+
const clientWidth = ref(props.width);
|
|
51
|
+
const clientHeight = ref(props.height);
|
|
43
52
|
|
|
44
53
|
let layoutView = new Forge.IFrameView();
|
|
45
54
|
layoutView.SetIframeSize(props.width, props.height);
|
|
46
55
|
layoutView.SetInnerHtml(
|
|
47
56
|
getHtmlStr(
|
|
48
57
|
"https://qcast-image.oss-cn-qingdao.aliyuncs.com/JsViewTestResource/DocResource/mathjax-tex-svg.txt",
|
|
49
|
-
props.latexStr,
|
|
58
|
+
precessString(props.latexStr),
|
|
50
59
|
props.fontSize,
|
|
51
60
|
props.width,
|
|
52
61
|
props.height,
|
|
53
62
|
props.color
|
|
54
63
|
)
|
|
55
64
|
);
|
|
65
|
+
const resizeObserver = new ResizeObserver(entries => {
|
|
66
|
+
if (entries.length > 0) {
|
|
67
|
+
const e = entries[0];
|
|
68
|
+
if (clientHeight.value == 0) {
|
|
69
|
+
clientHeight.value = e.contentRect.height
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
});
|
|
73
|
+
resizeObserver.observe(layoutView.GetIFrame());
|
|
74
|
+
|
|
56
75
|
innerViewId.value = Forge.sViewStore.add(new Forge.ViewInfo(layoutView));
|
|
57
76
|
|
|
58
77
|
onBeforeUnmount(() => {
|
|
@@ -61,16 +80,18 @@ onBeforeUnmount(() => {
|
|
|
61
80
|
innerViewId.value = -1;
|
|
62
81
|
console.log("success remove innerview");
|
|
63
82
|
}
|
|
83
|
+
resizeObserver.unobserve(layoutView.GetIFrame())
|
|
64
84
|
});
|
|
65
85
|
</script>
|
|
66
86
|
<template>
|
|
67
87
|
<div
|
|
68
|
-
:data-jsv-vw-innerview="innerViewId"
|
|
69
88
|
:style="{
|
|
70
89
|
left: left,
|
|
71
90
|
top: top,
|
|
72
|
-
width:
|
|
73
|
-
height:
|
|
91
|
+
width: clientWidth,
|
|
92
|
+
height: clientHeight,
|
|
74
93
|
}"
|
|
75
|
-
|
|
94
|
+
>
|
|
95
|
+
<div :data-jsv-vw-innerview="innerViewId"></div>
|
|
96
|
+
</div>
|
|
76
97
|
</template>
|
|
@@ -5,21 +5,24 @@
|
|
|
5
5
|
-->
|
|
6
6
|
|
|
7
7
|
<!--
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
8
|
+
* @file
|
|
9
|
+
*
|
|
10
|
+
* [界面概述]
|
|
11
|
+
* 思维导图控件
|
|
12
|
+
* [控件介绍]
|
|
13
|
+
* JsvLatex:
|
|
14
|
+
* props:
|
|
15
|
+
* latexStr: {string} latex公式
|
|
16
|
+
* fontSize: {function} 字号
|
|
17
|
+
* left: {number} left
|
|
18
|
+
* top: {number} top
|
|
19
|
+
* width: {number} width
|
|
20
|
+
* height: {number} height
|
|
21
|
+
* lineSpace: {number} 行距
|
|
22
|
+
* color: {string} 文字颜色
|
|
23
|
+
* [注意事项]
|
|
24
|
+
* 1. 盒子端的字符串是直接作为数学公式解析的, 所以需要将\n替换为\\, 需要前端自己处理, 这里提供了一个辅助方法processLatexStr来处理简单的情况
|
|
25
|
+
-->
|
|
23
26
|
<script setup>
|
|
24
27
|
import { onBeforeUnmount, ref } from "vue";
|
|
25
28
|
import { Forge } from "@shijiu/jsview/dom/jsv-forge-define";
|
|
@@ -67,13 +70,13 @@ const props = defineProps({
|
|
|
67
70
|
|
|
68
71
|
const show = ref(false);
|
|
69
72
|
let innerViewId = -1;
|
|
70
|
-
let clientWidth = props.width;
|
|
71
|
-
let clientHeight = props.height;
|
|
73
|
+
let clientWidth = ref(props.width);
|
|
74
|
+
let clientHeight = ref(props.height);
|
|
72
75
|
|
|
73
76
|
const getClientSize = () => {
|
|
74
77
|
return {
|
|
75
|
-
width: clientWidth,
|
|
76
|
-
height: clientHeight,
|
|
78
|
+
width: clientWidth.value,
|
|
79
|
+
height: clientHeight.value,
|
|
77
80
|
};
|
|
78
81
|
};
|
|
79
82
|
const showView = () => {
|
|
@@ -104,15 +107,18 @@ const showView = () => {
|
|
|
104
107
|
);
|
|
105
108
|
|
|
106
109
|
pluginTexture.RegisterLoadImageCallback(null, (data) => {
|
|
110
|
+
console.log("testtest texture load callback", data);
|
|
107
111
|
tryUpdateClientSize(data.width, data.height);
|
|
108
112
|
});
|
|
109
113
|
|
|
110
114
|
const tryUpdateClientSize = (textureW, textureH) => {
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
+
console.log("testtet latex texture size", textureW, textureH);
|
|
116
|
+
if (textureW <= 0 || textureH <= 0) {
|
|
117
|
+
console.warn("JsvLatex get empth texture", textureW, textureH);
|
|
118
|
+
return;
|
|
115
119
|
}
|
|
120
|
+
clientWidth.value = Math.min(textureW, props.width);
|
|
121
|
+
clientHeight.value = Math.round(clientWidth.value * (textureH / textureW));
|
|
116
122
|
};
|
|
117
123
|
|
|
118
124
|
let layoutView = new Forge.LayoutView(
|
|
@@ -149,13 +155,13 @@ defineExpose({
|
|
|
149
155
|
|
|
150
156
|
<template>
|
|
151
157
|
<div
|
|
152
|
-
v-if="show"
|
|
153
|
-
:data-jsv-vw-innerview="innerViewId"
|
|
154
158
|
:style="{
|
|
155
159
|
left: left,
|
|
156
160
|
top: top,
|
|
157
|
-
width:
|
|
158
|
-
height:
|
|
161
|
+
width: clientWidth,
|
|
162
|
+
height: clientHeight,
|
|
159
163
|
}"
|
|
160
|
-
|
|
164
|
+
>
|
|
165
|
+
<div v-if="show" :data-jsv-vw-innerview="innerViewId"></div>
|
|
166
|
+
</div>
|
|
161
167
|
</template>
|
|
@@ -17,7 +17,29 @@ const globalLoadJsvLatexPlugin = (listener) => {
|
|
|
17
17
|
}
|
|
18
18
|
}
|
|
19
19
|
|
|
20
|
+
function processLatexStr(origin) {
|
|
21
|
+
//只将数学环境外的换行替换为\\
|
|
22
|
+
if (typeof origin !== "string") {
|
|
23
|
+
return null;
|
|
24
|
+
}
|
|
25
|
+
const index1 = origin.indexOf("\\begin");
|
|
26
|
+
const index2 = origin.indexOf("}", origin.lastIndexOf("\\end"));
|
|
27
|
+
if (index1 >= 0) {
|
|
28
|
+
const head = origin.substring(0, index1);
|
|
29
|
+
const middle = origin.substring(index1, index2 + 1);
|
|
30
|
+
const tail = origin.substring(index2 + 1);
|
|
31
|
+
return (
|
|
32
|
+
head.replaceAll(/(?<!\\\\)[\n]+/g, "\\\\") +
|
|
33
|
+
middle +
|
|
34
|
+
tail.replaceAll(/(?<!\\\\)[\n]+/g, "\\\\")
|
|
35
|
+
);
|
|
36
|
+
} else {
|
|
37
|
+
return origin.replaceAll(/(?<!\\\\)[\n]+/g, "\\\\");
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
|
|
20
41
|
export {
|
|
21
42
|
JsvLatex,
|
|
43
|
+
processLatexStr,
|
|
22
44
|
globalLoadJsvLatexPlugin,
|
|
23
45
|
}
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import { Forge } from "@shijiu/jsview/dom/jsv-forge-define.mjs";
|
|
2
|
+
|
|
3
|
+
// 记录已激活内容,减少激活的重复调用,提高执行性能
|
|
4
|
+
let sActivedMap = new Map();
|
|
5
|
+
let sDisabledMap = new Map();
|
|
6
|
+
|
|
7
|
+
// Component名称列表, 注意大小写
|
|
8
|
+
namespace FeatureNames {
|
|
9
|
+
// 'TouchReceiver': 触屏支持
|
|
10
|
+
export const TouchReceiver: String = "TouchReceiver";
|
|
11
|
+
|
|
12
|
+
// 'FreeMoveDiv': 游戏类平滑动画组件
|
|
13
|
+
export const FreeMoveDiv: String = "FreeMoveDiv";
|
|
14
|
+
|
|
15
|
+
// 'CustomFragShader': 内容3D化效果组件
|
|
16
|
+
export const CustomFragShader: String = "CustomFragShader";
|
|
17
|
+
|
|
18
|
+
// 'Capture2Texture': div拷屏
|
|
19
|
+
export const Capture2Texture: String = "Capture2Texture";
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
// 激活内核中的模块
|
|
23
|
+
// 特别注意:
|
|
24
|
+
// 此接口调用时,请联系我们确认所在渠道此功能被搭载并已经获取了授权后再调用
|
|
25
|
+
//
|
|
26
|
+
// 场景1: 强制激活未授权的组件
|
|
27
|
+
// 如果激活未授权的组件,屏幕会有未授权的组件列表水印出现
|
|
28
|
+
// 并且如果所在渠道的内核不带此功能的话,会引起崩溃一系列问题
|
|
29
|
+
//
|
|
30
|
+
// 场景2: 未激活组件,而实际使用
|
|
31
|
+
// 组件使用时会自动调用 JsvUseFeature 来确认是否激活
|
|
32
|
+
// 若未激活则,会有console.error提示,并且内核中此功能也不会工作(此处也规避了内核可能未搭载组件而崩溃的问题)
|
|
33
|
+
function JsvActiveFeature(comp_name: String) {
|
|
34
|
+
if (sActivedMap.has(comp_name)) {
|
|
35
|
+
// 已经激活过
|
|
36
|
+
return;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
if (sDisabledMap.has(comp_name)) {
|
|
40
|
+
console.error(`Error: feature ${comp_name} is disabled`);
|
|
41
|
+
return;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
sActivedMap.set(comp_name, comp_name); // 记录已激活内容
|
|
45
|
+
|
|
46
|
+
console.log(`feature ${comp_name} enable`);
|
|
47
|
+
Forge.sRenderBridge.ActiveComponent(comp_name);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
// 模块内部调用,确保要使用功能时,功能已经授权并激活
|
|
51
|
+
function JsvUseFeature(from: String, comp_name: String) {
|
|
52
|
+
if (sActivedMap.has(comp_name)) {
|
|
53
|
+
return;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
console.error(`Error: ${comp_name}(from ${from}) is not activated, need JsvActiveFeature(JsvFeatureNames.${comp_name}) in boot`);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
// 备用接口: 防止未授权组件被错误激活引起的崩溃和水印显示
|
|
60
|
+
function JsvShutdownFeatures(comp_name_list: Array<String>) {
|
|
61
|
+
if (sActivedMap.size > 0) {
|
|
62
|
+
console.log(`Error: JsvShutdownFeatures should call before any JsvActiveFeature()`);
|
|
63
|
+
return;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
let merged_comps: Array<String> = [];
|
|
67
|
+
for (let i = 0; i < comp_name_list.length; i++) {
|
|
68
|
+
let comp_name: String = comp_name_list[i];
|
|
69
|
+
|
|
70
|
+
// 记录变更信息,一旦记入disable列表,则不可被active,且原active会失效
|
|
71
|
+
sDisabledMap.set(comp_name, comp_name);
|
|
72
|
+
merged_comps.push(comp_name_list[i]);
|
|
73
|
+
console.log(`feature ${comp_name} disable`);
|
|
74
|
+
}
|
|
75
|
+
Forge.sRenderBridge.ShutdownComponents(JSON.stringify(merged_comps));
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
export {
|
|
79
|
+
FeatureNames,
|
|
80
|
+
FeatureNames as JsvFeatureNames,
|
|
81
|
+
JsvActiveFeature,
|
|
82
|
+
JsvUseFeature,
|
|
83
|
+
JsvShutdownFeatures
|
|
84
|
+
}
|
|
@@ -1,14 +1,18 @@
|
|
|
1
|
-
let handles
|
|
1
|
+
let handles: {
|
|
2
|
+
TextureManager: any,
|
|
3
|
+
RootView: any,
|
|
4
|
+
RootActivity: any
|
|
5
|
+
} = {
|
|
2
6
|
TextureManager: null,
|
|
3
7
|
RootView: null,
|
|
4
8
|
RootActivity: null
|
|
5
9
|
}
|
|
6
10
|
|
|
7
11
|
const jsvCode = (window as any).JsvCode;
|
|
8
|
-
jsvCode.ForgeHandles.listenToReady(()=>{
|
|
12
|
+
jsvCode.ForgeHandles.listenToReady(() => {
|
|
9
13
|
handles.TextureManager = jsvCode.ForgeHandles.TextureManager;
|
|
10
14
|
handles.RootView = jsvCode.ForgeHandles.RootView;
|
|
11
|
-
handles.RootActivity = jsvCode.ForgeHandles.RootActivity;
|
|
15
|
+
handles.RootActivity = jsvCode.ForgeHandles.RootActivity;
|
|
12
16
|
})
|
|
13
17
|
|
|
14
18
|
export default handles;
|
|
@@ -1,12 +1,9 @@
|
|
|
1
|
-
import { createMemoryHistory, createWebHashHistory }
|
|
1
|
+
import { createMemoryHistory, /*createWebHashHistory*/ } from "vue-router";
|
|
2
|
+
// import { urlCheckSet } from "./TypeCheckAndSet.ts";
|
|
2
3
|
|
|
3
4
|
class JsvHashHistory {
|
|
4
5
|
constructor(base) {
|
|
5
|
-
|
|
6
|
-
this.#history = createWebHashHistory(base)
|
|
7
|
-
} else {
|
|
8
|
-
this.#history = this.#createMockHashHistory(base);
|
|
9
|
-
}
|
|
6
|
+
this.#history = this.#createMockHashHistory(base);
|
|
10
7
|
}
|
|
11
8
|
|
|
12
9
|
get location() {
|
|
@@ -32,7 +29,7 @@ class JsvHashHistory {
|
|
|
32
29
|
replace(to, data) {
|
|
33
30
|
this.#history.replace(to, data);
|
|
34
31
|
this.#updateLocation(this.#history.location);
|
|
35
|
-
}
|
|
32
|
+
}
|
|
36
33
|
|
|
37
34
|
push(to, data) {
|
|
38
35
|
this.#history.push(to, data);
|
|
@@ -53,16 +50,16 @@ class JsvHashHistory {
|
|
|
53
50
|
// base = location.host ? base || location.pathname + location.search : '';
|
|
54
51
|
base = (location.host || location.protocol === 'file:') ? base || location.pathname + location.search : '';
|
|
55
52
|
if (!base.includes('#'))
|
|
56
|
-
|
|
53
|
+
base += '#';
|
|
57
54
|
if (!base.endsWith('#/') && !base.endsWith('#')) {
|
|
58
|
-
|
|
55
|
+
console.warn(`A hash base must end with a "#":\n"${base}" should be "${base.replace(/#.*$/, '#')}".`);
|
|
59
56
|
}
|
|
60
57
|
|
|
61
58
|
this.baseURL = window.location.origin + base;
|
|
62
59
|
|
|
63
60
|
const history = createMemoryHistory(base)
|
|
64
61
|
const initHash = this.#getInitHash();
|
|
65
|
-
if(initHash) {
|
|
62
|
+
if (initHash) {
|
|
66
63
|
// 已设置hash,替换到hash页面
|
|
67
64
|
const replaceTo = {
|
|
68
65
|
path: initHash.substring(1), // 去除#
|
|
@@ -70,9 +67,9 @@ class JsvHashHistory {
|
|
|
70
67
|
}
|
|
71
68
|
|
|
72
69
|
const queryIdx = initHash.indexOf('?');
|
|
73
|
-
if(queryIdx >= 0) {
|
|
70
|
+
if (queryIdx >= 0) {
|
|
74
71
|
replaceTo.path = replaceTo.path.substring(0, queryIdx - 1),
|
|
75
|
-
|
|
72
|
+
replaceTo.query = this.#convertUrlParams(initHash.substring(queryIdx));
|
|
76
73
|
}
|
|
77
74
|
history.replace(replaceTo);
|
|
78
75
|
} else {
|
|
@@ -87,35 +84,35 @@ class JsvHashHistory {
|
|
|
87
84
|
let initHash;
|
|
88
85
|
|
|
89
86
|
// 抓取history hash在启动过程中的变更, 用于warmUp/warmLoad不一致的情况。
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
}
|
|
87
|
+
initHash = window.JsvCoreApi.takeNativeHashChange((new_hash) => {
|
|
88
|
+
// TODO:暂不实现
|
|
89
|
+
//this.push(new_hash.substring(1)); // 去除#
|
|
90
|
+
});
|
|
91
|
+
if (initHash != null) {
|
|
92
|
+
// 将新hash融入window.location中
|
|
93
|
+
console.log("History: found init hash change to:" + initHash);
|
|
94
|
+
} else {
|
|
95
|
+
initHash = window.location.hash;
|
|
100
96
|
}
|
|
101
97
|
|
|
102
98
|
return initHash;
|
|
103
99
|
}
|
|
104
100
|
|
|
105
101
|
#updateLocation(location) {
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
true
|
|
110
|
-
)
|
|
102
|
+
const url = new URL(location ? this.baseURL + location : this.baseURL);
|
|
103
|
+
if (window.location.applyUrlInfo) {
|
|
104
|
+
// 对于window.location为独立定义的场景
|
|
111
105
|
window.location.applyUrlInfo(url);
|
|
106
|
+
} else {
|
|
107
|
+
// 更新系统的location显示和history状态
|
|
108
|
+
window.history.pushState(null, '', url.href);
|
|
112
109
|
}
|
|
113
110
|
}
|
|
114
111
|
|
|
115
112
|
#convertUrlParams(value) {
|
|
116
113
|
// 去除问号
|
|
117
114
|
const questionMarkIdx = value.indexOf('?');
|
|
118
|
-
if(questionMarkIdx >= 0) {
|
|
115
|
+
if (questionMarkIdx >= 0) {
|
|
119
116
|
value = value.substr(questionMarkIdx + 1);
|
|
120
117
|
}
|
|
121
118
|
|
|
@@ -124,7 +121,7 @@ class JsvHashHistory {
|
|
|
124
121
|
var result = {};
|
|
125
122
|
|
|
126
123
|
// 遍历参数并解析键值对
|
|
127
|
-
for(const param of paramArray) {
|
|
124
|
+
for (const param of paramArray) {
|
|
128
125
|
const [key, value] = param.split('=');
|
|
129
126
|
|
|
130
127
|
// 如果键已存在,则将值转换为数组
|