@nice2dev/icons 1.3.14 → 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 (142) hide show
  1. package/CHANGELOG.md +15 -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 +34 -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 +1465 -165
  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 -566
  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 +1482 -164
  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/dist/types/icons/index.d.ts +1 -1
  141. package/dist/types/icons/science.d.ts +9 -0
  142. package/package.json +15 -22
@@ -1,433 +1,619 @@
1
- 'use strict';
2
-
3
- var jsxRuntime = require('react/jsx-runtime');
4
- var uiCore = require('@nice2dev/ui-core');
5
- var React = require('react');
6
- var actions = require('./icons/actions.js');
7
-
8
- /* ══════════════════════════════════════════════════════════════════════════════
9
- Constants
10
- ══════════════════════════════════════════════════════════════════════════════ */
1
+ "use strict";
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __copyProps = (to, from, except, desc) => {
9
+ if (from && typeof from === "object" || typeof from === "function") {
10
+ for (let key of __getOwnPropNames(from))
11
+ if (!__hasOwnProp.call(to, key) && key !== except)
12
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
13
+ }
14
+ return to;
15
+ };
16
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
17
+ // If the importer is in node compatibility mode or this is not an ESM
18
+ // file that has been converted to a CommonJS file using a Babel-
19
+ // compatible transform (i.e. "__esModule" has not been set), then set
20
+ // "default" to the CommonJS "module.exports" for node compatibility.
21
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
22
+ mod
23
+ ));
24
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
25
+ const jsxRuntime = require("react/jsx-runtime");
26
+ const uiCore = require("@nice2dev/ui-core");
27
+ const React = require("react");
28
+ const actions = require("./icons/actions.js");
11
29
  const FAVICON_SIZES = [
12
- { name: 'favicon-16x16', size: 16, purpose: 'Browser tab', format: 'png' },
13
- { name: 'favicon-32x32', size: 32, purpose: 'Browser tab (Retina)', format: 'png' },
14
- { name: 'favicon-48x48', size: 48, purpose: 'Windows site icon', format: 'png' },
15
- { name: 'favicon', size: 32, purpose: 'Legacy ICO format', format: 'ico' },
16
- { name: 'apple-touch-icon', size: 180, purpose: 'iOS home screen', format: 'png' },
17
- { name: 'android-chrome-192x192', size: 192, purpose: 'Android Chrome', format: 'png' },
18
- { name: 'android-chrome-512x512', size: 512, purpose: 'Android splash', format: 'png' },
19
- { name: 'mstile-150x150', size: 150, purpose: 'Windows tile', format: 'png' },
20
- { name: 'safari-pinned-tab', size: 512, purpose: 'Safari pinned tab', format: 'svg' },
30
+ { name: "favicon-16x16", size: 16, purpose: "Browser tab", format: "png" },
31
+ { name: "favicon-32x32", size: 32, purpose: "Browser tab (Retina)", format: "png" },
32
+ { name: "favicon-48x48", size: 48, purpose: "Windows site icon", format: "png" },
33
+ { name: "favicon", size: 32, purpose: "Legacy ICO format", format: "ico" },
34
+ { name: "apple-touch-icon", size: 180, purpose: "iOS home screen", format: "png" },
35
+ { name: "android-chrome-192x192", size: 192, purpose: "Android Chrome", format: "png" },
36
+ { name: "android-chrome-512x512", size: 512, purpose: "Android splash", format: "png" },
37
+ { name: "mstile-150x150", size: 150, purpose: "Windows tile", format: "png" },
38
+ { name: "safari-pinned-tab", size: 512, purpose: "Safari pinned tab", format: "svg" }
21
39
  ];
22
40
  const DEFAULT_MANIFEST = {
23
- name: 'My Application',
24
- shortName: 'MyApp',
25
- description: '',
26
- themeColor: '#ffffff',
27
- backgroundColor: '#ffffff',
28
- display: 'standalone',
29
- startUrl: '/',
41
+ name: "My Application",
42
+ shortName: "MyApp",
43
+ description: "",
44
+ themeColor: "#ffffff",
45
+ backgroundColor: "#ffffff",
46
+ display: "standalone",
47
+ startUrl: "/"
30
48
  };
31
- function useFaviconGenerator(icon, fill = '#1e1e1e', initialConfig) {
32
- const [config, setConfig] = React.useState({
33
- ...DEFAULT_MANIFEST,
34
- ...initialConfig,
35
- });
36
- const [assets, setAssets] = React.useState([]);
37
- const [isGenerating, setIsGenerating] = React.useState(false);
38
- // Render icon to canvas
39
- const renderToCanvas = React.useCallback(async (size) => {
40
- const canvas = document.createElement('canvas');
41
- canvas.width = size;
42
- canvas.height = size;
43
- const ctx = canvas.getContext('2d');
44
- // Create SVG from icon
45
- const svgContainer = document.createElement('div');
46
- const IconComponent = icon;
47
- // Render to get SVG string
48
- const { createRoot } = await import('react-dom/client');
49
- const root = createRoot(svgContainer);
50
- return new Promise((resolve) => {
51
- root.render(jsxRuntime.jsx(IconComponent, { size: size * 0.8, fill: fill }));
49
+ function useFaviconGenerator(icon, fill = "#1e1e1e", initialConfig) {
50
+ const [config, setConfig] = React.useState({
51
+ ...DEFAULT_MANIFEST,
52
+ ...initialConfig
53
+ });
54
+ const [assets, setAssets] = React.useState([]);
55
+ const [isGenerating, setIsGenerating] = React.useState(false);
56
+ const renderToCanvas = React.useCallback(
57
+ async (size) => {
58
+ const canvas = document.createElement("canvas");
59
+ canvas.width = size;
60
+ canvas.height = size;
61
+ const ctx = canvas.getContext("2d");
62
+ const svgContainer = document.createElement("div");
63
+ const IconComponent = icon;
64
+ const { createRoot } = await import("react-dom/client");
65
+ const root = createRoot(svgContainer);
66
+ return new Promise((resolve) => {
67
+ root.render(/* @__PURE__ */ jsxRuntime.jsx(IconComponent, { size: size * 0.8, fill }));
68
+ setTimeout(() => {
69
+ const svg = svgContainer.querySelector("svg");
70
+ if (svg) {
71
+ const padding = size * 0.1;
72
+ ctx.fillStyle = config.backgroundColor;
73
+ ctx.fillRect(0, 0, size, size);
74
+ const svgData = new XMLSerializer().serializeToString(svg);
75
+ const img = new Image();
76
+ img.onload = () => {
77
+ ctx.drawImage(img, padding, padding, size * 0.8, size * 0.8);
78
+ root.unmount();
79
+ resolve(canvas);
80
+ };
81
+ img.src = "data:image/svg+xml;base64," + btoa(unescape(encodeURIComponent(svgData)));
82
+ } else {
83
+ root.unmount();
84
+ resolve(canvas);
85
+ }
86
+ }, 50);
87
+ });
88
+ },
89
+ [icon, fill, config.backgroundColor]
90
+ );
91
+ const generate = React.useCallback(async () => {
92
+ setIsGenerating(true);
93
+ const generated = [];
94
+ try {
95
+ for (const faviconSize of FAVICON_SIZES) {
96
+ if (faviconSize.format === "svg") {
97
+ const svgContainer = document.createElement("div");
98
+ const { createRoot } = await import("react-dom/client");
99
+ const root = createRoot(svgContainer);
100
+ const IconComponent = icon;
101
+ await new Promise((resolve) => {
102
+ root.render(/* @__PURE__ */ jsxRuntime.jsx(IconComponent, { size: faviconSize.size, fill }));
52
103
  setTimeout(() => {
53
- const svg = svgContainer.querySelector('svg');
54
- if (svg) {
55
- // Center icon
56
- const padding = size * 0.1;
57
- ctx.fillStyle = config.backgroundColor;
58
- ctx.fillRect(0, 0, size, size);
59
- const svgData = new XMLSerializer().serializeToString(svg);
60
- const img = new Image();
61
- img.onload = () => {
62
- ctx.drawImage(img, padding, padding, size * 0.8, size * 0.8);
63
- root.unmount();
64
- resolve(canvas);
65
- };
66
- img.src = 'data:image/svg+xml;base64,' + btoa(unescape(encodeURIComponent(svgData)));
67
- }
68
- else {
69
- root.unmount();
70
- resolve(canvas);
71
- }
104
+ const svg = svgContainer.querySelector("svg");
105
+ if (svg) {
106
+ const svgData = new XMLSerializer().serializeToString(svg);
107
+ generated.push({
108
+ filename: `${faviconSize.name}.svg`,
109
+ size: faviconSize.size,
110
+ purpose: faviconSize.purpose,
111
+ dataUrl: "data:image/svg+xml;base64," + btoa(unescape(encodeURIComponent(svgData)))
112
+ });
113
+ }
114
+ root.unmount();
115
+ resolve();
72
116
  }, 50);
73
- });
74
- }, [icon, fill, config.backgroundColor]);
75
- // Generate all assets
76
- const generate = React.useCallback(async () => {
77
- setIsGenerating(true);
78
- const generated = [];
79
- try {
80
- for (const faviconSize of FAVICON_SIZES) {
81
- if (faviconSize.format === 'svg') {
82
- // SVG format
83
- const svgContainer = document.createElement('div');
84
- const { createRoot } = await import('react-dom/client');
85
- const root = createRoot(svgContainer);
86
- const IconComponent = icon;
87
- await new Promise((resolve) => {
88
- root.render(jsxRuntime.jsx(IconComponent, { size: faviconSize.size, fill: fill }));
89
- setTimeout(() => {
90
- const svg = svgContainer.querySelector('svg');
91
- if (svg) {
92
- const svgData = new XMLSerializer().serializeToString(svg);
93
- generated.push({
94
- filename: `${faviconSize.name}.svg`,
95
- size: faviconSize.size,
96
- purpose: faviconSize.purpose,
97
- dataUrl: 'data:image/svg+xml;base64,' + btoa(unescape(encodeURIComponent(svgData))),
98
- });
99
- }
100
- root.unmount();
101
- resolve();
102
- }, 50);
103
- });
104
- }
105
- else {
106
- // PNG/ICO format
107
- const canvas = await renderToCanvas(faviconSize.size);
108
- const dataUrl = canvas.toDataURL('image/png');
109
- generated.push({
110
- filename: `${faviconSize.name}.${faviconSize.format === 'ico' ? 'ico' : 'png'}`,
111
- size: faviconSize.size,
112
- purpose: faviconSize.purpose,
113
- dataUrl,
114
- });
115
- }
116
- }
117
- setAssets(generated);
118
- }
119
- catch (error) {
120
- console.error('Failed to generate favicons:', error);
117
+ });
118
+ } else {
119
+ const canvas = await renderToCanvas(faviconSize.size);
120
+ const dataUrl = canvas.toDataURL("image/png");
121
+ generated.push({
122
+ filename: `${faviconSize.name}.${faviconSize.format === "ico" ? "ico" : "png"}`,
123
+ size: faviconSize.size,
124
+ purpose: faviconSize.purpose,
125
+ dataUrl
126
+ });
121
127
  }
122
- finally {
123
- setIsGenerating(false);
128
+ }
129
+ setAssets(generated);
130
+ } catch (error) {
131
+ console.error("Failed to generate favicons:", error);
132
+ } finally {
133
+ setIsGenerating(false);
134
+ }
135
+ }, [icon, fill, renderToCanvas]);
136
+ const getManifestJson = React.useCallback(() => {
137
+ const manifest = {
138
+ name: config.name,
139
+ short_name: config.shortName,
140
+ description: config.description || void 0,
141
+ theme_color: config.themeColor,
142
+ background_color: config.backgroundColor,
143
+ display: config.display,
144
+ start_url: config.startUrl,
145
+ icons: [
146
+ {
147
+ src: "/android-chrome-192x192.png",
148
+ sizes: "192x192",
149
+ type: "image/png"
150
+ },
151
+ {
152
+ src: "/android-chrome-512x512.png",
153
+ sizes: "512x512",
154
+ type: "image/png"
155
+ },
156
+ {
157
+ src: "/android-chrome-512x512.png",
158
+ sizes: "512x512",
159
+ type: "image/png",
160
+ purpose: "maskable"
124
161
  }
125
- }, [icon, fill, renderToCanvas]);
126
- // Get manifest.json content
127
- const getManifestJson = React.useCallback(() => {
128
- const manifest = {
129
- name: config.name,
130
- short_name: config.shortName,
131
- description: config.description || undefined,
132
- theme_color: config.themeColor,
133
- background_color: config.backgroundColor,
134
- display: config.display,
135
- start_url: config.startUrl,
136
- icons: [
137
- {
138
- src: '/android-chrome-192x192.png',
139
- sizes: '192x192',
140
- type: 'image/png',
141
- },
142
- {
143
- src: '/android-chrome-512x512.png',
144
- sizes: '512x512',
145
- type: 'image/png',
146
- },
147
- {
148
- src: '/android-chrome-512x512.png',
149
- sizes: '512x512',
150
- type: 'image/png',
151
- purpose: 'maskable',
152
- },
153
- ],
154
- };
155
- return JSON.stringify(manifest, null, 2);
156
- }, [config]);
157
- // Get HTML tags for linking favicons
158
- const getHtmlTags = React.useCallback(() => {
159
- return `<!-- Favicons -->
160
- <link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png">
161
- <link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png">
162
- <link rel="shortcut icon" href="/favicon.ico">
163
-
164
- <!-- Apple Touch Icon -->
165
- <link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png">
166
-
167
- <!-- Safari Pinned Tab -->
168
- <link rel="mask-icon" href="/safari-pinned-tab.svg" color="${config.themeColor}">
169
-
170
- <!-- Windows -->
171
- <meta name="msapplication-TileColor" content="${config.backgroundColor}">
172
- <meta name="msapplication-TileImage" content="/mstile-150x150.png">
173
-
174
- <!-- Theme -->
175
- <meta name="theme-color" content="${config.themeColor}">
176
-
177
- <!-- Web App Manifest -->
178
- <link rel="manifest" href="/manifest.json">`;
179
- }, [config]);
180
- // Download single asset
181
- const downloadSingle = React.useCallback((asset) => {
182
- const link = document.createElement('a');
183
- link.href = asset.dataUrl;
184
- link.download = asset.filename;
185
- link.click();
186
- }, []);
187
- // Download all as ZIP (simplified - downloads individually)
188
- const downloadAll = React.useCallback(() => {
189
- // Download manifest
190
- const manifestBlob = new Blob([getManifestJson()], { type: 'application/json' });
191
- const manifestUrl = URL.createObjectURL(manifestBlob);
192
- const manifestLink = document.createElement('a');
193
- manifestLink.href = manifestUrl;
194
- manifestLink.download = 'manifest.json';
195
- manifestLink.click();
196
- URL.revokeObjectURL(manifestUrl);
197
- // Download HTML tags
198
- const htmlBlob = new Blob([getHtmlTags()], { type: 'text/html' });
199
- const htmlUrl = URL.createObjectURL(htmlBlob);
200
- const htmlLink = document.createElement('a');
201
- htmlLink.href = htmlUrl;
202
- htmlLink.download = 'favicon-tags.html';
203
- htmlLink.click();
204
- URL.revokeObjectURL(htmlUrl);
205
- // Download assets
206
- assets.forEach((asset, i) => {
207
- setTimeout(() => downloadSingle(asset), i * 200);
208
- });
209
- }, [assets, downloadSingle, getManifestJson, getHtmlTags]);
210
- return {
211
- config,
212
- setConfig,
213
- assets,
214
- isGenerating,
215
- generate,
216
- downloadAll,
217
- downloadSingle,
218
- getManifestJson,
219
- getHtmlTags,
162
+ ]
220
163
  };
164
+ return JSON.stringify(manifest, null, 2);
165
+ }, [config]);
166
+ const getHtmlTags = React.useCallback(() => {
167
+ return `<!-- Favicons -->
168
+ <link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png">
169
+ <link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png">
170
+ <link rel="shortcut icon" href="/favicon.ico">
171
+
172
+ <!-- Apple Touch Icon -->
173
+ <link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png">
174
+
175
+ <!-- Safari Pinned Tab -->
176
+ <link rel="mask-icon" href="/safari-pinned-tab.svg" color="${config.themeColor}">
177
+
178
+ <!-- Windows -->
179
+ <meta name="msapplication-TileColor" content="${config.backgroundColor}">
180
+ <meta name="msapplication-TileImage" content="/mstile-150x150.png">
181
+
182
+ <!-- Theme -->
183
+ <meta name="theme-color" content="${config.themeColor}">
184
+
185
+ <!-- Web App Manifest -->
186
+ <link rel="manifest" href="/manifest.json">`;
187
+ }, [config]);
188
+ const downloadSingle = React.useCallback((asset) => {
189
+ const link = document.createElement("a");
190
+ link.href = asset.dataUrl;
191
+ link.download = asset.filename;
192
+ link.click();
193
+ }, []);
194
+ const downloadAll = React.useCallback(() => {
195
+ const manifestBlob = new Blob([getManifestJson()], { type: "application/json" });
196
+ const manifestUrl = URL.createObjectURL(manifestBlob);
197
+ const manifestLink = document.createElement("a");
198
+ manifestLink.href = manifestUrl;
199
+ manifestLink.download = "manifest.json";
200
+ manifestLink.click();
201
+ URL.revokeObjectURL(manifestUrl);
202
+ const htmlBlob = new Blob([getHtmlTags()], { type: "text/html" });
203
+ const htmlUrl = URL.createObjectURL(htmlBlob);
204
+ const htmlLink = document.createElement("a");
205
+ htmlLink.href = htmlUrl;
206
+ htmlLink.download = "favicon-tags.html";
207
+ htmlLink.click();
208
+ URL.revokeObjectURL(htmlUrl);
209
+ assets.forEach((asset, i) => {
210
+ setTimeout(() => downloadSingle(asset), i * 200);
211
+ });
212
+ }, [assets, downloadSingle, getManifestJson, getHtmlTags]);
213
+ return {
214
+ config,
215
+ setConfig,
216
+ assets,
217
+ isGenerating,
218
+ generate,
219
+ downloadAll,
220
+ downloadSingle,
221
+ getManifestJson,
222
+ getHtmlTags
223
+ };
221
224
  }
222
- /* ══════════════════════════════════════════════════════════════════════════════
223
- Component
224
- ══════════════════════════════════════════════════════════════════════════════ */
225
- /**
226
- * Favicon generator component for creating all favicon variants.
227
- */
228
- function NiceFaviconGenerator({ icon, fill = '#1e1e1e', manifestConfig, onGenerate, className = '', }) {
229
- const { t } = uiCore.useNiceTranslation();
230
- const { config, setConfig, assets, isGenerating, generate, downloadAll, downloadSingle, getManifestJson, getHtmlTags, } = useFaviconGenerator(icon, fill, manifestConfig);
231
- const [activeTab, setActiveTab] = React.useState('preview');
232
- const handleGenerate = async () => {
233
- await generate();
234
- if (onGenerate && assets.length > 0) {
235
- onGenerate(assets, getManifestJson());
225
+ function NiceFaviconGenerator({
226
+ icon,
227
+ fill = "#1e1e1e",
228
+ manifestConfig,
229
+ onGenerate,
230
+ className = ""
231
+ }) {
232
+ const { t } = uiCore.useNiceTranslation();
233
+ const {
234
+ config,
235
+ setConfig,
236
+ assets,
237
+ isGenerating,
238
+ generate,
239
+ downloadAll,
240
+ downloadSingle,
241
+ getManifestJson,
242
+ getHtmlTags
243
+ } = useFaviconGenerator(icon, fill, manifestConfig);
244
+ const [activeTab, setActiveTab] = React.useState("preview");
245
+ const handleGenerate = async () => {
246
+ await generate();
247
+ if (onGenerate && assets.length > 0) {
248
+ onGenerate(assets, getManifestJson());
249
+ }
250
+ };
251
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: `nice-favicon-generator ${className}`, style: styles.container, children: [
252
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { style: styles.section, children: [
253
+ /* @__PURE__ */ jsxRuntime.jsx("h3", { style: styles.sectionTitle, children: t("faviconGenerator.manifestConfiguration", "Manifest Configuration") }),
254
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { style: styles.formGrid, children: [
255
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { style: styles.formGroup, children: [
256
+ /* @__PURE__ */ jsxRuntime.jsx("label", { style: styles.label, children: t("faviconGenerator.appName", "App Name") }),
257
+ /* @__PURE__ */ jsxRuntime.jsx(
258
+ "input",
259
+ {
260
+ type: "text",
261
+ value: config.name,
262
+ onChange: (e) => setConfig((c) => ({ ...c, name: e.target.value })),
263
+ style: styles.input
264
+ }
265
+ )
266
+ ] }),
267
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { style: styles.formGroup, children: [
268
+ /* @__PURE__ */ jsxRuntime.jsx("label", { style: styles.label, children: t("faviconGenerator.shortName", "Short Name") }),
269
+ /* @__PURE__ */ jsxRuntime.jsx(
270
+ "input",
271
+ {
272
+ type: "text",
273
+ value: config.shortName,
274
+ onChange: (e) => setConfig((c) => ({ ...c, shortName: e.target.value })),
275
+ style: styles.input
276
+ }
277
+ )
278
+ ] }),
279
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { style: styles.formGroup, children: [
280
+ /* @__PURE__ */ jsxRuntime.jsx("label", { style: styles.label, children: t("faviconGenerator.themeColor", "Theme Color") }),
281
+ /* @__PURE__ */ jsxRuntime.jsx(
282
+ "input",
283
+ {
284
+ type: "color",
285
+ value: config.themeColor,
286
+ onChange: (e) => setConfig((c) => ({ ...c, themeColor: e.target.value })),
287
+ style: styles.colorInput
288
+ }
289
+ )
290
+ ] }),
291
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { style: styles.formGroup, children: [
292
+ /* @__PURE__ */ jsxRuntime.jsx("label", { style: styles.label, children: t("faviconGenerator.backgroundColor", "Background Color") }),
293
+ /* @__PURE__ */ jsxRuntime.jsx(
294
+ "input",
295
+ {
296
+ type: "color",
297
+ value: config.backgroundColor,
298
+ onChange: (e) => setConfig((c) => ({ ...c, backgroundColor: e.target.value })),
299
+ style: styles.colorInput
300
+ }
301
+ )
302
+ ] }),
303
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { style: styles.formGroup, children: [
304
+ /* @__PURE__ */ jsxRuntime.jsx("label", { style: styles.label, children: t("faviconGenerator.displayMode", "Display Mode") }),
305
+ /* @__PURE__ */ jsxRuntime.jsxs(
306
+ "select",
307
+ {
308
+ value: config.display,
309
+ onChange: (e) => setConfig((c) => ({ ...c, display: e.target.value })),
310
+ style: styles.input,
311
+ children: [
312
+ /* @__PURE__ */ jsxRuntime.jsx("option", { value: "standalone", children: t("faviconGenerator.standalone", "Standalone") }),
313
+ /* @__PURE__ */ jsxRuntime.jsx("option", { value: "fullscreen", children: t("faviconGenerator.fullscreen", "Fullscreen") }),
314
+ /* @__PURE__ */ jsxRuntime.jsx("option", { value: "minimal-ui", children: t("faviconGenerator.minimalUi", "Minimal UI") }),
315
+ /* @__PURE__ */ jsxRuntime.jsx("option", { value: "browser", children: t("faviconGenerator.browser", "Browser") })
316
+ ]
317
+ }
318
+ )
319
+ ] }),
320
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { style: styles.formGroup, children: [
321
+ /* @__PURE__ */ jsxRuntime.jsx("label", { style: styles.label, children: t("faviconGenerator.startUrl", "Start URL") }),
322
+ /* @__PURE__ */ jsxRuntime.jsx(
323
+ "input",
324
+ {
325
+ type: "text",
326
+ value: config.startUrl,
327
+ onChange: (e) => setConfig((c) => ({ ...c, startUrl: e.target.value })),
328
+ style: styles.input
329
+ }
330
+ )
331
+ ] })
332
+ ] })
333
+ ] }),
334
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { style: styles.actions, children: [
335
+ /* @__PURE__ */ jsxRuntime.jsx(
336
+ "button",
337
+ {
338
+ onClick: handleGenerate,
339
+ disabled: isGenerating,
340
+ style: {
341
+ ...styles.button,
342
+ ...isGenerating ? styles.buttonDisabled : styles.buttonPrimary
343
+ },
344
+ children: isGenerating ? t("faviconGenerator.generating", "Generating...") : t("faviconGenerator.generateFavicons", "Generate Favicons")
236
345
  }
237
- };
238
- return (jsxRuntime.jsxs("div", { className: `nice-favicon-generator ${className}`, style: styles.container, children: [jsxRuntime.jsxs("div", { style: styles.section, children: [jsxRuntime.jsx("h3", { style: styles.sectionTitle, children: t('faviconGenerator.manifestConfiguration', 'Manifest Configuration') }), jsxRuntime.jsxs("div", { style: styles.formGrid, children: [jsxRuntime.jsxs("div", { style: styles.formGroup, children: [jsxRuntime.jsx("label", { style: styles.label, children: t('faviconGenerator.appName', 'App Name') }), jsxRuntime.jsx("input", { type: "text", value: config.name, onChange: (e) => setConfig((c) => ({ ...c, name: e.target.value })), style: styles.input })] }), jsxRuntime.jsxs("div", { style: styles.formGroup, children: [jsxRuntime.jsx("label", { style: styles.label, children: t('faviconGenerator.shortName', 'Short Name') }), jsxRuntime.jsx("input", { type: "text", value: config.shortName, onChange: (e) => setConfig((c) => ({ ...c, shortName: e.target.value })), style: styles.input })] }), jsxRuntime.jsxs("div", { style: styles.formGroup, children: [jsxRuntime.jsx("label", { style: styles.label, children: t('faviconGenerator.themeColor', 'Theme Color') }), jsxRuntime.jsx("input", { type: "color", value: config.themeColor, onChange: (e) => setConfig((c) => ({ ...c, themeColor: e.target.value })), style: styles.colorInput })] }), jsxRuntime.jsxs("div", { style: styles.formGroup, children: [jsxRuntime.jsx("label", { style: styles.label, children: t('faviconGenerator.backgroundColor', 'Background Color') }), jsxRuntime.jsx("input", { type: "color", value: config.backgroundColor, onChange: (e) => setConfig((c) => ({ ...c, backgroundColor: e.target.value })), style: styles.colorInput })] }), jsxRuntime.jsxs("div", { style: styles.formGroup, children: [jsxRuntime.jsx("label", { style: styles.label, children: t('faviconGenerator.displayMode', 'Display Mode') }), jsxRuntime.jsxs("select", { value: config.display, onChange: (e) => setConfig((c) => ({ ...c, display: e.target.value })), style: styles.input, children: [jsxRuntime.jsx("option", { value: "standalone", children: t('faviconGenerator.standalone', 'Standalone') }), jsxRuntime.jsx("option", { value: "fullscreen", children: t('faviconGenerator.fullscreen', 'Fullscreen') }), jsxRuntime.jsx("option", { value: "minimal-ui", children: t('faviconGenerator.minimalUi', 'Minimal UI') }), jsxRuntime.jsx("option", { value: "browser", children: t('faviconGenerator.browser', 'Browser') })] })] }), jsxRuntime.jsxs("div", { style: styles.formGroup, children: [jsxRuntime.jsx("label", { style: styles.label, children: t('faviconGenerator.startUrl', 'Start URL') }), jsxRuntime.jsx("input", { type: "text", value: config.startUrl, onChange: (e) => setConfig((c) => ({ ...c, startUrl: e.target.value })), style: styles.input })] })] })] }), jsxRuntime.jsxs("div", { style: styles.actions, children: [jsxRuntime.jsx("button", { onClick: handleGenerate, disabled: isGenerating, style: {
239
- ...styles.button,
240
- ...(isGenerating ? styles.buttonDisabled : styles.buttonPrimary),
241
- }, children: isGenerating
242
- ? t('faviconGenerator.generating', 'Generating...')
243
- : t('faviconGenerator.generateFavicons', 'Generate Favicons') }), assets.length > 0 && (jsxRuntime.jsx("button", { onClick: downloadAll, style: { ...styles.button, ...styles.buttonSecondary }, children: t('faviconGenerator.downloadAll', 'Download All') }))] }), assets.length > 0 && (jsxRuntime.jsxs("div", { style: styles.section, children: [jsxRuntime.jsxs("div", { style: styles.tabs, children: [jsxRuntime.jsx("button", { style: { ...styles.tab, ...(activeTab === 'preview' ? styles.tabActive : {}) }, onClick: () => setActiveTab('preview'), children: t('faviconGenerator.preview', 'Preview') }), jsxRuntime.jsx("button", { style: { ...styles.tab, ...(activeTab === 'manifest' ? styles.tabActive : {}) }, onClick: () => setActiveTab('manifest'), children: "manifest.json" }), jsxRuntime.jsx("button", { style: { ...styles.tab, ...(activeTab === 'html' ? styles.tabActive : {}) }, onClick: () => setActiveTab('html'), children: t('faviconGenerator.htmlTags', 'HTML Tags') })] }), activeTab === 'preview' && (jsxRuntime.jsx("div", { style: styles.assetGrid, children: assets.map((asset) => (jsxRuntime.jsxs("div", { style: styles.assetCard, children: [jsxRuntime.jsx("div", { style: styles.assetPreview, children: jsxRuntime.jsx("img", { src: asset.dataUrl, alt: asset.filename, style: { maxWidth: '64px', maxHeight: '64px' } }) }), jsxRuntime.jsxs("div", { style: styles.assetInfo, children: [jsxRuntime.jsx("span", { style: styles.assetName, children: asset.filename }), jsxRuntime.jsxs("span", { style: styles.assetSize, children: [asset.size, "x", asset.size] }), jsxRuntime.jsx("span", { style: styles.assetPurpose, children: asset.purpose })] }), jsxRuntime.jsx("button", { onClick: () => downloadSingle(asset), style: styles.downloadBtn, "aria-label": t('faviconGenerator.download', 'Download {filename}').replace('{filename}', String(asset.filename)), children: jsxRuntime.jsx(actions.NtdDownload, { size: 14, variant: "outline" }) })] }, asset.filename))) })), activeTab === 'manifest' && jsxRuntime.jsx("pre", { style: styles.codeBlock, children: getManifestJson() }), activeTab === 'html' && jsxRuntime.jsx("pre", { style: styles.codeBlock, children: getHtmlTags() })] })), jsxRuntime.jsxs("div", { style: styles.reference, children: [jsxRuntime.jsx("h4", { style: styles.referenceTitle, children: t('faviconGenerator.faviconSizesReference', 'Favicon Sizes Reference') }), jsxRuntime.jsxs("table", { style: styles.table, children: [jsxRuntime.jsx("thead", { children: jsxRuntime.jsxs("tr", { children: [jsxRuntime.jsx("th", { style: styles.th, children: t('faviconGenerator.file', 'File') }), jsxRuntime.jsx("th", { style: styles.th, children: t('faviconGenerator.size', 'Size') }), jsxRuntime.jsx("th", { style: styles.th, children: t('faviconGenerator.purpose', 'Purpose') })] }) }), jsxRuntime.jsx("tbody", { children: FAVICON_SIZES.map((f) => (jsxRuntime.jsxs("tr", { children: [jsxRuntime.jsxs("td", { style: styles.td, children: [f.name, ".", f.format] }), jsxRuntime.jsxs("td", { style: styles.td, children: [f.size, "x", f.size] }), jsxRuntime.jsx("td", { style: styles.td, children: f.purpose })] }, f.name))) })] })] })] }));
346
+ ),
347
+ assets.length > 0 && /* @__PURE__ */ jsxRuntime.jsx("button", { onClick: downloadAll, style: { ...styles.button, ...styles.buttonSecondary }, children: t("faviconGenerator.downloadAll", "Download All") })
348
+ ] }),
349
+ assets.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs("div", { style: styles.section, children: [
350
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { style: styles.tabs, children: [
351
+ /* @__PURE__ */ jsxRuntime.jsx(
352
+ "button",
353
+ {
354
+ style: { ...styles.tab, ...activeTab === "preview" ? styles.tabActive : {} },
355
+ onClick: () => setActiveTab("preview"),
356
+ children: t("faviconGenerator.preview", "Preview")
357
+ }
358
+ ),
359
+ /* @__PURE__ */ jsxRuntime.jsx(
360
+ "button",
361
+ {
362
+ style: { ...styles.tab, ...activeTab === "manifest" ? styles.tabActive : {} },
363
+ onClick: () => setActiveTab("manifest"),
364
+ children: "manifest.json"
365
+ }
366
+ ),
367
+ /* @__PURE__ */ jsxRuntime.jsx(
368
+ "button",
369
+ {
370
+ style: { ...styles.tab, ...activeTab === "html" ? styles.tabActive : {} },
371
+ onClick: () => setActiveTab("html"),
372
+ children: t("faviconGenerator.htmlTags", "HTML Tags")
373
+ }
374
+ )
375
+ ] }),
376
+ activeTab === "preview" && /* @__PURE__ */ jsxRuntime.jsx("div", { style: styles.assetGrid, children: assets.map((asset) => /* @__PURE__ */ jsxRuntime.jsxs("div", { style: styles.assetCard, children: [
377
+ /* @__PURE__ */ jsxRuntime.jsx("div", { style: styles.assetPreview, children: /* @__PURE__ */ jsxRuntime.jsx(
378
+ "img",
379
+ {
380
+ src: asset.dataUrl,
381
+ alt: asset.filename,
382
+ style: { maxWidth: "64px", maxHeight: "64px" }
383
+ }
384
+ ) }),
385
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { style: styles.assetInfo, children: [
386
+ /* @__PURE__ */ jsxRuntime.jsx("span", { style: styles.assetName, children: asset.filename }),
387
+ /* @__PURE__ */ jsxRuntime.jsxs("span", { style: styles.assetSize, children: [
388
+ asset.size,
389
+ "x",
390
+ asset.size
391
+ ] }),
392
+ /* @__PURE__ */ jsxRuntime.jsx("span", { style: styles.assetPurpose, children: asset.purpose })
393
+ ] }),
394
+ /* @__PURE__ */ jsxRuntime.jsx(
395
+ "button",
396
+ {
397
+ onClick: () => downloadSingle(asset),
398
+ style: styles.downloadBtn,
399
+ "aria-label": t("faviconGenerator.download", "Download {filename}").replace(
400
+ "{filename}",
401
+ String(asset.filename)
402
+ ),
403
+ children: /* @__PURE__ */ jsxRuntime.jsx(actions.NtdDownload, { size: 14, variant: "outline" })
404
+ }
405
+ )
406
+ ] }, asset.filename)) }),
407
+ activeTab === "manifest" && /* @__PURE__ */ jsxRuntime.jsx("pre", { style: styles.codeBlock, children: getManifestJson() }),
408
+ activeTab === "html" && /* @__PURE__ */ jsxRuntime.jsx("pre", { style: styles.codeBlock, children: getHtmlTags() })
409
+ ] }),
410
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { style: styles.reference, children: [
411
+ /* @__PURE__ */ jsxRuntime.jsx("h4", { style: styles.referenceTitle, children: t("faviconGenerator.faviconSizesReference", "Favicon Sizes Reference") }),
412
+ /* @__PURE__ */ jsxRuntime.jsxs("table", { style: styles.table, children: [
413
+ /* @__PURE__ */ jsxRuntime.jsx("thead", { children: /* @__PURE__ */ jsxRuntime.jsxs("tr", { children: [
414
+ /* @__PURE__ */ jsxRuntime.jsx("th", { style: styles.th, children: t("faviconGenerator.file", "File") }),
415
+ /* @__PURE__ */ jsxRuntime.jsx("th", { style: styles.th, children: t("faviconGenerator.size", "Size") }),
416
+ /* @__PURE__ */ jsxRuntime.jsx("th", { style: styles.th, children: t("faviconGenerator.purpose", "Purpose") })
417
+ ] }) }),
418
+ /* @__PURE__ */ jsxRuntime.jsx("tbody", { children: FAVICON_SIZES.map((f) => /* @__PURE__ */ jsxRuntime.jsxs("tr", { children: [
419
+ /* @__PURE__ */ jsxRuntime.jsxs("td", { style: styles.td, children: [
420
+ f.name,
421
+ ".",
422
+ f.format
423
+ ] }),
424
+ /* @__PURE__ */ jsxRuntime.jsxs("td", { style: styles.td, children: [
425
+ f.size,
426
+ "x",
427
+ f.size
428
+ ] }),
429
+ /* @__PURE__ */ jsxRuntime.jsx("td", { style: styles.td, children: f.purpose })
430
+ ] }, f.name)) })
431
+ ] })
432
+ ] })
433
+ ] });
244
434
  }
245
- /* ══════════════════════════════════════════════════════════════════════════════
246
- Styles
247
- ══════════════════════════════════════════════════════════════════════════════ */
248
435
  const styles = {
249
- container: {
250
- fontFamily: 'system-ui, -apple-system, sans-serif',
251
- fontSize: '14px',
252
- border: '1px solid #e5e7eb',
253
- borderRadius: '8px',
254
- overflow: 'hidden',
255
- padding: '16px',
256
- },
257
- section: {
258
- marginBottom: '20px',
259
- },
260
- sectionTitle: {
261
- margin: '0 0 12px 0',
262
- fontSize: '15px',
263
- fontWeight: 600,
264
- },
265
- formGrid: {
266
- display: 'grid',
267
- gridTemplateColumns: 'repeat(auto-fill, minmax(200px, 1fr))',
268
- gap: '12px',
269
- },
270
- formGroup: {
271
- display: 'flex',
272
- flexDirection: 'column',
273
- gap: '4px',
274
- },
275
- label: {
276
- fontSize: '12px',
277
- fontWeight: 500,
278
- color: '#6b7280',
279
- },
280
- input: {
281
- padding: '8px 12px',
282
- border: '1px solid #d1d5db',
283
- borderRadius: '6px',
284
- fontSize: '14px',
285
- },
286
- colorInput: {
287
- width: '100%',
288
- height: '36px',
289
- padding: '2px',
290
- border: '1px solid #d1d5db',
291
- borderRadius: '6px',
292
- cursor: 'pointer',
293
- },
294
- actions: {
295
- display: 'flex',
296
- gap: '12px',
297
- marginBottom: '20px',
298
- },
299
- button: {
300
- padding: '10px 20px',
301
- border: 'none',
302
- borderRadius: '6px',
303
- fontSize: '14px',
304
- fontWeight: 500,
305
- cursor: 'pointer',
306
- transition: 'all 0.2s',
307
- },
308
- buttonPrimary: {
309
- backgroundColor: '#3b82f6',
310
- color: 'white',
311
- },
312
- buttonSecondary: {
313
- backgroundColor: '#f3f4f6',
314
- color: '#374151',
315
- border: '1px solid #d1d5db',
316
- },
317
- buttonDisabled: {
318
- backgroundColor: '#e5e7eb',
319
- color: '#9ca3af',
320
- cursor: 'not-allowed',
321
- },
322
- tabs: {
323
- display: 'flex',
324
- borderBottom: '1px solid #e5e7eb',
325
- marginBottom: '16px',
326
- },
327
- tab: {
328
- padding: '8px 16px',
329
- border: 'none',
330
- background: 'none',
331
- cursor: 'pointer',
332
- fontSize: '13px',
333
- color: '#6b7280',
334
- },
335
- tabActive: {
336
- color: '#3b82f6',
337
- borderBottom: '2px solid #3b82f6',
338
- marginBottom: '-1px',
339
- },
340
- assetGrid: {
341
- display: 'grid',
342
- gridTemplateColumns: 'repeat(auto-fill, minmax(250px, 1fr))',
343
- gap: '12px',
344
- },
345
- assetCard: {
346
- display: 'flex',
347
- alignItems: 'center',
348
- gap: '12px',
349
- padding: '12px',
350
- border: '1px solid #e5e7eb',
351
- borderRadius: '8px',
352
- backgroundColor: '#fafafa',
353
- },
354
- assetPreview: {
355
- width: '64px',
356
- height: '64px',
357
- display: 'flex',
358
- alignItems: 'center',
359
- justifyContent: 'center',
360
- backgroundColor: 'white',
361
- borderRadius: '4px',
362
- border: '1px solid #e5e7eb',
363
- },
364
- assetInfo: {
365
- flex: 1,
366
- display: 'flex',
367
- flexDirection: 'column',
368
- gap: '2px',
369
- },
370
- assetName: {
371
- fontSize: '13px',
372
- fontWeight: 500,
373
- },
374
- assetSize: {
375
- fontSize: '11px',
376
- color: '#6b7280',
377
- },
378
- assetPurpose: {
379
- fontSize: '11px',
380
- color: '#9ca3af',
381
- },
382
- downloadBtn: {
383
- width: '32px',
384
- height: '32px',
385
- border: '1px solid #d1d5db',
386
- borderRadius: '6px',
387
- backgroundColor: 'white',
388
- cursor: 'pointer',
389
- fontSize: '16px',
390
- },
391
- codeBlock: {
392
- padding: '16px',
393
- backgroundColor: '#1e1e1e',
394
- color: '#d4d4d4',
395
- borderRadius: '8px',
396
- fontSize: '12px',
397
- fontFamily: 'monospace',
398
- overflow: 'auto',
399
- whiteSpace: 'pre-wrap',
400
- },
401
- reference: {
402
- marginTop: '20px',
403
- padding: '16px',
404
- backgroundColor: '#f9fafb',
405
- borderRadius: '8px',
406
- },
407
- referenceTitle: {
408
- margin: '0 0 12px 0',
409
- fontSize: '13px',
410
- fontWeight: 600,
411
- color: '#6b7280',
412
- },
413
- table: {
414
- width: '100%',
415
- borderCollapse: 'collapse',
416
- fontSize: '12px',
417
- },
418
- th: {
419
- textAlign: 'left',
420
- padding: '8px',
421
- borderBottom: '1px solid #e5e7eb',
422
- fontWeight: 600,
423
- color: '#374151',
424
- },
425
- td: {
426
- padding: '8px',
427
- borderBottom: '1px solid #f3f4f6',
428
- color: '#6b7280',
429
- },
436
+ container: {
437
+ fontFamily: "system-ui, -apple-system, sans-serif",
438
+ fontSize: "14px",
439
+ border: "1px solid #e5e7eb",
440
+ borderRadius: "8px",
441
+ overflow: "hidden",
442
+ padding: "16px"
443
+ },
444
+ section: {
445
+ marginBottom: "20px"
446
+ },
447
+ sectionTitle: {
448
+ margin: "0 0 12px 0",
449
+ fontSize: "15px",
450
+ fontWeight: 600
451
+ },
452
+ formGrid: {
453
+ display: "grid",
454
+ gridTemplateColumns: "repeat(auto-fill, minmax(200px, 1fr))",
455
+ gap: "12px"
456
+ },
457
+ formGroup: {
458
+ display: "flex",
459
+ flexDirection: "column",
460
+ gap: "4px"
461
+ },
462
+ label: {
463
+ fontSize: "12px",
464
+ fontWeight: 500,
465
+ color: "#6b7280"
466
+ },
467
+ input: {
468
+ padding: "8px 12px",
469
+ border: "1px solid #d1d5db",
470
+ borderRadius: "6px",
471
+ fontSize: "14px"
472
+ },
473
+ colorInput: {
474
+ width: "100%",
475
+ height: "36px",
476
+ padding: "2px",
477
+ border: "1px solid #d1d5db",
478
+ borderRadius: "6px",
479
+ cursor: "pointer"
480
+ },
481
+ actions: {
482
+ display: "flex",
483
+ gap: "12px",
484
+ marginBottom: "20px"
485
+ },
486
+ button: {
487
+ padding: "10px 20px",
488
+ border: "none",
489
+ borderRadius: "6px",
490
+ fontSize: "14px",
491
+ fontWeight: 500,
492
+ cursor: "pointer",
493
+ transition: "all 0.2s"
494
+ },
495
+ buttonPrimary: {
496
+ backgroundColor: "#3b82f6",
497
+ color: "white"
498
+ },
499
+ buttonSecondary: {
500
+ backgroundColor: "#f3f4f6",
501
+ color: "#374151",
502
+ border: "1px solid #d1d5db"
503
+ },
504
+ buttonDisabled: {
505
+ backgroundColor: "#e5e7eb",
506
+ color: "#9ca3af",
507
+ cursor: "not-allowed"
508
+ },
509
+ tabs: {
510
+ display: "flex",
511
+ borderBottom: "1px solid #e5e7eb",
512
+ marginBottom: "16px"
513
+ },
514
+ tab: {
515
+ padding: "8px 16px",
516
+ border: "none",
517
+ background: "none",
518
+ cursor: "pointer",
519
+ fontSize: "13px",
520
+ color: "#6b7280"
521
+ },
522
+ tabActive: {
523
+ color: "#3b82f6",
524
+ borderBottom: "2px solid #3b82f6",
525
+ marginBottom: "-1px"
526
+ },
527
+ assetGrid: {
528
+ display: "grid",
529
+ gridTemplateColumns: "repeat(auto-fill, minmax(250px, 1fr))",
530
+ gap: "12px"
531
+ },
532
+ assetCard: {
533
+ display: "flex",
534
+ alignItems: "center",
535
+ gap: "12px",
536
+ padding: "12px",
537
+ border: "1px solid #e5e7eb",
538
+ borderRadius: "8px",
539
+ backgroundColor: "#fafafa"
540
+ },
541
+ assetPreview: {
542
+ width: "64px",
543
+ height: "64px",
544
+ display: "flex",
545
+ alignItems: "center",
546
+ justifyContent: "center",
547
+ backgroundColor: "white",
548
+ borderRadius: "4px",
549
+ border: "1px solid #e5e7eb"
550
+ },
551
+ assetInfo: {
552
+ flex: 1,
553
+ display: "flex",
554
+ flexDirection: "column",
555
+ gap: "2px"
556
+ },
557
+ assetName: {
558
+ fontSize: "13px",
559
+ fontWeight: 500
560
+ },
561
+ assetSize: {
562
+ fontSize: "11px",
563
+ color: "#6b7280"
564
+ },
565
+ assetPurpose: {
566
+ fontSize: "11px",
567
+ color: "#9ca3af"
568
+ },
569
+ downloadBtn: {
570
+ width: "32px",
571
+ height: "32px",
572
+ border: "1px solid #d1d5db",
573
+ borderRadius: "6px",
574
+ backgroundColor: "white",
575
+ cursor: "pointer",
576
+ fontSize: "16px"
577
+ },
578
+ codeBlock: {
579
+ padding: "16px",
580
+ backgroundColor: "#1e1e1e",
581
+ color: "#d4d4d4",
582
+ borderRadius: "8px",
583
+ fontSize: "12px",
584
+ fontFamily: "monospace",
585
+ overflow: "auto",
586
+ whiteSpace: "pre-wrap"
587
+ },
588
+ reference: {
589
+ marginTop: "20px",
590
+ padding: "16px",
591
+ backgroundColor: "#f9fafb",
592
+ borderRadius: "8px"
593
+ },
594
+ referenceTitle: {
595
+ margin: "0 0 12px 0",
596
+ fontSize: "13px",
597
+ fontWeight: 600,
598
+ color: "#6b7280"
599
+ },
600
+ table: {
601
+ width: "100%",
602
+ borderCollapse: "collapse",
603
+ fontSize: "12px"
604
+ },
605
+ th: {
606
+ textAlign: "left",
607
+ padding: "8px",
608
+ borderBottom: "1px solid #e5e7eb",
609
+ fontWeight: 600,
610
+ color: "#374151"
611
+ },
612
+ td: {
613
+ padding: "8px",
614
+ borderBottom: "1px solid #f3f4f6",
615
+ color: "#6b7280"
616
+ }
430
617
  };
431
-
432
618
  exports.NiceFaviconGenerator = NiceFaviconGenerator;
433
619
  exports.useFaviconGenerator = useFaviconGenerator;