@shijiu/jsview-vue 0.9.631 → 1.9.628

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
@@ -1,22 +1,19 @@
1
1
  /*
2
- * QCode Added
2
+ * JsView Added
3
3
  */
4
4
  'use strict';
5
5
 
6
6
  Object.defineProperty(exports, '__esModule', { value: true });
7
7
 
8
+ const crypto = require('crypto');
9
+ var fs = require('fs');
10
+ var path = require('path');
11
+ var postCss = require('postcss');
12
+ var postCssJs = require('postcss-js');
13
+ var postCssImport = require('postcss-import-sync');
8
14
  const compilerSfc = require("./compiler-sfc.cjs");
9
15
  const styleFormat = require("./jsview-style-format");
10
16
 
11
- var fs = _interopDefaultLegacy(require('fs'));
12
- var hash = _interopDefaultLegacy(require('hash-sum'));
13
- var path = _interopDefaultLegacy(require('path'));
14
- var postCss = _interopDefaultLegacy(require('postcss'));
15
- var postCssJs = _interopDefaultLegacy(require('postcss-js'));
16
- var postCssImport = _interopDefaultLegacy(require('postcss-import-sync'));
17
-
18
- function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e['default'] : e; }
19
-
20
17
  var nodeModulesDir = path.resolve(process.cwd(), 'node_modules')
21
18
  var cachedCssStyles = {}
22
19
 
@@ -135,7 +132,7 @@ function compileCssToJsImpl(sfc, options) {
135
132
  checkSelectors(node, styleInfo.styleFilePath, styleInfo.styleSelectors); // 检测selector是否已经处理过
136
133
  let styleJsFilePath = path.relative(nodeModulesDir, styleInfo.styleJsFilePath);
137
134
  styleJsFilePath = styleJsFilePath.replace(/\\/g, '/');
138
- styleImportContainer += `\nimport "${styleJsFilePath}";`
135
+ styleImportContainer += `\nimport "/${path.basename(nodeModulesDir)}/${styleJsFilePath}";`
139
136
  } else if(node.name === "keyframes") {
140
137
  const styleFilePath = node.source.input.file;
141
138
  const styleSelectors = new Set([node.params]);
@@ -253,7 +250,8 @@ function compileAndSaveImportedNodeImpl(styleFilePath, styleNodes) {
253
250
  if (!fs.existsSync(cacheDir)) {
254
251
  fs.mkdirSync(cacheDir);
255
252
  }
256
- const styleJsFileName = path.basename(styleFilePath) + `.${hash(styleFilePath)}.js`;
253
+ const styleFilePathHash = crypto.createHash('md5').update(styleFilePath).digest('hex').substring(0, 8);
254
+ const styleJsFileName = path.basename(styleFilePath) + '.' + styleFilePathHash + '.js';
257
255
  const styleJsFilePath = path.join(cacheDir, styleJsFileName);
258
256
 
259
257
  styleContent = "\nObject.assign(window.JsvCode.Dom.StyleSheets, {" + styleContent;
@@ -1,3 +1,7 @@
1
+ /*
2
+ * JsView Added
3
+ */
4
+ 'use strict';
1
5
 
2
6
  const StyleName = require("./jsview-style-types").StyleName;
3
7
 
@@ -439,4 +443,4 @@ class StyleFormatter {
439
443
 
440
444
  }
441
445
 
442
- exports.getFormattedValue = StyleFormatter.GetFormattedValue;
446
+ exports.getFormattedValue = StyleFormatter.GetFormattedValue;
@@ -1,3 +1,8 @@
1
+ /*
2
+ * JsView Added
3
+ */
4
+ 'use strict';
5
+
1
6
  // export const StyleGroup = {
2
7
  // Layout: 'layout',
3
8
  // Background: 'background',
@@ -83,4 +88,4 @@ const StyleName = {
83
88
  // }
84
89
  // }
85
90
 
86
- exports.StyleName = StyleName;
91
+ exports.StyleName = StyleName;