@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
@@ -77,11 +77,12 @@ var require_fast_deep_equal = __commonJS({
77
77
  // src/abstract/index.ts
78
78
  var abstract_exports = {};
79
79
  __export(abstract_exports, {
80
- DisplacementModule: () => DisplacementModule,
80
+ DisplacementHandle: () => DisplacementHandle,
81
81
  NoiseCombineType: () => NoiseCombineType,
82
- NoiseHandleFlag: () => NoiseHandleFlag,
82
+ NoiseHandleType: () => NoiseHandleType,
83
83
  NoiseNodeType: () => NoiseNodeType,
84
- VariableCombineType: () => VariableCombineType,
84
+ NoiseSourceControlHandle: () => NoiseSourceControlHandle,
85
+ NoiseTemplateGroup: () => NoiseTemplateGroup,
85
86
  noiseCombineModuleMap: () => noiseCombineModuleMap,
86
87
  noiseNodeTemplates: () => noiseNodeTemplates,
87
88
  noiseNodeTypes: () => noiseNodeTypes
@@ -89,23 +90,27 @@ __export(abstract_exports, {
89
90
  module.exports = __toCommonJS(abstract_exports);
90
91
 
91
92
  // src/abstract/handle-types.ts
92
- var NoiseHandleFlag = /* @__PURE__ */ ((NoiseHandleFlag2) => {
93
- NoiseHandleFlag2[NoiseHandleFlag2["texture"] = 1] = "texture";
94
- NoiseHandleFlag2[NoiseHandleFlag2["noise"] = 2] = "noise";
95
- NoiseHandleFlag2[NoiseHandleFlag2["position"] = 4] = "position";
96
- NoiseHandleFlag2[NoiseHandleFlag2["module"] = 8] = "module";
97
- NoiseHandleFlag2[NoiseHandleFlag2["variableProperty"] = 16] = "variableProperty";
98
- NoiseHandleFlag2[NoiseHandleFlag2["variableValue"] = 32] = "variableValue";
99
- return NoiseHandleFlag2;
100
- })(NoiseHandleFlag || {});
101
- var DisplacementModule = /* @__PURE__ */ ((DisplacementModule2) => {
102
- DisplacementModule2["sourceModule"] = "source";
103
- DisplacementModule2["xModule"] = "x-module";
104
- DisplacementModule2["yModule"] = "y-module";
105
- DisplacementModule2["zModule"] = "z-module";
106
- DisplacementModule2["output"] = "output";
107
- return DisplacementModule2;
108
- })(DisplacementModule || {});
93
+ var NoiseHandleType = /* @__PURE__ */ ((NoiseHandleType2) => {
94
+ NoiseHandleType2["texture"] = "texture";
95
+ NoiseHandleType2["noise"] = "noise";
96
+ NoiseHandleType2["position"] = "position";
97
+ NoiseHandleType2["module"] = "module";
98
+ return NoiseHandleType2;
99
+ })(NoiseHandleType || {});
100
+ var DisplacementHandle = /* @__PURE__ */ ((DisplacementHandle2) => {
101
+ DisplacementHandle2["sourceModule"] = "source";
102
+ DisplacementHandle2["xModule"] = "x-module";
103
+ DisplacementHandle2["yModule"] = "y-module";
104
+ DisplacementHandle2["zModule"] = "z-module";
105
+ DisplacementHandle2["output"] = "output";
106
+ return DisplacementHandle2;
107
+ })(DisplacementHandle || {});
108
+ var NoiseSourceControlHandle = /* @__PURE__ */ ((NoiseSourceControlHandle2) => {
109
+ NoiseSourceControlHandle2["source"] = "source";
110
+ NoiseSourceControlHandle2["control"] = "control";
111
+ NoiseSourceControlHandle2["output"] = "output";
112
+ return NoiseSourceControlHandle2;
113
+ })(NoiseSourceControlHandle || {});
109
114
 
110
115
  // src/nodes/generators/noise-simplex-node.tsx
111
116
  var import_layout = require("@awesome-flow/core/layout");
@@ -340,150 +345,15 @@ var noise_const_node_default = NoiseConstNode;
340
345
 
341
346
  // src/nodes/generators/noise-billow-node.tsx
342
347
  var import_layout6 = require("@awesome-flow/core/layout");
343
- var import_react7 = require("react");
348
+ var import_react6 = require("react");
344
349
  var import_generator2 = require("libnoise-ts/module/generator");
345
- var import_hooks7 = require("@awesome-flow/core/hooks");
346
- var import_abstract2 = require("@awesome-flow/core/abstract");
347
-
348
- // src/layout/node-property-variables.tsx
349
350
  var import_hooks6 = require("@awesome-flow/core/hooks");
350
- var import_react6 = require("react");
351
- var import_core6 = require("@mantine/core");
352
- var import_utils = require("@awesome-flow/core/utils");
353
- var import_abstract = require("@awesome-flow/core/abstract");
354
-
355
- // src/layout/node-value-input.tsx
356
- var import_core5 = require("@mantine/core");
351
+ var import_components = require("@awesome-flow/core/components");
357
352
  var import_jsx_runtime6 = require("react/jsx-runtime");
358
- function NodeValueInput({ value, disabled, step, onChange }) {
359
- if (value === void 0 || value === null) {
360
- return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_jsx_runtime6.Fragment, {});
361
- }
362
- switch (typeof value) {
363
- case "boolean": {
364
- return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
365
- import_core5.Switch,
366
- {
367
- checked: value,
368
- disabled,
369
- onChange: (e) => onChange(e.currentTarget.checked)
370
- }
371
- );
372
- }
373
- case "number": {
374
- return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_core5.NumberInput, { value, disabled, step, onChange: (e) => onChange(e) });
375
- }
376
- case "string": {
377
- return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
378
- import_core5.Input,
379
- {
380
- value,
381
- disabled,
382
- onChange: (e) => onChange(e.currentTarget.value)
383
- }
384
- );
385
- }
386
- default:
387
- throw new Error(`Unknown input node for value of type: ${typeof value} (${value})`);
388
- }
389
- }
390
- var node_value_input_default = NodeValueInput;
391
-
392
- // src/layout/node-property-input.tsx
393
- var import_jsx_runtime7 = require("react/jsx-runtime");
394
- function NodePropertyInput({ property, onChange }) {
395
- if (!property) {
396
- return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_jsx_runtime7.Fragment, {});
397
- }
398
- return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
399
- node_value_input_default,
400
- {
401
- value: property.value,
402
- disabled: property.disabled,
403
- step: property.step,
404
- onChange: (value) => onChange(property.name, value)
405
- }
406
- );
407
- }
408
- var node_property_input_default = NodePropertyInput;
409
-
410
- // src/layout/node-property-variables.tsx
411
- var import_jsx_runtime8 = require("react/jsx-runtime");
412
- function NodePropertyVariables({
413
- data,
414
- nodeId,
415
- onPropertiesChange,
416
- except = import_abstract.nodeDataPropertyExcept
417
- }) {
418
- const [properties, setProperties] = (0, import_react6.useState)(() => {
419
- const keys = (0, import_utils.getObjectKeys)(data, except);
420
- const dataProps = {};
421
- for (const key of keys) {
422
- dataProps[key] = {
423
- name: key,
424
- value: data[key]
425
- };
426
- }
427
- return dataProps;
428
- });
429
- const updateNodeData = (0, import_hooks6.useUpdateNodeData)();
430
- const incoming = (0, import_hooks6.useIncomingNodeData)(nodeId);
431
- const resetAllDisabled = (0, import_react6.useCallback)(() => {
432
- const keys = Object.keys(properties);
433
- keys.forEach((k) => {
434
- properties[k].disabled = false;
435
- });
436
- setProperties(properties);
437
- }, []);
438
- const updatePropertyValue = (0, import_react6.useCallback)((name, value, disabled) => {
439
- let property = properties[name];
440
- if (property) {
441
- property.value = value;
442
- } else {
443
- property = {
444
- name,
445
- value
446
- };
447
- }
448
- property.disabled = disabled;
449
- setProperties({ ...properties, [name]: property });
450
- updateNodeData(nodeId, { [name]: value });
451
- }, []);
452
- (0, import_react6.useEffect)(() => {
453
- resetAllDisabled();
454
- if (incoming?.length) {
455
- for (const connection of incoming) {
456
- if (connection.property && properties[connection.property.name] !== void 0) {
457
- updatePropertyValue(connection.property.name, connection.property.value, true);
458
- }
459
- }
460
- }
461
- }, [incoming]);
462
- (0, import_react6.useEffect)(() => {
463
- if (onPropertiesChange) {
464
- onPropertiesChange(properties);
465
- }
466
- }, [onPropertiesChange, properties]);
467
- const nodes = (0, import_react6.useMemo)(() => {
468
- return Object.keys(properties).map((key) => {
469
- const property = properties[key];
470
- return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(import_core6.Group, { children: [
471
- property.name,
472
- ":",
473
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(node_property_input_default, { property, onChange: updatePropertyValue })
474
- ] }, key);
475
- });
476
- }, [properties, updatePropertyValue]);
477
- return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_core6.Stack, { children: nodes });
478
- }
479
- var node_property_variables_default = NodePropertyVariables;
480
-
481
- // src/nodes/generators/noise-billow-node.tsx
482
- var import_jsx_runtime9 = require("react/jsx-runtime");
483
353
  function NoiseBillowNode({ id, selected, data, type }) {
484
- const updateComputedData = (0, import_hooks7.useUpdateNodeComputedData)();
485
- const module2 = (0, import_react7.useMemo)(() => new import_generator2.Billow(), []);
486
- const onPropertiesChange = (0, import_react7.useCallback)(
354
+ const updateComputedData = (0, import_hooks6.useUpdateNodeComputedData)();
355
+ const module2 = (0, import_react6.useMemo)(() => new import_generator2.Billow(), []);
356
+ const onPropertiesChange = (0, import_react6.useCallback)(
487
357
  (properties) => {
488
358
  Object.keys(properties).forEach((k) => {
489
359
  module2[k] = properties[k].value;
@@ -492,37 +362,29 @@ function NoiseBillowNode({ id, selected, data, type }) {
492
362
  },
493
363
  [id, module2, updateComputedData]
494
364
  );
495
- return /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(import_layout6.NodeContainer, { id, selected, data, type, children: [
496
- /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
497
- node_property_variables_default,
498
- {
499
- data,
500
- except: import_abstract2.nodeDataPropertyExcept,
501
- nodeId: id,
502
- onPropertiesChange
503
- }
504
- ),
505
- /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_layout6.NodeTrackConnections, { handles: data.handles, nodeId: id, type: "target" })
365
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(import_layout6.NodeContainer, { id, selected, data, type, children: [
366
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_components.NodePropertyVariables, { data, nodeId: id, onPropertiesChange }),
367
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_layout6.NodeTrackConnections, { handles: data.handles, nodeId: id, type: "target" })
506
368
  ] });
507
369
  }
508
370
  var noise_billow_node_default = NoiseBillowNode;
509
371
 
510
372
  // src/nodes/output/noise-logger-node.tsx
511
373
  var import_layout7 = require("@awesome-flow/core/layout");
512
- var import_react8 = require("react");
513
- var import_core7 = require("@mantine/core");
514
- var import_hooks8 = require("@awesome-flow/core/hooks");
515
- var import_jsx_runtime10 = require("react/jsx-runtime");
374
+ var import_react7 = require("react");
375
+ var import_core5 = require("@mantine/core");
376
+ var import_hooks7 = require("@awesome-flow/core/hooks");
377
+ var import_jsx_runtime7 = require("react/jsx-runtime");
516
378
  function NoiseLoggerNode({ id, selected, data, type }) {
517
- const incoming = (0, import_hooks8.useIncomingComputedData)(id);
518
- const noise = (0, import_react8.useMemo)(() => incoming?.map((p) => p.noise).flat(), [incoming]);
519
- return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(import_layout7.NodeContainer, { id, selected, data, type, children: [
520
- /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(import_core7.Text, { children: [
379
+ const incoming = (0, import_hooks7.useIncomingComputedData)(id);
380
+ const noise = (0, import_react7.useMemo)(() => incoming?.map((p) => p.noise).flat(), [incoming]);
381
+ return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(import_layout7.NodeContainer, { id, selected, data, type, children: [
382
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(import_core5.Text, { children: [
521
383
  "Size: ",
522
384
  noise?.length || 0
523
385
  ] }),
524
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_core7.Divider, { h: 5 }),
525
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_core7.Stack, { children: noise?.map((v, i) => /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(import_core7.Text, { children: [
386
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_core5.Divider, { h: 5 }),
387
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_core5.Stack, { children: noise?.map((v, i) => /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(import_core5.Text, { children: [
526
388
  v.position?.x,
527
389
  ":",
528
390
  v.position?.y,
@@ -531,24 +393,24 @@ function NoiseLoggerNode({ id, selected, data, type }) {
531
393
  ": ",
532
394
  v.value
533
395
  ] }, i)) }),
534
- /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_layout7.NodeTrackConnections, { handles: data.handles, nodeId: id, type: "target" })
396
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_layout7.NodeTrackConnections, { handles: data.handles, nodeId: id, type: "target" })
535
397
  ] });
536
398
  }
537
399
  var noise_logger_node_default = NoiseLoggerNode;
538
400
 
539
401
  // src/nodes/output/noise-raw-texture-node.tsx
540
402
  var import_layout8 = require("@awesome-flow/core/layout");
541
- var import_react9 = require("react");
542
- var import_hooks9 = require("@awesome-flow/core/hooks");
543
- var import_core8 = require("@mantine/core");
544
- var import_jsx_runtime11 = require("react/jsx-runtime");
403
+ var import_react8 = require("react");
404
+ var import_hooks8 = require("@awesome-flow/core/hooks");
405
+ var import_core6 = require("@mantine/core");
406
+ var import_jsx_runtime8 = require("react/jsx-runtime");
545
407
  function NoiseRawTextureNode({ id, selected, data, type }) {
546
- const updateComputedData = (0, import_hooks9.useUpdateNodeComputedData)();
547
- const [dataLength, setDataLength] = (0, import_react9.useState)(0);
548
- const [resolution, setResolution] = (0, import_react9.useState)(0);
549
- const incoming = (0, import_hooks9.useIncomingComputedData)(id);
550
- const noise = (0, import_react9.useMemo)(() => incoming?.map((p) => p.noise).flat(), [incoming]);
551
- (0, import_react9.useEffect)(() => {
408
+ const updateComputedData = (0, import_hooks8.useUpdateNodeComputedData)();
409
+ const [dataLength, setDataLength] = (0, import_react8.useState)(0);
410
+ const [resolution, setResolution] = (0, import_react8.useState)(0);
411
+ const incoming = (0, import_hooks8.useIncomingComputedData)(id);
412
+ const noise = (0, import_react8.useMemo)(() => incoming?.map((p) => p.noise).flat(), [incoming]);
413
+ (0, import_react8.useEffect)(() => {
552
414
  if (noise?.length) {
553
415
  const size = Math.ceil(Math.sqrt(noise.length));
554
416
  const colors = noise.map((n) => [n.value * 255, n.value * 255, n.value * 255, 255]).flat();
@@ -559,19 +421,19 @@ function NoiseRawTextureNode({ id, selected, data, type }) {
559
421
  updateComputedData(id, { textureData: dataArray, textureResolution: size });
560
422
  }
561
423
  }, [noise]);
562
- return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(import_layout8.NodeContainer, { id, selected, data, type, children: [
563
- /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(import_core8.Stack, { children: [
564
- /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(import_core8.Group, { children: [
424
+ return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(import_layout8.NodeContainer, { id, selected, data, type, children: [
425
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(import_core6.Stack, { children: [
426
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(import_core6.Group, { children: [
565
427
  "Resolution: ",
566
428
  resolution,
567
429
  "x",
568
430
  resolution
569
431
  ] }),
570
- /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(import_core8.Group, { children: [
432
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(import_core6.Group, { children: [
571
433
  "Input Length: ",
572
434
  noise?.length || 0
573
435
  ] }),
574
- /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(import_core8.Group, { children: [
436
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(import_core6.Group, { children: [
575
437
  "Output Length (",
576
438
  resolution,
577
439
  "*",
@@ -580,66 +442,67 @@ function NoiseRawTextureNode({ id, selected, data, type }) {
580
442
  dataLength
581
443
  ] })
582
444
  ] }),
583
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_layout8.NodeTrackConnections, { handles: data.handles, nodeId: id, type: "target" })
445
+ /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_layout8.NodeTrackConnections, { handles: data.handles, nodeId: id, type: "target" })
584
446
  ] });
585
447
  }
586
448
  var noise_raw_texture_node_default = NoiseRawTextureNode;
587
449
 
588
450
  // src/nodes/generators/noise-checkerboard-node.tsx
589
451
  var import_layout9 = require("@awesome-flow/core/layout");
590
- var import_react10 = require("react");
452
+ var import_react9 = require("react");
591
453
  var import_generator3 = require("libnoise-ts/module/generator");
592
- var import_hooks10 = require("@awesome-flow/core/hooks");
593
- var import_jsx_runtime12 = require("react/jsx-runtime");
454
+ var import_hooks9 = require("@awesome-flow/core/hooks");
455
+ var import_jsx_runtime9 = require("react/jsx-runtime");
594
456
  function NoiseCheckerboardNode({ id, selected, data, type }) {
595
- const updateComputedData = (0, import_hooks10.useUpdateNodeComputedData)();
596
- const module2 = (0, import_react10.useMemo)(() => new import_generator3.Checkerboard(), []);
597
- (0, import_react10.useEffect)(() => {
457
+ const updateComputedData = (0, import_hooks9.useUpdateNodeComputedData)();
458
+ const module2 = (0, import_react9.useMemo)(() => new import_generator3.Checkerboard(), []);
459
+ (0, import_react9.useEffect)(() => {
598
460
  updateComputedData(id, { module: module2 });
599
461
  }, [id, module2, updateComputedData]);
600
- return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_layout9.NodeContainer, { id, selected, data, type });
462
+ return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_layout9.NodeContainer, { id, selected, data, type });
601
463
  }
602
464
  var noise_checkerboard_node_default = NoiseCheckerboardNode;
603
465
 
604
466
  // src/nodes/output/positions-logger-node.tsx
605
467
  var import_layout10 = require("@awesome-flow/core/layout");
606
- var import_react11 = require("react");
607
- var import_core9 = require("@mantine/core");
608
- var import_hooks11 = require("@awesome-flow/core/hooks");
609
- var import_jsx_runtime13 = require("react/jsx-runtime");
468
+ var import_react10 = require("react");
469
+ var import_core7 = require("@mantine/core");
470
+ var import_hooks10 = require("@awesome-flow/core/hooks");
471
+ var import_jsx_runtime10 = require("react/jsx-runtime");
610
472
  function PositionsLoggerNode({ id, selected, data, type }) {
611
- const incoming = (0, import_hooks11.useIncomingComputedData)(id);
612
- const positions = (0, import_react11.useMemo)(() => {
473
+ const incoming = (0, import_hooks10.useIncomingComputedData)(id);
474
+ const positions = (0, import_react10.useMemo)(() => {
613
475
  return incoming?.map((p) => p.positions).flat();
614
476
  }, [incoming]);
615
- return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_layout10.NodeContainer, { id, selected, data, type, children: [
616
- /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_core9.Text, { children: [
477
+ return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(import_layout10.NodeContainer, { id, selected, data, type, children: [
478
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(import_core7.Text, { children: [
617
479
  "Size: ",
618
480
  positions?.length || 0
619
481
  ] }),
620
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_core9.Divider, { h: 5 }),
621
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_core9.Stack, { children: positions?.map((v, i) => /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_core9.Text, { children: [
482
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_core7.Divider, { h: 5 }),
483
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_core7.Stack, { children: positions?.map((v, i) => /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(import_core7.Text, { children: [
622
484
  v.x,
623
485
  ":",
624
486
  v.y,
625
487
  ":",
626
488
  v.z
627
489
  ] }, i)) }),
628
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_layout10.NodeTrackConnections, { handles: data.handles, nodeId: id, type: "target" })
490
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_layout10.NodeTrackConnections, { handles: data.handles, nodeId: id, type: "target" })
629
491
  ] });
630
492
  }
631
493
  var positions_logger_node_default = PositionsLoggerNode;
632
494
 
633
495
  // src/nodes/generators/noise-cylinders-node.tsx
634
496
  var import_layout11 = require("@awesome-flow/core/layout");
635
- var import_react12 = require("react");
497
+ var import_react11 = require("react");
636
498
  var import_generator4 = require("libnoise-ts/module/generator");
637
- var import_hooks12 = require("@awesome-flow/core/hooks");
638
- var import_jsx_runtime14 = require("react/jsx-runtime");
499
+ var import_hooks11 = require("@awesome-flow/core/hooks");
500
+ var import_components2 = require("@awesome-flow/core/components");
501
+ var import_jsx_runtime11 = require("react/jsx-runtime");
639
502
  function NoiseCylindersNode({ id, selected, data, type }) {
640
- const updateComputedData = (0, import_hooks12.useUpdateNodeComputedData)();
641
- const module2 = (0, import_react12.useMemo)(() => new import_generator4.Cylinders(), []);
642
- const onPropertiesChange = (0, import_react12.useCallback)(
503
+ const updateComputedData = (0, import_hooks11.useUpdateNodeComputedData)();
504
+ const module2 = (0, import_react11.useMemo)(() => new import_generator4.Cylinders(), []);
505
+ const onPropertiesChange = (0, import_react11.useCallback)(
643
506
  (properties) => {
644
507
  Object.keys(properties).forEach((k) => {
645
508
  module2[k] = properties[k].value;
@@ -648,23 +511,24 @@ function NoiseCylindersNode({ id, selected, data, type }) {
648
511
  },
649
512
  [id, module2, updateComputedData]
650
513
  );
651
- return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(import_layout11.NodeContainer, { id, selected, data, type, children: [
652
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(node_property_variables_default, { data, nodeId: id, onPropertiesChange }),
653
- /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_layout11.NodeTrackConnections, { handles: data.handles, nodeId: id, type: "target" })
514
+ return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(import_layout11.NodeContainer, { id, selected, data, type, children: [
515
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_components2.NodePropertyVariables, { data, nodeId: id, onPropertiesChange }),
516
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_layout11.NodeTrackConnections, { handles: data.handles, nodeId: id, type: "target" })
654
517
  ] });
655
518
  }
656
519
  var noise_cylinders_node_default = NoiseCylindersNode;
657
520
 
658
521
  // src/nodes/generators/noise-perlin-node.tsx
659
522
  var import_layout12 = require("@awesome-flow/core/layout");
660
- var import_react13 = require("react");
523
+ var import_react12 = require("react");
661
524
  var import_generator5 = require("libnoise-ts/module/generator");
662
- var import_hooks13 = require("@awesome-flow/core/hooks");
663
- var import_jsx_runtime15 = require("react/jsx-runtime");
525
+ var import_hooks12 = require("@awesome-flow/core/hooks");
526
+ var import_components3 = require("@awesome-flow/core/components");
527
+ var import_jsx_runtime12 = require("react/jsx-runtime");
664
528
  function NoisePerlinNode({ id, selected, data, type }) {
665
- const updateComputedData = (0, import_hooks13.useUpdateNodeComputedData)();
666
- const module2 = (0, import_react13.useMemo)(() => new import_generator5.Perlin(), []);
667
- const onPropertiesChange = (0, import_react13.useCallback)(
529
+ const updateComputedData = (0, import_hooks12.useUpdateNodeComputedData)();
530
+ const module2 = (0, import_react12.useMemo)(() => new import_generator5.Perlin(), []);
531
+ const onPropertiesChange = (0, import_react12.useCallback)(
668
532
  (properties) => {
669
533
  Object.keys(properties).forEach((k) => {
670
534
  module2[k] = properties[k].value;
@@ -673,62 +537,65 @@ function NoisePerlinNode({ id, selected, data, type }) {
673
537
  },
674
538
  [id, module2, updateComputedData]
675
539
  );
676
- return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(import_layout12.NodeContainer, { id, selected, data, type, children: [
677
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(node_property_variables_default, { data, nodeId: id, onPropertiesChange }),
678
- /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_layout12.NodeTrackConnections, { handles: data.handles, nodeId: id, type: "target" })
540
+ return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(import_layout12.NodeContainer, { id, selected, data, type, children: [
541
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_components3.NodePropertyVariables, { data, nodeId: id, onPropertiesChange }),
542
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_layout12.NodeTrackConnections, { handles: data.handles, nodeId: id, type: "target" })
679
543
  ] });
680
544
  }
681
545
  var noise_perlin_node_default = NoisePerlinNode;
682
546
 
683
547
  // src/nodes/generators/noise-ridgedmulti-node.tsx
684
548
  var import_layout13 = require("@awesome-flow/core/layout");
685
- var import_react14 = require("react");
549
+ var import_react13 = require("react");
686
550
  var import_generator6 = require("libnoise-ts/module/generator");
687
- var import_hooks14 = require("@awesome-flow/core/hooks");
688
- var import_jsx_runtime16 = require("react/jsx-runtime");
551
+ var import_hooks13 = require("@awesome-flow/core/hooks");
552
+ var import_components4 = require("@awesome-flow/core/components");
553
+ var import_jsx_runtime13 = require("react/jsx-runtime");
689
554
  function NoiseRidgedMultiNode({ id, selected, data, type }) {
690
- const updateComputedData = (0, import_hooks14.useUpdateNodeComputedData)();
691
- const module2 = (0, import_react14.useMemo)(() => new import_generator6.RidgedMulti(), []);
692
- const onPropertiesChange = (0, import_react14.useCallback)((properties) => {
555
+ const updateComputedData = (0, import_hooks13.useUpdateNodeComputedData)();
556
+ const module2 = (0, import_react13.useMemo)(() => new import_generator6.RidgedMulti(), []);
557
+ const onPropertiesChange = (0, import_react13.useCallback)((properties) => {
693
558
  Object.keys(properties).forEach((k) => module2[k] = properties[k].value);
694
559
  updateComputedData(id, { module: module2 });
695
560
  }, []);
696
- return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(import_layout13.NodeContainer, { id, selected, data, type, children: [
697
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(node_property_variables_default, { data, nodeId: id, onPropertiesChange }),
698
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_layout13.NodeTrackConnections, { handles: data.handles, nodeId: id, type: "target" })
561
+ return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_layout13.NodeContainer, { id, selected, data, type, children: [
562
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_components4.NodePropertyVariables, { data, nodeId: id, onPropertiesChange }),
563
+ /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_layout13.NodeTrackConnections, { handles: data.handles, nodeId: id, type: "target" })
699
564
  ] });
700
565
  }
701
566
  var noise_ridgedmulti_node_default = NoiseRidgedMultiNode;
702
567
 
703
568
  // src/nodes/generators/noise-spheres-node.tsx
704
569
  var import_layout14 = require("@awesome-flow/core/layout");
705
- var import_react15 = require("react");
570
+ var import_react14 = require("react");
706
571
  var import_generator7 = require("libnoise-ts/module/generator");
707
- var import_hooks15 = require("@awesome-flow/core/hooks");
708
- var import_jsx_runtime17 = require("react/jsx-runtime");
572
+ var import_hooks14 = require("@awesome-flow/core/hooks");
573
+ var import_components5 = require("@awesome-flow/core/components");
574
+ var import_jsx_runtime14 = require("react/jsx-runtime");
709
575
  function NoiseSpheresNode({ id, selected, data, type }) {
710
- const updateComputedData = (0, import_hooks15.useUpdateNodeComputedData)();
711
- const module2 = (0, import_react15.useMemo)(() => new import_generator7.Spheres(), []);
712
- const onPropertiesChange = (0, import_react15.useCallback)((properties) => {
576
+ const updateComputedData = (0, import_hooks14.useUpdateNodeComputedData)();
577
+ const module2 = (0, import_react14.useMemo)(() => new import_generator7.Spheres(), []);
578
+ const onPropertiesChange = (0, import_react14.useCallback)((properties) => {
713
579
  Object.keys(properties).forEach((k) => module2[k] = properties[k].value);
714
580
  updateComputedData(id, { module: module2 });
715
581
  }, []);
716
- return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_layout14.NodeContainer, { id, selected, data, type, children: [
717
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(node_property_variables_default, { data, nodeId: id, onPropertiesChange }),
718
- /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_layout14.NodeTrackConnections, { handles: data.handles, nodeId: id, type: "target" })
582
+ return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(import_layout14.NodeContainer, { id, selected, data, type, children: [
583
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_components5.NodePropertyVariables, { data, nodeId: id, onPropertiesChange }),
584
+ /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_layout14.NodeTrackConnections, { handles: data.handles, nodeId: id, type: "target" })
719
585
  ] });
720
586
  }
721
587
  var noise_spheres_node_default = NoiseSpheresNode;
722
588
 
723
589
  // src/nodes/generators/noise-voronoi-node.tsx
724
590
  var import_layout15 = require("@awesome-flow/core/layout");
725
- var import_react16 = require("react");
591
+ var import_react15 = require("react");
726
592
  var import_generator8 = require("libnoise-ts/module/generator");
727
- var import_hooks16 = require("@awesome-flow/core/hooks");
728
- var import_jsx_runtime18 = require("react/jsx-runtime");
593
+ var import_hooks15 = require("@awesome-flow/core/hooks");
594
+ var import_components6 = require("@awesome-flow/core/components");
595
+ var import_jsx_runtime15 = require("react/jsx-runtime");
729
596
  function NoiseVoronoiNode({ id, selected, data, type }) {
730
- const updateComputedData = (0, import_hooks16.useUpdateNodeComputedData)();
731
- const onPropertiesChange = (0, import_react16.useCallback)(
597
+ const updateComputedData = (0, import_hooks15.useUpdateNodeComputedData)();
598
+ const onPropertiesChange = (0, import_react15.useCallback)(
732
599
  (properties) => {
733
600
  const module2 = new import_generator8.Voronoi(
734
601
  properties.frequency.value,
@@ -740,17 +607,17 @@ function NoiseVoronoiNode({ id, selected, data, type }) {
740
607
  },
741
608
  []
742
609
  );
743
- return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(import_layout15.NodeContainer, { id, selected, data, type, children: [
744
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(node_property_variables_default, { data, nodeId: id, onPropertiesChange }),
745
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_layout15.NodeTrackConnections, { handles: data.handles, nodeId: id, type: "target" })
610
+ return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(import_layout15.NodeContainer, { id, selected, data, type, children: [
611
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_components6.NodePropertyVariables, { data, nodeId: id, onPropertiesChange }),
612
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_layout15.NodeTrackConnections, { handles: data.handles, nodeId: id, type: "target" })
746
613
  ] });
747
614
  }
748
615
  var noise_voronoi_node_default = NoiseVoronoiNode;
749
616
 
750
617
  // src/nodes/modifiers/noise-combine-node.tsx
751
618
  var import_layout16 = require("@awesome-flow/core/layout");
752
- var import_react17 = require("react");
753
- var import_hooks17 = require("@awesome-flow/core/hooks");
619
+ var import_react16 = require("react");
620
+ var import_hooks16 = require("@awesome-flow/core/hooks");
754
621
  var import_icons_react = require("@tabler/icons-react");
755
622
 
756
623
  // src/abstract/operations.ts
@@ -763,15 +630,6 @@ var NoiseCombineType = /* @__PURE__ */ ((NoiseCombineType3) => {
763
630
  NoiseCombineType3["power"] = "power";
764
631
  return NoiseCombineType3;
765
632
  })(NoiseCombineType || {});
766
- var VariableCombineType = /* @__PURE__ */ ((VariableCombineType2) => {
767
- VariableCombineType2["add"] = "add";
768
- VariableCombineType2["divide"] = "divide";
769
- VariableCombineType2["max"] = "max";
770
- VariableCombineType2["min"] = "min";
771
- VariableCombineType2["multiply"] = "multiply";
772
- VariableCombineType2["power"] = "power";
773
- return VariableCombineType2;
774
- })(VariableCombineType || {});
775
633
  var noiseCombineModuleMap = {
776
634
  ["add" /* add */]: import_combiner.Add,
777
635
  ["max" /* max */]: import_combiner.Max,
@@ -781,59 +639,59 @@ var noiseCombineModuleMap = {
781
639
  };
782
640
 
783
641
  // src/nodes/modifiers/noise-combine-node.tsx
784
- var import_jsx_runtime19 = require("react/jsx-runtime");
642
+ var import_jsx_runtime16 = require("react/jsx-runtime");
785
643
  var options = {
786
- add: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_icons_react.IconPlus, {}),
787
- min: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_icons_react.IconChevronLeft, {}),
788
- max: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_icons_react.IconChevronRight, {}),
789
- multiply: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_icons_react.IconAsterisk, {}),
790
- power: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_icons_react.IconChevronUp, {})
644
+ add: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_icons_react.IconPlus, {}),
645
+ min: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_icons_react.IconChevronLeft, {}),
646
+ max: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_icons_react.IconChevronRight, {}),
647
+ multiply: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_icons_react.IconAsterisk, {}),
648
+ power: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_icons_react.IconChevronUp, {})
791
649
  };
792
650
  function NoiseCombineNode({ id, selected, data, type }) {
793
- const updateNodeData = (0, import_hooks17.useUpdateNodeData)();
794
- const updateComputedData = (0, import_hooks17.useUpdateNodeComputedData)();
795
- const incoming = (0, import_hooks17.useIncomingComputedData)(id);
796
- (0, import_react17.useEffect)(() => {
651
+ const updateNodeData = (0, import_hooks16.useUpdateNodeData)();
652
+ const updateComputedData = (0, import_hooks16.useUpdateNodeComputedData)();
653
+ const incoming = (0, import_hooks16.useIncomingComputedData)(id);
654
+ (0, import_react16.useEffect)(() => {
797
655
  const ModuleFactory = noiseCombineModuleMap[data.operation];
798
656
  if (incoming?.length > 1) {
799
657
  const module2 = new ModuleFactory(incoming[0].module, incoming[1].module);
800
658
  updateComputedData(id, { module: module2 });
801
659
  }
802
660
  }, [data.operation, incoming]);
803
- const onChange = (0, import_react17.useCallback)((operation) => {
661
+ const onChange = (0, import_react16.useCallback)((operation) => {
804
662
  updateNodeData(id, { operation });
805
663
  }, []);
806
- return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(import_layout16.NodeContainer, { id, selected, data, type, children: [
807
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_layout16.NodeCombobox, { options, selected: data.operation, onChange }),
808
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_layout16.NodeTrackConnections, { handles: data.handles, nodeId: id, type: "target" })
664
+ return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(import_layout16.NodeContainer, { id, selected, data, type, children: [
665
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_layout16.NodeCombobox, { options, selected: data.operation, onChange, width: 150 }),
666
+ /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_layout16.NodeTrackConnections, { handles: data.handles, nodeId: id, type: "target" })
809
667
  ] });
810
668
  }
811
669
  var noise_combine_node_default = NoiseCombineNode;
812
670
 
813
671
  // src/nodes/modifiers/noise-clamp-node.tsx
814
672
  var import_layout17 = require("@awesome-flow/core/layout");
815
- var import_react18 = require("react");
816
- var import_core10 = require("@mantine/core");
817
- var import_hooks18 = require("@awesome-flow/core/hooks");
673
+ var import_react17 = require("react");
674
+ var import_core8 = require("@mantine/core");
675
+ var import_hooks17 = require("@awesome-flow/core/hooks");
818
676
  var import_modifier2 = require("libnoise-ts/module/modifier");
819
- var import_jsx_runtime20 = require("react/jsx-runtime");
677
+ var import_jsx_runtime17 = require("react/jsx-runtime");
820
678
  function NoiseClampNode({ id, selected, data, type }) {
821
- const [lowerBound, setLowerBound] = (0, import_react18.useState)(data.lowerBound);
822
- const [upperBound, setUpperBound] = (0, import_react18.useState)(data.upperBound);
823
- const incoming = (0, import_hooks18.useIncomingComputedData)(id);
824
- const updateNodeData = (0, import_hooks18.useUpdateNodeData)();
825
- const updateComputedData = (0, import_hooks18.useUpdateNodeComputedData)();
826
- (0, import_react18.useEffect)(() => {
679
+ const [lowerBound, setLowerBound] = (0, import_react17.useState)(data.lowerBound);
680
+ const [upperBound, setUpperBound] = (0, import_react17.useState)(data.upperBound);
681
+ const incoming = (0, import_hooks17.useIncomingComputedData)(id);
682
+ const updateNodeData = (0, import_hooks17.useUpdateNodeData)();
683
+ const updateComputedData = (0, import_hooks17.useUpdateNodeComputedData)();
684
+ (0, import_react17.useEffect)(() => {
827
685
  if (incoming?.length) {
828
686
  const module2 = new import_modifier2.Clamp(incoming[0].module, lowerBound, upperBound);
829
687
  updateComputedData(id, { module: module2 });
830
688
  }
831
689
  updateNodeData(id, { lowerBound, upperBound });
832
690
  }, [incoming, lowerBound, upperBound]);
833
- return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(import_layout17.NodeContainer, { id, selected, data, type, children: [
834
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_core10.Stack, { children: /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(import_core10.Group, { children: [
835
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
836
- import_core10.NumberInput,
691
+ return /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_layout17.NodeContainer, { id, selected, data, type, children: [
692
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_core8.Stack, { children: /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_core8.Group, { children: [
693
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
694
+ import_core8.NumberInput,
837
695
  {
838
696
  size: "xs",
839
697
  w: 100,
@@ -842,8 +700,8 @@ function NoiseClampNode({ id, selected, data, type }) {
842
700
  step: 0.1
843
701
  }
844
702
  ),
845
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
846
- import_core10.NumberInput,
703
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
704
+ import_core8.NumberInput,
847
705
  {
848
706
  size: "xs",
849
707
  w: 100,
@@ -853,56 +711,46 @@ function NoiseClampNode({ id, selected, data, type }) {
853
711
  }
854
712
  )
855
713
  ] }) }),
856
- /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_layout17.NodeTrackConnections, { handles: data.handles, nodeId: id, type: "target" })
714
+ /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_layout17.NodeTrackConnections, { handles: data.handles, nodeId: id, type: "target" })
857
715
  ] });
858
716
  }
859
717
  var noise_clamp_node_default = NoiseClampNode;
860
718
 
861
719
  // src/nodes/modifiers/noise-abs-node.tsx
862
720
  var import_layout18 = require("@awesome-flow/core/layout");
863
- var import_react19 = require("react");
864
- var import_hooks19 = require("@awesome-flow/core/hooks");
721
+ var import_react18 = require("react");
722
+ var import_hooks18 = require("@awesome-flow/core/hooks");
865
723
  var import_modifier3 = require("libnoise-ts/module/modifier");
866
- var import_jsx_runtime21 = require("react/jsx-runtime");
724
+ var import_jsx_runtime18 = require("react/jsx-runtime");
867
725
  function NoiseAbsNode({ id, selected, data, type }) {
868
- const incoming = (0, import_hooks19.useIncomingComputedData)(id);
869
- const updateComputedData = (0, import_hooks19.useUpdateNodeComputedData)();
870
- (0, import_react19.useEffect)(() => {
726
+ const incoming = (0, import_hooks18.useIncomingComputedData)(id);
727
+ const updateComputedData = (0, import_hooks18.useUpdateNodeComputedData)();
728
+ (0, import_react18.useEffect)(() => {
871
729
  if (incoming?.length > 0) {
872
730
  const module2 = new import_modifier3.Abs(incoming[0].module);
873
731
  updateComputedData(id, { module: module2 });
874
732
  }
875
733
  }, [incoming]);
876
- return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_layout18.NodeContainer, { id, selected, data, type, children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_layout18.NodeTrackConnections, { handles: data.handles, nodeId: id, type: "target" }) });
734
+ return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_layout18.NodeContainer, { id, selected, data, type, children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_layout18.NodeTrackConnections, { handles: data.handles, nodeId: id, type: "target" }) });
877
735
  }
878
736
  var noise_abs_node_default = NoiseAbsNode;
879
737
 
880
738
  // src/nodes/output/noise-output-node.tsx
881
739
  var import_layout19 = require("@awesome-flow/core/layout");
882
- var import_hooks20 = require("@awesome-flow/core/hooks");
883
- var import_core11 = require("@mantine/core");
884
- var import_react20 = require("react");
885
- var import_jsx_runtime22 = require("react/jsx-runtime");
740
+ var import_react19 = require("react");
741
+ var import_hooks19 = require("@awesome-flow/core/hooks");
742
+ var import_components7 = require("@awesome-flow/core/components");
743
+ var import_core9 = require("@mantine/core");
744
+ var import_jsx_runtime19 = require("react/jsx-runtime");
886
745
  function NoiseOutputNode({ id, selected, data, type }) {
887
- const [generating, setGenerating] = (0, import_react20.useState)(false);
888
- const updateComputedData = (0, import_hooks20.useUpdateNodeComputedData)();
889
- const incomingModules = (0, import_hooks20.useIncomingComputedData)(id, 8 /* module */);
890
- const incomingPositions = (0, import_hooks20.useIncomingComputedData)(
891
- id,
892
- 4 /* position */
893
- );
894
- (0, import_react20.useEffect)(() => {
895
- if (incomingPositions?.length && incomingModules?.length) {
896
- const { module: module2 } = incomingModules[0];
897
- if (module2) {
898
- setGenerating(true);
899
- }
900
- }
901
- }, [incomingModules, incomingPositions]);
902
- (0, import_react20.useEffect)(() => {
903
- if (incomingPositions?.length && incomingModules?.length) {
904
- const { module: module2 } = incomingModules[0];
905
- if (module2 && generating) {
746
+ const [size, setSize] = (0, import_react19.useState)(0);
747
+ const updateComputedData = (0, import_hooks19.useUpdateNodeComputedData)();
748
+ const onDataUpdated = (0, import_react19.useCallback)(
749
+ (handleData) => {
750
+ const incomingPositions = handleData["position" /* position */];
751
+ const incomingModule = handleData["module" /* module */];
752
+ if (incomingPositions?.length && incomingModule?.length && incomingModule[0]?.module) {
753
+ const { module: module2 } = incomingModule[0];
906
754
  const noise = [];
907
755
  for (const input of incomingPositions) {
908
756
  for (const position of input.positions) {
@@ -913,48 +761,43 @@ function NoiseOutputNode({ id, selected, data, type }) {
913
761
  });
914
762
  }
915
763
  }
916
- console.log("SET COMPUTED DATA");
917
764
  updateComputedData(id, { noise, module: module2 });
918
- setGenerating(false);
765
+ setSize(noise.length);
919
766
  }
920
- }
921
- }, [generating]);
922
- return /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(import_layout19.NodeContainer, { id, selected, data, type, children: [
923
- /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(import_core11.Box, { pos: "relative", children: [
924
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
925
- import_core11.LoadingOverlay,
926
- {
927
- visible: generating,
928
- zIndex: 1e3,
929
- overlayProps: { radius: "sm", blur: 2 }
930
- }
931
- ),
932
- /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(import_core11.Stack, { children: [
933
- /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(import_core11.Group, { children: [
934
- "Position Inputs: ",
935
- incomingPositions?.length
936
- ] }),
937
- /* @__PURE__ */ (0, import_jsx_runtime22.jsxs)(import_core11.Group, { children: [
938
- "Module Inputs: ",
939
- incomingModules?.length
940
- ] })
941
- ] })
767
+ },
768
+ []
769
+ );
770
+ return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(import_layout19.NodeContainer, { id, selected, data, type, children: [
771
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
772
+ import_components7.HandlesIncomingDataStatus,
773
+ {
774
+ nodeId: id,
775
+ handles: data.handles,
776
+ handleKey: "dataType",
777
+ onDataUpdated,
778
+ type: "target",
779
+ resetComputedData: true
780
+ }
781
+ ),
782
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(import_core9.Text, { mt: 5, children: [
783
+ "Noise points: ",
784
+ size
942
785
  ] }),
943
- /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_layout19.NodeTrackConnections, { handles: data.handles, nodeId: id, type: "target" })
786
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_layout19.NodeTrackConnections, { handles: data.handles, nodeId: id, type: "target" })
944
787
  ] });
945
788
  }
946
789
  var noise_output_node_default = NoiseOutputNode;
947
790
 
948
791
  // src/nodes/modifiers/noise-curve-node.tsx
949
792
  var import_layout20 = require("@awesome-flow/core/layout");
950
- var import_core12 = require("@mantine/core");
951
- var import_hooks21 = require("@awesome-flow/core/hooks");
793
+ var import_core10 = require("@mantine/core");
794
+ var import_hooks20 = require("@awesome-flow/core/hooks");
952
795
 
953
796
  // ../../node_modules/@mantine/form/esm/use-form.mjs
954
- var import_react27 = require("react");
797
+ var import_react26 = require("react");
955
798
 
956
799
  // ../../node_modules/@mantine/form/esm/actions/actions.mjs
957
- var import_react21 = require("react");
800
+ var import_react20 = require("react");
958
801
  function validateFormName(name) {
959
802
  if (!/^[0-9a-zA-Z-]+$/.test(name)) {
960
803
  throw new Error(
@@ -962,7 +805,7 @@ function validateFormName(name) {
962
805
  );
963
806
  }
964
807
  }
965
- var useIsomorphicEffect = typeof window !== "undefined" ? import_react21.useLayoutEffect : import_react21.useEffect;
808
+ var useIsomorphicEffect = typeof window !== "undefined" ? import_react20.useLayoutEffect : import_react20.useEffect;
966
809
  function useFormEvent(eventKey, handler) {
967
810
  useIsomorphicEffect(() => {
968
811
  if (eventKey) {
@@ -1059,7 +902,7 @@ function getInputOnChange(setValue) {
1059
902
  }
1060
903
 
1061
904
  // ../../node_modules/@mantine/form/esm/hooks/use-form-errors/use-form-errors.mjs
1062
- var import_react22 = require("react");
905
+ var import_react21 = require("react");
1063
906
 
1064
907
  // ../../node_modules/@mantine/form/esm/hooks/use-form-errors/filter-errors/filter-errors.mjs
1065
908
  function filterErrors(errors) {
@@ -1077,14 +920,14 @@ function filterErrors(errors) {
1077
920
 
1078
921
  // ../../node_modules/@mantine/form/esm/hooks/use-form-errors/use-form-errors.mjs
1079
922
  function useFormErrors(initialErrors) {
1080
- const [errorsState, setErrorsState] = (0, import_react22.useState)(filterErrors(initialErrors));
1081
- const setErrors = (0, import_react22.useCallback)((errors) => {
923
+ const [errorsState, setErrorsState] = (0, import_react21.useState)(filterErrors(initialErrors));
924
+ const setErrors = (0, import_react21.useCallback)((errors) => {
1082
925
  setErrorsState(
1083
926
  (current) => filterErrors(typeof errors === "function" ? errors(current) : errors)
1084
927
  );
1085
928
  }, []);
1086
- const clearErrors = (0, import_react22.useCallback)(() => setErrorsState({}), []);
1087
- const clearFieldError = (0, import_react22.useCallback)(
929
+ const clearErrors = (0, import_react21.useCallback)(() => setErrorsState({}), []);
930
+ const clearFieldError = (0, import_react21.useCallback)(
1088
931
  (path) => {
1089
932
  if (errorsState[path] === void 0) {
1090
933
  return;
@@ -1097,7 +940,7 @@ function useFormErrors(initialErrors) {
1097
940
  },
1098
941
  [errorsState]
1099
942
  );
1100
- const setFieldError = (0, import_react22.useCallback)(
943
+ const setFieldError = (0, import_react21.useCallback)(
1101
944
  (path, error) => {
1102
945
  if (error == null || error === false) {
1103
946
  clearFieldError(path);
@@ -1117,7 +960,7 @@ function useFormErrors(initialErrors) {
1117
960
  }
1118
961
 
1119
962
  // ../../node_modules/@mantine/form/esm/hooks/use-form-list/use-form-list.mjs
1120
- var import_react23 = require("react");
963
+ var import_react22 = require("react");
1121
964
 
1122
965
  // ../../node_modules/@mantine/form/esm/lists/clear-list-state.mjs
1123
966
  function clearListState(field, state) {
@@ -1341,7 +1184,7 @@ function useFormList({
1341
1184
  $errors,
1342
1185
  $status
1343
1186
  }) {
1344
- const reorderListItem = (0, import_react23.useCallback)((path, payload) => {
1187
+ const reorderListItem = (0, import_react22.useCallback)((path, payload) => {
1345
1188
  $status.clearFieldDirty(path);
1346
1189
  $errors.setErrors((errs) => reorderErrors(path, payload, errs));
1347
1190
  $values.setValues({
@@ -1349,7 +1192,7 @@ function useFormList({
1349
1192
  updateState: true
1350
1193
  });
1351
1194
  }, []);
1352
- const removeListItem = (0, import_react23.useCallback)((path, index) => {
1195
+ const removeListItem = (0, import_react22.useCallback)((path, index) => {
1353
1196
  $status.clearFieldDirty(path);
1354
1197
  $errors.setErrors((errs) => changeErrorIndices(path, index, errs, -1));
1355
1198
  $values.setValues({
@@ -1357,7 +1200,7 @@ function useFormList({
1357
1200
  updateState: true
1358
1201
  });
1359
1202
  }, []);
1360
- const insertListItem = (0, import_react23.useCallback)((path, item, index) => {
1203
+ const insertListItem = (0, import_react22.useCallback)((path, item, index) => {
1361
1204
  $status.clearFieldDirty(path);
1362
1205
  $errors.setErrors((errs) => changeErrorIndices(path, index, errs, 1));
1363
1206
  $values.setValues({
@@ -1369,7 +1212,7 @@ function useFormList({
1369
1212
  }
1370
1213
 
1371
1214
  // ../../node_modules/@mantine/form/esm/hooks/use-form-status/use-form-status.mjs
1372
- var import_react24 = require("react");
1215
+ var import_react23 = require("react");
1373
1216
  var import_fast_deep_equal = __toESM(require_fast_deep_equal(), 1);
1374
1217
 
1375
1218
  // ../../node_modules/@mantine/form/esm/get-status/get-status.mjs
@@ -1389,31 +1232,31 @@ function useFormStatus({
1389
1232
  mode,
1390
1233
  $values
1391
1234
  }) {
1392
- const [touchedState, setTouchedState] = (0, import_react24.useState)(initialTouched);
1393
- const [dirtyState, setDirtyState] = (0, import_react24.useState)(initialDirty);
1394
- const touchedRef = (0, import_react24.useRef)(initialTouched);
1395
- const dirtyRef = (0, import_react24.useRef)(initialDirty);
1396
- const setTouched = (0, import_react24.useCallback)((values) => {
1235
+ const [touchedState, setTouchedState] = (0, import_react23.useState)(initialTouched);
1236
+ const [dirtyState, setDirtyState] = (0, import_react23.useState)(initialDirty);
1237
+ const touchedRef = (0, import_react23.useRef)(initialTouched);
1238
+ const dirtyRef = (0, import_react23.useRef)(initialDirty);
1239
+ const setTouched = (0, import_react23.useCallback)((values) => {
1397
1240
  const resolvedValues = typeof values === "function" ? values(touchedRef.current) : values;
1398
1241
  touchedRef.current = resolvedValues;
1399
1242
  if (mode === "controlled") {
1400
1243
  setTouchedState(resolvedValues);
1401
1244
  }
1402
1245
  }, []);
1403
- const setDirty = (0, import_react24.useCallback)((values) => {
1246
+ const setDirty = (0, import_react23.useCallback)((values) => {
1404
1247
  const resolvedValues = typeof values === "function" ? values(dirtyRef.current) : values;
1405
1248
  dirtyRef.current = resolvedValues;
1406
1249
  if (mode === "controlled") {
1407
1250
  setDirtyState(resolvedValues);
1408
1251
  }
1409
1252
  }, []);
1410
- const resetTouched = (0, import_react24.useCallback)(() => setTouched({}), []);
1253
+ const resetTouched = (0, import_react23.useCallback)(() => setTouched({}), []);
1411
1254
  const resetDirty = (values) => {
1412
1255
  const newSnapshot = values ? { ...values, ...$values.refValues.current } : $values.refValues.current;
1413
1256
  $values.setValuesSnapshot(newSnapshot);
1414
1257
  setDirty({});
1415
1258
  };
1416
- const setFieldTouched = (0, import_react24.useCallback)((path, touched) => {
1259
+ const setFieldTouched = (0, import_react23.useCallback)((path, touched) => {
1417
1260
  setTouched((currentTouched) => {
1418
1261
  if (getStatus(currentTouched, path) === touched) {
1419
1262
  return currentTouched;
@@ -1421,7 +1264,7 @@ function useFormStatus({
1421
1264
  return { ...currentTouched, [path]: touched };
1422
1265
  });
1423
1266
  }, []);
1424
- const setFieldDirty = (0, import_react24.useCallback)((path, dirty) => {
1267
+ const setFieldDirty = (0, import_react23.useCallback)((path, dirty) => {
1425
1268
  setDirty((currentDirty) => {
1426
1269
  if (getStatus(currentDirty, path) === dirty) {
1427
1270
  return currentDirty;
@@ -1429,11 +1272,11 @@ function useFormStatus({
1429
1272
  return { ...currentDirty, [path]: dirty };
1430
1273
  });
1431
1274
  }, []);
1432
- const isTouched = (0, import_react24.useCallback)(
1275
+ const isTouched = (0, import_react23.useCallback)(
1433
1276
  (path) => getStatus(touchedRef.current, path),
1434
1277
  []
1435
1278
  );
1436
- const clearFieldDirty = (0, import_react24.useCallback)(
1279
+ const clearFieldDirty = (0, import_react23.useCallback)(
1437
1280
  (path) => setDirty((current) => {
1438
1281
  if (typeof path !== "string") {
1439
1282
  return current;
@@ -1447,7 +1290,7 @@ function useFormStatus({
1447
1290
  }),
1448
1291
  []
1449
1292
  );
1450
- const isDirty = (0, import_react24.useCallback)((path) => {
1293
+ const isDirty = (0, import_react23.useCallback)((path) => {
1451
1294
  if (path) {
1452
1295
  const overriddenValue = getPath(path, dirtyRef.current);
1453
1296
  if (typeof overriddenValue === "boolean") {
@@ -1463,8 +1306,8 @@ function useFormStatus({
1463
1306
  }
1464
1307
  return !(0, import_fast_deep_equal.default)($values.refValues.current, $values.valuesSnapshot.current);
1465
1308
  }, []);
1466
- const getDirty = (0, import_react24.useCallback)(() => dirtyRef.current, []);
1467
- const getTouched = (0, import_react24.useCallback)(() => touchedRef.current, []);
1309
+ const getDirty = (0, import_react23.useCallback)(() => dirtyRef.current, []);
1310
+ const getTouched = (0, import_react23.useCallback)(() => touchedRef.current, []);
1468
1311
  return {
1469
1312
  touchedState,
1470
1313
  dirtyState,
@@ -1487,17 +1330,17 @@ function useFormStatus({
1487
1330
  }
1488
1331
 
1489
1332
  // ../../node_modules/@mantine/form/esm/hooks/use-form-values/use-form-values.mjs
1490
- var import_react25 = require("react");
1333
+ var import_react24 = require("react");
1491
1334
  function useFormValues({
1492
1335
  initialValues,
1493
1336
  onValuesChange,
1494
1337
  mode
1495
1338
  }) {
1496
- const initialized = (0, import_react25.useRef)(false);
1497
- const [stateValues, setStateValues] = (0, import_react25.useState)(initialValues || {});
1498
- const refValues = (0, import_react25.useRef)(stateValues);
1499
- const valuesSnapshot = (0, import_react25.useRef)(stateValues);
1500
- const setValues = (0, import_react25.useCallback)(
1339
+ const initialized = (0, import_react24.useRef)(false);
1340
+ const [stateValues, setStateValues] = (0, import_react24.useState)(initialValues || {});
1341
+ const refValues = (0, import_react24.useRef)(stateValues);
1342
+ const valuesSnapshot = (0, import_react24.useRef)(stateValues);
1343
+ const setValues = (0, import_react24.useCallback)(
1501
1344
  ({
1502
1345
  values,
1503
1346
  subscribers,
@@ -1514,7 +1357,7 @@ function useFormValues({
1514
1357
  },
1515
1358
  [onValuesChange]
1516
1359
  );
1517
- const setFieldValue = (0, import_react25.useCallback)((payload) => {
1360
+ const setFieldValue = (0, import_react24.useCallback)((payload) => {
1518
1361
  const currentValue = getPath(payload.path, refValues.current);
1519
1362
  const updatedValue = payload.value instanceof Function ? payload.value(currentValue) : payload.value;
1520
1363
  if (currentValue !== updatedValue) {
@@ -1526,10 +1369,10 @@ function useFormValues({
1526
1369
  );
1527
1370
  }
1528
1371
  }, []);
1529
- const setValuesSnapshot = (0, import_react25.useCallback)((payload) => {
1372
+ const setValuesSnapshot = (0, import_react24.useCallback)((payload) => {
1530
1373
  valuesSnapshot.current = payload;
1531
1374
  }, []);
1532
- const initialize = (0, import_react25.useCallback)((values, onInitialize) => {
1375
+ const initialize = (0, import_react24.useCallback)((values, onInitialize) => {
1533
1376
  if (!initialized.current) {
1534
1377
  initialized.current = true;
1535
1378
  setValues({ values, updateState: mode === "controlled" });
@@ -1537,14 +1380,14 @@ function useFormValues({
1537
1380
  onInitialize();
1538
1381
  }
1539
1382
  }, []);
1540
- const resetValues = (0, import_react25.useCallback)(() => {
1383
+ const resetValues = (0, import_react24.useCallback)(() => {
1541
1384
  setValues({
1542
1385
  values: valuesSnapshot.current,
1543
1386
  updateState: true,
1544
1387
  mergeWithPreviousValues: false
1545
1388
  });
1546
1389
  }, []);
1547
- const getValues = (0, import_react25.useCallback)(() => refValues.current, []);
1390
+ const getValues = (0, import_react24.useCallback)(() => refValues.current, []);
1548
1391
  return {
1549
1392
  initialized,
1550
1393
  stateValues,
@@ -1560,15 +1403,15 @@ function useFormValues({
1560
1403
  }
1561
1404
 
1562
1405
  // ../../node_modules/@mantine/form/esm/hooks/use-form-watch/use-form-watch.mjs
1563
- var import_react26 = require("react");
1406
+ var import_react25 = require("react");
1564
1407
  function useFormWatch({
1565
1408
  $status
1566
1409
  }) {
1567
- const subscribers = (0, import_react26.useRef)(
1410
+ const subscribers = (0, import_react25.useRef)(
1568
1411
  {}
1569
1412
  );
1570
- const watch = (0, import_react26.useCallback)((path, callback) => {
1571
- (0, import_react26.useEffect)(() => {
1413
+ const watch = (0, import_react25.useCallback)((path, callback) => {
1414
+ (0, import_react25.useEffect)(() => {
1572
1415
  subscribers.current[path] = subscribers.current[path] || [];
1573
1416
  subscribers.current[path].push(callback);
1574
1417
  return () => {
@@ -1576,7 +1419,7 @@ function useFormWatch({
1576
1419
  };
1577
1420
  }, [callback]);
1578
1421
  }, []);
1579
- const getFieldSubscribers = (0, import_react26.useCallback)((path) => {
1422
+ const getFieldSubscribers = (0, import_react25.useCallback)((path) => {
1580
1423
  if (!subscribers.current[path]) {
1581
1424
  return [];
1582
1425
  }
@@ -1596,6 +1439,11 @@ function useFormWatch({
1596
1439
  };
1597
1440
  }
1598
1441
 
1442
+ // ../../node_modules/@mantine/form/esm/paths/get-data-path.mjs
1443
+ function getDataPath(formName, fieldPath) {
1444
+ return formName ? `${formName}-${fieldPath.toString()}` : fieldPath.toString();
1445
+ }
1446
+
1599
1447
  // ../../node_modules/@mantine/form/esm/validate/validate-values.mjs
1600
1448
  function getValidationResults(errors) {
1601
1449
  const filteredErrors = filterErrors(errors);
@@ -1684,20 +1532,20 @@ function useForm({
1684
1532
  const $status = useFormStatus({ initialDirty, initialTouched, $values, mode });
1685
1533
  const $list = useFormList({ $values, $errors, $status });
1686
1534
  const $watch = useFormWatch({ $status });
1687
- const [formKey, setFormKey] = (0, import_react27.useState)(0);
1688
- const [fieldKeys, setFieldKeys] = (0, import_react27.useState)({});
1689
- const reset = (0, import_react27.useCallback)(() => {
1535
+ const [formKey, setFormKey] = (0, import_react26.useState)(0);
1536
+ const [fieldKeys, setFieldKeys] = (0, import_react26.useState)({});
1537
+ const reset = (0, import_react26.useCallback)(() => {
1690
1538
  $values.resetValues();
1691
1539
  $errors.clearErrors();
1692
1540
  $status.resetDirty();
1693
1541
  $status.resetTouched();
1694
1542
  mode === "uncontrolled" && setFormKey((key2) => key2 + 1);
1695
1543
  }, []);
1696
- const initialize = (0, import_react27.useCallback)((values) => {
1544
+ const initialize = (0, import_react26.useCallback)((values) => {
1697
1545
  $values.initialize(values, () => mode === "uncontrolled" && setFormKey((key2) => key2 + 1));
1698
1546
  }, []);
1699
- const setFieldValue = (0, import_react27.useCallback)(
1700
- (path, value, options3) => {
1547
+ const setFieldValue = (0, import_react26.useCallback)(
1548
+ (path, value, options2) => {
1701
1549
  const shouldValidate = shouldValidateOnChange(path, validateInputOnChange);
1702
1550
  $status.clearFieldDirty(path);
1703
1551
  $status.setFieldTouched(path, true);
@@ -1712,7 +1560,7 @@ function useForm({
1712
1560
  const validationResults = validateFieldValue(path, rules, payload.updatedValues);
1713
1561
  validationResults.hasError ? $errors.setFieldError(path, validationResults.error) : $errors.clearFieldError(path);
1714
1562
  } : null,
1715
- options3?.forceUpdate !== false && mode !== "controlled" ? () => setFieldKeys((keys) => ({
1563
+ options2?.forceUpdate !== false && mode !== "controlled" ? () => setFieldKeys((keys) => ({
1716
1564
  ...keys,
1717
1565
  [path]: (keys[path] || 0) + 1
1718
1566
  })) : null
@@ -1721,7 +1569,7 @@ function useForm({
1721
1569
  },
1722
1570
  [onValuesChange, rules]
1723
1571
  );
1724
- const setValues = (0, import_react27.useCallback)(
1572
+ const setValues = (0, import_react26.useCallback)(
1725
1573
  (values) => {
1726
1574
  const previousValues = $values.refValues.current;
1727
1575
  $values.setValues({ values, updateState: mode === "controlled" });
@@ -1737,12 +1585,12 @@ function useForm({
1737
1585
  },
1738
1586
  [onValuesChange, clearInputErrorOnChange]
1739
1587
  );
1740
- const validate = (0, import_react27.useCallback)(() => {
1588
+ const validate = (0, import_react26.useCallback)(() => {
1741
1589
  const results = validateValues(rules, $values.refValues.current);
1742
1590
  $errors.setErrors(results.errors);
1743
1591
  return results;
1744
1592
  }, [rules]);
1745
- const validateField = (0, import_react27.useCallback)(
1593
+ const validateField = (0, import_react26.useCallback)(
1746
1594
  (path) => {
1747
1595
  const results = validateFieldValue(path, rules, $values.refValues.current);
1748
1596
  results.hasError ? $errors.setFieldError(path, results.error) : $errors.clearFieldError(path);
@@ -1754,7 +1602,7 @@ function useForm({
1754
1602
  const onChange = getInputOnChange(
1755
1603
  (value) => setFieldValue(path, value, { forceUpdate: false })
1756
1604
  );
1757
- const payload = { onChange };
1605
+ const payload = { onChange, "data-path": getDataPath(name, path) };
1758
1606
  if (withError) {
1759
1607
  payload.error = $errors.errorsState[path];
1760
1608
  }
@@ -1798,15 +1646,19 @@ function useForm({
1798
1646
  }
1799
1647
  };
1800
1648
  const getTransformedValues = (input) => transformValues(input || $values.refValues.current);
1801
- const onReset = (0, import_react27.useCallback)((event) => {
1649
+ const onReset = (0, import_react26.useCallback)((event) => {
1802
1650
  event.preventDefault();
1803
1651
  reset();
1804
1652
  }, []);
1805
- const isValid = (0, import_react27.useCallback)(
1653
+ const isValid = (0, import_react26.useCallback)(
1806
1654
  (path) => path ? !validateFieldValue(path, rules, $values.refValues.current).hasError : !validateValues(rules, $values.refValues.current).hasErrors,
1807
1655
  [rules]
1808
1656
  );
1809
1657
  const key = (path) => `${formKey}-${path}-${fieldKeys[path] || 0}`;
1658
+ const getInputNode = (0, import_react26.useCallback)(
1659
+ (path) => document.querySelector(`[data-path="${getDataPath(name, path)}"]`),
1660
+ []
1661
+ );
1810
1662
  const form = {
1811
1663
  watch: $watch.watch,
1812
1664
  initialized: $values.initialized.current,
@@ -1840,25 +1692,26 @@ function useForm({
1840
1692
  onReset,
1841
1693
  isValid,
1842
1694
  getTransformedValues,
1843
- key
1695
+ key,
1696
+ getInputNode
1844
1697
  };
1845
1698
  useFormActions(name, form);
1846
1699
  return form;
1847
1700
  }
1848
1701
 
1849
1702
  // src/nodes/modifiers/noise-curve-node.tsx
1850
- var import_react28 = require("react");
1703
+ var import_react27 = require("react");
1851
1704
  var import_modifier4 = require("libnoise-ts/module/modifier");
1852
1705
  var import_util = require("libnoise-ts/util");
1853
1706
  var import_icons_react2 = require("@tabler/icons-react");
1854
- var import_hooks22 = require("@mantine/hooks");
1855
- var import_abstract3 = require("@awesome-flow/core/abstract");
1856
- var import_jsx_runtime23 = require("react/jsx-runtime");
1707
+ var import_hooks21 = require("@mantine/hooks");
1708
+ var import_abstract2 = require("@awesome-flow/core/abstract");
1709
+ var import_jsx_runtime20 = require("react/jsx-runtime");
1857
1710
  function NoiseCurveNode({ id, selected, data, type }) {
1858
- const incoming = (0, import_hooks21.useIncomingComputedData)(id);
1859
- const updateNodeData = (0, import_hooks21.useUpdateNodeData)();
1860
- const updateComputedData = (0, import_hooks21.useUpdateNodeComputedData)();
1861
- const [values, setValues] = (0, import_react28.useState)([]);
1711
+ const incoming = (0, import_hooks20.useIncomingComputedData)(id);
1712
+ const updateNodeData = (0, import_hooks20.useUpdateNodeData)();
1713
+ const updateComputedData = (0, import_hooks20.useUpdateNodeComputedData)();
1714
+ const [values, setValues] = (0, import_react27.useState)([]);
1862
1715
  const form = useForm({
1863
1716
  mode: "uncontrolled",
1864
1717
  initialValues: {
@@ -1877,7 +1730,7 @@ function NoiseCurveNode({ id, selected, data, type }) {
1877
1730
  }
1878
1731
  }
1879
1732
  },
1880
- onValuesChange: (0, import_react28.useCallback)((values2) => {
1733
+ onValuesChange: (0, import_react27.useCallback)((values2) => {
1881
1734
  if (form.isValid()) {
1882
1735
  const points = values2.points.map((v) => ({ input: v.input, output: v.output }));
1883
1736
  setValues(points);
@@ -1886,11 +1739,11 @@ function NoiseCurveNode({ id, selected, data, type }) {
1886
1739
  form.validate();
1887
1740
  }, [])
1888
1741
  });
1889
- (0, import_react28.useEffect)(() => {
1890
- const points = data.points?.length ? data.points.map((v) => ({ input: v.input, output: v.output, key: (0, import_hooks22.randomId)() })) : [1, 2, 3, 4].map(() => ({ input: 0, output: 0, key: (0, import_hooks22.randomId)() }));
1742
+ (0, import_react27.useEffect)(() => {
1743
+ const points = data.points?.length ? data.points.map((v) => ({ input: v.input, output: v.output, key: (0, import_hooks21.randomId)() })) : [1, 2, 3, 4].map(() => ({ input: 0, output: 0, key: (0, import_hooks21.randomId)() }));
1891
1744
  form.initialize({ points });
1892
1745
  }, []);
1893
- (0, import_react28.useEffect)(() => {
1746
+ (0, import_react27.useEffect)(() => {
1894
1747
  if (incoming?.length && values?.length >= 4) {
1895
1748
  const module2 = new import_modifier4.Curve(
1896
1749
  incoming[0].module,
@@ -1899,9 +1752,9 @@ function NoiseCurveNode({ id, selected, data, type }) {
1899
1752
  updateComputedData(id, { module: module2 });
1900
1753
  }
1901
1754
  }, [values, incoming]);
1902
- const fields = form.getValues().points.map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(import_core12.Group, { mt: "xs", children: [
1903
- /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
1904
- import_core12.NumberInput,
1755
+ const fields = form.getValues().points.map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(import_core10.Group, { mt: "xs", children: [
1756
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
1757
+ import_core10.NumberInput,
1905
1758
  {
1906
1759
  size: "xs",
1907
1760
  w: 100,
@@ -1911,8 +1764,8 @@ function NoiseCurveNode({ id, selected, data, type }) {
1911
1764
  },
1912
1765
  form.key(`points.${index}.input`)
1913
1766
  ),
1914
- /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
1915
- import_core12.NumberInput,
1767
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
1768
+ import_core10.NumberInput,
1916
1769
  {
1917
1770
  size: "xs",
1918
1771
  w: 100,
@@ -1922,61 +1775,61 @@ function NoiseCurveNode({ id, selected, data, type }) {
1922
1775
  },
1923
1776
  form.key(`points.${index}.output`)
1924
1777
  ),
1925
- data.state === import_abstract3.NodeState.edit && values.length > 4 && /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
1926
- import_core12.ActionIcon,
1778
+ data.state === import_abstract2.NodeState.edit && values.length > 4 && /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
1779
+ import_core10.ActionIcon,
1927
1780
  {
1928
1781
  color: "red",
1929
1782
  variant: "outline",
1930
1783
  size: "sm",
1931
1784
  onClick: () => form.removeListItem("points", index),
1932
- children: /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_icons_react2.IconX, { size: "1rem" })
1785
+ children: /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_icons_react2.IconX, { size: "1rem" })
1933
1786
  }
1934
1787
  )
1935
1788
  ] }, item.key));
1936
- return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(import_layout20.NodeContainer, { id, selected, type, data, children: [
1789
+ return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(import_layout20.NodeContainer, { id, selected, type, data, children: [
1937
1790
  fields,
1938
- data.state === import_abstract3.NodeState.edit && /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(import_jsx_runtime23.Fragment, { children: [
1939
- /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_core12.Space, { h: 10 }),
1940
- /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
1941
- import_core12.Button,
1791
+ data.state === import_abstract2.NodeState.edit && /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(import_jsx_runtime20.Fragment, { children: [
1792
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_core10.Space, { h: 10 }),
1793
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
1794
+ import_core10.Button,
1942
1795
  {
1943
1796
  variant: "outline",
1944
1797
  size: "xs",
1945
1798
  fullWidth: true,
1946
- onClick: () => form.insertListItem("points", { input: 0, output: 0, key: (0, import_hooks22.randomId)() }),
1799
+ onClick: () => form.insertListItem("points", { input: 0, output: 0, key: (0, import_hooks21.randomId)() }),
1947
1800
  children: "Add control point"
1948
1801
  }
1949
1802
  )
1950
1803
  ] }),
1951
- /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_layout20.NodeTrackConnections, { handles: data.handles, nodeId: id, type: "target" })
1804
+ /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_layout20.NodeTrackConnections, { handles: data.handles, nodeId: id, type: "target" })
1952
1805
  ] });
1953
1806
  }
1954
1807
  var noise_curve_node_default = NoiseCurveNode;
1955
1808
 
1956
1809
  // src/nodes/modifiers/noise-exponent-node.tsx
1957
1810
  var import_layout21 = require("@awesome-flow/core/layout");
1958
- var import_react29 = require("react");
1959
- var import_core13 = require("@mantine/core");
1960
- var import_hooks23 = require("@awesome-flow/core/hooks");
1811
+ var import_react28 = require("react");
1812
+ var import_core11 = require("@mantine/core");
1813
+ var import_hooks22 = require("@awesome-flow/core/hooks");
1961
1814
  var import_modifier5 = require("libnoise-ts/module/modifier");
1962
- var import_jsx_runtime24 = require("react/jsx-runtime");
1815
+ var import_jsx_runtime21 = require("react/jsx-runtime");
1963
1816
  function NoiseExponentNode({ id, selected, data, type }) {
1964
- const [exponent, setExponent] = (0, import_react29.useState)(data.exponent);
1965
- const incoming = (0, import_hooks23.useIncomingComputedData)(id);
1966
- const updateNodeData = (0, import_hooks23.useUpdateNodeData)();
1967
- const updateComputedData = (0, import_hooks23.useUpdateNodeComputedData)();
1968
- (0, import_react29.useEffect)(() => {
1817
+ const [exponent, setExponent] = (0, import_react28.useState)(data.exponent);
1818
+ const incoming = (0, import_hooks22.useIncomingComputedData)(id);
1819
+ const updateNodeData = (0, import_hooks22.useUpdateNodeData)();
1820
+ const updateComputedData = (0, import_hooks22.useUpdateNodeComputedData)();
1821
+ (0, import_react28.useEffect)(() => {
1969
1822
  if (incoming?.length > 0) {
1970
1823
  const module2 = new import_modifier5.Exponent(incoming[0].module, exponent);
1971
1824
  updateComputedData(id, { module: module2 });
1972
1825
  }
1973
1826
  updateNodeData(id, { exponent });
1974
1827
  }, [incoming, exponent]);
1975
- return /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(import_layout21.NodeContainer, { id, selected, data, type, children: [
1976
- /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_core13.Stack, { children: /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(import_core13.Group, { children: [
1828
+ return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(import_layout21.NodeContainer, { id, selected, data, type, children: [
1829
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_core11.Stack, { children: /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(import_core11.Group, { children: [
1977
1830
  "Exponent:",
1978
- /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
1979
- import_core13.NumberInput,
1831
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
1832
+ import_core11.NumberInput,
1980
1833
  {
1981
1834
  size: "xs",
1982
1835
  value: exponent,
@@ -1985,56 +1838,56 @@ function NoiseExponentNode({ id, selected, data, type }) {
1985
1838
  }
1986
1839
  )
1987
1840
  ] }) }),
1988
- /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_layout21.NodeTrackConnections, { handles: data.handles, nodeId: id, type: "target" })
1841
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_layout21.NodeTrackConnections, { handles: data.handles, nodeId: id, type: "target" })
1989
1842
  ] });
1990
1843
  }
1991
1844
  var noise_exponent_node_default = NoiseExponentNode;
1992
1845
 
1993
1846
  // src/nodes/modifiers/noise-invert-node.tsx
1994
1847
  var import_layout22 = require("@awesome-flow/core/layout");
1995
- var import_react30 = require("react");
1996
- var import_hooks24 = require("@awesome-flow/core/hooks");
1848
+ var import_react29 = require("react");
1849
+ var import_hooks23 = require("@awesome-flow/core/hooks");
1997
1850
  var import_modifier6 = require("libnoise-ts/module/modifier");
1998
- var import_jsx_runtime25 = require("react/jsx-runtime");
1851
+ var import_jsx_runtime22 = require("react/jsx-runtime");
1999
1852
  function NoiseInvertNode({ id, selected, data, type }) {
2000
- const incoming = (0, import_hooks24.useIncomingComputedData)(id);
2001
- const updateComputedData = (0, import_hooks24.useUpdateNodeComputedData)();
2002
- (0, import_react30.useEffect)(() => {
1853
+ const incoming = (0, import_hooks23.useIncomingComputedData)(id);
1854
+ const updateComputedData = (0, import_hooks23.useUpdateNodeComputedData)();
1855
+ (0, import_react29.useEffect)(() => {
2003
1856
  if (incoming?.length > 0) {
2004
1857
  const module2 = new import_modifier6.Invert(incoming[0].module);
2005
1858
  updateComputedData(id, { module: module2 });
2006
1859
  }
2007
1860
  }, [incoming]);
2008
- return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_layout22.NodeContainer, { id, selected, data, type, children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_layout22.NodeTrackConnections, { handles: data.handles, nodeId: id, type: "target" }) });
1861
+ return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_layout22.NodeContainer, { id, selected, data, type, children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(import_layout22.NodeTrackConnections, { handles: data.handles, nodeId: id, type: "target" }) });
2009
1862
  }
2010
1863
  var noise_invert_node_default = NoiseInvertNode;
2011
1864
 
2012
1865
  // src/nodes/modifiers/noise-scale-bias-node.tsx
2013
1866
  var import_layout23 = require("@awesome-flow/core/layout");
2014
- var import_react31 = require("react");
2015
- var import_core14 = require("@mantine/core");
2016
- var import_hooks25 = require("@awesome-flow/core/hooks");
1867
+ var import_react30 = require("react");
1868
+ var import_core12 = require("@mantine/core");
1869
+ var import_hooks24 = require("@awesome-flow/core/hooks");
2017
1870
  var import_modifier7 = require("libnoise-ts/module/modifier");
2018
- var import_jsx_runtime26 = require("react/jsx-runtime");
1871
+ var import_jsx_runtime23 = require("react/jsx-runtime");
2019
1872
  function NoiseScaleBiasNode({ id, selected, data, type }) {
2020
- const [scale, setScale] = (0, import_react31.useState)(data.scale);
2021
- const [bias, setBias] = (0, import_react31.useState)(data.bias);
2022
- const incoming = (0, import_hooks25.useIncomingComputedData)(id);
2023
- const updateNodeData = (0, import_hooks25.useUpdateNodeData)();
2024
- const updateComputedData = (0, import_hooks25.useUpdateNodeComputedData)();
2025
- (0, import_react31.useEffect)(() => {
1873
+ const [scale, setScale] = (0, import_react30.useState)(data.scale);
1874
+ const [bias, setBias] = (0, import_react30.useState)(data.bias);
1875
+ const incoming = (0, import_hooks24.useIncomingComputedData)(id);
1876
+ const updateNodeData = (0, import_hooks24.useUpdateNodeData)();
1877
+ const updateComputedData = (0, import_hooks24.useUpdateNodeComputedData)();
1878
+ (0, import_react30.useEffect)(() => {
2026
1879
  if (incoming?.length > 0) {
2027
1880
  const module2 = new import_modifier7.ScaleBias(incoming[0].module, scale, bias);
2028
1881
  updateComputedData(id, { module: module2 });
2029
1882
  }
2030
1883
  updateNodeData(id, { scale, bias });
2031
1884
  }, [incoming, scale, bias]);
2032
- return /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(import_layout23.NodeContainer, { id, selected, data, type, children: [
2033
- /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(import_core14.Stack, { children: [
2034
- /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(import_core14.Group, { children: [
1885
+ return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(import_layout23.NodeContainer, { id, selected, data, type, children: [
1886
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(import_core12.Stack, { children: [
1887
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(import_core12.Group, { children: [
2035
1888
  "Scale:",
2036
- /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
2037
- import_core14.NumberInput,
1889
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
1890
+ import_core12.NumberInput,
2038
1891
  {
2039
1892
  size: "xs",
2040
1893
  w: 100,
@@ -2044,10 +1897,10 @@ function NoiseScaleBiasNode({ id, selected, data, type }) {
2044
1897
  }
2045
1898
  )
2046
1899
  ] }),
2047
- /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(import_core14.Group, { children: [
1900
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(import_core12.Group, { children: [
2048
1901
  "Bias:",
2049
- /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
2050
- import_core14.NumberInput,
1902
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
1903
+ import_core12.NumberInput,
2051
1904
  {
2052
1905
  size: "xs",
2053
1906
  w: 100,
@@ -2058,26 +1911,26 @@ function NoiseScaleBiasNode({ id, selected, data, type }) {
2058
1911
  )
2059
1912
  ] })
2060
1913
  ] }),
2061
- /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_layout23.NodeTrackConnections, { handles: data.handles, nodeId: id, type: "target" })
1914
+ /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_layout23.NodeTrackConnections, { handles: data.handles, nodeId: id, type: "target" })
2062
1915
  ] });
2063
1916
  }
2064
1917
  var noise_scale_bias_node_default = NoiseScaleBiasNode;
2065
1918
 
2066
1919
  // src/nodes/modifiers/noise-terrace-node.tsx
2067
1920
  var import_layout24 = require("@awesome-flow/core/layout");
2068
- var import_core15 = require("@mantine/core");
2069
- var import_hooks26 = require("@awesome-flow/core/hooks");
2070
- var import_react32 = require("react");
1921
+ var import_core13 = require("@mantine/core");
1922
+ var import_hooks25 = require("@awesome-flow/core/hooks");
1923
+ var import_react31 = require("react");
2071
1924
  var import_modifier8 = require("libnoise-ts/module/modifier");
2072
1925
  var import_icons_react3 = require("@tabler/icons-react");
2073
- var import_hooks27 = require("@mantine/hooks");
2074
- var import_abstract4 = require("@awesome-flow/core/abstract");
2075
- var import_jsx_runtime27 = require("react/jsx-runtime");
1926
+ var import_hooks26 = require("@mantine/hooks");
1927
+ var import_abstract3 = require("@awesome-flow/core/abstract");
1928
+ var import_jsx_runtime24 = require("react/jsx-runtime");
2076
1929
  function NoiseTerraceNode({ id, selected, data, type }) {
2077
- const incoming = (0, import_hooks26.useIncomingComputedData)(id);
2078
- const updateNodeData = (0, import_hooks26.useUpdateNodeData)();
2079
- const updateComputedData = (0, import_hooks26.useUpdateNodeComputedData)();
2080
- const [values, setValues] = (0, import_react32.useState)([]);
1930
+ const incoming = (0, import_hooks25.useIncomingComputedData)(id);
1931
+ const updateNodeData = (0, import_hooks25.useUpdateNodeData)();
1932
+ const updateComputedData = (0, import_hooks25.useUpdateNodeComputedData)();
1933
+ const [values, setValues] = (0, import_react31.useState)([]);
2081
1934
  const form = useForm({
2082
1935
  mode: "uncontrolled",
2083
1936
  initialValues: {
@@ -2085,7 +1938,7 @@ function NoiseTerraceNode({ id, selected, data, type }) {
2085
1938
  },
2086
1939
  validateInputOnChange: [`points.${FORM_INDEX}.input`],
2087
1940
  clearInputErrorOnChange: true,
2088
- onValuesChange: (0, import_react32.useCallback)((values2) => {
1941
+ onValuesChange: (0, import_react31.useCallback)((values2) => {
2089
1942
  if (form.isValid()) {
2090
1943
  const points = values2.points.map((v) => v.value);
2091
1944
  setValues(points);
@@ -2094,19 +1947,19 @@ function NoiseTerraceNode({ id, selected, data, type }) {
2094
1947
  form.validate();
2095
1948
  }, [])
2096
1949
  });
2097
- (0, import_react32.useEffect)(() => {
2098
- const points = data.points?.length ? data.points.map((v) => ({ value: v, key: (0, import_hooks27.randomId)() })) : [1, 2].map(() => ({ value: 0, key: (0, import_hooks27.randomId)() }));
1950
+ (0, import_react31.useEffect)(() => {
1951
+ const points = data.points?.length ? data.points.map((v) => ({ value: v, key: (0, import_hooks26.randomId)() })) : [1, 2].map(() => ({ value: 0, key: (0, import_hooks26.randomId)() }));
2099
1952
  form.initialize({ points });
2100
1953
  }, []);
2101
- (0, import_react32.useEffect)(() => {
1954
+ (0, import_react31.useEffect)(() => {
2102
1955
  if (incoming?.length && values?.length >= 2) {
2103
1956
  const module2 = new import_modifier8.Terrace(incoming[0].module, values);
2104
1957
  updateComputedData(id, { module: module2 });
2105
1958
  }
2106
1959
  }, [values, incoming]);
2107
- const fields = form.getValues().points.map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(import_core15.Group, { mt: "xs", children: [
2108
- /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
2109
- import_core15.NumberInput,
1960
+ const fields = form.getValues().points.map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(import_core13.Group, { mt: "xs", children: [
1961
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
1962
+ import_core13.NumberInput,
2110
1963
  {
2111
1964
  size: "xs",
2112
1965
  placeholder: "Input Value",
@@ -2115,97 +1968,119 @@ function NoiseTerraceNode({ id, selected, data, type }) {
2115
1968
  },
2116
1969
  form.key(`points.${index}.value`)
2117
1970
  ),
2118
- data.state === import_abstract4.NodeState.edit && values.length > 2 && /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
2119
- import_core15.ActionIcon,
1971
+ data.state === import_abstract3.NodeState.edit && values.length > 2 && /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
1972
+ import_core13.ActionIcon,
2120
1973
  {
2121
1974
  color: "red",
2122
1975
  variant: "outline",
2123
1976
  size: "sm",
2124
1977
  onClick: () => form.removeListItem("points", index),
2125
- children: /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_icons_react3.IconX, { size: "1rem" })
1978
+ children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_icons_react3.IconX, { size: "1rem" })
2126
1979
  }
2127
1980
  )
2128
1981
  ] }, item.key));
2129
- return /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(import_layout24.NodeContainer, { id, selected, type, data, children: [
1982
+ return /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(import_layout24.NodeContainer, { id, selected, type, data, children: [
2130
1983
  fields,
2131
- data.state === import_abstract4.NodeState.edit && /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(import_jsx_runtime27.Fragment, { children: [
2132
- /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_core15.Space, { h: 10 }),
2133
- /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
2134
- import_core15.Button,
1984
+ data.state === import_abstract3.NodeState.edit && /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(import_jsx_runtime24.Fragment, { children: [
1985
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_core13.Space, { h: 10 }),
1986
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
1987
+ import_core13.Button,
2135
1988
  {
2136
1989
  variant: "outline",
2137
1990
  size: "xs",
2138
1991
  fullWidth: true,
2139
- onClick: () => form.insertListItem("points", { value: 0, key: (0, import_hooks27.randomId)() }),
1992
+ onClick: () => form.insertListItem("points", { value: 0, key: (0, import_hooks26.randomId)() }),
2140
1993
  children: "Add control point"
2141
1994
  }
2142
1995
  )
2143
1996
  ] }),
2144
- /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_layout24.NodeTrackConnections, { handles: data.handles, nodeId: id, type: "target" })
1997
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_layout24.NodeTrackConnections, { handles: data.handles, nodeId: id, type: "target" })
2145
1998
  ] });
2146
1999
  }
2147
2000
  var noise_terrace_node_default = NoiseTerraceNode;
2148
2001
 
2149
2002
  // src/nodes/selectors/noise-blend-node.tsx
2150
2003
  var import_layout25 = require("@awesome-flow/core/layout");
2151
- var import_react33 = require("react");
2152
- var import_hooks28 = require("@awesome-flow/core/hooks");
2004
+ var import_react32 = require("react");
2005
+ var import_hooks27 = require("@awesome-flow/core/hooks");
2153
2006
  var import_selector = require("libnoise-ts/module/selector");
2154
- var import_core16 = require("@mantine/core");
2155
- var import_jsx_runtime28 = require("react/jsx-runtime");
2007
+ var import_components8 = require("@awesome-flow/core/components");
2008
+ var import_jsx_runtime25 = require("react/jsx-runtime");
2156
2009
  function NoiseBlendNode({ id, selected, data, type }) {
2157
- const incoming = (0, import_hooks28.useIncomingComputedData)(id);
2158
- const updateComputedData = (0, import_hooks28.useUpdateNodeComputedData)();
2159
- (0, import_react33.useEffect)(() => {
2160
- if (incoming?.length > 2) {
2161
- const module2 = new import_selector.Blend(incoming[0].module, incoming[1].module, incoming[2].module);
2162
- updateComputedData(id, { module: module2 });
2163
- }
2164
- }, [id, incoming, updateComputedData]);
2165
- return /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(import_layout25.NodeContainer, { id, selected, data, type, children: [
2166
- /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(import_core16.Group, { children: [
2167
- "Modules: ",
2168
- incoming?.length
2169
- ] }),
2170
- /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_layout25.NodeTrackConnections, { handles: data.handles, nodeId: id, type: "target" })
2010
+ const updateComputedData = (0, import_hooks27.useUpdateNodeComputedData)();
2011
+ const onDataUpdated = (0, import_react32.useCallback)(
2012
+ (incomingData) => {
2013
+ const incomingSources = incomingData["source" /* source */];
2014
+ const incomingControl = incomingData["control" /* control */];
2015
+ if (incomingSources?.length >= 2 && incomingControl?.length) {
2016
+ const module2 = new import_selector.Blend(
2017
+ incomingSources[0].module,
2018
+ incomingSources[1].module,
2019
+ incomingControl[0].module
2020
+ );
2021
+ updateComputedData(id, { module: module2 });
2022
+ }
2023
+ },
2024
+ []
2025
+ );
2026
+ return /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(import_layout25.NodeContainer, { id, selected, data, type, children: [
2027
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
2028
+ import_components8.HandlesIncomingDataStatus,
2029
+ {
2030
+ nodeId: id,
2031
+ handles: data.handles,
2032
+ handleKey: "dataId",
2033
+ onDataUpdated,
2034
+ type: "target",
2035
+ resetComputedData: true
2036
+ }
2037
+ ),
2038
+ /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_layout25.NodeTrackConnections, { handles: data.handles, nodeId: id, type: "target" })
2171
2039
  ] });
2172
2040
  }
2173
2041
  var noise_blend_node_default = NoiseBlendNode;
2174
2042
 
2175
2043
  // src/nodes/selectors/noise-select-node.tsx
2176
2044
  var import_layout26 = require("@awesome-flow/core/layout");
2177
- var import_react34 = require("react");
2178
- var import_hooks29 = require("@awesome-flow/core/hooks");
2045
+ var import_react33 = require("react");
2046
+ var import_hooks28 = require("@awesome-flow/core/hooks");
2179
2047
  var import_selector2 = require("libnoise-ts/module/selector");
2180
- var import_core17 = require("@mantine/core");
2181
- var import_jsx_runtime29 = require("react/jsx-runtime");
2048
+ var import_core14 = require("@mantine/core");
2049
+ var import_components9 = require("@awesome-flow/core/components");
2050
+ var import_jsx_runtime26 = require("react/jsx-runtime");
2182
2051
  function NoiseSelectNode({ id, selected, data, type }) {
2183
- const [edgeFalloff, setEdgeFalloff] = (0, import_react34.useState)(data.edgeFalloff);
2184
- const [lowerBound, setLowerBound] = (0, import_react34.useState)(data.lowerBound);
2185
- const [upperBound, setUpperBound] = (0, import_react34.useState)(data.upperBound);
2186
- const incoming = (0, import_hooks29.useIncomingComputedData)(id);
2187
- const updateNodeData = (0, import_hooks29.useUpdateNodeData)();
2188
- const updateComputedData = (0, import_hooks29.useUpdateNodeComputedData)();
2189
- (0, import_react34.useEffect)(() => {
2190
- if (incoming?.length > 2) {
2191
- const module2 = new import_selector2.Select(
2192
- incoming[0].module,
2193
- incoming[1].module,
2194
- incoming[2].module,
2195
- edgeFalloff,
2196
- lowerBound,
2197
- upperBound
2198
- );
2199
- updateComputedData(id, { module: module2 });
2200
- }
2052
+ const [edgeFalloff, setEdgeFalloff] = (0, import_react33.useState)(data.edgeFalloff);
2053
+ const [lowerBound, setLowerBound] = (0, import_react33.useState)(data.lowerBound);
2054
+ const [upperBound, setUpperBound] = (0, import_react33.useState)(data.upperBound);
2055
+ const updateNodeData = (0, import_hooks28.useUpdateNodeData)();
2056
+ const updateComputedData = (0, import_hooks28.useUpdateNodeComputedData)();
2057
+ (0, import_react33.useEffect)(() => {
2201
2058
  updateNodeData(id, { edgeFalloff, lowerBound, upperBound });
2202
- }, [incoming, edgeFalloff, lowerBound, upperBound, updateNodeData, id, updateComputedData]);
2203
- return /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(import_layout26.NodeContainer, { id, selected, data, type, children: [
2204
- /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(import_core17.Stack, { children: [
2205
- /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(import_core17.Group, { children: [
2059
+ }, [edgeFalloff, lowerBound, upperBound]);
2060
+ const onDataUpdated = (0, import_react33.useCallback)(
2061
+ (incomingData) => {
2062
+ const incomingSources = incomingData["source" /* source */];
2063
+ const incomingControl = incomingData["control" /* control */];
2064
+ if (incomingSources?.length >= 2 && incomingControl?.length) {
2065
+ const module2 = new import_selector2.Select(
2066
+ incomingSources[0].module,
2067
+ incomingSources[1].module,
2068
+ incomingControl[0].module,
2069
+ edgeFalloff,
2070
+ lowerBound,
2071
+ upperBound
2072
+ );
2073
+ updateComputedData(id, { module: module2 });
2074
+ }
2075
+ },
2076
+ []
2077
+ );
2078
+ return /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(import_layout26.NodeContainer, { id, selected, data, type, children: [
2079
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(import_core14.Stack, { children: [
2080
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(import_core14.Group, { children: [
2206
2081
  "Edge Falloff:",
2207
- /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
2208
- import_core17.NumberInput,
2082
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
2083
+ import_core14.NumberInput,
2209
2084
  {
2210
2085
  size: "xs",
2211
2086
  w: 100,
@@ -2215,10 +2090,10 @@ function NoiseSelectNode({ id, selected, data, type }) {
2215
2090
  }
2216
2091
  )
2217
2092
  ] }),
2218
- /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(import_core17.Group, { children: [
2093
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(import_core14.Group, { children: [
2219
2094
  "Lower Bound:",
2220
- /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
2221
- import_core17.NumberInput,
2095
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
2096
+ import_core14.NumberInput,
2222
2097
  {
2223
2098
  size: "xs",
2224
2099
  w: 100,
@@ -2228,10 +2103,10 @@ function NoiseSelectNode({ id, selected, data, type }) {
2228
2103
  }
2229
2104
  )
2230
2105
  ] }),
2231
- /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(import_core17.Group, { children: [
2106
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(import_core14.Group, { children: [
2232
2107
  "Upper Bound:",
2233
- /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
2234
- import_core17.NumberInput,
2108
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
2109
+ import_core14.NumberInput,
2235
2110
  {
2236
2111
  size: "xs",
2237
2112
  w: 100,
@@ -2241,97 +2116,99 @@ function NoiseSelectNode({ id, selected, data, type }) {
2241
2116
  }
2242
2117
  )
2243
2118
  ] }),
2244
- /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(import_core17.Group, { children: [
2245
- "Modules: ",
2246
- incoming?.length
2247
- ] })
2119
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
2120
+ import_components9.HandlesIncomingDataStatus,
2121
+ {
2122
+ nodeId: id,
2123
+ handles: data.handles,
2124
+ handleKey: "dataId",
2125
+ onDataUpdated,
2126
+ type: "target",
2127
+ resetComputedData: true
2128
+ }
2129
+ )
2248
2130
  ] }),
2249
- /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_layout26.NodeTrackConnections, { handles: data.handles, nodeId: id, type: "target" })
2131
+ /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_layout26.NodeTrackConnections, { handles: data.handles, nodeId: id, type: "target" })
2250
2132
  ] });
2251
2133
  }
2252
2134
  var noise_select_node_default = NoiseSelectNode;
2253
2135
 
2254
2136
  // src/nodes/transformers/noise-displace-node.tsx
2255
2137
  var import_layout27 = require("@awesome-flow/core/layout");
2256
- var import_react35 = require("react");
2257
- var import_hooks30 = require("@awesome-flow/core/hooks");
2138
+ var import_react34 = require("react");
2139
+ var import_hooks29 = require("@awesome-flow/core/hooks");
2258
2140
  var import_transformer = require("libnoise-ts/module/transformer");
2259
- var import_core18 = require("@mantine/core");
2260
- var import_jsx_runtime30 = require("react/jsx-runtime");
2141
+ var import_components10 = require("@awesome-flow/core/components");
2142
+ var import_jsx_runtime27 = require("react/jsx-runtime");
2261
2143
  function NoiseDisplaceNode({ id, selected, data, type }) {
2262
- const updateComputedData = (0, import_hooks30.useUpdateNodeComputedData)();
2263
- const incomingHandleData = (0, import_hooks30.useIncomingHandleData)(id, data.handles);
2264
- const { sourceModule, xModule, yModule, zModule } = (0, import_react35.useMemo)(() => {
2265
- return {
2266
- sourceModule: incomingHandleData["source" /* sourceModule */],
2267
- xModule: incomingHandleData["x-module" /* xModule */],
2268
- yModule: incomingHandleData["y-module" /* yModule */],
2269
- zModule: incomingHandleData["z-module" /* zModule */]
2270
- };
2271
- }, [incomingHandleData]);
2272
- (0, import_react35.useEffect)(() => {
2273
- if (sourceModule && xModule && yModule && zModule) {
2274
- const module2 = new import_transformer.Displace(
2275
- sourceModule[0].module,
2276
- xModule[0].module,
2277
- yModule[0].module,
2278
- zModule[0].module
2279
- );
2280
- updateComputedData(id, { module: module2 });
2281
- }
2282
- }, [id, updateComputedData, sourceModule, xModule, yModule, zModule]);
2283
- const { sourceColor, xColor, yColor, zColor } = (0, import_react35.useMemo)(() => {
2284
- return {
2285
- sourceColor: sourceModule ? "green" : "orange",
2286
- xColor: xModule ? "green" : "orange",
2287
- yColor: yModule ? "green" : "orange",
2288
- zColor: zModule ? "green" : "orange"
2289
- };
2290
- }, [sourceModule, xModule, yModule, zModule]);
2291
- return /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(import_layout27.NodeContainer, { id, selected, data, type, children: [
2292
- /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(import_core18.Stack, { align: "center", children: [
2293
- /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_core18.Badge, { color: sourceColor, children: "Source Module" }),
2294
- /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_core18.Badge, { color: xColor, children: "X Module" }),
2295
- /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_core18.Badge, { color: yColor, children: "Y Module" }),
2296
- /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_core18.Badge, { color: zColor, children: "Z Module" })
2297
- ] }),
2298
- /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_layout27.NodeTrackConnections, { handles: data.handles, nodeId: id, type: "target" })
2144
+ const updateComputedData = (0, import_hooks29.useUpdateNodeComputedData)();
2145
+ const onDataUpdated = (0, import_react34.useCallback)(
2146
+ (handleData) => {
2147
+ const sourceModule = handleData["source" /* sourceModule */];
2148
+ const xModule = handleData["x-module" /* xModule */];
2149
+ const yModule = handleData["y-module" /* yModule */];
2150
+ const zModule = handleData["z-module" /* zModule */];
2151
+ if (sourceModule && xModule && yModule && zModule) {
2152
+ const module2 = new import_transformer.Displace(
2153
+ sourceModule[0].module,
2154
+ xModule[0].module,
2155
+ yModule[0].module,
2156
+ zModule[0].module
2157
+ );
2158
+ updateComputedData(id, { module: module2 });
2159
+ }
2160
+ },
2161
+ []
2162
+ );
2163
+ return /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(import_layout27.NodeContainer, { id, selected, data, type, children: [
2164
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
2165
+ import_components10.HandlesIncomingDataStatus,
2166
+ {
2167
+ nodeId: id,
2168
+ handles: data.handles,
2169
+ handleKey: "dataId",
2170
+ onDataUpdated,
2171
+ type: "target",
2172
+ resetComputedData: true
2173
+ }
2174
+ ),
2175
+ /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_layout27.NodeTrackConnections, { handles: data.handles, nodeId: id, type: "target" })
2299
2176
  ] });
2300
2177
  }
2301
2178
  var noise_displace_node_default = NoiseDisplaceNode;
2302
2179
 
2303
2180
  // src/nodes/transformers/noise-rotate-point-node.tsx
2304
2181
  var import_layout28 = require("@awesome-flow/core/layout");
2305
- var import_react36 = require("react");
2306
- var import_hooks31 = require("@awesome-flow/core/hooks");
2307
- var import_core19 = require("@mantine/core");
2182
+ var import_react35 = require("react");
2183
+ var import_hooks30 = require("@awesome-flow/core/hooks");
2184
+ var import_core15 = require("@mantine/core");
2308
2185
  var import_transformer2 = require("libnoise-ts/module/transformer");
2309
- var import_jsx_runtime31 = require("react/jsx-runtime");
2186
+ var import_jsx_runtime28 = require("react/jsx-runtime");
2310
2187
  function NoiseRotatePointNode({
2311
2188
  id,
2312
2189
  selected,
2313
2190
  data,
2314
2191
  type
2315
2192
  }) {
2316
- const [xAngle, setXAngle] = (0, import_react36.useState)(data.xAngle);
2317
- const [yAngle, setYAngle] = (0, import_react36.useState)(data.yAngle);
2318
- const [zAngle, setZAngle] = (0, import_react36.useState)(data.zAngle);
2319
- const incoming = (0, import_hooks31.useIncomingComputedData)(id);
2320
- const updateNodeData = (0, import_hooks31.useUpdateNodeData)();
2321
- const updateComputedData = (0, import_hooks31.useUpdateNodeComputedData)();
2322
- (0, import_react36.useEffect)(() => {
2193
+ const [xAngle, setXAngle] = (0, import_react35.useState)(data.xAngle);
2194
+ const [yAngle, setYAngle] = (0, import_react35.useState)(data.yAngle);
2195
+ const [zAngle, setZAngle] = (0, import_react35.useState)(data.zAngle);
2196
+ const incoming = (0, import_hooks30.useIncomingComputedData)(id);
2197
+ const updateNodeData = (0, import_hooks30.useUpdateNodeData)();
2198
+ const updateComputedData = (0, import_hooks30.useUpdateNodeComputedData)();
2199
+ (0, import_react35.useEffect)(() => {
2323
2200
  if (incoming?.length) {
2324
2201
  const module2 = new import_transformer2.RotatePoint(incoming[0].module, xAngle, yAngle, zAngle);
2325
2202
  updateComputedData(id, { module: module2 });
2326
2203
  }
2327
2204
  updateNodeData(id, { xAngle, yAngle, zAngle });
2328
2205
  }, [id, updateComputedData, updateNodeData, incoming, xAngle, yAngle, zAngle]);
2329
- return /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(import_layout28.NodeContainer, { id, selected, data, type, children: [
2330
- /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(import_core19.Stack, { children: [
2331
- /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(import_core19.Group, { children: [
2206
+ return /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(import_layout28.NodeContainer, { id, selected, data, type, children: [
2207
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(import_core15.Stack, { children: [
2208
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(import_core15.Group, { children: [
2332
2209
  "X Angle:",
2333
- /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
2334
- import_core19.NumberInput,
2210
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
2211
+ import_core15.NumberInput,
2335
2212
  {
2336
2213
  size: "xs",
2337
2214
  w: 100,
@@ -2341,10 +2218,10 @@ function NoiseRotatePointNode({
2341
2218
  }
2342
2219
  )
2343
2220
  ] }),
2344
- /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(import_core19.Group, { children: [
2221
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(import_core15.Group, { children: [
2345
2222
  "Y Angle:",
2346
- /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
2347
- import_core19.NumberInput,
2223
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
2224
+ import_core15.NumberInput,
2348
2225
  {
2349
2226
  size: "xs",
2350
2227
  w: 100,
@@ -2354,10 +2231,10 @@ function NoiseRotatePointNode({
2354
2231
  }
2355
2232
  )
2356
2233
  ] }),
2357
- /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(import_core19.Group, { children: [
2234
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(import_core15.Group, { children: [
2358
2235
  "Z Angle:",
2359
- /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
2360
- import_core19.NumberInput,
2236
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
2237
+ import_core15.NumberInput,
2361
2238
  {
2362
2239
  size: "xs",
2363
2240
  w: 100,
@@ -2368,43 +2245,43 @@ function NoiseRotatePointNode({
2368
2245
  )
2369
2246
  ] })
2370
2247
  ] }),
2371
- /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_layout28.NodeTrackConnections, { handles: data.handles, nodeId: id, type: "target" })
2248
+ /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_layout28.NodeTrackConnections, { handles: data.handles, nodeId: id, type: "target" })
2372
2249
  ] });
2373
2250
  }
2374
2251
  var noise_rotate_point_node_default = NoiseRotatePointNode;
2375
2252
 
2376
2253
  // src/nodes/transformers/noise-scale-point-node.tsx
2377
2254
  var import_layout29 = require("@awesome-flow/core/layout");
2378
- var import_react37 = require("react");
2379
- var import_hooks32 = require("@awesome-flow/core/hooks");
2380
- var import_core20 = require("@mantine/core");
2255
+ var import_react36 = require("react");
2256
+ var import_hooks31 = require("@awesome-flow/core/hooks");
2257
+ var import_core16 = require("@mantine/core");
2381
2258
  var import_transformer3 = require("libnoise-ts/module/transformer");
2382
- var import_jsx_runtime32 = require("react/jsx-runtime");
2259
+ var import_jsx_runtime29 = require("react/jsx-runtime");
2383
2260
  function NoiseScalePointNode({
2384
2261
  id,
2385
2262
  selected,
2386
2263
  data,
2387
2264
  type
2388
2265
  }) {
2389
- const [xScale, setXScale] = (0, import_react37.useState)(data.xScale);
2390
- const [yScale, setYScale] = (0, import_react37.useState)(data.yScale);
2391
- const [zScale, setZScale] = (0, import_react37.useState)(data.zScale);
2392
- const incoming = (0, import_hooks32.useIncomingComputedData)(id);
2393
- const updateNodeData = (0, import_hooks32.useUpdateNodeData)();
2394
- const updateComputedData = (0, import_hooks32.useUpdateNodeComputedData)();
2395
- (0, import_react37.useEffect)(() => {
2266
+ const [xScale, setXScale] = (0, import_react36.useState)(data.xScale);
2267
+ const [yScale, setYScale] = (0, import_react36.useState)(data.yScale);
2268
+ const [zScale, setZScale] = (0, import_react36.useState)(data.zScale);
2269
+ const incoming = (0, import_hooks31.useIncomingComputedData)(id);
2270
+ const updateNodeData = (0, import_hooks31.useUpdateNodeData)();
2271
+ const updateComputedData = (0, import_hooks31.useUpdateNodeComputedData)();
2272
+ (0, import_react36.useEffect)(() => {
2396
2273
  if (incoming?.length) {
2397
2274
  const module2 = new import_transformer3.ScalePoint(incoming[0].module, xScale, yScale, zScale);
2398
2275
  updateComputedData(id, { module: module2 });
2399
2276
  }
2400
2277
  updateNodeData(id, { xScale, yScale, zScale });
2401
2278
  }, [id, incoming, updateComputedData, updateNodeData, xScale, yScale, zScale]);
2402
- return /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(import_layout29.NodeContainer, { id, selected, data, type, children: [
2403
- /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(import_core20.Stack, { children: [
2404
- /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(import_core20.Group, { children: [
2279
+ return /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(import_layout29.NodeContainer, { id, selected, data, type, children: [
2280
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(import_core16.Stack, { children: [
2281
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(import_core16.Group, { children: [
2405
2282
  "X Scale:",
2406
- /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
2407
- import_core20.NumberInput,
2283
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
2284
+ import_core16.NumberInput,
2408
2285
  {
2409
2286
  size: "xs",
2410
2287
  w: 100,
@@ -2414,10 +2291,10 @@ function NoiseScalePointNode({
2414
2291
  }
2415
2292
  )
2416
2293
  ] }),
2417
- /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(import_core20.Group, { children: [
2294
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(import_core16.Group, { children: [
2418
2295
  "Y Scale:",
2419
- /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
2420
- import_core20.NumberInput,
2296
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
2297
+ import_core16.NumberInput,
2421
2298
  {
2422
2299
  size: "xs",
2423
2300
  w: 100,
@@ -2427,10 +2304,10 @@ function NoiseScalePointNode({
2427
2304
  }
2428
2305
  )
2429
2306
  ] }),
2430
- /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(import_core20.Group, { children: [
2307
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(import_core16.Group, { children: [
2431
2308
  "Z Scale:",
2432
- /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
2433
- import_core20.NumberInput,
2309
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
2310
+ import_core16.NumberInput,
2434
2311
  {
2435
2312
  size: "xs",
2436
2313
  w: 100,
@@ -2441,43 +2318,43 @@ function NoiseScalePointNode({
2441
2318
  )
2442
2319
  ] })
2443
2320
  ] }),
2444
- /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_layout29.NodeTrackConnections, { handles: data.handles, nodeId: id, type: "target" })
2321
+ /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_layout29.NodeTrackConnections, { handles: data.handles, nodeId: id, type: "target" })
2445
2322
  ] });
2446
2323
  }
2447
2324
  var noise_scale_point_node_default = NoiseScalePointNode;
2448
2325
 
2449
2326
  // src/nodes/transformers/noise-translate-point-node.tsx
2450
2327
  var import_layout30 = require("@awesome-flow/core/layout");
2451
- var import_react38 = require("react");
2452
- var import_hooks33 = require("@awesome-flow/core/hooks");
2453
- var import_core21 = require("@mantine/core");
2328
+ var import_react37 = require("react");
2329
+ var import_hooks32 = require("@awesome-flow/core/hooks");
2330
+ var import_core17 = require("@mantine/core");
2454
2331
  var import_transformer4 = require("libnoise-ts/module/transformer");
2455
- var import_jsx_runtime33 = require("react/jsx-runtime");
2332
+ var import_jsx_runtime30 = require("react/jsx-runtime");
2456
2333
  function NoiseTranslatePointNode({
2457
2334
  id,
2458
2335
  selected,
2459
2336
  data,
2460
2337
  type
2461
2338
  }) {
2462
- const [translateX, setTranslateX] = (0, import_react38.useState)(data.translateX);
2463
- const [translateY, setTranslateY] = (0, import_react38.useState)(data.translateY);
2464
- const [translateZ, setTranslateZ] = (0, import_react38.useState)(data.translateZ);
2465
- const incoming = (0, import_hooks33.useIncomingComputedData)(id);
2466
- const updateNodeData = (0, import_hooks33.useUpdateNodeData)();
2467
- const updateComputedData = (0, import_hooks33.useUpdateNodeComputedData)();
2468
- (0, import_react38.useEffect)(() => {
2339
+ const [translateX, setTranslateX] = (0, import_react37.useState)(data.translateX);
2340
+ const [translateY, setTranslateY] = (0, import_react37.useState)(data.translateY);
2341
+ const [translateZ, setTranslateZ] = (0, import_react37.useState)(data.translateZ);
2342
+ const incoming = (0, import_hooks32.useIncomingComputedData)(id);
2343
+ const updateNodeData = (0, import_hooks32.useUpdateNodeData)();
2344
+ const updateComputedData = (0, import_hooks32.useUpdateNodeComputedData)();
2345
+ (0, import_react37.useEffect)(() => {
2469
2346
  if (incoming?.length) {
2470
2347
  const module2 = new import_transformer4.TranslatePoint(incoming[0].module, translateX, translateY, translateZ);
2471
2348
  updateComputedData(id, { module: module2 });
2472
2349
  }
2473
2350
  updateNodeData(id, { translateX, translateY, translateZ });
2474
2351
  }, [id, incoming, translateX, translateY, translateZ, updateComputedData, updateNodeData]);
2475
- return /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(import_layout30.NodeContainer, { id, selected, data, type, children: [
2476
- /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(import_core21.Stack, { children: [
2477
- /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(import_core21.Group, { children: [
2352
+ return /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(import_layout30.NodeContainer, { id, selected, data, type, children: [
2353
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(import_core17.Stack, { children: [
2354
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(import_core17.Group, { children: [
2478
2355
  "Translate X:",
2479
- /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
2480
- import_core21.NumberInput,
2356
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
2357
+ import_core17.NumberInput,
2481
2358
  {
2482
2359
  size: "xs",
2483
2360
  w: 100,
@@ -2487,10 +2364,10 @@ function NoiseTranslatePointNode({
2487
2364
  }
2488
2365
  )
2489
2366
  ] }),
2490
- /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(import_core21.Group, { children: [
2367
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(import_core17.Group, { children: [
2491
2368
  "Translate Y:",
2492
- /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
2493
- import_core21.NumberInput,
2369
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
2370
+ import_core17.NumberInput,
2494
2371
  {
2495
2372
  size: "xs",
2496
2373
  w: 100,
@@ -2500,10 +2377,10 @@ function NoiseTranslatePointNode({
2500
2377
  }
2501
2378
  )
2502
2379
  ] }),
2503
- /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(import_core21.Group, { children: [
2380
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(import_core17.Group, { children: [
2504
2381
  "Translate Z:",
2505
- /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
2506
- import_core21.NumberInput,
2382
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
2383
+ import_core17.NumberInput,
2507
2384
  {
2508
2385
  size: "xs",
2509
2386
  w: 100,
@@ -2514,31 +2391,32 @@ function NoiseTranslatePointNode({
2514
2391
  )
2515
2392
  ] })
2516
2393
  ] }),
2517
- /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_layout30.NodeTrackConnections, { handles: data.handles, nodeId: id, type: "target" })
2394
+ /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_layout30.NodeTrackConnections, { handles: data.handles, nodeId: id, type: "target" })
2518
2395
  ] });
2519
2396
  }
2520
2397
  var noise_translate_point_node_default = NoiseTranslatePointNode;
2521
2398
 
2522
2399
  // src/nodes/transformers/noise-turbulence-node .tsx
2523
2400
  var import_layout31 = require("@awesome-flow/core/layout");
2524
- var import_react39 = require("react");
2525
- var import_hooks34 = require("@awesome-flow/core/hooks");
2401
+ var import_react38 = require("react");
2402
+ var import_hooks33 = require("@awesome-flow/core/hooks");
2526
2403
  var import_transformer5 = require("libnoise-ts/module/transformer");
2527
- var import_jsx_runtime34 = require("react/jsx-runtime");
2404
+ var import_components11 = require("@awesome-flow/core/components");
2405
+ var import_jsx_runtime31 = require("react/jsx-runtime");
2528
2406
  function NoiseTurbulenceNode({
2529
2407
  id,
2530
2408
  selected,
2531
2409
  data,
2532
2410
  type
2533
2411
  }) {
2534
- const [properties, setProperties] = (0, import_react39.useState)(null);
2535
- const incoming = (0, import_hooks34.useIncomingComputedData)(id);
2536
- const updateComputedData = (0, import_hooks34.useUpdateNodeComputedData)();
2537
- const onPropertiesChange = (0, import_react39.useCallback)((props) => {
2412
+ const [properties, setProperties] = (0, import_react38.useState)(null);
2413
+ const incoming = (0, import_hooks33.useIncomingComputedData)(id);
2414
+ const updateComputedData = (0, import_hooks33.useUpdateNodeComputedData)();
2415
+ const onPropertiesChange = (0, import_react38.useCallback)((props) => {
2538
2416
  setProperties(props);
2539
2417
  }, []);
2540
- (0, import_react39.useEffect)(() => {
2541
- if (incoming?.length) {
2418
+ (0, import_react38.useEffect)(() => {
2419
+ if (incoming?.length && properties) {
2542
2420
  const module2 = new import_transformer5.Turbulence(
2543
2421
  incoming[0].module,
2544
2422
  properties.frequency.value,
@@ -2548,1569 +2426,1030 @@ function NoiseTurbulenceNode({
2548
2426
  );
2549
2427
  updateComputedData(id, { module: module2 });
2550
2428
  }
2551
- }, [id, incoming, properties, updateComputedData]);
2552
- return /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(import_layout31.NodeContainer, { id, selected, data, type, children: [
2553
- /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(node_property_variables_default, { data, nodeId: id, onPropertiesChange }),
2554
- /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_layout31.NodeTrackConnections, { handles: data.handles, nodeId: id, type: "target" })
2429
+ }, [id, incoming, properties]);
2430
+ return /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(import_layout31.NodeContainer, { id, selected, data, type, children: [
2431
+ /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_components11.NodePropertyVariables, { data, nodeId: id, onPropertiesChange }),
2432
+ /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_layout31.NodeTrackConnections, { handles: data.handles, nodeId: id, type: "target" })
2555
2433
  ] });
2556
2434
  }
2557
2435
  var noise_turbulence_node_default = NoiseTurbulenceNode;
2558
2436
 
2559
- // src/nodes/generators/variable-property-node.tsx
2560
- var import_layout32 = require("@awesome-flow/core/layout");
2561
- var import_react40 = require("react");
2562
- var import_core22 = require("@mantine/core");
2563
- var import_hooks35 = require("@awesome-flow/core/hooks");
2564
- var import_utils2 = require("@awesome-flow/core/utils");
2565
- var import_abstract5 = require("@awesome-flow/core/abstract");
2566
- var import_jsx_runtime35 = require("react/jsx-runtime");
2567
- function VariablePropertyNode({
2568
- id,
2569
- selected,
2570
- data,
2571
- type
2572
- }) {
2573
- const [options3, setOptions] = (0, import_react40.useState)({});
2574
- const [selectedProperty, setSelectedProperty] = (0, import_react40.useState)(data.property);
2575
- const updateNodeData = (0, import_hooks35.useUpdateNodeData)();
2576
- const outgoing = (0, import_hooks35.useOutgoingNodes)(id);
2577
- const incoming = (0, import_hooks35.useIncomingNodeData)(id);
2578
- (0, import_react40.useEffect)(() => {
2579
- if (outgoing?.length) {
2580
- const { data: data2 } = outgoing[0];
2581
- const properties = (0, import_utils2.getObjectPropertyMap)(data2, import_abstract5.nodeDataPropertyExcept);
2582
- setOptions(properties);
2583
- if (!selectedProperty) {
2584
- const keys = Object.keys(properties);
2585
- if (keys.length) {
2586
- setSelectedProperty({
2587
- name: keys[0],
2588
- value: properties[keys[0]]
2589
- });
2590
- }
2591
- }
2592
- } else {
2593
- setSelectedProperty(null);
2594
- }
2595
- }, [outgoing]);
2596
- (0, import_react40.useEffect)(() => {
2597
- if (!incoming?.length && selectedProperty?.disabled) {
2598
- setSelectedProperty({ ...selectedProperty, disabled: false });
2599
- } else if (incoming?.length && selectedProperty) {
2600
- const incomingValue = incoming[0].value;
2601
- if (incomingValue !== void 0 && incomingValue !== null) {
2602
- setSelectedProperty({
2603
- name: selectedProperty.name,
2604
- value: incomingValue,
2605
- disabled: true
2606
- });
2607
- }
2608
- }
2609
- }, [incoming]);
2610
- (0, import_react40.useEffect)(() => {
2611
- if (selectedProperty) {
2612
- updateNodeData(id, { property: selectedProperty });
2613
- }
2614
- }, [selectedProperty]);
2615
- const onPropertyChange = (0, import_react40.useCallback)(
2616
- (selected2) => {
2617
- setSelectedProperty({
2618
- name: selected2,
2619
- value: options3[selected2]
2620
- });
2621
- },
2622
- [options3]
2623
- );
2624
- const onValueChange = (0, import_react40.useCallback)((name, value) => {
2625
- setSelectedProperty({
2626
- name,
2627
- value
2628
- });
2629
- }, []);
2630
- return /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(import_layout32.NodeContainer, { id, selected, data, type, children: [
2631
- /* @__PURE__ */ (0, import_jsx_runtime35.jsxs)(import_core22.Stack, { align: "center", children: [
2632
- /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
2633
- import_layout32.NodeCombobox,
2634
- {
2635
- options: options3,
2636
- onChange: onPropertyChange,
2637
- selected: selectedProperty?.name,
2638
- hideListValues: true
2639
- }
2640
- ),
2641
- /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(node_property_input_default, { property: selectedProperty, onChange: onValueChange })
2642
- ] }),
2643
- /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(import_layout32.NodeTrackConnections, { handles: data.handles, nodeId: id })
2644
- ] });
2645
- }
2646
- var variable_property_node_default = VariablePropertyNode;
2437
+ // src/templates/generators/noise-checkerboard-template.ts
2438
+ var import_system = require("@xyflow/system");
2439
+
2440
+ // src/abstract/templates.ts
2441
+ var NoiseTemplateGroup = /* @__PURE__ */ ((NoiseTemplateGroup2) => {
2442
+ NoiseTemplateGroup2["positions"] = "Positions";
2443
+ NoiseTemplateGroup2["output"] = "Output";
2444
+ NoiseTemplateGroup2["noiseGenerators"] = "Noise Generators";
2445
+ NoiseTemplateGroup2["noiseModifiers"] = "Noise Modifiers";
2446
+ NoiseTemplateGroup2["noiseSelectors"] = "Noise Selectors";
2447
+ NoiseTemplateGroup2["noiseTransformers"] = "Noise Transformers";
2448
+ return NoiseTemplateGroup2;
2449
+ })(NoiseTemplateGroup || {});
2647
2450
 
2648
- // src/nodes/modifiers/variable-combine-node.tsx
2649
- var import_layout33 = require("@awesome-flow/core/layout");
2650
- var import_react41 = require("react");
2651
- var import_hooks36 = require("@awesome-flow/core/hooks");
2652
- var import_icons_react4 = require("@tabler/icons-react");
2653
- var import_jsx_runtime36 = require("react/jsx-runtime");
2654
- var options2 = {
2655
- add: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_icons_react4.IconPlus, {}),
2656
- divide: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_icons_react4.IconDivide, {}),
2657
- min: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_icons_react4.IconChevronLeft, {}),
2658
- max: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_icons_react4.IconChevronRight, {}),
2659
- multiply: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_icons_react4.IconAsterisk, {}),
2660
- power: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_icons_react4.IconChevronUp, {})
2451
+ // src/templates/generators/noise-checkerboard-template.ts
2452
+ var NoiseCheckerboardNodeTemplateFactory = class {
2453
+ template = {
2454
+ type: "noise-checkerboard" /* noiseCheckerboard */,
2455
+ group: "Noise Generators" /* noiseGenerators */,
2456
+ data: {
2457
+ title: "Checkerboard Noise"
2458
+ },
2459
+ handles: [
2460
+ {
2461
+ position: import_system.Position.Right,
2462
+ dataType: "module" /* module */,
2463
+ connection: "source"
2464
+ }
2465
+ ]
2466
+ };
2661
2467
  };
2662
- function VariableCombineNode({
2663
- id,
2664
- selected,
2665
- data,
2666
- type
2667
- }) {
2668
- const [operation, setOperation] = (0, import_react41.useState)(data.operation);
2669
- const [value, setValue] = (0, import_react41.useState)(data.value);
2670
- const updateNodeData = (0, import_hooks36.useUpdateNodeData)();
2671
- const incoming = (0, import_hooks36.useIncomingNodeData)(id);
2672
- (0, import_react41.useEffect)(() => {
2673
- if (incoming?.length > 1) {
2674
- const result = getOperationResult(operation, incoming[0].value, incoming[1].value);
2675
- setValue(result);
2676
- updateNodeData(id, { value: result });
2677
- }
2678
- }, [operation, incoming]);
2679
- const onChange = (0, import_react41.useCallback)((op) => {
2680
- updateNodeData(id, { operation: op });
2681
- setOperation(op);
2682
- }, []);
2683
- return /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(import_layout33.NodeContainer, { id, selected, data, type, children: [
2684
- /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_layout33.NodeCombobox, { options: options2, selected: operation, onChange }),
2685
- /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(node_value_input_default, { value, onChange: () => {
2686
- }, disabled: true }),
2687
- /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_layout33.NodeTrackConnections, { handles: data.handles, nodeId: id, type: "target" })
2688
- ] });
2689
- }
2690
- function getOperationResult(operation, value1, value2) {
2691
- switch (operation) {
2692
- case "add" /* add */:
2693
- return Number(value1) + Number(value2);
2694
- case "divide" /* divide */:
2695
- return Number(value1) / (Number(value2) || 1);
2696
- case "max" /* max */:
2697
- return Number(value1) > Number(value2) ? value1 : value2;
2698
- case "min" /* min */:
2699
- return Number(value1) < Number(value2) ? value1 : value2;
2700
- case "multiply" /* multiply */:
2701
- return Number(value1) * Number(value2);
2702
- case "power" /* power */:
2703
- return Number(value1) ** Number(value2);
2704
- }
2705
- }
2706
- var variable_combine_node_default = VariableCombineNode;
2707
2468
 
2708
- // src/nodes/generators/variable-value-node.tsx
2709
- var import_layout35 = require("@awesome-flow/core/layout");
2710
- var import_react42 = require("react");
2711
- var import_hooks37 = require("@awesome-flow/core/hooks");
2712
- var import_jsx_runtime37 = require("react/jsx-runtime");
2713
- function VariableValueNode({ id, selected, data, type }) {
2714
- const [value, setValue] = (0, import_react42.useState)(data.value || 0);
2715
- const updateNodeData = (0, import_hooks37.useUpdateNodeData)();
2716
- const onValueChange = (0, import_react42.useCallback)((newValue) => {
2717
- updateNodeData(id, { value: newValue });
2718
- setValue(newValue);
2719
- }, []);
2720
- return /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(import_layout35.NodeContainer, { id, selected, data, type, children: [
2721
- /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(node_value_input_default, { value, onChange: onValueChange }),
2722
- /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(import_layout35.NodeTrackConnections, { handles: data.handles, nodeId: id, type: "source" })
2723
- ] });
2724
- }
2725
- var variable_value_node_default = VariableValueNode;
2469
+ // src/templates/generators/noise-const-template.ts
2470
+ var import_system2 = require("@xyflow/system");
2471
+ var NoiseConstNodeTemplateFactory = class {
2472
+ template = {
2473
+ type: "noise-constant" /* noiseConst */,
2474
+ group: "Noise Generators" /* noiseGenerators */,
2475
+ data: {
2476
+ title: "Const Value Noise",
2477
+ noise: 0,
2478
+ min: -1,
2479
+ max: 1
2480
+ },
2481
+ handles: [
2482
+ {
2483
+ position: import_system2.Position.Right,
2484
+ dataType: "module" /* module */,
2485
+ connection: "source"
2486
+ }
2487
+ ]
2488
+ };
2489
+ };
2726
2490
 
2727
- // src/nodes/groups/node-module-group.tsx
2728
- var import_layout36 = require("@awesome-flow/core/layout");
2729
- var import_react43 = require("@xyflow/react");
2491
+ // src/templates/generators/noise-cylinders-template.ts
2730
2492
  var import_abstract6 = require("@awesome-flow/core/abstract");
2731
- var import_react44 = require("react");
2732
- var import_shallow = require("zustand/shallow");
2733
- var import_core23 = require("@mantine/core");
2734
- var import_jsx_runtime38 = require("react/jsx-runtime");
2735
- function ModuleGroupNode({
2736
- id,
2737
- selected,
2738
- data,
2739
- type,
2740
- width,
2741
- height
2742
- }) {
2743
- const context = (0, import_react44.useContext)(import_abstract6.FlowContext);
2744
- const updateNodeInternals = (0, import_react43.useUpdateNodeInternals)();
2745
- const triggerNodeChanges = (0, import_react43.useStore)((s) => s.triggerNodeChanges);
2746
- const { groupNodes, setGroupCollapsed } = context.useFlowStore(
2747
- (0, import_react44.useCallback)(
2748
- (state) => ({ groupNodes: state.groups[id], setGroupCollapsed: state.setGroupCollapsed }),
2749
- []
2750
- )
2751
- );
2752
- const intersectingNode = context.useInteractivityStore(
2753
- (0, import_react44.useCallback)((state) => state.nodeIntersectionTargets[id], [id]),
2754
- import_shallow.shallow
2755
- );
2756
- (0, import_react44.useEffect)(() => {
2757
- updateNodeInternals(id);
2758
- }, [width, height]);
2759
- (0, import_react44.useEffect)(() => {
2760
- triggerNodeChanges([
2761
- {
2762
- id,
2763
- type: "select",
2764
- selected: !!intersectingNode
2765
- }
2766
- ]);
2767
- }, [intersectingNode]);
2768
- const onCollapsed = (0, import_react44.useCallback)((collapsed) => {
2769
- setGroupCollapsed(id, collapsed);
2770
- }, []);
2771
- const size = (0, import_react44.useMemo)(() => {
2772
- return {
2773
- width: data.initialSize?.width || 100,
2774
- height: data.initialSize?.height || 50
2775
- };
2776
- }, [data.initialSize]);
2777
- return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
2778
- import_layout36.NodeContainer,
2779
- {
2780
- id,
2781
- selected,
2782
- data,
2783
- title: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_core23.Group, { justify: "space-between", children: /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(import_core23.Group, { gap: "xs", children: [
2784
- /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_core23.Badge, { size: "xs", variant: "outline", radius: "xs", color: "gray", children: groupNodes?.length || 0 }),
2785
- /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_layout36.NodeCollapse, { nodeId: id, isCollapsed: data.isCollapsed, onCollapsed })
2786
- ] }) }),
2787
- type,
2788
- children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
2789
- import_react43.NodeResizer,
2790
- {
2791
- nodeId: id,
2792
- minWidth: size.width,
2793
- minHeight: size.height,
2794
- isVisible: selected && !data.isCollapsed
2795
- }
2796
- )
2797
- }
2798
- );
2799
- }
2800
- var node_module_group_default = ModuleGroupNode;
2801
-
2802
- // src/templates/generators/noise-checkerboard-template.ts
2803
- var import_utils3 = require("@awesome-flow/core/utils");
2804
- var import_system = require("@xyflow/system");
2805
- var NoiseCheckerboardNodeTemplateFactory = class {
2806
- create() {
2807
- return {
2808
- id: import_utils3.IDGenerator.template(),
2809
- type: "noise-checkerboard" /* noiseCheckerboard */,
2810
- removable: false,
2811
- data: {
2812
- title: "Checkerboard Noise"
2813
- },
2814
- handles: [
2815
- {
2816
- position: import_system.Position.Right,
2817
- dataType: 8 /* module */,
2818
- connection: "source"
2819
- }
2820
- ]
2821
- };
2822
- }
2823
- isHandleAllowed(type) {
2824
- return type === "source";
2825
- }
2826
- getHandleAllowedDataType() {
2827
- return 8 /* module */;
2828
- }
2829
- };
2830
-
2831
- // src/templates/generators/noise-const-template.ts
2832
- var import_utils4 = require("@awesome-flow/core/utils");
2833
- var import_system2 = require("@xyflow/system");
2834
- var NoiseConstNodeTemplateFactory = class {
2835
- create() {
2836
- return {
2837
- id: import_utils4.IDGenerator.template(),
2838
- type: "noise-constant" /* noiseConst */,
2839
- removable: false,
2840
- data: {
2841
- title: "Const Value Noise",
2842
- noise: 0,
2843
- min: -1,
2844
- max: 1
2845
- },
2846
- handles: [
2847
- {
2848
- position: import_system2.Position.Right,
2849
- dataType: 8 /* module */,
2850
- connection: "source"
2851
- }
2852
- ]
2853
- };
2854
- }
2855
- isHandleAllowed(type) {
2856
- return type === "source";
2857
- }
2858
- getHandleAllowedDataType(type) {
2859
- return 8 /* module */;
2860
- }
2861
- };
2862
-
2863
- // src/templates/generators/noise-cylinders-template.ts
2864
- var import_utils5 = require("@awesome-flow/core/utils");
2865
2493
  var import_system3 = require("@xyflow/system");
2866
2494
  var NoiseCylindersNodeTemplateFactory = class {
2867
- create() {
2868
- return {
2869
- id: import_utils5.IDGenerator.template(),
2870
- type: "noise-cylinders" /* noiseCylinders */,
2871
- removable: false,
2872
- data: {
2873
- title: "Cylinders Noise",
2874
- frequency: 0.1
2495
+ template = {
2496
+ type: "noise-cylinders" /* noiseCylinders */,
2497
+ group: "Noise Generators" /* noiseGenerators */,
2498
+ data: {
2499
+ title: "Cylinders Noise",
2500
+ frequency: 0.1
2501
+ },
2502
+ handles: [
2503
+ {
2504
+ position: import_system3.Position.Left,
2505
+ dataType: import_abstract6.CoreHandleType.variableProperty,
2506
+ connection: "target"
2875
2507
  },
2876
- handles: [
2877
- {
2878
- position: import_system3.Position.Left,
2879
- dataType: 16 /* variableProperty */,
2880
- connection: "target"
2881
- },
2882
- {
2883
- position: import_system3.Position.Right,
2884
- dataType: 8 /* module */,
2885
- connection: "source"
2886
- }
2887
- ]
2888
- };
2889
- }
2890
- isHandleAllowed(type) {
2891
- return type === "source";
2892
- }
2893
- getHandleAllowedDataType() {
2894
- return 8 /* module */;
2895
- }
2508
+ {
2509
+ position: import_system3.Position.Right,
2510
+ dataType: "module" /* module */,
2511
+ connection: "source"
2512
+ }
2513
+ ]
2514
+ };
2896
2515
  };
2897
2516
 
2898
2517
  // src/templates/generators/noise-perlin-template.ts
2899
- var import_utils6 = require("@awesome-flow/core/utils");
2518
+ var import_abstract7 = require("@awesome-flow/core/abstract");
2900
2519
  var import_system4 = require("@xyflow/system");
2901
2520
  var NoisePerlinNodeTemplateFactory = class {
2902
- create() {
2903
- return {
2904
- id: import_utils6.IDGenerator.template(),
2905
- type: "noise-perlin" /* noisePerlin */,
2906
- removable: false,
2907
- data: {
2908
- title: "Perlin Noise",
2909
- frequency: 0.1,
2910
- lacunarity: 2,
2911
- octaves: 5,
2912
- persistence: 0.5,
2913
- seed: 0
2521
+ template = {
2522
+ type: "noise-perlin" /* noisePerlin */,
2523
+ group: "Noise Generators" /* noiseGenerators */,
2524
+ data: {
2525
+ title: "Perlin Noise",
2526
+ frequency: 0.1,
2527
+ lacunarity: 2,
2528
+ octaves: 5,
2529
+ persistence: 0.5,
2530
+ seed: 0
2531
+ },
2532
+ handles: [
2533
+ {
2534
+ position: import_system4.Position.Left,
2535
+ dataType: import_abstract7.CoreHandleType.variableProperty,
2536
+ connection: "target"
2914
2537
  },
2915
- handles: [
2916
- {
2917
- position: import_system4.Position.Left,
2918
- dataType: 16 /* variableProperty */,
2919
- connection: "target"
2920
- },
2921
- {
2922
- position: import_system4.Position.Right,
2923
- dataType: 8 /* module */,
2924
- connection: "source"
2925
- }
2926
- ]
2927
- };
2928
- }
2929
- isHandleAllowed(type) {
2930
- return type === "source";
2931
- }
2932
- getHandleAllowedDataType() {
2933
- return 8 /* module */;
2934
- }
2538
+ {
2539
+ position: import_system4.Position.Right,
2540
+ dataType: "module" /* module */,
2541
+ connection: "source"
2542
+ }
2543
+ ]
2544
+ };
2935
2545
  };
2936
2546
 
2937
2547
  // src/templates/generators/noise-ridgedmulti-template.ts
2938
- var import_utils7 = require("@awesome-flow/core/utils");
2548
+ var import_abstract8 = require("@awesome-flow/core/abstract");
2939
2549
  var import_system5 = require("@xyflow/system");
2940
2550
  var NoiseRidgedMultiNodeTemplateFactory = class {
2941
- create() {
2942
- return {
2943
- id: import_utils7.IDGenerator.template(),
2944
- type: "noise-ridged-multi" /* noiseRidgedMulti */,
2945
- removable: false,
2946
- data: {
2947
- title: "Ridged Multi Noise",
2948
- frequency: 0.1,
2949
- lacunarity: 2,
2950
- octaves: 6,
2951
- offset: 1,
2952
- gain: 2,
2953
- seed: 0
2551
+ template = {
2552
+ type: "noise-ridged-multi" /* noiseRidgedMulti */,
2553
+ group: "Noise Generators" /* noiseGenerators */,
2554
+ data: {
2555
+ title: "Ridged Multi Noise",
2556
+ frequency: 0.1,
2557
+ lacunarity: 2,
2558
+ octaves: 6,
2559
+ offset: 1,
2560
+ gain: 2,
2561
+ seed: 0
2562
+ },
2563
+ handles: [
2564
+ {
2565
+ position: import_system5.Position.Left,
2566
+ dataType: import_abstract8.CoreHandleType.variableProperty,
2567
+ connection: "target"
2954
2568
  },
2955
- handles: [
2956
- {
2957
- position: import_system5.Position.Left,
2958
- dataType: 16 /* variableProperty */,
2959
- connection: "target"
2960
- },
2961
- {
2962
- position: import_system5.Position.Right,
2963
- dataType: 8 /* module */,
2964
- connection: "source"
2965
- }
2966
- ]
2967
- };
2968
- }
2969
- isHandleAllowed(type) {
2970
- return type === "source";
2971
- }
2972
- getHandleAllowedDataType() {
2973
- return 8 /* module */;
2974
- }
2569
+ {
2570
+ position: import_system5.Position.Right,
2571
+ dataType: "module" /* module */,
2572
+ connection: "source"
2573
+ }
2574
+ ]
2575
+ };
2975
2576
  };
2976
2577
 
2977
2578
  // src/templates/generators/noise-simplex-template.ts
2978
- var import_utils8 = require("@awesome-flow/core/utils");
2579
+ var import_abstract9 = require("@awesome-flow/core/abstract");
2979
2580
  var import_system6 = require("@xyflow/system");
2980
2581
  var NoiseSimplexNodeTemplateFactory = class {
2981
- create() {
2982
- return {
2983
- id: import_utils8.IDGenerator.template(),
2984
- type: "noise-simplex" /* noiseSimplex */,
2985
- removable: false,
2986
- data: {
2987
- title: "Simplex Noise"
2582
+ template = {
2583
+ type: "noise-simplex" /* noiseSimplex */,
2584
+ group: "Noise Generators" /* noiseGenerators */,
2585
+ data: {
2586
+ title: "Simplex Noise"
2587
+ },
2588
+ handles: [
2589
+ {
2590
+ position: import_system6.Position.Left,
2591
+ dataType: import_abstract9.CoreHandleType.variableProperty,
2592
+ connection: "target"
2988
2593
  },
2989
- handles: [
2990
- {
2991
- position: import_system6.Position.Left,
2992
- dataType: 16 /* variableProperty */,
2993
- connection: "target"
2994
- },
2995
- {
2996
- position: import_system6.Position.Right,
2997
- dataType: 8 /* module */,
2998
- connection: "source"
2999
- }
3000
- ]
3001
- };
3002
- }
3003
- isHandleAllowed(type) {
3004
- return type === "source";
3005
- }
3006
- getHandleAllowedDataType() {
3007
- return 8 /* module */;
3008
- }
2594
+ {
2595
+ position: import_system6.Position.Right,
2596
+ dataType: "module" /* module */,
2597
+ connection: "source"
2598
+ }
2599
+ ]
2600
+ };
3009
2601
  };
3010
2602
 
3011
2603
  // src/templates/generators/noise-spheres-template.ts
3012
- var import_utils9 = require("@awesome-flow/core/utils");
2604
+ var import_abstract10 = require("@awesome-flow/core/abstract");
3013
2605
  var import_system7 = require("@xyflow/system");
3014
2606
  var NoiseSpheresNodeTemplateFactory = class {
3015
- create() {
3016
- return {
3017
- id: import_utils9.IDGenerator.template(),
3018
- type: "noise-spheres" /* noiseSpheres */,
3019
- removable: false,
3020
- data: {
3021
- title: "Spheres Noise",
3022
- frequency: 0.1
2607
+ template = {
2608
+ type: "noise-spheres" /* noiseSpheres */,
2609
+ group: "Noise Generators" /* noiseGenerators */,
2610
+ data: {
2611
+ title: "Spheres Noise",
2612
+ frequency: 0.1
2613
+ },
2614
+ handles: [
2615
+ {
2616
+ position: import_system7.Position.Left,
2617
+ dataType: import_abstract10.CoreHandleType.variableProperty,
2618
+ connection: "target"
3023
2619
  },
3024
- handles: [
3025
- {
3026
- position: import_system7.Position.Left,
3027
- dataType: 16 /* variableProperty */,
3028
- connection: "target"
3029
- },
3030
- {
3031
- position: import_system7.Position.Right,
3032
- dataType: 8 /* module */,
3033
- connection: "source"
3034
- }
3035
- ]
3036
- };
3037
- }
3038
- isHandleAllowed(type) {
3039
- return type === "source";
3040
- }
3041
- getHandleAllowedDataType() {
3042
- return 8 /* module */;
3043
- }
2620
+ {
2621
+ position: import_system7.Position.Right,
2622
+ dataType: "module" /* module */,
2623
+ connection: "source"
2624
+ }
2625
+ ]
2626
+ };
3044
2627
  };
3045
2628
 
3046
2629
  // src/templates/generators/noise-voronoi-template.ts
3047
- var import_utils10 = require("@awesome-flow/core/utils");
2630
+ var import_abstract11 = require("@awesome-flow/core/abstract");
3048
2631
  var import_system8 = require("@xyflow/system");
3049
2632
  var NoiseVoronoiNodeTemplateFactory = class {
3050
- create() {
3051
- return {
3052
- id: import_utils10.IDGenerator.template(),
3053
- type: "noise-voronoi" /* noiseVoronoi */,
3054
- removable: false,
3055
- data: {
3056
- title: "Voronoi Noise",
3057
- frequency: 0.1,
3058
- displacement: 1,
3059
- distance: true,
3060
- seed: 0
2633
+ template = {
2634
+ type: "noise-voronoi" /* noiseVoronoi */,
2635
+ group: "Noise Generators" /* noiseGenerators */,
2636
+ data: {
2637
+ title: "Voronoi Noise",
2638
+ frequency: 0.1,
2639
+ displacement: 1,
2640
+ distance: true,
2641
+ seed: 0
2642
+ },
2643
+ handles: [
2644
+ {
2645
+ position: import_system8.Position.Left,
2646
+ dataType: import_abstract11.CoreHandleType.variableProperty,
2647
+ connection: "target"
3061
2648
  },
3062
- handles: [
3063
- {
3064
- position: import_system8.Position.Left,
3065
- dataType: 16 /* variableProperty */,
3066
- connection: "target"
3067
- },
3068
- {
3069
- position: import_system8.Position.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
- }
2649
+ {
2650
+ position: import_system8.Position.Right,
2651
+ dataType: "module" /* module */,
2652
+ connection: "source"
2653
+ }
2654
+ ]
2655
+ };
3082
2656
  };
3083
2657
 
3084
2658
  // src/templates/generators/position-const-template.ts
3085
- var import_utils11 = require("@awesome-flow/core/utils");
3086
2659
  var import_system9 = require("@xyflow/system");
3087
2660
  var PositionConstNodeTemplateFactory = class {
3088
- create() {
3089
- return {
3090
- id: import_utils11.IDGenerator.template(),
3091
- type: "position" /* position */,
3092
- removable: false,
3093
- data: {
3094
- title: "Position Output",
3095
- position: { x: 0, y: 0, z: 0 }
3096
- },
3097
- handles: [
3098
- {
3099
- position: import_system9.Position.Right,
3100
- dataType: 4 /* position */,
3101
- connection: "source"
3102
- }
3103
- ]
3104
- };
3105
- }
3106
- isHandleAllowed(type) {
3107
- return type === "source";
3108
- }
3109
- getHandleAllowedDataType(type) {
3110
- return 4 /* position */;
3111
- }
2661
+ template = {
2662
+ type: "position" /* position */,
2663
+ group: "Positions" /* positions */,
2664
+ data: {
2665
+ title: "Position Output",
2666
+ position: { x: 0, y: 0, z: 0 }
2667
+ },
2668
+ handles: [
2669
+ {
2670
+ position: import_system9.Position.Right,
2671
+ dataType: "position" /* position */,
2672
+ connection: "source"
2673
+ }
2674
+ ]
2675
+ };
3112
2676
  };
3113
2677
 
3114
2678
  // src/templates/generators/position-grid-template.ts
3115
- var import_utils12 = require("@awesome-flow/core/utils");
3116
2679
  var import_system10 = require("@xyflow/system");
3117
2680
  var PositionGridNodeTemplateFactory = class {
3118
- create() {
3119
- return {
3120
- id: import_utils12.IDGenerator.template(),
3121
- type: "grid" /* grid */,
3122
- removable: false,
3123
- data: {
3124
- title: "Grid Output",
3125
- center: { x: 0, y: 0, z: 0 },
3126
- radius: 1
3127
- },
3128
- handles: [
3129
- {
3130
- position: import_system10.Position.Right,
3131
- dataType: 4 /* position */,
3132
- connection: "source"
3133
- }
3134
- ]
3135
- };
3136
- }
3137
- isHandleAllowed(type) {
3138
- return type === "source";
3139
- }
3140
- getHandleAllowedDataType(type) {
3141
- return 4 /* position */;
3142
- }
2681
+ template = {
2682
+ type: "grid" /* grid */,
2683
+ group: "Positions" /* positions */,
2684
+ data: {
2685
+ title: "Grid Output",
2686
+ center: { x: 0, y: 0, z: 0 },
2687
+ radius: 1
2688
+ },
2689
+ handles: [
2690
+ {
2691
+ position: import_system10.Position.Right,
2692
+ dataType: "position" /* position */,
2693
+ connection: "source"
2694
+ }
2695
+ ]
2696
+ };
3143
2697
  };
3144
2698
 
3145
2699
  // src/templates/modifiers/noise-normalize-template.ts
3146
- var import_utils13 = require("@awesome-flow/core/utils");
2700
+ var import_utils = require("@awesome-flow/core/utils");
3147
2701
  var import_system11 = require("@xyflow/system");
3148
2702
  var NoiseNormalizeNodeTemplateFactory = class {
3149
- create() {
3150
- return {
3151
- id: import_utils13.IDGenerator.template(),
3152
- type: "noise-normalize" /* noiseNormalize */,
3153
- data: {
3154
- title: "Normalize Noise",
3155
- intervalStart: -1,
3156
- intervalEnd: 1
2703
+ template = {
2704
+ id: import_utils.IDGenerator.template(),
2705
+ type: "noise-normalize" /* noiseNormalize */,
2706
+ group: "Noise Modifiers" /* noiseModifiers */,
2707
+ data: {
2708
+ title: "Normalize Noise",
2709
+ intervalStart: -1,
2710
+ intervalEnd: 1
2711
+ },
2712
+ handles: [
2713
+ {
2714
+ position: import_system11.Position.Left,
2715
+ dataType: "module" /* module */,
2716
+ connection: "target",
2717
+ maxConnections: 1
3157
2718
  },
3158
- handles: [
3159
- {
3160
- position: import_system11.Position.Left,
3161
- dataType: 8 /* module */,
3162
- connection: "target",
3163
- maxConnections: 1
3164
- },
3165
- {
3166
- position: import_system11.Position.Right,
3167
- dataType: 8 /* module */,
3168
- connection: "source"
3169
- }
3170
- ]
3171
- };
3172
- }
3173
- isHandleAllowed() {
3174
- return true;
3175
- }
3176
- getHandleAllowedDataType(type) {
3177
- return 8 /* module */;
3178
- }
2719
+ {
2720
+ position: import_system11.Position.Right,
2721
+ dataType: "module" /* module */,
2722
+ connection: "source"
2723
+ }
2724
+ ]
2725
+ };
3179
2726
  };
3180
2727
 
3181
2728
  // src/templates/output/noise-logger-template.ts
3182
- var import_utils14 = require("@awesome-flow/core/utils");
3183
2729
  var import_system12 = require("@xyflow/system");
3184
2730
  var NoiseLoggerNodeTemplateFactory = class {
3185
- create() {
3186
- return {
3187
- id: import_utils14.IDGenerator.template(),
3188
- type: "noise-logger" /* noiseLogger */,
3189
- removable: false,
3190
- data: {
3191
- title: "Noise Logger"
3192
- },
3193
- handles: [
3194
- {
3195
- position: import_system12.Position.Left,
3196
- dataType: 2 /* noise */,
3197
- connection: "target"
3198
- }
3199
- ]
3200
- };
3201
- }
3202
- isHandleAllowed(type) {
3203
- return type === "target";
3204
- }
3205
- getHandleAllowedDataType(type) {
3206
- return 2 /* noise */;
3207
- }
2731
+ template = {
2732
+ type: "noise-logger" /* noiseLogger */,
2733
+ group: "Output" /* output */,
2734
+ data: {
2735
+ title: "Noise Logger"
2736
+ },
2737
+ handles: [
2738
+ {
2739
+ position: import_system12.Position.Left,
2740
+ dataType: "noise" /* noise */,
2741
+ connection: "target"
2742
+ }
2743
+ ]
2744
+ };
3208
2745
  };
3209
2746
 
3210
2747
  // src/templates/output/noise-raw-texture-template.ts
3211
- var import_utils15 = require("@awesome-flow/core/utils");
3212
2748
  var import_system13 = require("@xyflow/system");
3213
2749
  var NoiseRawTextureTemplateFactory = class {
3214
- create() {
3215
- return {
3216
- id: import_utils15.IDGenerator.template(),
3217
- type: "texture-data" /* textureData */,
3218
- removable: false,
3219
- data: {
3220
- title: "Texture Data"
2750
+ template = {
2751
+ type: "texture-data" /* textureData */,
2752
+ group: "Output" /* output */,
2753
+ data: {
2754
+ title: "Texture Data"
2755
+ },
2756
+ handles: [
2757
+ {
2758
+ position: import_system13.Position.Left,
2759
+ dataType: "noise" /* noise */,
2760
+ connection: "target",
2761
+ maxConnections: 1
3221
2762
  },
3222
- handles: [
3223
- {
3224
- position: import_system13.Position.Left,
3225
- dataType: 2 /* noise */,
3226
- connection: "target",
3227
- maxConnections: 1
3228
- },
3229
- {
3230
- position: import_system13.Position.Right,
3231
- dataType: 1 /* texture */,
3232
- connection: "source"
3233
- }
3234
- ]
3235
- };
3236
- }
3237
- isHandleAllowed() {
3238
- return true;
3239
- }
3240
- getHandleAllowedDataType(type) {
3241
- switch (type) {
3242
- case "source":
3243
- return 1 /* texture */;
3244
- case "target":
3245
- return 2 /* noise */;
3246
- }
3247
- }
2763
+ {
2764
+ position: import_system13.Position.Right,
2765
+ dataType: "texture" /* texture */,
2766
+ connection: "source"
2767
+ }
2768
+ ]
2769
+ };
3248
2770
  };
3249
2771
 
3250
2772
  // src/templates/output/position-logger-template.ts
3251
- var import_utils16 = require("@awesome-flow/core/utils");
3252
2773
  var import_system14 = require("@xyflow/system");
3253
2774
  var PositionLoggerNodeTemplateFactory = class {
3254
- create() {
3255
- return {
3256
- id: import_utils16.IDGenerator.template(),
3257
- type: "position-logger" /* positionLogger */,
3258
- removable: false,
3259
- data: {
3260
- title: "Position Logger"
3261
- },
3262
- handles: [
3263
- {
3264
- position: import_system14.Position.Left,
3265
- dataType: 4 /* position */,
3266
- connection: "target"
3267
- }
3268
- ]
3269
- };
3270
- }
3271
- isHandleAllowed(type) {
3272
- return type === "target";
3273
- }
3274
- getHandleAllowedDataType(type) {
3275
- return 4 /* position */;
3276
- }
2775
+ template = {
2776
+ type: "position-logger" /* positionLogger */,
2777
+ group: "Positions" /* positions */,
2778
+ data: {
2779
+ title: "Position Logger"
2780
+ },
2781
+ handles: [
2782
+ {
2783
+ position: import_system14.Position.Left,
2784
+ dataType: "position" /* position */,
2785
+ connection: "target"
2786
+ }
2787
+ ]
2788
+ };
3277
2789
  };
3278
2790
 
3279
2791
  // src/templates/modifiers/noise-combine-template.ts
3280
- var import_utils17 = require("@awesome-flow/core/utils");
3281
2792
  var import_system15 = require("@xyflow/system");
3282
2793
  var NoiseCombineNodeTemplateFactory = class {
3283
- create() {
3284
- return {
3285
- id: import_utils17.IDGenerator.template(),
3286
- type: "noise-combiner" /* noiseCombine */,
3287
- removable: false,
3288
- data: {
3289
- title: "Combine Noise",
3290
- operation: "add" /* add */
2794
+ template = {
2795
+ type: "noise-combiner" /* noiseCombine */,
2796
+ group: "Noise Modifiers" /* noiseModifiers */,
2797
+ data: {
2798
+ title: "Combine Noise",
2799
+ operation: "add" /* add */
2800
+ },
2801
+ handles: [
2802
+ {
2803
+ position: import_system15.Position.Left,
2804
+ dataType: "module" /* module */,
2805
+ connection: "target",
2806
+ maxConnections: 2
3291
2807
  },
3292
- handles: [
3293
- {
3294
- position: import_system15.Position.Left,
3295
- dataType: 8 /* module */,
3296
- connection: "target",
3297
- maxConnections: 2
3298
- },
3299
- {
3300
- position: import_system15.Position.Right,
3301
- dataType: 8 /* module */,
3302
- connection: "source"
3303
- }
3304
- ]
3305
- };
3306
- }
3307
- isHandleAllowed() {
3308
- return true;
3309
- }
3310
- getHandleAllowedDataType(type) {
3311
- return 8 /* module */;
3312
- }
2808
+ {
2809
+ position: import_system15.Position.Right,
2810
+ dataType: "module" /* module */,
2811
+ connection: "source"
2812
+ }
2813
+ ]
2814
+ };
3313
2815
  };
3314
2816
 
3315
2817
  // src/templates/modifiers/noise-clamp-template.ts
3316
- var import_utils18 = require("@awesome-flow/core/utils");
3317
2818
  var import_system16 = require("@xyflow/system");
3318
2819
  var NoiseClampNodeTemplateFactory = class {
3319
- create() {
3320
- return {
3321
- id: import_utils18.IDGenerator.template(),
3322
- type: "noise-clamp" /* noiseClamp */,
3323
- removable: false,
3324
- data: {
3325
- title: "Clamp Noise",
3326
- lowerBound: -1,
3327
- upperBound: 1
2820
+ template = {
2821
+ type: "noise-clamp" /* noiseClamp */,
2822
+ group: "Noise Modifiers" /* noiseModifiers */,
2823
+ data: {
2824
+ title: "Clamp Noise",
2825
+ lowerBound: -1,
2826
+ upperBound: 1
2827
+ },
2828
+ handles: [
2829
+ {
2830
+ position: import_system16.Position.Left,
2831
+ dataType: "module" /* module */,
2832
+ connection: "target",
2833
+ maxConnections: 1
3328
2834
  },
3329
- handles: [
3330
- {
3331
- position: import_system16.Position.Left,
3332
- dataType: 8 /* module */,
3333
- connection: "target",
3334
- maxConnections: 1
3335
- },
3336
- {
3337
- position: import_system16.Position.Right,
3338
- dataType: 8 /* module */,
3339
- connection: "source"
3340
- }
3341
- ]
3342
- };
3343
- }
3344
- isHandleAllowed() {
3345
- return true;
3346
- }
3347
- getHandleAllowedDataType(type) {
3348
- return 8 /* module */;
3349
- }
2835
+ {
2836
+ position: import_system16.Position.Right,
2837
+ dataType: "module" /* module */,
2838
+ connection: "source"
2839
+ }
2840
+ ]
2841
+ };
3350
2842
  };
3351
2843
 
3352
2844
  // src/templates/modifiers/noise-abs-template.ts
3353
- var import_utils19 = require("@awesome-flow/core/utils");
3354
2845
  var import_system17 = require("@xyflow/system");
3355
2846
  var NoiseAbsNodeTemplateFactory = class {
3356
- create() {
3357
- return {
3358
- id: import_utils19.IDGenerator.template(),
3359
- type: "noise-abs" /* noiseAbs */,
3360
- removable: false,
3361
- data: {
3362
- title: "Abs Noise"
2847
+ template = {
2848
+ type: "noise-abs" /* noiseAbs */,
2849
+ group: "Noise Modifiers" /* noiseModifiers */,
2850
+ data: {
2851
+ title: "Abs Noise"
2852
+ },
2853
+ handles: [
2854
+ {
2855
+ position: import_system17.Position.Left,
2856
+ dataType: "module" /* module */,
2857
+ connection: "target",
2858
+ maxConnections: 1
3363
2859
  },
3364
- handles: [
3365
- {
3366
- position: import_system17.Position.Left,
3367
- dataType: 8 /* module */,
3368
- connection: "target",
3369
- maxConnections: 1
3370
- },
3371
- {
3372
- position: import_system17.Position.Right,
3373
- dataType: 8 /* module */,
3374
- connection: "source"
3375
- }
3376
- ]
3377
- };
3378
- }
3379
- isHandleAllowed() {
3380
- return true;
3381
- }
3382
- getHandleAllowedDataType(type) {
3383
- return 8 /* module */;
3384
- }
2860
+ {
2861
+ position: import_system17.Position.Right,
2862
+ dataType: "module" /* module */,
2863
+ connection: "source"
2864
+ }
2865
+ ]
2866
+ };
3385
2867
  };
3386
2868
 
3387
2869
  // src/templates/output/noise-output-template.ts
3388
- var import_utils20 = require("@awesome-flow/core/utils");
3389
2870
  var import_system18 = require("@xyflow/system");
3390
2871
  var NoiseOutputNodeTemplateFactory = class {
3391
- create() {
3392
- return {
3393
- id: import_utils20.IDGenerator.template(),
3394
- type: "noise-output" /* noiseOutput */,
3395
- removable: false,
3396
- data: {
3397
- title: "Noise Output"
2872
+ template = {
2873
+ type: "noise-output" /* noiseOutput */,
2874
+ group: "Output" /* output */,
2875
+ data: {
2876
+ title: "Noise Output"
2877
+ },
2878
+ handles: [
2879
+ {
2880
+ position: import_system18.Position.Left,
2881
+ dataType: "position" /* position */,
2882
+ connection: "target"
3398
2883
  },
3399
- handles: [
3400
- {
3401
- position: import_system18.Position.Left,
3402
- dataType: 4 /* position */,
3403
- connection: "target"
3404
- },
3405
- {
3406
- position: import_system18.Position.Left,
3407
- dataType: 8 /* module */,
3408
- connection: "target",
3409
- maxConnections: 1
3410
- },
3411
- {
3412
- position: import_system18.Position.Right,
3413
- dataType: 2 /* noise */,
3414
- connection: "source"
3415
- }
3416
- ]
3417
- };
3418
- }
3419
- isHandleAllowed() {
3420
- return true;
3421
- }
3422
- getHandleAllowedDataType(type) {
3423
- switch (type) {
3424
- case "source":
3425
- return 2 /* noise */;
3426
- case "target":
3427
- return 8 /* module */ & 4 /* position */;
3428
- }
3429
- }
2884
+ {
2885
+ position: import_system18.Position.Left,
2886
+ dataType: "module" /* module */,
2887
+ connection: "target",
2888
+ maxConnections: 1
2889
+ },
2890
+ {
2891
+ position: import_system18.Position.Right,
2892
+ dataType: "noise" /* noise */,
2893
+ connection: "source"
2894
+ }
2895
+ ]
2896
+ };
3430
2897
  };
3431
2898
 
3432
2899
  // src/templates/modifiers/noise-curve-template.ts
3433
- var import_utils21 = require("@awesome-flow/core/utils");
2900
+ var import_abstract20 = require("@awesome-flow/core/abstract");
3434
2901
  var import_system19 = require("@xyflow/system");
3435
2902
  var NoiseCurveNodeTemplateFactory = class {
3436
- create() {
3437
- return {
3438
- id: import_utils21.IDGenerator.template(),
3439
- type: "noise-curve" /* noiseCurve */,
3440
- removable: false,
3441
- data: {
3442
- title: "Noise Curve",
3443
- points: []
2903
+ template = {
2904
+ type: "noise-curve" /* noiseCurve */,
2905
+ group: "Noise Modifiers" /* noiseModifiers */,
2906
+ data: {
2907
+ title: "Noise Curve",
2908
+ points: []
2909
+ },
2910
+ handles: [
2911
+ {
2912
+ position: import_system19.Position.Left,
2913
+ dataType: "module" /* module */,
2914
+ connection: "target",
2915
+ maxConnections: 1
3444
2916
  },
3445
- handles: [
3446
- {
3447
- position: import_system19.Position.Left,
3448
- dataType: 8 /* module */,
3449
- connection: "target",
3450
- maxConnections: 1
3451
- },
3452
- {
3453
- position: import_system19.Position.Right,
3454
- dataType: 8 /* module */,
3455
- connection: "source"
3456
- }
3457
- ]
3458
- };
3459
- }
3460
- isHandleAllowed() {
3461
- return true;
3462
- }
3463
- getHandleAllowedDataType(type) {
3464
- return 8 /* module */;
3465
- }
2917
+ {
2918
+ position: import_system19.Position.Left,
2919
+ dataType: import_abstract20.CoreHandleType.variableProperty,
2920
+ connection: "target"
2921
+ },
2922
+ {
2923
+ position: import_system19.Position.Right,
2924
+ dataType: "module" /* module */,
2925
+ connection: "source"
2926
+ }
2927
+ ]
2928
+ };
3466
2929
  };
3467
2930
 
3468
2931
  // src/templates/modifiers/noise-exponent-template.ts
3469
- var import_utils22 = require("@awesome-flow/core/utils");
3470
2932
  var import_system20 = require("@xyflow/system");
3471
2933
  var NoiseExponentNodeTemplateFactory = class {
3472
- create() {
3473
- return {
3474
- id: import_utils22.IDGenerator.template(),
3475
- type: "noise-exponent" /* noiseExponent */,
3476
- removable: false,
3477
- data: {
3478
- title: "Noise Exponent",
3479
- exponent: 1
2934
+ template = {
2935
+ type: "noise-exponent" /* noiseExponent */,
2936
+ group: "Noise Modifiers" /* noiseModifiers */,
2937
+ data: {
2938
+ title: "Noise Exponent",
2939
+ exponent: 1
2940
+ },
2941
+ handles: [
2942
+ {
2943
+ position: import_system20.Position.Left,
2944
+ dataType: "module" /* module */,
2945
+ connection: "target",
2946
+ maxConnections: 1
3480
2947
  },
3481
- handles: [
3482
- {
3483
- position: import_system20.Position.Left,
3484
- dataType: 8 /* module */,
3485
- connection: "target",
3486
- maxConnections: 1
3487
- },
3488
- {
3489
- position: import_system20.Position.Right,
3490
- dataType: 8 /* module */,
3491
- connection: "source"
3492
- }
3493
- ]
3494
- };
3495
- }
3496
- isHandleAllowed() {
3497
- return true;
3498
- }
3499
- getHandleAllowedDataType(type) {
3500
- return 8 /* module */;
3501
- }
2948
+ {
2949
+ position: import_system20.Position.Right,
2950
+ dataType: "module" /* module */,
2951
+ connection: "source"
2952
+ }
2953
+ ]
2954
+ };
3502
2955
  };
3503
2956
 
3504
2957
  // src/templates/modifiers/noise-invert-template.ts
3505
- var import_utils23 = require("@awesome-flow/core/utils");
3506
2958
  var import_system21 = require("@xyflow/system");
3507
2959
  var NoiseInvertNodeTemplateFactory = class {
3508
- create() {
3509
- return {
3510
- id: import_utils23.IDGenerator.template(),
3511
- type: "noise-invert" /* noiseInvert */,
3512
- removable: false,
3513
- data: {
3514
- title: "Invert Noise"
2960
+ template = {
2961
+ type: "noise-invert" /* noiseInvert */,
2962
+ group: "Noise Modifiers" /* noiseModifiers */,
2963
+ data: {
2964
+ title: "Invert Noise"
2965
+ },
2966
+ handles: [
2967
+ {
2968
+ position: import_system21.Position.Left,
2969
+ dataType: "module" /* module */,
2970
+ connection: "target",
2971
+ maxConnections: 1
3515
2972
  },
3516
- handles: [
3517
- {
3518
- position: import_system21.Position.Left,
3519
- dataType: 8 /* module */,
3520
- connection: "target",
3521
- maxConnections: 1
3522
- },
3523
- {
3524
- position: import_system21.Position.Right,
3525
- dataType: 8 /* module */,
3526
- connection: "source"
3527
- }
3528
- ]
3529
- };
3530
- }
3531
- isHandleAllowed() {
3532
- return true;
3533
- }
3534
- getHandleAllowedDataType(type) {
3535
- return 8 /* module */;
3536
- }
2973
+ {
2974
+ position: import_system21.Position.Right,
2975
+ dataType: "module" /* module */,
2976
+ connection: "source"
2977
+ }
2978
+ ]
2979
+ };
3537
2980
  };
3538
2981
 
3539
2982
  // src/templates/modifiers/noise-scalebias-template.ts
3540
- var import_utils24 = require("@awesome-flow/core/utils");
3541
2983
  var import_system22 = require("@xyflow/system");
3542
2984
  var NoiseScaleBiasNodeTemplateFactory = class {
3543
- create() {
3544
- return {
3545
- id: import_utils24.IDGenerator.template(),
3546
- type: "noise-scale-bias" /* noiseScaleBias */,
3547
- removable: false,
3548
- data: {
3549
- title: "Scale/Bias Noise",
3550
- scale: 1,
3551
- bias: 0
2985
+ template = {
2986
+ type: "noise-scale-bias" /* noiseScaleBias */,
2987
+ group: "Noise Modifiers" /* noiseModifiers */,
2988
+ data: {
2989
+ title: "Scale/Bias Noise",
2990
+ scale: 1,
2991
+ bias: 0
2992
+ },
2993
+ handles: [
2994
+ {
2995
+ position: import_system22.Position.Left,
2996
+ dataType: "module" /* module */,
2997
+ connection: "target",
2998
+ maxConnections: 1
3552
2999
  },
3553
- handles: [
3554
- {
3555
- position: import_system22.Position.Left,
3556
- dataType: 8 /* module */,
3557
- connection: "target",
3558
- maxConnections: 1
3559
- },
3560
- {
3561
- position: import_system22.Position.Right,
3562
- dataType: 8 /* module */,
3563
- connection: "source"
3564
- }
3565
- ]
3566
- };
3567
- }
3568
- isHandleAllowed() {
3569
- return true;
3570
- }
3571
- getHandleAllowedDataType(type) {
3572
- return 8 /* module */;
3573
- }
3000
+ {
3001
+ position: import_system22.Position.Right,
3002
+ dataType: "module" /* module */,
3003
+ connection: "source"
3004
+ }
3005
+ ]
3006
+ };
3574
3007
  };
3575
3008
 
3576
3009
  // src/templates/modifiers/noise-terrace-template.ts
3577
- var import_utils25 = require("@awesome-flow/core/utils");
3578
3010
  var import_system23 = require("@xyflow/system");
3579
3011
  var NoiseTerraceNodeTemplateFactory = class {
3580
- create() {
3581
- return {
3582
- id: import_utils25.IDGenerator.template(),
3583
- type: "noise-terrace" /* noiseTerrace */,
3584
- removable: false,
3585
- data: {
3586
- title: "Noise Terrace",
3587
- points: []
3012
+ template = {
3013
+ type: "noise-terrace" /* noiseTerrace */,
3014
+ group: "Noise Modifiers" /* noiseModifiers */,
3015
+ data: {
3016
+ title: "Noise Terrace",
3017
+ points: []
3018
+ },
3019
+ handles: [
3020
+ {
3021
+ position: import_system23.Position.Left,
3022
+ dataType: "module" /* module */,
3023
+ connection: "target",
3024
+ maxConnections: 1
3588
3025
  },
3589
- handles: [
3590
- {
3591
- position: import_system23.Position.Left,
3592
- dataType: 8 /* module */,
3593
- connection: "target",
3594
- maxConnections: 1
3595
- },
3596
- {
3597
- position: import_system23.Position.Right,
3598
- dataType: 8 /* module */,
3599
- connection: "source"
3600
- }
3601
- ]
3602
- };
3603
- }
3604
- isHandleAllowed() {
3605
- return true;
3606
- }
3607
- getHandleAllowedDataType(type) {
3608
- return 8 /* module */;
3609
- }
3026
+ {
3027
+ position: import_system23.Position.Right,
3028
+ dataType: "module" /* module */,
3029
+ connection: "source"
3030
+ }
3031
+ ]
3032
+ };
3610
3033
  };
3611
3034
 
3612
3035
  // src/templates/selectors/noise-blend-template.ts
3613
- var import_utils26 = require("@awesome-flow/core/utils");
3614
3036
  var import_system24 = require("@xyflow/system");
3615
3037
  var NoiseBlendNodeTemplateFactory = class {
3616
- create() {
3617
- return {
3618
- id: import_utils26.IDGenerator.template(),
3619
- type: "noise-blend" /* noiseBlend */,
3620
- removable: false,
3621
- data: {
3622
- title: "Noise Blend"
3038
+ template = {
3039
+ type: "noise-blend" /* noiseBlend */,
3040
+ group: "Noise Selectors" /* noiseSelectors */,
3041
+ data: {
3042
+ title: "Noise Blend"
3043
+ },
3044
+ handles: [
3045
+ {
3046
+ position: import_system24.Position.Left,
3047
+ dataType: "module" /* module */,
3048
+ connection: "target",
3049
+ label: "Source Modules",
3050
+ dataId: "source" /* source */,
3051
+ maxConnections: 2,
3052
+ minConnections: 2
3053
+ },
3054
+ {
3055
+ position: import_system24.Position.Left,
3056
+ dataType: "module" /* module */,
3057
+ dataId: "control" /* control */,
3058
+ connection: "target",
3059
+ label: "Control Module",
3060
+ maxConnections: 1
3623
3061
  },
3624
- handles: [
3625
- {
3626
- position: import_system24.Position.Left,
3627
- dataType: 8 /* module */,
3628
- connection: "target",
3629
- label: "Source Modules",
3630
- maxConnections: 2
3631
- },
3632
- {
3633
- position: import_system24.Position.Left,
3634
- dataType: 8 /* module */,
3635
- connection: "target",
3636
- label: "Control Module",
3637
- maxConnections: 1
3638
- },
3639
- {
3640
- position: import_system24.Position.Right,
3641
- dataType: 8 /* module */,
3642
- connection: "source"
3643
- }
3644
- ]
3645
- };
3646
- }
3647
- isHandleAllowed() {
3648
- return true;
3649
- }
3650
- getHandleAllowedDataType() {
3651
- return 8 /* module */;
3652
- }
3062
+ {
3063
+ position: import_system24.Position.Right,
3064
+ dataType: "module" /* module */,
3065
+ dataId: "output" /* output */,
3066
+ connection: "source"
3067
+ }
3068
+ ]
3069
+ };
3653
3070
  };
3654
3071
 
3655
3072
  // src/templates/selectors/noise-select-template.ts
3656
- var import_utils27 = require("@awesome-flow/core/utils");
3657
3073
  var import_system25 = require("@xyflow/system");
3658
3074
  var NoiseSelectNodeTemplateFactory = class {
3659
- create() {
3660
- return {
3661
- id: import_utils27.IDGenerator.template(),
3662
- type: "noise-select" /* noiseSelect */,
3663
- removable: false,
3664
- data: {
3665
- title: "Noise Select",
3666
- edgeFalloff: 0,
3667
- lowerBound: -1,
3668
- upperBound: 1
3075
+ template = {
3076
+ type: "noise-select" /* noiseSelect */,
3077
+ group: "Noise Selectors" /* noiseSelectors */,
3078
+ data: {
3079
+ title: "Noise Select",
3080
+ edgeFalloff: 0,
3081
+ lowerBound: -1,
3082
+ upperBound: 1
3083
+ },
3084
+ handles: [
3085
+ {
3086
+ position: import_system25.Position.Left,
3087
+ dataType: "module" /* module */,
3088
+ dataId: "source" /* source */,
3089
+ connection: "target",
3090
+ label: "Source Modules",
3091
+ maxConnections: 2,
3092
+ minConnections: 2
3669
3093
  },
3670
- handles: [
3671
- {
3672
- position: import_system25.Position.Left,
3673
- dataType: 8 /* module */,
3674
- connection: "target",
3675
- label: "Source Modules",
3676
- maxConnections: 2
3677
- },
3678
- {
3679
- position: import_system25.Position.Left,
3680
- dataType: 8 /* module */,
3681
- connection: "target",
3682
- label: "Control Module",
3683
- maxConnections: 1
3684
- },
3685
- {
3686
- position: import_system25.Position.Right,
3687
- dataType: 8 /* module */,
3688
- connection: "source"
3689
- }
3690
- ]
3691
- };
3692
- }
3693
- isHandleAllowed() {
3694
- return true;
3695
- }
3696
- getHandleAllowedDataType() {
3697
- return 8 /* module */;
3698
- }
3094
+ {
3095
+ position: import_system25.Position.Left,
3096
+ dataType: "module" /* module */,
3097
+ dataId: "control" /* control */,
3098
+ connection: "target",
3099
+ label: "Control Module",
3100
+ maxConnections: 1
3101
+ },
3102
+ {
3103
+ position: import_system25.Position.Right,
3104
+ dataType: "module" /* module */,
3105
+ dataId: "output" /* output */,
3106
+ connection: "source"
3107
+ }
3108
+ ]
3109
+ };
3699
3110
  };
3700
3111
 
3701
3112
  // src/templates/transformers/noise-displace-template.ts
3702
- var import_utils28 = require("@awesome-flow/core/utils");
3703
3113
  var import_system26 = require("@xyflow/system");
3704
3114
  var NoiseDisplaceNodeTemplateFactory = class {
3705
- create() {
3706
- return {
3707
- id: import_utils28.IDGenerator.template(),
3708
- type: "noise-displace" /* noiseDisplace */,
3709
- data: {
3710
- title: "Noise Displace"
3115
+ template = {
3116
+ type: "noise-displace" /* noiseDisplace */,
3117
+ group: "Noise Transformers" /* noiseTransformers */,
3118
+ data: {
3119
+ title: "Noise Displace"
3120
+ },
3121
+ handles: [
3122
+ {
3123
+ position: import_system26.Position.Left,
3124
+ connection: "target",
3125
+ label: "Source Module",
3126
+ dataType: "module" /* module */,
3127
+ dataId: "source" /* sourceModule */,
3128
+ maxConnections: 1
3711
3129
  },
3712
- handles: [
3713
- {
3714
- position: import_system26.Position.Left,
3715
- connection: "target",
3716
- label: "Source Module",
3717
- dataType: 8 /* module */,
3718
- dataId: "source" /* sourceModule */,
3719
- maxConnections: 1
3720
- },
3721
- {
3722
- position: import_system26.Position.Left,
3723
- connection: "target",
3724
- label: "X Module",
3725
- dataType: 8 /* module */,
3726
- dataId: "x-module" /* xModule */,
3727
- maxConnections: 1
3728
- },
3729
- {
3730
- position: import_system26.Position.Left,
3731
- connection: "target",
3732
- label: "Y Module",
3733
- dataType: 8 /* module */,
3734
- dataId: "y-module" /* yModule */,
3735
- maxConnections: 1
3736
- },
3737
- {
3738
- position: import_system26.Position.Left,
3739
- connection: "target",
3740
- label: "Z Module",
3741
- dataType: 8 /* module */,
3742
- dataId: "z-module" /* zModule */,
3743
- maxConnections: 1
3744
- },
3745
- {
3746
- position: import_system26.Position.Right,
3747
- dataType: 8 /* module */,
3748
- dataId: "output" /* output */,
3749
- connection: "source"
3750
- }
3751
- ]
3752
- };
3753
- }
3754
- isHandleAllowed() {
3755
- return true;
3756
- }
3757
- getHandleAllowedDataType() {
3758
- return 8 /* module */;
3759
- }
3130
+ {
3131
+ position: import_system26.Position.Left,
3132
+ connection: "target",
3133
+ label: "X Module",
3134
+ dataType: "module" /* module */,
3135
+ dataId: "x-module" /* xModule */,
3136
+ maxConnections: 1
3137
+ },
3138
+ {
3139
+ position: import_system26.Position.Left,
3140
+ connection: "target",
3141
+ label: "Y Module",
3142
+ dataType: "module" /* module */,
3143
+ dataId: "y-module" /* yModule */,
3144
+ maxConnections: 1
3145
+ },
3146
+ {
3147
+ position: import_system26.Position.Left,
3148
+ connection: "target",
3149
+ label: "Z Module",
3150
+ dataType: "module" /* module */,
3151
+ dataId: "z-module" /* zModule */,
3152
+ maxConnections: 1
3153
+ },
3154
+ {
3155
+ position: import_system26.Position.Right,
3156
+ dataType: "module" /* module */,
3157
+ dataId: "output" /* output */,
3158
+ connection: "source"
3159
+ }
3160
+ ]
3161
+ };
3760
3162
  };
3761
3163
 
3762
3164
  // src/templates/transformers/noise-rotate-point-template.ts
3763
- var import_utils29 = require("@awesome-flow/core/utils");
3764
3165
  var import_system27 = require("@xyflow/system");
3765
3166
  var NoiseRotatePointNodeTemplateFactory = class {
3766
- create() {
3767
- return {
3768
- id: import_utils29.IDGenerator.template(),
3769
- type: "noise-rotate-point" /* noiseRotatePoint */,
3770
- removable: false,
3771
- data: {
3772
- title: "Noise Rotate Point",
3773
- xAngle: 0,
3774
- yAngle: 0,
3775
- zAngle: 0
3167
+ template = {
3168
+ type: "noise-rotate-point" /* noiseRotatePoint */,
3169
+ group: "Noise Transformers" /* noiseTransformers */,
3170
+ data: {
3171
+ title: "Noise Rotate Point",
3172
+ xAngle: 0,
3173
+ yAngle: 0,
3174
+ zAngle: 0
3175
+ },
3176
+ handles: [
3177
+ {
3178
+ position: import_system27.Position.Left,
3179
+ dataType: "module" /* module */,
3180
+ connection: "target",
3181
+ label: "Source Module",
3182
+ maxConnections: 1
3776
3183
  },
3777
- handles: [
3778
- {
3779
- position: import_system27.Position.Left,
3780
- dataType: 8 /* module */,
3781
- connection: "target",
3782
- label: "Source Module",
3783
- maxConnections: 1
3784
- },
3785
- {
3786
- position: import_system27.Position.Right,
3787
- dataType: 8 /* module */,
3788
- connection: "source"
3789
- }
3790
- ]
3791
- };
3792
- }
3793
- isHandleAllowed() {
3794
- return true;
3795
- }
3796
- getHandleAllowedDataType() {
3797
- return 8 /* module */;
3798
- }
3184
+ {
3185
+ position: import_system27.Position.Right,
3186
+ dataType: "module" /* module */,
3187
+ connection: "source"
3188
+ }
3189
+ ]
3190
+ };
3799
3191
  };
3800
3192
 
3801
3193
  // src/templates/transformers/noise-scale-point-template.ts
3802
- var import_utils30 = require("@awesome-flow/core/utils");
3803
3194
  var import_system28 = require("@xyflow/system");
3804
3195
  var NoiseScalePointNodeTemplateFactory = class {
3805
- create() {
3806
- return {
3807
- id: import_utils30.IDGenerator.template(),
3808
- type: "noise-scale-point" /* noiseScalePoint */,
3809
- data: {
3810
- title: "Noise Scale Point",
3811
- xScale: 1,
3812
- yScale: 1,
3813
- zScale: 1
3196
+ template = {
3197
+ type: "noise-scale-point" /* noiseScalePoint */,
3198
+ group: "Noise Transformers" /* noiseTransformers */,
3199
+ data: {
3200
+ title: "Noise Scale Point",
3201
+ xScale: 1,
3202
+ yScale: 1,
3203
+ zScale: 1
3204
+ },
3205
+ handles: [
3206
+ {
3207
+ position: import_system28.Position.Left,
3208
+ dataType: "module" /* module */,
3209
+ connection: "target",
3210
+ label: "Source Module",
3211
+ maxConnections: 1
3814
3212
  },
3815
- handles: [
3816
- {
3817
- position: import_system28.Position.Left,
3818
- dataType: 8 /* module */,
3819
- connection: "target",
3820
- label: "Source Module",
3821
- maxConnections: 1
3822
- },
3823
- {
3824
- position: import_system28.Position.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
- }
3213
+ {
3214
+ position: import_system28.Position.Right,
3215
+ dataType: "module" /* module */,
3216
+ connection: "source"
3217
+ }
3218
+ ]
3219
+ };
3837
3220
  };
3838
3221
 
3839
3222
  // src/templates/transformers/noise-translate-point-template.ts
3840
- var import_utils31 = require("@awesome-flow/core/utils");
3841
3223
  var import_system29 = require("@xyflow/system");
3842
3224
  var NoiseTranslatePointNodeTemplateFactory = class {
3843
- create() {
3844
- return {
3845
- id: import_utils31.IDGenerator.template(),
3846
- type: "noise-translate-point" /* noiseTranslatePoint */,
3847
- data: {
3848
- title: "Noise Translate Point",
3849
- translateX: 0,
3850
- translateY: 0,
3851
- translateZ: 0
3225
+ template = {
3226
+ type: "noise-translate-point" /* noiseTranslatePoint */,
3227
+ group: "Noise Transformers" /* noiseTransformers */,
3228
+ data: {
3229
+ title: "Noise Translate Point",
3230
+ translateX: 0,
3231
+ translateY: 0,
3232
+ translateZ: 0
3233
+ },
3234
+ handles: [
3235
+ {
3236
+ position: import_system29.Position.Left,
3237
+ dataType: "module" /* module */,
3238
+ connection: "target",
3239
+ label: "Source Module",
3240
+ maxConnections: 1
3852
3241
  },
3853
- handles: [
3854
- {
3855
- position: import_system29.Position.Left,
3856
- dataType: 8 /* module */,
3857
- connection: "target",
3858
- label: "Source Module",
3859
- maxConnections: 1
3860
- },
3861
- {
3862
- position: import_system29.Position.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
- }
3242
+ {
3243
+ position: import_system29.Position.Right,
3244
+ dataType: "module" /* module */,
3245
+ connection: "source"
3246
+ }
3247
+ ]
3248
+ };
3875
3249
  };
3876
3250
 
3877
3251
  // src/templates/transformers/noise-turbulence-template.ts
3878
- var import_utils32 = require("@awesome-flow/core/utils");
3252
+ var import_abstract32 = require("@awesome-flow/core/abstract");
3879
3253
  var import_system30 = require("@xyflow/system");
3880
3254
  var NoiseTurbulenceNodeTemplateFactory = class {
3881
- create() {
3882
- return {
3883
- id: import_utils32.IDGenerator.template(),
3884
- type: "noise-turbulence" /* noiseTurbulence */,
3885
- data: {
3886
- title: "Noise Turbulence",
3887
- frequency: 1,
3888
- power: 1,
3889
- roughness: 1,
3890
- seed: 0
3255
+ template = {
3256
+ type: "noise-turbulence" /* noiseTurbulence */,
3257
+ group: "Noise Transformers" /* noiseTransformers */,
3258
+ data: {
3259
+ title: "Noise Turbulence",
3260
+ frequency: 1,
3261
+ power: 1,
3262
+ roughness: 1,
3263
+ seed: 0
3264
+ },
3265
+ handles: [
3266
+ {
3267
+ position: import_system30.Position.Left,
3268
+ dataType: "module" /* module */,
3269
+ connection: "target",
3270
+ label: "Source Module",
3271
+ maxConnections: 1
3891
3272
  },
3892
- handles: [
3893
- {
3894
- position: import_system30.Position.Left,
3895
- dataType: 8 /* module */,
3896
- connection: "target",
3897
- label: "Source Module",
3898
- maxConnections: 1
3899
- },
3900
- {
3901
- position: import_system30.Position.Left,
3902
- dataType: 16 /* variableProperty */,
3903
- label: "Variable Properties",
3904
- connection: "target"
3905
- },
3906
- {
3907
- position: import_system30.Position.Right,
3908
- dataType: 8 /* module */,
3909
- connection: "source"
3910
- }
3911
- ]
3912
- };
3913
- }
3914
- isHandleAllowed() {
3915
- return true;
3916
- }
3917
- getHandleAllowedDataType() {
3918
- return 8 /* module */;
3919
- }
3273
+ {
3274
+ position: import_system30.Position.Left,
3275
+ dataType: import_abstract32.CoreHandleType.variableProperty,
3276
+ label: "Variable Properties",
3277
+ connection: "target"
3278
+ },
3279
+ {
3280
+ position: import_system30.Position.Right,
3281
+ dataType: "module" /* module */,
3282
+ connection: "source"
3283
+ }
3284
+ ]
3285
+ };
3920
3286
  };
3921
3287
 
3922
- // src/templates/generators/variable-property-template.ts
3923
- var import_utils33 = require("@awesome-flow/core/utils");
3288
+ // src/templates/generators/noise-billow-template.ts
3289
+ var import_abstract34 = require("@awesome-flow/core/abstract");
3290
+ var import_utils2 = require("@awesome-flow/core/utils");
3924
3291
  var import_system31 = require("@xyflow/system");
3925
- var VariablePropertyNodeTemplateFactory = class {
3926
- create() {
3927
- return {
3928
- id: import_utils33.IDGenerator.template(),
3929
- type: "variable-property" /* variableProperty */,
3930
- data: {
3931
- title: "Variable Property",
3932
- property: null
3292
+ var NoiseBillowNodeTemplateFactory = class {
3293
+ template = {
3294
+ id: import_utils2.IDGenerator.template(),
3295
+ type: "noise-billow" /* noiseBillow */,
3296
+ group: "Noise Generators" /* noiseGenerators */,
3297
+ data: {
3298
+ title: "Billow Noise",
3299
+ frequency: 0.1,
3300
+ lacunarity: 2,
3301
+ octaves: 5,
3302
+ persistence: 0.5,
3303
+ seed: 0
3304
+ },
3305
+ handles: [
3306
+ {
3307
+ position: import_system31.Position.Left,
3308
+ dataType: import_abstract34.CoreHandleType.variableProperty,
3309
+ connection: "target"
3933
3310
  },
3934
- handles: [
3935
- {
3936
- position: import_system31.Position.Left,
3937
- dataType: 32 /* variableValue */,
3938
- connection: "target",
3939
- maxConnections: 1
3940
- },
3941
- {
3942
- position: import_system31.Position.Right,
3943
- dataType: 16 /* variableProperty */,
3944
- connection: "source"
3945
- }
3946
- ]
3947
- };
3948
- }
3949
- isHandleAllowed(type) {
3950
- return true;
3951
- }
3952
- getHandleAllowedDataType(type) {
3953
- switch (type) {
3954
- case "source":
3955
- return 16 /* variableProperty */;
3956
- case "target":
3957
- return 32 /* variableValue */;
3958
- }
3959
- }
3311
+ {
3312
+ position: import_system31.Position.Right,
3313
+ dataType: "module" /* module */,
3314
+ connection: "source"
3315
+ }
3316
+ ]
3317
+ };
3960
3318
  };
3961
3319
 
3962
- // src/templates/modifiers/variable-combine-template.ts
3963
- var import_utils34 = require("@awesome-flow/core/utils");
3320
+ // src/templates/groups/module-group-template.ts
3321
+ var import_abstract35 = require("@awesome-flow/core/abstract");
3322
+ var import_utils3 = require("@awesome-flow/core/utils");
3964
3323
  var import_system32 = require("@xyflow/system");
3965
- var VariableCombineNodeTemplateFactory = class {
3966
- create() {
3967
- return {
3968
- id: import_utils34.IDGenerator.template(),
3969
- type: "variable-combine" /* variableCombine */,
3970
- removable: false,
3971
- data: {
3972
- title: "Combine Values",
3973
- operation: "add" /* add */,
3974
- value: null
3324
+ var ModuleGroupNodeTemplateFactory = class {
3325
+ template = {
3326
+ id: import_utils3.IDGenerator.template(),
3327
+ type: "group-module" /* groupModule */,
3328
+ group: import_abstract35.CoreTemplateGroup.groups,
3329
+ data: {
3330
+ title: "Modules Group",
3331
+ isGroup: true,
3332
+ initialSize: {
3333
+ width: 300,
3334
+ height: 200
3975
3335
  },
3976
- handles: [
3977
- {
3978
- position: import_system32.Position.Left,
3979
- dataType: 32 /* variableValue */,
3980
- connection: "target"
3981
- },
3982
- {
3983
- position: import_system32.Position.Right,
3984
- dataType: 32 /* variableValue */,
3985
- connection: "source"
3986
- }
3987
- ]
3988
- };
3989
- }
3990
- isHandleAllowed() {
3991
- return true;
3992
- }
3993
- getHandleAllowedDataType(type) {
3994
- return 8 /* module */;
3995
- }
3996
- };
3997
-
3998
- // src/templates/generators/variable-value-template.ts
3999
- var import_utils35 = require("@awesome-flow/core/utils");
4000
- var import_system33 = require("@xyflow/system");
4001
- var VariableValueNodeTemplateFactory = class {
4002
- create() {
4003
- return {
4004
- id: import_utils35.IDGenerator.template(),
4005
- type: "variable-value" /* variableValue */,
4006
- data: {
4007
- title: "Variable Value",
4008
- value: null
3336
+ collapsedSize: {
3337
+ width: 300,
3338
+ height: 80
3339
+ }
3340
+ },
3341
+ handles: [
3342
+ {
3343
+ position: import_system32.Position.Bottom,
3344
+ dataType: "module" /* module */,
3345
+ connection: "target",
3346
+ maxConnections: 1,
3347
+ hideOnCollapse: true
4009
3348
  },
4010
- handles: [
4011
- {
4012
- position: import_system33.Position.Right,
4013
- dataType: 32 /* variableValue */,
4014
- connection: "source"
4015
- }
4016
- ]
4017
- };
4018
- }
4019
- isHandleAllowed(type) {
4020
- return type === "source";
4021
- }
4022
- getHandleAllowedDataType(type) {
4023
- return 32 /* variableValue */;
4024
- }
3349
+ {
3350
+ position: import_system32.Position.Right,
3351
+ dataType: "module" /* module */,
3352
+ connection: "source"
3353
+ }
3354
+ ]
3355
+ };
4025
3356
  };
4026
3357
 
4027
- // src/templates/groups/module-group-template.ts
4028
- var import_utils36 = require("@awesome-flow/core/utils");
4029
- var import_system34 = require("@xyflow/system");
4030
- var ModuleGroupNodeTemplateFactory = class {
4031
- create() {
3358
+ // src/nodes/groups/module-group-node.tsx
3359
+ var import_layout32 = require("@awesome-flow/core/layout");
3360
+ var import_react39 = require("@xyflow/react");
3361
+ var import_abstract36 = require("@awesome-flow/core/abstract");
3362
+ var import_react40 = require("react");
3363
+ var import_shallow = require("zustand/shallow");
3364
+ var import_core18 = require("@mantine/core");
3365
+ var import_hooks34 = require("@awesome-flow/core/hooks");
3366
+ var import_jsx_runtime32 = require("react/jsx-runtime");
3367
+ function ModuleGroupNode({
3368
+ id,
3369
+ selected,
3370
+ data,
3371
+ type,
3372
+ width,
3373
+ height
3374
+ }) {
3375
+ const context = (0, import_react40.useContext)(import_abstract36.FlowContext);
3376
+ const updateNodeInternals = (0, import_react39.useUpdateNodeInternals)();
3377
+ const triggerNodeChanges = (0, import_react39.useStore)((s) => s.triggerNodeChanges);
3378
+ const { groupNodes, setGroupCollapsed } = context.useFlowStore(
3379
+ (0, import_react40.useCallback)(
3380
+ (state) => ({ groupNodes: state.groups[id], setGroupCollapsed: state.setGroupCollapsed }),
3381
+ []
3382
+ )
3383
+ );
3384
+ const intersectingNode = context.useInteractivityStore(
3385
+ (0, import_react40.useCallback)((state) => state.nodeIntersectionTargets[id], [id]),
3386
+ import_shallow.shallow
3387
+ );
3388
+ (0, import_react40.useEffect)(() => {
3389
+ updateNodeInternals(id);
3390
+ }, [width, height]);
3391
+ (0, import_react40.useEffect)(() => {
3392
+ triggerNodeChanges([
3393
+ {
3394
+ id,
3395
+ type: "select",
3396
+ selected: !!intersectingNode
3397
+ }
3398
+ ]);
3399
+ }, [intersectingNode]);
3400
+ const onCollapsed = (0, import_react40.useCallback)((collapsed) => {
3401
+ setGroupCollapsed(id, collapsed);
3402
+ }, []);
3403
+ const size = (0, import_react40.useMemo)(() => {
4032
3404
  return {
4033
- id: import_utils36.IDGenerator.template(),
4034
- type: "group-module" /* groupModule */,
4035
- data: {
4036
- title: "Modules Group",
4037
- isGroup: true,
4038
- initialSize: {
4039
- width: 300,
4040
- height: 200
4041
- },
4042
- collapsedSize: {
4043
- width: 300,
4044
- height: 80
4045
- }
4046
- },
4047
- handles: [
4048
- {
4049
- position: import_system34.Position.Bottom,
4050
- dataType: 8 /* module */,
4051
- connection: "target",
4052
- maxConnections: 1,
4053
- hideOnCollapse: true
4054
- },
4055
- {
4056
- position: import_system34.Position.Right,
4057
- dataType: 8 /* module */,
4058
- connection: "source"
4059
- }
4060
- ]
3405
+ width: data.initialSize?.width || 100,
3406
+ height: data.initialSize?.height || 50
4061
3407
  };
4062
- }
4063
- isHandleAllowed(type) {
4064
- return true;
4065
- }
4066
- getHandleAllowedDataType(type) {
4067
- return 8 /* module */;
4068
- }
4069
- };
4070
-
4071
- // src/templates/generators/noise-billow-template.ts
4072
- var import_utils37 = require("@awesome-flow/core/utils");
4073
- var import_system35 = require("@xyflow/system");
4074
- var NoiseBillowNodeTemplateFactory = class {
4075
- create() {
4076
- return {
4077
- id: import_utils37.IDGenerator.template(),
4078
- type: "noise-billow" /* noiseBillow */,
4079
- removable: false,
4080
- data: {
4081
- title: "Billow Noise",
4082
- frequency: 0.1,
4083
- lacunarity: 2,
4084
- octaves: 5,
4085
- persistence: 0.5,
4086
- seed: 0
4087
- },
4088
- handles: [
4089
- {
4090
- position: import_system35.Position.Left,
4091
- dataType: 16 /* variableProperty */,
4092
- connection: "target"
4093
- },
4094
- {
4095
- position: import_system35.Position.Right,
4096
- dataType: 8 /* module */,
4097
- connection: "source"
4098
- }
3408
+ }, [data.initialSize]);
3409
+ const incomingModules = (0, import_hooks34.useIncomingComputedData)(id);
3410
+ const updateComputedData = (0, import_hooks34.useUpdateNodeComputedData)();
3411
+ (0, import_react40.useEffect)(() => {
3412
+ if (incomingModules?.length) {
3413
+ const { module: module2 } = incomingModules[0];
3414
+ updateComputedData(id, { module: module2 });
3415
+ }
3416
+ }, [incomingModules]);
3417
+ return /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(
3418
+ import_layout32.NodeContainer,
3419
+ {
3420
+ id,
3421
+ selected,
3422
+ data,
3423
+ title: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_core18.Group, { justify: "space-between", children: /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(import_core18.Group, { gap: "xs", children: [
3424
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_core18.Badge, { size: "xs", variant: "outline", radius: "xs", color: "gray", children: groupNodes?.length || 0 }),
3425
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_layout32.NodeCollapse, { nodeId: id, isCollapsed: data.isCollapsed, onCollapsed })
3426
+ ] }) }),
3427
+ type,
3428
+ children: [
3429
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
3430
+ import_react39.NodeResizer,
3431
+ {
3432
+ nodeId: id,
3433
+ minWidth: size.width,
3434
+ minHeight: size.height,
3435
+ isVisible: selected && !data.isCollapsed
3436
+ }
3437
+ ),
3438
+ /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_layout32.NodeTrackConnections, { handles: data.handles, nodeId: id, type: "target" })
4099
3439
  ]
4100
- };
4101
- }
4102
- isHandleAllowed(type) {
4103
- return type === "source";
4104
- }
4105
- getHandleAllowedDataType() {
4106
- return 8 /* module */;
4107
- }
4108
- };
3440
+ }
3441
+ );
3442
+ }
3443
+ var module_group_node_default = ModuleGroupNode;
4109
3444
 
4110
3445
  // src/abstract/node-types.ts
4111
3446
  var NoiseNodeType = /* @__PURE__ */ ((NoiseNodeType2) => {
4112
3447
  NoiseNodeType2["position"] = "position";
4113
3448
  NoiseNodeType2["grid"] = "grid";
3449
+ NoiseNodeType2["textureData"] = "texture-data";
3450
+ NoiseNodeType2["groupModule"] = "group-module";
3451
+ NoiseNodeType2["positionLogger"] = "position-logger";
3452
+ NoiseNodeType2["noiseLogger"] = "noise-logger";
4114
3453
  NoiseNodeType2["noiseOutput"] = "noise-output";
4115
3454
  NoiseNodeType2["noiseConst"] = "noise-constant";
4116
3455
  NoiseNodeType2["noiseSimplex"] = "noise-simplex";
@@ -4122,9 +3461,6 @@ var NoiseNodeType = /* @__PURE__ */ ((NoiseNodeType2) => {
4122
3461
  NoiseNodeType2["noiseRidgedMulti"] = "noise-ridged-multi";
4123
3462
  NoiseNodeType2["noiseSpheres"] = "noise-spheres";
4124
3463
  NoiseNodeType2["noiseVoronoi"] = "noise-voronoi";
4125
- NoiseNodeType2["textureData"] = "texture-data";
4126
- NoiseNodeType2["noiseLogger"] = "noise-logger";
4127
- NoiseNodeType2["positionLogger"] = "position-logger";
4128
3464
  NoiseNodeType2["noiseCombine"] = "noise-combiner";
4129
3465
  NoiseNodeType2["noiseClamp"] = "noise-clamp";
4130
3466
  NoiseNodeType2["noiseAbs"] = "noise-abs";
@@ -4140,17 +3476,10 @@ var NoiseNodeType = /* @__PURE__ */ ((NoiseNodeType2) => {
4140
3476
  NoiseNodeType2["noiseScalePoint"] = "noise-scale-point";
4141
3477
  NoiseNodeType2["noiseTranslatePoint"] = "noise-translate-point";
4142
3478
  NoiseNodeType2["noiseTurbulence"] = "noise-turbulence";
4143
- NoiseNodeType2["variableProperty"] = "variable-property";
4144
- NoiseNodeType2["variableValue"] = "variable-value";
4145
- NoiseNodeType2["variableCombine"] = "variable-combine";
4146
- NoiseNodeType2["groupModule"] = "group-module";
4147
3479
  return NoiseNodeType2;
4148
3480
  })(NoiseNodeType || {});
4149
3481
  var noiseNodeTypes = {
4150
- ["variable-value" /* variableValue */]: variable_value_node_default,
4151
- ["variable-property" /* variableProperty */]: variable_property_node_default,
4152
- ["variable-combine" /* variableCombine */]: variable_combine_node_default,
4153
- ["group-module" /* groupModule */]: node_module_group_default,
3482
+ ["group-module" /* groupModule */]: module_group_node_default,
4154
3483
  ["position" /* position */]: position_const_node_default,
4155
3484
  ["grid" /* grid */]: position_grid_node_default,
4156
3485
  ["noise-output" /* noiseOutput */]: noise_output_node_default,
@@ -4215,18 +3544,16 @@ var noiseNodeTemplates = {
4215
3544
  ["noise-scale-point" /* noiseScalePoint */]: new NoiseScalePointNodeTemplateFactory(),
4216
3545
  ["noise-translate-point" /* noiseTranslatePoint */]: new NoiseTranslatePointNodeTemplateFactory(),
4217
3546
  ["noise-turbulence" /* noiseTurbulence */]: new NoiseTurbulenceNodeTemplateFactory(),
4218
- ["variable-property" /* variableProperty */]: new VariablePropertyNodeTemplateFactory(),
4219
- ["variable-combine" /* variableCombine */]: new VariableCombineNodeTemplateFactory(),
4220
- ["variable-value" /* variableValue */]: new VariableValueNodeTemplateFactory(),
4221
3547
  ["group-module" /* groupModule */]: new ModuleGroupNodeTemplateFactory()
4222
3548
  };
4223
3549
  // Annotate the CommonJS export names for ESM import in node:
4224
3550
  0 && (module.exports = {
4225
- DisplacementModule,
3551
+ DisplacementHandle,
4226
3552
  NoiseCombineType,
4227
- NoiseHandleFlag,
3553
+ NoiseHandleType,
4228
3554
  NoiseNodeType,
4229
- VariableCombineType,
3555
+ NoiseSourceControlHandle,
3556
+ NoiseTemplateGroup,
4230
3557
  noiseCombineModuleMap,
4231
3558
  noiseNodeTemplates,
4232
3559
  noiseNodeTypes