@wiajs/core 1.1.17 → 1.1.19
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/dist/core.cjs +7 -1
- package/dist/core.js +1 -1
- package/dist/core.min.js +2 -2
- package/dist/core.mjs +7 -1
- package/dist/jsx-dev-runtime.js +43 -0
- package/dist/jsx-runtime.js +47 -0
- package/gulpfile.js +5 -5
- package/package.json +3 -1
package/dist/core.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* wia core v1.1.
|
|
2
|
+
* wia core v1.1.19
|
|
3
3
|
* (c) 2015-2024 Sibyl Yu and contributors
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
@@ -2036,6 +2036,12 @@ class Event {
|
|
|
2036
2036
|
}
|
|
2037
2037
|
}
|
|
2038
2038
|
|
|
2039
|
+
// 记录page属性,标记事件来源,冒泡到app时判断是否触发本页面应用事件
|
|
2040
|
+
// if (parentEvents && $.isPage(m)) {
|
|
2041
|
+
// parentEvents.owner = m?.owner;
|
|
2042
|
+
// parentEvents.appName = m?.appName;
|
|
2043
|
+
// }
|
|
2044
|
+
|
|
2039
2045
|
// 调用对象事件函数,父对象emit后,调用父对象事件函数
|
|
2040
2046
|
selfEvents.forEach(ev => {
|
|
2041
2047
|
if (m.eventsListeners && m.eventsListeners[ev]) {
|
package/dist/core.js
CHANGED
package/dist/core.min.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* wia core v1.1.
|
|
2
|
+
* wia core v1.1.19
|
|
3
3
|
* (c) 2015-2024 Sibyl Yu and contributors
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
6
6
|
/*!
|
|
7
|
-
* wia core v1.1.
|
|
7
|
+
* wia core v1.1.19
|
|
8
8
|
* (c) 2015-2024 Sibyl Yu and contributors
|
|
9
9
|
* Released under the MIT License.
|
|
10
10
|
*/
|
package/dist/core.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* wia core v1.1.
|
|
2
|
+
* wia core v1.1.19
|
|
3
3
|
* (c) 2015-2024 Sibyl Yu and contributors
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
@@ -2034,6 +2034,12 @@ class Event {
|
|
|
2034
2034
|
}
|
|
2035
2035
|
}
|
|
2036
2036
|
|
|
2037
|
+
// 记录page属性,标记事件来源,冒泡到app时判断是否触发本页面应用事件
|
|
2038
|
+
// if (parentEvents && $.isPage(m)) {
|
|
2039
|
+
// parentEvents.owner = m?.owner;
|
|
2040
|
+
// parentEvents.appName = m?.appName;
|
|
2041
|
+
// }
|
|
2042
|
+
|
|
2037
2043
|
// 调用对象事件函数,父对象emit后,调用父对象事件函数
|
|
2038
2044
|
selfEvents.forEach(ev => {
|
|
2039
2045
|
if (m.eventsListeners && m.eventsListeners[ev]) {
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* wia core v1.1.19
|
|
3
|
+
* (c) 2015-2024 Sibyl Yu and contributors
|
|
4
|
+
* Released under the MIT License.
|
|
5
|
+
*/
|
|
6
|
+
'use strict';
|
|
7
|
+
|
|
8
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
9
|
+
|
|
10
|
+
var jsxDevRuntime = {};
|
|
11
|
+
|
|
12
|
+
var jsxDEV = jsxDevRuntime.jsxDEV = (tag, props, ...args) => {
|
|
13
|
+
const attrs = props || {};
|
|
14
|
+
const children = args || [];
|
|
15
|
+
|
|
16
|
+
const attrsString = Object.keys(attrs)
|
|
17
|
+
.map(attr => {
|
|
18
|
+
if (attr[0] === '_') {
|
|
19
|
+
if (attrs[attr]) return attr.replace('_', '');
|
|
20
|
+
return '';
|
|
21
|
+
}
|
|
22
|
+
return `${attr}="${attrs[attr]}"`;
|
|
23
|
+
})
|
|
24
|
+
.filter(attr => !!attr)
|
|
25
|
+
.join(' ');
|
|
26
|
+
|
|
27
|
+
if (['path', 'img', 'circle', 'polygon', 'line', 'input'].indexOf(tag) >= 0) {
|
|
28
|
+
return `<${tag} ${attrsString} />`.trim();
|
|
29
|
+
}
|
|
30
|
+
const childrenContent = children
|
|
31
|
+
.filter(c => !!c)
|
|
32
|
+
.map(c => (Array.isArray(c) ? c.join('') : c))
|
|
33
|
+
.join('');
|
|
34
|
+
return `<${tag} ${attrsString}>${childrenContent}</${tag}>`.trim();
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
var Fragment = jsxDevRuntime.Fragment = ({children} = {}) => {
|
|
38
|
+
return '';
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
exports.Fragment = Fragment;
|
|
42
|
+
exports.default = jsxDevRuntime;
|
|
43
|
+
exports.jsxDEV = jsxDEV;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* wia core v1.1.19
|
|
3
|
+
* (c) 2015-2024 Sibyl Yu and contributors
|
|
4
|
+
* Released under the MIT License.
|
|
5
|
+
*/
|
|
6
|
+
'use strict';
|
|
7
|
+
|
|
8
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
9
|
+
|
|
10
|
+
var jsxRuntime = {};
|
|
11
|
+
|
|
12
|
+
function jsx(tag, props, ...args) {
|
|
13
|
+
const attrs = props || {};
|
|
14
|
+
const children = args || [];
|
|
15
|
+
|
|
16
|
+
const attrsString = Object.keys(attrs)
|
|
17
|
+
.map(attr => {
|
|
18
|
+
if (attr[0] === '_') {
|
|
19
|
+
if (attrs[attr]) return attr.replace('_', '');
|
|
20
|
+
return '';
|
|
21
|
+
}
|
|
22
|
+
return `${attr}="${attrs[attr]}"`;
|
|
23
|
+
})
|
|
24
|
+
.filter(attr => !!attr)
|
|
25
|
+
.join(' ');
|
|
26
|
+
|
|
27
|
+
if (['path', 'img', 'circle', 'polygon', 'line', 'input'].indexOf(tag) >= 0) {
|
|
28
|
+
return `<${tag} ${attrsString} />`.trim();
|
|
29
|
+
}
|
|
30
|
+
const childrenContent = children
|
|
31
|
+
.filter(c => !!c)
|
|
32
|
+
.map(c => (Array.isArray(c) ? c.join('') : c))
|
|
33
|
+
.join('');
|
|
34
|
+
return `<${tag} ${attrsString}>${childrenContent}</${tag}>`.trim();
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
var Fragment = jsxRuntime.Fragment = ({children} = {}) => {
|
|
38
|
+
return '';
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
var jsx_1 = jsxRuntime.jsx = jsx;
|
|
42
|
+
var jsxs = jsxRuntime.jsxs = jsx;
|
|
43
|
+
|
|
44
|
+
exports.Fragment = Fragment;
|
|
45
|
+
exports.default = jsxRuntime;
|
|
46
|
+
exports.jsx = jsx_1;
|
|
47
|
+
exports.jsxs = jsxs;
|
package/gulpfile.js
CHANGED
|
@@ -15,7 +15,7 @@ if (!fs.existsSync(out)) {
|
|
|
15
15
|
}
|
|
16
16
|
|
|
17
17
|
/**
|
|
18
|
-
*
|
|
18
|
+
* 删除已有发布文件,全部重新生成
|
|
19
19
|
* @returns
|
|
20
20
|
*/
|
|
21
21
|
async function clean(cb) {
|
|
@@ -26,7 +26,7 @@ async function clean(cb) {
|
|
|
26
26
|
}
|
|
27
27
|
|
|
28
28
|
/**
|
|
29
|
-
*
|
|
29
|
+
* 同时生成umd、cjs、esm 三种格式输出文件
|
|
30
30
|
*/
|
|
31
31
|
const buildAll = gulp.series(clean, cb => {
|
|
32
32
|
console.log('start build ...');
|
|
@@ -34,7 +34,7 @@ const buildAll = gulp.series(clean, cb => {
|
|
|
34
34
|
});
|
|
35
35
|
|
|
36
36
|
/**
|
|
37
|
-
*
|
|
37
|
+
* 仅生成cjs 格式
|
|
38
38
|
*/
|
|
39
39
|
gulp.task('cjs', cb => {
|
|
40
40
|
console.log('dev cjs...');
|
|
@@ -44,7 +44,7 @@ gulp.task('cjs', cb => {
|
|
|
44
44
|
});
|
|
45
45
|
|
|
46
46
|
/**
|
|
47
|
-
*
|
|
47
|
+
* 仅生成 esm 格式
|
|
48
48
|
*/
|
|
49
49
|
gulp.task('esm', cb => {
|
|
50
50
|
console.log('dev esm...');
|
|
@@ -54,7 +54,7 @@ gulp.task('esm', cb => {
|
|
|
54
54
|
});
|
|
55
55
|
|
|
56
56
|
/**
|
|
57
|
-
*
|
|
57
|
+
* 仅生成 umd 格式
|
|
58
58
|
*/
|
|
59
59
|
gulp.task('umd', cb => {
|
|
60
60
|
console.log('dev umd...');
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wiajs/core",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.19",
|
|
4
4
|
"description": "wia app core package",
|
|
5
5
|
"main": "./dist/core.cjs",
|
|
6
6
|
"module": "./dist/core.mjs",
|
|
@@ -12,6 +12,8 @@
|
|
|
12
12
|
"import": "./dist/core.mjs",
|
|
13
13
|
"default": "./dist/core.mjs"
|
|
14
14
|
},
|
|
15
|
+
"./jsx-runtime": "./dist/jsx-runtime.js",
|
|
16
|
+
"./jsx-dev-runtime": "./dist/jsx-dev-runtime.js",
|
|
15
17
|
"./util/*": [
|
|
16
18
|
"./util/*.js",
|
|
17
19
|
"./util/*.d.ts"
|