shaders 2.2.23 → 2.2.24
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/core/Beam-BAKql1AP.js +116 -0
- package/dist/core/{ColorAdjustment-CKwpE_4M.js → ColorAdjustment-FeXXpypd.js} +1 -1
- package/dist/core/{Grayscale-CAEFLteL.js → Grayscale-BbsdDa_X.js} +1 -1
- package/dist/core/{HueShift-CyxzPcJV.js → HueShift-B_qE9c08.js} +1 -1
- package/dist/core/{Posterize-DhZkMaC7.js → Posterize-ggKIJlmm.js} +1 -1
- package/dist/core/{Saturation-Dup81Pnq.js → Saturation-Dl3gCWuZ.js} +1 -1
- package/dist/core/{Vibrance-C182fbSw.js → Vibrance-C2FRlLkK.js} +1 -1
- package/dist/core/index.js +271 -269
- package/dist/core/shaderRegistry.d.ts.map +1 -1
- package/dist/core/shaders/Beam/index.d.ts +71 -0
- package/dist/core/shaders/Beam/index.d.ts.map +1 -0
- package/dist/core/shaders/Beam/index.js +8 -0
- package/dist/core/shaders/Blob/index.js +1 -1
- package/dist/core/shaders/Blur/index.js +1 -1
- package/dist/core/shaders/Bulge/index.js +1 -1
- package/dist/core/shaders/CRTScreen/index.js +1 -1
- package/dist/core/shaders/ChannelBlur/index.js +1 -1
- package/dist/core/shaders/Checkerboard/index.js +1 -1
- package/dist/core/shaders/ChromaFlow/index.js +1 -1
- package/dist/core/shaders/ChromaticAberration/index.js +1 -1
- package/dist/core/shaders/Circle/index.js +1 -1
- package/dist/core/shaders/CursorTrail/index.js +1 -1
- package/dist/core/shaders/DiffuseBlur/index.js +1 -1
- package/dist/core/shaders/Dither/index.js +1 -1
- package/dist/core/shaders/DotGrid/index.js +1 -1
- package/dist/core/shaders/Duotone/index.js +1 -1
- package/dist/core/shaders/FilmGrain/index.js +1 -1
- package/dist/core/shaders/FloatingParticles/index.js +1 -1
- package/dist/core/shaders/GlassTiles/index.js +1 -1
- package/dist/core/shaders/Glow/index.js +1 -1
- package/dist/core/shaders/Godrays/index.js +1 -1
- package/dist/core/shaders/Grayscale/index.js +3 -3
- package/dist/core/shaders/Grid/index.js +1 -1
- package/dist/core/shaders/GridDistortion/index.js +1 -1
- package/dist/core/shaders/Group/index.js +1 -1
- package/dist/core/shaders/Halftone/index.js +1 -1
- package/dist/core/shaders/HueShift/index.js +3 -3
- package/dist/core/shaders/ImageTexture/index.js +1 -1
- package/dist/core/shaders/Invert/index.js +1 -1
- package/dist/core/shaders/LinearBlur/index.js +1 -1
- package/dist/core/shaders/LinearGradient/index.js +1 -1
- package/dist/core/shaders/Liquify/index.js +1 -1
- package/dist/core/shaders/Pixelate/index.js +1 -1
- package/dist/core/shaders/PolarCoordinates/index.js +1 -1
- package/dist/core/shaders/Posterize/index.js +2 -2
- package/dist/core/shaders/ProgressiveBlur/index.js +1 -1
- package/dist/core/shaders/RadialGradient/index.js +1 -1
- package/dist/core/shaders/RectangularCoordinates/index.js +1 -1
- package/dist/core/shaders/Ripples/index.js +1 -1
- package/dist/core/shaders/Saturation/index.js +3 -3
- package/dist/core/shaders/SimplexNoise/index.js +1 -1
- package/dist/core/shaders/SineWave/index.js +1 -1
- package/dist/core/shaders/SolidColor/index.js +1 -1
- package/dist/core/shaders/Spherize/index.js +1 -1
- package/dist/core/shaders/Spiral/index.js +1 -1
- package/dist/core/shaders/Strands/index.js +1 -1
- package/dist/core/shaders/Stretch/index.js +1 -1
- package/dist/core/shaders/Swirl/index.js +1 -1
- package/dist/core/shaders/TiltShift/index.js +1 -1
- package/dist/core/shaders/Tritone/index.js +1 -1
- package/dist/core/shaders/Twirl/index.js +1 -1
- package/dist/core/shaders/Vibrance/index.js +3 -3
- package/dist/core/shaders/WaveDistortion/index.js +1 -1
- package/dist/core/shaders/ZoomBlur/index.js +1 -1
- package/dist/react/components/Beam.d.ts +31 -0
- package/dist/react/components/Beam.d.ts.map +1 -0
- package/dist/{svelte/generatePresetCode-DaS7jkcT.js → react/generatePresetCode-CVj6IV8Y.js} +35 -15
- package/dist/react/index.d.ts +1 -0
- package/dist/react/index.d.ts.map +1 -1
- package/dist/react/index.js +10926 -10695
- package/dist/react/utils/generatePresetCode.d.ts.map +1 -1
- package/dist/react/utils/generatePresetCode.js +1 -1
- package/dist/registry.js +224 -0
- package/dist/solid/components/Beam.d.ts +28 -0
- package/dist/solid/components/Beam.d.ts.map +1 -0
- package/dist/solid/index.d.ts +1 -0
- package/dist/solid/index.d.ts.map +1 -1
- package/dist/solid/index.js +10559 -10335
- package/dist/solid/utils/generatePresetCode.d.ts.map +1 -1
- package/dist/solid/utils/generatePresetCode.js +32 -12
- package/dist/svelte/components/Beam.svelte.d.ts +19 -0
- package/dist/{react/generatePresetCode-DaS7jkcT.js → svelte/generatePresetCode-CVj6IV8Y.js} +35 -15
- package/dist/svelte/index.d.ts +1 -0
- package/dist/svelte/index.js +10929 -10739
- package/dist/svelte/utils/generatePresetCode.js +1 -1
- package/dist/vue/components/Beam.vue.d.ts +57 -0
- package/dist/vue/components/Beam.vue.d.ts.map +1 -0
- package/dist/vue/{generatePresetCode-Cd1B-Y9j.js → generatePresetCode-DCaIsDhE.js} +20 -0
- package/dist/vue/index.d.ts +1 -0
- package/dist/vue/index.d.ts.map +1 -1
- package/dist/vue/index.js +10414 -10200
- package/dist/vue/utils/generatePresetCode.d.ts.map +1 -1
- package/dist/vue/utils/generatePresetCode.js +1 -1
- package/package.json +9 -1
- /package/dist/core/{Blob-BlQ_1T_8.js → Blob-CVSxhHJG.js} +0 -0
- /package/dist/core/{Blur-421AjWLH.js → Blur-C1TTBHCX.js} +0 -0
- /package/dist/core/{Bulge-CZRVoR6C.js → Bulge-DV8tX-cw.js} +0 -0
- /package/dist/core/{CRTScreen-C_U9g_IR.js → CRTScreen-VTJQoOeq.js} +0 -0
- /package/dist/core/{ChannelBlur-5pzcB6Zv.js → ChannelBlur-BLZ9kBNA.js} +0 -0
- /package/dist/core/{Checkerboard-CrQkqXhD.js → Checkerboard-DQ4Df3vm.js} +0 -0
- /package/dist/core/{ChromaFlow-CNrQdL8f.js → ChromaFlow-BggN1_Av.js} +0 -0
- /package/dist/core/{ChromaticAberration-D9H7O17Y.js → ChromaticAberration-DlTaHNcp.js} +0 -0
- /package/dist/core/{Circle-DnLaDn8V.js → Circle-B9ObWlq5.js} +0 -0
- /package/dist/core/{CursorTrail-NY6n97VG.js → CursorTrail-C7QdUj8O.js} +0 -0
- /package/dist/core/{DiffuseBlur-C_n01ABk.js → DiffuseBlur-Mx6LBsqz.js} +0 -0
- /package/dist/core/{Dither-4s-c4zh4.js → Dither-CeIdV_9C.js} +0 -0
- /package/dist/core/{DotGrid-BYl8XdMi.js → DotGrid-D6xUvYrt.js} +0 -0
- /package/dist/core/{Duotone-DbewOoB4.js → Duotone-C2Pqt2gR.js} +0 -0
- /package/dist/core/{FilmGrain-zA_-knOw.js → FilmGrain-CJ9n_fgk.js} +0 -0
- /package/dist/core/{FloatingParticles-BhVnqMsE.js → FloatingParticles-iGtMs44K.js} +0 -0
- /package/dist/core/{GlassTiles-CFI57glh.js → GlassTiles-D_lVyag2.js} +0 -0
- /package/dist/core/{Glow-CQgl3IoS.js → Glow-B0jj-6OC.js} +0 -0
- /package/dist/core/{Godrays-BHMix_Bh.js → Godrays-DjLVuZa4.js} +0 -0
- /package/dist/core/{Grid-DlM-rVbZ.js → Grid-ByjU-_ua.js} +0 -0
- /package/dist/core/{GridDistortion-ZOZphSAT.js → GridDistortion-C_eIlhkW.js} +0 -0
- /package/dist/core/{Group-BQAs3RiH.js → Group-CyaDLGpI.js} +0 -0
- /package/dist/core/{Halftone-ci4ga-_J.js → Halftone-BvuAe_k-.js} +0 -0
- /package/dist/core/{ImageTexture-CdAGsPuH.js → ImageTexture-h00TFC1l.js} +0 -0
- /package/dist/core/{Invert-iPsiIqNZ.js → Invert-BEDDB0sm.js} +0 -0
- /package/dist/core/{LinearBlur-BEaaoIk-.js → LinearBlur-CLKxuyeT.js} +0 -0
- /package/dist/core/{LinearGradient-DR_7RxLX.js → LinearGradient-BPo8TX_M.js} +0 -0
- /package/dist/core/{Liquify-Bi02_ugh.js → Liquify-DGkfeixZ.js} +0 -0
- /package/dist/core/{Pixelate-CSsdT1rr.js → Pixelate-Bzy_7LnJ.js} +0 -0
- /package/dist/core/{PolarCoordinates-D626ml58.js → PolarCoordinates-BUumPeTv.js} +0 -0
- /package/dist/core/{ProgressiveBlur-CGtCfLF8.js → ProgressiveBlur-D6_6T7SS.js} +0 -0
- /package/dist/core/{RadialGradient-C0_WzmbH.js → RadialGradient-DEY9fRqa.js} +0 -0
- /package/dist/core/{RectangularCoordinates-DfXw7fhI.js → RectangularCoordinates-CZ-cFrCh.js} +0 -0
- /package/dist/core/{Ripples-DkemN3eh.js → Ripples-BwNlcsnV.js} +0 -0
- /package/dist/core/{SimplexNoise-BYEiCjDj.js → SimplexNoise-BhE_WyGt.js} +0 -0
- /package/dist/core/{SineWave-C6MRPtsy.js → SineWave-Db_Y0Mcv.js} +0 -0
- /package/dist/core/{SolidColor-BZHRczgb.js → SolidColor-CerOp4EQ.js} +0 -0
- /package/dist/core/{Spherize-DOAnDx2l.js → Spherize-Dh8E5XwG.js} +0 -0
- /package/dist/core/{Spiral-BMjnWXh1.js → Spiral-BvygQEfP.js} +0 -0
- /package/dist/core/{Strands-BOVsuJLe.js → Strands-maaPn4On.js} +0 -0
- /package/dist/core/{Stretch-D6bHc6yp.js → Stretch-CnA0-nSz.js} +0 -0
- /package/dist/core/{Swirl-BFoc0ImG.js → Swirl-CQBUahTB.js} +0 -0
- /package/dist/core/{TSLBase-BFMvTOak.js → TSLBase-Bt7Z4hv_.js} +0 -0
- /package/dist/core/{TiltShift-BiNvvhzj.js → TiltShift-qFj0oFzN.js} +0 -0
- /package/dist/core/{Tritone-gdx2AA0m.js → Tritone-AiixmTg8.js} +0 -0
- /package/dist/core/{Twirl-BsV8YbqC.js → Twirl-ooHQcV89.js} +0 -0
- /package/dist/core/{WaveDistortion-CmaS2zDB.js → WaveDistortion-CN8MjKlm.js} +0 -0
- /package/dist/core/{ZoomBlur-DLf5xQ16.js → ZoomBlur-CxWGx8PH.js} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generatePresetCode.d.ts","sourceRoot":"","sources":["../../src/utils/generatePresetCode.ts"],"names":[],"mappings":"AAAA,UAAU,eAAe;IACvB,IAAI,EAAE,MAAM,CAAA;IACZ,EAAE,CAAC,EAAE,MAAM,CAAA;IACX,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;IAC3B,QAAQ,CAAC,EAAE,eAAe,EAAE,CAAA;CAC7B;AAED,UAAU,YAAY;IACpB,UAAU,EAAE,eAAe,EAAE,CAAA;CAC9B;
|
|
1
|
+
{"version":3,"file":"generatePresetCode.d.ts","sourceRoot":"","sources":["../../src/utils/generatePresetCode.ts"],"names":[],"mappings":"AAAA,UAAU,eAAe;IACvB,IAAI,EAAE,MAAM,CAAA;IACZ,EAAE,CAAC,EAAE,MAAM,CAAA;IACX,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;IAC3B,QAAQ,CAAC,EAAE,eAAe,EAAE,CAAA;CAC7B;AAED,UAAU,YAAY;IACpB,UAAU,EAAE,eAAe,EAAE,CAAA;CAC9B;AA6lBD,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,YAAY,GAAG,MAAM,CAyC/D;AAGD,eAAO,MAAM,mBAAmB,UAyD/B,CAAA"}
|
|
@@ -16,6 +16,25 @@ const d = {
|
|
|
16
16
|
fontFamily: "JetBrains Mono",
|
|
17
17
|
spacing: 1
|
|
18
18
|
},
|
|
19
|
+
Beam: {
|
|
20
|
+
opacity: 1,
|
|
21
|
+
blendMode: "normal",
|
|
22
|
+
startPosition: {
|
|
23
|
+
x: 0.2,
|
|
24
|
+
y: 0.5
|
|
25
|
+
},
|
|
26
|
+
endPosition: {
|
|
27
|
+
x: 0.8,
|
|
28
|
+
y: 0.5
|
|
29
|
+
},
|
|
30
|
+
startThickness: 0.2,
|
|
31
|
+
endThickness: 0.2,
|
|
32
|
+
startSoftness: 0.5,
|
|
33
|
+
endSoftness: 0.5,
|
|
34
|
+
insideColor: "#FF0000",
|
|
35
|
+
outsideColor: "#0000FF",
|
|
36
|
+
colorSpace: "linear"
|
|
37
|
+
},
|
|
19
38
|
Blob: {
|
|
20
39
|
opacity: 1,
|
|
21
40
|
blendMode: "normal",
|
|
@@ -523,10 +542,10 @@ const d = {
|
|
|
523
542
|
};
|
|
524
543
|
function f(t, l, i = " ") {
|
|
525
544
|
return Object.entries(t).filter(([e, o]) => {
|
|
526
|
-
const
|
|
527
|
-
if (
|
|
528
|
-
const
|
|
529
|
-
return o !== null &&
|
|
545
|
+
const n = d[l] || {};
|
|
546
|
+
if (n.hasOwnProperty(e)) {
|
|
547
|
+
const r = n[e];
|
|
548
|
+
return o !== null && r !== null && typeof o == "object" && typeof r == "object" ? JSON.stringify(o) !== JSON.stringify(r) : o !== r;
|
|
530
549
|
}
|
|
531
550
|
return !(e === "opacity" && o === 1 || e === "blendMode" && o === "normal");
|
|
532
551
|
}).map(([e, o]) => typeof o == "string" ? `${e}=${JSON.stringify(o)}` : o !== null && typeof o == "object" ? `${e}={${JSON.stringify(o)}}` : `${e}={${o}}`).join(`
|
|
@@ -535,22 +554,22 @@ function f(t, l, i = " ") {
|
|
|
535
554
|
function p(t, l) {
|
|
536
555
|
const i = [];
|
|
537
556
|
function e(o) {
|
|
538
|
-
for (const
|
|
539
|
-
i.push(
|
|
557
|
+
for (const n of o)
|
|
558
|
+
i.push(n), n.children && e(n.children);
|
|
540
559
|
}
|
|
541
560
|
return e(l), i.some(
|
|
542
561
|
(o) => {
|
|
543
|
-
var
|
|
544
|
-
return ((
|
|
562
|
+
var n;
|
|
563
|
+
return ((n = o.props) == null ? void 0 : n.maskSource) === t;
|
|
545
564
|
}
|
|
546
565
|
);
|
|
547
566
|
}
|
|
548
567
|
function y(t) {
|
|
549
568
|
const l = (e, o = " ") => {
|
|
550
|
-
const
|
|
551
|
-
let
|
|
552
|
-
e.id && p(e.id, t.components) && (
|
|
553
|
-
const a = [
|
|
569
|
+
const n = e.props ? f(e.props, e.type, o) : "";
|
|
570
|
+
let r = "";
|
|
571
|
+
e.id && p(e.id, t.components) && (r = `id="${e.id}"`);
|
|
572
|
+
const a = [r, n].filter(Boolean).join(`
|
|
554
573
|
` + o + " ");
|
|
555
574
|
if (e.children && e.children.length > 0) {
|
|
556
575
|
const s = e.children.map((c) => l(c, o + " ")).join(`
|
|
@@ -574,6 +593,7 @@ const m = [
|
|
|
574
593
|
// @ts-ignore - replaced at build time
|
|
575
594
|
"AngularBlur",
|
|
576
595
|
"Ascii",
|
|
596
|
+
"Beam",
|
|
577
597
|
"Blob",
|
|
578
598
|
"Blur",
|
|
579
599
|
"Bulge",
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { type BlendMode, type TransformConfig } from '../../core';
|
|
2
|
+
import { type ComponentProps } from '../../core/shaders/Beam';
|
|
3
|
+
/**
|
|
4
|
+
* Define component props including blend mode, opacity, visibility, masking, and transformation
|
|
5
|
+
*/
|
|
6
|
+
interface ExtendedComponentProps extends Partial<ComponentProps> {
|
|
7
|
+
blendMode?: BlendMode;
|
|
8
|
+
opacity?: number;
|
|
9
|
+
visible?: boolean;
|
|
10
|
+
id?: string;
|
|
11
|
+
maskSource?: string;
|
|
12
|
+
maskType?: string;
|
|
13
|
+
renderOrder?: number;
|
|
14
|
+
transform?: Partial<TransformConfig>;
|
|
15
|
+
children?: import('svelte').Snippet;
|
|
16
|
+
}
|
|
17
|
+
declare const Beam: import("svelte").Component<ExtendedComponentProps, {}, "">;
|
|
18
|
+
type Beam = ReturnType<typeof Beam>;
|
|
19
|
+
export default Beam;
|
|
@@ -16,6 +16,25 @@ var c = {
|
|
|
16
16
|
fontFamily: "JetBrains Mono",
|
|
17
17
|
spacing: 1
|
|
18
18
|
},
|
|
19
|
+
Beam: {
|
|
20
|
+
opacity: 1,
|
|
21
|
+
blendMode: "normal",
|
|
22
|
+
startPosition: {
|
|
23
|
+
x: 0.2,
|
|
24
|
+
y: 0.5
|
|
25
|
+
},
|
|
26
|
+
endPosition: {
|
|
27
|
+
x: 0.8,
|
|
28
|
+
y: 0.5
|
|
29
|
+
},
|
|
30
|
+
startThickness: 0.2,
|
|
31
|
+
endThickness: 0.2,
|
|
32
|
+
startSoftness: 0.5,
|
|
33
|
+
endSoftness: 0.5,
|
|
34
|
+
insideColor: "#FF0000",
|
|
35
|
+
outsideColor: "#0000FF",
|
|
36
|
+
colorSpace: "linear"
|
|
37
|
+
},
|
|
19
38
|
Blob: {
|
|
20
39
|
opacity: 1,
|
|
21
40
|
blendMode: "normal",
|
|
@@ -522,30 +541,30 @@ var c = {
|
|
|
522
541
|
}
|
|
523
542
|
};
|
|
524
543
|
function d(l, i, o = " ") {
|
|
525
|
-
return Object.entries(l).filter(([e,
|
|
526
|
-
const
|
|
527
|
-
if (
|
|
528
|
-
const t =
|
|
529
|
-
return typeof
|
|
544
|
+
return Object.entries(l).filter(([e, n]) => {
|
|
545
|
+
const r = c[i] || {};
|
|
546
|
+
if (r.hasOwnProperty(e)) {
|
|
547
|
+
const t = r[e];
|
|
548
|
+
return typeof n == "object" && typeof t == "object" ? JSON.stringify(n) !== JSON.stringify(t) : n !== t;
|
|
530
549
|
}
|
|
531
|
-
return !(e === "opacity" &&
|
|
532
|
-
}).map(([e,
|
|
550
|
+
return !(e === "opacity" && n === 1 || e === "blendMode" && n === "normal");
|
|
551
|
+
}).map(([e, n]) => typeof n == "string" ? `${e}="${n}"` : typeof n == "object" ? `${e}={${JSON.stringify(n)}}` : `${e}={${n}}`).join(`
|
|
533
552
|
` + o + " ");
|
|
534
553
|
}
|
|
535
554
|
function f(l, i) {
|
|
536
555
|
const o = [];
|
|
537
|
-
function e(
|
|
538
|
-
for (const
|
|
539
|
-
o.push(
|
|
556
|
+
function e(n) {
|
|
557
|
+
for (const r of n)
|
|
558
|
+
o.push(r), r.children && e(r.children);
|
|
540
559
|
}
|
|
541
|
-
return e(i), o.some((
|
|
560
|
+
return e(i), o.some((n) => n.props?.maskSource === l);
|
|
542
561
|
}
|
|
543
562
|
function p(l) {
|
|
544
563
|
const i = (o, e = " ") => {
|
|
545
|
-
const
|
|
546
|
-
let
|
|
547
|
-
o.id && f(o.id, l.components) && (
|
|
548
|
-
const t = [
|
|
564
|
+
const n = o.props ? d(o.props, o.type, e) : "";
|
|
565
|
+
let r = "";
|
|
566
|
+
o.id && f(o.id, l.components) && (r = `id="${o.id}"`);
|
|
567
|
+
const t = [r, n].filter(Boolean).join(`
|
|
549
568
|
` + e + " ");
|
|
550
569
|
if (o.children && o.children.length > 0) {
|
|
551
570
|
const a = o.children.map((s) => i(s, e + " ")).join(`
|
|
@@ -567,6 +586,7 @@ ${l.components.map((o) => i(o)).join(`
|
|
|
567
586
|
const y = [
|
|
568
587
|
"AngularBlur",
|
|
569
588
|
"Ascii",
|
|
589
|
+
"Beam",
|
|
570
590
|
"Blob",
|
|
571
591
|
"Blur",
|
|
572
592
|
"Bulge",
|
package/dist/svelte/index.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export { default as AngularBlur } from './components/AngularBlur.svelte';
|
|
2
2
|
export { default as Ascii } from './components/Ascii.svelte';
|
|
3
|
+
export { default as Beam } from './components/Beam.svelte';
|
|
3
4
|
export { default as Blob } from './components/Blob.svelte';
|
|
4
5
|
export { default as Blur } from './components/Blur.svelte';
|
|
5
6
|
export { default as Bulge } from './components/Bulge.svelte';
|