@fangzhongya/vue-components 0.1.13 → 0.1.15
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/archive.cjs +2 -2
- package/dist/archive.js +1 -1
- package/dist/{chunk-IRJC3ATE.cjs → chunk-6HBV6DJY.cjs} +2 -2
- package/dist/{chunk-ZUVG3KIS.js → chunk-ANH3WAT7.js} +1 -1
- package/dist/{chunk-FTUTZVMI.js → chunk-C55QMPF3.js} +38 -4
- package/dist/{chunk-E6JBPDAV.cjs → chunk-PSGE36DQ.cjs} +38 -4
- package/dist/component.cjs +2 -2
- package/dist/component.js +1 -1
- package/dist/config.d.cts +2 -2
- package/dist/config.d.ts +2 -2
- package/dist/index.cjs +4 -4
- package/dist/index.js +2 -2
- package/dist/resolver.cjs +3 -3
- package/dist/resolver.js +2 -2
- package/package.json +1 -1
package/dist/archive.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } }
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkPSGE36DQcjs = require('./chunk-PSGE36DQ.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
var _chunkUNBQUEQ4cjs = require('./chunk-UNBQUEQ4.cjs');
|
|
@@ -300,7 +300,7 @@ function setJson(obj) {
|
|
|
300
300
|
}
|
|
301
301
|
function ComponentsResolverArchive(config2 = {}) {
|
|
302
302
|
const configs = _chunkM6Y4OKJRcjs.unmergeObject.call(void 0, _chunkUNBQUEQ4cjs.config, archiveConfig, 2, true);
|
|
303
|
-
const fangComp = new (0,
|
|
303
|
+
const fangComp = new (0, _chunkPSGE36DQcjs.component_default)(_chunkM6Y4OKJRcjs.unmergeObject.call(void 0, configs, config2, 1));
|
|
304
304
|
setJson(fangComp.config);
|
|
305
305
|
return [
|
|
306
306
|
{
|
package/dist/archive.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkPSGE36DQcjs = require('./chunk-PSGE36DQ.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
var _chunkUNBQUEQ4cjs = require('./chunk-UNBQUEQ4.cjs');
|
|
@@ -11,7 +11,7 @@ var _chunkM6Y4OKJRcjs = require('./chunk-M6Y4OKJR.cjs');
|
|
|
11
11
|
// packages/resolver.ts
|
|
12
12
|
function ComponentsResolver(config2 = {}) {
|
|
13
13
|
const configs = _chunkM6Y4OKJRcjs.unmergeObject.call(void 0, _chunkUNBQUEQ4cjs.config, config2, 1);
|
|
14
|
-
const fangComp = new (0,
|
|
14
|
+
const fangComp = new (0, _chunkPSGE36DQcjs.component_default)(configs);
|
|
15
15
|
return [
|
|
16
16
|
{
|
|
17
17
|
type: "component",
|
|
@@ -61,7 +61,7 @@ function checkSuffixBeforeMatch(str, regex, suffix) {
|
|
|
61
61
|
}
|
|
62
62
|
function isUrlsMatchi(key, arr, matchs) {
|
|
63
63
|
for (const name of arr) {
|
|
64
|
-
const t = "/" + name
|
|
64
|
+
const t = "/" + name;
|
|
65
65
|
if (matchs && matchs.length > 0) {
|
|
66
66
|
for (const value of matchs) {
|
|
67
67
|
if (typeof value == "string") {
|
|
@@ -406,26 +406,60 @@ var FangComponent = class {
|
|
|
406
406
|
* @returns { String } 文件地址
|
|
407
407
|
*/
|
|
408
408
|
#getCorrespondUrl(urls, name, type) {
|
|
409
|
+
const arr = this.#getNames()(name, type, this.config);
|
|
409
410
|
if (type == "directive") {
|
|
410
411
|
const getUrl = this.config.getMatchDirs;
|
|
411
412
|
if (getUrl) {
|
|
412
413
|
return getUrl(urls, name, type, this.config);
|
|
413
414
|
} else {
|
|
414
|
-
|
|
415
|
+
if (urls.length > 0) {
|
|
416
|
+
const ms = [];
|
|
417
|
+
const m = this.config.matchDirextss;
|
|
418
|
+
if (m) {
|
|
419
|
+
ms.push(m);
|
|
420
|
+
}
|
|
421
|
+
return urls.filter((key) => {
|
|
422
|
+
return isUrlsMatchi(key, arr, ms);
|
|
423
|
+
})[0];
|
|
424
|
+
} else {
|
|
425
|
+
return;
|
|
426
|
+
}
|
|
415
427
|
}
|
|
416
428
|
} else if (type == "sideEffects") {
|
|
417
429
|
const getUrl = this.config.getMatchCsss;
|
|
418
430
|
if (getUrl) {
|
|
419
431
|
return getUrl(urls, name, type, this.config);
|
|
420
432
|
} else {
|
|
421
|
-
|
|
433
|
+
if (urls.length > 0) {
|
|
434
|
+
const ms = [];
|
|
435
|
+
const m = this.config.matchCssss;
|
|
436
|
+
if (m) {
|
|
437
|
+
ms.push(m);
|
|
438
|
+
}
|
|
439
|
+
return urls.filter((key) => {
|
|
440
|
+
return isUrlsMatchi(key, arr, ms);
|
|
441
|
+
})[0];
|
|
442
|
+
} else {
|
|
443
|
+
return;
|
|
444
|
+
}
|
|
422
445
|
}
|
|
423
446
|
} else {
|
|
424
447
|
const getUrl = this.config.getMatchs;
|
|
425
448
|
if (getUrl) {
|
|
426
449
|
return getUrl(urls, name, type, this.config);
|
|
427
450
|
} else {
|
|
428
|
-
|
|
451
|
+
if (urls.length > 0) {
|
|
452
|
+
const ms = [];
|
|
453
|
+
const m = this.config.matchextss;
|
|
454
|
+
if (m) {
|
|
455
|
+
ms.push(m);
|
|
456
|
+
}
|
|
457
|
+
return urls.filter((key) => {
|
|
458
|
+
return isUrlsMatchi(key, arr, ms);
|
|
459
|
+
})[0];
|
|
460
|
+
} else {
|
|
461
|
+
return;
|
|
462
|
+
}
|
|
429
463
|
}
|
|
430
464
|
}
|
|
431
465
|
}
|
|
@@ -61,7 +61,7 @@ function checkSuffixBeforeMatch(str, regex, suffix) {
|
|
|
61
61
|
}
|
|
62
62
|
function isUrlsMatchi(key, arr, matchs) {
|
|
63
63
|
for (const name of arr) {
|
|
64
|
-
const t = "/" + name
|
|
64
|
+
const t = "/" + name;
|
|
65
65
|
if (matchs && matchs.length > 0) {
|
|
66
66
|
for (const value of matchs) {
|
|
67
67
|
if (typeof value == "string") {
|
|
@@ -406,26 +406,60 @@ var FangComponent = class {
|
|
|
406
406
|
* @returns { String } 文件地址
|
|
407
407
|
*/
|
|
408
408
|
#getCorrespondUrl(urls, name, type) {
|
|
409
|
+
const arr = this.#getNames()(name, type, this.config);
|
|
409
410
|
if (type == "directive") {
|
|
410
411
|
const getUrl = this.config.getMatchDirs;
|
|
411
412
|
if (getUrl) {
|
|
412
413
|
return getUrl(urls, name, type, this.config);
|
|
413
414
|
} else {
|
|
414
|
-
|
|
415
|
+
if (urls.length > 0) {
|
|
416
|
+
const ms = [];
|
|
417
|
+
const m = this.config.matchDirextss;
|
|
418
|
+
if (m) {
|
|
419
|
+
ms.push(m);
|
|
420
|
+
}
|
|
421
|
+
return urls.filter((key) => {
|
|
422
|
+
return isUrlsMatchi(key, arr, ms);
|
|
423
|
+
})[0];
|
|
424
|
+
} else {
|
|
425
|
+
return;
|
|
426
|
+
}
|
|
415
427
|
}
|
|
416
428
|
} else if (type == "sideEffects") {
|
|
417
429
|
const getUrl = this.config.getMatchCsss;
|
|
418
430
|
if (getUrl) {
|
|
419
431
|
return getUrl(urls, name, type, this.config);
|
|
420
432
|
} else {
|
|
421
|
-
|
|
433
|
+
if (urls.length > 0) {
|
|
434
|
+
const ms = [];
|
|
435
|
+
const m = this.config.matchCssss;
|
|
436
|
+
if (m) {
|
|
437
|
+
ms.push(m);
|
|
438
|
+
}
|
|
439
|
+
return urls.filter((key) => {
|
|
440
|
+
return isUrlsMatchi(key, arr, ms);
|
|
441
|
+
})[0];
|
|
442
|
+
} else {
|
|
443
|
+
return;
|
|
444
|
+
}
|
|
422
445
|
}
|
|
423
446
|
} else {
|
|
424
447
|
const getUrl = this.config.getMatchs;
|
|
425
448
|
if (getUrl) {
|
|
426
449
|
return getUrl(urls, name, type, this.config);
|
|
427
450
|
} else {
|
|
428
|
-
|
|
451
|
+
if (urls.length > 0) {
|
|
452
|
+
const ms = [];
|
|
453
|
+
const m = this.config.matchextss;
|
|
454
|
+
if (m) {
|
|
455
|
+
ms.push(m);
|
|
456
|
+
}
|
|
457
|
+
return urls.filter((key) => {
|
|
458
|
+
return isUrlsMatchi(key, arr, ms);
|
|
459
|
+
})[0];
|
|
460
|
+
} else {
|
|
461
|
+
return;
|
|
462
|
+
}
|
|
429
463
|
}
|
|
430
464
|
}
|
|
431
465
|
}
|
package/dist/component.cjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkPSGE36DQcjs = require('./chunk-PSGE36DQ.cjs');
|
|
4
4
|
require('./chunk-M6Y4OKJR.cjs');
|
|
5
5
|
require('./chunk-XMZBDIKY.cjs');
|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
exports.default =
|
|
8
|
+
exports.default = _chunkPSGE36DQcjs.component_default;
|
package/dist/component.js
CHANGED
package/dist/config.d.cts
CHANGED
|
@@ -89,11 +89,11 @@ interface Config {
|
|
|
89
89
|
/**
|
|
90
90
|
* 获取指令匹配数组
|
|
91
91
|
*/
|
|
92
|
-
isMatchDir?(url: string,
|
|
92
|
+
isMatchDir?(url: string, name: string, names?: Array<string>, config?: Config): boolean;
|
|
93
93
|
/**
|
|
94
94
|
* 获取样式匹配数组
|
|
95
95
|
*/
|
|
96
|
-
isMatchCss?(url: string,
|
|
96
|
+
isMatchCss?(url: string, name: string, names?: Array<string>, config?: Config): boolean;
|
|
97
97
|
/**
|
|
98
98
|
* 多个时获取那个
|
|
99
99
|
*/
|
package/dist/config.d.ts
CHANGED
|
@@ -89,11 +89,11 @@ interface Config {
|
|
|
89
89
|
/**
|
|
90
90
|
* 获取指令匹配数组
|
|
91
91
|
*/
|
|
92
|
-
isMatchDir?(url: string,
|
|
92
|
+
isMatchDir?(url: string, name: string, names?: Array<string>, config?: Config): boolean;
|
|
93
93
|
/**
|
|
94
94
|
* 获取样式匹配数组
|
|
95
95
|
*/
|
|
96
|
-
isMatchCss?(url: string,
|
|
96
|
+
isMatchCss?(url: string, name: string, names?: Array<string>, config?: Config): boolean;
|
|
97
97
|
/**
|
|
98
98
|
* 多个时获取那个
|
|
99
99
|
*/
|
package/dist/index.cjs
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunk6HBV6DJYcjs = require('./chunk-6HBV6DJY.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
var
|
|
6
|
+
var _chunkPSGE36DQcjs = require('./chunk-PSGE36DQ.cjs');
|
|
7
7
|
require('./chunk-UNBQUEQ4.cjs');
|
|
8
8
|
require('./chunk-M6Y4OKJR.cjs');
|
|
9
9
|
require('./chunk-XMZBDIKY.cjs');
|
|
10
10
|
|
|
11
11
|
// packages/index.ts
|
|
12
|
-
var FangComponent = class extends
|
|
12
|
+
var FangComponent = class extends _chunkPSGE36DQcjs.component_default {
|
|
13
13
|
};
|
|
14
14
|
|
|
15
15
|
|
|
16
16
|
|
|
17
|
-
exports.ComponentsResolver =
|
|
17
|
+
exports.ComponentsResolver = _chunk6HBV6DJYcjs.ComponentsResolver; exports.FangComponent = FangComponent;
|
package/dist/index.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
ComponentsResolver
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-ANH3WAT7.js";
|
|
4
4
|
import {
|
|
5
5
|
component_default
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-C55QMPF3.js";
|
|
7
7
|
import "./chunk-DURXCSNX.js";
|
|
8
8
|
import "./chunk-ZRYXYGML.js";
|
|
9
9
|
import "./chunk-BDZPEKUD.js";
|
package/dist/resolver.cjs
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
require('./chunk-
|
|
3
|
+
var _chunk6HBV6DJYcjs = require('./chunk-6HBV6DJY.cjs');
|
|
4
|
+
require('./chunk-PSGE36DQ.cjs');
|
|
5
5
|
require('./chunk-UNBQUEQ4.cjs');
|
|
6
6
|
require('./chunk-M6Y4OKJR.cjs');
|
|
7
7
|
require('./chunk-XMZBDIKY.cjs');
|
|
8
8
|
|
|
9
9
|
|
|
10
|
-
exports.ComponentsResolver =
|
|
10
|
+
exports.ComponentsResolver = _chunk6HBV6DJYcjs.ComponentsResolver;
|
package/dist/resolver.js
CHANGED