@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
@@ -5,7 +5,6 @@
5
5
  * @Description: file content
6
6
  */
7
7
 
8
- import ActionRefObject from "./ActionRefObject";
9
8
  import CallbackManager from "./CallbackManager";
10
9
  import { ConditionSetBuilder, StateCmdBuilder, CmdPackBuilder } from "./ForgeTypeDefine"
11
10
  import { NexusNode } from "./NexusNode";
@@ -74,22 +73,39 @@ class ConditionPackBuilder {
74
73
  }
75
74
 
76
75
  /**
77
- * reachPosition
78
- * 获取 ReachPosition 的condition
76
+ * wallPosition
77
+ * 获取 wallPosition 的condition
79
78
  * x或y已经处于,或者被越过时触发
80
79
  *
81
- * @param {double} xPosition 位置有效值,可以传入undefined来决定此值不设置
82
- * @param {double} yPosition 位置有效值,可以传入undefined来决定此值不设置
80
+ * 和reachPosition/acrossPosition的最大区别是,
81
+ * reach/across是有碰撞时才激活,
82
+ * 而wall是初始位置已经超过wall时就会立刻激活
83
+ *
84
+ * @param {string} direction 方向,可以是 "left" | "right" | "top" | "bottom", 标明初始wall位置相对运动物体的方位
85
+ * @param {double} position 位置有效值,direction为left/right时作用于x,direction为top/bottom时作用于y
83
86
  */
84
- wallPosition(direction: WallDirection, xPosition: UNumber, yPosition: UNumber): object | null {
87
+ wallPosition(direction: WallDirection, position: UNumber): object | null {
85
88
  if (!this._CheckCommonInfo()) {
86
89
  return null;
87
90
  }
88
91
  this._CommonInfoValid = false;
89
92
 
93
+ const xPosition = direction === "left" || direction === "right" ? position : undefined;
94
+ const yPosition = direction === "top" || direction === "bottom" ? position : undefined;
95
+
90
96
  return this._BuildPack(ConditionSetBuilder.WallPosition(direction, xPosition, yPosition, this._CommonInfo));
91
97
  }
92
98
 
99
+ /**
100
+ * boxPosition
101
+ * 获取 boxPosition 的condition
102
+ * 相当于用4面wallPosition组合起来的box(本物体一般处于box内, 一旦移到box外就激活)
103
+ *
104
+ * @param {double} left 左边界位置有效值,可以传入undefined来表面此面无wallPosition
105
+ * @param {double} top 上边界位置有效值,可以传入undefined来表面此面无wallPosition
106
+ * @param {double} right 右边界位置有效值,可以传入undefined来表面此面无wallPosition
107
+ * @param {double} bottom 下边界位置有效值,可以传入undefined来表面此面无wallPosition
108
+ */
93
109
  boxPosition(left: UNumber, top: UNumber, right: UNumber, bottom: UNumber): any {
94
110
  if (!this._CheckCommonInfo()) {
95
111
  return null;
@@ -108,6 +124,13 @@ class ConditionPackBuilder {
108
124
  return this._BuildPack(ConditionSetBuilder.OffsetPosition(left, top, right, bottom, this._CommonInfo));
109
125
  }
110
126
 
127
+ /**
128
+ * startMove
129
+ * 当FreeMove块开始移动时触发, 用于探测方块从静止到移动的过程
130
+ *
131
+ * @param {boolean} xEnable x轴是否启用
132
+ * @param {boolean} yEnable y轴是否启用
133
+ */
111
134
  startMove(xEnable: boolean, yEnable: boolean) {
112
135
  if (!this._CheckCommonInfo()) {
113
136
  return null;
@@ -121,6 +144,8 @@ class ConditionPackBuilder {
121
144
  }
122
145
 
123
146
  /**
147
+ * 内部API
148
+ *
124
149
  * AcrossPosition
125
150
  * 获取 AcrossPosition 的condition
126
151
  * x或y被越过时触发
@@ -139,6 +164,8 @@ class ConditionPackBuilder {
139
164
  }
140
165
 
141
166
  /**
167
+ * 内部API
168
+ *
142
169
  * OnNexusEvent
143
170
  * 响应 actRef 关联的 action 所发出的内部状态信息
144
171
  *
@@ -162,6 +189,8 @@ class ConditionPackBuilder {
162
189
  }
163
190
 
164
191
  /**
192
+ * 内部API
193
+ *
165
194
  * OnHitBlock
166
195
  * 监听Actor关联的LayoutView与blocker碰撞的状态
167
196
  * 碰撞发生后,可以 State.revertWithHitBlock 将LayoutView返回到紧贴到碰撞点的状态
@@ -198,6 +227,11 @@ class ConditionPackBuilder {
198
227
  }
199
228
 
200
229
  /** 指定的swapcount前才能执行 */
230
+ /**
231
+ * 内部API
232
+ *
233
+ * onSwapCount
234
+ */
201
235
  onSwapCount() {
202
236
  // CommonInfo 只能使用一次,规避多次使用问题
203
237
  if (!this._CheckCommonInfo()) {
@@ -207,6 +241,12 @@ class ConditionPackBuilder {
207
241
  return this._BuildPack(ConditionSetBuilder.onSwapCount(0, this._CommonInfo));
208
242
  }
209
243
 
244
+ /**
245
+ * 内部API
246
+ *
247
+ * onDragStart
248
+ * 当拖拽开始时触发
249
+ */
210
250
  onDragStart() {
211
251
  if (!this._CheckCommonInfo()) {
212
252
  return null;
@@ -216,6 +256,12 @@ class ConditionPackBuilder {
216
256
  return this._BuildPack(ConditionSetBuilder.OnDragStart(this._CommonInfo, this._ContorlSlefNexus.token));
217
257
  }
218
258
 
259
+ /**
260
+ * 内部API
261
+ *
262
+ * onDragEnd
263
+ * 当拖拽结束时触发
264
+ */
219
265
  onDragEnd() {
220
266
  if (!this._CheckCommonInfo()) {
221
267
  return null;
@@ -224,6 +270,12 @@ class ConditionPackBuilder {
224
270
  return this._BuildPack(ConditionSetBuilder.OnDragEnd(this._CommonInfo, this._ContorlSlefNexus.token));
225
271
  }
226
272
 
273
+ /**
274
+ * 内部API
275
+ *
276
+ * onTouchDown
277
+ * 当触摸开始时触发
278
+ */
227
279
  onTouchDown() {
228
280
  if (!this._CheckCommonInfo()) {
229
281
  return null;
@@ -232,6 +284,12 @@ class ConditionPackBuilder {
232
284
  return this._BuildPack(ConditionSetBuilder.OnTouchDown(this._CommonInfo, this._ContorlSlefNexus.token));
233
285
  }
234
286
 
287
+ /**
288
+ * 内部API
289
+ *
290
+ * onTouchRelease
291
+ * 当触摸结束时触发
292
+ */
235
293
  onTouchRelease() {
236
294
  if (!this._CheckCommonInfo()) {
237
295
  return null;
@@ -240,6 +298,12 @@ class ConditionPackBuilder {
240
298
  return this._BuildPack(ConditionSetBuilder.OnTouchRelease(this._CommonInfo, this._ContorlSlefNexus.token));
241
299
  }
242
300
 
301
+ /**
302
+ * 内部API
303
+ *
304
+ * onFlingStart
305
+ * 当 fling 开始时触发
306
+ */
243
307
  onFlingStart() {
244
308
  if (!this._CheckCommonInfo()) {
245
309
  return null;
@@ -248,6 +312,12 @@ class ConditionPackBuilder {
248
312
  return this._BuildPack(ConditionSetBuilder.OnFlingStart(this._CommonInfo, this._ContorlSlefNexus.token));
249
313
  }
250
314
 
315
+ /**
316
+ * 内部API
317
+ *
318
+ * onFlingProgress
319
+ * 当 fling 过程中触发
320
+ */
251
321
  onFlingProgress() {
252
322
  if (!this._CheckCommonInfo()) {
253
323
  return null;
@@ -256,6 +326,12 @@ class ConditionPackBuilder {
256
326
  return this._BuildPack(ConditionSetBuilder.OnFlingProgress(this._CommonInfo, this._ContorlSlefNexus.token));
257
327
  }
258
328
 
329
+ /**
330
+ * 内部API
331
+ *
332
+ * onFlingEnd
333
+ * 当 fling 结束时触发
334
+ */
259
335
  onFlingEnd() {
260
336
  if (!this._CheckCommonInfo()) {
261
337
  return null;
@@ -264,6 +340,12 @@ class ConditionPackBuilder {
264
340
  return this._BuildPack(ConditionSetBuilder.OnFlingEnd(this._CommonInfo, this._ContorlSlefNexus.token));
265
341
  }
266
342
 
343
+ /**
344
+ * 内部API
345
+ *
346
+ * onFlingCancel
347
+ * 当 fling 取消时触发
348
+ */
267
349
  onFlingCancel() {
268
350
  if (!this._CheckCommonInfo()) {
269
351
  return null;
@@ -272,6 +354,12 @@ class ConditionPackBuilder {
272
354
  return this._BuildPack(ConditionSetBuilder.OnFlingCancel(this._CommonInfo, this._ContorlSlefNexus.token));
273
355
  }
274
356
 
357
+ /**
358
+ * 内部API
359
+ *
360
+ * onFlingDrop
361
+ * 当 fling 拖拽结束时触发
362
+ */
275
363
  onFlingDrop() {
276
364
  if (!this._CheckCommonInfo()) {
277
365
  return null;
@@ -281,6 +369,22 @@ class ConditionPackBuilder {
281
369
  }
282
370
 
283
371
  /**
372
+ * 内部API
373
+ *
374
+ * onMouseWheelScrollProgress
375
+ * 当鼠标滚轮滚动时触发
376
+ */
377
+ onMouseWheelScrollProgress() {
378
+ if (!this._CheckCommonInfo()) {
379
+ return null;
380
+ }
381
+ this._CommonInfoValid = false;
382
+ return this._BuildPack(ConditionSetBuilder.OnMouseWheelScrollProgress(this._CommonInfo, this._ContorlSlefNexus.token));
383
+ }
384
+
385
+ /**
386
+ * 内部API
387
+ *
284
388
  * touchCount
285
389
  * 当touchDown时,Count会++,用于解决多次touchDown引发的时序问题
286
390
  * 当native的count计数等于给定的参数设定的count时,触发condition
@@ -294,6 +398,8 @@ class ConditionPackBuilder {
294
398
  }
295
399
 
296
400
  /**
401
+ * 内部API
402
+ *
297
403
  * onMovement
298
404
  * 当FreeMove块移动时,移动了给定的距离值后触发条件, 给定的距离值由sensitivity定义
299
405
  *
@@ -327,6 +433,12 @@ class ConditionPackBuilder {
327
433
  xSensitivity, ySensitivity, xyEnables));
328
434
  }
329
435
 
436
+ /**
437
+ * 内部API
438
+ *
439
+ * movementSync
440
+ * @param {NexusNode} nexusRef 用于同步运动的nexus节点
441
+ */
330
442
  movementSync(nexusRef: NexusNode) {
331
443
  if (!this._CheckCommonInfo()) {
332
444
  return null;
@@ -8,25 +8,30 @@ class StatePackBuilder {
8
8
 
9
9
  }
10
10
 
11
- /*
11
+ /**
12
12
  * clearConditions
13
- * 清理所有预制的condition
13
+ * 清理所有已经设置的condition,
14
+ * condition如果不清理则伴随着FreeMoveActor的生命周期一直存在
14
15
  */
15
16
  clearAllConditions(): Object {
16
17
  return CmdPackBuilder.InitStateCmdPack(StateCmdBuilder.RemoveAllCondtions());
17
18
  }
18
19
 
19
- /*
20
+ /**
20
21
  * removeConditionByGroup
21
- * 清理指定组的condition
22
+ * 清理指定组的condition,
23
+ * group 和 @file://./ActorControl.ts 中condition()函数声明的group对应
24
+ * condition如果不清理则伴随着FreeMoveActor的生命周期一直存在
22
25
  */
23
26
  removeConditionByGroup(group: number): Object {
24
27
  return CmdPackBuilder.InitStateCmdPack(StateCmdBuilder.RemoveByGroup(group));
25
28
  }
26
29
 
27
- /*
30
+ /**
28
31
  * removeConditionByGroup
29
32
  * 清理指定名字的condition
33
+ * specName 和 @file://./ActorControl.ts 中condition()函数声明的specName对应
34
+ * condition如果不清理则伴随着FreeMoveActor的生命周期一直存在
30
35
  */
31
36
  removeConditionByName(specName: String) {
32
37
  return CmdPackBuilder.InitStateCmdPack(StateCmdBuilder.RemoveByName(specName));
@@ -34,10 +39,13 @@ class StatePackBuilder {
34
39
 
35
40
  /**
36
41
  * activeCondition
37
- * 重新激活对应gid或者specName的condition
42
+ * 重新激活对应group或者specName的condition
43
+ * group和specName和 @file://./ActorControl.ts 中condition()函数声明的group或specName对应
44
+ *
38
45
  * 一个condition处于非激活有两种可能,
39
46
  * 1. 允许触发一次的condition已经完成触发
40
- * 2. 被DeactiveCondition关闭过的condition
47
+ * @file://./ActorControl.ts condition()函数声明的multiTimes == 1的设置即为一次触发
48
+ * 2. 被 deactiveCondition()关闭过的condition
41
49
  *
42
50
  * @param {int} groupType (可选)对应condition的groupType, 与specName二选一
43
51
  * @param {String} specName (可选)对应condition的specName, 与groupId二选一, 当groupId为 undefined 或 -1 时生效
@@ -48,7 +56,7 @@ class StatePackBuilder {
48
56
 
49
57
  /**
50
58
  * deactiveCondition
51
- * 停止对应gid或者specName的condition
59
+ * 停止对应group或者specName的condition
52
60
  *
53
61
  * @param {int} groupType (可选)对应condition的groupType, 与specName二选一
54
62
  * @param {String} specName (可选)对应condition的specName, 与groupId二选一, 当groupId为 undefined 或 -1 时生效
@@ -57,8 +65,9 @@ class StatePackBuilder {
57
65
  return CmdPackBuilder.InitStateCmdPack(StateCmdBuilder.DeactiveCondition(groupType, specName));
58
66
  }
59
67
 
60
- /*
68
+ /**
61
69
  * setStartPos 立刻将actor运动起始点设置到目标位置, 作为下一个Action执行时的位置起点
70
+ * 若没有新的Action执行, 则这个位置改变不会有任何效果
62
71
  * 注意1: 只影响当speed/accel不为0时的下一帧的运动起始位置,
63
72
  * 当speed/accel为0状态下要移动物体请用 Action.teleportTo
64
73
  * 注意2: 此为state设置,下一帧直接以此state开始,所以不会触发任何positionCondition的cross条件
@@ -68,11 +77,13 @@ class StatePackBuilder {
68
77
  * targetY (int) 带符号整数,目标位置,如果设置为undefined,标识不以此轴为终点
69
78
  */
70
79
  setStartPos(targetX: number | undefined, targetY: number | undefined) {
71
- return CmdPackBuilder.InitStateCmdPack(StateCmdBuilder.SetPos(targetX, targetY));
80
+ return CmdPackBuilder.InitStateCmdPack(StateCmdBuilder.SetAbsPos(targetX, targetY));
72
81
  }
73
82
 
74
- /*
83
+ /**
75
84
  * setStartOffsetPos 立刻将actor移动以当前位置相对位移的位置, 作为下一个Action执行时的位置起点
85
+ * 用offset的方式可以解决触发condition时, drawX或drawY并不是完全和condition的坐标重合, 偏差的坐标可由offset继承
86
+ *
76
87
  * 注意1: 只影响当speed/accel不为0时的下一帧的运动起始位置,
77
88
  * 当speed/accel为0状态下要移动物体请用 Action.teleportOffset
78
89
  * 注意2: 此为state设置,下一帧直接以此state开始,所以不会触发任何positionCondition的cross条件
@@ -85,22 +96,47 @@ class StatePackBuilder {
85
96
  return CmdPackBuilder.InitStateCmdPack(StateCmdBuilder.SetOffsetPos(offsetX, offsetY));
86
97
  }
87
98
 
88
- /*
99
+ /**
100
+ * updateBaseOffset
101
+ * 更新本div的基准坐标, 同时立刻调整drawX, drawY, 使其相对于父dom节点的屏幕坐标保持不变
102
+ *
103
+ * @param {number} offsetX 基准坐标x偏移量
104
+ * @param {number} offsetY 基准坐标y偏移量
105
+ */
106
+ updateBaseOffset(offsetX: number, offsetY: number) {
107
+ // return CmdPackBuilder.InitStateCmdPack(StateCmdBuilder.UpdateBaseOffset(offsetX, offsetY));
108
+ }
109
+
110
+ /**
111
+ * 内部API
112
+ *
89
113
  * 在BlockerCondition发生时,进行位置回滚处理
90
114
  */
91
115
  revertWithHitBlock() {
92
116
  return CmdPackBuilder.InitStateCmdPack(StateCmdBuilder.RevertWithHitBlock());
93
117
  }
94
118
 
119
+ /**
120
+ * 内部API
121
+ *
122
+ * setHitWallOverflow
123
+ */
95
124
  setHitWallOverflow() {
96
125
  return CmdPackBuilder.InitStateCmdPack(StateCmdBuilder.SetHitWallOverflow());
97
126
  }
98
127
 
128
+ /**
129
+ * 内部API
130
+ *
131
+ * touchLockSwitch
132
+ */
99
133
  touchLockSwitch(isLock: boolean, direction: number, unlockThreshold: number = -1) {
100
134
  return CmdPackBuilder.InitStateCmdPack(StateCmdBuilder.TouchLockSwitch(isLock, direction, unlockThreshold));
101
135
  }
102
136
 
103
- /*
137
+ /**
138
+ * 内部API
139
+ *
104
140
  * fireNexusEvent 发出Nexus event
105
141
  * @param {NexusNode} nexusRecv 由 FreeMoveFunc.newNexus() 创建, 作为通讯句柄,类似电话号,在onNexusEvent监听
106
142
  * @param {number} detailEventType 监听的事件类型, 类比与分机号,和onNexusEvent约定, 自定义内容要求1000以上
@@ -110,6 +146,8 @@ class StatePackBuilder {
110
146
  }
111
147
 
112
148
  /**
149
+ * 内部API
150
+ *
113
151
  * setTouchAttractChild
114
152
  *
115
153
  * 绑定一个子view中的FreeMoveDiv
@@ -127,6 +165,8 @@ class StatePackBuilder {
127
165
  }
128
166
 
129
167
  /**
168
+ * 内部API
169
+ *
130
170
  * startMovementSync
131
171
  *
132
172
  * 发出进度同步信号(可以一个FreeMove绑定多个信号发生器,但目前场景估计只需要一个发生器即可)
@@ -158,7 +198,9 @@ class StatePackBuilder {
158
198
  xyEnable));
159
199
  }
160
200
 
161
- /*
201
+ /**
202
+ * 内部API
203
+ *
162
204
  * stopMovementSync
163
205
  *
164
206
  * 停止由startMovementSync发起的的同步信号
@@ -1,4 +1,4 @@
1
- import JsvFreeMoveActor from "./FreeMoveActor.vue";
1
+ import JsvFreeMoveActor from "./JsvFreeMoveActor.vue";
2
2
  import { ActEventDefine } from "./ForgeTypeDefine.ts"
3
3
  import { default as KeepFlags } from "./KeepFlags.ts"
4
4
  import JsvEnvBlocker from "./JsvEnvBlocker.vue"
@@ -13,6 +13,7 @@ let FreeMoveDef = {
13
13
  }
14
14
 
15
15
  let FreeMoveFunc = {
16
+ // NexusNode是用于anim之间信息通知的, 全局唯一, 以全局id区分
16
17
  newNexus,
17
18
  ActControlDebug,
18
19
  GetSyncLinkManager,
@@ -19,6 +19,7 @@ declare interface CursorOperater {
19
19
  declare type TextChangedFunc = (final_text: string, dsp_text: string) => void;
20
20
  declare type CursorMovedFunc = (new_text_start_index: number, new_cursor_left: number) => void;
21
21
  declare type TextOverflowFunc = (origin_text: string, new_text: string) => void;
22
+ declare type ImeActionFunc = (action: number) => void;
22
23
 
23
24
  export class EditViewOperator {
24
25
  private _EditViewHandle: any = null;
@@ -47,15 +48,18 @@ export class EditViewOperator {
47
48
  private _OnTextChangedCallback: TextChangedFunc;
48
49
  private _OnCursorMoved: CursorMovedFunc;
49
50
  private _TextOverflowFunc: TextOverflowFunc | undefined;
51
+ private _OnImeActionFunc: ImeActionFunc | undefined;
50
52
 
51
53
  constructor(
52
54
  text_changed_callback: TextChangedFunc,
53
55
  cursor_moved: CursorMovedFunc,
54
- text_overflow: TextOverflowFunc | undefined = undefined
56
+ text_overflow: TextOverflowFunc | undefined = undefined,
57
+ on_ime_action: ImeActionFunc | undefined = undefined
55
58
  ) {
56
59
  this._OnTextChangedCallback = text_changed_callback;
57
60
  this._OnCursorMoved = cursor_moved;
58
61
  this._TextOverflowFunc = text_overflow;
62
+ this._OnImeActionFunc = on_ime_action;
59
63
  }
60
64
 
61
65
  // 当前是否为焦点
@@ -143,7 +147,7 @@ export class EditViewOperator {
143
147
  this._EditViewHandle.addImeEventListener({
144
148
  OnTextChanged: this._OnTextChanged.bind(this),
145
149
  OnStatusChanged: this._OnStatusChanged.bind(this),
146
- OnEditAction: null
150
+ OnEditAction: this._OnEditAction.bind(this),
147
151
  });
148
152
 
149
153
  this._EditViewId = Forge.sViewStore.add(
@@ -202,6 +206,7 @@ export class EditViewOperator {
202
206
  }
203
207
 
204
208
  onUnmounted() {
209
+ this._EditViewHandle?.hideIme(); // 当home键之类对节点进行unmount时,要隐藏输入法
205
210
  this._EditViewHandle?.releaseResource();
206
211
  this._EditVisibleArea!.releaseResource();
207
212
  if (this._EditViewId != -1) {
@@ -309,6 +314,10 @@ export class EditViewOperator {
309
314
  private _OnStatusChanged(visible: boolean) {
310
315
  }
311
316
 
317
+ private _OnEditAction(action: number) {
318
+ this._OnImeActionFunc?.(action);
319
+ }
320
+
312
321
  public addText(text: string) {
313
322
  if (this._InputType === InputType.NUMBER && !ifDigital(text)) {
314
323
  // console.log(`The input data:${string} is not number`);
@@ -34,6 +34,17 @@
34
34
  * 返回true时可以规避ime显示后有时会吐出返回键导致整体退出的问题
35
35
  * @params isUp {boolean} 是down(false)还是up(true)
36
36
  * @return {boolean}
37
+ * onImeAction {function} 软键盘触发 editor action 的回调
38
+ * @params action {number} Android `BaseInputConnection#performEditorAction()` 吐回的值
39
+ * 0: IME_ACTION_UNSPECIFIED
40
+ * 1: IME_ACTION_NONE
41
+ * 2: IME_ACTION_GO
42
+ * 3: IME_ACTION_SEARCH
43
+ * 4: IME_ACTION_SEND
44
+ * 5: IME_ACTION_NEXT
45
+ * 6: IME_ACTION_DONE
46
+ * 7: IME_ACTION_PREVIOUS
47
+ * enableTap {boolean} 是否启用点击事件
37
48
  *
38
49
  * InputDispatcher dispatch支持事件:
39
50
  * add
@@ -138,8 +149,14 @@ const rProps = defineProps({
138
149
  type: Function,
139
150
  },
140
151
  onBackKey: {
141
- Type: Function,
152
+ type: Function,
153
+ },
154
+ onImeAction: {
155
+ type: Function,
142
156
  },
157
+ enableTap: {
158
+ type: Boolean,
159
+ }
143
160
  });
144
161
 
145
162
  let rCursorRef = shallowRef(null);
@@ -169,10 +186,20 @@ function _OnCursorPositionChanged(text_left, cursor_left) {
169
186
  let cEditViewOperator = new EditViewOperator(
170
187
  _OnTextChanged,
171
188
  _OnCursorPositionChanged,
172
- rProps.onTextOverflow
189
+ rProps.onTextOverflow,
190
+ (action) => {
191
+ rProps.onImeAction?.(action);
192
+ }
173
193
  );
174
194
  let vEditViewInnerId = cEditViewOperator.generateView(); // 建立Forge.EditView
175
195
 
196
+ let onTap = computed(() => {
197
+ return rProps.enableTap ? () => {
198
+ console.log("myt onTap");
199
+ cEditViewOperator.showSoftIme();
200
+ } : null;
201
+ });
202
+
176
203
  cEditViewOperator.updateInputConfig(
177
204
  rProps.width,
178
205
  rProps.height,
@@ -324,6 +351,7 @@ defineExpose({
324
351
  height: rProps.height,
325
352
  overflow: 'hidden',
326
353
  }"
354
+ @click="onTap"
327
355
  >
328
356
  <div
329
357
  :style="{
@@ -35,7 +35,7 @@
35
35
  </template>
36
36
 
37
37
  <script setup>
38
- import { shallowRef, onBeforeUnmount } from "vue";
38
+ import { shallowRef, onBeforeUnmount, watch } from "vue";
39
39
  import { createTexture } from "./LineManager";
40
40
  let isShow = shallowRef(true);
41
41
  const props = defineProps({
@@ -52,13 +52,30 @@ const getDistance = (point1, point2) => {
52
52
  const h = Math.abs(point1.y - point2.y);
53
53
  return Math.sqrt(w * w + h * h);
54
54
  };
55
- const width = getDistance(props.startPos, props.endPos);
56
55
 
57
- let angle =
58
- (180 / Math.PI) * Math.asin((props.endPos.y - props.startPos.y) / width);
59
- if (props.endPos.x < props.startPos.x) {
60
- angle = 180 - angle;
61
- }
56
+ const width = shallowRef(getDistance(props.startPos, props.endPos));
57
+ const angle = shallowRef(0);
58
+
59
+ const updateWidthAndAngle = () => {
60
+ const w = getDistance(props.startPos, props.endPos);
61
+ width.value = w;
62
+ if (w === 0) {
63
+ angle.value = 0;
64
+ } else {
65
+ let tmpAngle = (180 / Math.PI) * Math.asin((props.endPos.y - props.startPos.y) / w);
66
+ if (props.endPos.x < props.startPos.x) {
67
+ tmpAngle = 180 - tmpAngle;
68
+ }
69
+ angle.value = tmpAngle;
70
+ }
71
+ };
72
+
73
+ // watch for startPos & endPos changes
74
+ watch(
75
+ () => [props.startPos.x, props.startPos.y, props.endPos.x, props.endPos.y],
76
+ updateWidthAndAngle,
77
+ { immediate: true }
78
+ );
62
79
 
63
80
  const AnimEnd = () => {
64
81
  if (props.appear == "fadeOut") {
@@ -318,7 +318,7 @@ const stopSlide = () => {
318
318
  //公共不满足条件部分
319
319
  const commonFailState = () => {
320
320
  if (props.forceSlide) {
321
- console.error("请注意文字长度和间隙加起来必须大于组件宽度");
321
+ // console.error("请注意文字长度和间隙加起来必须大于组件宽度");
322
322
  text1.value = props.text;
323
323
  } else {
324
324
  text1.value = props.text;
@@ -17,7 +17,7 @@
17
17
  <script setup>
18
18
  import { Forge } from "@shijiu/jsview/dom/jsv-forge-define";
19
19
  import { JsvTextureStoreApi } from "../JsViewVueTools/JsvTextureStore/JsvTextureStore";
20
- import { onUnmounted, shallowRef } from "vue";
20
+ import { onUnmounted, watchEffect } from "vue";
21
21
  import JsvNinePatch from "./JsvNinePatch.vue";
22
22
 
23
23
  const rProps = defineProps({
@@ -96,19 +96,21 @@ if (!rProps.frontLayer) {
96
96
  // 通过内置函数构造定制的NativeSharedView
97
97
  vJsvMainView = new Forge.NativeSharedView();
98
98
  vInnerViewId = Forge.sViewStore.add(new Forge.ViewInfo(vJsvMainView));
99
- if (rProps.oversize != 0) {
100
- vJsvMainView.SetOverSize(rProps.oversize);
101
- }
99
+ let vOverSizeCache = 0;
102
100
 
103
- // 更新宽高
104
- if (typeof vJsvMainView != "undefined" && vJsvMainView) {
105
- if (rProps.setId) {
106
- // 使用设置进来的track id,而非自动生成
107
- vJsvMainView.SetTrackId(rProps.setId);
101
+ watchEffect(() => {
102
+ if (rProps.oversize != vOverSizeCache) {
103
+ vOverSizeCache = rProps.oversize;
104
+ vJsvMainView.SetOverSize(vOverSizeCache);
108
105
  }
106
+ });
109
107
 
110
- rProps.getId?.(vJsvMainView.GetTrackId());
108
+ // TrackId
109
+ if (rProps.setId && rProps.setId.length > 0) {
110
+ // 使用设置进来的track id,而非自动生成
111
+ vJsvMainView.SetTrackId(rProps.setId);
111
112
  }
113
+ rProps.getId?.(vJsvMainView.GetTrackId());
112
114
 
113
115
  onUnmounted(() => {
114
116
  // 清理View管理缓存
@@ -8,19 +8,24 @@
8
8
  * props说明:
9
9
  * style {Object} 同div的Style,通过width/height来控制.9图片延展后的显示尺寸,另外通过top/left控制坐标
10
10
  * imageUrl {String} (必填)显示图片的加载地址
11
- * imageWidth {int} (必填)原图信息: 原图的宽度(由于正方形,宽高相同)
12
- * contentWidth {int} (废弃)此值为了兼容,会赋值给centerWidth
13
- * centerWidth {int} (必填)原图信息: .9图的中心区域宽度(repeat区域)
14
- * imageDspWidth {int} 原图缩放后的显示宽度,计算方法:
11
+ * imageWidth {int} (必填)相对原图尺寸信息: 原图的宽度(由于正方形,宽高相同)
12
+ * centerWidth {int} (必填)相对原图尺寸信息: .9图的中心区域宽度(repeat区域), 对于用圆圈做成圆角矩形场景, 用TextureBuilder的api的返回值即可
13
+ * imageDspWidth {int} 原图缩放后的显示宽度,对于用圆圈做成圆角矩形场景, 用TextureBuilder的api的返回值即可
14
+ * 对于用其他圆角半径的图来临时顶替指定圆角半径的场景时,用如下计算方法求imageDspWidth:
15
15
  * 四角为90度圆弧时: imageDspWidth = 显示图形的圆弧半径 / 原图中圆弧的半径 * 原图宽度
16
16
  * 原图中圆弧半径 = (原图宽度 - borderOutset * 2) / 2
17
17
  * 四角为其他形状时,原图.9图的四角区域,缩放到要和显示图形重合后的宽度。
18
- * borderOutset {int} (必填)原图信息: 图片边缘到中心内容区域边缘的距离, 快速计算: (原图宽度 - 原图中放内容宽度) / 2
19
- * animTime {int} (必填)缩放动画的时长(单位秒)
20
- * waitForInit {boolean} (选填)尺寸为0时是否进行描画(例如: 首次显示不展示动画的场合,设置为true),默认值为true
18
+ * borderOutset {int} (必填)
19
+ * imageBlendType {String} (选填) alpha合并模式,默认为普通合成,可设置"alphaOverride", 用于Video挖洞操作
20
+ * (已废弃)contentWidth {int} (已废弃)此值为了兼容,会赋值给centerWidth
21
+ *
22
+ * 从此以下的参数为要做焦点框尺寸变化过渡动画时, 需要传入的属性, 若为静态的焦点框, 则不需要传入:
23
+ * animation {string} (选填)css动画, 格式同css的style.animation, 填写后, animTime启用的漂移动画将失效
24
+ * animTime {int} (选填)缩放动画的时长(单位秒), 填写后, 当style的top/left/width/height发生变化时, 会自动触发过渡动画
25
+ * waitForInit {boolean} (选填)和animTime一起使用, 用于禁用首次设置top/left/width/height产生的动画
21
26
  * onTransitionEnd { Function } (选填)transition动画结束的回调
22
27
  * onAnimationEnd { Function } (选填)animation动画结束的回调
23
- * imageBlendType {String} (选填) alpha合并模式,默认为普通合成,可设置"alphaOverride", 用于Video挖洞操作
28
+ *
24
29
  -->
25
30
 
26
31
  <script setup>