@awesome-flow/noise 0.3.0 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (101) hide show
  1. package/dist/abstract/index.cjs +1405 -2078
  2. package/dist/abstract/index.cjs.map +1 -1
  3. package/dist/abstract/index.d.cts +23 -25
  4. package/dist/abstract/index.d.ts +23 -25
  5. package/dist/abstract/index.js +1315 -1996
  6. package/dist/abstract/index.js.map +1 -1
  7. package/dist/index-BungWYrh.d.cts +49 -0
  8. package/dist/index-DsQSjZC5.d.ts +49 -0
  9. package/dist/{node-props-CeZ8Oshz.d.ts → node-props-BbqbXDXn.d.cts} +2 -22
  10. package/dist/{node-props-hKW-_KOU.d.cts → node-props-BbqbXDXn.d.ts} +2 -22
  11. package/dist/nodes/generators/index.cjs +130 -380
  12. package/dist/nodes/generators/index.cjs.map +1 -1
  13. package/dist/nodes/generators/index.d.cts +2 -8
  14. package/dist/nodes/generators/index.d.ts +2 -8
  15. package/dist/nodes/generators/index.js +112 -360
  16. package/dist/nodes/generators/index.js.map +1 -1
  17. package/dist/nodes/groups/index.cjs +25 -13
  18. package/dist/nodes/groups/index.cjs.map +1 -1
  19. package/dist/nodes/groups/index.js +26 -14
  20. package/dist/nodes/groups/index.js.map +1 -1
  21. package/dist/nodes/index.cjs +1654 -988
  22. package/dist/nodes/index.cjs.map +1 -1
  23. package/dist/nodes/index.d.cts +3 -5
  24. package/dist/nodes/index.d.ts +3 -5
  25. package/dist/nodes/index.js +1622 -960
  26. package/dist/nodes/index.js.map +1 -1
  27. package/dist/nodes/modifiers/index.cjs +17 -119
  28. package/dist/nodes/modifiers/index.cjs.map +1 -1
  29. package/dist/nodes/modifiers/index.d.cts +2 -6
  30. package/dist/nodes/modifiers/index.d.ts +2 -6
  31. package/dist/nodes/modifiers/index.js +16 -124
  32. package/dist/nodes/modifiers/index.js.map +1 -1
  33. package/dist/nodes/output/index.cjs +1271 -89
  34. package/dist/nodes/output/index.cjs.map +1 -1
  35. package/dist/nodes/output/index.js +1314 -92
  36. package/dist/nodes/output/index.js.map +1 -1
  37. package/dist/nodes/selectors/index.cjs +1296 -58
  38. package/dist/nodes/selectors/index.cjs.map +1 -1
  39. package/dist/nodes/selectors/index.d.cts +1 -3
  40. package/dist/nodes/selectors/index.d.ts +1 -3
  41. package/dist/nodes/selectors/index.js +1339 -65
  42. package/dist/nodes/selectors/index.js.map +1 -1
  43. package/dist/nodes/transformers/index.cjs +67 -206
  44. package/dist/nodes/transformers/index.cjs.map +1 -1
  45. package/dist/nodes/transformers/index.d.cts +3 -5
  46. package/dist/nodes/transformers/index.d.ts +3 -5
  47. package/dist/nodes/transformers/index.js +54 -193
  48. package/dist/nodes/transformers/index.js.map +1 -1
  49. package/dist/templates/generators/index.cjs +839 -1278
  50. package/dist/templates/generators/index.cjs.map +1 -1
  51. package/dist/templates/generators/index.d.cts +13 -50
  52. package/dist/templates/generators/index.d.ts +13 -50
  53. package/dist/templates/generators/index.js +836 -1280
  54. package/dist/templates/generators/index.js.map +1 -1
  55. package/dist/templates/groups/index.cjs +837 -1272
  56. package/dist/templates/groups/index.cjs.map +1 -1
  57. package/dist/templates/groups/index.d.cts +1 -5
  58. package/dist/templates/groups/index.d.ts +1 -5
  59. package/dist/templates/groups/index.js +835 -1277
  60. package/dist/templates/groups/index.js.map +1 -1
  61. package/dist/templates/index.cjs +839 -1280
  62. package/dist/templates/index.cjs.map +1 -1
  63. package/dist/templates/index.d.cts +4 -7
  64. package/dist/templates/index.d.ts +4 -7
  65. package/dist/templates/index.js +836 -1281
  66. package/dist/templates/index.js.map +1 -1
  67. package/dist/templates/modifiers/index.cjs +841 -1278
  68. package/dist/templates/modifiers/index.cjs.map +1 -1
  69. package/dist/templates/modifiers/index.d.cts +11 -38
  70. package/dist/templates/modifiers/index.d.ts +11 -38
  71. package/dist/templates/modifiers/index.js +838 -1281
  72. package/dist/templates/modifiers/index.js.map +1 -1
  73. package/dist/templates/output/index.cjs +839 -1274
  74. package/dist/templates/output/index.cjs.map +1 -1
  75. package/dist/templates/output/index.d.cts +4 -14
  76. package/dist/templates/output/index.d.ts +4 -14
  77. package/dist/templates/output/index.js +837 -1279
  78. package/dist/templates/output/index.js.map +1 -1
  79. package/dist/templates/selectors/index.cjs +839 -1274
  80. package/dist/templates/selectors/index.cjs.map +1 -1
  81. package/dist/templates/selectors/index.d.cts +3 -9
  82. package/dist/templates/selectors/index.d.ts +3 -9
  83. package/dist/templates/selectors/index.js +837 -1279
  84. package/dist/templates/selectors/index.js.map +1 -1
  85. package/dist/templates/transformers/index.cjs +839 -1274
  86. package/dist/templates/transformers/index.cjs.map +1 -1
  87. package/dist/templates/transformers/index.d.cts +3 -36
  88. package/dist/templates/transformers/index.d.ts +3 -36
  89. package/dist/templates/transformers/index.js +837 -1279
  90. package/dist/templates/transformers/index.js.map +1 -1
  91. package/package.json +3 -3
  92. package/dist/handle-types-D-v5S53h.d.cts +0 -22
  93. package/dist/handle-types-D-v5S53h.d.ts +0 -22
  94. package/dist/layout/index.cjs +0 -164
  95. package/dist/layout/index.cjs.map +0 -1
  96. package/dist/layout/index.d.cts +0 -26
  97. package/dist/layout/index.d.ts +0 -26
  98. package/dist/layout/index.js +0 -136
  99. package/dist/layout/index.js.map +0 -1
  100. package/dist/properties-BxwtU6i9.d.cts +0 -9
  101. package/dist/properties-BxwtU6i9.d.ts +0 -9
@@ -70,23 +70,27 @@ var require_fast_deep_equal = __commonJS({
70
70
  });
71
71
 
72
72
  // src/abstract/handle-types.ts
73
- var NoiseHandleFlag = /* @__PURE__ */ ((NoiseHandleFlag2) => {
74
- NoiseHandleFlag2[NoiseHandleFlag2["texture"] = 1] = "texture";
75
- NoiseHandleFlag2[NoiseHandleFlag2["noise"] = 2] = "noise";
76
- NoiseHandleFlag2[NoiseHandleFlag2["position"] = 4] = "position";
77
- NoiseHandleFlag2[NoiseHandleFlag2["module"] = 8] = "module";
78
- NoiseHandleFlag2[NoiseHandleFlag2["variableProperty"] = 16] = "variableProperty";
79
- NoiseHandleFlag2[NoiseHandleFlag2["variableValue"] = 32] = "variableValue";
80
- return NoiseHandleFlag2;
81
- })(NoiseHandleFlag || {});
82
- var DisplacementModule = /* @__PURE__ */ ((DisplacementModule2) => {
83
- DisplacementModule2["sourceModule"] = "source";
84
- DisplacementModule2["xModule"] = "x-module";
85
- DisplacementModule2["yModule"] = "y-module";
86
- DisplacementModule2["zModule"] = "z-module";
87
- DisplacementModule2["output"] = "output";
88
- return DisplacementModule2;
89
- })(DisplacementModule || {});
73
+ var NoiseHandleType = /* @__PURE__ */ ((NoiseHandleType2) => {
74
+ NoiseHandleType2["texture"] = "texture";
75
+ NoiseHandleType2["noise"] = "noise";
76
+ NoiseHandleType2["position"] = "position";
77
+ NoiseHandleType2["module"] = "module";
78
+ return NoiseHandleType2;
79
+ })(NoiseHandleType || {});
80
+ var DisplacementHandle = /* @__PURE__ */ ((DisplacementHandle2) => {
81
+ DisplacementHandle2["sourceModule"] = "source";
82
+ DisplacementHandle2["xModule"] = "x-module";
83
+ DisplacementHandle2["yModule"] = "y-module";
84
+ DisplacementHandle2["zModule"] = "z-module";
85
+ DisplacementHandle2["output"] = "output";
86
+ return DisplacementHandle2;
87
+ })(DisplacementHandle || {});
88
+ var NoiseSourceControlHandle = /* @__PURE__ */ ((NoiseSourceControlHandle2) => {
89
+ NoiseSourceControlHandle2["source"] = "source";
90
+ NoiseSourceControlHandle2["control"] = "control";
91
+ NoiseSourceControlHandle2["output"] = "output";
92
+ return NoiseSourceControlHandle2;
93
+ })(NoiseSourceControlHandle || {});
90
94
 
91
95
  // src/nodes/generators/noise-simplex-node.tsx
92
96
  import { NodeContainer } from "@awesome-flow/core/layout";
@@ -325,150 +329,15 @@ var noise_const_node_default = NoiseConstNode;
325
329
 
326
330
  // src/nodes/generators/noise-billow-node.tsx
327
331
  import { NodeContainer as NodeContainer6, NodeTrackConnections as NodeTrackConnections2 } from "@awesome-flow/core/layout";
328
- import { useCallback as useCallback2, useMemo as useMemo4 } from "react";
332
+ import { useCallback, useMemo as useMemo3 } from "react";
329
333
  import { Billow } from "libnoise-ts/module/generator";
330
334
  import { useUpdateNodeComputedData as useUpdateNodeComputedData6 } from "@awesome-flow/core/hooks";
331
- import { nodeDataPropertyExcept as nodeDataPropertyExcept2 } from "@awesome-flow/core/abstract";
332
-
333
- // src/layout/node-property-variables.tsx
334
- import { useIncomingNodeData, useUpdateNodeData as useUpdateNodeData5 } from "@awesome-flow/core/hooks";
335
- import { useCallback, useEffect as useEffect6, useMemo as useMemo3, useState as useState5 } from "react";
336
- import { Group as Group5, Stack as Stack5 } from "@mantine/core";
337
- import { getObjectKeys } from "@awesome-flow/core/utils";
338
- import { nodeDataPropertyExcept } from "@awesome-flow/core/abstract";
339
-
340
- // src/layout/node-value-input.tsx
341
- import { Input, NumberInput as NumberInput5, Switch } from "@mantine/core";
342
- import { Fragment, jsx as jsx6 } from "react/jsx-runtime";
343
- function NodeValueInput({ value, disabled, step, onChange }) {
344
- if (value === void 0 || value === null) {
345
- return /* @__PURE__ */ jsx6(Fragment, {});
346
- }
347
- switch (typeof value) {
348
- case "boolean": {
349
- return /* @__PURE__ */ jsx6(
350
- Switch,
351
- {
352
- checked: value,
353
- disabled,
354
- onChange: (e) => onChange(e.currentTarget.checked)
355
- }
356
- );
357
- }
358
- case "number": {
359
- return /* @__PURE__ */ jsx6(NumberInput5, { value, disabled, step, onChange: (e) => onChange(e) });
360
- }
361
- case "string": {
362
- return /* @__PURE__ */ jsx6(
363
- Input,
364
- {
365
- value,
366
- disabled,
367
- onChange: (e) => onChange(e.currentTarget.value)
368
- }
369
- );
370
- }
371
- default:
372
- throw new Error(`Unknown input node for value of type: ${typeof value} (${value})`);
373
- }
374
- }
375
- var node_value_input_default = NodeValueInput;
376
-
377
- // src/layout/node-property-input.tsx
378
- import { Fragment as Fragment2, jsx as jsx7 } from "react/jsx-runtime";
379
- function NodePropertyInput({ property, onChange }) {
380
- if (!property) {
381
- return /* @__PURE__ */ jsx7(Fragment2, {});
382
- }
383
- return /* @__PURE__ */ jsx7(
384
- node_value_input_default,
385
- {
386
- value: property.value,
387
- disabled: property.disabled,
388
- step: property.step,
389
- onChange: (value) => onChange(property.name, value)
390
- }
391
- );
392
- }
393
- var node_property_input_default = NodePropertyInput;
394
-
395
- // src/layout/node-property-variables.tsx
396
- import { jsx as jsx8, jsxs as jsxs5 } from "react/jsx-runtime";
397
- function NodePropertyVariables({
398
- data,
399
- nodeId,
400
- onPropertiesChange,
401
- except = nodeDataPropertyExcept
402
- }) {
403
- const [properties, setProperties] = useState5(() => {
404
- const keys = getObjectKeys(data, except);
405
- const dataProps = {};
406
- for (const key of keys) {
407
- dataProps[key] = {
408
- name: key,
409
- value: data[key]
410
- };
411
- }
412
- return dataProps;
413
- });
414
- const updateNodeData = useUpdateNodeData5();
415
- const incoming = useIncomingNodeData(nodeId);
416
- const resetAllDisabled = useCallback(() => {
417
- const keys = Object.keys(properties);
418
- keys.forEach((k) => {
419
- properties[k].disabled = false;
420
- });
421
- setProperties(properties);
422
- }, []);
423
- const updatePropertyValue = useCallback((name, value, disabled) => {
424
- let property = properties[name];
425
- if (property) {
426
- property.value = value;
427
- } else {
428
- property = {
429
- name,
430
- value
431
- };
432
- }
433
- property.disabled = disabled;
434
- setProperties({ ...properties, [name]: property });
435
- updateNodeData(nodeId, { [name]: value });
436
- }, []);
437
- useEffect6(() => {
438
- resetAllDisabled();
439
- if (incoming?.length) {
440
- for (const connection of incoming) {
441
- if (connection.property && properties[connection.property.name] !== void 0) {
442
- updatePropertyValue(connection.property.name, connection.property.value, true);
443
- }
444
- }
445
- }
446
- }, [incoming]);
447
- useEffect6(() => {
448
- if (onPropertiesChange) {
449
- onPropertiesChange(properties);
450
- }
451
- }, [onPropertiesChange, properties]);
452
- const nodes = useMemo3(() => {
453
- return Object.keys(properties).map((key) => {
454
- const property = properties[key];
455
- return /* @__PURE__ */ jsxs5(Group5, { children: [
456
- property.name,
457
- ":",
458
- /* @__PURE__ */ jsx8(node_property_input_default, { property, onChange: updatePropertyValue })
459
- ] }, key);
460
- });
461
- }, [properties, updatePropertyValue]);
462
- return /* @__PURE__ */ jsx8(Stack5, { children: nodes });
463
- }
464
- var node_property_variables_default = NodePropertyVariables;
465
-
466
- // src/nodes/generators/noise-billow-node.tsx
467
- import { jsx as jsx9, jsxs as jsxs6 } from "react/jsx-runtime";
335
+ import { NodePropertyVariables } from "@awesome-flow/core/components";
336
+ import { jsx as jsx6, jsxs as jsxs5 } from "react/jsx-runtime";
468
337
  function NoiseBillowNode({ id, selected, data, type }) {
469
338
  const updateComputedData = useUpdateNodeComputedData6();
470
- const module = useMemo4(() => new Billow(), []);
471
- const onPropertiesChange = useCallback2(
339
+ const module = useMemo3(() => new Billow(), []);
340
+ const onPropertiesChange = useCallback(
472
341
  (properties) => {
473
342
  Object.keys(properties).forEach((k) => {
474
343
  module[k] = properties[k].value;
@@ -477,37 +346,29 @@ function NoiseBillowNode({ id, selected, data, type }) {
477
346
  },
478
347
  [id, module, updateComputedData]
479
348
  );
480
- return /* @__PURE__ */ jsxs6(NodeContainer6, { id, selected, data, type, children: [
481
- /* @__PURE__ */ jsx9(
482
- node_property_variables_default,
483
- {
484
- data,
485
- except: nodeDataPropertyExcept2,
486
- nodeId: id,
487
- onPropertiesChange
488
- }
489
- ),
490
- /* @__PURE__ */ jsx9(NodeTrackConnections2, { handles: data.handles, nodeId: id, type: "target" })
349
+ return /* @__PURE__ */ jsxs5(NodeContainer6, { id, selected, data, type, children: [
350
+ /* @__PURE__ */ jsx6(NodePropertyVariables, { data, nodeId: id, onPropertiesChange }),
351
+ /* @__PURE__ */ jsx6(NodeTrackConnections2, { handles: data.handles, nodeId: id, type: "target" })
491
352
  ] });
492
353
  }
493
354
  var noise_billow_node_default = NoiseBillowNode;
494
355
 
495
356
  // src/nodes/output/noise-logger-node.tsx
496
357
  import { NodeContainer as NodeContainer7, NodeTrackConnections as NodeTrackConnections3 } from "@awesome-flow/core/layout";
497
- import { useMemo as useMemo5 } from "react";
498
- import { Divider, Stack as Stack6, Text } from "@mantine/core";
358
+ import { useMemo as useMemo4 } from "react";
359
+ import { Divider, Stack as Stack5, Text } from "@mantine/core";
499
360
  import { useIncomingComputedData as useIncomingComputedData2 } from "@awesome-flow/core/hooks";
500
- import { jsx as jsx10, jsxs as jsxs7 } from "react/jsx-runtime";
361
+ import { jsx as jsx7, jsxs as jsxs6 } from "react/jsx-runtime";
501
362
  function NoiseLoggerNode({ id, selected, data, type }) {
502
363
  const incoming = useIncomingComputedData2(id);
503
- const noise = useMemo5(() => incoming?.map((p) => p.noise).flat(), [incoming]);
504
- return /* @__PURE__ */ jsxs7(NodeContainer7, { id, selected, data, type, children: [
505
- /* @__PURE__ */ jsxs7(Text, { children: [
364
+ const noise = useMemo4(() => incoming?.map((p) => p.noise).flat(), [incoming]);
365
+ return /* @__PURE__ */ jsxs6(NodeContainer7, { id, selected, data, type, children: [
366
+ /* @__PURE__ */ jsxs6(Text, { children: [
506
367
  "Size: ",
507
368
  noise?.length || 0
508
369
  ] }),
509
- /* @__PURE__ */ jsx10(Divider, { h: 5 }),
510
- /* @__PURE__ */ jsx10(Stack6, { children: noise?.map((v, i) => /* @__PURE__ */ jsxs7(Text, { children: [
370
+ /* @__PURE__ */ jsx7(Divider, { h: 5 }),
371
+ /* @__PURE__ */ jsx7(Stack5, { children: noise?.map((v, i) => /* @__PURE__ */ jsxs6(Text, { children: [
511
372
  v.position?.x,
512
373
  ":",
513
374
  v.position?.y,
@@ -516,24 +377,24 @@ function NoiseLoggerNode({ id, selected, data, type }) {
516
377
  ": ",
517
378
  v.value
518
379
  ] }, i)) }),
519
- /* @__PURE__ */ jsx10(NodeTrackConnections3, { handles: data.handles, nodeId: id, type: "target" })
380
+ /* @__PURE__ */ jsx7(NodeTrackConnections3, { handles: data.handles, nodeId: id, type: "target" })
520
381
  ] });
521
382
  }
522
383
  var noise_logger_node_default = NoiseLoggerNode;
523
384
 
524
385
  // src/nodes/output/noise-raw-texture-node.tsx
525
386
  import { NodeContainer as NodeContainer8, NodeTrackConnections as NodeTrackConnections4 } from "@awesome-flow/core/layout";
526
- import { useEffect as useEffect7, useMemo as useMemo6, useState as useState6 } from "react";
387
+ import { useEffect as useEffect6, useMemo as useMemo5, useState as useState5 } from "react";
527
388
  import { useIncomingComputedData as useIncomingComputedData3, useUpdateNodeComputedData as useUpdateNodeComputedData7 } from "@awesome-flow/core/hooks";
528
- import { Group as Group6, Stack as Stack7 } from "@mantine/core";
529
- import { jsx as jsx11, jsxs as jsxs8 } from "react/jsx-runtime";
389
+ import { Group as Group5, Stack as Stack6 } from "@mantine/core";
390
+ import { jsx as jsx8, jsxs as jsxs7 } from "react/jsx-runtime";
530
391
  function NoiseRawTextureNode({ id, selected, data, type }) {
531
392
  const updateComputedData = useUpdateNodeComputedData7();
532
- const [dataLength, setDataLength] = useState6(0);
533
- const [resolution, setResolution] = useState6(0);
393
+ const [dataLength, setDataLength] = useState5(0);
394
+ const [resolution, setResolution] = useState5(0);
534
395
  const incoming = useIncomingComputedData3(id);
535
- const noise = useMemo6(() => incoming?.map((p) => p.noise).flat(), [incoming]);
536
- useEffect7(() => {
396
+ const noise = useMemo5(() => incoming?.map((p) => p.noise).flat(), [incoming]);
397
+ useEffect6(() => {
537
398
  if (noise?.length) {
538
399
  const size = Math.ceil(Math.sqrt(noise.length));
539
400
  const colors = noise.map((n) => [n.value * 255, n.value * 255, n.value * 255, 255]).flat();
@@ -544,19 +405,19 @@ function NoiseRawTextureNode({ id, selected, data, type }) {
544
405
  updateComputedData(id, { textureData: dataArray, textureResolution: size });
545
406
  }
546
407
  }, [noise]);
547
- return /* @__PURE__ */ jsxs8(NodeContainer8, { id, selected, data, type, children: [
548
- /* @__PURE__ */ jsxs8(Stack7, { children: [
549
- /* @__PURE__ */ jsxs8(Group6, { children: [
408
+ return /* @__PURE__ */ jsxs7(NodeContainer8, { id, selected, data, type, children: [
409
+ /* @__PURE__ */ jsxs7(Stack6, { children: [
410
+ /* @__PURE__ */ jsxs7(Group5, { children: [
550
411
  "Resolution: ",
551
412
  resolution,
552
413
  "x",
553
414
  resolution
554
415
  ] }),
555
- /* @__PURE__ */ jsxs8(Group6, { children: [
416
+ /* @__PURE__ */ jsxs7(Group5, { children: [
556
417
  "Input Length: ",
557
418
  noise?.length || 0
558
419
  ] }),
559
- /* @__PURE__ */ jsxs8(Group6, { children: [
420
+ /* @__PURE__ */ jsxs7(Group5, { children: [
560
421
  "Output Length (",
561
422
  resolution,
562
423
  "*",
@@ -565,66 +426,67 @@ function NoiseRawTextureNode({ id, selected, data, type }) {
565
426
  dataLength
566
427
  ] })
567
428
  ] }),
568
- /* @__PURE__ */ jsx11(NodeTrackConnections4, { handles: data.handles, nodeId: id, type: "target" })
429
+ /* @__PURE__ */ jsx8(NodeTrackConnections4, { handles: data.handles, nodeId: id, type: "target" })
569
430
  ] });
570
431
  }
571
432
  var noise_raw_texture_node_default = NoiseRawTextureNode;
572
433
 
573
434
  // src/nodes/generators/noise-checkerboard-node.tsx
574
435
  import { NodeContainer as NodeContainer9 } from "@awesome-flow/core/layout";
575
- import { useEffect as useEffect8, useMemo as useMemo7 } from "react";
436
+ import { useEffect as useEffect7, useMemo as useMemo6 } from "react";
576
437
  import { Checkerboard } from "libnoise-ts/module/generator";
577
438
  import { useUpdateNodeComputedData as useUpdateNodeComputedData8 } from "@awesome-flow/core/hooks";
578
- import { jsx as jsx12 } from "react/jsx-runtime";
439
+ import { jsx as jsx9 } from "react/jsx-runtime";
579
440
  function NoiseCheckerboardNode({ id, selected, data, type }) {
580
441
  const updateComputedData = useUpdateNodeComputedData8();
581
- const module = useMemo7(() => new Checkerboard(), []);
582
- useEffect8(() => {
442
+ const module = useMemo6(() => new Checkerboard(), []);
443
+ useEffect7(() => {
583
444
  updateComputedData(id, { module });
584
445
  }, [id, module, updateComputedData]);
585
- return /* @__PURE__ */ jsx12(NodeContainer9, { id, selected, data, type });
446
+ return /* @__PURE__ */ jsx9(NodeContainer9, { id, selected, data, type });
586
447
  }
587
448
  var noise_checkerboard_node_default = NoiseCheckerboardNode;
588
449
 
589
450
  // src/nodes/output/positions-logger-node.tsx
590
451
  import { NodeContainer as NodeContainer10, NodeTrackConnections as NodeTrackConnections5 } from "@awesome-flow/core/layout";
591
- import { useMemo as useMemo8 } from "react";
592
- import { Divider as Divider2, Stack as Stack8, Text as Text2 } from "@mantine/core";
452
+ import { useMemo as useMemo7 } from "react";
453
+ import { Divider as Divider2, Stack as Stack7, Text as Text2 } from "@mantine/core";
593
454
  import { useIncomingComputedData as useIncomingComputedData4 } from "@awesome-flow/core/hooks";
594
- import { jsx as jsx13, jsxs as jsxs9 } from "react/jsx-runtime";
455
+ import { jsx as jsx10, jsxs as jsxs8 } from "react/jsx-runtime";
595
456
  function PositionsLoggerNode({ id, selected, data, type }) {
596
457
  const incoming = useIncomingComputedData4(id);
597
- const positions = useMemo8(() => {
458
+ const positions = useMemo7(() => {
598
459
  return incoming?.map((p) => p.positions).flat();
599
460
  }, [incoming]);
600
- return /* @__PURE__ */ jsxs9(NodeContainer10, { id, selected, data, type, children: [
601
- /* @__PURE__ */ jsxs9(Text2, { children: [
461
+ return /* @__PURE__ */ jsxs8(NodeContainer10, { id, selected, data, type, children: [
462
+ /* @__PURE__ */ jsxs8(Text2, { children: [
602
463
  "Size: ",
603
464
  positions?.length || 0
604
465
  ] }),
605
- /* @__PURE__ */ jsx13(Divider2, { h: 5 }),
606
- /* @__PURE__ */ jsx13(Stack8, { children: positions?.map((v, i) => /* @__PURE__ */ jsxs9(Text2, { children: [
466
+ /* @__PURE__ */ jsx10(Divider2, { h: 5 }),
467
+ /* @__PURE__ */ jsx10(Stack7, { children: positions?.map((v, i) => /* @__PURE__ */ jsxs8(Text2, { children: [
607
468
  v.x,
608
469
  ":",
609
470
  v.y,
610
471
  ":",
611
472
  v.z
612
473
  ] }, i)) }),
613
- /* @__PURE__ */ jsx13(NodeTrackConnections5, { handles: data.handles, nodeId: id, type: "target" })
474
+ /* @__PURE__ */ jsx10(NodeTrackConnections5, { handles: data.handles, nodeId: id, type: "target" })
614
475
  ] });
615
476
  }
616
477
  var positions_logger_node_default = PositionsLoggerNode;
617
478
 
618
479
  // src/nodes/generators/noise-cylinders-node.tsx
619
480
  import { NodeContainer as NodeContainer11, NodeTrackConnections as NodeTrackConnections6 } from "@awesome-flow/core/layout";
620
- import { useCallback as useCallback3, useMemo as useMemo9 } from "react";
481
+ import { useCallback as useCallback2, useMemo as useMemo8 } from "react";
621
482
  import { Cylinders } from "libnoise-ts/module/generator";
622
483
  import { useUpdateNodeComputedData as useUpdateNodeComputedData9 } from "@awesome-flow/core/hooks";
623
- import { jsx as jsx14, jsxs as jsxs10 } from "react/jsx-runtime";
484
+ import { NodePropertyVariables as NodePropertyVariables2 } from "@awesome-flow/core/components";
485
+ import { jsx as jsx11, jsxs as jsxs9 } from "react/jsx-runtime";
624
486
  function NoiseCylindersNode({ id, selected, data, type }) {
625
487
  const updateComputedData = useUpdateNodeComputedData9();
626
- const module = useMemo9(() => new Cylinders(), []);
627
- const onPropertiesChange = useCallback3(
488
+ const module = useMemo8(() => new Cylinders(), []);
489
+ const onPropertiesChange = useCallback2(
628
490
  (properties) => {
629
491
  Object.keys(properties).forEach((k) => {
630
492
  module[k] = properties[k].value;
@@ -633,23 +495,24 @@ function NoiseCylindersNode({ id, selected, data, type }) {
633
495
  },
634
496
  [id, module, updateComputedData]
635
497
  );
636
- return /* @__PURE__ */ jsxs10(NodeContainer11, { id, selected, data, type, children: [
637
- /* @__PURE__ */ jsx14(node_property_variables_default, { data, nodeId: id, onPropertiesChange }),
638
- /* @__PURE__ */ jsx14(NodeTrackConnections6, { handles: data.handles, nodeId: id, type: "target" })
498
+ return /* @__PURE__ */ jsxs9(NodeContainer11, { id, selected, data, type, children: [
499
+ /* @__PURE__ */ jsx11(NodePropertyVariables2, { data, nodeId: id, onPropertiesChange }),
500
+ /* @__PURE__ */ jsx11(NodeTrackConnections6, { handles: data.handles, nodeId: id, type: "target" })
639
501
  ] });
640
502
  }
641
503
  var noise_cylinders_node_default = NoiseCylindersNode;
642
504
 
643
505
  // src/nodes/generators/noise-perlin-node.tsx
644
506
  import { NodeContainer as NodeContainer12, NodeTrackConnections as NodeTrackConnections7 } from "@awesome-flow/core/layout";
645
- import { useCallback as useCallback4, useMemo as useMemo10 } from "react";
507
+ import { useCallback as useCallback3, useMemo as useMemo9 } from "react";
646
508
  import { Perlin } from "libnoise-ts/module/generator";
647
509
  import { useUpdateNodeComputedData as useUpdateNodeComputedData10 } from "@awesome-flow/core/hooks";
648
- import { jsx as jsx15, jsxs as jsxs11 } from "react/jsx-runtime";
510
+ import { NodePropertyVariables as NodePropertyVariables3 } from "@awesome-flow/core/components";
511
+ import { jsx as jsx12, jsxs as jsxs10 } from "react/jsx-runtime";
649
512
  function NoisePerlinNode({ id, selected, data, type }) {
650
513
  const updateComputedData = useUpdateNodeComputedData10();
651
- const module = useMemo10(() => new Perlin(), []);
652
- const onPropertiesChange = useCallback4(
514
+ const module = useMemo9(() => new Perlin(), []);
515
+ const onPropertiesChange = useCallback3(
653
516
  (properties) => {
654
517
  Object.keys(properties).forEach((k) => {
655
518
  module[k] = properties[k].value;
@@ -658,62 +521,65 @@ function NoisePerlinNode({ id, selected, data, type }) {
658
521
  },
659
522
  [id, module, updateComputedData]
660
523
  );
661
- return /* @__PURE__ */ jsxs11(NodeContainer12, { id, selected, data, type, children: [
662
- /* @__PURE__ */ jsx15(node_property_variables_default, { data, nodeId: id, onPropertiesChange }),
663
- /* @__PURE__ */ jsx15(NodeTrackConnections7, { handles: data.handles, nodeId: id, type: "target" })
524
+ return /* @__PURE__ */ jsxs10(NodeContainer12, { id, selected, data, type, children: [
525
+ /* @__PURE__ */ jsx12(NodePropertyVariables3, { data, nodeId: id, onPropertiesChange }),
526
+ /* @__PURE__ */ jsx12(NodeTrackConnections7, { handles: data.handles, nodeId: id, type: "target" })
664
527
  ] });
665
528
  }
666
529
  var noise_perlin_node_default = NoisePerlinNode;
667
530
 
668
531
  // src/nodes/generators/noise-ridgedmulti-node.tsx
669
532
  import { NodeContainer as NodeContainer13, NodeTrackConnections as NodeTrackConnections8 } from "@awesome-flow/core/layout";
670
- import { useCallback as useCallback5, useMemo as useMemo11 } from "react";
533
+ import { useCallback as useCallback4, useMemo as useMemo10 } from "react";
671
534
  import { RidgedMulti } from "libnoise-ts/module/generator";
672
535
  import { useUpdateNodeComputedData as useUpdateNodeComputedData11 } from "@awesome-flow/core/hooks";
673
- import { jsx as jsx16, jsxs as jsxs12 } from "react/jsx-runtime";
536
+ import { NodePropertyVariables as NodePropertyVariables4 } from "@awesome-flow/core/components";
537
+ import { jsx as jsx13, jsxs as jsxs11 } from "react/jsx-runtime";
674
538
  function NoiseRidgedMultiNode({ id, selected, data, type }) {
675
539
  const updateComputedData = useUpdateNodeComputedData11();
676
- const module = useMemo11(() => new RidgedMulti(), []);
677
- const onPropertiesChange = useCallback5((properties) => {
540
+ const module = useMemo10(() => new RidgedMulti(), []);
541
+ const onPropertiesChange = useCallback4((properties) => {
678
542
  Object.keys(properties).forEach((k) => module[k] = properties[k].value);
679
543
  updateComputedData(id, { module });
680
544
  }, []);
681
- return /* @__PURE__ */ jsxs12(NodeContainer13, { id, selected, data, type, children: [
682
- /* @__PURE__ */ jsx16(node_property_variables_default, { data, nodeId: id, onPropertiesChange }),
683
- /* @__PURE__ */ jsx16(NodeTrackConnections8, { handles: data.handles, nodeId: id, type: "target" })
545
+ return /* @__PURE__ */ jsxs11(NodeContainer13, { id, selected, data, type, children: [
546
+ /* @__PURE__ */ jsx13(NodePropertyVariables4, { data, nodeId: id, onPropertiesChange }),
547
+ /* @__PURE__ */ jsx13(NodeTrackConnections8, { handles: data.handles, nodeId: id, type: "target" })
684
548
  ] });
685
549
  }
686
550
  var noise_ridgedmulti_node_default = NoiseRidgedMultiNode;
687
551
 
688
552
  // src/nodes/generators/noise-spheres-node.tsx
689
553
  import { NodeContainer as NodeContainer14, NodeTrackConnections as NodeTrackConnections9 } from "@awesome-flow/core/layout";
690
- import { useCallback as useCallback6, useMemo as useMemo12 } from "react";
554
+ import { useCallback as useCallback5, useMemo as useMemo11 } from "react";
691
555
  import { Spheres } from "libnoise-ts/module/generator";
692
556
  import { useUpdateNodeComputedData as useUpdateNodeComputedData12 } from "@awesome-flow/core/hooks";
693
- import { jsx as jsx17, jsxs as jsxs13 } from "react/jsx-runtime";
557
+ import { NodePropertyVariables as NodePropertyVariables5 } from "@awesome-flow/core/components";
558
+ import { jsx as jsx14, jsxs as jsxs12 } from "react/jsx-runtime";
694
559
  function NoiseSpheresNode({ id, selected, data, type }) {
695
560
  const updateComputedData = useUpdateNodeComputedData12();
696
- const module = useMemo12(() => new Spheres(), []);
697
- const onPropertiesChange = useCallback6((properties) => {
561
+ const module = useMemo11(() => new Spheres(), []);
562
+ const onPropertiesChange = useCallback5((properties) => {
698
563
  Object.keys(properties).forEach((k) => module[k] = properties[k].value);
699
564
  updateComputedData(id, { module });
700
565
  }, []);
701
- return /* @__PURE__ */ jsxs13(NodeContainer14, { id, selected, data, type, children: [
702
- /* @__PURE__ */ jsx17(node_property_variables_default, { data, nodeId: id, onPropertiesChange }),
703
- /* @__PURE__ */ jsx17(NodeTrackConnections9, { handles: data.handles, nodeId: id, type: "target" })
566
+ return /* @__PURE__ */ jsxs12(NodeContainer14, { id, selected, data, type, children: [
567
+ /* @__PURE__ */ jsx14(NodePropertyVariables5, { data, nodeId: id, onPropertiesChange }),
568
+ /* @__PURE__ */ jsx14(NodeTrackConnections9, { handles: data.handles, nodeId: id, type: "target" })
704
569
  ] });
705
570
  }
706
571
  var noise_spheres_node_default = NoiseSpheresNode;
707
572
 
708
573
  // src/nodes/generators/noise-voronoi-node.tsx
709
574
  import { NodeContainer as NodeContainer15, NodeTrackConnections as NodeTrackConnections10 } from "@awesome-flow/core/layout";
710
- import { useCallback as useCallback7 } from "react";
575
+ import { useCallback as useCallback6 } from "react";
711
576
  import { Voronoi } from "libnoise-ts/module/generator";
712
577
  import { useUpdateNodeComputedData as useUpdateNodeComputedData13 } from "@awesome-flow/core/hooks";
713
- import { jsx as jsx18, jsxs as jsxs14 } from "react/jsx-runtime";
578
+ import { NodePropertyVariables as NodePropertyVariables6 } from "@awesome-flow/core/components";
579
+ import { jsx as jsx15, jsxs as jsxs13 } from "react/jsx-runtime";
714
580
  function NoiseVoronoiNode({ id, selected, data, type }) {
715
581
  const updateComputedData = useUpdateNodeComputedData13();
716
- const onPropertiesChange = useCallback7(
582
+ const onPropertiesChange = useCallback6(
717
583
  (properties) => {
718
584
  const module = new Voronoi(
719
585
  properties.frequency.value,
@@ -725,20 +591,20 @@ function NoiseVoronoiNode({ id, selected, data, type }) {
725
591
  },
726
592
  []
727
593
  );
728
- return /* @__PURE__ */ jsxs14(NodeContainer15, { id, selected, data, type, children: [
729
- /* @__PURE__ */ jsx18(node_property_variables_default, { data, nodeId: id, onPropertiesChange }),
730
- /* @__PURE__ */ jsx18(NodeTrackConnections10, { handles: data.handles, nodeId: id, type: "target" })
594
+ return /* @__PURE__ */ jsxs13(NodeContainer15, { id, selected, data, type, children: [
595
+ /* @__PURE__ */ jsx15(NodePropertyVariables6, { data, nodeId: id, onPropertiesChange }),
596
+ /* @__PURE__ */ jsx15(NodeTrackConnections10, { handles: data.handles, nodeId: id, type: "target" })
731
597
  ] });
732
598
  }
733
599
  var noise_voronoi_node_default = NoiseVoronoiNode;
734
600
 
735
601
  // src/nodes/modifiers/noise-combine-node.tsx
736
602
  import { NodeCombobox, NodeContainer as NodeContainer16, NodeTrackConnections as NodeTrackConnections11 } from "@awesome-flow/core/layout";
737
- import { useCallback as useCallback8, useEffect as useEffect9 } from "react";
603
+ import { useCallback as useCallback7, useEffect as useEffect8 } from "react";
738
604
  import {
739
605
  useIncomingComputedData as useIncomingComputedData5,
740
606
  useUpdateNodeComputedData as useUpdateNodeComputedData14,
741
- useUpdateNodeData as useUpdateNodeData6
607
+ useUpdateNodeData as useUpdateNodeData5
742
608
  } from "@awesome-flow/core/hooks";
743
609
  import {
744
610
  IconAsterisk,
@@ -758,15 +624,6 @@ var NoiseCombineType = /* @__PURE__ */ ((NoiseCombineType3) => {
758
624
  NoiseCombineType3["power"] = "power";
759
625
  return NoiseCombineType3;
760
626
  })(NoiseCombineType || {});
761
- var VariableCombineType = /* @__PURE__ */ ((VariableCombineType2) => {
762
- VariableCombineType2["add"] = "add";
763
- VariableCombineType2["divide"] = "divide";
764
- VariableCombineType2["max"] = "max";
765
- VariableCombineType2["min"] = "min";
766
- VariableCombineType2["multiply"] = "multiply";
767
- VariableCombineType2["power"] = "power";
768
- return VariableCombineType2;
769
- })(VariableCombineType || {});
770
627
  var noiseCombineModuleMap = {
771
628
  ["add" /* add */]: Add,
772
629
  ["max" /* max */]: Max,
@@ -776,63 +633,63 @@ var noiseCombineModuleMap = {
776
633
  };
777
634
 
778
635
  // src/nodes/modifiers/noise-combine-node.tsx
779
- import { jsx as jsx19, jsxs as jsxs15 } from "react/jsx-runtime";
636
+ import { jsx as jsx16, jsxs as jsxs14 } from "react/jsx-runtime";
780
637
  var options = {
781
- add: /* @__PURE__ */ jsx19(IconPlus, {}),
782
- min: /* @__PURE__ */ jsx19(IconChevronLeft, {}),
783
- max: /* @__PURE__ */ jsx19(IconChevronRight, {}),
784
- multiply: /* @__PURE__ */ jsx19(IconAsterisk, {}),
785
- power: /* @__PURE__ */ jsx19(IconChevronUp, {})
638
+ add: /* @__PURE__ */ jsx16(IconPlus, {}),
639
+ min: /* @__PURE__ */ jsx16(IconChevronLeft, {}),
640
+ max: /* @__PURE__ */ jsx16(IconChevronRight, {}),
641
+ multiply: /* @__PURE__ */ jsx16(IconAsterisk, {}),
642
+ power: /* @__PURE__ */ jsx16(IconChevronUp, {})
786
643
  };
787
644
  function NoiseCombineNode({ id, selected, data, type }) {
788
- const updateNodeData = useUpdateNodeData6();
645
+ const updateNodeData = useUpdateNodeData5();
789
646
  const updateComputedData = useUpdateNodeComputedData14();
790
647
  const incoming = useIncomingComputedData5(id);
791
- useEffect9(() => {
648
+ useEffect8(() => {
792
649
  const ModuleFactory = noiseCombineModuleMap[data.operation];
793
650
  if (incoming?.length > 1) {
794
651
  const module = new ModuleFactory(incoming[0].module, incoming[1].module);
795
652
  updateComputedData(id, { module });
796
653
  }
797
654
  }, [data.operation, incoming]);
798
- const onChange = useCallback8((operation) => {
655
+ const onChange = useCallback7((operation) => {
799
656
  updateNodeData(id, { operation });
800
657
  }, []);
801
- return /* @__PURE__ */ jsxs15(NodeContainer16, { id, selected, data, type, children: [
802
- /* @__PURE__ */ jsx19(NodeCombobox, { options, selected: data.operation, onChange }),
803
- /* @__PURE__ */ jsx19(NodeTrackConnections11, { handles: data.handles, nodeId: id, type: "target" })
658
+ return /* @__PURE__ */ jsxs14(NodeContainer16, { id, selected, data, type, children: [
659
+ /* @__PURE__ */ jsx16(NodeCombobox, { options, selected: data.operation, onChange, width: 150 }),
660
+ /* @__PURE__ */ jsx16(NodeTrackConnections11, { handles: data.handles, nodeId: id, type: "target" })
804
661
  ] });
805
662
  }
806
663
  var noise_combine_node_default = NoiseCombineNode;
807
664
 
808
665
  // src/nodes/modifiers/noise-clamp-node.tsx
809
666
  import { NodeContainer as NodeContainer17, NodeTrackConnections as NodeTrackConnections12 } from "@awesome-flow/core/layout";
810
- import { useEffect as useEffect10, useState as useState7 } from "react";
811
- import { Group as Group7, NumberInput as NumberInput6, Stack as Stack9 } from "@mantine/core";
667
+ import { useEffect as useEffect9, useState as useState6 } from "react";
668
+ import { Group as Group6, NumberInput as NumberInput5, Stack as Stack8 } from "@mantine/core";
812
669
  import {
813
670
  useIncomingComputedData as useIncomingComputedData6,
814
671
  useUpdateNodeComputedData as useUpdateNodeComputedData15,
815
- useUpdateNodeData as useUpdateNodeData7
672
+ useUpdateNodeData as useUpdateNodeData6
816
673
  } from "@awesome-flow/core/hooks";
817
674
  import { Clamp } from "libnoise-ts/module/modifier";
818
- import { jsx as jsx20, jsxs as jsxs16 } from "react/jsx-runtime";
675
+ import { jsx as jsx17, jsxs as jsxs15 } from "react/jsx-runtime";
819
676
  function NoiseClampNode({ id, selected, data, type }) {
820
- const [lowerBound, setLowerBound] = useState7(data.lowerBound);
821
- const [upperBound, setUpperBound] = useState7(data.upperBound);
677
+ const [lowerBound, setLowerBound] = useState6(data.lowerBound);
678
+ const [upperBound, setUpperBound] = useState6(data.upperBound);
822
679
  const incoming = useIncomingComputedData6(id);
823
- const updateNodeData = useUpdateNodeData7();
680
+ const updateNodeData = useUpdateNodeData6();
824
681
  const updateComputedData = useUpdateNodeComputedData15();
825
- useEffect10(() => {
682
+ useEffect9(() => {
826
683
  if (incoming?.length) {
827
684
  const module = new Clamp(incoming[0].module, lowerBound, upperBound);
828
685
  updateComputedData(id, { module });
829
686
  }
830
687
  updateNodeData(id, { lowerBound, upperBound });
831
688
  }, [incoming, lowerBound, upperBound]);
832
- return /* @__PURE__ */ jsxs16(NodeContainer17, { id, selected, data, type, children: [
833
- /* @__PURE__ */ jsx20(Stack9, { children: /* @__PURE__ */ jsxs16(Group7, { children: [
834
- /* @__PURE__ */ jsx20(
835
- NumberInput6,
689
+ return /* @__PURE__ */ jsxs15(NodeContainer17, { id, selected, data, type, children: [
690
+ /* @__PURE__ */ jsx17(Stack8, { children: /* @__PURE__ */ jsxs15(Group6, { children: [
691
+ /* @__PURE__ */ jsx17(
692
+ NumberInput5,
836
693
  {
837
694
  size: "xs",
838
695
  w: 100,
@@ -841,8 +698,8 @@ function NoiseClampNode({ id, selected, data, type }) {
841
698
  step: 0.1
842
699
  }
843
700
  ),
844
- /* @__PURE__ */ jsx20(
845
- NumberInput6,
701
+ /* @__PURE__ */ jsx17(
702
+ NumberInput5,
846
703
  {
847
704
  size: "xs",
848
705
  w: 100,
@@ -852,56 +709,46 @@ function NoiseClampNode({ id, selected, data, type }) {
852
709
  }
853
710
  )
854
711
  ] }) }),
855
- /* @__PURE__ */ jsx20(NodeTrackConnections12, { handles: data.handles, nodeId: id, type: "target" })
712
+ /* @__PURE__ */ jsx17(NodeTrackConnections12, { handles: data.handles, nodeId: id, type: "target" })
856
713
  ] });
857
714
  }
858
715
  var noise_clamp_node_default = NoiseClampNode;
859
716
 
860
717
  // src/nodes/modifiers/noise-abs-node.tsx
861
718
  import { NodeContainer as NodeContainer18, NodeTrackConnections as NodeTrackConnections13 } from "@awesome-flow/core/layout";
862
- import { useEffect as useEffect11 } from "react";
719
+ import { useEffect as useEffect10 } from "react";
863
720
  import { useIncomingComputedData as useIncomingComputedData7, useUpdateNodeComputedData as useUpdateNodeComputedData16 } from "@awesome-flow/core/hooks";
864
721
  import { Abs } from "libnoise-ts/module/modifier";
865
- import { jsx as jsx21 } from "react/jsx-runtime";
722
+ import { jsx as jsx18 } from "react/jsx-runtime";
866
723
  function NoiseAbsNode({ id, selected, data, type }) {
867
724
  const incoming = useIncomingComputedData7(id);
868
725
  const updateComputedData = useUpdateNodeComputedData16();
869
- useEffect11(() => {
726
+ useEffect10(() => {
870
727
  if (incoming?.length > 0) {
871
728
  const module = new Abs(incoming[0].module);
872
729
  updateComputedData(id, { module });
873
730
  }
874
731
  }, [incoming]);
875
- return /* @__PURE__ */ jsx21(NodeContainer18, { id, selected, data, type, children: /* @__PURE__ */ jsx21(NodeTrackConnections13, { handles: data.handles, nodeId: id, type: "target" }) });
732
+ return /* @__PURE__ */ jsx18(NodeContainer18, { id, selected, data, type, children: /* @__PURE__ */ jsx18(NodeTrackConnections13, { handles: data.handles, nodeId: id, type: "target" }) });
876
733
  }
877
734
  var noise_abs_node_default = NoiseAbsNode;
878
735
 
879
736
  // src/nodes/output/noise-output-node.tsx
880
737
  import { NodeContainer as NodeContainer19, NodeTrackConnections as NodeTrackConnections14 } from "@awesome-flow/core/layout";
881
- import { useIncomingComputedData as useIncomingComputedData8, useUpdateNodeComputedData as useUpdateNodeComputedData17 } from "@awesome-flow/core/hooks";
882
- import { Box, Group as Group8, LoadingOverlay, Stack as Stack10 } from "@mantine/core";
883
- import { useEffect as useEffect12, useState as useState8 } from "react";
884
- import { jsx as jsx22, jsxs as jsxs17 } from "react/jsx-runtime";
738
+ import { useCallback as useCallback8, useState as useState7 } from "react";
739
+ import { useUpdateNodeComputedData as useUpdateNodeComputedData17 } from "@awesome-flow/core/hooks";
740
+ import { HandlesIncomingDataStatus } from "@awesome-flow/core/components";
741
+ import { Text as Text3 } from "@mantine/core";
742
+ import { jsx as jsx19, jsxs as jsxs16 } from "react/jsx-runtime";
885
743
  function NoiseOutputNode({ id, selected, data, type }) {
886
- const [generating, setGenerating] = useState8(false);
744
+ const [size, setSize] = useState7(0);
887
745
  const updateComputedData = useUpdateNodeComputedData17();
888
- const incomingModules = useIncomingComputedData8(id, 8 /* module */);
889
- const incomingPositions = useIncomingComputedData8(
890
- id,
891
- 4 /* position */
892
- );
893
- useEffect12(() => {
894
- if (incomingPositions?.length && incomingModules?.length) {
895
- const { module } = incomingModules[0];
896
- if (module) {
897
- setGenerating(true);
898
- }
899
- }
900
- }, [incomingModules, incomingPositions]);
901
- useEffect12(() => {
902
- if (incomingPositions?.length && incomingModules?.length) {
903
- const { module } = incomingModules[0];
904
- if (module && generating) {
746
+ const onDataUpdated = useCallback8(
747
+ (handleData) => {
748
+ const incomingPositions = handleData["position" /* position */];
749
+ const incomingModule = handleData["module" /* module */];
750
+ if (incomingPositions?.length && incomingModule?.length && incomingModule[0]?.module) {
751
+ const { module } = incomingModule[0];
905
752
  const noise = [];
906
753
  for (const input of incomingPositions) {
907
754
  for (const position of input.positions) {
@@ -912,52 +759,47 @@ function NoiseOutputNode({ id, selected, data, type }) {
912
759
  });
913
760
  }
914
761
  }
915
- console.log("SET COMPUTED DATA");
916
762
  updateComputedData(id, { noise, module });
917
- setGenerating(false);
763
+ setSize(noise.length);
918
764
  }
919
- }
920
- }, [generating]);
921
- return /* @__PURE__ */ jsxs17(NodeContainer19, { id, selected, data, type, children: [
922
- /* @__PURE__ */ jsxs17(Box, { pos: "relative", children: [
923
- /* @__PURE__ */ jsx22(
924
- LoadingOverlay,
925
- {
926
- visible: generating,
927
- zIndex: 1e3,
928
- overlayProps: { radius: "sm", blur: 2 }
929
- }
930
- ),
931
- /* @__PURE__ */ jsxs17(Stack10, { children: [
932
- /* @__PURE__ */ jsxs17(Group8, { children: [
933
- "Position Inputs: ",
934
- incomingPositions?.length
935
- ] }),
936
- /* @__PURE__ */ jsxs17(Group8, { children: [
937
- "Module Inputs: ",
938
- incomingModules?.length
939
- ] })
940
- ] })
765
+ },
766
+ []
767
+ );
768
+ return /* @__PURE__ */ jsxs16(NodeContainer19, { id, selected, data, type, children: [
769
+ /* @__PURE__ */ jsx19(
770
+ HandlesIncomingDataStatus,
771
+ {
772
+ nodeId: id,
773
+ handles: data.handles,
774
+ handleKey: "dataType",
775
+ onDataUpdated,
776
+ type: "target",
777
+ resetComputedData: true
778
+ }
779
+ ),
780
+ /* @__PURE__ */ jsxs16(Text3, { mt: 5, children: [
781
+ "Noise points: ",
782
+ size
941
783
  ] }),
942
- /* @__PURE__ */ jsx22(NodeTrackConnections14, { handles: data.handles, nodeId: id, type: "target" })
784
+ /* @__PURE__ */ jsx19(NodeTrackConnections14, { handles: data.handles, nodeId: id, type: "target" })
943
785
  ] });
944
786
  }
945
787
  var noise_output_node_default = NoiseOutputNode;
946
788
 
947
789
  // src/nodes/modifiers/noise-curve-node.tsx
948
790
  import { NodeContainer as NodeContainer20, NodeTrackConnections as NodeTrackConnections15 } from "@awesome-flow/core/layout";
949
- import { ActionIcon, Button, Group as Group9, NumberInput as NumberInput7, Space } from "@mantine/core";
791
+ import { ActionIcon, Button, Group as Group7, NumberInput as NumberInput6, Space } from "@mantine/core";
950
792
  import {
951
- useIncomingComputedData as useIncomingComputedData9,
793
+ useIncomingComputedData as useIncomingComputedData8,
952
794
  useUpdateNodeComputedData as useUpdateNodeComputedData18,
953
- useUpdateNodeData as useUpdateNodeData8
795
+ useUpdateNodeData as useUpdateNodeData7
954
796
  } from "@awesome-flow/core/hooks";
955
797
 
956
798
  // ../../node_modules/@mantine/form/esm/use-form.mjs
957
- import { useState as useState12, useCallback as useCallback14 } from "react";
799
+ import { useState as useState11, useCallback as useCallback14 } from "react";
958
800
 
959
801
  // ../../node_modules/@mantine/form/esm/actions/actions.mjs
960
- import { useLayoutEffect, useEffect as useEffect13 } from "react";
802
+ import { useLayoutEffect, useEffect as useEffect11 } from "react";
961
803
  function validateFormName(name) {
962
804
  if (!/^[0-9a-zA-Z-]+$/.test(name)) {
963
805
  throw new Error(
@@ -965,7 +807,7 @@ function validateFormName(name) {
965
807
  );
966
808
  }
967
809
  }
968
- var useIsomorphicEffect = typeof window !== "undefined" ? useLayoutEffect : useEffect13;
810
+ var useIsomorphicEffect = typeof window !== "undefined" ? useLayoutEffect : useEffect11;
969
811
  function useFormEvent(eventKey, handler) {
970
812
  useIsomorphicEffect(() => {
971
813
  if (eventKey) {
@@ -1062,7 +904,7 @@ function getInputOnChange(setValue) {
1062
904
  }
1063
905
 
1064
906
  // ../../node_modules/@mantine/form/esm/hooks/use-form-errors/use-form-errors.mjs
1065
- import { useState as useState9, useCallback as useCallback9 } from "react";
907
+ import { useState as useState8, useCallback as useCallback9 } from "react";
1066
908
 
1067
909
  // ../../node_modules/@mantine/form/esm/hooks/use-form-errors/filter-errors/filter-errors.mjs
1068
910
  function filterErrors(errors) {
@@ -1080,7 +922,7 @@ function filterErrors(errors) {
1080
922
 
1081
923
  // ../../node_modules/@mantine/form/esm/hooks/use-form-errors/use-form-errors.mjs
1082
924
  function useFormErrors(initialErrors) {
1083
- const [errorsState, setErrorsState] = useState9(filterErrors(initialErrors));
925
+ const [errorsState, setErrorsState] = useState8(filterErrors(initialErrors));
1084
926
  const setErrors = useCallback9((errors) => {
1085
927
  setErrorsState(
1086
928
  (current) => filterErrors(typeof errors === "function" ? errors(current) : errors)
@@ -1373,7 +1215,7 @@ function useFormList({
1373
1215
 
1374
1216
  // ../../node_modules/@mantine/form/esm/hooks/use-form-status/use-form-status.mjs
1375
1217
  var import_fast_deep_equal = __toESM(require_fast_deep_equal(), 1);
1376
- import { useState as useState10, useRef, useCallback as useCallback11 } from "react";
1218
+ import { useState as useState9, useRef, useCallback as useCallback11 } from "react";
1377
1219
 
1378
1220
  // ../../node_modules/@mantine/form/esm/get-status/get-status.mjs
1379
1221
  function getStatus(status, path) {
@@ -1392,8 +1234,8 @@ function useFormStatus({
1392
1234
  mode,
1393
1235
  $values
1394
1236
  }) {
1395
- const [touchedState, setTouchedState] = useState10(initialTouched);
1396
- const [dirtyState, setDirtyState] = useState10(initialDirty);
1237
+ const [touchedState, setTouchedState] = useState9(initialTouched);
1238
+ const [dirtyState, setDirtyState] = useState9(initialDirty);
1397
1239
  const touchedRef = useRef(initialTouched);
1398
1240
  const dirtyRef = useRef(initialDirty);
1399
1241
  const setTouched = useCallback11((values) => {
@@ -1490,14 +1332,14 @@ function useFormStatus({
1490
1332
  }
1491
1333
 
1492
1334
  // ../../node_modules/@mantine/form/esm/hooks/use-form-values/use-form-values.mjs
1493
- import { useRef as useRef2, useState as useState11, useCallback as useCallback12 } from "react";
1335
+ import { useRef as useRef2, useState as useState10, useCallback as useCallback12 } from "react";
1494
1336
  function useFormValues({
1495
1337
  initialValues,
1496
1338
  onValuesChange,
1497
1339
  mode
1498
1340
  }) {
1499
1341
  const initialized = useRef2(false);
1500
- const [stateValues, setStateValues] = useState11(initialValues || {});
1342
+ const [stateValues, setStateValues] = useState10(initialValues || {});
1501
1343
  const refValues = useRef2(stateValues);
1502
1344
  const valuesSnapshot = useRef2(stateValues);
1503
1345
  const setValues = useCallback12(
@@ -1563,7 +1405,7 @@ function useFormValues({
1563
1405
  }
1564
1406
 
1565
1407
  // ../../node_modules/@mantine/form/esm/hooks/use-form-watch/use-form-watch.mjs
1566
- import { useRef as useRef3, useCallback as useCallback13, useEffect as useEffect14 } from "react";
1408
+ import { useRef as useRef3, useCallback as useCallback13, useEffect as useEffect12 } from "react";
1567
1409
  function useFormWatch({
1568
1410
  $status
1569
1411
  }) {
@@ -1571,7 +1413,7 @@ function useFormWatch({
1571
1413
  {}
1572
1414
  );
1573
1415
  const watch = useCallback13((path, callback) => {
1574
- useEffect14(() => {
1416
+ useEffect12(() => {
1575
1417
  subscribers.current[path] = subscribers.current[path] || [];
1576
1418
  subscribers.current[path].push(callback);
1577
1419
  return () => {
@@ -1599,6 +1441,11 @@ function useFormWatch({
1599
1441
  };
1600
1442
  }
1601
1443
 
1444
+ // ../../node_modules/@mantine/form/esm/paths/get-data-path.mjs
1445
+ function getDataPath(formName, fieldPath) {
1446
+ return formName ? `${formName}-${fieldPath.toString()}` : fieldPath.toString();
1447
+ }
1448
+
1602
1449
  // ../../node_modules/@mantine/form/esm/validate/validate-values.mjs
1603
1450
  function getValidationResults(errors) {
1604
1451
  const filteredErrors = filterErrors(errors);
@@ -1687,8 +1534,8 @@ function useForm({
1687
1534
  const $status = useFormStatus({ initialDirty, initialTouched, $values, mode });
1688
1535
  const $list = useFormList({ $values, $errors, $status });
1689
1536
  const $watch = useFormWatch({ $status });
1690
- const [formKey, setFormKey] = useState12(0);
1691
- const [fieldKeys, setFieldKeys] = useState12({});
1537
+ const [formKey, setFormKey] = useState11(0);
1538
+ const [fieldKeys, setFieldKeys] = useState11({});
1692
1539
  const reset = useCallback14(() => {
1693
1540
  $values.resetValues();
1694
1541
  $errors.clearErrors();
@@ -1700,7 +1547,7 @@ function useForm({
1700
1547
  $values.initialize(values, () => mode === "uncontrolled" && setFormKey((key2) => key2 + 1));
1701
1548
  }, []);
1702
1549
  const setFieldValue = useCallback14(
1703
- (path, value, options3) => {
1550
+ (path, value, options2) => {
1704
1551
  const shouldValidate = shouldValidateOnChange(path, validateInputOnChange);
1705
1552
  $status.clearFieldDirty(path);
1706
1553
  $status.setFieldTouched(path, true);
@@ -1715,7 +1562,7 @@ function useForm({
1715
1562
  const validationResults = validateFieldValue(path, rules, payload.updatedValues);
1716
1563
  validationResults.hasError ? $errors.setFieldError(path, validationResults.error) : $errors.clearFieldError(path);
1717
1564
  } : null,
1718
- options3?.forceUpdate !== false && mode !== "controlled" ? () => setFieldKeys((keys) => ({
1565
+ options2?.forceUpdate !== false && mode !== "controlled" ? () => setFieldKeys((keys) => ({
1719
1566
  ...keys,
1720
1567
  [path]: (keys[path] || 0) + 1
1721
1568
  })) : null
@@ -1757,7 +1604,7 @@ function useForm({
1757
1604
  const onChange = getInputOnChange(
1758
1605
  (value) => setFieldValue(path, value, { forceUpdate: false })
1759
1606
  );
1760
- const payload = { onChange };
1607
+ const payload = { onChange, "data-path": getDataPath(name, path) };
1761
1608
  if (withError) {
1762
1609
  payload.error = $errors.errorsState[path];
1763
1610
  }
@@ -1810,6 +1657,10 @@ function useForm({
1810
1657
  [rules]
1811
1658
  );
1812
1659
  const key = (path) => `${formKey}-${path}-${fieldKeys[path] || 0}`;
1660
+ const getInputNode = useCallback14(
1661
+ (path) => document.querySelector(`[data-path="${getDataPath(name, path)}"]`),
1662
+ []
1663
+ );
1813
1664
  const form = {
1814
1665
  watch: $watch.watch,
1815
1666
  initialized: $values.initialized.current,
@@ -1843,25 +1694,26 @@ function useForm({
1843
1694
  onReset,
1844
1695
  isValid,
1845
1696
  getTransformedValues,
1846
- key
1697
+ key,
1698
+ getInputNode
1847
1699
  };
1848
1700
  useFormActions(name, form);
1849
1701
  return form;
1850
1702
  }
1851
1703
 
1852
1704
  // src/nodes/modifiers/noise-curve-node.tsx
1853
- import { useCallback as useCallback15, useEffect as useEffect15, useState as useState13 } from "react";
1705
+ import { useCallback as useCallback15, useEffect as useEffect13, useState as useState12 } from "react";
1854
1706
  import { Curve } from "libnoise-ts/module/modifier";
1855
1707
  import { Tuple } from "libnoise-ts/util";
1856
1708
  import { IconX } from "@tabler/icons-react";
1857
1709
  import { randomId } from "@mantine/hooks";
1858
1710
  import { NodeState } from "@awesome-flow/core/abstract";
1859
- import { Fragment as Fragment3, jsx as jsx23, jsxs as jsxs18 } from "react/jsx-runtime";
1711
+ import { Fragment, jsx as jsx20, jsxs as jsxs17 } from "react/jsx-runtime";
1860
1712
  function NoiseCurveNode({ id, selected, data, type }) {
1861
- const incoming = useIncomingComputedData9(id);
1862
- const updateNodeData = useUpdateNodeData8();
1713
+ const incoming = useIncomingComputedData8(id);
1714
+ const updateNodeData = useUpdateNodeData7();
1863
1715
  const updateComputedData = useUpdateNodeComputedData18();
1864
- const [values, setValues] = useState13([]);
1716
+ const [values, setValues] = useState12([]);
1865
1717
  const form = useForm({
1866
1718
  mode: "uncontrolled",
1867
1719
  initialValues: {
@@ -1889,11 +1741,11 @@ function NoiseCurveNode({ id, selected, data, type }) {
1889
1741
  form.validate();
1890
1742
  }, [])
1891
1743
  });
1892
- useEffect15(() => {
1744
+ useEffect13(() => {
1893
1745
  const points = data.points?.length ? data.points.map((v) => ({ input: v.input, output: v.output, key: randomId() })) : [1, 2, 3, 4].map(() => ({ input: 0, output: 0, key: randomId() }));
1894
1746
  form.initialize({ points });
1895
1747
  }, []);
1896
- useEffect15(() => {
1748
+ useEffect13(() => {
1897
1749
  if (incoming?.length && values?.length >= 4) {
1898
1750
  const module = new Curve(
1899
1751
  incoming[0].module,
@@ -1902,9 +1754,9 @@ function NoiseCurveNode({ id, selected, data, type }) {
1902
1754
  updateComputedData(id, { module });
1903
1755
  }
1904
1756
  }, [values, incoming]);
1905
- const fields = form.getValues().points.map((item, index) => /* @__PURE__ */ jsxs18(Group9, { mt: "xs", children: [
1906
- /* @__PURE__ */ jsx23(
1907
- NumberInput7,
1757
+ const fields = form.getValues().points.map((item, index) => /* @__PURE__ */ jsxs17(Group7, { mt: "xs", children: [
1758
+ /* @__PURE__ */ jsx20(
1759
+ NumberInput6,
1908
1760
  {
1909
1761
  size: "xs",
1910
1762
  w: 100,
@@ -1914,8 +1766,8 @@ function NoiseCurveNode({ id, selected, data, type }) {
1914
1766
  },
1915
1767
  form.key(`points.${index}.input`)
1916
1768
  ),
1917
- /* @__PURE__ */ jsx23(
1918
- NumberInput7,
1769
+ /* @__PURE__ */ jsx20(
1770
+ NumberInput6,
1919
1771
  {
1920
1772
  size: "xs",
1921
1773
  w: 100,
@@ -1925,22 +1777,22 @@ function NoiseCurveNode({ id, selected, data, type }) {
1925
1777
  },
1926
1778
  form.key(`points.${index}.output`)
1927
1779
  ),
1928
- data.state === NodeState.edit && values.length > 4 && /* @__PURE__ */ jsx23(
1780
+ data.state === NodeState.edit && values.length > 4 && /* @__PURE__ */ jsx20(
1929
1781
  ActionIcon,
1930
1782
  {
1931
1783
  color: "red",
1932
1784
  variant: "outline",
1933
1785
  size: "sm",
1934
1786
  onClick: () => form.removeListItem("points", index),
1935
- children: /* @__PURE__ */ jsx23(IconX, { size: "1rem" })
1787
+ children: /* @__PURE__ */ jsx20(IconX, { size: "1rem" })
1936
1788
  }
1937
1789
  )
1938
1790
  ] }, item.key));
1939
- return /* @__PURE__ */ jsxs18(NodeContainer20, { id, selected, type, data, children: [
1791
+ return /* @__PURE__ */ jsxs17(NodeContainer20, { id, selected, type, data, children: [
1940
1792
  fields,
1941
- data.state === NodeState.edit && /* @__PURE__ */ jsxs18(Fragment3, { children: [
1942
- /* @__PURE__ */ jsx23(Space, { h: 10 }),
1943
- /* @__PURE__ */ jsx23(
1793
+ data.state === NodeState.edit && /* @__PURE__ */ jsxs17(Fragment, { children: [
1794
+ /* @__PURE__ */ jsx20(Space, { h: 10 }),
1795
+ /* @__PURE__ */ jsx20(
1944
1796
  Button,
1945
1797
  {
1946
1798
  variant: "outline",
@@ -1951,39 +1803,39 @@ function NoiseCurveNode({ id, selected, data, type }) {
1951
1803
  }
1952
1804
  )
1953
1805
  ] }),
1954
- /* @__PURE__ */ jsx23(NodeTrackConnections15, { handles: data.handles, nodeId: id, type: "target" })
1806
+ /* @__PURE__ */ jsx20(NodeTrackConnections15, { handles: data.handles, nodeId: id, type: "target" })
1955
1807
  ] });
1956
1808
  }
1957
1809
  var noise_curve_node_default = NoiseCurveNode;
1958
1810
 
1959
1811
  // src/nodes/modifiers/noise-exponent-node.tsx
1960
1812
  import { NodeContainer as NodeContainer21, NodeTrackConnections as NodeTrackConnections16 } from "@awesome-flow/core/layout";
1961
- import { useEffect as useEffect16, useState as useState14 } from "react";
1962
- import { Group as Group10, NumberInput as NumberInput8, Stack as Stack11 } from "@mantine/core";
1813
+ import { useEffect as useEffect14, useState as useState13 } from "react";
1814
+ import { Group as Group8, NumberInput as NumberInput7, Stack as Stack9 } from "@mantine/core";
1963
1815
  import {
1964
- useIncomingComputedData as useIncomingComputedData10,
1816
+ useIncomingComputedData as useIncomingComputedData9,
1965
1817
  useUpdateNodeComputedData as useUpdateNodeComputedData19,
1966
- useUpdateNodeData as useUpdateNodeData9
1818
+ useUpdateNodeData as useUpdateNodeData8
1967
1819
  } from "@awesome-flow/core/hooks";
1968
1820
  import { Exponent } from "libnoise-ts/module/modifier";
1969
- import { jsx as jsx24, jsxs as jsxs19 } from "react/jsx-runtime";
1821
+ import { jsx as jsx21, jsxs as jsxs18 } from "react/jsx-runtime";
1970
1822
  function NoiseExponentNode({ id, selected, data, type }) {
1971
- const [exponent, setExponent] = useState14(data.exponent);
1972
- const incoming = useIncomingComputedData10(id);
1973
- const updateNodeData = useUpdateNodeData9();
1823
+ const [exponent, setExponent] = useState13(data.exponent);
1824
+ const incoming = useIncomingComputedData9(id);
1825
+ const updateNodeData = useUpdateNodeData8();
1974
1826
  const updateComputedData = useUpdateNodeComputedData19();
1975
- useEffect16(() => {
1827
+ useEffect14(() => {
1976
1828
  if (incoming?.length > 0) {
1977
1829
  const module = new Exponent(incoming[0].module, exponent);
1978
1830
  updateComputedData(id, { module });
1979
1831
  }
1980
1832
  updateNodeData(id, { exponent });
1981
1833
  }, [incoming, exponent]);
1982
- return /* @__PURE__ */ jsxs19(NodeContainer21, { id, selected, data, type, children: [
1983
- /* @__PURE__ */ jsx24(Stack11, { children: /* @__PURE__ */ jsxs19(Group10, { children: [
1834
+ return /* @__PURE__ */ jsxs18(NodeContainer21, { id, selected, data, type, children: [
1835
+ /* @__PURE__ */ jsx21(Stack9, { children: /* @__PURE__ */ jsxs18(Group8, { children: [
1984
1836
  "Exponent:",
1985
- /* @__PURE__ */ jsx24(
1986
- NumberInput8,
1837
+ /* @__PURE__ */ jsx21(
1838
+ NumberInput7,
1987
1839
  {
1988
1840
  size: "xs",
1989
1841
  value: exponent,
@@ -1992,60 +1844,60 @@ function NoiseExponentNode({ id, selected, data, type }) {
1992
1844
  }
1993
1845
  )
1994
1846
  ] }) }),
1995
- /* @__PURE__ */ jsx24(NodeTrackConnections16, { handles: data.handles, nodeId: id, type: "target" })
1847
+ /* @__PURE__ */ jsx21(NodeTrackConnections16, { handles: data.handles, nodeId: id, type: "target" })
1996
1848
  ] });
1997
1849
  }
1998
1850
  var noise_exponent_node_default = NoiseExponentNode;
1999
1851
 
2000
1852
  // src/nodes/modifiers/noise-invert-node.tsx
2001
1853
  import { NodeContainer as NodeContainer22, NodeTrackConnections as NodeTrackConnections17 } from "@awesome-flow/core/layout";
2002
- import { useEffect as useEffect17 } from "react";
2003
- import { useIncomingComputedData as useIncomingComputedData11, useUpdateNodeComputedData as useUpdateNodeComputedData20 } from "@awesome-flow/core/hooks";
1854
+ import { useEffect as useEffect15 } from "react";
1855
+ import { useIncomingComputedData as useIncomingComputedData10, useUpdateNodeComputedData as useUpdateNodeComputedData20 } from "@awesome-flow/core/hooks";
2004
1856
  import { Invert } from "libnoise-ts/module/modifier";
2005
- import { jsx as jsx25 } from "react/jsx-runtime";
1857
+ import { jsx as jsx22 } from "react/jsx-runtime";
2006
1858
  function NoiseInvertNode({ id, selected, data, type }) {
2007
- const incoming = useIncomingComputedData11(id);
1859
+ const incoming = useIncomingComputedData10(id);
2008
1860
  const updateComputedData = useUpdateNodeComputedData20();
2009
- useEffect17(() => {
1861
+ useEffect15(() => {
2010
1862
  if (incoming?.length > 0) {
2011
1863
  const module = new Invert(incoming[0].module);
2012
1864
  updateComputedData(id, { module });
2013
1865
  }
2014
1866
  }, [incoming]);
2015
- return /* @__PURE__ */ jsx25(NodeContainer22, { id, selected, data, type, children: /* @__PURE__ */ jsx25(NodeTrackConnections17, { handles: data.handles, nodeId: id, type: "target" }) });
1867
+ return /* @__PURE__ */ jsx22(NodeContainer22, { id, selected, data, type, children: /* @__PURE__ */ jsx22(NodeTrackConnections17, { handles: data.handles, nodeId: id, type: "target" }) });
2016
1868
  }
2017
1869
  var noise_invert_node_default = NoiseInvertNode;
2018
1870
 
2019
1871
  // src/nodes/modifiers/noise-scale-bias-node.tsx
2020
1872
  import { NodeContainer as NodeContainer23, NodeTrackConnections as NodeTrackConnections18 } from "@awesome-flow/core/layout";
2021
- import { useEffect as useEffect18, useState as useState15 } from "react";
2022
- import { Group as Group11, NumberInput as NumberInput9, Stack as Stack12 } from "@mantine/core";
1873
+ import { useEffect as useEffect16, useState as useState14 } from "react";
1874
+ import { Group as Group9, NumberInput as NumberInput8, Stack as Stack10 } from "@mantine/core";
2023
1875
  import {
2024
- useIncomingComputedData as useIncomingComputedData12,
1876
+ useIncomingComputedData as useIncomingComputedData11,
2025
1877
  useUpdateNodeComputedData as useUpdateNodeComputedData21,
2026
- useUpdateNodeData as useUpdateNodeData10
1878
+ useUpdateNodeData as useUpdateNodeData9
2027
1879
  } from "@awesome-flow/core/hooks";
2028
1880
  import { ScaleBias } from "libnoise-ts/module/modifier";
2029
- import { jsx as jsx26, jsxs as jsxs20 } from "react/jsx-runtime";
1881
+ import { jsx as jsx23, jsxs as jsxs19 } from "react/jsx-runtime";
2030
1882
  function NoiseScaleBiasNode({ id, selected, data, type }) {
2031
- const [scale, setScale] = useState15(data.scale);
2032
- const [bias, setBias] = useState15(data.bias);
2033
- const incoming = useIncomingComputedData12(id);
2034
- const updateNodeData = useUpdateNodeData10();
1883
+ const [scale, setScale] = useState14(data.scale);
1884
+ const [bias, setBias] = useState14(data.bias);
1885
+ const incoming = useIncomingComputedData11(id);
1886
+ const updateNodeData = useUpdateNodeData9();
2035
1887
  const updateComputedData = useUpdateNodeComputedData21();
2036
- useEffect18(() => {
1888
+ useEffect16(() => {
2037
1889
  if (incoming?.length > 0) {
2038
1890
  const module = new ScaleBias(incoming[0].module, scale, bias);
2039
1891
  updateComputedData(id, { module });
2040
1892
  }
2041
1893
  updateNodeData(id, { scale, bias });
2042
1894
  }, [incoming, scale, bias]);
2043
- return /* @__PURE__ */ jsxs20(NodeContainer23, { id, selected, data, type, children: [
2044
- /* @__PURE__ */ jsxs20(Stack12, { children: [
2045
- /* @__PURE__ */ jsxs20(Group11, { children: [
1895
+ return /* @__PURE__ */ jsxs19(NodeContainer23, { id, selected, data, type, children: [
1896
+ /* @__PURE__ */ jsxs19(Stack10, { children: [
1897
+ /* @__PURE__ */ jsxs19(Group9, { children: [
2046
1898
  "Scale:",
2047
- /* @__PURE__ */ jsx26(
2048
- NumberInput9,
1899
+ /* @__PURE__ */ jsx23(
1900
+ NumberInput8,
2049
1901
  {
2050
1902
  size: "xs",
2051
1903
  w: 100,
@@ -2055,10 +1907,10 @@ function NoiseScaleBiasNode({ id, selected, data, type }) {
2055
1907
  }
2056
1908
  )
2057
1909
  ] }),
2058
- /* @__PURE__ */ jsxs20(Group11, { children: [
1910
+ /* @__PURE__ */ jsxs19(Group9, { children: [
2059
1911
  "Bias:",
2060
- /* @__PURE__ */ jsx26(
2061
- NumberInput9,
1912
+ /* @__PURE__ */ jsx23(
1913
+ NumberInput8,
2062
1914
  {
2063
1915
  size: "xs",
2064
1916
  w: 100,
@@ -2069,30 +1921,30 @@ function NoiseScaleBiasNode({ id, selected, data, type }) {
2069
1921
  )
2070
1922
  ] })
2071
1923
  ] }),
2072
- /* @__PURE__ */ jsx26(NodeTrackConnections18, { handles: data.handles, nodeId: id, type: "target" })
1924
+ /* @__PURE__ */ jsx23(NodeTrackConnections18, { handles: data.handles, nodeId: id, type: "target" })
2073
1925
  ] });
2074
1926
  }
2075
1927
  var noise_scale_bias_node_default = NoiseScaleBiasNode;
2076
1928
 
2077
1929
  // src/nodes/modifiers/noise-terrace-node.tsx
2078
1930
  import { NodeContainer as NodeContainer24, NodeTrackConnections as NodeTrackConnections19 } from "@awesome-flow/core/layout";
2079
- import { ActionIcon as ActionIcon2, Button as Button2, Group as Group12, NumberInput as NumberInput10, Space as Space2 } from "@mantine/core";
1931
+ import { ActionIcon as ActionIcon2, Button as Button2, Group as Group10, NumberInput as NumberInput9, Space as Space2 } from "@mantine/core";
2080
1932
  import {
2081
- useIncomingComputedData as useIncomingComputedData13,
1933
+ useIncomingComputedData as useIncomingComputedData12,
2082
1934
  useUpdateNodeComputedData as useUpdateNodeComputedData22,
2083
- useUpdateNodeData as useUpdateNodeData11
1935
+ useUpdateNodeData as useUpdateNodeData10
2084
1936
  } from "@awesome-flow/core/hooks";
2085
- import { useCallback as useCallback16, useEffect as useEffect19, useState as useState16 } from "react";
1937
+ import { useCallback as useCallback16, useEffect as useEffect17, useState as useState15 } from "react";
2086
1938
  import { Terrace } from "libnoise-ts/module/modifier";
2087
1939
  import { IconX as IconX2 } from "@tabler/icons-react";
2088
1940
  import { randomId as randomId2 } from "@mantine/hooks";
2089
1941
  import { NodeState as NodeState2 } from "@awesome-flow/core/abstract";
2090
- import { Fragment as Fragment4, jsx as jsx27, jsxs as jsxs21 } from "react/jsx-runtime";
1942
+ import { Fragment as Fragment2, jsx as jsx24, jsxs as jsxs20 } from "react/jsx-runtime";
2091
1943
  function NoiseTerraceNode({ id, selected, data, type }) {
2092
- const incoming = useIncomingComputedData13(id);
2093
- const updateNodeData = useUpdateNodeData11();
1944
+ const incoming = useIncomingComputedData12(id);
1945
+ const updateNodeData = useUpdateNodeData10();
2094
1946
  const updateComputedData = useUpdateNodeComputedData22();
2095
- const [values, setValues] = useState16([]);
1947
+ const [values, setValues] = useState15([]);
2096
1948
  const form = useForm({
2097
1949
  mode: "uncontrolled",
2098
1950
  initialValues: {
@@ -2109,19 +1961,19 @@ function NoiseTerraceNode({ id, selected, data, type }) {
2109
1961
  form.validate();
2110
1962
  }, [])
2111
1963
  });
2112
- useEffect19(() => {
1964
+ useEffect17(() => {
2113
1965
  const points = data.points?.length ? data.points.map((v) => ({ value: v, key: randomId2() })) : [1, 2].map(() => ({ value: 0, key: randomId2() }));
2114
1966
  form.initialize({ points });
2115
1967
  }, []);
2116
- useEffect19(() => {
1968
+ useEffect17(() => {
2117
1969
  if (incoming?.length && values?.length >= 2) {
2118
1970
  const module = new Terrace(incoming[0].module, values);
2119
1971
  updateComputedData(id, { module });
2120
1972
  }
2121
1973
  }, [values, incoming]);
2122
- const fields = form.getValues().points.map((item, index) => /* @__PURE__ */ jsxs21(Group12, { mt: "xs", children: [
2123
- /* @__PURE__ */ jsx27(
2124
- NumberInput10,
1974
+ const fields = form.getValues().points.map((item, index) => /* @__PURE__ */ jsxs20(Group10, { mt: "xs", children: [
1975
+ /* @__PURE__ */ jsx24(
1976
+ NumberInput9,
2125
1977
  {
2126
1978
  size: "xs",
2127
1979
  placeholder: "Input Value",
@@ -2130,22 +1982,22 @@ function NoiseTerraceNode({ id, selected, data, type }) {
2130
1982
  },
2131
1983
  form.key(`points.${index}.value`)
2132
1984
  ),
2133
- data.state === NodeState2.edit && values.length > 2 && /* @__PURE__ */ jsx27(
1985
+ data.state === NodeState2.edit && values.length > 2 && /* @__PURE__ */ jsx24(
2134
1986
  ActionIcon2,
2135
1987
  {
2136
1988
  color: "red",
2137
1989
  variant: "outline",
2138
1990
  size: "sm",
2139
1991
  onClick: () => form.removeListItem("points", index),
2140
- children: /* @__PURE__ */ jsx27(IconX2, { size: "1rem" })
1992
+ children: /* @__PURE__ */ jsx24(IconX2, { size: "1rem" })
2141
1993
  }
2142
1994
  )
2143
1995
  ] }, item.key));
2144
- return /* @__PURE__ */ jsxs21(NodeContainer24, { id, selected, type, data, children: [
1996
+ return /* @__PURE__ */ jsxs20(NodeContainer24, { id, selected, type, data, children: [
2145
1997
  fields,
2146
- data.state === NodeState2.edit && /* @__PURE__ */ jsxs21(Fragment4, { children: [
2147
- /* @__PURE__ */ jsx27(Space2, { h: 10 }),
2148
- /* @__PURE__ */ jsx27(
1998
+ data.state === NodeState2.edit && /* @__PURE__ */ jsxs20(Fragment2, { children: [
1999
+ /* @__PURE__ */ jsx24(Space2, { h: 10 }),
2000
+ /* @__PURE__ */ jsx24(
2149
2001
  Button2,
2150
2002
  {
2151
2003
  variant: "outline",
@@ -2156,75 +2008,93 @@ function NoiseTerraceNode({ id, selected, data, type }) {
2156
2008
  }
2157
2009
  )
2158
2010
  ] }),
2159
- /* @__PURE__ */ jsx27(NodeTrackConnections19, { handles: data.handles, nodeId: id, type: "target" })
2011
+ /* @__PURE__ */ jsx24(NodeTrackConnections19, { handles: data.handles, nodeId: id, type: "target" })
2160
2012
  ] });
2161
2013
  }
2162
2014
  var noise_terrace_node_default = NoiseTerraceNode;
2163
2015
 
2164
2016
  // src/nodes/selectors/noise-blend-node.tsx
2165
2017
  import { NodeContainer as NodeContainer25, NodeTrackConnections as NodeTrackConnections20 } from "@awesome-flow/core/layout";
2166
- import { useEffect as useEffect20 } from "react";
2167
- import { useIncomingComputedData as useIncomingComputedData14, useUpdateNodeComputedData as useUpdateNodeComputedData23 } from "@awesome-flow/core/hooks";
2018
+ import { useCallback as useCallback17 } from "react";
2019
+ import { useUpdateNodeComputedData as useUpdateNodeComputedData23 } from "@awesome-flow/core/hooks";
2168
2020
  import { Blend } from "libnoise-ts/module/selector";
2169
- import { Group as Group13 } from "@mantine/core";
2170
- import { jsx as jsx28, jsxs as jsxs22 } from "react/jsx-runtime";
2021
+ import { HandlesIncomingDataStatus as HandlesIncomingDataStatus2 } from "@awesome-flow/core/components";
2022
+ import { jsx as jsx25, jsxs as jsxs21 } from "react/jsx-runtime";
2171
2023
  function NoiseBlendNode({ id, selected, data, type }) {
2172
- const incoming = useIncomingComputedData14(id);
2173
2024
  const updateComputedData = useUpdateNodeComputedData23();
2174
- useEffect20(() => {
2175
- if (incoming?.length > 2) {
2176
- const module = new Blend(incoming[0].module, incoming[1].module, incoming[2].module);
2177
- updateComputedData(id, { module });
2178
- }
2179
- }, [id, incoming, updateComputedData]);
2180
- return /* @__PURE__ */ jsxs22(NodeContainer25, { id, selected, data, type, children: [
2181
- /* @__PURE__ */ jsxs22(Group13, { children: [
2182
- "Modules: ",
2183
- incoming?.length
2184
- ] }),
2185
- /* @__PURE__ */ jsx28(NodeTrackConnections20, { handles: data.handles, nodeId: id, type: "target" })
2025
+ const onDataUpdated = useCallback17(
2026
+ (incomingData) => {
2027
+ const incomingSources = incomingData["source" /* source */];
2028
+ const incomingControl = incomingData["control" /* control */];
2029
+ if (incomingSources?.length >= 2 && incomingControl?.length) {
2030
+ const module = new Blend(
2031
+ incomingSources[0].module,
2032
+ incomingSources[1].module,
2033
+ incomingControl[0].module
2034
+ );
2035
+ updateComputedData(id, { module });
2036
+ }
2037
+ },
2038
+ []
2039
+ );
2040
+ return /* @__PURE__ */ jsxs21(NodeContainer25, { id, selected, data, type, children: [
2041
+ /* @__PURE__ */ jsx25(
2042
+ HandlesIncomingDataStatus2,
2043
+ {
2044
+ nodeId: id,
2045
+ handles: data.handles,
2046
+ handleKey: "dataId",
2047
+ onDataUpdated,
2048
+ type: "target",
2049
+ resetComputedData: true
2050
+ }
2051
+ ),
2052
+ /* @__PURE__ */ jsx25(NodeTrackConnections20, { handles: data.handles, nodeId: id, type: "target" })
2186
2053
  ] });
2187
2054
  }
2188
2055
  var noise_blend_node_default = NoiseBlendNode;
2189
2056
 
2190
2057
  // src/nodes/selectors/noise-select-node.tsx
2191
2058
  import { NodeContainer as NodeContainer26, NodeTrackConnections as NodeTrackConnections21 } from "@awesome-flow/core/layout";
2192
- import { useEffect as useEffect21, useState as useState17 } from "react";
2193
- import {
2194
- useIncomingComputedData as useIncomingComputedData15,
2195
- useUpdateNodeComputedData as useUpdateNodeComputedData24,
2196
- useUpdateNodeData as useUpdateNodeData12
2197
- } from "@awesome-flow/core/hooks";
2059
+ import { useCallback as useCallback18, useEffect as useEffect18, useState as useState16 } from "react";
2060
+ import { useUpdateNodeComputedData as useUpdateNodeComputedData24, useUpdateNodeData as useUpdateNodeData11 } from "@awesome-flow/core/hooks";
2198
2061
  import { Select } from "libnoise-ts/module/selector";
2199
- import { Group as Group14, NumberInput as NumberInput11, Stack as Stack13 } from "@mantine/core";
2200
- import { jsx as jsx29, jsxs as jsxs23 } from "react/jsx-runtime";
2062
+ import { Group as Group11, NumberInput as NumberInput10, Stack as Stack11 } from "@mantine/core";
2063
+ import { HandlesIncomingDataStatus as HandlesIncomingDataStatus3 } from "@awesome-flow/core/components";
2064
+ import { jsx as jsx26, jsxs as jsxs22 } from "react/jsx-runtime";
2201
2065
  function NoiseSelectNode({ id, selected, data, type }) {
2202
- const [edgeFalloff, setEdgeFalloff] = useState17(data.edgeFalloff);
2203
- const [lowerBound, setLowerBound] = useState17(data.lowerBound);
2204
- const [upperBound, setUpperBound] = useState17(data.upperBound);
2205
- const incoming = useIncomingComputedData15(id);
2206
- const updateNodeData = useUpdateNodeData12();
2066
+ const [edgeFalloff, setEdgeFalloff] = useState16(data.edgeFalloff);
2067
+ const [lowerBound, setLowerBound] = useState16(data.lowerBound);
2068
+ const [upperBound, setUpperBound] = useState16(data.upperBound);
2069
+ const updateNodeData = useUpdateNodeData11();
2207
2070
  const updateComputedData = useUpdateNodeComputedData24();
2208
- useEffect21(() => {
2209
- if (incoming?.length > 2) {
2210
- const module = new Select(
2211
- incoming[0].module,
2212
- incoming[1].module,
2213
- incoming[2].module,
2214
- edgeFalloff,
2215
- lowerBound,
2216
- upperBound
2217
- );
2218
- updateComputedData(id, { module });
2219
- }
2071
+ useEffect18(() => {
2220
2072
  updateNodeData(id, { edgeFalloff, lowerBound, upperBound });
2221
- }, [incoming, edgeFalloff, lowerBound, upperBound, updateNodeData, id, updateComputedData]);
2222
- return /* @__PURE__ */ jsxs23(NodeContainer26, { id, selected, data, type, children: [
2223
- /* @__PURE__ */ jsxs23(Stack13, { children: [
2224
- /* @__PURE__ */ jsxs23(Group14, { children: [
2073
+ }, [edgeFalloff, lowerBound, upperBound]);
2074
+ const onDataUpdated = useCallback18(
2075
+ (incomingData) => {
2076
+ const incomingSources = incomingData["source" /* source */];
2077
+ const incomingControl = incomingData["control" /* control */];
2078
+ if (incomingSources?.length >= 2 && incomingControl?.length) {
2079
+ const module = new Select(
2080
+ incomingSources[0].module,
2081
+ incomingSources[1].module,
2082
+ incomingControl[0].module,
2083
+ edgeFalloff,
2084
+ lowerBound,
2085
+ upperBound
2086
+ );
2087
+ updateComputedData(id, { module });
2088
+ }
2089
+ },
2090
+ []
2091
+ );
2092
+ return /* @__PURE__ */ jsxs22(NodeContainer26, { id, selected, data, type, children: [
2093
+ /* @__PURE__ */ jsxs22(Stack11, { children: [
2094
+ /* @__PURE__ */ jsxs22(Group11, { children: [
2225
2095
  "Edge Falloff:",
2226
- /* @__PURE__ */ jsx29(
2227
- NumberInput11,
2096
+ /* @__PURE__ */ jsx26(
2097
+ NumberInput10,
2228
2098
  {
2229
2099
  size: "xs",
2230
2100
  w: 100,
@@ -2234,10 +2104,10 @@ function NoiseSelectNode({ id, selected, data, type }) {
2234
2104
  }
2235
2105
  )
2236
2106
  ] }),
2237
- /* @__PURE__ */ jsxs23(Group14, { children: [
2107
+ /* @__PURE__ */ jsxs22(Group11, { children: [
2238
2108
  "Lower Bound:",
2239
- /* @__PURE__ */ jsx29(
2240
- NumberInput11,
2109
+ /* @__PURE__ */ jsx26(
2110
+ NumberInput10,
2241
2111
  {
2242
2112
  size: "xs",
2243
2113
  w: 100,
@@ -2247,10 +2117,10 @@ function NoiseSelectNode({ id, selected, data, type }) {
2247
2117
  }
2248
2118
  )
2249
2119
  ] }),
2250
- /* @__PURE__ */ jsxs23(Group14, { children: [
2120
+ /* @__PURE__ */ jsxs22(Group11, { children: [
2251
2121
  "Upper Bound:",
2252
- /* @__PURE__ */ jsx29(
2253
- NumberInput11,
2122
+ /* @__PURE__ */ jsx26(
2123
+ NumberInput10,
2254
2124
  {
2255
2125
  size: "xs",
2256
2126
  w: 100,
@@ -2260,101 +2130,103 @@ function NoiseSelectNode({ id, selected, data, type }) {
2260
2130
  }
2261
2131
  )
2262
2132
  ] }),
2263
- /* @__PURE__ */ jsxs23(Group14, { children: [
2264
- "Modules: ",
2265
- incoming?.length
2266
- ] })
2133
+ /* @__PURE__ */ jsx26(
2134
+ HandlesIncomingDataStatus3,
2135
+ {
2136
+ nodeId: id,
2137
+ handles: data.handles,
2138
+ handleKey: "dataId",
2139
+ onDataUpdated,
2140
+ type: "target",
2141
+ resetComputedData: true
2142
+ }
2143
+ )
2267
2144
  ] }),
2268
- /* @__PURE__ */ jsx29(NodeTrackConnections21, { handles: data.handles, nodeId: id, type: "target" })
2145
+ /* @__PURE__ */ jsx26(NodeTrackConnections21, { handles: data.handles, nodeId: id, type: "target" })
2269
2146
  ] });
2270
2147
  }
2271
2148
  var noise_select_node_default = NoiseSelectNode;
2272
2149
 
2273
2150
  // src/nodes/transformers/noise-displace-node.tsx
2274
2151
  import { NodeContainer as NodeContainer27, NodeTrackConnections as NodeTrackConnections22 } from "@awesome-flow/core/layout";
2275
- import { useEffect as useEffect22, useMemo as useMemo13 } from "react";
2276
- import { useIncomingHandleData, useUpdateNodeComputedData as useUpdateNodeComputedData25 } from "@awesome-flow/core/hooks";
2152
+ import { useCallback as useCallback19 } from "react";
2153
+ import { useUpdateNodeComputedData as useUpdateNodeComputedData25 } from "@awesome-flow/core/hooks";
2277
2154
  import { Displace } from "libnoise-ts/module/transformer";
2278
- import { Badge, Stack as Stack14 } from "@mantine/core";
2279
- import { jsx as jsx30, jsxs as jsxs24 } from "react/jsx-runtime";
2155
+ import { HandlesIncomingDataStatus as HandlesIncomingDataStatus4 } from "@awesome-flow/core/components";
2156
+ import { jsx as jsx27, jsxs as jsxs23 } from "react/jsx-runtime";
2280
2157
  function NoiseDisplaceNode({ id, selected, data, type }) {
2281
2158
  const updateComputedData = useUpdateNodeComputedData25();
2282
- const incomingHandleData = useIncomingHandleData(id, data.handles);
2283
- const { sourceModule, xModule, yModule, zModule } = useMemo13(() => {
2284
- return {
2285
- sourceModule: incomingHandleData["source" /* sourceModule */],
2286
- xModule: incomingHandleData["x-module" /* xModule */],
2287
- yModule: incomingHandleData["y-module" /* yModule */],
2288
- zModule: incomingHandleData["z-module" /* zModule */]
2289
- };
2290
- }, [incomingHandleData]);
2291
- useEffect22(() => {
2292
- if (sourceModule && xModule && yModule && zModule) {
2293
- const module = new Displace(
2294
- sourceModule[0].module,
2295
- xModule[0].module,
2296
- yModule[0].module,
2297
- zModule[0].module
2298
- );
2299
- updateComputedData(id, { module });
2300
- }
2301
- }, [id, updateComputedData, sourceModule, xModule, yModule, zModule]);
2302
- const { sourceColor, xColor, yColor, zColor } = useMemo13(() => {
2303
- return {
2304
- sourceColor: sourceModule ? "green" : "orange",
2305
- xColor: xModule ? "green" : "orange",
2306
- yColor: yModule ? "green" : "orange",
2307
- zColor: zModule ? "green" : "orange"
2308
- };
2309
- }, [sourceModule, xModule, yModule, zModule]);
2310
- return /* @__PURE__ */ jsxs24(NodeContainer27, { id, selected, data, type, children: [
2311
- /* @__PURE__ */ jsxs24(Stack14, { align: "center", children: [
2312
- /* @__PURE__ */ jsx30(Badge, { color: sourceColor, children: "Source Module" }),
2313
- /* @__PURE__ */ jsx30(Badge, { color: xColor, children: "X Module" }),
2314
- /* @__PURE__ */ jsx30(Badge, { color: yColor, children: "Y Module" }),
2315
- /* @__PURE__ */ jsx30(Badge, { color: zColor, children: "Z Module" })
2316
- ] }),
2317
- /* @__PURE__ */ jsx30(NodeTrackConnections22, { handles: data.handles, nodeId: id, type: "target" })
2159
+ const onDataUpdated = useCallback19(
2160
+ (handleData) => {
2161
+ const sourceModule = handleData["source" /* sourceModule */];
2162
+ const xModule = handleData["x-module" /* xModule */];
2163
+ const yModule = handleData["y-module" /* yModule */];
2164
+ const zModule = handleData["z-module" /* zModule */];
2165
+ if (sourceModule && xModule && yModule && zModule) {
2166
+ const module = new Displace(
2167
+ sourceModule[0].module,
2168
+ xModule[0].module,
2169
+ yModule[0].module,
2170
+ zModule[0].module
2171
+ );
2172
+ updateComputedData(id, { module });
2173
+ }
2174
+ },
2175
+ []
2176
+ );
2177
+ return /* @__PURE__ */ jsxs23(NodeContainer27, { id, selected, data, type, children: [
2178
+ /* @__PURE__ */ jsx27(
2179
+ HandlesIncomingDataStatus4,
2180
+ {
2181
+ nodeId: id,
2182
+ handles: data.handles,
2183
+ handleKey: "dataId",
2184
+ onDataUpdated,
2185
+ type: "target",
2186
+ resetComputedData: true
2187
+ }
2188
+ ),
2189
+ /* @__PURE__ */ jsx27(NodeTrackConnections22, { handles: data.handles, nodeId: id, type: "target" })
2318
2190
  ] });
2319
2191
  }
2320
2192
  var noise_displace_node_default = NoiseDisplaceNode;
2321
2193
 
2322
2194
  // src/nodes/transformers/noise-rotate-point-node.tsx
2323
2195
  import { NodeContainer as NodeContainer28, NodeTrackConnections as NodeTrackConnections23 } from "@awesome-flow/core/layout";
2324
- import { useEffect as useEffect23, useState as useState18 } from "react";
2196
+ import { useEffect as useEffect19, useState as useState17 } from "react";
2325
2197
  import {
2326
- useIncomingComputedData as useIncomingComputedData16,
2198
+ useIncomingComputedData as useIncomingComputedData13,
2327
2199
  useUpdateNodeComputedData as useUpdateNodeComputedData26,
2328
- useUpdateNodeData as useUpdateNodeData13
2200
+ useUpdateNodeData as useUpdateNodeData12
2329
2201
  } from "@awesome-flow/core/hooks";
2330
- import { Group as Group15, NumberInput as NumberInput12, Stack as Stack15 } from "@mantine/core";
2202
+ import { Group as Group12, NumberInput as NumberInput11, Stack as Stack12 } from "@mantine/core";
2331
2203
  import { RotatePoint } from "libnoise-ts/module/transformer";
2332
- import { jsx as jsx31, jsxs as jsxs25 } from "react/jsx-runtime";
2204
+ import { jsx as jsx28, jsxs as jsxs24 } from "react/jsx-runtime";
2333
2205
  function NoiseRotatePointNode({
2334
2206
  id,
2335
2207
  selected,
2336
2208
  data,
2337
2209
  type
2338
2210
  }) {
2339
- const [xAngle, setXAngle] = useState18(data.xAngle);
2340
- const [yAngle, setYAngle] = useState18(data.yAngle);
2341
- const [zAngle, setZAngle] = useState18(data.zAngle);
2342
- const incoming = useIncomingComputedData16(id);
2343
- const updateNodeData = useUpdateNodeData13();
2211
+ const [xAngle, setXAngle] = useState17(data.xAngle);
2212
+ const [yAngle, setYAngle] = useState17(data.yAngle);
2213
+ const [zAngle, setZAngle] = useState17(data.zAngle);
2214
+ const incoming = useIncomingComputedData13(id);
2215
+ const updateNodeData = useUpdateNodeData12();
2344
2216
  const updateComputedData = useUpdateNodeComputedData26();
2345
- useEffect23(() => {
2217
+ useEffect19(() => {
2346
2218
  if (incoming?.length) {
2347
2219
  const module = new RotatePoint(incoming[0].module, xAngle, yAngle, zAngle);
2348
2220
  updateComputedData(id, { module });
2349
2221
  }
2350
2222
  updateNodeData(id, { xAngle, yAngle, zAngle });
2351
2223
  }, [id, updateComputedData, updateNodeData, incoming, xAngle, yAngle, zAngle]);
2352
- return /* @__PURE__ */ jsxs25(NodeContainer28, { id, selected, data, type, children: [
2353
- /* @__PURE__ */ jsxs25(Stack15, { children: [
2354
- /* @__PURE__ */ jsxs25(Group15, { children: [
2224
+ return /* @__PURE__ */ jsxs24(NodeContainer28, { id, selected, data, type, children: [
2225
+ /* @__PURE__ */ jsxs24(Stack12, { children: [
2226
+ /* @__PURE__ */ jsxs24(Group12, { children: [
2355
2227
  "X Angle:",
2356
- /* @__PURE__ */ jsx31(
2357
- NumberInput12,
2228
+ /* @__PURE__ */ jsx28(
2229
+ NumberInput11,
2358
2230
  {
2359
2231
  size: "xs",
2360
2232
  w: 100,
@@ -2364,10 +2236,10 @@ function NoiseRotatePointNode({
2364
2236
  }
2365
2237
  )
2366
2238
  ] }),
2367
- /* @__PURE__ */ jsxs25(Group15, { children: [
2239
+ /* @__PURE__ */ jsxs24(Group12, { children: [
2368
2240
  "Y Angle:",
2369
- /* @__PURE__ */ jsx31(
2370
- NumberInput12,
2241
+ /* @__PURE__ */ jsx28(
2242
+ NumberInput11,
2371
2243
  {
2372
2244
  size: "xs",
2373
2245
  w: 100,
@@ -2377,10 +2249,10 @@ function NoiseRotatePointNode({
2377
2249
  }
2378
2250
  )
2379
2251
  ] }),
2380
- /* @__PURE__ */ jsxs25(Group15, { children: [
2252
+ /* @__PURE__ */ jsxs24(Group12, { children: [
2381
2253
  "Z Angle:",
2382
- /* @__PURE__ */ jsx31(
2383
- NumberInput12,
2254
+ /* @__PURE__ */ jsx28(
2255
+ NumberInput11,
2384
2256
  {
2385
2257
  size: "xs",
2386
2258
  w: 100,
@@ -2391,47 +2263,47 @@ function NoiseRotatePointNode({
2391
2263
  )
2392
2264
  ] })
2393
2265
  ] }),
2394
- /* @__PURE__ */ jsx31(NodeTrackConnections23, { handles: data.handles, nodeId: id, type: "target" })
2266
+ /* @__PURE__ */ jsx28(NodeTrackConnections23, { handles: data.handles, nodeId: id, type: "target" })
2395
2267
  ] });
2396
2268
  }
2397
2269
  var noise_rotate_point_node_default = NoiseRotatePointNode;
2398
2270
 
2399
2271
  // src/nodes/transformers/noise-scale-point-node.tsx
2400
2272
  import { NodeContainer as NodeContainer29, NodeTrackConnections as NodeTrackConnections24 } from "@awesome-flow/core/layout";
2401
- import { useEffect as useEffect24, useState as useState19 } from "react";
2273
+ import { useEffect as useEffect20, useState as useState18 } from "react";
2402
2274
  import {
2403
- useIncomingComputedData as useIncomingComputedData17,
2275
+ useIncomingComputedData as useIncomingComputedData14,
2404
2276
  useUpdateNodeComputedData as useUpdateNodeComputedData27,
2405
- useUpdateNodeData as useUpdateNodeData14
2277
+ useUpdateNodeData as useUpdateNodeData13
2406
2278
  } from "@awesome-flow/core/hooks";
2407
- import { Group as Group16, NumberInput as NumberInput13, Stack as Stack16 } from "@mantine/core";
2279
+ import { Group as Group13, NumberInput as NumberInput12, Stack as Stack13 } from "@mantine/core";
2408
2280
  import { ScalePoint } from "libnoise-ts/module/transformer";
2409
- import { jsx as jsx32, jsxs as jsxs26 } from "react/jsx-runtime";
2281
+ import { jsx as jsx29, jsxs as jsxs25 } from "react/jsx-runtime";
2410
2282
  function NoiseScalePointNode({
2411
2283
  id,
2412
2284
  selected,
2413
2285
  data,
2414
2286
  type
2415
2287
  }) {
2416
- const [xScale, setXScale] = useState19(data.xScale);
2417
- const [yScale, setYScale] = useState19(data.yScale);
2418
- const [zScale, setZScale] = useState19(data.zScale);
2419
- const incoming = useIncomingComputedData17(id);
2420
- const updateNodeData = useUpdateNodeData14();
2288
+ const [xScale, setXScale] = useState18(data.xScale);
2289
+ const [yScale, setYScale] = useState18(data.yScale);
2290
+ const [zScale, setZScale] = useState18(data.zScale);
2291
+ const incoming = useIncomingComputedData14(id);
2292
+ const updateNodeData = useUpdateNodeData13();
2421
2293
  const updateComputedData = useUpdateNodeComputedData27();
2422
- useEffect24(() => {
2294
+ useEffect20(() => {
2423
2295
  if (incoming?.length) {
2424
2296
  const module = new ScalePoint(incoming[0].module, xScale, yScale, zScale);
2425
2297
  updateComputedData(id, { module });
2426
2298
  }
2427
2299
  updateNodeData(id, { xScale, yScale, zScale });
2428
2300
  }, [id, incoming, updateComputedData, updateNodeData, xScale, yScale, zScale]);
2429
- return /* @__PURE__ */ jsxs26(NodeContainer29, { id, selected, data, type, children: [
2430
- /* @__PURE__ */ jsxs26(Stack16, { children: [
2431
- /* @__PURE__ */ jsxs26(Group16, { children: [
2301
+ return /* @__PURE__ */ jsxs25(NodeContainer29, { id, selected, data, type, children: [
2302
+ /* @__PURE__ */ jsxs25(Stack13, { children: [
2303
+ /* @__PURE__ */ jsxs25(Group13, { children: [
2432
2304
  "X Scale:",
2433
- /* @__PURE__ */ jsx32(
2434
- NumberInput13,
2305
+ /* @__PURE__ */ jsx29(
2306
+ NumberInput12,
2435
2307
  {
2436
2308
  size: "xs",
2437
2309
  w: 100,
@@ -2441,10 +2313,10 @@ function NoiseScalePointNode({
2441
2313
  }
2442
2314
  )
2443
2315
  ] }),
2444
- /* @__PURE__ */ jsxs26(Group16, { children: [
2316
+ /* @__PURE__ */ jsxs25(Group13, { children: [
2445
2317
  "Y Scale:",
2446
- /* @__PURE__ */ jsx32(
2447
- NumberInput13,
2318
+ /* @__PURE__ */ jsx29(
2319
+ NumberInput12,
2448
2320
  {
2449
2321
  size: "xs",
2450
2322
  w: 100,
@@ -2454,10 +2326,10 @@ function NoiseScalePointNode({
2454
2326
  }
2455
2327
  )
2456
2328
  ] }),
2457
- /* @__PURE__ */ jsxs26(Group16, { children: [
2329
+ /* @__PURE__ */ jsxs25(Group13, { children: [
2458
2330
  "Z Scale:",
2459
- /* @__PURE__ */ jsx32(
2460
- NumberInput13,
2331
+ /* @__PURE__ */ jsx29(
2332
+ NumberInput12,
2461
2333
  {
2462
2334
  size: "xs",
2463
2335
  w: 100,
@@ -2468,47 +2340,47 @@ function NoiseScalePointNode({
2468
2340
  )
2469
2341
  ] })
2470
2342
  ] }),
2471
- /* @__PURE__ */ jsx32(NodeTrackConnections24, { handles: data.handles, nodeId: id, type: "target" })
2343
+ /* @__PURE__ */ jsx29(NodeTrackConnections24, { handles: data.handles, nodeId: id, type: "target" })
2472
2344
  ] });
2473
2345
  }
2474
2346
  var noise_scale_point_node_default = NoiseScalePointNode;
2475
2347
 
2476
2348
  // src/nodes/transformers/noise-translate-point-node.tsx
2477
2349
  import { NodeContainer as NodeContainer30, NodeTrackConnections as NodeTrackConnections25 } from "@awesome-flow/core/layout";
2478
- import { useEffect as useEffect25, useState as useState20 } from "react";
2350
+ import { useEffect as useEffect21, useState as useState19 } from "react";
2479
2351
  import {
2480
- useIncomingComputedData as useIncomingComputedData18,
2352
+ useIncomingComputedData as useIncomingComputedData15,
2481
2353
  useUpdateNodeComputedData as useUpdateNodeComputedData28,
2482
- useUpdateNodeData as useUpdateNodeData15
2354
+ useUpdateNodeData as useUpdateNodeData14
2483
2355
  } from "@awesome-flow/core/hooks";
2484
- import { Group as Group17, NumberInput as NumberInput14, Stack as Stack17 } from "@mantine/core";
2356
+ import { Group as Group14, NumberInput as NumberInput13, Stack as Stack14 } from "@mantine/core";
2485
2357
  import { TranslatePoint } from "libnoise-ts/module/transformer";
2486
- import { jsx as jsx33, jsxs as jsxs27 } from "react/jsx-runtime";
2358
+ import { jsx as jsx30, jsxs as jsxs26 } from "react/jsx-runtime";
2487
2359
  function NoiseTranslatePointNode({
2488
2360
  id,
2489
2361
  selected,
2490
2362
  data,
2491
2363
  type
2492
2364
  }) {
2493
- const [translateX, setTranslateX] = useState20(data.translateX);
2494
- const [translateY, setTranslateY] = useState20(data.translateY);
2495
- const [translateZ, setTranslateZ] = useState20(data.translateZ);
2496
- const incoming = useIncomingComputedData18(id);
2497
- const updateNodeData = useUpdateNodeData15();
2365
+ const [translateX, setTranslateX] = useState19(data.translateX);
2366
+ const [translateY, setTranslateY] = useState19(data.translateY);
2367
+ const [translateZ, setTranslateZ] = useState19(data.translateZ);
2368
+ const incoming = useIncomingComputedData15(id);
2369
+ const updateNodeData = useUpdateNodeData14();
2498
2370
  const updateComputedData = useUpdateNodeComputedData28();
2499
- useEffect25(() => {
2371
+ useEffect21(() => {
2500
2372
  if (incoming?.length) {
2501
2373
  const module = new TranslatePoint(incoming[0].module, translateX, translateY, translateZ);
2502
2374
  updateComputedData(id, { module });
2503
2375
  }
2504
2376
  updateNodeData(id, { translateX, translateY, translateZ });
2505
2377
  }, [id, incoming, translateX, translateY, translateZ, updateComputedData, updateNodeData]);
2506
- return /* @__PURE__ */ jsxs27(NodeContainer30, { id, selected, data, type, children: [
2507
- /* @__PURE__ */ jsxs27(Stack17, { children: [
2508
- /* @__PURE__ */ jsxs27(Group17, { children: [
2378
+ return /* @__PURE__ */ jsxs26(NodeContainer30, { id, selected, data, type, children: [
2379
+ /* @__PURE__ */ jsxs26(Stack14, { children: [
2380
+ /* @__PURE__ */ jsxs26(Group14, { children: [
2509
2381
  "Translate X:",
2510
- /* @__PURE__ */ jsx33(
2511
- NumberInput14,
2382
+ /* @__PURE__ */ jsx30(
2383
+ NumberInput13,
2512
2384
  {
2513
2385
  size: "xs",
2514
2386
  w: 100,
@@ -2518,10 +2390,10 @@ function NoiseTranslatePointNode({
2518
2390
  }
2519
2391
  )
2520
2392
  ] }),
2521
- /* @__PURE__ */ jsxs27(Group17, { children: [
2393
+ /* @__PURE__ */ jsxs26(Group14, { children: [
2522
2394
  "Translate Y:",
2523
- /* @__PURE__ */ jsx33(
2524
- NumberInput14,
2395
+ /* @__PURE__ */ jsx30(
2396
+ NumberInput13,
2525
2397
  {
2526
2398
  size: "xs",
2527
2399
  w: 100,
@@ -2531,10 +2403,10 @@ function NoiseTranslatePointNode({
2531
2403
  }
2532
2404
  )
2533
2405
  ] }),
2534
- /* @__PURE__ */ jsxs27(Group17, { children: [
2406
+ /* @__PURE__ */ jsxs26(Group14, { children: [
2535
2407
  "Translate Z:",
2536
- /* @__PURE__ */ jsx33(
2537
- NumberInput14,
2408
+ /* @__PURE__ */ jsx30(
2409
+ NumberInput13,
2538
2410
  {
2539
2411
  size: "xs",
2540
2412
  w: 100,
@@ -2545,31 +2417,32 @@ function NoiseTranslatePointNode({
2545
2417
  )
2546
2418
  ] })
2547
2419
  ] }),
2548
- /* @__PURE__ */ jsx33(NodeTrackConnections25, { handles: data.handles, nodeId: id, type: "target" })
2420
+ /* @__PURE__ */ jsx30(NodeTrackConnections25, { handles: data.handles, nodeId: id, type: "target" })
2549
2421
  ] });
2550
2422
  }
2551
2423
  var noise_translate_point_node_default = NoiseTranslatePointNode;
2552
2424
 
2553
2425
  // src/nodes/transformers/noise-turbulence-node .tsx
2554
2426
  import { NodeContainer as NodeContainer31, NodeTrackConnections as NodeTrackConnections26 } from "@awesome-flow/core/layout";
2555
- import { useCallback as useCallback17, useEffect as useEffect26, useState as useState21 } from "react";
2556
- import { useIncomingComputedData as useIncomingComputedData19, useUpdateNodeComputedData as useUpdateNodeComputedData29 } from "@awesome-flow/core/hooks";
2427
+ import { useCallback as useCallback20, useEffect as useEffect22, useState as useState20 } from "react";
2428
+ import { useIncomingComputedData as useIncomingComputedData16, useUpdateNodeComputedData as useUpdateNodeComputedData29 } from "@awesome-flow/core/hooks";
2557
2429
  import { Turbulence } from "libnoise-ts/module/transformer";
2558
- import { jsx as jsx34, jsxs as jsxs28 } from "react/jsx-runtime";
2430
+ import { NodePropertyVariables as NodePropertyVariables7 } from "@awesome-flow/core/components";
2431
+ import { jsx as jsx31, jsxs as jsxs27 } from "react/jsx-runtime";
2559
2432
  function NoiseTurbulenceNode({
2560
2433
  id,
2561
2434
  selected,
2562
2435
  data,
2563
2436
  type
2564
2437
  }) {
2565
- const [properties, setProperties] = useState21(null);
2566
- const incoming = useIncomingComputedData19(id);
2438
+ const [properties, setProperties] = useState20(null);
2439
+ const incoming = useIncomingComputedData16(id);
2567
2440
  const updateComputedData = useUpdateNodeComputedData29();
2568
- const onPropertiesChange = useCallback17((props) => {
2441
+ const onPropertiesChange = useCallback20((props) => {
2569
2442
  setProperties(props);
2570
2443
  }, []);
2571
- useEffect26(() => {
2572
- if (incoming?.length) {
2444
+ useEffect22(() => {
2445
+ if (incoming?.length && properties) {
2573
2446
  const module = new Turbulence(
2574
2447
  incoming[0].module,
2575
2448
  properties.frequency.value,
@@ -2579,1576 +2452,1034 @@ function NoiseTurbulenceNode({
2579
2452
  );
2580
2453
  updateComputedData(id, { module });
2581
2454
  }
2582
- }, [id, incoming, properties, updateComputedData]);
2583
- return /* @__PURE__ */ jsxs28(NodeContainer31, { id, selected, data, type, children: [
2584
- /* @__PURE__ */ jsx34(node_property_variables_default, { data, nodeId: id, onPropertiesChange }),
2585
- /* @__PURE__ */ jsx34(NodeTrackConnections26, { handles: data.handles, nodeId: id, type: "target" })
2455
+ }, [id, incoming, properties]);
2456
+ return /* @__PURE__ */ jsxs27(NodeContainer31, { id, selected, data, type, children: [
2457
+ /* @__PURE__ */ jsx31(NodePropertyVariables7, { data, nodeId: id, onPropertiesChange }),
2458
+ /* @__PURE__ */ jsx31(NodeTrackConnections26, { handles: data.handles, nodeId: id, type: "target" })
2586
2459
  ] });
2587
2460
  }
2588
2461
  var noise_turbulence_node_default = NoiseTurbulenceNode;
2589
2462
 
2590
- // src/nodes/generators/variable-property-node.tsx
2591
- import { NodeCombobox as NodeCombobox2, NodeContainer as NodeContainer32, NodeTrackConnections as NodeTrackConnections27 } from "@awesome-flow/core/layout";
2592
- import { useCallback as useCallback18, useEffect as useEffect27, useState as useState22 } from "react";
2593
- import { Stack as Stack18 } from "@mantine/core";
2594
- import { useIncomingNodeData as useIncomingNodeData2, useOutgoingNodes, useUpdateNodeData as useUpdateNodeData16 } from "@awesome-flow/core/hooks";
2595
- import { getObjectPropertyMap } from "@awesome-flow/core/utils";
2596
- import { nodeDataPropertyExcept as nodeDataPropertyExcept3 } from "@awesome-flow/core/abstract";
2597
- import { jsx as jsx35, jsxs as jsxs29 } from "react/jsx-runtime";
2598
- function VariablePropertyNode({
2599
- id,
2600
- selected,
2601
- data,
2602
- type
2603
- }) {
2604
- const [options3, setOptions] = useState22({});
2605
- const [selectedProperty, setSelectedProperty] = useState22(data.property);
2606
- const updateNodeData = useUpdateNodeData16();
2607
- const outgoing = useOutgoingNodes(id);
2608
- const incoming = useIncomingNodeData2(id);
2609
- useEffect27(() => {
2610
- if (outgoing?.length) {
2611
- const { data: data2 } = outgoing[0];
2612
- const properties = getObjectPropertyMap(data2, nodeDataPropertyExcept3);
2613
- setOptions(properties);
2614
- if (!selectedProperty) {
2615
- const keys = Object.keys(properties);
2616
- if (keys.length) {
2617
- setSelectedProperty({
2618
- name: keys[0],
2619
- value: properties[keys[0]]
2620
- });
2621
- }
2622
- }
2623
- } else {
2624
- setSelectedProperty(null);
2625
- }
2626
- }, [outgoing]);
2627
- useEffect27(() => {
2628
- if (!incoming?.length && selectedProperty?.disabled) {
2629
- setSelectedProperty({ ...selectedProperty, disabled: false });
2630
- } else if (incoming?.length && selectedProperty) {
2631
- const incomingValue = incoming[0].value;
2632
- if (incomingValue !== void 0 && incomingValue !== null) {
2633
- setSelectedProperty({
2634
- name: selectedProperty.name,
2635
- value: incomingValue,
2636
- disabled: true
2637
- });
2638
- }
2639
- }
2640
- }, [incoming]);
2641
- useEffect27(() => {
2642
- if (selectedProperty) {
2643
- updateNodeData(id, { property: selectedProperty });
2644
- }
2645
- }, [selectedProperty]);
2646
- const onPropertyChange = useCallback18(
2647
- (selected2) => {
2648
- setSelectedProperty({
2649
- name: selected2,
2650
- value: options3[selected2]
2651
- });
2652
- },
2653
- [options3]
2654
- );
2655
- const onValueChange = useCallback18((name, value) => {
2656
- setSelectedProperty({
2657
- name,
2658
- value
2659
- });
2660
- }, []);
2661
- return /* @__PURE__ */ jsxs29(NodeContainer32, { id, selected, data, type, children: [
2662
- /* @__PURE__ */ jsxs29(Stack18, { align: "center", children: [
2663
- /* @__PURE__ */ jsx35(
2664
- NodeCombobox2,
2665
- {
2666
- options: options3,
2667
- onChange: onPropertyChange,
2668
- selected: selectedProperty?.name,
2669
- hideListValues: true
2670
- }
2671
- ),
2672
- /* @__PURE__ */ jsx35(node_property_input_default, { property: selectedProperty, onChange: onValueChange })
2673
- ] }),
2674
- /* @__PURE__ */ jsx35(NodeTrackConnections27, { handles: data.handles, nodeId: id })
2675
- ] });
2676
- }
2677
- var variable_property_node_default = VariablePropertyNode;
2678
-
2679
- // src/nodes/modifiers/variable-combine-node.tsx
2680
- import { NodeCombobox as NodeCombobox3, NodeContainer as NodeContainer33, NodeTrackConnections as NodeTrackConnections28 } from "@awesome-flow/core/layout";
2681
- import { useCallback as useCallback19, useEffect as useEffect28, useState as useState23 } from "react";
2682
- import { useIncomingNodeData as useIncomingNodeData3, useUpdateNodeData as useUpdateNodeData17 } from "@awesome-flow/core/hooks";
2683
- import {
2684
- IconAsterisk as IconAsterisk2,
2685
- IconChevronLeft as IconChevronLeft2,
2686
- IconChevronRight as IconChevronRight2,
2687
- IconChevronUp as IconChevronUp2,
2688
- IconDivide,
2689
- IconPlus as IconPlus2
2690
- } from "@tabler/icons-react";
2691
- import { jsx as jsx36, jsxs as jsxs30 } from "react/jsx-runtime";
2692
- var options2 = {
2693
- add: /* @__PURE__ */ jsx36(IconPlus2, {}),
2694
- divide: /* @__PURE__ */ jsx36(IconDivide, {}),
2695
- min: /* @__PURE__ */ jsx36(IconChevronLeft2, {}),
2696
- max: /* @__PURE__ */ jsx36(IconChevronRight2, {}),
2697
- multiply: /* @__PURE__ */ jsx36(IconAsterisk2, {}),
2698
- power: /* @__PURE__ */ jsx36(IconChevronUp2, {})
2699
- };
2700
- function VariableCombineNode({
2701
- id,
2702
- selected,
2703
- data,
2704
- type
2705
- }) {
2706
- const [operation, setOperation] = useState23(data.operation);
2707
- const [value, setValue] = useState23(data.value);
2708
- const updateNodeData = useUpdateNodeData17();
2709
- const incoming = useIncomingNodeData3(id);
2710
- useEffect28(() => {
2711
- if (incoming?.length > 1) {
2712
- const result = getOperationResult(operation, incoming[0].value, incoming[1].value);
2713
- setValue(result);
2714
- updateNodeData(id, { value: result });
2715
- }
2716
- }, [operation, incoming]);
2717
- const onChange = useCallback19((op) => {
2718
- updateNodeData(id, { operation: op });
2719
- setOperation(op);
2720
- }, []);
2721
- return /* @__PURE__ */ jsxs30(NodeContainer33, { id, selected, data, type, children: [
2722
- /* @__PURE__ */ jsx36(NodeCombobox3, { options: options2, selected: operation, onChange }),
2723
- /* @__PURE__ */ jsx36(node_value_input_default, { value, onChange: () => {
2724
- }, disabled: true }),
2725
- /* @__PURE__ */ jsx36(NodeTrackConnections28, { handles: data.handles, nodeId: id, type: "target" })
2726
- ] });
2727
- }
2728
- function getOperationResult(operation, value1, value2) {
2729
- switch (operation) {
2730
- case "add" /* add */:
2731
- return Number(value1) + Number(value2);
2732
- case "divide" /* divide */:
2733
- return Number(value1) / (Number(value2) || 1);
2734
- case "max" /* max */:
2735
- return Number(value1) > Number(value2) ? value1 : value2;
2736
- case "min" /* min */:
2737
- return Number(value1) < Number(value2) ? value1 : value2;
2738
- case "multiply" /* multiply */:
2739
- return Number(value1) * Number(value2);
2740
- case "power" /* power */:
2741
- return Number(value1) ** Number(value2);
2742
- }
2743
- }
2744
- var variable_combine_node_default = VariableCombineNode;
2463
+ // src/templates/generators/noise-checkerboard-template.ts
2464
+ import { Position } from "@xyflow/system";
2745
2465
 
2746
- // src/nodes/generators/variable-value-node.tsx
2747
- import { NodeContainer as NodeContainer34, NodeTrackConnections as NodeTrackConnections29 } from "@awesome-flow/core/layout";
2748
- import { useCallback as useCallback20, useState as useState24 } from "react";
2749
- import { useUpdateNodeData as useUpdateNodeData18 } from "@awesome-flow/core/hooks";
2750
- import { jsx as jsx37, jsxs as jsxs31 } from "react/jsx-runtime";
2751
- function VariableValueNode({ id, selected, data, type }) {
2752
- const [value, setValue] = useState24(data.value || 0);
2753
- const updateNodeData = useUpdateNodeData18();
2754
- const onValueChange = useCallback20((newValue) => {
2755
- updateNodeData(id, { value: newValue });
2756
- setValue(newValue);
2757
- }, []);
2758
- return /* @__PURE__ */ jsxs31(NodeContainer34, { id, selected, data, type, children: [
2759
- /* @__PURE__ */ jsx37(node_value_input_default, { value, onChange: onValueChange }),
2760
- /* @__PURE__ */ jsx37(NodeTrackConnections29, { handles: data.handles, nodeId: id, type: "source" })
2761
- ] });
2762
- }
2763
- var variable_value_node_default = VariableValueNode;
2764
-
2765
- // src/nodes/groups/node-module-group.tsx
2766
- import { NodeContainer as NodeContainer35, NodeCollapse } from "@awesome-flow/core/layout";
2767
- import { NodeResizer, useStore, useUpdateNodeInternals } from "@xyflow/react";
2768
- import { FlowContext } from "@awesome-flow/core/abstract";
2769
- import { useCallback as useCallback21, useContext, useEffect as useEffect29, useMemo as useMemo14 } from "react";
2770
- import { shallow } from "zustand/shallow";
2771
- import { Badge as Badge2, Group as Group18 } from "@mantine/core";
2772
- import { jsx as jsx38, jsxs as jsxs32 } from "react/jsx-runtime";
2773
- function ModuleGroupNode({
2774
- id,
2775
- selected,
2776
- data,
2777
- type,
2778
- width,
2779
- height
2780
- }) {
2781
- const context = useContext(FlowContext);
2782
- const updateNodeInternals = useUpdateNodeInternals();
2783
- const triggerNodeChanges = useStore((s) => s.triggerNodeChanges);
2784
- const { groupNodes, setGroupCollapsed } = context.useFlowStore(
2785
- useCallback21(
2786
- (state) => ({ groupNodes: state.groups[id], setGroupCollapsed: state.setGroupCollapsed }),
2787
- []
2788
- )
2789
- );
2790
- const intersectingNode = context.useInteractivityStore(
2791
- useCallback21((state) => state.nodeIntersectionTargets[id], [id]),
2792
- shallow
2793
- );
2794
- useEffect29(() => {
2795
- updateNodeInternals(id);
2796
- }, [width, height]);
2797
- useEffect29(() => {
2798
- triggerNodeChanges([
2799
- {
2800
- id,
2801
- type: "select",
2802
- selected: !!intersectingNode
2803
- }
2804
- ]);
2805
- }, [intersectingNode]);
2806
- const onCollapsed = useCallback21((collapsed) => {
2807
- setGroupCollapsed(id, collapsed);
2808
- }, []);
2809
- const size = useMemo14(() => {
2810
- return {
2811
- width: data.initialSize?.width || 100,
2812
- height: data.initialSize?.height || 50
2813
- };
2814
- }, [data.initialSize]);
2815
- return /* @__PURE__ */ jsx38(
2816
- NodeContainer35,
2817
- {
2818
- id,
2819
- selected,
2820
- data,
2821
- title: /* @__PURE__ */ jsx38(Group18, { justify: "space-between", children: /* @__PURE__ */ jsxs32(Group18, { gap: "xs", children: [
2822
- /* @__PURE__ */ jsx38(Badge2, { size: "xs", variant: "outline", radius: "xs", color: "gray", children: groupNodes?.length || 0 }),
2823
- /* @__PURE__ */ jsx38(NodeCollapse, { nodeId: id, isCollapsed: data.isCollapsed, onCollapsed })
2824
- ] }) }),
2825
- type,
2826
- children: /* @__PURE__ */ jsx38(
2827
- NodeResizer,
2828
- {
2829
- nodeId: id,
2830
- minWidth: size.width,
2831
- minHeight: size.height,
2832
- isVisible: selected && !data.isCollapsed
2833
- }
2834
- )
2835
- }
2836
- );
2837
- }
2838
- var node_module_group_default = ModuleGroupNode;
2466
+ // src/abstract/templates.ts
2467
+ var NoiseTemplateGroup = /* @__PURE__ */ ((NoiseTemplateGroup2) => {
2468
+ NoiseTemplateGroup2["positions"] = "Positions";
2469
+ NoiseTemplateGroup2["output"] = "Output";
2470
+ NoiseTemplateGroup2["noiseGenerators"] = "Noise Generators";
2471
+ NoiseTemplateGroup2["noiseModifiers"] = "Noise Modifiers";
2472
+ NoiseTemplateGroup2["noiseSelectors"] = "Noise Selectors";
2473
+ NoiseTemplateGroup2["noiseTransformers"] = "Noise Transformers";
2474
+ return NoiseTemplateGroup2;
2475
+ })(NoiseTemplateGroup || {});
2839
2476
 
2840
2477
  // src/templates/generators/noise-checkerboard-template.ts
2841
- import { IDGenerator } from "@awesome-flow/core/utils";
2842
- import { Position } from "@xyflow/system";
2843
2478
  var NoiseCheckerboardNodeTemplateFactory = class {
2844
- create() {
2845
- return {
2846
- id: IDGenerator.template(),
2847
- type: "noise-checkerboard" /* noiseCheckerboard */,
2848
- removable: false,
2849
- data: {
2850
- title: "Checkerboard Noise"
2851
- },
2852
- handles: [
2853
- {
2854
- position: Position.Right,
2855
- dataType: 8 /* module */,
2856
- connection: "source"
2857
- }
2858
- ]
2859
- };
2860
- }
2861
- isHandleAllowed(type) {
2862
- return type === "source";
2863
- }
2864
- getHandleAllowedDataType() {
2865
- return 8 /* module */;
2866
- }
2479
+ template = {
2480
+ type: "noise-checkerboard" /* noiseCheckerboard */,
2481
+ group: "Noise Generators" /* noiseGenerators */,
2482
+ data: {
2483
+ title: "Checkerboard Noise"
2484
+ },
2485
+ handles: [
2486
+ {
2487
+ position: Position.Right,
2488
+ dataType: "module" /* module */,
2489
+ connection: "source"
2490
+ }
2491
+ ]
2492
+ };
2867
2493
  };
2868
2494
 
2869
2495
  // src/templates/generators/noise-const-template.ts
2870
- import { IDGenerator as IDGenerator2 } from "@awesome-flow/core/utils";
2871
2496
  import { Position as Position2 } from "@xyflow/system";
2872
2497
  var NoiseConstNodeTemplateFactory = class {
2873
- create() {
2874
- return {
2875
- id: IDGenerator2.template(),
2876
- type: "noise-constant" /* noiseConst */,
2877
- removable: false,
2878
- data: {
2879
- title: "Const Value Noise",
2880
- noise: 0,
2881
- min: -1,
2882
- max: 1
2883
- },
2884
- handles: [
2885
- {
2886
- position: Position2.Right,
2887
- dataType: 8 /* module */,
2888
- connection: "source"
2889
- }
2890
- ]
2891
- };
2892
- }
2893
- isHandleAllowed(type) {
2894
- return type === "source";
2895
- }
2896
- getHandleAllowedDataType(type) {
2897
- return 8 /* module */;
2898
- }
2498
+ template = {
2499
+ type: "noise-constant" /* noiseConst */,
2500
+ group: "Noise Generators" /* noiseGenerators */,
2501
+ data: {
2502
+ title: "Const Value Noise",
2503
+ noise: 0,
2504
+ min: -1,
2505
+ max: 1
2506
+ },
2507
+ handles: [
2508
+ {
2509
+ position: Position2.Right,
2510
+ dataType: "module" /* module */,
2511
+ connection: "source"
2512
+ }
2513
+ ]
2514
+ };
2899
2515
  };
2900
2516
 
2901
2517
  // src/templates/generators/noise-cylinders-template.ts
2902
- import { IDGenerator as IDGenerator3 } from "@awesome-flow/core/utils";
2518
+ import { CoreHandleType } from "@awesome-flow/core/abstract";
2903
2519
  import { Position as Position3 } from "@xyflow/system";
2904
2520
  var NoiseCylindersNodeTemplateFactory = class {
2905
- create() {
2906
- return {
2907
- id: IDGenerator3.template(),
2908
- type: "noise-cylinders" /* noiseCylinders */,
2909
- removable: false,
2910
- data: {
2911
- title: "Cylinders Noise",
2912
- frequency: 0.1
2521
+ template = {
2522
+ type: "noise-cylinders" /* noiseCylinders */,
2523
+ group: "Noise Generators" /* noiseGenerators */,
2524
+ data: {
2525
+ title: "Cylinders Noise",
2526
+ frequency: 0.1
2527
+ },
2528
+ handles: [
2529
+ {
2530
+ position: Position3.Left,
2531
+ dataType: CoreHandleType.variableProperty,
2532
+ connection: "target"
2913
2533
  },
2914
- handles: [
2915
- {
2916
- position: Position3.Left,
2917
- dataType: 16 /* variableProperty */,
2918
- connection: "target"
2919
- },
2920
- {
2921
- position: Position3.Right,
2922
- dataType: 8 /* module */,
2923
- connection: "source"
2924
- }
2925
- ]
2926
- };
2927
- }
2928
- isHandleAllowed(type) {
2929
- return type === "source";
2930
- }
2931
- getHandleAllowedDataType() {
2932
- return 8 /* module */;
2933
- }
2534
+ {
2535
+ position: Position3.Right,
2536
+ dataType: "module" /* module */,
2537
+ connection: "source"
2538
+ }
2539
+ ]
2540
+ };
2934
2541
  };
2935
2542
 
2936
2543
  // src/templates/generators/noise-perlin-template.ts
2937
- import { IDGenerator as IDGenerator4 } from "@awesome-flow/core/utils";
2544
+ import { CoreHandleType as CoreHandleType2 } from "@awesome-flow/core/abstract";
2938
2545
  import { Position as Position4 } from "@xyflow/system";
2939
2546
  var NoisePerlinNodeTemplateFactory = class {
2940
- create() {
2941
- return {
2942
- id: IDGenerator4.template(),
2943
- type: "noise-perlin" /* noisePerlin */,
2944
- removable: false,
2945
- data: {
2946
- title: "Perlin Noise",
2947
- frequency: 0.1,
2948
- lacunarity: 2,
2949
- octaves: 5,
2950
- persistence: 0.5,
2951
- seed: 0
2547
+ template = {
2548
+ type: "noise-perlin" /* noisePerlin */,
2549
+ group: "Noise Generators" /* noiseGenerators */,
2550
+ data: {
2551
+ title: "Perlin Noise",
2552
+ frequency: 0.1,
2553
+ lacunarity: 2,
2554
+ octaves: 5,
2555
+ persistence: 0.5,
2556
+ seed: 0
2557
+ },
2558
+ handles: [
2559
+ {
2560
+ position: Position4.Left,
2561
+ dataType: CoreHandleType2.variableProperty,
2562
+ connection: "target"
2952
2563
  },
2953
- handles: [
2954
- {
2955
- position: Position4.Left,
2956
- dataType: 16 /* variableProperty */,
2957
- connection: "target"
2958
- },
2959
- {
2960
- position: Position4.Right,
2961
- dataType: 8 /* module */,
2962
- connection: "source"
2963
- }
2964
- ]
2965
- };
2966
- }
2967
- isHandleAllowed(type) {
2968
- return type === "source";
2969
- }
2970
- getHandleAllowedDataType() {
2971
- return 8 /* module */;
2972
- }
2564
+ {
2565
+ position: Position4.Right,
2566
+ dataType: "module" /* module */,
2567
+ connection: "source"
2568
+ }
2569
+ ]
2570
+ };
2973
2571
  };
2974
2572
 
2975
2573
  // src/templates/generators/noise-ridgedmulti-template.ts
2976
- import { IDGenerator as IDGenerator5 } from "@awesome-flow/core/utils";
2574
+ import { CoreHandleType as CoreHandleType3 } from "@awesome-flow/core/abstract";
2977
2575
  import { Position as Position5 } from "@xyflow/system";
2978
2576
  var NoiseRidgedMultiNodeTemplateFactory = class {
2979
- create() {
2980
- return {
2981
- id: IDGenerator5.template(),
2982
- type: "noise-ridged-multi" /* noiseRidgedMulti */,
2983
- removable: false,
2984
- data: {
2985
- title: "Ridged Multi Noise",
2986
- frequency: 0.1,
2987
- lacunarity: 2,
2988
- octaves: 6,
2989
- offset: 1,
2990
- gain: 2,
2991
- seed: 0
2577
+ template = {
2578
+ type: "noise-ridged-multi" /* noiseRidgedMulti */,
2579
+ group: "Noise Generators" /* noiseGenerators */,
2580
+ data: {
2581
+ title: "Ridged Multi Noise",
2582
+ frequency: 0.1,
2583
+ lacunarity: 2,
2584
+ octaves: 6,
2585
+ offset: 1,
2586
+ gain: 2,
2587
+ seed: 0
2588
+ },
2589
+ handles: [
2590
+ {
2591
+ position: Position5.Left,
2592
+ dataType: CoreHandleType3.variableProperty,
2593
+ connection: "target"
2992
2594
  },
2993
- handles: [
2994
- {
2995
- position: Position5.Left,
2996
- dataType: 16 /* variableProperty */,
2997
- connection: "target"
2998
- },
2999
- {
3000
- position: Position5.Right,
3001
- dataType: 8 /* module */,
3002
- connection: "source"
3003
- }
3004
- ]
3005
- };
3006
- }
3007
- isHandleAllowed(type) {
3008
- return type === "source";
3009
- }
3010
- getHandleAllowedDataType() {
3011
- return 8 /* module */;
3012
- }
2595
+ {
2596
+ position: Position5.Right,
2597
+ dataType: "module" /* module */,
2598
+ connection: "source"
2599
+ }
2600
+ ]
2601
+ };
3013
2602
  };
3014
2603
 
3015
2604
  // src/templates/generators/noise-simplex-template.ts
3016
- import { IDGenerator as IDGenerator6 } from "@awesome-flow/core/utils";
2605
+ import {
2606
+ CoreHandleType as CoreHandleType4
2607
+ } from "@awesome-flow/core/abstract";
3017
2608
  import { Position as Position6 } from "@xyflow/system";
3018
2609
  var NoiseSimplexNodeTemplateFactory = class {
3019
- create() {
3020
- return {
3021
- id: IDGenerator6.template(),
3022
- type: "noise-simplex" /* noiseSimplex */,
3023
- removable: false,
3024
- data: {
3025
- title: "Simplex Noise"
2610
+ template = {
2611
+ type: "noise-simplex" /* noiseSimplex */,
2612
+ group: "Noise Generators" /* noiseGenerators */,
2613
+ data: {
2614
+ title: "Simplex Noise"
2615
+ },
2616
+ handles: [
2617
+ {
2618
+ position: Position6.Left,
2619
+ dataType: CoreHandleType4.variableProperty,
2620
+ connection: "target"
3026
2621
  },
3027
- handles: [
3028
- {
3029
- position: Position6.Left,
3030
- dataType: 16 /* variableProperty */,
3031
- connection: "target"
3032
- },
3033
- {
3034
- position: Position6.Right,
3035
- dataType: 8 /* module */,
3036
- connection: "source"
3037
- }
3038
- ]
3039
- };
3040
- }
3041
- isHandleAllowed(type) {
3042
- return type === "source";
3043
- }
3044
- getHandleAllowedDataType() {
3045
- return 8 /* module */;
3046
- }
2622
+ {
2623
+ position: Position6.Right,
2624
+ dataType: "module" /* module */,
2625
+ connection: "source"
2626
+ }
2627
+ ]
2628
+ };
3047
2629
  };
3048
2630
 
3049
2631
  // src/templates/generators/noise-spheres-template.ts
3050
- import { IDGenerator as IDGenerator7 } from "@awesome-flow/core/utils";
2632
+ import { CoreHandleType as CoreHandleType5 } from "@awesome-flow/core/abstract";
3051
2633
  import { Position as Position7 } from "@xyflow/system";
3052
2634
  var NoiseSpheresNodeTemplateFactory = class {
3053
- create() {
3054
- return {
3055
- id: IDGenerator7.template(),
3056
- type: "noise-spheres" /* noiseSpheres */,
3057
- removable: false,
3058
- data: {
3059
- title: "Spheres Noise",
3060
- frequency: 0.1
2635
+ template = {
2636
+ type: "noise-spheres" /* noiseSpheres */,
2637
+ group: "Noise Generators" /* noiseGenerators */,
2638
+ data: {
2639
+ title: "Spheres Noise",
2640
+ frequency: 0.1
2641
+ },
2642
+ handles: [
2643
+ {
2644
+ position: Position7.Left,
2645
+ dataType: CoreHandleType5.variableProperty,
2646
+ connection: "target"
3061
2647
  },
3062
- handles: [
3063
- {
3064
- position: Position7.Left,
3065
- dataType: 16 /* variableProperty */,
3066
- connection: "target"
3067
- },
3068
- {
3069
- position: Position7.Right,
3070
- dataType: 8 /* module */,
3071
- connection: "source"
3072
- }
3073
- ]
3074
- };
3075
- }
3076
- isHandleAllowed(type) {
3077
- return type === "source";
3078
- }
3079
- getHandleAllowedDataType() {
3080
- return 8 /* module */;
3081
- }
2648
+ {
2649
+ position: Position7.Right,
2650
+ dataType: "module" /* module */,
2651
+ connection: "source"
2652
+ }
2653
+ ]
2654
+ };
3082
2655
  };
3083
2656
 
3084
2657
  // src/templates/generators/noise-voronoi-template.ts
3085
- import { IDGenerator as IDGenerator8 } from "@awesome-flow/core/utils";
2658
+ import { CoreHandleType as CoreHandleType6 } from "@awesome-flow/core/abstract";
3086
2659
  import { Position as Position8 } from "@xyflow/system";
3087
2660
  var NoiseVoronoiNodeTemplateFactory = class {
3088
- create() {
3089
- return {
3090
- id: IDGenerator8.template(),
3091
- type: "noise-voronoi" /* noiseVoronoi */,
3092
- removable: false,
3093
- data: {
3094
- title: "Voronoi Noise",
3095
- frequency: 0.1,
3096
- displacement: 1,
3097
- distance: true,
3098
- seed: 0
2661
+ template = {
2662
+ type: "noise-voronoi" /* noiseVoronoi */,
2663
+ group: "Noise Generators" /* noiseGenerators */,
2664
+ data: {
2665
+ title: "Voronoi Noise",
2666
+ frequency: 0.1,
2667
+ displacement: 1,
2668
+ distance: true,
2669
+ seed: 0
2670
+ },
2671
+ handles: [
2672
+ {
2673
+ position: Position8.Left,
2674
+ dataType: CoreHandleType6.variableProperty,
2675
+ connection: "target"
3099
2676
  },
3100
- handles: [
3101
- {
3102
- position: Position8.Left,
3103
- dataType: 16 /* variableProperty */,
3104
- connection: "target"
3105
- },
3106
- {
3107
- position: Position8.Right,
3108
- dataType: 8 /* module */,
3109
- connection: "source"
3110
- }
3111
- ]
3112
- };
3113
- }
3114
- isHandleAllowed(type) {
3115
- return type === "source";
3116
- }
3117
- getHandleAllowedDataType() {
3118
- return 8 /* module */;
3119
- }
2677
+ {
2678
+ position: Position8.Right,
2679
+ dataType: "module" /* module */,
2680
+ connection: "source"
2681
+ }
2682
+ ]
2683
+ };
3120
2684
  };
3121
2685
 
3122
2686
  // src/templates/generators/position-const-template.ts
3123
- import { IDGenerator as IDGenerator9 } from "@awesome-flow/core/utils";
3124
2687
  import { Position as Position9 } from "@xyflow/system";
3125
2688
  var PositionConstNodeTemplateFactory = class {
3126
- create() {
3127
- return {
3128
- id: IDGenerator9.template(),
3129
- type: "position" /* position */,
3130
- removable: false,
3131
- data: {
3132
- title: "Position Output",
3133
- position: { x: 0, y: 0, z: 0 }
3134
- },
3135
- handles: [
3136
- {
3137
- position: Position9.Right,
3138
- dataType: 4 /* position */,
3139
- connection: "source"
3140
- }
3141
- ]
3142
- };
3143
- }
3144
- isHandleAllowed(type) {
3145
- return type === "source";
3146
- }
3147
- getHandleAllowedDataType(type) {
3148
- return 4 /* position */;
3149
- }
2689
+ template = {
2690
+ type: "position" /* position */,
2691
+ group: "Positions" /* positions */,
2692
+ data: {
2693
+ title: "Position Output",
2694
+ position: { x: 0, y: 0, z: 0 }
2695
+ },
2696
+ handles: [
2697
+ {
2698
+ position: Position9.Right,
2699
+ dataType: "position" /* position */,
2700
+ connection: "source"
2701
+ }
2702
+ ]
2703
+ };
3150
2704
  };
3151
2705
 
3152
2706
  // src/templates/generators/position-grid-template.ts
3153
- import { IDGenerator as IDGenerator10 } from "@awesome-flow/core/utils";
3154
2707
  import { Position as Position10 } from "@xyflow/system";
3155
2708
  var PositionGridNodeTemplateFactory = class {
3156
- create() {
3157
- return {
3158
- id: IDGenerator10.template(),
3159
- type: "grid" /* grid */,
3160
- removable: false,
3161
- data: {
3162
- title: "Grid Output",
3163
- center: { x: 0, y: 0, z: 0 },
3164
- radius: 1
3165
- },
3166
- handles: [
3167
- {
3168
- position: Position10.Right,
3169
- dataType: 4 /* position */,
3170
- connection: "source"
3171
- }
3172
- ]
3173
- };
3174
- }
3175
- isHandleAllowed(type) {
3176
- return type === "source";
3177
- }
3178
- getHandleAllowedDataType(type) {
3179
- return 4 /* position */;
3180
- }
2709
+ template = {
2710
+ type: "grid" /* grid */,
2711
+ group: "Positions" /* positions */,
2712
+ data: {
2713
+ title: "Grid Output",
2714
+ center: { x: 0, y: 0, z: 0 },
2715
+ radius: 1
2716
+ },
2717
+ handles: [
2718
+ {
2719
+ position: Position10.Right,
2720
+ dataType: "position" /* position */,
2721
+ connection: "source"
2722
+ }
2723
+ ]
2724
+ };
3181
2725
  };
3182
2726
 
3183
2727
  // src/templates/modifiers/noise-normalize-template.ts
3184
- import { IDGenerator as IDGenerator11 } from "@awesome-flow/core/utils";
2728
+ import { IDGenerator } from "@awesome-flow/core/utils";
3185
2729
  import { Position as Position11 } from "@xyflow/system";
3186
2730
  var NoiseNormalizeNodeTemplateFactory = class {
3187
- create() {
3188
- return {
3189
- id: IDGenerator11.template(),
3190
- type: "noise-normalize" /* noiseNormalize */,
3191
- data: {
3192
- title: "Normalize Noise",
3193
- intervalStart: -1,
3194
- intervalEnd: 1
2731
+ template = {
2732
+ id: IDGenerator.template(),
2733
+ type: "noise-normalize" /* noiseNormalize */,
2734
+ group: "Noise Modifiers" /* noiseModifiers */,
2735
+ data: {
2736
+ title: "Normalize Noise",
2737
+ intervalStart: -1,
2738
+ intervalEnd: 1
2739
+ },
2740
+ handles: [
2741
+ {
2742
+ position: Position11.Left,
2743
+ dataType: "module" /* module */,
2744
+ connection: "target",
2745
+ maxConnections: 1
3195
2746
  },
3196
- handles: [
3197
- {
3198
- position: Position11.Left,
3199
- dataType: 8 /* module */,
3200
- connection: "target",
3201
- maxConnections: 1
3202
- },
3203
- {
3204
- position: Position11.Right,
3205
- dataType: 8 /* module */,
3206
- connection: "source"
3207
- }
3208
- ]
3209
- };
3210
- }
3211
- isHandleAllowed() {
3212
- return true;
3213
- }
3214
- getHandleAllowedDataType(type) {
3215
- return 8 /* module */;
3216
- }
2747
+ {
2748
+ position: Position11.Right,
2749
+ dataType: "module" /* module */,
2750
+ connection: "source"
2751
+ }
2752
+ ]
2753
+ };
3217
2754
  };
3218
2755
 
3219
2756
  // src/templates/output/noise-logger-template.ts
3220
- import { IDGenerator as IDGenerator12 } from "@awesome-flow/core/utils";
3221
2757
  import { Position as Position12 } from "@xyflow/system";
3222
2758
  var NoiseLoggerNodeTemplateFactory = class {
3223
- create() {
3224
- return {
3225
- id: IDGenerator12.template(),
3226
- type: "noise-logger" /* noiseLogger */,
3227
- removable: false,
3228
- data: {
3229
- title: "Noise Logger"
3230
- },
3231
- handles: [
3232
- {
3233
- position: Position12.Left,
3234
- dataType: 2 /* noise */,
3235
- connection: "target"
3236
- }
3237
- ]
3238
- };
3239
- }
3240
- isHandleAllowed(type) {
3241
- return type === "target";
3242
- }
3243
- getHandleAllowedDataType(type) {
3244
- return 2 /* noise */;
3245
- }
2759
+ template = {
2760
+ type: "noise-logger" /* noiseLogger */,
2761
+ group: "Output" /* output */,
2762
+ data: {
2763
+ title: "Noise Logger"
2764
+ },
2765
+ handles: [
2766
+ {
2767
+ position: Position12.Left,
2768
+ dataType: "noise" /* noise */,
2769
+ connection: "target"
2770
+ }
2771
+ ]
2772
+ };
3246
2773
  };
3247
2774
 
3248
2775
  // src/templates/output/noise-raw-texture-template.ts
3249
- import { IDGenerator as IDGenerator13 } from "@awesome-flow/core/utils";
3250
2776
  import { Position as Position13 } from "@xyflow/system";
3251
2777
  var NoiseRawTextureTemplateFactory = class {
3252
- create() {
3253
- return {
3254
- id: IDGenerator13.template(),
3255
- type: "texture-data" /* textureData */,
3256
- removable: false,
3257
- data: {
3258
- title: "Texture Data"
2778
+ template = {
2779
+ type: "texture-data" /* textureData */,
2780
+ group: "Output" /* output */,
2781
+ data: {
2782
+ title: "Texture Data"
2783
+ },
2784
+ handles: [
2785
+ {
2786
+ position: Position13.Left,
2787
+ dataType: "noise" /* noise */,
2788
+ connection: "target",
2789
+ maxConnections: 1
3259
2790
  },
3260
- handles: [
3261
- {
3262
- position: Position13.Left,
3263
- dataType: 2 /* noise */,
3264
- connection: "target",
3265
- maxConnections: 1
3266
- },
3267
- {
3268
- position: Position13.Right,
3269
- dataType: 1 /* texture */,
3270
- connection: "source"
3271
- }
3272
- ]
3273
- };
3274
- }
3275
- isHandleAllowed() {
3276
- return true;
3277
- }
3278
- getHandleAllowedDataType(type) {
3279
- switch (type) {
3280
- case "source":
3281
- return 1 /* texture */;
3282
- case "target":
3283
- return 2 /* noise */;
3284
- }
3285
- }
2791
+ {
2792
+ position: Position13.Right,
2793
+ dataType: "texture" /* texture */,
2794
+ connection: "source"
2795
+ }
2796
+ ]
2797
+ };
3286
2798
  };
3287
2799
 
3288
2800
  // src/templates/output/position-logger-template.ts
3289
- import { IDGenerator as IDGenerator14 } from "@awesome-flow/core/utils";
3290
2801
  import { Position as Position14 } from "@xyflow/system";
3291
2802
  var PositionLoggerNodeTemplateFactory = class {
3292
- create() {
3293
- return {
3294
- id: IDGenerator14.template(),
3295
- type: "position-logger" /* positionLogger */,
3296
- removable: false,
3297
- data: {
3298
- title: "Position Logger"
3299
- },
3300
- handles: [
3301
- {
3302
- position: Position14.Left,
3303
- dataType: 4 /* position */,
3304
- connection: "target"
3305
- }
3306
- ]
3307
- };
3308
- }
3309
- isHandleAllowed(type) {
3310
- return type === "target";
3311
- }
3312
- getHandleAllowedDataType(type) {
3313
- return 4 /* position */;
3314
- }
2803
+ template = {
2804
+ type: "position-logger" /* positionLogger */,
2805
+ group: "Positions" /* positions */,
2806
+ data: {
2807
+ title: "Position Logger"
2808
+ },
2809
+ handles: [
2810
+ {
2811
+ position: Position14.Left,
2812
+ dataType: "position" /* position */,
2813
+ connection: "target"
2814
+ }
2815
+ ]
2816
+ };
3315
2817
  };
3316
2818
 
3317
2819
  // src/templates/modifiers/noise-combine-template.ts
3318
- import { IDGenerator as IDGenerator15 } from "@awesome-flow/core/utils";
3319
2820
  import { Position as Position15 } from "@xyflow/system";
3320
2821
  var NoiseCombineNodeTemplateFactory = class {
3321
- create() {
3322
- return {
3323
- id: IDGenerator15.template(),
3324
- type: "noise-combiner" /* noiseCombine */,
3325
- removable: false,
3326
- data: {
3327
- title: "Combine Noise",
3328
- operation: "add" /* add */
2822
+ template = {
2823
+ type: "noise-combiner" /* noiseCombine */,
2824
+ group: "Noise Modifiers" /* noiseModifiers */,
2825
+ data: {
2826
+ title: "Combine Noise",
2827
+ operation: "add" /* add */
2828
+ },
2829
+ handles: [
2830
+ {
2831
+ position: Position15.Left,
2832
+ dataType: "module" /* module */,
2833
+ connection: "target",
2834
+ maxConnections: 2
3329
2835
  },
3330
- handles: [
3331
- {
3332
- position: Position15.Left,
3333
- dataType: 8 /* module */,
3334
- connection: "target",
3335
- maxConnections: 2
3336
- },
3337
- {
3338
- position: Position15.Right,
3339
- dataType: 8 /* module */,
3340
- connection: "source"
3341
- }
3342
- ]
3343
- };
3344
- }
3345
- isHandleAllowed() {
3346
- return true;
3347
- }
3348
- getHandleAllowedDataType(type) {
3349
- return 8 /* module */;
3350
- }
2836
+ {
2837
+ position: Position15.Right,
2838
+ dataType: "module" /* module */,
2839
+ connection: "source"
2840
+ }
2841
+ ]
2842
+ };
3351
2843
  };
3352
2844
 
3353
2845
  // src/templates/modifiers/noise-clamp-template.ts
3354
- import { IDGenerator as IDGenerator16 } from "@awesome-flow/core/utils";
3355
2846
  import { Position as Position16 } from "@xyflow/system";
3356
2847
  var NoiseClampNodeTemplateFactory = class {
3357
- create() {
3358
- return {
3359
- id: IDGenerator16.template(),
3360
- type: "noise-clamp" /* noiseClamp */,
3361
- removable: false,
3362
- data: {
3363
- title: "Clamp Noise",
3364
- lowerBound: -1,
3365
- upperBound: 1
2848
+ template = {
2849
+ type: "noise-clamp" /* noiseClamp */,
2850
+ group: "Noise Modifiers" /* noiseModifiers */,
2851
+ data: {
2852
+ title: "Clamp Noise",
2853
+ lowerBound: -1,
2854
+ upperBound: 1
2855
+ },
2856
+ handles: [
2857
+ {
2858
+ position: Position16.Left,
2859
+ dataType: "module" /* module */,
2860
+ connection: "target",
2861
+ maxConnections: 1
3366
2862
  },
3367
- handles: [
3368
- {
3369
- position: Position16.Left,
3370
- dataType: 8 /* module */,
3371
- connection: "target",
3372
- maxConnections: 1
3373
- },
3374
- {
3375
- position: Position16.Right,
3376
- dataType: 8 /* module */,
3377
- connection: "source"
3378
- }
3379
- ]
3380
- };
3381
- }
3382
- isHandleAllowed() {
3383
- return true;
3384
- }
3385
- getHandleAllowedDataType(type) {
3386
- return 8 /* module */;
3387
- }
2863
+ {
2864
+ position: Position16.Right,
2865
+ dataType: "module" /* module */,
2866
+ connection: "source"
2867
+ }
2868
+ ]
2869
+ };
3388
2870
  };
3389
2871
 
3390
2872
  // src/templates/modifiers/noise-abs-template.ts
3391
- import { IDGenerator as IDGenerator17 } from "@awesome-flow/core/utils";
3392
2873
  import { Position as Position17 } from "@xyflow/system";
3393
2874
  var NoiseAbsNodeTemplateFactory = class {
3394
- create() {
3395
- return {
3396
- id: IDGenerator17.template(),
3397
- type: "noise-abs" /* noiseAbs */,
3398
- removable: false,
3399
- data: {
3400
- title: "Abs Noise"
2875
+ template = {
2876
+ type: "noise-abs" /* noiseAbs */,
2877
+ group: "Noise Modifiers" /* noiseModifiers */,
2878
+ data: {
2879
+ title: "Abs Noise"
2880
+ },
2881
+ handles: [
2882
+ {
2883
+ position: Position17.Left,
2884
+ dataType: "module" /* module */,
2885
+ connection: "target",
2886
+ maxConnections: 1
3401
2887
  },
3402
- handles: [
3403
- {
3404
- position: Position17.Left,
3405
- dataType: 8 /* module */,
3406
- connection: "target",
3407
- maxConnections: 1
3408
- },
3409
- {
3410
- position: Position17.Right,
3411
- dataType: 8 /* module */,
3412
- connection: "source"
3413
- }
3414
- ]
3415
- };
3416
- }
3417
- isHandleAllowed() {
3418
- return true;
3419
- }
3420
- getHandleAllowedDataType(type) {
3421
- return 8 /* module */;
3422
- }
2888
+ {
2889
+ position: Position17.Right,
2890
+ dataType: "module" /* module */,
2891
+ connection: "source"
2892
+ }
2893
+ ]
2894
+ };
3423
2895
  };
3424
2896
 
3425
2897
  // src/templates/output/noise-output-template.ts
3426
- import { IDGenerator as IDGenerator18 } from "@awesome-flow/core/utils";
3427
2898
  import { Position as Position18 } from "@xyflow/system";
3428
2899
  var NoiseOutputNodeTemplateFactory = class {
3429
- create() {
3430
- return {
3431
- id: IDGenerator18.template(),
3432
- type: "noise-output" /* noiseOutput */,
3433
- removable: false,
3434
- data: {
3435
- title: "Noise Output"
2900
+ template = {
2901
+ type: "noise-output" /* noiseOutput */,
2902
+ group: "Output" /* output */,
2903
+ data: {
2904
+ title: "Noise Output"
2905
+ },
2906
+ handles: [
2907
+ {
2908
+ position: Position18.Left,
2909
+ dataType: "position" /* position */,
2910
+ connection: "target"
3436
2911
  },
3437
- handles: [
3438
- {
3439
- position: Position18.Left,
3440
- dataType: 4 /* position */,
3441
- connection: "target"
3442
- },
3443
- {
3444
- position: Position18.Left,
3445
- dataType: 8 /* module */,
3446
- connection: "target",
3447
- maxConnections: 1
3448
- },
3449
- {
3450
- position: Position18.Right,
3451
- dataType: 2 /* noise */,
3452
- connection: "source"
3453
- }
3454
- ]
3455
- };
3456
- }
3457
- isHandleAllowed() {
3458
- return true;
3459
- }
3460
- getHandleAllowedDataType(type) {
3461
- switch (type) {
3462
- case "source":
3463
- return 2 /* noise */;
3464
- case "target":
3465
- return 8 /* module */ & 4 /* position */;
3466
- }
3467
- }
2912
+ {
2913
+ position: Position18.Left,
2914
+ dataType: "module" /* module */,
2915
+ connection: "target",
2916
+ maxConnections: 1
2917
+ },
2918
+ {
2919
+ position: Position18.Right,
2920
+ dataType: "noise" /* noise */,
2921
+ connection: "source"
2922
+ }
2923
+ ]
2924
+ };
3468
2925
  };
3469
2926
 
3470
2927
  // src/templates/modifiers/noise-curve-template.ts
3471
- import { IDGenerator as IDGenerator19 } from "@awesome-flow/core/utils";
2928
+ import { CoreHandleType as CoreHandleType7 } from "@awesome-flow/core/abstract";
3472
2929
  import { Position as Position19 } from "@xyflow/system";
3473
2930
  var NoiseCurveNodeTemplateFactory = class {
3474
- create() {
3475
- return {
3476
- id: IDGenerator19.template(),
3477
- type: "noise-curve" /* noiseCurve */,
3478
- removable: false,
3479
- data: {
3480
- title: "Noise Curve",
3481
- points: []
2931
+ template = {
2932
+ type: "noise-curve" /* noiseCurve */,
2933
+ group: "Noise Modifiers" /* noiseModifiers */,
2934
+ data: {
2935
+ title: "Noise Curve",
2936
+ points: []
2937
+ },
2938
+ handles: [
2939
+ {
2940
+ position: Position19.Left,
2941
+ dataType: "module" /* module */,
2942
+ connection: "target",
2943
+ maxConnections: 1
3482
2944
  },
3483
- handles: [
3484
- {
3485
- position: Position19.Left,
3486
- dataType: 8 /* module */,
3487
- connection: "target",
3488
- maxConnections: 1
3489
- },
3490
- {
3491
- position: Position19.Right,
3492
- dataType: 8 /* module */,
3493
- connection: "source"
3494
- }
3495
- ]
3496
- };
3497
- }
3498
- isHandleAllowed() {
3499
- return true;
3500
- }
3501
- getHandleAllowedDataType(type) {
3502
- return 8 /* module */;
3503
- }
2945
+ {
2946
+ position: Position19.Left,
2947
+ dataType: CoreHandleType7.variableProperty,
2948
+ connection: "target"
2949
+ },
2950
+ {
2951
+ position: Position19.Right,
2952
+ dataType: "module" /* module */,
2953
+ connection: "source"
2954
+ }
2955
+ ]
2956
+ };
3504
2957
  };
3505
2958
 
3506
2959
  // src/templates/modifiers/noise-exponent-template.ts
3507
- import { IDGenerator as IDGenerator20 } from "@awesome-flow/core/utils";
3508
2960
  import { Position as Position20 } from "@xyflow/system";
3509
2961
  var NoiseExponentNodeTemplateFactory = class {
3510
- create() {
3511
- return {
3512
- id: IDGenerator20.template(),
3513
- type: "noise-exponent" /* noiseExponent */,
3514
- removable: false,
3515
- data: {
3516
- title: "Noise Exponent",
3517
- exponent: 1
2962
+ template = {
2963
+ type: "noise-exponent" /* noiseExponent */,
2964
+ group: "Noise Modifiers" /* noiseModifiers */,
2965
+ data: {
2966
+ title: "Noise Exponent",
2967
+ exponent: 1
2968
+ },
2969
+ handles: [
2970
+ {
2971
+ position: Position20.Left,
2972
+ dataType: "module" /* module */,
2973
+ connection: "target",
2974
+ maxConnections: 1
3518
2975
  },
3519
- handles: [
3520
- {
3521
- position: Position20.Left,
3522
- dataType: 8 /* module */,
3523
- connection: "target",
3524
- maxConnections: 1
3525
- },
3526
- {
3527
- position: Position20.Right,
3528
- dataType: 8 /* module */,
3529
- connection: "source"
3530
- }
3531
- ]
3532
- };
3533
- }
3534
- isHandleAllowed() {
3535
- return true;
3536
- }
3537
- getHandleAllowedDataType(type) {
3538
- return 8 /* module */;
3539
- }
2976
+ {
2977
+ position: Position20.Right,
2978
+ dataType: "module" /* module */,
2979
+ connection: "source"
2980
+ }
2981
+ ]
2982
+ };
3540
2983
  };
3541
2984
 
3542
2985
  // src/templates/modifiers/noise-invert-template.ts
3543
- import { IDGenerator as IDGenerator21 } from "@awesome-flow/core/utils";
3544
2986
  import { Position as Position21 } from "@xyflow/system";
3545
2987
  var NoiseInvertNodeTemplateFactory = class {
3546
- create() {
3547
- return {
3548
- id: IDGenerator21.template(),
3549
- type: "noise-invert" /* noiseInvert */,
3550
- removable: false,
3551
- data: {
3552
- title: "Invert Noise"
2988
+ template = {
2989
+ type: "noise-invert" /* noiseInvert */,
2990
+ group: "Noise Modifiers" /* noiseModifiers */,
2991
+ data: {
2992
+ title: "Invert Noise"
2993
+ },
2994
+ handles: [
2995
+ {
2996
+ position: Position21.Left,
2997
+ dataType: "module" /* module */,
2998
+ connection: "target",
2999
+ maxConnections: 1
3553
3000
  },
3554
- handles: [
3555
- {
3556
- position: Position21.Left,
3557
- dataType: 8 /* module */,
3558
- connection: "target",
3559
- maxConnections: 1
3560
- },
3561
- {
3562
- position: Position21.Right,
3563
- dataType: 8 /* module */,
3564
- connection: "source"
3565
- }
3566
- ]
3567
- };
3568
- }
3569
- isHandleAllowed() {
3570
- return true;
3571
- }
3572
- getHandleAllowedDataType(type) {
3573
- return 8 /* module */;
3574
- }
3001
+ {
3002
+ position: Position21.Right,
3003
+ dataType: "module" /* module */,
3004
+ connection: "source"
3005
+ }
3006
+ ]
3007
+ };
3575
3008
  };
3576
3009
 
3577
3010
  // src/templates/modifiers/noise-scalebias-template.ts
3578
- import { IDGenerator as IDGenerator22 } from "@awesome-flow/core/utils";
3579
3011
  import { Position as Position22 } from "@xyflow/system";
3580
3012
  var NoiseScaleBiasNodeTemplateFactory = class {
3581
- create() {
3582
- return {
3583
- id: IDGenerator22.template(),
3584
- type: "noise-scale-bias" /* noiseScaleBias */,
3585
- removable: false,
3586
- data: {
3587
- title: "Scale/Bias Noise",
3588
- scale: 1,
3589
- bias: 0
3013
+ template = {
3014
+ type: "noise-scale-bias" /* noiseScaleBias */,
3015
+ group: "Noise Modifiers" /* noiseModifiers */,
3016
+ data: {
3017
+ title: "Scale/Bias Noise",
3018
+ scale: 1,
3019
+ bias: 0
3020
+ },
3021
+ handles: [
3022
+ {
3023
+ position: Position22.Left,
3024
+ dataType: "module" /* module */,
3025
+ connection: "target",
3026
+ maxConnections: 1
3590
3027
  },
3591
- handles: [
3592
- {
3593
- position: Position22.Left,
3594
- dataType: 8 /* module */,
3595
- connection: "target",
3596
- maxConnections: 1
3597
- },
3598
- {
3599
- position: Position22.Right,
3600
- dataType: 8 /* module */,
3601
- connection: "source"
3602
- }
3603
- ]
3604
- };
3605
- }
3606
- isHandleAllowed() {
3607
- return true;
3608
- }
3609
- getHandleAllowedDataType(type) {
3610
- return 8 /* module */;
3611
- }
3028
+ {
3029
+ position: Position22.Right,
3030
+ dataType: "module" /* module */,
3031
+ connection: "source"
3032
+ }
3033
+ ]
3034
+ };
3612
3035
  };
3613
3036
 
3614
3037
  // src/templates/modifiers/noise-terrace-template.ts
3615
- import { IDGenerator as IDGenerator23 } from "@awesome-flow/core/utils";
3616
3038
  import { Position as Position23 } from "@xyflow/system";
3617
3039
  var NoiseTerraceNodeTemplateFactory = class {
3618
- create() {
3619
- return {
3620
- id: IDGenerator23.template(),
3621
- type: "noise-terrace" /* noiseTerrace */,
3622
- removable: false,
3623
- data: {
3624
- title: "Noise Terrace",
3625
- points: []
3040
+ template = {
3041
+ type: "noise-terrace" /* noiseTerrace */,
3042
+ group: "Noise Modifiers" /* noiseModifiers */,
3043
+ data: {
3044
+ title: "Noise Terrace",
3045
+ points: []
3046
+ },
3047
+ handles: [
3048
+ {
3049
+ position: Position23.Left,
3050
+ dataType: "module" /* module */,
3051
+ connection: "target",
3052
+ maxConnections: 1
3626
3053
  },
3627
- handles: [
3628
- {
3629
- position: Position23.Left,
3630
- dataType: 8 /* module */,
3631
- connection: "target",
3632
- maxConnections: 1
3633
- },
3634
- {
3635
- position: Position23.Right,
3636
- dataType: 8 /* module */,
3637
- connection: "source"
3638
- }
3639
- ]
3640
- };
3641
- }
3642
- isHandleAllowed() {
3643
- return true;
3644
- }
3645
- getHandleAllowedDataType(type) {
3646
- return 8 /* module */;
3647
- }
3054
+ {
3055
+ position: Position23.Right,
3056
+ dataType: "module" /* module */,
3057
+ connection: "source"
3058
+ }
3059
+ ]
3060
+ };
3648
3061
  };
3649
3062
 
3650
3063
  // src/templates/selectors/noise-blend-template.ts
3651
- import { IDGenerator as IDGenerator24 } from "@awesome-flow/core/utils";
3652
- import { Position as Position24 } from "@xyflow/system";
3653
- var NoiseBlendNodeTemplateFactory = class {
3654
- create() {
3655
- return {
3656
- id: IDGenerator24.template(),
3657
- type: "noise-blend" /* noiseBlend */,
3658
- removable: false,
3659
- data: {
3660
- title: "Noise Blend"
3661
- },
3662
- handles: [
3663
- {
3664
- position: Position24.Left,
3665
- dataType: 8 /* module */,
3666
- connection: "target",
3667
- label: "Source Modules",
3668
- maxConnections: 2
3669
- },
3670
- {
3671
- position: Position24.Left,
3672
- dataType: 8 /* module */,
3673
- connection: "target",
3674
- label: "Control Module",
3675
- maxConnections: 1
3676
- },
3677
- {
3678
- position: Position24.Right,
3679
- dataType: 8 /* module */,
3680
- connection: "source"
3681
- }
3682
- ]
3683
- };
3684
- }
3685
- isHandleAllowed() {
3686
- return true;
3687
- }
3688
- getHandleAllowedDataType() {
3689
- return 8 /* module */;
3690
- }
3064
+ import { Position as Position24 } from "@xyflow/system";
3065
+ var NoiseBlendNodeTemplateFactory = class {
3066
+ template = {
3067
+ type: "noise-blend" /* noiseBlend */,
3068
+ group: "Noise Selectors" /* noiseSelectors */,
3069
+ data: {
3070
+ title: "Noise Blend"
3071
+ },
3072
+ handles: [
3073
+ {
3074
+ position: Position24.Left,
3075
+ dataType: "module" /* module */,
3076
+ connection: "target",
3077
+ label: "Source Modules",
3078
+ dataId: "source" /* source */,
3079
+ maxConnections: 2,
3080
+ minConnections: 2
3081
+ },
3082
+ {
3083
+ position: Position24.Left,
3084
+ dataType: "module" /* module */,
3085
+ dataId: "control" /* control */,
3086
+ connection: "target",
3087
+ label: "Control Module",
3088
+ maxConnections: 1
3089
+ },
3090
+ {
3091
+ position: Position24.Right,
3092
+ dataType: "module" /* module */,
3093
+ dataId: "output" /* output */,
3094
+ connection: "source"
3095
+ }
3096
+ ]
3097
+ };
3691
3098
  };
3692
3099
 
3693
3100
  // src/templates/selectors/noise-select-template.ts
3694
- import { IDGenerator as IDGenerator25 } from "@awesome-flow/core/utils";
3695
3101
  import { Position as Position25 } from "@xyflow/system";
3696
3102
  var NoiseSelectNodeTemplateFactory = class {
3697
- create() {
3698
- return {
3699
- id: IDGenerator25.template(),
3700
- type: "noise-select" /* noiseSelect */,
3701
- removable: false,
3702
- data: {
3703
- title: "Noise Select",
3704
- edgeFalloff: 0,
3705
- lowerBound: -1,
3706
- upperBound: 1
3103
+ template = {
3104
+ type: "noise-select" /* noiseSelect */,
3105
+ group: "Noise Selectors" /* noiseSelectors */,
3106
+ data: {
3107
+ title: "Noise Select",
3108
+ edgeFalloff: 0,
3109
+ lowerBound: -1,
3110
+ upperBound: 1
3111
+ },
3112
+ handles: [
3113
+ {
3114
+ position: Position25.Left,
3115
+ dataType: "module" /* module */,
3116
+ dataId: "source" /* source */,
3117
+ connection: "target",
3118
+ label: "Source Modules",
3119
+ maxConnections: 2,
3120
+ minConnections: 2
3707
3121
  },
3708
- handles: [
3709
- {
3710
- position: Position25.Left,
3711
- dataType: 8 /* module */,
3712
- connection: "target",
3713
- label: "Source Modules",
3714
- maxConnections: 2
3715
- },
3716
- {
3717
- position: Position25.Left,
3718
- dataType: 8 /* module */,
3719
- connection: "target",
3720
- label: "Control Module",
3721
- maxConnections: 1
3722
- },
3723
- {
3724
- position: Position25.Right,
3725
- dataType: 8 /* module */,
3726
- connection: "source"
3727
- }
3728
- ]
3729
- };
3730
- }
3731
- isHandleAllowed() {
3732
- return true;
3733
- }
3734
- getHandleAllowedDataType() {
3735
- return 8 /* module */;
3736
- }
3122
+ {
3123
+ position: Position25.Left,
3124
+ dataType: "module" /* module */,
3125
+ dataId: "control" /* control */,
3126
+ connection: "target",
3127
+ label: "Control Module",
3128
+ maxConnections: 1
3129
+ },
3130
+ {
3131
+ position: Position25.Right,
3132
+ dataType: "module" /* module */,
3133
+ dataId: "output" /* output */,
3134
+ connection: "source"
3135
+ }
3136
+ ]
3137
+ };
3737
3138
  };
3738
3139
 
3739
3140
  // src/templates/transformers/noise-displace-template.ts
3740
- import { IDGenerator as IDGenerator26 } from "@awesome-flow/core/utils";
3741
3141
  import { Position as Position26 } from "@xyflow/system";
3742
3142
  var NoiseDisplaceNodeTemplateFactory = class {
3743
- create() {
3744
- return {
3745
- id: IDGenerator26.template(),
3746
- type: "noise-displace" /* noiseDisplace */,
3747
- data: {
3748
- title: "Noise Displace"
3143
+ template = {
3144
+ type: "noise-displace" /* noiseDisplace */,
3145
+ group: "Noise Transformers" /* noiseTransformers */,
3146
+ data: {
3147
+ title: "Noise Displace"
3148
+ },
3149
+ handles: [
3150
+ {
3151
+ position: Position26.Left,
3152
+ connection: "target",
3153
+ label: "Source Module",
3154
+ dataType: "module" /* module */,
3155
+ dataId: "source" /* sourceModule */,
3156
+ maxConnections: 1
3749
3157
  },
3750
- handles: [
3751
- {
3752
- position: Position26.Left,
3753
- connection: "target",
3754
- label: "Source Module",
3755
- dataType: 8 /* module */,
3756
- dataId: "source" /* sourceModule */,
3757
- maxConnections: 1
3758
- },
3759
- {
3760
- position: Position26.Left,
3761
- connection: "target",
3762
- label: "X Module",
3763
- dataType: 8 /* module */,
3764
- dataId: "x-module" /* xModule */,
3765
- maxConnections: 1
3766
- },
3767
- {
3768
- position: Position26.Left,
3769
- connection: "target",
3770
- label: "Y Module",
3771
- dataType: 8 /* module */,
3772
- dataId: "y-module" /* yModule */,
3773
- maxConnections: 1
3774
- },
3775
- {
3776
- position: Position26.Left,
3777
- connection: "target",
3778
- label: "Z Module",
3779
- dataType: 8 /* module */,
3780
- dataId: "z-module" /* zModule */,
3781
- maxConnections: 1
3782
- },
3783
- {
3784
- position: Position26.Right,
3785
- dataType: 8 /* module */,
3786
- dataId: "output" /* output */,
3787
- connection: "source"
3788
- }
3789
- ]
3790
- };
3791
- }
3792
- isHandleAllowed() {
3793
- return true;
3794
- }
3795
- getHandleAllowedDataType() {
3796
- return 8 /* module */;
3797
- }
3158
+ {
3159
+ position: Position26.Left,
3160
+ connection: "target",
3161
+ label: "X Module",
3162
+ dataType: "module" /* module */,
3163
+ dataId: "x-module" /* xModule */,
3164
+ maxConnections: 1
3165
+ },
3166
+ {
3167
+ position: Position26.Left,
3168
+ connection: "target",
3169
+ label: "Y Module",
3170
+ dataType: "module" /* module */,
3171
+ dataId: "y-module" /* yModule */,
3172
+ maxConnections: 1
3173
+ },
3174
+ {
3175
+ position: Position26.Left,
3176
+ connection: "target",
3177
+ label: "Z Module",
3178
+ dataType: "module" /* module */,
3179
+ dataId: "z-module" /* zModule */,
3180
+ maxConnections: 1
3181
+ },
3182
+ {
3183
+ position: Position26.Right,
3184
+ dataType: "module" /* module */,
3185
+ dataId: "output" /* output */,
3186
+ connection: "source"
3187
+ }
3188
+ ]
3189
+ };
3798
3190
  };
3799
3191
 
3800
3192
  // src/templates/transformers/noise-rotate-point-template.ts
3801
- import { IDGenerator as IDGenerator27 } from "@awesome-flow/core/utils";
3802
3193
  import { Position as Position27 } from "@xyflow/system";
3803
3194
  var NoiseRotatePointNodeTemplateFactory = class {
3804
- create() {
3805
- return {
3806
- id: IDGenerator27.template(),
3807
- type: "noise-rotate-point" /* noiseRotatePoint */,
3808
- removable: false,
3809
- data: {
3810
- title: "Noise Rotate Point",
3811
- xAngle: 0,
3812
- yAngle: 0,
3813
- zAngle: 0
3195
+ template = {
3196
+ type: "noise-rotate-point" /* noiseRotatePoint */,
3197
+ group: "Noise Transformers" /* noiseTransformers */,
3198
+ data: {
3199
+ title: "Noise Rotate Point",
3200
+ xAngle: 0,
3201
+ yAngle: 0,
3202
+ zAngle: 0
3203
+ },
3204
+ handles: [
3205
+ {
3206
+ position: Position27.Left,
3207
+ dataType: "module" /* module */,
3208
+ connection: "target",
3209
+ label: "Source Module",
3210
+ maxConnections: 1
3814
3211
  },
3815
- handles: [
3816
- {
3817
- position: Position27.Left,
3818
- dataType: 8 /* module */,
3819
- connection: "target",
3820
- label: "Source Module",
3821
- maxConnections: 1
3822
- },
3823
- {
3824
- position: Position27.Right,
3825
- dataType: 8 /* module */,
3826
- connection: "source"
3827
- }
3828
- ]
3829
- };
3830
- }
3831
- isHandleAllowed() {
3832
- return true;
3833
- }
3834
- getHandleAllowedDataType() {
3835
- return 8 /* module */;
3836
- }
3212
+ {
3213
+ position: Position27.Right,
3214
+ dataType: "module" /* module */,
3215
+ connection: "source"
3216
+ }
3217
+ ]
3218
+ };
3837
3219
  };
3838
3220
 
3839
3221
  // src/templates/transformers/noise-scale-point-template.ts
3840
- import { IDGenerator as IDGenerator28 } from "@awesome-flow/core/utils";
3841
3222
  import { Position as Position28 } from "@xyflow/system";
3842
3223
  var NoiseScalePointNodeTemplateFactory = class {
3843
- create() {
3844
- return {
3845
- id: IDGenerator28.template(),
3846
- type: "noise-scale-point" /* noiseScalePoint */,
3847
- data: {
3848
- title: "Noise Scale Point",
3849
- xScale: 1,
3850
- yScale: 1,
3851
- zScale: 1
3224
+ template = {
3225
+ type: "noise-scale-point" /* noiseScalePoint */,
3226
+ group: "Noise Transformers" /* noiseTransformers */,
3227
+ data: {
3228
+ title: "Noise Scale Point",
3229
+ xScale: 1,
3230
+ yScale: 1,
3231
+ zScale: 1
3232
+ },
3233
+ handles: [
3234
+ {
3235
+ position: Position28.Left,
3236
+ dataType: "module" /* module */,
3237
+ connection: "target",
3238
+ label: "Source Module",
3239
+ maxConnections: 1
3852
3240
  },
3853
- handles: [
3854
- {
3855
- position: Position28.Left,
3856
- dataType: 8 /* module */,
3857
- connection: "target",
3858
- label: "Source Module",
3859
- maxConnections: 1
3860
- },
3861
- {
3862
- position: Position28.Right,
3863
- dataType: 8 /* module */,
3864
- connection: "source"
3865
- }
3866
- ]
3867
- };
3868
- }
3869
- isHandleAllowed() {
3870
- return true;
3871
- }
3872
- getHandleAllowedDataType() {
3873
- return 8 /* module */;
3874
- }
3241
+ {
3242
+ position: Position28.Right,
3243
+ dataType: "module" /* module */,
3244
+ connection: "source"
3245
+ }
3246
+ ]
3247
+ };
3875
3248
  };
3876
3249
 
3877
3250
  // src/templates/transformers/noise-translate-point-template.ts
3878
- import { IDGenerator as IDGenerator29 } from "@awesome-flow/core/utils";
3879
3251
  import { Position as Position29 } from "@xyflow/system";
3880
3252
  var NoiseTranslatePointNodeTemplateFactory = class {
3881
- create() {
3882
- return {
3883
- id: IDGenerator29.template(),
3884
- type: "noise-translate-point" /* noiseTranslatePoint */,
3885
- data: {
3886
- title: "Noise Translate Point",
3887
- translateX: 0,
3888
- translateY: 0,
3889
- translateZ: 0
3253
+ template = {
3254
+ type: "noise-translate-point" /* noiseTranslatePoint */,
3255
+ group: "Noise Transformers" /* noiseTransformers */,
3256
+ data: {
3257
+ title: "Noise Translate Point",
3258
+ translateX: 0,
3259
+ translateY: 0,
3260
+ translateZ: 0
3261
+ },
3262
+ handles: [
3263
+ {
3264
+ position: Position29.Left,
3265
+ dataType: "module" /* module */,
3266
+ connection: "target",
3267
+ label: "Source Module",
3268
+ maxConnections: 1
3890
3269
  },
3891
- handles: [
3892
- {
3893
- position: Position29.Left,
3894
- dataType: 8 /* module */,
3895
- connection: "target",
3896
- label: "Source Module",
3897
- maxConnections: 1
3898
- },
3899
- {
3900
- position: Position29.Right,
3901
- dataType: 8 /* module */,
3902
- connection: "source"
3903
- }
3904
- ]
3905
- };
3906
- }
3907
- isHandleAllowed() {
3908
- return true;
3909
- }
3910
- getHandleAllowedDataType() {
3911
- return 8 /* module */;
3912
- }
3270
+ {
3271
+ position: Position29.Right,
3272
+ dataType: "module" /* module */,
3273
+ connection: "source"
3274
+ }
3275
+ ]
3276
+ };
3913
3277
  };
3914
3278
 
3915
3279
  // src/templates/transformers/noise-turbulence-template.ts
3916
- import { IDGenerator as IDGenerator30 } from "@awesome-flow/core/utils";
3280
+ import { CoreHandleType as CoreHandleType8 } from "@awesome-flow/core/abstract";
3917
3281
  import { Position as Position30 } from "@xyflow/system";
3918
3282
  var NoiseTurbulenceNodeTemplateFactory = class {
3919
- create() {
3920
- return {
3921
- id: IDGenerator30.template(),
3922
- type: "noise-turbulence" /* noiseTurbulence */,
3923
- data: {
3924
- title: "Noise Turbulence",
3925
- frequency: 1,
3926
- power: 1,
3927
- roughness: 1,
3928
- seed: 0
3283
+ template = {
3284
+ type: "noise-turbulence" /* noiseTurbulence */,
3285
+ group: "Noise Transformers" /* noiseTransformers */,
3286
+ data: {
3287
+ title: "Noise Turbulence",
3288
+ frequency: 1,
3289
+ power: 1,
3290
+ roughness: 1,
3291
+ seed: 0
3292
+ },
3293
+ handles: [
3294
+ {
3295
+ position: Position30.Left,
3296
+ dataType: "module" /* module */,
3297
+ connection: "target",
3298
+ label: "Source Module",
3299
+ maxConnections: 1
3929
3300
  },
3930
- handles: [
3931
- {
3932
- position: Position30.Left,
3933
- dataType: 8 /* module */,
3934
- connection: "target",
3935
- label: "Source Module",
3936
- maxConnections: 1
3937
- },
3938
- {
3939
- position: Position30.Left,
3940
- dataType: 16 /* variableProperty */,
3941
- label: "Variable Properties",
3942
- connection: "target"
3943
- },
3944
- {
3945
- position: Position30.Right,
3946
- dataType: 8 /* module */,
3947
- connection: "source"
3948
- }
3949
- ]
3950
- };
3951
- }
3952
- isHandleAllowed() {
3953
- return true;
3954
- }
3955
- getHandleAllowedDataType() {
3956
- return 8 /* module */;
3957
- }
3301
+ {
3302
+ position: Position30.Left,
3303
+ dataType: CoreHandleType8.variableProperty,
3304
+ label: "Variable Properties",
3305
+ connection: "target"
3306
+ },
3307
+ {
3308
+ position: Position30.Right,
3309
+ dataType: "module" /* module */,
3310
+ connection: "source"
3311
+ }
3312
+ ]
3313
+ };
3958
3314
  };
3959
3315
 
3960
- // src/templates/generators/variable-property-template.ts
3961
- import { IDGenerator as IDGenerator31 } from "@awesome-flow/core/utils";
3316
+ // src/templates/generators/noise-billow-template.ts
3317
+ import { CoreHandleType as CoreHandleType9 } from "@awesome-flow/core/abstract";
3318
+ import { IDGenerator as IDGenerator2 } from "@awesome-flow/core/utils";
3962
3319
  import { Position as Position31 } from "@xyflow/system";
3963
- var VariablePropertyNodeTemplateFactory = class {
3964
- create() {
3965
- return {
3966
- id: IDGenerator31.template(),
3967
- type: "variable-property" /* variableProperty */,
3968
- data: {
3969
- title: "Variable Property",
3970
- property: null
3320
+ var NoiseBillowNodeTemplateFactory = class {
3321
+ template = {
3322
+ id: IDGenerator2.template(),
3323
+ type: "noise-billow" /* noiseBillow */,
3324
+ group: "Noise Generators" /* noiseGenerators */,
3325
+ data: {
3326
+ title: "Billow Noise",
3327
+ frequency: 0.1,
3328
+ lacunarity: 2,
3329
+ octaves: 5,
3330
+ persistence: 0.5,
3331
+ seed: 0
3332
+ },
3333
+ handles: [
3334
+ {
3335
+ position: Position31.Left,
3336
+ dataType: CoreHandleType9.variableProperty,
3337
+ connection: "target"
3971
3338
  },
3972
- handles: [
3973
- {
3974
- position: Position31.Left,
3975
- dataType: 32 /* variableValue */,
3976
- connection: "target",
3977
- maxConnections: 1
3978
- },
3979
- {
3980
- position: Position31.Right,
3981
- dataType: 16 /* variableProperty */,
3982
- connection: "source"
3983
- }
3984
- ]
3985
- };
3986
- }
3987
- isHandleAllowed(type) {
3988
- return true;
3989
- }
3990
- getHandleAllowedDataType(type) {
3991
- switch (type) {
3992
- case "source":
3993
- return 16 /* variableProperty */;
3994
- case "target":
3995
- return 32 /* variableValue */;
3996
- }
3997
- }
3339
+ {
3340
+ position: Position31.Right,
3341
+ dataType: "module" /* module */,
3342
+ connection: "source"
3343
+ }
3344
+ ]
3345
+ };
3998
3346
  };
3999
3347
 
4000
- // src/templates/modifiers/variable-combine-template.ts
4001
- import { IDGenerator as IDGenerator32 } from "@awesome-flow/core/utils";
3348
+ // src/templates/groups/module-group-template.ts
3349
+ import {
3350
+ CoreTemplateGroup
3351
+ } from "@awesome-flow/core/abstract";
3352
+ import { IDGenerator as IDGenerator3 } from "@awesome-flow/core/utils";
4002
3353
  import { Position as Position32 } from "@xyflow/system";
4003
- var VariableCombineNodeTemplateFactory = class {
4004
- create() {
4005
- return {
4006
- id: IDGenerator32.template(),
4007
- type: "variable-combine" /* variableCombine */,
4008
- removable: false,
4009
- data: {
4010
- title: "Combine Values",
4011
- operation: "add" /* add */,
4012
- value: null
3354
+ var ModuleGroupNodeTemplateFactory = class {
3355
+ template = {
3356
+ id: IDGenerator3.template(),
3357
+ type: "group-module" /* groupModule */,
3358
+ group: CoreTemplateGroup.groups,
3359
+ data: {
3360
+ title: "Modules Group",
3361
+ isGroup: true,
3362
+ initialSize: {
3363
+ width: 300,
3364
+ height: 200
4013
3365
  },
4014
- handles: [
4015
- {
4016
- position: Position32.Left,
4017
- dataType: 32 /* variableValue */,
4018
- connection: "target"
4019
- },
4020
- {
4021
- position: Position32.Right,
4022
- dataType: 32 /* variableValue */,
4023
- connection: "source"
4024
- }
4025
- ]
4026
- };
4027
- }
4028
- isHandleAllowed() {
4029
- return true;
4030
- }
4031
- getHandleAllowedDataType(type) {
4032
- return 8 /* module */;
4033
- }
4034
- };
4035
-
4036
- // src/templates/generators/variable-value-template.ts
4037
- import { IDGenerator as IDGenerator33 } from "@awesome-flow/core/utils";
4038
- import { Position as Position33 } from "@xyflow/system";
4039
- var VariableValueNodeTemplateFactory = class {
4040
- create() {
4041
- return {
4042
- id: IDGenerator33.template(),
4043
- type: "variable-value" /* variableValue */,
4044
- data: {
4045
- title: "Variable Value",
4046
- value: null
3366
+ collapsedSize: {
3367
+ width: 300,
3368
+ height: 80
3369
+ }
3370
+ },
3371
+ handles: [
3372
+ {
3373
+ position: Position32.Bottom,
3374
+ dataType: "module" /* module */,
3375
+ connection: "target",
3376
+ maxConnections: 1,
3377
+ hideOnCollapse: true
4047
3378
  },
4048
- handles: [
4049
- {
4050
- position: Position33.Right,
4051
- dataType: 32 /* variableValue */,
4052
- connection: "source"
4053
- }
4054
- ]
4055
- };
4056
- }
4057
- isHandleAllowed(type) {
4058
- return type === "source";
4059
- }
4060
- getHandleAllowedDataType(type) {
4061
- return 32 /* variableValue */;
4062
- }
3379
+ {
3380
+ position: Position32.Right,
3381
+ dataType: "module" /* module */,
3382
+ connection: "source"
3383
+ }
3384
+ ]
3385
+ };
4063
3386
  };
4064
3387
 
4065
- // src/templates/groups/module-group-template.ts
4066
- import { IDGenerator as IDGenerator34 } from "@awesome-flow/core/utils";
4067
- import { Position as Position34 } from "@xyflow/system";
4068
- var ModuleGroupNodeTemplateFactory = class {
4069
- create() {
3388
+ // src/nodes/groups/module-group-node.tsx
3389
+ import { NodeContainer as NodeContainer32, NodeCollapse, NodeTrackConnections as NodeTrackConnections27 } from "@awesome-flow/core/layout";
3390
+ import { NodeResizer, useStore, useUpdateNodeInternals } from "@xyflow/react";
3391
+ import { FlowContext } from "@awesome-flow/core/abstract";
3392
+ import { useCallback as useCallback21, useContext, useEffect as useEffect23, useMemo as useMemo12 } from "react";
3393
+ import { shallow } from "zustand/shallow";
3394
+ import { Badge, Group as Group15 } from "@mantine/core";
3395
+ import { useIncomingComputedData as useIncomingComputedData17, useUpdateNodeComputedData as useUpdateNodeComputedData30 } from "@awesome-flow/core/hooks";
3396
+ import { jsx as jsx32, jsxs as jsxs28 } from "react/jsx-runtime";
3397
+ function ModuleGroupNode({
3398
+ id,
3399
+ selected,
3400
+ data,
3401
+ type,
3402
+ width,
3403
+ height
3404
+ }) {
3405
+ const context = useContext(FlowContext);
3406
+ const updateNodeInternals = useUpdateNodeInternals();
3407
+ const triggerNodeChanges = useStore((s) => s.triggerNodeChanges);
3408
+ const { groupNodes, setGroupCollapsed } = context.useFlowStore(
3409
+ useCallback21(
3410
+ (state) => ({ groupNodes: state.groups[id], setGroupCollapsed: state.setGroupCollapsed }),
3411
+ []
3412
+ )
3413
+ );
3414
+ const intersectingNode = context.useInteractivityStore(
3415
+ useCallback21((state) => state.nodeIntersectionTargets[id], [id]),
3416
+ shallow
3417
+ );
3418
+ useEffect23(() => {
3419
+ updateNodeInternals(id);
3420
+ }, [width, height]);
3421
+ useEffect23(() => {
3422
+ triggerNodeChanges([
3423
+ {
3424
+ id,
3425
+ type: "select",
3426
+ selected: !!intersectingNode
3427
+ }
3428
+ ]);
3429
+ }, [intersectingNode]);
3430
+ const onCollapsed = useCallback21((collapsed) => {
3431
+ setGroupCollapsed(id, collapsed);
3432
+ }, []);
3433
+ const size = useMemo12(() => {
4070
3434
  return {
4071
- id: IDGenerator34.template(),
4072
- type: "group-module" /* groupModule */,
4073
- data: {
4074
- title: "Modules Group",
4075
- isGroup: true,
4076
- initialSize: {
4077
- width: 300,
4078
- height: 200
4079
- },
4080
- collapsedSize: {
4081
- width: 300,
4082
- height: 80
4083
- }
4084
- },
4085
- handles: [
4086
- {
4087
- position: Position34.Bottom,
4088
- dataType: 8 /* module */,
4089
- connection: "target",
4090
- maxConnections: 1,
4091
- hideOnCollapse: true
4092
- },
4093
- {
4094
- position: Position34.Right,
4095
- dataType: 8 /* module */,
4096
- connection: "source"
4097
- }
4098
- ]
3435
+ width: data.initialSize?.width || 100,
3436
+ height: data.initialSize?.height || 50
4099
3437
  };
4100
- }
4101
- isHandleAllowed(type) {
4102
- return true;
4103
- }
4104
- getHandleAllowedDataType(type) {
4105
- return 8 /* module */;
4106
- }
4107
- };
4108
-
4109
- // src/templates/generators/noise-billow-template.ts
4110
- import { IDGenerator as IDGenerator35 } from "@awesome-flow/core/utils";
4111
- import { Position as Position35 } from "@xyflow/system";
4112
- var NoiseBillowNodeTemplateFactory = class {
4113
- create() {
4114
- return {
4115
- id: IDGenerator35.template(),
4116
- type: "noise-billow" /* noiseBillow */,
4117
- removable: false,
4118
- data: {
4119
- title: "Billow Noise",
4120
- frequency: 0.1,
4121
- lacunarity: 2,
4122
- octaves: 5,
4123
- persistence: 0.5,
4124
- seed: 0
4125
- },
4126
- handles: [
4127
- {
4128
- position: Position35.Left,
4129
- dataType: 16 /* variableProperty */,
4130
- connection: "target"
4131
- },
4132
- {
4133
- position: Position35.Right,
4134
- dataType: 8 /* module */,
4135
- connection: "source"
4136
- }
3438
+ }, [data.initialSize]);
3439
+ const incomingModules = useIncomingComputedData17(id);
3440
+ const updateComputedData = useUpdateNodeComputedData30();
3441
+ useEffect23(() => {
3442
+ if (incomingModules?.length) {
3443
+ const { module } = incomingModules[0];
3444
+ updateComputedData(id, { module });
3445
+ }
3446
+ }, [incomingModules]);
3447
+ return /* @__PURE__ */ jsxs28(
3448
+ NodeContainer32,
3449
+ {
3450
+ id,
3451
+ selected,
3452
+ data,
3453
+ title: /* @__PURE__ */ jsx32(Group15, { justify: "space-between", children: /* @__PURE__ */ jsxs28(Group15, { gap: "xs", children: [
3454
+ /* @__PURE__ */ jsx32(Badge, { size: "xs", variant: "outline", radius: "xs", color: "gray", children: groupNodes?.length || 0 }),
3455
+ /* @__PURE__ */ jsx32(NodeCollapse, { nodeId: id, isCollapsed: data.isCollapsed, onCollapsed })
3456
+ ] }) }),
3457
+ type,
3458
+ children: [
3459
+ /* @__PURE__ */ jsx32(
3460
+ NodeResizer,
3461
+ {
3462
+ nodeId: id,
3463
+ minWidth: size.width,
3464
+ minHeight: size.height,
3465
+ isVisible: selected && !data.isCollapsed
3466
+ }
3467
+ ),
3468
+ /* @__PURE__ */ jsx32(NodeTrackConnections27, { handles: data.handles, nodeId: id, type: "target" })
4137
3469
  ]
4138
- };
4139
- }
4140
- isHandleAllowed(type) {
4141
- return type === "source";
4142
- }
4143
- getHandleAllowedDataType() {
4144
- return 8 /* module */;
4145
- }
4146
- };
3470
+ }
3471
+ );
3472
+ }
3473
+ var module_group_node_default = ModuleGroupNode;
4147
3474
 
4148
3475
  // src/abstract/node-types.ts
4149
3476
  var NoiseNodeType = /* @__PURE__ */ ((NoiseNodeType2) => {
4150
3477
  NoiseNodeType2["position"] = "position";
4151
3478
  NoiseNodeType2["grid"] = "grid";
3479
+ NoiseNodeType2["textureData"] = "texture-data";
3480
+ NoiseNodeType2["groupModule"] = "group-module";
3481
+ NoiseNodeType2["positionLogger"] = "position-logger";
3482
+ NoiseNodeType2["noiseLogger"] = "noise-logger";
4152
3483
  NoiseNodeType2["noiseOutput"] = "noise-output";
4153
3484
  NoiseNodeType2["noiseConst"] = "noise-constant";
4154
3485
  NoiseNodeType2["noiseSimplex"] = "noise-simplex";
@@ -4160,9 +3491,6 @@ var NoiseNodeType = /* @__PURE__ */ ((NoiseNodeType2) => {
4160
3491
  NoiseNodeType2["noiseRidgedMulti"] = "noise-ridged-multi";
4161
3492
  NoiseNodeType2["noiseSpheres"] = "noise-spheres";
4162
3493
  NoiseNodeType2["noiseVoronoi"] = "noise-voronoi";
4163
- NoiseNodeType2["textureData"] = "texture-data";
4164
- NoiseNodeType2["noiseLogger"] = "noise-logger";
4165
- NoiseNodeType2["positionLogger"] = "position-logger";
4166
3494
  NoiseNodeType2["noiseCombine"] = "noise-combiner";
4167
3495
  NoiseNodeType2["noiseClamp"] = "noise-clamp";
4168
3496
  NoiseNodeType2["noiseAbs"] = "noise-abs";
@@ -4178,17 +3506,10 @@ var NoiseNodeType = /* @__PURE__ */ ((NoiseNodeType2) => {
4178
3506
  NoiseNodeType2["noiseScalePoint"] = "noise-scale-point";
4179
3507
  NoiseNodeType2["noiseTranslatePoint"] = "noise-translate-point";
4180
3508
  NoiseNodeType2["noiseTurbulence"] = "noise-turbulence";
4181
- NoiseNodeType2["variableProperty"] = "variable-property";
4182
- NoiseNodeType2["variableValue"] = "variable-value";
4183
- NoiseNodeType2["variableCombine"] = "variable-combine";
4184
- NoiseNodeType2["groupModule"] = "group-module";
4185
3509
  return NoiseNodeType2;
4186
3510
  })(NoiseNodeType || {});
4187
3511
  var noiseNodeTypes = {
4188
- ["variable-value" /* variableValue */]: variable_value_node_default,
4189
- ["variable-property" /* variableProperty */]: variable_property_node_default,
4190
- ["variable-combine" /* variableCombine */]: variable_combine_node_default,
4191
- ["group-module" /* groupModule */]: node_module_group_default,
3512
+ ["group-module" /* groupModule */]: module_group_node_default,
4192
3513
  ["position" /* position */]: position_const_node_default,
4193
3514
  ["grid" /* grid */]: position_grid_node_default,
4194
3515
  ["noise-output" /* noiseOutput */]: noise_output_node_default,
@@ -4253,17 +3574,15 @@ var noiseNodeTemplates = {
4253
3574
  ["noise-scale-point" /* noiseScalePoint */]: new NoiseScalePointNodeTemplateFactory(),
4254
3575
  ["noise-translate-point" /* noiseTranslatePoint */]: new NoiseTranslatePointNodeTemplateFactory(),
4255
3576
  ["noise-turbulence" /* noiseTurbulence */]: new NoiseTurbulenceNodeTemplateFactory(),
4256
- ["variable-property" /* variableProperty */]: new VariablePropertyNodeTemplateFactory(),
4257
- ["variable-combine" /* variableCombine */]: new VariableCombineNodeTemplateFactory(),
4258
- ["variable-value" /* variableValue */]: new VariableValueNodeTemplateFactory(),
4259
3577
  ["group-module" /* groupModule */]: new ModuleGroupNodeTemplateFactory()
4260
3578
  };
4261
3579
  export {
4262
- DisplacementModule,
3580
+ DisplacementHandle,
4263
3581
  NoiseCombineType,
4264
- NoiseHandleFlag,
3582
+ NoiseHandleType,
4265
3583
  NoiseNodeType,
4266
- VariableCombineType,
3584
+ NoiseSourceControlHandle,
3585
+ NoiseTemplateGroup,
4267
3586
  noiseCombineModuleMap,
4268
3587
  noiseNodeTemplates,
4269
3588
  noiseNodeTypes