@fangzhongya/vue-components 0.1.21 → 0.1.24

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,19 +1,19 @@
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 _chunkLIKH5T7Rcjs = require('./chunk-LIKH5T7R.cjs');
3
+ var _chunkAFAUWAXDcjs = require('./chunk-AFAUWAXD.cjs');
4
4
 
5
5
 
6
6
  var _chunkUNBQUEQ4cjs = require('./chunk-UNBQUEQ4.cjs');
7
7
 
8
8
 
9
- var _chunkOQIBNUVKcjs = require('./chunk-OQIBNUVK.cjs');
10
- require('./chunk-YW7CKAOG.cjs');
9
+ var _chunkNLSI7A24cjs = require('./chunk-NLSI7A24.cjs');
10
+ require('./chunk-AKNB7BKJ.cjs');
11
11
 
12
12
  // packages/archive.ts
13
13
  var _fs = require('fs');
14
14
  var _path = require('path');
15
15
 
16
- // node_modules/.pnpm/@fangzhongya+utils@0.0.73/node_modules/@fangzhongya/utils/dist/chunk-ZADO6V3Z.js
16
+ // node_modules/.pnpm/@fangzhongya+utils@0.0.75/node_modules/@fangzhongya/utils/dist/chunk-ZADO6V3Z.js
17
17
  var TYPE_MARKERS = {
18
18
  // 对象引用
19
19
  CIRCULAR_REF: "_CR_",
@@ -330,8 +330,8 @@ function setJson(obj) {
330
330
  }
331
331
  }
332
332
  function ComponentsResolverArchive(config2 = {}) {
333
- const configs = _chunkOQIBNUVKcjs.unmergeObject.call(void 0, _chunkUNBQUEQ4cjs.config, archiveConfig, 2, true);
334
- const fangComp = new (0, _chunkLIKH5T7Rcjs.component_default)(_chunkOQIBNUVKcjs.unmergeObject.call(void 0, configs, config2, 1));
333
+ const configs = _chunkNLSI7A24cjs.unmergeObject.call(void 0, _chunkUNBQUEQ4cjs.config, archiveConfig, 2, true);
334
+ const fangComp = new (0, _chunkAFAUWAXDcjs.component_default)(_chunkNLSI7A24cjs.unmergeObject.call(void 0, configs, config2, 1));
335
335
  setJson(fangComp.config);
336
336
  return [
337
337
  {
package/dist/archive.js CHANGED
@@ -1,19 +1,19 @@
1
1
  import {
2
2
  component_default
3
- } from "./chunk-25JYZGRF.js";
3
+ } from "./chunk-VMVQOQNJ.js";
4
4
  import {
5
5
  config
6
6
  } from "./chunk-DURXCSNX.js";
7
7
  import {
8
8
  unmergeObject
9
- } from "./chunk-IV2Z7LZ7.js";
10
- import "./chunk-E3I6537N.js";
9
+ } from "./chunk-3XFEJIQP.js";
10
+ import "./chunk-TVGK2KRP.js";
11
11
 
12
12
  // packages/archive.ts
13
13
  import { writeFile } from "fs";
14
14
  import { resolve } from "path";
15
15
 
16
- // node_modules/.pnpm/@fangzhongya+utils@0.0.73/node_modules/@fangzhongya/utils/dist/chunk-ZADO6V3Z.js
16
+ // node_modules/.pnpm/@fangzhongya+utils@0.0.75/node_modules/@fangzhongya/utils/dist/chunk-ZADO6V3Z.js
17
17
  var TYPE_MARKERS = {
18
18
  // 对象引用
19
19
  CIRCULAR_REF: "_CR_",
@@ -1,8 +1,8 @@
1
1
  import {
2
2
  humpToLine
3
- } from "./chunk-E3I6537N.js";
3
+ } from "./chunk-TVGK2KRP.js";
4
4
 
5
- // node_modules/.pnpm/@fangzhongya+utils@0.0.73/node_modules/@fangzhongya/utils/dist/chunk-HVQG2IGJ.js
5
+ // node_modules/.pnpm/@fangzhongya+utils@0.0.75/node_modules/@fangzhongya/utils/dist/chunk-HVQG2IGJ.js
6
6
  function styleLog(msg = "", obj) {
7
7
  const arr = ["\x1B[0m"];
8
8
  if (obj?.revert) {
@@ -32,7 +32,7 @@ function styleLog(msg = "", obj) {
32
32
  return arr.join("");
33
33
  }
34
34
 
35
- // node_modules/.pnpm/@fangzhongya+utils@0.0.73/node_modules/@fangzhongya/utils/dist/chunk-A6J46LQK.js
35
+ // node_modules/.pnpm/@fangzhongya+utils@0.0.75/node_modules/@fangzhongya/utils/dist/chunk-A6J46LQK.js
36
36
  function unmergeObject(a, b, j = 0, i) {
37
37
  let c;
38
38
  if (a instanceof Array) {
@@ -78,12 +78,12 @@ function unmergeObject(a, b, j = 0, i) {
78
78
  return c;
79
79
  }
80
80
 
81
- // node_modules/.pnpm/@fangzhongya+utils@0.0.73/node_modules/@fangzhongya/utils/dist/chunk-EWJJKQIO.js
81
+ // node_modules/.pnpm/@fangzhongya+utils@0.0.75/node_modules/@fangzhongya/utils/dist/chunk-EWJJKQIO.js
82
82
  function firstUpper(str) {
83
83
  return str.slice(0, 1).toUpperCase() + str.slice(1);
84
84
  }
85
85
 
86
- // node_modules/.pnpm/@fangzhongya+utils@0.0.73/node_modules/@fangzhongya/utils/dist/chunk-XCDKXZFR.js
86
+ // node_modules/.pnpm/@fangzhongya+utils@0.0.75/node_modules/@fangzhongya/utils/dist/chunk-XCDKXZFR.js
87
87
  function lineToLargeHump(name) {
88
88
  let arr = name.split("-");
89
89
  arr = arr.map((vs) => {
@@ -92,17 +92,17 @@ function lineToLargeHump(name) {
92
92
  return arr.join("");
93
93
  }
94
94
 
95
- // node_modules/.pnpm/@fangzhongya+utils@0.0.73/node_modules/@fangzhongya/utils/dist/chunk-4OBNLDTJ.js
95
+ // node_modules/.pnpm/@fangzhongya+utils@0.0.75/node_modules/@fangzhongya/utils/dist/chunk-4OBNLDTJ.js
96
96
  function firstLower(str) {
97
97
  return str.slice(0, 1).toLowerCase() + str.slice(1);
98
98
  }
99
99
 
100
- // node_modules/.pnpm/@fangzhongya+utils@0.0.73/node_modules/@fangzhongya/utils/dist/chunk-AM67P3W7.js
100
+ // node_modules/.pnpm/@fangzhongya+utils@0.0.75/node_modules/@fangzhongya/utils/dist/chunk-AM67P3W7.js
101
101
  function lineToSmallHump(name) {
102
102
  return firstLower(lineToLargeHump(name));
103
103
  }
104
104
 
105
- // node_modules/.pnpm/@fangzhongya+utils@0.0.73/node_modules/@fangzhongya/utils/dist/chunk-VRRDYCUH.js
105
+ // node_modules/.pnpm/@fangzhongya+utils@0.0.75/node_modules/@fangzhongya/utils/dist/chunk-VRRDYCUH.js
106
106
  function getComponentNames(name) {
107
107
  if (name.includes("-")) {
108
108
  const line = humpToLine(name);
@@ -1,17 +1,17 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
- var _chunkLIKH5T7Rcjs = require('./chunk-LIKH5T7R.cjs');
3
+ var _chunkAFAUWAXDcjs = require('./chunk-AFAUWAXD.cjs');
4
4
 
5
5
 
6
6
  var _chunkUNBQUEQ4cjs = require('./chunk-UNBQUEQ4.cjs');
7
7
 
8
8
 
9
- var _chunkOQIBNUVKcjs = require('./chunk-OQIBNUVK.cjs');
9
+ var _chunkNLSI7A24cjs = require('./chunk-NLSI7A24.cjs');
10
10
 
11
11
  // packages/resolver.ts
12
12
  function ComponentsResolver(config2 = {}) {
13
- const configs = _chunkOQIBNUVKcjs.unmergeObject.call(void 0, _chunkUNBQUEQ4cjs.config, config2, 1);
14
- const fangComp = new (0, _chunkLIKH5T7Rcjs.component_default)(configs);
13
+ const configs = _chunkNLSI7A24cjs.unmergeObject.call(void 0, _chunkUNBQUEQ4cjs.config, config2, 1);
14
+ const fangComp = new (0, _chunkAFAUWAXDcjs.component_default)(configs);
15
15
  return [
16
16
  {
17
17
  type: "component",
@@ -1,16 +1,16 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
2
2
 
3
3
 
4
- var _chunkOQIBNUVKcjs = require('./chunk-OQIBNUVK.cjs');
4
+ var _chunkNLSI7A24cjs = require('./chunk-NLSI7A24.cjs');
5
5
 
6
6
 
7
- var _chunkYW7CKAOGcjs = require('./chunk-YW7CKAOG.cjs');
7
+ var _chunkAKNB7BKJcjs = require('./chunk-AKNB7BKJ.cjs');
8
8
 
9
9
  // packages/component.ts
10
10
  var _fastglob = require('fast-glob'); var _fastglob2 = _interopRequireDefault(_fastglob);
11
11
  var _path = require('path');
12
12
 
13
- // node_modules/.pnpm/@fangzhongya+utils@0.0.73/node_modules/@fangzhongya/utils/dist/chunk-YNOFNHEK.js
13
+ // node_modules/.pnpm/@fangzhongya+utils@0.0.75/node_modules/@fangzhongya/utils/dist/chunk-YNOFNHEK.js
14
14
  function matchsEnd(key, matchs) {
15
15
  if (matchs && matchs.length > 0) {
16
16
  for (const value of matchs) {
@@ -30,7 +30,7 @@ function matchsEnd(key, matchs) {
30
30
  }
31
31
  }
32
32
 
33
- // node_modules/.pnpm/@fangzhongya+utils@0.0.73/node_modules/@fangzhongya/utils/dist/chunk-S6JRKYPY.js
33
+ // node_modules/.pnpm/@fangzhongya+utils@0.0.75/node_modules/@fangzhongya/utils/dist/chunk-S6JRKYPY.js
34
34
  function matchsStart(key, matchs) {
35
35
  if (matchs && matchs.length > 0) {
36
36
  for (const value of matchs) {
@@ -124,9 +124,9 @@ var FangComponent = class {
124
124
  return this.config.getAliass;
125
125
  } else {
126
126
  return function(name, _type, c) {
127
- const arr = _chunkOQIBNUVKcjs.getComponentNames.call(void 0, name);
127
+ const arr = _chunkNLSI7A24cjs.getComponentNames.call(void 0, name);
128
128
  if (c.alias) {
129
- return [..._chunkOQIBNUVKcjs.getComponentNames.call(void 0, c.alias + "-" + name), ...arr];
129
+ return [..._chunkNLSI7A24cjs.getComponentNames.call(void 0, c.alias + "-" + name), ...arr];
130
130
  } else {
131
131
  return arr;
132
132
  }
@@ -292,7 +292,7 @@ var FangComponent = class {
292
292
  * @returns { Boolean } 是否要替换
293
293
  */
294
294
  #namefilter(name) {
295
- name = _chunkYW7CKAOGcjs.humpToLine.call(void 0, name);
295
+ name = _chunkAKNB7BKJcjs.humpToLine.call(void 0, name);
296
296
  if (this.config.startss) {
297
297
  for (let index = 0; index < this.config.startss.length; index++) {
298
298
  const element = this.config.startss[index] + "-";
@@ -505,46 +505,46 @@ var FangComponent = class {
505
505
  };
506
506
  const arr = [];
507
507
  arr.push(
508
- _chunkOQIBNUVKcjs.styleLog.call(void 0, "[@fangzhongya/vue-components]", {
508
+ _chunkNLSI7A24cjs.styleLog.call(void 0, "[@fangzhongya/vue-components]", {
509
509
  text: 3
510
510
  })
511
511
  );
512
512
  if (obj && obj.from) {
513
- let sfrom = _chunkOQIBNUVKcjs.styleLog.call(void 0, _optionalChain([obj, 'optionalAccess', _28 => _28.from]), {
513
+ let sfrom = _chunkNLSI7A24cjs.styleLog.call(void 0, _optionalChain([obj, 'optionalAccess', _28 => _28.from]), {
514
514
  text: 4,
515
515
  revert: true
516
516
  });
517
517
  arr.push(
518
- _chunkOQIBNUVKcjs.styleLog.call(void 0, type, {
518
+ _chunkNLSI7A24cjs.styleLog.call(void 0, type, {
519
519
  text: texts[type]
520
520
  })
521
521
  );
522
522
  arr.push(
523
- _chunkOQIBNUVKcjs.styleLog.call(void 0, name, {
523
+ _chunkNLSI7A24cjs.styleLog.call(void 0, name, {
524
524
  bold: true
525
525
  })
526
526
  );
527
527
  if (!is) {
528
- sfrom = _chunkOQIBNUVKcjs.styleLog.call(void 0, "+", {
528
+ sfrom = _chunkNLSI7A24cjs.styleLog.call(void 0, "+", {
529
529
  text: 2
530
530
  }) + sfrom;
531
531
  }
532
532
  arr.push(sfrom);
533
533
  if (obj.sideEffects) {
534
534
  arr.push(
535
- _chunkOQIBNUVKcjs.styleLog.call(void 0, obj.sideEffects.toString(), {
535
+ _chunkNLSI7A24cjs.styleLog.call(void 0, obj.sideEffects.toString(), {
536
536
  text: texts["sideEffects"]
537
537
  })
538
538
  );
539
539
  }
540
540
  } else {
541
541
  arr.push(
542
- _chunkOQIBNUVKcjs.styleLog.call(void 0, type, {
542
+ _chunkNLSI7A24cjs.styleLog.call(void 0, type, {
543
543
  text: texts[type]
544
544
  })
545
545
  );
546
546
  arr.push(
547
- _chunkOQIBNUVKcjs.styleLog.call(void 0, name, {
547
+ _chunkNLSI7A24cjs.styleLog.call(void 0, name, {
548
548
  bold: true,
549
549
  text: 1
550
550
  })
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});// node_modules/.pnpm/@fangzhongya+utils@0.0.73/node_modules/@fangzhongya/utils/dist/chunk-J7CICTHH.js
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});// node_modules/.pnpm/@fangzhongya+utils@0.0.75/node_modules/@fangzhongya/utils/dist/chunk-J7CICTHH.js
2
2
  function humpToLine(name) {
3
3
  const reg = /(([A-Z])([^A-Z]*))/g;
4
4
  let result;
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  component_default
3
- } from "./chunk-25JYZGRF.js";
3
+ } from "./chunk-VMVQOQNJ.js";
4
4
  import {
5
5
  config
6
6
  } from "./chunk-DURXCSNX.js";
7
7
  import {
8
8
  unmergeObject
9
- } from "./chunk-IV2Z7LZ7.js";
9
+ } from "./chunk-3XFEJIQP.js";
10
10
 
11
11
  // packages/resolver.ts
12
12
  function ComponentsResolver(config2 = {}) {
@@ -1,8 +1,8 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
2
2
 
3
- var _chunkYW7CKAOGcjs = require('./chunk-YW7CKAOG.cjs');
3
+ var _chunkAKNB7BKJcjs = require('./chunk-AKNB7BKJ.cjs');
4
4
 
5
- // node_modules/.pnpm/@fangzhongya+utils@0.0.73/node_modules/@fangzhongya/utils/dist/chunk-HVQG2IGJ.js
5
+ // node_modules/.pnpm/@fangzhongya+utils@0.0.75/node_modules/@fangzhongya/utils/dist/chunk-HVQG2IGJ.js
6
6
  function styleLog(msg = "", obj) {
7
7
  const arr = ["\x1B[0m"];
8
8
  if (_optionalChain([obj, 'optionalAccess', _ => _.revert])) {
@@ -32,7 +32,7 @@ function styleLog(msg = "", obj) {
32
32
  return arr.join("");
33
33
  }
34
34
 
35
- // node_modules/.pnpm/@fangzhongya+utils@0.0.73/node_modules/@fangzhongya/utils/dist/chunk-A6J46LQK.js
35
+ // node_modules/.pnpm/@fangzhongya+utils@0.0.75/node_modules/@fangzhongya/utils/dist/chunk-A6J46LQK.js
36
36
  function unmergeObject(a, b, j = 0, i) {
37
37
  let c;
38
38
  if (a instanceof Array) {
@@ -78,12 +78,12 @@ function unmergeObject(a, b, j = 0, i) {
78
78
  return c;
79
79
  }
80
80
 
81
- // node_modules/.pnpm/@fangzhongya+utils@0.0.73/node_modules/@fangzhongya/utils/dist/chunk-EWJJKQIO.js
81
+ // node_modules/.pnpm/@fangzhongya+utils@0.0.75/node_modules/@fangzhongya/utils/dist/chunk-EWJJKQIO.js
82
82
  function firstUpper(str) {
83
83
  return str.slice(0, 1).toUpperCase() + str.slice(1);
84
84
  }
85
85
 
86
- // node_modules/.pnpm/@fangzhongya+utils@0.0.73/node_modules/@fangzhongya/utils/dist/chunk-XCDKXZFR.js
86
+ // node_modules/.pnpm/@fangzhongya+utils@0.0.75/node_modules/@fangzhongya/utils/dist/chunk-XCDKXZFR.js
87
87
  function lineToLargeHump(name) {
88
88
  let arr = name.split("-");
89
89
  arr = arr.map((vs) => {
@@ -92,25 +92,25 @@ function lineToLargeHump(name) {
92
92
  return arr.join("");
93
93
  }
94
94
 
95
- // node_modules/.pnpm/@fangzhongya+utils@0.0.73/node_modules/@fangzhongya/utils/dist/chunk-4OBNLDTJ.js
95
+ // node_modules/.pnpm/@fangzhongya+utils@0.0.75/node_modules/@fangzhongya/utils/dist/chunk-4OBNLDTJ.js
96
96
  function firstLower(str) {
97
97
  return str.slice(0, 1).toLowerCase() + str.slice(1);
98
98
  }
99
99
 
100
- // node_modules/.pnpm/@fangzhongya+utils@0.0.73/node_modules/@fangzhongya/utils/dist/chunk-AM67P3W7.js
100
+ // node_modules/.pnpm/@fangzhongya+utils@0.0.75/node_modules/@fangzhongya/utils/dist/chunk-AM67P3W7.js
101
101
  function lineToSmallHump(name) {
102
102
  return firstLower(lineToLargeHump(name));
103
103
  }
104
104
 
105
- // node_modules/.pnpm/@fangzhongya+utils@0.0.73/node_modules/@fangzhongya/utils/dist/chunk-VRRDYCUH.js
105
+ // node_modules/.pnpm/@fangzhongya+utils@0.0.75/node_modules/@fangzhongya/utils/dist/chunk-VRRDYCUH.js
106
106
  function getComponentNames(name) {
107
107
  if (name.includes("-")) {
108
- const line = _chunkYW7CKAOGcjs.humpToLine.call(void 0, name);
108
+ const line = _chunkAKNB7BKJcjs.humpToLine.call(void 0, name);
109
109
  const upper = lineToLargeHump(line);
110
110
  const lower = lineToSmallHump(upper);
111
111
  return [line, upper, lower];
112
112
  } else if (/[A-Z]/.test(name)) {
113
- const line = _chunkYW7CKAOGcjs.humpToLine.call(void 0, name);
113
+ const line = _chunkAKNB7BKJcjs.humpToLine.call(void 0, name);
114
114
  if (/^[A-Z]/.test(name)) {
115
115
  const upper = lineToLargeHump(line);
116
116
  const lower = lineToSmallHump(upper);