@illuma-ai/icons 1.0.0
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/LICENSE +21 -0
- package/LICENSE-material-icon-theme +8 -0
- package/NOTICE +21 -0
- package/README.md +51 -0
- package/dist/animated/AnimatedIcon.d.ts +23 -0
- package/dist/animated/icons.d.ts +11 -0
- package/dist/animated/index.d.ts +3 -0
- package/dist/animated/types.d.ts +12 -0
- package/dist/animated.cjs +2 -0
- package/dist/animated.es.js +141 -0
- package/dist/animations.css +56 -0
- package/dist/files/FileIcon.d.ts +20 -0
- package/dist/files/icons.generated.d.ts +160 -0
- package/dist/files/index.d.ts +4 -0
- package/dist/files/resolve.d.ts +15 -0
- package/dist/files.cjs +2 -0
- package/dist/files.es.js +150 -0
- package/package.json +73 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
The MIT License (MIT)
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Illuma AI
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
The MIT License (MIT)
|
|
2
|
+
Copyright (c) 2025 Material Extensions
|
|
3
|
+
|
|
4
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
5
|
+
|
|
6
|
+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
|
7
|
+
|
|
8
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
package/NOTICE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
@illuma-ai/icons
|
|
2
|
+
=================
|
|
3
|
+
|
|
4
|
+
This package includes third-party assets under permissive licenses.
|
|
5
|
+
|
|
6
|
+
File-type icons (src/files, dist/files.*)
|
|
7
|
+
------------------------------------------
|
|
8
|
+
The curated colored file-type icons are derived from Material Icon Theme
|
|
9
|
+
(https://github.com/material-extensions/vscode-material-icon-theme),
|
|
10
|
+
copyright (c) Material Extensions, licensed under the MIT License.
|
|
11
|
+
A full copy of that license is included as LICENSE-material-icon-theme.
|
|
12
|
+
|
|
13
|
+
These are original icon designs and are NOT Microsoft, Adobe, or any other
|
|
14
|
+
vendor's trademarked product logos. No trademarked vendor logos are
|
|
15
|
+
redistributed by this package.
|
|
16
|
+
|
|
17
|
+
Animated navigation icons (src/animated, dist/animated.*)
|
|
18
|
+
---------------------------------------------------------
|
|
19
|
+
Original works authored for @illuma-ai/icons, built on framer-motion
|
|
20
|
+
(a peer dependency). Visual style is inspired by the lucide line-icon
|
|
21
|
+
convention but the geometry and animations are original.
|
package/README.md
ADDED
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
# @illuma-ai/icons
|
|
2
|
+
|
|
3
|
+
Illuma's icon system — two independent, tree-shakeable entry points:
|
|
4
|
+
|
|
5
|
+
- **`@illuma-ai/icons/files`** — curated **colored file-type icons** (Word, Excel, PowerPoint, PDF, code, archives, media…) + a resolver that maps extensions/MIME types to the right icon.
|
|
6
|
+
- **`@illuma-ai/icons/animated`** — **hover-animated line icons** for navigation and transitions, built on `framer-motion`.
|
|
7
|
+
|
|
8
|
+
Legally clean: file icons are derived from [Material Icon Theme](https://github.com/material-extensions/vscode-material-icon-theme) (MIT) — **original designs, not trademarked vendor logos**. See `NOTICE`.
|
|
9
|
+
|
|
10
|
+
## Install
|
|
11
|
+
|
|
12
|
+
```bash
|
|
13
|
+
npm install @illuma-ai/icons
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
Peers: `react >=18`, `react-dom >=18`, `framer-motion >=11` (only needed if you use `/animated`).
|
|
17
|
+
|
|
18
|
+
## File icons
|
|
19
|
+
|
|
20
|
+
```tsx
|
|
21
|
+
import { FileIcon, resolveFileIcon } from '@illuma-ai/icons/files';
|
|
22
|
+
import '@illuma-ai/icons/files/animations.css'; // optional: fade-in + loading pulse
|
|
23
|
+
|
|
24
|
+
// Component — resolves by filename or extension, colored, inline SVG.
|
|
25
|
+
<FileIcon file="report.docx" size={28} />
|
|
26
|
+
<FileIcon file="data.xlsx" loading /> // pulse while processing
|
|
27
|
+
|
|
28
|
+
// Resolver — for custom rendering. Returns { name, inner, color, viewBox }.
|
|
29
|
+
const icon = resolveFileIcon('deck.pptx'); // -> powerpoint, #e64a19
|
|
30
|
+
const byMime = resolveFileIcon('', 'application/pdf'); // -> pdf
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
Resolution order: exact extension → exact MIME → MIME category → `document` fallback.
|
|
34
|
+
|
|
35
|
+
## Animated nav icons
|
|
36
|
+
|
|
37
|
+
```tsx
|
|
38
|
+
import { HomeIcon, SearchIcon, SettingsIcon, ChatIcon, PlusIcon } from '@illuma-ai/icons/animated';
|
|
39
|
+
|
|
40
|
+
// Animates on hover/focus automatically.
|
|
41
|
+
<SearchIcon className="size-6" />
|
|
42
|
+
|
|
43
|
+
// Drive it from outside (e.g. an active nav item) with `active`.
|
|
44
|
+
<HomeIcon active={isActive} />
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
All animated icons honor `prefers-reduced-motion`.
|
|
48
|
+
|
|
49
|
+
## License
|
|
50
|
+
|
|
51
|
+
MIT © Illuma AI. Bundled file-icon SVGs: MIT (Material Icon Theme) — see `LICENSE-material-icon-theme` and `NOTICE`.
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { motion, useAnimation, Variants } from 'framer-motion';
|
|
2
|
+
import { ReactNode } from 'react';
|
|
3
|
+
import { AnimatedIconProps } from './types';
|
|
4
|
+
interface AnimatedIconShellProps extends Omit<AnimatedIconProps, 'children'> {
|
|
5
|
+
/**
|
|
6
|
+
* Render the icon's animated SVG children. Receives the controller to bind
|
|
7
|
+
* `animate={controls}`/`variants` per element. The shell wires hover/focus and
|
|
8
|
+
* the `active` override to a single framer-motion controller.
|
|
9
|
+
*/
|
|
10
|
+
children: (controls: ReturnType<typeof useAnimation>) => ReactNode;
|
|
11
|
+
label: string;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Shared shell for hover-animated line icons (left-nav style). Owns the
|
|
15
|
+
* framer-motion controller and the hover/focus/active wiring so each concrete
|
|
16
|
+
* icon only declares its paths + variants. Respects `prefers-reduced-motion`
|
|
17
|
+
* implicitly because framer-motion honors it for transform/opacity tweens.
|
|
18
|
+
*/
|
|
19
|
+
export declare const AnimatedIcon: import('react').ForwardRefExoticComponent<AnimatedIconShellProps & import('react').RefAttributes<SVGSVGElement>>;
|
|
20
|
+
/** Resolve the controller's effective state for icons driven by `active`. */
|
|
21
|
+
export declare function activeState(active: boolean | undefined): 'animate' | 'normal' | undefined;
|
|
22
|
+
export type { Variants };
|
|
23
|
+
export { motion };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { AnimatedIconProps } from './types';
|
|
2
|
+
/** Home — roof lifts slightly on hover. */
|
|
3
|
+
export declare const HomeIcon: import('react').ForwardRefExoticComponent<AnimatedIconProps & import('react').RefAttributes<SVGSVGElement>>;
|
|
4
|
+
/** Search — magnifier nudges and scales on hover. */
|
|
5
|
+
export declare const SearchIcon: import('react').ForwardRefExoticComponent<AnimatedIconProps & import('react').RefAttributes<SVGSVGElement>>;
|
|
6
|
+
/** Settings — gear rotates on hover. */
|
|
7
|
+
export declare const SettingsIcon: import('react').ForwardRefExoticComponent<AnimatedIconProps & import('react').RefAttributes<SVGSVGElement>>;
|
|
8
|
+
/** Chat — bubble bobs and a dot pops on hover. */
|
|
9
|
+
export declare const ChatIcon: import('react').ForwardRefExoticComponent<AnimatedIconProps & import('react').RefAttributes<SVGSVGElement>>;
|
|
10
|
+
/** Plus — rotates a quarter-turn on hover. */
|
|
11
|
+
export declare const PlusIcon: import('react').ForwardRefExoticComponent<AnimatedIconProps & import('react').RefAttributes<SVGSVGElement>>;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { SVGProps } from 'react';
|
|
2
|
+
export interface AnimatedIconProps extends Omit<SVGProps<SVGSVGElement>, 'ref'> {
|
|
3
|
+
/** Pixel size for width and height. Defaults to 24. */
|
|
4
|
+
size?: number;
|
|
5
|
+
/** Stroke width. Defaults to 2 (matches lucide). */
|
|
6
|
+
strokeWidth?: number;
|
|
7
|
+
/**
|
|
8
|
+
* Force the animated state on regardless of hover (e.g. an active nav item).
|
|
9
|
+
* When undefined, the icon animates on hover/focus of its own element.
|
|
10
|
+
*/
|
|
11
|
+
active?: boolean;
|
|
12
|
+
}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("react/jsx-runtime"),s=require("react"),c=require("framer-motion"),l=s.forwardRef(function({children:t,label:o,size:a=24,strokeWidth:i=2,active:e,className:u,...j},g){const h=c.useAnimation(),x=s.useId(),f=()=>{e===void 0&&h.start("animate")},v=()=>{e===void 0&&h.start("normal")};return n.jsxs("svg",{ref:g,width:a,height:a,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:i,strokeLinecap:"round",strokeLinejoin:"round",className:u,role:"img","aria-labelledby":x,onMouseEnter:f,onMouseLeave:v,onFocus:f,onBlur:v,...j,children:[n.jsx("title",{id:x,children:o}),t(h)]})});function d(r){if(r!==void 0)return r?"animate":"normal"}const m={type:"spring",stiffness:250,damping:16},I=s.forwardRef(function(t,o){const a=d(t.active),i={normal:{y:0},animate:{y:-1.5}};return n.jsx(l,{ref:o,label:"Home",...t,children:e=>n.jsxs(n.Fragment,{children:[n.jsx(c.motion.path,{d:"M3 10.5 12 3l9 7.5",variants:i,animate:a??e,initial:"normal",transition:m}),n.jsx("path",{d:"M5 10v10h14V10"}),n.jsx("path",{d:"M9 20v-6h6v6"})]})})}),y=s.forwardRef(function(t,o){const a=d(t.active),i={normal:{scale:1,x:0,y:0},animate:{scale:1.12,x:-1,y:-1}};return n.jsx(l,{ref:o,label:"Search",...t,children:e=>n.jsxs(c.motion.g,{variants:i,animate:a??e,initial:"normal",transition:m,style:{transformOrigin:"10px 10px"},children:[n.jsx("circle",{cx:"11",cy:"11",r:"7"}),n.jsx("path",{d:"m21 21-4.3-4.3"})]})})}),M=s.forwardRef(function(t,o){const a=d(t.active),i={normal:{rotate:0},animate:{rotate:90}};return n.jsx(l,{ref:o,label:"Settings",...t,children:e=>n.jsxs(c.motion.g,{variants:i,animate:a??e,initial:"normal",transition:{type:"spring",stiffness:120,damping:14},style:{transformOrigin:"12px 12px"},children:[n.jsx("circle",{cx:"12",cy:"12",r:"3"}),n.jsx("path",{d:"M12 2v3M12 19v3M2 12h3M19 12h3M4.9 4.9l2.1 2.1M17 17l2.1 2.1M4.9 19.1 7 17M17 7l2.1-2.1"})]})})}),p=s.forwardRef(function(t,o){const a=d(t.active),i={normal:{y:0},animate:{y:-1}},e={normal:{scale:.6,opacity:.5},animate:{scale:1,opacity:1}};return n.jsx(l,{ref:o,label:"Chat",...t,children:u=>n.jsxs(n.Fragment,{children:[n.jsx(c.motion.path,{d:"M21 11.5a8.38 8.38 0 0 1-8.5 8.5 8.5 8.5 0 0 1-3.8-.9L3 21l1.9-5.7A8.38 8.38 0 0 1 4 11.5 8.5 8.5 0 0 1 12.5 3 8.38 8.38 0 0 1 21 11.5z",variants:i,animate:a??u,initial:"normal",transition:m}),n.jsx(c.motion.circle,{cx:"12",cy:"11.5",r:"1",fill:"currentColor",stroke:"none",variants:e,animate:a??u,initial:"normal",transition:m})]})})}),b=s.forwardRef(function(t,o){const a=d(t.active),i={normal:{rotate:0},animate:{rotate:90}};return n.jsx(l,{ref:o,label:"New",...t,children:e=>n.jsx(c.motion.g,{variants:i,animate:a??e,initial:"normal",transition:m,style:{transformOrigin:"12px 12px"},children:n.jsx("path",{d:"M12 5v14M5 12h14"})})})});exports.AnimatedIcon=l;exports.ChatIcon=p;exports.HomeIcon=I;exports.PlusIcon=b;exports.SearchIcon=y;exports.SettingsIcon=M;
|
|
2
|
+
//# sourceMappingURL=animated.cjs.map
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
import { jsxs as m, jsx as n, Fragment as y } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as l, useId as I } from "react";
|
|
3
|
+
import { useAnimation as b, motion as c } from "framer-motion";
|
|
4
|
+
const d = l(
|
|
5
|
+
function({ children: t, label: o, size: a = 24, strokeWidth: e = 2, active: i, className: u, ...M }, x) {
|
|
6
|
+
const f = b(), v = I(), g = () => {
|
|
7
|
+
i === void 0 && f.start("animate");
|
|
8
|
+
}, p = () => {
|
|
9
|
+
i === void 0 && f.start("normal");
|
|
10
|
+
};
|
|
11
|
+
return /* @__PURE__ */ m(
|
|
12
|
+
"svg",
|
|
13
|
+
{
|
|
14
|
+
ref: x,
|
|
15
|
+
width: a,
|
|
16
|
+
height: a,
|
|
17
|
+
viewBox: "0 0 24 24",
|
|
18
|
+
fill: "none",
|
|
19
|
+
stroke: "currentColor",
|
|
20
|
+
strokeWidth: e,
|
|
21
|
+
strokeLinecap: "round",
|
|
22
|
+
strokeLinejoin: "round",
|
|
23
|
+
className: u,
|
|
24
|
+
role: "img",
|
|
25
|
+
"aria-labelledby": v,
|
|
26
|
+
onMouseEnter: g,
|
|
27
|
+
onMouseLeave: p,
|
|
28
|
+
onFocus: g,
|
|
29
|
+
onBlur: p,
|
|
30
|
+
...M,
|
|
31
|
+
children: [
|
|
32
|
+
/* @__PURE__ */ n("title", { id: v, children: o }),
|
|
33
|
+
t(f)
|
|
34
|
+
]
|
|
35
|
+
}
|
|
36
|
+
);
|
|
37
|
+
}
|
|
38
|
+
);
|
|
39
|
+
function h(r) {
|
|
40
|
+
if (r !== void 0)
|
|
41
|
+
return r ? "animate" : "normal";
|
|
42
|
+
}
|
|
43
|
+
const s = { type: "spring", stiffness: 250, damping: 16 }, w = l(function(t, o) {
|
|
44
|
+
const a = h(t.active), e = { normal: { y: 0 }, animate: { y: -1.5 } };
|
|
45
|
+
return /* @__PURE__ */ n(d, { ref: o, label: "Home", ...t, children: (i) => /* @__PURE__ */ m(y, { children: [
|
|
46
|
+
/* @__PURE__ */ n(
|
|
47
|
+
c.path,
|
|
48
|
+
{
|
|
49
|
+
d: "M3 10.5 12 3l9 7.5",
|
|
50
|
+
variants: e,
|
|
51
|
+
animate: a ?? i,
|
|
52
|
+
initial: "normal",
|
|
53
|
+
transition: s
|
|
54
|
+
}
|
|
55
|
+
),
|
|
56
|
+
/* @__PURE__ */ n("path", { d: "M5 10v10h14V10" }),
|
|
57
|
+
/* @__PURE__ */ n("path", { d: "M9 20v-6h6v6" })
|
|
58
|
+
] }) });
|
|
59
|
+
}), A = l(function(t, o) {
|
|
60
|
+
const a = h(t.active), e = { normal: { scale: 1, x: 0, y: 0 }, animate: { scale: 1.12, x: -1, y: -1 } };
|
|
61
|
+
return /* @__PURE__ */ n(d, { ref: o, label: "Search", ...t, children: (i) => /* @__PURE__ */ m(
|
|
62
|
+
c.g,
|
|
63
|
+
{
|
|
64
|
+
variants: e,
|
|
65
|
+
animate: a ?? i,
|
|
66
|
+
initial: "normal",
|
|
67
|
+
transition: s,
|
|
68
|
+
style: { transformOrigin: "10px 10px" },
|
|
69
|
+
children: [
|
|
70
|
+
/* @__PURE__ */ n("circle", { cx: "11", cy: "11", r: "7" }),
|
|
71
|
+
/* @__PURE__ */ n("path", { d: "m21 21-4.3-4.3" })
|
|
72
|
+
]
|
|
73
|
+
}
|
|
74
|
+
) });
|
|
75
|
+
}), L = l(function(t, o) {
|
|
76
|
+
const a = h(t.active), e = { normal: { rotate: 0 }, animate: { rotate: 90 } };
|
|
77
|
+
return /* @__PURE__ */ n(d, { ref: o, label: "Settings", ...t, children: (i) => /* @__PURE__ */ m(
|
|
78
|
+
c.g,
|
|
79
|
+
{
|
|
80
|
+
variants: e,
|
|
81
|
+
animate: a ?? i,
|
|
82
|
+
initial: "normal",
|
|
83
|
+
transition: { type: "spring", stiffness: 120, damping: 14 },
|
|
84
|
+
style: { transformOrigin: "12px 12px" },
|
|
85
|
+
children: [
|
|
86
|
+
/* @__PURE__ */ n("circle", { cx: "12", cy: "12", r: "3" }),
|
|
87
|
+
/* @__PURE__ */ n("path", { d: "M12 2v3M12 19v3M2 12h3M19 12h3M4.9 4.9l2.1 2.1M17 17l2.1 2.1M4.9 19.1 7 17M17 7l2.1-2.1" })
|
|
88
|
+
]
|
|
89
|
+
}
|
|
90
|
+
) });
|
|
91
|
+
}), j = l(function(t, o) {
|
|
92
|
+
const a = h(t.active), e = { normal: { y: 0 }, animate: { y: -1 } }, i = { normal: { scale: 0.6, opacity: 0.5 }, animate: { scale: 1, opacity: 1 } };
|
|
93
|
+
return /* @__PURE__ */ n(d, { ref: o, label: "Chat", ...t, children: (u) => /* @__PURE__ */ m(y, { children: [
|
|
94
|
+
/* @__PURE__ */ n(
|
|
95
|
+
c.path,
|
|
96
|
+
{
|
|
97
|
+
d: "M21 11.5a8.38 8.38 0 0 1-8.5 8.5 8.5 8.5 0 0 1-3.8-.9L3 21l1.9-5.7A8.38 8.38 0 0 1 4 11.5 8.5 8.5 0 0 1 12.5 3 8.38 8.38 0 0 1 21 11.5z",
|
|
98
|
+
variants: e,
|
|
99
|
+
animate: a ?? u,
|
|
100
|
+
initial: "normal",
|
|
101
|
+
transition: s
|
|
102
|
+
}
|
|
103
|
+
),
|
|
104
|
+
/* @__PURE__ */ n(
|
|
105
|
+
c.circle,
|
|
106
|
+
{
|
|
107
|
+
cx: "12",
|
|
108
|
+
cy: "11.5",
|
|
109
|
+
r: "1",
|
|
110
|
+
fill: "currentColor",
|
|
111
|
+
stroke: "none",
|
|
112
|
+
variants: i,
|
|
113
|
+
animate: a ?? u,
|
|
114
|
+
initial: "normal",
|
|
115
|
+
transition: s
|
|
116
|
+
}
|
|
117
|
+
)
|
|
118
|
+
] }) });
|
|
119
|
+
}), H = l(function(t, o) {
|
|
120
|
+
const a = h(t.active), e = { normal: { rotate: 0 }, animate: { rotate: 90 } };
|
|
121
|
+
return /* @__PURE__ */ n(d, { ref: o, label: "New", ...t, children: (i) => /* @__PURE__ */ n(
|
|
122
|
+
c.g,
|
|
123
|
+
{
|
|
124
|
+
variants: e,
|
|
125
|
+
animate: a ?? i,
|
|
126
|
+
initial: "normal",
|
|
127
|
+
transition: s,
|
|
128
|
+
style: { transformOrigin: "12px 12px" },
|
|
129
|
+
children: /* @__PURE__ */ n("path", { d: "M12 5v14M5 12h14" })
|
|
130
|
+
}
|
|
131
|
+
) });
|
|
132
|
+
});
|
|
133
|
+
export {
|
|
134
|
+
d as AnimatedIcon,
|
|
135
|
+
j as ChatIcon,
|
|
136
|
+
w as HomeIcon,
|
|
137
|
+
H as PlusIcon,
|
|
138
|
+
A as SearchIcon,
|
|
139
|
+
L as SettingsIcon
|
|
140
|
+
};
|
|
141
|
+
//# sourceMappingURL=animated.es.js.map
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Opt-in animations for @illuma-ai/icons file icons. Import once:
|
|
3
|
+
* import '@illuma-ai/icons/files/animations.css';
|
|
4
|
+
*
|
|
5
|
+
* Mirrors the proven file-card pattern: a fade-in on mount, a pulse while a file
|
|
6
|
+
* is uploading/processing, and a spin utility for an overlaid loading ring.
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
.illuma-fi {
|
|
10
|
+
animation: illuma-fi-fade-in 160ms ease-out;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
/* Applied via the `loading` prop on <FileIcon loading />. */
|
|
14
|
+
.illuma-fi--loading {
|
|
15
|
+
animation: illuma-fi-pulse 1.4s ease-in-out infinite;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
/* Utility for an overlaid processing ring/spinner element. */
|
|
19
|
+
.illuma-fi-spin {
|
|
20
|
+
animation: illuma-fi-spin 0.9s linear infinite;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
@keyframes illuma-fi-fade-in {
|
|
24
|
+
from {
|
|
25
|
+
opacity: 0;
|
|
26
|
+
transform: scale(0.92);
|
|
27
|
+
}
|
|
28
|
+
to {
|
|
29
|
+
opacity: 1;
|
|
30
|
+
transform: scale(1);
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
@keyframes illuma-fi-pulse {
|
|
35
|
+
0%,
|
|
36
|
+
100% {
|
|
37
|
+
opacity: 1;
|
|
38
|
+
}
|
|
39
|
+
50% {
|
|
40
|
+
opacity: 0.45;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
@keyframes illuma-fi-spin {
|
|
45
|
+
to {
|
|
46
|
+
transform: rotate(360deg);
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
@media (prefers-reduced-motion: reduce) {
|
|
51
|
+
.illuma-fi,
|
|
52
|
+
.illuma-fi--loading,
|
|
53
|
+
.illuma-fi-spin {
|
|
54
|
+
animation: none;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { SVGProps } from 'react';
|
|
2
|
+
export interface FileIconProps extends Omit<SVGProps<SVGSVGElement>, 'children'> {
|
|
3
|
+
/** Filename (`report.docx`) or bare extension (`docx`). */
|
|
4
|
+
file?: string;
|
|
5
|
+
/** Optional MIME type to disambiguate when the filename has no extension. */
|
|
6
|
+
mimeType?: string;
|
|
7
|
+
/** Pixel size for width and height. Defaults to 24. */
|
|
8
|
+
size?: number;
|
|
9
|
+
/**
|
|
10
|
+
* Loading state. Adds the `illuma-fi--loading` class (pulse animation) when the
|
|
11
|
+
* optional stylesheet (`@illuma-ai/icons/files/animations.css`) is imported.
|
|
12
|
+
*/
|
|
13
|
+
loading?: boolean;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Renders the curated colored file-type icon for a given file. The SVG markup is
|
|
17
|
+
* inlined (not an <img>) so it inherits color transitions and can be animated by
|
|
18
|
+
* the consumer. Falls back to a generic document icon for unknown types.
|
|
19
|
+
*/
|
|
20
|
+
export declare const FileIcon: import('react').ForwardRefExoticComponent<Omit<FileIconProps, "ref"> & import('react').RefAttributes<SVGSVGElement>>;
|
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
export interface FileIconData {
|
|
2
|
+
/** Inner SVG markup (paths), no wrapping <svg>. */
|
|
3
|
+
readonly inner: string;
|
|
4
|
+
/** Primary brand color of the icon. */
|
|
5
|
+
readonly color: string;
|
|
6
|
+
readonly viewBox: string;
|
|
7
|
+
}
|
|
8
|
+
export declare const FILE_ICONS: {
|
|
9
|
+
readonly audio: {
|
|
10
|
+
readonly inner: "<path fill=\"#ef5350\" d=\"M16 2a14 14 0 1 0 14 14A14 14 0 0 0 16 2m6 10h-4v8a4 4 0 1 1-4-4 3.96 3.96 0 0 1 2 .555V8h6Z\"/>";
|
|
11
|
+
readonly color: "#ef5350";
|
|
12
|
+
readonly viewBox: "0 0 32 32";
|
|
13
|
+
};
|
|
14
|
+
readonly console: {
|
|
15
|
+
readonly inner: "<path fill=\"#ff7043\" d=\"M2 2a1 1 0 0 0-1 1v10c0 .554.446 1 1 1h12c.554 0 1-.446 1-1V3a1 1 0 0 0-1-1zm0 3h12v8H2zm1 2 2 2-2 2 1 1 3-3-3-3zm5 3.5V12h5v-1.5z\"/>";
|
|
16
|
+
readonly color: "#ff7043";
|
|
17
|
+
readonly viewBox: "0 0 16 16";
|
|
18
|
+
};
|
|
19
|
+
readonly cpp: {
|
|
20
|
+
readonly inner: "<path fill=\"#0288d1\" d=\"M28 14v-4h-2v4h-6v-4h-2v4h-4v2h4v4h2v-4h6v4h2v-4h4v-2z\"/><path fill=\"#0288d1\" d=\"M13.563 22A5.57 5.57 0 0 1 8 16.437v-2.873A5.57 5.57 0 0 1 13.563 8H18V2h-4.437A11.563 11.563 0 0 0 2 13.563v2.873A11.564 11.564 0 0 0 13.563 28H18v-6Z\"/>";
|
|
21
|
+
readonly color: "#0288d1";
|
|
22
|
+
readonly viewBox: "0 0 32 32";
|
|
23
|
+
};
|
|
24
|
+
readonly csharp: {
|
|
25
|
+
readonly inner: "<path fill=\"#0288d1\" d=\"M30 14v-2h-2V8h-2v4h-2V8h-2v4h-2v2h2v2h-2v2h2v4h2v-4h2v4h2v-4h2v-2h-2v-2Zm-4 2h-2v-2h2Zm-12.437 6A5.57 5.57 0 0 1 8 16.437v-2.873A5.57 5.57 0 0 1 13.563 8H18V2h-4.437A11.563 11.563 0 0 0 2 13.563v2.873A11.564 11.564 0 0 0 13.563 28H18v-6Z\"/>";
|
|
26
|
+
readonly color: "#0288d1";
|
|
27
|
+
readonly viewBox: "0 0 32 32";
|
|
28
|
+
};
|
|
29
|
+
readonly css: {
|
|
30
|
+
readonly inner: "<path fill=\"#7e57c2\" d=\"M20 18h-2v-2h-2v2c0 .193 0 .703 1.254 1.033A3.345 3.345 0 0 1 20 22h2v2h2v-2c0-.388-.562-.851-1.254-1.034C20.356 20.34 20 18.84 20 18m-3.254 2.966C14.356 20.34 14 18.84 14 18h-2v-2h-2v8h2v-2h4v2h2v-2c0-.388-.562-.851-1.254-1.034\"/><path fill=\"#7e57c2\" d=\"M24 4H4v20a4 4 0 0 0 4 4h16.16A3.84 3.84 0 0 0 28 24.16V8a4 4 0 0 0-4-4m2 14h-2v-2h-2v2c0 .193 0 .703 1.254 1.033A3.345 3.345 0 0 1 26 22v2a2 2 0 0 1-2 2h-2a2 2 0 0 1-2-2 2 2 0 0 1-2 2h-2a2 2 0 0 1-2-2 2 2 0 0 1-2 2h-2a2 2 0 0 1-2-2v-8a2 2 0 0 1 2-2h2a2 2 0 0 1 2 2 2 2 0 0 1 2-2h2a2 2 0 0 1 2 2 2 2 0 0 1 2-2h2a2 2 0 0 1 2 2Z\"/>";
|
|
31
|
+
readonly color: "#7e57c2";
|
|
32
|
+
readonly viewBox: "0 0 32 32";
|
|
33
|
+
};
|
|
34
|
+
readonly database: {
|
|
35
|
+
readonly inner: "<path fill=\"#ffca28\" d=\"M16 24c-5.525 0-10-.9-10-2v4c0 1.1 4.475 2 10 2s10-.9 10-2v-4c0 1.1-4.475 2-10 2m0-8c-5.525 0-10-.9-10-2v4c0 1.1 4.475 2 10 2s10-.9 10-2v-4c0 1.1-4.475 2-10 2m0-12C10.477 4 6 4.895 6 6v4c0 1.1 4.475 2 10 2s10-.9 10-2V6c0-1.105-4.477-2-10-2\"/>";
|
|
36
|
+
readonly color: "#ffca28";
|
|
37
|
+
readonly viewBox: "0 0 32 32";
|
|
38
|
+
};
|
|
39
|
+
readonly document: {
|
|
40
|
+
readonly inner: "<path fill=\"#42a5f5\" d=\"M8 16h8v2H8zm0-4h8v2H8zm6-10H6c-1.1 0-2 .9-2 2v16c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8zm4 18H6V4h7v5h5z\"/>";
|
|
41
|
+
readonly color: "#42a5f5";
|
|
42
|
+
readonly viewBox: "0 0 24 24";
|
|
43
|
+
};
|
|
44
|
+
readonly email: {
|
|
45
|
+
readonly inner: "<path fill=\"#42a5f5\" d=\"M28 6H4a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h24a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2m0 6-12 6-12-6V8l12 6 12-6Z\"/>";
|
|
46
|
+
readonly color: "#42a5f5";
|
|
47
|
+
readonly viewBox: "0 0 32 32";
|
|
48
|
+
};
|
|
49
|
+
readonly excel: {
|
|
50
|
+
readonly inner: "<path fill=\"#8bc34a\" d=\"M6 2h8l6 6v12a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2m7 1.5V9h5.5zm4 7.5h-4v2h1l-2 1.67L10 13h1v-2H7v2h1l3 2.5L8 18H7v2h4v-2h-1l2-1.67L14 18h-1v2h4v-2h-1l-3-2.5 3-2.5h1z\"/>";
|
|
51
|
+
readonly color: "#8bc34a";
|
|
52
|
+
readonly viewBox: "0 0 24 24";
|
|
53
|
+
};
|
|
54
|
+
readonly exe: {
|
|
55
|
+
readonly inner: "<path fill=\"#e64a19\" d=\"M28 4H4a2 2 0 0 0-2 2v20a2 2 0 0 0 2 2h24a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2m0 22H4V10h24Z\"/>";
|
|
56
|
+
readonly color: "#e64a19";
|
|
57
|
+
readonly viewBox: "0 0 32 32";
|
|
58
|
+
};
|
|
59
|
+
readonly go: {
|
|
60
|
+
readonly inner: "<path fill=\"#00acc1\" d=\"M2 12h4v2H2zm-2 4h6v2H0zm4 4h2v2H4zm16.954-5H14v3h3.239a4.42 4.42 0 0 1-3.531 2 2.65 2.65 0 0 1-2.053-.858 2.86 2.86 0 0 1-.628-2.28A4.515 4.515 0 0 1 15.292 13a2.73 2.73 0 0 1 1.749.584l2.962-1.185A5.6 5.6 0 0 0 15.292 10a7.526 7.526 0 0 0-7.243 6.5 5.614 5.614 0 0 0 5.659 6.5 7.526 7.526 0 0 0 7.243-6.5 6.4 6.4 0 0 0 .003-1.5\"/><path fill=\"#00acc1\" d=\"M26.292 10a7.526 7.526 0 0 0-7.243 6.5 5.614 5.614 0 0 0 5.659 6.5 7.526 7.526 0 0 0 7.243-6.5 5.614 5.614 0 0 0-5.659-6.5m2.681 6.137A4.515 4.515 0 0 1 24.708 20a2.65 2.65 0 0 1-2.053-.858 2.86 2.86 0 0 1-.628-2.28A4.515 4.515 0 0 1 26.292 13a2.65 2.65 0 0 1 2.053.858 2.86 2.86 0 0 1 .628 2.28Z\"/>";
|
|
61
|
+
readonly color: "#00acc1";
|
|
62
|
+
readonly viewBox: "0 0 32 32";
|
|
63
|
+
};
|
|
64
|
+
readonly html: {
|
|
65
|
+
readonly inner: "<path fill=\"#e65100\" d=\"m4 4 2 22 10 2 10-2 2-22Zm19.72 7H11.28l.29 3h11.86l-.802 9.335L15.99 25l-6.635-1.646L8.93 19h3.02l.19 2 3.86.77 3.84-.77.29-4H8.84L8 8h16Z\"/>";
|
|
66
|
+
readonly color: "#e65100";
|
|
67
|
+
readonly viewBox: "0 0 32 32";
|
|
68
|
+
};
|
|
69
|
+
readonly image: {
|
|
70
|
+
readonly inner: "<path fill=\"#26a69a\" d=\"M8.5 6h4l-4-4zM3.875 1H9.5l4 4v8.6c0 .773-.616 1.4-1.375 1.4h-8.25c-.76 0-1.375-.627-1.375-1.4V2.4c0-.777.612-1.4 1.375-1.4M4 13.6h8V8l-2.625 2.8L8 9.4zm1.25-7.7c-.76 0-1.375.627-1.375 1.4s.616 1.4 1.375 1.4c.76 0 1.375-.627 1.375-1.4S6.009 5.9 5.25 5.9\"/>";
|
|
71
|
+
readonly color: "#26a69a";
|
|
72
|
+
readonly viewBox: "0 0 16 16";
|
|
73
|
+
};
|
|
74
|
+
readonly java: {
|
|
75
|
+
readonly inner: "<path fill=\"#f44336\" d=\"M4 26h24v2H4zM28 4H7a1 1 0 0 0-1 1v13a4 4 0 0 0 4 4h10a4 4 0 0 0 4-4v-4h4a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2m0 8h-4V6h4Z\"/>";
|
|
76
|
+
readonly color: "#f44336";
|
|
77
|
+
readonly viewBox: "0 0 32 32";
|
|
78
|
+
};
|
|
79
|
+
readonly javascript: {
|
|
80
|
+
readonly inner: "<path fill=\"#ffca28\" d=\"M2 2v12h12V2zm6 6h1v4a1.003 1.003 0 0 1-1 1H7a1.003 1.003 0 0 1-1-1v-1h1v1h1zm3 0h2v1h-2v1h1a1.003 1.003 0 0 1 1 1v1a1.003 1.003 0 0 1-1 1h-2v-1h2v-1h-1a1.003 1.003 0 0 1-1-1V9a1.003 1.003 0 0 1 1-1\"/>";
|
|
81
|
+
readonly color: "#ffca28";
|
|
82
|
+
readonly viewBox: "0 0 16 16";
|
|
83
|
+
};
|
|
84
|
+
readonly json: {
|
|
85
|
+
readonly inner: "<path fill=\"#f9a825\" d=\"M560-160v-80h120q17 0 28.5-11.5T720-280v-80q0-38 22-69t58-44v-14q-36-13-58-44t-22-69v-80q0-17-11.5-28.5T680-720H560v-80h120q50 0 85 35t35 85v80q0 17 11.5 28.5T840-560h40v160h-40q-17 0-28.5 11.5T800-360v80q0 50-35 85t-85 35zm-280 0q-50 0-85-35t-35-85v-80q0-17-11.5-28.5T120-400H80v-160h40q17 0 28.5-11.5T160-600v-80q0-50 35-85t85-35h120v80H280q-17 0-28.5 11.5T240-680v80q0 38-22 69t-58 44v14q36 13 58 44t22 69v80q0 17 11.5 28.5T280-240h120v80z\"/>";
|
|
86
|
+
readonly color: "#f9a825";
|
|
87
|
+
readonly viewBox: "0 -960 960 960";
|
|
88
|
+
};
|
|
89
|
+
readonly markdown: {
|
|
90
|
+
readonly inner: "<path fill=\"#42a5f5\" d=\"m14 10-4 3.5L6 10H4v12h4v-6l2 2 2-2v6h4V10zm12 6v-6h-4v6h-4l6 8 6-8z\"/>";
|
|
91
|
+
readonly color: "#42a5f5";
|
|
92
|
+
readonly viewBox: "0 0 32 32";
|
|
93
|
+
};
|
|
94
|
+
readonly pdf: {
|
|
95
|
+
readonly inner: "<path fill=\"#ef5350\" d=\"M13 9h5.5L13 3.5zM6 2h8l6 6v12a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2m4.93 10.44c.41.9.93 1.64 1.53 2.15l.41.32c-.87.16-2.07.44-3.34.93l-.11.04.5-1.04c.45-.87.78-1.66 1.01-2.4m6.48 3.81c.18-.18.27-.41.28-.66.03-.2-.02-.39-.12-.55-.29-.47-1.04-.69-2.28-.69l-1.29.07-.87-.58c-.63-.52-1.2-1.43-1.6-2.56l.04-.14c.33-1.33.64-2.94-.02-3.6a.85.85 0 0 0-.61-.24h-.24c-.37 0-.7.39-.79.77-.37 1.33-.15 2.06.22 3.27v.01c-.25.88-.57 1.9-1.08 2.93l-.96 1.8-.89.49c-1.2.75-1.77 1.59-1.88 2.12-.04.19-.02.36.05.54l.03.05.48.31.44.11c.81 0 1.73-.95 2.97-3.07l.18-.07c1.03-.33 2.31-.56 4.03-.75 1.03.51 2.24.74 3 .74.44 0 .74-.11.91-.3m-.41-.71.09.11c-.01.1-.04.11-.09.13h-.04l-.19.02c-.46 0-1.17-.19-1.9-.51.09-.1.13-.1.23-.1 1.4 0 1.8.25 1.9.35M7.83 17c-.65 1.19-1.24 1.85-1.69 2 .05-.38.5-1.04 1.21-1.69zm3.02-6.91c-.23-.9-.24-1.63-.07-2.05l.07-.12.15.05c.17.24.19.56.09 1.1l-.03.16-.16.82z\"/>";
|
|
96
|
+
readonly color: "#ef5350";
|
|
97
|
+
readonly viewBox: "0 0 24 24";
|
|
98
|
+
};
|
|
99
|
+
readonly powerpoint: {
|
|
100
|
+
readonly inner: "<path fill=\"#e64a19\" d=\"M6 2h8l6 6v12a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2m7 1.5V9h5.5zM8 11v2h1v6H8v1h4v-1h-1v-2h2a3 3 0 0 0 3-3 3 3 0 0 0-3-3zm5 2a1 1 0 0 1 1 1 1 1 0 0 1-1 1h-2v-2z\"/>";
|
|
101
|
+
readonly color: "#e64a19";
|
|
102
|
+
readonly viewBox: "0 0 24 24";
|
|
103
|
+
};
|
|
104
|
+
readonly python: {
|
|
105
|
+
readonly inner: "<path fill=\"#0288d1\" d=\"M9.86 2A2.86 2.86 0 0 0 7 4.86v1.68h4.29c.39 0 .71.57.71.96H4.86A2.86 2.86 0 0 0 2 10.36v3.781a2.86 2.86 0 0 0 2.86 2.86h1.18v-2.68a2.85 2.85 0 0 1 2.85-2.86h5.25c1.58 0 2.86-1.271 2.86-2.851V4.86A2.86 2.86 0 0 0 14.14 2zm-.72 1.61c.4 0 .72.12.72.71s-.32.891-.72.891c-.39 0-.71-.3-.71-.89s.32-.711.71-.711\"/><path fill=\"#fdd835\" d=\"M17.959 7v2.68a2.85 2.85 0 0 1-2.85 2.859H9.86A2.85 2.85 0 0 0 7 15.389v3.75a2.86 2.86 0 0 0 2.86 2.86h4.28A2.86 2.86 0 0 0 17 19.14v-1.68h-4.291c-.39 0-.709-.57-.709-.96h7.14A2.86 2.86 0 0 0 22 13.64V9.86A2.86 2.86 0 0 0 19.14 7zM8.32 11.513l-.004.004.038-.004zm6.54 7.276c.39 0 .71.3.71.89a.71.71 0 0 1-.71.71c-.4 0-.72-.12-.72-.71s.32-.89.72-.89\"/>";
|
|
106
|
+
readonly color: "#0288d1";
|
|
107
|
+
readonly viewBox: "0 0 24 24";
|
|
108
|
+
};
|
|
109
|
+
readonly ruby: {
|
|
110
|
+
readonly inner: "<path fill=\"#f44336\" d=\"M18.041 3.177c2.24.382 2.879 1.919 2.843 3.527V6.67l-1.013 13.266-13.132.897h.008c-1.093-.044-3.518-.151-3.634-3.545l1.217-2.222 2.462 5.74 2.097-6.77-.045.009.018-.018 6.85 2.186L13.945 9.3l6.53-.409-5.144-4.212 2.71-1.51v.009M3.113 17.252v.017zM6.916 6.874c2.63-2.622 6.033-4.168 7.34-2.844 1.297 1.306-.072 4.523-2.702 7.135-2.666 2.613-6.015 4.248-7.322 2.933-1.306-1.324.036-4.612 2.675-7.224z\"/>";
|
|
111
|
+
readonly color: "#f44336";
|
|
112
|
+
readonly viewBox: "0 0 24 24";
|
|
113
|
+
};
|
|
114
|
+
readonly rust: {
|
|
115
|
+
readonly inner: "<path fill=\"#ff7043\" d=\"m30 12-4-2V6h-4l-2-4-4 2-4-2-2 4H6v4l-4 2 2 4-2 4 4 2v4h4l2 4 4-2 4 2 2-4h4v-4l4-2-2-4ZM6 16a9.9 9.9 0 0 1 .842-4H10v8H6.842A9.9 9.9 0 0 1 6 16m10 10a9.98 9.98 0 0 1-7.978-4H16v-2h-2v-2h4c.819.819.297 2.308 1.179 3.37a1.89 1.89 0 0 0 1.46.63h3.34A9.98 9.98 0 0 1 16 26m-2-12v-2h4a1 1 0 0 1 0 2Zm11.158 6H24a2.006 2.006 0 0 1-2-2 2 2 0 0 0-2-2 3 3 0 0 0 3-3q0-.08-.004-.161A3.115 3.115 0 0 0 19.83 10H8.022a9.986 9.986 0 0 1 17.136 10\"/>";
|
|
116
|
+
readonly color: "#ff7043";
|
|
117
|
+
readonly viewBox: "0 0 32 32";
|
|
118
|
+
};
|
|
119
|
+
readonly settings: {
|
|
120
|
+
readonly inner: "<path fill=\"#42a5f5\" d=\"M19.43 12.98c.04-.32.07-.64.07-.98s-.03-.66-.07-.98l2.11-1.65c.19-.15.24-.42.12-.64l-2-3.46a.5.5 0 0 0-.61-.22l-2.49 1c-.52-.4-1.08-.73-1.69-.98l-.38-2.65A.49.49 0 0 0 14 2h-4c-.25 0-.46.18-.49.42l-.38 2.65c-.61.25-1.17.59-1.69.98l-2.49-1a.6.6 0 0 0-.18-.03c-.17 0-.34.09-.43.25l-2 3.46c-.13.22-.07.49.12.64l2.11 1.65c-.04.32-.07.65-.07.98s.03.66.07.98l-2.11 1.65c-.19.15-.24.42-.12.64l2 3.46a.5.5 0 0 0 .61.22l2.49-1c.52.4 1.08.73 1.69.98l.38 2.65c.03.24.24.42.49.42h4c.25 0 .46-.18.49-.42l.38-2.65c.61-.25 1.17-.59 1.69-.98l2.49 1q.09.03.18.03c.17 0 .34-.09.43-.25l2-3.46c.12-.22.07-.49-.12-.64zm-1.98-1.71c.04.31.05.52.05.73s-.02.43-.05.73l-.14 1.13.89.7 1.08.84-.7 1.21-1.27-.51-1.04-.42-.9.68c-.43.32-.84.56-1.25.73l-1.06.43-.16 1.13-.2 1.35h-1.4l-.19-1.35-.16-1.13-1.06-.43c-.43-.18-.83-.41-1.23-.71l-.91-.7-1.06.43-1.27.51-.7-1.21 1.08-.84.89-.7-.14-1.13c-.03-.31-.05-.54-.05-.74s.02-.43.05-.73l.14-1.13-.89-.7-1.08-.84.7-1.21 1.27.51 1.04.42.9-.68c.43-.32.84-.56 1.25-.73l1.06-.43.16-1.13.2-1.35h1.39l.19 1.35.16 1.13 1.06.43c.43.18.83.41 1.23.71l.91.7 1.06-.43 1.27-.51.7 1.21-1.07.85-.89.7zM12 8c-2.21 0-4 1.79-4 4s1.79 4 4 4 4-1.79 4-4-1.79-4-4-4m0 6c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2\"/>";
|
|
121
|
+
readonly color: "#42a5f5";
|
|
122
|
+
readonly viewBox: "0 0 24 24";
|
|
123
|
+
};
|
|
124
|
+
readonly swift: {
|
|
125
|
+
readonly inner: "<path fill=\"#ff6e40\" d=\"M17.087 19.721c-2.36 1.36-5.59 1.5-8.86.1a13.8 13.8 0 0 1-6.23-5.32c.67.55 1.46 1 2.3 1.4 3.37 1.57 6.73 1.46 9.1 0-3.37-2.59-6.24-5.96-8.37-8.71-.45-.45-.78-1.01-1.12-1.51 8.28 6.05 7.92 7.59 2.41-1.01 4.89 4.94 9.43 7.74 9.43 7.74.16.09.25.16.36.22.1-.25.19-.51.26-.78.79-2.85-.11-6.12-2.08-8.81 4.55 2.75 7.25 7.91 6.12 12.24-.03.11-.06.22-.05.39 2.24 2.83 1.64 5.78 1.35 5.22-1.21-2.39-3.48-1.65-4.62-1.17\"/>";
|
|
126
|
+
readonly color: "#ff6e40";
|
|
127
|
+
readonly viewBox: "0 0 24 24";
|
|
128
|
+
};
|
|
129
|
+
readonly typescript: {
|
|
130
|
+
readonly inner: "<path fill=\"#0288d1\" d=\"M2 2v12h12V2zm4 6h3v1H8v4H7V9H6zm5 0h2v1h-2v1h1a1.003 1.003 0 0 1 1 1v1a1.003 1.003 0 0 1-1 1h-2v-1h2v-1h-1a1.003 1.003 0 0 1-1-1V9a1.003 1.003 0 0 1 1-1\"/>";
|
|
131
|
+
readonly color: "#0288d1";
|
|
132
|
+
readonly viewBox: "0 0 16 16";
|
|
133
|
+
};
|
|
134
|
+
readonly video: {
|
|
135
|
+
readonly inner: "<path fill=\"#ff9800\" d=\"m24 6 2 6h-4l-2-6h-3l2 6h-4l-2-6h-3l2 6H8L6 6H5a3 3 0 0 0-3 3v14a3 3 0 0 0 3 3h22a3 3 0 0 0 3-3V6Z\"/>";
|
|
136
|
+
readonly color: "#ff9800";
|
|
137
|
+
readonly viewBox: "0 0 32 32";
|
|
138
|
+
};
|
|
139
|
+
readonly word: {
|
|
140
|
+
readonly inner: "<path fill=\"#01579b\" d=\"M6 2h8l6 6v12a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2m7 1.5V9h5.5zM7 13l1.5 7h2l1.5-3 1.5 3h2l1.5-7h1v-2h-4v2h1l-.9 4.2L13 15h-2l-1.1 2.2L9 13h1v-2H6v2z\"/>";
|
|
141
|
+
readonly color: "#01579b";
|
|
142
|
+
readonly viewBox: "0 0 24 24";
|
|
143
|
+
};
|
|
144
|
+
readonly xml: {
|
|
145
|
+
readonly inner: "<path fill=\"#8bc34a\" d=\"M13 9h5.5L13 3.5zM6 2h8l6 6v12a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V4c0-1.11.89-2 2-2m.12 13.5 3.74 3.74 1.42-1.41-2.33-2.33 2.33-2.33-1.42-1.41zm11.16 0-3.74-3.74-1.42 1.41 2.33 2.33-2.33 2.33 1.42 1.41z\"/>";
|
|
146
|
+
readonly color: "#8bc34a";
|
|
147
|
+
readonly viewBox: "0 0 24 24";
|
|
148
|
+
};
|
|
149
|
+
readonly yaml: {
|
|
150
|
+
readonly inner: "<path fill=\"#ff5252\" d=\"M13 9h5.5L13 3.5zM6 2h8l6 6v12c0 1.1-.9 2-2 2H6c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2m12 16v-2H9v2zm-4-4v-2H6v2z\"/>";
|
|
151
|
+
readonly color: "#ff5252";
|
|
152
|
+
readonly viewBox: "0 0 24 24";
|
|
153
|
+
};
|
|
154
|
+
readonly zip: {
|
|
155
|
+
readonly inner: "<path fill=\"#afb42b\" d=\"M14 17h-2v-2h-2v-2h2v2h2m0-6h-2v2h2v2h-2v-2h-2V9h2V7h-2V5h2v2h2m5-4H5c-1.11 0-2 .89-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V5a2 2 0 0 0-2-2\"/>";
|
|
156
|
+
readonly color: "#afb42b";
|
|
157
|
+
readonly viewBox: "0 0 24 24";
|
|
158
|
+
};
|
|
159
|
+
};
|
|
160
|
+
export type FileIconName = keyof typeof FILE_ICONS;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { FILE_ICONS, FileIconName, FileIconData } from './icons.generated';
|
|
2
|
+
export declare const DEFAULT_FILE_ICON: FileIconName;
|
|
3
|
+
export interface ResolvedFileIcon extends FileIconData {
|
|
4
|
+
readonly name: FileIconName;
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* Resolve a file's icon from its filename and/or MIME type. Resolution order:
|
|
8
|
+
* exact extension → exact MIME → MIME category → {@link DEFAULT_FILE_ICON}.
|
|
9
|
+
*
|
|
10
|
+
* @param input filename (e.g. `report.docx`) or bare extension (`docx`)
|
|
11
|
+
* @param mimeType optional MIME type to disambiguate extension-less inputs
|
|
12
|
+
*/
|
|
13
|
+
export declare function resolveFileIcon(input?: string, mimeType?: string): ResolvedFileIcon;
|
|
14
|
+
export { FILE_ICONS };
|
|
15
|
+
export type { FileIconName, FileIconData };
|
package/dist/files.cjs
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const m=require("react/jsx-runtime"),f=require("react"),e={audio:{inner:'<path fill="#ef5350" d="M16 2a14 14 0 1 0 14 14A14 14 0 0 0 16 2m6 10h-4v8a4 4 0 1 1-4-4 3.96 3.96 0 0 1 2 .555V8h6Z"/>',color:"#ef5350",viewBox:"0 0 32 32"},console:{inner:'<path fill="#ff7043" d="M2 2a1 1 0 0 0-1 1v10c0 .554.446 1 1 1h12c.554 0 1-.446 1-1V3a1 1 0 0 0-1-1zm0 3h12v8H2zm1 2 2 2-2 2 1 1 3-3-3-3zm5 3.5V12h5v-1.5z"/>',color:"#ff7043",viewBox:"0 0 16 16"},cpp:{inner:'<path fill="#0288d1" d="M28 14v-4h-2v4h-6v-4h-2v4h-4v2h4v4h2v-4h6v4h2v-4h4v-2z"/><path fill="#0288d1" d="M13.563 22A5.57 5.57 0 0 1 8 16.437v-2.873A5.57 5.57 0 0 1 13.563 8H18V2h-4.437A11.563 11.563 0 0 0 2 13.563v2.873A11.564 11.564 0 0 0 13.563 28H18v-6Z"/>',color:"#0288d1",viewBox:"0 0 32 32"},csharp:{inner:'<path fill="#0288d1" d="M30 14v-2h-2V8h-2v4h-2V8h-2v4h-2v2h2v2h-2v2h2v4h2v-4h2v4h2v-4h2v-2h-2v-2Zm-4 2h-2v-2h2Zm-12.437 6A5.57 5.57 0 0 1 8 16.437v-2.873A5.57 5.57 0 0 1 13.563 8H18V2h-4.437A11.563 11.563 0 0 0 2 13.563v2.873A11.564 11.564 0 0 0 13.563 28H18v-6Z"/>',color:"#0288d1",viewBox:"0 0 32 32"},css:{inner:'<path fill="#7e57c2" d="M20 18h-2v-2h-2v2c0 .193 0 .703 1.254 1.033A3.345 3.345 0 0 1 20 22h2v2h2v-2c0-.388-.562-.851-1.254-1.034C20.356 20.34 20 18.84 20 18m-3.254 2.966C14.356 20.34 14 18.84 14 18h-2v-2h-2v8h2v-2h4v2h2v-2c0-.388-.562-.851-1.254-1.034"/><path fill="#7e57c2" d="M24 4H4v20a4 4 0 0 0 4 4h16.16A3.84 3.84 0 0 0 28 24.16V8a4 4 0 0 0-4-4m2 14h-2v-2h-2v2c0 .193 0 .703 1.254 1.033A3.345 3.345 0 0 1 26 22v2a2 2 0 0 1-2 2h-2a2 2 0 0 1-2-2 2 2 0 0 1-2 2h-2a2 2 0 0 1-2-2 2 2 0 0 1-2 2h-2a2 2 0 0 1-2-2v-8a2 2 0 0 1 2-2h2a2 2 0 0 1 2 2 2 2 0 0 1 2-2h2a2 2 0 0 1 2 2 2 2 0 0 1 2-2h2a2 2 0 0 1 2 2Z"/>',color:"#7e57c2",viewBox:"0 0 32 32"},database:{inner:'<path fill="#ffca28" d="M16 24c-5.525 0-10-.9-10-2v4c0 1.1 4.475 2 10 2s10-.9 10-2v-4c0 1.1-4.475 2-10 2m0-8c-5.525 0-10-.9-10-2v4c0 1.1 4.475 2 10 2s10-.9 10-2v-4c0 1.1-4.475 2-10 2m0-12C10.477 4 6 4.895 6 6v4c0 1.1 4.475 2 10 2s10-.9 10-2V6c0-1.105-4.477-2-10-2"/>',color:"#ffca28",viewBox:"0 0 32 32"},document:{inner:'<path fill="#42a5f5" d="M8 16h8v2H8zm0-4h8v2H8zm6-10H6c-1.1 0-2 .9-2 2v16c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8zm4 18H6V4h7v5h5z"/>',color:"#42a5f5",viewBox:"0 0 24 24"},email:{inner:'<path fill="#42a5f5" d="M28 6H4a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h24a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2m0 6-12 6-12-6V8l12 6 12-6Z"/>',color:"#42a5f5",viewBox:"0 0 32 32"},excel:{inner:'<path fill="#8bc34a" d="M6 2h8l6 6v12a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2m7 1.5V9h5.5zm4 7.5h-4v2h1l-2 1.67L10 13h1v-2H7v2h1l3 2.5L8 18H7v2h4v-2h-1l2-1.67L14 18h-1v2h4v-2h-1l-3-2.5 3-2.5h1z"/>',color:"#8bc34a",viewBox:"0 0 24 24"},exe:{inner:'<path fill="#e64a19" d="M28 4H4a2 2 0 0 0-2 2v20a2 2 0 0 0 2 2h24a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2m0 22H4V10h24Z"/>',color:"#e64a19",viewBox:"0 0 32 32"},go:{inner:'<path fill="#00acc1" d="M2 12h4v2H2zm-2 4h6v2H0zm4 4h2v2H4zm16.954-5H14v3h3.239a4.42 4.42 0 0 1-3.531 2 2.65 2.65 0 0 1-2.053-.858 2.86 2.86 0 0 1-.628-2.28A4.515 4.515 0 0 1 15.292 13a2.73 2.73 0 0 1 1.749.584l2.962-1.185A5.6 5.6 0 0 0 15.292 10a7.526 7.526 0 0 0-7.243 6.5 5.614 5.614 0 0 0 5.659 6.5 7.526 7.526 0 0 0 7.243-6.5 6.4 6.4 0 0 0 .003-1.5"/><path fill="#00acc1" d="M26.292 10a7.526 7.526 0 0 0-7.243 6.5 5.614 5.614 0 0 0 5.659 6.5 7.526 7.526 0 0 0 7.243-6.5 5.614 5.614 0 0 0-5.659-6.5m2.681 6.137A4.515 4.515 0 0 1 24.708 20a2.65 2.65 0 0 1-2.053-.858 2.86 2.86 0 0 1-.628-2.28A4.515 4.515 0 0 1 26.292 13a2.65 2.65 0 0 1 2.053.858 2.86 2.86 0 0 1 .628 2.28Z"/>',color:"#00acc1",viewBox:"0 0 32 32"},html:{inner:'<path fill="#e65100" d="m4 4 2 22 10 2 10-2 2-22Zm19.72 7H11.28l.29 3h11.86l-.802 9.335L15.99 25l-6.635-1.646L8.93 19h3.02l.19 2 3.86.77 3.84-.77.29-4H8.84L8 8h16Z"/>',color:"#e65100",viewBox:"0 0 32 32"},image:{inner:'<path fill="#26a69a" d="M8.5 6h4l-4-4zM3.875 1H9.5l4 4v8.6c0 .773-.616 1.4-1.375 1.4h-8.25c-.76 0-1.375-.627-1.375-1.4V2.4c0-.777.612-1.4 1.375-1.4M4 13.6h8V8l-2.625 2.8L8 9.4zm1.25-7.7c-.76 0-1.375.627-1.375 1.4s.616 1.4 1.375 1.4c.76 0 1.375-.627 1.375-1.4S6.009 5.9 5.25 5.9"/>',color:"#26a69a",viewBox:"0 0 16 16"},java:{inner:'<path fill="#f44336" d="M4 26h24v2H4zM28 4H7a1 1 0 0 0-1 1v13a4 4 0 0 0 4 4h10a4 4 0 0 0 4-4v-4h4a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2m0 8h-4V6h4Z"/>',color:"#f44336",viewBox:"0 0 32 32"},javascript:{inner:'<path fill="#ffca28" d="M2 2v12h12V2zm6 6h1v4a1.003 1.003 0 0 1-1 1H7a1.003 1.003 0 0 1-1-1v-1h1v1h1zm3 0h2v1h-2v1h1a1.003 1.003 0 0 1 1 1v1a1.003 1.003 0 0 1-1 1h-2v-1h2v-1h-1a1.003 1.003 0 0 1-1-1V9a1.003 1.003 0 0 1 1-1"/>',color:"#ffca28",viewBox:"0 0 16 16"},json:{inner:'<path fill="#f9a825" d="M560-160v-80h120q17 0 28.5-11.5T720-280v-80q0-38 22-69t58-44v-14q-36-13-58-44t-22-69v-80q0-17-11.5-28.5T680-720H560v-80h120q50 0 85 35t35 85v80q0 17 11.5 28.5T840-560h40v160h-40q-17 0-28.5 11.5T800-360v80q0 50-35 85t-85 35zm-280 0q-50 0-85-35t-35-85v-80q0-17-11.5-28.5T120-400H80v-160h40q17 0 28.5-11.5T160-600v-80q0-50 35-85t85-35h120v80H280q-17 0-28.5 11.5T240-680v80q0 38-22 69t-58 44v14q36 13 58 44t22 69v80q0 17 11.5 28.5T280-240h120v80z"/>',color:"#f9a825",viewBox:"0 -960 960 960"},markdown:{inner:'<path fill="#42a5f5" d="m14 10-4 3.5L6 10H4v12h4v-6l2 2 2-2v6h4V10zm12 6v-6h-4v6h-4l6 8 6-8z"/>',color:"#42a5f5",viewBox:"0 0 32 32"},pdf:{inner:'<path fill="#ef5350" d="M13 9h5.5L13 3.5zM6 2h8l6 6v12a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2m4.93 10.44c.41.9.93 1.64 1.53 2.15l.41.32c-.87.16-2.07.44-3.34.93l-.11.04.5-1.04c.45-.87.78-1.66 1.01-2.4m6.48 3.81c.18-.18.27-.41.28-.66.03-.2-.02-.39-.12-.55-.29-.47-1.04-.69-2.28-.69l-1.29.07-.87-.58c-.63-.52-1.2-1.43-1.6-2.56l.04-.14c.33-1.33.64-2.94-.02-3.6a.85.85 0 0 0-.61-.24h-.24c-.37 0-.7.39-.79.77-.37 1.33-.15 2.06.22 3.27v.01c-.25.88-.57 1.9-1.08 2.93l-.96 1.8-.89.49c-1.2.75-1.77 1.59-1.88 2.12-.04.19-.02.36.05.54l.03.05.48.31.44.11c.81 0 1.73-.95 2.97-3.07l.18-.07c1.03-.33 2.31-.56 4.03-.75 1.03.51 2.24.74 3 .74.44 0 .74-.11.91-.3m-.41-.71.09.11c-.01.1-.04.11-.09.13h-.04l-.19.02c-.46 0-1.17-.19-1.9-.51.09-.1.13-.1.23-.1 1.4 0 1.8.25 1.9.35M7.83 17c-.65 1.19-1.24 1.85-1.69 2 .05-.38.5-1.04 1.21-1.69zm3.02-6.91c-.23-.9-.24-1.63-.07-2.05l.07-.12.15.05c.17.24.19.56.09 1.1l-.03.16-.16.82z"/>',color:"#ef5350",viewBox:"0 0 24 24"},powerpoint:{inner:'<path fill="#e64a19" d="M6 2h8l6 6v12a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2m7 1.5V9h5.5zM8 11v2h1v6H8v1h4v-1h-1v-2h2a3 3 0 0 0 3-3 3 3 0 0 0-3-3zm5 2a1 1 0 0 1 1 1 1 1 0 0 1-1 1h-2v-2z"/>',color:"#e64a19",viewBox:"0 0 24 24"},python:{inner:'<path fill="#0288d1" d="M9.86 2A2.86 2.86 0 0 0 7 4.86v1.68h4.29c.39 0 .71.57.71.96H4.86A2.86 2.86 0 0 0 2 10.36v3.781a2.86 2.86 0 0 0 2.86 2.86h1.18v-2.68a2.85 2.85 0 0 1 2.85-2.86h5.25c1.58 0 2.86-1.271 2.86-2.851V4.86A2.86 2.86 0 0 0 14.14 2zm-.72 1.61c.4 0 .72.12.72.71s-.32.891-.72.891c-.39 0-.71-.3-.71-.89s.32-.711.71-.711"/><path fill="#fdd835" d="M17.959 7v2.68a2.85 2.85 0 0 1-2.85 2.859H9.86A2.85 2.85 0 0 0 7 15.389v3.75a2.86 2.86 0 0 0 2.86 2.86h4.28A2.86 2.86 0 0 0 17 19.14v-1.68h-4.291c-.39 0-.709-.57-.709-.96h7.14A2.86 2.86 0 0 0 22 13.64V9.86A2.86 2.86 0 0 0 19.14 7zM8.32 11.513l-.004.004.038-.004zm6.54 7.276c.39 0 .71.3.71.89a.71.71 0 0 1-.71.71c-.4 0-.72-.12-.72-.71s.32-.89.72-.89"/>',color:"#0288d1",viewBox:"0 0 24 24"},ruby:{inner:'<path fill="#f44336" d="M18.041 3.177c2.24.382 2.879 1.919 2.843 3.527V6.67l-1.013 13.266-13.132.897h.008c-1.093-.044-3.518-.151-3.634-3.545l1.217-2.222 2.462 5.74 2.097-6.77-.045.009.018-.018 6.85 2.186L13.945 9.3l6.53-.409-5.144-4.212 2.71-1.51v.009M3.113 17.252v.017zM6.916 6.874c2.63-2.622 6.033-4.168 7.34-2.844 1.297 1.306-.072 4.523-2.702 7.135-2.666 2.613-6.015 4.248-7.322 2.933-1.306-1.324.036-4.612 2.675-7.224z"/>',color:"#f44336",viewBox:"0 0 24 24"},rust:{inner:'<path fill="#ff7043" d="m30 12-4-2V6h-4l-2-4-4 2-4-2-2 4H6v4l-4 2 2 4-2 4 4 2v4h4l2 4 4-2 4 2 2-4h4v-4l4-2-2-4ZM6 16a9.9 9.9 0 0 1 .842-4H10v8H6.842A9.9 9.9 0 0 1 6 16m10 10a9.98 9.98 0 0 1-7.978-4H16v-2h-2v-2h4c.819.819.297 2.308 1.179 3.37a1.89 1.89 0 0 0 1.46.63h3.34A9.98 9.98 0 0 1 16 26m-2-12v-2h4a1 1 0 0 1 0 2Zm11.158 6H24a2.006 2.006 0 0 1-2-2 2 2 0 0 0-2-2 3 3 0 0 0 3-3q0-.08-.004-.161A3.115 3.115 0 0 0 19.83 10H8.022a9.986 9.986 0 0 1 17.136 10"/>',color:"#ff7043",viewBox:"0 0 32 32"},settings:{inner:'<path fill="#42a5f5" d="M19.43 12.98c.04-.32.07-.64.07-.98s-.03-.66-.07-.98l2.11-1.65c.19-.15.24-.42.12-.64l-2-3.46a.5.5 0 0 0-.61-.22l-2.49 1c-.52-.4-1.08-.73-1.69-.98l-.38-2.65A.49.49 0 0 0 14 2h-4c-.25 0-.46.18-.49.42l-.38 2.65c-.61.25-1.17.59-1.69.98l-2.49-1a.6.6 0 0 0-.18-.03c-.17 0-.34.09-.43.25l-2 3.46c-.13.22-.07.49.12.64l2.11 1.65c-.04.32-.07.65-.07.98s.03.66.07.98l-2.11 1.65c-.19.15-.24.42-.12.64l2 3.46a.5.5 0 0 0 .61.22l2.49-1c.52.4 1.08.73 1.69.98l.38 2.65c.03.24.24.42.49.42h4c.25 0 .46-.18.49-.42l.38-2.65c.61-.25 1.17-.59 1.69-.98l2.49 1q.09.03.18.03c.17 0 .34-.09.43-.25l2-3.46c.12-.22.07-.49-.12-.64zm-1.98-1.71c.04.31.05.52.05.73s-.02.43-.05.73l-.14 1.13.89.7 1.08.84-.7 1.21-1.27-.51-1.04-.42-.9.68c-.43.32-.84.56-1.25.73l-1.06.43-.16 1.13-.2 1.35h-1.4l-.19-1.35-.16-1.13-1.06-.43c-.43-.18-.83-.41-1.23-.71l-.91-.7-1.06.43-1.27.51-.7-1.21 1.08-.84.89-.7-.14-1.13c-.03-.31-.05-.54-.05-.74s.02-.43.05-.73l.14-1.13-.89-.7-1.08-.84.7-1.21 1.27.51 1.04.42.9-.68c.43-.32.84-.56 1.25-.73l1.06-.43.16-1.13.2-1.35h1.39l.19 1.35.16 1.13 1.06.43c.43.18.83.41 1.23.71l.91.7 1.06-.43 1.27-.51.7 1.21-1.07.85-.89.7zM12 8c-2.21 0-4 1.79-4 4s1.79 4 4 4 4-1.79 4-4-1.79-4-4-4m0 6c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2"/>',color:"#42a5f5",viewBox:"0 0 24 24"},swift:{inner:'<path fill="#ff6e40" d="M17.087 19.721c-2.36 1.36-5.59 1.5-8.86.1a13.8 13.8 0 0 1-6.23-5.32c.67.55 1.46 1 2.3 1.4 3.37 1.57 6.73 1.46 9.1 0-3.37-2.59-6.24-5.96-8.37-8.71-.45-.45-.78-1.01-1.12-1.51 8.28 6.05 7.92 7.59 2.41-1.01 4.89 4.94 9.43 7.74 9.43 7.74.16.09.25.16.36.22.1-.25.19-.51.26-.78.79-2.85-.11-6.12-2.08-8.81 4.55 2.75 7.25 7.91 6.12 12.24-.03.11-.06.22-.05.39 2.24 2.83 1.64 5.78 1.35 5.22-1.21-2.39-3.48-1.65-4.62-1.17"/>',color:"#ff6e40",viewBox:"0 0 24 24"},typescript:{inner:'<path fill="#0288d1" d="M2 2v12h12V2zm4 6h3v1H8v4H7V9H6zm5 0h2v1h-2v1h1a1.003 1.003 0 0 1 1 1v1a1.003 1.003 0 0 1-1 1h-2v-1h2v-1h-1a1.003 1.003 0 0 1-1-1V9a1.003 1.003 0 0 1 1-1"/>',color:"#0288d1",viewBox:"0 0 16 16"},video:{inner:'<path fill="#ff9800" d="m24 6 2 6h-4l-2-6h-3l2 6h-4l-2-6h-3l2 6H8L6 6H5a3 3 0 0 0-3 3v14a3 3 0 0 0 3 3h22a3 3 0 0 0 3-3V6Z"/>',color:"#ff9800",viewBox:"0 0 32 32"},word:{inner:'<path fill="#01579b" d="M6 2h8l6 6v12a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2m7 1.5V9h5.5zM7 13l1.5 7h2l1.5-3 1.5 3h2l1.5-7h1v-2h-4v2h1l-.9 4.2L13 15h-2l-1.1 2.2L9 13h1v-2H6v2z"/>',color:"#01579b",viewBox:"0 0 24 24"},xml:{inner:'<path fill="#8bc34a" d="M13 9h5.5L13 3.5zM6 2h8l6 6v12a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V4c0-1.11.89-2 2-2m.12 13.5 3.74 3.74 1.42-1.41-2.33-2.33 2.33-2.33-1.42-1.41zm11.16 0-3.74-3.74-1.42 1.41 2.33 2.33-2.33 2.33 1.42 1.41z"/>',color:"#8bc34a",viewBox:"0 0 24 24"},yaml:{inner:'<path fill="#ff5252" d="M13 9h5.5L13 3.5zM6 2h8l6 6v12c0 1.1-.9 2-2 2H6c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2m12 16v-2H9v2zm-4-4v-2H6v2z"/>',color:"#ff5252",viewBox:"0 0 24 24"},zip:{inner:'<path fill="#afb42b" d="M14 17h-2v-2h-2v-2h2v2h2m0-6h-2v2h2v2h-2v-2h-2V9h2V7h-2V5h2v2h2m5-4H5c-1.11 0-2 .89-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V5a2 2 0 0 0-2-2"/>',color:"#afb42b",viewBox:"0 0 24 24"}},d={doc:"word",docx:"word",odt:"word",rtf:"word",xls:"excel",xlsx:"excel",xlsm:"excel",ods:"excel",csv:"excel",ppt:"powerpoint",pptx:"powerpoint",odp:"powerpoint",pdf:"pdf",txt:"document",md:"markdown",markdown:"markdown",js:"javascript",mjs:"javascript",cjs:"javascript",jsx:"javascript",ts:"typescript",tsx:"typescript",py:"python",java:"java",go:"go",rs:"rust",rb:"ruby",swift:"swift",cs:"csharp",c:"cpp",cpp:"cpp",cc:"cpp",h:"cpp",hpp:"cpp",json:"json",xml:"xml",html:"html",htm:"html",css:"css",scss:"css",sql:"database",sh:"console",bash:"console",zsh:"console",ps1:"console",yaml:"yaml",yml:"yaml",zip:"zip",tar:"zip",gz:"zip",rar:"zip","7z":"zip",db:"database",sqlite:"database",eml:"email",msg:"email",exe:"exe"},x={"application/pdf":"pdf","application/msword":"word","application/vnd.openxmlformats-officedocument.wordprocessingml.document":"word","application/vnd.ms-excel":"excel","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":"excel","text/csv":"excel","application/vnd.ms-powerpoint":"powerpoint","application/vnd.openxmlformats-officedocument.presentationml.presentation":"powerpoint","application/json":"json","application/xml":"xml","text/xml":"xml","text/html":"html","text/css":"css","text/markdown":"markdown","application/zip":"zip","application/x-zip-compressed":"zip","message/rfc822":"email"},w={image:"image",audio:"audio",video:"video",text:"document"},v="document";function z(a){const l=a.lastIndexOf(".");return l>0?a.slice(l+1).toLowerCase():""}function i(a="",l=""){const h=z(a)||a.toLowerCase(),o=d[h]??x[l.toLowerCase()]??w[l.split("/")[0]?.toLowerCase()??""]??v;return{name:o,...e[o]}}const H=f.forwardRef(function({file:l,mimeType:h,size:o=24,loading:t=!1,className:n,...r},p){const c=i(l,h),s=["illuma-fi",t?"illuma-fi--loading":"",n].filter(Boolean).join(" ");return m.jsx("svg",{ref:p,width:o,height:o,viewBox:c.viewBox,className:s,role:"img","aria-label":`${c.name} file`,dangerouslySetInnerHTML:{__html:c.inner},...r})});exports.DEFAULT_FILE_ICON=v;exports.FILE_ICONS=e;exports.FileIcon=H;exports.resolveFileIcon=i;
|
|
2
|
+
//# sourceMappingURL=files.cjs.map
|
package/dist/files.es.js
ADDED
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
import { jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as p } from "react";
|
|
3
|
+
const s = {
|
|
4
|
+
audio: { inner: '<path fill="#ef5350" d="M16 2a14 14 0 1 0 14 14A14 14 0 0 0 16 2m6 10h-4v8a4 4 0 1 1-4-4 3.96 3.96 0 0 1 2 .555V8h6Z"/>', color: "#ef5350", viewBox: "0 0 32 32" },
|
|
5
|
+
console: { inner: '<path fill="#ff7043" d="M2 2a1 1 0 0 0-1 1v10c0 .554.446 1 1 1h12c.554 0 1-.446 1-1V3a1 1 0 0 0-1-1zm0 3h12v8H2zm1 2 2 2-2 2 1 1 3-3-3-3zm5 3.5V12h5v-1.5z"/>', color: "#ff7043", viewBox: "0 0 16 16" },
|
|
6
|
+
cpp: { inner: '<path fill="#0288d1" d="M28 14v-4h-2v4h-6v-4h-2v4h-4v2h4v4h2v-4h6v4h2v-4h4v-2z"/><path fill="#0288d1" d="M13.563 22A5.57 5.57 0 0 1 8 16.437v-2.873A5.57 5.57 0 0 1 13.563 8H18V2h-4.437A11.563 11.563 0 0 0 2 13.563v2.873A11.564 11.564 0 0 0 13.563 28H18v-6Z"/>', color: "#0288d1", viewBox: "0 0 32 32" },
|
|
7
|
+
csharp: { inner: '<path fill="#0288d1" d="M30 14v-2h-2V8h-2v4h-2V8h-2v4h-2v2h2v2h-2v2h2v4h2v-4h2v4h2v-4h2v-2h-2v-2Zm-4 2h-2v-2h2Zm-12.437 6A5.57 5.57 0 0 1 8 16.437v-2.873A5.57 5.57 0 0 1 13.563 8H18V2h-4.437A11.563 11.563 0 0 0 2 13.563v2.873A11.564 11.564 0 0 0 13.563 28H18v-6Z"/>', color: "#0288d1", viewBox: "0 0 32 32" },
|
|
8
|
+
css: { inner: '<path fill="#7e57c2" d="M20 18h-2v-2h-2v2c0 .193 0 .703 1.254 1.033A3.345 3.345 0 0 1 20 22h2v2h2v-2c0-.388-.562-.851-1.254-1.034C20.356 20.34 20 18.84 20 18m-3.254 2.966C14.356 20.34 14 18.84 14 18h-2v-2h-2v8h2v-2h4v2h2v-2c0-.388-.562-.851-1.254-1.034"/><path fill="#7e57c2" d="M24 4H4v20a4 4 0 0 0 4 4h16.16A3.84 3.84 0 0 0 28 24.16V8a4 4 0 0 0-4-4m2 14h-2v-2h-2v2c0 .193 0 .703 1.254 1.033A3.345 3.345 0 0 1 26 22v2a2 2 0 0 1-2 2h-2a2 2 0 0 1-2-2 2 2 0 0 1-2 2h-2a2 2 0 0 1-2-2 2 2 0 0 1-2 2h-2a2 2 0 0 1-2-2v-8a2 2 0 0 1 2-2h2a2 2 0 0 1 2 2 2 2 0 0 1 2-2h2a2 2 0 0 1 2 2 2 2 0 0 1 2-2h2a2 2 0 0 1 2 2Z"/>', color: "#7e57c2", viewBox: "0 0 32 32" },
|
|
9
|
+
database: { inner: '<path fill="#ffca28" d="M16 24c-5.525 0-10-.9-10-2v4c0 1.1 4.475 2 10 2s10-.9 10-2v-4c0 1.1-4.475 2-10 2m0-8c-5.525 0-10-.9-10-2v4c0 1.1 4.475 2 10 2s10-.9 10-2v-4c0 1.1-4.475 2-10 2m0-12C10.477 4 6 4.895 6 6v4c0 1.1 4.475 2 10 2s10-.9 10-2V6c0-1.105-4.477-2-10-2"/>', color: "#ffca28", viewBox: "0 0 32 32" },
|
|
10
|
+
document: { inner: '<path fill="#42a5f5" d="M8 16h8v2H8zm0-4h8v2H8zm6-10H6c-1.1 0-2 .9-2 2v16c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8zm4 18H6V4h7v5h5z"/>', color: "#42a5f5", viewBox: "0 0 24 24" },
|
|
11
|
+
email: { inner: '<path fill="#42a5f5" d="M28 6H4a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h24a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2m0 6-12 6-12-6V8l12 6 12-6Z"/>', color: "#42a5f5", viewBox: "0 0 32 32" },
|
|
12
|
+
excel: { inner: '<path fill="#8bc34a" d="M6 2h8l6 6v12a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2m7 1.5V9h5.5zm4 7.5h-4v2h1l-2 1.67L10 13h1v-2H7v2h1l3 2.5L8 18H7v2h4v-2h-1l2-1.67L14 18h-1v2h4v-2h-1l-3-2.5 3-2.5h1z"/>', color: "#8bc34a", viewBox: "0 0 24 24" },
|
|
13
|
+
exe: { inner: '<path fill="#e64a19" d="M28 4H4a2 2 0 0 0-2 2v20a2 2 0 0 0 2 2h24a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2m0 22H4V10h24Z"/>', color: "#e64a19", viewBox: "0 0 32 32" },
|
|
14
|
+
go: { inner: '<path fill="#00acc1" d="M2 12h4v2H2zm-2 4h6v2H0zm4 4h2v2H4zm16.954-5H14v3h3.239a4.42 4.42 0 0 1-3.531 2 2.65 2.65 0 0 1-2.053-.858 2.86 2.86 0 0 1-.628-2.28A4.515 4.515 0 0 1 15.292 13a2.73 2.73 0 0 1 1.749.584l2.962-1.185A5.6 5.6 0 0 0 15.292 10a7.526 7.526 0 0 0-7.243 6.5 5.614 5.614 0 0 0 5.659 6.5 7.526 7.526 0 0 0 7.243-6.5 6.4 6.4 0 0 0 .003-1.5"/><path fill="#00acc1" d="M26.292 10a7.526 7.526 0 0 0-7.243 6.5 5.614 5.614 0 0 0 5.659 6.5 7.526 7.526 0 0 0 7.243-6.5 5.614 5.614 0 0 0-5.659-6.5m2.681 6.137A4.515 4.515 0 0 1 24.708 20a2.65 2.65 0 0 1-2.053-.858 2.86 2.86 0 0 1-.628-2.28A4.515 4.515 0 0 1 26.292 13a2.65 2.65 0 0 1 2.053.858 2.86 2.86 0 0 1 .628 2.28Z"/>', color: "#00acc1", viewBox: "0 0 32 32" },
|
|
15
|
+
html: { inner: '<path fill="#e65100" d="m4 4 2 22 10 2 10-2 2-22Zm19.72 7H11.28l.29 3h11.86l-.802 9.335L15.99 25l-6.635-1.646L8.93 19h3.02l.19 2 3.86.77 3.84-.77.29-4H8.84L8 8h16Z"/>', color: "#e65100", viewBox: "0 0 32 32" },
|
|
16
|
+
image: { inner: '<path fill="#26a69a" d="M8.5 6h4l-4-4zM3.875 1H9.5l4 4v8.6c0 .773-.616 1.4-1.375 1.4h-8.25c-.76 0-1.375-.627-1.375-1.4V2.4c0-.777.612-1.4 1.375-1.4M4 13.6h8V8l-2.625 2.8L8 9.4zm1.25-7.7c-.76 0-1.375.627-1.375 1.4s.616 1.4 1.375 1.4c.76 0 1.375-.627 1.375-1.4S6.009 5.9 5.25 5.9"/>', color: "#26a69a", viewBox: "0 0 16 16" },
|
|
17
|
+
java: { inner: '<path fill="#f44336" d="M4 26h24v2H4zM28 4H7a1 1 0 0 0-1 1v13a4 4 0 0 0 4 4h10a4 4 0 0 0 4-4v-4h4a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2m0 8h-4V6h4Z"/>', color: "#f44336", viewBox: "0 0 32 32" },
|
|
18
|
+
javascript: { inner: '<path fill="#ffca28" d="M2 2v12h12V2zm6 6h1v4a1.003 1.003 0 0 1-1 1H7a1.003 1.003 0 0 1-1-1v-1h1v1h1zm3 0h2v1h-2v1h1a1.003 1.003 0 0 1 1 1v1a1.003 1.003 0 0 1-1 1h-2v-1h2v-1h-1a1.003 1.003 0 0 1-1-1V9a1.003 1.003 0 0 1 1-1"/>', color: "#ffca28", viewBox: "0 0 16 16" },
|
|
19
|
+
json: { inner: '<path fill="#f9a825" d="M560-160v-80h120q17 0 28.5-11.5T720-280v-80q0-38 22-69t58-44v-14q-36-13-58-44t-22-69v-80q0-17-11.5-28.5T680-720H560v-80h120q50 0 85 35t35 85v80q0 17 11.5 28.5T840-560h40v160h-40q-17 0-28.5 11.5T800-360v80q0 50-35 85t-85 35zm-280 0q-50 0-85-35t-35-85v-80q0-17-11.5-28.5T120-400H80v-160h40q17 0 28.5-11.5T160-600v-80q0-50 35-85t85-35h120v80H280q-17 0-28.5 11.5T240-680v80q0 38-22 69t-58 44v14q36 13 58 44t22 69v80q0 17 11.5 28.5T280-240h120v80z"/>', color: "#f9a825", viewBox: "0 -960 960 960" },
|
|
20
|
+
markdown: { inner: '<path fill="#42a5f5" d="m14 10-4 3.5L6 10H4v12h4v-6l2 2 2-2v6h4V10zm12 6v-6h-4v6h-4l6 8 6-8z"/>', color: "#42a5f5", viewBox: "0 0 32 32" },
|
|
21
|
+
pdf: { inner: '<path fill="#ef5350" d="M13 9h5.5L13 3.5zM6 2h8l6 6v12a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2m4.93 10.44c.41.9.93 1.64 1.53 2.15l.41.32c-.87.16-2.07.44-3.34.93l-.11.04.5-1.04c.45-.87.78-1.66 1.01-2.4m6.48 3.81c.18-.18.27-.41.28-.66.03-.2-.02-.39-.12-.55-.29-.47-1.04-.69-2.28-.69l-1.29.07-.87-.58c-.63-.52-1.2-1.43-1.6-2.56l.04-.14c.33-1.33.64-2.94-.02-3.6a.85.85 0 0 0-.61-.24h-.24c-.37 0-.7.39-.79.77-.37 1.33-.15 2.06.22 3.27v.01c-.25.88-.57 1.9-1.08 2.93l-.96 1.8-.89.49c-1.2.75-1.77 1.59-1.88 2.12-.04.19-.02.36.05.54l.03.05.48.31.44.11c.81 0 1.73-.95 2.97-3.07l.18-.07c1.03-.33 2.31-.56 4.03-.75 1.03.51 2.24.74 3 .74.44 0 .74-.11.91-.3m-.41-.71.09.11c-.01.1-.04.11-.09.13h-.04l-.19.02c-.46 0-1.17-.19-1.9-.51.09-.1.13-.1.23-.1 1.4 0 1.8.25 1.9.35M7.83 17c-.65 1.19-1.24 1.85-1.69 2 .05-.38.5-1.04 1.21-1.69zm3.02-6.91c-.23-.9-.24-1.63-.07-2.05l.07-.12.15.05c.17.24.19.56.09 1.1l-.03.16-.16.82z"/>', color: "#ef5350", viewBox: "0 0 24 24" },
|
|
22
|
+
powerpoint: { inner: '<path fill="#e64a19" d="M6 2h8l6 6v12a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2m7 1.5V9h5.5zM8 11v2h1v6H8v1h4v-1h-1v-2h2a3 3 0 0 0 3-3 3 3 0 0 0-3-3zm5 2a1 1 0 0 1 1 1 1 1 0 0 1-1 1h-2v-2z"/>', color: "#e64a19", viewBox: "0 0 24 24" },
|
|
23
|
+
python: { inner: '<path fill="#0288d1" d="M9.86 2A2.86 2.86 0 0 0 7 4.86v1.68h4.29c.39 0 .71.57.71.96H4.86A2.86 2.86 0 0 0 2 10.36v3.781a2.86 2.86 0 0 0 2.86 2.86h1.18v-2.68a2.85 2.85 0 0 1 2.85-2.86h5.25c1.58 0 2.86-1.271 2.86-2.851V4.86A2.86 2.86 0 0 0 14.14 2zm-.72 1.61c.4 0 .72.12.72.71s-.32.891-.72.891c-.39 0-.71-.3-.71-.89s.32-.711.71-.711"/><path fill="#fdd835" d="M17.959 7v2.68a2.85 2.85 0 0 1-2.85 2.859H9.86A2.85 2.85 0 0 0 7 15.389v3.75a2.86 2.86 0 0 0 2.86 2.86h4.28A2.86 2.86 0 0 0 17 19.14v-1.68h-4.291c-.39 0-.709-.57-.709-.96h7.14A2.86 2.86 0 0 0 22 13.64V9.86A2.86 2.86 0 0 0 19.14 7zM8.32 11.513l-.004.004.038-.004zm6.54 7.276c.39 0 .71.3.71.89a.71.71 0 0 1-.71.71c-.4 0-.72-.12-.72-.71s.32-.89.72-.89"/>', color: "#0288d1", viewBox: "0 0 24 24" },
|
|
24
|
+
ruby: { inner: '<path fill="#f44336" d="M18.041 3.177c2.24.382 2.879 1.919 2.843 3.527V6.67l-1.013 13.266-13.132.897h.008c-1.093-.044-3.518-.151-3.634-3.545l1.217-2.222 2.462 5.74 2.097-6.77-.045.009.018-.018 6.85 2.186L13.945 9.3l6.53-.409-5.144-4.212 2.71-1.51v.009M3.113 17.252v.017zM6.916 6.874c2.63-2.622 6.033-4.168 7.34-2.844 1.297 1.306-.072 4.523-2.702 7.135-2.666 2.613-6.015 4.248-7.322 2.933-1.306-1.324.036-4.612 2.675-7.224z"/>', color: "#f44336", viewBox: "0 0 24 24" },
|
|
25
|
+
rust: { inner: '<path fill="#ff7043" d="m30 12-4-2V6h-4l-2-4-4 2-4-2-2 4H6v4l-4 2 2 4-2 4 4 2v4h4l2 4 4-2 4 2 2-4h4v-4l4-2-2-4ZM6 16a9.9 9.9 0 0 1 .842-4H10v8H6.842A9.9 9.9 0 0 1 6 16m10 10a9.98 9.98 0 0 1-7.978-4H16v-2h-2v-2h4c.819.819.297 2.308 1.179 3.37a1.89 1.89 0 0 0 1.46.63h3.34A9.98 9.98 0 0 1 16 26m-2-12v-2h4a1 1 0 0 1 0 2Zm11.158 6H24a2.006 2.006 0 0 1-2-2 2 2 0 0 0-2-2 3 3 0 0 0 3-3q0-.08-.004-.161A3.115 3.115 0 0 0 19.83 10H8.022a9.986 9.986 0 0 1 17.136 10"/>', color: "#ff7043", viewBox: "0 0 32 32" },
|
|
26
|
+
settings: { inner: '<path fill="#42a5f5" d="M19.43 12.98c.04-.32.07-.64.07-.98s-.03-.66-.07-.98l2.11-1.65c.19-.15.24-.42.12-.64l-2-3.46a.5.5 0 0 0-.61-.22l-2.49 1c-.52-.4-1.08-.73-1.69-.98l-.38-2.65A.49.49 0 0 0 14 2h-4c-.25 0-.46.18-.49.42l-.38 2.65c-.61.25-1.17.59-1.69.98l-2.49-1a.6.6 0 0 0-.18-.03c-.17 0-.34.09-.43.25l-2 3.46c-.13.22-.07.49.12.64l2.11 1.65c-.04.32-.07.65-.07.98s.03.66.07.98l-2.11 1.65c-.19.15-.24.42-.12.64l2 3.46a.5.5 0 0 0 .61.22l2.49-1c.52.4 1.08.73 1.69.98l.38 2.65c.03.24.24.42.49.42h4c.25 0 .46-.18.49-.42l.38-2.65c.61-.25 1.17-.59 1.69-.98l2.49 1q.09.03.18.03c.17 0 .34-.09.43-.25l2-3.46c.12-.22.07-.49-.12-.64zm-1.98-1.71c.04.31.05.52.05.73s-.02.43-.05.73l-.14 1.13.89.7 1.08.84-.7 1.21-1.27-.51-1.04-.42-.9.68c-.43.32-.84.56-1.25.73l-1.06.43-.16 1.13-.2 1.35h-1.4l-.19-1.35-.16-1.13-1.06-.43c-.43-.18-.83-.41-1.23-.71l-.91-.7-1.06.43-1.27.51-.7-1.21 1.08-.84.89-.7-.14-1.13c-.03-.31-.05-.54-.05-.74s.02-.43.05-.73l.14-1.13-.89-.7-1.08-.84.7-1.21 1.27.51 1.04.42.9-.68c.43-.32.84-.56 1.25-.73l1.06-.43.16-1.13.2-1.35h1.39l.19 1.35.16 1.13 1.06.43c.43.18.83.41 1.23.71l.91.7 1.06-.43 1.27-.51.7 1.21-1.07.85-.89.7zM12 8c-2.21 0-4 1.79-4 4s1.79 4 4 4 4-1.79 4-4-1.79-4-4-4m0 6c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2"/>', color: "#42a5f5", viewBox: "0 0 24 24" },
|
|
27
|
+
swift: { inner: '<path fill="#ff6e40" d="M17.087 19.721c-2.36 1.36-5.59 1.5-8.86.1a13.8 13.8 0 0 1-6.23-5.32c.67.55 1.46 1 2.3 1.4 3.37 1.57 6.73 1.46 9.1 0-3.37-2.59-6.24-5.96-8.37-8.71-.45-.45-.78-1.01-1.12-1.51 8.28 6.05 7.92 7.59 2.41-1.01 4.89 4.94 9.43 7.74 9.43 7.74.16.09.25.16.36.22.1-.25.19-.51.26-.78.79-2.85-.11-6.12-2.08-8.81 4.55 2.75 7.25 7.91 6.12 12.24-.03.11-.06.22-.05.39 2.24 2.83 1.64 5.78 1.35 5.22-1.21-2.39-3.48-1.65-4.62-1.17"/>', color: "#ff6e40", viewBox: "0 0 24 24" },
|
|
28
|
+
typescript: { inner: '<path fill="#0288d1" d="M2 2v12h12V2zm4 6h3v1H8v4H7V9H6zm5 0h2v1h-2v1h1a1.003 1.003 0 0 1 1 1v1a1.003 1.003 0 0 1-1 1h-2v-1h2v-1h-1a1.003 1.003 0 0 1-1-1V9a1.003 1.003 0 0 1 1-1"/>', color: "#0288d1", viewBox: "0 0 16 16" },
|
|
29
|
+
video: { inner: '<path fill="#ff9800" d="m24 6 2 6h-4l-2-6h-3l2 6h-4l-2-6h-3l2 6H8L6 6H5a3 3 0 0 0-3 3v14a3 3 0 0 0 3 3h22a3 3 0 0 0 3-3V6Z"/>', color: "#ff9800", viewBox: "0 0 32 32" },
|
|
30
|
+
word: { inner: '<path fill="#01579b" d="M6 2h8l6 6v12a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2m7 1.5V9h5.5zM7 13l1.5 7h2l1.5-3 1.5 3h2l1.5-7h1v-2h-4v2h1l-.9 4.2L13 15h-2l-1.1 2.2L9 13h1v-2H6v2z"/>', color: "#01579b", viewBox: "0 0 24 24" },
|
|
31
|
+
xml: { inner: '<path fill="#8bc34a" d="M13 9h5.5L13 3.5zM6 2h8l6 6v12a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V4c0-1.11.89-2 2-2m.12 13.5 3.74 3.74 1.42-1.41-2.33-2.33 2.33-2.33-1.42-1.41zm11.16 0-3.74-3.74-1.42 1.41 2.33 2.33-2.33 2.33 1.42 1.41z"/>', color: "#8bc34a", viewBox: "0 0 24 24" },
|
|
32
|
+
yaml: { inner: '<path fill="#ff5252" d="M13 9h5.5L13 3.5zM6 2h8l6 6v12c0 1.1-.9 2-2 2H6c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2m12 16v-2H9v2zm-4-4v-2H6v2z"/>', color: "#ff5252", viewBox: "0 0 24 24" },
|
|
33
|
+
zip: { inner: '<path fill="#afb42b" d="M14 17h-2v-2h-2v-2h2v2h2m0-6h-2v2h2v2h-2v-2h-2V9h2V7h-2V5h2v2h2m5-4H5c-1.11 0-2 .89-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V5a2 2 0 0 0-2-2"/>', color: "#afb42b", viewBox: "0 0 24 24" }
|
|
34
|
+
}, m = {
|
|
35
|
+
// Office / documents
|
|
36
|
+
doc: "word",
|
|
37
|
+
docx: "word",
|
|
38
|
+
odt: "word",
|
|
39
|
+
rtf: "word",
|
|
40
|
+
xls: "excel",
|
|
41
|
+
xlsx: "excel",
|
|
42
|
+
xlsm: "excel",
|
|
43
|
+
ods: "excel",
|
|
44
|
+
csv: "excel",
|
|
45
|
+
ppt: "powerpoint",
|
|
46
|
+
pptx: "powerpoint",
|
|
47
|
+
odp: "powerpoint",
|
|
48
|
+
pdf: "pdf",
|
|
49
|
+
txt: "document",
|
|
50
|
+
md: "markdown",
|
|
51
|
+
markdown: "markdown",
|
|
52
|
+
// Code
|
|
53
|
+
js: "javascript",
|
|
54
|
+
mjs: "javascript",
|
|
55
|
+
cjs: "javascript",
|
|
56
|
+
jsx: "javascript",
|
|
57
|
+
ts: "typescript",
|
|
58
|
+
tsx: "typescript",
|
|
59
|
+
py: "python",
|
|
60
|
+
java: "java",
|
|
61
|
+
go: "go",
|
|
62
|
+
rs: "rust",
|
|
63
|
+
rb: "ruby",
|
|
64
|
+
swift: "swift",
|
|
65
|
+
cs: "csharp",
|
|
66
|
+
c: "cpp",
|
|
67
|
+
cpp: "cpp",
|
|
68
|
+
cc: "cpp",
|
|
69
|
+
h: "cpp",
|
|
70
|
+
hpp: "cpp",
|
|
71
|
+
json: "json",
|
|
72
|
+
xml: "xml",
|
|
73
|
+
html: "html",
|
|
74
|
+
htm: "html",
|
|
75
|
+
css: "css",
|
|
76
|
+
scss: "css",
|
|
77
|
+
sql: "database",
|
|
78
|
+
sh: "console",
|
|
79
|
+
bash: "console",
|
|
80
|
+
zsh: "console",
|
|
81
|
+
ps1: "console",
|
|
82
|
+
yaml: "yaml",
|
|
83
|
+
yml: "yaml",
|
|
84
|
+
// Data / archive / media
|
|
85
|
+
zip: "zip",
|
|
86
|
+
tar: "zip",
|
|
87
|
+
gz: "zip",
|
|
88
|
+
rar: "zip",
|
|
89
|
+
"7z": "zip",
|
|
90
|
+
db: "database",
|
|
91
|
+
sqlite: "database",
|
|
92
|
+
eml: "email",
|
|
93
|
+
msg: "email",
|
|
94
|
+
exe: "exe"
|
|
95
|
+
}, f = {
|
|
96
|
+
"application/pdf": "pdf",
|
|
97
|
+
"application/msword": "word",
|
|
98
|
+
"application/vnd.openxmlformats-officedocument.wordprocessingml.document": "word",
|
|
99
|
+
"application/vnd.ms-excel": "excel",
|
|
100
|
+
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet": "excel",
|
|
101
|
+
"text/csv": "excel",
|
|
102
|
+
"application/vnd.ms-powerpoint": "powerpoint",
|
|
103
|
+
"application/vnd.openxmlformats-officedocument.presentationml.presentation": "powerpoint",
|
|
104
|
+
"application/json": "json",
|
|
105
|
+
"application/xml": "xml",
|
|
106
|
+
"text/xml": "xml",
|
|
107
|
+
"text/html": "html",
|
|
108
|
+
"text/css": "css",
|
|
109
|
+
"text/markdown": "markdown",
|
|
110
|
+
"application/zip": "zip",
|
|
111
|
+
"application/x-zip-compressed": "zip",
|
|
112
|
+
"message/rfc822": "email"
|
|
113
|
+
}, d = {
|
|
114
|
+
image: "image",
|
|
115
|
+
audio: "audio",
|
|
116
|
+
video: "video",
|
|
117
|
+
text: "document"
|
|
118
|
+
}, x = "document";
|
|
119
|
+
function w(a) {
|
|
120
|
+
const l = a.lastIndexOf(".");
|
|
121
|
+
return l > 0 ? a.slice(l + 1).toLowerCase() : "";
|
|
122
|
+
}
|
|
123
|
+
function z(a = "", l = "") {
|
|
124
|
+
const o = w(a) || a.toLowerCase(), h = m[o] ?? f[l.toLowerCase()] ?? d[l.split("/")[0]?.toLowerCase() ?? ""] ?? x;
|
|
125
|
+
return { name: h, ...s[h] };
|
|
126
|
+
}
|
|
127
|
+
const V = p(function({ file: l, mimeType: o, size: h = 24, loading: v = !1, className: e, ...i }, t) {
|
|
128
|
+
const c = z(l, o), n = ["illuma-fi", v ? "illuma-fi--loading" : "", e].filter(Boolean).join(" ");
|
|
129
|
+
return /* @__PURE__ */ r(
|
|
130
|
+
"svg",
|
|
131
|
+
{
|
|
132
|
+
ref: t,
|
|
133
|
+
width: h,
|
|
134
|
+
height: h,
|
|
135
|
+
viewBox: c.viewBox,
|
|
136
|
+
className: n,
|
|
137
|
+
role: "img",
|
|
138
|
+
"aria-label": `${c.name} file`,
|
|
139
|
+
dangerouslySetInnerHTML: { __html: c.inner },
|
|
140
|
+
...i
|
|
141
|
+
}
|
|
142
|
+
);
|
|
143
|
+
});
|
|
144
|
+
export {
|
|
145
|
+
x as DEFAULT_FILE_ICON,
|
|
146
|
+
s as FILE_ICONS,
|
|
147
|
+
V as FileIcon,
|
|
148
|
+
z as resolveFileIcon
|
|
149
|
+
};
|
|
150
|
+
//# sourceMappingURL=files.es.js.map
|
package/package.json
ADDED
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@illuma-ai/icons",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "Illuma icon system: curated colored file-type icons + hover-animated navigation icons. Legally-clean (MIT) — no trademarked vendor logos.",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"author": "Illuma AI",
|
|
8
|
+
"repository": {
|
|
9
|
+
"type": "git",
|
|
10
|
+
"url": "git+https://github.com/illuma-ai/icons.git"
|
|
11
|
+
},
|
|
12
|
+
"homepage": "https://github.com/illuma-ai/icons#readme",
|
|
13
|
+
"publishConfig": {
|
|
14
|
+
"access": "public"
|
|
15
|
+
},
|
|
16
|
+
"exports": {
|
|
17
|
+
"./files": {
|
|
18
|
+
"types": "./dist/files/index.d.ts",
|
|
19
|
+
"import": "./dist/files.es.js",
|
|
20
|
+
"require": "./dist/files.cjs"
|
|
21
|
+
},
|
|
22
|
+
"./files/animations.css": "./dist/animations.css",
|
|
23
|
+
"./animated": {
|
|
24
|
+
"types": "./dist/animated/index.d.ts",
|
|
25
|
+
"import": "./dist/animated.es.js",
|
|
26
|
+
"require": "./dist/animated.cjs"
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
"files": [
|
|
30
|
+
"dist/**/*.js",
|
|
31
|
+
"dist/**/*.cjs",
|
|
32
|
+
"dist/**/*.css",
|
|
33
|
+
"dist/**/*.d.ts",
|
|
34
|
+
"README.md",
|
|
35
|
+
"NOTICE",
|
|
36
|
+
"LICENSE",
|
|
37
|
+
"LICENSE-material-icon-theme"
|
|
38
|
+
],
|
|
39
|
+
"scripts": {
|
|
40
|
+
"generate": "node scripts/generate.mjs",
|
|
41
|
+
"build": "npm run generate && rimraf dist && vite build && node scripts/copy-css.mjs",
|
|
42
|
+
"typecheck": "tsc --noEmit",
|
|
43
|
+
"prepublishOnly": "npm run build"
|
|
44
|
+
},
|
|
45
|
+
"keywords": [
|
|
46
|
+
"icons",
|
|
47
|
+
"file-icons",
|
|
48
|
+
"file-type",
|
|
49
|
+
"animated-icons",
|
|
50
|
+
"react",
|
|
51
|
+
"svg",
|
|
52
|
+
"material-icon-theme",
|
|
53
|
+
"illuma"
|
|
54
|
+
],
|
|
55
|
+
"peerDependencies": {
|
|
56
|
+
"framer-motion": ">=11.0.0",
|
|
57
|
+
"react": ">=18.0.0",
|
|
58
|
+
"react-dom": ">=18.0.0"
|
|
59
|
+
},
|
|
60
|
+
"devDependencies": {
|
|
61
|
+
"@types/node": "^22.5.0",
|
|
62
|
+
"@types/react": "^18.2.11",
|
|
63
|
+
"@types/react-dom": "^18.2.4",
|
|
64
|
+
"@vitejs/plugin-react": "^5.1.4",
|
|
65
|
+
"framer-motion": "^11.5.4",
|
|
66
|
+
"react": "^18.2.0",
|
|
67
|
+
"react-dom": "^18.2.0",
|
|
68
|
+
"rimraf": "^6.1.3",
|
|
69
|
+
"typescript": "^5.8.3",
|
|
70
|
+
"vite": "^6.0.3",
|
|
71
|
+
"vite-plugin-dts": "^4.3.0"
|
|
72
|
+
}
|
|
73
|
+
}
|