shaders 2.2.39 → 2.2.41

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 (61) hide show
  1. package/dist/core/Stripes-TdCUOh07.js +127 -0
  2. package/dist/core/Tint-ChKku9xR.js +56 -0
  3. package/dist/core/index.js +25 -21
  4. package/dist/core/shaderRegistry.d.ts.map +1 -1
  5. package/dist/core/shaders/Stripes/index.d.ts +71 -0
  6. package/dist/core/shaders/Stripes/index.d.ts.map +1 -0
  7. package/dist/core/shaders/Stripes/index.js +5 -0
  8. package/dist/core/shaders/Swirl/index.js +1 -1
  9. package/dist/core/shaders/TiltShift/index.js +1 -1
  10. package/dist/core/shaders/Tint/index.d.ts +29 -0
  11. package/dist/core/shaders/Tint/index.d.ts.map +1 -0
  12. package/dist/core/shaders/Tint/index.js +3 -0
  13. package/dist/core/shaders/Tritone/index.js +1 -1
  14. package/dist/core/shaders/Twirl/index.js +1 -1
  15. package/dist/core/shaders/Vibrance/index.js +1 -1
  16. package/dist/core/shaders/WaveDistortion/index.js +1 -1
  17. package/dist/core/shaders/ZoomBlur/index.js +1 -1
  18. package/dist/react/components/Stripes.d.ts +31 -0
  19. package/dist/react/components/Stripes.d.ts.map +1 -0
  20. package/dist/react/components/Tint.d.ts +31 -0
  21. package/dist/react/components/Tint.d.ts.map +1 -0
  22. package/dist/react/{generatePresetCode-CPcLELa5.js → generatePresetCode-K6ZAneRr.js} +22 -0
  23. package/dist/react/index.d.ts +2 -0
  24. package/dist/react/index.d.ts.map +1 -1
  25. package/dist/react/index.js +690 -412
  26. package/dist/react/utils/generatePresetCode.d.ts.map +1 -1
  27. package/dist/react/utils/generatePresetCode.js +1 -1
  28. package/dist/registry.js +294 -0
  29. package/dist/solid/components/Stripes.d.ts +28 -0
  30. package/dist/solid/components/Stripes.d.ts.map +1 -0
  31. package/dist/solid/components/Tint.d.ts +28 -0
  32. package/dist/solid/components/Tint.d.ts.map +1 -0
  33. package/dist/solid/index.d.ts +2 -0
  34. package/dist/solid/index.d.ts.map +1 -1
  35. package/dist/solid/index.js +634 -350
  36. package/dist/solid/utils/generatePresetCode.d.ts.map +1 -1
  37. package/dist/solid/utils/generatePresetCode.js +22 -0
  38. package/dist/svelte/components/Stripes.svelte.d.ts +19 -0
  39. package/dist/svelte/components/Tint.svelte.d.ts +19 -0
  40. package/dist/svelte/{generatePresetCode-By5juLjK.js → generatePresetCode-x1dhDaQ3.js} +22 -0
  41. package/dist/svelte/index.d.ts +2 -0
  42. package/dist/svelte/index.js +238 -16
  43. package/dist/svelte/utils/generatePresetCode.js +1 -1
  44. package/dist/vue/components/Stripes.vue.d.ts +57 -0
  45. package/dist/vue/components/Stripes.vue.d.ts.map +1 -0
  46. package/dist/vue/components/Tint.vue.d.ts +57 -0
  47. package/dist/vue/components/Tint.vue.d.ts.map +1 -0
  48. package/dist/vue/{generatePresetCode-REXb9hnv.js → generatePresetCode-BaNcX5ua.js} +22 -0
  49. package/dist/vue/index.d.ts +2 -0
  50. package/dist/vue/index.d.ts.map +1 -1
  51. package/dist/vue/index.js +300 -48
  52. package/dist/vue/utils/generatePresetCode.d.ts.map +1 -1
  53. package/dist/vue/utils/generatePresetCode.js +1 -1
  54. package/package.json +17 -1
  55. /package/dist/core/{Swirl-DoCDBZad.js → Swirl-m1-Mnzj5.js} +0 -0
  56. /package/dist/core/{TiltShift-BYQjUHpn.js → TiltShift-C_NUqKZF.js} +0 -0
  57. /package/dist/core/{Tritone-CJW8YTyB.js → Tritone-D-NcV7N-.js} +0 -0
  58. /package/dist/core/{Twirl-5k_XPd51.js → Twirl-Cqzll6nW.js} +0 -0
  59. /package/dist/core/{Vibrance-c25pkbWj.js → Vibrance-CxunJkcb.js} +0 -0
  60. /package/dist/core/{WaveDistortion-Bo2Ar13M.js → WaveDistortion-UQZKCfKh.js} +0 -0
  61. /package/dist/core/{ZoomBlur-DEozXA8U.js → ZoomBlur-DqKYdlmm.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;AAmrBD,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,YAAY,GAAG,MAAM,CAyC/D;AAGD,eAAO,MAAM,mBAAmB,UA4D/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;AAusBD,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,YAAY,GAAG,MAAM,CAyC/D;AAGD,eAAO,MAAM,mBAAmB,UA8D/B,CAAA"}
@@ -514,6 +514,19 @@ const shaderMetadata = {
514
514
  "falloff": 0,
515
515
  "edges": "stretch"
516
516
  },
517
+ "Stripes": {
518
+ "opacity": 1,
519
+ "blendMode": "normal",
520
+ "colorA": "#000000",
521
+ "colorB": "#ffffff",
522
+ "angle": 45,
523
+ "density": 5,
524
+ "balance": 0.5,
525
+ "softness": 0,
526
+ "speed": 0.2,
527
+ "offset": 0,
528
+ "colorSpace": "linear"
529
+ },
517
530
  "Swirl": {
518
531
  "opacity": 1,
519
532
  "blendMode": "normal",
@@ -536,6 +549,13 @@ const shaderMetadata = {
536
549
  "y": 0.5
537
550
  }
538
551
  },
552
+ "Tint": {
553
+ "opacity": 1,
554
+ "blendMode": "normal",
555
+ "color": "#ff8800",
556
+ "amount": 0.5,
557
+ "preserveLuminosity": true
558
+ },
539
559
  "Tritone": {
540
560
  "opacity": 1,
541
561
  "blendMode": "normal",
@@ -745,8 +765,10 @@ const availableComponents = [
745
765
  "Spiral",
746
766
  "Strands",
747
767
  "Stretch",
768
+ "Stripes",
748
769
  "Swirl",
749
770
  "TiltShift",
771
+ "Tint",
750
772
  "Tritone",
751
773
  "Twirl",
752
774
  "Vibrance",
@@ -0,0 +1,19 @@
1
+ import { type BlendMode, type TransformConfig } from '../../core';
2
+ import { type ComponentProps } from '../../core/shaders/Stripes';
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 Stripes: import("svelte").Component<ExtendedComponentProps, {}, "">;
18
+ type Stripes = ReturnType<typeof Stripes>;
19
+ export default Stripes;
@@ -0,0 +1,19 @@
1
+ import { type BlendMode, type TransformConfig } from '../../core';
2
+ import { type ComponentProps } from '../../core/shaders/Tint';
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 Tint: import("svelte").Component<ExtendedComponentProps, {}, "">;
18
+ type Tint = ReturnType<typeof Tint>;
19
+ export default Tint;
@@ -512,6 +512,19 @@ var shaderMetadata = {
512
512
  "falloff": 0,
513
513
  "edges": "stretch"
514
514
  },
515
+ "Stripes": {
516
+ "opacity": 1,
517
+ "blendMode": "normal",
518
+ "colorA": "#000000",
519
+ "colorB": "#ffffff",
520
+ "angle": 45,
521
+ "density": 5,
522
+ "balance": .5,
523
+ "softness": 0,
524
+ "speed": .2,
525
+ "offset": 0,
526
+ "colorSpace": "linear"
527
+ },
515
528
  "Swirl": {
516
529
  "opacity": 1,
517
530
  "blendMode": "normal",
@@ -534,6 +547,13 @@ var shaderMetadata = {
534
547
  "y": .5
535
548
  }
536
549
  },
550
+ "Tint": {
551
+ "opacity": 1,
552
+ "blendMode": "normal",
553
+ "color": "#ff8800",
554
+ "amount": .5,
555
+ "preserveLuminosity": true
556
+ },
537
557
  "Tritone": {
538
558
  "opacity": 1,
539
559
  "blendMode": "normal",
@@ -694,8 +714,10 @@ const availableComponents = [
694
714
  "Spiral",
695
715
  "Strands",
696
716
  "Stretch",
717
+ "Stripes",
697
718
  "Swirl",
698
719
  "TiltShift",
720
+ "Tint",
699
721
  "Tritone",
700
722
  "Twirl",
701
723
  "Vibrance",
@@ -49,8 +49,10 @@ export { default as Spherize } from './components/Spherize.svelte';
49
49
  export { default as Spiral } from './components/Spiral.svelte';
50
50
  export { default as Strands } from './components/Strands.svelte';
51
51
  export { default as Stretch } from './components/Stretch.svelte';
52
+ export { default as Stripes } from './components/Stripes.svelte';
52
53
  export { default as Swirl } from './components/Swirl.svelte';
53
54
  export { default as TiltShift } from './components/TiltShift.svelte';
55
+ export { default as Tint } from './components/Tint.svelte';
54
56
  export { default as Tritone } from './components/Tritone.svelte';
55
57
  export { default as Twirl } from './components/Twirl.svelte';
56
58
  export { default as Vibrance } from './components/Vibrance.svelte';
@@ -1,4 +1,4 @@
1
- import { n as generatePresetCode } from "./generatePresetCode-By5juLjK.js";
1
+ import { n as generatePresetCode } from "./generatePresetCode-x1dhDaQ3.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";
@@ -54,13 +54,15 @@ import { componentDefinition as componentDefinition$47 } from "../core/shaders/S
54
54
  import { componentDefinition as componentDefinition$48 } from "../core/shaders/Spiral/index.js";
55
55
  import { componentDefinition as componentDefinition$49 } from "../core/shaders/Strands/index.js";
56
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";
57
+ import { componentDefinition as componentDefinition$51 } from "../core/shaders/Stripes/index.js";
58
+ import { componentDefinition as componentDefinition$52 } from "../core/shaders/Swirl/index.js";
59
+ import { componentDefinition as componentDefinition$53 } from "../core/shaders/TiltShift/index.js";
60
+ import { componentDefinition as componentDefinition$54 } from "../core/shaders/Tint/index.js";
61
+ import { componentDefinition as componentDefinition$55 } from "../core/shaders/Tritone/index.js";
62
+ import { componentDefinition as componentDefinition$56 } from "../core/shaders/Twirl/index.js";
63
+ import { componentDefinition as componentDefinition$57 } from "../core/shaders/Vibrance/index.js";
64
+ import { componentDefinition as componentDefinition$58 } from "../core/shaders/WaveDistortion/index.js";
65
+ import { componentDefinition as componentDefinition$59 } from "../core/shaders/ZoomBlur/index.js";
64
66
  import { vec4 } from "three/tsl";
65
67
  import { TelemetryCollector, isExternalUser, shouldCollectTelemetry } from "../core/telemetry/index.js";
66
68
  function AngularBlur($$anchor, $$props) {
@@ -5673,7 +5675,7 @@ function Stretch($$anchor, $$props) {
5673
5675
  children?.($$anchor);
5674
5676
  $.pop();
5675
5677
  }
5676
- function Swirl($$anchor, $$props) {
5678
+ function Stripes($$anchor, $$props) {
5677
5679
  $.push($$props, true);
5678
5680
  const DEFAULT_TRANSFORM = {
5679
5681
  offsetX: 0,
@@ -5783,7 +5785,7 @@ function Swirl($$anchor, $$props) {
5783
5785
  children?.($$anchor);
5784
5786
  $.pop();
5785
5787
  }
5786
- function TiltShift($$anchor, $$props) {
5788
+ function Swirl($$anchor, $$props) {
5787
5789
  $.push($$props, true);
5788
5790
  const DEFAULT_TRANSFORM = {
5789
5791
  offsetX: 0,
@@ -5893,7 +5895,7 @@ function TiltShift($$anchor, $$props) {
5893
5895
  children?.($$anchor);
5894
5896
  $.pop();
5895
5897
  }
5896
- function Tritone($$anchor, $$props) {
5898
+ function TiltShift($$anchor, $$props) {
5897
5899
  $.push($$props, true);
5898
5900
  const DEFAULT_TRANSFORM = {
5899
5901
  offsetX: 0,
@@ -6003,7 +6005,7 @@ function Tritone($$anchor, $$props) {
6003
6005
  children?.($$anchor);
6004
6006
  $.pop();
6005
6007
  }
6006
- function Twirl($$anchor, $$props) {
6008
+ function Tint($$anchor, $$props) {
6007
6009
  $.push($$props, true);
6008
6010
  const DEFAULT_TRANSFORM = {
6009
6011
  offsetX: 0,
@@ -6113,7 +6115,7 @@ function Twirl($$anchor, $$props) {
6113
6115
  children?.($$anchor);
6114
6116
  $.pop();
6115
6117
  }
6116
- function Vibrance($$anchor, $$props) {
6118
+ function Tritone($$anchor, $$props) {
6117
6119
  $.push($$props, true);
6118
6120
  const DEFAULT_TRANSFORM = {
6119
6121
  offsetX: 0,
@@ -6223,7 +6225,7 @@ function Vibrance($$anchor, $$props) {
6223
6225
  children?.($$anchor);
6224
6226
  $.pop();
6225
6227
  }
6226
- function WaveDistortion($$anchor, $$props) {
6228
+ function Twirl($$anchor, $$props) {
6227
6229
  $.push($$props, true);
6228
6230
  const DEFAULT_TRANSFORM = {
6229
6231
  offsetX: 0,
@@ -6333,7 +6335,7 @@ function WaveDistortion($$anchor, $$props) {
6333
6335
  children?.($$anchor);
6334
6336
  $.pop();
6335
6337
  }
6336
- function ZoomBlur($$anchor, $$props) {
6338
+ function Vibrance($$anchor, $$props) {
6337
6339
  $.push($$props, true);
6338
6340
  const DEFAULT_TRANSFORM = {
6339
6341
  offsetX: 0,
@@ -6443,6 +6445,226 @@ function ZoomBlur($$anchor, $$props) {
6443
6445
  children?.($$anchor);
6444
6446
  $.pop();
6445
6447
  }
6448
+ function WaveDistortion($$anchor, $$props) {
6449
+ $.push($$props, true);
6450
+ const DEFAULT_TRANSFORM = {
6451
+ offsetX: 0,
6452
+ offsetY: 0,
6453
+ rotation: 0,
6454
+ scale: 1,
6455
+ anchorX: .5,
6456
+ anchorY: .5,
6457
+ edges: "transparent"
6458
+ };
6459
+ const componentDefaults = {
6460
+ blendMode: "normal",
6461
+ renderOrder: 0,
6462
+ visible: true,
6463
+ ...Object.entries(componentDefinition$58.props).reduce((acc, [key, config]) => {
6464
+ acc[key] = config.default;
6465
+ return acc;
6466
+ }, {})
6467
+ };
6468
+ const props = $.rest_props($$props, [
6469
+ "$$slots",
6470
+ "$$events",
6471
+ "$$legacy"
6472
+ ]);
6473
+ const blendMode = $$props.blendMode ?? componentDefaults.blendMode;
6474
+ const opacity = $$props.opacity;
6475
+ const visible = $$props.visible ?? componentDefaults.visible;
6476
+ const id = $$props.id;
6477
+ const maskSource = $$props.maskSource;
6478
+ const maskType = $$props.maskType;
6479
+ const renderOrder = $$props.renderOrder ?? componentDefaults.renderOrder;
6480
+ const { children } = props;
6481
+ const effectiveTransform = $.derived(() => ({
6482
+ ...DEFAULT_TRANSFORM,
6483
+ ...$$props.transform
6484
+ }));
6485
+ const parentId = getContext("shaderParentId");
6486
+ if (parentId === void 0) throw new Error("Shader components must be used inside an <Shader> component or another shader component");
6487
+ const instanceId = id || `${componentDefinition$58.name.toLowerCase()}_${Math.random().toString(36).substring(7)}`;
6488
+ setContext("shaderParentId", instanceId);
6489
+ const shaderReadyProps = $.derived(() => {
6490
+ let baseProps = { ...componentDefaults };
6491
+ for (const key in props) if (key !== "blendMode" && key !== "opacity" && key !== "visible" && key !== "id" && key !== "maskSource" && key !== "maskType" && key !== "renderOrder" && key !== "transform" && key !== "children") {
6492
+ const propValue = props[key];
6493
+ const defaultValue = componentDefaults[key];
6494
+ if (propValue !== void 0 && propValue !== defaultValue) baseProps[key] = propValue;
6495
+ }
6496
+ return baseProps;
6497
+ });
6498
+ const uniforms = createUniformsMap(componentDefinition$58, $.get(shaderReadyProps), instanceId);
6499
+ const parentRegister = getContext("shaderNodeRegister");
6500
+ if (parentRegister === void 0) throw new Error("Shader components must be used inside an <Shader> component or another shader component");
6501
+ const parentUniformUpdate = getContext("shaderUniformUpdate");
6502
+ if (parentUniformUpdate === void 0) throw new Error("Shader components require shaderUniformUpdate from parent");
6503
+ const parentMetadataUpdate = getContext("shaderMetadataUpdate");
6504
+ if (parentMetadataUpdate === void 0) throw new Error("Shader components require shaderMetadataUpdate from parent");
6505
+ let isRegistered = $.state(false);
6506
+ Object.entries(uniforms).forEach(([propName, { uniform, transform }]) => {
6507
+ $.user_effect(() => {
6508
+ if (!$.get(isRegistered)) return;
6509
+ if (uniform && uniform.value !== void 0) {
6510
+ const newValue = props[propName];
6511
+ if (newValue !== void 0) parentUniformUpdate(instanceId, propName, newValue);
6512
+ }
6513
+ });
6514
+ });
6515
+ $.user_effect(() => {
6516
+ if (!$.get(isRegistered)) return;
6517
+ parentMetadataUpdate(instanceId, {
6518
+ blendMode,
6519
+ opacity,
6520
+ visible: visible === false ? false : true,
6521
+ id,
6522
+ mask: maskSource ? {
6523
+ source: maskSource,
6524
+ type: maskType || "alpha"
6525
+ } : void 0,
6526
+ renderOrder,
6527
+ transform: $.get(effectiveTransform)
6528
+ });
6529
+ });
6530
+ onMount(() => {
6531
+ if (componentDefinition$58 && typeof componentDefinition$58.fragmentNode === "function") {
6532
+ parentRegister(instanceId, componentDefinition$58.fragmentNode, parentId, {
6533
+ blendMode,
6534
+ opacity,
6535
+ visible: visible !== false ? true : false,
6536
+ id,
6537
+ mask: maskSource ? {
6538
+ source: maskSource,
6539
+ type: maskType || "alpha"
6540
+ } : void 0,
6541
+ renderOrder,
6542
+ transform: $.get(effectiveTransform)
6543
+ }, uniforms);
6544
+ $.set(isRegistered, true);
6545
+ } else console.error("componentDefinition.fragmentNode is not a function:", {
6546
+ componentDefinition: componentDefinition$58,
6547
+ fragmentNode: componentDefinition$58?.fragmentNode,
6548
+ type: typeof componentDefinition$58?.fragmentNode
6549
+ });
6550
+ });
6551
+ onDestroy(() => {
6552
+ $.set(isRegistered, false);
6553
+ parentRegister(instanceId, null, null, null, null);
6554
+ });
6555
+ children?.($$anchor);
6556
+ $.pop();
6557
+ }
6558
+ function ZoomBlur($$anchor, $$props) {
6559
+ $.push($$props, true);
6560
+ const DEFAULT_TRANSFORM = {
6561
+ offsetX: 0,
6562
+ offsetY: 0,
6563
+ rotation: 0,
6564
+ scale: 1,
6565
+ anchorX: .5,
6566
+ anchorY: .5,
6567
+ edges: "transparent"
6568
+ };
6569
+ const componentDefaults = {
6570
+ blendMode: "normal",
6571
+ renderOrder: 0,
6572
+ visible: true,
6573
+ ...Object.entries(componentDefinition$59.props).reduce((acc, [key, config]) => {
6574
+ acc[key] = config.default;
6575
+ return acc;
6576
+ }, {})
6577
+ };
6578
+ const props = $.rest_props($$props, [
6579
+ "$$slots",
6580
+ "$$events",
6581
+ "$$legacy"
6582
+ ]);
6583
+ const blendMode = $$props.blendMode ?? componentDefaults.blendMode;
6584
+ const opacity = $$props.opacity;
6585
+ const visible = $$props.visible ?? componentDefaults.visible;
6586
+ const id = $$props.id;
6587
+ const maskSource = $$props.maskSource;
6588
+ const maskType = $$props.maskType;
6589
+ const renderOrder = $$props.renderOrder ?? componentDefaults.renderOrder;
6590
+ const { children } = props;
6591
+ const effectiveTransform = $.derived(() => ({
6592
+ ...DEFAULT_TRANSFORM,
6593
+ ...$$props.transform
6594
+ }));
6595
+ const parentId = getContext("shaderParentId");
6596
+ if (parentId === void 0) throw new Error("Shader components must be used inside an <Shader> component or another shader component");
6597
+ const instanceId = id || `${componentDefinition$59.name.toLowerCase()}_${Math.random().toString(36).substring(7)}`;
6598
+ setContext("shaderParentId", instanceId);
6599
+ const shaderReadyProps = $.derived(() => {
6600
+ let baseProps = { ...componentDefaults };
6601
+ for (const key in props) if (key !== "blendMode" && key !== "opacity" && key !== "visible" && key !== "id" && key !== "maskSource" && key !== "maskType" && key !== "renderOrder" && key !== "transform" && key !== "children") {
6602
+ const propValue = props[key];
6603
+ const defaultValue = componentDefaults[key];
6604
+ if (propValue !== void 0 && propValue !== defaultValue) baseProps[key] = propValue;
6605
+ }
6606
+ return baseProps;
6607
+ });
6608
+ const uniforms = createUniformsMap(componentDefinition$59, $.get(shaderReadyProps), instanceId);
6609
+ const parentRegister = getContext("shaderNodeRegister");
6610
+ if (parentRegister === void 0) throw new Error("Shader components must be used inside an <Shader> component or another shader component");
6611
+ const parentUniformUpdate = getContext("shaderUniformUpdate");
6612
+ if (parentUniformUpdate === void 0) throw new Error("Shader components require shaderUniformUpdate from parent");
6613
+ const parentMetadataUpdate = getContext("shaderMetadataUpdate");
6614
+ if (parentMetadataUpdate === void 0) throw new Error("Shader components require shaderMetadataUpdate from parent");
6615
+ let isRegistered = $.state(false);
6616
+ Object.entries(uniforms).forEach(([propName, { uniform, transform }]) => {
6617
+ $.user_effect(() => {
6618
+ if (!$.get(isRegistered)) return;
6619
+ if (uniform && uniform.value !== void 0) {
6620
+ const newValue = props[propName];
6621
+ if (newValue !== void 0) parentUniformUpdate(instanceId, propName, newValue);
6622
+ }
6623
+ });
6624
+ });
6625
+ $.user_effect(() => {
6626
+ if (!$.get(isRegistered)) return;
6627
+ parentMetadataUpdate(instanceId, {
6628
+ blendMode,
6629
+ opacity,
6630
+ visible: visible === false ? false : true,
6631
+ id,
6632
+ mask: maskSource ? {
6633
+ source: maskSource,
6634
+ type: maskType || "alpha"
6635
+ } : void 0,
6636
+ renderOrder,
6637
+ transform: $.get(effectiveTransform)
6638
+ });
6639
+ });
6640
+ onMount(() => {
6641
+ if (componentDefinition$59 && typeof componentDefinition$59.fragmentNode === "function") {
6642
+ parentRegister(instanceId, componentDefinition$59.fragmentNode, parentId, {
6643
+ blendMode,
6644
+ opacity,
6645
+ visible: visible !== false ? true : false,
6646
+ id,
6647
+ mask: maskSource ? {
6648
+ source: maskSource,
6649
+ type: maskType || "alpha"
6650
+ } : void 0,
6651
+ renderOrder,
6652
+ transform: $.get(effectiveTransform)
6653
+ }, uniforms);
6654
+ $.set(isRegistered, true);
6655
+ } else console.error("componentDefinition.fragmentNode is not a function:", {
6656
+ componentDefinition: componentDefinition$59,
6657
+ fragmentNode: componentDefinition$59?.fragmentNode,
6658
+ type: typeof componentDefinition$59?.fragmentNode
6659
+ });
6660
+ });
6661
+ onDestroy(() => {
6662
+ $.set(isRegistered, false);
6663
+ parentRegister(instanceId, null, null, null, null);
6664
+ });
6665
+ children?.($$anchor);
6666
+ $.pop();
6667
+ }
6446
6668
  var root = $.from_html(`<div><canvas data-renderer="shaders" style="width: 100%; height: 100%; display: block;"></canvas> <!></div>`);
6447
6669
  function Shader($$anchor, $$props) {
6448
6670
  $.push($$props, true);
@@ -6545,4 +6767,4 @@ function Shader($$anchor, $$props) {
6545
6767
  $.append($$anchor, div);
6546
6768
  $.pop();
6547
6769
  }
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 };
6770
+ 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, Stripes, Swirl, TiltShift, Tint, Tritone, Twirl, Vibrance, WaveDistortion, ZoomBlur, generatePresetCode };
@@ -1,2 +1,2 @@
1
- import { n as generatePresetCode, t as availableComponents } from "../generatePresetCode-By5juLjK.js";
1
+ import { n as generatePresetCode, t as availableComponents } from "../generatePresetCode-x1dhDaQ3.js";
2
2
  export { availableComponents, generatePresetCode };
@@ -0,0 +1,57 @@
1
+ import { BlendMode, TransformConfig } from '../../core';
2
+ import { ComponentProps } from '../../core/shaders/Stripes';
3
+
4
+ /**
5
+ * Define component props including blend mode, opacity, visibility, masking, and transformation
6
+ */
7
+ interface ExtendedComponentProps extends Partial<ComponentProps> {
8
+ blendMode?: BlendMode;
9
+ opacity?: number;
10
+ visible?: boolean;
11
+ id?: string;
12
+ maskSource?: string;
13
+ maskType?: string;
14
+ renderOrder?: number;
15
+ transform?: Partial<TransformConfig>;
16
+ }
17
+ declare function __VLS_template(): {
18
+ default?(_: {}): any;
19
+ };
20
+ declare const __VLS_component: import('vue').DefineComponent<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<ExtendedComponentProps>, {
21
+ blendMode: string;
22
+ renderOrder: number;
23
+ visible: boolean;
24
+ }>>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<ExtendedComponentProps>, {
25
+ blendMode: string;
26
+ renderOrder: number;
27
+ visible: boolean;
28
+ }>>> & Readonly<{}>, {
29
+ blendMode: BlendMode;
30
+ visible: boolean;
31
+ renderOrder: number;
32
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
33
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, ReturnType<typeof __VLS_template>>;
34
+ export default _default;
35
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
36
+ type __VLS_TypePropsToRuntimeProps<T> = {
37
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
38
+ type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
39
+ } : {
40
+ type: import('vue').PropType<T[K]>;
41
+ required: true;
42
+ };
43
+ };
44
+ type __VLS_WithDefaults<P, D> = {
45
+ [K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
46
+ default: D[K];
47
+ }> : P[K];
48
+ };
49
+ type __VLS_Prettify<T> = {
50
+ [K in keyof T]: T[K];
51
+ } & {};
52
+ type __VLS_WithTemplateSlots<T, S> = T & {
53
+ new (): {
54
+ $slots: S;
55
+ };
56
+ };
57
+ //# sourceMappingURL=Stripes.vue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Stripes.vue.d.ts","sourceRoot":"","sources":["../../src/components/Stripes.vue"],"names":[],"mappings":"AAGA,OAAO,EAGL,KAAK,SAAS,EAId,KAAK,eAAe,EACrB,MAAM,cAAc,CAAA;AAGrB,OAAO,EAAsB,KAAK,cAAc,EAAC,MAAM,sBAAsB,CAAA;AAI7E;;GAEG;AACH,UAAU,sBAAuB,SAAQ,OAAO,CAA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E,OAAO,EAAE,CAAC,CAAC,CAAC,CAAC,CAAA;KACb,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CACT,CAAC;AACN,KAAK,cAAc,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAAG,GAAG,EAAE,CAAC;AACxD,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAAE,QAAO;QAClD,MAAM,EAAE,CAAC,CAAC;KACT,CAAA;CAAE,CAAC"}
@@ -0,0 +1,57 @@
1
+ import { BlendMode, TransformConfig } from '../../core';
2
+ import { ComponentProps } from '../../core/shaders/Tint';
3
+
4
+ /**
5
+ * Define component props including blend mode, opacity, visibility, masking, and transformation
6
+ */
7
+ interface ExtendedComponentProps extends Partial<ComponentProps> {
8
+ blendMode?: BlendMode;
9
+ opacity?: number;
10
+ visible?: boolean;
11
+ id?: string;
12
+ maskSource?: string;
13
+ maskType?: string;
14
+ renderOrder?: number;
15
+ transform?: Partial<TransformConfig>;
16
+ }
17
+ declare function __VLS_template(): {
18
+ default?(_: {}): any;
19
+ };
20
+ declare const __VLS_component: import('vue').DefineComponent<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<ExtendedComponentProps>, {
21
+ blendMode: string;
22
+ renderOrder: number;
23
+ visible: boolean;
24
+ }>>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<ExtendedComponentProps>, {
25
+ blendMode: string;
26
+ renderOrder: number;
27
+ visible: boolean;
28
+ }>>> & Readonly<{}>, {
29
+ blendMode: BlendMode;
30
+ visible: boolean;
31
+ renderOrder: number;
32
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
33
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, ReturnType<typeof __VLS_template>>;
34
+ export default _default;
35
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
36
+ type __VLS_TypePropsToRuntimeProps<T> = {
37
+ [K in keyof T]-?: {} extends Pick<T, K> ? {
38
+ type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
39
+ } : {
40
+ type: import('vue').PropType<T[K]>;
41
+ required: true;
42
+ };
43
+ };
44
+ type __VLS_WithDefaults<P, D> = {
45
+ [K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
46
+ default: D[K];
47
+ }> : P[K];
48
+ };
49
+ type __VLS_Prettify<T> = {
50
+ [K in keyof T]: T[K];
51
+ } & {};
52
+ type __VLS_WithTemplateSlots<T, S> = T & {
53
+ new (): {
54
+ $slots: S;
55
+ };
56
+ };
57
+ //# sourceMappingURL=Tint.vue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Tint.vue.d.ts","sourceRoot":"","sources":["../../src/components/Tint.vue"],"names":[],"mappings":"AAGA,OAAO,EAGL,KAAK,SAAS,EAId,KAAK,eAAe,EACrB,MAAM,cAAc,CAAA;AAGrB,OAAO,EAAsB,KAAK,cAAc,EAAC,MAAM,mBAAmB,CAAA;AAI1E;;GAEG;AACH,UAAU,sBAAuB,SAAQ,OAAO,CAAC,cAAc,CAAC;IAC9D,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,CAAC,EAAE,OAAO,CAAC,eAAe,CAAC,CAAC;CACtC;AAgOD,iBAAS,cAAc;qBA0BM,GAAG;EAG/B;AAQD,QAAA,MAAM,eAAe;;;;;;;;;eA7QP,S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
512
  },
513
+ "Stripes": {
514
+ "opacity": 1,
515
+ "blendMode": "normal",
516
+ "colorA": "#000000",
517
+ "colorB": "#ffffff",
518
+ "angle": 45,
519
+ "density": 5,
520
+ "balance": .5,
521
+ "softness": 0,
522
+ "speed": .2,
523
+ "offset": 0,
524
+ "colorSpace": "linear"
525
+ },
513
526
  "Swirl": {
514
527
  "opacity": 1,
515
528
  "blendMode": "normal",
@@ -532,6 +545,13 @@ var shaderMetadata = {
532
545
  "y": .5
533
546
  }
534
547
  },
548
+ "Tint": {
549
+ "opacity": 1,
550
+ "blendMode": "normal",
551
+ "color": "#ff8800",
552
+ "amount": .5,
553
+ "preserveLuminosity": true
554
+ },
535
555
  "Tritone": {
536
556
  "opacity": 1,
537
557
  "blendMode": "normal",
@@ -693,8 +713,10 @@ const availableComponents = [
693
713
  "Spiral",
694
714
  "Strands",
695
715
  "Stretch",
716
+ "Stripes",
696
717
  "Swirl",
697
718
  "TiltShift",
719
+ "Tint",
698
720
  "Tritone",
699
721
  "Twirl",
700
722
  "Vibrance",
@@ -49,8 +49,10 @@ export { default as Spherize } from './components/Spherize.vue';
49
49
  export { default as Spiral } from './components/Spiral.vue';
50
50
  export { default as Strands } from './components/Strands.vue';
51
51
  export { default as Stretch } from './components/Stretch.vue';
52
+ export { default as Stripes } from './components/Stripes.vue';
52
53
  export { default as Swirl } from './components/Swirl.vue';
53
54
  export { default as TiltShift } from './components/TiltShift.vue';
55
+ export { default as Tint } from './components/Tint.vue';
54
56
  export { default as Tritone } from './components/Tritone.vue';
55
57
  export { default as Twirl } from './components/Twirl.vue';
56
58
  export { default as Vibrance } from './components/Vibrance.vue';