@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
@@ -1,7 +1,7 @@
1
1
  <script setup>
2
2
  // import "./mathjax-tex-svg.js";
3
3
  import { Forge } from "@shijiu/jsview/dom/jsv-forge-define";
4
- import { shallowRef, onBeforeUnmount } from "vue";
4
+ import { ref, shallowRef, onBeforeUnmount } from "vue";
5
5
  import { getHtmlStr } from "./BrowserDomBuilder.js";
6
6
 
7
7
  const props = defineProps({
@@ -39,20 +39,39 @@ const props = defineProps({
39
39
  },
40
40
  });
41
41
 
42
+ function precessString(original) {
43
+ return (
44
+ "\\[\\begin{array}{l}" +
45
+ original.replaceAll(/\\[\(\)\[\]]/g, "") +
46
+ "\\end{array}\\]"
47
+ );
48
+ }
42
49
  let innerViewId = shallowRef(-1);
50
+ const clientWidth = ref(props.width);
51
+ const clientHeight = ref(props.height);
43
52
 
44
53
  let layoutView = new Forge.IFrameView();
45
54
  layoutView.SetIframeSize(props.width, props.height);
46
55
  layoutView.SetInnerHtml(
47
56
  getHtmlStr(
48
57
  "https://qcast-image.oss-cn-qingdao.aliyuncs.com/JsViewTestResource/DocResource/mathjax-tex-svg.txt",
49
- props.latexStr,
58
+ precessString(props.latexStr),
50
59
  props.fontSize,
51
60
  props.width,
52
61
  props.height,
53
62
  props.color
54
63
  )
55
64
  );
65
+ const resizeObserver = new ResizeObserver(entries => {
66
+ if (entries.length > 0) {
67
+ const e = entries[0];
68
+ if (clientHeight.value == 0) {
69
+ clientHeight.value = e.contentRect.height
70
+ }
71
+ }
72
+ });
73
+ resizeObserver.observe(layoutView.GetIFrame());
74
+
56
75
  innerViewId.value = Forge.sViewStore.add(new Forge.ViewInfo(layoutView));
57
76
 
58
77
  onBeforeUnmount(() => {
@@ -61,16 +80,18 @@ onBeforeUnmount(() => {
61
80
  innerViewId.value = -1;
62
81
  console.log("success remove innerview");
63
82
  }
83
+ resizeObserver.unobserve(layoutView.GetIFrame())
64
84
  });
65
85
  </script>
66
86
  <template>
67
87
  <div
68
- :data-jsv-vw-innerview="innerViewId"
69
88
  :style="{
70
89
  left: left,
71
90
  top: top,
72
- width: width,
73
- height: height,
91
+ width: clientWidth,
92
+ height: clientHeight,
74
93
  }"
75
- ></div>
94
+ >
95
+ <div :data-jsv-vw-innerview="innerViewId"></div>
96
+ </div>
76
97
  </template>
@@ -5,21 +5,24 @@
5
5
  -->
6
6
 
7
7
  <!--
8
- [界面概述]
9
- 思维导图控件
10
-
11
- [控件介绍]
12
- JsvLatex:
13
- props:
14
- latexStr: {string} latex公式
15
- fontSize: {function} 字号
16
- left: {number} left
17
- top: {number} top
18
- width: {number} width
19
- height: {number} height
20
- lineSpace: {number} 行距
21
- color: {string} 文字颜色
22
- -->
8
+ * @file
9
+ *
10
+ * [界面概述]
11
+ * 思维导图控件
12
+ * [控件介绍]
13
+ * JsvLatex:
14
+ * props:
15
+ * latexStr: {string} latex公式
16
+ * fontSize: {function} 字号
17
+ * left: {number} left
18
+ * top: {number} top
19
+ * width: {number} width
20
+ * height: {number} height
21
+ * lineSpace: {number} 行距
22
+ * color: {string} 文字颜色
23
+ * [注意事项]
24
+ * 1. 盒子端的字符串是直接作为数学公式解析的, 所以需要将\n替换为\\, 需要前端自己处理, 这里提供了一个辅助方法processLatexStr来处理简单的情况
25
+ -->
23
26
  <script setup>
24
27
  import { onBeforeUnmount, ref } from "vue";
25
28
  import { Forge } from "@shijiu/jsview/dom/jsv-forge-define";
@@ -67,13 +70,13 @@ const props = defineProps({
67
70
 
68
71
  const show = ref(false);
69
72
  let innerViewId = -1;
70
- let clientWidth = props.width;
71
- let clientHeight = props.height;
73
+ let clientWidth = ref(props.width);
74
+ let clientHeight = ref(props.height);
72
75
 
73
76
  const getClientSize = () => {
74
77
  return {
75
- width: clientWidth,
76
- height: clientHeight,
78
+ width: clientWidth.value,
79
+ height: clientHeight.value,
77
80
  };
78
81
  };
79
82
  const showView = () => {
@@ -104,15 +107,18 @@ const showView = () => {
104
107
  );
105
108
 
106
109
  pluginTexture.RegisterLoadImageCallback(null, (data) => {
110
+ console.log("testtest texture load callback", data);
107
111
  tryUpdateClientSize(data.width, data.height);
108
112
  });
109
113
 
110
114
  const tryUpdateClientSize = (textureW, textureH) => {
111
- if (props.width != 0 && props.height == 0) {
112
- clientHeight = Math.round(props.width * (textureH / textureW));
113
- } else if (props.height != 0 && props.width == 0) {
114
- clientWidth = Math.round(props.height * (textureW / textureH));
115
+ console.log("testtet latex texture size", textureW, textureH);
116
+ if (textureW <= 0 || textureH <= 0) {
117
+ console.warn("JsvLatex get empth texture", textureW, textureH);
118
+ return;
115
119
  }
120
+ clientWidth.value = Math.min(textureW, props.width);
121
+ clientHeight.value = Math.round(clientWidth.value * (textureH / textureW));
116
122
  };
117
123
 
118
124
  let layoutView = new Forge.LayoutView(
@@ -149,13 +155,13 @@ defineExpose({
149
155
 
150
156
  <template>
151
157
  <div
152
- v-if="show"
153
- :data-jsv-vw-innerview="innerViewId"
154
158
  :style="{
155
159
  left: left,
156
160
  top: top,
157
- width: width,
158
- height: height,
161
+ width: clientWidth,
162
+ height: clientHeight,
159
163
  }"
160
- ></div>
164
+ >
165
+ <div v-if="show" :data-jsv-vw-innerview="innerViewId"></div>
166
+ </div>
161
167
  </template>
@@ -17,7 +17,29 @@ const globalLoadJsvLatexPlugin = (listener) => {
17
17
  }
18
18
  }
19
19
 
20
+ function processLatexStr(origin) {
21
+ //只将数学环境外的换行替换为\\
22
+ if (typeof origin !== "string") {
23
+ return null;
24
+ }
25
+ const index1 = origin.indexOf("\\begin");
26
+ const index2 = origin.indexOf("}", origin.lastIndexOf("\\end"));
27
+ if (index1 >= 0) {
28
+ const head = origin.substring(0, index1);
29
+ const middle = origin.substring(index1, index2 + 1);
30
+ const tail = origin.substring(index2 + 1);
31
+ return (
32
+ head.replaceAll(/(?<!\\\\)[\n]+/g, "\\\\") +
33
+ middle +
34
+ tail.replaceAll(/(?<!\\\\)[\n]+/g, "\\\\")
35
+ );
36
+ } else {
37
+ return origin.replaceAll(/(?<!\\\\)[\n]+/g, "\\\\");
38
+ }
39
+ }
40
+
20
41
  export {
21
42
  JsvLatex,
43
+ processLatexStr,
22
44
  globalLoadJsvLatexPlugin,
23
45
  }
@@ -0,0 +1,84 @@
1
+ import { Forge } from "@shijiu/jsview/dom/jsv-forge-define.mjs";
2
+
3
+ // 记录已激活内容,减少激活的重复调用,提高执行性能
4
+ let sActivedMap = new Map();
5
+ let sDisabledMap = new Map();
6
+
7
+ // Component名称列表, 注意大小写
8
+ namespace FeatureNames {
9
+ // 'TouchReceiver': 触屏支持
10
+ export const TouchReceiver: String = "TouchReceiver";
11
+
12
+ // 'FreeMoveDiv': 游戏类平滑动画组件
13
+ export const FreeMoveDiv: String = "FreeMoveDiv";
14
+
15
+ // 'CustomFragShader': 内容3D化效果组件
16
+ export const CustomFragShader: String = "CustomFragShader";
17
+
18
+ // 'Capture2Texture': div拷屏
19
+ export const Capture2Texture: String = "Capture2Texture";
20
+ }
21
+
22
+ // 激活内核中的模块
23
+ // 特别注意:
24
+ // 此接口调用时,请联系我们确认所在渠道此功能被搭载并已经获取了授权后再调用
25
+ //
26
+ // 场景1: 强制激活未授权的组件
27
+ // 如果激活未授权的组件,屏幕会有未授权的组件列表水印出现
28
+ // 并且如果所在渠道的内核不带此功能的话,会引起崩溃一系列问题
29
+ //
30
+ // 场景2: 未激活组件,而实际使用
31
+ // 组件使用时会自动调用 JsvUseFeature 来确认是否激活
32
+ // 若未激活则,会有console.error提示,并且内核中此功能也不会工作(此处也规避了内核可能未搭载组件而崩溃的问题)
33
+ function JsvActiveFeature(comp_name: String) {
34
+ if (sActivedMap.has(comp_name)) {
35
+ // 已经激活过
36
+ return;
37
+ }
38
+
39
+ if (sDisabledMap.has(comp_name)) {
40
+ console.error(`Error: feature ${comp_name} is disabled`);
41
+ return;
42
+ }
43
+
44
+ sActivedMap.set(comp_name, comp_name); // 记录已激活内容
45
+
46
+ console.log(`feature ${comp_name} enable`);
47
+ Forge.sRenderBridge.ActiveComponent(comp_name);
48
+ }
49
+
50
+ // 模块内部调用,确保要使用功能时,功能已经授权并激活
51
+ function JsvUseFeature(from: String, comp_name: String) {
52
+ if (sActivedMap.has(comp_name)) {
53
+ return;
54
+ }
55
+
56
+ console.error(`Error: ${comp_name}(from ${from}) is not activated, need JsvActiveFeature(JsvFeatureNames.${comp_name}) in boot`);
57
+ }
58
+
59
+ // 备用接口: 防止未授权组件被错误激活引起的崩溃和水印显示
60
+ function JsvShutdownFeatures(comp_name_list: Array<String>) {
61
+ if (sActivedMap.size > 0) {
62
+ console.log(`Error: JsvShutdownFeatures should call before any JsvActiveFeature()`);
63
+ return;
64
+ }
65
+
66
+ let merged_comps: Array<String> = [];
67
+ for (let i = 0; i < comp_name_list.length; i++) {
68
+ let comp_name: String = comp_name_list[i];
69
+
70
+ // 记录变更信息,一旦记入disable列表,则不可被active,且原active会失效
71
+ sDisabledMap.set(comp_name, comp_name);
72
+ merged_comps.push(comp_name_list[i]);
73
+ console.log(`feature ${comp_name} disable`);
74
+ }
75
+ Forge.sRenderBridge.ShutdownComponents(JSON.stringify(merged_comps));
76
+ }
77
+
78
+ export {
79
+ FeatureNames,
80
+ FeatureNames as JsvFeatureNames,
81
+ JsvActiveFeature,
82
+ JsvUseFeature,
83
+ JsvShutdownFeatures
84
+ }
@@ -1,14 +1,18 @@
1
- let handles = {
1
+ let handles: {
2
+ TextureManager: any,
3
+ RootView: any,
4
+ RootActivity: any
5
+ } = {
2
6
  TextureManager: null,
3
7
  RootView: null,
4
8
  RootActivity: null
5
9
  }
6
10
 
7
11
  const jsvCode = (window as any).JsvCode;
8
- jsvCode.ForgeHandles.listenToReady(()=>{
12
+ jsvCode.ForgeHandles.listenToReady(() => {
9
13
  handles.TextureManager = jsvCode.ForgeHandles.TextureManager;
10
14
  handles.RootView = jsvCode.ForgeHandles.RootView;
11
- handles.RootActivity = jsvCode.ForgeHandles.RootActivity;
15
+ handles.RootActivity = jsvCode.ForgeHandles.RootActivity;
12
16
  })
13
17
 
14
18
  export default handles;
@@ -3,6 +3,8 @@
3
3
  */
4
4
 
5
5
  /*!
6
+ * @file
7
+ *
6
8
  * 【模块 export 内容】
7
9
  * CssStyleSheet:面向对象类,CSS rule的操作器,用于添加和删除CssStyle,服务于JsvStyleClass
8
10
  * 接口:
@@ -3,6 +3,8 @@
3
3
  */
4
4
 
5
5
  /*!
6
+ * @file
7
+ *
6
8
  * 【模块 export 内容】
7
9
  * getKeyFramesGroup: 函数,获取KeyFrame操作类 KeyFrameStyleSheet
8
10
  * KeyFrameStyleSheet:面向对象类,KeyFrames CSS rule的操作类,用于添加和删除KeyFrame
@@ -1,12 +1,9 @@
1
- import { createMemoryHistory, createWebHashHistory } from "vue-router";
1
+ import { createMemoryHistory, /*createWebHashHistory*/ } from "vue-router";
2
+ // import { urlCheckSet } from "./TypeCheckAndSet.ts";
2
3
 
3
4
  class JsvHashHistory {
4
5
  constructor(base) {
5
- if(window.jsvIsBrowserDebug) {
6
- this.#history = createWebHashHistory(base)
7
- } else {
8
- this.#history = this.#createMockHashHistory(base);
9
- }
6
+ this.#history = this.#createMockHashHistory(base);
10
7
  }
11
8
 
12
9
  get location() {
@@ -32,7 +29,7 @@ class JsvHashHistory {
32
29
  replace(to, data) {
33
30
  this.#history.replace(to, data);
34
31
  this.#updateLocation(this.#history.location);
35
- }
32
+ }
36
33
 
37
34
  push(to, data) {
38
35
  this.#history.push(to, data);
@@ -53,16 +50,16 @@ class JsvHashHistory {
53
50
  // base = location.host ? base || location.pathname + location.search : '';
54
51
  base = (location.host || location.protocol === 'file:') ? base || location.pathname + location.search : '';
55
52
  if (!base.includes('#'))
56
- base += '#';
53
+ base += '#';
57
54
  if (!base.endsWith('#/') && !base.endsWith('#')) {
58
- console.warn(`A hash base must end with a "#":\n"${base}" should be "${base.replace(/#.*$/, '#')}".`);
55
+ console.warn(`A hash base must end with a "#":\n"${base}" should be "${base.replace(/#.*$/, '#')}".`);
59
56
  }
60
57
 
61
58
  this.baseURL = window.location.origin + base;
62
59
 
63
60
  const history = createMemoryHistory(base)
64
61
  const initHash = this.#getInitHash();
65
- if(initHash) {
62
+ if (initHash) {
66
63
  // 已设置hash,替换到hash页面
67
64
  const replaceTo = {
68
65
  path: initHash.substring(1), // 去除#
@@ -70,9 +67,9 @@ class JsvHashHistory {
70
67
  }
71
68
 
72
69
  const queryIdx = initHash.indexOf('?');
73
- if(queryIdx >= 0) {
70
+ if (queryIdx >= 0) {
74
71
  replaceTo.path = replaceTo.path.substring(0, queryIdx - 1),
75
- replaceTo.query = this.#convertUrlParams(initHash.substring(queryIdx));
72
+ replaceTo.query = this.#convertUrlParams(initHash.substring(queryIdx));
76
73
  }
77
74
  history.replace(replaceTo);
78
75
  } else {
@@ -87,35 +84,35 @@ class JsvHashHistory {
87
84
  let initHash;
88
85
 
89
86
  // 抓取history hash在启动过程中的变更, 用于warmUp/warmLoad不一致的情况。
90
- if (window.JsView.takeNativeHashChange) {
91
- initHash = window.JsView.takeNativeHashChange({
92
- //this.push(new_hash.substring(1)); // 去除#
93
- });
94
- if (initHash != null) {
95
- // 将新hash融入window.location中
96
- console.log("History: found init hash change to:" + initHash);
97
- } else {
98
- initHash = window.location.hash;
99
- }
87
+ initHash = window.JsvCoreApi.takeNativeHashChange((new_hash) => {
88
+ // TODO:暂不实现
89
+ //this.push(new_hash.substring(1)); // 去除#
90
+ });
91
+ if (initHash != null) {
92
+ // 将新hash融入window.location中
93
+ console.log("History: found init hash change to:" + initHash);
94
+ } else {
95
+ initHash = window.location.hash;
100
96
  }
101
97
 
102
98
  return initHash;
103
99
  }
104
100
 
105
101
  #updateLocation(location) {
106
- if(!window.jsvIsBrowserDebug) {
107
- const url = new window.JsView.Dom.UrlRef(
108
- location ? this.baseURL + location : this.baseURL,
109
- true
110
- )
102
+ const url = new URL(location ? this.baseURL + location : this.baseURL);
103
+ if (window.location.applyUrlInfo) {
104
+ // 对于window.location为独立定义的场景
111
105
  window.location.applyUrlInfo(url);
106
+ } else {
107
+ // 更新系统的location显示和history状态
108
+ window.history.pushState(null, '', url.href);
112
109
  }
113
110
  }
114
111
 
115
112
  #convertUrlParams(value) {
116
113
  // 去除问号
117
114
  const questionMarkIdx = value.indexOf('?');
118
- if(questionMarkIdx >= 0) {
115
+ if (questionMarkIdx >= 0) {
119
116
  value = value.substr(questionMarkIdx + 1);
120
117
  }
121
118
 
@@ -124,7 +121,7 @@ class JsvHashHistory {
124
121
  var result = {};
125
122
 
126
123
  // 遍历参数并解析键值对
127
- for(const param of paramArray) {
124
+ for (const param of paramArray) {
128
125
  const [key, value] = param.split('=');
129
126
 
130
127
  // 如果键已存在,则将值转换为数组
@@ -10,6 +10,8 @@
10
10
  */
11
11
 
12
12
  /*!
13
+ * @file
14
+ *
13
15
  * 【模块 export 内容】
14
16
  * createImpactTracer: 函数,创建碰撞跟踪对象
15
17
  * createImpactCallback: 函数,创建碰撞发生后的回调函数
@@ -1,5 +1,6 @@
1
1
  /*!
2
- * JsvPreDownloader 通用下载器,可以在不同的环境中进行资源下载操作。
2
+ * @file JsvPreDownloader 通用下载器,可以在不同的环境中进行资源下载操作。
3
+ *
3
4
  * JsvPreDownloader.download:实例方法,根据传入参数来下载资源。支持单个url或者url列表,返回Promise对象。
4
5
  * 参数:
5
6
  * url {string | Array}: (必填)图片url
@@ -1,7 +1,6 @@
1
1
 
2
2
  /*!
3
- *******************
4
- * JsvRefTaker模块
3
+ * @file JsvRefTaker模块
5
4
  *
6
5
  * 用于解决 script setup 写法,不容易通过 this.$ref.xxxx 拿到子模块的句柄,
7
6
  * 但使用ref(null)的方式构筑的深度reactive对象又会严重影响element的内部处理性能的问题