@shijiu/jsview-vue 0.9.631 → 1.9.627

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 (78) hide show
  1. package/dom/bin/jsview-browser-debug-dom.min.js +1 -1
  2. package/dom/bin/jsview-dom.min.js +1 -1
  3. package/dom/{target_core_revision.js → target_core_revision.mjs} +6 -6
  4. package/index.d.ts +1 -0
  5. package/index.js +1 -10
  6. package/loader/jsview-main.js +1 -1
  7. package/loader/loader.js +0 -1
  8. package/package.json +3 -3
  9. package/patches/node_modules/@vue/compiler-sfc/dist/compiler-sfc.cjs.js +17225 -2182
  10. package/patches/node_modules/@vue/compiler-sfc/dist/jsview-css-to-js.js +10 -12
  11. package/patches/node_modules/@vue/compiler-sfc/dist/jsview-style-format.js +5 -1
  12. package/patches/node_modules/@vue/compiler-sfc/dist/jsview-style-types.js +6 -1
  13. package/patches/node_modules/@vue/runtime-core/dist/runtime-core.esm-bundler.js +6972 -7050
  14. package/patches/node_modules/@vue/runtime-dom/dist/runtime-dom.esm-bundler.js +221 -117
  15. package/patches/node_modules/postcss-js/objectifier.js +4 -4
  16. package/samples/Basic/App.vue +2 -2
  17. package/samples/Basic/components/FontStyle.css +1 -1
  18. package/samples/Basic/components/anim/AnimGroup.vue +4 -4
  19. package/samples/Basic/components/div/DivGroup1.vue +4 -4
  20. package/samples/Basic/components/div/DivGroup2.vue +5 -5
  21. package/samples/Basic/components/img/ImageGroup.vue +2 -2
  22. package/samples/Basic/components/panel/Panel1.vue +6 -6
  23. package/samples/Basic/components/panel/Panel2.vue +2 -2
  24. package/samples/Basic/components/text/TextGroup1.vue +4 -4
  25. package/samples/Basic/components/text/TextGroup2.vue +2 -2
  26. package/samples/Basic/components/text/TextOverflow.vue +2 -2
  27. package/samples/DemoHomepage/App.vue +1 -1
  28. package/samples/DemoHomepage/components/BodyFrame.vue +0 -2
  29. package/samples/DemoHomepage/router.js +36 -51
  30. package/samples/DemoHomepage/views/Homepage.vue +9 -5
  31. package/samples/HashHistory/router.js +6 -6
  32. package/samples/Input/App.vue +17 -8
  33. package/samples/Input/InputPanel.vue +11 -18
  34. package/samples/MetroWidgetDemos/PingPong/App.vue +3 -3
  35. package/samples/MetroWidgetDemos/PingPong/AppPage.vue +2 -17
  36. package/samples/MetroWidgetDemos/PingPong/AppTab.vue +10 -3
  37. package/samples/MetroWidgetDemos/PingPong/{TabItem.vue → Item.vue} +10 -2
  38. package/samples/MetroWidgetDemos/PingPong/ViewSwiper.vue +2 -2
  39. package/samples/Preload/App.vue +11 -16
  40. package/samples/SprayView/App.vue +2 -2
  41. package/samples/TextureAnimation/App2.vue +14 -42
  42. package/samples/VideoDemo/App.vue +2 -2
  43. package/samples/VisibleSensorDemo/App.vue +25 -92
  44. package/scripts/jsview-post-install.js +5 -5
  45. package/scripts/jsview-run-android.js +12 -11
  46. package/utils/JsViewEngineWidget/JsvFocusBlock.vue +56 -52
  47. package/utils/JsViewEngineWidget/JsvFocusManager.js +1 -1
  48. package/utils/JsViewPlugin/JsvPlayer/JsvMedia.js +2 -36
  49. package/utils/JsViewPlugin/JsvPlayer/JsvPlayer.vue +0 -14
  50. package/utils/JsViewPlugin/JsvPlayer/index.js +1 -8
  51. package/utils/JsViewPlugin/JsvPlayer/version.js +4 -4
  52. package/utils/JsViewVueTools/JsvHashHistory.js +12 -12
  53. package/utils/JsViewVueTools/index.d.ts +5 -1
  54. package/utils/JsViewVueTools/index.js +1 -2
  55. package/utils/JsViewVueWidget/BrowserDebugWidget/BrowserPreload.vue +1 -11
  56. package/utils/JsViewVueWidget/JsvActorMove/JsvActorMove.vue +2 -2
  57. package/utils/JsViewVueWidget/JsvInput/Cursor.vue +2 -4
  58. package/utils/JsViewVueWidget/JsvInput/JsvInput.vue +12 -13
  59. package/utils/JsViewVueWidget/JsvPreload/JsvPreload.vue +41 -37
  60. package/utils/JsViewVueWidget/JsvTextureAnim/JsvTextureAnim.vue +8 -1
  61. package/utils/JsViewVueWidget/JsvVisibleSensor/JsvVisibleSensor.vue +1 -1
  62. package/utils/index.d.ts +3 -0
  63. package/utils/index.js +10 -0
  64. package/dom/jsv-browser-debug-dom.js_1 +0 -8
  65. package/dom/jsv-dom.js_1 +0 -6
  66. package/dom/jsv-forge-define.js_1 +0 -6
  67. package/patches/node_modules/@babel/preset-env/lib/available-plugins.js +0 -219
  68. package/patches/node_modules/@vue/cli-plugin-typescript/index.js +0 -100
  69. package/patches/node_modules/@vue/cli-service/lib/commands/serve.js +0 -395
  70. package/patches/node_modules/@vue/cli-service/lib/config/app.js +0 -272
  71. package/patches/node_modules/@vue/cli-service/lib/config/assets.js +0 -70
  72. package/patches/node_modules/@vue/cli-service/lib/config/base.js +0 -212
  73. package/patches/node_modules/vue-loader/dist/resolveScript.js +0 -70
  74. package/samples/Collision/App.vue +0 -452
  75. package/samples/ImpactStop/App.vue +0 -435
  76. package/samples/TextureAnimation/assets/light.png +0 -0
  77. package/samples/TextureAnimation/assets/light2.png +0 -0
  78. package/utils/JsViewVueTools/JsvImpactTracer.js +0 -113
@@ -2,13 +2,13 @@
2
2
  * @Author: ChenChanghua
3
3
  * @Date: 2022-07-12 10:45:38
4
4
  * @LastEditors: ChenChanghua
5
- * @LastEditTime: 2022-09-01 17:04:31
5
+ * @LastEditTime: 2022-07-12 14:43:49
6
6
  * @Description: file content
7
7
  -->
8
8
  <script setup>
9
9
  import { VERTICAL, MetroWidget } from "jsview";
10
10
  import WidgetItem from "../WidgetItem.vue";
11
- import { ref, watch, onBeforeUnmount } from "vue";
11
+ import { reactive } from "vue";
12
12
 
13
13
  const props = defineProps({
14
14
  data: {
@@ -24,8 +24,6 @@ const props = defineProps({
24
24
  },
25
25
  });
26
26
 
27
- const widgetRef = ref(null);
28
-
29
27
  const provideData = () => {
30
28
  return props.data.data;
31
29
  };
@@ -36,23 +34,10 @@ const measures = (item) => {
36
34
  doSlide: false,
37
35
  };
38
36
  };
39
-
40
- const watcher = watch(
41
- () => props.data,
42
- (newValue, oldValue) => {
43
- widgetRef.value?.refreshData();
44
- }
45
- );
46
-
47
- onBeforeUnmount(() => {
48
- watcher();
49
- })
50
-
51
37
  </script>
52
38
 
53
39
  <template>
54
40
  <metro-widget
55
- ref="widgetRef"
56
41
  :name="name"
57
42
  :width="data.width"
58
43
  :height="data.height"
@@ -2,12 +2,19 @@
2
2
  * @Author: ChenChanghua
3
3
  * @Date: 2022-07-12 10:45:19
4
4
  * @LastEditors: ChenChanghua
5
- * @LastEditTime: 2022-09-01 16:19:51
5
+ * @LastEditTime: 2022-07-12 15:39:29
6
6
  * @Description: file content
7
7
  -->
8
+ <!--
9
+ * @Author: ChenChanghua
10
+ * @Date: 2021-12-21 17:18:58
11
+ * @LastEditors: ChenChanghua
12
+ * @LastEditTime: 2021-12-28 10:58:25
13
+ * @Description: 标题 tab
14
+ -->
8
15
  <script setup>
9
16
  import { HORIZONTAL, MetroWidget } from "jsview";
10
- import TabItem from "./TabItem.vue";
17
+ import Item from "./Item.vue";
11
18
 
12
19
  const props = defineProps({
13
20
  data: {
@@ -55,7 +62,7 @@ const provideData = () => {
55
62
  }"
56
63
  >
57
64
  <template #renderItem="{ data, query, onAction }">
58
- <tab-item :data="data" :query="query" :onAction="onAction"></tab-item>
65
+ <item :data="data" :query="query" :onAction="onAction"></item>
59
66
  </template>
60
67
  </metro-widget>
61
68
  </jsv-focus-block>
@@ -2,7 +2,14 @@
2
2
  * @Author: ChenChanghua
3
3
  * @Date: 2022-07-12 14:52:53
4
4
  * @LastEditors: ChenChanghua
5
- * @LastEditTime: 2022-09-01 17:10:14
5
+ * @LastEditTime: 2022-07-12 16:08:56
6
+ * @Description: file content
7
+ -->
8
+ <!--
9
+ * @Author: ChenChanghua
10
+ * @Date: 2022-05-10 15:21:24
11
+ * @LastEditors: ChenChanghua
12
+ * @LastEditTime: 2022-07-11 17:00:58
6
13
  * @Description: file content
7
14
  -->
8
15
  <script setup>
@@ -26,12 +33,13 @@ const onFocus = () => {
26
33
  active.value = false;
27
34
  };
28
35
  const onBlur = () => {
36
+ console.log("cchtest item onblur");
29
37
  focused.value = false;
30
38
  active.value =
31
39
  props.query.getCurrentFocusId().id === props.query.id ? true : false;
32
40
  };
33
41
  const onClick = () => {
34
- console.log("tab item onclick ", props.data);
42
+ console.log("item onclick ", props.data);
35
43
  };
36
44
 
37
45
  // 一般在create的时候进行回调的注册, 使用 option api的可以在created时进行注册
@@ -2,13 +2,13 @@
2
2
  * @Author: ChenChanghua
3
3
  * @Date: 2022-07-12 10:30:33
4
4
  * @LastEditors: ChenChanghua
5
- * @LastEditTime: 2022-09-01 17:05:07
5
+ * @LastEditTime: 2022-07-13 10:50:43
6
6
  * @Description: file content
7
7
  -->
8
8
  <script>
9
9
  import AppPage from "./AppPage.vue";
10
10
  import { getKeyFramesGroup } from "jsview";
11
- import { reactive, ref } from "vue";
11
+ import { reactive } from "vue";
12
12
 
13
13
  export default {
14
14
  components: {
@@ -5,7 +5,6 @@ import {
5
5
  JsvPreload,
6
6
  buildPreloadInfo,
7
7
  buildDownloadInfo,
8
- useFocusHub,
9
8
  } from "jsview";
10
9
  import awesome from "./images/awesomeface.png";
11
10
  import cat from "./images/cat.jpg";
@@ -15,11 +14,11 @@ import { ref } from "vue";
15
14
  import { useRouter } from "vue-router";
16
15
 
17
16
  const name = "/preload";
18
- const focusHub = useFocusHub();
19
17
  const text = ref("");
20
- let preloadInfo = [];
21
- let downloadInfo = [];
18
+ let = preloadInfo = [];
19
+ let = downloadInfo = [];
22
20
  const router = useRouter();
21
+ let focusNode = ref(null);
23
22
 
24
23
  const _onPreloading = (percent) => {
25
24
  console.log("preloading ", percent);
@@ -29,9 +28,9 @@ const _onPreloadDone = (imageInfo) => {
29
28
  console.log("PRELOAD DONE!", imageInfo);
30
29
  };
31
30
 
32
- const _onDownloadDone = (urls, extra) => {
33
- console.log("DOWNLOAD DONE!", urls, extra);
34
- text.value = `图片下载完成\n${awesome}\n${cat}`;
31
+ const _onDownloadDone = () => {
32
+ console.log("DOWNLOAD DONE!");
33
+ this.text = `图片下载完成\n${awesome}\n${cat}`;
35
34
  };
36
35
 
37
36
  const _measures = () => {
@@ -44,13 +43,13 @@ const _measures = () => {
44
43
 
45
44
  const _onKeyDown = (ev) => {
46
45
  if (ev.keyCode == 8 || ev.keyCode == 27 || ev.keyCode == 10000) {
47
- router?.go(-1); // 有router时,是从DemoHomepage进入,回退
46
+ router.go(-1); // 有router时,是从DemoHomepage进入,回退
48
47
  }
49
48
  return true;
50
49
  };
51
50
 
52
51
  const _onFocus = () => {
53
- focusHub.setFocus(name);
52
+ focusNode.value.findBlockByName(name).requestFocus();
54
53
  };
55
54
 
56
55
  for (const item of data) {
@@ -59,20 +58,16 @@ for (const item of data) {
59
58
  }
60
59
  preloadInfo.push(null); // 测试item为null的加载
61
60
  downloadInfo = [
62
- buildDownloadInfo(awesome, null, true),
63
- buildDownloadInfo(cat, null, true),
61
+ buildDownloadInfo(awesome),
62
+ buildDownloadInfo(cat),
64
63
  buildDownloadInfo(null), // 测试URL为null的加载
65
64
  ];
66
65
  </script>
67
66
 
68
67
  <template>
69
68
  <jsv-focus-block
69
+ ref="focusNode"
70
70
  autoFocus
71
- :style="{
72
- width: 1920,
73
- height: 1080,
74
- backgroundColor: '#FFFFFF',
75
- }"
76
71
  :onAction="{
77
72
  onKeyDown: _onKeyDown,
78
73
  onFocus: _onFocus,
@@ -234,8 +234,8 @@ export default {
234
234
  }
235
235
  }
236
236
  .root {
237
- width: 1920px;
238
- height: 1080px;
237
+ width: 1280px;
238
+ height: 720;
239
239
  background-color: #334c4c;
240
240
  }
241
241
 
@@ -9,19 +9,18 @@ import {
9
9
  DECORATE_NINEPATCH_ALPHA_MIX,
10
10
  DECORATE_BORDER_RADIUS,
11
11
  } from "jsview";
12
- import img from "./assets/light.png";
13
- import img2 from "./assets/light2.png";
12
+ import img from "./assets/swipLight.png";
14
13
  import mask from "./assets/mask.png";
15
14
 
16
15
  const getRandom = (start, end) => {
17
16
  return Math.round(Math.random() * (end - start) + start);
18
- };
17
+ }
19
18
 
20
19
  const router = useRouter();
21
20
  const width = ref(300);
22
21
  const height = ref(200);
23
22
  const left = ref(50);
24
- const top = ref(80);
23
+ const top = ref(50);
25
24
  const rotateAnimation =
26
25
  "{from {transform: rotate3d(0,0,1,0);} to {transform: rotate3d(0,0,1,360deg);}}";
27
26
 
@@ -33,20 +32,23 @@ const ninePatchDecorator = {
33
32
  borderOutset: 0,
34
33
  animTime: 0.5,
35
34
  };
36
- //注意texture的尺寸需要兼顾最大的view
37
- const texCoord = {
38
- width: 600,
39
- height: 600,
40
- };
35
+ const texCoord = ref({
36
+ width: 400,
37
+ height: 400,
38
+ });
41
39
  const onKeyDown = (ev) => {
42
40
  // 8:Backspace, 27:Escape, 10000:盒子返回键
43
41
  if (ev.keyCode == 8 || ev.keyCode == 27 || ev.keyCode == 10000) {
44
42
  router?.go(-1); // 有router时,是从DemoHomepage进入,回退
45
43
  } else if (ev.keyCode == 13) {
46
44
  left.value = getRandom(50, 400);
47
- top.value = getRandom(80, 200);
45
+ top.value = getRandom(50, 200);
48
46
  width.value = getRandom(100, 300);
49
47
  height.value = getRandom(100, 300);
48
+ texCoord.value = {
49
+ width: Math.max(width.value, height.value) * 1.414,
50
+ height: Math.max(width.value, height.value) * 1.414,
51
+ }
50
52
  }
51
53
  return true;
52
54
  };
@@ -58,27 +60,12 @@ const onKeyDown = (ev) => {
58
60
  :style="{
59
61
  width: 1280,
60
62
  height: 720,
61
- backgroundImage:
62
- 'https://qcast-image.oss-cn-qingdao.aliyuncs.com/JsViewVideo/ImageTestSample/BackgroundLongmao.jpg',
63
+ backgroundImage: 'https://qcast-image.oss-cn-qingdao.aliyuncs.com/JsViewVideo/ImageTestSample/BackgroundLongmao.jpg',
63
64
  }"
64
65
  >
65
- <div
66
- :style="{
67
- textAlign: 'center',
68
- fontSize: '30px',
69
- lineHeight: '50px',
70
- color: '#ffffff',
71
- left: 140,
72
- top: 20,
73
- width: 1000,
74
- height: 50,
75
- backgroundColor: 'rgba(27,38,151,0.8)',
76
- }"
77
- >
78
- .9型的旋转焦点框,OK键进行随机位置+尺寸变换
79
- </div>
80
66
  <div>
81
67
  <jsv-texture-anim
68
+ ref="textureAnim1"
82
69
  :src="img"
83
70
  :left="left"
84
71
  :top="top"
@@ -92,20 +79,5 @@ const onKeyDown = (ev) => {
92
79
  :decorate="ninePatchDecorator"
93
80
  ></jsv-texture-anim>
94
81
  </div>
95
- <div>
96
- <jsv-texture-anim
97
- :src="img2"
98
- :left="left + 500"
99
- :top="top"
100
- :width="width"
101
- :height="height"
102
- :texCoord="texCoord"
103
- :animation="rotateAnimation"
104
- :duration="2000"
105
- :repeat="-1"
106
- :autoStart="true"
107
- :decorate="ninePatchDecorator"
108
- ></jsv-texture-anim>
109
- </div>
110
82
  </jsv-focus-block>
111
83
  </template>
@@ -1,7 +1,7 @@
1
1
  <script setup>
2
2
  import { provide, reactive, ref, watch } from "vue";
3
- import Controllor from "./components/Controllor";
4
- import VideoFrame from "./components/VideoFrame";
3
+ import Controllor from "./components/Controllor.vue";
4
+ import VideoFrame from "./components/VideoFrame.vue";
5
5
 
6
6
  const Caption = {
7
7
  offscreenVideo:
@@ -1,15 +1,22 @@
1
1
  <script setup>
2
- import { watch, reactive, onMounted, ref } from "vue";
2
+ import { reactive, onMounted, ref } from "vue";
3
3
  import { useRouter } from "vue-router";
4
4
  import { jJsvRuntimeBridge, JsvVisibleSensor } from "jsview";
5
5
 
6
6
  const BOX_WIDTH = 150;
7
7
  const BOX_HEIGHT = 150;
8
- const BOX_COLOR = "rgba(0,255,255,0.6)";
9
- const VISIBLE_RANGE = 0.25;
8
+ const BOX_COLOR = "#00FFFF";
10
9
 
11
10
  const router = useRouter();
12
11
 
12
+ let shown = reactive({
13
+ vertical: 0.25,
14
+ horizon: 1.0,
15
+ });
16
+
17
+ let left_change = reactive({ left: 0 });
18
+ let top_change = reactive({ top: 0 });
19
+
13
20
  const containerRef = ref(null);
14
21
  let case_config = ref(null);
15
22
  let status_text = reactive({
@@ -19,24 +26,12 @@ let status_text = reactive({
19
26
  newV: "false",
20
27
  });
21
28
 
22
- let test_case_type = ref(0);
23
-
24
- window.LudlTestCase = test_case_type;
25
-
26
- case_config.value = getTestCase(test_case_type.value);
27
-
28
- watch(test_case_type, () => {
29
- case_config.value = getTestCase(test_case_type.value);
30
- });
29
+ case_config.value = getTestCase(0);
31
30
 
32
31
  onMounted(() => {
33
32
  jJsvRuntimeBridge.notifyPageLoaded();
34
33
  });
35
34
 
36
- // const onAnimDone = () => {
37
- // test_case_type.value = (test_case_type.value + 1) % 2;
38
- // };
39
-
40
35
  // 内部接口
41
36
  const onBeVisible = (old_h, new_h, old_v, new_v) => {
42
37
  status_text.oldH = old_h ? "true" : "false";
@@ -51,9 +46,6 @@ const onKeyDown = (ev) => {
51
46
  router?.go(-1); // 有router时,回退
52
47
  return true;
53
48
  }
54
- if (ev.keyCode == 13) {
55
- test_case_type.value = (test_case_type.value + 1) % 2;
56
- }
57
49
  return false;
58
50
  };
59
51
 
@@ -68,17 +60,17 @@ function getTestCase(test_index) {
68
60
  switch (test_index) {
69
61
  case 0: {
70
62
  // 上到下
71
- test_config.animation = "visibleSensor_upDown 8s infinite linear";
63
+ test_config.animation = "visibleSensor_upDown 5s infinite linear";
72
64
  test_config.text = "从上到下";
73
65
  test_config.horizon = 1.0;
74
- test_config.vertical = VISIBLE_RANGE;
66
+ test_config.vertical = 0.25;
75
67
  break;
76
68
  }
77
69
  case 1: {
78
70
  // 左到右
79
- test_config.animation = "visibleSensor_leftRight 8s infinite linear";
71
+ test_config.animation = "visibleSensor_leftRight 5s infinite linear";
80
72
  test_config.text = "从左到右";
81
- test_config.horizon = VISIBLE_RANGE;
73
+ test_config.horizon = 0.25;
82
74
  test_config.vertical = 1.0;
83
75
  break;
84
76
  }
@@ -95,7 +87,7 @@ function getTestCase(test_index) {
95
87
  :style="{
96
88
  left: 10,
97
89
  top: 10,
98
- height: 120,
90
+ height: 100,
99
91
  width: 900,
100
92
  fontColor: '#000000',
101
93
  fontSize: 15,
@@ -103,8 +95,7 @@ function getTestCase(test_index) {
103
95
  }"
104
96
  >
105
97
  {{
106
- `按OK键切换方向
107
- new horizon: ${status_text.newH}
98
+ `new horizon: ${status_text.newH}
108
99
  new vertical: ${status_text.newV}
109
100
  -------
110
101
  old horizon: ${status_text.oldH}
@@ -115,34 +106,12 @@ old vertical: ${status_text.oldV}`
115
106
  ref="containerRef"
116
107
  :style="{
117
108
  left: 240,
118
- top: 180,
119
- width: 300,
120
- height: 300,
109
+ top: 110,
110
+ width: 800,
111
+ height: 500,
121
112
  backgroundColor: '#00F0F0',
122
113
  }"
123
114
  >
124
- <div
125
- :style="{
126
- left: 50,
127
- top: 50,
128
- width: 200,
129
- height: 200,
130
- backgroundColor: '#00AAAA',
131
- zIndex: test_case_type == 0 ? -22 : 0,
132
- }"
133
- />
134
-
135
- <div
136
- :style="{
137
- left: 80,
138
- top: 30,
139
- width: 140,
140
- height: 240,
141
- backgroundColor: '#0000AA',
142
- zIndex: test_case_type == 0 ? -33 : 0,
143
- }"
144
- />
145
-
146
115
  <div
147
116
  :style="{
148
117
  left: 0,
@@ -159,40 +128,6 @@ old vertical: ${status_text.oldV}`
159
128
  :container="containerRef"
160
129
  :callback="onBeVisible"
161
130
  >
162
- <div v-if="test_case_type == 0">
163
- <div
164
- :style="{
165
- width: BOX_WIDTH,
166
- height: BOX_HEIGHT * VISIBLE_RANGE,
167
- backgroundColor: '#FF0000',
168
- }"
169
- />
170
- <div
171
- :style="{
172
- top: BOX_HEIGHT * (1 - VISIBLE_RANGE),
173
- width: BOX_WIDTH,
174
- height: BOX_HEIGHT * VISIBLE_RANGE,
175
- backgroundColor: '#FF0000',
176
- }"
177
- />
178
- </div>
179
- <div v-else>
180
- <div
181
- :style="{
182
- width: BOX_WIDTH * VISIBLE_RANGE,
183
- height: BOX_HEIGHT,
184
- backgroundColor: '#FF0000',
185
- }"
186
- />
187
- <div
188
- :style="{
189
- left: BOX_WIDTH * (1 - VISIBLE_RANGE),
190
- width: BOX_WIDTH * VISIBLE_RANGE,
191
- height: BOX_HEIGHT,
192
- backgroundColor: '#FF0000',
193
- }"
194
- />
195
- </div>
196
131
  <div
197
132
  :style="{
198
133
  width: BOX_WIDTH,
@@ -202,9 +137,7 @@ old vertical: ${status_text.oldV}`
202
137
  lineHeight: 30,
203
138
  }"
204
139
  >
205
- {{
206
- `${case_config.text}\nH:${status_text.newH}\nV:${status_text.newV}`
207
- }}
140
+ {{ case_config.text }}
208
141
  </div>
209
142
  </JsvVisibleSensor>
210
143
  </div>
@@ -216,19 +149,19 @@ old vertical: ${status_text.oldV}`
216
149
  <style scoped>
217
150
  @keyframes visibleSensor_upDown {
218
151
  from {
219
- transform: translate3d(75px, -180px, 0);
152
+ transform: translate3d(300px, -200px, 0);
220
153
  }
221
154
  to {
222
- transform: translate3d(75px, 330px, 0);
155
+ transform: translate3d(300px, 600px, 0);
223
156
  }
224
157
  }
225
158
 
226
159
  @keyframes visibleSensor_leftRight {
227
160
  from {
228
- transform: translate3d(-180px, 75px, 0);
161
+ transform: translate3d(-160px, 200px, 0);
229
162
  }
230
163
  to {
231
- transform: translate3d(330px, 75px, 0);
164
+ transform: translate3d(1400px, 200px, 0);
232
165
  }
233
166
  }
234
167
  </style>
@@ -47,9 +47,9 @@ function installPatches(options) {
47
47
  }
48
48
 
49
49
  async function printRevision(options) {
50
- const jsveiwVersionFile = options.jsviewDir + '/dom/target_core_revision.js';
50
+ const jsveiwVersionFile = options.jsviewDir + '/dom/target_core_revision.mjs';
51
51
 
52
- const jsviewTargetVersion = require(jsveiwVersionFile);
52
+ const { default: jsviewTargetVersion } = await import(jsveiwVersionFile);
53
53
 
54
54
  console.log('**************************************************');
55
55
  console.log('* Update revision to:');
@@ -84,14 +84,14 @@ function main() {
84
84
  const options = {};
85
85
  options.projectDir = process.cwd();
86
86
  options.modulesDir = path.resolve(options.projectDir, 'node_modules');
87
- options.jsviewDir = path.resolve(options.modulesDir, '@shijiu/jsview-vue');
87
+ options.jsviewDir = path.resolve(options.modulesDir, '@shijiu', 'jsview-vue');
88
88
  options.patchesDir = path.resolve(options.jsviewDir, 'patches');
89
89
  options.distDir = path.resolve(options.projectDir, 'dist');
90
90
 
91
91
  checkNpmCommand();
92
92
 
93
- checkPackageVersion(options, 'vue', '3.2.8');
94
- checkPackageVersion(options, '@vue/compiler-sfc', '3.2.8');
93
+ checkPackageVersion(options, 'vue', '3.2.37');
94
+ checkPackageVersion(options, '@vue/compiler-sfc', '3.2.37');
95
95
 
96
96
  installPatches(options);
97
97
 
@@ -3,7 +3,7 @@
3
3
  const childProcess = require('child_process');
4
4
  const path = require('path');
5
5
 
6
- function getOptions() {
6
+ async function getOptions() {
7
7
  const options = {
8
8
  androidPackage: "com.qcode.jsview.sample_demo/com.qcode.jsview.sample.SingleActivity",
9
9
  coreRevision: null,
@@ -15,17 +15,18 @@ function getOptions() {
15
15
  options.androidPackage = process.argv[2];
16
16
  }
17
17
 
18
- const rootDir = process.cwd();
19
- const jsviewDir = path.resolve(rootDir, 'jsview');
20
- const jsveiwVersionFile = path.resolve(jsviewDir, 'dom/target_core_revision.js');
21
- const jsviewTargetVersion = require(jsveiwVersionFile);
18
+ const projectDir = process.cwd();
19
+ const modulesDir = path.resolve(projectDir, 'node_modules');
20
+ const jsviewDir = path.resolve(modulesDir, '@shijiu', 'jsview-vue');
21
+ const jsveiwVersionFile = path.resolve(jsviewDir, 'dom', 'target_core_revision.mjs');
22
+ const { default: jsviewTargetVersion } = await import(jsveiwVersionFile);
22
23
  options.coreRevision = jsviewTargetVersion.CoreRevision;
23
24
  options.jseUrl = jsviewTargetVersion.JseUrl;
24
25
 
25
- const homepageUrlFile = path.resolve(rootDir, 'node_modules/.cache/jsview/network');
26
- let homepageUrl = require(homepageUrlFile);
27
- homepageUrl = homepageUrl.replace(/\u001b\[.*?m/g, '')
28
- options.homepageUrl = homepageUrl + "js/main.jsv.js";
26
+ const homepageUrlFile = path.resolve(modulesDir, '.vite', 'jsview', 'network.mjs');
27
+ let { default: homepageDomain } = await import(homepageUrlFile);
28
+ homepageDomain = homepageDomain.replace(/\u001b\[.*?m/g, '')
29
+ options.homepageUrl = homepageDomain + "js/main.jsv.js";
29
30
 
30
31
  return options;
31
32
  }
@@ -54,8 +55,8 @@ function androidStartActivity(options) {
54
55
  }
55
56
 
56
57
 
57
- function main() {
58
- const options = getOptions();
58
+ async function main() {
59
+ const options = await getOptions();
59
60
 
60
61
  printRevision(options);
61
62