@shijiu/jsview-vue 2.2.128 → 2.2.373
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 +4 -15
- package/bin/browser/BrowserApic2.vue.mjs +4 -15
- package/bin/browser/BrowserApicLib.mjs +32 -26
- package/bin/browser/BrowserAudio.vue.mjs +2 -10
- package/bin/browser/BrowserJsvFragShaderView.vue.mjs +79 -0
- package/bin/browser/BrowserJsvLatex.vue.mjs +39 -16
- package/bin/browser/BrowserPreload.vue.mjs +1 -5
- package/bin/browser/BrowserQrcode.vue.mjs +1 -5
- package/bin/browser/BrowserSpray.vue.mjs +2 -12
- package/bin/browser/BrowserTextureAnim.vue.mjs +2 -12
- package/bin/export-sfc.mjs +3 -3
- package/bin/jsview-vue-common.mjs +3 -3
- package/bin/jsview-vue.mjs +4636 -2325
- package/bin/types/JsViewEngineWidget/CheckType.d.ts +4 -0
- package/bin/types/JsViewEngineWidget/JsvFocus/JsvFocusBlock.vue.d.ts +37 -33
- package/bin/types/JsViewEngineWidget/JsvFocus/JsvFocusHub.d.ts +4 -0
- package/bin/types/JsViewEngineWidget/JsvFocus/JsvFocusManager.d.ts +21 -6
- package/bin/types/JsViewEngineWidget/MetroWidget/Const.d.ts +4 -0
- package/bin/types/JsViewEngineWidget/MetroWidget/Dispatcher.d.ts +14 -12
- package/bin/types/JsViewEngineWidget/MetroWidget/ListWidget.vue.d.ts +17 -6
- package/bin/types/JsViewEngineWidget/MetroWidget/MetroWidget.vue.d.ts +283 -6
- package/bin/types/JsViewEngineWidget/MetroWidget/MetroWidgetSetup.d.ts +9 -3
- package/bin/types/JsViewEngineWidget/MetroWidget/PageUpdater.d.ts +4 -0
- package/bin/types/JsViewEngineWidget/MetroWidget/RenderItem.d.ts +7 -0
- package/bin/types/JsViewEngineWidget/MetroWidget/Slide.d.ts +4 -0
- package/bin/types/JsViewEngineWidget/MetroWidget/SlotComponent.vue.d.ts +4 -0
- package/bin/types/JsViewEngineWidget/MetroWidget/VisibleInfo.d.ts +4 -0
- package/bin/types/JsViewEngineWidget/MetroWidget/WidgetRectInfo.d.ts +4 -0
- package/bin/types/JsViewEngineWidget/RangeModel.d.ts +4 -0
- package/bin/types/JsViewEngineWidget/TemplateParser/CommonMetroTemplate.d.ts +4 -0
- package/bin/types/JsViewEngineWidget/TemplateParser/Fence.d.ts +4 -0
- package/bin/types/JsViewEngineWidget/TemplateParser/ListMetroTemplate.d.ts +5 -0
- package/bin/types/JsViewEngineWidget/TemplateParser/MetroTemplate.d.ts +4 -0
- package/bin/types/JsViewEngineWidget/TemplateParser/TemplateItemAdder.d.ts +5 -1
- package/bin/types/JsViewEngineWidget/TemplateParser/index.d.ts +4 -0
- package/bin/types/JsViewEngineWidget/WidgetCommon.d.ts +4 -0
- package/bin/types/JsViewEngineWidget/index.d.ts +14 -1
- package/bin/types/JsViewPlugin/JsvAccount/JsvAccount.d.ts +4 -0
- package/bin/types/JsViewPlugin/JsvAudio/AudioProxy.d.ts +4 -0
- package/bin/types/JsViewPlugin/JsvAudio/BrowserAudio/BrowserAudio.vue.d.ts +4 -0
- package/bin/types/JsViewPlugin/JsvAudio/BrowserAudio/JsvSystemAudio.vue.d.ts +4 -0
- package/bin/types/JsViewPlugin/JsvAudio/CheckType.d.ts +4 -0
- package/bin/types/JsViewPlugin/JsvAudio/Events.d.ts +4 -0
- package/bin/types/JsViewPlugin/JsvAudio/JsvAudio.vue.d.ts +4 -0
- package/bin/types/JsViewPlugin/JsvAudio/JsvAudioBridgeProxy.d.ts +4 -0
- package/bin/types/JsViewPlugin/JsvAudio/JsvAudioProxy.vue.d.ts +4 -0
- package/bin/types/JsViewPlugin/JsvAudio/PluginLoader.d.ts +4 -0
- package/bin/types/JsViewPlugin/JsvAudio/ScreenLockManager.d.ts +4 -0
- package/bin/types/JsViewPlugin/JsvAudio/index.d.ts +4 -0
- package/bin/types/JsViewPlugin/JsvAudio/version.d.ts +5 -0
- package/bin/types/JsViewPlugin/JsvLatex/BrowserDomBuilder.d.ts +4 -0
- package/bin/types/JsViewPlugin/JsvLatex/BrowserJsvLatex.vue.d.ts +4 -0
- package/bin/types/JsViewPlugin/JsvLatex/Color.d.ts +4 -0
- package/bin/types/JsViewPlugin/JsvLatex/JsvLatex.vue.d.ts +24 -0
- package/bin/types/JsViewPlugin/JsvLatex/JsvLatexBridgeProxy.d.ts +4 -0
- package/bin/types/JsViewPlugin/JsvLatex/JsvLatexProxy.vue.d.ts +4 -0
- package/bin/types/JsViewPlugin/JsvLatex/PluginLoader.d.ts +4 -0
- package/bin/types/JsViewPlugin/JsvLatex/index.d.ts +5 -0
- package/bin/types/JsViewPlugin/JsvLatex/version.d.ts +4 -0
- package/bin/types/JsViewPlugin/index.d.ts +4 -0
- package/bin/types/JsViewVueTools/ConstSymbol.d.ts +6 -2
- package/bin/types/JsViewVueTools/DebugContentShellJBridge.d.ts +4 -0
- package/bin/types/JsViewVueTools/DebugTool.d.ts +4 -0
- package/bin/types/JsViewVueTools/DefaultKeyMap.d.ts +4 -0
- package/bin/types/JsViewVueTools/FeatureActive.d.ts +14 -0
- package/bin/types/JsViewVueTools/ForgeConstDefine.d.ts +4 -0
- package/bin/types/JsViewVueTools/ForgeHandles.d.ts +7 -3
- package/bin/types/JsViewVueTools/JsvDemoTester.d.ts +4 -0
- package/bin/types/JsViewVueTools/JsvDynamicCssStyle.d.ts +20 -1
- package/bin/types/JsViewVueTools/JsvDynamicKeyFrames.d.ts +21 -2
- package/bin/types/JsViewVueTools/JsvFederationTools.d.ts +20 -0
- package/bin/types/JsViewVueTools/JsvHashHistory.d.ts +4 -0
- package/bin/types/JsViewVueTools/JsvImpactTracer.d.ts +8 -4
- package/bin/types/JsViewVueTools/JsvPerformance.d.ts +9 -0
- package/bin/types/JsViewVueTools/JsvPreDownloader.d.ts +55 -0
- package/bin/types/JsViewVueTools/JsvRefTaker.d.ts +28 -3
- package/bin/types/JsViewVueTools/JsvRuntimeBridge.d.ts +50 -0
- package/bin/types/JsViewVueTools/JsvStyleClass.d.ts +4 -0
- package/bin/types/JsViewVueTools/JsvStyleSheetsDeclarer.d.ts +21 -1
- package/bin/types/JsViewVueTools/JsvTextTools.d.ts +85 -27
- package/bin/types/JsViewVueTools/JsvTextureDefines.d.ts +4 -0
- package/bin/types/JsViewVueTools/JsvTextureLoadTool.d.ts +67 -0
- package/bin/types/JsViewVueTools/JsvTextureStore/CanvasTexture/CanvasTexture.d.ts +4 -0
- package/bin/types/JsViewVueTools/JsvTextureStore/CanvasTexture/CommandList.d.ts +4 -0
- package/bin/types/JsViewVueTools/JsvTextureStore/CanvasTexture/Path.d.ts +4 -0
- package/bin/types/JsViewVueTools/JsvTextureStore/CapturedTexture/CapturedTexture.d.ts +4 -0
- package/bin/types/JsViewVueTools/JsvTextureStore/JsvTextureStore.d.ts +73 -3
- package/bin/types/JsViewVueTools/JsvTextureStore/Store.d.ts +4 -0
- package/bin/types/JsViewVueTools/JsvTextureStore/Texture.d.ts +4 -0
- package/bin/types/JsViewVueTools/NinePatchHelper.d.ts +5 -1
- package/bin/types/JsViewVueTools/TextureManagerTools.d.ts +11 -0
- package/bin/types/JsViewVueTools/TypeCheckAndSet.d.ts +4 -0
- package/bin/types/JsViewVueTools/index.d.ts +26 -11
- package/bin/types/JsViewVueWidget/JsvActorMove/ActorControlBase.d.ts +4 -0
- package/bin/types/JsViewVueWidget/JsvActorMove/JsvActorMove.vue.d.ts +38 -0
- package/bin/types/JsViewVueWidget/JsvActorMove/JsvActorMoveControl.d.ts +4 -0
- package/bin/types/JsViewVueWidget/JsvActorMove/index.d.ts +4 -0
- package/bin/types/JsViewVueWidget/JsvApic/JsvApic/BrowserApic.vue.d.ts +5 -1
- package/bin/types/JsViewVueWidget/JsvApic/JsvApic/JsvApic.vue.d.ts +28 -1
- package/bin/types/JsViewVueWidget/JsvApic/JsvApic/index.d.ts +4 -0
- package/bin/types/JsViewVueWidget/JsvApic/JsvApic2/BrowserApic2.vue.d.ts +5 -1
- package/bin/types/JsViewVueWidget/JsvApic/JsvApic2/JsvApic2.vue.d.ts +29 -1
- package/bin/types/JsViewVueWidget/JsvApic/JsvApic2/index.d.ts +4 -0
- package/bin/types/JsViewVueWidget/JsvApic/JsvBrowserApicLib/ApicDataBase.d.ts +4 -0
- package/bin/types/JsViewVueWidget/JsvApic/JsvBrowserApicLib/BrowserApicLib.d.ts +4 -0
- package/bin/types/JsViewVueWidget/JsvApic/JsvBrowserApicLib/GifData.d.ts +4 -0
- package/bin/types/JsViewVueWidget/JsvApic/JsvBrowserApicLib/NormalLoopTool.d.ts +4 -0
- package/bin/types/JsViewVueWidget/JsvApic/JsvBrowserApicLib/PartLoopTool.d.ts +4 -0
- package/bin/types/JsViewVueWidget/JsvApic/JsvBrowserApicLib/SingleLoopTool.d.ts +4 -0
- package/bin/types/JsViewVueWidget/JsvApic/JsvBrowserApicLib/Viewer.d.ts +6 -1
- package/bin/types/JsViewVueWidget/JsvApic/JsvBrowserApicLib/WebpData.d.ts +4 -0
- package/bin/types/JsViewVueWidget/JsvApic/JsvCommonLoopToolBase.d.ts +4 -0
- package/bin/types/JsViewVueWidget/JsvClipDiv/JsvClipDiv.vue.d.ts +74 -0
- package/bin/types/JsViewVueWidget/JsvClipDiv/index.d.ts +5 -0
- package/bin/types/JsViewVueWidget/JsvConnectLine/ArcLineManager.d.ts +4 -0
- package/bin/types/JsViewVueWidget/JsvConnectLine/JsvConnectLine.vue.d.ts +21 -0
- package/bin/types/JsViewVueWidget/JsvConnectLine/index.d.ts +4 -0
- package/bin/types/JsViewVueWidget/JsvDragBox/JsvDragBox.vue.d.ts +109 -0
- package/bin/types/JsViewVueWidget/JsvDriftScope/JsvDriftScope.vue.d.ts +108 -0
- package/bin/types/JsViewVueWidget/JsvDriftScope/index.d.ts +5 -0
- package/bin/types/JsViewVueWidget/JsvEnableRenderBreak.vue.d.ts +4 -0
- package/bin/types/JsViewVueWidget/JsvFilterView.vue.d.ts +19 -0
- package/bin/types/JsViewVueWidget/JsvFlexCell/JsvFlexDiv.vue.d.ts +34 -0
- package/bin/types/JsViewVueWidget/JsvFlexCell/JsvScreenFlex.vue.d.ts +106 -0
- package/bin/types/JsViewVueWidget/JsvFlexCell/index.d.ts +6 -2
- package/bin/types/JsViewVueWidget/JsvFragShaderView/BrowserJsvFragShaderView.vue.d.ts +19 -0
- package/bin/types/JsViewVueWidget/JsvFragShaderView/JsvFragShaderView.vue.d.ts +60 -0
- package/bin/types/JsViewVueWidget/JsvFragShaderView/index.d.ts +6 -0
- package/bin/types/JsViewVueWidget/JsvFreeMoveActor/ActorControl.d.ts +47 -17
- package/bin/types/JsViewVueWidget/JsvFreeMoveActor/CallbackManager.d.ts +4 -0
- package/bin/types/JsViewVueWidget/JsvFreeMoveActor/ForgeTypeDefine.d.ts +4 -0
- package/bin/types/JsViewVueWidget/JsvFreeMoveActor/FreeMoveActor.vue.d.ts +25 -0
- package/bin/types/JsViewVueWidget/JsvFreeMoveActor/JsvEnvBlocker.vue.d.ts +22 -0
- package/bin/types/JsViewVueWidget/JsvFreeMoveActor/NexusNode.d.ts +4 -0
- package/bin/types/JsViewVueWidget/JsvFreeMoveActor/SetAction.d.ts +9 -5
- package/bin/types/JsViewVueWidget/JsvFreeMoveActor/SetCondition.d.ts +8 -2
- package/bin/types/JsViewVueWidget/JsvFreeMoveActor/SetState.d.ts +11 -7
- package/bin/types/JsViewVueWidget/JsvFreeMoveActor/SyncLinkManager.d.ts +22 -0
- package/bin/types/JsViewVueWidget/JsvFreeMoveActor/index.d.ts +6 -0
- package/bin/types/JsViewVueWidget/JsvGrid.vue.d.ts +73 -0
- package/bin/types/JsViewVueWidget/JsvHole.d.ts +17 -0
- package/bin/types/JsViewVueWidget/JsvInput/Cursor.vue.d.ts +14 -34
- package/bin/types/JsViewVueWidget/JsvInput/EditViewOperator.d.ts +48 -0
- package/bin/types/JsViewVueWidget/JsvInput/EditVisibleArea.d.ts +27 -0
- package/bin/types/JsViewVueWidget/JsvInput/JsvInput.vue.d.ts +64 -209
- package/bin/types/JsViewVueWidget/JsvInput/SharedDefine.d.ts +17 -0
- package/bin/types/JsViewVueWidget/JsvInput/SystemTextTools.d.ts +14 -0
- package/bin/types/JsViewVueWidget/JsvInput/index.d.ts +4 -0
- package/bin/types/JsViewVueWidget/JsvLine/JsvLine.vue.d.ts +20 -0
- package/bin/types/JsViewVueWidget/JsvLine/LineManager.d.ts +4 -0
- package/bin/types/JsViewVueWidget/JsvLine/index.d.ts +4 -0
- package/bin/types/JsViewVueWidget/JsvMarquee.vue.d.ts +21 -0
- package/bin/types/JsViewVueWidget/JsvMaskClipDiv.vue.d.ts +20 -0
- package/bin/types/JsViewVueWidget/JsvMindMap/Constant.d.ts +4 -0
- package/bin/types/JsViewVueWidget/JsvMindMap/DataTree.d.ts +7 -1
- package/bin/types/JsViewVueWidget/JsvMindMap/Geometry.d.ts +4 -0
- package/bin/types/JsViewVueWidget/JsvMindMap/JsvMindMap.vue.d.ts +90 -0
- package/bin/types/JsViewVueWidget/JsvMindMap/index.d.ts +4 -0
- package/bin/types/JsViewVueWidget/JsvMindMap/rtree.d.ts +4 -0
- package/bin/types/JsViewVueWidget/JsvNativeSharedDiv.vue.d.ts +24 -0
- package/bin/types/JsViewVueWidget/JsvNinePatch.vue.d.ts +31 -0
- package/bin/types/JsViewVueWidget/JsvPieChart.vue.d.ts +17 -0
- package/bin/types/JsViewVueWidget/JsvPosterDiv.vue.d.ts +17 -0
- package/bin/types/JsViewVueWidget/JsvPosterImage.vue.d.ts +18 -0
- package/bin/types/JsViewVueWidget/JsvPreload/BrowserPreload.vue.d.ts +4 -0
- package/bin/types/JsViewVueWidget/JsvPreload/JsvPreload.vue.d.ts +42 -0
- package/bin/types/JsViewVueWidget/JsvPreload/index.d.ts +4 -0
- package/bin/types/JsViewVueWidget/JsvProgressBar.vue.d.ts +19 -0
- package/bin/types/JsViewVueWidget/JsvQrcode/BrowserQrcode.vue.d.ts +4 -0
- package/bin/types/JsViewVueWidget/JsvQrcode/JsvQrcode.vue.d.ts +25 -0
- package/bin/types/JsViewVueWidget/JsvQrcode/index.d.ts +4 -0
- package/bin/types/JsViewVueWidget/JsvRadarChart.vue.d.ts +24 -0
- package/bin/types/JsViewVueWidget/JsvRipple/Constant.d.ts +4 -0
- package/bin/types/JsViewVueWidget/JsvRipple/JsvRipple.vue.d.ts +45 -0
- package/bin/types/JsViewVueWidget/JsvRipple/index.d.ts +4 -0
- package/bin/types/JsViewVueWidget/JsvScaleTextBox.vue.d.ts +18 -0
- package/bin/types/JsViewVueWidget/JsvScrollBox/JsvScrollBox.vue.d.ts +65 -1
- package/bin/types/JsViewVueWidget/JsvScrollBox/JsvScrollFollow.vue.d.ts +157 -0
- package/bin/types/JsViewVueWidget/JsvScrollBox/ScrollInnerSymbol.d.ts +8 -0
- package/bin/types/JsViewVueWidget/JsvScrollBox/ScrollSymbol.d.ts +13 -4
- package/bin/types/JsViewVueWidget/JsvScrollBox/index.d.ts +6 -0
- package/bin/types/JsViewVueWidget/JsvSector.vue.d.ts +18 -0
- package/bin/types/JsViewVueWidget/JsvSoundPool.d.ts +42 -0
- package/bin/types/JsViewVueWidget/JsvSpray/BrowserSpray.vue.d.ts +4 -0
- package/bin/types/JsViewVueWidget/JsvSpray/JsvSpray.vue.d.ts +40 -0
- package/bin/types/JsViewVueWidget/JsvSpray/index.d.ts +4 -0
- package/bin/types/JsViewVueWidget/JsvSpriteAnim/FrameBuidler.d.ts +4 -0
- package/bin/types/JsViewVueWidget/JsvSpriteAnim/JsvSpriteAnim.vue.d.ts +52 -0
- package/bin/types/JsViewVueWidget/JsvSpriteAnim/JsvSpriteLoader.vue.d.ts +16 -0
- package/bin/types/JsViewVueWidget/JsvSpriteAnim/JsvSpriteTools.d.ts +4 -0
- package/bin/types/JsViewVueWidget/JsvSpriteAnim/SpriteController.d.ts +4 -0
- package/bin/types/JsViewVueWidget/JsvSpriteAnim/index.d.ts +4 -0
- package/bin/types/JsViewVueWidget/JsvSpriteAnim/sAnimationToken.d.ts +4 -0
- package/bin/types/JsViewVueWidget/JsvSwiper/JsvSwiper.vue.d.ts +39 -0
- package/bin/types/JsViewVueWidget/JsvSwiper/index.d.ts +4 -0
- package/bin/types/JsViewVueWidget/JsvSwiper3D/JsvSwiper.vue.d.ts +24 -0
- package/bin/types/JsViewVueWidget/JsvSwiper3D/index.d.ts +4 -0
- package/bin/types/JsViewVueWidget/JsvTextBox.vue.d.ts +26 -0
- package/bin/types/JsViewVueWidget/JsvTextureAnim/BrowserTextureAnim.vue.d.ts +4 -0
- package/bin/types/JsViewVueWidget/JsvTextureAnim/CommonType.d.ts +4 -0
- package/bin/types/JsViewVueWidget/JsvTextureAnim/JsvTextureAnim.vue.d.ts +7 -2
- package/bin/types/JsViewVueWidget/JsvTextureAnim/index.d.ts +4 -0
- package/bin/types/JsViewVueWidget/JsvTouchModeSwitcher.vue.d.ts +100 -0
- package/bin/types/JsViewVueWidget/JsvVisibleSensor/JsvVisibleSensor.vue.d.ts +25 -0
- package/bin/types/JsViewVueWidget/JsvVisibleSensor/index.d.ts +4 -0
- package/bin/types/JsViewVueWidget/index.d.ts +9 -0
- package/bin/types/index.d.ts +4 -0
- package/index.d.ts +8 -0
- package/package.json +1 -1
- package/tools/config/rollup.config.mjs +1 -0
- package/tools/config/toolkit.mjs +81 -0
- package/tools/config/tsconfig.json +1 -0
- package/tools/config/vite.config.ts +24 -14
- package/tools/jsview-vue-build.mjs +66 -21
- package/utils/JsViewEngineWidget/JsvFocus/JsvFocusBlock.vue +6 -2
- package/utils/JsViewEngineWidget/JsvFocus/{JsvFocusManager.js → JsvFocusManager.ts} +34 -15
- package/utils/JsViewEngineWidget/MetroWidget/Dispatcher.ts +20 -0
- package/utils/JsViewEngineWidget/MetroWidget/ListWidget.vue +30 -11
- package/utils/JsViewEngineWidget/MetroWidget/MetroWidget.vue +54 -15
- package/utils/JsViewEngineWidget/MetroWidget/MetroWidgetSetup.js +509 -268
- package/utils/JsViewEngineWidget/MetroWidget/RenderItem.ts +11 -0
- package/utils/JsViewEngineWidget/MetroWidget/TaskManager.ts +8 -0
- package/utils/JsViewEngineWidget/TemplateParser/CommonMetroTemplate.ts +20 -10
- package/utils/JsViewEngineWidget/TemplateParser/ListMetroTemplate.ts +33 -9
- package/utils/JsViewEngineWidget/TemplateParser/MetroTemplate.ts +2 -2
- package/utils/JsViewEngineWidget/TemplateParser/TemplateItemAdder.ts +7 -0
- package/utils/JsViewEngineWidget/{index.js → index.ts} +1 -1
- package/utils/JsViewPlugin/JsvAudio/AudioProxy.js +21 -2
- package/utils/JsViewPlugin/JsvAudio/version.js +1 -1
- package/utils/JsViewPlugin/JsvAudio/version.mjs +1 -1
- 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/ConstSymbol.ts +2 -2
- 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/JsvImpactTracer.js +2 -0
- package/utils/JsViewVueTools/JsvPreDownloader.ts +5 -4
- package/utils/JsViewVueTools/JsvRefTaker.js +1 -2
- package/utils/JsViewVueTools/JsvRuntimeBridge.js +67 -1
- package/utils/JsViewVueTools/JsvStyleClass.js +2 -0
- package/utils/JsViewVueTools/JsvStyleSheetsDeclarer.js +2 -0
- package/utils/JsViewVueTools/JsvTextTools.ts +223 -0
- package/utils/JsViewVueTools/JsvTextureLoadTool.ts +233 -0
- package/utils/JsViewVueTools/JsvTextureStore/CapturedTexture/CapturedTexture.ts +4 -1
- package/utils/JsViewVueTools/JsvTextureStore/JsvTextureStore.ts +8 -4
- package/utils/JsViewVueTools/JsvTextureStore/Texture.ts +1 -0
- package/utils/JsViewVueTools/TextureManagerTools.ts +17 -0
- package/utils/JsViewVueTools/index.js +22 -19
- package/utils/JsViewVueWidget/JsvActorMove/JsvActorMove.vue +2 -0
- package/utils/JsViewVueWidget/JsvApic/JsvApic/BrowserApic.vue +2 -2
- package/utils/JsViewVueWidget/JsvApic/JsvApic/JsvApic.vue +13 -5
- package/utils/JsViewVueWidget/JsvApic/JsvApic2/BrowserApic2.vue +2 -2
- package/utils/JsViewVueWidget/JsvApic/JsvApic2/JsvApic2.vue +15 -4
- package/utils/JsViewVueWidget/JsvApic/JsvBrowserApicLib/Viewer.js +8 -3
- package/utils/JsViewVueWidget/JsvClipDiv/JsvClipDiv.vue +44 -0
- package/utils/JsViewVueWidget/JsvClipDiv/index.ts +1 -0
- package/utils/JsViewVueWidget/JsvConnectLine/JsvConnectLine.vue +7 -1
- package/utils/JsViewVueWidget/JsvDragBox/JsvDragBox.vue +219 -0
- package/utils/JsViewVueWidget/JsvDriftScope/JsvDriftScope.vue +84 -0
- package/utils/JsViewVueWidget/JsvDriftScope/index.ts +1 -0
- package/utils/JsViewVueWidget/JsvFilterView.vue +2 -0
- package/utils/JsViewVueWidget/JsvFlexCell/JsvFlexDiv.vue +5 -2
- package/utils/JsViewVueWidget/JsvFlexCell/JsvScreenFlex.vue +145 -0
- package/utils/JsViewVueWidget/JsvFlexCell/index.js +2 -5
- package/utils/JsViewVueWidget/JsvFragShaderView/BrowserJsvFragShaderView.vue +75 -0
- package/utils/JsViewVueWidget/JsvFragShaderView/JsvFragShaderView.vue +293 -0
- package/utils/JsViewVueWidget/JsvFragShaderView/index.js +18 -0
- package/utils/JsViewVueWidget/JsvFreeMoveActor/ActorControl.ts +142 -63
- package/utils/JsViewVueWidget/JsvFreeMoveActor/FreeMoveActor.vue +9 -0
- package/utils/JsViewVueWidget/JsvFreeMoveActor/JsvEnvBlocker.vue +2 -0
- package/utils/JsViewVueWidget/JsvFreeMoveActor/SetAction.ts +15 -6
- package/utils/JsViewVueWidget/JsvFreeMoveActor/SetCondition.ts +19 -7
- package/utils/JsViewVueWidget/JsvFreeMoveActor/SetState.ts +15 -11
- package/utils/JsViewVueWidget/JsvFreeMoveActor/SyncLinkManager.ts +120 -0
- package/utils/JsViewVueWidget/JsvFreeMoveActor/index.js +5 -1
- 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 +320 -0
- package/utils/JsViewVueWidget/JsvInput/EditVisibleArea.ts +222 -0
- package/utils/JsViewVueWidget/JsvInput/JsvInput.vue +281 -681
- package/utils/JsViewVueWidget/JsvInput/SharedDefine.ts +17 -0
- package/utils/JsViewVueWidget/JsvInput/SystemTextTools.ts +47 -0
- package/utils/JsViewVueWidget/JsvLine/JsvLine.vue +2 -0
- package/utils/JsViewVueWidget/JsvMarquee.vue +2 -0
- package/utils/JsViewVueWidget/JsvMaskClipDiv.vue +2 -0
- 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 +18 -1
- package/utils/JsViewVueWidget/JsvPieChart.vue +2 -0
- package/utils/JsViewVueWidget/JsvPosterDiv.vue +2 -0
- package/utils/JsViewVueWidget/JsvPosterImage.vue +2 -0
- package/utils/JsViewVueWidget/JsvPreload/JsvPreload.vue +2 -0
- package/utils/JsViewVueWidget/JsvProgressBar.vue +2 -0
- package/utils/JsViewVueWidget/JsvQrcode/JsvQrcode.vue +10 -11
- 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 +266 -48
- package/utils/JsViewVueWidget/JsvScrollBox/JsvScrollFollow.vue +477 -0
- package/utils/JsViewVueWidget/JsvScrollBox/ScrollInnerSymbol.ts +9 -0
- package/utils/JsViewVueWidget/JsvScrollBox/ScrollSymbol.ts +13 -4
- package/utils/JsViewVueWidget/JsvScrollBox/index.ts +3 -0
- package/utils/JsViewVueWidget/JsvSector.vue +2 -0
- package/utils/JsViewVueWidget/JsvSoundPool.js +2 -0
- package/utils/JsViewVueWidget/JsvSpray/JsvSpray.vue +30 -13
- package/utils/JsViewVueWidget/JsvSpriteAnim/JsvSpriteAnim.vue +2 -0
- 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 +44 -41
- 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 +5 -0
- package/utils/JsViewEngineWidget/MetroWidget/Dispatcher.js +0 -19
- package/utils/JsViewVueTools/JsvTextTools.js +0 -89
- package/utils/JsViewVueWidget/JsvScrollBox/index.js +0 -2
|
@@ -16,6 +16,7 @@ interface ItemConfig {
|
|
|
16
16
|
normalZIndex: number,
|
|
17
17
|
itemSlide: number,
|
|
18
18
|
permanent: boolean,
|
|
19
|
+
showSkeleton: boolean,
|
|
19
20
|
}
|
|
20
21
|
|
|
21
22
|
interface CustomerCallbackMap {
|
|
@@ -38,6 +39,7 @@ export class RenderItem {
|
|
|
38
39
|
public touchInit: boolean = false;
|
|
39
40
|
public rootDiv: HTMLDivElement | null = null;
|
|
40
41
|
public enableTap: boolean = false;
|
|
42
|
+
public renderKey: Ref<number> = ref(0);
|
|
41
43
|
|
|
42
44
|
private customerCallbackMap: CustomerCallbackMap = {};
|
|
43
45
|
private onRef: (() => void) | null;
|
|
@@ -70,6 +72,14 @@ export class RenderItem {
|
|
|
70
72
|
return this.templateInfo.index;
|
|
71
73
|
}
|
|
72
74
|
|
|
75
|
+
public updateCustomData(newCustomData: object, newItemConfig: ItemConfig) {
|
|
76
|
+
this.customerData = newCustomData;
|
|
77
|
+
this.itemConfig = newItemConfig;
|
|
78
|
+
this.customerCallbackMap = {};
|
|
79
|
+
this.mounted.value = false;
|
|
80
|
+
this.renderKey.value++;
|
|
81
|
+
}
|
|
82
|
+
|
|
73
83
|
//TODO item的div ref 会调用多次, 待调查
|
|
74
84
|
public divRef = (ele: HTMLDivElement | null) => {
|
|
75
85
|
this.rootDiv = ele;
|
|
@@ -162,5 +172,6 @@ export class RenderItem {
|
|
|
162
172
|
private onDivUnmounted(): void {
|
|
163
173
|
this.touchInit = false;
|
|
164
174
|
this.divMountedCallback.clear();
|
|
175
|
+
this.customerCallbackMap = {};
|
|
165
176
|
}
|
|
166
177
|
}
|
|
@@ -211,4 +211,12 @@ export class TaskManager {
|
|
|
211
211
|
this.cancellableRunnerList.push(cancellableRunner);
|
|
212
212
|
cancellableRunner.run();
|
|
213
213
|
}
|
|
214
|
+
|
|
215
|
+
public cancelAllTask() {
|
|
216
|
+
this.cleanTaskCache();
|
|
217
|
+
this.cancellableRunnerList.forEach(t => {
|
|
218
|
+
t.cancel();
|
|
219
|
+
});
|
|
220
|
+
this.cancellableRunnerList = [];
|
|
221
|
+
}
|
|
214
222
|
}
|
|
@@ -794,18 +794,28 @@ class CommonMetroTemplate extends MetroTemplate {
|
|
|
794
794
|
endIndex = baseItem.index;
|
|
795
795
|
}
|
|
796
796
|
if (Math.abs(startIndex - endIndex) <= 1) {
|
|
797
|
-
const
|
|
798
|
-
|
|
799
|
-
if (
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
797
|
+
const startItem = this.templateList[startIndex];
|
|
798
|
+
const endItem = this.templateList[endIndex];
|
|
799
|
+
if (visible(startItem[posKey], startItem[posKey] + startItem[sizeKey])) {
|
|
800
|
+
baseItem = startItem;
|
|
801
|
+
break;
|
|
802
|
+
} else if (visible(endItem[posKey], endItem[posKey] + endItem[sizeKey])) {
|
|
803
|
+
baseItem = endItem;
|
|
804
|
+
break;
|
|
805
|
+
} else {
|
|
806
|
+
const tailItem = this.templateList[this.getTailItemIndex()];
|
|
807
|
+
let tailInfo: any = null;
|
|
808
|
+
if (tailItem) {
|
|
809
|
+
tailInfo = {
|
|
810
|
+
left: tailItem.left,
|
|
811
|
+
top: tailItem.top,
|
|
812
|
+
width: tailItem.width,
|
|
813
|
+
height: tailItem.height,
|
|
814
|
+
}
|
|
805
815
|
}
|
|
816
|
+
console.log("MetroWidget: can not find visible item", visibleStart, visibleEnd, tailInfo);
|
|
817
|
+
return [-1, -1];
|
|
806
818
|
}
|
|
807
|
-
console.log("MetroWidget: can not find visible item", visibleStart, visibleEnd, tailInfo);
|
|
808
|
-
return [-1, -1];
|
|
809
819
|
} else {
|
|
810
820
|
baseItem = this.templateList[Math.round((startIndex + endIndex) / 2)];
|
|
811
821
|
}
|
|
@@ -83,7 +83,7 @@ class ListMetroTemplate extends MetroTemplate {
|
|
|
83
83
|
hOffset: number, moveType: number): TemplateItem | null {
|
|
84
84
|
const item = this.getItemById(baseId) as any;
|
|
85
85
|
if (item) {
|
|
86
|
-
let neighborDirection:
|
|
86
|
+
let neighborDirection: "left" | "right" | "bottom" | "top" | null = null;
|
|
87
87
|
if (this.direction == VERTICAL) {
|
|
88
88
|
if (vOffset > 0) {
|
|
89
89
|
neighborDirection = "bottom";
|
|
@@ -97,16 +97,22 @@ class ListMetroTemplate extends MetroTemplate {
|
|
|
97
97
|
neighborDirection = "left";
|
|
98
98
|
}
|
|
99
99
|
}
|
|
100
|
-
if (
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
100
|
+
if (neighborDirection !== null) {
|
|
101
|
+
if (item.neighborIndexList[neighborDirection].length === 0) return null;
|
|
102
|
+
let target = this.getItemByIndex(item.neighborIndexList[neighborDirection][0]);
|
|
103
|
+
while (target) {
|
|
104
|
+
if (target.focusable) {
|
|
105
|
+
break;
|
|
106
|
+
} else {
|
|
107
|
+
if (target.neighborIndexList[neighborDirection].length > 0) {
|
|
108
|
+
target = this.getItemByIndex(target.neighborIndexList[neighborDirection][0]);
|
|
109
|
+
} else {
|
|
110
|
+
return null;
|
|
111
|
+
}
|
|
112
|
+
}
|
|
107
113
|
}
|
|
114
|
+
return target;
|
|
108
115
|
}
|
|
109
|
-
return target;
|
|
110
116
|
}
|
|
111
117
|
return null;
|
|
112
118
|
}
|
|
@@ -157,6 +163,23 @@ class ListMetroTemplate extends MetroTemplate {
|
|
|
157
163
|
return [start, end];
|
|
158
164
|
}
|
|
159
165
|
|
|
166
|
+
private cleanResizeChangeItem(i: TemplateItem) {
|
|
167
|
+
i.neighborIndexList.left = [];
|
|
168
|
+
i.neighborIndexList.top = [];
|
|
169
|
+
i.neighborIndexList.right = [];
|
|
170
|
+
i.neighborIndexList.bottom = [];
|
|
171
|
+
|
|
172
|
+
i.tmpNeighborIndexList.left = [];
|
|
173
|
+
i.tmpNeighborIndexList.top = [];
|
|
174
|
+
i.tmpNeighborIndexList.right = [];
|
|
175
|
+
i.tmpNeighborIndexList.bottom = [];
|
|
176
|
+
|
|
177
|
+
i.pathHistory.left = -1;
|
|
178
|
+
i.pathHistory.top = -1;
|
|
179
|
+
i.pathHistory.right = -1;
|
|
180
|
+
i.pathHistory.bottom = -1;
|
|
181
|
+
}
|
|
182
|
+
|
|
160
183
|
public updateItemSize(index: number, newSize: { width: number, height: number }): void {
|
|
161
184
|
const item = this.templateList[index];
|
|
162
185
|
if (!item || (item.width == newSize.width && item.height == newSize.height)) {
|
|
@@ -173,6 +196,7 @@ class ListMetroTemplate extends MetroTemplate {
|
|
|
173
196
|
}
|
|
174
197
|
//TODO 不是一次性加载全部, 可视区域外的懒惰加载
|
|
175
198
|
for (let i of needChangeList) {
|
|
199
|
+
this.cleanResizeChangeItem(i);
|
|
176
200
|
this._addTemplateItem(i);
|
|
177
201
|
i.layoutCache.cache({
|
|
178
202
|
left: i.left,
|
|
@@ -291,12 +291,12 @@ abstract class MetroTemplate {
|
|
|
291
291
|
if (this.direction == VERTICAL) {
|
|
292
292
|
return {
|
|
293
293
|
width: this.lineMax,
|
|
294
|
-
height: lastItem.height + lastItem.top - 1,
|
|
294
|
+
height: lastItem.height + lastItem.top - 1 + 1,
|
|
295
295
|
}
|
|
296
296
|
} else {
|
|
297
297
|
return {
|
|
298
298
|
height: this.lineMax,
|
|
299
|
-
width: lastItem.width + lastItem.left - 1,
|
|
299
|
+
width: lastItem.width + lastItem.left - 1 + 1,
|
|
300
300
|
}
|
|
301
301
|
}
|
|
302
302
|
} else {
|
|
@@ -55,6 +55,8 @@ class TemplateItemAdder {
|
|
|
55
55
|
}
|
|
56
56
|
|
|
57
57
|
public tryAddItem(cur_item: TemplateItem | null = null, page_num: number = 1) {
|
|
58
|
+
if (!this._Data || this._Data.length <= 0) { return; }
|
|
59
|
+
|
|
58
60
|
let added = false;
|
|
59
61
|
if (
|
|
60
62
|
this._CurIndex < this._Data.length &&
|
|
@@ -86,6 +88,8 @@ class TemplateItemAdder {
|
|
|
86
88
|
}
|
|
87
89
|
|
|
88
90
|
tryAddItemByPosition(position: number) {
|
|
91
|
+
if (!this._Data || this._Data.length <= 0) { return; }
|
|
92
|
+
|
|
89
93
|
const page_num = Math.ceil(position / this._PageRange + 1);
|
|
90
94
|
if (page_num > this._CurPage) {
|
|
91
95
|
this.tryAddItem(null, page_num - this._CurPage);
|
|
@@ -94,6 +98,7 @@ class TemplateItemAdder {
|
|
|
94
98
|
}
|
|
95
99
|
|
|
96
100
|
tryAddItemByIndex(index: number) {
|
|
101
|
+
if (!this._Data || this._Data.length <= 0) { return; }
|
|
97
102
|
let _index = Math.min(index, this._Data.length - 1);
|
|
98
103
|
let added = false;
|
|
99
104
|
while (this._CurIndex <= _index) {
|
|
@@ -121,6 +126,7 @@ class TemplateItemAdder {
|
|
|
121
126
|
}
|
|
122
127
|
|
|
123
128
|
tryAddItemById(id: number) {
|
|
129
|
+
if (!this._Data || this._Data.length <= 0) { return; }
|
|
124
130
|
let _id = Math.min(id, this._Data.length - 1); // id小于等于index, 因此为了避免过界取小值
|
|
125
131
|
const last_id = this._MetroTemplate.focusableSize - 1;
|
|
126
132
|
if (last_id < _id) {
|
|
@@ -153,6 +159,7 @@ class TemplateItemAdder {
|
|
|
153
159
|
}
|
|
154
160
|
|
|
155
161
|
tryAddItemByUid(uid: string) {
|
|
162
|
+
if (!this._Data || this._Data.length <= 0) { return; }
|
|
156
163
|
if (this._MetroTemplate.getItemByUid(uid)) {
|
|
157
164
|
//已经添加
|
|
158
165
|
return;
|
|
@@ -11,7 +11,7 @@ export * from "./MetroWidget/Dispatcher";
|
|
|
11
11
|
export { default as SimpleWidget } from "./MetroWidget/MetroWidget.vue";
|
|
12
12
|
export { default as MetroWidget } from "./MetroWidget/MetroWidget.vue";
|
|
13
13
|
export { default as ListWidget } from "./MetroWidget/ListWidget.vue";
|
|
14
|
-
export { METRO_WIDGET, METRO_WIDGET_CONST } from "./MetroWidget/Const
|
|
14
|
+
export { METRO_WIDGET, METRO_WIDGET_CONST } from "./MetroWidget/Const";
|
|
15
15
|
|
|
16
16
|
export { default as JsvFocusBlock } from "./JsvFocus/JsvFocusBlock.vue";
|
|
17
17
|
export { jsvCreateFocusManager, useFocusHub } from "./JsvFocus/JsvFocusManager";
|
|
@@ -11,7 +11,7 @@ import { ScreenLockManager } from "./ScreenLockManager.js";
|
|
|
11
11
|
|
|
12
12
|
let sPluginLoader = GetPluginLoader();
|
|
13
13
|
|
|
14
|
-
const TAG = "JsvAudio";
|
|
14
|
+
const TAG = "JsvAudio:";
|
|
15
15
|
|
|
16
16
|
let keyToken = 0;
|
|
17
17
|
const getKeyToken = () => {
|
|
@@ -77,6 +77,8 @@ class AudioProxy {
|
|
|
77
77
|
this._created = false;
|
|
78
78
|
this._eventListener = {};
|
|
79
79
|
this._propCache = {};
|
|
80
|
+
this._unloaded = false;
|
|
81
|
+
this._visibility = window.JsView?.getVisibility();
|
|
80
82
|
this._onVisibilityChange = this.onVisibilityChange.bind(this);
|
|
81
83
|
window.JsView?.onVisibilityChange(this._onVisibilityChange);
|
|
82
84
|
}
|
|
@@ -207,18 +209,33 @@ class AudioProxy {
|
|
|
207
209
|
|
|
208
210
|
/** control */
|
|
209
211
|
load() {
|
|
212
|
+
if (this._unloaded) {
|
|
213
|
+
console.warn(TAG, "Instead of calling load() after unload(), please update component's key to create a new JsvAudio.");
|
|
214
|
+
return;
|
|
215
|
+
}
|
|
210
216
|
this.setProperty("enablePlayer", true);
|
|
211
217
|
}
|
|
212
218
|
|
|
213
219
|
play() {
|
|
214
|
-
this.
|
|
220
|
+
if (this._visibility) {
|
|
221
|
+
this.setProperty("paused", false);
|
|
222
|
+
if (typeof this._propCache["customerPause"] !== "undefined") {
|
|
223
|
+
this._propCache["customerPause"] = false;
|
|
224
|
+
}
|
|
225
|
+
} else {
|
|
226
|
+
console.warn(TAG, "JsvAudio can not play when it is invisible.");
|
|
227
|
+
}
|
|
215
228
|
}
|
|
216
229
|
|
|
217
230
|
pause() {
|
|
218
231
|
this.setProperty("paused", true);
|
|
232
|
+
if (typeof this._propCache["customerPause"] !== "undefined") {
|
|
233
|
+
this._propCache["customerPause"] = true;
|
|
234
|
+
}
|
|
219
235
|
}
|
|
220
236
|
|
|
221
237
|
unload() {
|
|
238
|
+
this._unloaded = true;
|
|
222
239
|
this.pause();
|
|
223
240
|
this.setProperty("enablePlayer", false);
|
|
224
241
|
}
|
|
@@ -321,6 +338,7 @@ class AudioProxy {
|
|
|
321
338
|
onVisibilityChange(state) {
|
|
322
339
|
console.log(TAG, "audio visibility change", JSON.stringify(state));
|
|
323
340
|
if (state.status == "show") {
|
|
341
|
+
this._visibility = true;
|
|
324
342
|
if (typeof this._propCache["customerPause"] != "undefined") {
|
|
325
343
|
const customerPause = this._propCache["customerPause"];
|
|
326
344
|
delete this._propCache["customerPause"];
|
|
@@ -330,6 +348,7 @@ class AudioProxy {
|
|
|
330
348
|
}
|
|
331
349
|
} else {
|
|
332
350
|
// pause when invisible
|
|
351
|
+
this._visibility = false;
|
|
333
352
|
this._propCache["customerPause"] = this._propCache["paused"];
|
|
334
353
|
this.pause();
|
|
335
354
|
}
|
|
@@ -16,7 +16,7 @@ let PluginInfo = {
|
|
|
16
16
|
listener: "top.JsvAudioPluginLoadResult", //插件加载结果回调
|
|
17
17
|
listener2: "top.JsvAudioPluginStatus",
|
|
18
18
|
// debug:true,
|
|
19
|
-
|
|
19
|
+
md5: "5ab9bfbec33034a6a26df7c1187b3c8f"
|
|
20
20
|
};
|
|
21
21
|
|
|
22
22
|
// 不要用export default,update-env脚本不能解析
|
|
@@ -16,7 +16,7 @@ let PluginInfo = {
|
|
|
16
16
|
listener: "top.JsvAudioPluginLoadResult", //插件加载结果回调
|
|
17
17
|
listener2: "top.JsvAudioPluginStatus",
|
|
18
18
|
// debug:true,
|
|
19
|
-
|
|
19
|
+
md5: "5ab9bfbec33034a6a26df7c1187b3c8f" // 插件的md5, 此信息是内网场景回使用,一定要对齐md5
|
|
20
20
|
};
|
|
21
21
|
|
|
22
22
|
// 不要用export default,update-env脚本不能解析
|
|
@@ -2,10 +2,18 @@ export const getHtmlStr = (libPath, latexStr, fontSize, width, height, color) =>
|
|
|
2
2
|
return (
|
|
3
3
|
`<html>
|
|
4
4
|
<head>
|
|
5
|
+
<style>
|
|
6
|
+
mjx-container[display="true"] {
|
|
7
|
+
margin: 0 0 !important;
|
|
8
|
+
}
|
|
9
|
+
body {
|
|
10
|
+
margin: 0 !important;
|
|
11
|
+
}
|
|
12
|
+
</style>
|
|
5
13
|
<script type="text/javascript">
|
|
6
14
|
MathJax = {
|
|
7
15
|
tex: {
|
|
8
|
-
inlineMath: [['$', '$'], ['
|
|
16
|
+
inlineMath: [['$', '$'], ['\\\\(', '\\\\)']]
|
|
9
17
|
},
|
|
10
18
|
svg: {
|
|
11
19
|
fontCache: 'global'
|
|
@@ -16,13 +24,15 @@ export const getHtmlStr = (libPath, latexStr, fontSize, width, height, color) =>
|
|
|
16
24
|
divElement.style.display = "inline-block";
|
|
17
25
|
divElement.style.fontSize = "${fontSize}px";
|
|
18
26
|
divElement.style.color = "${color}";
|
|
19
|
-
divElement.innerHTML = String.raw
|
|
27
|
+
divElement.innerHTML = String.raw\`${latexStr}\`;
|
|
28
|
+
//divElement.style.width = ${width} + "px";
|
|
20
29
|
document.body.appendChild(divElement);
|
|
21
30
|
|
|
22
31
|
MathJax.typesetPromise().then(() => {
|
|
23
32
|
// modify the DOM here
|
|
24
33
|
let formulaMetrics = MathJax.getMetricsFor(divElement, true);
|
|
25
|
-
let
|
|
34
|
+
let w = Math.min(${width}, divElement.clientWidth);
|
|
35
|
+
let scale = w / divElement.clientWidth;
|
|
26
36
|
divElement.style.fontSize = Math.floor(scale * ${fontSize}) + "px";
|
|
27
37
|
MathJax.typeset();
|
|
28
38
|
}).catch((err) => console.error(err.message));
|
|
@@ -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
|
}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
|
|
2
|
-
export const VERTICAL
|
|
3
|
-
export const HORIZONTAL
|
|
2
|
+
export const VERTICAL = Symbol("vertical");
|
|
3
|
+
export const HORIZONTAL = Symbol("horizontal");
|
|
@@ -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;
|