@awesome-flow/noise 0.4.0 → 0.6.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 (65) hide show
  1. package/dist/abstract/index.cjs +42 -42
  2. package/dist/abstract/index.js +59 -54
  3. package/dist/modules/index.cjs +0 -1
  4. package/dist/modules/index.js +0 -1
  5. package/dist/nodes/generators/index.cjs +0 -1
  6. package/dist/nodes/generators/index.js +0 -1
  7. package/dist/nodes/groups/index.cjs +2 -5
  8. package/dist/nodes/groups/index.js +9 -7
  9. package/dist/nodes/index.cjs +68 -68
  10. package/dist/nodes/index.js +59 -54
  11. package/dist/nodes/modifiers/index.cjs +40 -38
  12. package/dist/nodes/modifiers/index.js +50 -48
  13. package/dist/nodes/output/index.cjs +0 -2
  14. package/dist/nodes/output/index.js +7 -4
  15. package/dist/nodes/selectors/index.cjs +0 -2
  16. package/dist/nodes/selectors/index.js +7 -4
  17. package/dist/nodes/transformers/index.cjs +0 -1
  18. package/dist/nodes/transformers/index.js +0 -1
  19. package/dist/templates/generators/index.cjs +2 -4
  20. package/dist/templates/generators/index.js +7 -4
  21. package/dist/templates/groups/index.cjs +2 -4
  22. package/dist/templates/groups/index.js +7 -4
  23. package/dist/templates/index.cjs +2 -4
  24. package/dist/templates/index.js +7 -4
  25. package/dist/templates/modifiers/index.cjs +0 -2
  26. package/dist/templates/modifiers/index.js +7 -4
  27. package/dist/templates/output/index.cjs +0 -2
  28. package/dist/templates/output/index.js +7 -4
  29. package/dist/templates/selectors/index.cjs +0 -2
  30. package/dist/templates/selectors/index.js +7 -4
  31. package/dist/templates/transformers/index.cjs +0 -2
  32. package/dist/templates/transformers/index.js +7 -4
  33. package/package.json +3 -3
  34. package/dist/abstract/index.cjs.map +0 -1
  35. package/dist/abstract/index.js.map +0 -1
  36. package/dist/modules/index.cjs.map +0 -1
  37. package/dist/modules/index.js.map +0 -1
  38. package/dist/nodes/generators/index.cjs.map +0 -1
  39. package/dist/nodes/generators/index.js.map +0 -1
  40. package/dist/nodes/groups/index.cjs.map +0 -1
  41. package/dist/nodes/groups/index.js.map +0 -1
  42. package/dist/nodes/index.cjs.map +0 -1
  43. package/dist/nodes/index.js.map +0 -1
  44. package/dist/nodes/modifiers/index.cjs.map +0 -1
  45. package/dist/nodes/modifiers/index.js.map +0 -1
  46. package/dist/nodes/output/index.cjs.map +0 -1
  47. package/dist/nodes/output/index.js.map +0 -1
  48. package/dist/nodes/selectors/index.cjs.map +0 -1
  49. package/dist/nodes/selectors/index.js.map +0 -1
  50. package/dist/nodes/transformers/index.cjs.map +0 -1
  51. package/dist/nodes/transformers/index.js.map +0 -1
  52. package/dist/templates/generators/index.cjs.map +0 -1
  53. package/dist/templates/generators/index.js.map +0 -1
  54. package/dist/templates/groups/index.cjs.map +0 -1
  55. package/dist/templates/groups/index.js.map +0 -1
  56. package/dist/templates/index.cjs.map +0 -1
  57. package/dist/templates/index.js.map +0 -1
  58. package/dist/templates/modifiers/index.cjs.map +0 -1
  59. package/dist/templates/modifiers/index.js.map +0 -1
  60. package/dist/templates/output/index.cjs.map +0 -1
  61. package/dist/templates/output/index.js.map +0 -1
  62. package/dist/templates/selectors/index.cjs.map +0 -1
  63. package/dist/templates/selectors/index.js.map +0 -1
  64. package/dist/templates/transformers/index.cjs.map +0 -1
  65. package/dist/templates/transformers/index.js.map +0 -1
@@ -29,9 +29,9 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
29
29
  ));
30
30
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
31
31
 
32
- // ../../node_modules/fast-deep-equal/index.js
32
+ // ../../node_modules/.pnpm/fast-deep-equal@3.1.3/node_modules/fast-deep-equal/index.js
33
33
  var require_fast_deep_equal = __commonJS({
34
- "../../node_modules/fast-deep-equal/index.js"(exports2, module2) {
34
+ "../../node_modules/.pnpm/fast-deep-equal@3.1.3/node_modules/fast-deep-equal/index.js"(exports2, module2) {
35
35
  "use strict";
36
36
  module2.exports = function equal(a, b) {
37
37
  if (a === b)
@@ -793,10 +793,10 @@ var import_layout20 = require("@awesome-flow/core/layout");
793
793
  var import_core10 = require("@mantine/core");
794
794
  var import_hooks20 = require("@awesome-flow/core/hooks");
795
795
 
796
- // ../../node_modules/@mantine/form/esm/use-form.mjs
796
+ // ../../node_modules/.pnpm/@mantine+form@7.10.1_react@18.3.1/node_modules/@mantine/form/esm/use-form.mjs
797
797
  var import_react26 = require("react");
798
798
 
799
- // ../../node_modules/@mantine/form/esm/actions/actions.mjs
799
+ // ../../node_modules/.pnpm/@mantine+form@7.10.1_react@18.3.1/node_modules/@mantine/form/esm/actions/actions.mjs
800
800
  var import_react20 = require("react");
801
801
  function validateFormName(name) {
802
802
  if (!/^[0-9a-zA-Z-]+$/.test(name)) {
@@ -877,7 +877,7 @@ function useFormActions(name, form) {
877
877
  useFormEvent(`mantine-form:${name}:reset-touched`, form.resetTouched);
878
878
  }
879
879
 
880
- // ../../node_modules/@mantine/form/esm/get-input-on-change/get-input-on-change.mjs
880
+ // ../../node_modules/.pnpm/@mantine+form@7.10.1_react@18.3.1/node_modules/@mantine/form/esm/get-input-on-change/get-input-on-change.mjs
881
881
  function getInputOnChange(setValue) {
882
882
  return (val) => {
883
883
  if (!val) {
@@ -901,10 +901,10 @@ function getInputOnChange(setValue) {
901
901
  };
902
902
  }
903
903
 
904
- // ../../node_modules/@mantine/form/esm/hooks/use-form-errors/use-form-errors.mjs
904
+ // ../../node_modules/.pnpm/@mantine+form@7.10.1_react@18.3.1/node_modules/@mantine/form/esm/hooks/use-form-errors/use-form-errors.mjs
905
905
  var import_react21 = require("react");
906
906
 
907
- // ../../node_modules/@mantine/form/esm/hooks/use-form-errors/filter-errors/filter-errors.mjs
907
+ // ../../node_modules/.pnpm/@mantine+form@7.10.1_react@18.3.1/node_modules/@mantine/form/esm/hooks/use-form-errors/filter-errors/filter-errors.mjs
908
908
  function filterErrors(errors) {
909
909
  if (errors === null || typeof errors !== "object") {
910
910
  return {};
@@ -918,18 +918,21 @@ function filterErrors(errors) {
918
918
  }, {});
919
919
  }
920
920
 
921
- // ../../node_modules/@mantine/form/esm/hooks/use-form-errors/use-form-errors.mjs
921
+ // ../../node_modules/.pnpm/@mantine+form@7.10.1_react@18.3.1/node_modules/@mantine/form/esm/hooks/use-form-errors/use-form-errors.mjs
922
922
  function useFormErrors(initialErrors) {
923
923
  const [errorsState, setErrorsState] = (0, import_react21.useState)(filterErrors(initialErrors));
924
+ const errorsRef = (0, import_react21.useRef)(errorsState);
924
925
  const setErrors = (0, import_react21.useCallback)((errors) => {
925
- setErrorsState(
926
- (current) => filterErrors(typeof errors === "function" ? errors(current) : errors)
927
- );
926
+ setErrorsState((current) => {
927
+ const newErrors = filterErrors(typeof errors === "function" ? errors(current) : errors);
928
+ errorsRef.current = newErrors;
929
+ return newErrors;
930
+ });
928
931
  }, []);
929
- const clearErrors = (0, import_react21.useCallback)(() => setErrorsState({}), []);
932
+ const clearErrors = (0, import_react21.useCallback)(() => setErrors({}), []);
930
933
  const clearFieldError = (0, import_react21.useCallback)(
931
934
  (path) => {
932
- if (errorsState[path] === void 0) {
935
+ if (errorsRef.current[path] === void 0) {
933
936
  return;
934
937
  }
935
938
  setErrors((current) => {
@@ -944,7 +947,7 @@ function useFormErrors(initialErrors) {
944
947
  (path, error) => {
945
948
  if (error == null || error === false) {
946
949
  clearFieldError(path);
947
- } else if (errorsState[path] !== error) {
950
+ } else if (errorsRef.current[path] !== error) {
948
951
  setErrors((current) => ({ ...current, [path]: error }));
949
952
  }
950
953
  },
@@ -959,10 +962,10 @@ function useFormErrors(initialErrors) {
959
962
  };
960
963
  }
961
964
 
962
- // ../../node_modules/@mantine/form/esm/hooks/use-form-list/use-form-list.mjs
965
+ // ../../node_modules/.pnpm/@mantine+form@7.10.1_react@18.3.1/node_modules/@mantine/form/esm/hooks/use-form-list/use-form-list.mjs
963
966
  var import_react22 = require("react");
964
967
 
965
- // ../../node_modules/@mantine/form/esm/lists/clear-list-state.mjs
968
+ // ../../node_modules/.pnpm/@mantine+form@7.10.1_react@18.3.1/node_modules/@mantine/form/esm/lists/clear-list-state.mjs
966
969
  function clearListState(field, state) {
967
970
  if (state === null || typeof state !== "object") {
968
971
  return {};
@@ -976,7 +979,7 @@ function clearListState(field, state) {
976
979
  return clone;
977
980
  }
978
981
 
979
- // ../../node_modules/@mantine/form/esm/lists/change-error-indices.mjs
982
+ // ../../node_modules/.pnpm/@mantine+form@7.10.1_react@18.3.1/node_modules/@mantine/form/esm/lists/change-error-indices.mjs
980
983
  function getIndexFromKeyAfterPath(key, path) {
981
984
  const split = key.substring(path.length + 1).split(".")[0];
982
985
  return parseInt(split, 10);
@@ -1016,7 +1019,7 @@ function changeErrorIndices(path, index, errors, change) {
1016
1019
  return cloned;
1017
1020
  }
1018
1021
 
1019
- // ../../node_modules/@mantine/form/esm/lists/reorder-errors.mjs
1022
+ // ../../node_modules/.pnpm/@mantine+form@7.10.1_react@18.3.1/node_modules/@mantine/form/esm/lists/reorder-errors.mjs
1020
1023
  function reorderErrors(path, { from, to }, errors) {
1021
1024
  const oldKeyStart = `${path}.${from}`;
1022
1025
  const newKeyStart = `${path}.${to}`;
@@ -1044,7 +1047,7 @@ function reorderErrors(path, { from, to }, errors) {
1044
1047
  return clone;
1045
1048
  }
1046
1049
 
1047
- // ../../node_modules/klona/full/index.mjs
1050
+ // ../../node_modules/.pnpm/klona@2.0.6/node_modules/klona/full/index.mjs
1048
1051
  function set(obj, key, val) {
1049
1052
  if (typeof val.value === "object")
1050
1053
  val.value = klona(val.value);
@@ -1095,7 +1098,7 @@ function klona(x) {
1095
1098
  return tmp || x;
1096
1099
  }
1097
1100
 
1098
- // ../../node_modules/@mantine/form/esm/paths/get-splitted-path.mjs
1101
+ // ../../node_modules/.pnpm/@mantine+form@7.10.1_react@18.3.1/node_modules/@mantine/form/esm/paths/get-splitted-path.mjs
1099
1102
  function getSplittedPath(path) {
1100
1103
  if (typeof path !== "string") {
1101
1104
  return [];
@@ -1103,7 +1106,7 @@ function getSplittedPath(path) {
1103
1106
  return path.split(".");
1104
1107
  }
1105
1108
 
1106
- // ../../node_modules/@mantine/form/esm/paths/get-path.mjs
1109
+ // ../../node_modules/.pnpm/@mantine+form@7.10.1_react@18.3.1/node_modules/@mantine/form/esm/paths/get-path.mjs
1107
1110
  function getPath(path, values) {
1108
1111
  const splittedPath = getSplittedPath(path);
1109
1112
  if (splittedPath.length === 0 || typeof values !== "object" || values === null) {
@@ -1119,7 +1122,7 @@ function getPath(path, values) {
1119
1122
  return value;
1120
1123
  }
1121
1124
 
1122
- // ../../node_modules/@mantine/form/esm/paths/set-path.mjs
1125
+ // ../../node_modules/.pnpm/@mantine+form@7.10.1_react@18.3.1/node_modules/@mantine/form/esm/paths/set-path.mjs
1123
1126
  function setPath(path, value, values) {
1124
1127
  const splittedPath = getSplittedPath(path);
1125
1128
  if (splittedPath.length === 0) {
@@ -1141,7 +1144,7 @@ function setPath(path, value, values) {
1141
1144
  return cloned;
1142
1145
  }
1143
1146
 
1144
- // ../../node_modules/@mantine/form/esm/paths/reorder-path.mjs
1147
+ // ../../node_modules/.pnpm/@mantine+form@7.10.1_react@18.3.1/node_modules/@mantine/form/esm/paths/reorder-path.mjs
1145
1148
  function reorderPath(path, { from, to }, values) {
1146
1149
  const currentValue = getPath(path, values);
1147
1150
  if (!Array.isArray(currentValue)) {
@@ -1154,7 +1157,7 @@ function reorderPath(path, { from, to }, values) {
1154
1157
  return setPath(path, cloned, values);
1155
1158
  }
1156
1159
 
1157
- // ../../node_modules/@mantine/form/esm/paths/insert-path.mjs
1160
+ // ../../node_modules/.pnpm/@mantine+form@7.10.1_react@18.3.1/node_modules/@mantine/form/esm/paths/insert-path.mjs
1158
1161
  function insertPath(path, value, index, values) {
1159
1162
  const currentValue = getPath(path, values);
1160
1163
  if (!Array.isArray(currentValue)) {
@@ -1165,7 +1168,7 @@ function insertPath(path, value, index, values) {
1165
1168
  return setPath(path, cloned, values);
1166
1169
  }
1167
1170
 
1168
- // ../../node_modules/@mantine/form/esm/paths/remove-path.mjs
1171
+ // ../../node_modules/.pnpm/@mantine+form@7.10.1_react@18.3.1/node_modules/@mantine/form/esm/paths/remove-path.mjs
1169
1172
  function removePath(path, index, values) {
1170
1173
  const currentValue = getPath(path, values);
1171
1174
  if (!Array.isArray(currentValue)) {
@@ -1178,7 +1181,7 @@ function removePath(path, index, values) {
1178
1181
  );
1179
1182
  }
1180
1183
 
1181
- // ../../node_modules/@mantine/form/esm/hooks/use-form-list/use-form-list.mjs
1184
+ // ../../node_modules/.pnpm/@mantine+form@7.10.1_react@18.3.1/node_modules/@mantine/form/esm/hooks/use-form-list/use-form-list.mjs
1182
1185
  function useFormList({
1183
1186
  $values,
1184
1187
  $errors,
@@ -1211,11 +1214,11 @@ function useFormList({
1211
1214
  return { reorderListItem, removeListItem, insertListItem };
1212
1215
  }
1213
1216
 
1214
- // ../../node_modules/@mantine/form/esm/hooks/use-form-status/use-form-status.mjs
1217
+ // ../../node_modules/.pnpm/@mantine+form@7.10.1_react@18.3.1/node_modules/@mantine/form/esm/hooks/use-form-status/use-form-status.mjs
1215
1218
  var import_react23 = require("react");
1216
1219
  var import_fast_deep_equal = __toESM(require_fast_deep_equal(), 1);
1217
1220
 
1218
- // ../../node_modules/@mantine/form/esm/get-status/get-status.mjs
1221
+ // ../../node_modules/.pnpm/@mantine+form@7.10.1_react@18.3.1/node_modules/@mantine/form/esm/get-status/get-status.mjs
1219
1222
  function getStatus(status, path) {
1220
1223
  const paths = Object.keys(status);
1221
1224
  if (typeof path === "string") {
@@ -1225,7 +1228,7 @@ function getStatus(status, path) {
1225
1228
  return paths.some((statusPath) => status[statusPath]);
1226
1229
  }
1227
1230
 
1228
- // ../../node_modules/@mantine/form/esm/hooks/use-form-status/use-form-status.mjs
1231
+ // ../../node_modules/.pnpm/@mantine+form@7.10.1_react@18.3.1/node_modules/@mantine/form/esm/hooks/use-form-status/use-form-status.mjs
1229
1232
  function useFormStatus({
1230
1233
  initialDirty,
1231
1234
  initialTouched,
@@ -1329,7 +1332,7 @@ function useFormStatus({
1329
1332
  };
1330
1333
  }
1331
1334
 
1332
- // ../../node_modules/@mantine/form/esm/hooks/use-form-values/use-form-values.mjs
1335
+ // ../../node_modules/.pnpm/@mantine+form@7.10.1_react@18.3.1/node_modules/@mantine/form/esm/hooks/use-form-values/use-form-values.mjs
1333
1336
  var import_react24 = require("react");
1334
1337
  function useFormValues({
1335
1338
  initialValues,
@@ -1402,7 +1405,7 @@ function useFormValues({
1402
1405
  };
1403
1406
  }
1404
1407
 
1405
- // ../../node_modules/@mantine/form/esm/hooks/use-form-watch/use-form-watch.mjs
1408
+ // ../../node_modules/.pnpm/@mantine+form@7.10.1_react@18.3.1/node_modules/@mantine/form/esm/hooks/use-form-watch/use-form-watch.mjs
1406
1409
  var import_react25 = require("react");
1407
1410
  function useFormWatch({
1408
1411
  $status
@@ -1439,12 +1442,12 @@ function useFormWatch({
1439
1442
  };
1440
1443
  }
1441
1444
 
1442
- // ../../node_modules/@mantine/form/esm/paths/get-data-path.mjs
1445
+ // ../../node_modules/.pnpm/@mantine+form@7.10.1_react@18.3.1/node_modules/@mantine/form/esm/paths/get-data-path.mjs
1443
1446
  function getDataPath(formName, fieldPath) {
1444
1447
  return formName ? `${formName}-${fieldPath.toString()}` : fieldPath.toString();
1445
1448
  }
1446
1449
 
1447
- // ../../node_modules/@mantine/form/esm/validate/validate-values.mjs
1450
+ // ../../node_modules/.pnpm/@mantine+form@7.10.1_react@18.3.1/node_modules/@mantine/form/esm/validate/validate-values.mjs
1448
1451
  function getValidationResults(errors) {
1449
1452
  const filteredErrors = filterErrors(errors);
1450
1453
  return { hasErrors: Object.keys(filteredErrors).length > 0, errors: filteredErrors };
@@ -1482,7 +1485,7 @@ function validateValues(validate, values) {
1482
1485
  return getValidationResults(validateRulesRecord(validate, values));
1483
1486
  }
1484
1487
 
1485
- // ../../node_modules/@mantine/form/esm/validate/validate-field-value.mjs
1488
+ // ../../node_modules/.pnpm/@mantine+form@7.10.1_react@18.3.1/node_modules/@mantine/form/esm/validate/validate-field-value.mjs
1486
1489
  function validateFieldValue(path, rules, values) {
1487
1490
  if (typeof path !== "string") {
1488
1491
  return { hasError: false, error: null };
@@ -1494,10 +1497,10 @@ function validateFieldValue(path, rules, values) {
1494
1497
  return { hasError: !!pathInError, error: pathInError ? results.errors[pathInError] : null };
1495
1498
  }
1496
1499
 
1497
- // ../../node_modules/@mantine/form/esm/form-index.mjs
1500
+ // ../../node_modules/.pnpm/@mantine+form@7.10.1_react@18.3.1/node_modules/@mantine/form/esm/form-index.mjs
1498
1501
  var FORM_INDEX = "__MANTINE_FORM_INDEX__";
1499
1502
 
1500
- // ../../node_modules/@mantine/form/esm/validate/should-validate-on-change.mjs
1503
+ // ../../node_modules/.pnpm/@mantine+form@7.10.1_react@18.3.1/node_modules/@mantine/form/esm/validate/should-validate-on-change.mjs
1501
1504
  function shouldValidateOnChange(path, validateInputOnChange) {
1502
1505
  if (!validateInputOnChange) {
1503
1506
  return false;
@@ -1511,7 +1514,7 @@ function shouldValidateOnChange(path, validateInputOnChange) {
1511
1514
  return false;
1512
1515
  }
1513
1516
 
1514
- // ../../node_modules/@mantine/form/esm/use-form.mjs
1517
+ // ../../node_modules/.pnpm/@mantine+form@7.10.1_react@18.3.1/node_modules/@mantine/form/esm/use-form.mjs
1515
1518
  function useForm({
1516
1519
  name,
1517
1520
  mode = "controlled",
@@ -3358,7 +3361,6 @@ var ModuleGroupNodeTemplateFactory = class {
3358
3361
  // src/nodes/groups/module-group-node.tsx
3359
3362
  var import_layout32 = require("@awesome-flow/core/layout");
3360
3363
  var import_react39 = require("@xyflow/react");
3361
- var import_abstract36 = require("@awesome-flow/core/abstract");
3362
3364
  var import_react40 = require("react");
3363
3365
  var import_shallow = require("zustand/shallow");
3364
3366
  var import_core18 = require("@mantine/core");
@@ -3372,16 +3374,15 @@ function ModuleGroupNode({
3372
3374
  width,
3373
3375
  height
3374
3376
  }) {
3375
- const context = (0, import_react40.useContext)(import_abstract36.FlowContext);
3376
3377
  const updateNodeInternals = (0, import_react39.useUpdateNodeInternals)();
3377
3378
  const triggerNodeChanges = (0, import_react39.useStore)((s) => s.triggerNodeChanges);
3378
- const { groupNodes, setGroupCollapsed } = context.useFlowStore(
3379
+ const { groupNodes, setGroupCollapsed } = (0, import_hooks34.useFlowStore)(
3379
3380
  (0, import_react40.useCallback)(
3380
3381
  (state) => ({ groupNodes: state.groups[id], setGroupCollapsed: state.setGroupCollapsed }),
3381
3382
  []
3382
3383
  )
3383
3384
  );
3384
- const intersectingNode = context.useInteractivityStore(
3385
+ const intersectingNode = (0, import_hooks34.useInteractiveStore)(
3385
3386
  (0, import_react40.useCallback)((state) => state.nodeIntersectionTargets[id], [id]),
3386
3387
  import_shallow.shallow
3387
3388
  );
@@ -3558,4 +3559,3 @@ var noiseNodeTemplates = {
3558
3559
  noiseNodeTemplates,
3559
3560
  noiseNodeTypes
3560
3561
  });
3561
- //# sourceMappingURL=index.cjs.map
@@ -24,9 +24,9 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
24
24
  mod
25
25
  ));
26
26
 
27
- // ../../node_modules/fast-deep-equal/index.js
27
+ // ../../node_modules/.pnpm/fast-deep-equal@3.1.3/node_modules/fast-deep-equal/index.js
28
28
  var require_fast_deep_equal = __commonJS({
29
- "../../node_modules/fast-deep-equal/index.js"(exports, module) {
29
+ "../../node_modules/.pnpm/fast-deep-equal@3.1.3/node_modules/fast-deep-equal/index.js"(exports, module) {
30
30
  "use strict";
31
31
  module.exports = function equal(a, b) {
32
32
  if (a === b)
@@ -795,10 +795,10 @@ import {
795
795
  useUpdateNodeData as useUpdateNodeData7
796
796
  } from "@awesome-flow/core/hooks";
797
797
 
798
- // ../../node_modules/@mantine/form/esm/use-form.mjs
798
+ // ../../node_modules/.pnpm/@mantine+form@7.10.1_react@18.3.1/node_modules/@mantine/form/esm/use-form.mjs
799
799
  import { useState as useState11, useCallback as useCallback14 } from "react";
800
800
 
801
- // ../../node_modules/@mantine/form/esm/actions/actions.mjs
801
+ // ../../node_modules/.pnpm/@mantine+form@7.10.1_react@18.3.1/node_modules/@mantine/form/esm/actions/actions.mjs
802
802
  import { useLayoutEffect, useEffect as useEffect11 } from "react";
803
803
  function validateFormName(name) {
804
804
  if (!/^[0-9a-zA-Z-]+$/.test(name)) {
@@ -879,7 +879,7 @@ function useFormActions(name, form) {
879
879
  useFormEvent(`mantine-form:${name}:reset-touched`, form.resetTouched);
880
880
  }
881
881
 
882
- // ../../node_modules/@mantine/form/esm/get-input-on-change/get-input-on-change.mjs
882
+ // ../../node_modules/.pnpm/@mantine+form@7.10.1_react@18.3.1/node_modules/@mantine/form/esm/get-input-on-change/get-input-on-change.mjs
883
883
  function getInputOnChange(setValue) {
884
884
  return (val) => {
885
885
  if (!val) {
@@ -903,10 +903,10 @@ function getInputOnChange(setValue) {
903
903
  };
904
904
  }
905
905
 
906
- // ../../node_modules/@mantine/form/esm/hooks/use-form-errors/use-form-errors.mjs
907
- import { useState as useState8, useCallback as useCallback9 } from "react";
906
+ // ../../node_modules/.pnpm/@mantine+form@7.10.1_react@18.3.1/node_modules/@mantine/form/esm/hooks/use-form-errors/use-form-errors.mjs
907
+ import { useState as useState8, useRef, useCallback as useCallback9 } from "react";
908
908
 
909
- // ../../node_modules/@mantine/form/esm/hooks/use-form-errors/filter-errors/filter-errors.mjs
909
+ // ../../node_modules/.pnpm/@mantine+form@7.10.1_react@18.3.1/node_modules/@mantine/form/esm/hooks/use-form-errors/filter-errors/filter-errors.mjs
910
910
  function filterErrors(errors) {
911
911
  if (errors === null || typeof errors !== "object") {
912
912
  return {};
@@ -920,18 +920,21 @@ function filterErrors(errors) {
920
920
  }, {});
921
921
  }
922
922
 
923
- // ../../node_modules/@mantine/form/esm/hooks/use-form-errors/use-form-errors.mjs
923
+ // ../../node_modules/.pnpm/@mantine+form@7.10.1_react@18.3.1/node_modules/@mantine/form/esm/hooks/use-form-errors/use-form-errors.mjs
924
924
  function useFormErrors(initialErrors) {
925
925
  const [errorsState, setErrorsState] = useState8(filterErrors(initialErrors));
926
+ const errorsRef = useRef(errorsState);
926
927
  const setErrors = useCallback9((errors) => {
927
- setErrorsState(
928
- (current) => filterErrors(typeof errors === "function" ? errors(current) : errors)
929
- );
928
+ setErrorsState((current) => {
929
+ const newErrors = filterErrors(typeof errors === "function" ? errors(current) : errors);
930
+ errorsRef.current = newErrors;
931
+ return newErrors;
932
+ });
930
933
  }, []);
931
- const clearErrors = useCallback9(() => setErrorsState({}), []);
934
+ const clearErrors = useCallback9(() => setErrors({}), []);
932
935
  const clearFieldError = useCallback9(
933
936
  (path) => {
934
- if (errorsState[path] === void 0) {
937
+ if (errorsRef.current[path] === void 0) {
935
938
  return;
936
939
  }
937
940
  setErrors((current) => {
@@ -946,7 +949,7 @@ function useFormErrors(initialErrors) {
946
949
  (path, error) => {
947
950
  if (error == null || error === false) {
948
951
  clearFieldError(path);
949
- } else if (errorsState[path] !== error) {
952
+ } else if (errorsRef.current[path] !== error) {
950
953
  setErrors((current) => ({ ...current, [path]: error }));
951
954
  }
952
955
  },
@@ -961,10 +964,10 @@ function useFormErrors(initialErrors) {
961
964
  };
962
965
  }
963
966
 
964
- // ../../node_modules/@mantine/form/esm/hooks/use-form-list/use-form-list.mjs
967
+ // ../../node_modules/.pnpm/@mantine+form@7.10.1_react@18.3.1/node_modules/@mantine/form/esm/hooks/use-form-list/use-form-list.mjs
965
968
  import { useCallback as useCallback10 } from "react";
966
969
 
967
- // ../../node_modules/@mantine/form/esm/lists/clear-list-state.mjs
970
+ // ../../node_modules/.pnpm/@mantine+form@7.10.1_react@18.3.1/node_modules/@mantine/form/esm/lists/clear-list-state.mjs
968
971
  function clearListState(field, state) {
969
972
  if (state === null || typeof state !== "object") {
970
973
  return {};
@@ -978,7 +981,7 @@ function clearListState(field, state) {
978
981
  return clone;
979
982
  }
980
983
 
981
- // ../../node_modules/@mantine/form/esm/lists/change-error-indices.mjs
984
+ // ../../node_modules/.pnpm/@mantine+form@7.10.1_react@18.3.1/node_modules/@mantine/form/esm/lists/change-error-indices.mjs
982
985
  function getIndexFromKeyAfterPath(key, path) {
983
986
  const split = key.substring(path.length + 1).split(".")[0];
984
987
  return parseInt(split, 10);
@@ -1018,7 +1021,7 @@ function changeErrorIndices(path, index, errors, change) {
1018
1021
  return cloned;
1019
1022
  }
1020
1023
 
1021
- // ../../node_modules/@mantine/form/esm/lists/reorder-errors.mjs
1024
+ // ../../node_modules/.pnpm/@mantine+form@7.10.1_react@18.3.1/node_modules/@mantine/form/esm/lists/reorder-errors.mjs
1022
1025
  function reorderErrors(path, { from, to }, errors) {
1023
1026
  const oldKeyStart = `${path}.${from}`;
1024
1027
  const newKeyStart = `${path}.${to}`;
@@ -1046,7 +1049,7 @@ function reorderErrors(path, { from, to }, errors) {
1046
1049
  return clone;
1047
1050
  }
1048
1051
 
1049
- // ../../node_modules/klona/full/index.mjs
1052
+ // ../../node_modules/.pnpm/klona@2.0.6/node_modules/klona/full/index.mjs
1050
1053
  function set(obj, key, val) {
1051
1054
  if (typeof val.value === "object")
1052
1055
  val.value = klona(val.value);
@@ -1097,7 +1100,7 @@ function klona(x) {
1097
1100
  return tmp || x;
1098
1101
  }
1099
1102
 
1100
- // ../../node_modules/@mantine/form/esm/paths/get-splitted-path.mjs
1103
+ // ../../node_modules/.pnpm/@mantine+form@7.10.1_react@18.3.1/node_modules/@mantine/form/esm/paths/get-splitted-path.mjs
1101
1104
  function getSplittedPath(path) {
1102
1105
  if (typeof path !== "string") {
1103
1106
  return [];
@@ -1105,7 +1108,7 @@ function getSplittedPath(path) {
1105
1108
  return path.split(".");
1106
1109
  }
1107
1110
 
1108
- // ../../node_modules/@mantine/form/esm/paths/get-path.mjs
1111
+ // ../../node_modules/.pnpm/@mantine+form@7.10.1_react@18.3.1/node_modules/@mantine/form/esm/paths/get-path.mjs
1109
1112
  function getPath(path, values) {
1110
1113
  const splittedPath = getSplittedPath(path);
1111
1114
  if (splittedPath.length === 0 || typeof values !== "object" || values === null) {
@@ -1121,7 +1124,7 @@ function getPath(path, values) {
1121
1124
  return value;
1122
1125
  }
1123
1126
 
1124
- // ../../node_modules/@mantine/form/esm/paths/set-path.mjs
1127
+ // ../../node_modules/.pnpm/@mantine+form@7.10.1_react@18.3.1/node_modules/@mantine/form/esm/paths/set-path.mjs
1125
1128
  function setPath(path, value, values) {
1126
1129
  const splittedPath = getSplittedPath(path);
1127
1130
  if (splittedPath.length === 0) {
@@ -1143,7 +1146,7 @@ function setPath(path, value, values) {
1143
1146
  return cloned;
1144
1147
  }
1145
1148
 
1146
- // ../../node_modules/@mantine/form/esm/paths/reorder-path.mjs
1149
+ // ../../node_modules/.pnpm/@mantine+form@7.10.1_react@18.3.1/node_modules/@mantine/form/esm/paths/reorder-path.mjs
1147
1150
  function reorderPath(path, { from, to }, values) {
1148
1151
  const currentValue = getPath(path, values);
1149
1152
  if (!Array.isArray(currentValue)) {
@@ -1156,7 +1159,7 @@ function reorderPath(path, { from, to }, values) {
1156
1159
  return setPath(path, cloned, values);
1157
1160
  }
1158
1161
 
1159
- // ../../node_modules/@mantine/form/esm/paths/insert-path.mjs
1162
+ // ../../node_modules/.pnpm/@mantine+form@7.10.1_react@18.3.1/node_modules/@mantine/form/esm/paths/insert-path.mjs
1160
1163
  function insertPath(path, value, index, values) {
1161
1164
  const currentValue = getPath(path, values);
1162
1165
  if (!Array.isArray(currentValue)) {
@@ -1167,7 +1170,7 @@ function insertPath(path, value, index, values) {
1167
1170
  return setPath(path, cloned, values);
1168
1171
  }
1169
1172
 
1170
- // ../../node_modules/@mantine/form/esm/paths/remove-path.mjs
1173
+ // ../../node_modules/.pnpm/@mantine+form@7.10.1_react@18.3.1/node_modules/@mantine/form/esm/paths/remove-path.mjs
1171
1174
  function removePath(path, index, values) {
1172
1175
  const currentValue = getPath(path, values);
1173
1176
  if (!Array.isArray(currentValue)) {
@@ -1180,7 +1183,7 @@ function removePath(path, index, values) {
1180
1183
  );
1181
1184
  }
1182
1185
 
1183
- // ../../node_modules/@mantine/form/esm/hooks/use-form-list/use-form-list.mjs
1186
+ // ../../node_modules/.pnpm/@mantine+form@7.10.1_react@18.3.1/node_modules/@mantine/form/esm/hooks/use-form-list/use-form-list.mjs
1184
1187
  function useFormList({
1185
1188
  $values,
1186
1189
  $errors,
@@ -1213,11 +1216,11 @@ function useFormList({
1213
1216
  return { reorderListItem, removeListItem, insertListItem };
1214
1217
  }
1215
1218
 
1216
- // ../../node_modules/@mantine/form/esm/hooks/use-form-status/use-form-status.mjs
1219
+ // ../../node_modules/.pnpm/@mantine+form@7.10.1_react@18.3.1/node_modules/@mantine/form/esm/hooks/use-form-status/use-form-status.mjs
1217
1220
  var import_fast_deep_equal = __toESM(require_fast_deep_equal(), 1);
1218
- import { useState as useState9, useRef, useCallback as useCallback11 } from "react";
1221
+ import { useState as useState9, useRef as useRef2, useCallback as useCallback11 } from "react";
1219
1222
 
1220
- // ../../node_modules/@mantine/form/esm/get-status/get-status.mjs
1223
+ // ../../node_modules/.pnpm/@mantine+form@7.10.1_react@18.3.1/node_modules/@mantine/form/esm/get-status/get-status.mjs
1221
1224
  function getStatus(status, path) {
1222
1225
  const paths = Object.keys(status);
1223
1226
  if (typeof path === "string") {
@@ -1227,7 +1230,7 @@ function getStatus(status, path) {
1227
1230
  return paths.some((statusPath) => status[statusPath]);
1228
1231
  }
1229
1232
 
1230
- // ../../node_modules/@mantine/form/esm/hooks/use-form-status/use-form-status.mjs
1233
+ // ../../node_modules/.pnpm/@mantine+form@7.10.1_react@18.3.1/node_modules/@mantine/form/esm/hooks/use-form-status/use-form-status.mjs
1231
1234
  function useFormStatus({
1232
1235
  initialDirty,
1233
1236
  initialTouched,
@@ -1236,8 +1239,8 @@ function useFormStatus({
1236
1239
  }) {
1237
1240
  const [touchedState, setTouchedState] = useState9(initialTouched);
1238
1241
  const [dirtyState, setDirtyState] = useState9(initialDirty);
1239
- const touchedRef = useRef(initialTouched);
1240
- const dirtyRef = useRef(initialDirty);
1242
+ const touchedRef = useRef2(initialTouched);
1243
+ const dirtyRef = useRef2(initialDirty);
1241
1244
  const setTouched = useCallback11((values) => {
1242
1245
  const resolvedValues = typeof values === "function" ? values(touchedRef.current) : values;
1243
1246
  touchedRef.current = resolvedValues;
@@ -1331,17 +1334,17 @@ function useFormStatus({
1331
1334
  };
1332
1335
  }
1333
1336
 
1334
- // ../../node_modules/@mantine/form/esm/hooks/use-form-values/use-form-values.mjs
1335
- import { useRef as useRef2, useState as useState10, useCallback as useCallback12 } from "react";
1337
+ // ../../node_modules/.pnpm/@mantine+form@7.10.1_react@18.3.1/node_modules/@mantine/form/esm/hooks/use-form-values/use-form-values.mjs
1338
+ import { useRef as useRef3, useState as useState10, useCallback as useCallback12 } from "react";
1336
1339
  function useFormValues({
1337
1340
  initialValues,
1338
1341
  onValuesChange,
1339
1342
  mode
1340
1343
  }) {
1341
- const initialized = useRef2(false);
1344
+ const initialized = useRef3(false);
1342
1345
  const [stateValues, setStateValues] = useState10(initialValues || {});
1343
- const refValues = useRef2(stateValues);
1344
- const valuesSnapshot = useRef2(stateValues);
1346
+ const refValues = useRef3(stateValues);
1347
+ const valuesSnapshot = useRef3(stateValues);
1345
1348
  const setValues = useCallback12(
1346
1349
  ({
1347
1350
  values,
@@ -1404,12 +1407,12 @@ function useFormValues({
1404
1407
  };
1405
1408
  }
1406
1409
 
1407
- // ../../node_modules/@mantine/form/esm/hooks/use-form-watch/use-form-watch.mjs
1408
- import { useRef as useRef3, useCallback as useCallback13, useEffect as useEffect12 } from "react";
1410
+ // ../../node_modules/.pnpm/@mantine+form@7.10.1_react@18.3.1/node_modules/@mantine/form/esm/hooks/use-form-watch/use-form-watch.mjs
1411
+ import { useRef as useRef4, useCallback as useCallback13, useEffect as useEffect12 } from "react";
1409
1412
  function useFormWatch({
1410
1413
  $status
1411
1414
  }) {
1412
- const subscribers = useRef3(
1415
+ const subscribers = useRef4(
1413
1416
  {}
1414
1417
  );
1415
1418
  const watch = useCallback13((path, callback) => {
@@ -1441,12 +1444,12 @@ function useFormWatch({
1441
1444
  };
1442
1445
  }
1443
1446
 
1444
- // ../../node_modules/@mantine/form/esm/paths/get-data-path.mjs
1447
+ // ../../node_modules/.pnpm/@mantine+form@7.10.1_react@18.3.1/node_modules/@mantine/form/esm/paths/get-data-path.mjs
1445
1448
  function getDataPath(formName, fieldPath) {
1446
1449
  return formName ? `${formName}-${fieldPath.toString()}` : fieldPath.toString();
1447
1450
  }
1448
1451
 
1449
- // ../../node_modules/@mantine/form/esm/validate/validate-values.mjs
1452
+ // ../../node_modules/.pnpm/@mantine+form@7.10.1_react@18.3.1/node_modules/@mantine/form/esm/validate/validate-values.mjs
1450
1453
  function getValidationResults(errors) {
1451
1454
  const filteredErrors = filterErrors(errors);
1452
1455
  return { hasErrors: Object.keys(filteredErrors).length > 0, errors: filteredErrors };
@@ -1484,7 +1487,7 @@ function validateValues(validate, values) {
1484
1487
  return getValidationResults(validateRulesRecord(validate, values));
1485
1488
  }
1486
1489
 
1487
- // ../../node_modules/@mantine/form/esm/validate/validate-field-value.mjs
1490
+ // ../../node_modules/.pnpm/@mantine+form@7.10.1_react@18.3.1/node_modules/@mantine/form/esm/validate/validate-field-value.mjs
1488
1491
  function validateFieldValue(path, rules, values) {
1489
1492
  if (typeof path !== "string") {
1490
1493
  return { hasError: false, error: null };
@@ -1496,10 +1499,10 @@ function validateFieldValue(path, rules, values) {
1496
1499
  return { hasError: !!pathInError, error: pathInError ? results.errors[pathInError] : null };
1497
1500
  }
1498
1501
 
1499
- // ../../node_modules/@mantine/form/esm/form-index.mjs
1502
+ // ../../node_modules/.pnpm/@mantine+form@7.10.1_react@18.3.1/node_modules/@mantine/form/esm/form-index.mjs
1500
1503
  var FORM_INDEX = "__MANTINE_FORM_INDEX__";
1501
1504
 
1502
- // ../../node_modules/@mantine/form/esm/validate/should-validate-on-change.mjs
1505
+ // ../../node_modules/.pnpm/@mantine+form@7.10.1_react@18.3.1/node_modules/@mantine/form/esm/validate/should-validate-on-change.mjs
1503
1506
  function shouldValidateOnChange(path, validateInputOnChange) {
1504
1507
  if (!validateInputOnChange) {
1505
1508
  return false;
@@ -1513,7 +1516,7 @@ function shouldValidateOnChange(path, validateInputOnChange) {
1513
1516
  return false;
1514
1517
  }
1515
1518
 
1516
- // ../../node_modules/@mantine/form/esm/use-form.mjs
1519
+ // ../../node_modules/.pnpm/@mantine+form@7.10.1_react@18.3.1/node_modules/@mantine/form/esm/use-form.mjs
1517
1520
  function useForm({
1518
1521
  name,
1519
1522
  mode = "controlled",
@@ -3388,11 +3391,15 @@ var ModuleGroupNodeTemplateFactory = class {
3388
3391
  // src/nodes/groups/module-group-node.tsx
3389
3392
  import { NodeContainer as NodeContainer32, NodeCollapse, NodeTrackConnections as NodeTrackConnections27 } from "@awesome-flow/core/layout";
3390
3393
  import { NodeResizer, useStore, useUpdateNodeInternals } from "@xyflow/react";
3391
- import { FlowContext } from "@awesome-flow/core/abstract";
3392
- import { useCallback as useCallback21, useContext, useEffect as useEffect23, useMemo as useMemo12 } from "react";
3394
+ import { useCallback as useCallback21, useEffect as useEffect23, useMemo as useMemo12 } from "react";
3393
3395
  import { shallow } from "zustand/shallow";
3394
3396
  import { Badge, Group as Group15 } from "@mantine/core";
3395
- import { useIncomingComputedData as useIncomingComputedData17, useUpdateNodeComputedData as useUpdateNodeComputedData30 } from "@awesome-flow/core/hooks";
3397
+ import {
3398
+ useFlowStore,
3399
+ useIncomingComputedData as useIncomingComputedData17,
3400
+ useInteractiveStore,
3401
+ useUpdateNodeComputedData as useUpdateNodeComputedData30
3402
+ } from "@awesome-flow/core/hooks";
3396
3403
  import { jsx as jsx32, jsxs as jsxs28 } from "react/jsx-runtime";
3397
3404
  function ModuleGroupNode({
3398
3405
  id,
@@ -3402,16 +3409,15 @@ function ModuleGroupNode({
3402
3409
  width,
3403
3410
  height
3404
3411
  }) {
3405
- const context = useContext(FlowContext);
3406
3412
  const updateNodeInternals = useUpdateNodeInternals();
3407
3413
  const triggerNodeChanges = useStore((s) => s.triggerNodeChanges);
3408
- const { groupNodes, setGroupCollapsed } = context.useFlowStore(
3414
+ const { groupNodes, setGroupCollapsed } = useFlowStore(
3409
3415
  useCallback21(
3410
3416
  (state) => ({ groupNodes: state.groups[id], setGroupCollapsed: state.setGroupCollapsed }),
3411
3417
  []
3412
3418
  )
3413
3419
  );
3414
- const intersectingNode = context.useInteractivityStore(
3420
+ const intersectingNode = useInteractiveStore(
3415
3421
  useCallback21((state) => state.nodeIntersectionTargets[id], [id]),
3416
3422
  shallow
3417
3423
  );
@@ -3587,4 +3593,3 @@ export {
3587
3593
  noiseNodeTemplates,
3588
3594
  noiseNodeTypes
3589
3595
  };
3590
- //# sourceMappingURL=index.js.map
@@ -68,4 +68,3 @@ var SimplexModule = class extends import_Module.default {
68
68
  NormalizeNoiseModule,
69
69
  SimplexModule
70
70
  });
71
- //# sourceMappingURL=index.cjs.map
@@ -31,4 +31,3 @@ export {
31
31
  NormalizeNoiseModule,
32
32
  SimplexModule
33
33
  };
34
- //# sourceMappingURL=index.js.map