@shijiu/jsview-vue 2.2.201 → 2.2.426-test.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (341) hide show
  1. package/bin/browser/BrowserApic.vue.mjs +2 -13
  2. package/bin/browser/BrowserApic2.vue.mjs +2 -13
  3. package/bin/browser/BrowserApicLib.mjs +24 -24
  4. package/bin/browser/BrowserAudio.vue.mjs +2 -10
  5. package/bin/browser/BrowserJsvLatex.vue.mjs +39 -16
  6. package/bin/export-sfc.mjs +3 -3
  7. package/bin/jsview-vue-common.mjs +3 -3
  8. package/bin/jsview-vue.mjs +3288 -2312
  9. package/bin/types/utils/JsViewEngineWidget/JsvFocus/JsvFocusBlock.vue.d.ts +72 -0
  10. package/bin/types/{JsViewEngineWidget → utils/JsViewEngineWidget}/MetroWidget/ListWidget.vue.d.ts +6 -3
  11. package/bin/types/{JsViewEngineWidget → utils/JsViewEngineWidget}/MetroWidget/MetroWidget.vue.d.ts +6 -3
  12. package/bin/types/{JsViewEngineWidget → utils/JsViewEngineWidget}/MetroWidget/MetroWidgetSetup.d.ts +3 -1
  13. package/bin/types/utils/JsViewEngineWidget/MetroWidget/TaskManager.d.ts +64 -0
  14. package/bin/types/utils/JsViewEngineWidget/MetroWidget/TokenGenerator.d.ts +4 -0
  15. package/bin/types/utils/JsViewEngineWidget/RectUtils.d.ts +61 -0
  16. package/bin/types/{JsViewEngineWidget → utils/JsViewEngineWidget}/TemplateParser/Fence.d.ts +2 -2
  17. package/bin/types/{JsViewEngineWidget → utils/JsViewEngineWidget}/TemplateParser/MetroTemplate.d.ts +3 -3
  18. package/bin/types/{JsViewEngineWidget → utils/JsViewEngineWidget}/index.d.ts +1 -1
  19. package/bin/types/utils/JsViewPlugin/JsvAudio/version.d.mts +13 -0
  20. package/bin/types/{JsViewPlugin → utils/JsViewPlugin}/JsvLatex/index.d.ts +1 -0
  21. package/bin/types/utils/JsViewPlugin/JsvLatex/version.d.mts +13 -0
  22. package/bin/types/utils/JsViewPlugin/JsvPlayer/BrowserJsvPlayer-0.9.vue.d.ts +45 -0
  23. package/bin/types/utils/JsViewPlugin/JsvPlayer/BrowserJsvPlayer.vue.d.ts +597 -0
  24. package/bin/types/utils/JsViewPlugin/JsvPlayer/GetVersion.d.ts +13 -0
  25. package/bin/types/utils/JsViewPlugin/JsvPlayer/JsvMedia.d.ts +420 -0
  26. package/bin/types/utils/JsViewPlugin/JsvPlayer/JsvMediaBrowserInterface.d.ts +57 -0
  27. package/bin/types/utils/JsViewPlugin/JsvPlayer/JsvPlayer.vue.d.ts +588 -0
  28. package/bin/types/utils/JsViewPlugin/JsvPlayer/index-0.9.d.ts +358 -0
  29. package/bin/types/utils/JsViewPlugin/JsvPlayer/index.d.ts +358 -0
  30. package/bin/types/utils/JsViewPlugin/JsvPlayer/version.d.mts +14 -0
  31. package/bin/types/utils/JsViewVueTools/FeatureActive.d.ts +10 -0
  32. package/bin/types/utils/JsViewVueTools/ForgeHandles.d.ts +6 -0
  33. package/bin/types/{JsViewVueTools → utils/JsViewVueTools}/JsvDynamicCssStyle.d.ts +3 -1
  34. package/bin/types/{JsViewVueTools → utils/JsViewVueTools}/JsvDynamicKeyFrames.d.ts +4 -2
  35. package/bin/types/{JsViewVueTools → utils/JsViewVueTools}/JsvImpactTracer.d.ts +4 -4
  36. package/bin/types/{JsViewVueTools → utils/JsViewVueTools}/JsvPreDownloader.d.ts +3 -2
  37. package/bin/types/{JsViewVueTools → utils/JsViewVueTools}/JsvRefTaker.d.ts +2 -3
  38. package/bin/types/{JsViewVueTools → utils/JsViewVueTools}/JsvRuntimeBridge.d.ts +42 -0
  39. package/bin/types/{JsViewVueTools → utils/JsViewVueTools}/JsvStyleSheetsDeclarer.d.ts +3 -1
  40. package/bin/types/utils/JsViewVueTools/JsvTextTools.d.ts +61 -0
  41. package/bin/types/utils/JsViewVueTools/JsvTextureLoadTool.d.ts +63 -0
  42. package/bin/types/{JsViewVueTools → utils/JsViewVueTools}/JsvTextureStore/JsvTextureStore.d.ts +8 -4
  43. package/bin/types/{JsViewVueTools → utils/JsViewVueTools}/NinePatchHelper.d.ts +1 -1
  44. package/bin/types/utils/JsViewVueTools/TextureManagerTools.d.ts +7 -0
  45. package/bin/types/utils/JsViewVueTools/TypeCheckAndSet.d.ts +3 -0
  46. package/bin/types/{JsViewVueTools → utils/JsViewVueTools}/index.d.ts +3 -1
  47. package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvApic/JsvApic/JsvApic.vue.d.ts +7 -0
  48. package/bin/types/utils/JsViewVueWidget/JsvDragBox/JsvDragBox.vue.d.ts +84 -0
  49. package/bin/types/utils/JsViewVueWidget/JsvFlexCell/JsvScreenFlex.vue.d.ts +75 -0
  50. package/bin/types/utils/JsViewVueWidget/JsvFlexCell/index.d.ts +2 -0
  51. package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvFragShaderView/JsvFragShaderView.vue.d.ts +3 -1
  52. package/bin/types/utils/JsViewVueWidget/JsvFragShaderView/index.d.ts +1 -0
  53. package/bin/types/utils/JsViewVueWidget/JsvFreeMoveActor/KeepFlags.d.ts +7 -0
  54. package/bin/types/utils/JsViewVueWidget/JsvInput/Cursor.vue.d.ts +12 -0
  55. package/bin/types/utils/JsViewVueWidget/JsvInput/EditViewOperator.d.ts +45 -0
  56. package/bin/types/utils/JsViewVueWidget/JsvInput/EditVisibleArea.d.ts +26 -0
  57. package/bin/types/{JsViewVueWidget/JsvPreload/BrowserPreload.vue.d.ts → utils/JsViewVueWidget/JsvInput/JsvInput.vue.d.ts} +7 -5
  58. package/bin/types/utils/JsViewVueWidget/JsvInput/SharedDefine.d.ts +13 -0
  59. package/bin/types/utils/JsViewVueWidget/JsvInput/SystemTextTools.d.ts +16 -0
  60. package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvMaskClipDiv.vue.d.ts +0 -2
  61. package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvMindMap/DataTree.d.ts +3 -1
  62. package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvMindMap/Geometry.d.ts +2 -2
  63. package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvMindMap/JsvMindMap.vue.d.ts +16 -9
  64. package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvNativeSharedDiv.vue.d.ts +6 -0
  65. package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvNinePatch.vue.d.ts +2 -1
  66. package/bin/types/utils/JsViewVueWidget/JsvPreload/index.d.ts +2 -0
  67. package/bin/types/utils/JsViewVueWidget/JsvSwiper/Indicator.vue.d.ts +16 -0
  68. package/bin/types/utils/JsViewVueWidget/JsvSwiper3D/Indicator.vue.d.ts +16 -0
  69. package/bin/types/utils/JsViewVueWidget/JsvTextureAnim/index.d.ts +4 -0
  70. package/bin/types/utils/JsViewVueWidget/JsvTouchModeSwitcher.vue.d.ts +75 -0
  71. package/bin/types/utils/JsViewVueWidget/JsvVideo.vue.d.ts +23 -0
  72. package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/index.d.ts +4 -2
  73. package/index.d.ts +9 -1
  74. package/package.json +1 -1
  75. package/tools/config/toolkit.mjs +81 -0
  76. package/tools/config/vite.config.ts +24 -14
  77. package/tools/jsview-vue-build.mjs +67 -21
  78. package/tsconfig.json +27 -0
  79. package/utils/JsViewEngineWidget/JsvFocus/JsvFocusBlock.vue +6 -2
  80. package/utils/JsViewEngineWidget/MetroWidget/ListWidget.vue +3 -1
  81. package/utils/JsViewEngineWidget/MetroWidget/MetroWidget.vue +12 -5
  82. package/utils/JsViewEngineWidget/MetroWidget/MetroWidgetSetup.js +175 -65
  83. package/utils/JsViewEngineWidget/MetroWidget/TaskManager.ts +1 -1
  84. package/utils/JsViewEngineWidget/TemplateParser/Fence.ts +2 -2
  85. package/utils/JsViewEngineWidget/TemplateParser/ListMetroTemplate.ts +15 -9
  86. package/utils/JsViewEngineWidget/TemplateParser/MetroTemplate.ts +4 -6
  87. package/utils/JsViewPlugin/JsvLatex/BrowserDomBuilder.js +13 -3
  88. package/utils/JsViewPlugin/JsvLatex/BrowserJsvLatex.vue +27 -6
  89. package/utils/JsViewPlugin/JsvLatex/JsvLatex.vue +34 -28
  90. package/utils/JsViewPlugin/JsvLatex/index.js +22 -0
  91. package/utils/JsViewVueTools/FeatureActive.ts +84 -0
  92. package/utils/JsViewVueTools/ForgeHandles.ts +7 -3
  93. package/utils/JsViewVueTools/JsvDynamicCssStyle.js +2 -0
  94. package/utils/JsViewVueTools/JsvDynamicKeyFrames.ts +2 -0
  95. package/utils/JsViewVueTools/JsvHashHistory.js +26 -29
  96. package/utils/JsViewVueTools/JsvImpactTracer.js +2 -0
  97. package/utils/JsViewVueTools/JsvPreDownloader.ts +2 -1
  98. package/utils/JsViewVueTools/JsvRefTaker.js +1 -2
  99. package/utils/JsViewVueTools/JsvRuntimeBridge.js +125 -59
  100. package/utils/JsViewVueTools/JsvStyleClass.js +2 -0
  101. package/utils/JsViewVueTools/JsvStyleSheetsDeclarer.js +2 -0
  102. package/utils/JsViewVueTools/JsvTextTools.ts +156 -0
  103. package/utils/JsViewVueTools/JsvTextureLoadTool.ts +233 -0
  104. package/utils/JsViewVueTools/JsvTextureStore/CapturedTexture/CapturedTexture.ts +4 -1
  105. package/utils/JsViewVueTools/JsvTextureStore/JsvTextureStore.ts +7 -3
  106. package/utils/JsViewVueTools/JsvTextureStore/Texture.ts +1 -0
  107. package/utils/JsViewVueTools/TextureManagerTools.ts +17 -0
  108. package/utils/JsViewVueTools/TypeCheckAndSet.ts +66 -0
  109. package/utils/JsViewVueTools/index.js +4 -1
  110. package/utils/JsViewVueWidget/JsvActorMove/JsvActorMove.vue +2 -0
  111. package/utils/JsViewVueWidget/JsvApic/JsvApic/JsvApic.vue +10 -2
  112. package/utils/JsViewVueWidget/JsvApic/JsvApic2/JsvApic2.vue +12 -1
  113. package/utils/JsViewVueWidget/JsvClipDiv/JsvClipDiv.vue +4 -2
  114. package/utils/JsViewVueWidget/JsvConnectLine/JsvConnectLine.vue +2 -0
  115. package/utils/JsViewVueWidget/JsvDragBox/JsvDragBox.vue +219 -0
  116. package/utils/JsViewVueWidget/JsvDriftScope/JsvDriftScope.vue +11 -9
  117. package/utils/JsViewVueWidget/JsvFilterView.vue +2 -0
  118. package/utils/JsViewVueWidget/JsvFlexCell/JsvFlexDiv.vue +5 -2
  119. package/utils/JsViewVueWidget/JsvFlexCell/JsvScreenFlex.vue +140 -0
  120. package/utils/JsViewVueWidget/JsvFlexCell/index.js +2 -5
  121. package/utils/JsViewVueWidget/JsvFragShaderView/JsvFragShaderView.vue +214 -63
  122. package/utils/JsViewVueWidget/JsvFragShaderView/index.js +2 -9
  123. package/utils/JsViewVueWidget/JsvFreeMoveActor/FreeMoveActor.vue +9 -0
  124. package/utils/JsViewVueWidget/JsvFreeMoveActor/JsvEnvBlocker.vue +2 -0
  125. package/utils/JsViewVueWidget/JsvGrid.vue +2 -0
  126. package/utils/JsViewVueWidget/JsvHole.js +2 -0
  127. package/utils/JsViewVueWidget/JsvInput/Cursor.vue +49 -45
  128. package/utils/JsViewVueWidget/JsvInput/EditViewOperator.ts +353 -0
  129. package/utils/JsViewVueWidget/JsvInput/EditVisibleArea.ts +255 -0
  130. package/utils/JsViewVueWidget/JsvInput/JsvInput.vue +294 -681
  131. package/utils/JsViewVueWidget/JsvInput/SharedDefine.ts +17 -0
  132. package/utils/JsViewVueWidget/JsvInput/SystemTextTools.ts +61 -0
  133. package/utils/JsViewVueWidget/JsvLine/JsvLine.vue +2 -0
  134. package/utils/JsViewVueWidget/JsvMarquee.vue +2 -0
  135. package/utils/JsViewVueWidget/JsvMaskClipDiv.vue +5 -48
  136. package/utils/JsViewVueWidget/JsvMindMap/DataTree.ts +14 -1
  137. package/utils/JsViewVueWidget/JsvMindMap/JsvMindMap.vue +277 -117
  138. package/utils/JsViewVueWidget/JsvNativeSharedDiv.vue +91 -68
  139. package/utils/JsViewVueWidget/JsvNinePatch.vue +5 -0
  140. package/utils/JsViewVueWidget/JsvPieChart.vue +2 -0
  141. package/utils/JsViewVueWidget/JsvPosterDiv.vue +2 -0
  142. package/utils/JsViewVueWidget/JsvPosterImage.vue +3 -2
  143. package/utils/JsViewVueWidget/JsvPreload/JsvPreload.vue +23 -44
  144. package/utils/JsViewVueWidget/JsvPreload/index.js +2 -13
  145. package/utils/JsViewVueWidget/JsvProgressBar.vue +2 -0
  146. package/utils/JsViewVueWidget/JsvQrcode/JsvQrcode.vue +12 -12
  147. package/utils/JsViewVueWidget/JsvRadarChart.vue +2 -0
  148. package/utils/JsViewVueWidget/JsvRipple/Constant.js +2 -2
  149. package/utils/JsViewVueWidget/JsvRipple/JsvRipple.vue +3 -1
  150. package/utils/JsViewVueWidget/JsvScaleTextBox.vue +2 -0
  151. package/utils/JsViewVueWidget/JsvScrollBox/JsvScrollBox.vue +9 -0
  152. package/utils/JsViewVueWidget/JsvScrollBox/JsvScrollFollow.vue +9 -0
  153. package/utils/JsViewVueWidget/JsvSector.vue +2 -0
  154. package/utils/JsViewVueWidget/JsvSoundPool.js +5 -7
  155. package/utils/JsViewVueWidget/JsvSpray/JsvSpray.vue +43 -23
  156. package/utils/JsViewVueWidget/JsvSpriteAnim/JsvSpriteAnim.vue +2 -5
  157. package/utils/JsViewVueWidget/JsvSpriteAnim/JsvSpriteLoader.vue +2 -0
  158. package/utils/JsViewVueWidget/JsvSwiper/JsvSwiper.vue +2 -0
  159. package/utils/JsViewVueWidget/JsvSwiper3D/JsvSwiper.vue +2 -0
  160. package/utils/JsViewVueWidget/JsvTextBox.vue +2 -4
  161. package/utils/JsViewVueWidget/JsvTextureAnim/JsvTextureAnim.vue +48 -50
  162. package/utils/JsViewVueWidget/JsvTextureAnim/index.js +2 -9
  163. package/utils/JsViewVueWidget/JsvTouchModeSwitcher.vue +101 -0
  164. package/utils/JsViewVueWidget/JsvVideo.vue +2 -2
  165. package/utils/JsViewVueWidget/JsvVisibleSensor/JsvVisibleSensor.vue +2 -0
  166. package/utils/JsViewVueWidget/index.js +4 -2
  167. package/bin/browser/BrowserJsvFragShaderView.vue.mjs +0 -63
  168. package/bin/browser/BrowserPreload.vue.mjs +0 -143
  169. package/bin/browser/BrowserQrcode.vue.mjs +0 -180
  170. package/bin/browser/BrowserSpray.vue.mjs +0 -66
  171. package/bin/browser/BrowserTextureAnim.vue.mjs +0 -332
  172. package/bin/types/JsViewEngineWidget/JsvFocus/JsvFocusBlock.vue.d.ts +0 -102
  173. package/bin/types/JsViewVueTools/ForgeHandles.d.ts +0 -6
  174. package/bin/types/JsViewVueTools/JsvTextTools.d.ts +0 -37
  175. package/bin/types/JsViewVueTools/TypeCheckAndSet.d.ts +0 -2
  176. package/bin/types/JsViewVueWidget/JsvFlexCell/index.d.ts +0 -2
  177. package/bin/types/JsViewVueWidget/JsvFragShaderView/BrowserJsvFragShaderView.vue.d.ts +0 -13
  178. package/bin/types/JsViewVueWidget/JsvFragShaderView/index.d.ts +0 -2
  179. package/bin/types/JsViewVueWidget/JsvInput/Cursor.vue.d.ts +0 -36
  180. package/bin/types/JsViewVueWidget/JsvInput/JsvInput.vue.d.ts +0 -210
  181. package/bin/types/JsViewVueWidget/JsvPreload/index.d.ts +0 -17
  182. package/bin/types/JsViewVueWidget/JsvQrcode/BrowserQrcode.vue.d.ts +0 -11
  183. package/bin/types/JsViewVueWidget/JsvQrcode/index.d.ts +0 -2
  184. package/bin/types/JsViewVueWidget/JsvSpray/BrowserSpray.vue.d.ts +0 -25
  185. package/bin/types/JsViewVueWidget/JsvSpray/index.d.ts +0 -2
  186. package/bin/types/JsViewVueWidget/JsvTextureAnim/BrowserTextureAnim.vue.d.ts +0 -151
  187. package/bin/types/JsViewVueWidget/JsvTextureAnim/index.d.ts +0 -14
  188. package/tools/config/tsconfig.json +0 -15
  189. package/utils/JsViewVueTools/JsvTextTools.js +0 -89
  190. package/utils/JsViewVueTools/TypeCheckAndSet.js +0 -27
  191. package/utils/JsViewVueWidget/JsvFragShaderView/BrowserJsvFragShaderView.vue +0 -48
  192. package/utils/JsViewVueWidget/JsvPreload/BrowserPreload.vue +0 -144
  193. package/utils/JsViewVueWidget/JsvQrcode/BrowserQrcode.vue +0 -189
  194. package/utils/JsViewVueWidget/JsvQrcode/index.js +0 -18
  195. package/utils/JsViewVueWidget/JsvSpray/BrowserSpray.vue +0 -55
  196. package/utils/JsViewVueWidget/JsvSpray/index.js +0 -17
  197. package/utils/JsViewVueWidget/JsvTextureAnim/BrowserTextureAnim.vue +0 -359
  198. package/bin/types/{JsViewEngineWidget → utils/JsViewEngineWidget}/CheckType.d.ts +0 -0
  199. package/bin/types/{JsViewEngineWidget → utils/JsViewEngineWidget}/JsvFocus/JsvFocusHub.d.ts +0 -0
  200. package/bin/types/{JsViewEngineWidget → utils/JsViewEngineWidget}/JsvFocus/JsvFocusManager.d.ts +0 -0
  201. package/bin/types/{JsViewEngineWidget → utils/JsViewEngineWidget}/MetroWidget/Const.d.ts +0 -0
  202. package/bin/types/{JsViewEngineWidget → utils/JsViewEngineWidget}/MetroWidget/Dispatcher.d.ts +0 -0
  203. package/bin/types/{JsViewEngineWidget → utils/JsViewEngineWidget}/MetroWidget/PageUpdater.d.ts +0 -0
  204. package/bin/types/{JsViewEngineWidget → utils/JsViewEngineWidget}/MetroWidget/RenderItem.d.ts +0 -0
  205. package/bin/types/{JsViewEngineWidget → utils/JsViewEngineWidget}/MetroWidget/Slide.d.ts +0 -0
  206. package/bin/types/{JsViewEngineWidget → utils/JsViewEngineWidget}/MetroWidget/SlotComponent.vue.d.ts +0 -0
  207. package/bin/types/{JsViewEngineWidget → utils/JsViewEngineWidget}/MetroWidget/VisibleInfo.d.ts +0 -0
  208. package/bin/types/{JsViewEngineWidget → utils/JsViewEngineWidget}/MetroWidget/WidgetRectInfo.d.ts +0 -0
  209. package/bin/types/{JsViewEngineWidget → utils/JsViewEngineWidget}/RangeModel.d.ts +0 -0
  210. package/bin/types/{JsViewEngineWidget → utils/JsViewEngineWidget}/TemplateParser/CommonMetroTemplate.d.ts +0 -0
  211. package/bin/types/{JsViewEngineWidget → utils/JsViewEngineWidget}/TemplateParser/ListMetroTemplate.d.ts +0 -0
  212. package/bin/types/{JsViewEngineWidget → utils/JsViewEngineWidget}/TemplateParser/TemplateItemAdder.d.ts +0 -0
  213. package/bin/types/{JsViewEngineWidget → utils/JsViewEngineWidget}/TemplateParser/index.d.ts +0 -0
  214. package/bin/types/{JsViewEngineWidget → utils/JsViewEngineWidget}/WidgetCommon.d.ts +0 -0
  215. package/bin/types/{JsViewPlugin → utils/JsViewPlugin}/JsvAccount/JsvAccount.d.ts +0 -0
  216. package/bin/types/{JsViewPlugin → utils/JsViewPlugin}/JsvAudio/AudioProxy.d.ts +0 -0
  217. package/bin/types/{JsViewPlugin → utils/JsViewPlugin}/JsvAudio/BrowserAudio/BrowserAudio.vue.d.ts +0 -0
  218. package/bin/types/{JsViewPlugin → utils/JsViewPlugin}/JsvAudio/BrowserAudio/JsvSystemAudio.vue.d.ts +4 -4
  219. package/bin/types/{JsViewPlugin → utils/JsViewPlugin}/JsvAudio/CheckType.d.ts +0 -0
  220. package/bin/types/{JsViewPlugin → utils/JsViewPlugin}/JsvAudio/Events.d.ts +0 -0
  221. package/bin/types/{JsViewPlugin → utils/JsViewPlugin}/JsvAudio/JsvAudio.vue.d.ts +4 -4
  222. package/bin/types/{JsViewPlugin → utils/JsViewPlugin}/JsvAudio/JsvAudioBridgeProxy.d.ts +0 -0
  223. package/bin/types/{JsViewPlugin → utils/JsViewPlugin}/JsvAudio/JsvAudioProxy.vue.d.ts +0 -0
  224. package/bin/types/{JsViewPlugin → utils/JsViewPlugin}/JsvAudio/PluginLoader.d.ts +0 -0
  225. package/bin/types/{JsViewPlugin → utils/JsViewPlugin}/JsvAudio/ScreenLockManager.d.ts +0 -0
  226. package/bin/types/{JsViewPlugin → utils/JsViewPlugin}/JsvAudio/index.d.ts +0 -0
  227. package/bin/types/{JsViewPlugin → utils/JsViewPlugin}/JsvAudio/version.d.ts +0 -0
  228. package/bin/types/{JsViewPlugin → utils/JsViewPlugin}/JsvLatex/BrowserDomBuilder.d.ts +0 -0
  229. package/bin/types/{JsViewPlugin → utils/JsViewPlugin}/JsvLatex/BrowserJsvLatex.vue.d.ts +4 -4
  230. package/bin/types/{JsViewPlugin → utils/JsViewPlugin}/JsvLatex/Color.d.ts +0 -0
  231. package/bin/types/{JsViewPlugin → utils/JsViewPlugin}/JsvLatex/JsvLatex.vue.d.ts +4 -4
  232. package/bin/types/{JsViewPlugin → utils/JsViewPlugin}/JsvLatex/JsvLatexBridgeProxy.d.ts +0 -0
  233. package/bin/types/{JsViewPlugin → utils/JsViewPlugin}/JsvLatex/JsvLatexProxy.vue.d.ts +0 -0
  234. package/bin/types/{JsViewPlugin → utils/JsViewPlugin}/JsvLatex/PluginLoader.d.ts +0 -0
  235. package/bin/types/{JsViewPlugin → utils/JsViewPlugin}/JsvLatex/version.d.ts +0 -0
  236. package/bin/types/{JsViewPlugin → utils/JsViewPlugin}/index.d.ts +0 -0
  237. package/bin/types/{JsViewVueTools → utils/JsViewVueTools}/ConstSymbol.d.ts +0 -0
  238. package/bin/types/{JsViewVueTools → utils/JsViewVueTools}/DebugContentShellJBridge.d.ts +0 -0
  239. package/bin/types/{JsViewVueTools → utils/JsViewVueTools}/DebugTool.d.ts +0 -0
  240. package/bin/types/{JsViewVueTools → utils/JsViewVueTools}/DefaultKeyMap.d.ts +0 -0
  241. package/bin/types/{JsViewVueTools → utils/JsViewVueTools}/ForgeConstDefine.d.ts +0 -0
  242. package/bin/types/{JsViewVueTools → utils/JsViewVueTools}/JsvDemoTester.d.ts +0 -0
  243. package/bin/types/{JsViewVueTools → utils/JsViewVueTools}/JsvFederationTools.d.ts +0 -0
  244. package/bin/types/{JsViewVueTools → utils/JsViewVueTools}/JsvHashHistory.d.ts +0 -0
  245. package/bin/types/{JsViewVueTools → utils/JsViewVueTools}/JsvPerformance.d.ts +0 -0
  246. package/bin/types/{JsViewVueTools → utils/JsViewVueTools}/JsvStyleClass.d.ts +0 -0
  247. package/bin/types/{JsViewVueTools → utils/JsViewVueTools}/JsvTextureDefines.d.ts +0 -0
  248. package/bin/types/{JsViewVueTools → utils/JsViewVueTools}/JsvTextureStore/CanvasTexture/CanvasTexture.d.ts +0 -0
  249. package/bin/types/{JsViewVueTools → utils/JsViewVueTools}/JsvTextureStore/CanvasTexture/CommandList.d.ts +0 -0
  250. package/bin/types/{JsViewVueTools → utils/JsViewVueTools}/JsvTextureStore/CanvasTexture/Path.d.ts +0 -0
  251. package/bin/types/{JsViewVueTools → utils/JsViewVueTools}/JsvTextureStore/CapturedTexture/CapturedTexture.d.ts +0 -0
  252. package/bin/types/{JsViewVueTools → utils/JsViewVueTools}/JsvTextureStore/Store.d.ts +0 -0
  253. package/bin/types/{JsViewVueTools → utils/JsViewVueTools}/JsvTextureStore/Texture.d.ts +0 -0
  254. package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvActorMove/ActorControlBase.d.ts +0 -0
  255. package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvActorMove/JsvActorMove.vue.d.ts +0 -0
  256. package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvActorMove/JsvActorMoveControl.d.ts +0 -0
  257. package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvActorMove/index.d.ts +0 -0
  258. package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvApic/JsvApic/BrowserApic.vue.d.ts +1 -1
  259. package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvApic/JsvApic/index.d.ts +0 -0
  260. package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvApic/JsvApic2/BrowserApic2.vue.d.ts +1 -1
  261. package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvApic/JsvApic2/JsvApic2.vue.d.ts +0 -0
  262. package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvApic/JsvApic2/index.d.ts +0 -0
  263. package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvApic/JsvBrowserApicLib/ApicDataBase.d.ts +0 -0
  264. package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvApic/JsvBrowserApicLib/BrowserApicLib.d.ts +0 -0
  265. package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvApic/JsvBrowserApicLib/GifData.d.ts +0 -0
  266. package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvApic/JsvBrowserApicLib/NormalLoopTool.d.ts +0 -0
  267. package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvApic/JsvBrowserApicLib/PartLoopTool.d.ts +0 -0
  268. package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvApic/JsvBrowserApicLib/SingleLoopTool.d.ts +0 -0
  269. package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvApic/JsvBrowserApicLib/Viewer.d.ts +0 -0
  270. package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvApic/JsvBrowserApicLib/WebpData.d.ts +0 -0
  271. package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvApic/JsvCommonLoopToolBase.d.ts +0 -0
  272. package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvClipDiv/JsvClipDiv.vue.d.ts +0 -0
  273. package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvClipDiv/index.d.ts +0 -0
  274. package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvConnectLine/ArcLineManager.d.ts +0 -0
  275. package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvConnectLine/JsvConnectLine.vue.d.ts +2 -2
  276. package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvConnectLine/index.d.ts +0 -0
  277. package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvDriftScope/JsvDriftScope.vue.d.ts +0 -0
  278. package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvDriftScope/index.d.ts +0 -0
  279. package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvEnableRenderBreak.vue.d.ts +0 -0
  280. package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvFilterView.vue.d.ts +3 -3
  281. package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvFlexCell/JsvFlexDiv.vue.d.ts +0 -0
  282. package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvFreeMoveActor/ActionRefObject.d.ts +0 -0
  283. package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvFreeMoveActor/ActorControl.d.ts +0 -0
  284. package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvFreeMoveActor/ActorState.d.ts +0 -0
  285. package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvFreeMoveActor/CallbackManager.d.ts +0 -0
  286. package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvFreeMoveActor/ForgeTypeDefine.d.ts +0 -0
  287. package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvFreeMoveActor/FreeMoveActor.vue.d.ts +9 -9
  288. package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvFreeMoveActor/JsvEnvBlocker.vue.d.ts +3 -3
  289. package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvFreeMoveActor/NexusNode.d.ts +0 -0
  290. package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvFreeMoveActor/SetAction.d.ts +0 -0
  291. package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvFreeMoveActor/SetCondition.d.ts +0 -0
  292. package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvFreeMoveActor/SetState.d.ts +0 -0
  293. package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvFreeMoveActor/SyncLinkManager.d.ts +0 -0
  294. package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvFreeMoveActor/index.d.ts +0 -0
  295. package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvGrid.vue.d.ts +0 -0
  296. package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvHole.d.ts +0 -0
  297. package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvInput/index.d.ts +0 -0
  298. package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvLine/JsvLine.vue.d.ts +3 -3
  299. package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvLine/LineManager.d.ts +0 -0
  300. package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvLine/index.d.ts +0 -0
  301. package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvMarquee.vue.d.ts +0 -0
  302. package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvMindMap/CommonType.d.ts +0 -0
  303. package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvMindMap/Constant.d.ts +0 -0
  304. package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvMindMap/index.d.ts +0 -0
  305. package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvMindMap/rtree.d.ts +0 -0
  306. package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvPieChart.vue.d.ts +0 -0
  307. package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvPosterDiv.vue.d.ts +0 -0
  308. package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvPosterImage.vue.d.ts +0 -0
  309. package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvPreload/JsvPreload.vue.d.ts +0 -0
  310. package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvProgressBar.vue.d.ts +1 -1
  311. package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvQrcode/JsvQrcode.vue.d.ts +1 -1
  312. package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvRadarChart.vue.d.ts +1 -1
  313. package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvRipple/Constant.d.ts +0 -0
  314. package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvRipple/JsvRipple.vue.d.ts +3 -3
  315. package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvRipple/index.d.ts +0 -0
  316. package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvScaleTextBox.vue.d.ts +0 -0
  317. package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvScrollBox/JsvScrollBox.vue.d.ts +0 -0
  318. package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvScrollBox/JsvScrollFollow.vue.d.ts +0 -0
  319. package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvScrollBox/ScrollInnerSymbol.d.ts +0 -0
  320. package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvScrollBox/ScrollSymbol.d.ts +0 -0
  321. package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvScrollBox/index.d.ts +0 -0
  322. package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvSector.vue.d.ts +0 -0
  323. package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvSoundPool.d.ts +0 -0
  324. package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvSpray/JsvSpray.vue.d.ts +0 -0
  325. package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvSpriteAnim/FrameBuidler.d.ts +0 -0
  326. package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvSpriteAnim/JsvSpriteAnim.vue.d.ts +0 -0
  327. package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvSpriteAnim/JsvSpriteLoader.vue.d.ts +0 -0
  328. package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvSpriteAnim/JsvSpriteTools.d.ts +0 -0
  329. package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvSpriteAnim/SpriteController.d.ts +0 -0
  330. package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvSpriteAnim/index.d.ts +0 -0
  331. package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvSpriteAnim/sAnimationToken.d.ts +0 -0
  332. package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvSwiper/JsvSwiper.vue.d.ts +1 -1
  333. package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvSwiper/index.d.ts +0 -0
  334. package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvSwiper3D/JsvSwiper.vue.d.ts +3 -3
  335. package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvSwiper3D/index.d.ts +0 -0
  336. package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvTextBox.vue.d.ts +0 -0
  337. package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvTextureAnim/CommonType.d.ts +0 -0
  338. package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvTextureAnim/JsvTextureAnim.vue.d.ts +0 -0
  339. package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvVisibleSensor/JsvVisibleSensor.vue.d.ts +6 -6
  340. package/bin/types/{JsViewVueWidget → utils/JsViewVueWidget}/JsvVisibleSensor/index.d.ts +6 -6
  341. /package/bin/types/{index.d.ts → utils/index.d.ts} +0 -0
@@ -0,0 +1,233 @@
1
+ /**
2
+ * @file
3
+ *
4
+ * 内部组件
5
+ *
6
+ * JsvTextureLoadTool: 对给定列表的图片资源进行后台预加载
7
+ * 特别注意: 在vue组件进行关联时,要在unmounted中进行对preload返回的句柄进行主动的release动作
8
+ *
9
+ * @method
10
+ * preload
11
+ * @param {Array(ItemSet)} preloadList
12
+ * @param {Function} finishCallback
13
+ */
14
+
15
+ import ForgeHandles from "./ForgeHandles";
16
+
17
+ const CONST_FORMAT_TOKEN = 3349;
18
+ class ItemSet {
19
+ public url: String | null;
20
+ public width: number;
21
+ public height: number;
22
+ public colorType: String;
23
+ public netSetting: any;
24
+ public isPosterImg: boolean;
25
+ public magicToken: number = CONST_FORMAT_TOKEN; // 用于规避非规定的输入值
26
+
27
+ /**
28
+ * @constructor
29
+ * @param {String} url 必填,图片的url,目前只支持 http:// 和 ./ 两个格式
30
+ * @param {number} width 选填,是否为了省内存而按照给定尺寸压缩图片
31
+ * @param {number} height 选填,是否为了省内存而按照给定尺寸压缩图片
32
+ * @param {String} color_type 选填,是否为了省内存而做成其他的图片解码格式
33
+ * @param {String} net_setting 选填,是否有特殊的网络header设置
34
+ * @param {boolean} is_poster_img 选填, 是否为统计为海报,海报有一套解码优先级处理
35
+ */
36
+ constructor(
37
+ url: String,
38
+ width: number = 0,
39
+ height: number = 0,
40
+ color_type: String = "RGBA_8888",
41
+ net_setting: any = null,
42
+ is_poster_img: boolean = false
43
+ ) {
44
+ if (!url || url.length == 0) {
45
+ console.warn("Error: url should not empty(null, \"\")");
46
+ }
47
+ this.url = url;
48
+ this.width = width;
49
+ this.height = height;
50
+ this.colorType = color_type;
51
+ this.netSetting = net_setting;
52
+ this.isPosterImg = is_poster_img;
53
+ }
54
+ }
55
+
56
+ class ItemStatus {
57
+ public loadStatus: boolean = false;
58
+ public listenerToken: number = -1;
59
+ public textureRef: any;
60
+
61
+ releaseResource() {
62
+ if (this.listenerToken != -1 && this.textureRef) {
63
+ this.textureRef.DisableBackgroundLoad();
64
+ this.textureRef.UnregisterLoadImageCallback(
65
+ this.listenerToken
66
+ );
67
+
68
+ this.listenerToken = -1;
69
+ this.textureRef = null;
70
+ }
71
+ }
72
+ }
73
+
74
+ class ListStatus {
75
+ public loadStatusList: Array<ItemStatus>;
76
+ public loadedInfoList: Array<any>;
77
+ public originDataList: Array<ItemSet>;
78
+ public loadingItemCount: number = 0;
79
+ public finishCallback: Function;
80
+
81
+ constructor(origin_data: Array<ItemSet>, finish_callback: Function) {
82
+ this.loadStatusList = new Array(origin_data.length).fill(null);
83
+ this.loadedInfoList = new Array(origin_data.length).fill(null);
84
+ this.originDataList = origin_data;
85
+ this.finishCallback = finish_callback;
86
+ }
87
+
88
+ onLoaded(index: number, loaded_info: any) {
89
+ let item_status = this.loadStatusList[index];
90
+ if (item_status && !item_status.loadStatus) {
91
+ item_status.loadStatus = true;
92
+ this.loadedInfoList[index] = loaded_info;
93
+ this.loadingItemCount--;
94
+ if (this.loadingItemCount == 0) {
95
+ this.finishCallback?.(this.loadedInfoList);
96
+ }
97
+ } else {
98
+ console.warn(`warn: url=${this.originDataList[index].url} already true`)
99
+ }
100
+ }
101
+
102
+ recycleResource() {
103
+ for (let item of this.loadStatusList) {
104
+ item?.releaseResource();
105
+ }
106
+ }
107
+ }
108
+
109
+ const _buildTextureRequest = (index: number, item_set: ItemSet, list_recorder: ListStatus): boolean => {
110
+ if (item_set.magicToken !== CONST_FORMAT_TOKEN) {
111
+ console.error(
112
+ "Error:format mismatch, data should comes from function buildPreloadInfo()"
113
+ );
114
+ return false;
115
+ }
116
+
117
+ const base_url = item_set.url;
118
+ let image_url = base_url;
119
+ if (base_url) {
120
+ if (base_url.startsWith("jsvtexturestore://")) {
121
+ // 直接加载,不需要跟踪
122
+ return false;
123
+ } else if (base_url.startsWith(".") || base_url?.startsWith("/")) {
124
+ // 相对路径,要根据jsview的api进行改造
125
+ if ((window as any).JsView) {
126
+ image_url = (((window as any).JsView as any).Dom as any).UrlRef(base_url).herf;
127
+ } else {
128
+ // Browser端不需要调整url
129
+ }
130
+ }
131
+
132
+ // 是否为指定size节省内存的texture
133
+ let target_size: { width: number, height: number } | null = null;
134
+ if (item_set.width !== 0 && item_set.height !== 0) {
135
+ target_size = { width: item_set.width, height: item_set.height };
136
+ }
137
+
138
+ let texture: any = ForgeHandles.TextureManager.GetImage2(
139
+ image_url,
140
+ false,
141
+ target_size,
142
+ item_set.colorType,
143
+ item_set.netSetting ?? "",
144
+ item_set.isPosterImg
145
+ );
146
+
147
+ if (!texture) {
148
+ console.error(
149
+ "Error: Preload view build texture failed for " + image_url
150
+ );
151
+ return false;
152
+ }
153
+
154
+ let item_status: ItemStatus = new ItemStatus();
155
+ list_recorder.loadStatusList[index] = item_status;
156
+
157
+ // 追加回调处理
158
+ item_status.listenerToken = texture.RegisterLoadImageCallback(null, (params: any) => {
159
+ console.log(`preload succeed ${item_set.url}, params:${JSON.stringify(params)}`);
160
+ list_recorder.loadStatusList[index].releaseResource();
161
+ list_recorder.onLoaded(index, params);
162
+ });
163
+ // 脱离view进行加载,
164
+ // 如果没有真实的view进行挂载很可能就会被快速地清理掉
165
+ // 但理论上,使用此组件的外部vue会对图片进行捆绑
166
+ texture.EnableBackgroundLoad();
167
+
168
+ // 记录textureRef,为了进行release时的释放动作
169
+ item_status.textureRef = texture;
170
+
171
+ return true;
172
+ } else {
173
+ return false;
174
+ }
175
+ }
176
+
177
+ const _readPreloadViewIdList = (
178
+ preload_list_data: Array<ItemSet> | null,
179
+ finish_callback: Function): ListStatus | null => {
180
+
181
+ if (!preload_list_data || preload_list_data?.length == 0) {
182
+ console.warn("empty list");
183
+ return null;
184
+ }
185
+
186
+ let ret_list_status: ListStatus = new ListStatus(preload_list_data, finish_callback);
187
+
188
+ // 直接在map前将为null的值删除掉
189
+ for (let i = 0; i < preload_list_data.length; i++) {
190
+ if (!preload_list_data[i] || !preload_list_data[i].url) {
191
+ continue;
192
+ }
193
+
194
+ if (_buildTextureRequest(i, preload_list_data[i], ret_list_status)) {
195
+ // 记录已经发送的texture请求
196
+ ret_list_status.loadingItemCount++;
197
+ } else {
198
+ // jsvtexturestore or build texture failed
199
+ }
200
+ }
201
+
202
+ if (ret_list_status.loadingItemCount == 0) {
203
+ // 无需要preload的内容
204
+ return null;
205
+ } else {
206
+ return ret_list_status;
207
+ }
208
+ };
209
+
210
+ /**
211
+ * 对给定的ItemSet进行preload加载,返回 ListStatus,
212
+ * 注意: 在vue的unmount处理中要调用ListStatus.recycleResource()进行资源回收
213
+ *
214
+ * @function
215
+ * @param {ItemSet} preload_list_data 要加载资源的ItemSet列表
216
+ * @param {Function} finish_callback 全加载完成后的回调函数
217
+ * @returns {ListStatus}
218
+ */
219
+ function preload(
220
+ preload_list_data: Array<ItemSet> | null,
221
+ finish_callback: Function): ListStatus | null {
222
+
223
+ return _readPreloadViewIdList(preload_list_data, finish_callback);
224
+ }
225
+
226
+ const JsvTextureLoadTool = {
227
+ preload,
228
+ ItemSet
229
+ }
230
+
231
+ export {
232
+ JsvTextureLoadTool
233
+ }
@@ -1,5 +1,6 @@
1
1
  import ForgeHandles from "../../../JsViewVueTools/ForgeHandles";
2
2
  import { TextureBase } from "../Texture"
3
+ import { FeatureNames, JsvUseFeature } from "../../FeatureActive";
3
4
 
4
5
  export type CapturedCallback = (
5
6
  textureAccessName: string,
@@ -19,6 +20,9 @@ export class CapturedTexture extends TextureBase {
19
20
  autoRecycle: boolean) {
20
21
  super(null);
21
22
 
23
+ // 激活引擎的功能支持
24
+ JsvUseFeature('JsvTextureStoreApi', FeatureNames.Capture2Texture);
25
+
22
26
  this._CaptureDiv = captureDiv;
23
27
  this._Callback = callback;
24
28
  this._AutoRecycle = autoRecycle;
@@ -45,7 +49,6 @@ export class CapturedTexture extends TextureBase {
45
49
 
46
50
  // 处理自动回收
47
51
  if (!this._AutoRecycle) {
48
- this.textureRef.DisableAutoRecycle(); // 取消自动清理
49
52
  this.addToStore(); // 用TextureStore来跟进引用状态
50
53
  }
51
54
 
@@ -1,5 +1,6 @@
1
1
  /*!
2
- * JsvTextureStoreApi
2
+ * @file JsvTextureStoreApi
3
+ *
3
4
  * canvasTexture:
4
5
  * 创建texture(图片纹理)句柄, 通过 CanvasTexture 的API进行绘制, 使用注意以下几点
5
6
  * a. commit() 接口调用之前可以任意绘制, commit之后就无法更改, commit之后才能使用, commit后绘制内容会被全局保存
@@ -59,8 +60,11 @@ let sTextureStoreApi = {
59
60
  * width: number, // 截取div的宽
60
61
  * height: number) => void // 截取div的高
61
62
  * @param {boolean} autoRecycle 可选, 是否当无div/img引用时会自动释放
62
- * true的场景在callback收到资源名后, 需要使用完毕后调用 deleteTexture 手动释放
63
- * 在手动释放之前,可以赋给其他div/img来复用
63
+ * true默认值: 此场景在回调时要立刻赋值给响应式变量控制template的节点立刻使用(并且不是v-if=false的节点),
64
+ 否则会自动释放掉, 此时, texture当使用它的template节点从dom树中去掉的时候(v-if=false也算)会自动释放,
65
+ 不需要主动调用deleteTexture释放.
66
+ false: 此场景在callback收到资源名后, 需要使用完毕后调用 deleteTexture 手动释放
67
+ 在手动释放之前,可以赋给其他div/img来复用
64
68
  * @return {CapturedTexture} 用于cancel的句柄,当cancel时,会清理对div和Callback的引用
65
69
  */
66
70
  capture2Texture: (
@@ -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
+ }
@@ -0,0 +1,66 @@
1
+ var number_convert_tmp = new Float32Array(1);
2
+
3
+ /**
4
+ * 创建基于基地址的全地址模式
5
+ * 主要用于转化以下的URL类型
6
+ * 类型1: "url(/相对路径/项目资源/1.png)"
7
+ * 类型2: "/相对路径/项目资源/1.png"
8
+ * 类型3: jsview内定类型 "jsvtexturestore:xxxx"
9
+ * 类型4: 未知的内定类型 "data:xxxx"
10
+ *
11
+ * 同时兼容送入http://完整路径/1.png,转换出来结果等同于没有对此url进行变化
12
+ *
13
+ * @param {string} origin_url
14
+ * @return {String}
15
+ */
16
+ function parseUrl(origin_url: String): String {
17
+ let url_result = origin_url;
18
+
19
+ // url(/xxx/xxx) 格式
20
+ if (url_result.startsWith('url') === true) {
21
+ let startIdx = url_result.indexOf('(') + 1;
22
+ let endIdx = url_result.lastIndexOf(')');
23
+ url_result = url_result.substring(startIdx, endIdx).trim();
24
+ if (url_result === "undefined" || url_result === "null" || url_result.length === 0) {
25
+ // 空内容,不进行其他自动解析和填充
26
+ return url_result;
27
+ }
28
+ }
29
+
30
+ // data:xxxx, jsvtexturestore:xxxx 格式
31
+ if (url_result.startsWith('data:') === true || url_result.startsWith('jsvtexturestore:') === true) {
32
+ return url_result;
33
+ }
34
+
35
+ // 拆掉 url() 包装后的url相对路径转换
36
+ let base_url = (window.location as any).jsvGetLocation ?
37
+ (window.location as any).jsvGetLocation() // native运行场景,启动链接为 mjs 非 index.html场景
38
+ : window.location.href;
39
+ let url_parse = new (window as any).JsvCoreApi.UrlBuilder(url_result, base_url);
40
+
41
+ return url_parse.href;
42
+ }
43
+
44
+ function numberCheckSet(number: number): number {
45
+ number_convert_tmp[0] = number; // 强制类型转换, 避免JSON化时类型出错,因为 '123' 123 都能通过Nan检测
46
+ if (!isNaN(number_convert_tmp[0])) {
47
+ return number_convert_tmp[0];
48
+ } else {
49
+ console.warn(`${number} is not type of number, default as 0`);
50
+ return 0;
51
+ }
52
+ }
53
+
54
+ function urlCheckSet(origin_url: String): String {
55
+ if (origin_url && origin_url.indexOf("http") === 0) {
56
+ // 包含http和https两种请求
57
+ return origin_url;
58
+ } else {
59
+ return parseUrl(origin_url);
60
+ }
61
+ }
62
+
63
+ export {
64
+ numberCheckSet,
65
+ urlCheckSet
66
+ };
@@ -9,7 +9,7 @@ export * from "./JsvDynamicCssStyle";
9
9
  export * from "./JsvDynamicKeyFrames";
10
10
  export * from "./JsvRuntimeBridge";
11
11
  export * from "./NinePatchHelper";
12
- export * from "./TypeCheckAndSet";
12
+ export * from "./TypeCheckAndSet.ts";
13
13
  export * from "./JsvRefTaker";
14
14
  export * from "./JsvStyleClass";
15
15
  export * from "./JsvStyleSheetsDeclarer";
@@ -26,3 +26,6 @@ export * from "./JsvTextureDefines"
26
26
  export * from "./JsvFederationTools"
27
27
  export * from "./ConstSymbol"
28
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进行组合来实现
@@ -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,
@@ -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: {
@@ -1,9 +1,11 @@
1
1
  <!--
2
+ * @file
3
+ *
2
4
  * 【模块 export 内容】
3
5
  * JsvClipDiv: Vue高阶组件,overhidden:true的div,附带有其他clip设定能力
4
6
  * props说明:
5
- style: {Object} (必选, 响应式) 同div的style, 提供top, left, width, height, transition, transform信息,
6
- 但目前不支持borderRaduis
7
+ * style: {Object} (必选, 响应式) 同div的style, 提供top, left, width, height, transition, transform信息,
8
+ * 但目前不支持borderRaduis
7
9
  *
8
10
  * expose函数说明:
9
11
  *
@@ -1,4 +1,6 @@
1
1
  <!--
2
+ * @file
3
+ *
2
4
  * 【模块 export 内容】
3
5
  * JsvConnectLine:Vue高阶组件,由JsvLine组件变化而来,用于连接两个区域的线条。
4
6
  * props说明(注意:全部属性非响应式, 需要变更时用 key 来触发重绘):
@@ -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>