@shijiu/jsview-vue 2.3.151-test.0 → 3.0.0-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 (244) hide show
  1. package/bin/browser/BrowserAudio.mjs +200 -0
  2. package/bin/browser/BrowserJsvLatex.mjs +61 -0
  3. package/bin/export-sfc.mjs +8 -9
  4. package/bin/jsview-vue-common.mjs +9 -35
  5. package/bin/jsview-vue.mjs +22246 -23643
  6. package/bin/types/utils/JsViewEngineWidget/JsvFocus/JsvFocusBlock.vue.d.ts +9 -71
  7. package/bin/types/utils/JsViewEngineWidget/JsvFocus/JsvFocusHub.d.ts +18 -2
  8. package/bin/types/utils/JsViewEngineWidget/MetroWidget/Const.d.ts +4 -1
  9. package/bin/types/utils/JsViewEngineWidget/MetroWidget/DebugFrame.vue.d.ts +10 -7
  10. package/bin/types/utils/JsViewEngineWidget/MetroWidget/ListWidget.vue.d.ts +19 -178
  11. package/bin/types/utils/JsViewEngineWidget/MetroWidget/MetroWidget.vue.d.ts +19 -178
  12. package/bin/types/utils/JsViewEngineWidget/MetroWidget/MetroWidgetSetup.d.ts +24 -3
  13. package/bin/types/utils/JsViewEngineWidget/MetroWidget/PageUpdater.d.ts +7 -1
  14. package/bin/types/utils/JsViewEngineWidget/MetroWidget/RenderItem.d.ts +25 -5
  15. package/bin/types/utils/JsViewEngineWidget/MetroWidget/SlotComponent.vue.d.ts +9 -47
  16. package/bin/types/utils/JsViewEngineWidget/MetroWidget/TaskManager.d.ts +2 -1
  17. package/bin/types/utils/JsViewEngineWidget/MetroWidget/Utils.d.ts +2 -0
  18. package/bin/types/utils/JsViewEngineWidget/MetroWidget/WidgetRectInfo.d.ts +1 -1
  19. package/bin/types/utils/JsViewEngineWidget/SpatialNavigator/SpatialNavProvider.vue.d.ts +40 -0
  20. package/bin/types/utils/JsViewEngineWidget/SpatialNavigator/SpatialNavigationAlgorithm.d.ts +24 -0
  21. package/bin/types/utils/JsViewEngineWidget/SpatialNavigator/SpatialNavigationNode.d.ts +19 -0
  22. package/bin/types/utils/JsViewEngineWidget/SpatialNavigator/SpatialNavigator.d.ts +42 -0
  23. package/bin/types/utils/JsViewEngineWidget/TemplateParser/CommonMetroTemplate.d.ts +2 -1
  24. package/bin/types/utils/JsViewEngineWidget/TemplateParser/ListMetroTemplate.d.ts +2 -1
  25. package/bin/types/utils/JsViewEngineWidget/TemplateParser/MetroTemplate.d.ts +6 -4
  26. package/bin/types/utils/JsViewEngineWidget/TemplateParser/TemplateItemAdder.d.ts +9 -7
  27. package/bin/types/utils/JsViewEngineWidget/WidgetCommon.d.ts +17 -7
  28. package/bin/types/utils/JsViewEngineWidget/index.d.ts +3 -1
  29. package/bin/types/utils/JsViewPlugin/JsvAudio/BrowserAudio/BrowserAudio.vue.d.ts +140 -7
  30. package/bin/types/utils/JsViewPlugin/JsvAudio/BrowserAudio/JsvSystemAudio.vue.d.ts +12 -11
  31. package/bin/types/utils/JsViewPlugin/JsvAudio/Events.d.ts +10 -10
  32. package/bin/types/utils/JsViewPlugin/JsvAudio/JsvAudio.vue.d.ts +204 -17
  33. package/bin/types/utils/JsViewPlugin/JsvAudio/JsvAudioProxy.vue.d.ts +2 -1
  34. package/bin/types/utils/JsViewPlugin/JsvAudio/version.d.mts +11 -11
  35. package/bin/types/utils/JsViewPlugin/JsvAudio/version.d.ts +11 -11
  36. package/bin/types/utils/JsViewPlugin/JsvLatex/BrowserDomBuilder.d.ts +0 -1
  37. package/bin/types/utils/JsViewPlugin/JsvLatex/BrowserJsvLatex.vue.d.ts +75 -12
  38. package/bin/types/utils/JsViewPlugin/JsvLatex/GetVersion.d.ts +14 -0
  39. package/bin/types/utils/JsViewPlugin/JsvLatex/JsvLatex.vue.d.ts +88 -13
  40. package/bin/types/utils/JsViewPlugin/JsvLatex/JsvLatexBridgeProxy.d.ts +1 -0
  41. package/bin/types/utils/JsViewPlugin/JsvLatex/JsvLatexProxy.vue.d.ts +5 -1
  42. package/bin/types/utils/JsViewPlugin/JsvLatex/version.d.mts +39 -12
  43. package/bin/types/utils/JsViewPlugin/JsvPlayer/JsvMedia.d.ts +120 -17
  44. package/bin/types/utils/JsViewPlugin/JsvPlayer/JsvMediaBrowserInterface.d.ts +62 -0
  45. package/bin/types/utils/JsViewPlugin/JsvPlayer/JsvPlayer.vue.d.ts +108 -29
  46. package/bin/types/utils/JsViewPlugin/JsvPlayer/{BrowserJsvPlayer-0.9.vue.d.ts → JsvPlayerBrowser-0.9.vue.d.ts} +8 -7
  47. package/bin/types/utils/JsViewPlugin/JsvPlayer/JsvPlayerBrowser-wasm.vue.d.ts +614 -0
  48. package/bin/types/utils/JsViewPlugin/JsvPlayer/{BrowserJsvPlayer.vue.d.ts → JsvPlayerBrowser.vue.d.ts} +36 -34
  49. package/bin/types/utils/JsViewPlugin/JsvPlayer/index-0.9.d.ts +89 -30
  50. package/bin/types/utils/JsViewPlugin/JsvPlayer/index.d.ts +89 -30
  51. package/bin/types/utils/JsViewPlugin/JsvPlayer/version.d.mts +11 -11
  52. package/bin/types/utils/JsViewVueTools/BlobApi.d.ts +38 -0
  53. package/bin/types/utils/JsViewVueTools/DebugTool.d.ts +1 -1
  54. package/bin/types/utils/JsViewVueTools/DefaultKeyMap.d.ts +7 -7
  55. package/bin/types/utils/JsViewVueTools/FeatureActive.d.ts +1 -0
  56. package/bin/types/utils/JsViewVueTools/JsvInteractionMode.d.ts +6 -0
  57. package/bin/types/utils/JsViewVueTools/JsvRuntimeBridge.d.ts +3 -3
  58. package/bin/types/utils/JsViewVueTools/JsvTextTools.d.ts +1 -0
  59. package/bin/types/utils/JsViewVueTools/JsvTextureStore/BitPalette/BitPalette.d.ts +43 -0
  60. package/bin/types/utils/JsViewVueTools/JsvTextureStore/CanvasTexture/CommandList.d.ts +1 -0
  61. package/bin/types/utils/JsViewVueTools/JsvTextureStore/CanvasTexture/DrawHelper.d.ts +54 -0
  62. package/bin/types/utils/JsViewVueTools/JsvTextureStore/CanvasTexture/Path.d.ts +13 -0
  63. package/bin/types/utils/JsViewVueTools/JsvTextureStore/CapturedTexture/CapturedTexture.d.ts +2 -0
  64. package/bin/types/utils/JsViewVueTools/JsvTextureStore/JsvTextureStore.d.ts +76 -26
  65. package/bin/types/utils/JsViewVueTools/JsvTextureStore/TextureBuilder.d.ts +49 -0
  66. package/bin/types/utils/JsViewVueTools/JsvTextureStore/index.d.ts +2 -0
  67. package/bin/types/utils/JsViewVueTools/index.d.ts +4 -1
  68. package/bin/types/utils/JsViewVueWidget/Jsv3dDiv.vue.d.ts +10 -98
  69. package/bin/types/utils/JsViewVueWidget/Jsv3dStage.vue.d.ts +10 -114
  70. package/bin/types/utils/JsViewVueWidget/JsvActorMove/JsvActorMove.vue.d.ts +20 -61
  71. package/bin/types/utils/JsViewVueWidget/JsvApic/JsvApic/BrowserApic.vue.d.ts +44 -13
  72. package/bin/types/utils/JsViewVueWidget/JsvApic/JsvApic/JsvApic.vue.d.ts +12 -11
  73. package/bin/types/utils/JsViewVueWidget/JsvApic/JsvApic/index.d.ts +5 -5
  74. package/bin/types/utils/JsViewVueWidget/JsvApic/JsvApic2/BrowserApic2.vue.d.ts +16 -10
  75. package/bin/types/utils/JsViewVueWidget/JsvApic/JsvApic2/JsvApic2.vue.d.ts +21 -17
  76. package/bin/types/utils/JsViewVueWidget/JsvApic/JsvApic2/index.d.ts +19 -16
  77. package/bin/types/utils/JsViewVueWidget/JsvApic/JsvCommonLoopToolBase.d.ts +7 -7
  78. package/bin/types/utils/JsViewVueWidget/JsvClipDiv/JsvClipDiv.vue.d.ts +12 -66
  79. package/bin/types/utils/JsViewVueWidget/JsvConnectLine/JsvConnectLine.vue.d.ts +73 -12
  80. package/bin/types/utils/JsViewVueWidget/JsvDashPath.vue.d.ts +59 -10
  81. package/bin/types/utils/JsViewVueWidget/JsvDragBox/JsvDragBox.vue.d.ts +41 -81
  82. package/bin/types/utils/JsViewVueWidget/JsvDriftScope/JsvDriftScope.vue.d.ts +17 -100
  83. package/bin/types/utils/JsViewVueWidget/JsvEnableRenderBreak.vue.d.ts +13 -50
  84. package/bin/types/utils/JsViewVueWidget/JsvFilterView.vue.d.ts +50 -70
  85. package/bin/types/utils/JsViewVueWidget/JsvFlexCell/JsvFlexDiv.vue.d.ts +32 -68
  86. package/bin/types/utils/JsViewVueWidget/JsvFlexCell/JsvFullScrAdjust.vue.d.ts +57 -74
  87. package/bin/types/utils/JsViewVueWidget/JsvFlexCell/JsvScreenFlex.vue.d.ts +41 -71
  88. package/bin/types/utils/JsViewVueWidget/JsvFragShaderView/JsvFragShaderView.vue.d.ts +83 -14
  89. package/bin/types/utils/JsViewVueWidget/JsvFreeMoveActor/ActorControl.d.ts +151 -18
  90. package/bin/types/utils/JsViewVueWidget/JsvFreeMoveActor/JsvEnvBlocker.vue.d.ts +79 -83
  91. package/bin/types/utils/JsViewVueWidget/JsvFreeMoveActor/JsvFreeMoveActor.vue.d.ts +70 -0
  92. package/bin/types/utils/JsViewVueWidget/JsvFreeMoveActor/SetAction.d.ts +20 -0
  93. package/bin/types/utils/JsViewVueWidget/JsvFreeMoveActor/SetCondition.d.ts +108 -5
  94. package/bin/types/utils/JsViewVueWidget/JsvFreeMoveActor/SetState.d.ts +88 -3
  95. package/bin/types/utils/JsViewVueWidget/JsvFreeMoveActor/index.d.ts +6 -1
  96. package/bin/types/utils/JsViewVueWidget/JsvGrid.vue.d.ts +19 -18
  97. package/bin/types/utils/JsViewVueWidget/JsvInput/Cursor.vue.d.ts +34 -11
  98. package/bin/types/utils/JsViewVueWidget/JsvInput/EditViewOperator.d.ts +4 -1
  99. package/bin/types/utils/JsViewVueWidget/JsvInput/JsvInput.vue.d.ts +193 -6
  100. package/bin/types/utils/JsViewVueWidget/JsvLine/JsvLine.vue.d.ts +54 -11
  101. package/bin/types/utils/JsViewVueWidget/JsvMarquee.vue.d.ts +89 -11
  102. package/bin/types/utils/JsViewVueWidget/JsvMaskClipDiv.vue.d.ts +9 -8
  103. package/bin/types/utils/JsViewVueWidget/JsvMindMap/Geometry.d.ts +2 -2
  104. package/bin/types/utils/JsViewVueWidget/JsvMindMap/JsvMindMap.vue.d.ts +170 -138
  105. package/bin/types/utils/JsViewVueWidget/JsvMindMap/rtree.d.ts +5 -5
  106. package/bin/types/utils/JsViewVueWidget/JsvNativeSharedDiv.vue.d.ts +48 -72
  107. package/bin/types/utils/JsViewVueWidget/JsvNinePatch.vue.d.ts +139 -20
  108. package/bin/types/utils/JsViewVueWidget/JsvPieChart.vue.d.ts +56 -8
  109. package/bin/types/utils/JsViewVueWidget/JsvPreload/JsvPreload.vue.d.ts +20 -11
  110. package/bin/types/utils/JsViewVueWidget/JsvProgressBar.vue.d.ts +63 -11
  111. package/bin/types/utils/JsViewVueWidget/JsvQrcode/JsvQrcode.vue.d.ts +8 -7
  112. package/bin/types/utils/JsViewVueWidget/JsvRadarChart.vue.d.ts +95 -12
  113. package/bin/types/utils/JsViewVueWidget/JsvRipple/Constant.d.ts +2 -2
  114. package/bin/types/utils/JsViewVueWidget/JsvRipple/JsvRipple.vue.d.ts +51 -78
  115. package/bin/types/utils/JsViewVueWidget/JsvScaleTextBox.vue.d.ts +5 -4
  116. package/bin/types/utils/JsViewVueWidget/JsvScrollBox/JsvScrollBox.vue.d.ts +84 -193
  117. package/bin/types/utils/JsViewVueWidget/JsvScrollBox/JsvScrollFollow.vue.d.ts +23 -148
  118. package/bin/types/utils/JsViewVueWidget/JsvSector.vue.d.ts +56 -9
  119. package/bin/types/utils/JsViewVueWidget/JsvSmoothSlideContainer.vue.d.ts +22 -67
  120. package/bin/types/utils/JsViewVueWidget/JsvSpray/JsvSpray.vue.d.ts +44 -10
  121. package/bin/types/utils/JsViewVueWidget/JsvSpriteAnim/JsvSpriteAnim.vue.d.ts +47 -14
  122. package/bin/types/utils/JsViewVueWidget/JsvSpriteAnim/JsvSpriteLoader.vue.d.ts +26 -67
  123. package/bin/types/utils/JsViewVueWidget/JsvSwiper/Indicator.vue.d.ts +7 -6
  124. package/bin/types/utils/JsViewVueWidget/JsvSwiper/JsvSmoothSwiper.vue.d.ts +147 -109
  125. package/bin/types/utils/JsViewVueWidget/JsvSwiper/JsvSwiper.vue.d.ts +173 -16
  126. package/bin/types/utils/JsViewVueWidget/JsvSwiper/JsvSwiper2.vue.d.ts +216 -139
  127. package/bin/types/utils/JsViewVueWidget/JsvSwiper3D/Indicator.vue.d.ts +7 -6
  128. package/bin/types/utils/JsViewVueWidget/JsvSwiper3D/JsvSwiper.vue.d.ts +101 -96
  129. package/bin/types/utils/JsViewVueWidget/JsvTextBox.vue.d.ts +89 -74
  130. package/bin/types/utils/JsViewVueWidget/JsvTextureAnim/JsvTextureAnim.vue.d.ts +21 -20
  131. package/bin/types/utils/JsViewVueWidget/JsvTouchModeSwitcher.vue.d.ts +43 -70
  132. package/bin/types/utils/JsViewVueWidget/JsvVideo.vue.d.ts +6 -5
  133. package/bin/types/utils/JsViewVueWidget/JsvVisibleSensor/JsvVisibleSensor.vue.d.ts +62 -82
  134. package/bin/types/utils/JsViewVueWidget/JsvVisibleSensor/index.d.ts +95 -74
  135. package/bin/types/utils/JsViewVueWidget/TypesDiv/JsvPosterDiv.vue.d.ts +51 -0
  136. package/bin/types/utils/JsViewVueWidget/TypesDiv/JsvPosterImage.vue.d.ts +105 -0
  137. package/bin/types/utils/JsViewVueWidget/TypesDiv/JsvSmartDiv.vue.d.ts +51 -0
  138. package/bin/types/utils/JsViewVueWidget/TypesDiv/JsvSmartImage.vue.d.ts +105 -0
  139. package/bin/types/utils/JsViewVueWidget/index.d.ts +5 -3
  140. package/package.json +2 -2
  141. package/tools/jsview-vue-build.mjs +13 -9
  142. package/tsconfig.json +2 -2
  143. package/utils/JsViewEngineWidget/JsvFocus/JsvFocusBlock.vue +32 -16
  144. package/utils/JsViewEngineWidget/JsvFocus/JsvFocusHub.ts +24 -2
  145. package/utils/JsViewEngineWidget/MetroWidget/Const.ts +5 -0
  146. package/utils/JsViewEngineWidget/MetroWidget/ListWidget.vue +183 -89
  147. package/utils/JsViewEngineWidget/MetroWidget/MetroWidget.vue +269 -122
  148. package/utils/JsViewEngineWidget/MetroWidget/MetroWidgetSetup.js +989 -357
  149. package/utils/JsViewEngineWidget/MetroWidget/PageUpdater.ts +41 -23
  150. package/utils/JsViewEngineWidget/MetroWidget/RenderItem.ts +138 -41
  151. package/utils/JsViewEngineWidget/MetroWidget/TaskManager.ts +1 -0
  152. package/utils/JsViewEngineWidget/MetroWidget/Utils.ts +6 -0
  153. package/utils/JsViewEngineWidget/MetroWidget/WidgetRectInfo.ts +2 -1
  154. package/utils/JsViewEngineWidget/RectUtils.js +1 -1
  155. package/utils/JsViewEngineWidget/SpatialNavigator/SpatialNavProvider.vue +50 -0
  156. package/utils/JsViewEngineWidget/SpatialNavigator/SpatialNavigationAlgorithm.ts +260 -0
  157. package/utils/JsViewEngineWidget/SpatialNavigator/SpatialNavigationNode.ts +32 -0
  158. package/utils/JsViewEngineWidget/SpatialNavigator/SpatialNavigator.ts +236 -0
  159. package/utils/JsViewEngineWidget/TemplateParser/CommonMetroTemplate.ts +342 -174
  160. package/utils/JsViewEngineWidget/TemplateParser/ListMetroTemplate.ts +101 -27
  161. package/utils/JsViewEngineWidget/TemplateParser/MetroTemplate.ts +12 -5
  162. package/utils/JsViewEngineWidget/TemplateParser/TemplateItemAdder.ts +109 -41
  163. package/utils/JsViewEngineWidget/WidgetCommon.ts +17 -7
  164. package/utils/JsViewEngineWidget/index.ts +7 -2
  165. package/utils/JsViewPlugin/JsvLatex/BrowserDomBuilder.js +46 -46
  166. package/utils/JsViewPlugin/JsvLatex/BrowserJsvLatex.vue +54 -41
  167. package/utils/JsViewPlugin/JsvLatex/GetVersion.js +65 -0
  168. package/utils/JsViewPlugin/JsvLatex/JsvLatex.vue +54 -12
  169. package/utils/JsViewPlugin/JsvLatex/JsvLatexBridgeProxy.js +10 -0
  170. package/utils/JsViewPlugin/JsvLatex/JsvLatexProxy.vue +15 -2
  171. package/utils/JsViewPlugin/JsvLatex/PluginLoader.js +63 -31
  172. package/utils/JsViewPlugin/JsvLatex/version.mjs +26 -13
  173. package/utils/JsViewPlugin/JsvPlayer/GetVersion.js +2 -1
  174. package/utils/JsViewPlugin/JsvPlayer/JsvMedia.js +402 -23
  175. package/utils/JsViewPlugin/JsvPlayer/JsvMediaBrowserInterface.js +100 -0
  176. package/utils/JsViewPlugin/JsvPlayer/JsvPlayer.vue +363 -468
  177. package/utils/JsViewPlugin/JsvPlayer/{BrowserJsvPlayer.vue → JsvPlayerBrowser-wasm.vue} +60 -10
  178. package/utils/JsViewPlugin/JsvPlayer/JsvPlayerBrowser.vue +511 -0
  179. package/utils/JsViewPlugin/JsvPlayer/index-0.9.js +52 -10
  180. package/utils/JsViewPlugin/JsvPlayer/index.js +58 -9
  181. package/utils/JsViewPlugin/JsvPlayer/package.json +8 -0
  182. package/utils/JsViewVueTools/BlobApi.ts +55 -0
  183. package/utils/JsViewVueTools/FeatureActive.ts +3 -0
  184. package/utils/JsViewVueTools/ForgeHandles.ts +3 -0
  185. package/utils/JsViewVueTools/JsvInteractionMode.js +16 -0
  186. package/utils/JsViewVueTools/JsvPreDownloader.ts +2 -2
  187. package/utils/JsViewVueTools/JsvRuntimeBridge.js +25 -18
  188. package/utils/JsViewVueTools/JsvTextTools.ts +9 -1
  189. package/utils/JsViewVueTools/JsvTextureStore/BitPalette/BitPalette.ts +180 -0
  190. package/utils/JsViewVueTools/JsvTextureStore/CanvasTexture/CommandList.ts +1 -0
  191. package/utils/JsViewVueTools/JsvTextureStore/CanvasTexture/DrawHelper.ts +304 -0
  192. package/utils/JsViewVueTools/JsvTextureStore/CanvasTexture/Path.ts +38 -0
  193. package/utils/JsViewVueTools/JsvTextureStore/CapturedTexture/CapturedTexture.ts +16 -1
  194. package/utils/JsViewVueTools/JsvTextureStore/JsvTextureStore.ts +154 -69
  195. package/utils/JsViewVueTools/JsvTextureStore/Store.ts +1 -1
  196. package/utils/JsViewVueTools/JsvTextureStore/TextureBuilder.ts +92 -0
  197. package/utils/JsViewVueTools/JsvTextureStore/index.js +2 -0
  198. package/utils/JsViewVueTools/index.js +3 -1
  199. package/utils/JsViewVueWidget/JsvApic/JsvApic2/JsvApic2.vue +111 -86
  200. package/utils/JsViewVueWidget/JsvClipDiv/JsvClipDiv.vue +1 -1
  201. package/utils/JsViewVueWidget/JsvDragBox/JsvDragBox.vue +11 -2
  202. package/utils/JsViewVueWidget/JsvDriftScope/JsvDriftScope.vue +1 -1
  203. package/utils/JsViewVueWidget/JsvEnableRenderBreak.vue +6 -0
  204. package/utils/JsViewVueWidget/JsvFlexCell/JsvFlexDiv.vue +11 -5
  205. package/utils/JsViewVueWidget/JsvFlexCell/JsvScreenFlex.vue +3 -1
  206. package/utils/JsViewVueWidget/JsvFragShaderView/JsvFragShaderView.vue +23 -11
  207. package/utils/JsViewVueWidget/JsvFreeMoveActor/ActorControl.ts +242 -25
  208. package/utils/JsViewVueWidget/JsvFreeMoveActor/{FreeMoveActor.vue → JsvFreeMoveActor.vue} +1 -1
  209. package/utils/JsViewVueWidget/JsvFreeMoveActor/SetAction.ts +11 -5
  210. package/utils/JsViewVueWidget/JsvFreeMoveActor/SetCondition.ts +118 -6
  211. package/utils/JsViewVueWidget/JsvFreeMoveActor/SetState.ts +56 -14
  212. package/utils/JsViewVueWidget/JsvFreeMoveActor/index.js +2 -1
  213. package/utils/JsViewVueWidget/JsvInput/EditViewOperator.ts +11 -2
  214. package/utils/JsViewVueWidget/JsvInput/JsvInput.vue +30 -2
  215. package/utils/JsViewVueWidget/JsvLine/JsvLine.vue +24 -7
  216. package/utils/JsViewVueWidget/JsvMarquee.vue +1 -1
  217. package/utils/JsViewVueWidget/JsvNativeSharedDiv.vue +12 -10
  218. package/utils/JsViewVueWidget/JsvNinePatch.vue +13 -8
  219. package/utils/JsViewVueWidget/JsvPieChart.vue +93 -70
  220. package/utils/JsViewVueWidget/JsvPreload/JsvPreload.vue +32 -29
  221. package/utils/JsViewVueWidget/JsvQrcode/JsvQrcode.vue +2 -1
  222. package/utils/JsViewVueWidget/JsvScrollBox/JsvScrollBox.vue +25 -3
  223. package/utils/JsViewVueWidget/JsvScrollBox/JsvScrollFollow.vue +0 -3
  224. package/utils/JsViewVueWidget/JsvSector.vue +66 -28
  225. package/utils/JsViewVueWidget/JsvTextBox.vue +30 -1
  226. package/utils/JsViewVueWidget/JsvTouchModeSwitcher.vue +56 -14
  227. package/utils/JsViewVueWidget/JsvVisibleSensor/JsvVisibleSensor.vue +8 -6
  228. package/utils/JsViewVueWidget/TypesDiv/JsvPosterDiv.vue +54 -0
  229. package/utils/JsViewVueWidget/TypesDiv/JsvPosterImage.vue +88 -0
  230. package/utils/JsViewVueWidget/TypesDiv/JsvSmartDiv.vue +177 -0
  231. package/utils/JsViewVueWidget/TypesDiv/JsvSmartImage.vue +267 -0
  232. package/utils/JsViewVueWidget/index.js +6 -2
  233. package/bin/browser/BrowserAudio.vue.mjs +0 -258
  234. package/bin/browser/BrowserJsvLatex.vue.mjs +0 -145
  235. package/bin/types/utils/JsViewPlugin/JsvLatex/version.d.ts +0 -10
  236. package/bin/types/utils/JsViewVueTools/JsvTextureStore/DominantColor/GetDominantColor.d.ts +0 -7
  237. package/bin/types/utils/JsViewVueWidget/JsvFreeMoveActor/FreeMoveActor.vue.d.ts +0 -78
  238. package/bin/types/utils/JsViewVueWidget/JsvPosterDiv.vue.d.ts +0 -63
  239. package/bin/types/utils/JsViewVueWidget/JsvPosterImage.vue.d.ts +0 -78
  240. package/utils/JsViewPlugin/JsvLatex/version.js +0 -24
  241. package/utils/JsViewVueTools/JsvTextureStore/DominantColor/GetDominantColor.ts +0 -36
  242. package/utils/JsViewVueWidget/JsvPosterDiv.vue +0 -56
  243. package/utils/JsViewVueWidget/JsvPosterImage.vue +0 -105
  244. /package/utils/JsViewPlugin/JsvPlayer/{BrowserJsvPlayer-0.9.vue → JsvPlayerBrowser-0.9.vue} +0 -0
@@ -10,6 +10,14 @@
10
10
  * textDirection {string} 文字方向,主要考虑阿拉伯语的方向场景
11
11
  * syncDraw {string} 文字较长时,是强制同步绘制还是自动的进入异步绘制,可选"auto","sync","async"
12
12
  * 其中"async"为强制包含短文字的场景也异步绘制
13
+ * minWidth {number} 最小宽度限制,-1表示不限制。当文字内容较少时,确保组件至少占用指定宽度,
14
+ * 以此影响后续的Flex布局
15
+ * maxWidth {number} 最大宽度限制,-1表示不限制。当文字内容较多时,限制组件最大宽度,
16
+ * 当文字不足指定宽度时,此组件为文字的实际宽度,以此影响后续的Flex布局,超出部分根据textOverflow处理
17
+ * minHeight {number} 最小高度限制,-1表示不限制。当文字内容较少时,确保组件至少占用指定高度,
18
+ * 以此影响后续的Flex布局
19
+ * maxHeight {number} 最大高度限制,-1表示不限制。当文字内容较多时,限制组件最大高度,
20
+ * 当文字不足指定高度时,此组件为文字的实际高度, 以此影响后续的Flex布局,超出部分根据textOverflow处理
13
21
  * latex语法样例
14
22
  * 1. 颜色: "测试\\textcolor{#FF0000}{红色}文字"
15
23
  * 2. 加粗: "测试\\textb{加粗}文字"
@@ -43,6 +51,22 @@ const props = defineProps({
43
51
  type: String,
44
52
  default: "auto",
45
53
  },
54
+ minWidth: {
55
+ type: Number,
56
+ default: -1,
57
+ },
58
+ maxWidth: {
59
+ type: Number,
60
+ default: -1,
61
+ },
62
+ minHeight: {
63
+ type: Number,
64
+ default: -1,
65
+ },
66
+ maxHeight: {
67
+ type: Number,
68
+ default: -1,
69
+ },
46
70
  });
47
71
 
48
72
  const computeAlignItems = computed(() => {
@@ -80,10 +104,15 @@ const jsvTextLatexValue = computed(() => {
80
104
  >
81
105
  <div
82
106
  :style="{
83
- width: textWidth,
107
+ width: style.width,
108
+ height: style.height,
84
109
  JsvTextLatex: jsvTextLatexValue,
85
110
  JsvTextLineAlign: lineAlign,
86
111
  JsvTextInnerDirection: textDirection,
112
+ JsvMinWidth: minWidth,
113
+ JsvMaxWidth: maxWidth,
114
+ JsvMinHeight: minHeight,
115
+ JsvMaxHeight: maxHeight,
87
116
  }"
88
117
  :data-jsv-perf-loadtex="props.syncDraw"
89
118
  >
@@ -7,6 +7,7 @@
7
7
  * width {number} 宽
8
8
  * height {number} 高
9
9
  * initMode {number} 初始模式, 1:按键, 2:触控, 默认为1
10
+ * changeModeKeyList {array} 切换模式的按键列表, 默认为四个方向键
10
11
  * methods:
11
12
  * registerCallback: (callback: (mode: number) => void) => void
12
13
  注册回调
@@ -14,12 +15,22 @@
14
15
  注销回调
15
16
  * getInteractiveMode: () => number
16
17
  获取当前的交互模式. 1:按键, 2:触控
18
+ changeMode: (mode: "key" | "touch") => void
19
+ 切换交互模式
17
20
  * 注意:
18
21
  * 在MetroWidget的item中,如需监听交互模式变动, 为了避免过多回调, 一般在onFocus中注册, 在onBlur中注销
19
22
  *
20
23
  -->
21
24
  <script setup>
22
- import { shallowRef, onMounted } from "vue";
25
+ import { shallowRef, onMounted, watch, onBeforeUnmount } from "vue";
26
+ import {
27
+ KEY_MODE,
28
+ TOUCH_MODE,
29
+ JsvInteractionMode,
30
+ jsvTouchModeSwitcherCreate,
31
+ jsvTouchModeSwitcherDestroy,
32
+ } from "../JsViewVueTools/JsvInteractionMode";
33
+
23
34
  const props = defineProps({
24
35
  width: {
25
36
  type: Number,
@@ -29,13 +40,15 @@ const props = defineProps({
29
40
  },
30
41
  initMode: {
31
42
  type: Number,
32
- default: 1,
43
+ default: KEY_MODE,
44
+ },
45
+ changeModeKeyList: {
46
+ type: Array,
47
+ default: () => [37, 38, 39, 40],
33
48
  },
34
49
  });
35
50
 
36
- const KEY_MODE = 1;
37
- const TOUCH_MODE = 2;
38
- let mode = props.initMode;
51
+ jsvTouchModeSwitcherCreate();
39
52
  let callbacks = [];
40
53
  const divRef = shallowRef();
41
54
  const registerCallback = (callback) => {
@@ -46,22 +59,35 @@ const unregisterCallback = (callback) => {
46
59
  callbacks = callbacks.filter((i) => i !== callback);
47
60
  };
48
61
  const getInteractiveMode = () => {
49
- return mode;
62
+ return JsvInteractionMode.value;
50
63
  };
51
64
 
65
+ watch(JsvInteractionMode, (newMode) => {
66
+ for (let c of callbacks) {
67
+ c(newMode);
68
+ }
69
+ });
70
+
52
71
  const updateMode = (m) => {
53
- let preMode = mode;
54
- mode = m;
55
- if (preMode !== mode) {
56
- for (let c of callbacks) {
57
- c(mode);
58
- }
72
+ if (JsvInteractionMode.value === m) {
73
+ return;
59
74
  }
75
+ if (m == KEY_MODE) {
76
+ window.JsView?.changeInteractionMode?.("touch", "key");
77
+ } else if (m == TOUCH_MODE) {
78
+ window.JsView?.changeInteractionMode?.("key", "touch");
79
+ }
80
+ JsvInteractionMode.value = m;
60
81
  };
61
82
 
62
83
  const onDispatchKeyDown = (ev) => {
63
- if (ev.keyCode == 37 || ev.keyCode == 38 || ev.keyCode == 39 || ev.keyCode == 40) {
64
- updateMode(KEY_MODE);
84
+ //只有在上下左右键切换为KEY_MODE
85
+ if (props.changeModeKeyList.includes(ev.keyCode)) {
86
+ //转变模式的第一次按键不传递
87
+ if (JsvInteractionMode.value === TOUCH_MODE) {
88
+ updateMode(KEY_MODE);
89
+ return true;
90
+ }
65
91
  }
66
92
  return false;
67
93
  };
@@ -76,10 +102,25 @@ onMounted(() => {
76
102
  });
77
103
  });
78
104
 
105
+ onBeforeUnmount(() => {
106
+ jsvTouchModeSwitcherDestroy();
107
+ });
108
+
109
+ const changeMode = (mode) => {
110
+ if (mode == "key") {
111
+ updateMode(KEY_MODE);
112
+ } else if (mode == "touch") {
113
+ updateMode(TOUCH_MODE);
114
+ } else {
115
+ console.error("unknown interaction mode", mode);
116
+ }
117
+ };
118
+
79
119
  defineExpose({
80
120
  registerCallback,
81
121
  unregisterCallback,
82
122
  getInteractiveMode,
123
+ changeMode,
83
124
  });
84
125
  </script>
85
126
  <template>
@@ -90,6 +131,7 @@ defineExpose({
90
131
  >
91
132
  <div
92
133
  ref="divRef"
134
+ :data-jsv-vw-touch-anchor="true"
93
135
  :style="{
94
136
  width: width,
95
137
  height: height,
@@ -93,14 +93,14 @@ watchEffect(() => {
93
93
  let horizon = fixAreaValue(props.horizonShown);
94
94
  let vertical = fixAreaValue(props.verticalShown);
95
95
 
96
- sensorRef.ResetArea({ horizon, vertical });
96
+ sensorRef?.ResetArea({ horizon, vertical });
97
97
  }
98
98
  });
99
99
 
100
100
  // 变更enable状态
101
101
  watchEffect(() => {
102
102
  if (viewMounted.status) {
103
- sensorRef.Enable(props.enable);
103
+ sensorRef?.Enable(props.enable);
104
104
  }
105
105
  });
106
106
 
@@ -112,12 +112,12 @@ watchEffect(() => {
112
112
 
113
113
  let jsv_main_view_ref = toRaw(props.container).jsvGetProxyView();
114
114
  if (jsv_main_view_ref) {
115
- sensorRef.ResetContainer(jsv_main_view_ref);
115
+ sensorRef?.ResetContainer(jsv_main_view_ref);
116
116
  } else {
117
117
  console.error("Error: container is NOT a div");
118
118
  }
119
119
  } else {
120
- sensorRef.ResetContainer(null); // 无container
120
+ sensorRef?.ResetContainer(null); // 无container
121
121
  }
122
122
  }
123
123
  });
@@ -144,14 +144,16 @@ onMounted(() => {
144
144
  });
145
145
 
146
146
  onActivated(() => {
147
- sensorRef.Enable(props.enable);
147
+ // 疑问:发现有的场景在onMounted前就触发onActivated,导致sensorRef为null,导致报错
148
+ sensorRef?.Enable(props.enable);
148
149
  });
149
150
 
150
151
  onDeactivated(() => {
151
152
  if (newH || newV) {
152
153
  visibleChange(newH, false, newV, false);
153
154
  }
154
- sensorRef.Enable(false);
155
+ // 疑问:发现有的场景在onMounted前就触发onActivated,导致sensorRef为null,导致报错
156
+ sensorRef?.Enable(false);
155
157
  });
156
158
 
157
159
  // 外部方法
@@ -0,0 +1,54 @@
1
+ <!--
2
+ * @file
3
+ *
4
+ * 【模块 export 内容】
5
+ * JsvPosterDiv:Vue高阶组件,海报描画, 其字内容为占位图
6
+ * props说明:
7
+ * style {Object} 包含
8
+ * left/top/width/height
9
+ * border-radius
10
+ * backgroundImage/backgroundColor
11
+ * 的style设置
12
+ * fadeIn: {boolean} 图片加载完成是否有淡入效果,默认为打开(和JsvSmartDiv不同)
13
+ * enableAA: {boolean} 启用非全局的抗锯齿处理,不过这个处理会使绘制的矩形比原尺寸每边少2~3像素点
14
+ * altImages: {Array<string>} AB图片地址组, 当非null时, style中的backgroundImage/backgroundColor将被忽略,
15
+ * string内容必须是url(), 或者直接import, 或者rgba(x,x,x,x)格式, 或者#RRGGBBAA格式
16
+ * altIndex: {number} AB图片索引, 当altImages不为null时, 有效, 默认为0
17
+ -->
18
+ <script setup>
19
+ import JsvSmartDiv from "./JsvSmartDiv.vue";
20
+
21
+ const props = defineProps({
22
+ style: Object,
23
+ fadeIn: {
24
+ type: Boolean,
25
+ default: true,
26
+ },
27
+ enableAA: {
28
+ type: Boolean,
29
+ default: false,
30
+ },
31
+ altImages: {
32
+ type: Array,
33
+ default: null,
34
+ },
35
+ altIndex: {
36
+ type: Number,
37
+ default: 0,
38
+ },
39
+ });
40
+
41
+ </script>
42
+
43
+ <template>
44
+ <jsv-smart-div
45
+ :style="style"
46
+ :fadeIn="fadeIn"
47
+ :enableAA="enableAA"
48
+ :altImages="altImages"
49
+ :altIndex="altIndex"
50
+ v-bind="$attrs"
51
+ >
52
+ <slot />
53
+ </jsv-smart-div>
54
+ </template>
@@ -0,0 +1,88 @@
1
+ <!--
2
+ * @file
3
+ *
4
+ * 【模块 export 内容】
5
+ * JsvPosterImage:Vue高阶组件,可配置默认背景图(通过slot), 支持AB图片切换, 可设置color space 和 texture size
6
+ * props说明:
7
+ * style {Object} 包含left/top/width/height/border-radius的style设置
8
+ * colorSpace {String} 颜色空间,调整其他颜色空间可以节省内存,默认RGBA_8888
9
+ * imageCompress {boolean} 是否压缩图片, 默认打开(和JsvSmartImage不同)
10
+ * src {string} 图片的加载地址
11
+ * fadeIn: {boolean} 图片加载完成是否有淡入效果,默认为打开(和JsvSmartImage不同)
12
+ * enableAA: {boolean} 启用非全局的抗锯齿处理,不过这个处理会使绘制的矩形比原尺寸每边少2~3像素点
13
+ * syncDraw: {boolean} 是否同步绘制,默认false,表示异步绘制,如果设置为true,则表示将尝试同步绘制
14
+ * (与JsvDownloader完成预下载的图片会进行同步绘制,以确保图片的完整性)
15
+ * altImages: {Array<string>} AB图片地址组, 当非null时, style中的backgroundImage/backgroundColor将被忽略,
16
+ * altIndex: {number} AB图片索引, 当altImages不为null时, 有效, 默认为0
17
+ * altSync: {boolean} AB图片是否为同时加载模式,默认false
18
+ false:异步模式: b图加载完成后再进行自动切换, 建议大尺寸海报使用此模式
19
+ true:同步模式: 同时加载a图和b图(但b图不可见), 同时加载更耗内存, 建议小尺寸的button使用
20
+ -->
21
+
22
+ <script setup>
23
+ import JsvSmartImage from "./JsvSmartImage.vue";
24
+
25
+ const props = defineProps({
26
+ colorSpace: {
27
+ type: String,
28
+ default: "RGBA_8888",
29
+ },
30
+ imageCompress: {
31
+ type: Boolean,
32
+ default: true,
33
+ },
34
+ isPosterImage: {
35
+ type: Boolean,
36
+ default: true,
37
+ },
38
+ fadeIn: {
39
+ type: Boolean,
40
+ default: true,
41
+ },
42
+ src: {
43
+ type: String,
44
+ default: null,
45
+ },
46
+ enableAA: {
47
+ type: Boolean,
48
+ default: false,
49
+ },
50
+ style: Object,
51
+ syncDraw: {
52
+ type: Boolean,
53
+ default: false,
54
+ },
55
+ altImages: {
56
+ type: Array,
57
+ default: null,
58
+ },
59
+ altIndex: {
60
+ type: Number,
61
+ default: 0,
62
+ },
63
+ altSync: {
64
+ type: Boolean,
65
+ default: false,
66
+ },
67
+ });
68
+
69
+ </script>
70
+
71
+ <template>
72
+ <jsv-smart-image
73
+ :colorSpace="colorSpace"
74
+ :imageCompress="imageCompress"
75
+ :isPosterImage="isPosterImage"
76
+ :fadeIn="fadeIn"
77
+ :src="src"
78
+ :enableAA="enableAA"
79
+ :style="style"
80
+ :syncDraw="syncDraw"
81
+ :altImages="altImages"
82
+ :altIndex="altIndex"
83
+ :altSync="altSync"
84
+ v-bind="$attrs"
85
+ >
86
+ <slot />
87
+ </jsv-smart-image>
88
+ </template>
@@ -0,0 +1,177 @@
1
+ <!--
2
+ * @file
3
+ *
4
+ * 【模块 export 内容】
5
+ * JsvPosterDiv:Vue高阶组件,海报描画, 其字内容为占位图
6
+ * props说明:
7
+ * style {Object} 包含
8
+ * left/top/width/height
9
+ * border-radius
10
+ * backgroundImage/backgroundColor
11
+ * 的style设置
12
+ * fadeIn: {boolean} 图片加载完成是否有淡入效果,默认为关闭
13
+ * enableAA: {boolean} 启用非全局的抗锯齿处理,不过这个处理会使绘制的矩形比原尺寸每边少2~3像素点, 默认为关闭
14
+ * altImages: {Array<string>} AB图片地址组, 当非null时, style中的backgroundImage/backgroundColor将被忽略,
15
+ * string内容必须是url(), 或者直接import, 或者rgba(x,x,x,x)格式, 或者#RRGGBBAA格式
16
+ * altIndex: {number} AB图片索引, 当altImages不为null时, 有效, 默认为0
17
+ -->
18
+ <script setup>
19
+ import { reactive, watch, watchEffect, computed, shallowRef, toRaw } from "vue";
20
+
21
+ const props = defineProps({
22
+ style: Object,
23
+ fadeIn: {
24
+ type: Boolean,
25
+ default: false,
26
+ },
27
+ enableAA: {
28
+ type: Boolean,
29
+ default: false,
30
+ },
31
+ altImages: {
32
+ type: Array,
33
+ default: null,
34
+ },
35
+ altIndex: {
36
+ type: Number,
37
+ default: 0,
38
+ },
39
+ });
40
+
41
+ let rCommonStyle = reactive({});
42
+ let rEnableAA = shallowRef("0");
43
+
44
+ let rImageSetList = shallowRef([]);
45
+ let vImageListLengthCache = 0;
46
+
47
+ const rebuildImageStyleList = (
48
+ width,
49
+ height,
50
+ background_image,
51
+ background_color,
52
+ others
53
+ ) => {
54
+ let image_list_length = 1;
55
+ let image_src_array = toRaw(props.altImages);
56
+
57
+ if (image_src_array && image_src_array.length > 0) {
58
+ image_list_length = image_src_array.length;
59
+ } else {
60
+ // 有线backgroundImage, 然后再选用background_color
61
+ image_src_array = [background_image ? background_image : background_color];
62
+ }
63
+
64
+ if (vImageListLengthCache !== image_list_length) {
65
+ vImageListLengthCache = image_list_length;
66
+ rImageSetList.value = Array.from({ length: image_list_length }, () => ({
67
+ key: null,
68
+ style: shallowRef({}),
69
+ }));
70
+ }
71
+
72
+ let image_set_list_raw = toRaw(rImageSetList.value);
73
+ image_set_list_raw.forEach((image_set, i) => {
74
+ // style设置
75
+ image_set.style.value.width = width;
76
+ image_set.style.value.height = height;
77
+ Object.assign(image_set.style.value, others);
78
+
79
+ // src设置
80
+ // 简化识别:以 # 或 rgb 开头为 color 类型,否则为 backgroundImage
81
+ let src_info = image_src_array[i];
82
+ if (typeof src_info === "string") {
83
+ if (src_info.startsWith("#") || src_info.startsWith("rgb")) {
84
+ image_set.style.value.backgroundColor = src_info;
85
+ } else {
86
+ image_set.style.value.backgroundImage = src_info;
87
+ }
88
+ } else {
89
+ image_set.style.value.backgroundColor = null;
90
+ image_set.style.value.backgroundImage = null;
91
+ }
92
+ image_set.src = src_info;
93
+ });
94
+ };
95
+
96
+ let vStyleWidthCache = 0;
97
+ let vStyleHeightCache = 0;
98
+ let vStyleOthersCache = null;
99
+
100
+ const rebuildStyle = () => {
101
+ if (props.style) {
102
+ // 提取left, top, width, height, 并去掉干扰项 backgroundImage backgroundColor(会引起同位置重复图片绘制)
103
+ let {
104
+ left,
105
+ top,
106
+ width,
107
+ height,
108
+ transformStyle,
109
+ backgroundImage,
110
+ backgroundColor,
111
+ ...others
112
+ } = props.style;
113
+
114
+ // 承接x,y偏移和动画设置, 规避默认淡出动画被影响
115
+ rCommonStyle.left = left;
116
+ rCommonStyle.top = top;
117
+ rCommonStyle.transformStyle = transformStyle;
118
+
119
+ vStyleWidthCache = width;
120
+ vStyleHeightCache = height;
121
+ vStyleOthersCache = others;
122
+ rebuildImageStyleList(width, height, backgroundImage, backgroundColor, others);
123
+ }
124
+ };
125
+
126
+ watch(
127
+ () => props.style,
128
+ () => {
129
+ rebuildStyle();
130
+ }
131
+ );
132
+
133
+ watch(
134
+ () => props.altImages,
135
+ () => {
136
+ rebuildImageStyleList(vStyleWidthCache, vStyleHeightCache, vStyleOthersCache);
137
+ }
138
+ );
139
+
140
+ // 第一次进行style创建
141
+ rebuildStyle();
142
+
143
+ // 监听enableAA变化
144
+ watchEffect(() => {
145
+ rEnableAA.value = props.enableAA ? "1" : "0";
146
+ });
147
+
148
+ const rActiveIndex = computed(() => {
149
+ let index = 0;
150
+ if (props.altIndex >= rImageSetList.value.length) {
151
+ index = rImageSetList.value.length - 1;
152
+ } else if (props.altIndex >= 0) {
153
+ index = props.altIndex;
154
+ }
155
+ return index;
156
+ });
157
+ </script>
158
+
159
+ <template>
160
+ <div :style="rCommonStyle">
161
+ <slot />
162
+ <div
163
+ v-if="rImageSetList.length > 1 || rImageSetList[0].src"
164
+ :data-jsv-vw-mask-poster-on-top="true"
165
+ >
166
+ <div
167
+ v-for="(div_set, idx) in rImageSetList"
168
+ :key="div_set.src"
169
+ :data-jsv-vw-enable-fade="props.fadeIn"
170
+ :style="div_set.style.value"
171
+ :data-jsv-img-enable-aa="rEnableAA"
172
+ :data-jsv-vw-hide-keep="rActiveIndex !== idx ? 'true' : 'false'"
173
+ v-bind="$attrs"
174
+ />
175
+ </div>
176
+ </div>
177
+ </template>