shaders 2.2.22 → 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.
Files changed (143) hide show
  1. package/dist/core/Beam-BAKql1AP.js +116 -0
  2. package/dist/core/{ColorAdjustment-CKwpE_4M.js → ColorAdjustment-FeXXpypd.js} +1 -1
  3. package/dist/core/{Godrays-BBCtZxbv.js → Godrays-DjLVuZa4.js} +1 -1
  4. package/dist/core/{Grayscale-CAEFLteL.js → Grayscale-BbsdDa_X.js} +1 -1
  5. package/dist/core/{HueShift-CyxzPcJV.js → HueShift-B_qE9c08.js} +1 -1
  6. package/dist/core/{Posterize-DhZkMaC7.js → Posterize-ggKIJlmm.js} +1 -1
  7. package/dist/core/{Saturation-Dup81Pnq.js → Saturation-Dl3gCWuZ.js} +1 -1
  8. package/dist/core/{Vibrance-C182fbSw.js → Vibrance-C2FRlLkK.js} +1 -1
  9. package/dist/core/index.js +271 -269
  10. package/dist/core/shaderRegistry.d.ts.map +1 -1
  11. package/dist/core/shaders/Beam/index.d.ts +71 -0
  12. package/dist/core/shaders/Beam/index.d.ts.map +1 -0
  13. package/dist/core/shaders/Beam/index.js +8 -0
  14. package/dist/core/shaders/Blob/index.js +1 -1
  15. package/dist/core/shaders/Blur/index.js +1 -1
  16. package/dist/core/shaders/Bulge/index.js +1 -1
  17. package/dist/core/shaders/CRTScreen/index.js +1 -1
  18. package/dist/core/shaders/ChannelBlur/index.js +1 -1
  19. package/dist/core/shaders/Checkerboard/index.js +1 -1
  20. package/dist/core/shaders/ChromaFlow/index.js +1 -1
  21. package/dist/core/shaders/ChromaticAberration/index.js +1 -1
  22. package/dist/core/shaders/Circle/index.js +1 -1
  23. package/dist/core/shaders/CursorTrail/index.js +1 -1
  24. package/dist/core/shaders/DiffuseBlur/index.js +1 -1
  25. package/dist/core/shaders/Dither/index.js +1 -1
  26. package/dist/core/shaders/DotGrid/index.js +1 -1
  27. package/dist/core/shaders/Duotone/index.js +1 -1
  28. package/dist/core/shaders/FilmGrain/index.js +1 -1
  29. package/dist/core/shaders/FloatingParticles/index.js +1 -1
  30. package/dist/core/shaders/GlassTiles/index.js +1 -1
  31. package/dist/core/shaders/Glow/index.js +1 -1
  32. package/dist/core/shaders/Godrays/index.d.ts.map +1 -1
  33. package/dist/core/shaders/Godrays/index.js +1 -1
  34. package/dist/core/shaders/Grayscale/index.js +3 -3
  35. package/dist/core/shaders/Grid/index.js +1 -1
  36. package/dist/core/shaders/GridDistortion/index.js +1 -1
  37. package/dist/core/shaders/Group/index.js +1 -1
  38. package/dist/core/shaders/Halftone/index.js +1 -1
  39. package/dist/core/shaders/HueShift/index.js +3 -3
  40. package/dist/core/shaders/ImageTexture/index.js +1 -1
  41. package/dist/core/shaders/Invert/index.js +1 -1
  42. package/dist/core/shaders/LinearBlur/index.js +1 -1
  43. package/dist/core/shaders/LinearGradient/index.js +1 -1
  44. package/dist/core/shaders/Liquify/index.js +1 -1
  45. package/dist/core/shaders/Pixelate/index.js +1 -1
  46. package/dist/core/shaders/PolarCoordinates/index.js +1 -1
  47. package/dist/core/shaders/Posterize/index.js +2 -2
  48. package/dist/core/shaders/ProgressiveBlur/index.js +1 -1
  49. package/dist/core/shaders/RadialGradient/index.js +1 -1
  50. package/dist/core/shaders/RectangularCoordinates/index.js +1 -1
  51. package/dist/core/shaders/Ripples/index.js +1 -1
  52. package/dist/core/shaders/Saturation/index.js +3 -3
  53. package/dist/core/shaders/SimplexNoise/index.js +1 -1
  54. package/dist/core/shaders/SineWave/index.js +1 -1
  55. package/dist/core/shaders/SolidColor/index.js +1 -1
  56. package/dist/core/shaders/Spherize/index.js +1 -1
  57. package/dist/core/shaders/Spiral/index.js +1 -1
  58. package/dist/core/shaders/Strands/index.js +1 -1
  59. package/dist/core/shaders/Stretch/index.js +1 -1
  60. package/dist/core/shaders/Swirl/index.js +1 -1
  61. package/dist/core/shaders/TiltShift/index.js +1 -1
  62. package/dist/core/shaders/Tritone/index.js +1 -1
  63. package/dist/core/shaders/Twirl/index.js +1 -1
  64. package/dist/core/shaders/Vibrance/index.js +3 -3
  65. package/dist/core/shaders/WaveDistortion/index.js +1 -1
  66. package/dist/core/shaders/ZoomBlur/index.js +1 -1
  67. package/dist/react/components/Beam.d.ts +31 -0
  68. package/dist/react/components/Beam.d.ts.map +1 -0
  69. package/dist/{svelte/generatePresetCode-DaS7jkcT.js → react/generatePresetCode-CVj6IV8Y.js} +35 -15
  70. package/dist/react/index.d.ts +1 -0
  71. package/dist/react/index.d.ts.map +1 -1
  72. package/dist/react/index.js +10926 -10695
  73. package/dist/react/utils/generatePresetCode.d.ts.map +1 -1
  74. package/dist/react/utils/generatePresetCode.js +1 -1
  75. package/dist/registry.js +224 -0
  76. package/dist/solid/components/Beam.d.ts +28 -0
  77. package/dist/solid/components/Beam.d.ts.map +1 -0
  78. package/dist/solid/index.d.ts +1 -0
  79. package/dist/solid/index.d.ts.map +1 -1
  80. package/dist/solid/index.js +10559 -10335
  81. package/dist/solid/utils/generatePresetCode.d.ts.map +1 -1
  82. package/dist/solid/utils/generatePresetCode.js +32 -12
  83. package/dist/svelte/components/Beam.svelte.d.ts +19 -0
  84. package/dist/{react/generatePresetCode-DaS7jkcT.js → svelte/generatePresetCode-CVj6IV8Y.js} +35 -15
  85. package/dist/svelte/index.d.ts +1 -0
  86. package/dist/svelte/index.js +10929 -10739
  87. package/dist/svelte/utils/generatePresetCode.js +1 -1
  88. package/dist/vue/components/Beam.vue.d.ts +57 -0
  89. package/dist/vue/components/Beam.vue.d.ts.map +1 -0
  90. package/dist/vue/{generatePresetCode-Cd1B-Y9j.js → generatePresetCode-DCaIsDhE.js} +20 -0
  91. package/dist/vue/index.d.ts +1 -0
  92. package/dist/vue/index.d.ts.map +1 -1
  93. package/dist/vue/index.js +10415 -10201
  94. package/dist/vue/utils/generatePresetCode.d.ts.map +1 -1
  95. package/dist/vue/utils/generatePresetCode.js +1 -1
  96. package/package.json +9 -1
  97. /package/dist/core/{Blob-BlQ_1T_8.js → Blob-CVSxhHJG.js} +0 -0
  98. /package/dist/core/{Blur-421AjWLH.js → Blur-C1TTBHCX.js} +0 -0
  99. /package/dist/core/{Bulge-CZRVoR6C.js → Bulge-DV8tX-cw.js} +0 -0
  100. /package/dist/core/{CRTScreen-C_U9g_IR.js → CRTScreen-VTJQoOeq.js} +0 -0
  101. /package/dist/core/{ChannelBlur-5pzcB6Zv.js → ChannelBlur-BLZ9kBNA.js} +0 -0
  102. /package/dist/core/{Checkerboard-CrQkqXhD.js → Checkerboard-DQ4Df3vm.js} +0 -0
  103. /package/dist/core/{ChromaFlow-CNrQdL8f.js → ChromaFlow-BggN1_Av.js} +0 -0
  104. /package/dist/core/{ChromaticAberration-D9H7O17Y.js → ChromaticAberration-DlTaHNcp.js} +0 -0
  105. /package/dist/core/{Circle-DnLaDn8V.js → Circle-B9ObWlq5.js} +0 -0
  106. /package/dist/core/{CursorTrail-NY6n97VG.js → CursorTrail-C7QdUj8O.js} +0 -0
  107. /package/dist/core/{DiffuseBlur-C_n01ABk.js → DiffuseBlur-Mx6LBsqz.js} +0 -0
  108. /package/dist/core/{Dither-4s-c4zh4.js → Dither-CeIdV_9C.js} +0 -0
  109. /package/dist/core/{DotGrid-BYl8XdMi.js → DotGrid-D6xUvYrt.js} +0 -0
  110. /package/dist/core/{Duotone-DbewOoB4.js → Duotone-C2Pqt2gR.js} +0 -0
  111. /package/dist/core/{FilmGrain-zA_-knOw.js → FilmGrain-CJ9n_fgk.js} +0 -0
  112. /package/dist/core/{FloatingParticles-BhVnqMsE.js → FloatingParticles-iGtMs44K.js} +0 -0
  113. /package/dist/core/{GlassTiles-CFI57glh.js → GlassTiles-D_lVyag2.js} +0 -0
  114. /package/dist/core/{Glow-CQgl3IoS.js → Glow-B0jj-6OC.js} +0 -0
  115. /package/dist/core/{Grid-DlM-rVbZ.js → Grid-ByjU-_ua.js} +0 -0
  116. /package/dist/core/{GridDistortion-ZOZphSAT.js → GridDistortion-C_eIlhkW.js} +0 -0
  117. /package/dist/core/{Group-BQAs3RiH.js → Group-CyaDLGpI.js} +0 -0
  118. /package/dist/core/{Halftone-ci4ga-_J.js → Halftone-BvuAe_k-.js} +0 -0
  119. /package/dist/core/{ImageTexture-CdAGsPuH.js → ImageTexture-h00TFC1l.js} +0 -0
  120. /package/dist/core/{Invert-iPsiIqNZ.js → Invert-BEDDB0sm.js} +0 -0
  121. /package/dist/core/{LinearBlur-BEaaoIk-.js → LinearBlur-CLKxuyeT.js} +0 -0
  122. /package/dist/core/{LinearGradient-DR_7RxLX.js → LinearGradient-BPo8TX_M.js} +0 -0
  123. /package/dist/core/{Liquify-Bi02_ugh.js → Liquify-DGkfeixZ.js} +0 -0
  124. /package/dist/core/{Pixelate-CSsdT1rr.js → Pixelate-Bzy_7LnJ.js} +0 -0
  125. /package/dist/core/{PolarCoordinates-D626ml58.js → PolarCoordinates-BUumPeTv.js} +0 -0
  126. /package/dist/core/{ProgressiveBlur-CGtCfLF8.js → ProgressiveBlur-D6_6T7SS.js} +0 -0
  127. /package/dist/core/{RadialGradient-C0_WzmbH.js → RadialGradient-DEY9fRqa.js} +0 -0
  128. /package/dist/core/{RectangularCoordinates-DfXw7fhI.js → RectangularCoordinates-CZ-cFrCh.js} +0 -0
  129. /package/dist/core/{Ripples-DkemN3eh.js → Ripples-BwNlcsnV.js} +0 -0
  130. /package/dist/core/{SimplexNoise-BYEiCjDj.js → SimplexNoise-BhE_WyGt.js} +0 -0
  131. /package/dist/core/{SineWave-C6MRPtsy.js → SineWave-Db_Y0Mcv.js} +0 -0
  132. /package/dist/core/{SolidColor-BZHRczgb.js → SolidColor-CerOp4EQ.js} +0 -0
  133. /package/dist/core/{Spherize-DOAnDx2l.js → Spherize-Dh8E5XwG.js} +0 -0
  134. /package/dist/core/{Spiral-BMjnWXh1.js → Spiral-BvygQEfP.js} +0 -0
  135. /package/dist/core/{Strands-BOVsuJLe.js → Strands-maaPn4On.js} +0 -0
  136. /package/dist/core/{Stretch-D6bHc6yp.js → Stretch-CnA0-nSz.js} +0 -0
  137. /package/dist/core/{Swirl-BFoc0ImG.js → Swirl-CQBUahTB.js} +0 -0
  138. /package/dist/core/{TSLBase-BFMvTOak.js → TSLBase-Bt7Z4hv_.js} +0 -0
  139. /package/dist/core/{TiltShift-BiNvvhzj.js → TiltShift-qFj0oFzN.js} +0 -0
  140. /package/dist/core/{Tritone-gdx2AA0m.js → Tritone-AiixmTg8.js} +0 -0
  141. /package/dist/core/{Twirl-BsV8YbqC.js → Twirl-ooHQcV89.js} +0 -0
  142. /package/dist/core/{WaveDistortion-CmaS2zDB.js → WaveDistortion-CN8MjKlm.js} +0 -0
  143. /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;AA0kBD,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,YAAY,GAAG,MAAM,CAyC/D;AAGD,eAAO,MAAM,mBAAmB,UAwD/B,CAAA"}
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 r = d[l] || {};
527
- if (r.hasOwnProperty(e)) {
528
- const n = r[e];
529
- return o !== null && n !== null && typeof o == "object" && typeof n == "object" ? JSON.stringify(o) !== JSON.stringify(n) : o !== n;
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 r of o)
539
- i.push(r), r.children && e(r.children);
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 r;
544
- return ((r = o.props) == null ? void 0 : r.maskSource) === t;
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 r = e.props ? f(e.props, e.type, o) : "";
551
- let n = "";
552
- e.id && p(e.id, t.components) && (n = `id="${e.id}"`);
553
- const a = [n, r].filter(Boolean).join(`
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, r]) => {
526
- const n = c[i] || {};
527
- if (n.hasOwnProperty(e)) {
528
- const t = n[e];
529
- return typeof r == "object" && typeof t == "object" ? JSON.stringify(r) !== JSON.stringify(t) : r !== t;
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" && r === 1 || e === "blendMode" && r === "normal");
532
- }).map(([e, r]) => typeof r == "string" ? `${e}="${r}"` : typeof r == "object" ? `${e}={${JSON.stringify(r)}}` : `${e}={${r}}`).join(`
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(r) {
538
- for (const n of r)
539
- o.push(n), n.children && e(n.children);
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((r) => r.props?.maskSource === l);
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 r = o.props ? d(o.props, o.type, e) : "";
546
- let n = "";
547
- o.id && f(o.id, l.components) && (n = `id="${o.id}"`);
548
- const t = [n, r].filter(Boolean).join(`
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",
@@ -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';