shaders 2.2.34 → 2.2.36

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 (91) hide show
  1. package/dist/core/Perspective-CSP2Hb16.js +137 -0
  2. package/dist/core/Sharpness-cw57bW0s.js +41 -0
  3. package/dist/core/index.js +55 -51
  4. package/dist/core/shaderRegistry.d.ts.map +1 -1
  5. package/dist/core/shaders/Perspective/index.d.ts +57 -0
  6. package/dist/core/shaders/Perspective/index.d.ts.map +1 -0
  7. package/dist/core/shaders/Perspective/index.js +4 -0
  8. package/dist/core/shaders/Pixelate/index.js +1 -1
  9. package/dist/core/shaders/PolarCoordinates/index.js +1 -1
  10. package/dist/core/shaders/Posterize/index.js +1 -1
  11. package/dist/core/shaders/ProgressiveBlur/index.js +1 -1
  12. package/dist/core/shaders/RadialGradient/index.js +1 -1
  13. package/dist/core/shaders/RectangularCoordinates/index.js +1 -1
  14. package/dist/core/shaders/Ripples/index.js +1 -1
  15. package/dist/core/shaders/Saturation/index.js +1 -1
  16. package/dist/core/shaders/Sharpness/index.d.ts +14 -0
  17. package/dist/core/shaders/Sharpness/index.d.ts.map +1 -0
  18. package/dist/core/shaders/Sharpness/index.js +2 -0
  19. package/dist/core/shaders/SimplexNoise/index.js +1 -1
  20. package/dist/core/shaders/SineWave/index.js +1 -1
  21. package/dist/core/shaders/SolidColor/index.js +1 -1
  22. package/dist/core/shaders/Spherize/index.js +1 -1
  23. package/dist/core/shaders/Spiral/index.js +1 -1
  24. package/dist/core/shaders/Strands/index.js +1 -1
  25. package/dist/core/shaders/Stretch/index.js +1 -1
  26. package/dist/core/shaders/Swirl/index.js +1 -1
  27. package/dist/core/shaders/TiltShift/index.js +1 -1
  28. package/dist/core/shaders/Tritone/index.js +1 -1
  29. package/dist/core/shaders/Twirl/index.js +1 -1
  30. package/dist/core/shaders/Vibrance/index.js +1 -1
  31. package/dist/core/shaders/WaveDistortion/index.js +1 -1
  32. package/dist/core/shaders/ZoomBlur/index.js +1 -1
  33. package/dist/react/components/Perspective.d.ts +31 -0
  34. package/dist/react/components/Perspective.d.ts.map +1 -0
  35. package/dist/react/components/Sharpness.d.ts +31 -0
  36. package/dist/react/components/Sharpness.d.ts.map +1 -0
  37. package/dist/react/{generatePresetCode-CwTRhENe.js → generatePresetCode-DtpUpaeM.js} +24 -0
  38. package/dist/react/index.d.ts +2 -0
  39. package/dist/react/index.d.ts.map +1 -1
  40. package/dist/react/index.js +682 -404
  41. package/dist/react/utils/generatePresetCode.d.ts.map +1 -1
  42. package/dist/react/utils/generatePresetCode.js +1 -1
  43. package/dist/registry.js +242 -0
  44. package/dist/solid/components/Perspective.d.ts +28 -0
  45. package/dist/solid/components/Perspective.d.ts.map +1 -0
  46. package/dist/solid/components/Sharpness.d.ts +28 -0
  47. package/dist/solid/components/Sharpness.d.ts.map +1 -0
  48. package/dist/solid/index.d.ts +2 -0
  49. package/dist/solid/index.d.ts.map +1 -1
  50. package/dist/solid/index.js +626 -344
  51. package/dist/solid/utils/generatePresetCode.d.ts.map +1 -1
  52. package/dist/solid/utils/generatePresetCode.js +24 -0
  53. package/dist/svelte/components/Perspective.svelte.d.ts +19 -0
  54. package/dist/svelte/components/Sharpness.svelte.d.ts +19 -0
  55. package/dist/svelte/{generatePresetCode-Qh7jlXV3.js → generatePresetCode-Yu_cJh3q.js} +24 -0
  56. package/dist/svelte/index.d.ts +2 -0
  57. package/dist/svelte/index.js +268 -46
  58. package/dist/svelte/utils/generatePresetCode.js +1 -1
  59. package/dist/vue/components/Perspective.vue.d.ts +57 -0
  60. package/dist/vue/components/Perspective.vue.d.ts.map +1 -0
  61. package/dist/vue/components/Sharpness.vue.d.ts +57 -0
  62. package/dist/vue/components/Sharpness.vue.d.ts.map +1 -0
  63. package/dist/vue/{generatePresetCode-Bf-TQPvI.js → generatePresetCode-DnK2X66E.js} +24 -0
  64. package/dist/vue/index.d.ts +2 -0
  65. package/dist/vue/index.d.ts.map +1 -1
  66. package/dist/vue/index.js +410 -162
  67. package/dist/vue/utils/generatePresetCode.d.ts.map +1 -1
  68. package/dist/vue/utils/generatePresetCode.js +1 -1
  69. package/package.json +17 -1
  70. /package/dist/core/{Pixelate-C5Rx1dBp.js → Pixelate-BAoi-CSx.js} +0 -0
  71. /package/dist/core/{PolarCoordinates-CIh5ef8m.js → PolarCoordinates-BwN9HhFK.js} +0 -0
  72. /package/dist/core/{Posterize-Byy0Ek0l.js → Posterize-XoAqPWv2.js} +0 -0
  73. /package/dist/core/{ProgressiveBlur-Bzz24_y-.js → ProgressiveBlur-RuAm_BKx.js} +0 -0
  74. /package/dist/core/{RadialGradient-Ci1dU-1K.js → RadialGradient-BfFuRbIl.js} +0 -0
  75. /package/dist/core/{RectangularCoordinates-tVGG7WOJ.js → RectangularCoordinates-CiW3J4UT.js} +0 -0
  76. /package/dist/core/{Ripples-BCGSt5HD.js → Ripples-BAcLsbLr.js} +0 -0
  77. /package/dist/core/{Saturation-DWR1Nruu.js → Saturation-DVVlpikK.js} +0 -0
  78. /package/dist/core/{SimplexNoise-CAtknQS7.js → SimplexNoise-CxF7Tl5O.js} +0 -0
  79. /package/dist/core/{SineWave-CHtV6kB4.js → SineWave-SIEiE1O3.js} +0 -0
  80. /package/dist/core/{SolidColor-CSSquNVW.js → SolidColor-zYROg_aE.js} +0 -0
  81. /package/dist/core/{Spherize-BJby0xSU.js → Spherize-tsKMpSaS.js} +0 -0
  82. /package/dist/core/{Spiral-CpB3-tFZ.js → Spiral-PsIc1BI9.js} +0 -0
  83. /package/dist/core/{Strands-C2KWiJc8.js → Strands-xsbd_3Bt.js} +0 -0
  84. /package/dist/core/{Stretch-Chpzutao.js → Stretch-BhHjbcqd.js} +0 -0
  85. /package/dist/core/{Swirl-qbMypv_R.js → Swirl-CV1prOHF.js} +0 -0
  86. /package/dist/core/{TiltShift-D0qyWoe3.js → TiltShift-BYQjUHpn.js} +0 -0
  87. /package/dist/core/{Tritone-DzeueG1F.js → Tritone-CJW8YTyB.js} +0 -0
  88. /package/dist/core/{Twirl-B2Ic0WGq.js → Twirl-5k_XPd51.js} +0 -0
  89. /package/dist/core/{Vibrance-BAGXelBi.js → Vibrance-c25pkbWj.js} +0 -0
  90. /package/dist/core/{WaveDistortion-DYFl_8vA.js → WaveDistortion-BRgbfqt3.js} +0 -0
  91. /package/dist/core/{ZoomBlur-CXpRNRJA.js → ZoomBlur-DEozXA8U.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;AA6pBD,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,YAAY,GAAG,MAAM,CAyC/D;AAGD,eAAO,MAAM,mBAAmB,UA0D/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;AAmrBD,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,YAAY,GAAG,MAAM,CAyC/D;AAGD,eAAO,MAAM,mBAAmB,UA4D/B,CAAA"}
@@ -321,6 +321,23 @@ const shaderMetadata = {
321
321
  "radius": 1,
322
322
  "edges": "stretch"
323
323
  },
324
+ "Perspective": {
325
+ "opacity": 1,
326
+ "blendMode": "normal",
327
+ "center": {
328
+ "x": 0.5,
329
+ "y": 0.5
330
+ },
331
+ "pan": 0,
332
+ "tilt": 0,
333
+ "fov": 60,
334
+ "zoom": 1,
335
+ "offset": {
336
+ "x": 0.5,
337
+ "y": 0.5
338
+ },
339
+ "edges": "transparent"
340
+ },
324
341
  "Pixelate": {
325
342
  "opacity": 1,
326
343
  "blendMode": "normal",
@@ -397,6 +414,11 @@ const shaderMetadata = {
397
414
  "blendMode": "normal",
398
415
  "intensity": 1
399
416
  },
417
+ "Sharpness": {
418
+ "opacity": 1,
419
+ "blendMode": "normal",
420
+ "sharpness": 0
421
+ },
400
422
  "SimplexNoise": {
401
423
  "opacity": 1,
402
424
  "blendMode": "normal",
@@ -706,6 +728,7 @@ const availableComponents = [
706
728
  "LinearBlur",
707
729
  "LinearGradient",
708
730
  "Liquify",
731
+ "Perspective",
709
732
  "Pixelate",
710
733
  "PolarCoordinates",
711
734
  "Posterize",
@@ -714,6 +737,7 @@ const availableComponents = [
714
737
  "RectangularCoordinates",
715
738
  "Ripples",
716
739
  "Saturation",
740
+ "Sharpness",
717
741
  "SimplexNoise",
718
742
  "SineWave",
719
743
  "SolidColor",
@@ -0,0 +1,19 @@
1
+ import { type BlendMode, type TransformConfig } from '../../core';
2
+ import { type ComponentProps } from '../../core/shaders/Perspective';
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 Perspective: import("svelte").Component<ExtendedComponentProps, {}, "">;
18
+ type Perspective = ReturnType<typeof Perspective>;
19
+ export default Perspective;
@@ -0,0 +1,19 @@
1
+ import { type BlendMode, type TransformConfig } from '../../core';
2
+ import { type ComponentProps } from '../../core/shaders/Sharpness';
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 Sharpness: import("svelte").Component<ExtendedComponentProps, {}, "">;
18
+ type Sharpness = ReturnType<typeof Sharpness>;
19
+ export default Sharpness;
@@ -319,6 +319,23 @@ var shaderMetadata = {
319
319
  "radius": 1,
320
320
  "edges": "stretch"
321
321
  },
322
+ "Perspective": {
323
+ "opacity": 1,
324
+ "blendMode": "normal",
325
+ "center": {
326
+ "x": .5,
327
+ "y": .5
328
+ },
329
+ "pan": 0,
330
+ "tilt": 0,
331
+ "fov": 60,
332
+ "zoom": 1,
333
+ "offset": {
334
+ "x": .5,
335
+ "y": .5
336
+ },
337
+ "edges": "transparent"
338
+ },
322
339
  "Pixelate": {
323
340
  "opacity": 1,
324
341
  "blendMode": "normal",
@@ -395,6 +412,11 @@ var shaderMetadata = {
395
412
  "blendMode": "normal",
396
413
  "intensity": 1
397
414
  },
415
+ "Sharpness": {
416
+ "opacity": 1,
417
+ "blendMode": "normal",
418
+ "sharpness": 0
419
+ },
398
420
  "SimplexNoise": {
399
421
  "opacity": 1,
400
422
  "blendMode": "normal",
@@ -655,6 +677,7 @@ const availableComponents = [
655
677
  "LinearBlur",
656
678
  "LinearGradient",
657
679
  "Liquify",
680
+ "Perspective",
658
681
  "Pixelate",
659
682
  "PolarCoordinates",
660
683
  "Posterize",
@@ -663,6 +686,7 @@ const availableComponents = [
663
686
  "RectangularCoordinates",
664
687
  "Ripples",
665
688
  "Saturation",
689
+ "Sharpness",
666
690
  "SimplexNoise",
667
691
  "SineWave",
668
692
  "SolidColor",
@@ -32,6 +32,7 @@ export { default as Invert } from './components/Invert.svelte';
32
32
  export { default as LinearBlur } from './components/LinearBlur.svelte';
33
33
  export { default as LinearGradient } from './components/LinearGradient.svelte';
34
34
  export { default as Liquify } from './components/Liquify.svelte';
35
+ export { default as Perspective } from './components/Perspective.svelte';
35
36
  export { default as Pixelate } from './components/Pixelate.svelte';
36
37
  export { default as PolarCoordinates } from './components/PolarCoordinates.svelte';
37
38
  export { default as Posterize } from './components/Posterize.svelte';
@@ -40,6 +41,7 @@ export { default as RadialGradient } from './components/RadialGradient.svelte';
40
41
  export { default as RectangularCoordinates } from './components/RectangularCoordinates.svelte';
41
42
  export { default as Ripples } from './components/Ripples.svelte';
42
43
  export { default as Saturation } from './components/Saturation.svelte';
44
+ export { default as Sharpness } from './components/Sharpness.svelte';
43
45
  export { default as SimplexNoise } from './components/SimplexNoise.svelte';
44
46
  export { default as SineWave } from './components/SineWave.svelte';
45
47
  export { default as SolidColor } from './components/SolidColor.svelte';
@@ -1,4 +1,4 @@
1
- import { n as generatePresetCode } from "./generatePresetCode-Qh7jlXV3.js";
1
+ import { n as generatePresetCode } from "./generatePresetCode-Yu_cJh3q.js";
2
2
  import "svelte/internal/disclose-version";
3
3
  import * as $ from "svelte/internal/client";
4
4
  import { getContext, onDestroy, onMount, setContext } from "svelte";
@@ -37,28 +37,30 @@ import { componentDefinition as componentDefinition$30 } from "../core/shaders/I
37
37
  import { componentDefinition as componentDefinition$31 } from "../core/shaders/LinearBlur/index.js";
38
38
  import { componentDefinition as componentDefinition$32 } from "../core/shaders/LinearGradient/index.js";
39
39
  import { componentDefinition as componentDefinition$33 } from "../core/shaders/Liquify/index.js";
40
- import { componentDefinition as componentDefinition$34 } from "../core/shaders/Pixelate/index.js";
41
- import { componentDefinition as componentDefinition$35 } from "../core/shaders/PolarCoordinates/index.js";
42
- import { componentDefinition as componentDefinition$36 } from "../core/shaders/Posterize/index.js";
43
- import { componentDefinition as componentDefinition$37 } from "../core/shaders/ProgressiveBlur/index.js";
44
- import { componentDefinition as componentDefinition$38 } from "../core/shaders/RadialGradient/index.js";
45
- import { componentDefinition as componentDefinition$39 } from "../core/shaders/RectangularCoordinates/index.js";
46
- import { componentDefinition as componentDefinition$40 } from "../core/shaders/Ripples/index.js";
47
- import { componentDefinition as componentDefinition$41 } from "../core/shaders/Saturation/index.js";
48
- import { componentDefinition as componentDefinition$42 } from "../core/shaders/SimplexNoise/index.js";
49
- import { componentDefinition as componentDefinition$43 } from "../core/shaders/SineWave/index.js";
50
- import { componentDefinition as componentDefinition$44 } from "../core/shaders/SolidColor/index.js";
51
- import { componentDefinition as componentDefinition$45 } from "../core/shaders/Spherize/index.js";
52
- import { componentDefinition as componentDefinition$46 } from "../core/shaders/Spiral/index.js";
53
- import { componentDefinition as componentDefinition$47 } from "../core/shaders/Strands/index.js";
54
- import { componentDefinition as componentDefinition$48 } from "../core/shaders/Stretch/index.js";
55
- import { componentDefinition as componentDefinition$49 } from "../core/shaders/Swirl/index.js";
56
- import { componentDefinition as componentDefinition$50 } from "../core/shaders/TiltShift/index.js";
57
- import { componentDefinition as componentDefinition$51 } from "../core/shaders/Tritone/index.js";
58
- import { componentDefinition as componentDefinition$52 } from "../core/shaders/Twirl/index.js";
59
- import { componentDefinition as componentDefinition$53 } from "../core/shaders/Vibrance/index.js";
60
- import { componentDefinition as componentDefinition$54 } from "../core/shaders/WaveDistortion/index.js";
61
- import { componentDefinition as componentDefinition$55 } from "../core/shaders/ZoomBlur/index.js";
40
+ import { componentDefinition as componentDefinition$34 } from "../core/shaders/Perspective/index.js";
41
+ import { componentDefinition as componentDefinition$35 } from "../core/shaders/Pixelate/index.js";
42
+ import { componentDefinition as componentDefinition$36 } from "../core/shaders/PolarCoordinates/index.js";
43
+ import { componentDefinition as componentDefinition$37 } from "../core/shaders/Posterize/index.js";
44
+ import { componentDefinition as componentDefinition$38 } from "../core/shaders/ProgressiveBlur/index.js";
45
+ import { componentDefinition as componentDefinition$39 } from "../core/shaders/RadialGradient/index.js";
46
+ import { componentDefinition as componentDefinition$40 } from "../core/shaders/RectangularCoordinates/index.js";
47
+ import { componentDefinition as componentDefinition$41 } from "../core/shaders/Ripples/index.js";
48
+ import { componentDefinition as componentDefinition$42 } from "../core/shaders/Saturation/index.js";
49
+ import { componentDefinition as componentDefinition$43 } from "../core/shaders/Sharpness/index.js";
50
+ import { componentDefinition as componentDefinition$44 } from "../core/shaders/SimplexNoise/index.js";
51
+ import { componentDefinition as componentDefinition$45 } from "../core/shaders/SineWave/index.js";
52
+ import { componentDefinition as componentDefinition$46 } from "../core/shaders/SolidColor/index.js";
53
+ import { componentDefinition as componentDefinition$47 } from "../core/shaders/Spherize/index.js";
54
+ import { componentDefinition as componentDefinition$48 } from "../core/shaders/Spiral/index.js";
55
+ import { componentDefinition as componentDefinition$49 } from "../core/shaders/Strands/index.js";
56
+ import { componentDefinition as componentDefinition$50 } from "../core/shaders/Stretch/index.js";
57
+ import { componentDefinition as componentDefinition$51 } from "../core/shaders/Swirl/index.js";
58
+ import { componentDefinition as componentDefinition$52 } from "../core/shaders/TiltShift/index.js";
59
+ import { componentDefinition as componentDefinition$53 } from "../core/shaders/Tritone/index.js";
60
+ import { componentDefinition as componentDefinition$54 } from "../core/shaders/Twirl/index.js";
61
+ import { componentDefinition as componentDefinition$55 } from "../core/shaders/Vibrance/index.js";
62
+ import { componentDefinition as componentDefinition$56 } from "../core/shaders/WaveDistortion/index.js";
63
+ import { componentDefinition as componentDefinition$57 } from "../core/shaders/ZoomBlur/index.js";
62
64
  import { vec4 } from "three/tsl";
63
65
  import { TelemetryCollector, isExternalUser, shouldCollectTelemetry } from "../core/telemetry/index.js";
64
66
  function AngularBlur($$anchor, $$props) {
@@ -3801,7 +3803,7 @@ function Liquify($$anchor, $$props) {
3801
3803
  children?.($$anchor);
3802
3804
  $.pop();
3803
3805
  }
3804
- function Pixelate($$anchor, $$props) {
3806
+ function Perspective($$anchor, $$props) {
3805
3807
  $.push($$props, true);
3806
3808
  const DEFAULT_TRANSFORM = {
3807
3809
  offsetX: 0,
@@ -3911,7 +3913,7 @@ function Pixelate($$anchor, $$props) {
3911
3913
  children?.($$anchor);
3912
3914
  $.pop();
3913
3915
  }
3914
- function PolarCoordinates($$anchor, $$props) {
3916
+ function Pixelate($$anchor, $$props) {
3915
3917
  $.push($$props, true);
3916
3918
  const DEFAULT_TRANSFORM = {
3917
3919
  offsetX: 0,
@@ -4021,7 +4023,7 @@ function PolarCoordinates($$anchor, $$props) {
4021
4023
  children?.($$anchor);
4022
4024
  $.pop();
4023
4025
  }
4024
- function Posterize($$anchor, $$props) {
4026
+ function PolarCoordinates($$anchor, $$props) {
4025
4027
  $.push($$props, true);
4026
4028
  const DEFAULT_TRANSFORM = {
4027
4029
  offsetX: 0,
@@ -4131,7 +4133,7 @@ function Posterize($$anchor, $$props) {
4131
4133
  children?.($$anchor);
4132
4134
  $.pop();
4133
4135
  }
4134
- function ProgressiveBlur($$anchor, $$props) {
4136
+ function Posterize($$anchor, $$props) {
4135
4137
  $.push($$props, true);
4136
4138
  const DEFAULT_TRANSFORM = {
4137
4139
  offsetX: 0,
@@ -4241,7 +4243,7 @@ function ProgressiveBlur($$anchor, $$props) {
4241
4243
  children?.($$anchor);
4242
4244
  $.pop();
4243
4245
  }
4244
- function RadialGradient($$anchor, $$props) {
4246
+ function ProgressiveBlur($$anchor, $$props) {
4245
4247
  $.push($$props, true);
4246
4248
  const DEFAULT_TRANSFORM = {
4247
4249
  offsetX: 0,
@@ -4351,7 +4353,7 @@ function RadialGradient($$anchor, $$props) {
4351
4353
  children?.($$anchor);
4352
4354
  $.pop();
4353
4355
  }
4354
- function RectangularCoordinates($$anchor, $$props) {
4356
+ function RadialGradient($$anchor, $$props) {
4355
4357
  $.push($$props, true);
4356
4358
  const DEFAULT_TRANSFORM = {
4357
4359
  offsetX: 0,
@@ -4461,7 +4463,7 @@ function RectangularCoordinates($$anchor, $$props) {
4461
4463
  children?.($$anchor);
4462
4464
  $.pop();
4463
4465
  }
4464
- function Ripples($$anchor, $$props) {
4466
+ function RectangularCoordinates($$anchor, $$props) {
4465
4467
  $.push($$props, true);
4466
4468
  const DEFAULT_TRANSFORM = {
4467
4469
  offsetX: 0,
@@ -4571,7 +4573,7 @@ function Ripples($$anchor, $$props) {
4571
4573
  children?.($$anchor);
4572
4574
  $.pop();
4573
4575
  }
4574
- function Saturation($$anchor, $$props) {
4576
+ function Ripples($$anchor, $$props) {
4575
4577
  $.push($$props, true);
4576
4578
  const DEFAULT_TRANSFORM = {
4577
4579
  offsetX: 0,
@@ -4681,7 +4683,7 @@ function Saturation($$anchor, $$props) {
4681
4683
  children?.($$anchor);
4682
4684
  $.pop();
4683
4685
  }
4684
- function SimplexNoise($$anchor, $$props) {
4686
+ function Saturation($$anchor, $$props) {
4685
4687
  $.push($$props, true);
4686
4688
  const DEFAULT_TRANSFORM = {
4687
4689
  offsetX: 0,
@@ -4791,7 +4793,7 @@ function SimplexNoise($$anchor, $$props) {
4791
4793
  children?.($$anchor);
4792
4794
  $.pop();
4793
4795
  }
4794
- function SineWave($$anchor, $$props) {
4796
+ function Sharpness($$anchor, $$props) {
4795
4797
  $.push($$props, true);
4796
4798
  const DEFAULT_TRANSFORM = {
4797
4799
  offsetX: 0,
@@ -4901,7 +4903,7 @@ function SineWave($$anchor, $$props) {
4901
4903
  children?.($$anchor);
4902
4904
  $.pop();
4903
4905
  }
4904
- function SolidColor($$anchor, $$props) {
4906
+ function SimplexNoise($$anchor, $$props) {
4905
4907
  $.push($$props, true);
4906
4908
  const DEFAULT_TRANSFORM = {
4907
4909
  offsetX: 0,
@@ -5011,7 +5013,7 @@ function SolidColor($$anchor, $$props) {
5011
5013
  children?.($$anchor);
5012
5014
  $.pop();
5013
5015
  }
5014
- function Spherize($$anchor, $$props) {
5016
+ function SineWave($$anchor, $$props) {
5015
5017
  $.push($$props, true);
5016
5018
  const DEFAULT_TRANSFORM = {
5017
5019
  offsetX: 0,
@@ -5121,7 +5123,7 @@ function Spherize($$anchor, $$props) {
5121
5123
  children?.($$anchor);
5122
5124
  $.pop();
5123
5125
  }
5124
- function Spiral($$anchor, $$props) {
5126
+ function SolidColor($$anchor, $$props) {
5125
5127
  $.push($$props, true);
5126
5128
  const DEFAULT_TRANSFORM = {
5127
5129
  offsetX: 0,
@@ -5231,7 +5233,7 @@ function Spiral($$anchor, $$props) {
5231
5233
  children?.($$anchor);
5232
5234
  $.pop();
5233
5235
  }
5234
- function Strands($$anchor, $$props) {
5236
+ function Spherize($$anchor, $$props) {
5235
5237
  $.push($$props, true);
5236
5238
  const DEFAULT_TRANSFORM = {
5237
5239
  offsetX: 0,
@@ -5341,7 +5343,7 @@ function Strands($$anchor, $$props) {
5341
5343
  children?.($$anchor);
5342
5344
  $.pop();
5343
5345
  }
5344
- function Stretch($$anchor, $$props) {
5346
+ function Spiral($$anchor, $$props) {
5345
5347
  $.push($$props, true);
5346
5348
  const DEFAULT_TRANSFORM = {
5347
5349
  offsetX: 0,
@@ -5451,7 +5453,7 @@ function Stretch($$anchor, $$props) {
5451
5453
  children?.($$anchor);
5452
5454
  $.pop();
5453
5455
  }
5454
- function Swirl($$anchor, $$props) {
5456
+ function Strands($$anchor, $$props) {
5455
5457
  $.push($$props, true);
5456
5458
  const DEFAULT_TRANSFORM = {
5457
5459
  offsetX: 0,
@@ -5561,7 +5563,7 @@ function Swirl($$anchor, $$props) {
5561
5563
  children?.($$anchor);
5562
5564
  $.pop();
5563
5565
  }
5564
- function TiltShift($$anchor, $$props) {
5566
+ function Stretch($$anchor, $$props) {
5565
5567
  $.push($$props, true);
5566
5568
  const DEFAULT_TRANSFORM = {
5567
5569
  offsetX: 0,
@@ -5671,7 +5673,7 @@ function TiltShift($$anchor, $$props) {
5671
5673
  children?.($$anchor);
5672
5674
  $.pop();
5673
5675
  }
5674
- function Tritone($$anchor, $$props) {
5676
+ function Swirl($$anchor, $$props) {
5675
5677
  $.push($$props, true);
5676
5678
  const DEFAULT_TRANSFORM = {
5677
5679
  offsetX: 0,
@@ -5781,7 +5783,7 @@ function Tritone($$anchor, $$props) {
5781
5783
  children?.($$anchor);
5782
5784
  $.pop();
5783
5785
  }
5784
- function Twirl($$anchor, $$props) {
5786
+ function TiltShift($$anchor, $$props) {
5785
5787
  $.push($$props, true);
5786
5788
  const DEFAULT_TRANSFORM = {
5787
5789
  offsetX: 0,
@@ -5891,7 +5893,7 @@ function Twirl($$anchor, $$props) {
5891
5893
  children?.($$anchor);
5892
5894
  $.pop();
5893
5895
  }
5894
- function Vibrance($$anchor, $$props) {
5896
+ function Tritone($$anchor, $$props) {
5895
5897
  $.push($$props, true);
5896
5898
  const DEFAULT_TRANSFORM = {
5897
5899
  offsetX: 0,
@@ -6001,7 +6003,7 @@ function Vibrance($$anchor, $$props) {
6001
6003
  children?.($$anchor);
6002
6004
  $.pop();
6003
6005
  }
6004
- function WaveDistortion($$anchor, $$props) {
6006
+ function Twirl($$anchor, $$props) {
6005
6007
  $.push($$props, true);
6006
6008
  const DEFAULT_TRANSFORM = {
6007
6009
  offsetX: 0,
@@ -6111,7 +6113,7 @@ function WaveDistortion($$anchor, $$props) {
6111
6113
  children?.($$anchor);
6112
6114
  $.pop();
6113
6115
  }
6114
- function ZoomBlur($$anchor, $$props) {
6116
+ function Vibrance($$anchor, $$props) {
6115
6117
  $.push($$props, true);
6116
6118
  const DEFAULT_TRANSFORM = {
6117
6119
  offsetX: 0,
@@ -6221,6 +6223,226 @@ function ZoomBlur($$anchor, $$props) {
6221
6223
  children?.($$anchor);
6222
6224
  $.pop();
6223
6225
  }
6226
+ function WaveDistortion($$anchor, $$props) {
6227
+ $.push($$props, true);
6228
+ const DEFAULT_TRANSFORM = {
6229
+ offsetX: 0,
6230
+ offsetY: 0,
6231
+ rotation: 0,
6232
+ scale: 1,
6233
+ anchorX: .5,
6234
+ anchorY: .5,
6235
+ edges: "transparent"
6236
+ };
6237
+ const componentDefaults = {
6238
+ blendMode: "normal",
6239
+ renderOrder: 0,
6240
+ visible: true,
6241
+ ...Object.entries(componentDefinition$56.props).reduce((acc, [key, config]) => {
6242
+ acc[key] = config.default;
6243
+ return acc;
6244
+ }, {})
6245
+ };
6246
+ const props = $.rest_props($$props, [
6247
+ "$$slots",
6248
+ "$$events",
6249
+ "$$legacy"
6250
+ ]);
6251
+ const blendMode = $$props.blendMode ?? componentDefaults.blendMode;
6252
+ const opacity = $$props.opacity;
6253
+ const visible = $$props.visible ?? componentDefaults.visible;
6254
+ const id = $$props.id;
6255
+ const maskSource = $$props.maskSource;
6256
+ const maskType = $$props.maskType;
6257
+ const renderOrder = $$props.renderOrder ?? componentDefaults.renderOrder;
6258
+ const { children } = props;
6259
+ const effectiveTransform = $.derived(() => ({
6260
+ ...DEFAULT_TRANSFORM,
6261
+ ...$$props.transform
6262
+ }));
6263
+ const parentId = getContext("shaderParentId");
6264
+ if (parentId === void 0) throw new Error("Shader components must be used inside an <Shader> component or another shader component");
6265
+ const instanceId = id || `${componentDefinition$56.name.toLowerCase()}_${Math.random().toString(36).substring(7)}`;
6266
+ setContext("shaderParentId", instanceId);
6267
+ const shaderReadyProps = $.derived(() => {
6268
+ let baseProps = { ...componentDefaults };
6269
+ for (const key in props) if (key !== "blendMode" && key !== "opacity" && key !== "visible" && key !== "id" && key !== "maskSource" && key !== "maskType" && key !== "renderOrder" && key !== "transform" && key !== "children") {
6270
+ const propValue = props[key];
6271
+ const defaultValue = componentDefaults[key];
6272
+ if (propValue !== void 0 && propValue !== defaultValue) baseProps[key] = propValue;
6273
+ }
6274
+ return baseProps;
6275
+ });
6276
+ const uniforms = createUniformsMap(componentDefinition$56, $.get(shaderReadyProps), instanceId);
6277
+ const parentRegister = getContext("shaderNodeRegister");
6278
+ if (parentRegister === void 0) throw new Error("Shader components must be used inside an <Shader> component or another shader component");
6279
+ const parentUniformUpdate = getContext("shaderUniformUpdate");
6280
+ if (parentUniformUpdate === void 0) throw new Error("Shader components require shaderUniformUpdate from parent");
6281
+ const parentMetadataUpdate = getContext("shaderMetadataUpdate");
6282
+ if (parentMetadataUpdate === void 0) throw new Error("Shader components require shaderMetadataUpdate from parent");
6283
+ let isRegistered = $.state(false);
6284
+ Object.entries(uniforms).forEach(([propName, { uniform, transform }]) => {
6285
+ $.user_effect(() => {
6286
+ if (!$.get(isRegistered)) return;
6287
+ if (uniform && uniform.value !== void 0) {
6288
+ const newValue = props[propName];
6289
+ if (newValue !== void 0) parentUniformUpdate(instanceId, propName, newValue);
6290
+ }
6291
+ });
6292
+ });
6293
+ $.user_effect(() => {
6294
+ if (!$.get(isRegistered)) return;
6295
+ parentMetadataUpdate(instanceId, {
6296
+ blendMode,
6297
+ opacity,
6298
+ visible: visible === false ? false : true,
6299
+ id,
6300
+ mask: maskSource ? {
6301
+ source: maskSource,
6302
+ type: maskType || "alpha"
6303
+ } : void 0,
6304
+ renderOrder,
6305
+ transform: $.get(effectiveTransform)
6306
+ });
6307
+ });
6308
+ onMount(() => {
6309
+ if (componentDefinition$56 && typeof componentDefinition$56.fragmentNode === "function") {
6310
+ parentRegister(instanceId, componentDefinition$56.fragmentNode, parentId, {
6311
+ blendMode,
6312
+ opacity,
6313
+ visible: visible !== false ? true : false,
6314
+ id,
6315
+ mask: maskSource ? {
6316
+ source: maskSource,
6317
+ type: maskType || "alpha"
6318
+ } : void 0,
6319
+ renderOrder,
6320
+ transform: $.get(effectiveTransform)
6321
+ }, uniforms);
6322
+ $.set(isRegistered, true);
6323
+ } else console.error("componentDefinition.fragmentNode is not a function:", {
6324
+ componentDefinition: componentDefinition$56,
6325
+ fragmentNode: componentDefinition$56?.fragmentNode,
6326
+ type: typeof componentDefinition$56?.fragmentNode
6327
+ });
6328
+ });
6329
+ onDestroy(() => {
6330
+ $.set(isRegistered, false);
6331
+ parentRegister(instanceId, null, null, null, null);
6332
+ });
6333
+ children?.($$anchor);
6334
+ $.pop();
6335
+ }
6336
+ function ZoomBlur($$anchor, $$props) {
6337
+ $.push($$props, true);
6338
+ const DEFAULT_TRANSFORM = {
6339
+ offsetX: 0,
6340
+ offsetY: 0,
6341
+ rotation: 0,
6342
+ scale: 1,
6343
+ anchorX: .5,
6344
+ anchorY: .5,
6345
+ edges: "transparent"
6346
+ };
6347
+ const componentDefaults = {
6348
+ blendMode: "normal",
6349
+ renderOrder: 0,
6350
+ visible: true,
6351
+ ...Object.entries(componentDefinition$57.props).reduce((acc, [key, config]) => {
6352
+ acc[key] = config.default;
6353
+ return acc;
6354
+ }, {})
6355
+ };
6356
+ const props = $.rest_props($$props, [
6357
+ "$$slots",
6358
+ "$$events",
6359
+ "$$legacy"
6360
+ ]);
6361
+ const blendMode = $$props.blendMode ?? componentDefaults.blendMode;
6362
+ const opacity = $$props.opacity;
6363
+ const visible = $$props.visible ?? componentDefaults.visible;
6364
+ const id = $$props.id;
6365
+ const maskSource = $$props.maskSource;
6366
+ const maskType = $$props.maskType;
6367
+ const renderOrder = $$props.renderOrder ?? componentDefaults.renderOrder;
6368
+ const { children } = props;
6369
+ const effectiveTransform = $.derived(() => ({
6370
+ ...DEFAULT_TRANSFORM,
6371
+ ...$$props.transform
6372
+ }));
6373
+ const parentId = getContext("shaderParentId");
6374
+ if (parentId === void 0) throw new Error("Shader components must be used inside an <Shader> component or another shader component");
6375
+ const instanceId = id || `${componentDefinition$57.name.toLowerCase()}_${Math.random().toString(36).substring(7)}`;
6376
+ setContext("shaderParentId", instanceId);
6377
+ const shaderReadyProps = $.derived(() => {
6378
+ let baseProps = { ...componentDefaults };
6379
+ for (const key in props) if (key !== "blendMode" && key !== "opacity" && key !== "visible" && key !== "id" && key !== "maskSource" && key !== "maskType" && key !== "renderOrder" && key !== "transform" && key !== "children") {
6380
+ const propValue = props[key];
6381
+ const defaultValue = componentDefaults[key];
6382
+ if (propValue !== void 0 && propValue !== defaultValue) baseProps[key] = propValue;
6383
+ }
6384
+ return baseProps;
6385
+ });
6386
+ const uniforms = createUniformsMap(componentDefinition$57, $.get(shaderReadyProps), instanceId);
6387
+ const parentRegister = getContext("shaderNodeRegister");
6388
+ if (parentRegister === void 0) throw new Error("Shader components must be used inside an <Shader> component or another shader component");
6389
+ const parentUniformUpdate = getContext("shaderUniformUpdate");
6390
+ if (parentUniformUpdate === void 0) throw new Error("Shader components require shaderUniformUpdate from parent");
6391
+ const parentMetadataUpdate = getContext("shaderMetadataUpdate");
6392
+ if (parentMetadataUpdate === void 0) throw new Error("Shader components require shaderMetadataUpdate from parent");
6393
+ let isRegistered = $.state(false);
6394
+ Object.entries(uniforms).forEach(([propName, { uniform, transform }]) => {
6395
+ $.user_effect(() => {
6396
+ if (!$.get(isRegistered)) return;
6397
+ if (uniform && uniform.value !== void 0) {
6398
+ const newValue = props[propName];
6399
+ if (newValue !== void 0) parentUniformUpdate(instanceId, propName, newValue);
6400
+ }
6401
+ });
6402
+ });
6403
+ $.user_effect(() => {
6404
+ if (!$.get(isRegistered)) return;
6405
+ parentMetadataUpdate(instanceId, {
6406
+ blendMode,
6407
+ opacity,
6408
+ visible: visible === false ? false : true,
6409
+ id,
6410
+ mask: maskSource ? {
6411
+ source: maskSource,
6412
+ type: maskType || "alpha"
6413
+ } : void 0,
6414
+ renderOrder,
6415
+ transform: $.get(effectiveTransform)
6416
+ });
6417
+ });
6418
+ onMount(() => {
6419
+ if (componentDefinition$57 && typeof componentDefinition$57.fragmentNode === "function") {
6420
+ parentRegister(instanceId, componentDefinition$57.fragmentNode, parentId, {
6421
+ blendMode,
6422
+ opacity,
6423
+ visible: visible !== false ? true : false,
6424
+ id,
6425
+ mask: maskSource ? {
6426
+ source: maskSource,
6427
+ type: maskType || "alpha"
6428
+ } : void 0,
6429
+ renderOrder,
6430
+ transform: $.get(effectiveTransform)
6431
+ }, uniforms);
6432
+ $.set(isRegistered, true);
6433
+ } else console.error("componentDefinition.fragmentNode is not a function:", {
6434
+ componentDefinition: componentDefinition$57,
6435
+ fragmentNode: componentDefinition$57?.fragmentNode,
6436
+ type: typeof componentDefinition$57?.fragmentNode
6437
+ });
6438
+ });
6439
+ onDestroy(() => {
6440
+ $.set(isRegistered, false);
6441
+ parentRegister(instanceId, null, null, null, null);
6442
+ });
6443
+ children?.($$anchor);
6444
+ $.pop();
6445
+ }
6224
6446
  var root = $.from_html(`<div><canvas data-renderer="shaders" style="width: 100%; height: 100%; display: block;"></canvas> <!></div>`);
6225
6447
  function Shader($$anchor, $$props) {
6226
6448
  $.push($$props, true);
@@ -6323,4 +6545,4 @@ function Shader($$anchor, $$props) {
6323
6545
  $.append($$anchor, div);
6324
6546
  $.pop();
6325
6547
  }
6326
- export { AngularBlur, Ascii, Beam, Blob, Blur, BrightnessContrast, Bulge, CRTScreen, ChannelBlur, Checkerboard, ChromaFlow, ChromaticAberration, Circle, CursorTrail, DiffuseBlur, Dither, DotGrid, Duotone, FilmGrain, FloatingParticles, GlassTiles, Glow, Godrays, Grayscale, Grid, GridDistortion, Group, Halftone, HueShift, ImageTexture, Invert, LinearBlur, LinearGradient, Liquify, Pixelate, PolarCoordinates, Posterize, ProgressiveBlur, RadialGradient, RectangularCoordinates, Ripples, Saturation, Shader, SimplexNoise, SineWave, SolidColor, Spherize, Spiral, Strands, Stretch, Swirl, TiltShift, Tritone, Twirl, Vibrance, WaveDistortion, ZoomBlur, generatePresetCode };
6548
+ export { AngularBlur, Ascii, Beam, Blob, Blur, BrightnessContrast, Bulge, CRTScreen, ChannelBlur, Checkerboard, ChromaFlow, ChromaticAberration, Circle, CursorTrail, DiffuseBlur, Dither, DotGrid, Duotone, FilmGrain, FloatingParticles, GlassTiles, Glow, Godrays, Grayscale, Grid, GridDistortion, Group, Halftone, HueShift, ImageTexture, Invert, LinearBlur, LinearGradient, Liquify, Perspective, Pixelate, PolarCoordinates, Posterize, ProgressiveBlur, RadialGradient, RectangularCoordinates, Ripples, Saturation, Shader, Sharpness, SimplexNoise, SineWave, SolidColor, Spherize, Spiral, Strands, Stretch, Swirl, TiltShift, Tritone, Twirl, Vibrance, WaveDistortion, ZoomBlur, generatePresetCode };
@@ -1,2 +1,2 @@
1
- import { n as generatePresetCode, t as availableComponents } from "../generatePresetCode-Qh7jlXV3.js";
1
+ import { n as generatePresetCode, t as availableComponents } from "../generatePresetCode-Yu_cJh3q.js";
2
2
  export { availableComponents, generatePresetCode };