@shijiu/jsview-vue 2.2.373 → 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.
Files changed (308) hide show
  1. package/bin/jsview-vue.mjs +333 -487
  2. package/bin/types/{JsViewEngineWidget → utils/JsViewEngineWidget}/CheckType.d.ts +0 -4
  3. package/bin/types/{JsViewEngineWidget → utils/JsViewEngineWidget}/JsvFocus/JsvFocusBlock.vue.d.ts +0 -34
  4. package/bin/types/{JsViewEngineWidget → utils/JsViewEngineWidget}/JsvFocus/JsvFocusHub.d.ts +0 -4
  5. package/bin/types/utils/JsViewEngineWidget/JsvFocus/JsvFocusManager.d.ts +12 -0
  6. package/bin/types/{JsViewEngineWidget → utils/JsViewEngineWidget}/MetroWidget/Const.d.ts +0 -4
  7. package/bin/types/{JsViewEngineWidget → utils/JsViewEngineWidget}/MetroWidget/Dispatcher.d.ts +0 -4
  8. package/bin/types/{JsViewEngineWidget → utils/JsViewEngineWidget}/MetroWidget/ListWidget.vue.d.ts +0 -8
  9. package/bin/types/utils/JsViewEngineWidget/MetroWidget/MetroWidget.vue.d.ts +161 -0
  10. package/bin/types/{JsViewEngineWidget → utils/JsViewEngineWidget}/MetroWidget/MetroWidgetSetup.d.ts +0 -4
  11. package/bin/types/{JsViewEngineWidget → utils/JsViewEngineWidget}/MetroWidget/PageUpdater.d.ts +0 -4
  12. package/bin/types/{JsViewEngineWidget → utils/JsViewEngineWidget}/MetroWidget/RenderItem.d.ts +0 -4
  13. package/bin/types/{JsViewEngineWidget → utils/JsViewEngineWidget}/MetroWidget/Slide.d.ts +0 -4
  14. package/bin/types/{JsViewEngineWidget → utils/JsViewEngineWidget}/MetroWidget/SlotComponent.vue.d.ts +0 -4
  15. package/bin/types/utils/JsViewEngineWidget/MetroWidget/TaskManager.d.ts +64 -0
  16. package/bin/types/utils/JsViewEngineWidget/MetroWidget/TokenGenerator.d.ts +4 -0
  17. package/bin/types/{JsViewEngineWidget → utils/JsViewEngineWidget}/MetroWidget/VisibleInfo.d.ts +0 -4
  18. package/bin/types/{JsViewEngineWidget → utils/JsViewEngineWidget}/MetroWidget/WidgetRectInfo.d.ts +0 -4
  19. package/bin/types/{JsViewEngineWidget → utils/JsViewEngineWidget}/RangeModel.d.ts +0 -4
  20. package/bin/types/utils/JsViewEngineWidget/RectUtils.d.ts +61 -0
  21. package/bin/types/{JsViewEngineWidget → utils/JsViewEngineWidget}/TemplateParser/CommonMetroTemplate.d.ts +0 -4
  22. package/bin/types/{JsViewEngineWidget → utils/JsViewEngineWidget}/TemplateParser/Fence.d.ts +2 -6
  23. package/bin/types/{JsViewEngineWidget → utils/JsViewEngineWidget}/TemplateParser/ListMetroTemplate.d.ts +0 -4
  24. package/bin/types/{JsViewEngineWidget → utils/JsViewEngineWidget}/TemplateParser/MetroTemplate.d.ts +3 -7
  25. package/bin/types/{JsViewEngineWidget → utils/JsViewEngineWidget}/TemplateParser/TemplateItemAdder.d.ts +0 -4
  26. package/bin/types/{JsViewEngineWidget → utils/JsViewEngineWidget}/TemplateParser/index.d.ts +0 -4
  27. package/bin/types/{JsViewEngineWidget → utils/JsViewEngineWidget}/WidgetCommon.d.ts +0 -4
  28. package/bin/types/{JsViewEngineWidget → utils/JsViewEngineWidget}/index.d.ts +0 -4
  29. package/bin/types/{JsViewPlugin → utils/JsViewPlugin}/JsvAccount/JsvAccount.d.ts +0 -4
  30. package/bin/types/utils/JsViewPlugin/JsvAudio/AudioProxy.d.ts +2 -0
  31. package/bin/types/{JsViewPlugin → utils/JsViewPlugin}/JsvAudio/BrowserAudio/BrowserAudio.vue.d.ts +0 -4
  32. package/bin/types/{JsViewPlugin → utils/JsViewPlugin}/JsvAudio/BrowserAudio/JsvSystemAudio.vue.d.ts +4 -8
  33. package/bin/types/{JsViewPlugin → utils/JsViewPlugin}/JsvAudio/CheckType.d.ts +0 -4
  34. package/bin/types/{JsViewPlugin → utils/JsViewPlugin}/JsvAudio/Events.d.ts +0 -4
  35. package/bin/types/{JsViewPlugin → utils/JsViewPlugin}/JsvAudio/JsvAudio.vue.d.ts +4 -8
  36. package/bin/types/{JsViewPlugin → utils/JsViewPlugin}/JsvAudio/JsvAudioBridgeProxy.d.ts +0 -4
  37. package/bin/types/{JsViewPlugin → utils/JsViewPlugin}/JsvAudio/JsvAudioProxy.vue.d.ts +0 -4
  38. package/bin/types/utils/JsViewPlugin/JsvAudio/PluginLoader.d.ts +1 -0
  39. package/bin/types/{JsViewPlugin → utils/JsViewPlugin}/JsvAudio/ScreenLockManager.d.ts +0 -4
  40. package/bin/types/{JsViewPlugin → utils/JsViewPlugin}/JsvAudio/index.d.ts +0 -4
  41. package/bin/types/utils/JsViewPlugin/JsvAudio/version.d.mts +13 -0
  42. package/bin/types/{JsViewPlugin/JsvLatex → utils/JsViewPlugin/JsvAudio}/version.d.ts +0 -4
  43. package/bin/types/{JsViewPlugin → utils/JsViewPlugin}/JsvLatex/BrowserDomBuilder.d.ts +0 -4
  44. package/bin/types/{JsViewPlugin → utils/JsViewPlugin}/JsvLatex/BrowserJsvLatex.vue.d.ts +4 -8
  45. package/bin/types/utils/JsViewPlugin/JsvLatex/Color.d.ts +1 -0
  46. package/bin/types/{JsViewPlugin → utils/JsViewPlugin}/JsvLatex/JsvLatex.vue.d.ts +4 -28
  47. package/bin/types/utils/JsViewPlugin/JsvLatex/JsvLatexBridgeProxy.d.ts +3 -0
  48. package/bin/types/{JsViewPlugin → utils/JsViewPlugin}/JsvLatex/JsvLatexProxy.vue.d.ts +0 -4
  49. package/bin/types/utils/JsViewPlugin/JsvLatex/PluginLoader.d.ts +1 -0
  50. package/bin/types/{JsViewPlugin → utils/JsViewPlugin}/JsvLatex/index.d.ts +0 -4
  51. package/bin/types/utils/JsViewPlugin/JsvLatex/version.d.mts +13 -0
  52. package/bin/types/{JsViewPlugin/JsvAudio → utils/JsViewPlugin/JsvLatex}/version.d.ts +0 -5
  53. package/bin/types/utils/JsViewPlugin/JsvPlayer/BrowserJsvPlayer-0.9.vue.d.ts +45 -0
  54. package/bin/types/utils/JsViewPlugin/JsvPlayer/BrowserJsvPlayer.vue.d.ts +597 -0
  55. package/bin/types/utils/JsViewPlugin/JsvPlayer/GetVersion.d.ts +13 -0
  56. package/bin/types/utils/JsViewPlugin/JsvPlayer/JsvMedia.d.ts +420 -0
  57. package/bin/types/utils/JsViewPlugin/JsvPlayer/JsvMediaBrowserInterface.d.ts +57 -0
  58. package/bin/types/utils/JsViewPlugin/JsvPlayer/JsvPlayer.vue.d.ts +588 -0
  59. package/bin/types/utils/JsViewPlugin/JsvPlayer/index-0.9.d.ts +358 -0
  60. package/bin/types/utils/JsViewPlugin/JsvPlayer/index.d.ts +358 -0
  61. package/bin/types/utils/JsViewPlugin/JsvPlayer/version.d.mts +14 -0
  62. package/bin/types/{JsViewPlugin → utils/JsViewPlugin}/index.d.ts +0 -4
  63. package/bin/types/{JsViewVueTools → utils/JsViewVueTools}/ConstSymbol.d.ts +0 -4
  64. package/bin/types/{JsViewVueTools → utils/JsViewVueTools}/DebugContentShellJBridge.d.ts +0 -4
  65. package/bin/types/{JsViewVueTools → utils/JsViewVueTools}/DebugTool.d.ts +0 -4
  66. package/bin/types/{JsViewVueTools → utils/JsViewVueTools}/DefaultKeyMap.d.ts +0 -4
  67. package/bin/types/{JsViewVueTools → utils/JsViewVueTools}/FeatureActive.d.ts +0 -4
  68. package/bin/types/{JsViewVueTools → utils/JsViewVueTools}/ForgeConstDefine.d.ts +0 -4
  69. package/bin/types/{JsViewVueTools → utils/JsViewVueTools}/ForgeHandles.d.ts +0 -4
  70. package/bin/types/{JsViewVueTools → utils/JsViewVueTools}/JsvDemoTester.d.ts +0 -4
  71. package/bin/types/{JsViewVueTools → utils/JsViewVueTools}/JsvDynamicCssStyle.d.ts +0 -17
  72. package/bin/types/{JsViewVueTools → utils/JsViewVueTools}/JsvDynamicKeyFrames.d.ts +0 -17
  73. package/bin/types/{JsViewVueTools → utils/JsViewVueTools}/JsvFederationTools.d.ts +0 -4
  74. package/bin/types/{JsViewVueTools → utils/JsViewVueTools}/JsvHashHistory.d.ts +0 -4
  75. package/bin/types/{JsViewVueTools → utils/JsViewVueTools}/JsvImpactTracer.d.ts +0 -4
  76. package/bin/types/{JsViewVueTools → utils/JsViewVueTools}/JsvPerformance.d.ts +0 -4
  77. package/bin/types/{JsViewVueTools → utils/JsViewVueTools}/JsvPreDownloader.d.ts +0 -21
  78. package/bin/types/{JsViewVueTools → utils/JsViewVueTools}/JsvRefTaker.d.ts +0 -26
  79. package/bin/types/{JsViewVueTools → utils/JsViewVueTools}/JsvRuntimeBridge.d.ts +0 -8
  80. package/bin/types/{JsViewVueTools → utils/JsViewVueTools}/JsvStyleClass.d.ts +0 -4
  81. package/bin/types/{JsViewVueTools → utils/JsViewVueTools}/JsvStyleSheetsDeclarer.d.ts +0 -18
  82. package/bin/types/utils/JsViewVueTools/JsvTextTools.d.ts +61 -0
  83. package/bin/types/{JsViewVueTools → utils/JsViewVueTools}/JsvTextureDefines.d.ts +0 -4
  84. package/bin/types/{JsViewVueTools → utils/JsViewVueTools}/JsvTextureLoadTool.d.ts +0 -4
  85. package/bin/types/{JsViewVueTools → utils/JsViewVueTools}/JsvTextureStore/CanvasTexture/CanvasTexture.d.ts +0 -4
  86. package/bin/types/{JsViewVueTools → utils/JsViewVueTools}/JsvTextureStore/CanvasTexture/CommandList.d.ts +0 -4
  87. package/bin/types/{JsViewVueTools → utils/JsViewVueTools}/JsvTextureStore/CanvasTexture/Path.d.ts +0 -4
  88. package/bin/types/{JsViewVueTools → utils/JsViewVueTools}/JsvTextureStore/CapturedTexture/CapturedTexture.d.ts +0 -4
  89. package/bin/types/{JsViewVueTools → utils/JsViewVueTools}/JsvTextureStore/JsvTextureStore.d.ts +0 -22
  90. package/bin/types/{JsViewVueTools → utils/JsViewVueTools}/JsvTextureStore/Store.d.ts +0 -4
  91. package/bin/types/{JsViewVueTools → utils/JsViewVueTools}/JsvTextureStore/Texture.d.ts +0 -4
  92. package/bin/types/{JsViewVueTools → utils/JsViewVueTools}/NinePatchHelper.d.ts +0 -4
  93. package/bin/types/{JsViewVueTools → utils/JsViewVueTools}/TextureManagerTools.d.ts +0 -4
  94. package/bin/types/utils/JsViewVueTools/TypeCheckAndSet.d.ts +3 -0
  95. package/bin/types/{JsViewVueTools → utils/JsViewVueTools}/index.d.ts +0 -5
  96. package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvActorMove/ActorControlBase.d.ts +0 -4
  97. package/bin/types/utils/JsViewVueWidget/JsvActorMove/JsvActorMove.vue.d.ts +64 -0
  98. package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvActorMove/JsvActorMoveControl.d.ts +0 -4
  99. package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvActorMove/index.d.ts +0 -4
  100. package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvApic/JsvApic/BrowserApic.vue.d.ts +1 -5
  101. package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvApic/JsvApic/JsvApic.vue.d.ts +0 -20
  102. package/bin/types/utils/JsViewVueWidget/JsvApic/JsvApic/index.d.ts +2 -0
  103. package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvApic/JsvApic2/BrowserApic2.vue.d.ts +1 -5
  104. package/bin/types/utils/JsViewVueWidget/JsvApic/JsvApic2/JsvApic2.vue.d.ts +23 -0
  105. package/bin/types/utils/JsViewVueWidget/JsvApic/JsvApic2/index.d.ts +2 -0
  106. package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvApic/JsvBrowserApicLib/ApicDataBase.d.ts +0 -4
  107. package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvApic/JsvBrowserApicLib/BrowserApicLib.d.ts +0 -4
  108. package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvApic/JsvBrowserApicLib/GifData.d.ts +0 -4
  109. package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvApic/JsvBrowserApicLib/NormalLoopTool.d.ts +0 -4
  110. package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvApic/JsvBrowserApicLib/PartLoopTool.d.ts +0 -4
  111. package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvApic/JsvBrowserApicLib/SingleLoopTool.d.ts +0 -4
  112. package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvApic/JsvBrowserApicLib/Viewer.d.ts +0 -4
  113. package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvApic/JsvBrowserApicLib/WebpData.d.ts +0 -4
  114. package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvApic/JsvCommonLoopToolBase.d.ts +0 -4
  115. package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvClipDiv/JsvClipDiv.vue.d.ts +0 -4
  116. package/bin/types/utils/JsViewVueWidget/JsvClipDiv/index.d.ts +1 -0
  117. package/bin/types/utils/JsViewVueWidget/JsvConnectLine/ArcLineManager.d.ts +1 -0
  118. package/bin/types/utils/JsViewVueWidget/JsvConnectLine/JsvConnectLine.vue.d.ts +13 -0
  119. package/bin/types/utils/JsViewVueWidget/JsvConnectLine/index.d.ts +2 -0
  120. package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvDragBox/JsvDragBox.vue.d.ts +0 -25
  121. package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvDriftScope/JsvDriftScope.vue.d.ts +0 -4
  122. package/bin/types/utils/JsViewVueWidget/JsvDriftScope/index.d.ts +1 -0
  123. package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvEnableRenderBreak.vue.d.ts +0 -4
  124. package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvFilterView.vue.d.ts +3 -22
  125. package/bin/types/utils/JsViewVueWidget/JsvFlexCell/JsvFlexDiv.vue.d.ts +72 -0
  126. package/bin/types/utils/JsViewVueWidget/JsvFlexCell/JsvScreenFlex.vue.d.ts +75 -0
  127. package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvFlexCell/index.d.ts +0 -4
  128. package/bin/types/{JsViewVueWidget/JsvFragShaderView/BrowserJsvFragShaderView.vue.d.ts → utils/JsViewVueWidget/JsvFragShaderView/JsvFragShaderView.vue.d.ts} +1 -5
  129. package/bin/types/utils/JsViewVueWidget/JsvFragShaderView/index.d.ts +1 -0
  130. package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvFreeMoveActor/ActorControl.d.ts +0 -4
  131. package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvFreeMoveActor/CallbackManager.d.ts +0 -4
  132. package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvFreeMoveActor/ForgeTypeDefine.d.ts +0 -4
  133. package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvFreeMoveActor/FreeMoveActor.vue.d.ts +9 -34
  134. package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvFreeMoveActor/JsvEnvBlocker.vue.d.ts +3 -25
  135. package/bin/types/utils/JsViewVueWidget/JsvFreeMoveActor/KeepFlags.d.ts +7 -0
  136. package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvFreeMoveActor/NexusNode.d.ts +0 -4
  137. package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvFreeMoveActor/SetAction.d.ts +0 -4
  138. package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvFreeMoveActor/SetCondition.d.ts +0 -4
  139. package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvFreeMoveActor/SetState.d.ts +0 -4
  140. package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvFreeMoveActor/SyncLinkManager.d.ts +0 -4
  141. package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvFreeMoveActor/index.d.ts +0 -4
  142. package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvGrid.vue.d.ts +0 -73
  143. package/bin/types/utils/JsViewVueWidget/JsvHole.d.ts +2 -0
  144. package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvInput/Cursor.vue.d.ts +1 -5
  145. package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvInput/EditViewOperator.d.ts +2 -5
  146. package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvInput/EditVisibleArea.d.ts +4 -5
  147. package/bin/types/utils/JsViewVueWidget/JsvInput/JsvInput.vue.d.ts +12 -0
  148. package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvInput/SharedDefine.d.ts +0 -4
  149. package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvInput/SystemTextTools.d.ts +7 -5
  150. package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvInput/index.d.ts +0 -4
  151. package/bin/types/utils/JsViewVueWidget/JsvLine/JsvLine.vue.d.ts +12 -0
  152. package/bin/types/utils/JsViewVueWidget/JsvLine/LineManager.d.ts +1 -0
  153. package/bin/types/utils/JsViewVueWidget/JsvLine/index.d.ts +2 -0
  154. package/bin/types/utils/JsViewVueWidget/JsvMarquee.vue.d.ts +12 -0
  155. package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvMaskClipDiv.vue.d.ts +0 -22
  156. package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvMindMap/Constant.d.ts +0 -4
  157. package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvMindMap/DataTree.d.ts +0 -4
  158. package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvMindMap/Geometry.d.ts +2 -6
  159. package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvMindMap/JsvMindMap.vue.d.ts +9 -92
  160. package/bin/types/utils/JsViewVueWidget/JsvMindMap/index.d.ts +1 -0
  161. package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvMindMap/rtree.d.ts +0 -4
  162. package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvNativeSharedDiv.vue.d.ts +0 -18
  163. package/bin/types/utils/JsViewVueWidget/JsvNinePatch.vue.d.ts +21 -0
  164. package/bin/types/utils/JsViewVueWidget/JsvPieChart.vue.d.ts +9 -0
  165. package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvPosterDiv.vue.d.ts +0 -17
  166. package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvPosterImage.vue.d.ts +0 -18
  167. package/bin/types/utils/JsViewVueWidget/JsvPreload/JsvPreload.vue.d.ts +25 -0
  168. package/bin/types/utils/JsViewVueWidget/JsvPreload/index.d.ts +2 -0
  169. package/bin/types/utils/JsViewVueWidget/JsvProgressBar.vue.d.ts +12 -0
  170. package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvQrcode/JsvQrcode.vue.d.ts +1 -26
  171. package/bin/types/utils/JsViewVueWidget/JsvRadarChart.vue.d.ts +13 -0
  172. package/bin/types/utils/JsViewVueWidget/JsvRipple/Constant.d.ts +4 -0
  173. package/bin/types/utils/JsViewVueWidget/JsvRipple/JsvRipple.vue.d.ts +84 -0
  174. package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvRipple/index.d.ts +0 -4
  175. package/bin/types/utils/JsViewVueWidget/JsvScaleTextBox.vue.d.ts +10 -0
  176. package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvScrollBox/JsvScrollBox.vue.d.ts +0 -4
  177. package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvScrollBox/JsvScrollFollow.vue.d.ts +0 -4
  178. package/bin/types/utils/JsViewVueWidget/JsvScrollBox/ScrollInnerSymbol.d.ts +4 -0
  179. package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvScrollBox/ScrollSymbol.d.ts +0 -4
  180. package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvScrollBox/index.d.ts +0 -4
  181. package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvSector.vue.d.ts +0 -18
  182. package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvSoundPool.d.ts +0 -42
  183. package/bin/types/utils/JsViewVueWidget/JsvSpray/JsvSpray.vue.d.ts +38 -0
  184. package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvSpriteAnim/FrameBuidler.d.ts +0 -4
  185. package/bin/types/utils/JsViewVueWidget/JsvSpriteAnim/JsvSpriteAnim.vue.d.ts +18 -0
  186. package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvSpriteAnim/JsvSpriteLoader.vue.d.ts +0 -16
  187. package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvSpriteAnim/JsvSpriteTools.d.ts +0 -4
  188. package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvSpriteAnim/SpriteController.d.ts +0 -4
  189. package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvSpriteAnim/index.d.ts +0 -4
  190. package/bin/types/utils/JsViewVueWidget/JsvSpriteAnim/sAnimationToken.d.ts +2 -0
  191. package/bin/types/utils/JsViewVueWidget/JsvSwiper/Indicator.vue.d.ts +16 -0
  192. package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvSwiper/JsvSwiper.vue.d.ts +1 -40
  193. package/bin/types/utils/JsViewVueWidget/JsvSwiper/index.d.ts +2 -0
  194. package/bin/types/utils/JsViewVueWidget/JsvSwiper3D/Indicator.vue.d.ts +16 -0
  195. package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvSwiper3D/JsvSwiper.vue.d.ts +3 -27
  196. package/bin/types/utils/JsViewVueWidget/JsvSwiper3D/index.d.ts +2 -0
  197. package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvTextBox.vue.d.ts +0 -26
  198. package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvTextureAnim/CommonType.d.ts +0 -4
  199. package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvTextureAnim/JsvTextureAnim.vue.d.ts +2 -7
  200. package/bin/types/utils/JsViewVueWidget/JsvTextureAnim/index.d.ts +4 -0
  201. package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvTouchModeSwitcher.vue.d.ts +3 -28
  202. package/bin/types/utils/JsViewVueWidget/JsvVideo.vue.d.ts +23 -0
  203. package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvVisibleSensor/JsvVisibleSensor.vue.d.ts +6 -31
  204. package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvVisibleSensor/index.d.ts +6 -10
  205. package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/index.d.ts +2 -6
  206. package/bin/types/{index.d.ts → utils/index.d.ts} +0 -4
  207. package/index.d.ts +2 -2
  208. package/package.json +1 -1
  209. package/tools/jsview-vue-build.mjs +3 -2
  210. package/tsconfig.json +27 -0
  211. package/utils/JsViewEngineWidget/JsvFocus/JsvFocusManager.ts +3 -22
  212. package/utils/JsViewEngineWidget/MetroWidget/MetroWidgetSetup.js +19 -33
  213. package/utils/JsViewEngineWidget/MetroWidget/TaskManager.ts +1 -1
  214. package/utils/JsViewEngineWidget/TemplateParser/Fence.ts +2 -2
  215. package/utils/JsViewEngineWidget/TemplateParser/MetroTemplate.ts +2 -4
  216. package/utils/JsViewPlugin/JsvAudio/version.js +1 -1
  217. package/utils/JsViewPlugin/JsvAudio/version.mjs +1 -1
  218. package/utils/JsViewVueTools/JsvHashHistory.js +26 -29
  219. package/utils/JsViewVueTools/JsvRuntimeBridge.js +70 -70
  220. package/utils/JsViewVueTools/JsvTextTools.ts +63 -130
  221. package/utils/JsViewVueTools/TypeCheckAndSet.ts +66 -0
  222. package/utils/JsViewVueTools/index.js +1 -1
  223. package/utils/JsViewVueWidget/JsvFlexCell/JsvScreenFlex.vue +9 -14
  224. package/utils/JsViewVueWidget/JsvFragShaderView/JsvFragShaderView.vue +4 -1
  225. package/utils/JsViewVueWidget/JsvFragShaderView/index.js +2 -9
  226. package/utils/JsViewVueWidget/JsvInput/EditViewOperator.ts +47 -14
  227. package/utils/JsViewVueWidget/JsvInput/EditVisibleArea.ts +43 -10
  228. package/utils/JsViewVueWidget/JsvInput/JsvInput.vue +22 -9
  229. package/utils/JsViewVueWidget/JsvInput/SystemTextTools.ts +41 -27
  230. package/utils/JsViewVueWidget/JsvMaskClipDiv.vue +3 -48
  231. package/utils/JsViewVueWidget/JsvPosterImage.vue +1 -2
  232. package/utils/JsViewVueWidget/JsvPreload/JsvPreload.vue +21 -44
  233. package/utils/JsViewVueWidget/JsvPreload/index.js +2 -13
  234. package/utils/JsViewVueWidget/JsvQrcode/JsvQrcode.vue +2 -1
  235. package/utils/JsViewVueWidget/JsvSoundPool.js +3 -7
  236. package/utils/JsViewVueWidget/JsvSpray/JsvSpray.vue +17 -14
  237. package/utils/JsViewVueWidget/JsvSpriteAnim/JsvSpriteAnim.vue +0 -5
  238. package/utils/JsViewVueWidget/JsvTextureAnim/JsvTextureAnim.vue +70 -75
  239. package/utils/JsViewVueWidget/JsvTextureAnim/index.js +2 -9
  240. package/utils/JsViewVueWidget/index.js +2 -2
  241. package/bin/browser/BrowserJsvFragShaderView.vue.mjs +0 -79
  242. package/bin/browser/BrowserPreload.vue.mjs +0 -139
  243. package/bin/browser/BrowserQrcode.vue.mjs +0 -176
  244. package/bin/browser/BrowserSpray.vue.mjs +0 -56
  245. package/bin/browser/BrowserTextureAnim.vue.mjs +0 -322
  246. package/bin/types/JsViewEngineWidget/JsvFocus/JsvFocusManager.d.ts +0 -25
  247. package/bin/types/JsViewEngineWidget/MetroWidget/MetroWidget.vue.d.ts +0 -435
  248. package/bin/types/JsViewPlugin/JsvAudio/AudioProxy.d.ts +0 -6
  249. package/bin/types/JsViewPlugin/JsvAudio/PluginLoader.d.ts +0 -5
  250. package/bin/types/JsViewPlugin/JsvLatex/Color.d.ts +0 -5
  251. package/bin/types/JsViewPlugin/JsvLatex/JsvLatexBridgeProxy.d.ts +0 -7
  252. package/bin/types/JsViewPlugin/JsvLatex/PluginLoader.d.ts +0 -5
  253. package/bin/types/JsViewVueTools/JsvTextTools.d.ts +0 -95
  254. package/bin/types/JsViewVueTools/TypeCheckAndSet.d.ts +0 -6
  255. package/bin/types/JsViewVueWidget/JsvActorMove/JsvActorMove.vue.d.ts +0 -102
  256. package/bin/types/JsViewVueWidget/JsvApic/JsvApic/index.d.ts +0 -6
  257. package/bin/types/JsViewVueWidget/JsvApic/JsvApic2/JsvApic2.vue.d.ts +0 -51
  258. package/bin/types/JsViewVueWidget/JsvApic/JsvApic2/index.d.ts +0 -6
  259. package/bin/types/JsViewVueWidget/JsvClipDiv/index.d.ts +0 -5
  260. package/bin/types/JsViewVueWidget/JsvConnectLine/ArcLineManager.d.ts +0 -5
  261. package/bin/types/JsViewVueWidget/JsvConnectLine/JsvConnectLine.vue.d.ts +0 -34
  262. package/bin/types/JsViewVueWidget/JsvConnectLine/index.d.ts +0 -6
  263. package/bin/types/JsViewVueWidget/JsvDriftScope/index.d.ts +0 -5
  264. package/bin/types/JsViewVueWidget/JsvFlexCell/JsvFlexDiv.vue.d.ts +0 -106
  265. package/bin/types/JsViewVueWidget/JsvFlexCell/JsvScreenFlex.vue.d.ts +0 -106
  266. package/bin/types/JsViewVueWidget/JsvFragShaderView/JsvFragShaderView.vue.d.ts +0 -60
  267. package/bin/types/JsViewVueWidget/JsvFragShaderView/index.d.ts +0 -6
  268. package/bin/types/JsViewVueWidget/JsvHole.d.ts +0 -19
  269. package/bin/types/JsViewVueWidget/JsvInput/JsvInput.vue.d.ts +0 -65
  270. package/bin/types/JsViewVueWidget/JsvLine/JsvLine.vue.d.ts +0 -32
  271. package/bin/types/JsViewVueWidget/JsvLine/LineManager.d.ts +0 -5
  272. package/bin/types/JsViewVueWidget/JsvLine/index.d.ts +0 -6
  273. package/bin/types/JsViewVueWidget/JsvMarquee.vue.d.ts +0 -33
  274. package/bin/types/JsViewVueWidget/JsvMindMap/index.d.ts +0 -5
  275. package/bin/types/JsViewVueWidget/JsvNinePatch.vue.d.ts +0 -50
  276. package/bin/types/JsViewVueWidget/JsvPieChart.vue.d.ts +0 -26
  277. package/bin/types/JsViewVueWidget/JsvPreload/BrowserPreload.vue.d.ts +0 -14
  278. package/bin/types/JsViewVueWidget/JsvPreload/JsvPreload.vue.d.ts +0 -67
  279. package/bin/types/JsViewVueWidget/JsvPreload/index.d.ts +0 -21
  280. package/bin/types/JsViewVueWidget/JsvProgressBar.vue.d.ts +0 -31
  281. package/bin/types/JsViewVueWidget/JsvQrcode/BrowserQrcode.vue.d.ts +0 -15
  282. package/bin/types/JsViewVueWidget/JsvQrcode/index.d.ts +0 -6
  283. package/bin/types/JsViewVueWidget/JsvRadarChart.vue.d.ts +0 -37
  284. package/bin/types/JsViewVueWidget/JsvRipple/Constant.d.ts +0 -8
  285. package/bin/types/JsViewVueWidget/JsvRipple/JsvRipple.vue.d.ts +0 -129
  286. package/bin/types/JsViewVueWidget/JsvScaleTextBox.vue.d.ts +0 -28
  287. package/bin/types/JsViewVueWidget/JsvScrollBox/ScrollInnerSymbol.d.ts +0 -8
  288. package/bin/types/JsViewVueWidget/JsvSpray/BrowserSpray.vue.d.ts +0 -29
  289. package/bin/types/JsViewVueWidget/JsvSpray/JsvSpray.vue.d.ts +0 -78
  290. package/bin/types/JsViewVueWidget/JsvSpray/index.d.ts +0 -6
  291. package/bin/types/JsViewVueWidget/JsvSpriteAnim/JsvSpriteAnim.vue.d.ts +0 -70
  292. package/bin/types/JsViewVueWidget/JsvSpriteAnim/sAnimationToken.d.ts +0 -6
  293. package/bin/types/JsViewVueWidget/JsvSwiper/index.d.ts +0 -6
  294. package/bin/types/JsViewVueWidget/JsvSwiper3D/index.d.ts +0 -6
  295. package/bin/types/JsViewVueWidget/JsvTextureAnim/BrowserTextureAnim.vue.d.ts +0 -155
  296. package/bin/types/JsViewVueWidget/JsvTextureAnim/index.d.ts +0 -18
  297. package/tools/config/tsconfig.json +0 -16
  298. package/utils/JsViewVueTools/TypeCheckAndSet.js +0 -27
  299. package/utils/JsViewVueWidget/JsvFragShaderView/BrowserJsvFragShaderView.vue +0 -75
  300. package/utils/JsViewVueWidget/JsvPreload/BrowserPreload.vue +0 -144
  301. package/utils/JsViewVueWidget/JsvQrcode/BrowserQrcode.vue +0 -189
  302. package/utils/JsViewVueWidget/JsvQrcode/index.js +0 -18
  303. package/utils/JsViewVueWidget/JsvSpray/BrowserSpray.vue +0 -55
  304. package/utils/JsViewVueWidget/JsvSpray/index.js +0 -17
  305. package/utils/JsViewVueWidget/JsvTextureAnim/BrowserTextureAnim.vue +0 -359
  306. /package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvFreeMoveActor/ActionRefObject.d.ts +0 -0
  307. /package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvFreeMoveActor/ActorState.d.ts +0 -0
  308. /package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvMindMap/CommonType.d.ts +0 -0
@@ -1,189 +0,0 @@
1
- <script setup>
2
- import { onMounted, ref } from "vue";
3
- import QRCode from "qr.js";
4
-
5
- const renderDocument = window.JsvCode.Dom.RenderDocument
6
- ? window.JsvCode.Dom.RenderDocument
7
- : window.JsvCode.Dom.BrowserDocument;
8
-
9
- const props = defineProps({
10
- value: String,
11
- size: Number,
12
- fgColor: {
13
- type: String,
14
- default: "#000000",
15
- },
16
- bgColor: {
17
- type: String,
18
- default: "#ffffff",
19
- },
20
- level: {
21
- type: String, // ,容错级别,分别是L(7%)、M(15%)、Q(25%)、H(30%),
22
- default: "L",
23
- },
24
- imageSettings: Object,
25
- });
26
-
27
- const convertStr = (str) => {
28
- let out = "";
29
- for (let i = 0; i < str.length; i++) {
30
- let charcode = str.charCodeAt(i);
31
- if (charcode < 0x0080) {
32
- out += String.fromCharCode(charcode);
33
- } else if (charcode < 0x0800) {
34
- out += String.fromCharCode(0xc0 | (charcode >> 6));
35
- out += String.fromCharCode(0x80 | (charcode & 0x3f));
36
- } else if (charcode < 0xd800 || charcode >= 0xe000) {
37
- out += String.fromCharCode(0xe0 | (charcode >> 12));
38
- out += String.fromCharCode(0x80 | ((charcode >> 6) & 0x3f));
39
- out += String.fromCharCode(0x80 | (charcode & 0x3f));
40
- } else {
41
- // This is a surrogate pair, so we'll reconsitute the pieces and work
42
- // from that
43
- i++;
44
- charcode =
45
- 0x10000 + (((charcode & 0x3ff) << 10) | (str.charCodeAt(i) & 0x3ff));
46
- out += String.fromCharCode(0xf0 | (charcode >> 18));
47
- out += String.fromCharCode(0x80 | ((charcode >> 12) & 0x3f));
48
- out += String.fromCharCode(0x80 | ((charcode >> 6) & 0x3f));
49
- out += String.fromCharCode(0x80 | (charcode & 0x3f));
50
- }
51
- }
52
- return out;
53
- };
54
- const generatePath = (modules, margin = 0) => {
55
- const ops = [];
56
- modules.forEach((row, y) => {
57
- let start = null;
58
- row.forEach((cell, x) => {
59
- if (!cell && start !== null) {
60
- // M0 0h7v1H0z injects the space with the move and drops the comma,
61
- // saving a char per operation
62
- ops.push(
63
- `M${start + margin} ${y + margin}h${x - start}v1H${start + margin}z`
64
- );
65
- start = null;
66
- return;
67
- }
68
-
69
- // end of row, clean up or skip
70
- if (x === row.length - 1) {
71
- if (!cell) {
72
- // We would have closed the op above already so this can only mean
73
- // 2+ light modules in a row.
74
- return;
75
- }
76
- if (start === null) {
77
- // Just a single dark module.
78
- ops.push(`M${x + margin},${y + margin} h1v1H${x + margin}z`);
79
- } else {
80
- // Otherwise finish the current line.
81
- ops.push(
82
- `M${start + margin},${y + margin} h${x + 1 - start}v1H${
83
- start + margin
84
- }z`
85
- );
86
- }
87
- return;
88
- }
89
-
90
- if (cell && start === null) {
91
- start = x;
92
- }
93
- });
94
- });
95
- return ops.join("");
96
- };
97
- const getImageSettings = (props) => {
98
- // const { imageSettings, size } = props;
99
- const imageSettings = props.imageSettings;
100
- const size = props.size;
101
- if (!imageSettings) {
102
- return null;
103
- }
104
- const w = imageSettings.width;
105
- const h = imageSettings.height;
106
- const x = !imageSettings.x ? size / 2 - w / 2 : imageSettings.x;
107
- const y = !imageSettings.y ? size / 2 - h / 2 : imageSettings.y;
108
-
109
- return { x, y, h, w };
110
- };
111
- const renderQrcode = () => {
112
- const qrcode = QRCode(convertStr(props.value), {
113
- errorCorrectLevel: QRCode.ErrorCorrectLevel[props.level],
114
- });
115
-
116
- const cells = qrcode.modules;
117
- if (cells === null) {
118
- return null;
119
- }
120
-
121
- const margin = 2;
122
- const numCells = cells.length + margin * 2;
123
- const propsData = {
124
- value: props.value,
125
- size: props.size,
126
- level: props.level,
127
- bgColor: props.bgColor,
128
- fgColor: props.fgColor,
129
- imageSettings: props.imageSettings,
130
- };
131
- const calculatedImageSettings = getImageSettings(propsData);
132
- if (props.imageSettings) {
133
- imageStyle = {
134
- backgroundImage: `url(${props.imageSettings.src})`,
135
- height: calculatedImageSettings.h,
136
- width: calculatedImageSettings.w,
137
- left: calculatedImageSettings.x + margin,
138
- top: calculatedImageSettings.y + margin,
139
- };
140
- } else {
141
- imageStyle = {};
142
- }
143
- const fgPath = generatePath(cells, margin);
144
- return { numCells, fgPath };
145
- };
146
-
147
- const svgRoot = ref(null);
148
- let imageStyle = null;
149
- const qrcodeRes = renderQrcode();
150
-
151
- onMounted(() => {
152
- svgRoot.value.jsvGetProxyView().RegisterOnProxyReady(() => {
153
- const root = svgRoot.value.jsvGetProxyView().HtmlGetElement();
154
- const doc = renderDocument;
155
- const svg = doc.createElementNS("http://www.w3.org/2000/svg", "svg");
156
- svg.setAttribute("type", "qrcode");
157
- svg.setAttribute("shapeRendering", "crispEdges");
158
- svg.setAttribute("height", props.size);
159
- svg.setAttribute("width", props.size);
160
- svg.setAttribute(
161
- "viewBox",
162
- "0 0 " + qrcodeRes.numCells + " " + qrcodeRes.numCells
163
- );
164
-
165
- const path1 = doc.createElementNS("http://www.w3.org/2000/svg", "path");
166
- path1.setAttribute("fill", props.bgColor);
167
- path1.setAttribute(
168
- "d",
169
- "M0,0 h" + qrcodeRes.numCells + "v" + qrcodeRes.numCells + "H0z"
170
- );
171
-
172
- const path2 = doc.createElementNS("http://www.w3.org/2000/svg", "path");
173
- path2.setAttribute("fill", props.fgColor);
174
- path2.setAttribute("d", qrcodeRes.fgPath);
175
-
176
- svg.appendChild(path1);
177
- svg.appendChild(path2);
178
-
179
- root.appendChild(svg);
180
- });
181
- });
182
- </script>
183
-
184
- <template>
185
- <div>
186
- <div ref="svgRoot" :style="{ width: 100, height: 100 }"></div>
187
- <div :style="imageStyle"></div>
188
- </div>
189
- </template>
@@ -1,18 +0,0 @@
1
- /*
2
- * @Author: ChenChanghua
3
- * @Date: 2021-10-13 15:12:45
4
- * @LastEditors: ChenChanghua
5
- * @LastEditTime: 2021-10-13 17:41:34
6
- * @Description: file content
7
- */
8
- //! 考虑到.vue文件除了export default的component外,还有可能export其他对象,因此使用import * as
9
- import * as JsvQrcode from "./JsvQrcode.vue";
10
-
11
- let _JsvQrcode;
12
- if (window.JsView) {
13
- _JsvQrcode = JsvQrcode.default;
14
- } else {
15
- const BrowserQrcode = await import("./BrowserQrcode.vue");
16
- _JsvQrcode = BrowserQrcode.default;
17
- }
18
- export default _JsvQrcode;
@@ -1,55 +0,0 @@
1
- <!--
2
- * @Author: ChenChanghua
3
- * @Date: 2021-10-13 11:02:42
4
- * @LastEditors: ChenChanghua
5
- * @LastEditTime: 2021-10-13 15:10:01
6
- * @Description: file content
7
- -->
8
- <script>
9
- import { Forge } from "@shijiu/jsview/dom/jsv-forge-define";
10
-
11
- export default {
12
- props: {
13
- pointRes: {
14
- type: String,
15
- required: true,
16
- },
17
- sprayStyle: {
18
- type: Object,
19
- required: true,
20
- },
21
- },
22
- data() {
23
- return {
24
- viewId: -1,
25
- };
26
- },
27
- computed: {
28
- viewWidth() {
29
- return this.sprayStyle.deltaWidth === 0 ? 1 : this.sprayStyle.deltaWidth * 2;
30
- },
31
- viewHeight() {
32
- return this.sprayStyle.deltaHeight === 0 ? 1 : this.sprayStyle.deltaHeight * 2;
33
- },
34
- },
35
- mounted() {
36
- const viewSize = {
37
- width: this.viewWidth,
38
- height: this.viewHeight,
39
- };
40
- this.viewId = Forge.sParticleManager.addParticle(
41
- this.sprayStyle,
42
- this.pointRes,
43
- viewSize,
44
- this.$refs.element.jsvGetProxyView()
45
- );
46
- },
47
- beforeUnmount() {
48
- Forge.sParticleManager.recycleView(this.viewId);
49
- }
50
- };
51
- </script>
52
-
53
- <template>
54
- <div ref="element" :style="{ width: viewWidth, height: viewHeight }" />
55
- </template>
@@ -1,17 +0,0 @@
1
- /*
2
- * @Author: ChenChanghua
3
- * @Date: 2021-10-13 15:14:29
4
- * @LastEditors: ChenChanghua
5
- * @LastEditTime: 2021-10-18 14:09:04
6
- * @Description: file content
7
- */
8
- //! 考虑到.vue文件除了export default的component外,还有可能export其他对象,因此使用import * as
9
- import * as JsvSpray from "./JsvSpray.vue";
10
- let _JsvSpray;
11
- if (window.JsView) {
12
- _JsvSpray = JsvSpray.default;
13
- } else {
14
- const BrowserSpray = await import("./BrowserSpray.vue");
15
- _JsvSpray = BrowserSpray.default;
16
- }
17
- export default _JsvSpray;
@@ -1,359 +0,0 @@
1
- <!--
2
- * @Author: ChenChanghua
3
- * @Date: 2022-02-08 09:29:17
4
- * @LastEditTime: 2023-02-21 10:51:22
5
- * @Description: file content
6
- -->
7
- <script>
8
- // Forge共享数据引用,在Browser处理中window引用,规避Browser触发vite循环引用bug
9
- const forgeTextureManager = window.JsvCode.ForgeHandles.TextureManager;
10
- const renderDocument = window.JsvCode.Dom.RenderDocument
11
- ? window.JsvCode.Dom.RenderDocument
12
- : window.JsvCode.Dom.BrowserDocument;
13
-
14
- const DECORATE_BORDER_RADIUS = "BroderRaidus";
15
- const DECORATE_NINEPATCH_ALPHA_MIX = "NinePatchAlphaMix";
16
- const TexAlignAnchor = {
17
- LEFT_TOP: 1,
18
- CENTER_TOP: 2,
19
- RIGHT_TOP: 3,
20
- LEFT_MIDDLE: 4,
21
- CENTER: 5,
22
- RIGHT_MIDDLE: 6,
23
- LEFT_BOTTOM: 7,
24
- CENTER_BOTTOM: 8,
25
- RIGHT_BOTTOM: 9,
26
- };
27
-
28
- const getOffset = (type, viewW, viewH, texLeft, texTop) => {
29
- let extraLeft, extraTop;
30
- switch (type) {
31
- case TexAlignAnchor.LEFT_TOP:
32
- extraLeft = 0;
33
- extraTop = 0;
34
- break;
35
- case TexAlignAnchor.CENTER_TOP:
36
- extraLeft = viewW / 2;
37
- extraTop = 0;
38
- break;
39
- case TexAlignAnchor.RIGHT_TOP:
40
- extraLeft = viewW;
41
- extraTop = 0;
42
- break;
43
- case TexAlignAnchor.LEFT_MIDDLE:
44
- extraLeft = 0;
45
- extraTop = viewH / 2;
46
- break;
47
- case TexAlignAnchor.RIGHT_MIDDLE:
48
- extraLeft = viewW;
49
- extraTop = viewH / 2;
50
- break;
51
- case TexAlignAnchor.LEFT_BOTTOM:
52
- extraLeft = 0;
53
- extraTop = viewH;
54
- break;
55
- case TexAlignAnchor.CENTER_BOTTOM:
56
- extraLeft = viewW / 2;
57
- extraTop = viewH;
58
- break;
59
- case TexAlignAnchor.RIGHT_BOTTOM:
60
- extraLeft = viewW;
61
- extraTop = viewH;
62
- break;
63
- case TexAlignAnchor.CENTER:
64
- default:
65
- extraLeft = viewW / 2;
66
- extraTop = viewH / 2;
67
- break;
68
- }
69
- return [texLeft + extraLeft, texTop + extraTop];
70
- };
71
- let TOKEN = 0;
72
- export default {
73
- props: {
74
- src: String,
75
- top: Number,
76
- left: Number,
77
- width: Number,
78
- height: Number,
79
- borderRadius: [String, Number],
80
- decorate: Object,
81
- animation: String,
82
- duration: Number,
83
- transform: String,
84
- transformOrigin: String,
85
- repeat: {
86
- type: Number,
87
- default: 1,
88
- },
89
- delay: {
90
- type: Number,
91
- default: 0,
92
- },
93
- easing: {
94
- type: String,
95
- default: "linear",
96
- },
97
- onAnimationEnd: Function,
98
- autoStart: {
99
- type: Boolean,
100
- default: false,
101
- },
102
- texCoord: {
103
- type: Object,
104
- },
105
- },
106
- setup(props) {
107
- return {
108
- animName: "browser-texture-anim-" + TOKEN++,
109
- animDiv: null,
110
- clipDiv: null,
111
- imgDiv: null,
112
- watcherHandlerList: [],
113
- };
114
- },
115
- computed: {
116
- animSet() {
117
- return `${this.animName} ${this.duration / 1000}s ${this.easing} ${
118
- this.delay / 1000
119
- }s ${this.repeat === -1 ? "infinite" : this.repeat}`;
120
- },
121
- textureLayout() {
122
- if (!isNaN(this.texCoord?.width) && !isNaN(this.texCoord?.height)) {
123
- const texLeft = !isNaN(this.texCoord.left)
124
- ? this.texCoord.left
125
- : -this.texCoord.width / 2;
126
- const texTop = !isNaN(this.texCoord.top)
127
- ? this.texCoord.top
128
- : -this.texCoord.height / 2;
129
- const type = !isNaN(this.texCoord.alignAnchor)
130
- ? this.texCoord.alignAnchor
131
- : 5;
132
- const offset = getOffset(
133
- type,
134
- this.width,
135
- this.height,
136
- texLeft,
137
- texTop
138
- );
139
- const transition = this.decorate?.animTime
140
- ? `left ${this.decorate.animTime}s, top ${this.decorate.animTime}s`
141
- : "";
142
- return {
143
- position: "absolute",
144
- left: offset[0] + "px",
145
- top: offset[1] + "px",
146
- transition,
147
- width: this.texCoord.width + "px",
148
- height: this.texCoord.height + "px",
149
- };
150
- } else {
151
- return {
152
- position: "absolute",
153
- left: 0 + "px",
154
- top: 0 + "px",
155
- width: this.width + "px",
156
- height: this.height + "px",
157
- };
158
- }
159
- },
160
- maskStyle() {
161
- if (this.borderRadius) {
162
- const radiusObj = this._readRadius(this.borderRadius);
163
- return {
164
- left: this.left + "px",
165
- top: this.top + "px",
166
- borderRadius: `${radiusObj.topLeft}px ${radiusObj.topRight}px ${radiusObj.bottomLeft}px ${radiusObj.bottomRight}px`,
167
- width: this.width + "px",
168
- height: this.height + "px",
169
- overflow: "hidden",
170
- };
171
- } else if (this.decorate) {
172
- if (this.decorate.type == DECORATE_NINEPATCH_ALPHA_MIX) {
173
- const imageDspWidth =
174
- this.decorate.imageDspWidth > 0
175
- ? this.decorate.imageDspWidth
176
- : this.decorate.imageWidth;
177
- const slideWidth =
178
- (this.decorate.imageWidth - this.decorate.centerWidth) / 2;
179
- const outset = Math.ceil(
180
- (this.decorate.borderOutset * imageDspWidth) /
181
- this.decorate.imageWidth
182
- );
183
- console.log("get mask style");
184
- const transitionTime = this.decorate.animTime;
185
-
186
- let decorate_url = this.decorate.url;
187
- // 加入对 jsvtexturestore 模式的支持
188
- // 特别注意: chromiumn 102版本上,当jsvtexturestore对应内容首次加载时不能显示,此divstyle变化后才能显示
189
- if (
190
- this.decorate.url &&
191
- this.decorate.url.startsWith("jsvtexturestore:")
192
- ) {
193
- let view_texture = forgeTextureManager.GetImage2(this.decorate.url);
194
- decorate_url = `url(${view_texture.Source})`;
195
- }
196
-
197
- return {
198
- left: this.left + "px",
199
- top: this.top + "px",
200
- width: this.width + "px",
201
- height: this.height + "px",
202
- transition: `left ${transitionTime}s, top ${transitionTime}s, width ${transitionTime}s, height ${transitionTime}s`,
203
- webkitMaskBoxImageSource: decorate_url,
204
- webkitMaskBoxImageSlice: slideWidth,
205
- webkitMaskBoxImageWidth:
206
- Math.ceil(
207
- (slideWidth * imageDspWidth) / this.decorate.imageWidth
208
- ) + "px",
209
- webkitMaskBoxImageOutset: outset + "px",
210
- position: "absolute",
211
- };
212
- } else if (this.decorate.type == DECORATE_BORDER_RADIUS) {
213
- return {
214
- left: this.left + "px",
215
- top: this.top + "px",
216
- borderRadius: `${this.decorate.topLeft}px ${this.decorate.topRight}px ${this.decorate.bottomRight}px ${this.decorate.bottomLeft}`,
217
- width: this.width + "px",
218
- height: this.height + "px",
219
- overflow: "hidden",
220
- };
221
- }
222
- } else {
223
- return {
224
- left: this.left + "px",
225
- top: this.top + "px",
226
- width: this.width + "px",
227
- height: this.height + "px",
228
- overflow: "hidden",
229
- };
230
- }
231
- },
232
- },
233
- methods: {
234
- _readRadius(setting) {
235
- if (typeof setting == "number") {
236
- return {
237
- type: DECORATE_BORDER_RADIUS,
238
- topLeft: setting,
239
- topRight: setting,
240
- bottomRight: setting,
241
- bottomLeft: setting,
242
- };
243
- } else if (typeof setting == "string" && setting.length > 0) {
244
- const pattern = /\d+/g;
245
- let match = setting.match(pattern);
246
- if (match.length > 0) {
247
- let top_left = match[0];
248
- let top_right = match.length > 1 ? match[1] : top_left;
249
- return {
250
- type: DECORATE_BORDER_RADIUS,
251
- topLeft: top_left,
252
- topRight: top_right,
253
- bottomRight: match.length > 2 ? match[2] : top_left,
254
- bottomLeft: match.length > 3 ? match[3] : top_right,
255
- };
256
- }
257
- }
258
- return null;
259
- },
260
- start() {
261
- if (this.animDiv && this.animation) {
262
- this.animDiv.style.animation = this.animSet;
263
- }
264
- },
265
-
266
- insertKeyframe(animDefine) {
267
- const index = renderDocument.styleSheets[0].cssRules.length;
268
- renderDocument.styleSheets[0].insertRule(animDefine, index);
269
- },
270
- removeKeyframe(animName) {
271
- const styleSheetRef = renderDocument.styleSheets[0];
272
- const cssRulesRef = styleSheetRef.cssRules;
273
- // 对CssRules进行删除操作,倒序轮询
274
- for (let i = cssRulesRef.length - 1; i >= 0; i--) {
275
- if (cssRulesRef[i].name === animName) {
276
- styleSheetRef.deleteRule(i);
277
- break;
278
- }
279
- }
280
- },
281
- },
282
- mounted() {
283
- if (this.animation) {
284
- //此控件直接操作dom因此不走JsvDynamicKeyframes, 直接通过dom添加keyframes
285
- this.insertKeyframe("@keyframes " + this.animName + " " + this.animation);
286
- }
287
-
288
- this.$refs.root.jsvGetProxyView().RegisterOnProxyReady(() => {
289
- const root = this.$refs.root.jsvGetProxyView().HtmlGetElement();
290
- //绕过 jsview 对document 的 hook
291
- this.clipDiv = renderDocument.createElement("div");
292
- Object.assign(this.clipDiv.style, this.maskStyle);
293
-
294
- const textureLayout = this.textureLayout;
295
- this.animDiv = renderDocument.createElement("div");
296
- Object.assign(this.animDiv.style, textureLayout);
297
- this.animDiv.onanimationend = () => {
298
- this.animDiv.style.animation = null;
299
- this.onAnimationEnd?.();
300
- };
301
-
302
- this.imgDiv = renderDocument.createElement("div");
303
- this.imgDiv.style.width = textureLayout.width;
304
- this.imgDiv.style.height = textureLayout.height;
305
- this.imgDiv.style.backgroundImage = `url(${this.src})`;
306
- this.imgDiv.style.transform = this.transform;
307
- this.imgDiv.style.transformOrigin = this.transformOrigin;
308
-
309
- this.animDiv.appendChild(this.imgDiv);
310
- this.clipDiv.appendChild(this.animDiv);
311
- root.appendChild(this.clipDiv);
312
- });
313
-
314
- this.watcherHandlerList.push(
315
- this.$watch("left", (newValue) => {
316
- this.clipDiv.style.left = newValue + "px";
317
- })
318
- );
319
- this.watcherHandlerList.push(
320
- this.$watch("top", (newValue) => {
321
- this.clipDiv.style.top = newValue + "px";
322
- })
323
- );
324
- this.watcherHandlerList.push(
325
- this.$watch("width", (newValue) => {
326
- this.clipDiv.style.width = newValue + "px";
327
- })
328
- );
329
- this.watcherHandlerList.push(
330
- this.$watch("height", (newValue) => {
331
- this.clipDiv.style.height = newValue + "px";
332
- })
333
- );
334
- this.watcherHandlerList.push(
335
- this.$watch("textureLayout", (newValue) => {
336
- Object.assign(this.animDiv.style, newValue);
337
- this.imgDiv.style.width = newValue.width;
338
- this.imgDiv.style.height = newValue.height;
339
- })
340
- );
341
- if (this.autoStart) {
342
- setTimeout(() => {
343
- this.start();
344
- }, 0);
345
- }
346
- },
347
- beforeUnmount() {
348
- this.removeKeyframe(this.animName);
349
- for (let handler of this.watcherHandlerList) {
350
- handler?.();
351
- }
352
- this.watcherHandlerList = [];
353
- },
354
- };
355
- </script>
356
-
357
- <template>
358
- <div ref="root"></div>
359
- </template>