@awesome-flow/noise 0.9.1 → 0.9.2

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 (49) hide show
  1. package/dist/abstract/index.cjs +6 -6
  2. package/dist/abstract/index.d.cts +2 -2
  3. package/dist/abstract/index.d.ts +2 -2
  4. package/dist/abstract/index.js +5 -5
  5. package/dist/{chunk-D5QJ3563.cjs → chunk-36USJJC4.cjs} +52 -117
  6. package/dist/{chunk-76MMGOOY.cjs → chunk-DQE5NXY7.cjs} +84 -181
  7. package/dist/{chunk-4YL2V7SE.js → chunk-FMJZTXJQ.js} +75 -140
  8. package/dist/{chunk-O5DVJAMK.cjs → chunk-LKDSXT7I.cjs} +66 -144
  9. package/dist/{chunk-L45ZU7VL.js → chunk-M26CSOHC.js} +109 -206
  10. package/dist/{chunk-S2ZGHJ75.js → chunk-NUA3VGOA.js} +99 -177
  11. package/dist/{chunk-MIYOMNAG.cjs → chunk-OLJKWO2H.cjs} +77 -129
  12. package/dist/{chunk-EHBNVDTI.js → chunk-R6TU3SBX.js} +7 -18
  13. package/dist/{chunk-BE4RLT5P.js → chunk-W4T6Q7A5.js} +75 -127
  14. package/dist/{chunk-X2GXADE5.cjs → chunk-XC7VF5YC.cjs} +7 -18
  15. package/dist/{index-EzT2GjIx.d.cts → index-BZr1EROK.d.cts} +1 -1
  16. package/dist/{index-DAAmYCPU.d.ts → index-DzD3jbPF.d.ts} +1 -1
  17. package/dist/nodes/generators/index.cjs +2 -2
  18. package/dist/nodes/generators/index.js +1 -1
  19. package/dist/nodes/groups/index.cjs +2 -2
  20. package/dist/nodes/groups/index.js +1 -1
  21. package/dist/nodes/index.cjs +6 -6
  22. package/dist/nodes/index.js +5 -5
  23. package/dist/nodes/modifiers/index.cjs +2 -2
  24. package/dist/nodes/modifiers/index.js +1 -1
  25. package/dist/nodes/output/index.cjs +6 -6
  26. package/dist/nodes/output/index.js +5 -5
  27. package/dist/nodes/selectors/index.cjs +6 -6
  28. package/dist/nodes/selectors/index.js +5 -5
  29. package/dist/nodes/transformers/index.cjs +2 -2
  30. package/dist/nodes/transformers/index.js +1 -1
  31. package/dist/templates/generators/index.cjs +6 -6
  32. package/dist/templates/generators/index.js +5 -5
  33. package/dist/templates/groups/index.cjs +6 -6
  34. package/dist/templates/groups/index.js +5 -5
  35. package/dist/templates/index.cjs +6 -6
  36. package/dist/templates/index.d.cts +1 -1
  37. package/dist/templates/index.d.ts +1 -1
  38. package/dist/templates/index.js +5 -5
  39. package/dist/templates/modifiers/index.cjs +6 -6
  40. package/dist/templates/modifiers/index.js +5 -5
  41. package/dist/templates/output/index.cjs +6 -6
  42. package/dist/templates/output/index.js +5 -5
  43. package/dist/templates/selectors/index.cjs +6 -6
  44. package/dist/templates/selectors/index.js +5 -5
  45. package/dist/templates/transformers/index.cjs +6 -6
  46. package/dist/templates/transformers/index.d.cts +1 -1
  47. package/dist/templates/transformers/index.d.ts +1 -1
  48. package/dist/templates/transformers/index.js +5 -5
  49. package/package.json +10 -10
@@ -5,12 +5,12 @@ import {
5
5
  // src/nodes/modifiers/noise-abs-node.tsx
6
6
  import { c as _c } from "react/compiler-runtime";
7
7
  import { useIncomingComputedData, useUpdateNodeComputedData } from "@awesome-flow/core/hooks";
8
- import { NodeContainer, NodeTrackConnections } from "@awesome-flow/core/layout";
8
+ import { NodeContainer } from "@awesome-flow/core/layout";
9
9
  import { Abs } from "libnoise-simplex-ts";
10
10
  import { useEffect } from "react";
11
11
  import { jsx } from "react/jsx-runtime";
12
12
  function NoiseAbsNode(t0) {
13
- const $ = _c(14);
13
+ const $ = _c(10);
14
14
  const {
15
15
  id,
16
16
  selected,
@@ -42,40 +42,30 @@ function NoiseAbsNode(t0) {
42
42
  }
43
43
  useEffect(t1, t2);
44
44
  let t3;
45
- if ($[5] !== data.handles || $[6] !== id) {
46
- t3 = /* @__PURE__ */ jsx(NodeTrackConnections, { handles: data.handles, nodeId: id, type: "target" });
47
- $[5] = data.handles;
45
+ if ($[5] !== data || $[6] !== id || $[7] !== selected || $[8] !== type) {
46
+ t3 = /* @__PURE__ */ jsx(NodeContainer, { id, selected, data, type });
47
+ $[5] = data;
48
48
  $[6] = id;
49
- $[7] = t3;
49
+ $[7] = selected;
50
+ $[8] = type;
51
+ $[9] = t3;
50
52
  } else {
51
- t3 = $[7];
53
+ t3 = $[9];
52
54
  }
53
- let t4;
54
- if ($[8] !== data || $[9] !== id || $[10] !== selected || $[11] !== t3 || $[12] !== type) {
55
- t4 = /* @__PURE__ */ jsx(NodeContainer, { id, selected, data, type, children: t3 });
56
- $[8] = data;
57
- $[9] = id;
58
- $[10] = selected;
59
- $[11] = t3;
60
- $[12] = type;
61
- $[13] = t4;
62
- } else {
63
- t4 = $[13];
64
- }
65
- return t4;
55
+ return t3;
66
56
  }
67
57
  var noise_abs_node_default = NoiseAbsNode;
68
58
 
69
59
  // src/nodes/modifiers/noise-clamp-node.tsx
70
60
  import { c as _c2 } from "react/compiler-runtime";
71
61
  import { useIncomingComputedData as useIncomingComputedData2, useUpdateNodeComputedData as useUpdateNodeComputedData2, useUpdateNodeData } from "@awesome-flow/core/hooks";
72
- import { NodeContainer as NodeContainer2, NodeTrackConnections as NodeTrackConnections2 } from "@awesome-flow/core/layout";
62
+ import { NodeContainer as NodeContainer2 } from "@awesome-flow/core/layout";
73
63
  import { Group, NumberInput, Stack } from "@mantine/core";
74
64
  import { Clamp } from "libnoise-simplex-ts";
75
65
  import { useEffect as useEffect2, useState } from "react";
76
66
  import { jsx as jsx2, jsxs } from "react/jsx-runtime";
77
67
  function NoiseClampNode(t0) {
78
- const $ = _c2(27);
68
+ const $ = _c2(23);
79
69
  const {
80
70
  id,
81
71
  selected,
@@ -159,38 +149,25 @@ function NoiseClampNode(t0) {
159
149
  t7 = $[16];
160
150
  }
161
151
  let t8;
162
- if ($[17] !== data.handles || $[18] !== id) {
163
- t8 = /* @__PURE__ */ jsx2(NodeTrackConnections2, { handles: data.handles, nodeId: id, type: "target" });
164
- $[17] = data.handles;
152
+ if ($[17] !== data || $[18] !== id || $[19] !== selected || $[20] !== t7 || $[21] !== type) {
153
+ t8 = /* @__PURE__ */ jsx2(NodeContainer2, { id, selected, data, type, children: t7 });
154
+ $[17] = data;
165
155
  $[18] = id;
166
- $[19] = t8;
156
+ $[19] = selected;
157
+ $[20] = t7;
158
+ $[21] = type;
159
+ $[22] = t8;
167
160
  } else {
168
- t8 = $[19];
161
+ t8 = $[22];
169
162
  }
170
- let t9;
171
- if ($[20] !== data || $[21] !== id || $[22] !== selected || $[23] !== t7 || $[24] !== t8 || $[25] !== type) {
172
- t9 = /* @__PURE__ */ jsxs(NodeContainer2, { id, selected, data, type, children: [
173
- t7,
174
- t8
175
- ] });
176
- $[20] = data;
177
- $[21] = id;
178
- $[22] = selected;
179
- $[23] = t7;
180
- $[24] = t8;
181
- $[25] = type;
182
- $[26] = t9;
183
- } else {
184
- t9 = $[26];
185
- }
186
- return t9;
163
+ return t8;
187
164
  }
188
165
  var noise_clamp_node_default = NoiseClampNode;
189
166
 
190
167
  // src/nodes/modifiers/noise-combine-node.tsx
191
168
  import { c as _c3 } from "react/compiler-runtime";
192
169
  import { useIncomingComputedData as useIncomingComputedData3, useUpdateNodeComputedData as useUpdateNodeComputedData3, useUpdateNodeData as useUpdateNodeData2 } from "@awesome-flow/core/hooks";
193
- import { NodeCombobox, NodeContainer as NodeContainer3, NodeTrackConnections as NodeTrackConnections3 } from "@awesome-flow/core/layout";
170
+ import { NodeCombobox, NodeContainer as NodeContainer3 } from "@awesome-flow/core/layout";
194
171
  import { IconAsterisk, IconChevronLeft, IconChevronRight, IconChevronUp, IconPlus } from "@tabler/icons-react";
195
172
  import { useEffect as useEffect3 } from "react";
196
173
 
@@ -213,7 +190,7 @@ var noiseCombineModuleMap = {
213
190
  };
214
191
 
215
192
  // src/nodes/modifiers/noise-combine-node.tsx
216
- import { jsx as jsx3, jsxs as jsxs2 } from "react/jsx-runtime";
193
+ import { jsx as jsx3 } from "react/jsx-runtime";
217
194
  var options = {
218
195
  add: /* @__PURE__ */ jsx3(IconPlus, {}),
219
196
  min: /* @__PURE__ */ jsx3(IconChevronLeft, {}),
@@ -222,7 +199,7 @@ var options = {
222
199
  power: /* @__PURE__ */ jsx3(IconChevronUp, {})
223
200
  };
224
201
  function NoiseCombineNode(t0) {
225
- const $ = _c3(22);
202
+ const $ = _c3(18);
226
203
  const {
227
204
  id,
228
205
  selected,
@@ -280,45 +257,32 @@ function NoiseCombineNode(t0) {
280
257
  t4 = $[11];
281
258
  }
282
259
  let t5;
283
- if ($[12] !== data.handles || $[13] !== id) {
284
- t5 = /* @__PURE__ */ jsx3(NodeTrackConnections3, { handles: data.handles, nodeId: id, type: "target" });
285
- $[12] = data.handles;
260
+ if ($[12] !== data || $[13] !== id || $[14] !== selected || $[15] !== t4 || $[16] !== type) {
261
+ t5 = /* @__PURE__ */ jsx3(NodeContainer3, { id, selected, data, type, children: t4 });
262
+ $[12] = data;
286
263
  $[13] = id;
287
- $[14] = t5;
288
- } else {
289
- t5 = $[14];
290
- }
291
- let t6;
292
- if ($[15] !== data || $[16] !== id || $[17] !== selected || $[18] !== t4 || $[19] !== t5 || $[20] !== type) {
293
- t6 = /* @__PURE__ */ jsxs2(NodeContainer3, { id, selected, data, type, children: [
294
- t4,
295
- t5
296
- ] });
297
- $[15] = data;
298
- $[16] = id;
299
- $[17] = selected;
300
- $[18] = t4;
301
- $[19] = t5;
302
- $[20] = type;
303
- $[21] = t6;
264
+ $[14] = selected;
265
+ $[15] = t4;
266
+ $[16] = type;
267
+ $[17] = t5;
304
268
  } else {
305
- t6 = $[21];
269
+ t5 = $[17];
306
270
  }
307
- return t6;
271
+ return t5;
308
272
  }
309
273
  var noise_combine_node_default = NoiseCombineNode;
310
274
 
311
275
  // src/nodes/modifiers/noise-curve-node.tsx
312
276
  import { NodeState } from "@awesome-flow/core/abstract";
313
277
  import { useIncomingComputedData as useIncomingComputedData4, useUpdateNodeComputedData as useUpdateNodeComputedData4, useUpdateNodeData as useUpdateNodeData3 } from "@awesome-flow/core/hooks";
314
- import { NodeContainer as NodeContainer4, NodeTrackConnections as NodeTrackConnections4 } from "@awesome-flow/core/layout";
278
+ import { NodeContainer as NodeContainer4 } from "@awesome-flow/core/layout";
315
279
  import { ActionIcon, Button, Group as Group2, NumberInput as NumberInput2, Space } from "@mantine/core";
316
280
  import { FORM_INDEX, useForm } from "@mantine/form";
317
281
  import { randomId } from "@mantine/hooks";
318
282
  import { IconX } from "@tabler/icons-react";
319
283
  import { Curve, Tuple } from "libnoise-simplex-ts";
320
284
  import { useCallback as useCallback2, useEffect as useEffect4, useMemo, useState as useState2 } from "react";
321
- import { Fragment, jsx as jsx4, jsxs as jsxs3 } from "react/jsx-runtime";
285
+ import { Fragment, jsx as jsx4, jsxs as jsxs2 } from "react/jsx-runtime";
322
286
  function NoiseCurveNode({
323
287
  id,
324
288
  selected,
@@ -385,22 +349,21 @@ function NoiseCurveNode({
385
349
  });
386
350
  }
387
351
  }, [id, values, incoming, updateComputedData]);
388
- const fields = useMemo(() => values.map((item, index) => /* @__PURE__ */ jsxs3(Group2, { mt: "xs", children: [
352
+ const fields = useMemo(() => values.map((item, index) => /* @__PURE__ */ jsxs2(Group2, { mt: "xs", children: [
389
353
  /* @__PURE__ */ jsx4(NumberInput2, { size: "xs", w: 100, placeholder: "Input Value", ...form.getInputProps(`points.${index}.input`), step: 0.1 }, form.key(`points.${index}.input`)),
390
354
  /* @__PURE__ */ jsx4(NumberInput2, { size: "xs", w: 100, placeholder: "Output Value", ...form.getInputProps(`points.${index}.output`), step: 0.1 }, form.key(`points.${index}.output`)),
391
355
  data.state === NodeState.edit && values.length > 4 && /* @__PURE__ */ jsx4(ActionIcon, { color: "red", variant: "outline", size: "sm", onClick: () => form.removeListItem("points", index), children: /* @__PURE__ */ jsx4(IconX, { size: "1rem" }) })
392
356
  ] }, item.key)), [data.state, values, form]);
393
- return /* @__PURE__ */ jsxs3(NodeContainer4, { id, selected, type, data, children: [
357
+ return /* @__PURE__ */ jsxs2(NodeContainer4, { id, selected, type, data, children: [
394
358
  fields,
395
- data.state === NodeState.edit && /* @__PURE__ */ jsxs3(Fragment, { children: [
359
+ data.state === NodeState.edit && /* @__PURE__ */ jsxs2(Fragment, { children: [
396
360
  /* @__PURE__ */ jsx4(Space, { h: 10 }),
397
361
  /* @__PURE__ */ jsx4(Button, { variant: "outline", size: "xs", fullWidth: true, onClick: () => form.insertListItem("points", {
398
362
  input: 0,
399
363
  output: 0,
400
364
  key: randomId()
401
365
  }), children: "Add control point" })
402
- ] }),
403
- /* @__PURE__ */ jsx4(NodeTrackConnections4, { handles: data.handles, nodeId: id, type: "target" })
366
+ ] })
404
367
  ] });
405
368
  }
406
369
  var noise_curve_node_default = NoiseCurveNode;
@@ -408,13 +371,13 @@ var noise_curve_node_default = NoiseCurveNode;
408
371
  // src/nodes/modifiers/noise-exponent-node.tsx
409
372
  import { c as _c4 } from "react/compiler-runtime";
410
373
  import { useIncomingComputedData as useIncomingComputedData5, useUpdateNodeComputedData as useUpdateNodeComputedData5, useUpdateNodeData as useUpdateNodeData4 } from "@awesome-flow/core/hooks";
411
- import { NodeContainer as NodeContainer5, NodeTrackConnections as NodeTrackConnections5 } from "@awesome-flow/core/layout";
374
+ import { NodeContainer as NodeContainer5 } from "@awesome-flow/core/layout";
412
375
  import { Group as Group3, NumberInput as NumberInput3, Stack as Stack2 } from "@mantine/core";
413
376
  import { Exponent } from "libnoise-simplex-ts";
414
377
  import { useEffect as useEffect5, useState as useState3 } from "react";
415
- import { jsx as jsx5, jsxs as jsxs4 } from "react/jsx-runtime";
378
+ import { jsx as jsx5, jsxs as jsxs3 } from "react/jsx-runtime";
416
379
  function NoiseExponentNode(t0) {
417
- const $ = _c4(20);
380
+ const $ = _c4(16);
418
381
  const {
419
382
  id,
420
383
  selected,
@@ -461,7 +424,7 @@ function NoiseExponentNode(t0) {
461
424
  }
462
425
  let t4;
463
426
  if ($[8] !== exponent) {
464
- t4 = /* @__PURE__ */ jsx5(Stack2, { children: /* @__PURE__ */ jsxs4(Group3, { children: [
427
+ t4 = /* @__PURE__ */ jsx5(Stack2, { children: /* @__PURE__ */ jsxs3(Group3, { children: [
465
428
  "Exponent:",
466
429
  /* @__PURE__ */ jsx5(NumberInput3, { size: "xs", value: exponent, onChange: t3, step: 0.1 })
467
430
  ] }) });
@@ -471,43 +434,30 @@ function NoiseExponentNode(t0) {
471
434
  t4 = $[9];
472
435
  }
473
436
  let t5;
474
- if ($[10] !== data.handles || $[11] !== id) {
475
- t5 = /* @__PURE__ */ jsx5(NodeTrackConnections5, { handles: data.handles, nodeId: id, type: "target" });
476
- $[10] = data.handles;
437
+ if ($[10] !== data || $[11] !== id || $[12] !== selected || $[13] !== t4 || $[14] !== type) {
438
+ t5 = /* @__PURE__ */ jsx5(NodeContainer5, { id, selected, data, type, children: t4 });
439
+ $[10] = data;
477
440
  $[11] = id;
478
- $[12] = t5;
479
- } else {
480
- t5 = $[12];
481
- }
482
- let t6;
483
- if ($[13] !== data || $[14] !== id || $[15] !== selected || $[16] !== t4 || $[17] !== t5 || $[18] !== type) {
484
- t6 = /* @__PURE__ */ jsxs4(NodeContainer5, { id, selected, data, type, children: [
485
- t4,
486
- t5
487
- ] });
488
- $[13] = data;
489
- $[14] = id;
490
- $[15] = selected;
491
- $[16] = t4;
492
- $[17] = t5;
493
- $[18] = type;
494
- $[19] = t6;
441
+ $[12] = selected;
442
+ $[13] = t4;
443
+ $[14] = type;
444
+ $[15] = t5;
495
445
  } else {
496
- t6 = $[19];
446
+ t5 = $[15];
497
447
  }
498
- return t6;
448
+ return t5;
499
449
  }
500
450
  var noise_exponent_node_default = NoiseExponentNode;
501
451
 
502
452
  // src/nodes/modifiers/noise-invert-node.tsx
503
453
  import { c as _c5 } from "react/compiler-runtime";
504
454
  import { useIncomingComputedData as useIncomingComputedData6, useUpdateNodeComputedData as useUpdateNodeComputedData6 } from "@awesome-flow/core/hooks";
505
- import { NodeContainer as NodeContainer6, NodeTrackConnections as NodeTrackConnections6 } from "@awesome-flow/core/layout";
455
+ import { NodeContainer as NodeContainer6 } from "@awesome-flow/core/layout";
506
456
  import { Invert } from "libnoise-simplex-ts";
507
457
  import { useEffect as useEffect6 } from "react";
508
458
  import { jsx as jsx6 } from "react/jsx-runtime";
509
459
  function NoiseInvertNode(t0) {
510
- const $ = _c5(14);
460
+ const $ = _c5(10);
511
461
  const {
512
462
  id,
513
463
  selected,
@@ -539,39 +489,29 @@ function NoiseInvertNode(t0) {
539
489
  }
540
490
  useEffect6(t1, t2);
541
491
  let t3;
542
- if ($[5] !== data.handles || $[6] !== id) {
543
- t3 = /* @__PURE__ */ jsx6(NodeTrackConnections6, { handles: data.handles, nodeId: id, type: "target" });
544
- $[5] = data.handles;
492
+ if ($[5] !== data || $[6] !== id || $[7] !== selected || $[8] !== type) {
493
+ t3 = /* @__PURE__ */ jsx6(NodeContainer6, { id, selected, data, type });
494
+ $[5] = data;
545
495
  $[6] = id;
546
- $[7] = t3;
547
- } else {
548
- t3 = $[7];
549
- }
550
- let t4;
551
- if ($[8] !== data || $[9] !== id || $[10] !== selected || $[11] !== t3 || $[12] !== type) {
552
- t4 = /* @__PURE__ */ jsx6(NodeContainer6, { id, selected, data, type, children: t3 });
553
- $[8] = data;
554
- $[9] = id;
555
- $[10] = selected;
556
- $[11] = t3;
557
- $[12] = type;
558
- $[13] = t4;
496
+ $[7] = selected;
497
+ $[8] = type;
498
+ $[9] = t3;
559
499
  } else {
560
- t4 = $[13];
500
+ t3 = $[9];
561
501
  }
562
- return t4;
502
+ return t3;
563
503
  }
564
504
  var noise_invert_node_default = NoiseInvertNode;
565
505
 
566
506
  // src/nodes/modifiers/noise-normalize-node.tsx
567
507
  import { c as _c6 } from "react/compiler-runtime";
568
508
  import { useIncomingComputedData as useIncomingComputedData7, useUpdateNodeComputedData as useUpdateNodeComputedData7, useUpdateNodeData as useUpdateNodeData5 } from "@awesome-flow/core/hooks";
569
- import { NodeContainer as NodeContainer7, NodeTrackConnections as NodeTrackConnections7 } from "@awesome-flow/core/layout";
509
+ import { NodeContainer as NodeContainer7 } from "@awesome-flow/core/layout";
570
510
  import { Group as Group4, NumberInput as NumberInput4, Stack as Stack3 } from "@mantine/core";
571
511
  import { useEffect as useEffect7, useState as useState4 } from "react";
572
- import { jsx as jsx7, jsxs as jsxs5 } from "react/jsx-runtime";
512
+ import { jsx as jsx7, jsxs as jsxs4 } from "react/jsx-runtime";
573
513
  function NoiseNormalizeNode(t0) {
574
- const $ = _c6(27);
514
+ const $ = _c6(23);
575
515
  const {
576
516
  id,
577
517
  selected,
@@ -645,7 +585,7 @@ function NoiseNormalizeNode(t0) {
645
585
  }
646
586
  let t7;
647
587
  if ($[14] !== t4 || $[15] !== t6) {
648
- t7 = /* @__PURE__ */ jsx7(Stack3, { children: /* @__PURE__ */ jsxs5(Group4, { children: [
588
+ t7 = /* @__PURE__ */ jsx7(Stack3, { children: /* @__PURE__ */ jsxs4(Group4, { children: [
649
589
  t4,
650
590
  t6
651
591
  ] }) });
@@ -656,44 +596,31 @@ function NoiseNormalizeNode(t0) {
656
596
  t7 = $[16];
657
597
  }
658
598
  let t8;
659
- if ($[17] !== data.handles || $[18] !== id) {
660
- t8 = /* @__PURE__ */ jsx7(NodeTrackConnections7, { handles: data.handles, nodeId: id, type: "target" });
661
- $[17] = data.handles;
599
+ if ($[17] !== data || $[18] !== id || $[19] !== selected || $[20] !== t7 || $[21] !== type) {
600
+ t8 = /* @__PURE__ */ jsx7(NodeContainer7, { id, selected, data, type, children: t7 });
601
+ $[17] = data;
662
602
  $[18] = id;
663
- $[19] = t8;
664
- } else {
665
- t8 = $[19];
666
- }
667
- let t9;
668
- if ($[20] !== data || $[21] !== id || $[22] !== selected || $[23] !== t7 || $[24] !== t8 || $[25] !== type) {
669
- t9 = /* @__PURE__ */ jsxs5(NodeContainer7, { id, selected, data, type, children: [
670
- t7,
671
- t8
672
- ] });
673
- $[20] = data;
674
- $[21] = id;
675
- $[22] = selected;
676
- $[23] = t7;
677
- $[24] = t8;
678
- $[25] = type;
679
- $[26] = t9;
603
+ $[19] = selected;
604
+ $[20] = t7;
605
+ $[21] = type;
606
+ $[22] = t8;
680
607
  } else {
681
- t9 = $[26];
608
+ t8 = $[22];
682
609
  }
683
- return t9;
610
+ return t8;
684
611
  }
685
612
  var noise_normalize_node_default = NoiseNormalizeNode;
686
613
 
687
614
  // src/nodes/modifiers/noise-scale-bias-node.tsx
688
615
  import { c as _c7 } from "react/compiler-runtime";
689
616
  import { useIncomingComputedData as useIncomingComputedData8, useUpdateNodeComputedData as useUpdateNodeComputedData8, useUpdateNodeData as useUpdateNodeData6 } from "@awesome-flow/core/hooks";
690
- import { NodeContainer as NodeContainer8, NodeTrackConnections as NodeTrackConnections8 } from "@awesome-flow/core/layout";
617
+ import { NodeContainer as NodeContainer8 } from "@awesome-flow/core/layout";
691
618
  import { Group as Group5, NumberInput as NumberInput5, Stack as Stack4 } from "@mantine/core";
692
619
  import { ScaleBias } from "libnoise-simplex-ts";
693
620
  import { memo, useEffect as useEffect8, useState as useState5 } from "react";
694
- import { jsx as jsx8, jsxs as jsxs6 } from "react/jsx-runtime";
621
+ import { jsx as jsx8, jsxs as jsxs5 } from "react/jsx-runtime";
695
622
  function NoiseScaleBiasNode(t0) {
696
- const $ = _c7(27);
623
+ const $ = _c7(23);
697
624
  const {
698
625
  id,
699
626
  selected,
@@ -743,7 +670,7 @@ function NoiseScaleBiasNode(t0) {
743
670
  }
744
671
  let t4;
745
672
  if ($[9] !== scale) {
746
- t4 = /* @__PURE__ */ jsxs6(Group5, { children: [
673
+ t4 = /* @__PURE__ */ jsxs5(Group5, { children: [
747
674
  "Scale:",
748
675
  /* @__PURE__ */ jsx8(NumberInput5, { size: "xs", w: 100, value: scale, onChange: t3, step: 0.1 })
749
676
  ] });
@@ -761,7 +688,7 @@ function NoiseScaleBiasNode(t0) {
761
688
  }
762
689
  let t6;
763
690
  if ($[12] !== bias) {
764
- t6 = /* @__PURE__ */ jsxs6(Group5, { children: [
691
+ t6 = /* @__PURE__ */ jsxs5(Group5, { children: [
765
692
  "Bias:",
766
693
  /* @__PURE__ */ jsx8(NumberInput5, { size: "xs", w: 100, value: bias, onChange: t5, step: 0.1 })
767
694
  ] });
@@ -772,7 +699,7 @@ function NoiseScaleBiasNode(t0) {
772
699
  }
773
700
  let t7;
774
701
  if ($[14] !== t4 || $[15] !== t6) {
775
- t7 = /* @__PURE__ */ jsxs6(Stack4, { children: [
702
+ t7 = /* @__PURE__ */ jsxs5(Stack4, { children: [
776
703
  t4,
777
704
  t6
778
705
  ] });
@@ -783,31 +710,18 @@ function NoiseScaleBiasNode(t0) {
783
710
  t7 = $[16];
784
711
  }
785
712
  let t8;
786
- if ($[17] !== data.handles || $[18] !== id) {
787
- t8 = /* @__PURE__ */ jsx8(NodeTrackConnections8, { handles: data.handles, nodeId: id, type: "target" });
788
- $[17] = data.handles;
713
+ if ($[17] !== data || $[18] !== id || $[19] !== selected || $[20] !== t7 || $[21] !== type) {
714
+ t8 = /* @__PURE__ */ jsx8(NodeContainer8, { id, selected, data, type, children: t7 });
715
+ $[17] = data;
789
716
  $[18] = id;
790
- $[19] = t8;
717
+ $[19] = selected;
718
+ $[20] = t7;
719
+ $[21] = type;
720
+ $[22] = t8;
791
721
  } else {
792
- t8 = $[19];
722
+ t8 = $[22];
793
723
  }
794
- let t9;
795
- if ($[20] !== data || $[21] !== id || $[22] !== selected || $[23] !== t7 || $[24] !== t8 || $[25] !== type) {
796
- t9 = /* @__PURE__ */ jsxs6(NodeContainer8, { id, selected, data, type, children: [
797
- t7,
798
- t8
799
- ] });
800
- $[20] = data;
801
- $[21] = id;
802
- $[22] = selected;
803
- $[23] = t7;
804
- $[24] = t8;
805
- $[25] = type;
806
- $[26] = t9;
807
- } else {
808
- t9 = $[26];
809
- }
810
- return t9;
724
+ return t8;
811
725
  }
812
726
  var noise_scale_bias_node_default = memo(NoiseScaleBiasNode);
813
727
 
@@ -815,16 +729,16 @@ var noise_scale_bias_node_default = memo(NoiseScaleBiasNode);
815
729
  import { c as _c8 } from "react/compiler-runtime";
816
730
  import { NodeState as NodeState2 } from "@awesome-flow/core/abstract";
817
731
  import { useIncomingComputedData as useIncomingComputedData9, useUpdateNodeComputedData as useUpdateNodeComputedData9, useUpdateNodeData as useUpdateNodeData7 } from "@awesome-flow/core/hooks";
818
- import { NodeContainer as NodeContainer9, NodeTrackConnections as NodeTrackConnections9 } from "@awesome-flow/core/layout";
732
+ import { NodeContainer as NodeContainer9 } from "@awesome-flow/core/layout";
819
733
  import { ActionIcon as ActionIcon2, Button as Button2, Group as Group6, NumberInput as NumberInput6, Space as Space2 } from "@mantine/core";
820
734
  import { FORM_INDEX as FORM_INDEX2, useForm as useForm2 } from "@mantine/form";
821
735
  import { randomId as randomId2 } from "@mantine/hooks";
822
736
  import { IconX as IconX2 } from "@tabler/icons-react";
823
737
  import { Terrace } from "libnoise-simplex-ts";
824
738
  import { useEffect as useEffect9, useState as useState6 } from "react";
825
- import { Fragment as Fragment2, jsx as jsx9, jsxs as jsxs7 } from "react/jsx-runtime";
739
+ import { Fragment as Fragment2, jsx as jsx9, jsxs as jsxs6 } from "react/jsx-runtime";
826
740
  function NoiseTerraceNode(t0) {
827
- const $ = _c8(31);
741
+ const $ = _c8(27);
828
742
  const {
829
743
  id,
830
744
  selected,
@@ -920,7 +834,7 @@ function NoiseTerraceNode(t0) {
920
834
  let t9;
921
835
  let t10;
922
836
  if ($[14] !== data.state || $[15] !== form) {
923
- t10 = form.values.points.map((_, index) => /* @__PURE__ */ jsxs7(Group6, { mt: "xs", children: [
837
+ t10 = form.values.points.map((_, index) => /* @__PURE__ */ jsxs6(Group6, { mt: "xs", children: [
924
838
  /* @__PURE__ */ jsx9(NumberInput6, { size: "xs", placeholder: "Input Value", ...form.getInputProps(`points.${index}.value`), step: 0.1 }, form.key(`points.${index}.value`)),
925
839
  data.state === NodeState2.edit && form.values.points.length > 2 && /* @__PURE__ */ jsx9(ActionIcon2, { color: "red", variant: "outline", size: "sm", onClick: () => form.removeListItem("points", index), children: /* @__PURE__ */ jsx9(IconX2, { size: "1rem" }) })
926
840
  ] }, index));
@@ -934,7 +848,7 @@ function NoiseTerraceNode(t0) {
934
848
  const fields = t9;
935
849
  let t11;
936
850
  if ($[17] !== data.state || $[18] !== form) {
937
- t11 = data.state === NodeState2.edit && /* @__PURE__ */ jsxs7(Fragment2, { children: [
851
+ t11 = data.state === NodeState2.edit && /* @__PURE__ */ jsxs6(Fragment2, { children: [
938
852
  /* @__PURE__ */ jsx9(Space2, { h: 10 }),
939
853
  /* @__PURE__ */ jsx9(Button2, { variant: "outline", size: "xs", fullWidth: true, onClick: () => form.insertListItem("points", {
940
854
  value: 0,
@@ -948,33 +862,22 @@ function NoiseTerraceNode(t0) {
948
862
  t11 = $[19];
949
863
  }
950
864
  let t12;
951
- if ($[20] !== data.handles || $[21] !== id) {
952
- t12 = /* @__PURE__ */ jsx9(NodeTrackConnections9, { handles: data.handles, nodeId: id, type: "target" });
953
- $[20] = data.handles;
954
- $[21] = id;
955
- $[22] = t12;
956
- } else {
957
- t12 = $[22];
958
- }
959
- let t13;
960
- if ($[23] !== data || $[24] !== fields || $[25] !== id || $[26] !== selected || $[27] !== t11 || $[28] !== t12 || $[29] !== type) {
961
- t13 = /* @__PURE__ */ jsx9(Fragment2, { children: /* @__PURE__ */ jsxs7(NodeContainer9, { id, selected, type, data, children: [
865
+ if ($[20] !== data || $[21] !== fields || $[22] !== id || $[23] !== selected || $[24] !== t11 || $[25] !== type) {
866
+ t12 = /* @__PURE__ */ jsx9(Fragment2, { children: /* @__PURE__ */ jsxs6(NodeContainer9, { id, selected, type, data, children: [
962
867
  fields,
963
- t11,
964
- t12
868
+ t11
965
869
  ] }) });
966
- $[23] = data;
967
- $[24] = fields;
968
- $[25] = id;
969
- $[26] = selected;
970
- $[27] = t11;
971
- $[28] = t12;
972
- $[29] = type;
973
- $[30] = t13;
974
- } else {
975
- t13 = $[30];
976
- }
977
- return t13;
870
+ $[20] = data;
871
+ $[21] = fields;
872
+ $[22] = id;
873
+ $[23] = selected;
874
+ $[24] = t11;
875
+ $[25] = type;
876
+ $[26] = t12;
877
+ } else {
878
+ t12 = $[26];
879
+ }
880
+ return t12;
978
881
  }
979
882
  function _temp3(v_0) {
980
883
  return v_0.value;