@fangzhongya/vue-components 0.1.12 → 0.1.14

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 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 _chunk54PWFLZLcjs = require('./chunk-54PWFLZL.cjs');
3
+ var _chunkRCCFTCP2cjs = require('./chunk-RCCFTCP2.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, _chunk54PWFLZLcjs.component_default)(_chunkM6Y4OKJRcjs.unmergeObject.call(void 0, configs, config2, 1));
303
+ const fangComp = new (0, _chunkRCCFTCP2cjs.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
  import {
2
2
  component_default
3
- } from "./chunk-B2WZS7UJ.js";
3
+ } from "./chunk-JZWS2R5A.js";
4
4
  import {
5
5
  config
6
6
  } from "./chunk-DURXCSNX.js";
@@ -336,10 +336,10 @@ var FangComponent = class {
336
336
  const arr = this.#getNames()(name, type, this.config);
337
337
  const as = [];
338
338
  if (type == "directive") {
339
- const isMatchurl = this.config.getMatchDir;
339
+ const isMatchurl = this.config.isMatchDir;
340
340
  if (isMatchurl) {
341
341
  this.#dirUrls?.forEach((key) => {
342
- if (isMatchurl(key, arr, this.config)) {
342
+ if (isMatchurl(key, name, arr, this.config)) {
343
343
  as.push(key);
344
344
  }
345
345
  });
@@ -356,10 +356,10 @@ var FangComponent = class {
356
356
  });
357
357
  }
358
358
  } else if (type == "sideEffects") {
359
- const isMatchurl = this.config.getMatchCss;
359
+ const isMatchurl = this.config.isMatchCss;
360
360
  if (isMatchurl) {
361
361
  this.#dirUrls?.forEach((key) => {
362
- if (isMatchurl(key, arr, this.config)) {
362
+ if (isMatchurl(key, name, arr, this.config)) {
363
363
  as.push(key);
364
364
  }
365
365
  });
@@ -376,10 +376,10 @@ var FangComponent = class {
376
376
  });
377
377
  }
378
378
  } else {
379
- const isMatchurl = this.config.getMatch;
379
+ const isMatchurl = this.config.isMatch;
380
380
  if (isMatchurl) {
381
381
  this.#dirUrls?.forEach((key) => {
382
- if (isMatchurl(key, arr, this.config)) {
382
+ if (isMatchurl(key, name, arr, this.config)) {
383
383
  as.push(key);
384
384
  }
385
385
  });
@@ -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
- return urls[0];
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
- return urls[0];
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
- return urls[0];
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
  }
@@ -336,10 +336,10 @@ var FangComponent = class {
336
336
  const arr = this.#getNames()(name, type, this.config);
337
337
  const as = [];
338
338
  if (type == "directive") {
339
- const isMatchurl = this.config.getMatchDir;
339
+ const isMatchurl = this.config.isMatchDir;
340
340
  if (isMatchurl) {
341
341
  _optionalChain([this, 'access', _10 => _10.#dirUrls, 'optionalAccess', _11 => _11.forEach, 'call', _12 => _12((key) => {
342
- if (isMatchurl(key, arr, this.config)) {
342
+ if (isMatchurl(key, name, arr, this.config)) {
343
343
  as.push(key);
344
344
  }
345
345
  })]);
@@ -356,10 +356,10 @@ var FangComponent = class {
356
356
  })]);
357
357
  }
358
358
  } else if (type == "sideEffects") {
359
- const isMatchurl = this.config.getMatchCss;
359
+ const isMatchurl = this.config.isMatchCss;
360
360
  if (isMatchurl) {
361
361
  _optionalChain([this, 'access', _16 => _16.#dirUrls, 'optionalAccess', _17 => _17.forEach, 'call', _18 => _18((key) => {
362
- if (isMatchurl(key, arr, this.config)) {
362
+ if (isMatchurl(key, name, arr, this.config)) {
363
363
  as.push(key);
364
364
  }
365
365
  })]);
@@ -376,10 +376,10 @@ var FangComponent = class {
376
376
  })]);
377
377
  }
378
378
  } else {
379
- const isMatchurl = this.config.getMatch;
379
+ const isMatchurl = this.config.isMatch;
380
380
  if (isMatchurl) {
381
381
  _optionalChain([this, 'access', _22 => _22.#dirUrls, 'optionalAccess', _23 => _23.forEach, 'call', _24 => _24((key) => {
382
- if (isMatchurl(key, arr, this.config)) {
382
+ if (isMatchurl(key, name, arr, this.config)) {
383
383
  as.push(key);
384
384
  }
385
385
  })]);
@@ -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
- return urls[0];
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
- return urls[0];
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
- return urls[0];
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
  }
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  component_default
3
- } from "./chunk-B2WZS7UJ.js";
3
+ } from "./chunk-JZWS2R5A.js";
4
4
  import {
5
5
  config
6
6
  } from "./chunk-DURXCSNX.js";
@@ -1,6 +1,6 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
- var _chunk54PWFLZLcjs = require('./chunk-54PWFLZL.cjs');
3
+ var _chunkRCCFTCP2cjs = require('./chunk-RCCFTCP2.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, _chunk54PWFLZLcjs.component_default)(configs);
14
+ const fangComp = new (0, _chunkRCCFTCP2cjs.component_default)(configs);
15
15
  return [
16
16
  {
17
17
  type: "component",
@@ -1,8 +1,8 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
- var _chunk54PWFLZLcjs = require('./chunk-54PWFLZL.cjs');
3
+ var _chunkRCCFTCP2cjs = require('./chunk-RCCFTCP2.cjs');
4
4
  require('./chunk-M6Y4OKJR.cjs');
5
5
  require('./chunk-XMZBDIKY.cjs');
6
6
 
7
7
 
8
- exports.default = _chunk54PWFLZLcjs.component_default;
8
+ exports.default = _chunkRCCFTCP2cjs.component_default;
package/dist/component.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  component_default
3
- } from "./chunk-B2WZS7UJ.js";
3
+ } from "./chunk-JZWS2R5A.js";
4
4
  import "./chunk-ZRYXYGML.js";
5
5
  import "./chunk-BDZPEKUD.js";
6
6
  export {
package/dist/config.d.cts CHANGED
@@ -85,15 +85,15 @@ interface Config {
85
85
  /**
86
86
  * 获取匹配数组
87
87
  */
88
- getMatch?(url: string, names?: Array<string>, config?: Config): boolean;
88
+ isMatch?(url: string, naem: string, names?: Array<string>, config?: Config): boolean;
89
89
  /**
90
90
  * 获取指令匹配数组
91
91
  */
92
- getMatchDir?(url: string, names?: Array<string>, config?: Config): boolean;
92
+ isMatchDir?(url: string, name: string, names?: Array<string>, config?: Config): boolean;
93
93
  /**
94
94
  * 获取样式匹配数组
95
95
  */
96
- getMatchCss?(url: string, names?: Array<string>, config?: Config): boolean;
96
+ isMatchCss?(url: string, name: string, names?: Array<string>, config?: Config): boolean;
97
97
  /**
98
98
  * 多个时获取那个
99
99
  */
package/dist/config.d.ts CHANGED
@@ -85,15 +85,15 @@ interface Config {
85
85
  /**
86
86
  * 获取匹配数组
87
87
  */
88
- getMatch?(url: string, names?: Array<string>, config?: Config): boolean;
88
+ isMatch?(url: string, naem: string, names?: Array<string>, config?: Config): boolean;
89
89
  /**
90
90
  * 获取指令匹配数组
91
91
  */
92
- getMatchDir?(url: string, names?: Array<string>, config?: Config): boolean;
92
+ isMatchDir?(url: string, name: string, names?: Array<string>, config?: Config): boolean;
93
93
  /**
94
94
  * 获取样式匹配数组
95
95
  */
96
- getMatchCss?(url: string, names?: Array<string>, config?: Config): boolean;
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 _chunkEGGSFBCYcjs = require('./chunk-EGGSFBCY.cjs');
3
+ var _chunkXE47WK5Ucjs = require('./chunk-XE47WK5U.cjs');
4
4
 
5
5
 
6
- var _chunk54PWFLZLcjs = require('./chunk-54PWFLZL.cjs');
6
+ var _chunkRCCFTCP2cjs = require('./chunk-RCCFTCP2.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 _chunk54PWFLZLcjs.component_default {
12
+ var FangComponent = class extends _chunkRCCFTCP2cjs.component_default {
13
13
  };
14
14
 
15
15
 
16
16
 
17
- exports.ComponentsResolver = _chunkEGGSFBCYcjs.ComponentsResolver; exports.FangComponent = FangComponent;
17
+ exports.ComponentsResolver = _chunkXE47WK5Ucjs.ComponentsResolver; exports.FangComponent = FangComponent;
package/dist/index.js CHANGED
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  ComponentsResolver
3
- } from "./chunk-TI5TOZLP.js";
3
+ } from "./chunk-SGQJ5JIB.js";
4
4
  import {
5
5
  component_default
6
- } from "./chunk-B2WZS7UJ.js";
6
+ } from "./chunk-JZWS2R5A.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 _chunkEGGSFBCYcjs = require('./chunk-EGGSFBCY.cjs');
4
- require('./chunk-54PWFLZL.cjs');
3
+ var _chunkXE47WK5Ucjs = require('./chunk-XE47WK5U.cjs');
4
+ require('./chunk-RCCFTCP2.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 = _chunkEGGSFBCYcjs.ComponentsResolver;
10
+ exports.ComponentsResolver = _chunkXE47WK5Ucjs.ComponentsResolver;
package/dist/resolver.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  ComponentsResolver
3
- } from "./chunk-TI5TOZLP.js";
4
- import "./chunk-B2WZS7UJ.js";
3
+ } from "./chunk-SGQJ5JIB.js";
4
+ import "./chunk-JZWS2R5A.js";
5
5
  import "./chunk-DURXCSNX.js";
6
6
  import "./chunk-ZRYXYGML.js";
7
7
  import "./chunk-BDZPEKUD.js";
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@fangzhongya/vue-components",
3
3
  "private": false,
4
4
  "type": "module",
5
- "version": "0.1.12",
5
+ "version": "0.1.14",
6
6
  "description ": "unplugin-vue-components插件",
7
7
  "author": "fangzhongya ",
8
8
  "license": "MIT",