@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.
Files changed (325) hide show
  1. package/bin/browser/BrowserApic.vue.mjs +4 -15
  2. package/bin/browser/BrowserApic2.vue.mjs +4 -15
  3. package/bin/browser/BrowserApicLib.mjs +32 -26
  4. package/bin/browser/BrowserAudio.vue.mjs +2 -10
  5. package/bin/browser/BrowserJsvFragShaderView.vue.mjs +79 -0
  6. package/bin/browser/BrowserJsvLatex.vue.mjs +39 -16
  7. package/bin/browser/BrowserPreload.vue.mjs +1 -5
  8. package/bin/browser/BrowserQrcode.vue.mjs +1 -5
  9. package/bin/browser/BrowserSpray.vue.mjs +2 -12
  10. package/bin/browser/BrowserTextureAnim.vue.mjs +2 -12
  11. package/bin/export-sfc.mjs +3 -3
  12. package/bin/jsview-vue-common.mjs +3 -3
  13. package/bin/jsview-vue.mjs +4636 -2325
  14. package/bin/types/JsViewEngineWidget/CheckType.d.ts +4 -0
  15. package/bin/types/JsViewEngineWidget/JsvFocus/JsvFocusBlock.vue.d.ts +37 -33
  16. package/bin/types/JsViewEngineWidget/JsvFocus/JsvFocusHub.d.ts +4 -0
  17. package/bin/types/JsViewEngineWidget/JsvFocus/JsvFocusManager.d.ts +21 -6
  18. package/bin/types/JsViewEngineWidget/MetroWidget/Const.d.ts +4 -0
  19. package/bin/types/JsViewEngineWidget/MetroWidget/Dispatcher.d.ts +14 -12
  20. package/bin/types/JsViewEngineWidget/MetroWidget/ListWidget.vue.d.ts +17 -6
  21. package/bin/types/JsViewEngineWidget/MetroWidget/MetroWidget.vue.d.ts +283 -6
  22. package/bin/types/JsViewEngineWidget/MetroWidget/MetroWidgetSetup.d.ts +9 -3
  23. package/bin/types/JsViewEngineWidget/MetroWidget/PageUpdater.d.ts +4 -0
  24. package/bin/types/JsViewEngineWidget/MetroWidget/RenderItem.d.ts +7 -0
  25. package/bin/types/JsViewEngineWidget/MetroWidget/Slide.d.ts +4 -0
  26. package/bin/types/JsViewEngineWidget/MetroWidget/SlotComponent.vue.d.ts +4 -0
  27. package/bin/types/JsViewEngineWidget/MetroWidget/VisibleInfo.d.ts +4 -0
  28. package/bin/types/JsViewEngineWidget/MetroWidget/WidgetRectInfo.d.ts +4 -0
  29. package/bin/types/JsViewEngineWidget/RangeModel.d.ts +4 -0
  30. package/bin/types/JsViewEngineWidget/TemplateParser/CommonMetroTemplate.d.ts +4 -0
  31. package/bin/types/JsViewEngineWidget/TemplateParser/Fence.d.ts +4 -0
  32. package/bin/types/JsViewEngineWidget/TemplateParser/ListMetroTemplate.d.ts +5 -0
  33. package/bin/types/JsViewEngineWidget/TemplateParser/MetroTemplate.d.ts +4 -0
  34. package/bin/types/JsViewEngineWidget/TemplateParser/TemplateItemAdder.d.ts +5 -1
  35. package/bin/types/JsViewEngineWidget/TemplateParser/index.d.ts +4 -0
  36. package/bin/types/JsViewEngineWidget/WidgetCommon.d.ts +4 -0
  37. package/bin/types/JsViewEngineWidget/index.d.ts +14 -1
  38. package/bin/types/JsViewPlugin/JsvAccount/JsvAccount.d.ts +4 -0
  39. package/bin/types/JsViewPlugin/JsvAudio/AudioProxy.d.ts +4 -0
  40. package/bin/types/JsViewPlugin/JsvAudio/BrowserAudio/BrowserAudio.vue.d.ts +4 -0
  41. package/bin/types/JsViewPlugin/JsvAudio/BrowserAudio/JsvSystemAudio.vue.d.ts +4 -0
  42. package/bin/types/JsViewPlugin/JsvAudio/CheckType.d.ts +4 -0
  43. package/bin/types/JsViewPlugin/JsvAudio/Events.d.ts +4 -0
  44. package/bin/types/JsViewPlugin/JsvAudio/JsvAudio.vue.d.ts +4 -0
  45. package/bin/types/JsViewPlugin/JsvAudio/JsvAudioBridgeProxy.d.ts +4 -0
  46. package/bin/types/JsViewPlugin/JsvAudio/JsvAudioProxy.vue.d.ts +4 -0
  47. package/bin/types/JsViewPlugin/JsvAudio/PluginLoader.d.ts +4 -0
  48. package/bin/types/JsViewPlugin/JsvAudio/ScreenLockManager.d.ts +4 -0
  49. package/bin/types/JsViewPlugin/JsvAudio/index.d.ts +4 -0
  50. package/bin/types/JsViewPlugin/JsvAudio/version.d.ts +5 -0
  51. package/bin/types/JsViewPlugin/JsvLatex/BrowserDomBuilder.d.ts +4 -0
  52. package/bin/types/JsViewPlugin/JsvLatex/BrowserJsvLatex.vue.d.ts +4 -0
  53. package/bin/types/JsViewPlugin/JsvLatex/Color.d.ts +4 -0
  54. package/bin/types/JsViewPlugin/JsvLatex/JsvLatex.vue.d.ts +24 -0
  55. package/bin/types/JsViewPlugin/JsvLatex/JsvLatexBridgeProxy.d.ts +4 -0
  56. package/bin/types/JsViewPlugin/JsvLatex/JsvLatexProxy.vue.d.ts +4 -0
  57. package/bin/types/JsViewPlugin/JsvLatex/PluginLoader.d.ts +4 -0
  58. package/bin/types/JsViewPlugin/JsvLatex/index.d.ts +5 -0
  59. package/bin/types/JsViewPlugin/JsvLatex/version.d.ts +4 -0
  60. package/bin/types/JsViewPlugin/index.d.ts +4 -0
  61. package/bin/types/JsViewVueTools/ConstSymbol.d.ts +6 -2
  62. package/bin/types/JsViewVueTools/DebugContentShellJBridge.d.ts +4 -0
  63. package/bin/types/JsViewVueTools/DebugTool.d.ts +4 -0
  64. package/bin/types/JsViewVueTools/DefaultKeyMap.d.ts +4 -0
  65. package/bin/types/JsViewVueTools/FeatureActive.d.ts +14 -0
  66. package/bin/types/JsViewVueTools/ForgeConstDefine.d.ts +4 -0
  67. package/bin/types/JsViewVueTools/ForgeHandles.d.ts +7 -3
  68. package/bin/types/JsViewVueTools/JsvDemoTester.d.ts +4 -0
  69. package/bin/types/JsViewVueTools/JsvDynamicCssStyle.d.ts +20 -1
  70. package/bin/types/JsViewVueTools/JsvDynamicKeyFrames.d.ts +21 -2
  71. package/bin/types/JsViewVueTools/JsvFederationTools.d.ts +20 -0
  72. package/bin/types/JsViewVueTools/JsvHashHistory.d.ts +4 -0
  73. package/bin/types/JsViewVueTools/JsvImpactTracer.d.ts +8 -4
  74. package/bin/types/JsViewVueTools/JsvPerformance.d.ts +9 -0
  75. package/bin/types/JsViewVueTools/JsvPreDownloader.d.ts +55 -0
  76. package/bin/types/JsViewVueTools/JsvRefTaker.d.ts +28 -3
  77. package/bin/types/JsViewVueTools/JsvRuntimeBridge.d.ts +50 -0
  78. package/bin/types/JsViewVueTools/JsvStyleClass.d.ts +4 -0
  79. package/bin/types/JsViewVueTools/JsvStyleSheetsDeclarer.d.ts +21 -1
  80. package/bin/types/JsViewVueTools/JsvTextTools.d.ts +85 -27
  81. package/bin/types/JsViewVueTools/JsvTextureDefines.d.ts +4 -0
  82. package/bin/types/JsViewVueTools/JsvTextureLoadTool.d.ts +67 -0
  83. package/bin/types/JsViewVueTools/JsvTextureStore/CanvasTexture/CanvasTexture.d.ts +4 -0
  84. package/bin/types/JsViewVueTools/JsvTextureStore/CanvasTexture/CommandList.d.ts +4 -0
  85. package/bin/types/JsViewVueTools/JsvTextureStore/CanvasTexture/Path.d.ts +4 -0
  86. package/bin/types/JsViewVueTools/JsvTextureStore/CapturedTexture/CapturedTexture.d.ts +4 -0
  87. package/bin/types/JsViewVueTools/JsvTextureStore/JsvTextureStore.d.ts +73 -3
  88. package/bin/types/JsViewVueTools/JsvTextureStore/Store.d.ts +4 -0
  89. package/bin/types/JsViewVueTools/JsvTextureStore/Texture.d.ts +4 -0
  90. package/bin/types/JsViewVueTools/NinePatchHelper.d.ts +5 -1
  91. package/bin/types/JsViewVueTools/TextureManagerTools.d.ts +11 -0
  92. package/bin/types/JsViewVueTools/TypeCheckAndSet.d.ts +4 -0
  93. package/bin/types/JsViewVueTools/index.d.ts +26 -11
  94. package/bin/types/JsViewVueWidget/JsvActorMove/ActorControlBase.d.ts +4 -0
  95. package/bin/types/JsViewVueWidget/JsvActorMove/JsvActorMove.vue.d.ts +38 -0
  96. package/bin/types/JsViewVueWidget/JsvActorMove/JsvActorMoveControl.d.ts +4 -0
  97. package/bin/types/JsViewVueWidget/JsvActorMove/index.d.ts +4 -0
  98. package/bin/types/JsViewVueWidget/JsvApic/JsvApic/BrowserApic.vue.d.ts +5 -1
  99. package/bin/types/JsViewVueWidget/JsvApic/JsvApic/JsvApic.vue.d.ts +28 -1
  100. package/bin/types/JsViewVueWidget/JsvApic/JsvApic/index.d.ts +4 -0
  101. package/bin/types/JsViewVueWidget/JsvApic/JsvApic2/BrowserApic2.vue.d.ts +5 -1
  102. package/bin/types/JsViewVueWidget/JsvApic/JsvApic2/JsvApic2.vue.d.ts +29 -1
  103. package/bin/types/JsViewVueWidget/JsvApic/JsvApic2/index.d.ts +4 -0
  104. package/bin/types/JsViewVueWidget/JsvApic/JsvBrowserApicLib/ApicDataBase.d.ts +4 -0
  105. package/bin/types/JsViewVueWidget/JsvApic/JsvBrowserApicLib/BrowserApicLib.d.ts +4 -0
  106. package/bin/types/JsViewVueWidget/JsvApic/JsvBrowserApicLib/GifData.d.ts +4 -0
  107. package/bin/types/JsViewVueWidget/JsvApic/JsvBrowserApicLib/NormalLoopTool.d.ts +4 -0
  108. package/bin/types/JsViewVueWidget/JsvApic/JsvBrowserApicLib/PartLoopTool.d.ts +4 -0
  109. package/bin/types/JsViewVueWidget/JsvApic/JsvBrowserApicLib/SingleLoopTool.d.ts +4 -0
  110. package/bin/types/JsViewVueWidget/JsvApic/JsvBrowserApicLib/Viewer.d.ts +6 -1
  111. package/bin/types/JsViewVueWidget/JsvApic/JsvBrowserApicLib/WebpData.d.ts +4 -0
  112. package/bin/types/JsViewVueWidget/JsvApic/JsvCommonLoopToolBase.d.ts +4 -0
  113. package/bin/types/JsViewVueWidget/JsvClipDiv/JsvClipDiv.vue.d.ts +74 -0
  114. package/bin/types/JsViewVueWidget/JsvClipDiv/index.d.ts +5 -0
  115. package/bin/types/JsViewVueWidget/JsvConnectLine/ArcLineManager.d.ts +4 -0
  116. package/bin/types/JsViewVueWidget/JsvConnectLine/JsvConnectLine.vue.d.ts +21 -0
  117. package/bin/types/JsViewVueWidget/JsvConnectLine/index.d.ts +4 -0
  118. package/bin/types/JsViewVueWidget/JsvDragBox/JsvDragBox.vue.d.ts +109 -0
  119. package/bin/types/JsViewVueWidget/JsvDriftScope/JsvDriftScope.vue.d.ts +108 -0
  120. package/bin/types/JsViewVueWidget/JsvDriftScope/index.d.ts +5 -0
  121. package/bin/types/JsViewVueWidget/JsvEnableRenderBreak.vue.d.ts +4 -0
  122. package/bin/types/JsViewVueWidget/JsvFilterView.vue.d.ts +19 -0
  123. package/bin/types/JsViewVueWidget/JsvFlexCell/JsvFlexDiv.vue.d.ts +34 -0
  124. package/bin/types/JsViewVueWidget/JsvFlexCell/JsvScreenFlex.vue.d.ts +106 -0
  125. package/bin/types/JsViewVueWidget/JsvFlexCell/index.d.ts +6 -2
  126. package/bin/types/JsViewVueWidget/JsvFragShaderView/BrowserJsvFragShaderView.vue.d.ts +19 -0
  127. package/bin/types/JsViewVueWidget/JsvFragShaderView/JsvFragShaderView.vue.d.ts +60 -0
  128. package/bin/types/JsViewVueWidget/JsvFragShaderView/index.d.ts +6 -0
  129. package/bin/types/JsViewVueWidget/JsvFreeMoveActor/ActorControl.d.ts +47 -17
  130. package/bin/types/JsViewVueWidget/JsvFreeMoveActor/CallbackManager.d.ts +4 -0
  131. package/bin/types/JsViewVueWidget/JsvFreeMoveActor/ForgeTypeDefine.d.ts +4 -0
  132. package/bin/types/JsViewVueWidget/JsvFreeMoveActor/FreeMoveActor.vue.d.ts +25 -0
  133. package/bin/types/JsViewVueWidget/JsvFreeMoveActor/JsvEnvBlocker.vue.d.ts +22 -0
  134. package/bin/types/JsViewVueWidget/JsvFreeMoveActor/NexusNode.d.ts +4 -0
  135. package/bin/types/JsViewVueWidget/JsvFreeMoveActor/SetAction.d.ts +9 -5
  136. package/bin/types/JsViewVueWidget/JsvFreeMoveActor/SetCondition.d.ts +8 -2
  137. package/bin/types/JsViewVueWidget/JsvFreeMoveActor/SetState.d.ts +11 -7
  138. package/bin/types/JsViewVueWidget/JsvFreeMoveActor/SyncLinkManager.d.ts +22 -0
  139. package/bin/types/JsViewVueWidget/JsvFreeMoveActor/index.d.ts +6 -0
  140. package/bin/types/JsViewVueWidget/JsvGrid.vue.d.ts +73 -0
  141. package/bin/types/JsViewVueWidget/JsvHole.d.ts +17 -0
  142. package/bin/types/JsViewVueWidget/JsvInput/Cursor.vue.d.ts +14 -34
  143. package/bin/types/JsViewVueWidget/JsvInput/EditViewOperator.d.ts +48 -0
  144. package/bin/types/JsViewVueWidget/JsvInput/EditVisibleArea.d.ts +27 -0
  145. package/bin/types/JsViewVueWidget/JsvInput/JsvInput.vue.d.ts +64 -209
  146. package/bin/types/JsViewVueWidget/JsvInput/SharedDefine.d.ts +17 -0
  147. package/bin/types/JsViewVueWidget/JsvInput/SystemTextTools.d.ts +14 -0
  148. package/bin/types/JsViewVueWidget/JsvInput/index.d.ts +4 -0
  149. package/bin/types/JsViewVueWidget/JsvLine/JsvLine.vue.d.ts +20 -0
  150. package/bin/types/JsViewVueWidget/JsvLine/LineManager.d.ts +4 -0
  151. package/bin/types/JsViewVueWidget/JsvLine/index.d.ts +4 -0
  152. package/bin/types/JsViewVueWidget/JsvMarquee.vue.d.ts +21 -0
  153. package/bin/types/JsViewVueWidget/JsvMaskClipDiv.vue.d.ts +20 -0
  154. package/bin/types/JsViewVueWidget/JsvMindMap/Constant.d.ts +4 -0
  155. package/bin/types/JsViewVueWidget/JsvMindMap/DataTree.d.ts +7 -1
  156. package/bin/types/JsViewVueWidget/JsvMindMap/Geometry.d.ts +4 -0
  157. package/bin/types/JsViewVueWidget/JsvMindMap/JsvMindMap.vue.d.ts +90 -0
  158. package/bin/types/JsViewVueWidget/JsvMindMap/index.d.ts +4 -0
  159. package/bin/types/JsViewVueWidget/JsvMindMap/rtree.d.ts +4 -0
  160. package/bin/types/JsViewVueWidget/JsvNativeSharedDiv.vue.d.ts +24 -0
  161. package/bin/types/JsViewVueWidget/JsvNinePatch.vue.d.ts +31 -0
  162. package/bin/types/JsViewVueWidget/JsvPieChart.vue.d.ts +17 -0
  163. package/bin/types/JsViewVueWidget/JsvPosterDiv.vue.d.ts +17 -0
  164. package/bin/types/JsViewVueWidget/JsvPosterImage.vue.d.ts +18 -0
  165. package/bin/types/JsViewVueWidget/JsvPreload/BrowserPreload.vue.d.ts +4 -0
  166. package/bin/types/JsViewVueWidget/JsvPreload/JsvPreload.vue.d.ts +42 -0
  167. package/bin/types/JsViewVueWidget/JsvPreload/index.d.ts +4 -0
  168. package/bin/types/JsViewVueWidget/JsvProgressBar.vue.d.ts +19 -0
  169. package/bin/types/JsViewVueWidget/JsvQrcode/BrowserQrcode.vue.d.ts +4 -0
  170. package/bin/types/JsViewVueWidget/JsvQrcode/JsvQrcode.vue.d.ts +25 -0
  171. package/bin/types/JsViewVueWidget/JsvQrcode/index.d.ts +4 -0
  172. package/bin/types/JsViewVueWidget/JsvRadarChart.vue.d.ts +24 -0
  173. package/bin/types/JsViewVueWidget/JsvRipple/Constant.d.ts +4 -0
  174. package/bin/types/JsViewVueWidget/JsvRipple/JsvRipple.vue.d.ts +45 -0
  175. package/bin/types/JsViewVueWidget/JsvRipple/index.d.ts +4 -0
  176. package/bin/types/JsViewVueWidget/JsvScaleTextBox.vue.d.ts +18 -0
  177. package/bin/types/JsViewVueWidget/JsvScrollBox/JsvScrollBox.vue.d.ts +65 -1
  178. package/bin/types/JsViewVueWidget/JsvScrollBox/JsvScrollFollow.vue.d.ts +157 -0
  179. package/bin/types/JsViewVueWidget/JsvScrollBox/ScrollInnerSymbol.d.ts +8 -0
  180. package/bin/types/JsViewVueWidget/JsvScrollBox/ScrollSymbol.d.ts +13 -4
  181. package/bin/types/JsViewVueWidget/JsvScrollBox/index.d.ts +6 -0
  182. package/bin/types/JsViewVueWidget/JsvSector.vue.d.ts +18 -0
  183. package/bin/types/JsViewVueWidget/JsvSoundPool.d.ts +42 -0
  184. package/bin/types/JsViewVueWidget/JsvSpray/BrowserSpray.vue.d.ts +4 -0
  185. package/bin/types/JsViewVueWidget/JsvSpray/JsvSpray.vue.d.ts +40 -0
  186. package/bin/types/JsViewVueWidget/JsvSpray/index.d.ts +4 -0
  187. package/bin/types/JsViewVueWidget/JsvSpriteAnim/FrameBuidler.d.ts +4 -0
  188. package/bin/types/JsViewVueWidget/JsvSpriteAnim/JsvSpriteAnim.vue.d.ts +52 -0
  189. package/bin/types/JsViewVueWidget/JsvSpriteAnim/JsvSpriteLoader.vue.d.ts +16 -0
  190. package/bin/types/JsViewVueWidget/JsvSpriteAnim/JsvSpriteTools.d.ts +4 -0
  191. package/bin/types/JsViewVueWidget/JsvSpriteAnim/SpriteController.d.ts +4 -0
  192. package/bin/types/JsViewVueWidget/JsvSpriteAnim/index.d.ts +4 -0
  193. package/bin/types/JsViewVueWidget/JsvSpriteAnim/sAnimationToken.d.ts +4 -0
  194. package/bin/types/JsViewVueWidget/JsvSwiper/JsvSwiper.vue.d.ts +39 -0
  195. package/bin/types/JsViewVueWidget/JsvSwiper/index.d.ts +4 -0
  196. package/bin/types/JsViewVueWidget/JsvSwiper3D/JsvSwiper.vue.d.ts +24 -0
  197. package/bin/types/JsViewVueWidget/JsvSwiper3D/index.d.ts +4 -0
  198. package/bin/types/JsViewVueWidget/JsvTextBox.vue.d.ts +26 -0
  199. package/bin/types/JsViewVueWidget/JsvTextureAnim/BrowserTextureAnim.vue.d.ts +4 -0
  200. package/bin/types/JsViewVueWidget/JsvTextureAnim/CommonType.d.ts +4 -0
  201. package/bin/types/JsViewVueWidget/JsvTextureAnim/JsvTextureAnim.vue.d.ts +7 -2
  202. package/bin/types/JsViewVueWidget/JsvTextureAnim/index.d.ts +4 -0
  203. package/bin/types/JsViewVueWidget/JsvTouchModeSwitcher.vue.d.ts +100 -0
  204. package/bin/types/JsViewVueWidget/JsvVisibleSensor/JsvVisibleSensor.vue.d.ts +25 -0
  205. package/bin/types/JsViewVueWidget/JsvVisibleSensor/index.d.ts +4 -0
  206. package/bin/types/JsViewVueWidget/index.d.ts +9 -0
  207. package/bin/types/index.d.ts +4 -0
  208. package/index.d.ts +8 -0
  209. package/package.json +1 -1
  210. package/tools/config/rollup.config.mjs +1 -0
  211. package/tools/config/toolkit.mjs +81 -0
  212. package/tools/config/tsconfig.json +1 -0
  213. package/tools/config/vite.config.ts +24 -14
  214. package/tools/jsview-vue-build.mjs +66 -21
  215. package/utils/JsViewEngineWidget/JsvFocus/JsvFocusBlock.vue +6 -2
  216. package/utils/JsViewEngineWidget/JsvFocus/{JsvFocusManager.js → JsvFocusManager.ts} +34 -15
  217. package/utils/JsViewEngineWidget/MetroWidget/Dispatcher.ts +20 -0
  218. package/utils/JsViewEngineWidget/MetroWidget/ListWidget.vue +30 -11
  219. package/utils/JsViewEngineWidget/MetroWidget/MetroWidget.vue +54 -15
  220. package/utils/JsViewEngineWidget/MetroWidget/MetroWidgetSetup.js +509 -268
  221. package/utils/JsViewEngineWidget/MetroWidget/RenderItem.ts +11 -0
  222. package/utils/JsViewEngineWidget/MetroWidget/TaskManager.ts +8 -0
  223. package/utils/JsViewEngineWidget/TemplateParser/CommonMetroTemplate.ts +20 -10
  224. package/utils/JsViewEngineWidget/TemplateParser/ListMetroTemplate.ts +33 -9
  225. package/utils/JsViewEngineWidget/TemplateParser/MetroTemplate.ts +2 -2
  226. package/utils/JsViewEngineWidget/TemplateParser/TemplateItemAdder.ts +7 -0
  227. package/utils/JsViewEngineWidget/{index.js → index.ts} +1 -1
  228. package/utils/JsViewPlugin/JsvAudio/AudioProxy.js +21 -2
  229. package/utils/JsViewPlugin/JsvAudio/version.js +1 -1
  230. package/utils/JsViewPlugin/JsvAudio/version.mjs +1 -1
  231. package/utils/JsViewPlugin/JsvLatex/BrowserDomBuilder.js +13 -3
  232. package/utils/JsViewPlugin/JsvLatex/BrowserJsvLatex.vue +27 -6
  233. package/utils/JsViewPlugin/JsvLatex/JsvLatex.vue +34 -28
  234. package/utils/JsViewPlugin/JsvLatex/index.js +22 -0
  235. package/utils/JsViewVueTools/ConstSymbol.ts +2 -2
  236. package/utils/JsViewVueTools/FeatureActive.ts +84 -0
  237. package/utils/JsViewVueTools/ForgeHandles.ts +7 -3
  238. package/utils/JsViewVueTools/JsvDynamicCssStyle.js +2 -0
  239. package/utils/JsViewVueTools/JsvDynamicKeyFrames.ts +2 -0
  240. package/utils/JsViewVueTools/JsvImpactTracer.js +2 -0
  241. package/utils/JsViewVueTools/JsvPreDownloader.ts +5 -4
  242. package/utils/JsViewVueTools/JsvRefTaker.js +1 -2
  243. package/utils/JsViewVueTools/JsvRuntimeBridge.js +67 -1
  244. package/utils/JsViewVueTools/JsvStyleClass.js +2 -0
  245. package/utils/JsViewVueTools/JsvStyleSheetsDeclarer.js +2 -0
  246. package/utils/JsViewVueTools/JsvTextTools.ts +223 -0
  247. package/utils/JsViewVueTools/JsvTextureLoadTool.ts +233 -0
  248. package/utils/JsViewVueTools/JsvTextureStore/CapturedTexture/CapturedTexture.ts +4 -1
  249. package/utils/JsViewVueTools/JsvTextureStore/JsvTextureStore.ts +8 -4
  250. package/utils/JsViewVueTools/JsvTextureStore/Texture.ts +1 -0
  251. package/utils/JsViewVueTools/TextureManagerTools.ts +17 -0
  252. package/utils/JsViewVueTools/index.js +22 -19
  253. package/utils/JsViewVueWidget/JsvActorMove/JsvActorMove.vue +2 -0
  254. package/utils/JsViewVueWidget/JsvApic/JsvApic/BrowserApic.vue +2 -2
  255. package/utils/JsViewVueWidget/JsvApic/JsvApic/JsvApic.vue +13 -5
  256. package/utils/JsViewVueWidget/JsvApic/JsvApic2/BrowserApic2.vue +2 -2
  257. package/utils/JsViewVueWidget/JsvApic/JsvApic2/JsvApic2.vue +15 -4
  258. package/utils/JsViewVueWidget/JsvApic/JsvBrowserApicLib/Viewer.js +8 -3
  259. package/utils/JsViewVueWidget/JsvClipDiv/JsvClipDiv.vue +44 -0
  260. package/utils/JsViewVueWidget/JsvClipDiv/index.ts +1 -0
  261. package/utils/JsViewVueWidget/JsvConnectLine/JsvConnectLine.vue +7 -1
  262. package/utils/JsViewVueWidget/JsvDragBox/JsvDragBox.vue +219 -0
  263. package/utils/JsViewVueWidget/JsvDriftScope/JsvDriftScope.vue +84 -0
  264. package/utils/JsViewVueWidget/JsvDriftScope/index.ts +1 -0
  265. package/utils/JsViewVueWidget/JsvFilterView.vue +2 -0
  266. package/utils/JsViewVueWidget/JsvFlexCell/JsvFlexDiv.vue +5 -2
  267. package/utils/JsViewVueWidget/JsvFlexCell/JsvScreenFlex.vue +145 -0
  268. package/utils/JsViewVueWidget/JsvFlexCell/index.js +2 -5
  269. package/utils/JsViewVueWidget/JsvFragShaderView/BrowserJsvFragShaderView.vue +75 -0
  270. package/utils/JsViewVueWidget/JsvFragShaderView/JsvFragShaderView.vue +293 -0
  271. package/utils/JsViewVueWidget/JsvFragShaderView/index.js +18 -0
  272. package/utils/JsViewVueWidget/JsvFreeMoveActor/ActorControl.ts +142 -63
  273. package/utils/JsViewVueWidget/JsvFreeMoveActor/FreeMoveActor.vue +9 -0
  274. package/utils/JsViewVueWidget/JsvFreeMoveActor/JsvEnvBlocker.vue +2 -0
  275. package/utils/JsViewVueWidget/JsvFreeMoveActor/SetAction.ts +15 -6
  276. package/utils/JsViewVueWidget/JsvFreeMoveActor/SetCondition.ts +19 -7
  277. package/utils/JsViewVueWidget/JsvFreeMoveActor/SetState.ts +15 -11
  278. package/utils/JsViewVueWidget/JsvFreeMoveActor/SyncLinkManager.ts +120 -0
  279. package/utils/JsViewVueWidget/JsvFreeMoveActor/index.js +5 -1
  280. package/utils/JsViewVueWidget/JsvGrid.vue +2 -0
  281. package/utils/JsViewVueWidget/JsvHole.js +2 -0
  282. package/utils/JsViewVueWidget/JsvInput/Cursor.vue +49 -45
  283. package/utils/JsViewVueWidget/JsvInput/EditViewOperator.ts +320 -0
  284. package/utils/JsViewVueWidget/JsvInput/EditVisibleArea.ts +222 -0
  285. package/utils/JsViewVueWidget/JsvInput/JsvInput.vue +281 -681
  286. package/utils/JsViewVueWidget/JsvInput/SharedDefine.ts +17 -0
  287. package/utils/JsViewVueWidget/JsvInput/SystemTextTools.ts +47 -0
  288. package/utils/JsViewVueWidget/JsvLine/JsvLine.vue +2 -0
  289. package/utils/JsViewVueWidget/JsvMarquee.vue +2 -0
  290. package/utils/JsViewVueWidget/JsvMaskClipDiv.vue +2 -0
  291. package/utils/JsViewVueWidget/JsvMindMap/DataTree.ts +14 -1
  292. package/utils/JsViewVueWidget/JsvMindMap/JsvMindMap.vue +277 -117
  293. package/utils/JsViewVueWidget/JsvNativeSharedDiv.vue +91 -68
  294. package/utils/JsViewVueWidget/JsvNinePatch.vue +18 -1
  295. package/utils/JsViewVueWidget/JsvPieChart.vue +2 -0
  296. package/utils/JsViewVueWidget/JsvPosterDiv.vue +2 -0
  297. package/utils/JsViewVueWidget/JsvPosterImage.vue +2 -0
  298. package/utils/JsViewVueWidget/JsvPreload/JsvPreload.vue +2 -0
  299. package/utils/JsViewVueWidget/JsvProgressBar.vue +2 -0
  300. package/utils/JsViewVueWidget/JsvQrcode/JsvQrcode.vue +10 -11
  301. package/utils/JsViewVueWidget/JsvRadarChart.vue +2 -0
  302. package/utils/JsViewVueWidget/JsvRipple/Constant.js +2 -2
  303. package/utils/JsViewVueWidget/JsvRipple/JsvRipple.vue +3 -1
  304. package/utils/JsViewVueWidget/JsvScaleTextBox.vue +2 -0
  305. package/utils/JsViewVueWidget/JsvScrollBox/JsvScrollBox.vue +266 -48
  306. package/utils/JsViewVueWidget/JsvScrollBox/JsvScrollFollow.vue +477 -0
  307. package/utils/JsViewVueWidget/JsvScrollBox/ScrollInnerSymbol.ts +9 -0
  308. package/utils/JsViewVueWidget/JsvScrollBox/ScrollSymbol.ts +13 -4
  309. package/utils/JsViewVueWidget/JsvScrollBox/index.ts +3 -0
  310. package/utils/JsViewVueWidget/JsvSector.vue +2 -0
  311. package/utils/JsViewVueWidget/JsvSoundPool.js +2 -0
  312. package/utils/JsViewVueWidget/JsvSpray/JsvSpray.vue +30 -13
  313. package/utils/JsViewVueWidget/JsvSpriteAnim/JsvSpriteAnim.vue +2 -0
  314. package/utils/JsViewVueWidget/JsvSpriteAnim/JsvSpriteLoader.vue +2 -0
  315. package/utils/JsViewVueWidget/JsvSwiper/JsvSwiper.vue +2 -0
  316. package/utils/JsViewVueWidget/JsvSwiper3D/JsvSwiper.vue +2 -0
  317. package/utils/JsViewVueWidget/JsvTextBox.vue +2 -4
  318. package/utils/JsViewVueWidget/JsvTextureAnim/JsvTextureAnim.vue +44 -41
  319. package/utils/JsViewVueWidget/JsvTouchModeSwitcher.vue +101 -0
  320. package/utils/JsViewVueWidget/JsvVideo.vue +2 -2
  321. package/utils/JsViewVueWidget/JsvVisibleSensor/JsvVisibleSensor.vue +2 -0
  322. package/utils/JsViewVueWidget/index.js +5 -0
  323. package/utils/JsViewEngineWidget/MetroWidget/Dispatcher.js +0 -19
  324. package/utils/JsViewVueTools/JsvTextTools.js +0 -89
  325. package/utils/JsViewVueWidget/JsvScrollBox/index.js +0 -2
@@ -13,6 +13,7 @@ export class TextureBase {
13
13
 
14
14
  protected addToStore() {
15
15
  this.storeName = this.getStoreName();
16
+ this.textureRef.DisableAutoRecycle(); // 被store管理的,取消自动清理
16
17
  sStore.addToStore(this.storeName, this);
17
18
  }
18
19
 
@@ -0,0 +1,17 @@
1
+
2
+ function GetColorTexture(manager_ref: any, color_define: string) {
3
+ return manager_ref.GetColorTexture(color_define);
4
+ }
5
+
6
+ function GetImage(manager_ref: any, image_url: string) {
7
+ return manager_ref.GetImage2(image_url, false, null, "RGB_8888", null)
8
+ }
9
+
10
+ let ForgeTextureApis = {
11
+ GetColorTexture,
12
+ GetImage
13
+ }
14
+
15
+ export {
16
+ ForgeTextureApis,
17
+ }
@@ -5,24 +5,27 @@
5
5
  */
6
6
 
7
7
  export * from "./JsvHashHistory";
8
- export * from "./JsvDynamicCssStyle.js";
9
- export * from "./JsvDynamicKeyFrames.ts";
10
- export * from "./JsvRuntimeBridge.js";
8
+ export * from "./JsvDynamicCssStyle";
9
+ export * from "./JsvDynamicKeyFrames";
10
+ export * from "./JsvRuntimeBridge";
11
11
  export * from "./NinePatchHelper";
12
12
  export * from "./TypeCheckAndSet";
13
- export * from "./JsvRefTaker.js";
14
- export * from "./JsvStyleClass.js";
15
- export * from "./JsvStyleSheetsDeclarer.js";
16
- export * from "./DebugContentShellJBridge.js";
17
- export * from "./DebugTool.js";
18
- export * from "./JsvImpactTracer.js";
19
- export * from "./JsvTextTools.js";
20
- export * from "./JsvPreDownloader.ts"
21
- export { default as DefaultKeyCodeMap } from "./DefaultKeyMap.js";
22
- export * from "./JsvDemoTester.js"
23
- export * from "./JsvPerformance.ts"
24
- export * from "./JsvTextureStore/JsvTextureStore.ts"
25
- export * from "./JsvTextureDefines.ts"
26
- export * from "./JsvFederationTools.ts"
27
- export * from "./ConstSymbol.ts"
28
- export * from "./ForgeConstDefine.ts"
13
+ export * from "./JsvRefTaker";
14
+ export * from "./JsvStyleClass";
15
+ export * from "./JsvStyleSheetsDeclarer";
16
+ export * from "./DebugContentShellJBridge";
17
+ export * from "./DebugTool";
18
+ export * from "./JsvImpactTracer";
19
+ export * from "./JsvTextTools";
20
+ export * from "./JsvPreDownloader"
21
+ export { default as DefaultKeyCodeMap } from "./DefaultKeyMap";
22
+ export * from "./JsvDemoTester"
23
+ export * from "./JsvPerformance"
24
+ export * from "./JsvTextureStore/JsvTextureStore"
25
+ export * from "./JsvTextureDefines"
26
+ export * from "./JsvFederationTools"
27
+ export * from "./ConstSymbol"
28
+ export * from "./ForgeConstDefine"
29
+ export * from "./TextureManagerTools"
30
+ export * from "./FeatureActive"
31
+ export * from "./JsvTextureLoadTool"
@@ -7,6 +7,8 @@
7
7
  -->
8
8
 
9
9
  <!--
10
+ * @file
11
+ *
10
12
  * 【模块 export 内容】
11
13
  * JsvActorMove:单轴(X 或 Y)运动控制控件,可控制完成单方向的匀速运动和变速运动(抛物运动),
12
14
  * 若想进行X和Y轴同时的运动,可以通过运动分解后的两个JsvActorMove进行组合来实现
@@ -81,8 +81,8 @@ const play = () => {
81
81
  viewer?.play(props.loopType, props.loopInfo);
82
82
  };
83
83
 
84
- const stop = () => {
85
- viewer?.stop();
84
+ const stop = (frameCount = -1) => {
85
+ viewer?.stop(frameCount);
86
86
  };
87
87
 
88
88
  onMounted(() => {
@@ -7,6 +7,8 @@
7
7
  -->
8
8
 
9
9
  <!--
10
+ * @file
11
+ *
10
12
  * 【模块 export 内容】
11
13
  * JsvApic:Vue高阶组件,控制动图播放
12
14
  * prop说明:
@@ -21,8 +23,14 @@
21
23
  -->
22
24
  <script>
23
25
  import ForgeHandles from "../../../JsViewVueTools/ForgeHandles";
24
- import { LoopType } from "../JsvCommonLoopToolBase";
25
-
26
+ // import { LoopType } from "../JsvCommonLoopToolBase";
27
+ export const LoopType = {
28
+ LOOP_DEFAULT: 0,
29
+ LOOP_INFINITE: 1,
30
+ LOOP_FINITE: 2,
31
+ LOOP_PART: 3,
32
+ LOOP_SINGLE: 4,
33
+ };
26
34
  export default {
27
35
  props: {
28
36
  src: String,
@@ -79,12 +87,12 @@ export default {
79
87
  }
80
88
  }
81
89
  },
82
- stop() {
90
+ stop(frameCount = -1) {
83
91
  if (this.$refs.element) {
84
92
  let mainViewTexture = this.$refs.element.jsvGetProxyTexture(
85
93
  ForgeHandles.TextureManager
86
94
  );
87
- mainViewTexture.DispatchCommand(Forge.NativeConstant.APIC_STOP, "");
95
+ mainViewTexture.DispatchCommand(Forge.NativeConstant.APIC_STOP, `{"TF":${frameCount}}`);
88
96
  }
89
97
  },
90
98
  },
@@ -102,7 +110,7 @@ export default {
102
110
  }
103
111
  },
104
112
  beforeUnmount() {
105
- this.stop();
113
+ this.stop(0);
106
114
  if (this.$refs.element) {
107
115
  let mainViewTexture = this.$refs.element.jsvGetProxyTexture(
108
116
  ForgeHandles.TextureManager
@@ -104,8 +104,8 @@ defineExpose({
104
104
  waitForPlayInfo = args;
105
105
  viewer?.play(...args);
106
106
  },
107
- stop: () => {
108
- viewer?.stop();
107
+ stop: (frameCount = -1) => {
108
+ viewer?.stop(frameCount);
109
109
  },
110
110
  });
111
111
  </script>
@@ -7,6 +7,8 @@
7
7
  -->
8
8
 
9
9
  <!--
10
+ * @file
11
+ *
10
12
  * 【模块 export 内容】
11
13
  * JsvApic:Vue高阶组件,控制动图播放
12
14
  * prop说明:
@@ -29,7 +31,16 @@
29
31
  -->
30
32
  <script>
31
33
  import ForgeHandles from "../../../JsViewVueTools/ForgeHandles";
32
- import { LoopType } from "../JsvCommonLoopToolBase";
34
+ // import { LoopType } from "../JsvCommonLoopToolBase";
35
+
36
+ //为了打包后少加载一个文件这里单独定义
37
+ const LoopType = {
38
+ LOOP_DEFAULT: 0,
39
+ LOOP_INFINITE: 1,
40
+ LOOP_FINITE: 2,
41
+ LOOP_PART: 3,
42
+ LOOP_SINGLE: 4,
43
+ };
33
44
 
34
45
  export default {
35
46
  props: {
@@ -88,12 +99,12 @@ export default {
88
99
  }
89
100
  }
90
101
  },
91
- stop() {
102
+ stop(frameCount = -1) {
92
103
  if (this.$refs.element) {
93
104
  let mainViewTexture = this.$refs.element.jsvGetProxyTexture(
94
105
  ForgeHandles.TextureManager
95
106
  );
96
- mainViewTexture.DispatchCommand(Forge.NativeConstant.APIC_STOP, "");
107
+ mainViewTexture.DispatchCommand(Forge.NativeConstant.APIC_STOP, `{"TF":${frameCount}}`);
97
108
  }
98
109
  },
99
110
  },
@@ -108,7 +119,7 @@ export default {
108
119
  }
109
120
  },
110
121
  beforeUnmount() {
111
- this.stop();
122
+ this.stop(0);
112
123
  if (this.$refs.element) {
113
124
  let mainViewTexture = this.$refs.element.jsvGetProxyTexture(
114
125
  ForgeHandles.TextureManager
@@ -23,7 +23,7 @@ class Viewer {
23
23
  this._Listener = listener;
24
24
  this._TimeoutId = -1;
25
25
  this._EndState = ApicEndState.LAST_FRAME;
26
- // this.renderFrame(0);
26
+ this._CurrentIndex = -1;
27
27
  }
28
28
 
29
29
  _createLoopTool(loop_type, loop_info) {
@@ -59,8 +59,12 @@ class Viewer {
59
59
  this._LoopTool.setApicInfo(this._ApicData.FrameCount, this._ApicData.LoopCount);
60
60
  }
61
61
 
62
- stop() {
62
+ stop(frameCount = -1) {
63
63
  clearTimeout(this._TimeoutId);
64
+ if (frameCount >= 0 && this._CurrentIndex !== frameCount) {
65
+ this._CurrentIndex = frameCount;
66
+ this.renderFrame(frameCount)
67
+ }
64
68
  if (this._Listener?.onend) {
65
69
  this._Listener.onend();
66
70
  }
@@ -88,7 +92,8 @@ class Viewer {
88
92
 
89
93
  renderLoop() {
90
94
  if (this._LoopTool.hasNext()) {
91
- let duration = this.renderFrame(this._LoopTool.next());
95
+ this._CurrentIndex = this._LoopTool.next()
96
+ let duration = this.renderFrame(this._CurrentIndex);
92
97
  this._TimeoutId = setTimeout(() => {
93
98
  this.renderLoop();
94
99
  }, duration);
@@ -0,0 +1,44 @@
1
+ <!--
2
+ * @file
3
+ *
4
+ * 【模块 export 内容】
5
+ * JsvClipDiv: Vue高阶组件,overhidden:true的div,附带有其他clip设定能力
6
+ * props说明:
7
+ * style: {Object} (必选, 响应式) 同div的style, 提供top, left, width, height, transition, transform信息,
8
+ * 但目前不支持borderRaduis
9
+ *
10
+ * expose函数说明:
11
+ *
12
+ -->
13
+
14
+ <template>
15
+ <div v-bind="rMergedDivProps">
16
+ <slot />
17
+ </div>
18
+ </template>
19
+
20
+ <script setup lang="ts">
21
+ import { shallowRef, watchEffect, defineProps, withDefaults } from "vue";
22
+
23
+ const rProps = withDefaults(
24
+ defineProps<{
25
+ style: object;
26
+ }>(),
27
+ {}
28
+ );
29
+
30
+ // 响应式变量
31
+ let rMergedDivProps = shallowRef({});
32
+
33
+ watchEffect(() => {
34
+ let divStyle = {
35
+ ...rProps.style,
36
+ overflow: "hidden",
37
+ };
38
+ rMergedDivProps.value = {
39
+ style: divStyle,
40
+ };
41
+
42
+ // TODO: 未来补充补充其他 data-jsv-vw-xxxx 设置
43
+ });
44
+ </script>
@@ -0,0 +1 @@
1
+ export { default as JsvClipDiv } from "./JsvClipDiv.vue"
@@ -1,4 +1,6 @@
1
1
  <!--
2
+ * @file
3
+ *
2
4
  * 【模块 export 内容】
3
5
  * JsvConnectLine:Vue高阶组件,由JsvLine组件变化而来,用于连接两个区域的线条。
4
6
  * props说明(注意:全部属性非响应式, 需要变更时用 key 来触发重绘):
@@ -75,7 +77,7 @@
75
77
  <script setup>
76
78
  import JsvLine from "../JsvLine/index";
77
79
  import { createTexture } from "./ArcLineManager";
78
- import { shallowRef } from "vue";
80
+ import { shallowRef, onBeforeUnmount } from "vue";
79
81
  const props = defineProps({
80
82
  startPos: {
81
83
  type: Object,
@@ -349,6 +351,10 @@ if (props.radius) {
349
351
  ? InflectionPoint.y + startPos3Extra
350
352
  : props.endPos.y;
351
353
  }
354
+
355
+ onBeforeUnmount(() => {
356
+ myLineTexture.UnRef()
357
+ })
352
358
  </script>
353
359
 
354
360
  <style scoped></style>
@@ -0,0 +1,219 @@
1
+ <!--
2
+ * @file
3
+ *
4
+ * 【模块 export 内容】
5
+ * JsvDragBox:在一定限制区域内拖动的容器
6
+ * props说明:
7
+ * boxRect {Object} (必填) 限制区域 { left?: number, top?: number, width: number, height: number }
8
+ * dragRect {Object} (必填) 拖拽区域 { left?: number, top?: number, width: number, height: number }
9
+ * expose函数说明:
10
+ * 定义: type CBK = ({left: number, top: number}) => void;
11
+ * setSensor {(callback: CBK, sensitivity: number) => void}
12
+ * 设置运动后触发的回调, sensitivity为回调敏感度, 每移动多少像素进行回调,适当放大(推荐10以上)可以极大减小对js回调过多引起的性能降低
13
+ * setTouchCallback { (onDragStart: CBK, onDragRelease: CBK) => void }
14
+ * 设置触控开始和结束回调
15
+ * moveTo { (left: number, top: number) => void },
16
+ * 将拖拽块移动到指定位置
17
+ * getPosition { () => {left: number, top: number} }
18
+ * 获取当前拖拽块的位置
19
+ *
20
+ -->
21
+
22
+ <script setup>
23
+ import ActControl from "../../JsViewVueWidget/JsvFreeMoveActor/ActorControl";
24
+ import { ForgeConst } from "../../JsViewVueTools/ForgeConstDefine";
25
+ import { shallowRef, onMounted, computed } from "vue";
26
+
27
+ const props = defineProps({
28
+ boxRect: {
29
+ type: Object,
30
+ require: true,
31
+ validator(value) {
32
+ return (
33
+ typeof value?.width == "number" && typeof value?.height == "number"
34
+ );
35
+ },
36
+ },
37
+ dragRect: {
38
+ type: Object,
39
+ require: true,
40
+ validator(value) {
41
+ return (
42
+ typeof value?.width == "number" && typeof value?.height == "number"
43
+ );
44
+ },
45
+ },
46
+ });
47
+
48
+ const valide = true;
49
+ if (
50
+ props.boxRect.width <= props.dragRect.width ||
51
+ props.boxRect.height <= props.dragRect.height
52
+ ) {
53
+ console.error("JsvDragBox: box size must be large than drag size.");
54
+ valide = false;
55
+ }
56
+
57
+ let rMainDiv = shallowRef(null);
58
+ let cController = new ActControl();
59
+ const cWallConditionGroup = 1;
60
+ const cSensorConditionGroup = 2;
61
+ const rBoxStyle = computed(() => {
62
+ return {
63
+ left: props.boxRect.left ?? 0,
64
+ top: props.boxRect.top ?? 0,
65
+ width: props.boxRect.width,
66
+ height: props.boxRect.height,
67
+ };
68
+ });
69
+
70
+ let vLeft = 0;
71
+ let vTop = 0;
72
+ let vSensitivity = 10;
73
+ let vSensorCallback = null;
74
+ let vOnDragStart = null;
75
+ let vOnDragRelease = null;
76
+
77
+ function initDragBox() {
78
+ cController.run((cmds) => [
79
+ cmds.state().removeConditionByGroup(cWallConditionGroup),
80
+ cmds
81
+ .condition(cWallConditionGroup, true)
82
+ .boxPosition(
83
+ 0,
84
+ 0,
85
+ props.boxRect.width - props.dragRect.width,
86
+ props.boxRect.height - props.dragRect.height
87
+ )
88
+ .then([cmds.action().stopMoving(true)]),
89
+ ]);
90
+ }
91
+
92
+ function onSensor(pos) {
93
+ vLeft = pos.xPos;
94
+ vTop = pos.yPos;
95
+ vSensorCallback?.({ left: pos.xPos, top: pos.yPos });
96
+ }
97
+
98
+ function setSensor(callback, sensitivity) {
99
+ if (!callback) {
100
+ cController.run((cmds) => [
101
+ cmds.state().removeConditionByGroup(cSensorConditionGroup),
102
+ ]);
103
+ return;
104
+ }
105
+
106
+ vSensorCallback = callback;
107
+ if (sensitivity != vSensitivity) {
108
+ cController.run((cmds) => [
109
+ cmds.state().removeConditionByGroup(cSensorConditionGroup),
110
+ ]);
111
+ if (callback != null) {
112
+ cController.run((cmds) => [
113
+ cmds
114
+ .condition(cSensorConditionGroup, true)
115
+ .onMovement(sensitivity) // 设置x或y移动超过12时才触发回调,以此减少回调的频次,规避js的性能影响
116
+ .then([onSensor]),
117
+ ]);
118
+ }
119
+ }
120
+ }
121
+
122
+ function setTouchCallback(onDragStart, onDragEnd) {
123
+ vOnDragStart = onDragStart;
124
+ vOnDragRelease = onDragEnd;
125
+ }
126
+
127
+ function moveTo(left, top) {
128
+ if (typeof left !== "number" || typeof top !== "number") {
129
+ console.error(
130
+ `JsvDragBox: moveTo params type must be number, current params:{${left}, ${top}}`
131
+ );
132
+ return;
133
+ }
134
+ cController.run((cmds) => [cmds.action().teleportTo(left, top)]);
135
+ }
136
+
137
+ function getPosition() {
138
+ return { left: vLeft, top: vTop };
139
+ }
140
+
141
+ onMounted(() => {
142
+ if (!valide) {
143
+ return;
144
+ }
145
+ let divView = rMainDiv.value.jsvGetProxyView();
146
+ cController.bindForgeView(divView, true);
147
+ divView.DragEnables?.(
148
+ ForgeConst.DragFlags.TOUCH_RECV_MOVE_BIT |
149
+ // (cEnableFling ? ForgeConst.DragFlags.TOUCH_RECV_FLING_BIT : 0) |
150
+ ForgeConst.DragFlags.TOUCH_RECV_FIRST_START |
151
+ ForgeConst.DragFlags.TOUCH_RECV_LAST_END
152
+ ); // 激活 Move | TouchDown | TouchEnd
153
+
154
+ initDragBox();
155
+
156
+ let initLeft =
157
+ typeof props.dragRect.left == "number" ? props.dragRect.left : 0;
158
+ let initTop = typeof props.dragRect.top == "number" ? props.dragRect.top : 0;
159
+ if (initLeft != 0 || initTop != 0) {
160
+ cController.run((cmds) => [cmds.action().teleportTo(initLeft, initTop)]);
161
+ }
162
+
163
+ cController.run((cmds) => [
164
+ cmds
165
+ .condition(undefined, true)
166
+ .onDragStart()
167
+ .then([
168
+ (data) => {
169
+ vLeft = data.xPos;
170
+ vTop = data.yPos;
171
+ vOnDragStart?.({
172
+ left: data.xPos,
173
+ top: data.yPos,
174
+ });
175
+ },
176
+ ]),
177
+ cmds
178
+ .condition(undefined, true)
179
+ .onTouchRelease()
180
+ .then([
181
+ (data) => {
182
+ vLeft = data.xPos;
183
+ vTop = data.yPos;
184
+ vOnDragRelease?.({
185
+ left: data.xPos,
186
+ top: data.yPos,
187
+ });
188
+ },
189
+ ]),
190
+ cmds
191
+ .condition(cSensorConditionGroup, true)
192
+ .onMovement(10) // 默认设置x或y移动超过10时才触发回调,以此减少回调的频次,规避js的性能影响
193
+ .then([onSensor]),
194
+ ]);
195
+ });
196
+
197
+ defineExpose({
198
+ setSensor,
199
+ setTouchCallback,
200
+ moveTo,
201
+ getPosition,
202
+ });
203
+ </script>
204
+
205
+ <template>
206
+ <div :style="rBoxStyle">
207
+ <div
208
+ ref="rMainDiv"
209
+ :style="{
210
+ left: 0,
211
+ top: 0,
212
+ width: props.dragRect.width,
213
+ height: props.dragRect.height,
214
+ }"
215
+ >
216
+ <slot></slot>
217
+ </div>
218
+ </div>
219
+ </template>
@@ -0,0 +1,84 @@
1
+ <!--
2
+ * @file
3
+ *
4
+ * 【模块 export 内容】
5
+ * JsvDriftScope: Vue高阶组件,放大镜或者望远镜效果, 分为 frame 区域和 scene 区域,frame是游离的ClipView, scene是被Clip部分
6
+ * props说明:
7
+ * top {Number} (可选, 响应式)组件的top, 不填写时默认值为0
8
+ * left {Number} (可选, 响应式)组件的left, 不填写时默认值为0
9
+ * frameStyle: {Object} (可选, 响应式) 透视(裁剪)区域外框的style, 此层次无色透明,但是决定Frame层的变化, 支持以下属性
10
+ * {top, left, width, height, transition, animation, transform, transformOrigin}
11
+ * scopeStyle: {Object} (必选, 响应式) 透视(裁剪)区域的div的尺寸style, 会叠加frameStyle已经做的形变, 支持以下属性
12
+ * {width, height, transition, animation, transform, transformOrigin}
13
+ * 做动画时,frameStyle负责位置变化,scope则主要负责尺寸变化
14
+ *
15
+ * template说明:
16
+ * Frame 透视窗(裁剪层)的外框的装饰层
17
+ * Scene 被透视的内容
18
+ * expose函数说明:
19
+ *
20
+ -->
21
+
22
+ <template>
23
+ <div
24
+ :style="{
25
+ top: rProps.top,
26
+ left: rProps.left,
27
+ }"
28
+ >
29
+ <div :style="rMergedFrameStyle" data-jsv-vw-mask-drift="true">
30
+ <!-- clip div -->
31
+ <jsv-clip-div :style="rProps.scopeStyle">
32
+ <!-- scene层, 坐标不跟随clip div, 只从属于主div -->
33
+ <div data-jsv-vw-mask-dock="true">
34
+ <slot name="Scene" />
35
+ </div>
36
+ </jsv-clip-div>
37
+ <!-- frame层, 坐标跟随clip div -->
38
+ <slot name="Frame" />
39
+ </div>
40
+ </div>
41
+ </template>
42
+
43
+ <script setup lang="ts">
44
+ import { shallowRef, watchEffect, defineProps, withDefaults } from "vue";
45
+ import JsvClipDiv from "../JsvClipDiv/JsvClipDiv.vue";
46
+
47
+ interface FrameStyleDefine {
48
+ top?: number;
49
+ left?: number;
50
+ width?: number;
51
+ height?: number;
52
+ transition?: string;
53
+ animation?: string;
54
+ transform?: string;
55
+ transformOrigin?: string;
56
+ }
57
+
58
+ interface ScopeStyleDefine {
59
+ width: number;
60
+ height: number;
61
+ transition?: string;
62
+ animation?: string;
63
+ transform?: string;
64
+ transformOrigin?: string;
65
+ }
66
+
67
+ const rProps = withDefaults(
68
+ defineProps<{
69
+ top?: number;
70
+ left?: number;
71
+ frameStyle?: Object; // FrameStyleDefine
72
+ scopeStyle: Object; // ScopeStyleDefine
73
+ }>(),
74
+ { top: 0, left: 0 }
75
+ );
76
+
77
+ const rMergedFrameStyle = shallowRef({});
78
+
79
+ watchEffect(() => {
80
+ rMergedFrameStyle.value = {
81
+ ...rProps.frameStyle,
82
+ };
83
+ });
84
+ </script>
@@ -0,0 +1 @@
1
+ export { default as JsvDriftScope } from "./JsvDriftScope.vue"
@@ -1,4 +1,6 @@
1
1
  <!--
2
+ * @file
3
+ *
2
4
  * 【模块 export 内容】
3
5
  * JsvFilterView:黑白滤镜组件
4
6
  * props说明:
@@ -6,6 +6,8 @@
6
6
  -->
7
7
 
8
8
  <!--
9
+ * @file
10
+ *
9
11
  * 【模块 export 内容】
10
12
  * JsvFlexDiv: 包装成一个支持flex属性的div
11
13
  * props说明:
@@ -19,11 +21,12 @@
19
21
  * alignItems: flex-start|flex-end|center|stretch 默认center
20
22
  * 副轴方向单行内的对齐方式,例如主轴为行时,项目在每行中竖直方向的对齐
21
23
  * alignContent: flex-start|flex-end|center 默认flex-start
22
- * 副轴方向多行内容总体的对齐方式,例如主轴为行时,项目在每行中竖直方向的对齐
24
+ * 副轴方向多行内容总体的对齐方式,例如主轴为行时,项目在每行中竖直方向的对齐
25
+ * 若未设置,当遇到多行场景,行为为flex-start + 剩余空间每行平均瓜分(特别适合单行填充整个副轴空间的需求)
23
26
  * 作为item(二级container):
24
27
  * alignSelf: auto|flex-start|flex-end|center|stretch 默认auto, 覆盖container的alignItems设置
25
28
  * 特别注意: 这些属性会引起位置对齐问题, 所以会自动去掉: "overflow:hidden"
26
- * askSize: boolean 设置会跟进flex的尺寸变化,但会降低性能
29
+ * askSize: boolean 设置会跟进flex的尺寸变化,设置后可通过getWidth/getHeight拿到尺寸,但会降低性能
27
30
  * onSized: Function 比askSize更进一步,可以通过回调知道尺寸变化后的时机,回调参数(width, height)为flex后的尺寸
28
31
  *
29
32
  * expose说明: