@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
@@ -71,150 +71,15 @@ var require_fast_deep_equal = __commonJS({
71
71
 
72
72
  // src/nodes/generators/noise-billow-node.tsx
73
73
  import { NodeContainer, NodeTrackConnections } from "@awesome-flow/core/layout";
74
- import { useCallback as useCallback2, useMemo as useMemo2 } from "react";
74
+ import { useCallback, useMemo } from "react";
75
75
  import { Billow } from "libnoise-ts/module/generator";
76
76
  import { useUpdateNodeComputedData } from "@awesome-flow/core/hooks";
77
- import { nodeDataPropertyExcept as nodeDataPropertyExcept2 } from "@awesome-flow/core/abstract";
78
-
79
- // src/layout/node-property-variables.tsx
80
- import { useIncomingNodeData, useUpdateNodeData } from "@awesome-flow/core/hooks";
81
- import { useCallback, useEffect, useMemo, useState } from "react";
82
- import { Group, Stack } from "@mantine/core";
83
- import { getObjectKeys } from "@awesome-flow/core/utils";
84
- import { nodeDataPropertyExcept } from "@awesome-flow/core/abstract";
85
-
86
- // src/layout/node-value-input.tsx
87
- import { Input, NumberInput, Switch } from "@mantine/core";
88
- import { Fragment, jsx } from "react/jsx-runtime";
89
- function NodeValueInput({ value, disabled, step, onChange }) {
90
- if (value === void 0 || value === null) {
91
- return /* @__PURE__ */ jsx(Fragment, {});
92
- }
93
- switch (typeof value) {
94
- case "boolean": {
95
- return /* @__PURE__ */ jsx(
96
- Switch,
97
- {
98
- checked: value,
99
- disabled,
100
- onChange: (e) => onChange(e.currentTarget.checked)
101
- }
102
- );
103
- }
104
- case "number": {
105
- return /* @__PURE__ */ jsx(NumberInput, { value, disabled, step, onChange: (e) => onChange(e) });
106
- }
107
- case "string": {
108
- return /* @__PURE__ */ jsx(
109
- Input,
110
- {
111
- value,
112
- disabled,
113
- onChange: (e) => onChange(e.currentTarget.value)
114
- }
115
- );
116
- }
117
- default:
118
- throw new Error(`Unknown input node for value of type: ${typeof value} (${value})`);
119
- }
120
- }
121
- var node_value_input_default = NodeValueInput;
122
-
123
- // src/layout/node-property-input.tsx
124
- import { Fragment as Fragment2, jsx as jsx2 } from "react/jsx-runtime";
125
- function NodePropertyInput({ property, onChange }) {
126
- if (!property) {
127
- return /* @__PURE__ */ jsx2(Fragment2, {});
128
- }
129
- return /* @__PURE__ */ jsx2(
130
- node_value_input_default,
131
- {
132
- value: property.value,
133
- disabled: property.disabled,
134
- step: property.step,
135
- onChange: (value) => onChange(property.name, value)
136
- }
137
- );
138
- }
139
- var node_property_input_default = NodePropertyInput;
140
-
141
- // src/layout/node-property-variables.tsx
142
- import { jsx as jsx3, jsxs } from "react/jsx-runtime";
143
- function NodePropertyVariables({
144
- data,
145
- nodeId,
146
- onPropertiesChange,
147
- except = nodeDataPropertyExcept
148
- }) {
149
- const [properties, setProperties] = useState(() => {
150
- const keys = getObjectKeys(data, except);
151
- const dataProps = {};
152
- for (const key of keys) {
153
- dataProps[key] = {
154
- name: key,
155
- value: data[key]
156
- };
157
- }
158
- return dataProps;
159
- });
160
- const updateNodeData = useUpdateNodeData();
161
- const incoming = useIncomingNodeData(nodeId);
162
- const resetAllDisabled = useCallback(() => {
163
- const keys = Object.keys(properties);
164
- keys.forEach((k) => {
165
- properties[k].disabled = false;
166
- });
167
- setProperties(properties);
168
- }, []);
169
- const updatePropertyValue = useCallback((name, value, disabled) => {
170
- let property = properties[name];
171
- if (property) {
172
- property.value = value;
173
- } else {
174
- property = {
175
- name,
176
- value
177
- };
178
- }
179
- property.disabled = disabled;
180
- setProperties({ ...properties, [name]: property });
181
- updateNodeData(nodeId, { [name]: value });
182
- }, []);
183
- useEffect(() => {
184
- resetAllDisabled();
185
- if (incoming?.length) {
186
- for (const connection of incoming) {
187
- if (connection.property && properties[connection.property.name] !== void 0) {
188
- updatePropertyValue(connection.property.name, connection.property.value, true);
189
- }
190
- }
191
- }
192
- }, [incoming]);
193
- useEffect(() => {
194
- if (onPropertiesChange) {
195
- onPropertiesChange(properties);
196
- }
197
- }, [onPropertiesChange, properties]);
198
- const nodes = useMemo(() => {
199
- return Object.keys(properties).map((key) => {
200
- const property = properties[key];
201
- return /* @__PURE__ */ jsxs(Group, { children: [
202
- property.name,
203
- ":",
204
- /* @__PURE__ */ jsx3(node_property_input_default, { property, onChange: updatePropertyValue })
205
- ] }, key);
206
- });
207
- }, [properties, updatePropertyValue]);
208
- return /* @__PURE__ */ jsx3(Stack, { children: nodes });
209
- }
210
- var node_property_variables_default = NodePropertyVariables;
211
-
212
- // src/nodes/generators/noise-billow-node.tsx
213
- import { jsx as jsx4, jsxs as jsxs2 } from "react/jsx-runtime";
77
+ import { NodePropertyVariables } from "@awesome-flow/core/components";
78
+ import { jsx, jsxs } from "react/jsx-runtime";
214
79
  function NoiseBillowNode({ id, selected, data, type }) {
215
80
  const updateComputedData = useUpdateNodeComputedData();
216
- const module = useMemo2(() => new Billow(), []);
217
- const onPropertiesChange = useCallback2(
81
+ const module = useMemo(() => new Billow(), []);
82
+ const onPropertiesChange = useCallback(
218
83
  (properties) => {
219
84
  Object.keys(properties).forEach((k) => {
220
85
  module[k] = properties[k].value;
@@ -223,65 +88,57 @@ function NoiseBillowNode({ id, selected, data, type }) {
223
88
  },
224
89
  [id, module, updateComputedData]
225
90
  );
226
- return /* @__PURE__ */ jsxs2(NodeContainer, { id, selected, data, type, children: [
227
- /* @__PURE__ */ jsx4(
228
- node_property_variables_default,
229
- {
230
- data,
231
- except: nodeDataPropertyExcept2,
232
- nodeId: id,
233
- onPropertiesChange
234
- }
235
- ),
236
- /* @__PURE__ */ jsx4(NodeTrackConnections, { handles: data.handles, nodeId: id, type: "target" })
91
+ return /* @__PURE__ */ jsxs(NodeContainer, { id, selected, data, type, children: [
92
+ /* @__PURE__ */ jsx(NodePropertyVariables, { data, nodeId: id, onPropertiesChange }),
93
+ /* @__PURE__ */ jsx(NodeTrackConnections, { handles: data.handles, nodeId: id, type: "target" })
237
94
  ] });
238
95
  }
239
96
  var noise_billow_node_default = NoiseBillowNode;
240
97
 
241
98
  // src/nodes/generators/noise-checkerboard-node.tsx
242
99
  import { NodeContainer as NodeContainer2 } from "@awesome-flow/core/layout";
243
- import { useEffect as useEffect2, useMemo as useMemo3 } from "react";
100
+ import { useEffect, useMemo as useMemo2 } from "react";
244
101
  import { Checkerboard } from "libnoise-ts/module/generator";
245
102
  import { useUpdateNodeComputedData as useUpdateNodeComputedData2 } from "@awesome-flow/core/hooks";
246
- import { jsx as jsx5 } from "react/jsx-runtime";
103
+ import { jsx as jsx2 } from "react/jsx-runtime";
247
104
  function NoiseCheckerboardNode({ id, selected, data, type }) {
248
105
  const updateComputedData = useUpdateNodeComputedData2();
249
- const module = useMemo3(() => new Checkerboard(), []);
250
- useEffect2(() => {
106
+ const module = useMemo2(() => new Checkerboard(), []);
107
+ useEffect(() => {
251
108
  updateComputedData(id, { module });
252
109
  }, [id, module, updateComputedData]);
253
- return /* @__PURE__ */ jsx5(NodeContainer2, { id, selected, data, type });
110
+ return /* @__PURE__ */ jsx2(NodeContainer2, { id, selected, data, type });
254
111
  }
255
112
  var noise_checkerboard_node_default = NoiseCheckerboardNode;
256
113
 
257
114
  // src/nodes/generators/noise-const-node.tsx
258
115
  import { NodeContainer as NodeContainer3 } from "@awesome-flow/core/layout";
259
- import { useEffect as useEffect3, useMemo as useMemo4, useState as useState2 } from "react";
260
- import { Group as Group2, NumberInput as NumberInput2, Stack as Stack2 } from "@mantine/core";
261
- import { useUpdateNodeComputedData as useUpdateNodeComputedData3, useUpdateNodeData as useUpdateNodeData2 } from "@awesome-flow/core/hooks";
116
+ import { useEffect as useEffect2, useMemo as useMemo3, useState } from "react";
117
+ import { Group, NumberInput, Stack } from "@mantine/core";
118
+ import { useUpdateNodeComputedData as useUpdateNodeComputedData3, useUpdateNodeData } from "@awesome-flow/core/hooks";
262
119
  import { Const } from "libnoise-ts/module/generator";
263
- import { jsx as jsx6, jsxs as jsxs3 } from "react/jsx-runtime";
120
+ import { jsx as jsx3, jsxs as jsxs2 } from "react/jsx-runtime";
264
121
  function NoiseConstNode({ id, selected, data, type }) {
265
- const [min, setMin] = useState2(data.min);
266
- const [max, setMax] = useState2(data.max);
267
- const [noise, setNoise] = useState2(data.noise);
268
- const updateNodeData = useUpdateNodeData2();
122
+ const [min, setMin] = useState(data.min);
123
+ const [max, setMax] = useState(data.max);
124
+ const [noise, setNoise] = useState(data.noise);
125
+ const updateNodeData = useUpdateNodeData();
269
126
  const updateComputedData = useUpdateNodeComputedData3();
270
- const module = useMemo4(() => new Const(), []);
271
- useEffect3(() => {
127
+ const module = useMemo3(() => new Const(), []);
128
+ useEffect2(() => {
272
129
  module.value = noise;
273
130
  updateNodeData(id, { noise, min, max });
274
131
  updateComputedData(id, { module });
275
132
  }, [noise, min, max, module, updateNodeData, id, updateComputedData]);
276
- return /* @__PURE__ */ jsx6(NodeContainer3, { id, selected, data, type, children: /* @__PURE__ */ jsxs3(Stack2, { children: [
277
- /* @__PURE__ */ jsxs3(Group2, { children: [
278
- /* @__PURE__ */ jsx6(NumberInput2, { size: "xs", w: 100, value: min, onChange: (e) => setMin(Number(e)) }),
279
- /* @__PURE__ */ jsx6(NumberInput2, { size: "xs", w: 100, value: max, onChange: (e) => setMax(Number(e)) })
133
+ return /* @__PURE__ */ jsx3(NodeContainer3, { id, selected, data, type, children: /* @__PURE__ */ jsxs2(Stack, { children: [
134
+ /* @__PURE__ */ jsxs2(Group, { children: [
135
+ /* @__PURE__ */ jsx3(NumberInput, { size: "xs", w: 100, value: min, onChange: (e) => setMin(Number(e)) }),
136
+ /* @__PURE__ */ jsx3(NumberInput, { size: "xs", w: 100, value: max, onChange: (e) => setMax(Number(e)) })
280
137
  ] }),
281
- /* @__PURE__ */ jsxs3(Group2, { children: [
138
+ /* @__PURE__ */ jsxs2(Group, { children: [
282
139
  "noise:",
283
- /* @__PURE__ */ jsx6(
284
- NumberInput2,
140
+ /* @__PURE__ */ jsx3(
141
+ NumberInput,
285
142
  {
286
143
  size: "xs",
287
144
  value: noise,
@@ -298,14 +155,15 @@ var noise_const_node_default = NoiseConstNode;
298
155
 
299
156
  // src/nodes/generators/noise-cylinders-node.tsx
300
157
  import { NodeContainer as NodeContainer4, NodeTrackConnections as NodeTrackConnections2 } from "@awesome-flow/core/layout";
301
- import { useCallback as useCallback3, useMemo as useMemo5 } from "react";
158
+ import { useCallback as useCallback2, useMemo as useMemo4 } from "react";
302
159
  import { Cylinders } from "libnoise-ts/module/generator";
303
160
  import { useUpdateNodeComputedData as useUpdateNodeComputedData4 } from "@awesome-flow/core/hooks";
304
- import { jsx as jsx7, jsxs as jsxs4 } from "react/jsx-runtime";
161
+ import { NodePropertyVariables as NodePropertyVariables2 } from "@awesome-flow/core/components";
162
+ import { jsx as jsx4, jsxs as jsxs3 } from "react/jsx-runtime";
305
163
  function NoiseCylindersNode({ id, selected, data, type }) {
306
164
  const updateComputedData = useUpdateNodeComputedData4();
307
- const module = useMemo5(() => new Cylinders(), []);
308
- const onPropertiesChange = useCallback3(
165
+ const module = useMemo4(() => new Cylinders(), []);
166
+ const onPropertiesChange = useCallback2(
309
167
  (properties) => {
310
168
  Object.keys(properties).forEach((k) => {
311
169
  module[k] = properties[k].value;
@@ -314,23 +172,24 @@ function NoiseCylindersNode({ id, selected, data, type }) {
314
172
  },
315
173
  [id, module, updateComputedData]
316
174
  );
317
- return /* @__PURE__ */ jsxs4(NodeContainer4, { id, selected, data, type, children: [
318
- /* @__PURE__ */ jsx7(node_property_variables_default, { data, nodeId: id, onPropertiesChange }),
319
- /* @__PURE__ */ jsx7(NodeTrackConnections2, { handles: data.handles, nodeId: id, type: "target" })
175
+ return /* @__PURE__ */ jsxs3(NodeContainer4, { id, selected, data, type, children: [
176
+ /* @__PURE__ */ jsx4(NodePropertyVariables2, { data, nodeId: id, onPropertiesChange }),
177
+ /* @__PURE__ */ jsx4(NodeTrackConnections2, { handles: data.handles, nodeId: id, type: "target" })
320
178
  ] });
321
179
  }
322
180
  var noise_cylinders_node_default = NoiseCylindersNode;
323
181
 
324
182
  // src/nodes/generators/noise-perlin-node.tsx
325
183
  import { NodeContainer as NodeContainer5, NodeTrackConnections as NodeTrackConnections3 } from "@awesome-flow/core/layout";
326
- import { useCallback as useCallback4, useMemo as useMemo6 } from "react";
184
+ import { useCallback as useCallback3, useMemo as useMemo5 } from "react";
327
185
  import { Perlin } from "libnoise-ts/module/generator";
328
186
  import { useUpdateNodeComputedData as useUpdateNodeComputedData5 } from "@awesome-flow/core/hooks";
329
- import { jsx as jsx8, jsxs as jsxs5 } from "react/jsx-runtime";
187
+ import { NodePropertyVariables as NodePropertyVariables3 } from "@awesome-flow/core/components";
188
+ import { jsx as jsx5, jsxs as jsxs4 } from "react/jsx-runtime";
330
189
  function NoisePerlinNode({ id, selected, data, type }) {
331
190
  const updateComputedData = useUpdateNodeComputedData5();
332
- const module = useMemo6(() => new Perlin(), []);
333
- const onPropertiesChange = useCallback4(
191
+ const module = useMemo5(() => new Perlin(), []);
192
+ const onPropertiesChange = useCallback3(
334
193
  (properties) => {
335
194
  Object.keys(properties).forEach((k) => {
336
195
  module[k] = properties[k].value;
@@ -339,36 +198,37 @@ function NoisePerlinNode({ id, selected, data, type }) {
339
198
  },
340
199
  [id, module, updateComputedData]
341
200
  );
342
- return /* @__PURE__ */ jsxs5(NodeContainer5, { id, selected, data, type, children: [
343
- /* @__PURE__ */ jsx8(node_property_variables_default, { data, nodeId: id, onPropertiesChange }),
344
- /* @__PURE__ */ jsx8(NodeTrackConnections3, { handles: data.handles, nodeId: id, type: "target" })
201
+ return /* @__PURE__ */ jsxs4(NodeContainer5, { id, selected, data, type, children: [
202
+ /* @__PURE__ */ jsx5(NodePropertyVariables3, { data, nodeId: id, onPropertiesChange }),
203
+ /* @__PURE__ */ jsx5(NodeTrackConnections3, { handles: data.handles, nodeId: id, type: "target" })
345
204
  ] });
346
205
  }
347
206
  var noise_perlin_node_default = NoisePerlinNode;
348
207
 
349
208
  // src/nodes/generators/noise-ridgedmulti-node.tsx
350
209
  import { NodeContainer as NodeContainer6, NodeTrackConnections as NodeTrackConnections4 } from "@awesome-flow/core/layout";
351
- import { useCallback as useCallback5, useMemo as useMemo7 } from "react";
210
+ import { useCallback as useCallback4, useMemo as useMemo6 } from "react";
352
211
  import { RidgedMulti } from "libnoise-ts/module/generator";
353
212
  import { useUpdateNodeComputedData as useUpdateNodeComputedData6 } from "@awesome-flow/core/hooks";
354
- import { jsx as jsx9, jsxs as jsxs6 } from "react/jsx-runtime";
213
+ import { NodePropertyVariables as NodePropertyVariables4 } from "@awesome-flow/core/components";
214
+ import { jsx as jsx6, jsxs as jsxs5 } from "react/jsx-runtime";
355
215
  function NoiseRidgedMultiNode({ id, selected, data, type }) {
356
216
  const updateComputedData = useUpdateNodeComputedData6();
357
- const module = useMemo7(() => new RidgedMulti(), []);
358
- const onPropertiesChange = useCallback5((properties) => {
217
+ const module = useMemo6(() => new RidgedMulti(), []);
218
+ const onPropertiesChange = useCallback4((properties) => {
359
219
  Object.keys(properties).forEach((k) => module[k] = properties[k].value);
360
220
  updateComputedData(id, { module });
361
221
  }, []);
362
- return /* @__PURE__ */ jsxs6(NodeContainer6, { id, selected, data, type, children: [
363
- /* @__PURE__ */ jsx9(node_property_variables_default, { data, nodeId: id, onPropertiesChange }),
364
- /* @__PURE__ */ jsx9(NodeTrackConnections4, { handles: data.handles, nodeId: id, type: "target" })
222
+ return /* @__PURE__ */ jsxs5(NodeContainer6, { id, selected, data, type, children: [
223
+ /* @__PURE__ */ jsx6(NodePropertyVariables4, { data, nodeId: id, onPropertiesChange }),
224
+ /* @__PURE__ */ jsx6(NodeTrackConnections4, { handles: data.handles, nodeId: id, type: "target" })
365
225
  ] });
366
226
  }
367
227
  var noise_ridgedmulti_node_default = NoiseRidgedMultiNode;
368
228
 
369
229
  // src/nodes/generators/noise-simplex-node.tsx
370
230
  import { NodeContainer as NodeContainer7 } from "@awesome-flow/core/layout";
371
- import { useEffect as useEffect4, useMemo as useMemo8 } from "react";
231
+ import { useEffect as useEffect3, useMemo as useMemo7 } from "react";
372
232
  import { useUpdateNodeComputedData as useUpdateNodeComputedData7 } from "@awesome-flow/core/hooks";
373
233
 
374
234
  // src/modules/simplex-module.ts
@@ -386,46 +246,48 @@ var SimplexModule = class extends Module {
386
246
  };
387
247
 
388
248
  // src/nodes/generators/noise-simplex-node.tsx
389
- import { jsx as jsx10 } from "react/jsx-runtime";
249
+ import { jsx as jsx7 } from "react/jsx-runtime";
390
250
  function NoiseSimplexNode({ id, selected, data, type }) {
391
251
  const updateComputedData = useUpdateNodeComputedData7();
392
- const module = useMemo8(() => new SimplexModule(), []);
393
- useEffect4(() => {
252
+ const module = useMemo7(() => new SimplexModule(), []);
253
+ useEffect3(() => {
394
254
  updateComputedData(id, { module });
395
255
  }, []);
396
- return /* @__PURE__ */ jsx10(NodeContainer7, { id, selected, data, type });
256
+ return /* @__PURE__ */ jsx7(NodeContainer7, { id, selected, data, type });
397
257
  }
398
258
  var noise_simplex_node_default = NoiseSimplexNode;
399
259
 
400
260
  // src/nodes/generators/noise-spheres-node.tsx
401
261
  import { NodeContainer as NodeContainer8, NodeTrackConnections as NodeTrackConnections5 } from "@awesome-flow/core/layout";
402
- import { useCallback as useCallback6, useMemo as useMemo9 } from "react";
262
+ import { useCallback as useCallback5, useMemo as useMemo8 } from "react";
403
263
  import { Spheres } from "libnoise-ts/module/generator";
404
264
  import { useUpdateNodeComputedData as useUpdateNodeComputedData8 } from "@awesome-flow/core/hooks";
405
- import { jsx as jsx11, jsxs as jsxs7 } from "react/jsx-runtime";
265
+ import { NodePropertyVariables as NodePropertyVariables5 } from "@awesome-flow/core/components";
266
+ import { jsx as jsx8, jsxs as jsxs6 } from "react/jsx-runtime";
406
267
  function NoiseSpheresNode({ id, selected, data, type }) {
407
268
  const updateComputedData = useUpdateNodeComputedData8();
408
- const module = useMemo9(() => new Spheres(), []);
409
- const onPropertiesChange = useCallback6((properties) => {
269
+ const module = useMemo8(() => new Spheres(), []);
270
+ const onPropertiesChange = useCallback5((properties) => {
410
271
  Object.keys(properties).forEach((k) => module[k] = properties[k].value);
411
272
  updateComputedData(id, { module });
412
273
  }, []);
413
- return /* @__PURE__ */ jsxs7(NodeContainer8, { id, selected, data, type, children: [
414
- /* @__PURE__ */ jsx11(node_property_variables_default, { data, nodeId: id, onPropertiesChange }),
415
- /* @__PURE__ */ jsx11(NodeTrackConnections5, { handles: data.handles, nodeId: id, type: "target" })
274
+ return /* @__PURE__ */ jsxs6(NodeContainer8, { id, selected, data, type, children: [
275
+ /* @__PURE__ */ jsx8(NodePropertyVariables5, { data, nodeId: id, onPropertiesChange }),
276
+ /* @__PURE__ */ jsx8(NodeTrackConnections5, { handles: data.handles, nodeId: id, type: "target" })
416
277
  ] });
417
278
  }
418
279
  var noise_spheres_node_default = NoiseSpheresNode;
419
280
 
420
281
  // src/nodes/generators/noise-voronoi-node.tsx
421
282
  import { NodeContainer as NodeContainer9, NodeTrackConnections as NodeTrackConnections6 } from "@awesome-flow/core/layout";
422
- import { useCallback as useCallback7 } from "react";
283
+ import { useCallback as useCallback6 } from "react";
423
284
  import { Voronoi } from "libnoise-ts/module/generator";
424
285
  import { useUpdateNodeComputedData as useUpdateNodeComputedData9 } from "@awesome-flow/core/hooks";
425
- import { jsx as jsx12, jsxs as jsxs8 } from "react/jsx-runtime";
286
+ import { NodePropertyVariables as NodePropertyVariables6 } from "@awesome-flow/core/components";
287
+ import { jsx as jsx9, jsxs as jsxs7 } from "react/jsx-runtime";
426
288
  function NoiseVoronoiNode({ id, selected, data, type }) {
427
289
  const updateComputedData = useUpdateNodeComputedData9();
428
- const onPropertiesChange = useCallback7(
290
+ const onPropertiesChange = useCallback6(
429
291
  (properties) => {
430
292
  const module = new Voronoi(
431
293
  properties.frequency.value,
@@ -437,27 +299,27 @@ function NoiseVoronoiNode({ id, selected, data, type }) {
437
299
  },
438
300
  []
439
301
  );
440
- return /* @__PURE__ */ jsxs8(NodeContainer9, { id, selected, data, type, children: [
441
- /* @__PURE__ */ jsx12(node_property_variables_default, { data, nodeId: id, onPropertiesChange }),
442
- /* @__PURE__ */ jsx12(NodeTrackConnections6, { handles: data.handles, nodeId: id, type: "target" })
302
+ return /* @__PURE__ */ jsxs7(NodeContainer9, { id, selected, data, type, children: [
303
+ /* @__PURE__ */ jsx9(NodePropertyVariables6, { data, nodeId: id, onPropertiesChange }),
304
+ /* @__PURE__ */ jsx9(NodeTrackConnections6, { handles: data.handles, nodeId: id, type: "target" })
443
305
  ] });
444
306
  }
445
307
  var noise_voronoi_node_default = NoiseVoronoiNode;
446
308
 
447
309
  // src/nodes/generators/position-const-node.tsx
448
310
  import { NodeContainer as NodeContainer10 } from "@awesome-flow/core/layout";
449
- import { useEffect as useEffect5, useState as useState3 } from "react";
450
- import { Group as Group3, NumberInput as NumberInput3, Stack as Stack3 } from "@mantine/core";
451
- import { useUpdateNodeComputedData as useUpdateNodeComputedData10, useUpdateNodeData as useUpdateNodeData3 } from "@awesome-flow/core/hooks";
452
- import { jsx as jsx13, jsxs as jsxs9 } from "react/jsx-runtime";
311
+ import { useEffect as useEffect4, useState as useState2 } from "react";
312
+ import { Group as Group2, NumberInput as NumberInput2, Stack as Stack2 } from "@mantine/core";
313
+ import { useUpdateNodeComputedData as useUpdateNodeComputedData10, useUpdateNodeData as useUpdateNodeData2 } from "@awesome-flow/core/hooks";
314
+ import { jsx as jsx10, jsxs as jsxs8 } from "react/jsx-runtime";
453
315
  function PositionConstNode({ id, selected, data, type }) {
454
316
  const position = data.position ?? { x: 0, y: 0, z: 0 };
455
- const [x, setX] = useState3(position.x);
456
- const [y, setY] = useState3(position.y);
457
- const [z, setZ] = useState3(position.z);
458
- const updateNodeData = useUpdateNodeData3();
317
+ const [x, setX] = useState2(position.x);
318
+ const [y, setY] = useState2(position.y);
319
+ const [z, setZ] = useState2(position.z);
320
+ const updateNodeData = useUpdateNodeData2();
459
321
  const updateComputedData = useUpdateNodeComputedData10();
460
- useEffect5(() => {
322
+ useEffect4(() => {
461
323
  const position2 = { x, y, z };
462
324
  updateNodeData(id, {
463
325
  position: position2
@@ -466,18 +328,18 @@ function PositionConstNode({ id, selected, data, type }) {
466
328
  positions: [position2]
467
329
  });
468
330
  }, [x, y, z]);
469
- return /* @__PURE__ */ jsx13(NodeContainer10, { id, selected, data, type, children: /* @__PURE__ */ jsxs9(Stack3, { children: [
470
- /* @__PURE__ */ jsxs9(Group3, { children: [
331
+ return /* @__PURE__ */ jsx10(NodeContainer10, { id, selected, data, type, children: /* @__PURE__ */ jsxs8(Stack2, { children: [
332
+ /* @__PURE__ */ jsxs8(Group2, { children: [
471
333
  "x: ",
472
- /* @__PURE__ */ jsx13(NumberInput3, { size: "xs", w: 100, value: x, onChange: (e) => setX(Number(e)) })
334
+ /* @__PURE__ */ jsx10(NumberInput2, { size: "xs", w: 100, value: x, onChange: (e) => setX(Number(e)) })
473
335
  ] }),
474
- /* @__PURE__ */ jsxs9(Group3, { children: [
336
+ /* @__PURE__ */ jsxs8(Group2, { children: [
475
337
  "y: ",
476
- /* @__PURE__ */ jsx13(NumberInput3, { size: "xs", w: 100, value: y, onChange: (e) => setY(Number(e)) })
338
+ /* @__PURE__ */ jsx10(NumberInput2, { size: "xs", w: 100, value: y, onChange: (e) => setY(Number(e)) })
477
339
  ] }),
478
- /* @__PURE__ */ jsxs9(Group3, { children: [
340
+ /* @__PURE__ */ jsxs8(Group2, { children: [
479
341
  "z: ",
480
- /* @__PURE__ */ jsx13(NumberInput3, { size: "xs", w: 100, value: z, onChange: (e) => setZ(Number(e)) })
342
+ /* @__PURE__ */ jsx10(NumberInput2, { size: "xs", w: 100, value: z, onChange: (e) => setZ(Number(e)) })
481
343
  ] })
482
344
  ] }) });
483
345
  }
@@ -485,28 +347,28 @@ var position_const_node_default = PositionConstNode;
485
347
 
486
348
  // src/nodes/generators/position-grid-node.tsx
487
349
  import { NodeContainer as NodeContainer11 } from "@awesome-flow/core/layout";
488
- import { useEffect as useEffect6, useState as useState4 } from "react";
489
- import { Group as Group4, NumberInput as NumberInput4, Stack as Stack4 } from "@mantine/core";
490
- import { useUpdateNodeComputedData as useUpdateNodeComputedData11, useUpdateNodeData as useUpdateNodeData4 } from "@awesome-flow/core/hooks";
491
- import { jsx as jsx14, jsxs as jsxs10 } from "react/jsx-runtime";
350
+ import { useEffect as useEffect5, useState as useState3 } from "react";
351
+ import { Group as Group3, NumberInput as NumberInput3, Stack as Stack3 } from "@mantine/core";
352
+ import { useUpdateNodeComputedData as useUpdateNodeComputedData11, useUpdateNodeData as useUpdateNodeData3 } from "@awesome-flow/core/hooks";
353
+ import { jsx as jsx11, jsxs as jsxs9 } from "react/jsx-runtime";
492
354
  function PositionGridNode({ id, selected, data, type }) {
493
- const [x, setX] = useState4(data.center?.x);
494
- const [y, setY] = useState4(data.center?.y);
495
- const [z, setZ] = useState4(data.center?.z);
496
- const [radius, setRadius] = useState4(data.radius);
497
- const updateNodeData = useUpdateNodeData4();
355
+ const [x, setX] = useState3(data.center?.x);
356
+ const [y, setY] = useState3(data.center?.y);
357
+ const [z, setZ] = useState3(data.center?.z);
358
+ const [radius, setRadius] = useState3(data.radius);
359
+ const updateNodeData = useUpdateNodeData3();
498
360
  const updateComputedData = useUpdateNodeComputedData11();
499
- useEffect6(() => {
361
+ useEffect5(() => {
500
362
  updateNodeData(id, {
501
363
  center: { x, y, z }
502
364
  });
503
365
  }, [x, y, z]);
504
- useEffect6(() => {
366
+ useEffect5(() => {
505
367
  updateNodeData(id, {
506
368
  radius
507
369
  });
508
370
  }, [radius]);
509
- useEffect6(() => {
371
+ useEffect5(() => {
510
372
  const positions = [];
511
373
  for (let i = -radius; i < radius; i++) {
512
374
  for (let j = -radius; j < radius; j++) {
@@ -517,143 +379,36 @@ function PositionGridNode({ id, selected, data, type }) {
517
379
  positions
518
380
  });
519
381
  }, [x, y, z, radius]);
520
- return /* @__PURE__ */ jsx14(NodeContainer11, { id, selected, data, type, children: /* @__PURE__ */ jsxs10(Stack4, { children: [
521
- /* @__PURE__ */ jsxs10(Group4, { children: [
382
+ return /* @__PURE__ */ jsx11(NodeContainer11, { id, selected, data, type, children: /* @__PURE__ */ jsxs9(Stack3, { children: [
383
+ /* @__PURE__ */ jsxs9(Group3, { children: [
522
384
  "x: ",
523
- /* @__PURE__ */ jsx14(NumberInput4, { size: "xs", w: 100, value: x, onChange: (e) => setX(Number(e)) })
385
+ /* @__PURE__ */ jsx11(NumberInput3, { size: "xs", w: 100, value: x, onChange: (e) => setX(Number(e)) })
524
386
  ] }),
525
- /* @__PURE__ */ jsxs10(Group4, { children: [
387
+ /* @__PURE__ */ jsxs9(Group3, { children: [
526
388
  "y: ",
527
- /* @__PURE__ */ jsx14(NumberInput4, { size: "xs", w: 100, value: y, onChange: (e) => setY(Number(e)) })
389
+ /* @__PURE__ */ jsx11(NumberInput3, { size: "xs", w: 100, value: y, onChange: (e) => setY(Number(e)) })
528
390
  ] }),
529
- /* @__PURE__ */ jsxs10(Group4, { children: [
391
+ /* @__PURE__ */ jsxs9(Group3, { children: [
530
392
  "z: ",
531
- /* @__PURE__ */ jsx14(NumberInput4, { size: "xs", w: 100, value: z, onChange: (e) => setZ(Number(e)) })
393
+ /* @__PURE__ */ jsx11(NumberInput3, { size: "xs", w: 100, value: z, onChange: (e) => setZ(Number(e)) })
532
394
  ] }),
533
- /* @__PURE__ */ jsxs10(Group4, { children: [
395
+ /* @__PURE__ */ jsxs9(Group3, { children: [
534
396
  "r: ",
535
- /* @__PURE__ */ jsx14(NumberInput4, { size: "xs", w: 100, value: radius, onChange: (e) => setRadius(Number(e)) })
397
+ /* @__PURE__ */ jsx11(NumberInput3, { size: "xs", w: 100, value: radius, onChange: (e) => setRadius(Number(e)) })
536
398
  ] })
537
399
  ] }) });
538
400
  }
539
401
  var position_grid_node_default = PositionGridNode;
540
402
 
541
- // src/nodes/generators/variable-property-node.tsx
542
- import { NodeCombobox, NodeContainer as NodeContainer12, NodeTrackConnections as NodeTrackConnections7 } from "@awesome-flow/core/layout";
543
- import { useCallback as useCallback8, useEffect as useEffect7, useState as useState5 } from "react";
544
- import { Stack as Stack5 } from "@mantine/core";
545
- import { useIncomingNodeData as useIncomingNodeData2, useOutgoingNodes, useUpdateNodeData as useUpdateNodeData5 } from "@awesome-flow/core/hooks";
546
- import { getObjectPropertyMap } from "@awesome-flow/core/utils";
547
- import { nodeDataPropertyExcept as nodeDataPropertyExcept3 } from "@awesome-flow/core/abstract";
548
- import { jsx as jsx15, jsxs as jsxs11 } from "react/jsx-runtime";
549
- function VariablePropertyNode({
550
- id,
551
- selected,
552
- data,
553
- type
554
- }) {
555
- const [options3, setOptions] = useState5({});
556
- const [selectedProperty, setSelectedProperty] = useState5(data.property);
557
- const updateNodeData = useUpdateNodeData5();
558
- const outgoing = useOutgoingNodes(id);
559
- const incoming = useIncomingNodeData2(id);
560
- useEffect7(() => {
561
- if (outgoing?.length) {
562
- const { data: data2 } = outgoing[0];
563
- const properties = getObjectPropertyMap(data2, nodeDataPropertyExcept3);
564
- setOptions(properties);
565
- if (!selectedProperty) {
566
- const keys = Object.keys(properties);
567
- if (keys.length) {
568
- setSelectedProperty({
569
- name: keys[0],
570
- value: properties[keys[0]]
571
- });
572
- }
573
- }
574
- } else {
575
- setSelectedProperty(null);
576
- }
577
- }, [outgoing]);
578
- useEffect7(() => {
579
- if (!incoming?.length && selectedProperty?.disabled) {
580
- setSelectedProperty({ ...selectedProperty, disabled: false });
581
- } else if (incoming?.length && selectedProperty) {
582
- const incomingValue = incoming[0].value;
583
- if (incomingValue !== void 0 && incomingValue !== null) {
584
- setSelectedProperty({
585
- name: selectedProperty.name,
586
- value: incomingValue,
587
- disabled: true
588
- });
589
- }
590
- }
591
- }, [incoming]);
592
- useEffect7(() => {
593
- if (selectedProperty) {
594
- updateNodeData(id, { property: selectedProperty });
595
- }
596
- }, [selectedProperty]);
597
- const onPropertyChange = useCallback8(
598
- (selected2) => {
599
- setSelectedProperty({
600
- name: selected2,
601
- value: options3[selected2]
602
- });
603
- },
604
- [options3]
605
- );
606
- const onValueChange = useCallback8((name, value) => {
607
- setSelectedProperty({
608
- name,
609
- value
610
- });
611
- }, []);
612
- return /* @__PURE__ */ jsxs11(NodeContainer12, { id, selected, data, type, children: [
613
- /* @__PURE__ */ jsxs11(Stack5, { align: "center", children: [
614
- /* @__PURE__ */ jsx15(
615
- NodeCombobox,
616
- {
617
- options: options3,
618
- onChange: onPropertyChange,
619
- selected: selectedProperty?.name,
620
- hideListValues: true
621
- }
622
- ),
623
- /* @__PURE__ */ jsx15(node_property_input_default, { property: selectedProperty, onChange: onValueChange })
624
- ] }),
625
- /* @__PURE__ */ jsx15(NodeTrackConnections7, { handles: data.handles, nodeId: id })
626
- ] });
627
- }
628
- var variable_property_node_default = VariablePropertyNode;
629
-
630
- // src/nodes/generators/variable-value-node.tsx
631
- import { NodeContainer as NodeContainer13, NodeTrackConnections as NodeTrackConnections8 } from "@awesome-flow/core/layout";
632
- import { useCallback as useCallback9, useState as useState6 } from "react";
633
- import { useUpdateNodeData as useUpdateNodeData6 } from "@awesome-flow/core/hooks";
634
- import { jsx as jsx16, jsxs as jsxs12 } from "react/jsx-runtime";
635
- function VariableValueNode({ id, selected, data, type }) {
636
- const [value, setValue] = useState6(data.value || 0);
637
- const updateNodeData = useUpdateNodeData6();
638
- const onValueChange = useCallback9((newValue) => {
639
- updateNodeData(id, { value: newValue });
640
- setValue(newValue);
641
- }, []);
642
- return /* @__PURE__ */ jsxs12(NodeContainer13, { id, selected, data, type, children: [
643
- /* @__PURE__ */ jsx16(node_value_input_default, { value, onChange: onValueChange }),
644
- /* @__PURE__ */ jsx16(NodeTrackConnections8, { handles: data.handles, nodeId: id, type: "source" })
645
- ] });
646
- }
647
- var variable_value_node_default = VariableValueNode;
648
-
649
- // src/nodes/groups/node-module-group.tsx
650
- import { NodeContainer as NodeContainer14, NodeCollapse } from "@awesome-flow/core/layout";
403
+ // src/nodes/groups/module-group-node.tsx
404
+ import { NodeContainer as NodeContainer12, NodeCollapse, NodeTrackConnections as NodeTrackConnections7 } from "@awesome-flow/core/layout";
651
405
  import { NodeResizer, useStore, useUpdateNodeInternals } from "@xyflow/react";
652
406
  import { FlowContext } from "@awesome-flow/core/abstract";
653
- import { useCallback as useCallback10, useContext, useEffect as useEffect8, useMemo as useMemo10 } from "react";
407
+ import { useCallback as useCallback7, useContext, useEffect as useEffect6, useMemo as useMemo9 } from "react";
654
408
  import { shallow } from "zustand/shallow";
655
- import { Badge, Group as Group5 } from "@mantine/core";
656
- import { jsx as jsx17, jsxs as jsxs13 } from "react/jsx-runtime";
409
+ import { Badge, Group as Group4 } from "@mantine/core";
410
+ import { useIncomingComputedData, useUpdateNodeComputedData as useUpdateNodeComputedData12 } from "@awesome-flow/core/hooks";
411
+ import { jsx as jsx12, jsxs as jsxs10 } from "react/jsx-runtime";
657
412
  function ModuleGroupNode({
658
413
  id,
659
414
  selected,
@@ -666,19 +421,19 @@ function ModuleGroupNode({
666
421
  const updateNodeInternals = useUpdateNodeInternals();
667
422
  const triggerNodeChanges = useStore((s) => s.triggerNodeChanges);
668
423
  const { groupNodes, setGroupCollapsed } = context.useFlowStore(
669
- useCallback10(
424
+ useCallback7(
670
425
  (state) => ({ groupNodes: state.groups[id], setGroupCollapsed: state.setGroupCollapsed }),
671
426
  []
672
427
  )
673
428
  );
674
429
  const intersectingNode = context.useInteractivityStore(
675
- useCallback10((state) => state.nodeIntersectionTargets[id], [id]),
430
+ useCallback7((state) => state.nodeIntersectionTargets[id], [id]),
676
431
  shallow
677
432
  );
678
- useEffect8(() => {
433
+ useEffect6(() => {
679
434
  updateNodeInternals(id);
680
435
  }, [width, height]);
681
- useEffect8(() => {
436
+ useEffect6(() => {
682
437
  triggerNodeChanges([
683
438
  {
684
439
  id,
@@ -687,87 +442,98 @@ function ModuleGroupNode({
687
442
  }
688
443
  ]);
689
444
  }, [intersectingNode]);
690
- const onCollapsed = useCallback10((collapsed) => {
445
+ const onCollapsed = useCallback7((collapsed) => {
691
446
  setGroupCollapsed(id, collapsed);
692
447
  }, []);
693
- const size = useMemo10(() => {
448
+ const size = useMemo9(() => {
694
449
  return {
695
450
  width: data.initialSize?.width || 100,
696
451
  height: data.initialSize?.height || 50
697
452
  };
698
453
  }, [data.initialSize]);
699
- return /* @__PURE__ */ jsx17(
700
- NodeContainer14,
454
+ const incomingModules = useIncomingComputedData(id);
455
+ const updateComputedData = useUpdateNodeComputedData12();
456
+ useEffect6(() => {
457
+ if (incomingModules?.length) {
458
+ const { module } = incomingModules[0];
459
+ updateComputedData(id, { module });
460
+ }
461
+ }, [incomingModules]);
462
+ return /* @__PURE__ */ jsxs10(
463
+ NodeContainer12,
701
464
  {
702
465
  id,
703
466
  selected,
704
467
  data,
705
- title: /* @__PURE__ */ jsx17(Group5, { justify: "space-between", children: /* @__PURE__ */ jsxs13(Group5, { gap: "xs", children: [
706
- /* @__PURE__ */ jsx17(Badge, { size: "xs", variant: "outline", radius: "xs", color: "gray", children: groupNodes?.length || 0 }),
707
- /* @__PURE__ */ jsx17(NodeCollapse, { nodeId: id, isCollapsed: data.isCollapsed, onCollapsed })
468
+ title: /* @__PURE__ */ jsx12(Group4, { justify: "space-between", children: /* @__PURE__ */ jsxs10(Group4, { gap: "xs", children: [
469
+ /* @__PURE__ */ jsx12(Badge, { size: "xs", variant: "outline", radius: "xs", color: "gray", children: groupNodes?.length || 0 }),
470
+ /* @__PURE__ */ jsx12(NodeCollapse, { nodeId: id, isCollapsed: data.isCollapsed, onCollapsed })
708
471
  ] }) }),
709
472
  type,
710
- children: /* @__PURE__ */ jsx17(
711
- NodeResizer,
712
- {
713
- nodeId: id,
714
- minWidth: size.width,
715
- minHeight: size.height,
716
- isVisible: selected && !data.isCollapsed
717
- }
718
- )
473
+ children: [
474
+ /* @__PURE__ */ jsx12(
475
+ NodeResizer,
476
+ {
477
+ nodeId: id,
478
+ minWidth: size.width,
479
+ minHeight: size.height,
480
+ isVisible: selected && !data.isCollapsed
481
+ }
482
+ ),
483
+ /* @__PURE__ */ jsx12(NodeTrackConnections7, { handles: data.handles, nodeId: id, type: "target" })
484
+ ]
719
485
  }
720
486
  );
721
487
  }
722
- var node_module_group_default = ModuleGroupNode;
488
+ var module_group_node_default = ModuleGroupNode;
723
489
 
724
490
  // src/nodes/modifiers/noise-abs-node.tsx
725
- import { NodeContainer as NodeContainer15, NodeTrackConnections as NodeTrackConnections9 } from "@awesome-flow/core/layout";
726
- import { useEffect as useEffect9 } from "react";
727
- import { useIncomingComputedData, useUpdateNodeComputedData as useUpdateNodeComputedData12 } from "@awesome-flow/core/hooks";
491
+ import { NodeContainer as NodeContainer13, NodeTrackConnections as NodeTrackConnections8 } from "@awesome-flow/core/layout";
492
+ import { useEffect as useEffect7 } from "react";
493
+ import { useIncomingComputedData as useIncomingComputedData2, useUpdateNodeComputedData as useUpdateNodeComputedData13 } from "@awesome-flow/core/hooks";
728
494
  import { Abs } from "libnoise-ts/module/modifier";
729
- import { jsx as jsx18 } from "react/jsx-runtime";
495
+ import { jsx as jsx13 } from "react/jsx-runtime";
730
496
  function NoiseAbsNode({ id, selected, data, type }) {
731
- const incoming = useIncomingComputedData(id);
732
- const updateComputedData = useUpdateNodeComputedData12();
733
- useEffect9(() => {
497
+ const incoming = useIncomingComputedData2(id);
498
+ const updateComputedData = useUpdateNodeComputedData13();
499
+ useEffect7(() => {
734
500
  if (incoming?.length > 0) {
735
501
  const module = new Abs(incoming[0].module);
736
502
  updateComputedData(id, { module });
737
503
  }
738
504
  }, [incoming]);
739
- return /* @__PURE__ */ jsx18(NodeContainer15, { id, selected, data, type, children: /* @__PURE__ */ jsx18(NodeTrackConnections9, { handles: data.handles, nodeId: id, type: "target" }) });
505
+ return /* @__PURE__ */ jsx13(NodeContainer13, { id, selected, data, type, children: /* @__PURE__ */ jsx13(NodeTrackConnections8, { handles: data.handles, nodeId: id, type: "target" }) });
740
506
  }
741
507
  var noise_abs_node_default = NoiseAbsNode;
742
508
 
743
509
  // src/nodes/modifiers/noise-clamp-node.tsx
744
- import { NodeContainer as NodeContainer16, NodeTrackConnections as NodeTrackConnections10 } from "@awesome-flow/core/layout";
745
- import { useEffect as useEffect10, useState as useState7 } from "react";
746
- import { Group as Group6, NumberInput as NumberInput5, Stack as Stack6 } from "@mantine/core";
510
+ import { NodeContainer as NodeContainer14, NodeTrackConnections as NodeTrackConnections9 } from "@awesome-flow/core/layout";
511
+ import { useEffect as useEffect8, useState as useState4 } from "react";
512
+ import { Group as Group5, NumberInput as NumberInput4, Stack as Stack4 } from "@mantine/core";
747
513
  import {
748
- useIncomingComputedData as useIncomingComputedData2,
749
- useUpdateNodeComputedData as useUpdateNodeComputedData13,
750
- useUpdateNodeData as useUpdateNodeData7
514
+ useIncomingComputedData as useIncomingComputedData3,
515
+ useUpdateNodeComputedData as useUpdateNodeComputedData14,
516
+ useUpdateNodeData as useUpdateNodeData4
751
517
  } from "@awesome-flow/core/hooks";
752
518
  import { Clamp } from "libnoise-ts/module/modifier";
753
- import { jsx as jsx19, jsxs as jsxs14 } from "react/jsx-runtime";
519
+ import { jsx as jsx14, jsxs as jsxs11 } from "react/jsx-runtime";
754
520
  function NoiseClampNode({ id, selected, data, type }) {
755
- const [lowerBound, setLowerBound] = useState7(data.lowerBound);
756
- const [upperBound, setUpperBound] = useState7(data.upperBound);
757
- const incoming = useIncomingComputedData2(id);
758
- const updateNodeData = useUpdateNodeData7();
759
- const updateComputedData = useUpdateNodeComputedData13();
760
- useEffect10(() => {
521
+ const [lowerBound, setLowerBound] = useState4(data.lowerBound);
522
+ const [upperBound, setUpperBound] = useState4(data.upperBound);
523
+ const incoming = useIncomingComputedData3(id);
524
+ const updateNodeData = useUpdateNodeData4();
525
+ const updateComputedData = useUpdateNodeComputedData14();
526
+ useEffect8(() => {
761
527
  if (incoming?.length) {
762
528
  const module = new Clamp(incoming[0].module, lowerBound, upperBound);
763
529
  updateComputedData(id, { module });
764
530
  }
765
531
  updateNodeData(id, { lowerBound, upperBound });
766
532
  }, [incoming, lowerBound, upperBound]);
767
- return /* @__PURE__ */ jsxs14(NodeContainer16, { id, selected, data, type, children: [
768
- /* @__PURE__ */ jsx19(Stack6, { children: /* @__PURE__ */ jsxs14(Group6, { children: [
769
- /* @__PURE__ */ jsx19(
770
- NumberInput5,
533
+ return /* @__PURE__ */ jsxs11(NodeContainer14, { id, selected, data, type, children: [
534
+ /* @__PURE__ */ jsx14(Stack4, { children: /* @__PURE__ */ jsxs11(Group5, { children: [
535
+ /* @__PURE__ */ jsx14(
536
+ NumberInput4,
771
537
  {
772
538
  size: "xs",
773
539
  w: 100,
@@ -776,8 +542,8 @@ function NoiseClampNode({ id, selected, data, type }) {
776
542
  step: 0.1
777
543
  }
778
544
  ),
779
- /* @__PURE__ */ jsx19(
780
- NumberInput5,
545
+ /* @__PURE__ */ jsx14(
546
+ NumberInput4,
781
547
  {
782
548
  size: "xs",
783
549
  w: 100,
@@ -787,18 +553,18 @@ function NoiseClampNode({ id, selected, data, type }) {
787
553
  }
788
554
  )
789
555
  ] }) }),
790
- /* @__PURE__ */ jsx19(NodeTrackConnections10, { handles: data.handles, nodeId: id, type: "target" })
556
+ /* @__PURE__ */ jsx14(NodeTrackConnections9, { handles: data.handles, nodeId: id, type: "target" })
791
557
  ] });
792
558
  }
793
559
  var noise_clamp_node_default = NoiseClampNode;
794
560
 
795
561
  // src/nodes/modifiers/noise-combine-node.tsx
796
- import { NodeCombobox as NodeCombobox2, NodeContainer as NodeContainer17, NodeTrackConnections as NodeTrackConnections11 } from "@awesome-flow/core/layout";
797
- import { useCallback as useCallback11, useEffect as useEffect11 } from "react";
562
+ import { NodeCombobox, NodeContainer as NodeContainer15, NodeTrackConnections as NodeTrackConnections10 } from "@awesome-flow/core/layout";
563
+ import { useCallback as useCallback8, useEffect as useEffect9 } from "react";
798
564
  import {
799
- useIncomingComputedData as useIncomingComputedData3,
800
- useUpdateNodeComputedData as useUpdateNodeComputedData14,
801
- useUpdateNodeData as useUpdateNodeData8
565
+ useIncomingComputedData as useIncomingComputedData4,
566
+ useUpdateNodeComputedData as useUpdateNodeComputedData15,
567
+ useUpdateNodeData as useUpdateNodeData5
802
568
  } from "@awesome-flow/core/hooks";
803
569
  import {
804
570
  IconAsterisk,
@@ -819,49 +585,49 @@ var noiseCombineModuleMap = {
819
585
  };
820
586
 
821
587
  // src/nodes/modifiers/noise-combine-node.tsx
822
- import { jsx as jsx20, jsxs as jsxs15 } from "react/jsx-runtime";
588
+ import { jsx as jsx15, jsxs as jsxs12 } from "react/jsx-runtime";
823
589
  var options = {
824
- add: /* @__PURE__ */ jsx20(IconPlus, {}),
825
- min: /* @__PURE__ */ jsx20(IconChevronLeft, {}),
826
- max: /* @__PURE__ */ jsx20(IconChevronRight, {}),
827
- multiply: /* @__PURE__ */ jsx20(IconAsterisk, {}),
828
- power: /* @__PURE__ */ jsx20(IconChevronUp, {})
590
+ add: /* @__PURE__ */ jsx15(IconPlus, {}),
591
+ min: /* @__PURE__ */ jsx15(IconChevronLeft, {}),
592
+ max: /* @__PURE__ */ jsx15(IconChevronRight, {}),
593
+ multiply: /* @__PURE__ */ jsx15(IconAsterisk, {}),
594
+ power: /* @__PURE__ */ jsx15(IconChevronUp, {})
829
595
  };
830
596
  function NoiseCombineNode({ id, selected, data, type }) {
831
- const updateNodeData = useUpdateNodeData8();
832
- const updateComputedData = useUpdateNodeComputedData14();
833
- const incoming = useIncomingComputedData3(id);
834
- useEffect11(() => {
597
+ const updateNodeData = useUpdateNodeData5();
598
+ const updateComputedData = useUpdateNodeComputedData15();
599
+ const incoming = useIncomingComputedData4(id);
600
+ useEffect9(() => {
835
601
  const ModuleFactory = noiseCombineModuleMap[data.operation];
836
602
  if (incoming?.length > 1) {
837
603
  const module = new ModuleFactory(incoming[0].module, incoming[1].module);
838
604
  updateComputedData(id, { module });
839
605
  }
840
606
  }, [data.operation, incoming]);
841
- const onChange = useCallback11((operation) => {
607
+ const onChange = useCallback8((operation) => {
842
608
  updateNodeData(id, { operation });
843
609
  }, []);
844
- return /* @__PURE__ */ jsxs15(NodeContainer17, { id, selected, data, type, children: [
845
- /* @__PURE__ */ jsx20(NodeCombobox2, { options, selected: data.operation, onChange }),
846
- /* @__PURE__ */ jsx20(NodeTrackConnections11, { handles: data.handles, nodeId: id, type: "target" })
610
+ return /* @__PURE__ */ jsxs12(NodeContainer15, { id, selected, data, type, children: [
611
+ /* @__PURE__ */ jsx15(NodeCombobox, { options, selected: data.operation, onChange, width: 150 }),
612
+ /* @__PURE__ */ jsx15(NodeTrackConnections10, { handles: data.handles, nodeId: id, type: "target" })
847
613
  ] });
848
614
  }
849
615
  var noise_combine_node_default = NoiseCombineNode;
850
616
 
851
617
  // src/nodes/modifiers/noise-curve-node.tsx
852
- import { NodeContainer as NodeContainer18, NodeTrackConnections as NodeTrackConnections12 } from "@awesome-flow/core/layout";
853
- import { ActionIcon, Button, Group as Group7, NumberInput as NumberInput6, Space } from "@mantine/core";
618
+ import { NodeContainer as NodeContainer16, NodeTrackConnections as NodeTrackConnections11 } from "@awesome-flow/core/layout";
619
+ import { ActionIcon, Button, Group as Group6, NumberInput as NumberInput5, Space } from "@mantine/core";
854
620
  import {
855
- useIncomingComputedData as useIncomingComputedData4,
856
- useUpdateNodeComputedData as useUpdateNodeComputedData15,
857
- useUpdateNodeData as useUpdateNodeData9
621
+ useIncomingComputedData as useIncomingComputedData5,
622
+ useUpdateNodeComputedData as useUpdateNodeComputedData16,
623
+ useUpdateNodeData as useUpdateNodeData6
858
624
  } from "@awesome-flow/core/hooks";
859
625
 
860
626
  // ../../node_modules/@mantine/form/esm/use-form.mjs
861
- import { useState as useState11, useCallback as useCallback17 } from "react";
627
+ import { useState as useState8, useCallback as useCallback14 } from "react";
862
628
 
863
629
  // ../../node_modules/@mantine/form/esm/actions/actions.mjs
864
- import { useLayoutEffect, useEffect as useEffect12 } from "react";
630
+ import { useLayoutEffect, useEffect as useEffect10 } from "react";
865
631
  function validateFormName(name) {
866
632
  if (!/^[0-9a-zA-Z-]+$/.test(name)) {
867
633
  throw new Error(
@@ -869,7 +635,7 @@ function validateFormName(name) {
869
635
  );
870
636
  }
871
637
  }
872
- var useIsomorphicEffect = typeof window !== "undefined" ? useLayoutEffect : useEffect12;
638
+ var useIsomorphicEffect = typeof window !== "undefined" ? useLayoutEffect : useEffect10;
873
639
  function useFormEvent(eventKey, handler) {
874
640
  useIsomorphicEffect(() => {
875
641
  if (eventKey) {
@@ -966,7 +732,7 @@ function getInputOnChange(setValue) {
966
732
  }
967
733
 
968
734
  // ../../node_modules/@mantine/form/esm/hooks/use-form-errors/use-form-errors.mjs
969
- import { useState as useState8, useCallback as useCallback12 } from "react";
735
+ import { useState as useState5, useCallback as useCallback9 } from "react";
970
736
 
971
737
  // ../../node_modules/@mantine/form/esm/hooks/use-form-errors/filter-errors/filter-errors.mjs
972
738
  function filterErrors(errors) {
@@ -984,14 +750,14 @@ function filterErrors(errors) {
984
750
 
985
751
  // ../../node_modules/@mantine/form/esm/hooks/use-form-errors/use-form-errors.mjs
986
752
  function useFormErrors(initialErrors) {
987
- const [errorsState, setErrorsState] = useState8(filterErrors(initialErrors));
988
- const setErrors = useCallback12((errors) => {
753
+ const [errorsState, setErrorsState] = useState5(filterErrors(initialErrors));
754
+ const setErrors = useCallback9((errors) => {
989
755
  setErrorsState(
990
756
  (current) => filterErrors(typeof errors === "function" ? errors(current) : errors)
991
757
  );
992
758
  }, []);
993
- const clearErrors = useCallback12(() => setErrorsState({}), []);
994
- const clearFieldError = useCallback12(
759
+ const clearErrors = useCallback9(() => setErrorsState({}), []);
760
+ const clearFieldError = useCallback9(
995
761
  (path) => {
996
762
  if (errorsState[path] === void 0) {
997
763
  return;
@@ -1004,7 +770,7 @@ function useFormErrors(initialErrors) {
1004
770
  },
1005
771
  [errorsState]
1006
772
  );
1007
- const setFieldError = useCallback12(
773
+ const setFieldError = useCallback9(
1008
774
  (path, error) => {
1009
775
  if (error == null || error === false) {
1010
776
  clearFieldError(path);
@@ -1024,7 +790,7 @@ function useFormErrors(initialErrors) {
1024
790
  }
1025
791
 
1026
792
  // ../../node_modules/@mantine/form/esm/hooks/use-form-list/use-form-list.mjs
1027
- import { useCallback as useCallback13 } from "react";
793
+ import { useCallback as useCallback10 } from "react";
1028
794
 
1029
795
  // ../../node_modules/@mantine/form/esm/lists/clear-list-state.mjs
1030
796
  function clearListState(field, state) {
@@ -1248,7 +1014,7 @@ function useFormList({
1248
1014
  $errors,
1249
1015
  $status
1250
1016
  }) {
1251
- const reorderListItem = useCallback13((path, payload) => {
1017
+ const reorderListItem = useCallback10((path, payload) => {
1252
1018
  $status.clearFieldDirty(path);
1253
1019
  $errors.setErrors((errs) => reorderErrors(path, payload, errs));
1254
1020
  $values.setValues({
@@ -1256,7 +1022,7 @@ function useFormList({
1256
1022
  updateState: true
1257
1023
  });
1258
1024
  }, []);
1259
- const removeListItem = useCallback13((path, index) => {
1025
+ const removeListItem = useCallback10((path, index) => {
1260
1026
  $status.clearFieldDirty(path);
1261
1027
  $errors.setErrors((errs) => changeErrorIndices(path, index, errs, -1));
1262
1028
  $values.setValues({
@@ -1264,7 +1030,7 @@ function useFormList({
1264
1030
  updateState: true
1265
1031
  });
1266
1032
  }, []);
1267
- const insertListItem = useCallback13((path, item, index) => {
1033
+ const insertListItem = useCallback10((path, item, index) => {
1268
1034
  $status.clearFieldDirty(path);
1269
1035
  $errors.setErrors((errs) => changeErrorIndices(path, index, errs, 1));
1270
1036
  $values.setValues({
@@ -1277,7 +1043,7 @@ function useFormList({
1277
1043
 
1278
1044
  // ../../node_modules/@mantine/form/esm/hooks/use-form-status/use-form-status.mjs
1279
1045
  var import_fast_deep_equal = __toESM(require_fast_deep_equal(), 1);
1280
- import { useState as useState9, useRef, useCallback as useCallback14 } from "react";
1046
+ import { useState as useState6, useRef, useCallback as useCallback11 } from "react";
1281
1047
 
1282
1048
  // ../../node_modules/@mantine/form/esm/get-status/get-status.mjs
1283
1049
  function getStatus(status, path) {
@@ -1296,31 +1062,31 @@ function useFormStatus({
1296
1062
  mode,
1297
1063
  $values
1298
1064
  }) {
1299
- const [touchedState, setTouchedState] = useState9(initialTouched);
1300
- const [dirtyState, setDirtyState] = useState9(initialDirty);
1065
+ const [touchedState, setTouchedState] = useState6(initialTouched);
1066
+ const [dirtyState, setDirtyState] = useState6(initialDirty);
1301
1067
  const touchedRef = useRef(initialTouched);
1302
1068
  const dirtyRef = useRef(initialDirty);
1303
- const setTouched = useCallback14((values) => {
1069
+ const setTouched = useCallback11((values) => {
1304
1070
  const resolvedValues = typeof values === "function" ? values(touchedRef.current) : values;
1305
1071
  touchedRef.current = resolvedValues;
1306
1072
  if (mode === "controlled") {
1307
1073
  setTouchedState(resolvedValues);
1308
1074
  }
1309
1075
  }, []);
1310
- const setDirty = useCallback14((values) => {
1076
+ const setDirty = useCallback11((values) => {
1311
1077
  const resolvedValues = typeof values === "function" ? values(dirtyRef.current) : values;
1312
1078
  dirtyRef.current = resolvedValues;
1313
1079
  if (mode === "controlled") {
1314
1080
  setDirtyState(resolvedValues);
1315
1081
  }
1316
1082
  }, []);
1317
- const resetTouched = useCallback14(() => setTouched({}), []);
1083
+ const resetTouched = useCallback11(() => setTouched({}), []);
1318
1084
  const resetDirty = (values) => {
1319
1085
  const newSnapshot = values ? { ...values, ...$values.refValues.current } : $values.refValues.current;
1320
1086
  $values.setValuesSnapshot(newSnapshot);
1321
1087
  setDirty({});
1322
1088
  };
1323
- const setFieldTouched = useCallback14((path, touched) => {
1089
+ const setFieldTouched = useCallback11((path, touched) => {
1324
1090
  setTouched((currentTouched) => {
1325
1091
  if (getStatus(currentTouched, path) === touched) {
1326
1092
  return currentTouched;
@@ -1328,7 +1094,7 @@ function useFormStatus({
1328
1094
  return { ...currentTouched, [path]: touched };
1329
1095
  });
1330
1096
  }, []);
1331
- const setFieldDirty = useCallback14((path, dirty) => {
1097
+ const setFieldDirty = useCallback11((path, dirty) => {
1332
1098
  setDirty((currentDirty) => {
1333
1099
  if (getStatus(currentDirty, path) === dirty) {
1334
1100
  return currentDirty;
@@ -1336,11 +1102,11 @@ function useFormStatus({
1336
1102
  return { ...currentDirty, [path]: dirty };
1337
1103
  });
1338
1104
  }, []);
1339
- const isTouched = useCallback14(
1105
+ const isTouched = useCallback11(
1340
1106
  (path) => getStatus(touchedRef.current, path),
1341
1107
  []
1342
1108
  );
1343
- const clearFieldDirty = useCallback14(
1109
+ const clearFieldDirty = useCallback11(
1344
1110
  (path) => setDirty((current) => {
1345
1111
  if (typeof path !== "string") {
1346
1112
  return current;
@@ -1354,7 +1120,7 @@ function useFormStatus({
1354
1120
  }),
1355
1121
  []
1356
1122
  );
1357
- const isDirty = useCallback14((path) => {
1123
+ const isDirty = useCallback11((path) => {
1358
1124
  if (path) {
1359
1125
  const overriddenValue = getPath(path, dirtyRef.current);
1360
1126
  if (typeof overriddenValue === "boolean") {
@@ -1370,8 +1136,8 @@ function useFormStatus({
1370
1136
  }
1371
1137
  return !(0, import_fast_deep_equal.default)($values.refValues.current, $values.valuesSnapshot.current);
1372
1138
  }, []);
1373
- const getDirty = useCallback14(() => dirtyRef.current, []);
1374
- const getTouched = useCallback14(() => touchedRef.current, []);
1139
+ const getDirty = useCallback11(() => dirtyRef.current, []);
1140
+ const getTouched = useCallback11(() => touchedRef.current, []);
1375
1141
  return {
1376
1142
  touchedState,
1377
1143
  dirtyState,
@@ -1394,17 +1160,17 @@ function useFormStatus({
1394
1160
  }
1395
1161
 
1396
1162
  // ../../node_modules/@mantine/form/esm/hooks/use-form-values/use-form-values.mjs
1397
- import { useRef as useRef2, useState as useState10, useCallback as useCallback15 } from "react";
1163
+ import { useRef as useRef2, useState as useState7, useCallback as useCallback12 } from "react";
1398
1164
  function useFormValues({
1399
1165
  initialValues,
1400
1166
  onValuesChange,
1401
1167
  mode
1402
1168
  }) {
1403
1169
  const initialized = useRef2(false);
1404
- const [stateValues, setStateValues] = useState10(initialValues || {});
1170
+ const [stateValues, setStateValues] = useState7(initialValues || {});
1405
1171
  const refValues = useRef2(stateValues);
1406
1172
  const valuesSnapshot = useRef2(stateValues);
1407
- const setValues = useCallback15(
1173
+ const setValues = useCallback12(
1408
1174
  ({
1409
1175
  values,
1410
1176
  subscribers,
@@ -1421,7 +1187,7 @@ function useFormValues({
1421
1187
  },
1422
1188
  [onValuesChange]
1423
1189
  );
1424
- const setFieldValue = useCallback15((payload) => {
1190
+ const setFieldValue = useCallback12((payload) => {
1425
1191
  const currentValue = getPath(payload.path, refValues.current);
1426
1192
  const updatedValue = payload.value instanceof Function ? payload.value(currentValue) : payload.value;
1427
1193
  if (currentValue !== updatedValue) {
@@ -1433,10 +1199,10 @@ function useFormValues({
1433
1199
  );
1434
1200
  }
1435
1201
  }, []);
1436
- const setValuesSnapshot = useCallback15((payload) => {
1202
+ const setValuesSnapshot = useCallback12((payload) => {
1437
1203
  valuesSnapshot.current = payload;
1438
1204
  }, []);
1439
- const initialize = useCallback15((values, onInitialize) => {
1205
+ const initialize = useCallback12((values, onInitialize) => {
1440
1206
  if (!initialized.current) {
1441
1207
  initialized.current = true;
1442
1208
  setValues({ values, updateState: mode === "controlled" });
@@ -1444,14 +1210,14 @@ function useFormValues({
1444
1210
  onInitialize();
1445
1211
  }
1446
1212
  }, []);
1447
- const resetValues = useCallback15(() => {
1213
+ const resetValues = useCallback12(() => {
1448
1214
  setValues({
1449
1215
  values: valuesSnapshot.current,
1450
1216
  updateState: true,
1451
1217
  mergeWithPreviousValues: false
1452
1218
  });
1453
1219
  }, []);
1454
- const getValues = useCallback15(() => refValues.current, []);
1220
+ const getValues = useCallback12(() => refValues.current, []);
1455
1221
  return {
1456
1222
  initialized,
1457
1223
  stateValues,
@@ -1467,15 +1233,15 @@ function useFormValues({
1467
1233
  }
1468
1234
 
1469
1235
  // ../../node_modules/@mantine/form/esm/hooks/use-form-watch/use-form-watch.mjs
1470
- import { useRef as useRef3, useCallback as useCallback16, useEffect as useEffect13 } from "react";
1236
+ import { useRef as useRef3, useCallback as useCallback13, useEffect as useEffect11 } from "react";
1471
1237
  function useFormWatch({
1472
1238
  $status
1473
1239
  }) {
1474
1240
  const subscribers = useRef3(
1475
1241
  {}
1476
1242
  );
1477
- const watch = useCallback16((path, callback) => {
1478
- useEffect13(() => {
1243
+ const watch = useCallback13((path, callback) => {
1244
+ useEffect11(() => {
1479
1245
  subscribers.current[path] = subscribers.current[path] || [];
1480
1246
  subscribers.current[path].push(callback);
1481
1247
  return () => {
@@ -1483,7 +1249,7 @@ function useFormWatch({
1483
1249
  };
1484
1250
  }, [callback]);
1485
1251
  }, []);
1486
- const getFieldSubscribers = useCallback16((path) => {
1252
+ const getFieldSubscribers = useCallback13((path) => {
1487
1253
  if (!subscribers.current[path]) {
1488
1254
  return [];
1489
1255
  }
@@ -1503,6 +1269,11 @@ function useFormWatch({
1503
1269
  };
1504
1270
  }
1505
1271
 
1272
+ // ../../node_modules/@mantine/form/esm/paths/get-data-path.mjs
1273
+ function getDataPath(formName, fieldPath) {
1274
+ return formName ? `${formName}-${fieldPath.toString()}` : fieldPath.toString();
1275
+ }
1276
+
1506
1277
  // ../../node_modules/@mantine/form/esm/validate/validate-values.mjs
1507
1278
  function getValidationResults(errors) {
1508
1279
  const filteredErrors = filterErrors(errors);
@@ -1591,20 +1362,20 @@ function useForm({
1591
1362
  const $status = useFormStatus({ initialDirty, initialTouched, $values, mode });
1592
1363
  const $list = useFormList({ $values, $errors, $status });
1593
1364
  const $watch = useFormWatch({ $status });
1594
- const [formKey, setFormKey] = useState11(0);
1595
- const [fieldKeys, setFieldKeys] = useState11({});
1596
- const reset = useCallback17(() => {
1365
+ const [formKey, setFormKey] = useState8(0);
1366
+ const [fieldKeys, setFieldKeys] = useState8({});
1367
+ const reset = useCallback14(() => {
1597
1368
  $values.resetValues();
1598
1369
  $errors.clearErrors();
1599
1370
  $status.resetDirty();
1600
1371
  $status.resetTouched();
1601
1372
  mode === "uncontrolled" && setFormKey((key2) => key2 + 1);
1602
1373
  }, []);
1603
- const initialize = useCallback17((values) => {
1374
+ const initialize = useCallback14((values) => {
1604
1375
  $values.initialize(values, () => mode === "uncontrolled" && setFormKey((key2) => key2 + 1));
1605
1376
  }, []);
1606
- const setFieldValue = useCallback17(
1607
- (path, value, options3) => {
1377
+ const setFieldValue = useCallback14(
1378
+ (path, value, options2) => {
1608
1379
  const shouldValidate = shouldValidateOnChange(path, validateInputOnChange);
1609
1380
  $status.clearFieldDirty(path);
1610
1381
  $status.setFieldTouched(path, true);
@@ -1619,7 +1390,7 @@ function useForm({
1619
1390
  const validationResults = validateFieldValue(path, rules, payload.updatedValues);
1620
1391
  validationResults.hasError ? $errors.setFieldError(path, validationResults.error) : $errors.clearFieldError(path);
1621
1392
  } : null,
1622
- options3?.forceUpdate !== false && mode !== "controlled" ? () => setFieldKeys((keys) => ({
1393
+ options2?.forceUpdate !== false && mode !== "controlled" ? () => setFieldKeys((keys) => ({
1623
1394
  ...keys,
1624
1395
  [path]: (keys[path] || 0) + 1
1625
1396
  })) : null
@@ -1628,7 +1399,7 @@ function useForm({
1628
1399
  },
1629
1400
  [onValuesChange, rules]
1630
1401
  );
1631
- const setValues = useCallback17(
1402
+ const setValues = useCallback14(
1632
1403
  (values) => {
1633
1404
  const previousValues = $values.refValues.current;
1634
1405
  $values.setValues({ values, updateState: mode === "controlled" });
@@ -1644,12 +1415,12 @@ function useForm({
1644
1415
  },
1645
1416
  [onValuesChange, clearInputErrorOnChange]
1646
1417
  );
1647
- const validate = useCallback17(() => {
1418
+ const validate = useCallback14(() => {
1648
1419
  const results = validateValues(rules, $values.refValues.current);
1649
1420
  $errors.setErrors(results.errors);
1650
1421
  return results;
1651
1422
  }, [rules]);
1652
- const validateField = useCallback17(
1423
+ const validateField = useCallback14(
1653
1424
  (path) => {
1654
1425
  const results = validateFieldValue(path, rules, $values.refValues.current);
1655
1426
  results.hasError ? $errors.setFieldError(path, results.error) : $errors.clearFieldError(path);
@@ -1661,7 +1432,7 @@ function useForm({
1661
1432
  const onChange = getInputOnChange(
1662
1433
  (value) => setFieldValue(path, value, { forceUpdate: false })
1663
1434
  );
1664
- const payload = { onChange };
1435
+ const payload = { onChange, "data-path": getDataPath(name, path) };
1665
1436
  if (withError) {
1666
1437
  payload.error = $errors.errorsState[path];
1667
1438
  }
@@ -1705,15 +1476,19 @@ function useForm({
1705
1476
  }
1706
1477
  };
1707
1478
  const getTransformedValues = (input) => transformValues(input || $values.refValues.current);
1708
- const onReset = useCallback17((event) => {
1479
+ const onReset = useCallback14((event) => {
1709
1480
  event.preventDefault();
1710
1481
  reset();
1711
1482
  }, []);
1712
- const isValid = useCallback17(
1483
+ const isValid = useCallback14(
1713
1484
  (path) => path ? !validateFieldValue(path, rules, $values.refValues.current).hasError : !validateValues(rules, $values.refValues.current).hasErrors,
1714
1485
  [rules]
1715
1486
  );
1716
1487
  const key = (path) => `${formKey}-${path}-${fieldKeys[path] || 0}`;
1488
+ const getInputNode = useCallback14(
1489
+ (path) => document.querySelector(`[data-path="${getDataPath(name, path)}"]`),
1490
+ []
1491
+ );
1717
1492
  const form = {
1718
1493
  watch: $watch.watch,
1719
1494
  initialized: $values.initialized.current,
@@ -1747,25 +1522,26 @@ function useForm({
1747
1522
  onReset,
1748
1523
  isValid,
1749
1524
  getTransformedValues,
1750
- key
1525
+ key,
1526
+ getInputNode
1751
1527
  };
1752
1528
  useFormActions(name, form);
1753
1529
  return form;
1754
1530
  }
1755
1531
 
1756
1532
  // src/nodes/modifiers/noise-curve-node.tsx
1757
- import { useCallback as useCallback18, useEffect as useEffect14, useState as useState12 } from "react";
1533
+ import { useCallback as useCallback15, useEffect as useEffect12, useState as useState9 } from "react";
1758
1534
  import { Curve } from "libnoise-ts/module/modifier";
1759
1535
  import { Tuple } from "libnoise-ts/util";
1760
1536
  import { IconX } from "@tabler/icons-react";
1761
1537
  import { randomId } from "@mantine/hooks";
1762
1538
  import { NodeState } from "@awesome-flow/core/abstract";
1763
- import { Fragment as Fragment3, jsx as jsx21, jsxs as jsxs16 } from "react/jsx-runtime";
1539
+ import { Fragment, jsx as jsx16, jsxs as jsxs13 } from "react/jsx-runtime";
1764
1540
  function NoiseCurveNode({ id, selected, data, type }) {
1765
- const incoming = useIncomingComputedData4(id);
1766
- const updateNodeData = useUpdateNodeData9();
1767
- const updateComputedData = useUpdateNodeComputedData15();
1768
- const [values, setValues] = useState12([]);
1541
+ const incoming = useIncomingComputedData5(id);
1542
+ const updateNodeData = useUpdateNodeData6();
1543
+ const updateComputedData = useUpdateNodeComputedData16();
1544
+ const [values, setValues] = useState9([]);
1769
1545
  const form = useForm({
1770
1546
  mode: "uncontrolled",
1771
1547
  initialValues: {
@@ -1784,7 +1560,7 @@ function NoiseCurveNode({ id, selected, data, type }) {
1784
1560
  }
1785
1561
  }
1786
1562
  },
1787
- onValuesChange: useCallback18((values2) => {
1563
+ onValuesChange: useCallback15((values2) => {
1788
1564
  if (form.isValid()) {
1789
1565
  const points = values2.points.map((v) => ({ input: v.input, output: v.output }));
1790
1566
  setValues(points);
@@ -1793,11 +1569,11 @@ function NoiseCurveNode({ id, selected, data, type }) {
1793
1569
  form.validate();
1794
1570
  }, [])
1795
1571
  });
1796
- useEffect14(() => {
1572
+ useEffect12(() => {
1797
1573
  const points = data.points?.length ? data.points.map((v) => ({ input: v.input, output: v.output, key: randomId() })) : [1, 2, 3, 4].map(() => ({ input: 0, output: 0, key: randomId() }));
1798
1574
  form.initialize({ points });
1799
1575
  }, []);
1800
- useEffect14(() => {
1576
+ useEffect12(() => {
1801
1577
  if (incoming?.length && values?.length >= 4) {
1802
1578
  const module = new Curve(
1803
1579
  incoming[0].module,
@@ -1806,9 +1582,9 @@ function NoiseCurveNode({ id, selected, data, type }) {
1806
1582
  updateComputedData(id, { module });
1807
1583
  }
1808
1584
  }, [values, incoming]);
1809
- const fields = form.getValues().points.map((item, index) => /* @__PURE__ */ jsxs16(Group7, { mt: "xs", children: [
1810
- /* @__PURE__ */ jsx21(
1811
- NumberInput6,
1585
+ const fields = form.getValues().points.map((item, index) => /* @__PURE__ */ jsxs13(Group6, { mt: "xs", children: [
1586
+ /* @__PURE__ */ jsx16(
1587
+ NumberInput5,
1812
1588
  {
1813
1589
  size: "xs",
1814
1590
  w: 100,
@@ -1818,8 +1594,8 @@ function NoiseCurveNode({ id, selected, data, type }) {
1818
1594
  },
1819
1595
  form.key(`points.${index}.input`)
1820
1596
  ),
1821
- /* @__PURE__ */ jsx21(
1822
- NumberInput6,
1597
+ /* @__PURE__ */ jsx16(
1598
+ NumberInput5,
1823
1599
  {
1824
1600
  size: "xs",
1825
1601
  w: 100,
@@ -1829,22 +1605,22 @@ function NoiseCurveNode({ id, selected, data, type }) {
1829
1605
  },
1830
1606
  form.key(`points.${index}.output`)
1831
1607
  ),
1832
- data.state === NodeState.edit && values.length > 4 && /* @__PURE__ */ jsx21(
1608
+ data.state === NodeState.edit && values.length > 4 && /* @__PURE__ */ jsx16(
1833
1609
  ActionIcon,
1834
1610
  {
1835
1611
  color: "red",
1836
1612
  variant: "outline",
1837
1613
  size: "sm",
1838
1614
  onClick: () => form.removeListItem("points", index),
1839
- children: /* @__PURE__ */ jsx21(IconX, { size: "1rem" })
1615
+ children: /* @__PURE__ */ jsx16(IconX, { size: "1rem" })
1840
1616
  }
1841
1617
  )
1842
1618
  ] }, item.key));
1843
- return /* @__PURE__ */ jsxs16(NodeContainer18, { id, selected, type, data, children: [
1619
+ return /* @__PURE__ */ jsxs13(NodeContainer16, { id, selected, type, data, children: [
1844
1620
  fields,
1845
- data.state === NodeState.edit && /* @__PURE__ */ jsxs16(Fragment3, { children: [
1846
- /* @__PURE__ */ jsx21(Space, { h: 10 }),
1847
- /* @__PURE__ */ jsx21(
1621
+ data.state === NodeState.edit && /* @__PURE__ */ jsxs13(Fragment, { children: [
1622
+ /* @__PURE__ */ jsx16(Space, { h: 10 }),
1623
+ /* @__PURE__ */ jsx16(
1848
1624
  Button,
1849
1625
  {
1850
1626
  variant: "outline",
@@ -1855,39 +1631,39 @@ function NoiseCurveNode({ id, selected, data, type }) {
1855
1631
  }
1856
1632
  )
1857
1633
  ] }),
1858
- /* @__PURE__ */ jsx21(NodeTrackConnections12, { handles: data.handles, nodeId: id, type: "target" })
1634
+ /* @__PURE__ */ jsx16(NodeTrackConnections11, { handles: data.handles, nodeId: id, type: "target" })
1859
1635
  ] });
1860
1636
  }
1861
1637
  var noise_curve_node_default = NoiseCurveNode;
1862
1638
 
1863
1639
  // src/nodes/modifiers/noise-exponent-node.tsx
1864
- import { NodeContainer as NodeContainer19, NodeTrackConnections as NodeTrackConnections13 } from "@awesome-flow/core/layout";
1865
- import { useEffect as useEffect15, useState as useState13 } from "react";
1866
- import { Group as Group8, NumberInput as NumberInput7, Stack as Stack7 } from "@mantine/core";
1640
+ import { NodeContainer as NodeContainer17, NodeTrackConnections as NodeTrackConnections12 } from "@awesome-flow/core/layout";
1641
+ import { useEffect as useEffect13, useState as useState10 } from "react";
1642
+ import { Group as Group7, NumberInput as NumberInput6, Stack as Stack5 } from "@mantine/core";
1867
1643
  import {
1868
- useIncomingComputedData as useIncomingComputedData5,
1869
- useUpdateNodeComputedData as useUpdateNodeComputedData16,
1870
- useUpdateNodeData as useUpdateNodeData10
1644
+ useIncomingComputedData as useIncomingComputedData6,
1645
+ useUpdateNodeComputedData as useUpdateNodeComputedData17,
1646
+ useUpdateNodeData as useUpdateNodeData7
1871
1647
  } from "@awesome-flow/core/hooks";
1872
1648
  import { Exponent } from "libnoise-ts/module/modifier";
1873
- import { jsx as jsx22, jsxs as jsxs17 } from "react/jsx-runtime";
1649
+ import { jsx as jsx17, jsxs as jsxs14 } from "react/jsx-runtime";
1874
1650
  function NoiseExponentNode({ id, selected, data, type }) {
1875
- const [exponent, setExponent] = useState13(data.exponent);
1876
- const incoming = useIncomingComputedData5(id);
1877
- const updateNodeData = useUpdateNodeData10();
1878
- const updateComputedData = useUpdateNodeComputedData16();
1879
- useEffect15(() => {
1651
+ const [exponent, setExponent] = useState10(data.exponent);
1652
+ const incoming = useIncomingComputedData6(id);
1653
+ const updateNodeData = useUpdateNodeData7();
1654
+ const updateComputedData = useUpdateNodeComputedData17();
1655
+ useEffect13(() => {
1880
1656
  if (incoming?.length > 0) {
1881
1657
  const module = new Exponent(incoming[0].module, exponent);
1882
1658
  updateComputedData(id, { module });
1883
1659
  }
1884
1660
  updateNodeData(id, { exponent });
1885
1661
  }, [incoming, exponent]);
1886
- return /* @__PURE__ */ jsxs17(NodeContainer19, { id, selected, data, type, children: [
1887
- /* @__PURE__ */ jsx22(Stack7, { children: /* @__PURE__ */ jsxs17(Group8, { children: [
1662
+ return /* @__PURE__ */ jsxs14(NodeContainer17, { id, selected, data, type, children: [
1663
+ /* @__PURE__ */ jsx17(Stack5, { children: /* @__PURE__ */ jsxs14(Group7, { children: [
1888
1664
  "Exponent:",
1889
- /* @__PURE__ */ jsx22(
1890
- NumberInput7,
1665
+ /* @__PURE__ */ jsx17(
1666
+ NumberInput6,
1891
1667
  {
1892
1668
  size: "xs",
1893
1669
  value: exponent,
@@ -1896,38 +1672,38 @@ function NoiseExponentNode({ id, selected, data, type }) {
1896
1672
  }
1897
1673
  )
1898
1674
  ] }) }),
1899
- /* @__PURE__ */ jsx22(NodeTrackConnections13, { handles: data.handles, nodeId: id, type: "target" })
1675
+ /* @__PURE__ */ jsx17(NodeTrackConnections12, { handles: data.handles, nodeId: id, type: "target" })
1900
1676
  ] });
1901
1677
  }
1902
1678
  var noise_exponent_node_default = NoiseExponentNode;
1903
1679
 
1904
1680
  // src/nodes/modifiers/noise-invert-node.tsx
1905
- import { NodeContainer as NodeContainer20, NodeTrackConnections as NodeTrackConnections14 } from "@awesome-flow/core/layout";
1906
- import { useEffect as useEffect16 } from "react";
1907
- import { useIncomingComputedData as useIncomingComputedData6, useUpdateNodeComputedData as useUpdateNodeComputedData17 } from "@awesome-flow/core/hooks";
1681
+ import { NodeContainer as NodeContainer18, NodeTrackConnections as NodeTrackConnections13 } from "@awesome-flow/core/layout";
1682
+ import { useEffect as useEffect14 } from "react";
1683
+ import { useIncomingComputedData as useIncomingComputedData7, useUpdateNodeComputedData as useUpdateNodeComputedData18 } from "@awesome-flow/core/hooks";
1908
1684
  import { Invert } from "libnoise-ts/module/modifier";
1909
- import { jsx as jsx23 } from "react/jsx-runtime";
1685
+ import { jsx as jsx18 } from "react/jsx-runtime";
1910
1686
  function NoiseInvertNode({ id, selected, data, type }) {
1911
- const incoming = useIncomingComputedData6(id);
1912
- const updateComputedData = useUpdateNodeComputedData17();
1913
- useEffect16(() => {
1687
+ const incoming = useIncomingComputedData7(id);
1688
+ const updateComputedData = useUpdateNodeComputedData18();
1689
+ useEffect14(() => {
1914
1690
  if (incoming?.length > 0) {
1915
1691
  const module = new Invert(incoming[0].module);
1916
1692
  updateComputedData(id, { module });
1917
1693
  }
1918
1694
  }, [incoming]);
1919
- return /* @__PURE__ */ jsx23(NodeContainer20, { id, selected, data, type, children: /* @__PURE__ */ jsx23(NodeTrackConnections14, { handles: data.handles, nodeId: id, type: "target" }) });
1695
+ return /* @__PURE__ */ jsx18(NodeContainer18, { id, selected, data, type, children: /* @__PURE__ */ jsx18(NodeTrackConnections13, { handles: data.handles, nodeId: id, type: "target" }) });
1920
1696
  }
1921
1697
  var noise_invert_node_default = NoiseInvertNode;
1922
1698
 
1923
1699
  // src/nodes/modifiers/noise-normalize-node.tsx
1924
- import { NodeContainer as NodeContainer21, NodeTrackConnections as NodeTrackConnections15 } from "@awesome-flow/core/layout";
1925
- import { useEffect as useEffect17, useState as useState14 } from "react";
1926
- import { Group as Group9, NumberInput as NumberInput8, Stack as Stack8 } from "@mantine/core";
1700
+ import { NodeContainer as NodeContainer19, NodeTrackConnections as NodeTrackConnections14 } from "@awesome-flow/core/layout";
1701
+ import { useEffect as useEffect15, useState as useState11 } from "react";
1702
+ import { Group as Group8, NumberInput as NumberInput7, Stack as Stack6 } from "@mantine/core";
1927
1703
  import {
1928
- useIncomingComputedData as useIncomingComputedData7,
1929
- useUpdateNodeComputedData as useUpdateNodeComputedData18,
1930
- useUpdateNodeData as useUpdateNodeData11
1704
+ useIncomingComputedData as useIncomingComputedData8,
1705
+ useUpdateNodeComputedData as useUpdateNodeComputedData19,
1706
+ useUpdateNodeData as useUpdateNodeData8
1931
1707
  } from "@awesome-flow/core/hooks";
1932
1708
 
1933
1709
  // src/modules/normalize-noise-module.ts
@@ -1947,14 +1723,14 @@ function normalize(value, min, max) {
1947
1723
  }
1948
1724
 
1949
1725
  // src/nodes/modifiers/noise-normalize-node.tsx
1950
- import { jsx as jsx24, jsxs as jsxs18 } from "react/jsx-runtime";
1726
+ import { jsx as jsx19, jsxs as jsxs15 } from "react/jsx-runtime";
1951
1727
  function NoiseNormalizeNode({ id, selected, data, type }) {
1952
- const [intervalStart, setIntervalStart] = useState14(data.intervalStart);
1953
- const [intervalEnd, setIntervalEnd] = useState14(data.intervalEnd);
1954
- const incoming = useIncomingComputedData7(id);
1955
- const updateNodeData = useUpdateNodeData11();
1956
- const updateComputedData = useUpdateNodeComputedData18();
1957
- useEffect17(() => {
1728
+ const [intervalStart, setIntervalStart] = useState11(data.intervalStart);
1729
+ const [intervalEnd, setIntervalEnd] = useState11(data.intervalEnd);
1730
+ const incoming = useIncomingComputedData8(id);
1731
+ const updateNodeData = useUpdateNodeData8();
1732
+ const updateComputedData = useUpdateNodeComputedData19();
1733
+ useEffect15(() => {
1958
1734
  if (incoming?.length) {
1959
1735
  const source = incoming[0].module;
1960
1736
  const module = new NormalizeNoiseModule(source, intervalStart, intervalEnd);
@@ -1962,10 +1738,10 @@ function NoiseNormalizeNode({ id, selected, data, type }) {
1962
1738
  }
1963
1739
  updateNodeData(id, { intervalStart, intervalEnd });
1964
1740
  }, [incoming, intervalStart, intervalEnd]);
1965
- return /* @__PURE__ */ jsxs18(NodeContainer21, { id, selected, data, type, children: [
1966
- /* @__PURE__ */ jsx24(Stack8, { children: /* @__PURE__ */ jsxs18(Group9, { children: [
1967
- /* @__PURE__ */ jsx24(
1968
- NumberInput8,
1741
+ return /* @__PURE__ */ jsxs15(NodeContainer19, { id, selected, data, type, children: [
1742
+ /* @__PURE__ */ jsx19(Stack6, { children: /* @__PURE__ */ jsxs15(Group8, { children: [
1743
+ /* @__PURE__ */ jsx19(
1744
+ NumberInput7,
1969
1745
  {
1970
1746
  size: "xs",
1971
1747
  w: 100,
@@ -1973,8 +1749,8 @@ function NoiseNormalizeNode({ id, selected, data, type }) {
1973
1749
  onChange: (e) => setIntervalStart(Number(e))
1974
1750
  }
1975
1751
  ),
1976
- /* @__PURE__ */ jsx24(
1977
- NumberInput8,
1752
+ /* @__PURE__ */ jsx19(
1753
+ NumberInput7,
1978
1754
  {
1979
1755
  size: "xs",
1980
1756
  w: 100,
@@ -1983,41 +1759,41 @@ function NoiseNormalizeNode({ id, selected, data, type }) {
1983
1759
  }
1984
1760
  )
1985
1761
  ] }) }),
1986
- /* @__PURE__ */ jsx24(NodeTrackConnections15, { handles: data.handles, nodeId: id, type: "target" })
1762
+ /* @__PURE__ */ jsx19(NodeTrackConnections14, { handles: data.handles, nodeId: id, type: "target" })
1987
1763
  ] });
1988
1764
  }
1989
1765
  var noise_normalize_node_default = NoiseNormalizeNode;
1990
1766
 
1991
1767
  // src/nodes/modifiers/noise-scale-bias-node.tsx
1992
- import { NodeContainer as NodeContainer22, NodeTrackConnections as NodeTrackConnections16 } from "@awesome-flow/core/layout";
1993
- import { useEffect as useEffect18, useState as useState15 } from "react";
1994
- import { Group as Group10, NumberInput as NumberInput9, Stack as Stack9 } from "@mantine/core";
1768
+ import { NodeContainer as NodeContainer20, NodeTrackConnections as NodeTrackConnections15 } from "@awesome-flow/core/layout";
1769
+ import { useEffect as useEffect16, useState as useState12 } from "react";
1770
+ import { Group as Group9, NumberInput as NumberInput8, Stack as Stack7 } from "@mantine/core";
1995
1771
  import {
1996
- useIncomingComputedData as useIncomingComputedData8,
1997
- useUpdateNodeComputedData as useUpdateNodeComputedData19,
1998
- useUpdateNodeData as useUpdateNodeData12
1772
+ useIncomingComputedData as useIncomingComputedData9,
1773
+ useUpdateNodeComputedData as useUpdateNodeComputedData20,
1774
+ useUpdateNodeData as useUpdateNodeData9
1999
1775
  } from "@awesome-flow/core/hooks";
2000
1776
  import { ScaleBias } from "libnoise-ts/module/modifier";
2001
- import { jsx as jsx25, jsxs as jsxs19 } from "react/jsx-runtime";
1777
+ import { jsx as jsx20, jsxs as jsxs16 } from "react/jsx-runtime";
2002
1778
  function NoiseScaleBiasNode({ id, selected, data, type }) {
2003
- const [scale, setScale] = useState15(data.scale);
2004
- const [bias, setBias] = useState15(data.bias);
2005
- const incoming = useIncomingComputedData8(id);
2006
- const updateNodeData = useUpdateNodeData12();
2007
- const updateComputedData = useUpdateNodeComputedData19();
2008
- useEffect18(() => {
1779
+ const [scale, setScale] = useState12(data.scale);
1780
+ const [bias, setBias] = useState12(data.bias);
1781
+ const incoming = useIncomingComputedData9(id);
1782
+ const updateNodeData = useUpdateNodeData9();
1783
+ const updateComputedData = useUpdateNodeComputedData20();
1784
+ useEffect16(() => {
2009
1785
  if (incoming?.length > 0) {
2010
1786
  const module = new ScaleBias(incoming[0].module, scale, bias);
2011
1787
  updateComputedData(id, { module });
2012
1788
  }
2013
1789
  updateNodeData(id, { scale, bias });
2014
1790
  }, [incoming, scale, bias]);
2015
- return /* @__PURE__ */ jsxs19(NodeContainer22, { id, selected, data, type, children: [
2016
- /* @__PURE__ */ jsxs19(Stack9, { children: [
2017
- /* @__PURE__ */ jsxs19(Group10, { children: [
1791
+ return /* @__PURE__ */ jsxs16(NodeContainer20, { id, selected, data, type, children: [
1792
+ /* @__PURE__ */ jsxs16(Stack7, { children: [
1793
+ /* @__PURE__ */ jsxs16(Group9, { children: [
2018
1794
  "Scale:",
2019
- /* @__PURE__ */ jsx25(
2020
- NumberInput9,
1795
+ /* @__PURE__ */ jsx20(
1796
+ NumberInput8,
2021
1797
  {
2022
1798
  size: "xs",
2023
1799
  w: 100,
@@ -2027,10 +1803,10 @@ function NoiseScaleBiasNode({ id, selected, data, type }) {
2027
1803
  }
2028
1804
  )
2029
1805
  ] }),
2030
- /* @__PURE__ */ jsxs19(Group10, { children: [
1806
+ /* @__PURE__ */ jsxs16(Group9, { children: [
2031
1807
  "Bias:",
2032
- /* @__PURE__ */ jsx25(
2033
- NumberInput9,
1808
+ /* @__PURE__ */ jsx20(
1809
+ NumberInput8,
2034
1810
  {
2035
1811
  size: "xs",
2036
1812
  w: 100,
@@ -2041,30 +1817,30 @@ function NoiseScaleBiasNode({ id, selected, data, type }) {
2041
1817
  )
2042
1818
  ] })
2043
1819
  ] }),
2044
- /* @__PURE__ */ jsx25(NodeTrackConnections16, { handles: data.handles, nodeId: id, type: "target" })
1820
+ /* @__PURE__ */ jsx20(NodeTrackConnections15, { handles: data.handles, nodeId: id, type: "target" })
2045
1821
  ] });
2046
1822
  }
2047
1823
  var noise_scale_bias_node_default = NoiseScaleBiasNode;
2048
1824
 
2049
1825
  // src/nodes/modifiers/noise-terrace-node.tsx
2050
- import { NodeContainer as NodeContainer23, NodeTrackConnections as NodeTrackConnections17 } from "@awesome-flow/core/layout";
2051
- import { ActionIcon as ActionIcon2, Button as Button2, Group as Group11, NumberInput as NumberInput10, Space as Space2 } from "@mantine/core";
1826
+ import { NodeContainer as NodeContainer21, NodeTrackConnections as NodeTrackConnections16 } from "@awesome-flow/core/layout";
1827
+ import { ActionIcon as ActionIcon2, Button as Button2, Group as Group10, NumberInput as NumberInput9, Space as Space2 } from "@mantine/core";
2052
1828
  import {
2053
- useIncomingComputedData as useIncomingComputedData9,
2054
- useUpdateNodeComputedData as useUpdateNodeComputedData20,
2055
- useUpdateNodeData as useUpdateNodeData13
1829
+ useIncomingComputedData as useIncomingComputedData10,
1830
+ useUpdateNodeComputedData as useUpdateNodeComputedData21,
1831
+ useUpdateNodeData as useUpdateNodeData10
2056
1832
  } from "@awesome-flow/core/hooks";
2057
- import { useCallback as useCallback19, useEffect as useEffect19, useState as useState16 } from "react";
1833
+ import { useCallback as useCallback16, useEffect as useEffect17, useState as useState13 } from "react";
2058
1834
  import { Terrace } from "libnoise-ts/module/modifier";
2059
1835
  import { IconX as IconX2 } from "@tabler/icons-react";
2060
1836
  import { randomId as randomId2 } from "@mantine/hooks";
2061
1837
  import { NodeState as NodeState2 } from "@awesome-flow/core/abstract";
2062
- import { Fragment as Fragment4, jsx as jsx26, jsxs as jsxs20 } from "react/jsx-runtime";
1838
+ import { Fragment as Fragment2, jsx as jsx21, jsxs as jsxs17 } from "react/jsx-runtime";
2063
1839
  function NoiseTerraceNode({ id, selected, data, type }) {
2064
- const incoming = useIncomingComputedData9(id);
2065
- const updateNodeData = useUpdateNodeData13();
2066
- const updateComputedData = useUpdateNodeComputedData20();
2067
- const [values, setValues] = useState16([]);
1840
+ const incoming = useIncomingComputedData10(id);
1841
+ const updateNodeData = useUpdateNodeData10();
1842
+ const updateComputedData = useUpdateNodeComputedData21();
1843
+ const [values, setValues] = useState13([]);
2068
1844
  const form = useForm({
2069
1845
  mode: "uncontrolled",
2070
1846
  initialValues: {
@@ -2072,7 +1848,7 @@ function NoiseTerraceNode({ id, selected, data, type }) {
2072
1848
  },
2073
1849
  validateInputOnChange: [`points.${FORM_INDEX}.input`],
2074
1850
  clearInputErrorOnChange: true,
2075
- onValuesChange: useCallback19((values2) => {
1851
+ onValuesChange: useCallback16((values2) => {
2076
1852
  if (form.isValid()) {
2077
1853
  const points = values2.points.map((v) => v.value);
2078
1854
  setValues(points);
@@ -2081,19 +1857,19 @@ function NoiseTerraceNode({ id, selected, data, type }) {
2081
1857
  form.validate();
2082
1858
  }, [])
2083
1859
  });
2084
- useEffect19(() => {
1860
+ useEffect17(() => {
2085
1861
  const points = data.points?.length ? data.points.map((v) => ({ value: v, key: randomId2() })) : [1, 2].map(() => ({ value: 0, key: randomId2() }));
2086
1862
  form.initialize({ points });
2087
1863
  }, []);
2088
- useEffect19(() => {
1864
+ useEffect17(() => {
2089
1865
  if (incoming?.length && values?.length >= 2) {
2090
1866
  const module = new Terrace(incoming[0].module, values);
2091
1867
  updateComputedData(id, { module });
2092
1868
  }
2093
1869
  }, [values, incoming]);
2094
- const fields = form.getValues().points.map((item, index) => /* @__PURE__ */ jsxs20(Group11, { mt: "xs", children: [
2095
- /* @__PURE__ */ jsx26(
2096
- NumberInput10,
1870
+ const fields = form.getValues().points.map((item, index) => /* @__PURE__ */ jsxs17(Group10, { mt: "xs", children: [
1871
+ /* @__PURE__ */ jsx21(
1872
+ NumberInput9,
2097
1873
  {
2098
1874
  size: "xs",
2099
1875
  placeholder: "Input Value",
@@ -2102,22 +1878,22 @@ function NoiseTerraceNode({ id, selected, data, type }) {
2102
1878
  },
2103
1879
  form.key(`points.${index}.value`)
2104
1880
  ),
2105
- data.state === NodeState2.edit && values.length > 2 && /* @__PURE__ */ jsx26(
1881
+ data.state === NodeState2.edit && values.length > 2 && /* @__PURE__ */ jsx21(
2106
1882
  ActionIcon2,
2107
1883
  {
2108
1884
  color: "red",
2109
1885
  variant: "outline",
2110
1886
  size: "sm",
2111
1887
  onClick: () => form.removeListItem("points", index),
2112
- children: /* @__PURE__ */ jsx26(IconX2, { size: "1rem" })
1888
+ children: /* @__PURE__ */ jsx21(IconX2, { size: "1rem" })
2113
1889
  }
2114
1890
  )
2115
1891
  ] }, item.key));
2116
- return /* @__PURE__ */ jsxs20(NodeContainer23, { id, selected, type, data, children: [
1892
+ return /* @__PURE__ */ jsxs17(NodeContainer21, { id, selected, type, data, children: [
2117
1893
  fields,
2118
- data.state === NodeState2.edit && /* @__PURE__ */ jsxs20(Fragment4, { children: [
2119
- /* @__PURE__ */ jsx26(Space2, { h: 10 }),
2120
- /* @__PURE__ */ jsx26(
1894
+ data.state === NodeState2.edit && /* @__PURE__ */ jsxs17(Fragment2, { children: [
1895
+ /* @__PURE__ */ jsx21(Space2, { h: 10 }),
1896
+ /* @__PURE__ */ jsx21(
2121
1897
  Button2,
2122
1898
  {
2123
1899
  variant: "outline",
@@ -2128,94 +1904,27 @@ function NoiseTerraceNode({ id, selected, data, type }) {
2128
1904
  }
2129
1905
  )
2130
1906
  ] }),
2131
- /* @__PURE__ */ jsx26(NodeTrackConnections17, { handles: data.handles, nodeId: id, type: "target" })
1907
+ /* @__PURE__ */ jsx21(NodeTrackConnections16, { handles: data.handles, nodeId: id, type: "target" })
2132
1908
  ] });
2133
1909
  }
2134
1910
  var noise_terrace_node_default = NoiseTerraceNode;
2135
1911
 
2136
- // src/nodes/modifiers/variable-combine-node.tsx
2137
- import { NodeCombobox as NodeCombobox3, NodeContainer as NodeContainer24, NodeTrackConnections as NodeTrackConnections18 } from "@awesome-flow/core/layout";
2138
- import { useCallback as useCallback20, useEffect as useEffect20, useState as useState17 } from "react";
2139
- import { useIncomingNodeData as useIncomingNodeData3, useUpdateNodeData as useUpdateNodeData14 } from "@awesome-flow/core/hooks";
2140
- import {
2141
- IconAsterisk as IconAsterisk2,
2142
- IconChevronLeft as IconChevronLeft2,
2143
- IconChevronRight as IconChevronRight2,
2144
- IconChevronUp as IconChevronUp2,
2145
- IconDivide,
2146
- IconPlus as IconPlus2
2147
- } from "@tabler/icons-react";
2148
- import { jsx as jsx27, jsxs as jsxs21 } from "react/jsx-runtime";
2149
- var options2 = {
2150
- add: /* @__PURE__ */ jsx27(IconPlus2, {}),
2151
- divide: /* @__PURE__ */ jsx27(IconDivide, {}),
2152
- min: /* @__PURE__ */ jsx27(IconChevronLeft2, {}),
2153
- max: /* @__PURE__ */ jsx27(IconChevronRight2, {}),
2154
- multiply: /* @__PURE__ */ jsx27(IconAsterisk2, {}),
2155
- power: /* @__PURE__ */ jsx27(IconChevronUp2, {})
2156
- };
2157
- function VariableCombineNode({
2158
- id,
2159
- selected,
2160
- data,
2161
- type
2162
- }) {
2163
- const [operation, setOperation] = useState17(data.operation);
2164
- const [value, setValue] = useState17(data.value);
2165
- const updateNodeData = useUpdateNodeData14();
2166
- const incoming = useIncomingNodeData3(id);
2167
- useEffect20(() => {
2168
- if (incoming?.length > 1) {
2169
- const result = getOperationResult(operation, incoming[0].value, incoming[1].value);
2170
- setValue(result);
2171
- updateNodeData(id, { value: result });
2172
- }
2173
- }, [operation, incoming]);
2174
- const onChange = useCallback20((op) => {
2175
- updateNodeData(id, { operation: op });
2176
- setOperation(op);
2177
- }, []);
2178
- return /* @__PURE__ */ jsxs21(NodeContainer24, { id, selected, data, type, children: [
2179
- /* @__PURE__ */ jsx27(NodeCombobox3, { options: options2, selected: operation, onChange }),
2180
- /* @__PURE__ */ jsx27(node_value_input_default, { value, onChange: () => {
2181
- }, disabled: true }),
2182
- /* @__PURE__ */ jsx27(NodeTrackConnections18, { handles: data.handles, nodeId: id, type: "target" })
2183
- ] });
2184
- }
2185
- function getOperationResult(operation, value1, value2) {
2186
- switch (operation) {
2187
- case "add" /* add */:
2188
- return Number(value1) + Number(value2);
2189
- case "divide" /* divide */:
2190
- return Number(value1) / (Number(value2) || 1);
2191
- case "max" /* max */:
2192
- return Number(value1) > Number(value2) ? value1 : value2;
2193
- case "min" /* min */:
2194
- return Number(value1) < Number(value2) ? value1 : value2;
2195
- case "multiply" /* multiply */:
2196
- return Number(value1) * Number(value2);
2197
- case "power" /* power */:
2198
- return Number(value1) ** Number(value2);
2199
- }
2200
- }
2201
- var variable_combine_node_default = VariableCombineNode;
2202
-
2203
1912
  // src/nodes/output/noise-logger-node.tsx
2204
- import { NodeContainer as NodeContainer25, NodeTrackConnections as NodeTrackConnections19 } from "@awesome-flow/core/layout";
2205
- import { useMemo as useMemo11 } from "react";
2206
- import { Divider, Stack as Stack10, Text } from "@mantine/core";
2207
- import { useIncomingComputedData as useIncomingComputedData10 } from "@awesome-flow/core/hooks";
2208
- import { jsx as jsx28, jsxs as jsxs22 } from "react/jsx-runtime";
1913
+ import { NodeContainer as NodeContainer22, NodeTrackConnections as NodeTrackConnections17 } from "@awesome-flow/core/layout";
1914
+ import { useMemo as useMemo10 } from "react";
1915
+ import { Divider, Stack as Stack8, Text } from "@mantine/core";
1916
+ import { useIncomingComputedData as useIncomingComputedData11 } from "@awesome-flow/core/hooks";
1917
+ import { jsx as jsx22, jsxs as jsxs18 } from "react/jsx-runtime";
2209
1918
  function NoiseLoggerNode({ id, selected, data, type }) {
2210
- const incoming = useIncomingComputedData10(id);
2211
- const noise = useMemo11(() => incoming?.map((p) => p.noise).flat(), [incoming]);
2212
- return /* @__PURE__ */ jsxs22(NodeContainer25, { id, selected, data, type, children: [
2213
- /* @__PURE__ */ jsxs22(Text, { children: [
1919
+ const incoming = useIncomingComputedData11(id);
1920
+ const noise = useMemo10(() => incoming?.map((p) => p.noise).flat(), [incoming]);
1921
+ return /* @__PURE__ */ jsxs18(NodeContainer22, { id, selected, data, type, children: [
1922
+ /* @__PURE__ */ jsxs18(Text, { children: [
2214
1923
  "Size: ",
2215
1924
  noise?.length || 0
2216
1925
  ] }),
2217
- /* @__PURE__ */ jsx28(Divider, { h: 5 }),
2218
- /* @__PURE__ */ jsx28(Stack10, { children: noise?.map((v, i) => /* @__PURE__ */ jsxs22(Text, { children: [
1926
+ /* @__PURE__ */ jsx22(Divider, { h: 5 }),
1927
+ /* @__PURE__ */ jsx22(Stack8, { children: noise?.map((v, i) => /* @__PURE__ */ jsxs18(Text, { children: [
2219
1928
  v.position?.x,
2220
1929
  ":",
2221
1930
  v.position?.y,
@@ -2224,92 +1933,31 @@ function NoiseLoggerNode({ id, selected, data, type }) {
2224
1933
  ": ",
2225
1934
  v.value
2226
1935
  ] }, i)) }),
2227
- /* @__PURE__ */ jsx28(NodeTrackConnections19, { handles: data.handles, nodeId: id, type: "target" })
1936
+ /* @__PURE__ */ jsx22(NodeTrackConnections17, { handles: data.handles, nodeId: id, type: "target" })
2228
1937
  ] });
2229
1938
  }
2230
1939
  var noise_logger_node_default = NoiseLoggerNode;
2231
1940
 
2232
1941
  // src/nodes/output/noise-output-node.tsx
2233
- import { NodeContainer as NodeContainer26, NodeTrackConnections as NodeTrackConnections20 } from "@awesome-flow/core/layout";
2234
- import { useIncomingComputedData as useIncomingComputedData11, useUpdateNodeComputedData as useUpdateNodeComputedData21 } from "@awesome-flow/core/hooks";
2235
- import { Box, Group as Group12, LoadingOverlay, Stack as Stack11 } from "@mantine/core";
2236
- import { useEffect as useEffect21, useState as useState18 } from "react";
2237
- import { jsx as jsx29, jsxs as jsxs23 } from "react/jsx-runtime";
2238
- function NoiseOutputNode({ id, selected, data, type }) {
2239
- const [generating, setGenerating] = useState18(false);
2240
- const updateComputedData = useUpdateNodeComputedData21();
2241
- const incomingModules = useIncomingComputedData11(id, 8 /* module */);
2242
- const incomingPositions = useIncomingComputedData11(
2243
- id,
2244
- 4 /* position */
2245
- );
2246
- useEffect21(() => {
2247
- if (incomingPositions?.length && incomingModules?.length) {
2248
- const { module } = incomingModules[0];
2249
- if (module) {
2250
- setGenerating(true);
2251
- }
2252
- }
2253
- }, [incomingModules, incomingPositions]);
2254
- useEffect21(() => {
2255
- if (incomingPositions?.length && incomingModules?.length) {
2256
- const { module } = incomingModules[0];
2257
- if (module && generating) {
2258
- const noise = [];
2259
- for (const input of incomingPositions) {
2260
- for (const position of input.positions) {
2261
- const value = module.getValue(position.x, position.y, position.z);
2262
- noise.push({
2263
- position,
2264
- value
2265
- });
2266
- }
2267
- }
2268
- console.log("SET COMPUTED DATA");
2269
- updateComputedData(id, { noise, module });
2270
- setGenerating(false);
2271
- }
2272
- }
2273
- }, [generating]);
2274
- return /* @__PURE__ */ jsxs23(NodeContainer26, { id, selected, data, type, children: [
2275
- /* @__PURE__ */ jsxs23(Box, { pos: "relative", children: [
2276
- /* @__PURE__ */ jsx29(
2277
- LoadingOverlay,
2278
- {
2279
- visible: generating,
2280
- zIndex: 1e3,
2281
- overlayProps: { radius: "sm", blur: 2 }
2282
- }
2283
- ),
2284
- /* @__PURE__ */ jsxs23(Stack11, { children: [
2285
- /* @__PURE__ */ jsxs23(Group12, { children: [
2286
- "Position Inputs: ",
2287
- incomingPositions?.length
2288
- ] }),
2289
- /* @__PURE__ */ jsxs23(Group12, { children: [
2290
- "Module Inputs: ",
2291
- incomingModules?.length
2292
- ] })
2293
- ] })
2294
- ] }),
2295
- /* @__PURE__ */ jsx29(NodeTrackConnections20, { handles: data.handles, nodeId: id, type: "target" })
2296
- ] });
2297
- }
2298
- var noise_output_node_default = NoiseOutputNode;
1942
+ import { NodeContainer as NodeContainer32, NodeTrackConnections as NodeTrackConnections27 } from "@awesome-flow/core/layout";
1943
+ import { useCallback as useCallback21, useState as useState20 } from "react";
1944
+ import { useUpdateNodeComputedData as useUpdateNodeComputedData30 } from "@awesome-flow/core/hooks";
1945
+ import { HandlesIncomingDataStatus as HandlesIncomingDataStatus4 } from "@awesome-flow/core/components";
1946
+ import { Text as Text3 } from "@mantine/core";
2299
1947
 
2300
1948
  // src/nodes/output/noise-raw-texture-node.tsx
2301
- import { NodeContainer as NodeContainer27, NodeTrackConnections as NodeTrackConnections21 } from "@awesome-flow/core/layout";
2302
- import { useEffect as useEffect22, useMemo as useMemo12, useState as useState19 } from "react";
1949
+ import { NodeContainer as NodeContainer23, NodeTrackConnections as NodeTrackConnections18 } from "@awesome-flow/core/layout";
1950
+ import { useEffect as useEffect18, useMemo as useMemo11, useState as useState14 } from "react";
2303
1951
  import { useIncomingComputedData as useIncomingComputedData12, useUpdateNodeComputedData as useUpdateNodeComputedData22 } from "@awesome-flow/core/hooks";
2304
- import { Group as Group13, Stack as Stack12 } from "@mantine/core";
2305
- import { jsx as jsx30, jsxs as jsxs24 } from "react/jsx-runtime";
1952
+ import { Group as Group11, Stack as Stack9 } from "@mantine/core";
1953
+ import { jsx as jsx23, jsxs as jsxs19 } from "react/jsx-runtime";
2306
1954
  function NoiseRawTextureNode({ id, selected, data, type }) {
2307
1955
  const updateComputedData = useUpdateNodeComputedData22();
2308
- const [dataLength, setDataLength] = useState19(0);
2309
- const [resolution, setResolution] = useState19(0);
1956
+ const [dataLength, setDataLength] = useState14(0);
1957
+ const [resolution, setResolution] = useState14(0);
2310
1958
  const incoming = useIncomingComputedData12(id);
2311
- const noise = useMemo12(() => incoming?.map((p) => p.noise).flat(), [incoming]);
2312
- useEffect22(() => {
1959
+ const noise = useMemo11(() => incoming?.map((p) => p.noise).flat(), [incoming]);
1960
+ useEffect18(() => {
2313
1961
  if (noise?.length) {
2314
1962
  const size = Math.ceil(Math.sqrt(noise.length));
2315
1963
  const colors = noise.map((n) => [n.value * 255, n.value * 255, n.value * 255, 255]).flat();
@@ -2320,19 +1968,19 @@ function NoiseRawTextureNode({ id, selected, data, type }) {
2320
1968
  updateComputedData(id, { textureData: dataArray, textureResolution: size });
2321
1969
  }
2322
1970
  }, [noise]);
2323
- return /* @__PURE__ */ jsxs24(NodeContainer27, { id, selected, data, type, children: [
2324
- /* @__PURE__ */ jsxs24(Stack12, { children: [
2325
- /* @__PURE__ */ jsxs24(Group13, { children: [
1971
+ return /* @__PURE__ */ jsxs19(NodeContainer23, { id, selected, data, type, children: [
1972
+ /* @__PURE__ */ jsxs19(Stack9, { children: [
1973
+ /* @__PURE__ */ jsxs19(Group11, { children: [
2326
1974
  "Resolution: ",
2327
1975
  resolution,
2328
1976
  "x",
2329
1977
  resolution
2330
1978
  ] }),
2331
- /* @__PURE__ */ jsxs24(Group13, { children: [
1979
+ /* @__PURE__ */ jsxs19(Group11, { children: [
2332
1980
  "Input Length: ",
2333
1981
  noise?.length || 0
2334
1982
  ] }),
2335
- /* @__PURE__ */ jsxs24(Group13, { children: [
1983
+ /* @__PURE__ */ jsxs19(Group11, { children: [
2336
1984
  "Output Length (",
2337
1985
  resolution,
2338
1986
  "*",
@@ -2341,104 +1989,122 @@ function NoiseRawTextureNode({ id, selected, data, type }) {
2341
1989
  dataLength
2342
1990
  ] })
2343
1991
  ] }),
2344
- /* @__PURE__ */ jsx30(NodeTrackConnections21, { handles: data.handles, nodeId: id, type: "target" })
1992
+ /* @__PURE__ */ jsx23(NodeTrackConnections18, { handles: data.handles, nodeId: id, type: "target" })
2345
1993
  ] });
2346
1994
  }
2347
1995
  var noise_raw_texture_node_default = NoiseRawTextureNode;
2348
1996
 
2349
1997
  // src/nodes/output/positions-logger-node.tsx
2350
- import { NodeContainer as NodeContainer28, NodeTrackConnections as NodeTrackConnections22 } from "@awesome-flow/core/layout";
2351
- import { useMemo as useMemo13 } from "react";
2352
- import { Divider as Divider2, Stack as Stack13, Text as Text2 } from "@mantine/core";
1998
+ import { NodeContainer as NodeContainer24, NodeTrackConnections as NodeTrackConnections19 } from "@awesome-flow/core/layout";
1999
+ import { useMemo as useMemo12 } from "react";
2000
+ import { Divider as Divider2, Stack as Stack10, Text as Text2 } from "@mantine/core";
2353
2001
  import { useIncomingComputedData as useIncomingComputedData13 } from "@awesome-flow/core/hooks";
2354
- import { jsx as jsx31, jsxs as jsxs25 } from "react/jsx-runtime";
2002
+ import { jsx as jsx24, jsxs as jsxs20 } from "react/jsx-runtime";
2355
2003
  function PositionsLoggerNode({ id, selected, data, type }) {
2356
2004
  const incoming = useIncomingComputedData13(id);
2357
- const positions = useMemo13(() => {
2005
+ const positions = useMemo12(() => {
2358
2006
  return incoming?.map((p) => p.positions).flat();
2359
2007
  }, [incoming]);
2360
- return /* @__PURE__ */ jsxs25(NodeContainer28, { id, selected, data, type, children: [
2361
- /* @__PURE__ */ jsxs25(Text2, { children: [
2008
+ return /* @__PURE__ */ jsxs20(NodeContainer24, { id, selected, data, type, children: [
2009
+ /* @__PURE__ */ jsxs20(Text2, { children: [
2362
2010
  "Size: ",
2363
2011
  positions?.length || 0
2364
2012
  ] }),
2365
- /* @__PURE__ */ jsx31(Divider2, { h: 5 }),
2366
- /* @__PURE__ */ jsx31(Stack13, { children: positions?.map((v, i) => /* @__PURE__ */ jsxs25(Text2, { children: [
2013
+ /* @__PURE__ */ jsx24(Divider2, { h: 5 }),
2014
+ /* @__PURE__ */ jsx24(Stack10, { children: positions?.map((v, i) => /* @__PURE__ */ jsxs20(Text2, { children: [
2367
2015
  v.x,
2368
2016
  ":",
2369
2017
  v.y,
2370
2018
  ":",
2371
2019
  v.z
2372
2020
  ] }, i)) }),
2373
- /* @__PURE__ */ jsx31(NodeTrackConnections22, { handles: data.handles, nodeId: id, type: "target" })
2021
+ /* @__PURE__ */ jsx24(NodeTrackConnections19, { handles: data.handles, nodeId: id, type: "target" })
2374
2022
  ] });
2375
2023
  }
2376
2024
  var positions_logger_node_default = PositionsLoggerNode;
2377
2025
 
2378
2026
  // src/nodes/selectors/noise-blend-node.tsx
2379
- import { NodeContainer as NodeContainer29, NodeTrackConnections as NodeTrackConnections23 } from "@awesome-flow/core/layout";
2380
- import { useEffect as useEffect23 } from "react";
2381
- import { useIncomingComputedData as useIncomingComputedData14, useUpdateNodeComputedData as useUpdateNodeComputedData23 } from "@awesome-flow/core/hooks";
2027
+ import { NodeContainer as NodeContainer25, NodeTrackConnections as NodeTrackConnections20 } from "@awesome-flow/core/layout";
2028
+ import { useCallback as useCallback17 } from "react";
2029
+ import { useUpdateNodeComputedData as useUpdateNodeComputedData23 } from "@awesome-flow/core/hooks";
2382
2030
  import { Blend } from "libnoise-ts/module/selector";
2383
- import { Group as Group14 } from "@mantine/core";
2384
- import { jsx as jsx32, jsxs as jsxs26 } from "react/jsx-runtime";
2031
+ import { HandlesIncomingDataStatus } from "@awesome-flow/core/components";
2032
+ import { jsx as jsx25, jsxs as jsxs21 } from "react/jsx-runtime";
2385
2033
  function NoiseBlendNode({ id, selected, data, type }) {
2386
- const incoming = useIncomingComputedData14(id);
2387
2034
  const updateComputedData = useUpdateNodeComputedData23();
2388
- useEffect23(() => {
2389
- if (incoming?.length > 2) {
2390
- const module = new Blend(incoming[0].module, incoming[1].module, incoming[2].module);
2391
- updateComputedData(id, { module });
2392
- }
2393
- }, [id, incoming, updateComputedData]);
2394
- return /* @__PURE__ */ jsxs26(NodeContainer29, { id, selected, data, type, children: [
2395
- /* @__PURE__ */ jsxs26(Group14, { children: [
2396
- "Modules: ",
2397
- incoming?.length
2398
- ] }),
2399
- /* @__PURE__ */ jsx32(NodeTrackConnections23, { handles: data.handles, nodeId: id, type: "target" })
2035
+ const onDataUpdated = useCallback17(
2036
+ (incomingData) => {
2037
+ const incomingSources = incomingData["source" /* source */];
2038
+ const incomingControl = incomingData["control" /* control */];
2039
+ if (incomingSources?.length >= 2 && incomingControl?.length) {
2040
+ const module = new Blend(
2041
+ incomingSources[0].module,
2042
+ incomingSources[1].module,
2043
+ incomingControl[0].module
2044
+ );
2045
+ updateComputedData(id, { module });
2046
+ }
2047
+ },
2048
+ []
2049
+ );
2050
+ return /* @__PURE__ */ jsxs21(NodeContainer25, { id, selected, data, type, children: [
2051
+ /* @__PURE__ */ jsx25(
2052
+ HandlesIncomingDataStatus,
2053
+ {
2054
+ nodeId: id,
2055
+ handles: data.handles,
2056
+ handleKey: "dataId",
2057
+ onDataUpdated,
2058
+ type: "target",
2059
+ resetComputedData: true
2060
+ }
2061
+ ),
2062
+ /* @__PURE__ */ jsx25(NodeTrackConnections20, { handles: data.handles, nodeId: id, type: "target" })
2400
2063
  ] });
2401
2064
  }
2402
2065
  var noise_blend_node_default = NoiseBlendNode;
2403
2066
 
2404
2067
  // src/nodes/selectors/noise-select-node.tsx
2405
- import { NodeContainer as NodeContainer30, NodeTrackConnections as NodeTrackConnections24 } from "@awesome-flow/core/layout";
2406
- import { useEffect as useEffect24, useState as useState20 } from "react";
2407
- import {
2408
- useIncomingComputedData as useIncomingComputedData15,
2409
- useUpdateNodeComputedData as useUpdateNodeComputedData24,
2410
- useUpdateNodeData as useUpdateNodeData15
2411
- } from "@awesome-flow/core/hooks";
2068
+ import { NodeContainer as NodeContainer26, NodeTrackConnections as NodeTrackConnections21 } from "@awesome-flow/core/layout";
2069
+ import { useCallback as useCallback18, useEffect as useEffect19, useState as useState15 } from "react";
2070
+ import { useUpdateNodeComputedData as useUpdateNodeComputedData24, useUpdateNodeData as useUpdateNodeData11 } from "@awesome-flow/core/hooks";
2412
2071
  import { Select } from "libnoise-ts/module/selector";
2413
- import { Group as Group15, NumberInput as NumberInput11, Stack as Stack14 } from "@mantine/core";
2414
- import { jsx as jsx33, jsxs as jsxs27 } from "react/jsx-runtime";
2072
+ import { Group as Group12, NumberInput as NumberInput10, Stack as Stack11 } from "@mantine/core";
2073
+ import { HandlesIncomingDataStatus as HandlesIncomingDataStatus2 } from "@awesome-flow/core/components";
2074
+ import { jsx as jsx26, jsxs as jsxs22 } from "react/jsx-runtime";
2415
2075
  function NoiseSelectNode({ id, selected, data, type }) {
2416
- const [edgeFalloff, setEdgeFalloff] = useState20(data.edgeFalloff);
2417
- const [lowerBound, setLowerBound] = useState20(data.lowerBound);
2418
- const [upperBound, setUpperBound] = useState20(data.upperBound);
2419
- const incoming = useIncomingComputedData15(id);
2420
- const updateNodeData = useUpdateNodeData15();
2076
+ const [edgeFalloff, setEdgeFalloff] = useState15(data.edgeFalloff);
2077
+ const [lowerBound, setLowerBound] = useState15(data.lowerBound);
2078
+ const [upperBound, setUpperBound] = useState15(data.upperBound);
2079
+ const updateNodeData = useUpdateNodeData11();
2421
2080
  const updateComputedData = useUpdateNodeComputedData24();
2422
- useEffect24(() => {
2423
- if (incoming?.length > 2) {
2424
- const module = new Select(
2425
- incoming[0].module,
2426
- incoming[1].module,
2427
- incoming[2].module,
2428
- edgeFalloff,
2429
- lowerBound,
2430
- upperBound
2431
- );
2432
- updateComputedData(id, { module });
2433
- }
2081
+ useEffect19(() => {
2434
2082
  updateNodeData(id, { edgeFalloff, lowerBound, upperBound });
2435
- }, [incoming, edgeFalloff, lowerBound, upperBound, updateNodeData, id, updateComputedData]);
2436
- return /* @__PURE__ */ jsxs27(NodeContainer30, { id, selected, data, type, children: [
2437
- /* @__PURE__ */ jsxs27(Stack14, { children: [
2438
- /* @__PURE__ */ jsxs27(Group15, { children: [
2083
+ }, [edgeFalloff, lowerBound, upperBound]);
2084
+ const onDataUpdated = useCallback18(
2085
+ (incomingData) => {
2086
+ const incomingSources = incomingData["source" /* source */];
2087
+ const incomingControl = incomingData["control" /* control */];
2088
+ if (incomingSources?.length >= 2 && incomingControl?.length) {
2089
+ const module = new Select(
2090
+ incomingSources[0].module,
2091
+ incomingSources[1].module,
2092
+ incomingControl[0].module,
2093
+ edgeFalloff,
2094
+ lowerBound,
2095
+ upperBound
2096
+ );
2097
+ updateComputedData(id, { module });
2098
+ }
2099
+ },
2100
+ []
2101
+ );
2102
+ return /* @__PURE__ */ jsxs22(NodeContainer26, { id, selected, data, type, children: [
2103
+ /* @__PURE__ */ jsxs22(Stack11, { children: [
2104
+ /* @__PURE__ */ jsxs22(Group12, { children: [
2439
2105
  "Edge Falloff:",
2440
- /* @__PURE__ */ jsx33(
2441
- NumberInput11,
2106
+ /* @__PURE__ */ jsx26(
2107
+ NumberInput10,
2442
2108
  {
2443
2109
  size: "xs",
2444
2110
  w: 100,
@@ -2448,10 +2114,10 @@ function NoiseSelectNode({ id, selected, data, type }) {
2448
2114
  }
2449
2115
  )
2450
2116
  ] }),
2451
- /* @__PURE__ */ jsxs27(Group15, { children: [
2117
+ /* @__PURE__ */ jsxs22(Group12, { children: [
2452
2118
  "Lower Bound:",
2453
- /* @__PURE__ */ jsx33(
2454
- NumberInput11,
2119
+ /* @__PURE__ */ jsx26(
2120
+ NumberInput10,
2455
2121
  {
2456
2122
  size: "xs",
2457
2123
  w: 100,
@@ -2461,10 +2127,10 @@ function NoiseSelectNode({ id, selected, data, type }) {
2461
2127
  }
2462
2128
  )
2463
2129
  ] }),
2464
- /* @__PURE__ */ jsxs27(Group15, { children: [
2130
+ /* @__PURE__ */ jsxs22(Group12, { children: [
2465
2131
  "Upper Bound:",
2466
- /* @__PURE__ */ jsx33(
2467
- NumberInput11,
2132
+ /* @__PURE__ */ jsx26(
2133
+ NumberInput10,
2468
2134
  {
2469
2135
  size: "xs",
2470
2136
  w: 100,
@@ -2474,101 +2140,103 @@ function NoiseSelectNode({ id, selected, data, type }) {
2474
2140
  }
2475
2141
  )
2476
2142
  ] }),
2477
- /* @__PURE__ */ jsxs27(Group15, { children: [
2478
- "Modules: ",
2479
- incoming?.length
2480
- ] })
2143
+ /* @__PURE__ */ jsx26(
2144
+ HandlesIncomingDataStatus2,
2145
+ {
2146
+ nodeId: id,
2147
+ handles: data.handles,
2148
+ handleKey: "dataId",
2149
+ onDataUpdated,
2150
+ type: "target",
2151
+ resetComputedData: true
2152
+ }
2153
+ )
2481
2154
  ] }),
2482
- /* @__PURE__ */ jsx33(NodeTrackConnections24, { handles: data.handles, nodeId: id, type: "target" })
2155
+ /* @__PURE__ */ jsx26(NodeTrackConnections21, { handles: data.handles, nodeId: id, type: "target" })
2483
2156
  ] });
2484
2157
  }
2485
2158
  var noise_select_node_default = NoiseSelectNode;
2486
2159
 
2487
2160
  // src/nodes/transformers/noise-displace-node.tsx
2488
- import { NodeContainer as NodeContainer31, NodeTrackConnections as NodeTrackConnections25 } from "@awesome-flow/core/layout";
2489
- import { useEffect as useEffect25, useMemo as useMemo14 } from "react";
2490
- import { useIncomingHandleData, useUpdateNodeComputedData as useUpdateNodeComputedData25 } from "@awesome-flow/core/hooks";
2161
+ import { NodeContainer as NodeContainer27, NodeTrackConnections as NodeTrackConnections22 } from "@awesome-flow/core/layout";
2162
+ import { useCallback as useCallback19 } from "react";
2163
+ import { useUpdateNodeComputedData as useUpdateNodeComputedData25 } from "@awesome-flow/core/hooks";
2491
2164
  import { Displace } from "libnoise-ts/module/transformer";
2492
- import { Badge as Badge2, Stack as Stack15 } from "@mantine/core";
2493
- import { jsx as jsx34, jsxs as jsxs28 } from "react/jsx-runtime";
2165
+ import { HandlesIncomingDataStatus as HandlesIncomingDataStatus3 } from "@awesome-flow/core/components";
2166
+ import { jsx as jsx27, jsxs as jsxs23 } from "react/jsx-runtime";
2494
2167
  function NoiseDisplaceNode({ id, selected, data, type }) {
2495
2168
  const updateComputedData = useUpdateNodeComputedData25();
2496
- const incomingHandleData = useIncomingHandleData(id, data.handles);
2497
- const { sourceModule, xModule, yModule, zModule } = useMemo14(() => {
2498
- return {
2499
- sourceModule: incomingHandleData["source" /* sourceModule */],
2500
- xModule: incomingHandleData["x-module" /* xModule */],
2501
- yModule: incomingHandleData["y-module" /* yModule */],
2502
- zModule: incomingHandleData["z-module" /* zModule */]
2503
- };
2504
- }, [incomingHandleData]);
2505
- useEffect25(() => {
2506
- if (sourceModule && xModule && yModule && zModule) {
2507
- const module = new Displace(
2508
- sourceModule[0].module,
2509
- xModule[0].module,
2510
- yModule[0].module,
2511
- zModule[0].module
2512
- );
2513
- updateComputedData(id, { module });
2514
- }
2515
- }, [id, updateComputedData, sourceModule, xModule, yModule, zModule]);
2516
- const { sourceColor, xColor, yColor, zColor } = useMemo14(() => {
2517
- return {
2518
- sourceColor: sourceModule ? "green" : "orange",
2519
- xColor: xModule ? "green" : "orange",
2520
- yColor: yModule ? "green" : "orange",
2521
- zColor: zModule ? "green" : "orange"
2522
- };
2523
- }, [sourceModule, xModule, yModule, zModule]);
2524
- return /* @__PURE__ */ jsxs28(NodeContainer31, { id, selected, data, type, children: [
2525
- /* @__PURE__ */ jsxs28(Stack15, { align: "center", children: [
2526
- /* @__PURE__ */ jsx34(Badge2, { color: sourceColor, children: "Source Module" }),
2527
- /* @__PURE__ */ jsx34(Badge2, { color: xColor, children: "X Module" }),
2528
- /* @__PURE__ */ jsx34(Badge2, { color: yColor, children: "Y Module" }),
2529
- /* @__PURE__ */ jsx34(Badge2, { color: zColor, children: "Z Module" })
2530
- ] }),
2531
- /* @__PURE__ */ jsx34(NodeTrackConnections25, { handles: data.handles, nodeId: id, type: "target" })
2169
+ const onDataUpdated = useCallback19(
2170
+ (handleData) => {
2171
+ const sourceModule = handleData["source" /* sourceModule */];
2172
+ const xModule = handleData["x-module" /* xModule */];
2173
+ const yModule = handleData["y-module" /* yModule */];
2174
+ const zModule = handleData["z-module" /* zModule */];
2175
+ if (sourceModule && xModule && yModule && zModule) {
2176
+ const module = new Displace(
2177
+ sourceModule[0].module,
2178
+ xModule[0].module,
2179
+ yModule[0].module,
2180
+ zModule[0].module
2181
+ );
2182
+ updateComputedData(id, { module });
2183
+ }
2184
+ },
2185
+ []
2186
+ );
2187
+ return /* @__PURE__ */ jsxs23(NodeContainer27, { id, selected, data, type, children: [
2188
+ /* @__PURE__ */ jsx27(
2189
+ HandlesIncomingDataStatus3,
2190
+ {
2191
+ nodeId: id,
2192
+ handles: data.handles,
2193
+ handleKey: "dataId",
2194
+ onDataUpdated,
2195
+ type: "target",
2196
+ resetComputedData: true
2197
+ }
2198
+ ),
2199
+ /* @__PURE__ */ jsx27(NodeTrackConnections22, { handles: data.handles, nodeId: id, type: "target" })
2532
2200
  ] });
2533
2201
  }
2534
2202
  var noise_displace_node_default = NoiseDisplaceNode;
2535
2203
 
2536
2204
  // src/nodes/transformers/noise-rotate-point-node.tsx
2537
- import { NodeContainer as NodeContainer32, NodeTrackConnections as NodeTrackConnections26 } from "@awesome-flow/core/layout";
2538
- import { useEffect as useEffect26, useState as useState21 } from "react";
2205
+ import { NodeContainer as NodeContainer28, NodeTrackConnections as NodeTrackConnections23 } from "@awesome-flow/core/layout";
2206
+ import { useEffect as useEffect20, useState as useState16 } from "react";
2539
2207
  import {
2540
- useIncomingComputedData as useIncomingComputedData16,
2208
+ useIncomingComputedData as useIncomingComputedData14,
2541
2209
  useUpdateNodeComputedData as useUpdateNodeComputedData26,
2542
- useUpdateNodeData as useUpdateNodeData16
2210
+ useUpdateNodeData as useUpdateNodeData12
2543
2211
  } from "@awesome-flow/core/hooks";
2544
- import { Group as Group16, NumberInput as NumberInput12, Stack as Stack16 } from "@mantine/core";
2212
+ import { Group as Group13, NumberInput as NumberInput11, Stack as Stack12 } from "@mantine/core";
2545
2213
  import { RotatePoint } from "libnoise-ts/module/transformer";
2546
- import { jsx as jsx35, jsxs as jsxs29 } from "react/jsx-runtime";
2214
+ import { jsx as jsx28, jsxs as jsxs24 } from "react/jsx-runtime";
2547
2215
  function NoiseRotatePointNode({
2548
2216
  id,
2549
2217
  selected,
2550
2218
  data,
2551
2219
  type
2552
2220
  }) {
2553
- const [xAngle, setXAngle] = useState21(data.xAngle);
2554
- const [yAngle, setYAngle] = useState21(data.yAngle);
2555
- const [zAngle, setZAngle] = useState21(data.zAngle);
2556
- const incoming = useIncomingComputedData16(id);
2557
- const updateNodeData = useUpdateNodeData16();
2221
+ const [xAngle, setXAngle] = useState16(data.xAngle);
2222
+ const [yAngle, setYAngle] = useState16(data.yAngle);
2223
+ const [zAngle, setZAngle] = useState16(data.zAngle);
2224
+ const incoming = useIncomingComputedData14(id);
2225
+ const updateNodeData = useUpdateNodeData12();
2558
2226
  const updateComputedData = useUpdateNodeComputedData26();
2559
- useEffect26(() => {
2227
+ useEffect20(() => {
2560
2228
  if (incoming?.length) {
2561
2229
  const module = new RotatePoint(incoming[0].module, xAngle, yAngle, zAngle);
2562
2230
  updateComputedData(id, { module });
2563
2231
  }
2564
2232
  updateNodeData(id, { xAngle, yAngle, zAngle });
2565
2233
  }, [id, updateComputedData, updateNodeData, incoming, xAngle, yAngle, zAngle]);
2566
- return /* @__PURE__ */ jsxs29(NodeContainer32, { id, selected, data, type, children: [
2567
- /* @__PURE__ */ jsxs29(Stack16, { children: [
2568
- /* @__PURE__ */ jsxs29(Group16, { children: [
2234
+ return /* @__PURE__ */ jsxs24(NodeContainer28, { id, selected, data, type, children: [
2235
+ /* @__PURE__ */ jsxs24(Stack12, { children: [
2236
+ /* @__PURE__ */ jsxs24(Group13, { children: [
2569
2237
  "X Angle:",
2570
- /* @__PURE__ */ jsx35(
2571
- NumberInput12,
2238
+ /* @__PURE__ */ jsx28(
2239
+ NumberInput11,
2572
2240
  {
2573
2241
  size: "xs",
2574
2242
  w: 100,
@@ -2578,10 +2246,10 @@ function NoiseRotatePointNode({
2578
2246
  }
2579
2247
  )
2580
2248
  ] }),
2581
- /* @__PURE__ */ jsxs29(Group16, { children: [
2249
+ /* @__PURE__ */ jsxs24(Group13, { children: [
2582
2250
  "Y Angle:",
2583
- /* @__PURE__ */ jsx35(
2584
- NumberInput12,
2251
+ /* @__PURE__ */ jsx28(
2252
+ NumberInput11,
2585
2253
  {
2586
2254
  size: "xs",
2587
2255
  w: 100,
@@ -2591,10 +2259,10 @@ function NoiseRotatePointNode({
2591
2259
  }
2592
2260
  )
2593
2261
  ] }),
2594
- /* @__PURE__ */ jsxs29(Group16, { children: [
2262
+ /* @__PURE__ */ jsxs24(Group13, { children: [
2595
2263
  "Z Angle:",
2596
- /* @__PURE__ */ jsx35(
2597
- NumberInput12,
2264
+ /* @__PURE__ */ jsx28(
2265
+ NumberInput11,
2598
2266
  {
2599
2267
  size: "xs",
2600
2268
  w: 100,
@@ -2605,47 +2273,47 @@ function NoiseRotatePointNode({
2605
2273
  )
2606
2274
  ] })
2607
2275
  ] }),
2608
- /* @__PURE__ */ jsx35(NodeTrackConnections26, { handles: data.handles, nodeId: id, type: "target" })
2276
+ /* @__PURE__ */ jsx28(NodeTrackConnections23, { handles: data.handles, nodeId: id, type: "target" })
2609
2277
  ] });
2610
2278
  }
2611
2279
  var noise_rotate_point_node_default = NoiseRotatePointNode;
2612
2280
 
2613
2281
  // src/nodes/transformers/noise-scale-point-node.tsx
2614
- import { NodeContainer as NodeContainer33, NodeTrackConnections as NodeTrackConnections27 } from "@awesome-flow/core/layout";
2615
- import { useEffect as useEffect27, useState as useState22 } from "react";
2282
+ import { NodeContainer as NodeContainer29, NodeTrackConnections as NodeTrackConnections24 } from "@awesome-flow/core/layout";
2283
+ import { useEffect as useEffect21, useState as useState17 } from "react";
2616
2284
  import {
2617
- useIncomingComputedData as useIncomingComputedData17,
2285
+ useIncomingComputedData as useIncomingComputedData15,
2618
2286
  useUpdateNodeComputedData as useUpdateNodeComputedData27,
2619
- useUpdateNodeData as useUpdateNodeData17
2287
+ useUpdateNodeData as useUpdateNodeData13
2620
2288
  } from "@awesome-flow/core/hooks";
2621
- import { Group as Group17, NumberInput as NumberInput13, Stack as Stack17 } from "@mantine/core";
2289
+ import { Group as Group14, NumberInput as NumberInput12, Stack as Stack13 } from "@mantine/core";
2622
2290
  import { ScalePoint } from "libnoise-ts/module/transformer";
2623
- import { jsx as jsx36, jsxs as jsxs30 } from "react/jsx-runtime";
2291
+ import { jsx as jsx29, jsxs as jsxs25 } from "react/jsx-runtime";
2624
2292
  function NoiseScalePointNode({
2625
2293
  id,
2626
2294
  selected,
2627
2295
  data,
2628
2296
  type
2629
2297
  }) {
2630
- const [xScale, setXScale] = useState22(data.xScale);
2631
- const [yScale, setYScale] = useState22(data.yScale);
2632
- const [zScale, setZScale] = useState22(data.zScale);
2633
- const incoming = useIncomingComputedData17(id);
2634
- const updateNodeData = useUpdateNodeData17();
2298
+ const [xScale, setXScale] = useState17(data.xScale);
2299
+ const [yScale, setYScale] = useState17(data.yScale);
2300
+ const [zScale, setZScale] = useState17(data.zScale);
2301
+ const incoming = useIncomingComputedData15(id);
2302
+ const updateNodeData = useUpdateNodeData13();
2635
2303
  const updateComputedData = useUpdateNodeComputedData27();
2636
- useEffect27(() => {
2304
+ useEffect21(() => {
2637
2305
  if (incoming?.length) {
2638
2306
  const module = new ScalePoint(incoming[0].module, xScale, yScale, zScale);
2639
2307
  updateComputedData(id, { module });
2640
2308
  }
2641
2309
  updateNodeData(id, { xScale, yScale, zScale });
2642
2310
  }, [id, incoming, updateComputedData, updateNodeData, xScale, yScale, zScale]);
2643
- return /* @__PURE__ */ jsxs30(NodeContainer33, { id, selected, data, type, children: [
2644
- /* @__PURE__ */ jsxs30(Stack17, { children: [
2645
- /* @__PURE__ */ jsxs30(Group17, { children: [
2311
+ return /* @__PURE__ */ jsxs25(NodeContainer29, { id, selected, data, type, children: [
2312
+ /* @__PURE__ */ jsxs25(Stack13, { children: [
2313
+ /* @__PURE__ */ jsxs25(Group14, { children: [
2646
2314
  "X Scale:",
2647
- /* @__PURE__ */ jsx36(
2648
- NumberInput13,
2315
+ /* @__PURE__ */ jsx29(
2316
+ NumberInput12,
2649
2317
  {
2650
2318
  size: "xs",
2651
2319
  w: 100,
@@ -2655,10 +2323,10 @@ function NoiseScalePointNode({
2655
2323
  }
2656
2324
  )
2657
2325
  ] }),
2658
- /* @__PURE__ */ jsxs30(Group17, { children: [
2326
+ /* @__PURE__ */ jsxs25(Group14, { children: [
2659
2327
  "Y Scale:",
2660
- /* @__PURE__ */ jsx36(
2661
- NumberInput13,
2328
+ /* @__PURE__ */ jsx29(
2329
+ NumberInput12,
2662
2330
  {
2663
2331
  size: "xs",
2664
2332
  w: 100,
@@ -2668,10 +2336,10 @@ function NoiseScalePointNode({
2668
2336
  }
2669
2337
  )
2670
2338
  ] }),
2671
- /* @__PURE__ */ jsxs30(Group17, { children: [
2339
+ /* @__PURE__ */ jsxs25(Group14, { children: [
2672
2340
  "Z Scale:",
2673
- /* @__PURE__ */ jsx36(
2674
- NumberInput13,
2341
+ /* @__PURE__ */ jsx29(
2342
+ NumberInput12,
2675
2343
  {
2676
2344
  size: "xs",
2677
2345
  w: 100,
@@ -2682,47 +2350,47 @@ function NoiseScalePointNode({
2682
2350
  )
2683
2351
  ] })
2684
2352
  ] }),
2685
- /* @__PURE__ */ jsx36(NodeTrackConnections27, { handles: data.handles, nodeId: id, type: "target" })
2353
+ /* @__PURE__ */ jsx29(NodeTrackConnections24, { handles: data.handles, nodeId: id, type: "target" })
2686
2354
  ] });
2687
2355
  }
2688
2356
  var noise_scale_point_node_default = NoiseScalePointNode;
2689
2357
 
2690
2358
  // src/nodes/transformers/noise-translate-point-node.tsx
2691
- import { NodeContainer as NodeContainer34, NodeTrackConnections as NodeTrackConnections28 } from "@awesome-flow/core/layout";
2692
- import { useEffect as useEffect28, useState as useState23 } from "react";
2359
+ import { NodeContainer as NodeContainer30, NodeTrackConnections as NodeTrackConnections25 } from "@awesome-flow/core/layout";
2360
+ import { useEffect as useEffect22, useState as useState18 } from "react";
2693
2361
  import {
2694
- useIncomingComputedData as useIncomingComputedData18,
2362
+ useIncomingComputedData as useIncomingComputedData16,
2695
2363
  useUpdateNodeComputedData as useUpdateNodeComputedData28,
2696
- useUpdateNodeData as useUpdateNodeData18
2364
+ useUpdateNodeData as useUpdateNodeData14
2697
2365
  } from "@awesome-flow/core/hooks";
2698
- import { Group as Group18, NumberInput as NumberInput14, Stack as Stack18 } from "@mantine/core";
2366
+ import { Group as Group15, NumberInput as NumberInput13, Stack as Stack14 } from "@mantine/core";
2699
2367
  import { TranslatePoint } from "libnoise-ts/module/transformer";
2700
- import { jsx as jsx37, jsxs as jsxs31 } from "react/jsx-runtime";
2368
+ import { jsx as jsx30, jsxs as jsxs26 } from "react/jsx-runtime";
2701
2369
  function NoiseTranslatePointNode({
2702
2370
  id,
2703
2371
  selected,
2704
2372
  data,
2705
2373
  type
2706
2374
  }) {
2707
- const [translateX, setTranslateX] = useState23(data.translateX);
2708
- const [translateY, setTranslateY] = useState23(data.translateY);
2709
- const [translateZ, setTranslateZ] = useState23(data.translateZ);
2710
- const incoming = useIncomingComputedData18(id);
2711
- const updateNodeData = useUpdateNodeData18();
2375
+ const [translateX, setTranslateX] = useState18(data.translateX);
2376
+ const [translateY, setTranslateY] = useState18(data.translateY);
2377
+ const [translateZ, setTranslateZ] = useState18(data.translateZ);
2378
+ const incoming = useIncomingComputedData16(id);
2379
+ const updateNodeData = useUpdateNodeData14();
2712
2380
  const updateComputedData = useUpdateNodeComputedData28();
2713
- useEffect28(() => {
2381
+ useEffect22(() => {
2714
2382
  if (incoming?.length) {
2715
2383
  const module = new TranslatePoint(incoming[0].module, translateX, translateY, translateZ);
2716
2384
  updateComputedData(id, { module });
2717
2385
  }
2718
2386
  updateNodeData(id, { translateX, translateY, translateZ });
2719
2387
  }, [id, incoming, translateX, translateY, translateZ, updateComputedData, updateNodeData]);
2720
- return /* @__PURE__ */ jsxs31(NodeContainer34, { id, selected, data, type, children: [
2721
- /* @__PURE__ */ jsxs31(Stack18, { children: [
2722
- /* @__PURE__ */ jsxs31(Group18, { children: [
2388
+ return /* @__PURE__ */ jsxs26(NodeContainer30, { id, selected, data, type, children: [
2389
+ /* @__PURE__ */ jsxs26(Stack14, { children: [
2390
+ /* @__PURE__ */ jsxs26(Group15, { children: [
2723
2391
  "Translate X:",
2724
- /* @__PURE__ */ jsx37(
2725
- NumberInput14,
2392
+ /* @__PURE__ */ jsx30(
2393
+ NumberInput13,
2726
2394
  {
2727
2395
  size: "xs",
2728
2396
  w: 100,
@@ -2732,10 +2400,10 @@ function NoiseTranslatePointNode({
2732
2400
  }
2733
2401
  )
2734
2402
  ] }),
2735
- /* @__PURE__ */ jsxs31(Group18, { children: [
2403
+ /* @__PURE__ */ jsxs26(Group15, { children: [
2736
2404
  "Translate Y:",
2737
- /* @__PURE__ */ jsx37(
2738
- NumberInput14,
2405
+ /* @__PURE__ */ jsx30(
2406
+ NumberInput13,
2739
2407
  {
2740
2408
  size: "xs",
2741
2409
  w: 100,
@@ -2745,10 +2413,10 @@ function NoiseTranslatePointNode({
2745
2413
  }
2746
2414
  )
2747
2415
  ] }),
2748
- /* @__PURE__ */ jsxs31(Group18, { children: [
2416
+ /* @__PURE__ */ jsxs26(Group15, { children: [
2749
2417
  "Translate Z:",
2750
- /* @__PURE__ */ jsx37(
2751
- NumberInput14,
2418
+ /* @__PURE__ */ jsx30(
2419
+ NumberInput13,
2752
2420
  {
2753
2421
  size: "xs",
2754
2422
  w: 100,
@@ -2759,31 +2427,32 @@ function NoiseTranslatePointNode({
2759
2427
  )
2760
2428
  ] })
2761
2429
  ] }),
2762
- /* @__PURE__ */ jsx37(NodeTrackConnections28, { handles: data.handles, nodeId: id, type: "target" })
2430
+ /* @__PURE__ */ jsx30(NodeTrackConnections25, { handles: data.handles, nodeId: id, type: "target" })
2763
2431
  ] });
2764
2432
  }
2765
2433
  var noise_translate_point_node_default = NoiseTranslatePointNode;
2766
2434
 
2767
2435
  // src/nodes/transformers/noise-turbulence-node .tsx
2768
- import { NodeContainer as NodeContainer35, NodeTrackConnections as NodeTrackConnections29 } from "@awesome-flow/core/layout";
2769
- import { useCallback as useCallback21, useEffect as useEffect29, useState as useState24 } from "react";
2770
- import { useIncomingComputedData as useIncomingComputedData19, useUpdateNodeComputedData as useUpdateNodeComputedData29 } from "@awesome-flow/core/hooks";
2436
+ import { NodeContainer as NodeContainer31, NodeTrackConnections as NodeTrackConnections26 } from "@awesome-flow/core/layout";
2437
+ import { useCallback as useCallback20, useEffect as useEffect23, useState as useState19 } from "react";
2438
+ import { useIncomingComputedData as useIncomingComputedData17, useUpdateNodeComputedData as useUpdateNodeComputedData29 } from "@awesome-flow/core/hooks";
2771
2439
  import { Turbulence } from "libnoise-ts/module/transformer";
2772
- import { jsx as jsx38, jsxs as jsxs32 } from "react/jsx-runtime";
2440
+ import { NodePropertyVariables as NodePropertyVariables7 } from "@awesome-flow/core/components";
2441
+ import { jsx as jsx31, jsxs as jsxs27 } from "react/jsx-runtime";
2773
2442
  function NoiseTurbulenceNode({
2774
2443
  id,
2775
2444
  selected,
2776
2445
  data,
2777
2446
  type
2778
2447
  }) {
2779
- const [properties, setProperties] = useState24(null);
2780
- const incoming = useIncomingComputedData19(id);
2448
+ const [properties, setProperties] = useState19(null);
2449
+ const incoming = useIncomingComputedData17(id);
2781
2450
  const updateComputedData = useUpdateNodeComputedData29();
2782
- const onPropertiesChange = useCallback21((props) => {
2451
+ const onPropertiesChange = useCallback20((props) => {
2783
2452
  setProperties(props);
2784
2453
  }, []);
2785
- useEffect29(() => {
2786
- if (incoming?.length) {
2454
+ useEffect23(() => {
2455
+ if (incoming?.length && properties) {
2787
2456
  const module = new Turbulence(
2788
2457
  incoming[0].module,
2789
2458
  properties.frequency.value,
@@ -2793,15 +2462,1011 @@ function NoiseTurbulenceNode({
2793
2462
  );
2794
2463
  updateComputedData(id, { module });
2795
2464
  }
2796
- }, [id, incoming, properties, updateComputedData]);
2797
- return /* @__PURE__ */ jsxs32(NodeContainer35, { id, selected, data, type, children: [
2798
- /* @__PURE__ */ jsx38(node_property_variables_default, { data, nodeId: id, onPropertiesChange }),
2799
- /* @__PURE__ */ jsx38(NodeTrackConnections29, { handles: data.handles, nodeId: id, type: "target" })
2465
+ }, [id, incoming, properties]);
2466
+ return /* @__PURE__ */ jsxs27(NodeContainer31, { id, selected, data, type, children: [
2467
+ /* @__PURE__ */ jsx31(NodePropertyVariables7, { data, nodeId: id, onPropertiesChange }),
2468
+ /* @__PURE__ */ jsx31(NodeTrackConnections26, { handles: data.handles, nodeId: id, type: "target" })
2800
2469
  ] });
2801
2470
  }
2802
2471
  var noise_turbulence_node_default = NoiseTurbulenceNode;
2472
+
2473
+ // src/templates/generators/noise-checkerboard-template.ts
2474
+ import { Position } from "@xyflow/system";
2475
+ var NoiseCheckerboardNodeTemplateFactory = class {
2476
+ template = {
2477
+ type: "noise-checkerboard" /* noiseCheckerboard */,
2478
+ group: "Noise Generators" /* noiseGenerators */,
2479
+ data: {
2480
+ title: "Checkerboard Noise"
2481
+ },
2482
+ handles: [
2483
+ {
2484
+ position: Position.Right,
2485
+ dataType: "module" /* module */,
2486
+ connection: "source"
2487
+ }
2488
+ ]
2489
+ };
2490
+ };
2491
+
2492
+ // src/templates/generators/noise-const-template.ts
2493
+ import { Position as Position2 } from "@xyflow/system";
2494
+ var NoiseConstNodeTemplateFactory = class {
2495
+ template = {
2496
+ type: "noise-constant" /* noiseConst */,
2497
+ group: "Noise Generators" /* noiseGenerators */,
2498
+ data: {
2499
+ title: "Const Value Noise",
2500
+ noise: 0,
2501
+ min: -1,
2502
+ max: 1
2503
+ },
2504
+ handles: [
2505
+ {
2506
+ position: Position2.Right,
2507
+ dataType: "module" /* module */,
2508
+ connection: "source"
2509
+ }
2510
+ ]
2511
+ };
2512
+ };
2513
+
2514
+ // src/templates/generators/noise-cylinders-template.ts
2515
+ import { CoreHandleType } from "@awesome-flow/core/abstract";
2516
+ import { Position as Position3 } from "@xyflow/system";
2517
+ var NoiseCylindersNodeTemplateFactory = class {
2518
+ template = {
2519
+ type: "noise-cylinders" /* noiseCylinders */,
2520
+ group: "Noise Generators" /* noiseGenerators */,
2521
+ data: {
2522
+ title: "Cylinders Noise",
2523
+ frequency: 0.1
2524
+ },
2525
+ handles: [
2526
+ {
2527
+ position: Position3.Left,
2528
+ dataType: CoreHandleType.variableProperty,
2529
+ connection: "target"
2530
+ },
2531
+ {
2532
+ position: Position3.Right,
2533
+ dataType: "module" /* module */,
2534
+ connection: "source"
2535
+ }
2536
+ ]
2537
+ };
2538
+ };
2539
+
2540
+ // src/templates/generators/noise-perlin-template.ts
2541
+ import { CoreHandleType as CoreHandleType2 } from "@awesome-flow/core/abstract";
2542
+ import { Position as Position4 } from "@xyflow/system";
2543
+ var NoisePerlinNodeTemplateFactory = class {
2544
+ template = {
2545
+ type: "noise-perlin" /* noisePerlin */,
2546
+ group: "Noise Generators" /* noiseGenerators */,
2547
+ data: {
2548
+ title: "Perlin Noise",
2549
+ frequency: 0.1,
2550
+ lacunarity: 2,
2551
+ octaves: 5,
2552
+ persistence: 0.5,
2553
+ seed: 0
2554
+ },
2555
+ handles: [
2556
+ {
2557
+ position: Position4.Left,
2558
+ dataType: CoreHandleType2.variableProperty,
2559
+ connection: "target"
2560
+ },
2561
+ {
2562
+ position: Position4.Right,
2563
+ dataType: "module" /* module */,
2564
+ connection: "source"
2565
+ }
2566
+ ]
2567
+ };
2568
+ };
2569
+
2570
+ // src/templates/generators/noise-ridgedmulti-template.ts
2571
+ import { CoreHandleType as CoreHandleType3 } from "@awesome-flow/core/abstract";
2572
+ import { Position as Position5 } from "@xyflow/system";
2573
+ var NoiseRidgedMultiNodeTemplateFactory = class {
2574
+ template = {
2575
+ type: "noise-ridged-multi" /* noiseRidgedMulti */,
2576
+ group: "Noise Generators" /* noiseGenerators */,
2577
+ data: {
2578
+ title: "Ridged Multi Noise",
2579
+ frequency: 0.1,
2580
+ lacunarity: 2,
2581
+ octaves: 6,
2582
+ offset: 1,
2583
+ gain: 2,
2584
+ seed: 0
2585
+ },
2586
+ handles: [
2587
+ {
2588
+ position: Position5.Left,
2589
+ dataType: CoreHandleType3.variableProperty,
2590
+ connection: "target"
2591
+ },
2592
+ {
2593
+ position: Position5.Right,
2594
+ dataType: "module" /* module */,
2595
+ connection: "source"
2596
+ }
2597
+ ]
2598
+ };
2599
+ };
2600
+
2601
+ // src/templates/generators/noise-simplex-template.ts
2602
+ import {
2603
+ CoreHandleType as CoreHandleType4
2604
+ } from "@awesome-flow/core/abstract";
2605
+ import { Position as Position6 } from "@xyflow/system";
2606
+ var NoiseSimplexNodeTemplateFactory = class {
2607
+ template = {
2608
+ type: "noise-simplex" /* noiseSimplex */,
2609
+ group: "Noise Generators" /* noiseGenerators */,
2610
+ data: {
2611
+ title: "Simplex Noise"
2612
+ },
2613
+ handles: [
2614
+ {
2615
+ position: Position6.Left,
2616
+ dataType: CoreHandleType4.variableProperty,
2617
+ connection: "target"
2618
+ },
2619
+ {
2620
+ position: Position6.Right,
2621
+ dataType: "module" /* module */,
2622
+ connection: "source"
2623
+ }
2624
+ ]
2625
+ };
2626
+ };
2627
+
2628
+ // src/templates/generators/noise-spheres-template.ts
2629
+ import { CoreHandleType as CoreHandleType5 } from "@awesome-flow/core/abstract";
2630
+ import { Position as Position7 } from "@xyflow/system";
2631
+ var NoiseSpheresNodeTemplateFactory = class {
2632
+ template = {
2633
+ type: "noise-spheres" /* noiseSpheres */,
2634
+ group: "Noise Generators" /* noiseGenerators */,
2635
+ data: {
2636
+ title: "Spheres Noise",
2637
+ frequency: 0.1
2638
+ },
2639
+ handles: [
2640
+ {
2641
+ position: Position7.Left,
2642
+ dataType: CoreHandleType5.variableProperty,
2643
+ connection: "target"
2644
+ },
2645
+ {
2646
+ position: Position7.Right,
2647
+ dataType: "module" /* module */,
2648
+ connection: "source"
2649
+ }
2650
+ ]
2651
+ };
2652
+ };
2653
+
2654
+ // src/templates/generators/noise-voronoi-template.ts
2655
+ import { CoreHandleType as CoreHandleType6 } from "@awesome-flow/core/abstract";
2656
+ import { Position as Position8 } from "@xyflow/system";
2657
+ var NoiseVoronoiNodeTemplateFactory = class {
2658
+ template = {
2659
+ type: "noise-voronoi" /* noiseVoronoi */,
2660
+ group: "Noise Generators" /* noiseGenerators */,
2661
+ data: {
2662
+ title: "Voronoi Noise",
2663
+ frequency: 0.1,
2664
+ displacement: 1,
2665
+ distance: true,
2666
+ seed: 0
2667
+ },
2668
+ handles: [
2669
+ {
2670
+ position: Position8.Left,
2671
+ dataType: CoreHandleType6.variableProperty,
2672
+ connection: "target"
2673
+ },
2674
+ {
2675
+ position: Position8.Right,
2676
+ dataType: "module" /* module */,
2677
+ connection: "source"
2678
+ }
2679
+ ]
2680
+ };
2681
+ };
2682
+
2683
+ // src/templates/generators/position-const-template.ts
2684
+ import { Position as Position9 } from "@xyflow/system";
2685
+ var PositionConstNodeTemplateFactory = class {
2686
+ template = {
2687
+ type: "position" /* position */,
2688
+ group: "Positions" /* positions */,
2689
+ data: {
2690
+ title: "Position Output",
2691
+ position: { x: 0, y: 0, z: 0 }
2692
+ },
2693
+ handles: [
2694
+ {
2695
+ position: Position9.Right,
2696
+ dataType: "position" /* position */,
2697
+ connection: "source"
2698
+ }
2699
+ ]
2700
+ };
2701
+ };
2702
+
2703
+ // src/templates/generators/position-grid-template.ts
2704
+ import { Position as Position10 } from "@xyflow/system";
2705
+ var PositionGridNodeTemplateFactory = class {
2706
+ template = {
2707
+ type: "grid" /* grid */,
2708
+ group: "Positions" /* positions */,
2709
+ data: {
2710
+ title: "Grid Output",
2711
+ center: { x: 0, y: 0, z: 0 },
2712
+ radius: 1
2713
+ },
2714
+ handles: [
2715
+ {
2716
+ position: Position10.Right,
2717
+ dataType: "position" /* position */,
2718
+ connection: "source"
2719
+ }
2720
+ ]
2721
+ };
2722
+ };
2723
+
2724
+ // src/templates/modifiers/noise-normalize-template.ts
2725
+ import { IDGenerator } from "@awesome-flow/core/utils";
2726
+ import { Position as Position11 } from "@xyflow/system";
2727
+ var NoiseNormalizeNodeTemplateFactory = class {
2728
+ template = {
2729
+ id: IDGenerator.template(),
2730
+ type: "noise-normalize" /* noiseNormalize */,
2731
+ group: "Noise Modifiers" /* noiseModifiers */,
2732
+ data: {
2733
+ title: "Normalize Noise",
2734
+ intervalStart: -1,
2735
+ intervalEnd: 1
2736
+ },
2737
+ handles: [
2738
+ {
2739
+ position: Position11.Left,
2740
+ dataType: "module" /* module */,
2741
+ connection: "target",
2742
+ maxConnections: 1
2743
+ },
2744
+ {
2745
+ position: Position11.Right,
2746
+ dataType: "module" /* module */,
2747
+ connection: "source"
2748
+ }
2749
+ ]
2750
+ };
2751
+ };
2752
+
2753
+ // src/templates/output/noise-logger-template.ts
2754
+ import { Position as Position12 } from "@xyflow/system";
2755
+ var NoiseLoggerNodeTemplateFactory = class {
2756
+ template = {
2757
+ type: "noise-logger" /* noiseLogger */,
2758
+ group: "Output" /* output */,
2759
+ data: {
2760
+ title: "Noise Logger"
2761
+ },
2762
+ handles: [
2763
+ {
2764
+ position: Position12.Left,
2765
+ dataType: "noise" /* noise */,
2766
+ connection: "target"
2767
+ }
2768
+ ]
2769
+ };
2770
+ };
2771
+
2772
+ // src/templates/output/noise-raw-texture-template.ts
2773
+ import { Position as Position13 } from "@xyflow/system";
2774
+ var NoiseRawTextureTemplateFactory = class {
2775
+ template = {
2776
+ type: "texture-data" /* textureData */,
2777
+ group: "Output" /* output */,
2778
+ data: {
2779
+ title: "Texture Data"
2780
+ },
2781
+ handles: [
2782
+ {
2783
+ position: Position13.Left,
2784
+ dataType: "noise" /* noise */,
2785
+ connection: "target",
2786
+ maxConnections: 1
2787
+ },
2788
+ {
2789
+ position: Position13.Right,
2790
+ dataType: "texture" /* texture */,
2791
+ connection: "source"
2792
+ }
2793
+ ]
2794
+ };
2795
+ };
2796
+
2797
+ // src/templates/output/position-logger-template.ts
2798
+ import { Position as Position14 } from "@xyflow/system";
2799
+ var PositionLoggerNodeTemplateFactory = class {
2800
+ template = {
2801
+ type: "position-logger" /* positionLogger */,
2802
+ group: "Positions" /* positions */,
2803
+ data: {
2804
+ title: "Position Logger"
2805
+ },
2806
+ handles: [
2807
+ {
2808
+ position: Position14.Left,
2809
+ dataType: "position" /* position */,
2810
+ connection: "target"
2811
+ }
2812
+ ]
2813
+ };
2814
+ };
2815
+
2816
+ // src/templates/modifiers/noise-combine-template.ts
2817
+ import { Position as Position15 } from "@xyflow/system";
2818
+ var NoiseCombineNodeTemplateFactory = class {
2819
+ template = {
2820
+ type: "noise-combiner" /* noiseCombine */,
2821
+ group: "Noise Modifiers" /* noiseModifiers */,
2822
+ data: {
2823
+ title: "Combine Noise",
2824
+ operation: "add" /* add */
2825
+ },
2826
+ handles: [
2827
+ {
2828
+ position: Position15.Left,
2829
+ dataType: "module" /* module */,
2830
+ connection: "target",
2831
+ maxConnections: 2
2832
+ },
2833
+ {
2834
+ position: Position15.Right,
2835
+ dataType: "module" /* module */,
2836
+ connection: "source"
2837
+ }
2838
+ ]
2839
+ };
2840
+ };
2841
+
2842
+ // src/templates/modifiers/noise-clamp-template.ts
2843
+ import { Position as Position16 } from "@xyflow/system";
2844
+ var NoiseClampNodeTemplateFactory = class {
2845
+ template = {
2846
+ type: "noise-clamp" /* noiseClamp */,
2847
+ group: "Noise Modifiers" /* noiseModifiers */,
2848
+ data: {
2849
+ title: "Clamp Noise",
2850
+ lowerBound: -1,
2851
+ upperBound: 1
2852
+ },
2853
+ handles: [
2854
+ {
2855
+ position: Position16.Left,
2856
+ dataType: "module" /* module */,
2857
+ connection: "target",
2858
+ maxConnections: 1
2859
+ },
2860
+ {
2861
+ position: Position16.Right,
2862
+ dataType: "module" /* module */,
2863
+ connection: "source"
2864
+ }
2865
+ ]
2866
+ };
2867
+ };
2868
+
2869
+ // src/templates/modifiers/noise-abs-template.ts
2870
+ import { Position as Position17 } from "@xyflow/system";
2871
+ var NoiseAbsNodeTemplateFactory = class {
2872
+ template = {
2873
+ type: "noise-abs" /* noiseAbs */,
2874
+ group: "Noise Modifiers" /* noiseModifiers */,
2875
+ data: {
2876
+ title: "Abs Noise"
2877
+ },
2878
+ handles: [
2879
+ {
2880
+ position: Position17.Left,
2881
+ dataType: "module" /* module */,
2882
+ connection: "target",
2883
+ maxConnections: 1
2884
+ },
2885
+ {
2886
+ position: Position17.Right,
2887
+ dataType: "module" /* module */,
2888
+ connection: "source"
2889
+ }
2890
+ ]
2891
+ };
2892
+ };
2893
+
2894
+ // src/templates/output/noise-output-template.ts
2895
+ import { Position as Position18 } from "@xyflow/system";
2896
+ var NoiseOutputNodeTemplateFactory = class {
2897
+ template = {
2898
+ type: "noise-output" /* noiseOutput */,
2899
+ group: "Output" /* output */,
2900
+ data: {
2901
+ title: "Noise Output"
2902
+ },
2903
+ handles: [
2904
+ {
2905
+ position: Position18.Left,
2906
+ dataType: "position" /* position */,
2907
+ connection: "target"
2908
+ },
2909
+ {
2910
+ position: Position18.Left,
2911
+ dataType: "module" /* module */,
2912
+ connection: "target",
2913
+ maxConnections: 1
2914
+ },
2915
+ {
2916
+ position: Position18.Right,
2917
+ dataType: "noise" /* noise */,
2918
+ connection: "source"
2919
+ }
2920
+ ]
2921
+ };
2922
+ };
2923
+
2924
+ // src/templates/modifiers/noise-curve-template.ts
2925
+ import { CoreHandleType as CoreHandleType7 } from "@awesome-flow/core/abstract";
2926
+ import { Position as Position19 } from "@xyflow/system";
2927
+ var NoiseCurveNodeTemplateFactory = class {
2928
+ template = {
2929
+ type: "noise-curve" /* noiseCurve */,
2930
+ group: "Noise Modifiers" /* noiseModifiers */,
2931
+ data: {
2932
+ title: "Noise Curve",
2933
+ points: []
2934
+ },
2935
+ handles: [
2936
+ {
2937
+ position: Position19.Left,
2938
+ dataType: "module" /* module */,
2939
+ connection: "target",
2940
+ maxConnections: 1
2941
+ },
2942
+ {
2943
+ position: Position19.Left,
2944
+ dataType: CoreHandleType7.variableProperty,
2945
+ connection: "target"
2946
+ },
2947
+ {
2948
+ position: Position19.Right,
2949
+ dataType: "module" /* module */,
2950
+ connection: "source"
2951
+ }
2952
+ ]
2953
+ };
2954
+ };
2955
+
2956
+ // src/templates/modifiers/noise-exponent-template.ts
2957
+ import { Position as Position20 } from "@xyflow/system";
2958
+ var NoiseExponentNodeTemplateFactory = class {
2959
+ template = {
2960
+ type: "noise-exponent" /* noiseExponent */,
2961
+ group: "Noise Modifiers" /* noiseModifiers */,
2962
+ data: {
2963
+ title: "Noise Exponent",
2964
+ exponent: 1
2965
+ },
2966
+ handles: [
2967
+ {
2968
+ position: Position20.Left,
2969
+ dataType: "module" /* module */,
2970
+ connection: "target",
2971
+ maxConnections: 1
2972
+ },
2973
+ {
2974
+ position: Position20.Right,
2975
+ dataType: "module" /* module */,
2976
+ connection: "source"
2977
+ }
2978
+ ]
2979
+ };
2980
+ };
2981
+
2982
+ // src/templates/modifiers/noise-invert-template.ts
2983
+ import { Position as Position21 } from "@xyflow/system";
2984
+ var NoiseInvertNodeTemplateFactory = class {
2985
+ template = {
2986
+ type: "noise-invert" /* noiseInvert */,
2987
+ group: "Noise Modifiers" /* noiseModifiers */,
2988
+ data: {
2989
+ title: "Invert Noise"
2990
+ },
2991
+ handles: [
2992
+ {
2993
+ position: Position21.Left,
2994
+ dataType: "module" /* module */,
2995
+ connection: "target",
2996
+ maxConnections: 1
2997
+ },
2998
+ {
2999
+ position: Position21.Right,
3000
+ dataType: "module" /* module */,
3001
+ connection: "source"
3002
+ }
3003
+ ]
3004
+ };
3005
+ };
3006
+
3007
+ // src/templates/modifiers/noise-scalebias-template.ts
3008
+ import { Position as Position22 } from "@xyflow/system";
3009
+ var NoiseScaleBiasNodeTemplateFactory = class {
3010
+ template = {
3011
+ type: "noise-scale-bias" /* noiseScaleBias */,
3012
+ group: "Noise Modifiers" /* noiseModifiers */,
3013
+ data: {
3014
+ title: "Scale/Bias Noise",
3015
+ scale: 1,
3016
+ bias: 0
3017
+ },
3018
+ handles: [
3019
+ {
3020
+ position: Position22.Left,
3021
+ dataType: "module" /* module */,
3022
+ connection: "target",
3023
+ maxConnections: 1
3024
+ },
3025
+ {
3026
+ position: Position22.Right,
3027
+ dataType: "module" /* module */,
3028
+ connection: "source"
3029
+ }
3030
+ ]
3031
+ };
3032
+ };
3033
+
3034
+ // src/templates/modifiers/noise-terrace-template.ts
3035
+ import { Position as Position23 } from "@xyflow/system";
3036
+ var NoiseTerraceNodeTemplateFactory = class {
3037
+ template = {
3038
+ type: "noise-terrace" /* noiseTerrace */,
3039
+ group: "Noise Modifiers" /* noiseModifiers */,
3040
+ data: {
3041
+ title: "Noise Terrace",
3042
+ points: []
3043
+ },
3044
+ handles: [
3045
+ {
3046
+ position: Position23.Left,
3047
+ dataType: "module" /* module */,
3048
+ connection: "target",
3049
+ maxConnections: 1
3050
+ },
3051
+ {
3052
+ position: Position23.Right,
3053
+ dataType: "module" /* module */,
3054
+ connection: "source"
3055
+ }
3056
+ ]
3057
+ };
3058
+ };
3059
+
3060
+ // src/templates/selectors/noise-blend-template.ts
3061
+ import { Position as Position24 } from "@xyflow/system";
3062
+ var NoiseBlendNodeTemplateFactory = class {
3063
+ template = {
3064
+ type: "noise-blend" /* noiseBlend */,
3065
+ group: "Noise Selectors" /* noiseSelectors */,
3066
+ data: {
3067
+ title: "Noise Blend"
3068
+ },
3069
+ handles: [
3070
+ {
3071
+ position: Position24.Left,
3072
+ dataType: "module" /* module */,
3073
+ connection: "target",
3074
+ label: "Source Modules",
3075
+ dataId: "source" /* source */,
3076
+ maxConnections: 2,
3077
+ minConnections: 2
3078
+ },
3079
+ {
3080
+ position: Position24.Left,
3081
+ dataType: "module" /* module */,
3082
+ dataId: "control" /* control */,
3083
+ connection: "target",
3084
+ label: "Control Module",
3085
+ maxConnections: 1
3086
+ },
3087
+ {
3088
+ position: Position24.Right,
3089
+ dataType: "module" /* module */,
3090
+ dataId: "output" /* output */,
3091
+ connection: "source"
3092
+ }
3093
+ ]
3094
+ };
3095
+ };
3096
+
3097
+ // src/templates/selectors/noise-select-template.ts
3098
+ import { Position as Position25 } from "@xyflow/system";
3099
+ var NoiseSelectNodeTemplateFactory = class {
3100
+ template = {
3101
+ type: "noise-select" /* noiseSelect */,
3102
+ group: "Noise Selectors" /* noiseSelectors */,
3103
+ data: {
3104
+ title: "Noise Select",
3105
+ edgeFalloff: 0,
3106
+ lowerBound: -1,
3107
+ upperBound: 1
3108
+ },
3109
+ handles: [
3110
+ {
3111
+ position: Position25.Left,
3112
+ dataType: "module" /* module */,
3113
+ dataId: "source" /* source */,
3114
+ connection: "target",
3115
+ label: "Source Modules",
3116
+ maxConnections: 2,
3117
+ minConnections: 2
3118
+ },
3119
+ {
3120
+ position: Position25.Left,
3121
+ dataType: "module" /* module */,
3122
+ dataId: "control" /* control */,
3123
+ connection: "target",
3124
+ label: "Control Module",
3125
+ maxConnections: 1
3126
+ },
3127
+ {
3128
+ position: Position25.Right,
3129
+ dataType: "module" /* module */,
3130
+ dataId: "output" /* output */,
3131
+ connection: "source"
3132
+ }
3133
+ ]
3134
+ };
3135
+ };
3136
+
3137
+ // src/templates/transformers/noise-displace-template.ts
3138
+ import { Position as Position26 } from "@xyflow/system";
3139
+ var NoiseDisplaceNodeTemplateFactory = class {
3140
+ template = {
3141
+ type: "noise-displace" /* noiseDisplace */,
3142
+ group: "Noise Transformers" /* noiseTransformers */,
3143
+ data: {
3144
+ title: "Noise Displace"
3145
+ },
3146
+ handles: [
3147
+ {
3148
+ position: Position26.Left,
3149
+ connection: "target",
3150
+ label: "Source Module",
3151
+ dataType: "module" /* module */,
3152
+ dataId: "source" /* sourceModule */,
3153
+ maxConnections: 1
3154
+ },
3155
+ {
3156
+ position: Position26.Left,
3157
+ connection: "target",
3158
+ label: "X Module",
3159
+ dataType: "module" /* module */,
3160
+ dataId: "x-module" /* xModule */,
3161
+ maxConnections: 1
3162
+ },
3163
+ {
3164
+ position: Position26.Left,
3165
+ connection: "target",
3166
+ label: "Y Module",
3167
+ dataType: "module" /* module */,
3168
+ dataId: "y-module" /* yModule */,
3169
+ maxConnections: 1
3170
+ },
3171
+ {
3172
+ position: Position26.Left,
3173
+ connection: "target",
3174
+ label: "Z Module",
3175
+ dataType: "module" /* module */,
3176
+ dataId: "z-module" /* zModule */,
3177
+ maxConnections: 1
3178
+ },
3179
+ {
3180
+ position: Position26.Right,
3181
+ dataType: "module" /* module */,
3182
+ dataId: "output" /* output */,
3183
+ connection: "source"
3184
+ }
3185
+ ]
3186
+ };
3187
+ };
3188
+
3189
+ // src/templates/transformers/noise-rotate-point-template.ts
3190
+ import { Position as Position27 } from "@xyflow/system";
3191
+ var NoiseRotatePointNodeTemplateFactory = class {
3192
+ template = {
3193
+ type: "noise-rotate-point" /* noiseRotatePoint */,
3194
+ group: "Noise Transformers" /* noiseTransformers */,
3195
+ data: {
3196
+ title: "Noise Rotate Point",
3197
+ xAngle: 0,
3198
+ yAngle: 0,
3199
+ zAngle: 0
3200
+ },
3201
+ handles: [
3202
+ {
3203
+ position: Position27.Left,
3204
+ dataType: "module" /* module */,
3205
+ connection: "target",
3206
+ label: "Source Module",
3207
+ maxConnections: 1
3208
+ },
3209
+ {
3210
+ position: Position27.Right,
3211
+ dataType: "module" /* module */,
3212
+ connection: "source"
3213
+ }
3214
+ ]
3215
+ };
3216
+ };
3217
+
3218
+ // src/templates/transformers/noise-scale-point-template.ts
3219
+ import { Position as Position28 } from "@xyflow/system";
3220
+ var NoiseScalePointNodeTemplateFactory = class {
3221
+ template = {
3222
+ type: "noise-scale-point" /* noiseScalePoint */,
3223
+ group: "Noise Transformers" /* noiseTransformers */,
3224
+ data: {
3225
+ title: "Noise Scale Point",
3226
+ xScale: 1,
3227
+ yScale: 1,
3228
+ zScale: 1
3229
+ },
3230
+ handles: [
3231
+ {
3232
+ position: Position28.Left,
3233
+ dataType: "module" /* module */,
3234
+ connection: "target",
3235
+ label: "Source Module",
3236
+ maxConnections: 1
3237
+ },
3238
+ {
3239
+ position: Position28.Right,
3240
+ dataType: "module" /* module */,
3241
+ connection: "source"
3242
+ }
3243
+ ]
3244
+ };
3245
+ };
3246
+
3247
+ // src/templates/transformers/noise-translate-point-template.ts
3248
+ import { Position as Position29 } from "@xyflow/system";
3249
+ var NoiseTranslatePointNodeTemplateFactory = class {
3250
+ template = {
3251
+ type: "noise-translate-point" /* noiseTranslatePoint */,
3252
+ group: "Noise Transformers" /* noiseTransformers */,
3253
+ data: {
3254
+ title: "Noise Translate Point",
3255
+ translateX: 0,
3256
+ translateY: 0,
3257
+ translateZ: 0
3258
+ },
3259
+ handles: [
3260
+ {
3261
+ position: Position29.Left,
3262
+ dataType: "module" /* module */,
3263
+ connection: "target",
3264
+ label: "Source Module",
3265
+ maxConnections: 1
3266
+ },
3267
+ {
3268
+ position: Position29.Right,
3269
+ dataType: "module" /* module */,
3270
+ connection: "source"
3271
+ }
3272
+ ]
3273
+ };
3274
+ };
3275
+
3276
+ // src/templates/transformers/noise-turbulence-template.ts
3277
+ import { CoreHandleType as CoreHandleType8 } from "@awesome-flow/core/abstract";
3278
+ import { Position as Position30 } from "@xyflow/system";
3279
+ var NoiseTurbulenceNodeTemplateFactory = class {
3280
+ template = {
3281
+ type: "noise-turbulence" /* noiseTurbulence */,
3282
+ group: "Noise Transformers" /* noiseTransformers */,
3283
+ data: {
3284
+ title: "Noise Turbulence",
3285
+ frequency: 1,
3286
+ power: 1,
3287
+ roughness: 1,
3288
+ seed: 0
3289
+ },
3290
+ handles: [
3291
+ {
3292
+ position: Position30.Left,
3293
+ dataType: "module" /* module */,
3294
+ connection: "target",
3295
+ label: "Source Module",
3296
+ maxConnections: 1
3297
+ },
3298
+ {
3299
+ position: Position30.Left,
3300
+ dataType: CoreHandleType8.variableProperty,
3301
+ label: "Variable Properties",
3302
+ connection: "target"
3303
+ },
3304
+ {
3305
+ position: Position30.Right,
3306
+ dataType: "module" /* module */,
3307
+ connection: "source"
3308
+ }
3309
+ ]
3310
+ };
3311
+ };
3312
+
3313
+ // src/templates/generators/noise-billow-template.ts
3314
+ import { CoreHandleType as CoreHandleType9 } from "@awesome-flow/core/abstract";
3315
+ import { IDGenerator as IDGenerator2 } from "@awesome-flow/core/utils";
3316
+ import { Position as Position31 } from "@xyflow/system";
3317
+ var NoiseBillowNodeTemplateFactory = class {
3318
+ template = {
3319
+ id: IDGenerator2.template(),
3320
+ type: "noise-billow" /* noiseBillow */,
3321
+ group: "Noise Generators" /* noiseGenerators */,
3322
+ data: {
3323
+ title: "Billow Noise",
3324
+ frequency: 0.1,
3325
+ lacunarity: 2,
3326
+ octaves: 5,
3327
+ persistence: 0.5,
3328
+ seed: 0
3329
+ },
3330
+ handles: [
3331
+ {
3332
+ position: Position31.Left,
3333
+ dataType: CoreHandleType9.variableProperty,
3334
+ connection: "target"
3335
+ },
3336
+ {
3337
+ position: Position31.Right,
3338
+ dataType: "module" /* module */,
3339
+ connection: "source"
3340
+ }
3341
+ ]
3342
+ };
3343
+ };
3344
+
3345
+ // src/templates/groups/module-group-template.ts
3346
+ import {
3347
+ CoreTemplateGroup
3348
+ } from "@awesome-flow/core/abstract";
3349
+ import { IDGenerator as IDGenerator3 } from "@awesome-flow/core/utils";
3350
+ import { Position as Position32 } from "@xyflow/system";
3351
+ var ModuleGroupNodeTemplateFactory = class {
3352
+ template = {
3353
+ id: IDGenerator3.template(),
3354
+ type: "group-module" /* groupModule */,
3355
+ group: CoreTemplateGroup.groups,
3356
+ data: {
3357
+ title: "Modules Group",
3358
+ isGroup: true,
3359
+ initialSize: {
3360
+ width: 300,
3361
+ height: 200
3362
+ },
3363
+ collapsedSize: {
3364
+ width: 300,
3365
+ height: 80
3366
+ }
3367
+ },
3368
+ handles: [
3369
+ {
3370
+ position: Position32.Bottom,
3371
+ dataType: "module" /* module */,
3372
+ connection: "target",
3373
+ maxConnections: 1,
3374
+ hideOnCollapse: true
3375
+ },
3376
+ {
3377
+ position: Position32.Right,
3378
+ dataType: "module" /* module */,
3379
+ connection: "source"
3380
+ }
3381
+ ]
3382
+ };
3383
+ };
3384
+
3385
+ // src/abstract/node-types.ts
3386
+ var noiseNodeTemplates = {
3387
+ ["noise-output" /* noiseOutput */]: new NoiseOutputNodeTemplateFactory(),
3388
+ ["noise-simplex" /* noiseSimplex */]: new NoiseSimplexNodeTemplateFactory(),
3389
+ ["noise-billow" /* noiseBillow */]: new NoiseBillowNodeTemplateFactory(),
3390
+ ["noise-checkerboard" /* noiseCheckerboard */]: new NoiseCheckerboardNodeTemplateFactory(),
3391
+ ["noise-normalize" /* noiseNormalize */]: new NoiseNormalizeNodeTemplateFactory(),
3392
+ ["noise-logger" /* noiseLogger */]: new NoiseLoggerNodeTemplateFactory(),
3393
+ ["noise-constant" /* noiseConst */]: new NoiseConstNodeTemplateFactory(),
3394
+ ["position" /* position */]: new PositionConstNodeTemplateFactory(),
3395
+ ["position-logger" /* positionLogger */]: new PositionLoggerNodeTemplateFactory(),
3396
+ ["grid" /* grid */]: new PositionGridNodeTemplateFactory(),
3397
+ ["texture-data" /* textureData */]: new NoiseRawTextureTemplateFactory(),
3398
+ ["noise-cylinders" /* noiseCylinders */]: new NoiseCylindersNodeTemplateFactory(),
3399
+ ["noise-perlin" /* noisePerlin */]: new NoisePerlinNodeTemplateFactory(),
3400
+ ["noise-ridged-multi" /* noiseRidgedMulti */]: new NoiseRidgedMultiNodeTemplateFactory(),
3401
+ ["noise-spheres" /* noiseSpheres */]: new NoiseSpheresNodeTemplateFactory(),
3402
+ ["noise-voronoi" /* noiseVoronoi */]: new NoiseVoronoiNodeTemplateFactory(),
3403
+ ["noise-combiner" /* noiseCombine */]: new NoiseCombineNodeTemplateFactory(),
3404
+ ["noise-clamp" /* noiseClamp */]: new NoiseClampNodeTemplateFactory(),
3405
+ ["noise-abs" /* noiseAbs */]: new NoiseAbsNodeTemplateFactory(),
3406
+ ["noise-curve" /* noiseCurve */]: new NoiseCurveNodeTemplateFactory(),
3407
+ ["noise-exponent" /* noiseExponent */]: new NoiseExponentNodeTemplateFactory(),
3408
+ ["noise-invert" /* noiseInvert */]: new NoiseInvertNodeTemplateFactory(),
3409
+ ["noise-scale-bias" /* noiseScaleBias */]: new NoiseScaleBiasNodeTemplateFactory(),
3410
+ ["noise-terrace" /* noiseTerrace */]: new NoiseTerraceNodeTemplateFactory(),
3411
+ ["noise-blend" /* noiseBlend */]: new NoiseBlendNodeTemplateFactory(),
3412
+ ["noise-select" /* noiseSelect */]: new NoiseSelectNodeTemplateFactory(),
3413
+ ["noise-displace" /* noiseDisplace */]: new NoiseDisplaceNodeTemplateFactory(),
3414
+ ["noise-rotate-point" /* noiseRotatePoint */]: new NoiseRotatePointNodeTemplateFactory(),
3415
+ ["noise-scale-point" /* noiseScalePoint */]: new NoiseScalePointNodeTemplateFactory(),
3416
+ ["noise-translate-point" /* noiseTranslatePoint */]: new NoiseTranslatePointNodeTemplateFactory(),
3417
+ ["noise-turbulence" /* noiseTurbulence */]: new NoiseTurbulenceNodeTemplateFactory(),
3418
+ ["group-module" /* groupModule */]: new ModuleGroupNodeTemplateFactory()
3419
+ };
3420
+
3421
+ // src/nodes/output/noise-output-node.tsx
3422
+ import { jsx as jsx32, jsxs as jsxs28 } from "react/jsx-runtime";
3423
+ function NoiseOutputNode({ id, selected, data, type }) {
3424
+ const [size, setSize] = useState20(0);
3425
+ const updateComputedData = useUpdateNodeComputedData30();
3426
+ const onDataUpdated = useCallback21(
3427
+ (handleData) => {
3428
+ const incomingPositions = handleData["position" /* position */];
3429
+ const incomingModule = handleData["module" /* module */];
3430
+ if (incomingPositions?.length && incomingModule?.length && incomingModule[0]?.module) {
3431
+ const { module } = incomingModule[0];
3432
+ const noise = [];
3433
+ for (const input of incomingPositions) {
3434
+ for (const position of input.positions) {
3435
+ const value = module.getValue(position.x, position.y, position.z);
3436
+ noise.push({
3437
+ position,
3438
+ value
3439
+ });
3440
+ }
3441
+ }
3442
+ updateComputedData(id, { noise, module });
3443
+ setSize(noise.length);
3444
+ }
3445
+ },
3446
+ []
3447
+ );
3448
+ return /* @__PURE__ */ jsxs28(NodeContainer32, { id, selected, data, type, children: [
3449
+ /* @__PURE__ */ jsx32(
3450
+ HandlesIncomingDataStatus4,
3451
+ {
3452
+ nodeId: id,
3453
+ handles: data.handles,
3454
+ handleKey: "dataType",
3455
+ onDataUpdated,
3456
+ type: "target",
3457
+ resetComputedData: true
3458
+ }
3459
+ ),
3460
+ /* @__PURE__ */ jsxs28(Text3, { mt: 5, children: [
3461
+ "Noise points: ",
3462
+ size
3463
+ ] }),
3464
+ /* @__PURE__ */ jsx32(NodeTrackConnections27, { handles: data.handles, nodeId: id, type: "target" })
3465
+ ] });
3466
+ }
3467
+ var noise_output_node_default = NoiseOutputNode;
2803
3468
  export {
2804
- node_module_group_default as ModuleGroupNode,
3469
+ module_group_node_default as ModuleGroupNode,
2805
3470
  noise_abs_node_default as NoiseAbsNode,
2806
3471
  noise_billow_node_default as NoiseBillowNode,
2807
3472
  noise_blend_node_default as NoiseBlendNode,
@@ -2832,9 +3497,6 @@ export {
2832
3497
  noise_voronoi_node_default as NoiseVoronoiNode,
2833
3498
  position_const_node_default as PositionConstNode,
2834
3499
  position_grid_node_default as PositionGridNode,
2835
- positions_logger_node_default as PositionsLoggerNode,
2836
- variable_combine_node_default as VariableCombineNode,
2837
- variable_property_node_default as VariablePropertyNode,
2838
- variable_value_node_default as VariableValueNode
3500
+ positions_logger_node_default as PositionsLoggerNode
2839
3501
  };
2840
3502
  //# sourceMappingURL=index.js.map