@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.
- package/dom/bin/jsview-browser-debug-dom.min.js +1 -1
- package/dom/bin/jsview-dom.min.js +1 -1
- package/dom/{target_core_revision.js → target_core_revision.mjs} +6 -6
- package/index.d.ts +1 -0
- package/index.js +1 -10
- package/loader/jsview-main.js +1 -1
- package/loader/loader.js +0 -1
- package/package.json +3 -3
- package/patches/node_modules/@vue/compiler-sfc/dist/compiler-sfc.cjs.js +17225 -2182
- package/patches/node_modules/@vue/compiler-sfc/dist/jsview-css-to-js.js +10 -12
- package/patches/node_modules/@vue/compiler-sfc/dist/jsview-style-format.js +5 -1
- package/patches/node_modules/@vue/compiler-sfc/dist/jsview-style-types.js +6 -1
- package/patches/node_modules/@vue/runtime-core/dist/runtime-core.esm-bundler.js +6972 -7050
- package/patches/node_modules/@vue/runtime-dom/dist/runtime-dom.esm-bundler.js +221 -117
- package/patches/node_modules/postcss-js/objectifier.js +4 -4
- package/samples/Basic/App.vue +2 -2
- package/samples/Basic/components/FontStyle.css +1 -1
- package/samples/Basic/components/anim/AnimGroup.vue +4 -4
- package/samples/Basic/components/div/DivGroup1.vue +4 -4
- package/samples/Basic/components/div/DivGroup2.vue +5 -5
- package/samples/Basic/components/img/ImageGroup.vue +2 -2
- package/samples/Basic/components/panel/Panel1.vue +6 -6
- package/samples/Basic/components/panel/Panel2.vue +2 -2
- package/samples/Basic/components/text/TextGroup1.vue +4 -4
- package/samples/Basic/components/text/TextGroup2.vue +2 -2
- package/samples/Basic/components/text/TextOverflow.vue +2 -2
- package/samples/DemoHomepage/App.vue +1 -1
- package/samples/DemoHomepage/components/BodyFrame.vue +0 -2
- package/samples/DemoHomepage/router.js +36 -51
- package/samples/DemoHomepage/views/Homepage.vue +9 -5
- package/samples/HashHistory/router.js +6 -6
- package/samples/Input/App.vue +17 -8
- package/samples/Input/InputPanel.vue +11 -18
- package/samples/MetroWidgetDemos/PingPong/App.vue +3 -3
- package/samples/MetroWidgetDemos/PingPong/AppPage.vue +2 -17
- package/samples/MetroWidgetDemos/PingPong/AppTab.vue +10 -3
- package/samples/MetroWidgetDemos/PingPong/{TabItem.vue → Item.vue} +10 -2
- package/samples/MetroWidgetDemos/PingPong/ViewSwiper.vue +2 -2
- package/samples/Preload/App.vue +11 -16
- package/samples/SprayView/App.vue +2 -2
- package/samples/TextureAnimation/App2.vue +14 -42
- package/samples/VideoDemo/App.vue +2 -2
- package/samples/VisibleSensorDemo/App.vue +25 -92
- package/scripts/jsview-post-install.js +5 -5
- package/scripts/jsview-run-android.js +12 -11
- package/utils/JsViewEngineWidget/JsvFocusBlock.vue +56 -52
- package/utils/JsViewEngineWidget/JsvFocusManager.js +1 -1
- package/utils/JsViewPlugin/JsvPlayer/JsvMedia.js +2 -36
- package/utils/JsViewPlugin/JsvPlayer/JsvPlayer.vue +0 -14
- package/utils/JsViewPlugin/JsvPlayer/index.js +1 -8
- package/utils/JsViewPlugin/JsvPlayer/version.js +4 -4
- package/utils/JsViewVueTools/JsvHashHistory.js +12 -12
- package/utils/JsViewVueTools/index.d.ts +5 -1
- package/utils/JsViewVueTools/index.js +1 -2
- package/utils/JsViewVueWidget/BrowserDebugWidget/BrowserPreload.vue +1 -11
- package/utils/JsViewVueWidget/JsvActorMove/JsvActorMove.vue +2 -2
- package/utils/JsViewVueWidget/JsvInput/Cursor.vue +2 -4
- package/utils/JsViewVueWidget/JsvInput/JsvInput.vue +12 -13
- package/utils/JsViewVueWidget/JsvPreload/JsvPreload.vue +41 -37
- package/utils/JsViewVueWidget/JsvTextureAnim/JsvTextureAnim.vue +8 -1
- package/utils/JsViewVueWidget/JsvVisibleSensor/JsvVisibleSensor.vue +1 -1
- package/utils/index.d.ts +3 -0
- package/utils/index.js +10 -0
- package/dom/jsv-browser-debug-dom.js_1 +0 -8
- package/dom/jsv-dom.js_1 +0 -6
- package/dom/jsv-forge-define.js_1 +0 -6
- package/patches/node_modules/@babel/preset-env/lib/available-plugins.js +0 -219
- package/patches/node_modules/@vue/cli-plugin-typescript/index.js +0 -100
- package/patches/node_modules/@vue/cli-service/lib/commands/serve.js +0 -395
- package/patches/node_modules/@vue/cli-service/lib/config/app.js +0 -272
- package/patches/node_modules/@vue/cli-service/lib/config/assets.js +0 -70
- package/patches/node_modules/@vue/cli-service/lib/config/base.js +0 -212
- package/patches/node_modules/vue-loader/dist/resolveScript.js +0 -70
- package/samples/Collision/App.vue +0 -452
- package/samples/ImpactStop/App.vue +0 -435
- package/samples/TextureAnimation/assets/light.png +0 -0
- package/samples/TextureAnimation/assets/light2.png +0 -0
- package/utils/JsViewVueTools/JsvImpactTracer.js +0 -113
|
@@ -1,22 +1,19 @@
|
|
|
1
1
|
/*
|
|
2
|
-
*
|
|
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 "
|
|
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
|
|
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;
|