@fangzhongya/icons 0.0.16 → 0.0.18

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/async.cjs CHANGED
@@ -5,61 +5,61 @@ var _vue = require('vue');
5
5
  var IconBar = _vue.defineAsyncComponent.call(void 0, async () => await Promise.resolve().then(() => _interopRequireWildcard(require("./vue/bar.cjs"))));
6
6
  var IconBicycle = _vue.defineAsyncComponent.call(void 0, async () => await Promise.resolve().then(() => _interopRequireWildcard(require("./vue/bicycle.cjs"))));
7
7
  var IconBelow = _vue.defineAsyncComponent.call(void 0, async () => await Promise.resolve().then(() => _interopRequireWildcard(require("./vue/below.cjs"))));
8
- var IconBottomRight = _vue.defineAsyncComponent.call(void 0, async () => await Promise.resolve().then(() => _interopRequireWildcard(require("./vue/bottom-right.cjs"))));
9
8
  var IconBottomLeft = _vue.defineAsyncComponent.call(void 0, async () => await Promise.resolve().then(() => _interopRequireWildcard(require("./vue/bottom-left.cjs"))));
10
- var IconCatalogue = _vue.defineAsyncComponent.call(void 0, async () => await Promise.resolve().then(() => _interopRequireWildcard(require("./vue/catalogue.cjs"))));
9
+ var IconBottomRight = _vue.defineAsyncComponent.call(void 0, async () => await Promise.resolve().then(() => _interopRequireWildcard(require("./vue/bottom-right.cjs"))));
11
10
  var IconBottom = _vue.defineAsyncComponent.call(void 0, async () => await Promise.resolve().then(() => _interopRequireWildcard(require("./vue/bottom.cjs"))));
12
- var IconClear = _vue.defineAsyncComponent.call(void 0, async () => await Promise.resolve().then(() => _interopRequireWildcard(require("./vue/clear.cjs"))));
13
11
  var IconCascaderField = _vue.defineAsyncComponent.call(void 0, async () => await Promise.resolve().then(() => _interopRequireWildcard(require("./vue/cascader-field.cjs"))));
12
+ var IconCatalogue = _vue.defineAsyncComponent.call(void 0, async () => await Promise.resolve().then(() => _interopRequireWildcard(require("./vue/catalogue.cjs"))));
13
+ var IconClear = _vue.defineAsyncComponent.call(void 0, async () => await Promise.resolve().then(() => _interopRequireWildcard(require("./vue/clear.cjs"))));
14
14
  var IconClose = _vue.defineAsyncComponent.call(void 0, async () => await Promise.resolve().then(() => _interopRequireWildcard(require("./vue/close.cjs"))));
15
15
  var IconCrl = _vue.defineAsyncComponent.call(void 0, async () => await Promise.resolve().then(() => _interopRequireWildcard(require("./vue/crl.cjs"))));
16
- var IconDown = _vue.defineAsyncComponent.call(void 0, async () => await Promise.resolve().then(() => _interopRequireWildcard(require("./vue/down.cjs"))));
17
- var IconDocument = _vue.defineAsyncComponent.call(void 0, async () => await Promise.resolve().then(() => _interopRequireWildcard(require("./vue/document.cjs"))));
18
16
  var IconDelete = _vue.defineAsyncComponent.call(void 0, async () => await Promise.resolve().then(() => _interopRequireWildcard(require("./vue/delete.cjs"))));
19
- var IconEdit = _vue.defineAsyncComponent.call(void 0, async () => await Promise.resolve().then(() => _interopRequireWildcard(require("./vue/edit.cjs"))));
17
+ var IconDocument = _vue.defineAsyncComponent.call(void 0, async () => await Promise.resolve().then(() => _interopRequireWildcard(require("./vue/document.cjs"))));
18
+ var IconDown = _vue.defineAsyncComponent.call(void 0, async () => await Promise.resolve().then(() => _interopRequireWildcard(require("./vue/down.cjs"))));
20
19
  var IconDownload = _vue.defineAsyncComponent.call(void 0, async () => await Promise.resolve().then(() => _interopRequireWildcard(require("./vue/download.cjs"))));
20
+ var IconEdit = _vue.defineAsyncComponent.call(void 0, async () => await Promise.resolve().then(() => _interopRequireWildcard(require("./vue/edit.cjs"))));
21
21
  var IconEnter = _vue.defineAsyncComponent.call(void 0, async () => await Promise.resolve().then(() => _interopRequireWildcard(require("./vue/enter.cjs"))));
22
22
  var IconFrame = _vue.defineAsyncComponent.call(void 0, async () => await Promise.resolve().then(() => _interopRequireWildcard(require("./vue/frame.cjs"))));
23
23
  var IconLeft = _vue.defineAsyncComponent.call(void 0, async () => await Promise.resolve().then(() => _interopRequireWildcard(require("./vue/left.cjs"))));
24
24
  var IconMute = _vue.defineAsyncComponent.call(void 0, async () => await Promise.resolve().then(() => _interopRequireWildcard(require("./vue/mute.cjs"))));
25
25
  var IconPause = _vue.defineAsyncComponent.call(void 0, async () => await Promise.resolve().then(() => _interopRequireWildcard(require("./vue/pause.cjs"))));
26
- var IconPlus = _vue.defineAsyncComponent.call(void 0, async () => await Promise.resolve().then(() => _interopRequireWildcard(require("./vue/plus.cjs"))));
27
26
  var IconPlay = _vue.defineAsyncComponent.call(void 0, async () => await Promise.resolve().then(() => _interopRequireWildcard(require("./vue/play.cjs"))));
27
+ var IconPlus = _vue.defineAsyncComponent.call(void 0, async () => await Promise.resolve().then(() => _interopRequireWildcard(require("./vue/plus.cjs"))));
28
28
  var IconRetreat = _vue.defineAsyncComponent.call(void 0, async () => await Promise.resolve().then(() => _interopRequireWildcard(require("./vue/retreat.cjs"))));
29
29
  var IconRight = _vue.defineAsyncComponent.call(void 0, async () => await Promise.resolve().then(() => _interopRequireWildcard(require("./vue/right.cjs"))));
30
- var IconUp = _vue.defineAsyncComponent.call(void 0, async () => await Promise.resolve().then(() => _interopRequireWildcard(require("./vue/up.cjs"))));
31
30
  var IconSound = _vue.defineAsyncComponent.call(void 0, async () => await Promise.resolve().then(() => _interopRequireWildcard(require("./vue/sound.cjs"))));
32
31
  var IconStar = _vue.defineAsyncComponent.call(void 0, async () => await Promise.resolve().then(() => _interopRequireWildcard(require("./vue/star.cjs"))));
32
+ var IconUp = _vue.defineAsyncComponent.call(void 0, async () => await Promise.resolve().then(() => _interopRequireWildcard(require("./vue/up.cjs"))));
33
33
  var IconViews = _vue.defineAsyncComponent.call(void 0, async () => await Promise.resolve().then(() => _interopRequireWildcard(require("./vue/views.cjs"))));
34
34
  var async_default = {
35
35
  "bar": IconBar,
36
36
  "bicycle": IconBicycle,
37
37
  "below": IconBelow,
38
- "bottom-right": IconBottomRight,
39
38
  "bottom-left": IconBottomLeft,
40
- "catalogue": IconCatalogue,
39
+ "bottom-right": IconBottomRight,
41
40
  "bottom": IconBottom,
42
- "clear": IconClear,
43
41
  "cascader-field": IconCascaderField,
42
+ "catalogue": IconCatalogue,
43
+ "clear": IconClear,
44
44
  "close": IconClose,
45
45
  "crl": IconCrl,
46
- "down": IconDown,
47
- "document": IconDocument,
48
46
  "delete": IconDelete,
49
- "edit": IconEdit,
47
+ "document": IconDocument,
48
+ "down": IconDown,
50
49
  "download": IconDownload,
50
+ "edit": IconEdit,
51
51
  "enter": IconEnter,
52
52
  "frame": IconFrame,
53
53
  "left": IconLeft,
54
54
  "mute": IconMute,
55
55
  "pause": IconPause,
56
- "plus": IconPlus,
57
56
  "play": IconPlay,
57
+ "plus": IconPlus,
58
58
  "retreat": IconRetreat,
59
59
  "right": IconRight,
60
- "up": IconUp,
61
60
  "sound": IconSound,
62
61
  "star": IconStar,
62
+ "up": IconUp,
63
63
  "views": IconViews
64
64
  };
65
65
 
package/dist/async.d.cts CHANGED
@@ -10,22 +10,22 @@ declare const _default: {
10
10
  below: vue.DefineComponent<{}, () => vue.VNode<vue.RendererNode, vue.RendererElement, {
11
11
  [key: string]: any;
12
12
  }>, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
13
- 'bottom-right': vue.DefineComponent<{}, () => vue.VNode<vue.RendererNode, vue.RendererElement, {
14
- [key: string]: any;
15
- }>, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
16
13
  'bottom-left': vue.DefineComponent<{}, () => vue.VNode<vue.RendererNode, vue.RendererElement, {
17
14
  [key: string]: any;
18
15
  }>, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
19
- catalogue: vue.DefineComponent<{}, () => vue.VNode<vue.RendererNode, vue.RendererElement, {
16
+ 'bottom-right': vue.DefineComponent<{}, () => vue.VNode<vue.RendererNode, vue.RendererElement, {
20
17
  [key: string]: any;
21
18
  }>, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
22
19
  bottom: vue.DefineComponent<{}, () => vue.VNode<vue.RendererNode, vue.RendererElement, {
23
20
  [key: string]: any;
24
21
  }>, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
25
- clear: vue.DefineComponent<{}, () => vue.VNode<vue.RendererNode, vue.RendererElement, {
22
+ 'cascader-field': vue.DefineComponent<{}, () => vue.VNode<vue.RendererNode, vue.RendererElement, {
26
23
  [key: string]: any;
27
24
  }>, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
28
- 'cascader-field': vue.DefineComponent<{}, () => vue.VNode<vue.RendererNode, vue.RendererElement, {
25
+ catalogue: vue.DefineComponent<{}, () => vue.VNode<vue.RendererNode, vue.RendererElement, {
26
+ [key: string]: any;
27
+ }>, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
28
+ clear: vue.DefineComponent<{}, () => vue.VNode<vue.RendererNode, vue.RendererElement, {
29
29
  [key: string]: any;
30
30
  }>, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
31
31
  close: vue.DefineComponent<{}, () => vue.VNode<vue.RendererNode, vue.RendererElement, {
@@ -34,19 +34,19 @@ declare const _default: {
34
34
  crl: vue.DefineComponent<{}, () => vue.VNode<vue.RendererNode, vue.RendererElement, {
35
35
  [key: string]: any;
36
36
  }>, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
37
- down: vue.DefineComponent<{}, () => vue.VNode<vue.RendererNode, vue.RendererElement, {
37
+ delete: vue.DefineComponent<{}, () => vue.VNode<vue.RendererNode, vue.RendererElement, {
38
38
  [key: string]: any;
39
39
  }>, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
40
40
  document: vue.DefineComponent<{}, () => vue.VNode<vue.RendererNode, vue.RendererElement, {
41
41
  [key: string]: any;
42
42
  }>, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
43
- delete: vue.DefineComponent<{}, () => vue.VNode<vue.RendererNode, vue.RendererElement, {
43
+ down: vue.DefineComponent<{}, () => vue.VNode<vue.RendererNode, vue.RendererElement, {
44
44
  [key: string]: any;
45
45
  }>, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
46
- edit: vue.DefineComponent<{}, () => vue.VNode<vue.RendererNode, vue.RendererElement, {
46
+ download: vue.DefineComponent<{}, () => vue.VNode<vue.RendererNode, vue.RendererElement, {
47
47
  [key: string]: any;
48
48
  }>, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
49
- download: vue.DefineComponent<{}, () => vue.VNode<vue.RendererNode, vue.RendererElement, {
49
+ edit: vue.DefineComponent<{}, () => vue.VNode<vue.RendererNode, vue.RendererElement, {
50
50
  [key: string]: any;
51
51
  }>, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
52
52
  enter: vue.DefineComponent<{}, () => vue.VNode<vue.RendererNode, vue.RendererElement, {
@@ -64,10 +64,10 @@ declare const _default: {
64
64
  pause: vue.DefineComponent<{}, () => vue.VNode<vue.RendererNode, vue.RendererElement, {
65
65
  [key: string]: any;
66
66
  }>, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
67
- plus: vue.DefineComponent<{}, () => vue.VNode<vue.RendererNode, vue.RendererElement, {
67
+ play: vue.DefineComponent<{}, () => vue.VNode<vue.RendererNode, vue.RendererElement, {
68
68
  [key: string]: any;
69
69
  }>, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
70
- play: vue.DefineComponent<{}, () => vue.VNode<vue.RendererNode, vue.RendererElement, {
70
+ plus: vue.DefineComponent<{}, () => vue.VNode<vue.RendererNode, vue.RendererElement, {
71
71
  [key: string]: any;
72
72
  }>, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
73
73
  retreat: vue.DefineComponent<{}, () => vue.VNode<vue.RendererNode, vue.RendererElement, {
@@ -76,15 +76,15 @@ declare const _default: {
76
76
  right: vue.DefineComponent<{}, () => vue.VNode<vue.RendererNode, vue.RendererElement, {
77
77
  [key: string]: any;
78
78
  }>, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
79
- up: vue.DefineComponent<{}, () => vue.VNode<vue.RendererNode, vue.RendererElement, {
80
- [key: string]: any;
81
- }>, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
82
79
  sound: vue.DefineComponent<{}, () => vue.VNode<vue.RendererNode, vue.RendererElement, {
83
80
  [key: string]: any;
84
81
  }>, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
85
82
  star: vue.DefineComponent<{}, () => vue.VNode<vue.RendererNode, vue.RendererElement, {
86
83
  [key: string]: any;
87
84
  }>, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
85
+ up: vue.DefineComponent<{}, () => vue.VNode<vue.RendererNode, vue.RendererElement, {
86
+ [key: string]: any;
87
+ }>, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
88
88
  views: vue.DefineComponent<{}, () => vue.VNode<vue.RendererNode, vue.RendererElement, {
89
89
  [key: string]: any;
90
90
  }>, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
package/dist/async.d.ts CHANGED
@@ -10,22 +10,22 @@ declare const _default: {
10
10
  below: vue.DefineComponent<{}, () => vue.VNode<vue.RendererNode, vue.RendererElement, {
11
11
  [key: string]: any;
12
12
  }>, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
13
- 'bottom-right': vue.DefineComponent<{}, () => vue.VNode<vue.RendererNode, vue.RendererElement, {
14
- [key: string]: any;
15
- }>, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
16
13
  'bottom-left': vue.DefineComponent<{}, () => vue.VNode<vue.RendererNode, vue.RendererElement, {
17
14
  [key: string]: any;
18
15
  }>, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
19
- catalogue: vue.DefineComponent<{}, () => vue.VNode<vue.RendererNode, vue.RendererElement, {
16
+ 'bottom-right': vue.DefineComponent<{}, () => vue.VNode<vue.RendererNode, vue.RendererElement, {
20
17
  [key: string]: any;
21
18
  }>, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
22
19
  bottom: vue.DefineComponent<{}, () => vue.VNode<vue.RendererNode, vue.RendererElement, {
23
20
  [key: string]: any;
24
21
  }>, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
25
- clear: vue.DefineComponent<{}, () => vue.VNode<vue.RendererNode, vue.RendererElement, {
22
+ 'cascader-field': vue.DefineComponent<{}, () => vue.VNode<vue.RendererNode, vue.RendererElement, {
26
23
  [key: string]: any;
27
24
  }>, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
28
- 'cascader-field': vue.DefineComponent<{}, () => vue.VNode<vue.RendererNode, vue.RendererElement, {
25
+ catalogue: vue.DefineComponent<{}, () => vue.VNode<vue.RendererNode, vue.RendererElement, {
26
+ [key: string]: any;
27
+ }>, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
28
+ clear: vue.DefineComponent<{}, () => vue.VNode<vue.RendererNode, vue.RendererElement, {
29
29
  [key: string]: any;
30
30
  }>, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
31
31
  close: vue.DefineComponent<{}, () => vue.VNode<vue.RendererNode, vue.RendererElement, {
@@ -34,19 +34,19 @@ declare const _default: {
34
34
  crl: vue.DefineComponent<{}, () => vue.VNode<vue.RendererNode, vue.RendererElement, {
35
35
  [key: string]: any;
36
36
  }>, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
37
- down: vue.DefineComponent<{}, () => vue.VNode<vue.RendererNode, vue.RendererElement, {
37
+ delete: vue.DefineComponent<{}, () => vue.VNode<vue.RendererNode, vue.RendererElement, {
38
38
  [key: string]: any;
39
39
  }>, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
40
40
  document: vue.DefineComponent<{}, () => vue.VNode<vue.RendererNode, vue.RendererElement, {
41
41
  [key: string]: any;
42
42
  }>, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
43
- delete: vue.DefineComponent<{}, () => vue.VNode<vue.RendererNode, vue.RendererElement, {
43
+ down: vue.DefineComponent<{}, () => vue.VNode<vue.RendererNode, vue.RendererElement, {
44
44
  [key: string]: any;
45
45
  }>, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
46
- edit: vue.DefineComponent<{}, () => vue.VNode<vue.RendererNode, vue.RendererElement, {
46
+ download: vue.DefineComponent<{}, () => vue.VNode<vue.RendererNode, vue.RendererElement, {
47
47
  [key: string]: any;
48
48
  }>, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
49
- download: vue.DefineComponent<{}, () => vue.VNode<vue.RendererNode, vue.RendererElement, {
49
+ edit: vue.DefineComponent<{}, () => vue.VNode<vue.RendererNode, vue.RendererElement, {
50
50
  [key: string]: any;
51
51
  }>, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
52
52
  enter: vue.DefineComponent<{}, () => vue.VNode<vue.RendererNode, vue.RendererElement, {
@@ -64,10 +64,10 @@ declare const _default: {
64
64
  pause: vue.DefineComponent<{}, () => vue.VNode<vue.RendererNode, vue.RendererElement, {
65
65
  [key: string]: any;
66
66
  }>, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
67
- plus: vue.DefineComponent<{}, () => vue.VNode<vue.RendererNode, vue.RendererElement, {
67
+ play: vue.DefineComponent<{}, () => vue.VNode<vue.RendererNode, vue.RendererElement, {
68
68
  [key: string]: any;
69
69
  }>, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
70
- play: vue.DefineComponent<{}, () => vue.VNode<vue.RendererNode, vue.RendererElement, {
70
+ plus: vue.DefineComponent<{}, () => vue.VNode<vue.RendererNode, vue.RendererElement, {
71
71
  [key: string]: any;
72
72
  }>, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
73
73
  retreat: vue.DefineComponent<{}, () => vue.VNode<vue.RendererNode, vue.RendererElement, {
@@ -76,15 +76,15 @@ declare const _default: {
76
76
  right: vue.DefineComponent<{}, () => vue.VNode<vue.RendererNode, vue.RendererElement, {
77
77
  [key: string]: any;
78
78
  }>, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
79
- up: vue.DefineComponent<{}, () => vue.VNode<vue.RendererNode, vue.RendererElement, {
80
- [key: string]: any;
81
- }>, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
82
79
  sound: vue.DefineComponent<{}, () => vue.VNode<vue.RendererNode, vue.RendererElement, {
83
80
  [key: string]: any;
84
81
  }>, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
85
82
  star: vue.DefineComponent<{}, () => vue.VNode<vue.RendererNode, vue.RendererElement, {
86
83
  [key: string]: any;
87
84
  }>, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
85
+ up: vue.DefineComponent<{}, () => vue.VNode<vue.RendererNode, vue.RendererElement, {
86
+ [key: string]: any;
87
+ }>, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
88
88
  views: vue.DefineComponent<{}, () => vue.VNode<vue.RendererNode, vue.RendererElement, {
89
89
  [key: string]: any;
90
90
  }>, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {}, string, vue.PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
package/dist/async.js CHANGED
@@ -5,61 +5,61 @@ import { defineAsyncComponent } from "vue";
5
5
  var IconBar = defineAsyncComponent(async () => await import("./vue/bar.js"));
6
6
  var IconBicycle = defineAsyncComponent(async () => await import("./vue/bicycle.js"));
7
7
  var IconBelow = defineAsyncComponent(async () => await import("./vue/below.js"));
8
- var IconBottomRight = defineAsyncComponent(async () => await import("./vue/bottom-right.js"));
9
8
  var IconBottomLeft = defineAsyncComponent(async () => await import("./vue/bottom-left.js"));
10
- var IconCatalogue = defineAsyncComponent(async () => await import("./vue/catalogue.js"));
9
+ var IconBottomRight = defineAsyncComponent(async () => await import("./vue/bottom-right.js"));
11
10
  var IconBottom = defineAsyncComponent(async () => await import("./vue/bottom.js"));
12
- var IconClear = defineAsyncComponent(async () => await import("./vue/clear.js"));
13
11
  var IconCascaderField = defineAsyncComponent(async () => await import("./vue/cascader-field.js"));
12
+ var IconCatalogue = defineAsyncComponent(async () => await import("./vue/catalogue.js"));
13
+ var IconClear = defineAsyncComponent(async () => await import("./vue/clear.js"));
14
14
  var IconClose = defineAsyncComponent(async () => await import("./vue/close.js"));
15
15
  var IconCrl = defineAsyncComponent(async () => await import("./vue/crl.js"));
16
- var IconDown = defineAsyncComponent(async () => await import("./vue/down.js"));
17
- var IconDocument = defineAsyncComponent(async () => await import("./vue/document.js"));
18
16
  var IconDelete = defineAsyncComponent(async () => await import("./vue/delete.js"));
19
- var IconEdit = defineAsyncComponent(async () => await import("./vue/edit.js"));
17
+ var IconDocument = defineAsyncComponent(async () => await import("./vue/document.js"));
18
+ var IconDown = defineAsyncComponent(async () => await import("./vue/down.js"));
20
19
  var IconDownload = defineAsyncComponent(async () => await import("./vue/download.js"));
20
+ var IconEdit = defineAsyncComponent(async () => await import("./vue/edit.js"));
21
21
  var IconEnter = defineAsyncComponent(async () => await import("./vue/enter.js"));
22
22
  var IconFrame = defineAsyncComponent(async () => await import("./vue/frame.js"));
23
23
  var IconLeft = defineAsyncComponent(async () => await import("./vue/left.js"));
24
24
  var IconMute = defineAsyncComponent(async () => await import("./vue/mute.js"));
25
25
  var IconPause = defineAsyncComponent(async () => await import("./vue/pause.js"));
26
- var IconPlus = defineAsyncComponent(async () => await import("./vue/plus.js"));
27
26
  var IconPlay = defineAsyncComponent(async () => await import("./vue/play.js"));
27
+ var IconPlus = defineAsyncComponent(async () => await import("./vue/plus.js"));
28
28
  var IconRetreat = defineAsyncComponent(async () => await import("./vue/retreat.js"));
29
29
  var IconRight = defineAsyncComponent(async () => await import("./vue/right.js"));
30
- var IconUp = defineAsyncComponent(async () => await import("./vue/up.js"));
31
30
  var IconSound = defineAsyncComponent(async () => await import("./vue/sound.js"));
32
31
  var IconStar = defineAsyncComponent(async () => await import("./vue/star.js"));
32
+ var IconUp = defineAsyncComponent(async () => await import("./vue/up.js"));
33
33
  var IconViews = defineAsyncComponent(async () => await import("./vue/views.js"));
34
34
  var async_default = {
35
35
  "bar": IconBar,
36
36
  "bicycle": IconBicycle,
37
37
  "below": IconBelow,
38
- "bottom-right": IconBottomRight,
39
38
  "bottom-left": IconBottomLeft,
40
- "catalogue": IconCatalogue,
39
+ "bottom-right": IconBottomRight,
41
40
  "bottom": IconBottom,
42
- "clear": IconClear,
43
41
  "cascader-field": IconCascaderField,
42
+ "catalogue": IconCatalogue,
43
+ "clear": IconClear,
44
44
  "close": IconClose,
45
45
  "crl": IconCrl,
46
- "down": IconDown,
47
- "document": IconDocument,
48
46
  "delete": IconDelete,
49
- "edit": IconEdit,
47
+ "document": IconDocument,
48
+ "down": IconDown,
50
49
  "download": IconDownload,
50
+ "edit": IconEdit,
51
51
  "enter": IconEnter,
52
52
  "frame": IconFrame,
53
53
  "left": IconLeft,
54
54
  "mute": IconMute,
55
55
  "pause": IconPause,
56
- "plus": IconPlus,
57
56
  "play": IconPlay,
57
+ "plus": IconPlus,
58
58
  "retreat": IconRetreat,
59
59
  "right": IconRight,
60
- "up": IconUp,
61
60
  "sound": IconSound,
62
61
  "star": IconStar,
62
+ "up": IconUp,
63
63
  "views": IconViews
64
64
  };
65
65
  export {
@@ -2,7 +2,7 @@
2
2
  var index_default = {
3
3
  prefix: "fang-icons",
4
4
  info: {},
5
- lastModified: 1767835924699,
5
+ lastModified: 1767837438669,
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>'
@@ -2,7 +2,7 @@
2
2
  var index_default = {
3
3
  prefix: "fang-icons",
4
4
  info: {},
5
- lastModified: 1767835924699,
5
+ lastModified: 1767837438669,
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>'
package/dist/index.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "prefix": "fang-icons",
3
3
  "info": {},
4
- "lastModified": 1767835924699,
4
+ "lastModified": 1767837438669,
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 _chunk5NH4G6UJcjs = require('./chunk-5NH4G6UJ.cjs');
3
+ var _chunkMBNM725Jcjs = require('./chunk-MBNM725J.cjs');
4
4
  require('./chunk-75ZPJI57.cjs');
5
5
 
6
6
 
7
- exports.default = _chunk5NH4G6UJcjs.json_default;
7
+ exports.default = _chunkMBNM725Jcjs.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 = 1767835924699;
4
+ var lastModified = 1767837438669;
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 = 1767835924699;
4
+ var lastModified = 1767837438669;
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-RDKCKIKJ.js";
3
+ } from "./chunk-Z6TJJFOU.js";
4
4
  import "./chunk-MLKGABMK.js";
5
5
  export {
6
6
  json_default as default
@@ -8,7 +8,7 @@ var _chunkOSHAEKZLcjs = require('../chunk-OSHAEKZL.cjs');
8
8
  require('../chunk-IIVF4KK5.cjs');
9
9
 
10
10
 
11
- var _chunk5NH4G6UJcjs = require('../chunk-5NH4G6UJ.cjs');
11
+ var _chunkMBNM725Jcjs = require('../chunk-MBNM725J.cjs');
12
12
  require('../chunk-75ZPJI57.cjs');
13
13
 
14
14
  // packages/vite/index.ts
@@ -20,12 +20,12 @@ function simpleFangIcon(options = {}) {
20
20
  type = "svg",
21
21
  directory = "./svg",
22
22
  dynamic = true,
23
+ virtual = false,
24
+ replaced = true,
23
25
  customReplacement
24
26
  } = options;
25
- const resolvedVirtualModuleId = "\0" + virtualModuleId;
26
27
  if (type === "pub" && options.mobile) {
27
28
  const outDir = _path.join.call(void 0, "./public/", directory);
28
- console.log("outDir", outDir);
29
29
  _chunkV6F7B2R3cjs.runDev.call(void 0, {
30
30
  issort: true,
31
31
  dir: "./node_modules/@fangzhongya/icons/dist/svg",
@@ -36,112 +36,115 @@ function simpleFangIcon(options = {}) {
36
36
  isNeader: false
37
37
  });
38
38
  }
39
- const targetComponents = Array.isArray(name) ? name : [name];
40
- const pub = `
41
- import { defineComponent, h,} from 'vue'
42
- import FangIcon from '@fangzhongya/icons/icon/index'
43
- const component = defineComponent({
44
- name: '${name}',
45
- props: {
46
- name: {
47
- type: [String, Object],
48
- },
49
- default: {
50
- type: String,
51
- default: '${type}'
39
+ const plugin = {
40
+ name: "simple-fang-icon"
41
+ };
42
+ if (virtual) {
43
+ const resolvedVirtualModuleId = "\0" + virtualModuleId;
44
+ const pub = `
45
+ import { defineComponent, h,} from 'vue'
46
+ import FangIcon from '@fangzhongya/icons/icon/index'
47
+ const component = defineComponent({
48
+ name: '${name}',
49
+ props: {
50
+ name: {
51
+ type: [String, Object],
52
+ },
53
+ default: {
54
+ type: String,
55
+ default: '${type}'
56
+ },
57
+ directory: {
58
+ type: String,
59
+ default: '${directory}'
60
+ }
52
61
  },
53
- directory: {
54
- type: String,
55
- default: '${directory}'
62
+ setup(props, { attrs }) {
63
+ return () => {
64
+ return h(FangIcon, {
65
+ ...attrs,
66
+ name: props.name,
67
+ default: props.default,
68
+ directory: props.directory
69
+ });
70
+ };
56
71
  }
57
- },
58
- setup(props, { attrs }) {
59
- return () => {
60
- return h(FangIcon, {
61
- ...attrs,
62
- name: props.name,
63
- default: props.default,
64
- directory: props.directory
65
- });
66
- };
67
- }
68
- });
69
- // \u5BFC\u51FA\u5B89\u88C5\u51FD\u6570
70
- export const install = (app) => {
71
- app.component('${name}', component)
72
- };
73
-
74
- export default component;`;
75
- const svg = `
76
- import { defineComponent, h, computed} from 'vue'
77
- import FangIcon from '@fangzhongya/icons/icon/index'
78
- import icons from '@fangzhongya/icons/async'
79
- const component = defineComponent({
80
- name: '${name}',
81
- props: {
82
- name: {
83
- type: [String, Object],
84
- },
85
- type: {
86
- type: String,
87
- },
88
- default: {
89
- type: String,
90
- default: '${type}'
72
+ });
73
+ // \u5BFC\u51FA\u5B89\u88C5\u51FD\u6570
74
+ export const install = (app) => {
75
+ app.component('${name}', component)
76
+ };
77
+
78
+ export default component;`;
79
+ const svg = `
80
+ import { defineComponent, h, computed} from 'vue'
81
+ import FangIcon from '@fangzhongya/icons/icon/index'
82
+ import icons from '@fangzhongya/icons/async'
83
+ const component = defineComponent({
84
+ name: '${name}',
85
+ props: {
86
+ name: {
87
+ type: [String, Object],
88
+ },
89
+ type: {
90
+ type: String,
91
+ },
92
+ default: {
93
+ type: String,
94
+ default: '${type}'
95
+ },
96
+ directory: {
97
+ type: String,
98
+ default: '${directory}'
99
+ }
91
100
  },
92
- directory: {
93
- type: String,
94
- default: '${directory}'
95
- }
96
- },
97
- setup(props, { attrs }) {
98
- const iconName = computed(() => {
99
- const name = props.name;
100
- if (typeof name === 'string' && (props.type === 'svg' ||
101
- (!props.type && props.default === 'svg'))) {
102
- const icon = icons[name];
103
- if(icon){
104
- return icon;
101
+ setup(props, { attrs }) {
102
+ const iconName = computed(() => {
103
+ const name = props.name;
104
+ if (typeof name === 'string' && (props.type === 'svg' ||
105
+ (!props.type && props.default === 'svg'))) {
106
+ const icon = icons[name];
107
+ if(icon){
108
+ return icon;
109
+ }
105
110
  }
106
- }
107
- return name;
108
- });
109
- return () => {
110
- return h(FangIcon, {
111
- ...attrs,
112
- name: iconName.value,
113
- type: props.type,
114
- default: props.default,
115
- directory: props.directory
111
+ return name;
116
112
  });
117
- };
118
- }
119
- });
120
- // \u5BFC\u51FA\u5B89\u88C5\u51FD\u6570
121
- export const install = (app) => {
122
- app.component('${name}', component)
123
- };
124
-
125
- export default component;`;
126
- const text = type === "svg" ? svg : pub;
127
- return {
128
- name: "simple-fang-icon",
129
- resolveId(id) {
113
+ return () => {
114
+ return h(FangIcon, {
115
+ ...attrs,
116
+ name: iconName.value,
117
+ type: props.type,
118
+ default: props.default,
119
+ directory: props.directory
120
+ });
121
+ };
122
+ }
123
+ });
124
+ // \u5BFC\u51FA\u5B89\u88C5\u51FD\u6570
125
+ export const install = (app) => {
126
+ app.component('${name}', component)
127
+ };
128
+
129
+ export default component;`;
130
+ const text = type === "svg" ? svg : pub;
131
+ plugin.resolveId = function(id) {
130
132
  if (id === virtualModuleId) {
131
133
  return resolvedVirtualModuleId;
132
134
  }
133
135
  return void 0;
134
- },
135
- load(id) {
136
+ };
137
+ plugin.load = function(id) {
136
138
  if (id === resolvedVirtualModuleId) {
137
139
  return text;
138
140
  }
139
141
  return null;
140
- },
141
- // 使用 enforce 确保在 Vue 插件之前执行
142
- enforce: "pre",
143
- // 转换代码
144
- transform(code, id) {
142
+ };
143
+ }
144
+ if (replaced) {
145
+ const targetComponents = Array.isArray(name) ? name : [name];
146
+ plugin.enforce = "pre";
147
+ plugin.transform = function(code, id) {
145
148
  if (!shouldProcess(id)) {
146
149
  return null;
147
150
  }
@@ -153,18 +156,23 @@ export default component;`;
153
156
  let transformedCode = code;
154
157
  let replacedCount = 0;
155
158
  const imports = /* @__PURE__ */ new Set();
159
+ if (!virtual) {
160
+ imports.add(
161
+ `import ${name} from '@fangzhongya/icons/icon/index'`
162
+ );
163
+ }
156
164
  for (let i = components.length - 1; i >= 0; i--) {
157
165
  const component = components[i];
158
166
  if (component) {
159
- const { text: text2, imptext } = replaceComponent(
167
+ const { text, imptext } = replaceComponent(
160
168
  component,
161
169
  type,
162
170
  dynamic,
163
171
  customReplacement
164
172
  );
165
173
  imports.add(imptext);
166
- if (text2 !== component.fullMatch) {
167
- transformedCode = transformedCode.slice(0, component.start) + text2 + transformedCode.slice(component.end);
174
+ if (text !== component.fullMatch) {
175
+ transformedCode = transformedCode.slice(0, component.start) + text + transformedCode.slice(component.end);
168
176
  replacedCount++;
169
177
  }
170
178
  }
@@ -185,9 +193,8 @@ export default component;`;
185
193
  console.error(`\u5904\u7406\u6587\u4EF6 ${id} \u65F6\u51FA\u9519:`, error);
186
194
  }
187
195
  return null;
188
- },
189
- // 处理热更新
190
- handleHotUpdate({
196
+ };
197
+ plugin.handleHotUpdate = function({
191
198
  file,
192
199
  server
193
200
  }) {
@@ -197,8 +204,9 @@ export default component;`;
197
204
  });
198
205
  return [];
199
206
  }
200
- }
201
- };
207
+ };
208
+ }
209
+ return plugin;
202
210
  }
203
211
  function parseAttributes(attrString) {
204
212
  const attributes = { name: "" };
@@ -287,7 +295,7 @@ function findComponents(code, name) {
287
295
  return components;
288
296
  }
289
297
  function getText(iconName, match) {
290
- const svg = _chunkOSHAEKZLcjs.getIconifySVG.call(void 0, _chunk5NH4G6UJcjs.json_default, iconName, 'v-bind="scope"');
298
+ const svg = _chunkOSHAEKZLcjs.getIconifySVG.call(void 0, _chunkMBNM725Jcjs.json_default, iconName, 'v-bind="scope"');
291
299
  const s = match.fullMatch.replace(`name="${iconName}"`, "").replace(`name='${iconName}'`, "").replace(`</${match.componentName}>`, "");
292
300
  const text = `${s}<template #default="scope">${svg}</template></${match.componentName}>`;
293
301
  return { text, imptext: "" };
@@ -310,7 +318,7 @@ function replaceComponent(match, type, dynamic, customReplacement) {
310
318
  if (customReplacement) {
311
319
  return customReplacement(iconName, attributes);
312
320
  }
313
- let svgContent = _chunk5NH4G6UJcjs.json_default.icons[iconName];
321
+ let svgContent = _chunkMBNM725Jcjs.json_default.icons[iconName];
314
322
  if (!svgContent) {
315
323
  return { text: match.fullMatch, imptext: "" };
316
324
  }
@@ -5,11 +5,34 @@ type IconReplacement = (iconName: string, attributes: ComponentAttributes) => {
5
5
  imptext: string;
6
6
  };
7
7
  interface PluginOptions {
8
+ /**
9
+ * 组件名称
10
+ */
8
11
  name?: string;
12
+ /**
13
+ * 图标默认类型
14
+ */
9
15
  type?: string;
10
- customReplacement?: IconReplacement;
16
+ /**
17
+ * 图标目录
18
+ */
11
19
  directory?: string;
20
+ customReplacement?: IconReplacement;
21
+ /**
22
+ * 是否创建虚拟组件
23
+ */
24
+ virtual?: boolean;
25
+ /**
26
+ * 是否替换组件
27
+ */
28
+ replaced?: boolean;
29
+ /**
30
+ * 是否加载图片到本地public'
31
+ */
12
32
  mobile?: boolean;
33
+ /**
34
+ * 是否动态更新
35
+ */
13
36
  dynamic?: boolean;
14
37
  }
15
38
  interface ComponentAttributes {
@@ -5,11 +5,34 @@ type IconReplacement = (iconName: string, attributes: ComponentAttributes) => {
5
5
  imptext: string;
6
6
  };
7
7
  interface PluginOptions {
8
+ /**
9
+ * 组件名称
10
+ */
8
11
  name?: string;
12
+ /**
13
+ * 图标默认类型
14
+ */
9
15
  type?: string;
10
- customReplacement?: IconReplacement;
16
+ /**
17
+ * 图标目录
18
+ */
11
19
  directory?: string;
20
+ customReplacement?: IconReplacement;
21
+ /**
22
+ * 是否创建虚拟组件
23
+ */
24
+ virtual?: boolean;
25
+ /**
26
+ * 是否替换组件
27
+ */
28
+ replaced?: boolean;
29
+ /**
30
+ * 是否加载图片到本地public'
31
+ */
12
32
  mobile?: boolean;
33
+ /**
34
+ * 是否动态更新
35
+ */
13
36
  dynamic?: boolean;
14
37
  }
15
38
  interface ComponentAttributes {
@@ -8,7 +8,7 @@ import {
8
8
  import "../chunk-MOHILOKE.js";
9
9
  import {
10
10
  json_default
11
- } from "../chunk-RDKCKIKJ.js";
11
+ } from "../chunk-Z6TJJFOU.js";
12
12
  import "../chunk-MLKGABMK.js";
13
13
 
14
14
  // packages/vite/index.ts
@@ -20,12 +20,12 @@ function simpleFangIcon(options = {}) {
20
20
  type = "svg",
21
21
  directory = "./svg",
22
22
  dynamic = true,
23
+ virtual = false,
24
+ replaced = true,
23
25
  customReplacement
24
26
  } = options;
25
- const resolvedVirtualModuleId = "\0" + virtualModuleId;
26
27
  if (type === "pub" && options.mobile) {
27
28
  const outDir = join("./public/", directory);
28
- console.log("outDir", outDir);
29
29
  runDev({
30
30
  issort: true,
31
31
  dir: "./node_modules/@fangzhongya/icons/dist/svg",
@@ -36,112 +36,115 @@ function simpleFangIcon(options = {}) {
36
36
  isNeader: false
37
37
  });
38
38
  }
39
- const targetComponents = Array.isArray(name) ? name : [name];
40
- const pub = `
41
- import { defineComponent, h,} from 'vue'
42
- import FangIcon from '@fangzhongya/icons/icon/index'
43
- const component = defineComponent({
44
- name: '${name}',
45
- props: {
46
- name: {
47
- type: [String, Object],
48
- },
49
- default: {
50
- type: String,
51
- default: '${type}'
39
+ const plugin = {
40
+ name: "simple-fang-icon"
41
+ };
42
+ if (virtual) {
43
+ const resolvedVirtualModuleId = "\0" + virtualModuleId;
44
+ const pub = `
45
+ import { defineComponent, h,} from 'vue'
46
+ import FangIcon from '@fangzhongya/icons/icon/index'
47
+ const component = defineComponent({
48
+ name: '${name}',
49
+ props: {
50
+ name: {
51
+ type: [String, Object],
52
+ },
53
+ default: {
54
+ type: String,
55
+ default: '${type}'
56
+ },
57
+ directory: {
58
+ type: String,
59
+ default: '${directory}'
60
+ }
52
61
  },
53
- directory: {
54
- type: String,
55
- default: '${directory}'
62
+ setup(props, { attrs }) {
63
+ return () => {
64
+ return h(FangIcon, {
65
+ ...attrs,
66
+ name: props.name,
67
+ default: props.default,
68
+ directory: props.directory
69
+ });
70
+ };
56
71
  }
57
- },
58
- setup(props, { attrs }) {
59
- return () => {
60
- return h(FangIcon, {
61
- ...attrs,
62
- name: props.name,
63
- default: props.default,
64
- directory: props.directory
65
- });
66
- };
67
- }
68
- });
69
- // \u5BFC\u51FA\u5B89\u88C5\u51FD\u6570
70
- export const install = (app) => {
71
- app.component('${name}', component)
72
- };
73
-
74
- export default component;`;
75
- const svg = `
76
- import { defineComponent, h, computed} from 'vue'
77
- import FangIcon from '@fangzhongya/icons/icon/index'
78
- import icons from '@fangzhongya/icons/async'
79
- const component = defineComponent({
80
- name: '${name}',
81
- props: {
82
- name: {
83
- type: [String, Object],
84
- },
85
- type: {
86
- type: String,
87
- },
88
- default: {
89
- type: String,
90
- default: '${type}'
72
+ });
73
+ // \u5BFC\u51FA\u5B89\u88C5\u51FD\u6570
74
+ export const install = (app) => {
75
+ app.component('${name}', component)
76
+ };
77
+
78
+ export default component;`;
79
+ const svg = `
80
+ import { defineComponent, h, computed} from 'vue'
81
+ import FangIcon from '@fangzhongya/icons/icon/index'
82
+ import icons from '@fangzhongya/icons/async'
83
+ const component = defineComponent({
84
+ name: '${name}',
85
+ props: {
86
+ name: {
87
+ type: [String, Object],
88
+ },
89
+ type: {
90
+ type: String,
91
+ },
92
+ default: {
93
+ type: String,
94
+ default: '${type}'
95
+ },
96
+ directory: {
97
+ type: String,
98
+ default: '${directory}'
99
+ }
91
100
  },
92
- directory: {
93
- type: String,
94
- default: '${directory}'
95
- }
96
- },
97
- setup(props, { attrs }) {
98
- const iconName = computed(() => {
99
- const name = props.name;
100
- if (typeof name === 'string' && (props.type === 'svg' ||
101
- (!props.type && props.default === 'svg'))) {
102
- const icon = icons[name];
103
- if(icon){
104
- return icon;
101
+ setup(props, { attrs }) {
102
+ const iconName = computed(() => {
103
+ const name = props.name;
104
+ if (typeof name === 'string' && (props.type === 'svg' ||
105
+ (!props.type && props.default === 'svg'))) {
106
+ const icon = icons[name];
107
+ if(icon){
108
+ return icon;
109
+ }
105
110
  }
106
- }
107
- return name;
108
- });
109
- return () => {
110
- return h(FangIcon, {
111
- ...attrs,
112
- name: iconName.value,
113
- type: props.type,
114
- default: props.default,
115
- directory: props.directory
111
+ return name;
116
112
  });
117
- };
118
- }
119
- });
120
- // \u5BFC\u51FA\u5B89\u88C5\u51FD\u6570
121
- export const install = (app) => {
122
- app.component('${name}', component)
123
- };
124
-
125
- export default component;`;
126
- const text = type === "svg" ? svg : pub;
127
- return {
128
- name: "simple-fang-icon",
129
- resolveId(id) {
113
+ return () => {
114
+ return h(FangIcon, {
115
+ ...attrs,
116
+ name: iconName.value,
117
+ type: props.type,
118
+ default: props.default,
119
+ directory: props.directory
120
+ });
121
+ };
122
+ }
123
+ });
124
+ // \u5BFC\u51FA\u5B89\u88C5\u51FD\u6570
125
+ export const install = (app) => {
126
+ app.component('${name}', component)
127
+ };
128
+
129
+ export default component;`;
130
+ const text = type === "svg" ? svg : pub;
131
+ plugin.resolveId = function(id) {
130
132
  if (id === virtualModuleId) {
131
133
  return resolvedVirtualModuleId;
132
134
  }
133
135
  return void 0;
134
- },
135
- load(id) {
136
+ };
137
+ plugin.load = function(id) {
136
138
  if (id === resolvedVirtualModuleId) {
137
139
  return text;
138
140
  }
139
141
  return null;
140
- },
141
- // 使用 enforce 确保在 Vue 插件之前执行
142
- enforce: "pre",
143
- // 转换代码
144
- transform(code, id) {
142
+ };
143
+ }
144
+ if (replaced) {
145
+ const targetComponents = Array.isArray(name) ? name : [name];
146
+ plugin.enforce = "pre";
147
+ plugin.transform = function(code, id) {
145
148
  if (!shouldProcess(id)) {
146
149
  return null;
147
150
  }
@@ -153,18 +156,23 @@ export default component;`;
153
156
  let transformedCode = code;
154
157
  let replacedCount = 0;
155
158
  const imports = /* @__PURE__ */ new Set();
159
+ if (!virtual) {
160
+ imports.add(
161
+ `import ${name} from '@fangzhongya/icons/icon/index'`
162
+ );
163
+ }
156
164
  for (let i = components.length - 1; i >= 0; i--) {
157
165
  const component = components[i];
158
166
  if (component) {
159
- const { text: text2, imptext } = replaceComponent(
167
+ const { text, imptext } = replaceComponent(
160
168
  component,
161
169
  type,
162
170
  dynamic,
163
171
  customReplacement
164
172
  );
165
173
  imports.add(imptext);
166
- if (text2 !== component.fullMatch) {
167
- transformedCode = transformedCode.slice(0, component.start) + text2 + transformedCode.slice(component.end);
174
+ if (text !== component.fullMatch) {
175
+ transformedCode = transformedCode.slice(0, component.start) + text + transformedCode.slice(component.end);
168
176
  replacedCount++;
169
177
  }
170
178
  }
@@ -185,9 +193,8 @@ export default component;`;
185
193
  console.error(`\u5904\u7406\u6587\u4EF6 ${id} \u65F6\u51FA\u9519:`, error);
186
194
  }
187
195
  return null;
188
- },
189
- // 处理热更新
190
- handleHotUpdate({
196
+ };
197
+ plugin.handleHotUpdate = function({
191
198
  file,
192
199
  server
193
200
  }) {
@@ -197,8 +204,9 @@ export default component;`;
197
204
  });
198
205
  return [];
199
206
  }
200
- }
201
- };
207
+ };
208
+ }
209
+ return plugin;
202
210
  }
203
211
  function parseAttributes(attrString) {
204
212
  const attributes = { name: "" };
@@ -5,7 +5,7 @@ var _chunkOSHAEKZLcjs = require('../chunk-OSHAEKZL.cjs');
5
5
  require('../chunk-IIVF4KK5.cjs');
6
6
 
7
7
 
8
- var _chunk5NH4G6UJcjs = require('../chunk-5NH4G6UJ.cjs');
8
+ var _chunkMBNM725Jcjs = require('../chunk-MBNM725J.cjs');
9
9
  require('../chunk-75ZPJI57.cjs');
10
10
 
11
11
  // packages/vite/index2.ts
@@ -96,7 +96,7 @@ function findComponents(code, name) {
96
96
  return components;
97
97
  }
98
98
  function getText(iconName, match) {
99
- const svg = _chunkOSHAEKZLcjs.getIconifySVG.call(void 0, _chunk5NH4G6UJcjs.json_default, iconName, 'v-bind="scope"');
99
+ const svg = _chunkOSHAEKZLcjs.getIconifySVG.call(void 0, _chunkMBNM725Jcjs.json_default, iconName, 'v-bind="scope"');
100
100
  const s = match.fullMatch.replace(`name="${iconName}"`, "").replace(`name='${iconName}'`, "").replace(`</${match.componentName}>`, "");
101
101
  const text = `${s}<template #default="scope">${svg}</template></${match.componentName}>`;
102
102
  return { text, imptext: "" };
@@ -119,7 +119,7 @@ function replaceComponent(match, type, dynamic, customReplacement) {
119
119
  if (customReplacement) {
120
120
  return customReplacement(iconName, attributes);
121
121
  }
122
- let svgContent = _chunk5NH4G6UJcjs.json_default.icons[iconName];
122
+ let svgContent = _chunkMBNM725Jcjs.json_default.icons[iconName];
123
123
  if (!svgContent) {
124
124
  return { text: match.fullMatch, imptext: "" };
125
125
  }
@@ -164,6 +164,9 @@ function simpleFangIcon(options) {
164
164
  let transformedCode = code;
165
165
  let replacedCount = 0;
166
166
  const imports = /* @__PURE__ */ new Set();
167
+ imports.add(
168
+ `import ${name} from '@fangzhongya/icons/icon/index'`
169
+ );
167
170
  for (let i = components.length - 1; i >= 0; i--) {
168
171
  const component = components[i];
169
172
  if (component) {
@@ -5,7 +5,7 @@ import {
5
5
  import "../chunk-MOHILOKE.js";
6
6
  import {
7
7
  json_default
8
- } from "../chunk-RDKCKIKJ.js";
8
+ } from "../chunk-Z6TJJFOU.js";
9
9
  import "../chunk-MLKGABMK.js";
10
10
 
11
11
  // packages/vite/index2.ts
@@ -164,6 +164,9 @@ function simpleFangIcon(options) {
164
164
  let transformedCode = code;
165
165
  let replacedCount = 0;
166
166
  const imports = /* @__PURE__ */ new Set();
167
+ imports.add(
168
+ `import ${name} from '@fangzhongya/icons/icon/index'`
169
+ );
167
170
  for (let i = components.length - 1; i >= 0; i--) {
168
171
  const component = components[i];
169
172
  if (component) {
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.16",
5
+ "version": "0.0.18",
6
6
  "description ": "个人图标库",
7
7
  "author": "fangzhongya ",
8
8
  "license": "MIT",