@fangzhongya/icons 0.0.35 → 0.0.37

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.
@@ -2,7 +2,7 @@
2
2
  var index_default = {
3
3
  prefix: "fang-icons",
4
4
  info: {},
5
- lastModified: 1767930827898,
5
+ lastModified: 1767952624686,
6
6
  icons: {
7
7
  bar: {
8
8
  body: '<path d="M128 544h768a32 32 0 1 0 0-64H128a32 32 0 0 0 0 64z"></path>'
@@ -213,11 +213,9 @@ var component = defineComponent({
213
213
  }
214
214
  return name2;
215
215
  });
216
- const arr = computed(() => {
216
+ const dom = computed(() => {
217
217
  var _a, _b, _c, _d, _e;
218
- if (Object.keys(slots).length > 0) {
219
- return slots;
220
- } else if (!outputName.value) {
218
+ if (!outputName.value) {
221
219
  return void 0;
222
220
  } else if (outputType.value === "pub") {
223
221
  const src = props.directory + "/" + outputName.value + ".svg";
@@ -307,7 +305,7 @@ var component = defineComponent({
307
305
  class: [className],
308
306
  style: transformStyle.value
309
307
  },
310
- arr.value
308
+ Object.keys(slots).length > 0 ? slots : dom.value
311
309
  );
312
310
  }
313
311
  });
@@ -2,7 +2,7 @@
2
2
  var index_default = {
3
3
  prefix: "fang-icons",
4
4
  info: {},
5
- lastModified: 1767930827898,
5
+ lastModified: 1767952624686,
6
6
  icons: {
7
7
  bar: {
8
8
  body: '<path d="M128 544h768a32 32 0 1 0 0-64H128a32 32 0 0 0 0 64z"></path>'
@@ -213,11 +213,9 @@ var component = _vue.defineComponent.call(void 0, {
213
213
  }
214
214
  return name2;
215
215
  });
216
- const arr = _vue.computed.call(void 0, () => {
216
+ const dom = _vue.computed.call(void 0, () => {
217
217
  var _a, _b, _c, _d, _e;
218
- if (Object.keys(slots).length > 0) {
219
- return slots;
220
- } else if (!outputName.value) {
218
+ if (!outputName.value) {
221
219
  return void 0;
222
220
  } else if (outputType.value === "pub") {
223
221
  const src = props.directory + "/" + outputName.value + ".svg";
@@ -307,7 +305,7 @@ var component = _vue.defineComponent.call(void 0, {
307
305
  class: [className],
308
306
  style: transformStyle.value
309
307
  },
310
- arr.value
308
+ Object.keys(slots).length > 0 ? slots : dom.value
311
309
  );
312
310
  }
313
311
  });
@@ -1,11 +1,11 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
3
 
4
- var _chunkCUZ7VVHKcjs = require('../chunk-CUZ7VVHK.cjs');
4
+ var _chunkXZEJWS7Ccjs = require('../chunk-XZEJWS7C.cjs');
5
5
  require('../chunk-IIVF4KK5.cjs');
6
6
  require('../chunk-3376ZTRC.cjs');
7
7
  require('../chunk-75ZPJI57.cjs');
8
8
 
9
9
 
10
10
 
11
- exports.default = _chunkCUZ7VVHKcjs.icon_default; exports.icon = _chunkCUZ7VVHKcjs.icon;
11
+ exports.default = _chunkXZEJWS7Ccjs.icon_default; exports.icon = _chunkXZEJWS7Ccjs.icon;
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  icon,
3
3
  icon_default
4
- } from "../chunk-A4MW3XQT.js";
4
+ } from "../chunk-W2XVG6W5.js";
5
5
  import "../chunk-MOHILOKE.js";
6
6
  import "../chunk-BYXBJQAS.js";
7
7
  import "../chunk-MLKGABMK.js";
package/dist/index.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "prefix": "fang-icons",
3
3
  "info": {},
4
- "lastModified": 1767930827898,
4
+ "lastModified": 1767952624686,
5
5
  "icons": {
6
6
  "bar": {
7
7
  "body": "<path d=\"M128 544h768a32 32 0 1 0 0-64H128a32 32 0 0 0 0 64z\"></path>"
package/dist/json.cjs CHANGED
@@ -1,7 +1,7 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
- var _chunkIQ37TPSIcjs = require('./chunk-IQ37TPSI.cjs');
3
+ var _chunkXJKQMTVUcjs = require('./chunk-XJKQMTVU.cjs');
4
4
  require('./chunk-75ZPJI57.cjs');
5
5
 
6
6
 
7
- exports.default = _chunkIQ37TPSIcjs.json_default;
7
+ exports.default = _chunkXJKQMTVUcjs.json_default;
package/dist/json.d.cts CHANGED
@@ -1,7 +1,7 @@
1
1
  var prefix = "fang-icons";
2
2
  var info = {
3
3
  };
4
- var lastModified = 1767930827898;
4
+ var lastModified = 1767952624686;
5
5
  var icons = {
6
6
  bar: {
7
7
  body: "<path d=\"M128 544h768a32 32 0 1 0 0-64H128a32 32 0 0 0 0 64z\"></path>"
package/dist/json.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  var prefix = "fang-icons";
2
2
  var info = {
3
3
  };
4
- var lastModified = 1767930827898;
4
+ var lastModified = 1767952624686;
5
5
  var icons = {
6
6
  bar: {
7
7
  body: "<path d=\"M128 544h768a32 32 0 1 0 0-64H128a32 32 0 0 0 0 64z\"></path>"
package/dist/json.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  json_default
3
- } from "./chunk-RIAWQLUX.js";
3
+ } from "./chunk-QAGFWECA.js";
4
4
  import "./chunk-MLKGABMK.js";
5
5
  export {
6
6
  json_default as default
@@ -1,6 +1,6 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
- var _chunkCUZ7VVHKcjs = require('../chunk-CUZ7VVHK.cjs');
3
+ var _chunkXZEJWS7Ccjs = require('../chunk-XZEJWS7C.cjs');
4
4
  require('../chunk-IIVF4KK5.cjs');
5
5
  require('../chunk-3376ZTRC.cjs');
6
6
 
@@ -44,9 +44,9 @@ var picker_default = _vue.defineComponent.call(void 0, {
44
44
  * 图标名称
45
45
  */
46
46
  icons: {
47
- type: Object,
47
+ type: Array,
48
48
  default() {
49
- return {};
49
+ return [];
50
50
  }
51
51
  },
52
52
  /**
@@ -62,16 +62,9 @@ var picker_default = _vue.defineComponent.call(void 0, {
62
62
  const name = _vue.ref.call(void 0, props.modelValue);
63
63
  const search = _vue.ref.call(void 0, "");
64
64
  const icons = _vue.computed.call(void 0, () => {
65
- const obj = props.icons.icons || {};
65
+ const obj = props.icons || [];
66
66
  if (search.value) {
67
- const ks = Object.keys(obj).filter(
68
- (k) => k.includes(search.value)
69
- );
70
- const r = {};
71
- for (const k of ks) {
72
- r[k] = obj[k];
73
- }
74
- return r;
67
+ return obj.filter((k) => k.includes(search.value));
75
68
  } else {
76
69
  return obj;
77
70
  }
@@ -84,7 +77,7 @@ var picker_default = _vue.defineComponent.call(void 0, {
84
77
  return props.icon;
85
78
  }
86
79
  } else {
87
- return _chunkCUZ7VVHKcjs.icon_default;
80
+ return _chunkXZEJWS7Ccjs.icon_default;
88
81
  }
89
82
  });
90
83
  const dialogVue = _vue.computed.call(void 0, () => {
@@ -269,20 +262,7 @@ var picker_default = _vue.defineComponent.call(void 0, {
269
262
  overflow: "auto"
270
263
  }
271
264
  },
272
- Object.keys(icons.value).map((key) => {
273
- const o = icons.value[key];
274
- let v;
275
- if (typeof o === "string") {
276
- v = { body: o };
277
- } else {
278
- v = o;
279
- }
280
- if (!(v == null ? void 0 : v.width)) {
281
- v.width = props.icons.width;
282
- }
283
- if (!(v == null ? void 0 : v.height)) {
284
- v.height = props.icons.height;
285
- }
265
+ icons.value.map((key) => {
286
266
  return _vue.h.call(void 0,
287
267
  "div",
288
268
  {
@@ -299,15 +279,14 @@ var picker_default = _vue.defineComponent.call(void 0, {
299
279
  }
300
280
  },
301
281
  [
302
- _vue.h.call(void 0, _chunkCUZ7VVHKcjs.icon_default, {
282
+ _vue.h.call(void 0, iconVue.value, {
303
283
  style: {
304
284
  margin: "5px",
305
285
  marginBottom: 0,
306
286
  backgroundColor: key === name.value ? "#e0edff" : ""
307
287
  },
308
- type: "svg",
309
288
  size: props.size,
310
- name: v
289
+ name: key
311
290
  }),
312
291
  _vue.h.call(void 0,
313
292
  "div",
@@ -1,25 +1,6 @@
1
1
  import * as vue from 'vue';
2
2
  import { IconType } from '../icon/index.cjs';
3
3
 
4
- type IconsValueObj = {
5
- body?: string;
6
- width?: string | number;
7
- height?: string | number;
8
- };
9
- type IconsValue = {
10
- [key: string | number]: IconsValueObj | string;
11
- };
12
- type IconsInfo = {
13
- name?: string;
14
- [key: string]: any;
15
- };
16
- type Icons = {
17
- prefix?: string;
18
- info?: string | IconsInfo;
19
- width?: string | number;
20
- height?: string | number;
21
- icons: IconsValue;
22
- };
23
4
  declare const _default: vue.DefineComponent<vue.ExtractPropTypes<{
24
5
  icon: {
25
6
  type: (ObjectConstructor | StringConstructor)[];
@@ -50,8 +31,23 @@ declare const _default: vue.DefineComponent<vue.ExtractPropTypes<{
50
31
  * 图标名称
51
32
  */
52
33
  icons: {
53
- type: () => Icons;
54
- default(): {};
34
+ type: {
35
+ (arrayLength: number): string[];
36
+ (...items: string[]): string[];
37
+ new (arrayLength: number): string[];
38
+ new (...items: string[]): string[];
39
+ isArray(arg: any): arg is any[];
40
+ readonly prototype: any[];
41
+ from<T>(arrayLike: ArrayLike<T>): T[];
42
+ from<T, U>(arrayLike: ArrayLike<T>, mapfn: (v: T, k: number) => U, thisArg?: any): U[];
43
+ from<T>(iterable: Iterable<T> | ArrayLike<T>): T[];
44
+ from<T, U>(iterable: Iterable<T> | ArrayLike<T>, mapfn: (v: T, k: number) => U, thisArg?: any): U[];
45
+ of<T>(...items: T[]): T[];
46
+ fromAsync<T>(iterableOrArrayLike: AsyncIterable<T> | Iterable<T | PromiseLike<T>> | ArrayLike<T | PromiseLike<T>>): Promise<T[]>;
47
+ fromAsync<T, U>(iterableOrArrayLike: AsyncIterable<T> | Iterable<T> | ArrayLike<T>, mapFn: (value: Awaited<T>, index: number) => U, thisArg?: any): Promise<Awaited<U>[]>;
48
+ readonly [Symbol.species]: ArrayConstructor;
49
+ };
50
+ default(): any[];
55
51
  };
56
52
  /**
57
53
  * 图标类型
@@ -91,8 +87,23 @@ declare const _default: vue.DefineComponent<vue.ExtractPropTypes<{
91
87
  * 图标名称
92
88
  */
93
89
  icons: {
94
- type: () => Icons;
95
- default(): {};
90
+ type: {
91
+ (arrayLength: number): string[];
92
+ (...items: string[]): string[];
93
+ new (arrayLength: number): string[];
94
+ new (...items: string[]): string[];
95
+ isArray(arg: any): arg is any[];
96
+ readonly prototype: any[];
97
+ from<T>(arrayLike: ArrayLike<T>): T[];
98
+ from<T, U>(arrayLike: ArrayLike<T>, mapfn: (v: T, k: number) => U, thisArg?: any): U[];
99
+ from<T>(iterable: Iterable<T> | ArrayLike<T>): T[];
100
+ from<T, U>(iterable: Iterable<T> | ArrayLike<T>, mapfn: (v: T, k: number) => U, thisArg?: any): U[];
101
+ of<T>(...items: T[]): T[];
102
+ fromAsync<T>(iterableOrArrayLike: AsyncIterable<T> | Iterable<T | PromiseLike<T>> | ArrayLike<T | PromiseLike<T>>): Promise<T[]>;
103
+ fromAsync<T, U>(iterableOrArrayLike: AsyncIterable<T> | Iterable<T> | ArrayLike<T>, mapFn: (value: Awaited<T>, index: number) => U, thisArg?: any): Promise<Awaited<U>[]>;
104
+ readonly [Symbol.species]: ArrayConstructor;
105
+ };
106
+ default(): any[];
96
107
  };
97
108
  /**
98
109
  * 图标类型
@@ -103,9 +114,9 @@ declare const _default: vue.DefineComponent<vue.ExtractPropTypes<{
103
114
  }>> & Readonly<{
104
115
  "onUpdate:modelValue"?: (...args: any[]) => any;
105
116
  }>, {
106
- size: string | number;
107
117
  clearable: boolean;
108
- icons: Icons;
118
+ size: string | number;
119
+ icons: string[];
109
120
  }, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
110
121
 
111
- export { type Icons, type IconsValue, type IconsValueObj, _default as default };
122
+ export { _default as default };
@@ -1,25 +1,6 @@
1
1
  import * as vue from 'vue';
2
2
  import { IconType } from '../icon/index.js';
3
3
 
4
- type IconsValueObj = {
5
- body?: string;
6
- width?: string | number;
7
- height?: string | number;
8
- };
9
- type IconsValue = {
10
- [key: string | number]: IconsValueObj | string;
11
- };
12
- type IconsInfo = {
13
- name?: string;
14
- [key: string]: any;
15
- };
16
- type Icons = {
17
- prefix?: string;
18
- info?: string | IconsInfo;
19
- width?: string | number;
20
- height?: string | number;
21
- icons: IconsValue;
22
- };
23
4
  declare const _default: vue.DefineComponent<vue.ExtractPropTypes<{
24
5
  icon: {
25
6
  type: (ObjectConstructor | StringConstructor)[];
@@ -50,8 +31,23 @@ declare const _default: vue.DefineComponent<vue.ExtractPropTypes<{
50
31
  * 图标名称
51
32
  */
52
33
  icons: {
53
- type: () => Icons;
54
- default(): {};
34
+ type: {
35
+ (arrayLength: number): string[];
36
+ (...items: string[]): string[];
37
+ new (arrayLength: number): string[];
38
+ new (...items: string[]): string[];
39
+ isArray(arg: any): arg is any[];
40
+ readonly prototype: any[];
41
+ from<T>(arrayLike: ArrayLike<T>): T[];
42
+ from<T, U>(arrayLike: ArrayLike<T>, mapfn: (v: T, k: number) => U, thisArg?: any): U[];
43
+ from<T>(iterable: Iterable<T> | ArrayLike<T>): T[];
44
+ from<T, U>(iterable: Iterable<T> | ArrayLike<T>, mapfn: (v: T, k: number) => U, thisArg?: any): U[];
45
+ of<T>(...items: T[]): T[];
46
+ fromAsync<T>(iterableOrArrayLike: AsyncIterable<T> | Iterable<T | PromiseLike<T>> | ArrayLike<T | PromiseLike<T>>): Promise<T[]>;
47
+ fromAsync<T, U>(iterableOrArrayLike: AsyncIterable<T> | Iterable<T> | ArrayLike<T>, mapFn: (value: Awaited<T>, index: number) => U, thisArg?: any): Promise<Awaited<U>[]>;
48
+ readonly [Symbol.species]: ArrayConstructor;
49
+ };
50
+ default(): any[];
55
51
  };
56
52
  /**
57
53
  * 图标类型
@@ -91,8 +87,23 @@ declare const _default: vue.DefineComponent<vue.ExtractPropTypes<{
91
87
  * 图标名称
92
88
  */
93
89
  icons: {
94
- type: () => Icons;
95
- default(): {};
90
+ type: {
91
+ (arrayLength: number): string[];
92
+ (...items: string[]): string[];
93
+ new (arrayLength: number): string[];
94
+ new (...items: string[]): string[];
95
+ isArray(arg: any): arg is any[];
96
+ readonly prototype: any[];
97
+ from<T>(arrayLike: ArrayLike<T>): T[];
98
+ from<T, U>(arrayLike: ArrayLike<T>, mapfn: (v: T, k: number) => U, thisArg?: any): U[];
99
+ from<T>(iterable: Iterable<T> | ArrayLike<T>): T[];
100
+ from<T, U>(iterable: Iterable<T> | ArrayLike<T>, mapfn: (v: T, k: number) => U, thisArg?: any): U[];
101
+ of<T>(...items: T[]): T[];
102
+ fromAsync<T>(iterableOrArrayLike: AsyncIterable<T> | Iterable<T | PromiseLike<T>> | ArrayLike<T | PromiseLike<T>>): Promise<T[]>;
103
+ fromAsync<T, U>(iterableOrArrayLike: AsyncIterable<T> | Iterable<T> | ArrayLike<T>, mapFn: (value: Awaited<T>, index: number) => U, thisArg?: any): Promise<Awaited<U>[]>;
104
+ readonly [Symbol.species]: ArrayConstructor;
105
+ };
106
+ default(): any[];
96
107
  };
97
108
  /**
98
109
  * 图标类型
@@ -103,9 +114,9 @@ declare const _default: vue.DefineComponent<vue.ExtractPropTypes<{
103
114
  }>> & Readonly<{
104
115
  "onUpdate:modelValue"?: (...args: any[]) => any;
105
116
  }>, {
106
- size: string | number;
107
117
  clearable: boolean;
108
- icons: Icons;
118
+ size: string | number;
119
+ icons: string[];
109
120
  }, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
110
121
 
111
- export { type Icons, type IconsValue, type IconsValueObj, _default as default };
122
+ export { _default as default };
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  icon_default
3
- } from "../chunk-A4MW3XQT.js";
3
+ } from "../chunk-W2XVG6W5.js";
4
4
  import "../chunk-MOHILOKE.js";
5
5
  import "../chunk-BYXBJQAS.js";
6
6
  import {
@@ -44,9 +44,9 @@ var picker_default = defineComponent({
44
44
  * 图标名称
45
45
  */
46
46
  icons: {
47
- type: Object,
47
+ type: Array,
48
48
  default() {
49
- return {};
49
+ return [];
50
50
  }
51
51
  },
52
52
  /**
@@ -62,16 +62,9 @@ var picker_default = defineComponent({
62
62
  const name = ref(props.modelValue);
63
63
  const search = ref("");
64
64
  const icons = computed(() => {
65
- const obj = props.icons.icons || {};
65
+ const obj = props.icons || [];
66
66
  if (search.value) {
67
- const ks = Object.keys(obj).filter(
68
- (k) => k.includes(search.value)
69
- );
70
- const r = {};
71
- for (const k of ks) {
72
- r[k] = obj[k];
73
- }
74
- return r;
67
+ return obj.filter((k) => k.includes(search.value));
75
68
  } else {
76
69
  return obj;
77
70
  }
@@ -269,20 +262,7 @@ var picker_default = defineComponent({
269
262
  overflow: "auto"
270
263
  }
271
264
  },
272
- Object.keys(icons.value).map((key) => {
273
- const o = icons.value[key];
274
- let v;
275
- if (typeof o === "string") {
276
- v = { body: o };
277
- } else {
278
- v = o;
279
- }
280
- if (!(v == null ? void 0 : v.width)) {
281
- v.width = props.icons.width;
282
- }
283
- if (!(v == null ? void 0 : v.height)) {
284
- v.height = props.icons.height;
285
- }
265
+ icons.value.map((key) => {
286
266
  return h(
287
267
  "div",
288
268
  {
@@ -299,15 +279,14 @@ var picker_default = defineComponent({
299
279
  }
300
280
  },
301
281
  [
302
- h(icon_default, {
282
+ h(iconVue.value, {
303
283
  style: {
304
284
  margin: "5px",
305
285
  marginBottom: 0,
306
286
  backgroundColor: key === name.value ? "#e0edff" : ""
307
287
  },
308
- type: "svg",
309
288
  size: props.size,
310
- name: v
289
+ name: key
311
290
  }),
312
291
  h(
313
292
  "div",
@@ -3,7 +3,7 @@
3
3
  var _chunkYJVFENGGcjs = require('../chunk-YJVFENGG.cjs');
4
4
 
5
5
 
6
- var _chunkIQ37TPSIcjs = require('../chunk-IQ37TPSI.cjs');
6
+ var _chunkXJKQMTVUcjs = require('../chunk-XJKQMTVU.cjs');
7
7
 
8
8
 
9
9
  var _chunkBXEIRESQcjs = require('../chunk-BXEIRESQ.cjs');
@@ -1222,7 +1222,7 @@ function findComponents(code, name) {
1222
1222
  return components;
1223
1223
  }
1224
1224
  function getText(iconName, match) {
1225
- const svg = _chunkYJVFENGGcjs.getIconifySVG.call(void 0, _chunkIQ37TPSIcjs.json_default, iconName);
1225
+ const svg = _chunkYJVFENGGcjs.getIconifySVG.call(void 0, _chunkXJKQMTVUcjs.json_default, iconName);
1226
1226
  const s = match.fullMatch.replace(`name="${iconName}"`, "").replace(`</${match.componentName}>`, "");
1227
1227
  const text = `${s}${svg}</${match.componentName}>`;
1228
1228
  return { text, imptext: "" };
@@ -1248,7 +1248,7 @@ function replaceComponent(match, type, dynamic, customReplacement) {
1248
1248
  if (customReplacement) {
1249
1249
  return customReplacement(iconName, attributes);
1250
1250
  }
1251
- let svgContent = _chunkIQ37TPSIcjs.json_default.icons[iconName];
1251
+ let svgContent = _chunkXJKQMTVUcjs.json_default.icons[iconName];
1252
1252
  if (!svgContent) {
1253
1253
  return { text: match.fullMatch, imptext: "" };
1254
1254
  }
@@ -3,7 +3,7 @@ import {
3
3
  } from "../chunk-YGLV5TML.js";
4
4
  import {
5
5
  json_default
6
- } from "../chunk-RIAWQLUX.js";
6
+ } from "../chunk-QAGFWECA.js";
7
7
  import {
8
8
  lineToLargeHump
9
9
  } from "../chunk-J4G2OFZ4.js";
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@fangzhongya/icons",
3
3
  "private": false,
4
4
  "type": "module",
5
- "version": "0.0.35",
5
+ "version": "0.0.37",
6
6
  "description ": "个人图标库",
7
7
  "author": "fangzhongya ",
8
8
  "license": "MIT",