@fiestaboard/ui 3.4.0 → 5.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/README.md +13 -1
- package/dist/components/board/board-backdrop.d.ts +60 -0
- package/dist/components/board/board-backdrop.js +71 -0
- package/dist/components/board/board-backdrop.js.map +1 -0
- package/dist/components/board/board-display.js +123 -123
- package/dist/components/board/board-display.js.map +1 -1
- package/dist/components/board/static-board-display.js +32 -32
- package/dist/components/chrome/fiesta-logo.js +2 -2
- package/dist/components/chrome/fiesta-logo.js.map +1 -1
- package/dist/components/chrome/page-header.d.ts +66 -4
- package/dist/components/chrome/page-header.js +31 -11
- package/dist/components/chrome/page-header.js.map +1 -1
- package/dist/components/chrome/page-layout.js +1 -1
- package/dist/components/chrome/page-layout.js.map +1 -1
- package/dist/components/chrome/sidebar.d.ts +2 -5
- package/dist/components/chrome/sidebar.js +152 -173
- package/dist/components/chrome/sidebar.js.map +1 -1
- package/dist/components/containment/json-tree.js +2 -2
- package/dist/components/containment/json-tree.js.map +1 -1
- package/dist/components/editor/node-views/wrapped-text-view.js +1 -1
- package/dist/components/editor/node-views/wrapped-text-view.js.map +1 -1
- package/dist/components/editor/variable-picker-content.js +4 -4
- package/dist/components/feedback/alert.js +4 -4
- package/dist/components/feedback/alert.js.map +1 -1
- package/dist/components/feedback/badge.js +4 -4
- package/dist/components/feedback/badge.js.map +1 -1
- package/dist/components/forms/button.js +5 -5
- package/dist/components/forms/button.js.map +1 -1
- package/dist/components/layout/flex.d.ts +1 -1
- package/dist/components/layout/grid.d.ts +1 -1
- package/dist/components/layout/stack.d.ts +1 -1
- package/dist/components/plugin/board-showcase.js +2 -2
- package/dist/components/plugin/board-showcase.js.map +1 -1
- package/dist/components/plugin/plugin-category-badge.d.ts +27 -1
- package/dist/components/plugin/plugin-category-badge.js +18 -14
- package/dist/components/plugin/plugin-category-badge.js.map +1 -1
- package/dist/components/typography/text.js +1 -1
- package/dist/components/typography/text.js.map +1 -1
- package/dist/components/wizard/wizard-progress.d.ts +29 -0
- package/dist/components/wizard/wizard-progress.js +27 -0
- package/dist/components/wizard/wizard-progress.js.map +1 -0
- package/dist/components/wizard/wizard-shell.d.ts +63 -0
- package/dist/components/wizard/wizard-shell.js +69 -0
- package/dist/components/wizard/wizard-shell.js.map +1 -0
- package/dist/editor.css +10 -3
- package/dist/fonts.css +16 -8
- package/dist/index.d.ts +3 -5
- package/dist/index.js +90 -92
- package/dist/theme.css +684 -519
- package/package.json +4 -6
- package/dist/components/effects/aurora.d.ts +0 -9
- package/dist/components/effects/aurora.js +0 -121
- package/dist/components/effects/aurora.js.map +0 -1
- package/dist/components/effects/react-bits/decrypted-text.d.ts +0 -14
- package/dist/components/effects/react-bits/decrypted-text.js +0 -88
- package/dist/components/effects/react-bits/decrypted-text.js.map +0 -1
- package/dist/components/seasons/aurora-canvas.d.ts +0 -22
- package/dist/components/seasons/aurora-canvas.js +0 -91
- package/dist/components/seasons/aurora-canvas.js.map +0 -1
- package/dist/components/seasons/sidebar-aurora-horizontal.d.ts +0 -3
- package/dist/components/seasons/sidebar-aurora-horizontal.js +0 -47
- package/dist/components/seasons/sidebar-aurora-horizontal.js.map +0 -1
- package/dist/components/seasons/sidebar-aurora.d.ts +0 -3
- package/dist/components/seasons/sidebar-aurora.js +0 -57
- package/dist/components/seasons/sidebar-aurora.js.map +0 -1
- package/dist/lib/seasons-drafts.d.ts +0 -26
- package/dist/lib/seasons-drafts.js +0 -106
- package/dist/lib/seasons-drafts.js.map +0 -1
- package/dist/lib/seasons.d.ts +0 -52
- package/dist/lib/seasons.js +0 -59
- package/dist/lib/seasons.js.map +0 -1
- package/dist/seasons/christmas.css +0 -64
- package/dist/seasons/easter.css +0 -62
- package/dist/seasons/fathers-day.css +0 -62
- package/dist/seasons/halloween.css +0 -69
- package/dist/seasons/mothers-day.css +0 -63
- package/dist/seasons/new-year.css +0 -66
- package/dist/seasons/pride.css +0 -68
- package/dist/seasons/thanksgiving.css +0 -64
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fiestaboard/ui",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "5.0.0",
|
|
4
4
|
"description": "FiestaUI — the FiestaBoard design system. React components on Base UI with Tailwind v4 design tokens.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -29,7 +29,6 @@
|
|
|
29
29
|
"./theme.css": "./dist/theme.css",
|
|
30
30
|
"./fonts.css": "./dist/fonts.css",
|
|
31
31
|
"./editor.css": "./dist/editor.css",
|
|
32
|
-
"./seasons/*.css": "./dist/seasons/*.css",
|
|
33
32
|
"./package.json": "./package.json",
|
|
34
33
|
"./*": {
|
|
35
34
|
"types": "./dist/*.d.ts",
|
|
@@ -37,7 +36,7 @@
|
|
|
37
36
|
}
|
|
38
37
|
},
|
|
39
38
|
"scripts": {
|
|
40
|
-
"build": "vite build && tsc -p tsconfig.build.json && cp src/styles/theme.css dist/theme.css && cp src/styles/fonts.css dist/fonts.css && cp src/styles/editor.css dist/editor.css
|
|
39
|
+
"build": "vite build && tsc -p tsconfig.build.json && cp src/styles/theme.css dist/theme.css && cp src/styles/fonts.css dist/fonts.css && cp src/styles/editor.css dist/editor.css",
|
|
41
40
|
"typecheck": "tsc --noEmit",
|
|
42
41
|
"lint": "eslint",
|
|
43
42
|
"lint:fix": "eslint --fix",
|
|
@@ -58,11 +57,10 @@
|
|
|
58
57
|
},
|
|
59
58
|
"dependencies": {
|
|
60
59
|
"@base-ui/react": "^1.6.0",
|
|
61
|
-
"@fontsource-variable/
|
|
62
|
-
"@fontsource-variable/
|
|
60
|
+
"@fontsource-variable/archivo": "^5.3.0",
|
|
61
|
+
"@fontsource-variable/spline-sans-mono": "^5.3.0",
|
|
63
62
|
"class-variance-authority": "^0.7.1",
|
|
64
63
|
"clsx": "^2.1.1",
|
|
65
|
-
"ogl": "^1.0.11",
|
|
66
64
|
"tailwind-merge": "^3.5.0",
|
|
67
65
|
"tw-animate-css": "^1.4.0"
|
|
68
66
|
},
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
interface AuroraProps {
|
|
2
|
-
colorStops?: [string, string, string];
|
|
3
|
-
amplitude?: number;
|
|
4
|
-
blend?: number;
|
|
5
|
-
speed?: number;
|
|
6
|
-
time?: number;
|
|
7
|
-
}
|
|
8
|
-
export declare function Aurora({ colorStops, amplitude, blend, speed, time, }: AuroraProps): import("react").JSX.Element;
|
|
9
|
-
export {};
|
|
@@ -1,121 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import { useEffect as e, useLayoutEffect as t, useRef as n } from "react";
|
|
3
|
-
import { jsx as r } from "react/jsx-runtime";
|
|
4
|
-
//#region src/components/effects/aurora.tsx
|
|
5
|
-
var i = "#version 300 es\nin vec2 position;\nvoid main() {\n gl_Position = vec4(position, 0.0, 1.0);\n}\n", a = "#version 300 es\nprecision highp float;\n\nuniform float uTime;\nuniform float uAmplitude;\nuniform vec3 uColorStops[3];\nuniform vec2 uResolution;\nuniform float uBlend;\n\nout vec4 fragColor;\n\nvec3 permute(vec3 x) {\n return mod(((x * 34.0) + 1.0) * x, 289.0);\n}\n\nfloat snoise(vec2 v){\n const vec4 C = vec4(\n 0.211324865405187, 0.366025403784439,\n -0.577350269189626, 0.024390243902439\n );\n vec2 i = floor(v + dot(v, C.yy));\n vec2 x0 = v - i + dot(i, C.xx);\n vec2 i1 = (x0.x > x0.y) ? vec2(1.0, 0.0) : vec2(0.0, 1.0);\n vec4 x12 = x0.xyxy + C.xxzz;\n x12.xy -= i1;\n i = mod(i, 289.0);\n\n vec3 p = permute(\n permute(i.y + vec3(0.0, i1.y, 1.0))\n + i.x + vec3(0.0, i1.x, 1.0)\n );\n\n vec3 m = max(\n 0.5 - vec3(\n dot(x0, x0),\n dot(x12.xy, x12.xy),\n dot(x12.zw, x12.zw)\n ),\n 0.0\n );\n m = m * m;\n m = m * m;\n\n vec3 x = 2.0 * fract(p * C.www) - 1.0;\n vec3 h = abs(x) - 0.5;\n vec3 ox = floor(x + 0.5);\n vec3 a0 = x - ox;\n m *= 1.79284291400159 - 0.85373472095314 * (a0*a0 + h*h);\n\n vec3 g;\n g.x = a0.x * x0.x + h.x * x0.y;\n g.yz = a0.yz * x12.xz + h.yz * x12.yw;\n return 130.0 * dot(m, g);\n}\n\nstruct ColorStop {\n vec3 color;\n float position;\n};\n\n#define COLOR_RAMP(colors, factor, finalColor) { \\\n int index = 0; \\\n for (int i = 0; i < 2; i++) { \\\n ColorStop currentColor = colors[i]; \\\n bool isInBetween = currentColor.position <= factor; \\\n index = int(mix(float(index), float(i), float(isInBetween))); \\\n } \\\n ColorStop currentColor = colors[index]; \\\n ColorStop nextColor = colors[index + 1]; \\\n float range = nextColor.position - currentColor.position; \\\n float lerpFactor = (factor - currentColor.position) / range; \\\n finalColor = mix(currentColor.color, nextColor.color, lerpFactor); \\\n}\n\nvoid main() {\n vec2 uv = gl_FragCoord.xy / uResolution;\n\n ColorStop colors[3];\n colors[0] = ColorStop(uColorStops[0], 0.0);\n colors[1] = ColorStop(uColorStops[1], 0.5);\n colors[2] = ColorStop(uColorStops[2], 1.0);\n\n vec3 rampColor;\n COLOR_RAMP(colors, uv.x, rampColor);\n\n float height = snoise(vec2(uv.x * 2.0 + uTime * 0.1, uTime * 0.25)) * 0.5 * uAmplitude;\n height = exp(height);\n height = (uv.y * 2.0 - height + 0.2);\n float intensity = 0.6 * height;\n\n float midPoint = 0.20;\n float auroraAlpha = smoothstep(midPoint - uBlend * 0.5, midPoint + uBlend * 0.5, intensity);\n\n vec3 auroraColor = intensity * rampColor;\n\n fragColor = vec4(auroraColor * auroraAlpha, auroraAlpha);\n}\n";
|
|
6
|
-
function o({ colorStops: o = [
|
|
7
|
-
"#5227FF",
|
|
8
|
-
"#7cff67",
|
|
9
|
-
"#5227FF"
|
|
10
|
-
], amplitude: s = 1, blend: c = .5, speed: l = 1, time: u }) {
|
|
11
|
-
let d = n(null), f = n({
|
|
12
|
-
colorStops: o,
|
|
13
|
-
amplitude: s,
|
|
14
|
-
blend: c,
|
|
15
|
-
speed: l,
|
|
16
|
-
time: u
|
|
17
|
-
});
|
|
18
|
-
return t(() => {
|
|
19
|
-
f.current = {
|
|
20
|
-
colorStops: o,
|
|
21
|
-
amplitude: s,
|
|
22
|
-
blend: c,
|
|
23
|
-
speed: l,
|
|
24
|
-
time: u
|
|
25
|
-
};
|
|
26
|
-
}), e(() => {
|
|
27
|
-
let e = d.current;
|
|
28
|
-
if (!e) return;
|
|
29
|
-
let t = !1, n;
|
|
30
|
-
return (async () => {
|
|
31
|
-
let { Color: r, Mesh: o, Program: s, Renderer: c, Triangle: l } = await import("ogl");
|
|
32
|
-
if (t) return;
|
|
33
|
-
let u = new c({
|
|
34
|
-
alpha: !0,
|
|
35
|
-
premultipliedAlpha: !0,
|
|
36
|
-
antialias: !0
|
|
37
|
-
}), d = u.gl, p = () => {
|
|
38
|
-
d.clearColor(0, 0, 0, 0), d.enable(d.BLEND), d.blendFunc(d.ONE, d.ONE_MINUS_SRC_ALPHA), d.canvas.style.backgroundColor = "transparent";
|
|
39
|
-
};
|
|
40
|
-
p();
|
|
41
|
-
let m = "", h = [], g = (e) => {
|
|
42
|
-
let t = e.join(",");
|
|
43
|
-
return t !== m && (m = t, h = e.map((e) => {
|
|
44
|
-
let t = new r(e);
|
|
45
|
-
return [
|
|
46
|
-
t.r,
|
|
47
|
-
t.g,
|
|
48
|
-
t.b
|
|
49
|
-
];
|
|
50
|
-
})), h;
|
|
51
|
-
}, _ = !1, v, y, b = () => {
|
|
52
|
-
if (v = void 0, y = void 0, !d.isContextLost()) try {
|
|
53
|
-
let t = new l(d);
|
|
54
|
-
t.attributes.uv && delete t.attributes.uv, v = new s(d, {
|
|
55
|
-
vertex: i,
|
|
56
|
-
fragment: a,
|
|
57
|
-
uniforms: {
|
|
58
|
-
uTime: { value: 0 },
|
|
59
|
-
uAmplitude: { value: f.current.amplitude },
|
|
60
|
-
uColorStops: { value: g(f.current.colorStops) },
|
|
61
|
-
uResolution: { value: [e.offsetWidth, e.offsetHeight] },
|
|
62
|
-
uBlend: { value: f.current.blend }
|
|
63
|
-
}
|
|
64
|
-
}), y = new o(d, {
|
|
65
|
-
geometry: t,
|
|
66
|
-
program: v
|
|
67
|
-
});
|
|
68
|
-
} catch (e) {
|
|
69
|
-
v = void 0, y = void 0, console.error("Aurora scene build failed:", e);
|
|
70
|
-
}
|
|
71
|
-
};
|
|
72
|
-
b();
|
|
73
|
-
let x = (e) => {
|
|
74
|
-
if (_ || !v || !y) return;
|
|
75
|
-
let t = f.current, n = t.time ?? e * .01;
|
|
76
|
-
v.uniforms.uTime.value = n * (t.speed ?? 1) * .1, v.uniforms.uAmplitude.value = t.amplitude ?? 1, v.uniforms.uBlend.value = t.blend ?? .5, v.uniforms.uColorStops.value = g(t.colorStops), u.render({ scene: y });
|
|
77
|
-
}, S = window.matchMedia("(prefers-reduced-motion: reduce)"), C = 0, w = 0;
|
|
78
|
-
function T() {
|
|
79
|
-
if (!e) return;
|
|
80
|
-
let t = e.offsetWidth, n = e.offsetHeight;
|
|
81
|
-
(t !== C || n !== w) && (C = t, w = n, u.setSize(t, n), v && (v.uniforms.uResolution.value = [t, n]), S.matches && x(0));
|
|
82
|
-
}
|
|
83
|
-
let E = null, D = () => {
|
|
84
|
-
E === null && (E = requestAnimationFrame(() => {
|
|
85
|
-
E = null, T();
|
|
86
|
-
}));
|
|
87
|
-
};
|
|
88
|
-
window.addEventListener("resize", D), e.appendChild(d.canvas);
|
|
89
|
-
let O = 0, k = (e) => {
|
|
90
|
-
O = requestAnimationFrame(k), x(e);
|
|
91
|
-
}, A = !0, j = () => {
|
|
92
|
-
cancelAnimationFrame(O), !(_ || !v) && (S.matches ? x(0) : A && (O = requestAnimationFrame(k)));
|
|
93
|
-
};
|
|
94
|
-
S.addEventListener("change", j);
|
|
95
|
-
let M = new IntersectionObserver((e) => {
|
|
96
|
-
A = e[0].intersectionRatio > 0, j();
|
|
97
|
-
});
|
|
98
|
-
M.observe(e), T(), j();
|
|
99
|
-
let N = (e) => {
|
|
100
|
-
e.preventDefault(), _ = !0, cancelAnimationFrame(O);
|
|
101
|
-
}, P = () => {
|
|
102
|
-
_ = !1, p(), b(), C = 0, w = 0, T(), j();
|
|
103
|
-
};
|
|
104
|
-
d.canvas.addEventListener("webglcontextlost", N), d.canvas.addEventListener("webglcontextrestored", P), n = () => {
|
|
105
|
-
cancelAnimationFrame(O), M.disconnect(), S.removeEventListener("change", j), window.removeEventListener("resize", D), E !== null && cancelAnimationFrame(E), d.canvas.removeEventListener("webglcontextlost", N), d.canvas.removeEventListener("webglcontextrestored", P), e && d.canvas.parentNode === e && e.removeChild(d.canvas), d.getExtension("WEBGL_lose_context")?.loseContext();
|
|
106
|
-
};
|
|
107
|
-
})(), () => {
|
|
108
|
-
t = !0, n?.();
|
|
109
|
-
};
|
|
110
|
-
}, []), /* @__PURE__ */ r("div", {
|
|
111
|
-
ref: d,
|
|
112
|
-
style: {
|
|
113
|
-
width: "100%",
|
|
114
|
-
height: "100%"
|
|
115
|
-
}
|
|
116
|
-
});
|
|
117
|
-
}
|
|
118
|
-
//#endregion
|
|
119
|
-
export { o as Aurora };
|
|
120
|
-
|
|
121
|
-
//# sourceMappingURL=aurora.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"aurora.js","names":[],"sources":["../../../src/components/effects/aurora.tsx"],"mappings":";;;;AAIA,IAAM,IAAO,qGAOP,IAAO;AA2Gb,SAAgB,EAAO,EACrB,gBAAa;CAAC;CAAW;CAAW;AAAS,GAC7C,eAAY,GACZ,WAAQ,IACR,WAAQ,GACR,WACc;CACd,IAAM,IAAe,EAAuB,IAAI,GAC1C,IAAW,EAAO;EAAE;EAAY;EAAW;EAAO;EAAO;CAAK,CAAC;CAqOrE,OAhOA,QAAsB;EACpB,EAAS,UAAU;GAAE;GAAY;GAAW;GAAO;GAAO;EAAK;CACjE,CAAC,GAED,QAAgB;EACd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C/B,MAAU,IAAY,sBAAsB,CAAM;GAC7D;GACA,EAAc,iBAAiB,UAAU,CAAa;GAEtD,IAAM,IAAW,IAAI,sBAAsB,MAAY;IAErD,AADA,IAAW,EAAQ,EAAE,CAAC,oBAAoB,GAC1C,EAAc;GAChB,CAAC;GAID,AAHA,EAAS,QAAQ,CAAG,GAEpB,EAAO,GACP,EAAc;GAMd,IAAM,KAAiB,MAAiB;IAGtC,AAFA,EAAM,eAAe,GACrB,IAAc,IACd,qBAAqB,CAAS;GAChC,GACM,UAA0B;IAU9B,AANA,IAAc,IACd,EAAY,GACZ,EAAW,GACX,IAAe,GACf,IAAgB,GAChB,EAAO,GACP,EAAc;GAChB;GAIA,AAHA,EAAG,OAAO,iBAAiB,oBAAoB,CAAa,GAC5D,EAAG,OAAO,iBAAiB,wBAAwB,CAAiB,GAEpE,UAAiB;IAWf,AAVA,qBAAqB,CAAS,GAC9B,EAAS,WAAW,GACpB,EAAc,oBAAoB,UAAU,CAAa,GACzD,OAAO,oBAAoB,UAAU,CAAQ,GACzC,MAAgB,QAAM,qBAAqB,CAAW,GAC1D,EAAG,OAAO,oBAAoB,oBAAoB,CAAa,GAC/D,EAAG,OAAO,oBAAoB,wBAAwB,CAAiB,GACnE,KAAO,EAAG,OAAO,eAAe,KAClC,EAAI,YAAY,EAAG,MAAM,GAE3B,EAAG,aAAa,oBAAoB,CAAC,EAAE,YAAY;GACrD;EACF,EAAA,CAAG,SAEU;GAKX,AADA,IAAY,IACZ,IAAW;EACb;CACF,GAAG,CAAC,CAAC,GAEE,kBAAC,OAAD;EAAK,KAAK;EAAc,OAAO;GAAE,OAAO;GAAQ,QAAQ;EAAO;CAAI,CAAA;AAC5E"}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
interface DecryptedTextProps {
|
|
2
|
-
text: string;
|
|
3
|
-
speed?: number;
|
|
4
|
-
maxIterations?: number;
|
|
5
|
-
sequential?: boolean;
|
|
6
|
-
revealDirection?: "start" | "end" | "center";
|
|
7
|
-
characters?: string;
|
|
8
|
-
className?: string;
|
|
9
|
-
encryptedClassName?: string;
|
|
10
|
-
parentClassName?: string;
|
|
11
|
-
animateOn?: "view" | "hover" | "both";
|
|
12
|
-
}
|
|
13
|
-
export default function DecryptedText({ text, speed, maxIterations, sequential, revealDirection, characters, className, parentClassName, encryptedClassName, animateOn, }: DecryptedTextProps): import("react").JSX.Element;
|
|
14
|
-
export {};
|
|
@@ -1,88 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import { cn as e } from "../../../lib/utils.js";
|
|
3
|
-
import { useCallback as t, useEffect as n, useMemo as r, useRef as i, useState as a } from "react";
|
|
4
|
-
import { jsx as o, jsxs as s } from "react/jsx-runtime";
|
|
5
|
-
//#region src/components/effects/react-bits/decrypted-text.tsx
|
|
6
|
-
function c({ text: c, speed: l = 50, maxIterations: u = 10, sequential: d = !1, revealDirection: f = "start", characters: p = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz!@#$%^&*()_+", className: m = "", parentClassName: h = "", encryptedClassName: g = "", animateOn: _ = "hover" }) {
|
|
7
|
-
let [v, y] = a(c), [b, x] = a(!1), [S, C] = a(!1), [w, T] = a(/* @__PURE__ */ new Set()), [E, D] = a(!1), O = i(null), k = i(/* @__PURE__ */ new Set()), A = i(!1);
|
|
8
|
-
n(() => {
|
|
9
|
-
let e = window.matchMedia("(prefers-reduced-motion: reduce)"), t = () => D(e.matches);
|
|
10
|
-
return t(), e.addEventListener("change", t), () => e.removeEventListener("change", t);
|
|
11
|
-
}, []);
|
|
12
|
-
let j = t((e) => {
|
|
13
|
-
let t = c.length;
|
|
14
|
-
switch (f) {
|
|
15
|
-
case "start": return e.size;
|
|
16
|
-
case "end": return t - 1 - e.size;
|
|
17
|
-
case "center": {
|
|
18
|
-
let n = Math.floor(t / 2), r = Math.floor(e.size / 2), i = e.size % 2 == 0 ? n + r : n - r - 1;
|
|
19
|
-
if (i >= 0 && i < t && !e.has(i)) return i;
|
|
20
|
-
for (let n = 0; n < t; n++) if (!e.has(n)) return n;
|
|
21
|
-
return 0;
|
|
22
|
-
}
|
|
23
|
-
default: return e.size;
|
|
24
|
-
}
|
|
25
|
-
}, [c.length, f]);
|
|
26
|
-
n(() => {
|
|
27
|
-
let e, t = 0, n = p.split(""), r = (e, t) => e.split("").map((r, i) => r === " " ? " " : t.has(i) ? e[i] : n[Math.floor(Math.random() * n.length)]).join("");
|
|
28
|
-
return b && !E ? (C(!0), e = setInterval(() => {
|
|
29
|
-
if (d) {
|
|
30
|
-
let t = k.current;
|
|
31
|
-
if (t.size < c.length) {
|
|
32
|
-
let e = j(t), n = new Set(t);
|
|
33
|
-
n.add(e), k.current = n, T(n), y(r(c, n));
|
|
34
|
-
} else clearInterval(e), C(!1);
|
|
35
|
-
} else y(r(c, k.current)), t++, t >= u && (clearInterval(e), C(!1), y(c));
|
|
36
|
-
}, l)) : (y(c), T(/* @__PURE__ */ new Set()), k.current = /* @__PURE__ */ new Set(), C(!1)), () => {
|
|
37
|
-
e && clearInterval(e);
|
|
38
|
-
};
|
|
39
|
-
}, [
|
|
40
|
-
b,
|
|
41
|
-
E,
|
|
42
|
-
c,
|
|
43
|
-
l,
|
|
44
|
-
u,
|
|
45
|
-
d,
|
|
46
|
-
p,
|
|
47
|
-
j
|
|
48
|
-
]), n(() => {
|
|
49
|
-
if (_ !== "view" && _ !== "both") return;
|
|
50
|
-
let e = new IntersectionObserver((e) => {
|
|
51
|
-
e.forEach((e) => {
|
|
52
|
-
e.isIntersecting && !A.current && (x(!0), A.current = !0);
|
|
53
|
-
});
|
|
54
|
-
}, {
|
|
55
|
-
root: null,
|
|
56
|
-
rootMargin: "0px",
|
|
57
|
-
threshold: .1
|
|
58
|
-
}), t = O.current;
|
|
59
|
-
return t && e.observe(t), () => e.disconnect();
|
|
60
|
-
}, [_]);
|
|
61
|
-
let M = _ === "hover" || _ === "both" ? {
|
|
62
|
-
onMouseEnter: () => x(!0),
|
|
63
|
-
onMouseLeave: () => x(!1)
|
|
64
|
-
} : {}, N = r(() => v.split(""), [v]);
|
|
65
|
-
return /* @__PURE__ */ s("span", {
|
|
66
|
-
ref: O,
|
|
67
|
-
className: e("inline-block", h),
|
|
68
|
-
...M,
|
|
69
|
-
children: [/* @__PURE__ */ o("span", {
|
|
70
|
-
className: "sr-only",
|
|
71
|
-
children: c
|
|
72
|
-
}), /* @__PURE__ */ o("span", {
|
|
73
|
-
"aria-hidden": !0,
|
|
74
|
-
className: m,
|
|
75
|
-
children: N.map((e, t) => {
|
|
76
|
-
let n = w.has(t) || !S || !b;
|
|
77
|
-
return /* @__PURE__ */ o("span", {
|
|
78
|
-
className: n ? m : g,
|
|
79
|
-
children: e
|
|
80
|
-
}, t);
|
|
81
|
-
})
|
|
82
|
-
})]
|
|
83
|
-
});
|
|
84
|
-
}
|
|
85
|
-
//#endregion
|
|
86
|
-
export { c as default };
|
|
87
|
-
|
|
88
|
-
//# sourceMappingURL=decrypted-text.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"decrypted-text.js","names":[],"sources":["../../../../src/components/effects/react-bits/decrypted-text.tsx"],"mappings":";;;;;AAmBA,SAAwB,EAAc,EACpC,SACA,WAAQ,IACR,mBAAgB,IAChB,gBAAa,IACb,qBAAkB,SAClB,gBAAa,oEACb,eAAY,IACZ,qBAAkB,IAClB,wBAAqB,IACrB,eAAY,WACS;CACrB,IAAM,CAAC,GAAa,KAAkB,EAAS,CAAI,GAC7C,CAAC,GAAY,KAAiB,EAAS,EAAK,GAC5C,CAAC,GAAc,KAAmB,EAAS,EAAK,GAChD,CAAC,GAAiB,KAAsB,kBAAsB,IAAI,IAAI,CAAC,GACvE,CAAC,GAAsB,KAA2B,EAAS,EAAK,GAChE,IAAe,EAAwB,IAAI,GAG3C,IAAc,kBAAoB,IAAI,IAAI,CAAC,GAC3C,IAAiB,EAAO,EAAK;CAInC,QAAgB;EACd,IAAM,IAAgB,OAAO,WAAW,kCAAkC,GACpE,U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AM,IAAmB,EAAgB,IAAI,CAAK,KAAK,CAAC,KAAgB,CAAC;IACzE,OACE,kBAAC,QAAD;KAAkB,WAAW,IAAmB,IAAY;KACzD,UAAA;IACG,GAFK,CAEL;GAEV,CAAC;EACG,CAAA,CACF;;AAEV"}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { type RefObject } from "react";
|
|
2
|
-
/**
|
|
3
|
-
* Shared WebGL2 core for the sidebar auroras. The vertical and horizontal
|
|
4
|
-
* variants differ only in their fragment main() (ramp axis + intensity
|
|
5
|
-
* falloff); everything else — vertex shader, simplex noise, program
|
|
6
|
-
* bootstrap, resize handling, render loop — lives here once.
|
|
7
|
-
*/
|
|
8
|
-
export declare const AURORA_VERT = "#version 300 es\nin vec2 position;\nvoid main() { gl_Position = vec4(position, 0.0, 1.0); }";
|
|
9
|
-
/** Fragment shader preamble: uniforms + 2D simplex noise (Ashima). */
|
|
10
|
-
export declare const AURORA_FRAG_PRELUDE = "#version 300 es\nprecision highp float;\nuniform float uTime;\nuniform vec3 uColorStops[6];\nuniform vec2 uResolution;\nuniform float uBlend;\nout vec4 fragColor;\n\nvec3 permute(vec3 x){ return mod(((x*34.0)+1.0)*x,289.0); }\nfloat snoise(vec2 v){\n const vec4 C=vec4(0.211324865405187,0.366025403784439,-0.577350269189626,0.024390243902439);\n vec2 i=floor(v+dot(v,C.yy));\n vec2 x0=v-i+dot(i,C.xx);\n vec2 i1=(x0.x>x0.y)?vec2(1.,0.):vec2(0.,1.);\n vec4 x12=x0.xyxy+C.xxzz; x12.xy-=i1;\n i=mod(i,289.0);\n vec3 p=permute(permute(i.y+vec3(0.,i1.y,1.))+i.x+vec3(0.,i1.x,1.));\n vec3 m=max(.5-vec3(dot(x0,x0),dot(x12.xy,x12.xy),dot(x12.zw,x12.zw)),0.);\n m=m*m; m=m*m;\n vec3 x2=2.*fract(p*C.www)-1.;\n vec3 h=abs(x2)-.5; vec3 ox=floor(x2+.5); vec3 a0=x2-ox;\n m*=1.79284291400159-0.85373472095314*(a0*a0+h*h);\n vec3 g; g.x=a0.x*x0.x+h.x*x0.y; g.yz=a0.yz*x12.xz+h.yz*x12.yw;\n return 130.*dot(m,g);\n}\n\n/* 6-stop colour ramp shared by both variants; t in [0,1] along the ramp axis. */\nvec3 rampColor(float t){\n float fi = clamp(t * 5.0, 0.0, 4.999);\n int ix = int(fi);\n float fr = fract(fi);\n vec3 colA, colB;\n if (ix == 0) { colA = uColorStops[0]; colB = uColorStops[1]; }\n else if (ix == 1) { colA = uColorStops[1]; colB = uColorStops[2]; }\n else if (ix == 2) { colA = uColorStops[2]; colB = uColorStops[3]; }\n else if (ix == 3) { colA = uColorStops[3]; colB = uColorStops[4]; }\n else { colA = uColorStops[4]; colB = uColorStops[5]; }\n return mix(colA, colB, fr);\n}\n";
|
|
11
|
-
export declare function hexToRgb(hex: string): [number, number, number];
|
|
12
|
-
/**
|
|
13
|
-
* Compiles `fragSource`, uploads the 6 colour stops, and runs the RAF
|
|
14
|
-
* render loop with parent-sized canvas. `label` prefixes console errors.
|
|
15
|
-
*
|
|
16
|
-
* `resolutionScale` (0–1, default 1) shrinks the canvas backing store
|
|
17
|
-
* relative to its CSS size; the compositor's bilinear upscale then supplies
|
|
18
|
-
* free softness. Auroras are decorative, so a variant that used to stack a
|
|
19
|
-
* CSS `blur()` on top of the shader (issue #65) can instead render fewer
|
|
20
|
-
* pixels and get the same diffuse look from a single pass.
|
|
21
|
-
*/
|
|
22
|
-
export declare function useAuroraCanvas(canvasRef: RefObject<HTMLCanvasElement | null>, fragSource: string, colors: string[], label: string, resolutionScale?: number): void;
|
|
@@ -1,91 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import { useEffect as e } from "react";
|
|
3
|
-
//#region src/components/seasons/aurora-canvas.ts
|
|
4
|
-
var t = "#version 300 es\nin vec2 position;\nvoid main() { gl_Position = vec4(position, 0.0, 1.0); }", n = "#version 300 es\nprecision highp float;\nuniform float uTime;\nuniform vec3 uColorStops[6];\nuniform vec2 uResolution;\nuniform float uBlend;\nout vec4 fragColor;\n\nvec3 permute(vec3 x){ return mod(((x*34.0)+1.0)*x,289.0); }\nfloat snoise(vec2 v){\n const vec4 C=vec4(0.211324865405187,0.366025403784439,-0.577350269189626,0.024390243902439);\n vec2 i=floor(v+dot(v,C.yy));\n vec2 x0=v-i+dot(i,C.xx);\n vec2 i1=(x0.x>x0.y)?vec2(1.,0.):vec2(0.,1.);\n vec4 x12=x0.xyxy+C.xxzz; x12.xy-=i1;\n i=mod(i,289.0);\n vec3 p=permute(permute(i.y+vec3(0.,i1.y,1.))+i.x+vec3(0.,i1.x,1.));\n vec3 m=max(.5-vec3(dot(x0,x0),dot(x12.xy,x12.xy),dot(x12.zw,x12.zw)),0.);\n m=m*m; m=m*m;\n vec3 x2=2.*fract(p*C.www)-1.;\n vec3 h=abs(x2)-.5; vec3 ox=floor(x2+.5); vec3 a0=x2-ox;\n m*=1.79284291400159-0.85373472095314*(a0*a0+h*h);\n vec3 g; g.x=a0.x*x0.x+h.x*x0.y; g.yz=a0.yz*x12.xz+h.yz*x12.yw;\n return 130.*dot(m,g);\n}\n\n/* 6-stop colour ramp shared by both variants; t in [0,1] along the ramp axis. */\nvec3 rampColor(float t){\n float fi = clamp(t * 5.0, 0.0, 4.999);\n int ix = int(fi);\n float fr = fract(fi);\n vec3 colA, colB;\n if (ix == 0) { colA = uColorStops[0]; colB = uColorStops[1]; }\n else if (ix == 1) { colA = uColorStops[1]; colB = uColorStops[2]; }\n else if (ix == 2) { colA = uColorStops[2]; colB = uColorStops[3]; }\n else if (ix == 3) { colA = uColorStops[3]; colB = uColorStops[4]; }\n else { colA = uColorStops[4]; colB = uColorStops[5]; }\n return mix(colA, colB, fr);\n}\n";
|
|
5
|
-
function r(e) {
|
|
6
|
-
return [
|
|
7
|
-
parseInt(e.slice(1, 3), 16) / 255,
|
|
8
|
-
parseInt(e.slice(3, 5), 16) / 255,
|
|
9
|
-
parseInt(e.slice(5, 7), 16) / 255
|
|
10
|
-
];
|
|
11
|
-
}
|
|
12
|
-
function i(n, i, a, o, s = 1) {
|
|
13
|
-
let c = a.join(",");
|
|
14
|
-
e(() => {
|
|
15
|
-
let e = c.split(","), a = n.current;
|
|
16
|
-
if (!a) return;
|
|
17
|
-
let l = a.getContext("webgl2", {
|
|
18
|
-
alpha: !0,
|
|
19
|
-
premultipliedAlpha: !1,
|
|
20
|
-
antialias: !0
|
|
21
|
-
});
|
|
22
|
-
if (!l) {
|
|
23
|
-
console.error(`${o}: WebGL2 not available`);
|
|
24
|
-
return;
|
|
25
|
-
}
|
|
26
|
-
function u(e, t) {
|
|
27
|
-
let n = l.createShader(e);
|
|
28
|
-
return n ? (l.shaderSource(n, t), l.compileShader(n), l.getShaderParameter(n, l.COMPILE_STATUS) ? n : (console.error(`${o} shader error:`, l.getShaderInfoLog(n)), null)) : null;
|
|
29
|
-
}
|
|
30
|
-
let d = null, f = null, p = null, m = null, h = null, g = null;
|
|
31
|
-
function _() {
|
|
32
|
-
if (l.isContextLost() || (l.clearColor(0, 0, 0, 0), l.enable(l.BLEND), l.blendFunc(l.SRC_ALPHA, l.ONE_MINUS_SRC_ALPHA), f = u(l.VERTEX_SHADER, t), p = u(l.FRAGMENT_SHADER, i), !f || !p) || (d = l.createProgram(), !d)) return !1;
|
|
33
|
-
if (l.attachShader(d, f), l.attachShader(d, p), l.linkProgram(d), !l.getProgramParameter(d, l.LINK_STATUS)) return console.error(`${o} link error:`, l.getProgramInfoLog(d)), !1;
|
|
34
|
-
l.useProgram(d), m = l.createBuffer(), l.bindBuffer(l.ARRAY_BUFFER, m), l.bufferData(l.ARRAY_BUFFER, new Float32Array([
|
|
35
|
-
-1,
|
|
36
|
-
-1,
|
|
37
|
-
3,
|
|
38
|
-
-1,
|
|
39
|
-
-1,
|
|
40
|
-
3
|
|
41
|
-
]), l.STATIC_DRAW);
|
|
42
|
-
let n = l.getAttribLocation(d, "position");
|
|
43
|
-
l.enableVertexAttribArray(n), l.vertexAttribPointer(n, 2, l.FLOAT, !1, 0, 0), h = l.getUniformLocation(d, "uTime");
|
|
44
|
-
let a = l.getUniformLocation(d, "uColorStops");
|
|
45
|
-
g = l.getUniformLocation(d, "uResolution");
|
|
46
|
-
let s = l.getUniformLocation(d, "uBlend");
|
|
47
|
-
return l.uniform3fv(a, new Float32Array(e.slice(0, 6).flatMap(r))), l.uniform1f(s, .75), !0;
|
|
48
|
-
}
|
|
49
|
-
let v = _();
|
|
50
|
-
function y() {
|
|
51
|
-
let e = a.parentElement;
|
|
52
|
-
if (!e) return;
|
|
53
|
-
let { width: t, height: n } = e.getBoundingClientRect(), r = Math.max(1, Math.round(t * s)), i = Math.max(1, Math.round(n * s));
|
|
54
|
-
a.width = r, a.height = i, a.style.width = `${t}px`, a.style.height = `${n}px`, l.viewport(0, 0, r, i), l.uniform2f(g, r, i);
|
|
55
|
-
}
|
|
56
|
-
let b = 0, x = !1, S = (e) => {
|
|
57
|
-
!v || x || (l.uniform1f(h, e), l.clear(l.COLOR_BUFFER_BIT), l.drawArrays(l.TRIANGLES, 0, 3));
|
|
58
|
-
}, C = (e) => {
|
|
59
|
-
b = requestAnimationFrame(C), S(e * .001);
|
|
60
|
-
}, w = window.matchMedia("(prefers-reduced-motion: reduce)"), T = !0, E = () => {
|
|
61
|
-
cancelAnimationFrame(b), !(!v || x) && (w.matches ? S(0) : T && (b = requestAnimationFrame(C)));
|
|
62
|
-
};
|
|
63
|
-
w.addEventListener("change", E);
|
|
64
|
-
let D = new IntersectionObserver((e) => {
|
|
65
|
-
T = e[0].intersectionRatio > 0, E();
|
|
66
|
-
});
|
|
67
|
-
D.observe(a);
|
|
68
|
-
let O = new ResizeObserver(() => {
|
|
69
|
-
y(), w.matches && S(0);
|
|
70
|
-
});
|
|
71
|
-
O.observe(a.parentElement), y(), E();
|
|
72
|
-
let k = (e) => {
|
|
73
|
-
e.preventDefault(), x = !0, cancelAnimationFrame(b);
|
|
74
|
-
}, A = () => {
|
|
75
|
-
x = !1, v = _(), v && (y(), E());
|
|
76
|
-
};
|
|
77
|
-
return a.addEventListener("webglcontextlost", k), a.addEventListener("webglcontextrestored", A), () => {
|
|
78
|
-
cancelAnimationFrame(b), D.disconnect(), w.removeEventListener("change", E), O.disconnect(), a.removeEventListener("webglcontextlost", k), a.removeEventListener("webglcontextrestored", A), l.deleteProgram(d), l.deleteShader(f), l.deleteShader(p), l.deleteBuffer(m);
|
|
79
|
-
};
|
|
80
|
-
}, [
|
|
81
|
-
n,
|
|
82
|
-
i,
|
|
83
|
-
c,
|
|
84
|
-
o,
|
|
85
|
-
s
|
|
86
|
-
]);
|
|
87
|
-
}
|
|
88
|
-
//#endregion
|
|
89
|
-
export { n as AURORA_FRAG_PRELUDE, t as AURORA_VERT, r as hexToRgb, i as useAuroraCanvas };
|
|
90
|
-
|
|
91
|
-
//# sourceMappingURL=aurora-canvas.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"aurora-canvas.js","names":[],"sources":["../../../src/components/seasons/aurora-canvas.ts"],"mappings":";;;AAWA,IAAa,IAAc,+FAKd,IAAsB;AAyCnC,SAAgB,EAAS,GAAuC;CAC9D,OAAO;EACL,SAAS,EAAI,MAAM,GAAG,CAAC,GAAG,EAAE,IAAI;EAChC,SAAS,EAAI,MAAM,GAAG,CAAC,GAAG,EAAE,IAAI;EAChC,SAAS,EAAI,MAAM,GAAG,CAAC,GAAG,EAAE,IAAI;CAClC;AACF;AAYA,SAAgB,EACd,GACA,GACA,GACA,GACA,IAAkB,GAClB;CAKA,IAAM,IAAY,EAAO,KAAK,GAAG;CACjC,QAAgB;EAId,IAAM,IAAS,EAAU,MAAM,GAAG,GAC5B,IAAS,EAAU;EACzB,IAAI,CAAC,GAAQ;EAEb,IAAM,IAAK,EAAO,WAAW,UAAU;GAAE,OAAO;GAAM,oBAAoB;GAAO,WAAW;EAAK,CAAC;EAClG,IAAI,CAAC,GAAI;GACP,QAAQ,MAAM,GAAG,EAAM,uBAAuB;GAC9C;EACF;EAEA,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iB,UAAU,CAAa;EAEtD,IAAM,IAAK,IAAI,sBAAsB,MAAY;GAE/C,AADA,IAAW,EAAQ,EAAE,CAAC,oBAAoB,GAC1C,EAAc;EAChB,CAAC;EACD,EAAG,QAAQ,CAAM;EAEjB,IAAM,IAAK,IAAI,qBAAqB;GAElC,AADA,EAAO,GACH,EAAc,WAAS,EAAK,CAAC;EACnC,CAAC;EAGD,AAFA,EAAG,QAAQ,EAAO,aAAc,GAChC,EAAO,GACP,EAAc;EAOd,IAAM,KAAiB,MAAiB;GAGtC,AAFA,EAAM,eAAe,GACrB,IAAc,IACd,qBAAqB,CAAK;EAC5B,GACM,UAA0B;GAI9B,IAAc,IACd,IAAQ,EAAU,GACb,MACL,EAAO,GACP,EAAc;EAChB;EAKA,OAJA,EAAO,iBAAiB,oBAAoB,CAAa,GACzD,EAAO,iBAAiB,wBAAwB,CAAiB,SAGpD;GAaX,AAZA,qBAAqB,CAAK,GAC1B,EAAG,WAAW,GACd,EAAc,oBAAoB,UAAU,CAAa,GACzD,EAAG,WAAW,GACd,EAAO,oBAAoB,oBAAoB,CAAa,GAC5D,EAAO,oBAAoB,wBAAwB,CAAiB,GAIpE,EAAG,cAAc,CAAI,GACrB,EAAG,aAAa,CAAI,GACpB,EAAG,aAAa,CAAI,GACpB,EAAG,aAAa,CAAG;EACrB;CACF,GAAG;EAAC;EAAW;EAAY;EAAW;EAAO;CAAe,CAAC;AAC/D"}
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import { AURORA_FRAG_PRELUDE as e, useAuroraCanvas as t } from "./aurora-canvas.js";
|
|
3
|
-
import { memo as n, useRef as r } from "react";
|
|
4
|
-
import { jsx as i } from "react/jsx-runtime";
|
|
5
|
-
//#region src/components/seasons/sidebar-aurora-horizontal.tsx
|
|
6
|
-
var a = `${e}
|
|
7
|
-
void main(){
|
|
8
|
-
vec2 uv = gl_FragCoord.xy / uResolution;
|
|
9
|
-
|
|
10
|
-
vec3 ramp = rampColor(uv.x);
|
|
11
|
-
|
|
12
|
-
// Noise samples along X — makes the aurora boundary undulate vertically over time.
|
|
13
|
-
float n = snoise(vec2(uv.x * 2.5 + uTime * 0.08, uTime * 0.18)) * 0.5;
|
|
14
|
-
n += snoise(vec2(uv.x * 5.0 - uTime * 0.05, uTime * 0.12 + 3.0)) * 0.25;
|
|
15
|
-
|
|
16
|
-
// pow(yi, 2.0) has zero slope at yi=0 so the boundary dissolves smoothly.
|
|
17
|
-
// No floor: above the boundary intensity is exactly 0, no ghost film.
|
|
18
|
-
float yi = clamp(((1.0 - uv.y) - 0.4) * 2.0 + n * 0.18, 0.0, 1.0);
|
|
19
|
-
float intensity = pow(yi, 2.0) * uBlend;
|
|
20
|
-
|
|
21
|
-
fragColor = vec4(ramp, intensity);
|
|
22
|
-
}`, o = n(function({ colors: e }) {
|
|
23
|
-
let n = r(null);
|
|
24
|
-
return t(n, a, e, "SidebarAuroraHorizontal"), /* @__PURE__ */ i("div", {
|
|
25
|
-
"aria-hidden": "true",
|
|
26
|
-
style: {
|
|
27
|
-
position: "absolute",
|
|
28
|
-
inset: 0,
|
|
29
|
-
overflow: "hidden",
|
|
30
|
-
borderRadius: "var(--radius-chrome-mobile, 16px)",
|
|
31
|
-
pointerEvents: "none"
|
|
32
|
-
},
|
|
33
|
-
children: /* @__PURE__ */ i("canvas", {
|
|
34
|
-
ref: n,
|
|
35
|
-
style: {
|
|
36
|
-
position: "absolute",
|
|
37
|
-
inset: 0,
|
|
38
|
-
width: "100%",
|
|
39
|
-
height: "100%"
|
|
40
|
-
}
|
|
41
|
-
})
|
|
42
|
-
});
|
|
43
|
-
});
|
|
44
|
-
//#endregion
|
|
45
|
-
export { o as SidebarAuroraHorizontal };
|
|
46
|
-
|
|
47
|
-
//# sourceMappingURL=sidebar-aurora-horizontal.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"sidebar-aurora-horizontal.js","names":[],"sources":["../../../src/components/seasons/sidebar-aurora-horizontal.tsx"],"mappings":";;;;;AASA,IAAM,IAAO,GAAG,EAAoB;;;;;;;;;;;;;;;;IAoBvB,IAA0B,EAAK,SAAiC,EAAE,aAAgC;CAC7G,IAAM,IAAY,EAA0B,IAAI;CAGhD,OAFA,EAAgB,GAAW,GAAM,GAAQ,yBAAyB,GAGhE,kBAAC,OAAD;EACE,eAAY;EACZ,OAAO;GACL,UAAU;GACV,OAAO;GACP,UAAU;GACV,cAAc;GACd,eAAe;EACjB;EAEA,UAAA,kBAAC,UAAD;GAAQ,KAAK;GAAW,OAAO;IAAE,UAAU;IAAY,OAAO;IAAG,OAAO;IAAQ,QAAQ;GAAO;EAAI,CAAA;CAChG,CAAA;AAET,CAAC"}
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import { AURORA_FRAG_PRELUDE as e, useAuroraCanvas as t } from "./aurora-canvas.js";
|
|
3
|
-
import { memo as n, useRef as r } from "react";
|
|
4
|
-
import { jsx as i } from "react/jsx-runtime";
|
|
5
|
-
//#region src/components/seasons/sidebar-aurora.tsx
|
|
6
|
-
var a = `${e}
|
|
7
|
-
void main(){
|
|
8
|
-
vec2 uv = gl_FragCoord.xy / uResolution;
|
|
9
|
-
|
|
10
|
-
vec3 ramp = rampColor(1.0 - uv.y);
|
|
11
|
-
|
|
12
|
-
// Noise drives organic horizontal shimmer.
|
|
13
|
-
float n = snoise(vec2(uv.y * 2.5 + uTime * 0.08, uTime * 0.18)) * 0.5;
|
|
14
|
-
n += snoise(vec2(uv.y * 5.0 - uTime * 0.05, uTime * 0.12 + 3.0)) * 0.25;
|
|
15
|
-
|
|
16
|
-
// Gradual blur: sample intensity at several horizontal offsets.
|
|
17
|
-
// blurR shrinks toward the right edge, so the right stays sharp
|
|
18
|
-
// while the left becomes progressively more diffuse.
|
|
19
|
-
float blurR = (1.0 - uv.x) * 0.09;
|
|
20
|
-
float intensity = 0.0;
|
|
21
|
-
float total = 0.0;
|
|
22
|
-
for (int i = -4; i <= 4; i++) {
|
|
23
|
-
float dx = float(i) * blurR;
|
|
24
|
-
float xi = clamp((uv.x + dx - 0.4) * 2.0 + n * 0.22, 0.0, 1.0);
|
|
25
|
-
float w = exp(-float(i * i) * 1.5);
|
|
26
|
-
intensity += mix(0.03, uBlend, pow(xi, 2.0)) * w;
|
|
27
|
-
total += w;
|
|
28
|
-
}
|
|
29
|
-
intensity /= total;
|
|
30
|
-
|
|
31
|
-
fragColor = vec4(ramp, intensity);
|
|
32
|
-
}`, o = .07, s = n(function({ colors: e }) {
|
|
33
|
-
let n = r(null);
|
|
34
|
-
return t(n, a, e, "SidebarAurora", o), /* @__PURE__ */ i("div", {
|
|
35
|
-
"aria-hidden": "true",
|
|
36
|
-
style: {
|
|
37
|
-
position: "absolute",
|
|
38
|
-
inset: 0,
|
|
39
|
-
overflow: "hidden",
|
|
40
|
-
borderRadius: "var(--radius-chrome, 14px)",
|
|
41
|
-
pointerEvents: "none"
|
|
42
|
-
},
|
|
43
|
-
children: /* @__PURE__ */ i("canvas", {
|
|
44
|
-
ref: n,
|
|
45
|
-
style: {
|
|
46
|
-
position: "absolute",
|
|
47
|
-
inset: 0,
|
|
48
|
-
width: "100%",
|
|
49
|
-
height: "100%"
|
|
50
|
-
}
|
|
51
|
-
})
|
|
52
|
-
});
|
|
53
|
-
});
|
|
54
|
-
//#endregion
|
|
55
|
-
export { s as SidebarAurora };
|
|
56
|
-
|
|
57
|
-
//# sourceMappingURL=sidebar-aurora.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"sidebar-aurora.js","names":[],"sources":["../../../src/components/seasons/sidebar-aurora.tsx"],"mappings":";;;;;AASA,IAAM,IAAO,GAAG,EAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;IAmC9B,IAAmB,KAIZ,IAAgB,EAAK,SAAuB,EAAE,aAAgC;CACzF,IAAM,IAAY,EAA0B,IAAI;CAGhD,OAFA,EAAgB,GAAW,GAAM,GAAQ,iBAAiB,CAAgB,GAGxE,kBAAC,OAAD;EACE,eAAY;EACZ,OAAO;GACL,UAAU;GACV,OAAO;GACP,UAAU;GACV,cAAc;GACd,eAAe;EACjB;EAEA,UAAA,kBAAC,UAAD;GAAQ,KAAK;GAAW,OAAO;IAAE,UAAU;IAAY,OAAO;IAAG,OAAO;IAAQ,QAAQ;GAAO;EAAI,CAAA;CAChG,CAAA;AAET,CAAC"}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { type Season } from "./seasons";
|
|
2
|
-
/**
|
|
3
|
-
* Design drafts: fully styled seasons that are NOT live — they appear in
|
|
4
|
-
* the Storybook Season selector (marked as drafts) but getActiveSeason()
|
|
5
|
-
* never consults them, so consuming apps ship only SEASONS. Promote a
|
|
6
|
-
* finished design by moving its entry into SEASONS in seasons.tsx.
|
|
7
|
-
*
|
|
8
|
-
* This module is deliberately NOT re-exported from the package barrel:
|
|
9
|
-
* the draft objects are Storybook-only data, and keeping them out of
|
|
10
|
-
* src/index.ts keeps them tree-shakeable out of every production bundle.
|
|
11
|
-
* Storybook (and anyone previewing drafts) imports it directly via the
|
|
12
|
-
* `./*` subpath export: `@fiestaboard/ui/lib/seasons-drafts`.
|
|
13
|
-
*
|
|
14
|
-
* Each draft's CSS lives in src/styles/seasons/<id>.css and ships to
|
|
15
|
-
* dist/seasons/<id>.css. It is NOT imported by theme.css (only the live
|
|
16
|
-
* pride season is) — a consumer promoting a draft opts in with
|
|
17
|
-
* `@import "@fiestaboard/ui/seasons/<id>.css"`. Storybook imports every
|
|
18
|
-
* draft in storybook.css so the Season toolbar previews them.
|
|
19
|
-
*
|
|
20
|
-
* `colors` MUST mirror the season CSS's --icon-g1..6 ramp: the CSS is the
|
|
21
|
-
* design intent, and the aurora/confetti render alongside the CSS-tinted
|
|
22
|
-
* chrome, so a diverging palette reads as two different seasons at once.
|
|
23
|
-
*/
|
|
24
|
-
export declare const DRAFT_SEASONS: Season[];
|
|
25
|
-
/** Every season, live and draft — for previews (Storybook selector). */
|
|
26
|
-
export declare const ALL_SEASONS: Season[];
|