@illuma-ai/icons 2.5.0 → 2.5.1
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/dist/brand.cjs +32 -14
- package/dist/brand.es.js +52 -34
- package/package.json +1 -1
package/dist/brand.cjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),h=require("react"),g=require("framer-motion"),w=h.forwardRef(function({size:o=24,className:a,...i},c){return r.jsxs("svg",{ref:c,width:o,height:o,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",className:a,role:"img","aria-label":"Terminal",...i,children:[r.jsx("rect",{x:"2.5",y:"4",width:"19",height:"16",rx:"2.5"}),r.jsx("path",{d:"m6.5 9 3 3-3 3"}),r.jsx("path",{d:"M12.5 15h4",stroke:"#facc15"})]})}),R=h.forwardRef(function({size:o=24,running:a=!0,accent:i="#facc15",className:c,...n},l){return a?r.jsxs("svg",{ref:l,width:o,height:o,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",className:c,role:"img","aria-label":"Terminal running",...n,children:[r.jsx("rect",{x:"2.5",y:"4",width:"19",height:"16",rx:"2.5"}),r.jsx("path",{d:"m6.5 9 3 3-3 3"}),r.jsx(g.motion.path,{d:"M12.5 15h5",stroke:i,initial:{pathLength:0,opacity:.9},animate:{pathLength:[0,1,1,0]},transition:{duration:1.6,times:[0,.5,.8,1],repeat:1/0,ease:"easeInOut"}}),r.jsx(g.motion.rect,{x:"18.5",y:"13.4",width:"1.6",height:"3.2",rx:"0.3",fill:i,stroke:"none",animate:{opacity:[1,1,0,0,1]},transition:{duration:1.1,times:[0,.4,.5,.9,1],repeat:1/0}})]}):r.jsx(w,{ref:l,size:o,className:c,...n})}),p={aurora:["vec3(0.20,0.85,0.95)","vec3(0.55,0.35,0.95)","vec3(0.95,0.30,0.70)","vec3(1.0,0.75,0.30)"],ai:["vec3(0.55,0.36,0.98)","vec3(0.74,0.34,0.96)","vec3(0.96,0.36,0.82)","vec3(1.0,0.62,0.86)"]},k=`
|
|
2
2
|
attribute vec2 p;
|
|
3
3
|
varying vec2 uv;
|
|
4
4
|
void main() { uv = p; gl_Position = vec4(p, 0.0, 1.0); }
|
|
5
|
-
`,
|
|
5
|
+
`,S=t=>`
|
|
6
6
|
precision highp float;
|
|
7
7
|
varying vec2 uv;
|
|
8
8
|
uniform float t;
|
|
@@ -27,14 +27,26 @@ float snoise(vec2 v){
|
|
|
27
27
|
void main(){
|
|
28
28
|
vec2 p=uv;
|
|
29
29
|
float r=length(p);
|
|
30
|
-
// Noise-deform the radius so the silhouette wobbles organically.
|
|
31
|
-
float n=snoise(p*2.2+vec2(t*0.25,t*0.18))*0.5+snoise(p*4.0-vec2(t*0.2))*0.25;
|
|
32
|
-
float edge=0.78+n*0.16;
|
|
33
|
-
float orb=smoothstep(edge,edge-0.18,r);
|
|
34
|
-
if(orb<0.01){ gl_FragColor=vec4(0.0); return; }
|
|
35
|
-
// Shifting gradient palette.
|
|
36
30
|
float a=atan(p.y,p.x);
|
|
37
|
-
|
|
31
|
+
|
|
32
|
+
// ── Alive silhouette ──────────────────────────────────────────────
|
|
33
|
+
// Several layers of moving noise deform the radius a LOT, so the orb
|
|
34
|
+
// visibly grows lobes and shrinks them — a living, bacteria-like blob.
|
|
35
|
+
float n1=snoise(vec2(cos(a),sin(a))*1.4 + vec2(t*0.5, t*0.37));
|
|
36
|
+
float n2=snoise(p*3.1 - vec2(t*0.43, t*0.31));
|
|
37
|
+
float n3=snoise(p*5.5 + vec2(t*0.6));
|
|
38
|
+
float wobble=n1*0.30 + n2*0.16 + n3*0.08;
|
|
39
|
+
// Slow breathing pulse on top of the wobble (grow ↔ shrink).
|
|
40
|
+
float breathe=0.06*sin(t*1.6);
|
|
41
|
+
float edge=0.70 + wobble + breathe;
|
|
42
|
+
float orb=smoothstep(edge,edge-0.20,r);
|
|
43
|
+
if(orb<0.01){ gl_FragColor=vec4(0.0); return; }
|
|
44
|
+
|
|
45
|
+
// ── Swirling internal color ───────────────────────────────────────
|
|
46
|
+
// Domain-warp the field with noise so the colors churn inside the orb
|
|
47
|
+
// (not just a static angular gradient).
|
|
48
|
+
float warp=snoise(p*2.0 + vec2(t*0.4, -t*0.3));
|
|
49
|
+
float f=0.5+0.5*sin(a*1.0 + t*1.1 + warp*2.5 + r*2.0);
|
|
38
50
|
vec3 c0=${t[0]};
|
|
39
51
|
vec3 c1=${t[1]};
|
|
40
52
|
vec3 c2=${t[2]};
|
|
@@ -42,12 +54,18 @@ void main(){
|
|
|
42
54
|
vec3 col=mix(c0,c1,smoothstep(0.0,0.4,f));
|
|
43
55
|
col=mix(col,c2,smoothstep(0.35,0.7,f));
|
|
44
56
|
col=mix(col,c3,smoothstep(0.7,1.0,f));
|
|
45
|
-
|
|
57
|
+
|
|
58
|
+
// Moving bright core that drifts around (the "energy" inside).
|
|
59
|
+
vec2 coreOff=0.22*vec2(cos(t*0.9), sin(t*1.3));
|
|
60
|
+
float core=smoothstep(0.55,0.0,length(p-coreOff));
|
|
61
|
+
col+=core*0.35;
|
|
62
|
+
|
|
63
|
+
// Inner glow + bright fresnel rim.
|
|
46
64
|
float glow=smoothstep(0.0,0.6,1.0-r);
|
|
47
|
-
col+=glow*0.
|
|
48
|
-
float rim=smoothstep(edge-0.02,edge-0.
|
|
49
|
-
col=mix(col,vec3(1.0),(1.0-rim)*0.
|
|
65
|
+
col+=glow*0.20;
|
|
66
|
+
float rim=smoothstep(edge-0.02,edge-0.18,r);
|
|
67
|
+
col=mix(col,vec3(1.0),(1.0-rim)*0.40*orb);
|
|
50
68
|
gl_FragColor=vec4(col,orb);
|
|
51
69
|
}
|
|
52
|
-
`;function
|
|
70
|
+
`;function b(t,o,a){const i=t.createShader(o);return t.shaderSource(i,a),t.compileShader(i),i}function L({size:t=20,speed:o=1,palette:a="ai",className:i}){const c=h.useRef(null);return h.useEffect(()=>{const n=c.current;if(!n)return;const l=Math.min(window.devicePixelRatio||1,2);n.width=t*l,n.height=t*l;const e=n.getContext("webgl",{premultipliedAlpha:!1,alpha:!0});if(!e)return;const s=e.createProgram();e.attachShader(s,b(e,e.VERTEX_SHADER,k)),e.attachShader(s,b(e,e.FRAGMENT_SHADER,S(p[a]??p.ai))),e.linkProgram(s),e.useProgram(s);const y=e.createBuffer();e.bindBuffer(e.ARRAY_BUFFER,y),e.bufferData(e.ARRAY_BUFFER,new Float32Array([-1,-1,3,-1,-1,3]),e.STATIC_DRAW);const d=e.getAttribLocation(s,"p");e.enableVertexAttribArray(d),e.vertexAttribPointer(d,2,e.FLOAT,!1,0,0);const A=e.getUniformLocation(s,"t");e.viewport(0,0,n.width,n.height),e.enable(e.BLEND),e.blendFunc(e.SRC_ALPHA,e.ONE_MINUS_SRC_ALPHA);const x=typeof window.matchMedia=="function"&&window.matchMedia("(prefers-reduced-motion: reduce)").matches;let m=0,f=0;const u=v=>{f||(f=v);const T=(v-f)/1e3*o;e.uniform1f(A,x?.4:T),e.drawArrays(e.TRIANGLES,0,3),x||(m=requestAnimationFrame(u))};return m=requestAnimationFrame(u),()=>{cancelAnimationFrame(m),e.getExtension("WEBGL_lose_context")?.loseContext()}},[t,o,a]),r.jsx("canvas",{ref:c,className:i,style:{width:t,height:t,display:"inline-block"},role:"img","aria-label":"Thinking"})}exports.AnimatedTerminalIcon=R;exports.TerminalIcon=w;exports.ThinkingOrb=L;
|
|
53
71
|
//# sourceMappingURL=brand.cjs.map
|
package/dist/brand.es.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { forwardRef as w, useRef as T, useEffect as
|
|
1
|
+
import { jsxs as b, jsx as n } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as w, useRef as T, useEffect as k } from "react";
|
|
3
3
|
import { motion as u } from "framer-motion";
|
|
4
4
|
const L = w(function({ size: o = 24, className: a, ...r }, c) {
|
|
5
|
-
return /* @__PURE__ */
|
|
5
|
+
return /* @__PURE__ */ b(
|
|
6
6
|
"svg",
|
|
7
7
|
{
|
|
8
8
|
ref: c,
|
|
@@ -27,7 +27,7 @@ const L = w(function({ size: o = 24, className: a, ...r }, c) {
|
|
|
27
27
|
);
|
|
28
28
|
}), I = w(
|
|
29
29
|
function({ size: o = 24, running: a = !0, accent: r = "#facc15", className: c, ...i }, s) {
|
|
30
|
-
return a ? /* @__PURE__ */
|
|
30
|
+
return a ? /* @__PURE__ */ b(
|
|
31
31
|
"svg",
|
|
32
32
|
{
|
|
33
33
|
ref: s,
|
|
@@ -80,11 +80,11 @@ const L = w(function({ size: o = 24, className: a, ...r }, c) {
|
|
|
80
80
|
// AI pink/purple: violet → purple → magenta-pink → soft rose. Vivid on light
|
|
81
81
|
// and dark, no cyan/amber — the "AI" gradient.
|
|
82
82
|
ai: ["vec3(0.55,0.36,0.98)", "vec3(0.74,0.34,0.96)", "vec3(0.96,0.36,0.82)", "vec3(1.0,0.62,0.86)"]
|
|
83
|
-
},
|
|
83
|
+
}, E = `
|
|
84
84
|
attribute vec2 p;
|
|
85
85
|
varying vec2 uv;
|
|
86
86
|
void main() { uv = p; gl_Position = vec4(p, 0.0, 1.0); }
|
|
87
|
-
`,
|
|
87
|
+
`, S = (t) => `
|
|
88
88
|
precision highp float;
|
|
89
89
|
varying vec2 uv;
|
|
90
90
|
uniform float t;
|
|
@@ -109,14 +109,26 @@ float snoise(vec2 v){
|
|
|
109
109
|
void main(){
|
|
110
110
|
vec2 p=uv;
|
|
111
111
|
float r=length(p);
|
|
112
|
-
// Noise-deform the radius so the silhouette wobbles organically.
|
|
113
|
-
float n=snoise(p*2.2+vec2(t*0.25,t*0.18))*0.5+snoise(p*4.0-vec2(t*0.2))*0.25;
|
|
114
|
-
float edge=0.78+n*0.16;
|
|
115
|
-
float orb=smoothstep(edge,edge-0.18,r);
|
|
116
|
-
if(orb<0.01){ gl_FragColor=vec4(0.0); return; }
|
|
117
|
-
// Shifting gradient palette.
|
|
118
112
|
float a=atan(p.y,p.x);
|
|
119
|
-
|
|
113
|
+
|
|
114
|
+
// ── Alive silhouette ──────────────────────────────────────────────
|
|
115
|
+
// Several layers of moving noise deform the radius a LOT, so the orb
|
|
116
|
+
// visibly grows lobes and shrinks them — a living, bacteria-like blob.
|
|
117
|
+
float n1=snoise(vec2(cos(a),sin(a))*1.4 + vec2(t*0.5, t*0.37));
|
|
118
|
+
float n2=snoise(p*3.1 - vec2(t*0.43, t*0.31));
|
|
119
|
+
float n3=snoise(p*5.5 + vec2(t*0.6));
|
|
120
|
+
float wobble=n1*0.30 + n2*0.16 + n3*0.08;
|
|
121
|
+
// Slow breathing pulse on top of the wobble (grow ↔ shrink).
|
|
122
|
+
float breathe=0.06*sin(t*1.6);
|
|
123
|
+
float edge=0.70 + wobble + breathe;
|
|
124
|
+
float orb=smoothstep(edge,edge-0.20,r);
|
|
125
|
+
if(orb<0.01){ gl_FragColor=vec4(0.0); return; }
|
|
126
|
+
|
|
127
|
+
// ── Swirling internal color ───────────────────────────────────────
|
|
128
|
+
// Domain-warp the field with noise so the colors churn inside the orb
|
|
129
|
+
// (not just a static angular gradient).
|
|
130
|
+
float warp=snoise(p*2.0 + vec2(t*0.4, -t*0.3));
|
|
131
|
+
float f=0.5+0.5*sin(a*1.0 + t*1.1 + warp*2.5 + r*2.0);
|
|
120
132
|
vec3 c0=${t[0]};
|
|
121
133
|
vec3 c1=${t[1]};
|
|
122
134
|
vec3 c2=${t[2]};
|
|
@@ -124,11 +136,17 @@ void main(){
|
|
|
124
136
|
vec3 col=mix(c0,c1,smoothstep(0.0,0.4,f));
|
|
125
137
|
col=mix(col,c2,smoothstep(0.35,0.7,f));
|
|
126
138
|
col=mix(col,c3,smoothstep(0.7,1.0,f));
|
|
127
|
-
|
|
139
|
+
|
|
140
|
+
// Moving bright core that drifts around (the "energy" inside).
|
|
141
|
+
vec2 coreOff=0.22*vec2(cos(t*0.9), sin(t*1.3));
|
|
142
|
+
float core=smoothstep(0.55,0.0,length(p-coreOff));
|
|
143
|
+
col+=core*0.35;
|
|
144
|
+
|
|
145
|
+
// Inner glow + bright fresnel rim.
|
|
128
146
|
float glow=smoothstep(0.0,0.6,1.0-r);
|
|
129
|
-
col+=glow*0.
|
|
130
|
-
float rim=smoothstep(edge-0.02,edge-0.
|
|
131
|
-
col=mix(col,vec3(1.0),(1.0-rim)*0.
|
|
147
|
+
col+=glow*0.20;
|
|
148
|
+
float rim=smoothstep(edge-0.02,edge-0.18,r);
|
|
149
|
+
col=mix(col,vec3(1.0),(1.0-rim)*0.40*orb);
|
|
132
150
|
gl_FragColor=vec4(col,orb);
|
|
133
151
|
}
|
|
134
152
|
`;
|
|
@@ -136,9 +154,9 @@ function p(t, o, a) {
|
|
|
136
154
|
const r = t.createShader(o);
|
|
137
155
|
return t.shaderSource(r, a), t.compileShader(r), r;
|
|
138
156
|
}
|
|
139
|
-
function
|
|
157
|
+
function M({ size: t = 20, speed: o = 1, palette: a = "ai", className: r }) {
|
|
140
158
|
const c = T(null);
|
|
141
|
-
return
|
|
159
|
+
return k(() => {
|
|
142
160
|
const i = c.current;
|
|
143
161
|
if (!i)
|
|
144
162
|
return;
|
|
@@ -148,22 +166,22 @@ function P({ size: t = 20, speed: o = 1, palette: a = "ai", className: r }) {
|
|
|
148
166
|
if (!e)
|
|
149
167
|
return;
|
|
150
168
|
const l = e.createProgram();
|
|
151
|
-
e.attachShader(l, p(e, e.VERTEX_SHADER,
|
|
152
|
-
const
|
|
153
|
-
e.bindBuffer(e.ARRAY_BUFFER,
|
|
154
|
-
const
|
|
155
|
-
e.enableVertexAttribArray(
|
|
156
|
-
const
|
|
169
|
+
e.attachShader(l, p(e, e.VERTEX_SHADER, E)), e.attachShader(l, p(e, e.FRAGMENT_SHADER, S(g[a] ?? g.ai))), e.linkProgram(l), e.useProgram(l);
|
|
170
|
+
const y = e.createBuffer();
|
|
171
|
+
e.bindBuffer(e.ARRAY_BUFFER, y), e.bufferData(e.ARRAY_BUFFER, new Float32Array([-1, -1, 3, -1, -1, 3]), e.STATIC_DRAW);
|
|
172
|
+
const v = e.getAttribLocation(l, "p");
|
|
173
|
+
e.enableVertexAttribArray(v), e.vertexAttribPointer(v, 2, e.FLOAT, !1, 0, 0);
|
|
174
|
+
const A = e.getUniformLocation(l, "t");
|
|
157
175
|
e.viewport(0, 0, i.width, i.height), e.enable(e.BLEND), e.blendFunc(e.SRC_ALPHA, e.ONE_MINUS_SRC_ALPHA);
|
|
158
|
-
const
|
|
159
|
-
let
|
|
160
|
-
const
|
|
161
|
-
|
|
162
|
-
const R = (
|
|
163
|
-
e.uniform1f(
|
|
176
|
+
const d = typeof window.matchMedia == "function" && window.matchMedia("(prefers-reduced-motion: reduce)").matches;
|
|
177
|
+
let h = 0, m = 0;
|
|
178
|
+
const x = (f) => {
|
|
179
|
+
m || (m = f);
|
|
180
|
+
const R = (f - m) / 1e3 * o;
|
|
181
|
+
e.uniform1f(A, d ? 0.4 : R), e.drawArrays(e.TRIANGLES, 0, 3), d || (h = requestAnimationFrame(x));
|
|
164
182
|
};
|
|
165
|
-
return
|
|
166
|
-
cancelAnimationFrame(
|
|
183
|
+
return h = requestAnimationFrame(x), () => {
|
|
184
|
+
cancelAnimationFrame(h), e.getExtension("WEBGL_lose_context")?.loseContext();
|
|
167
185
|
};
|
|
168
186
|
}, [t, o, a]), /* @__PURE__ */ n(
|
|
169
187
|
"canvas",
|
|
@@ -179,6 +197,6 @@ function P({ size: t = 20, speed: o = 1, palette: a = "ai", className: r }) {
|
|
|
179
197
|
export {
|
|
180
198
|
I as AnimatedTerminalIcon,
|
|
181
199
|
L as TerminalIcon,
|
|
182
|
-
|
|
200
|
+
M as ThinkingOrb
|
|
183
201
|
};
|
|
184
202
|
//# sourceMappingURL=brand.es.js.map
|
package/package.json
CHANGED