@nice2dev/icons-science 1.0.10
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/README.md +195 -0
- package/dist/astronomy-BMSJypTh.mjs +119 -0
- package/dist/astronomy-BMSJypTh.mjs.map +1 -0
- package/dist/astronomy-D58mLl6D.js +118 -0
- package/dist/astronomy-D58mLl6D.js.map +1 -0
- package/dist/astronomy.cjs +21 -0
- package/dist/astronomy.cjs.map +1 -0
- package/dist/astronomy.d.ts +36 -0
- package/dist/astronomy.d.ts.map +1 -0
- package/dist/astronomy.mjs +21 -0
- package/dist/astronomy.mjs.map +1 -0
- package/dist/biology-JdWVaACU.mjs +114 -0
- package/dist/biology-JdWVaACU.mjs.map +1 -0
- package/dist/biology-a0UpidDX.js +113 -0
- package/dist/biology-a0UpidDX.js.map +1 -0
- package/dist/biology.cjs +21 -0
- package/dist/biology.cjs.map +1 -0
- package/dist/biology.d.ts +36 -0
- package/dist/biology.d.ts.map +1 -0
- package/dist/biology.mjs +21 -0
- package/dist/biology.mjs.map +1 -0
- package/dist/chemistry-DP_rXyz8.js +113 -0
- package/dist/chemistry-DP_rXyz8.js.map +1 -0
- package/dist/chemistry-DVdMsLTf.mjs +114 -0
- package/dist/chemistry-DVdMsLTf.mjs.map +1 -0
- package/dist/chemistry.cjs +21 -0
- package/dist/chemistry.cjs.map +1 -0
- package/dist/chemistry.d.ts +36 -0
- package/dist/chemistry.d.ts.map +1 -0
- package/dist/chemistry.mjs +21 -0
- package/dist/chemistry.mjs.map +1 -0
- package/dist/createScienceIcon-Bcme4rfw.mjs +196 -0
- package/dist/createScienceIcon-Bcme4rfw.mjs.map +1 -0
- package/dist/createScienceIcon-wxU6ZWtM.js +195 -0
- package/dist/createScienceIcon-wxU6ZWtM.js.map +1 -0
- package/dist/createScienceIcon.d.ts +11 -0
- package/dist/createScienceIcon.d.ts.map +1 -0
- package/dist/index.cjs +113 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.ts +118 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.mjs +118 -0
- package/dist/index.mjs.map +1 -0
- package/dist/lab-CmV8bVAs.mjs +117 -0
- package/dist/lab-CmV8bVAs.mjs.map +1 -0
- package/dist/lab-DbkQ_T25.js +116 -0
- package/dist/lab-DbkQ_T25.js.map +1 -0
- package/dist/lab.cjs +21 -0
- package/dist/lab.cjs.map +1 -0
- package/dist/lab.d.ts +36 -0
- package/dist/lab.d.ts.map +1 -0
- package/dist/lab.mjs +21 -0
- package/dist/lab.mjs.map +1 -0
- package/dist/physics-Ba21OU_7.mjs +99 -0
- package/dist/physics-Ba21OU_7.mjs.map +1 -0
- package/dist/physics-DDvFIOmh.js +98 -0
- package/dist/physics-DDvFIOmh.js.map +1 -0
- package/dist/physics.cjs +21 -0
- package/dist/physics.cjs.map +1 -0
- package/dist/physics.d.ts +36 -0
- package/dist/physics.d.ts.map +1 -0
- package/dist/physics.mjs +21 -0
- package/dist/physics.mjs.map +1 -0
- package/dist/types.d.ts +59 -0
- package/dist/types.d.ts.map +1 -0
- package/package.json +82 -0
|
@@ -0,0 +1,196 @@
|
|
|
1
|
+
import { jsx, jsxs, Fragment } from "react/jsx-runtime";
|
|
2
|
+
function getScienceAnimation(animation, duration = 1e3) {
|
|
3
|
+
if (!animation) {
|
|
4
|
+
return null;
|
|
5
|
+
}
|
|
6
|
+
const durationSec = duration / 1e3;
|
|
7
|
+
switch (animation) {
|
|
8
|
+
case "pulse":
|
|
9
|
+
return /* @__PURE__ */ jsx(
|
|
10
|
+
"animate",
|
|
11
|
+
{
|
|
12
|
+
attributeName: "opacity",
|
|
13
|
+
values: "1;0.5;1",
|
|
14
|
+
dur: `${durationSec}s`,
|
|
15
|
+
repeatCount: "indefinite"
|
|
16
|
+
}
|
|
17
|
+
);
|
|
18
|
+
case "grow":
|
|
19
|
+
return /* @__PURE__ */ jsx(
|
|
20
|
+
"animateTransform",
|
|
21
|
+
{
|
|
22
|
+
attributeName: "transform",
|
|
23
|
+
type: "scale",
|
|
24
|
+
values: "1;1.2;1",
|
|
25
|
+
dur: `${durationSec}s`,
|
|
26
|
+
repeatCount: "indefinite"
|
|
27
|
+
}
|
|
28
|
+
);
|
|
29
|
+
case "shake":
|
|
30
|
+
return /* @__PURE__ */ jsx(
|
|
31
|
+
"animateTransform",
|
|
32
|
+
{
|
|
33
|
+
attributeName: "transform",
|
|
34
|
+
type: "translate",
|
|
35
|
+
values: "0,0;-2,0;2,0;0,0",
|
|
36
|
+
dur: `${durationSec * 0.5}s`,
|
|
37
|
+
repeatCount: "indefinite"
|
|
38
|
+
}
|
|
39
|
+
);
|
|
40
|
+
case "spin":
|
|
41
|
+
return /* @__PURE__ */ jsx(
|
|
42
|
+
"animateTransform",
|
|
43
|
+
{
|
|
44
|
+
attributeName: "transform",
|
|
45
|
+
type: "rotate",
|
|
46
|
+
from: "0 12 12",
|
|
47
|
+
to: "360 12 12",
|
|
48
|
+
dur: `${durationSec}s`,
|
|
49
|
+
repeatCount: "indefinite"
|
|
50
|
+
}
|
|
51
|
+
);
|
|
52
|
+
case "bounce":
|
|
53
|
+
return /* @__PURE__ */ jsx(
|
|
54
|
+
"animateTransform",
|
|
55
|
+
{
|
|
56
|
+
attributeName: "transform",
|
|
57
|
+
type: "translate",
|
|
58
|
+
values: "0,0;0,-3;0,0",
|
|
59
|
+
dur: `${durationSec * 0.5}s`,
|
|
60
|
+
repeatCount: "indefinite"
|
|
61
|
+
}
|
|
62
|
+
);
|
|
63
|
+
case "fade":
|
|
64
|
+
return /* @__PURE__ */ jsx(
|
|
65
|
+
"animate",
|
|
66
|
+
{
|
|
67
|
+
attributeName: "opacity",
|
|
68
|
+
values: "1;0;1",
|
|
69
|
+
dur: `${durationSec * 2}s`,
|
|
70
|
+
repeatCount: "indefinite"
|
|
71
|
+
}
|
|
72
|
+
);
|
|
73
|
+
case "flip":
|
|
74
|
+
return /* @__PURE__ */ jsx(
|
|
75
|
+
"animateTransform",
|
|
76
|
+
{
|
|
77
|
+
attributeName: "transform",
|
|
78
|
+
type: "rotate",
|
|
79
|
+
values: "0 12 12;180 12 12;360 12 12",
|
|
80
|
+
dur: `${durationSec}s`,
|
|
81
|
+
repeatCount: "indefinite"
|
|
82
|
+
}
|
|
83
|
+
);
|
|
84
|
+
case "slide":
|
|
85
|
+
return /* @__PURE__ */ jsx(
|
|
86
|
+
"animateTransform",
|
|
87
|
+
{
|
|
88
|
+
attributeName: "transform",
|
|
89
|
+
type: "translate",
|
|
90
|
+
values: "-5,0;5,0;-5,0",
|
|
91
|
+
dur: `${durationSec}s`,
|
|
92
|
+
repeatCount: "indefinite"
|
|
93
|
+
}
|
|
94
|
+
);
|
|
95
|
+
case "glow":
|
|
96
|
+
return null;
|
|
97
|
+
// glow uses CSS, handled via style prop
|
|
98
|
+
default:
|
|
99
|
+
return null;
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
function getGlowStyle(animation, duration) {
|
|
103
|
+
if (animation !== "glow") {
|
|
104
|
+
return void 0;
|
|
105
|
+
}
|
|
106
|
+
const durationSec = duration / 1e3;
|
|
107
|
+
return {
|
|
108
|
+
filter: "drop-shadow(0 0 3px currentColor)",
|
|
109
|
+
animation: `glow ${durationSec}s ease-in-out infinite`
|
|
110
|
+
};
|
|
111
|
+
}
|
|
112
|
+
function createScienceIcon(name, path, defaultColor) {
|
|
113
|
+
const IconComponent = ({
|
|
114
|
+
size = 24,
|
|
115
|
+
color = defaultColor || "currentColor",
|
|
116
|
+
secondaryColor,
|
|
117
|
+
variant = "filled",
|
|
118
|
+
animation,
|
|
119
|
+
animationDuration = 1e3,
|
|
120
|
+
title,
|
|
121
|
+
desc,
|
|
122
|
+
className,
|
|
123
|
+
style,
|
|
124
|
+
...props
|
|
125
|
+
}) => {
|
|
126
|
+
const animationElement = getScienceAnimation(animation, animationDuration);
|
|
127
|
+
const glowStyle = getGlowStyle(animation, animationDuration);
|
|
128
|
+
const titleId = title ? `${name}-title` : void 0;
|
|
129
|
+
const descId = desc ? `${name}-desc` : void 0;
|
|
130
|
+
let pathElement;
|
|
131
|
+
switch (variant) {
|
|
132
|
+
case "outlined":
|
|
133
|
+
pathElement = /* @__PURE__ */ jsx(
|
|
134
|
+
"path",
|
|
135
|
+
{
|
|
136
|
+
d: path,
|
|
137
|
+
fill: "none",
|
|
138
|
+
stroke: color,
|
|
139
|
+
strokeWidth: 1.5,
|
|
140
|
+
strokeLinecap: "round",
|
|
141
|
+
strokeLinejoin: "round"
|
|
142
|
+
}
|
|
143
|
+
);
|
|
144
|
+
break;
|
|
145
|
+
case "duotone":
|
|
146
|
+
pathElement = /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
147
|
+
/* @__PURE__ */ jsx("path", { d: path, fill: secondaryColor || `${color}33` }),
|
|
148
|
+
/* @__PURE__ */ jsx(
|
|
149
|
+
"path",
|
|
150
|
+
{
|
|
151
|
+
d: path,
|
|
152
|
+
fill: "none",
|
|
153
|
+
stroke: color,
|
|
154
|
+
strokeWidth: 1.5,
|
|
155
|
+
strokeLinecap: "round",
|
|
156
|
+
strokeLinejoin: "round"
|
|
157
|
+
}
|
|
158
|
+
)
|
|
159
|
+
] });
|
|
160
|
+
break;
|
|
161
|
+
case "filled":
|
|
162
|
+
default:
|
|
163
|
+
pathElement = /* @__PURE__ */ jsx("path", { d: path, fill: color });
|
|
164
|
+
break;
|
|
165
|
+
}
|
|
166
|
+
return /* @__PURE__ */ jsxs(
|
|
167
|
+
"svg",
|
|
168
|
+
{
|
|
169
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
170
|
+
width: size,
|
|
171
|
+
height: size,
|
|
172
|
+
viewBox: "0 0 24 24",
|
|
173
|
+
className,
|
|
174
|
+
style: { ...style, ...glowStyle },
|
|
175
|
+
role: "img",
|
|
176
|
+
"aria-labelledby": titleId || descId ? `${titleId || ""} ${descId || ""}`.trim() : void 0,
|
|
177
|
+
...props,
|
|
178
|
+
children: [
|
|
179
|
+
title && /* @__PURE__ */ jsx("title", { id: titleId, children: title }),
|
|
180
|
+
desc && /* @__PURE__ */ jsx("desc", { id: descId, children: desc }),
|
|
181
|
+
/* @__PURE__ */ jsxs("g", { children: [
|
|
182
|
+
pathElement,
|
|
183
|
+
animationElement
|
|
184
|
+
] })
|
|
185
|
+
]
|
|
186
|
+
}
|
|
187
|
+
);
|
|
188
|
+
};
|
|
189
|
+
IconComponent.displayName = name;
|
|
190
|
+
return IconComponent;
|
|
191
|
+
}
|
|
192
|
+
export {
|
|
193
|
+
createScienceIcon as c,
|
|
194
|
+
getScienceAnimation as g
|
|
195
|
+
};
|
|
196
|
+
//# sourceMappingURL=createScienceIcon-Bcme4rfw.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createScienceIcon-Bcme4rfw.mjs","sources":["../src/createScienceIcon.tsx"],"sourcesContent":["import React from 'react';\r\n\r\nimport type { ScienceIconProps, ScienceIconAnimation, ScienceIcon } from './types';\r\n\r\n/**\r\n * Get SMIL animation element for science icons\r\n */\r\nexport function getScienceAnimation(\r\n animation: ScienceIconAnimation | undefined,\r\n duration = 1000,\r\n): React.ReactNode {\r\n if (!animation) {\r\n return null;\r\n }\r\n\r\n const durationSec = duration / 1000;\r\n\r\n switch (animation) {\r\n case 'pulse':\r\n return (\r\n <animate\r\n attributeName=\"opacity\"\r\n values=\"1;0.5;1\"\r\n dur={`${durationSec}s`}\r\n repeatCount=\"indefinite\"\r\n />\r\n );\r\n case 'grow':\r\n return (\r\n <animateTransform\r\n attributeName=\"transform\"\r\n type=\"scale\"\r\n values=\"1;1.2;1\"\r\n dur={`${durationSec}s`}\r\n repeatCount=\"indefinite\"\r\n />\r\n );\r\n case 'shake':\r\n return (\r\n <animateTransform\r\n attributeName=\"transform\"\r\n type=\"translate\"\r\n values=\"0,0;-2,0;2,0;0,0\"\r\n dur={`${durationSec * 0.5}s`}\r\n repeatCount=\"indefinite\"\r\n />\r\n );\r\n case 'spin':\r\n return (\r\n <animateTransform\r\n attributeName=\"transform\"\r\n type=\"rotate\"\r\n from=\"0 12 12\"\r\n to=\"360 12 12\"\r\n dur={`${durationSec}s`}\r\n repeatCount=\"indefinite\"\r\n />\r\n );\r\n case 'bounce':\r\n return (\r\n <animateTransform\r\n attributeName=\"transform\"\r\n type=\"translate\"\r\n values=\"0,0;0,-3;0,0\"\r\n dur={`${durationSec * 0.5}s`}\r\n repeatCount=\"indefinite\"\r\n />\r\n );\r\n case 'fade':\r\n return (\r\n <animate\r\n attributeName=\"opacity\"\r\n values=\"1;0;1\"\r\n dur={`${durationSec * 2}s`}\r\n repeatCount=\"indefinite\"\r\n />\r\n );\r\n case 'flip':\r\n return (\r\n <animateTransform\r\n attributeName=\"transform\"\r\n type=\"rotate\"\r\n values=\"0 12 12;180 12 12;360 12 12\"\r\n dur={`${durationSec}s`}\r\n repeatCount=\"indefinite\"\r\n />\r\n );\r\n case 'slide':\r\n return (\r\n <animateTransform\r\n attributeName=\"transform\"\r\n type=\"translate\"\r\n values=\"-5,0;5,0;-5,0\"\r\n dur={`${durationSec}s`}\r\n repeatCount=\"indefinite\"\r\n />\r\n );\r\n case 'glow':\r\n return null; // glow uses CSS, handled via style prop\r\n default:\r\n return null;\r\n }\r\n}\r\n\r\n/**\r\n * Get style for glow animation\r\n */\r\nfunction getGlowStyle(\r\n animation: ScienceIconAnimation | undefined,\r\n duration: number,\r\n): React.CSSProperties | undefined {\r\n if (animation !== 'glow') {\r\n return undefined;\r\n }\r\n const durationSec = duration / 1000;\r\n return {\r\n filter: 'drop-shadow(0 0 3px currentColor)',\r\n animation: `glow ${durationSec}s ease-in-out infinite`,\r\n };\r\n}\r\n\r\n/**\r\n * Factory function to create science icons\r\n */\r\nexport function createScienceIcon(name: string, path: string, defaultColor?: string): ScienceIcon {\r\n const IconComponent = ({\r\n size = 24,\r\n color = defaultColor || 'currentColor',\r\n secondaryColor,\r\n variant = 'filled',\r\n animation,\r\n animationDuration = 1000,\r\n title,\r\n desc,\r\n className,\r\n style,\r\n ...props\r\n }: ScienceIconProps) => {\r\n const animationElement = getScienceAnimation(animation, animationDuration);\r\n const glowStyle = getGlowStyle(animation, animationDuration);\r\n const titleId = title ? `${name}-title` : undefined;\r\n const descId = desc ? `${name}-desc` : undefined;\r\n\r\n let pathElement: React.ReactNode;\r\n\r\n switch (variant) {\r\n case 'outlined':\r\n pathElement = (\r\n <path\r\n d={path}\r\n fill=\"none\"\r\n stroke={color}\r\n strokeWidth={1.5}\r\n strokeLinecap=\"round\"\r\n strokeLinejoin=\"round\"\r\n />\r\n );\r\n break;\r\n case 'duotone':\r\n pathElement = (\r\n <>\r\n <path d={path} fill={secondaryColor || `${color}33`} />\r\n <path\r\n d={path}\r\n fill=\"none\"\r\n stroke={color}\r\n strokeWidth={1.5}\r\n strokeLinecap=\"round\"\r\n strokeLinejoin=\"round\"\r\n />\r\n </>\r\n );\r\n break;\r\n case 'filled':\r\n default:\r\n pathElement = <path d={path} fill={color} />;\r\n break;\r\n }\r\n\r\n return (\r\n <svg\r\n xmlns=\"http://www.w3.org/2000/svg\"\r\n width={size}\r\n height={size}\r\n viewBox=\"0 0 24 24\"\r\n className={className}\r\n style={{ ...style, ...glowStyle }}\r\n role=\"img\"\r\n aria-labelledby={titleId || descId ? `${titleId || ''} ${descId || ''}`.trim() : undefined}\r\n {...props}\r\n >\r\n {title && <title id={titleId}>{title}</title>}\r\n {desc && <desc id={descId}>{desc}</desc>}\r\n <g>\r\n {pathElement}\r\n {animationElement}\r\n </g>\r\n </svg>\r\n );\r\n };\r\n\r\n IconComponent.displayName = name;\r\n return IconComponent as ScienceIcon;\r\n}\r\n"],"names":[],"mappings":";AAOO,SAAS,oBACd,WACA,WAAW,KACM;AACjB,MAAI,CAAC,WAAW;AACd,WAAO;AAAA,EACT;AAEA,QAAM,cAAc,WAAW;AAE/B,UAAQ,WAAA;AAAA,IACN,KAAK;AACH,aACE;AAAA,QAAC;AAAA,QAAA;AAAA,UACC,eAAc;AAAA,UACd,QAAO;AAAA,UACP,KAAK,GAAG,WAAW;AAAA,U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GACF;AAEF;AAAA,MACF,KAAK;AAAA,MACL;AACE,sBAAc,oBAAC,QAAA,EAAK,GAAG,MAAM,MAAM,OAAO;AAC1C;AAAA,IAAA;AAGJ,WACE;AAAA,MAAC;AAAA,MAAA;AAAA,QACC,OAAM;AAAA,QACN,OAAO;AAAA,QACP,QAAQ;AAAA,QACR,SAAQ;AAAA,QACR;AAAA,QACA,OAAO,EAAE,GAAG,OAAO,GAAG,UAAA;AAAA,QACtB,MAAK;AAAA,QACL,mBAAiB,WAAW,SAAS,GAAG,WAAW,EAAE,IAAI,UAAU,EAAE,GAAG,KAAA,IAAS;AAAA,QAChF,GAAG;AAAA,QAEH,UAAA;AAAA,UAAA,SAAS,oBAAC,SAAA,EAAM,IAAI,SAAU,UAAA,OAAM;AAAA,UACpC,QAAQ,oBAAC,QAAA,EAAK,IAAI,QAAS,UAAA,MAAK;AAAA,+BAChC,KAAA,EACE,UAAA;AAAA,YAAA;AAAA,YACA;AAAA,UAAA,EAAA,CACH;AAAA,QAAA;AAAA,MAAA;AAAA,IAAA;AAAA,EAGN;AAEA,gBAAc,cAAc;AAC5B,SAAO;AACT;"}
|
|
@@ -0,0 +1,195 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
const jsxRuntime = require("react/jsx-runtime");
|
|
3
|
+
function getScienceAnimation(animation, duration = 1e3) {
|
|
4
|
+
if (!animation) {
|
|
5
|
+
return null;
|
|
6
|
+
}
|
|
7
|
+
const durationSec = duration / 1e3;
|
|
8
|
+
switch (animation) {
|
|
9
|
+
case "pulse":
|
|
10
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
11
|
+
"animate",
|
|
12
|
+
{
|
|
13
|
+
attributeName: "opacity",
|
|
14
|
+
values: "1;0.5;1",
|
|
15
|
+
dur: `${durationSec}s`,
|
|
16
|
+
repeatCount: "indefinite"
|
|
17
|
+
}
|
|
18
|
+
);
|
|
19
|
+
case "grow":
|
|
20
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
21
|
+
"animateTransform",
|
|
22
|
+
{
|
|
23
|
+
attributeName: "transform",
|
|
24
|
+
type: "scale",
|
|
25
|
+
values: "1;1.2;1",
|
|
26
|
+
dur: `${durationSec}s`,
|
|
27
|
+
repeatCount: "indefinite"
|
|
28
|
+
}
|
|
29
|
+
);
|
|
30
|
+
case "shake":
|
|
31
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
32
|
+
"animateTransform",
|
|
33
|
+
{
|
|
34
|
+
attributeName: "transform",
|
|
35
|
+
type: "translate",
|
|
36
|
+
values: "0,0;-2,0;2,0;0,0",
|
|
37
|
+
dur: `${durationSec * 0.5}s`,
|
|
38
|
+
repeatCount: "indefinite"
|
|
39
|
+
}
|
|
40
|
+
);
|
|
41
|
+
case "spin":
|
|
42
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
43
|
+
"animateTransform",
|
|
44
|
+
{
|
|
45
|
+
attributeName: "transform",
|
|
46
|
+
type: "rotate",
|
|
47
|
+
from: "0 12 12",
|
|
48
|
+
to: "360 12 12",
|
|
49
|
+
dur: `${durationSec}s`,
|
|
50
|
+
repeatCount: "indefinite"
|
|
51
|
+
}
|
|
52
|
+
);
|
|
53
|
+
case "bounce":
|
|
54
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
55
|
+
"animateTransform",
|
|
56
|
+
{
|
|
57
|
+
attributeName: "transform",
|
|
58
|
+
type: "translate",
|
|
59
|
+
values: "0,0;0,-3;0,0",
|
|
60
|
+
dur: `${durationSec * 0.5}s`,
|
|
61
|
+
repeatCount: "indefinite"
|
|
62
|
+
}
|
|
63
|
+
);
|
|
64
|
+
case "fade":
|
|
65
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
66
|
+
"animate",
|
|
67
|
+
{
|
|
68
|
+
attributeName: "opacity",
|
|
69
|
+
values: "1;0;1",
|
|
70
|
+
dur: `${durationSec * 2}s`,
|
|
71
|
+
repeatCount: "indefinite"
|
|
72
|
+
}
|
|
73
|
+
);
|
|
74
|
+
case "flip":
|
|
75
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
76
|
+
"animateTransform",
|
|
77
|
+
{
|
|
78
|
+
attributeName: "transform",
|
|
79
|
+
type: "rotate",
|
|
80
|
+
values: "0 12 12;180 12 12;360 12 12",
|
|
81
|
+
dur: `${durationSec}s`,
|
|
82
|
+
repeatCount: "indefinite"
|
|
83
|
+
}
|
|
84
|
+
);
|
|
85
|
+
case "slide":
|
|
86
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
87
|
+
"animateTransform",
|
|
88
|
+
{
|
|
89
|
+
attributeName: "transform",
|
|
90
|
+
type: "translate",
|
|
91
|
+
values: "-5,0;5,0;-5,0",
|
|
92
|
+
dur: `${durationSec}s`,
|
|
93
|
+
repeatCount: "indefinite"
|
|
94
|
+
}
|
|
95
|
+
);
|
|
96
|
+
case "glow":
|
|
97
|
+
return null;
|
|
98
|
+
// glow uses CSS, handled via style prop
|
|
99
|
+
default:
|
|
100
|
+
return null;
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
function getGlowStyle(animation, duration) {
|
|
104
|
+
if (animation !== "glow") {
|
|
105
|
+
return void 0;
|
|
106
|
+
}
|
|
107
|
+
const durationSec = duration / 1e3;
|
|
108
|
+
return {
|
|
109
|
+
filter: "drop-shadow(0 0 3px currentColor)",
|
|
110
|
+
animation: `glow ${durationSec}s ease-in-out infinite`
|
|
111
|
+
};
|
|
112
|
+
}
|
|
113
|
+
function createScienceIcon(name, path, defaultColor) {
|
|
114
|
+
const IconComponent = ({
|
|
115
|
+
size = 24,
|
|
116
|
+
color = defaultColor || "currentColor",
|
|
117
|
+
secondaryColor,
|
|
118
|
+
variant = "filled",
|
|
119
|
+
animation,
|
|
120
|
+
animationDuration = 1e3,
|
|
121
|
+
title,
|
|
122
|
+
desc,
|
|
123
|
+
className,
|
|
124
|
+
style,
|
|
125
|
+
...props
|
|
126
|
+
}) => {
|
|
127
|
+
const animationElement = getScienceAnimation(animation, animationDuration);
|
|
128
|
+
const glowStyle = getGlowStyle(animation, animationDuration);
|
|
129
|
+
const titleId = title ? `${name}-title` : void 0;
|
|
130
|
+
const descId = desc ? `${name}-desc` : void 0;
|
|
131
|
+
let pathElement;
|
|
132
|
+
switch (variant) {
|
|
133
|
+
case "outlined":
|
|
134
|
+
pathElement = /* @__PURE__ */ jsxRuntime.jsx(
|
|
135
|
+
"path",
|
|
136
|
+
{
|
|
137
|
+
d: path,
|
|
138
|
+
fill: "none",
|
|
139
|
+
stroke: color,
|
|
140
|
+
strokeWidth: 1.5,
|
|
141
|
+
strokeLinecap: "round",
|
|
142
|
+
strokeLinejoin: "round"
|
|
143
|
+
}
|
|
144
|
+
);
|
|
145
|
+
break;
|
|
146
|
+
case "duotone":
|
|
147
|
+
pathElement = /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
148
|
+
/* @__PURE__ */ jsxRuntime.jsx("path", { d: path, fill: secondaryColor || `${color}33` }),
|
|
149
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
150
|
+
"path",
|
|
151
|
+
{
|
|
152
|
+
d: path,
|
|
153
|
+
fill: "none",
|
|
154
|
+
stroke: color,
|
|
155
|
+
strokeWidth: 1.5,
|
|
156
|
+
strokeLinecap: "round",
|
|
157
|
+
strokeLinejoin: "round"
|
|
158
|
+
}
|
|
159
|
+
)
|
|
160
|
+
] });
|
|
161
|
+
break;
|
|
162
|
+
case "filled":
|
|
163
|
+
default:
|
|
164
|
+
pathElement = /* @__PURE__ */ jsxRuntime.jsx("path", { d: path, fill: color });
|
|
165
|
+
break;
|
|
166
|
+
}
|
|
167
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
168
|
+
"svg",
|
|
169
|
+
{
|
|
170
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
171
|
+
width: size,
|
|
172
|
+
height: size,
|
|
173
|
+
viewBox: "0 0 24 24",
|
|
174
|
+
className,
|
|
175
|
+
style: { ...style, ...glowStyle },
|
|
176
|
+
role: "img",
|
|
177
|
+
"aria-labelledby": titleId || descId ? `${titleId || ""} ${descId || ""}`.trim() : void 0,
|
|
178
|
+
...props,
|
|
179
|
+
children: [
|
|
180
|
+
title && /* @__PURE__ */ jsxRuntime.jsx("title", { id: titleId, children: title }),
|
|
181
|
+
desc && /* @__PURE__ */ jsxRuntime.jsx("desc", { id: descId, children: desc }),
|
|
182
|
+
/* @__PURE__ */ jsxRuntime.jsxs("g", { children: [
|
|
183
|
+
pathElement,
|
|
184
|
+
animationElement
|
|
185
|
+
] })
|
|
186
|
+
]
|
|
187
|
+
}
|
|
188
|
+
);
|
|
189
|
+
};
|
|
190
|
+
IconComponent.displayName = name;
|
|
191
|
+
return IconComponent;
|
|
192
|
+
}
|
|
193
|
+
exports.createScienceIcon = createScienceIcon;
|
|
194
|
+
exports.getScienceAnimation = getScienceAnimation;
|
|
195
|
+
//# sourceMappingURL=createScienceIcon-wxU6ZWtM.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createScienceIcon-wxU6ZWtM.js","sources":["../src/createScienceIcon.tsx"],"sourcesContent":["import React from 'react';\r\n\r\nimport type { ScienceIconProps, ScienceIconAnimation, ScienceIcon } from './types';\r\n\r\n/**\r\n * Get SMIL animation element for science icons\r\n */\r\nexport function getScienceAnimation(\r\n animation: ScienceIconAnimation | undefined,\r\n duration = 1000,\r\n): React.ReactNode {\r\n if (!animation) {\r\n return null;\r\n }\r\n\r\n const durationSec = duration / 1000;\r\n\r\n switch (animation) {\r\n case 'pulse':\r\n return (\r\n <animate\r\n attributeName=\"opacity\"\r\n values=\"1;0.5;1\"\r\n dur={`${durationSec}s`}\r\n repeatCount=\"indefinite\"\r\n />\r\n );\r\n case 'grow':\r\n return (\r\n <animateTransform\r\n attributeName=\"transform\"\r\n type=\"scale\"\r\n values=\"1;1.2;1\"\r\n dur={`${durationSec}s`}\r\n repeatCount=\"indefinite\"\r\n />\r\n );\r\n case 'shake':\r\n return (\r\n <animateTransform\r\n attributeName=\"transform\"\r\n type=\"translate\"\r\n values=\"0,0;-2,0;2,0;0,0\"\r\n dur={`${durationSec * 0.5}s`}\r\n repeatCount=\"indefinite\"\r\n />\r\n );\r\n case 'spin':\r\n return (\r\n <animateTransform\r\n attributeName=\"transform\"\r\n type=\"rotate\"\r\n from=\"0 12 12\"\r\n to=\"360 12 12\"\r\n dur={`${durationSec}s`}\r\n repeatCount=\"indefinite\"\r\n />\r\n );\r\n case 'bounce':\r\n return (\r\n <animateTransform\r\n attributeName=\"transform\"\r\n type=\"translate\"\r\n values=\"0,0;0,-3;0,0\"\r\n dur={`${durationSec * 0.5}s`}\r\n repeatCount=\"indefinite\"\r\n />\r\n );\r\n case 'fade':\r\n return (\r\n <animate\r\n attributeName=\"opacity\"\r\n values=\"1;0;1\"\r\n dur={`${durationSec * 2}s`}\r\n repeatCount=\"indefinite\"\r\n />\r\n );\r\n case 'flip':\r\n return (\r\n <animateTransform\r\n attributeName=\"transform\"\r\n type=\"rotate\"\r\n values=\"0 12 12;180 12 12;360 12 12\"\r\n dur={`${durationSec}s`}\r\n repeatCount=\"indefinite\"\r\n />\r\n );\r\n case 'slide':\r\n return (\r\n <animateTransform\r\n attributeName=\"transform\"\r\n type=\"translate\"\r\n values=\"-5,0;5,0;-5,0\"\r\n dur={`${durationSec}s`}\r\n repeatCount=\"indefinite\"\r\n />\r\n );\r\n case 'glow':\r\n return null; // glow uses CSS, handled via style prop\r\n default:\r\n return null;\r\n }\r\n}\r\n\r\n/**\r\n * Get style for glow animation\r\n */\r\nfunction getGlowStyle(\r\n animation: ScienceIconAnimation | undefined,\r\n duration: number,\r\n): React.CSSProperties | undefined {\r\n if (animation !== 'glow') {\r\n return undefined;\r\n }\r\n const durationSec = duration / 1000;\r\n return {\r\n filter: 'drop-shadow(0 0 3px currentColor)',\r\n animation: `glow ${durationSec}s ease-in-out infinite`,\r\n };\r\n}\r\n\r\n/**\r\n * Factory function to create science icons\r\n */\r\nexport function createScienceIcon(name: string, path: string, defaultColor?: string): ScienceIcon {\r\n const IconComponent = ({\r\n size = 24,\r\n color = defaultColor || 'currentColor',\r\n secondaryColor,\r\n variant = 'filled',\r\n animation,\r\n animationDuration = 1000,\r\n title,\r\n desc,\r\n className,\r\n style,\r\n ...props\r\n }: ScienceIconProps) => {\r\n const animationElement = getScienceAnimation(animation, animationDuration);\r\n const glowStyle = getGlowStyle(animation, animationDuration);\r\n const titleId = title ? `${name}-title` : undefined;\r\n const descId = desc ? `${name}-desc` : undefined;\r\n\r\n let pathElement: React.ReactNode;\r\n\r\n switch (variant) {\r\n case 'outlined':\r\n pathElement = (\r\n <path\r\n d={path}\r\n fill=\"none\"\r\n stroke={color}\r\n strokeWidth={1.5}\r\n strokeLinecap=\"round\"\r\n strokeLinejoin=\"round\"\r\n />\r\n );\r\n break;\r\n case 'duotone':\r\n pathElement = (\r\n <>\r\n <path d={path} fill={secondaryColor || `${color}33`} />\r\n <path\r\n d={path}\r\n fill=\"none\"\r\n stroke={color}\r\n strokeWidth={1.5}\r\n strokeLinecap=\"round\"\r\n strokeLinejoin=\"round\"\r\n />\r\n </>\r\n );\r\n break;\r\n case 'filled':\r\n default:\r\n pathElement = <path d={path} fill={color} />;\r\n break;\r\n }\r\n\r\n return (\r\n <svg\r\n xmlns=\"http://www.w3.org/2000/svg\"\r\n width={size}\r\n height={size}\r\n viewBox=\"0 0 24 24\"\r\n className={className}\r\n style={{ ...style, ...glowStyle }}\r\n role=\"img\"\r\n aria-labelledby={titleId || descId ? `${titleId || ''} ${descId || ''}`.trim() : undefined}\r\n {...props}\r\n >\r\n {title && <title id={titleId}>{title}</title>}\r\n {desc && <desc id={descId}>{desc}</desc>}\r\n <g>\r\n {pathElement}\r\n {animationElement}\r\n </g>\r\n </svg>\r\n );\r\n };\r\n\r\n IconComponent.displayName = name;\r\n return IconComponent as ScienceIcon;\r\n}\r\n"],"names":["jsx","jsxs","Fragment"],"mappings":";;AAOO,SAAS,oBACd,WACA,WA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AAAA,QAAA;AAGnB;AAAA,MACF,KAAK;AACH,sBACEC,2BAAAA,KAAAC,qBAAA,EACE,UAAA;AAAA,UAAAF,2BAAAA,IAAC,UAAK,GAAG,MAAM,MAAM,kBAAkB,GAAG,KAAK,MAAM;AAAA,UACrDA,2BAAAA;AAAAA,YAAC;AAAA,YAAA;AAAA,cACC,GAAG;AAAA,cACH,MAAK;AAAA,cACL,QAAQ;AAAA,cACR,aAAa;AAAA,cACb,eAAc;AAAA,cACd,gBAAe;AAAA,YAAA;AAAA,UAAA;AAAA,QACjB,GACF;AAEF;AAAA,MACF,KAAK;AAAA,MACL;AACE,sBAAcA,2BAAAA,IAAC,QAAA,EAAK,GAAG,MAAM,MAAM,OAAO;AAC1C;AAAA,IAAA;AAGJ,WACEC,2BAAAA;AAAAA,MAAC;AAAA,MAAA;AAAA,QACC,OAAM;AAAA,QACN,OAAO;AAAA,QACP,QAAQ;AAAA,QACR,SAAQ;AAAA,QACR;AAAA,QACA,OAAO,EAAE,GAAG,OAAO,GAAG,UAAA;AAAA,QACtB,MAAK;AAAA,QACL,mBAAiB,WAAW,SAAS,GAAG,WAAW,EAAE,IAAI,UAAU,EAAE,GAAG,KAAA,IAAS;AAAA,QAChF,GAAG;AAAA,QAEH,UAAA;AAAA,UAAA,SAASD,2BAAAA,IAAC,SAAA,EAAM,IAAI,SAAU,UAAA,OAAM;AAAA,UACpC,QAAQA,2BAAAA,IAAC,QAAA,EAAK,IAAI,QAAS,UAAA,MAAK;AAAA,0CAChC,KAAA,EACE,UAAA;AAAA,YAAA;AAAA,YACA;AAAA,UAAA,EAAA,CACH;AAAA,QAAA;AAAA,MAAA;AAAA,IAAA;AAAA,EAGN;AAEA,gBAAc,cAAc;AAC5B,SAAO;AACT;;;"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { ScienceIconAnimation, ScienceIcon } from './types';
|
|
3
|
+
/**
|
|
4
|
+
* Get SMIL animation element for science icons
|
|
5
|
+
*/
|
|
6
|
+
export declare function getScienceAnimation(animation: ScienceIconAnimation | undefined, duration?: number): React.ReactNode;
|
|
7
|
+
/**
|
|
8
|
+
* Factory function to create science icons
|
|
9
|
+
*/
|
|
10
|
+
export declare function createScienceIcon(name: string, path: string, defaultColor?: string): ScienceIcon;
|
|
11
|
+
//# sourceMappingURL=createScienceIcon.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createScienceIcon.d.ts","sourceRoot":"","sources":["../src/createScienceIcon.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,KAAK,EAAoB,oBAAoB,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAEnF;;GAEG;AACH,wBAAgB,mBAAmB,CACjC,SAAS,EAAE,oBAAoB,GAAG,SAAS,EAC3C,QAAQ,SAAO,GACd,KAAK,CAAC,SAAS,CA4FjB;AAmBD;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,YAAY,CAAC,EAAE,MAAM,GAAG,WAAW,CA+EhG"}
|
package/dist/index.cjs
ADDED
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const createScienceIcon = require("./createScienceIcon-wxU6ZWtM.js");
|
|
4
|
+
const astronomy = require("./astronomy-D58mLl6D.js");
|
|
5
|
+
const biology = require("./biology-a0UpidDX.js");
|
|
6
|
+
const chemistry = require("./chemistry-DP_rXyz8.js");
|
|
7
|
+
const lab = require("./lab-DbkQ_T25.js");
|
|
8
|
+
const physics = require("./physics-DDvFIOmh.js");
|
|
9
|
+
const allScienceIcons = {
|
|
10
|
+
...lab.labIcons,
|
|
11
|
+
...biology.biologyIcons,
|
|
12
|
+
...chemistry.chemistryIcons,
|
|
13
|
+
...physics.physicsIcons,
|
|
14
|
+
...astronomy.astronomyIcons
|
|
15
|
+
};
|
|
16
|
+
const SCIENCE_ICON_COUNTS = {
|
|
17
|
+
lab: 15,
|
|
18
|
+
biology: 15,
|
|
19
|
+
chemistry: 15,
|
|
20
|
+
physics: 15,
|
|
21
|
+
astronomy: 15,
|
|
22
|
+
total: 75
|
|
23
|
+
};
|
|
24
|
+
exports.createScienceIcon = createScienceIcon.createScienceIcon;
|
|
25
|
+
exports.getScienceAnimation = createScienceIcon.getScienceAnimation;
|
|
26
|
+
exports.Asteroid = astronomy.Asteroid;
|
|
27
|
+
exports.BlackHole = astronomy.BlackHole;
|
|
28
|
+
exports.Comet = astronomy.Comet;
|
|
29
|
+
exports.Constellation = astronomy.Constellation;
|
|
30
|
+
exports.Galaxy = astronomy.Galaxy;
|
|
31
|
+
exports.Moon = astronomy.Moon;
|
|
32
|
+
exports.Nebula = astronomy.Nebula;
|
|
33
|
+
exports.Orbit = astronomy.Orbit;
|
|
34
|
+
exports.Planet = astronomy.Planet;
|
|
35
|
+
exports.Rocket = astronomy.Rocket;
|
|
36
|
+
exports.Satellite = astronomy.Satellite;
|
|
37
|
+
exports.SpaceStation = astronomy.SpaceStation;
|
|
38
|
+
exports.Star = astronomy.Star;
|
|
39
|
+
exports.Sun = astronomy.Sun;
|
|
40
|
+
exports.Telescope = astronomy.Telescope;
|
|
41
|
+
exports.astronomy = astronomy.astronomy;
|
|
42
|
+
exports.astronomyIcons = astronomy.astronomyIcons;
|
|
43
|
+
exports.Bacteria = biology.Bacteria;
|
|
44
|
+
exports.Cell = biology.Cell;
|
|
45
|
+
exports.Chromosome = biology.Chromosome;
|
|
46
|
+
exports.DNA = biology.DNA;
|
|
47
|
+
exports.Ecosystem = biology.Ecosystem;
|
|
48
|
+
exports.Enzyme = biology.Enzyme;
|
|
49
|
+
exports.Evolution = biology.Evolution;
|
|
50
|
+
exports.Gene = biology.Gene;
|
|
51
|
+
exports.Membrane = biology.Membrane;
|
|
52
|
+
exports.Mitochondria = biology.Mitochondria;
|
|
53
|
+
exports.Nucleus = biology.Nucleus;
|
|
54
|
+
exports.Organism = biology.Organism;
|
|
55
|
+
exports.Protein = biology.Protein;
|
|
56
|
+
exports.RNA = biology.RNA;
|
|
57
|
+
exports.Virus = biology.Virus;
|
|
58
|
+
exports.biology = biology.biology;
|
|
59
|
+
exports.biologyIcons = biology.biologyIcons;
|
|
60
|
+
exports.Atom = chemistry.Atom;
|
|
61
|
+
exports.Bond = chemistry.Bond;
|
|
62
|
+
exports.Catalyst = chemistry.Catalyst;
|
|
63
|
+
exports.Compound = chemistry.Compound;
|
|
64
|
+
exports.Crystal = chemistry.Crystal;
|
|
65
|
+
exports.Electron = chemistry.Electron;
|
|
66
|
+
exports.Formula = chemistry.Formula;
|
|
67
|
+
exports.Ion = chemistry.Ion;
|
|
68
|
+
exports.Molecule = chemistry.Molecule;
|
|
69
|
+
exports.Neutron = chemistry.Neutron;
|
|
70
|
+
exports.PeriodicTable = chemistry.PeriodicTable;
|
|
71
|
+
exports.Polymer = chemistry.Polymer;
|
|
72
|
+
exports.Proton = chemistry.Proton;
|
|
73
|
+
exports.Reaction = chemistry.Reaction;
|
|
74
|
+
exports.Solution = chemistry.Solution;
|
|
75
|
+
exports.chemistry = chemistry.chemistry;
|
|
76
|
+
exports.chemistryIcons = chemistry.chemistryIcons;
|
|
77
|
+
exports.Beaker = lab.Beaker;
|
|
78
|
+
exports.BunsenBurner = lab.BunsenBurner;
|
|
79
|
+
exports.Burette = lab.Burette;
|
|
80
|
+
exports.Centrifuge = lab.Centrifuge;
|
|
81
|
+
exports.Flask = lab.Flask;
|
|
82
|
+
exports.Gloves = lab.Gloves;
|
|
83
|
+
exports.LabCoat = lab.LabCoat;
|
|
84
|
+
exports.Microscope = lab.Microscope;
|
|
85
|
+
exports.PetriDish = lab.PetriDish;
|
|
86
|
+
exports.Pipette = lab.Pipette;
|
|
87
|
+
exports.SafetyGoggles = lab.SafetyGoggles;
|
|
88
|
+
exports.Sample = lab.Sample;
|
|
89
|
+
exports.Scales = lab.Scales;
|
|
90
|
+
exports.TestTube = lab.TestTube;
|
|
91
|
+
exports.Thermometer = lab.Thermometer;
|
|
92
|
+
exports.lab = lab.lab;
|
|
93
|
+
exports.labIcons = lab.labIcons;
|
|
94
|
+
exports.Circuit = physics.Circuit;
|
|
95
|
+
exports.Electricity = physics.Electricity;
|
|
96
|
+
exports.Energy = physics.Energy;
|
|
97
|
+
exports.Force = physics.Force;
|
|
98
|
+
exports.Gravity = physics.Gravity;
|
|
99
|
+
exports.Heat = physics.Heat;
|
|
100
|
+
exports.Lens = physics.Lens;
|
|
101
|
+
exports.Light = physics.Light;
|
|
102
|
+
exports.Magnet = physics.Magnet;
|
|
103
|
+
exports.Mass = physics.Mass;
|
|
104
|
+
exports.Particle = physics.Particle;
|
|
105
|
+
exports.Pressure = physics.Pressure;
|
|
106
|
+
exports.Sound = physics.Sound;
|
|
107
|
+
exports.Velocity = physics.Velocity;
|
|
108
|
+
exports.Wave = physics.Wave;
|
|
109
|
+
exports.physics = physics.physics;
|
|
110
|
+
exports.physicsIcons = physics.physicsIcons;
|
|
111
|
+
exports.SCIENCE_ICON_COUNTS = SCIENCE_ICON_COUNTS;
|
|
112
|
+
exports.allScienceIcons = allScienceIcons;
|
|
113
|
+
//# sourceMappingURL=index.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.cjs","sources":["../src/index.ts"],"sourcesContent":["/**\r\n * @nice2dev/icons-science\r\n * Scientific icons for NiceToDev UI\r\n *\r\n * Provides 75 science-related icons organized into 5 categories:\r\n * - Lab: Laboratory equipment and safety (15 icons)\r\n * - Biology: Cells, DNA, organisms (15 icons)\r\n * - Chemistry: Atoms, molecules, reactions (15 icons)\r\n * - Physics: Forces, waves, energy (15 icons)\r\n * - Astronomy: Space, planets, stars (15 icons)\r\n *\r\n * @packageDocumentation\r\n */\r\n\r\n// Export types\r\nexport type {\r\n ScienceIconProps,\r\n ScienceIconAnimation,\r\n ScienceIconVariant,\r\n ScienceIcon,\r\n ScienceIconName,\r\n LabIconName,\r\n BiologyIconName,\r\n ChemistryIconName,\r\n PhysicsIconName,\r\n AstronomyIconName,\r\n} from './types';\r\n\r\n// Export factory and utilities\r\nexport { createScienceIcon, getScienceAnimation } from './createScienceIcon';\r\n\r\n// Export all icons by category with namespaces\r\nimport * as astronomy from './astronomy';\r\nimport * as biology from './biology';\r\nimport * as chemistry from './chemistry';\r\nimport * as lab from './lab';\r\nimport * as physics from './physics';\r\n\r\nexport { lab, biology, chemistry, physics, astronomy };\r\n\r\n// Re-export individual icons from each category\r\nexport {\r\n Beaker,\r\n Flask,\r\n Burette,\r\n Microscope,\r\n Centrifuge,\r\n TestTube,\r\n PetriDish,\r\n Pipette,\r\n BunsenBurner,\r\n Thermometer,\r\n Scales,\r\n LabCoat,\r\n SafetyGoggles,\r\n Gloves,\r\n Sample,\r\n labIcons,\r\n} from './lab';\r\n\r\nexport {\r\n Cell,\r\n DNA,\r\n RNA,\r\n Bacteria,\r\n Virus,\r\n Organism,\r\n Ecosystem,\r\n Chromosome,\r\n Gene,\r\n Protein,\r\n Enzyme,\r\n Mitochondria,\r\n Nucleus,\r\n Membrane,\r\n Evolution,\r\n biologyIcons,\r\n} from './biology';\r\n\r\nexport {\r\n Atom,\r\n Molecule,\r\n PeriodicTable,\r\n Reaction,\r\n Bond,\r\n Electron,\r\n Proton,\r\n Neutron,\r\n Ion,\r\n Compound,\r\n Formula,\r\n Catalyst,\r\n Solution,\r\n Crystal,\r\n Polymer,\r\n chemistryIcons,\r\n} from './chemistry';\r\n\r\nexport {\r\n Magnet,\r\n Lens,\r\n Circuit,\r\n Wave,\r\n Particle,\r\n Force,\r\n Gravity,\r\n Electricity,\r\n Light,\r\n Sound,\r\n Heat,\r\n Pressure,\r\n Energy,\r\n Mass,\r\n Velocity,\r\n physicsIcons,\r\n} from './physics';\r\n\r\nexport {\r\n Telescope,\r\n Planet,\r\n Star,\r\n Galaxy,\r\n Rocket,\r\n Satellite,\r\n Moon,\r\n Sun,\r\n Comet,\r\n Asteroid,\r\n BlackHole,\r\n Nebula,\r\n Constellation,\r\n SpaceStation,\r\n Orbit,\r\n astronomyIcons,\r\n} from './astronomy';\r\n\r\n/**\r\n * All science icons in a single object\r\n */\r\nexport const allScienceIcons = {\r\n ...lab.labIcons,\r\n ...biology.biologyIcons,\r\n ...chemistry.chemistryIcons,\r\n ...physics.physicsIcons,\r\n ...astronomy.astronomyIcons,\r\n} as const;\r\n\r\n/**\r\n * Icon count by category\r\n */\r\nexport const SCIENCE_ICON_COUNTS = {\r\n lab: 15,\r\n biology: 15,\r\n chemistry: 15,\r\n physics: 15,\r\n astronomy: 15,\r\n total: 75,\r\n} as const;\r\n"],"names":["lab.labIcons","biology.biologyIcons","chemistry.chemistryIcons","physics.physicsIcons","astronomy.astronomyIcons"],"mappings":";;;;;;;;AA2IO,MAAM,kBAAkB;AAAA,EAC7B,GAAGA,IAAAA;AAAAA,EACH,GAAGC,QAAAA;AAAAA,EACH,GAAGC,UAAAA;AAAAA,EACH,GAAGC,QAAAA;AAAAA,EACH,GAAGC,UAAAA;AACL;AAKO,MAAM,sBAAsB;AAAA,EACjC,KAAK;AAAA,EACL,SAAS;AAAA,EACT,WAAW;AAAA,EACX,SAAS;AAAA,EACT,WAAW;AAAA,EACX,OAAO;AACT;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|