@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.
- package/CHANGELOG.md +15 -0
- package/dist/cjs/NiceDesktopIconExporter.js +688 -599
- package/dist/cjs/NiceFaviconGenerator.js +603 -417
- package/dist/cjs/NiceIconPicker.js +788 -508
- package/dist/cjs/NiceIconPreview.js +246 -188
- package/dist/cjs/NiceIconSetCreator.js +683 -552
- package/dist/cjs/NiceIconStacker.js +547 -171
- package/dist/cjs/NiceIconValue.js +27 -35
- package/dist/cjs/NtdIconBadge.js +384 -360
- package/dist/cjs/NtdIconMorph.js +419 -354
- package/dist/cjs/NtdStateMorph.js +150 -147
- package/dist/cjs/advancedIconSearch.js +373 -510
- package/dist/cjs/animationControls.js +518 -642
- package/dist/cjs/client.js +12 -15
- package/dist/cjs/createIcon.js +349 -251
- package/dist/cjs/design-tokens.js +324 -390
- package/dist/cjs/figmaExport.js +162 -257
- package/dist/cjs/figmaSync.js +234 -316
- package/dist/cjs/headless-ui.js +240 -368
- package/dist/cjs/iconAnalytics.js +337 -393
- package/dist/cjs/iconHtml.js +64 -86
- package/dist/cjs/iconMetadata.js +392 -472
- package/dist/cjs/iconParts.js +120 -90
- package/dist/cjs/iconStack.js +136 -155
- package/dist/cjs/iconStyles.js +1609 -504
- package/dist/cjs/iconValue.js +359 -430
- package/dist/cjs/icons/accessibility.js +1119 -134
- package/dist/cjs/icons/actions.js +1290 -330
- package/dist/cjs/icons/ai.js +1424 -144
- package/dist/cjs/icons/brand.js +1344 -172
- package/dist/cjs/icons/business.js +903 -193
- package/dist/cjs/icons/devtech.js +1656 -227
- package/dist/cjs/icons/ecommerce.js +802 -111
- package/dist/cjs/icons/education.js +1345 -199
- package/dist/cjs/icons/files.js +1597 -328
- package/dist/cjs/icons/fintech.js +793 -104
- package/dist/cjs/icons/food.js +1507 -153
- package/dist/cjs/icons/fun.js +786 -109
- package/dist/cjs/icons/gaming.js +916 -170
- package/dist/cjs/icons/health.js +623 -112
- package/dist/cjs/icons/index.js +34 -35
- package/dist/cjs/icons/input.js +282 -83
- package/dist/cjs/icons/legal.js +1065 -122
- package/dist/cjs/icons/media.js +1061 -267
- package/dist/cjs/icons/navigation.js +387 -122
- package/dist/cjs/icons/omniverk.js +747 -90
- package/dist/cjs/icons/realestate.js +1520 -193
- package/dist/cjs/icons/saas.js +867 -98
- package/dist/cjs/icons/science.js +1465 -165
- package/dist/cjs/icons/shapes.js +1316 -308
- package/dist/cjs/icons/smarthome.js +786 -90
- package/dist/cjs/icons/social.js +591 -59
- package/dist/cjs/icons/sports.js +1225 -133
- package/dist/cjs/icons/sustainability.js +1211 -139
- package/dist/cjs/icons/travel.js +1470 -148
- package/dist/cjs/icons/ui.js +1508 -315
- package/dist/cjs/icons/weather.js +1160 -173
- package/dist/cjs/index.js +566 -566
- package/dist/cjs/lottieIntegration.js +261 -266
- package/dist/cjs/nicetodev-icons.css +1 -1
- package/dist/cjs/particleEffects.js +270 -251
- package/dist/cjs/resolver.js +229 -284
- package/dist/cjs/rsc.js +175 -193
- package/dist/cjs/sharpen.js +73 -130
- package/dist/cjs/smilAnimations.js +371 -165
- package/dist/cjs/stacking.js +87 -122
- package/dist/cjs/tailwind-plugin.js +280 -320
- package/dist/cjs/types.js +46 -72
- package/dist/cjs/utilities.js +163 -324
- package/dist/cjs/variantProps.js +12 -52
- package/dist/esm/NiceDesktopIconExporter.js +671 -598
- package/dist/esm/NiceFaviconGenerator.js +583 -416
- package/dist/esm/NiceIconPicker.js +789 -507
- package/dist/esm/NiceIconPreview.js +247 -187
- package/dist/esm/NiceIconSetCreator.js +685 -551
- package/dist/esm/NiceIconStacker.js +549 -170
- package/dist/esm/NiceIconValue.js +29 -34
- package/dist/esm/NtdIconBadge.js +388 -359
- package/dist/esm/NtdIconMorph.js +423 -353
- package/dist/esm/NtdStateMorph.js +152 -146
- package/dist/esm/advancedIconSearch.js +391 -509
- package/dist/esm/animationControls.js +527 -641
- package/dist/esm/client.js +48 -10
- package/dist/esm/createIcon.js +350 -250
- package/dist/esm/design-tokens.js +334 -387
- package/dist/esm/figmaExport.js +170 -256
- package/dist/esm/figmaSync.js +237 -315
- package/dist/esm/headless-ui.js +254 -365
- package/dist/esm/iconAnalytics.js +342 -392
- package/dist/esm/iconHtml.js +67 -85
- package/dist/esm/iconMetadata.js +404 -471
- package/dist/esm/iconParts.js +125 -89
- package/dist/esm/iconStack.js +145 -154
- package/dist/esm/iconStyles.js +1620 -503
- package/dist/esm/iconValue.js +361 -429
- package/dist/esm/icons/accessibility.js +1133 -133
- package/dist/esm/icons/actions.js +1320 -329
- package/dist/esm/icons/ai.js +1441 -143
- package/dist/esm/icons/brand.js +1351 -171
- package/dist/esm/icons/business.js +931 -201
- package/dist/esm/icons/devtech.js +1687 -226
- package/dist/esm/icons/ecommerce.js +816 -110
- package/dist/esm/icons/education.js +1364 -198
- package/dist/esm/icons/files.js +1628 -327
- package/dist/esm/icons/fintech.js +807 -103
- package/dist/esm/icons/food.js +1524 -152
- package/dist/esm/icons/fun.js +801 -108
- package/dist/esm/icons/gaming.js +933 -169
- package/dist/esm/icons/health.js +636 -111
- package/dist/esm/icons/index.js +596 -32
- package/dist/esm/icons/input.js +326 -82
- package/dist/esm/icons/legal.js +1079 -121
- package/dist/esm/icons/media.js +1086 -266
- package/dist/esm/icons/navigation.js +401 -121
- package/dist/esm/icons/omniverk.js +759 -89
- package/dist/esm/icons/realestate.js +1544 -198
- package/dist/esm/icons/saas.js +880 -97
- package/dist/esm/icons/science.js +1482 -164
- package/dist/esm/icons/shapes.js +1343 -307
- package/dist/esm/icons/smarthome.js +799 -89
- package/dist/esm/icons/social.js +599 -58
- package/dist/esm/icons/sports.js +1240 -132
- package/dist/esm/icons/sustainability.js +1226 -138
- package/dist/esm/icons/travel.js +1486 -147
- package/dist/esm/icons/ui.js +1540 -314
- package/dist/esm/icons/weather.js +1181 -172
- package/dist/esm/index.js +756 -58
- package/dist/esm/lottieIntegration.js +264 -265
- package/dist/esm/nicetodev-icons.css +1 -1
- package/dist/esm/particleEffects.js +271 -250
- package/dist/esm/resolver.js +231 -283
- package/dist/esm/rsc.js +182 -192
- package/dist/esm/sharpen.js +78 -129
- package/dist/esm/smilAnimations.js +376 -164
- package/dist/esm/stacking.js +99 -121
- package/dist/esm/tailwind-plugin.js +282 -319
- package/dist/esm/types.js +50 -71
- package/dist/esm/utilities.js +177 -321
- package/dist/esm/variantProps.js +23 -52
- package/dist/types/icons/index.d.ts +1 -1
- package/dist/types/icons/science.d.ts +9 -0
- package/package.json +15 -22
|
@@ -1,433 +1,619 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
var
|
|
4
|
-
var
|
|
5
|
-
var
|
|
6
|
-
var
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
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
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
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
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
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 =
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
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
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
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
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
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
|
-
|
|
123
|
-
|
|
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
|
-
|
|
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
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
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
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
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
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
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;
|