@nice2dev/icons 1.3.15 → 1.3.16

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.
Files changed (140) hide show
  1. package/CHANGELOG.md +9 -0
  2. package/dist/cjs/NiceDesktopIconExporter.js +688 -599
  3. package/dist/cjs/NiceFaviconGenerator.js +603 -417
  4. package/dist/cjs/NiceIconPicker.js +788 -508
  5. package/dist/cjs/NiceIconPreview.js +246 -188
  6. package/dist/cjs/NiceIconSetCreator.js +683 -552
  7. package/dist/cjs/NiceIconStacker.js +547 -171
  8. package/dist/cjs/NiceIconValue.js +27 -35
  9. package/dist/cjs/NtdIconBadge.js +384 -360
  10. package/dist/cjs/NtdIconMorph.js +419 -354
  11. package/dist/cjs/NtdStateMorph.js +150 -147
  12. package/dist/cjs/advancedIconSearch.js +373 -510
  13. package/dist/cjs/animationControls.js +518 -642
  14. package/dist/cjs/client.js +12 -15
  15. package/dist/cjs/createIcon.js +349 -251
  16. package/dist/cjs/design-tokens.js +324 -390
  17. package/dist/cjs/figmaExport.js +162 -257
  18. package/dist/cjs/figmaSync.js +234 -316
  19. package/dist/cjs/headless-ui.js +240 -368
  20. package/dist/cjs/iconAnalytics.js +337 -393
  21. package/dist/cjs/iconHtml.js +64 -86
  22. package/dist/cjs/iconMetadata.js +392 -472
  23. package/dist/cjs/iconParts.js +120 -90
  24. package/dist/cjs/iconStack.js +136 -155
  25. package/dist/cjs/iconStyles.js +1609 -504
  26. package/dist/cjs/iconValue.js +359 -430
  27. package/dist/cjs/icons/accessibility.js +1119 -134
  28. package/dist/cjs/icons/actions.js +1290 -330
  29. package/dist/cjs/icons/ai.js +1424 -144
  30. package/dist/cjs/icons/brand.js +1344 -172
  31. package/dist/cjs/icons/business.js +903 -193
  32. package/dist/cjs/icons/devtech.js +1656 -227
  33. package/dist/cjs/icons/ecommerce.js +802 -111
  34. package/dist/cjs/icons/education.js +1345 -199
  35. package/dist/cjs/icons/files.js +1597 -328
  36. package/dist/cjs/icons/fintech.js +793 -104
  37. package/dist/cjs/icons/food.js +1507 -153
  38. package/dist/cjs/icons/fun.js +786 -109
  39. package/dist/cjs/icons/gaming.js +916 -170
  40. package/dist/cjs/icons/health.js +623 -112
  41. package/dist/cjs/icons/index.js +32 -35
  42. package/dist/cjs/icons/input.js +282 -83
  43. package/dist/cjs/icons/legal.js +1065 -122
  44. package/dist/cjs/icons/media.js +1061 -267
  45. package/dist/cjs/icons/navigation.js +387 -122
  46. package/dist/cjs/icons/omniverk.js +747 -90
  47. package/dist/cjs/icons/realestate.js +1520 -193
  48. package/dist/cjs/icons/saas.js +867 -98
  49. package/dist/cjs/icons/science.js +1451 -202
  50. package/dist/cjs/icons/shapes.js +1316 -308
  51. package/dist/cjs/icons/smarthome.js +786 -90
  52. package/dist/cjs/icons/social.js +591 -59
  53. package/dist/cjs/icons/sports.js +1225 -133
  54. package/dist/cjs/icons/sustainability.js +1211 -139
  55. package/dist/cjs/icons/travel.js +1470 -148
  56. package/dist/cjs/icons/ui.js +1508 -315
  57. package/dist/cjs/icons/weather.js +1160 -173
  58. package/dist/cjs/index.js +566 -568
  59. package/dist/cjs/lottieIntegration.js +261 -266
  60. package/dist/cjs/nicetodev-icons.css +1 -1
  61. package/dist/cjs/particleEffects.js +270 -251
  62. package/dist/cjs/resolver.js +229 -284
  63. package/dist/cjs/rsc.js +175 -193
  64. package/dist/cjs/sharpen.js +73 -130
  65. package/dist/cjs/smilAnimations.js +371 -165
  66. package/dist/cjs/stacking.js +87 -122
  67. package/dist/cjs/tailwind-plugin.js +280 -320
  68. package/dist/cjs/types.js +46 -72
  69. package/dist/cjs/utilities.js +163 -324
  70. package/dist/cjs/variantProps.js +12 -52
  71. package/dist/esm/NiceDesktopIconExporter.js +671 -598
  72. package/dist/esm/NiceFaviconGenerator.js +583 -416
  73. package/dist/esm/NiceIconPicker.js +789 -507
  74. package/dist/esm/NiceIconPreview.js +247 -187
  75. package/dist/esm/NiceIconSetCreator.js +685 -551
  76. package/dist/esm/NiceIconStacker.js +549 -170
  77. package/dist/esm/NiceIconValue.js +29 -34
  78. package/dist/esm/NtdIconBadge.js +388 -359
  79. package/dist/esm/NtdIconMorph.js +423 -353
  80. package/dist/esm/NtdStateMorph.js +152 -146
  81. package/dist/esm/advancedIconSearch.js +391 -509
  82. package/dist/esm/animationControls.js +527 -641
  83. package/dist/esm/client.js +48 -10
  84. package/dist/esm/createIcon.js +350 -250
  85. package/dist/esm/design-tokens.js +334 -387
  86. package/dist/esm/figmaExport.js +170 -256
  87. package/dist/esm/figmaSync.js +237 -315
  88. package/dist/esm/headless-ui.js +254 -365
  89. package/dist/esm/iconAnalytics.js +342 -392
  90. package/dist/esm/iconHtml.js +67 -85
  91. package/dist/esm/iconMetadata.js +404 -471
  92. package/dist/esm/iconParts.js +125 -89
  93. package/dist/esm/iconStack.js +145 -154
  94. package/dist/esm/iconStyles.js +1620 -503
  95. package/dist/esm/iconValue.js +361 -429
  96. package/dist/esm/icons/accessibility.js +1133 -133
  97. package/dist/esm/icons/actions.js +1320 -329
  98. package/dist/esm/icons/ai.js +1441 -143
  99. package/dist/esm/icons/brand.js +1351 -171
  100. package/dist/esm/icons/business.js +931 -201
  101. package/dist/esm/icons/devtech.js +1687 -226
  102. package/dist/esm/icons/ecommerce.js +816 -110
  103. package/dist/esm/icons/education.js +1364 -198
  104. package/dist/esm/icons/files.js +1628 -327
  105. package/dist/esm/icons/fintech.js +807 -103
  106. package/dist/esm/icons/food.js +1524 -152
  107. package/dist/esm/icons/fun.js +801 -108
  108. package/dist/esm/icons/gaming.js +933 -169
  109. package/dist/esm/icons/health.js +636 -111
  110. package/dist/esm/icons/index.js +596 -32
  111. package/dist/esm/icons/input.js +326 -82
  112. package/dist/esm/icons/legal.js +1079 -121
  113. package/dist/esm/icons/media.js +1086 -266
  114. package/dist/esm/icons/navigation.js +401 -121
  115. package/dist/esm/icons/omniverk.js +759 -89
  116. package/dist/esm/icons/realestate.js +1544 -198
  117. package/dist/esm/icons/saas.js +880 -97
  118. package/dist/esm/icons/science.js +1477 -208
  119. package/dist/esm/icons/shapes.js +1343 -307
  120. package/dist/esm/icons/smarthome.js +799 -89
  121. package/dist/esm/icons/social.js +599 -58
  122. package/dist/esm/icons/sports.js +1240 -132
  123. package/dist/esm/icons/sustainability.js +1226 -138
  124. package/dist/esm/icons/travel.js +1486 -147
  125. package/dist/esm/icons/ui.js +1540 -314
  126. package/dist/esm/icons/weather.js +1181 -172
  127. package/dist/esm/index.js +756 -58
  128. package/dist/esm/lottieIntegration.js +264 -265
  129. package/dist/esm/nicetodev-icons.css +1 -1
  130. package/dist/esm/particleEffects.js +271 -250
  131. package/dist/esm/resolver.js +231 -283
  132. package/dist/esm/rsc.js +182 -192
  133. package/dist/esm/sharpen.js +78 -129
  134. package/dist/esm/smilAnimations.js +376 -164
  135. package/dist/esm/stacking.js +99 -121
  136. package/dist/esm/tailwind-plugin.js +282 -319
  137. package/dist/esm/types.js +50 -71
  138. package/dist/esm/utilities.js +177 -321
  139. package/dist/esm/variantProps.js +23 -52
  140. package/package.json +15 -22
@@ -9,282 +9,196 @@
9
9
  * @since 2026-03
10
10
  * @license MIT
11
11
  */
12
- /* ────────────────────────────────────────────────────────────────────────────
13
- 2. HELPER FUNCTIONS
14
- ───────────────────────────────────────────────────────────────────────────── */
15
- /**
16
- * Convert hex color to Figma RGB (0-1 range)
17
- */
18
- /**
19
- * Generate readable name from icon component name
20
- */
21
12
  function getReadableName(name) {
22
- return name
23
- .replace(/^Ntd/, '')
24
- .replace(/([A-Z])/g, ' $1')
25
- .trim();
13
+ return name.replace(/^Ntd/, "").replace(/([A-Z])/g, " $1").trim();
26
14
  }
27
- /**
28
- * Generate search tags from icon name and category
29
- */
30
15
  function generateTags(name, category) {
31
- const readable = getReadableName(name).toLowerCase();
32
- const words = readable.split(/\s+/);
33
- const categoryLower = category.toLowerCase();
34
- return [...new Set([...words, categoryLower])];
16
+ const readable = getReadableName(name).toLowerCase();
17
+ const words = readable.split(/\s+/);
18
+ const categoryLower = category.toLowerCase();
19
+ return [.../* @__PURE__ */ new Set([...words, categoryLower])];
35
20
  }
36
- /* ────────────────────────────────────────────────────────────────────────────
37
- 3. EXPORT FUNCTIONS
38
- ───────────────────────────────────────────────────────────────────────────── */
39
- /**
40
- * Export a single icon to Figma vector node JSON
41
- *
42
- * @example
43
- * ```ts
44
- * import { exportIconToFigmaNode, NtdHome } from '@nice2dev/icons';
45
- *
46
- * const figmaNode = exportIconToFigmaNode(NtdHome, {
47
- * size: 24,
48
- * variant: 'solid',
49
- * primaryColor: '#6c5ce7',
50
- * });
51
- * // Use in Figma plugin: figma.createNodeFromFigmaNode(figmaNode)
52
- * ```
53
- */
54
21
  function exportIconToFigmaNode(IconComponent, options = {}) {
55
- const { size = 24, variant = 'solid', primaryColor: _primaryColor = '#000000', strokeWidth: _strokeWidth = 2, } = options;
56
- // Render to string (requires a DOM or ReactDOMServer for real impl)
57
- // This is a simplified structure - actual implementation needs SVG rendering
58
- const name = IconComponent.displayName || 'Icon';
59
- return {
60
- type: 'FRAME',
61
- name: `${getReadableName(name)} / ${variant}`,
22
+ const {
23
+ size = 24,
24
+ variant = "solid",
25
+ primaryColor: _primaryColor = "#000000",
26
+ strokeWidth: _strokeWidth = 2
27
+ } = options;
28
+ const name = IconComponent.displayName || "Icon";
29
+ return {
30
+ type: "FRAME",
31
+ name: `${getReadableName(name)} / ${variant}`,
32
+ width: size,
33
+ height: size,
34
+ children: [
35
+ {
36
+ type: "VECTOR",
37
+ name: "icon",
62
38
  width: size,
63
39
  height: size,
64
- children: [
65
- {
66
- type: 'VECTOR',
67
- name: 'icon',
68
- width: size,
69
- height: size,
70
- vectorPaths: [],
71
- constraints: {
72
- horizontal: 'SCALE',
73
- vertical: 'SCALE',
74
- },
75
- },
76
- ],
77
- fills: [],
78
- padding: { top: 0, right: 0, bottom: 0, left: 0 },
79
- };
40
+ vectorPaths: [],
41
+ constraints: {
42
+ horizontal: "SCALE",
43
+ vertical: "SCALE"
44
+ }
45
+ }
46
+ ],
47
+ fills: [],
48
+ padding: { top: 0, right: 0, bottom: 0, left: 0 }
49
+ };
80
50
  }
81
- /**
82
- * Export icon to SVG string for Figma import
83
- *
84
- * Returns a clean SVG string that can be imported into Figma.
85
- *
86
- * @example
87
- * ```ts
88
- * import { exportIconToSvgString } from '@nice2dev/icons';
89
- *
90
- * const svg = exportIconToSvgString(NtdHome, { variant: 'solid', size: 24 });
91
- * // Copy to clipboard or use in Figma plugin's figma.createNodeFromSvg()
92
- * ```
93
- */
94
51
  function exportIconToSvgString(svgElement, options = {}) {
95
- const { size = 24, removeAnimations = true } = options;
96
- // Clone the element to avoid modifying the original
97
- const clone = svgElement.cloneNode(true);
98
- // Set size
99
- clone.setAttribute('width', String(size));
100
- clone.setAttribute('height', String(size));
101
- // Remove animation classes and styles
102
- if (removeAnimations) {
103
- clone.classList.remove(...Array.from(clone.classList).filter((c) => c.startsWith('ntd-anim-')));
104
- clone.style.animation = '';
105
- clone.style.animationName = '';
106
- clone.style.animationDuration = '';
107
- clone.style.removeProperty('--ntd-anim-duration');
108
- // Remove SMIL animation elements
109
- clone.querySelectorAll('animate, animateTransform, animateMotion').forEach((el) => el.remove());
110
- }
111
- // Remove data- attributes used for interaction
112
- clone.removeAttribute('data-name');
113
- // Serialize
114
- return new XMLSerializer().serializeToString(clone);
52
+ const { size = 24, removeAnimations = true } = options;
53
+ const clone = svgElement.cloneNode(true);
54
+ clone.setAttribute("width", String(size));
55
+ clone.setAttribute("height", String(size));
56
+ if (removeAnimations) {
57
+ clone.classList.remove(...Array.from(clone.classList).filter((c) => c.startsWith("ntd-anim-")));
58
+ clone.style.animation = "";
59
+ clone.style.animationName = "";
60
+ clone.style.animationDuration = "";
61
+ clone.style.removeProperty("--ntd-anim-duration");
62
+ clone.querySelectorAll("animate, animateTransform, animateMotion").forEach((el) => el.remove());
63
+ }
64
+ clone.removeAttribute("data-name");
65
+ return new XMLSerializer().serializeToString(clone);
115
66
  }
116
- /**
117
- * Export icon as base64 data URL
118
- */
119
67
  function exportIconToDataUrl(svgElement, options) {
120
- const svgString = exportIconToSvgString(svgElement, options);
121
- const base64 = btoa(unescape(encodeURIComponent(svgString)));
122
- return `data:image/svg+xml;base64,${base64}`;
68
+ const svgString = exportIconToSvgString(svgElement, options);
69
+ const base64 = btoa(unescape(encodeURIComponent(svgString)));
70
+ return `data:image/svg+xml;base64,${base64}`;
123
71
  }
124
- /**
125
- * Generate Figma plugin manifest for all icons
126
- *
127
- * Creates a JSON manifest that can be used by a Figma plugin
128
- * to display and insert icons.
129
- *
130
- * @example
131
- * ```ts
132
- * import { generateFigmaPluginManifest, allIcons } from '@nice2dev/icons';
133
- *
134
- * const manifest = generateFigmaPluginManifest(allIcons, {
135
- * name: 'Nice2Dev Icons',
136
- * version: '1.0.0',
137
- * });
138
- *
139
- * // Save as icons.json for your Figma plugin
140
- * ```
141
- */
142
72
  function generateFigmaPluginManifest(icons, options = {}) {
143
- const { name = '@nice2dev/icons', version = '1.0.0' } = options;
144
- // Collect categories
145
- const categorySet = new Set();
146
- icons.forEach((icon) => categorySet.add(icon.category));
147
- const categories = Array.from(categorySet).sort();
148
- // Build icon entries
149
- const iconEntries = icons.map((icon) => ({
150
- name: getReadableName(icon.name),
151
- category: icon.category,
152
- variants: [
153
- 'solid',
154
- 'sharp',
155
- 'outline',
156
- 'wireframe',
157
- 'duotone',
158
- 'cutout',
159
- 'vivid',
160
- 'mini',
161
- '3d',
162
- 'rounded',
163
- ],
164
- tags: generateTags(icon.name, icon.category),
165
- paths: {
166
- // Paths would be extracted from actual rendering
167
- // This is a placeholder structure
168
- },
169
- }));
170
- return {
171
- name,
172
- version,
173
- iconCount: icons.length,
174
- categories,
175
- icons: iconEntries,
176
- };
73
+ const { name = "@nice2dev/icons", version = "1.0.0" } = options;
74
+ const categorySet = /* @__PURE__ */ new Set();
75
+ icons.forEach((icon) => categorySet.add(icon.category));
76
+ const categories = Array.from(categorySet).sort();
77
+ const iconEntries = icons.map((icon) => ({
78
+ name: getReadableName(icon.name),
79
+ category: icon.category,
80
+ variants: [
81
+ "solid",
82
+ "sharp",
83
+ "outline",
84
+ "wireframe",
85
+ "duotone",
86
+ "cutout",
87
+ "vivid",
88
+ "mini",
89
+ "3d",
90
+ "rounded"
91
+ ],
92
+ tags: generateTags(icon.name, icon.category),
93
+ paths: {
94
+ // Paths would be extracted from actual rendering
95
+ // This is a placeholder structure
96
+ }
97
+ }));
98
+ return {
99
+ name,
100
+ version,
101
+ iconCount: icons.length,
102
+ categories,
103
+ icons: iconEntries
104
+ };
177
105
  }
178
- /**
179
- * Download icons as SVG files (browser)
180
- *
181
- * Triggers a download of the icon as an SVG file.
182
- */
183
106
  function downloadIconAsSvg(svgElement, filename, options) {
184
- const svgString = exportIconToSvgString(svgElement, options);
185
- const blob = new Blob([svgString], { type: 'image/svg+xml' });
186
- const url = URL.createObjectURL(blob);
187
- const link = document.createElement('a');
188
- link.href = url;
189
- link.download = filename.endsWith('.svg') ? filename : `${filename}.svg`;
190
- document.body.appendChild(link);
191
- link.click();
192
- document.body.removeChild(link);
193
- URL.revokeObjectURL(url);
107
+ const svgString = exportIconToSvgString(svgElement, options);
108
+ const blob = new Blob([svgString], { type: "image/svg+xml" });
109
+ const url = URL.createObjectURL(blob);
110
+ const link = document.createElement("a");
111
+ link.href = url;
112
+ link.download = filename.endsWith(".svg") ? filename : `${filename}.svg`;
113
+ document.body.appendChild(link);
114
+ link.click();
115
+ document.body.removeChild(link);
116
+ URL.revokeObjectURL(url);
194
117
  }
195
- /**
196
- * Download icons as PNG (browser)
197
- *
198
- * Renders the SVG to canvas and downloads as PNG.
199
- */
200
118
  async function downloadIconAsPng(svgElement, filename, options = {}) {
201
- const { size = 24, scale = 2, backgroundColor } = options;
202
- const svgString = exportIconToSvgString(svgElement, { size });
203
- const svg64 = btoa(unescape(encodeURIComponent(svgString)));
204
- const imgSrc = `data:image/svg+xml;base64,${svg64}`;
205
- return new Promise((resolve, reject) => {
206
- const img = new Image();
207
- img.onload = () => {
208
- const canvas = document.createElement('canvas');
209
- const scaledSize = size * scale;
210
- canvas.width = scaledSize;
211
- canvas.height = scaledSize;
212
- const ctx = canvas.getContext('2d');
213
- if (!ctx) {
214
- reject(new Error('Could not get canvas context'));
215
- return;
216
- }
217
- // Fill background if specified
218
- if (backgroundColor) {
219
- ctx.fillStyle = backgroundColor;
220
- ctx.fillRect(0, 0, scaledSize, scaledSize);
221
- }
222
- // Draw image
223
- ctx.drawImage(img, 0, 0, scaledSize, scaledSize);
224
- // Download
225
- canvas.toBlob((blob) => {
226
- if (!blob) {
227
- reject(new Error('Could not create blob'));
228
- return;
229
- }
230
- const url = URL.createObjectURL(blob);
231
- const link = document.createElement('a');
232
- link.href = url;
233
- link.download = filename.endsWith('.png') ? filename : `${filename}.png`;
234
- document.body.appendChild(link);
235
- link.click();
236
- document.body.removeChild(link);
237
- URL.revokeObjectURL(url);
238
- resolve();
239
- }, 'image/png');
240
- };
241
- img.onerror = () => reject(new Error('Failed to load SVG image'));
242
- img.src = imgSrc;
243
- });
119
+ const { size = 24, scale = 2, backgroundColor } = options;
120
+ const svgString = exportIconToSvgString(svgElement, { size });
121
+ const svg64 = btoa(unescape(encodeURIComponent(svgString)));
122
+ const imgSrc = `data:image/svg+xml;base64,${svg64}`;
123
+ return new Promise((resolve, reject) => {
124
+ const img = new Image();
125
+ img.onload = () => {
126
+ const canvas = document.createElement("canvas");
127
+ const scaledSize = size * scale;
128
+ canvas.width = scaledSize;
129
+ canvas.height = scaledSize;
130
+ const ctx = canvas.getContext("2d");
131
+ if (!ctx) {
132
+ reject(new Error("Could not get canvas context"));
133
+ return;
134
+ }
135
+ if (backgroundColor) {
136
+ ctx.fillStyle = backgroundColor;
137
+ ctx.fillRect(0, 0, scaledSize, scaledSize);
138
+ }
139
+ ctx.drawImage(img, 0, 0, scaledSize, scaledSize);
140
+ canvas.toBlob((blob) => {
141
+ if (!blob) {
142
+ reject(new Error("Could not create blob"));
143
+ return;
144
+ }
145
+ const url = URL.createObjectURL(blob);
146
+ const link = document.createElement("a");
147
+ link.href = url;
148
+ link.download = filename.endsWith(".png") ? filename : `${filename}.png`;
149
+ document.body.appendChild(link);
150
+ link.click();
151
+ document.body.removeChild(link);
152
+ URL.revokeObjectURL(url);
153
+ resolve();
154
+ }, "image/png");
155
+ };
156
+ img.onerror = () => reject(new Error("Failed to load SVG image"));
157
+ img.src = imgSrc;
158
+ });
244
159
  }
245
- /**
246
- * Copy icon SVG to clipboard
247
- */
248
160
  async function copyIconToClipboard(svgElement, options) {
249
- var _a;
250
- const svgString = exportIconToSvgString(svgElement, options);
251
- if ((_a = navigator.clipboard) === null || _a === void 0 ? void 0 : _a.writeText) {
252
- await navigator.clipboard.writeText(svgString);
253
- }
254
- else {
255
- // Fallback for older browsers
256
- const textarea = document.createElement('textarea');
257
- textarea.value = svgString;
258
- textarea.style.position = 'fixed';
259
- textarea.style.opacity = '0';
260
- document.body.appendChild(textarea);
261
- textarea.select();
262
- document.execCommand('copy');
263
- document.body.removeChild(textarea);
264
- }
161
+ const svgString = exportIconToSvgString(svgElement, options);
162
+ if (navigator.clipboard?.writeText) {
163
+ await navigator.clipboard.writeText(svgString);
164
+ } else {
165
+ const textarea = document.createElement("textarea");
166
+ textarea.value = svgString;
167
+ textarea.style.position = "fixed";
168
+ textarea.style.opacity = "0";
169
+ document.body.appendChild(textarea);
170
+ textarea.select();
171
+ document.execCommand("copy");
172
+ document.body.removeChild(textarea);
173
+ }
265
174
  }
266
- /**
267
- * Batch export multiple icons
268
- */
269
175
  function batchExportIcons(svgElements, format, options) {
270
- const result = {};
271
- for (const { element, name } of svgElements) {
272
- switch (format) {
273
- case 'svg':
274
- result[name] = exportIconToSvgString(element, options);
275
- break;
276
- case 'data-url':
277
- result[name] = exportIconToDataUrl(element, options);
278
- break;
279
- case 'json':
280
- result[name] = JSON.stringify({
281
- name,
282
- svg: exportIconToSvgString(element, options),
283
- });
284
- break;
285
- }
176
+ const result = {};
177
+ for (const { element, name } of svgElements) {
178
+ switch (format) {
179
+ case "svg":
180
+ result[name] = exportIconToSvgString(element, options);
181
+ break;
182
+ case "data-url":
183
+ result[name] = exportIconToDataUrl(element, options);
184
+ break;
185
+ case "json":
186
+ result[name] = JSON.stringify({
187
+ name,
188
+ svg: exportIconToSvgString(element, options)
189
+ });
190
+ break;
286
191
  }
287
- return result;
192
+ }
193
+ return result;
288
194
  }
289
-
290
- export { batchExportIcons, copyIconToClipboard, downloadIconAsPng, downloadIconAsSvg, exportIconToDataUrl, exportIconToFigmaNode, exportIconToSvgString, generateFigmaPluginManifest };
195
+ export {
196
+ batchExportIcons,
197
+ copyIconToClipboard,
198
+ downloadIconAsPng,
199
+ downloadIconAsSvg,
200
+ exportIconToDataUrl,
201
+ exportIconToFigmaNode,
202
+ exportIconToSvgString,
203
+ generateFigmaPluginManifest
204
+ };