@awesome-flow/noise 0.5.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.
@@ -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)
@@ -207,10 +207,10 @@ var import_layout4 = require("@awesome-flow/core/layout");
207
207
  var import_core2 = require("@mantine/core");
208
208
  var import_hooks4 = require("@awesome-flow/core/hooks");
209
209
 
210
- // ../../node_modules/@mantine/form/esm/use-form.mjs
210
+ // ../../node_modules/.pnpm/@mantine+form@7.10.1_react@18.3.1/node_modules/@mantine/form/esm/use-form.mjs
211
211
  var import_react10 = require("react");
212
212
 
213
- // ../../node_modules/@mantine/form/esm/actions/actions.mjs
213
+ // ../../node_modules/.pnpm/@mantine+form@7.10.1_react@18.3.1/node_modules/@mantine/form/esm/actions/actions.mjs
214
214
  var import_react4 = require("react");
215
215
  function validateFormName(name) {
216
216
  if (!/^[0-9a-zA-Z-]+$/.test(name)) {
@@ -291,7 +291,7 @@ function useFormActions(name, form) {
291
291
  useFormEvent(`mantine-form:${name}:reset-touched`, form.resetTouched);
292
292
  }
293
293
 
294
- // ../../node_modules/@mantine/form/esm/get-input-on-change/get-input-on-change.mjs
294
+ // ../../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
295
295
  function getInputOnChange(setValue) {
296
296
  return (val) => {
297
297
  if (!val) {
@@ -315,10 +315,10 @@ function getInputOnChange(setValue) {
315
315
  };
316
316
  }
317
317
 
318
- // ../../node_modules/@mantine/form/esm/hooks/use-form-errors/use-form-errors.mjs
318
+ // ../../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
319
319
  var import_react5 = require("react");
320
320
 
321
- // ../../node_modules/@mantine/form/esm/hooks/use-form-errors/filter-errors/filter-errors.mjs
321
+ // ../../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
322
322
  function filterErrors(errors) {
323
323
  if (errors === null || typeof errors !== "object") {
324
324
  return {};
@@ -332,18 +332,21 @@ function filterErrors(errors) {
332
332
  }, {});
333
333
  }
334
334
 
335
- // ../../node_modules/@mantine/form/esm/hooks/use-form-errors/use-form-errors.mjs
335
+ // ../../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
336
336
  function useFormErrors(initialErrors) {
337
337
  const [errorsState, setErrorsState] = (0, import_react5.useState)(filterErrors(initialErrors));
338
+ const errorsRef = (0, import_react5.useRef)(errorsState);
338
339
  const setErrors = (0, import_react5.useCallback)((errors) => {
339
- setErrorsState(
340
- (current) => filterErrors(typeof errors === "function" ? errors(current) : errors)
341
- );
340
+ setErrorsState((current) => {
341
+ const newErrors = filterErrors(typeof errors === "function" ? errors(current) : errors);
342
+ errorsRef.current = newErrors;
343
+ return newErrors;
344
+ });
342
345
  }, []);
343
- const clearErrors = (0, import_react5.useCallback)(() => setErrorsState({}), []);
346
+ const clearErrors = (0, import_react5.useCallback)(() => setErrors({}), []);
344
347
  const clearFieldError = (0, import_react5.useCallback)(
345
348
  (path) => {
346
- if (errorsState[path] === void 0) {
349
+ if (errorsRef.current[path] === void 0) {
347
350
  return;
348
351
  }
349
352
  setErrors((current) => {
@@ -358,7 +361,7 @@ function useFormErrors(initialErrors) {
358
361
  (path, error) => {
359
362
  if (error == null || error === false) {
360
363
  clearFieldError(path);
361
- } else if (errorsState[path] !== error) {
364
+ } else if (errorsRef.current[path] !== error) {
362
365
  setErrors((current) => ({ ...current, [path]: error }));
363
366
  }
364
367
  },
@@ -373,10 +376,10 @@ function useFormErrors(initialErrors) {
373
376
  };
374
377
  }
375
378
 
376
- // ../../node_modules/@mantine/form/esm/hooks/use-form-list/use-form-list.mjs
379
+ // ../../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
377
380
  var import_react6 = require("react");
378
381
 
379
- // ../../node_modules/@mantine/form/esm/lists/clear-list-state.mjs
382
+ // ../../node_modules/.pnpm/@mantine+form@7.10.1_react@18.3.1/node_modules/@mantine/form/esm/lists/clear-list-state.mjs
380
383
  function clearListState(field, state) {
381
384
  if (state === null || typeof state !== "object") {
382
385
  return {};
@@ -390,7 +393,7 @@ function clearListState(field, state) {
390
393
  return clone;
391
394
  }
392
395
 
393
- // ../../node_modules/@mantine/form/esm/lists/change-error-indices.mjs
396
+ // ../../node_modules/.pnpm/@mantine+form@7.10.1_react@18.3.1/node_modules/@mantine/form/esm/lists/change-error-indices.mjs
394
397
  function getIndexFromKeyAfterPath(key, path) {
395
398
  const split = key.substring(path.length + 1).split(".")[0];
396
399
  return parseInt(split, 10);
@@ -430,7 +433,7 @@ function changeErrorIndices(path, index, errors, change) {
430
433
  return cloned;
431
434
  }
432
435
 
433
- // ../../node_modules/@mantine/form/esm/lists/reorder-errors.mjs
436
+ // ../../node_modules/.pnpm/@mantine+form@7.10.1_react@18.3.1/node_modules/@mantine/form/esm/lists/reorder-errors.mjs
434
437
  function reorderErrors(path, { from, to }, errors) {
435
438
  const oldKeyStart = `${path}.${from}`;
436
439
  const newKeyStart = `${path}.${to}`;
@@ -458,7 +461,7 @@ function reorderErrors(path, { from, to }, errors) {
458
461
  return clone;
459
462
  }
460
463
 
461
- // ../../node_modules/klona/full/index.mjs
464
+ // ../../node_modules/.pnpm/klona@2.0.6/node_modules/klona/full/index.mjs
462
465
  function set(obj, key, val) {
463
466
  if (typeof val.value === "object")
464
467
  val.value = klona(val.value);
@@ -509,7 +512,7 @@ function klona(x) {
509
512
  return tmp || x;
510
513
  }
511
514
 
512
- // ../../node_modules/@mantine/form/esm/paths/get-splitted-path.mjs
515
+ // ../../node_modules/.pnpm/@mantine+form@7.10.1_react@18.3.1/node_modules/@mantine/form/esm/paths/get-splitted-path.mjs
513
516
  function getSplittedPath(path) {
514
517
  if (typeof path !== "string") {
515
518
  return [];
@@ -517,7 +520,7 @@ function getSplittedPath(path) {
517
520
  return path.split(".");
518
521
  }
519
522
 
520
- // ../../node_modules/@mantine/form/esm/paths/get-path.mjs
523
+ // ../../node_modules/.pnpm/@mantine+form@7.10.1_react@18.3.1/node_modules/@mantine/form/esm/paths/get-path.mjs
521
524
  function getPath(path, values) {
522
525
  const splittedPath = getSplittedPath(path);
523
526
  if (splittedPath.length === 0 || typeof values !== "object" || values === null) {
@@ -533,7 +536,7 @@ function getPath(path, values) {
533
536
  return value;
534
537
  }
535
538
 
536
- // ../../node_modules/@mantine/form/esm/paths/set-path.mjs
539
+ // ../../node_modules/.pnpm/@mantine+form@7.10.1_react@18.3.1/node_modules/@mantine/form/esm/paths/set-path.mjs
537
540
  function setPath(path, value, values) {
538
541
  const splittedPath = getSplittedPath(path);
539
542
  if (splittedPath.length === 0) {
@@ -555,7 +558,7 @@ function setPath(path, value, values) {
555
558
  return cloned;
556
559
  }
557
560
 
558
- // ../../node_modules/@mantine/form/esm/paths/reorder-path.mjs
561
+ // ../../node_modules/.pnpm/@mantine+form@7.10.1_react@18.3.1/node_modules/@mantine/form/esm/paths/reorder-path.mjs
559
562
  function reorderPath(path, { from, to }, values) {
560
563
  const currentValue = getPath(path, values);
561
564
  if (!Array.isArray(currentValue)) {
@@ -568,7 +571,7 @@ function reorderPath(path, { from, to }, values) {
568
571
  return setPath(path, cloned, values);
569
572
  }
570
573
 
571
- // ../../node_modules/@mantine/form/esm/paths/insert-path.mjs
574
+ // ../../node_modules/.pnpm/@mantine+form@7.10.1_react@18.3.1/node_modules/@mantine/form/esm/paths/insert-path.mjs
572
575
  function insertPath(path, value, index, values) {
573
576
  const currentValue = getPath(path, values);
574
577
  if (!Array.isArray(currentValue)) {
@@ -579,7 +582,7 @@ function insertPath(path, value, index, values) {
579
582
  return setPath(path, cloned, values);
580
583
  }
581
584
 
582
- // ../../node_modules/@mantine/form/esm/paths/remove-path.mjs
585
+ // ../../node_modules/.pnpm/@mantine+form@7.10.1_react@18.3.1/node_modules/@mantine/form/esm/paths/remove-path.mjs
583
586
  function removePath(path, index, values) {
584
587
  const currentValue = getPath(path, values);
585
588
  if (!Array.isArray(currentValue)) {
@@ -592,7 +595,7 @@ function removePath(path, index, values) {
592
595
  );
593
596
  }
594
597
 
595
- // ../../node_modules/@mantine/form/esm/hooks/use-form-list/use-form-list.mjs
598
+ // ../../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
596
599
  function useFormList({
597
600
  $values,
598
601
  $errors,
@@ -625,11 +628,11 @@ function useFormList({
625
628
  return { reorderListItem, removeListItem, insertListItem };
626
629
  }
627
630
 
628
- // ../../node_modules/@mantine/form/esm/hooks/use-form-status/use-form-status.mjs
631
+ // ../../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
629
632
  var import_react7 = require("react");
630
633
  var import_fast_deep_equal = __toESM(require_fast_deep_equal(), 1);
631
634
 
632
- // ../../node_modules/@mantine/form/esm/get-status/get-status.mjs
635
+ // ../../node_modules/.pnpm/@mantine+form@7.10.1_react@18.3.1/node_modules/@mantine/form/esm/get-status/get-status.mjs
633
636
  function getStatus(status, path) {
634
637
  const paths = Object.keys(status);
635
638
  if (typeof path === "string") {
@@ -639,7 +642,7 @@ function getStatus(status, path) {
639
642
  return paths.some((statusPath) => status[statusPath]);
640
643
  }
641
644
 
642
- // ../../node_modules/@mantine/form/esm/hooks/use-form-status/use-form-status.mjs
645
+ // ../../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
643
646
  function useFormStatus({
644
647
  initialDirty,
645
648
  initialTouched,
@@ -743,7 +746,7 @@ function useFormStatus({
743
746
  };
744
747
  }
745
748
 
746
- // ../../node_modules/@mantine/form/esm/hooks/use-form-values/use-form-values.mjs
749
+ // ../../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
747
750
  var import_react8 = require("react");
748
751
  function useFormValues({
749
752
  initialValues,
@@ -816,7 +819,7 @@ function useFormValues({
816
819
  };
817
820
  }
818
821
 
819
- // ../../node_modules/@mantine/form/esm/hooks/use-form-watch/use-form-watch.mjs
822
+ // ../../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
820
823
  var import_react9 = require("react");
821
824
  function useFormWatch({
822
825
  $status
@@ -853,12 +856,12 @@ function useFormWatch({
853
856
  };
854
857
  }
855
858
 
856
- // ../../node_modules/@mantine/form/esm/paths/get-data-path.mjs
859
+ // ../../node_modules/.pnpm/@mantine+form@7.10.1_react@18.3.1/node_modules/@mantine/form/esm/paths/get-data-path.mjs
857
860
  function getDataPath(formName, fieldPath) {
858
861
  return formName ? `${formName}-${fieldPath.toString()}` : fieldPath.toString();
859
862
  }
860
863
 
861
- // ../../node_modules/@mantine/form/esm/validate/validate-values.mjs
864
+ // ../../node_modules/.pnpm/@mantine+form@7.10.1_react@18.3.1/node_modules/@mantine/form/esm/validate/validate-values.mjs
862
865
  function getValidationResults(errors) {
863
866
  const filteredErrors = filterErrors(errors);
864
867
  return { hasErrors: Object.keys(filteredErrors).length > 0, errors: filteredErrors };
@@ -896,7 +899,7 @@ function validateValues(validate, values) {
896
899
  return getValidationResults(validateRulesRecord(validate, values));
897
900
  }
898
901
 
899
- // ../../node_modules/@mantine/form/esm/validate/validate-field-value.mjs
902
+ // ../../node_modules/.pnpm/@mantine+form@7.10.1_react@18.3.1/node_modules/@mantine/form/esm/validate/validate-field-value.mjs
900
903
  function validateFieldValue(path, rules, values) {
901
904
  if (typeof path !== "string") {
902
905
  return { hasError: false, error: null };
@@ -908,10 +911,10 @@ function validateFieldValue(path, rules, values) {
908
911
  return { hasError: !!pathInError, error: pathInError ? results.errors[pathInError] : null };
909
912
  }
910
913
 
911
- // ../../node_modules/@mantine/form/esm/form-index.mjs
914
+ // ../../node_modules/.pnpm/@mantine+form@7.10.1_react@18.3.1/node_modules/@mantine/form/esm/form-index.mjs
912
915
  var FORM_INDEX = "__MANTINE_FORM_INDEX__";
913
916
 
914
- // ../../node_modules/@mantine/form/esm/validate/should-validate-on-change.mjs
917
+ // ../../node_modules/.pnpm/@mantine+form@7.10.1_react@18.3.1/node_modules/@mantine/form/esm/validate/should-validate-on-change.mjs
915
918
  function shouldValidateOnChange(path, validateInputOnChange) {
916
919
  if (!validateInputOnChange) {
917
920
  return false;
@@ -925,7 +928,7 @@ function shouldValidateOnChange(path, validateInputOnChange) {
925
928
  return false;
926
929
  }
927
930
 
928
- // ../../node_modules/@mantine/form/esm/use-form.mjs
931
+ // ../../node_modules/.pnpm/@mantine+form@7.10.1_react@18.3.1/node_modules/@mantine/form/esm/use-form.mjs
929
932
  function useForm({
930
933
  name,
931
934
  mode = "controlled",
@@ -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)
@@ -205,10 +205,10 @@ import {
205
205
  useUpdateNodeData as useUpdateNodeData3
206
206
  } from "@awesome-flow/core/hooks";
207
207
 
208
- // ../../node_modules/@mantine/form/esm/use-form.mjs
208
+ // ../../node_modules/.pnpm/@mantine+form@7.10.1_react@18.3.1/node_modules/@mantine/form/esm/use-form.mjs
209
209
  import { useState as useState5, useCallback as useCallback7 } from "react";
210
210
 
211
- // ../../node_modules/@mantine/form/esm/actions/actions.mjs
211
+ // ../../node_modules/.pnpm/@mantine+form@7.10.1_react@18.3.1/node_modules/@mantine/form/esm/actions/actions.mjs
212
212
  import { useLayoutEffect, useEffect as useEffect4 } from "react";
213
213
  function validateFormName(name) {
214
214
  if (!/^[0-9a-zA-Z-]+$/.test(name)) {
@@ -289,7 +289,7 @@ function useFormActions(name, form) {
289
289
  useFormEvent(`mantine-form:${name}:reset-touched`, form.resetTouched);
290
290
  }
291
291
 
292
- // ../../node_modules/@mantine/form/esm/get-input-on-change/get-input-on-change.mjs
292
+ // ../../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
293
293
  function getInputOnChange(setValue) {
294
294
  return (val) => {
295
295
  if (!val) {
@@ -313,10 +313,10 @@ function getInputOnChange(setValue) {
313
313
  };
314
314
  }
315
315
 
316
- // ../../node_modules/@mantine/form/esm/hooks/use-form-errors/use-form-errors.mjs
317
- import { useState as useState2, useCallback as useCallback2 } from "react";
316
+ // ../../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
317
+ import { useState as useState2, useRef, useCallback as useCallback2 } from "react";
318
318
 
319
- // ../../node_modules/@mantine/form/esm/hooks/use-form-errors/filter-errors/filter-errors.mjs
319
+ // ../../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
320
320
  function filterErrors(errors) {
321
321
  if (errors === null || typeof errors !== "object") {
322
322
  return {};
@@ -330,18 +330,21 @@ function filterErrors(errors) {
330
330
  }, {});
331
331
  }
332
332
 
333
- // ../../node_modules/@mantine/form/esm/hooks/use-form-errors/use-form-errors.mjs
333
+ // ../../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
334
334
  function useFormErrors(initialErrors) {
335
335
  const [errorsState, setErrorsState] = useState2(filterErrors(initialErrors));
336
+ const errorsRef = useRef(errorsState);
336
337
  const setErrors = useCallback2((errors) => {
337
- setErrorsState(
338
- (current) => filterErrors(typeof errors === "function" ? errors(current) : errors)
339
- );
338
+ setErrorsState((current) => {
339
+ const newErrors = filterErrors(typeof errors === "function" ? errors(current) : errors);
340
+ errorsRef.current = newErrors;
341
+ return newErrors;
342
+ });
340
343
  }, []);
341
- const clearErrors = useCallback2(() => setErrorsState({}), []);
344
+ const clearErrors = useCallback2(() => setErrors({}), []);
342
345
  const clearFieldError = useCallback2(
343
346
  (path) => {
344
- if (errorsState[path] === void 0) {
347
+ if (errorsRef.current[path] === void 0) {
345
348
  return;
346
349
  }
347
350
  setErrors((current) => {
@@ -356,7 +359,7 @@ function useFormErrors(initialErrors) {
356
359
  (path, error) => {
357
360
  if (error == null || error === false) {
358
361
  clearFieldError(path);
359
- } else if (errorsState[path] !== error) {
362
+ } else if (errorsRef.current[path] !== error) {
360
363
  setErrors((current) => ({ ...current, [path]: error }));
361
364
  }
362
365
  },
@@ -371,10 +374,10 @@ function useFormErrors(initialErrors) {
371
374
  };
372
375
  }
373
376
 
374
- // ../../node_modules/@mantine/form/esm/hooks/use-form-list/use-form-list.mjs
377
+ // ../../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
375
378
  import { useCallback as useCallback3 } from "react";
376
379
 
377
- // ../../node_modules/@mantine/form/esm/lists/clear-list-state.mjs
380
+ // ../../node_modules/.pnpm/@mantine+form@7.10.1_react@18.3.1/node_modules/@mantine/form/esm/lists/clear-list-state.mjs
378
381
  function clearListState(field, state) {
379
382
  if (state === null || typeof state !== "object") {
380
383
  return {};
@@ -388,7 +391,7 @@ function clearListState(field, state) {
388
391
  return clone;
389
392
  }
390
393
 
391
- // ../../node_modules/@mantine/form/esm/lists/change-error-indices.mjs
394
+ // ../../node_modules/.pnpm/@mantine+form@7.10.1_react@18.3.1/node_modules/@mantine/form/esm/lists/change-error-indices.mjs
392
395
  function getIndexFromKeyAfterPath(key, path) {
393
396
  const split = key.substring(path.length + 1).split(".")[0];
394
397
  return parseInt(split, 10);
@@ -428,7 +431,7 @@ function changeErrorIndices(path, index, errors, change) {
428
431
  return cloned;
429
432
  }
430
433
 
431
- // ../../node_modules/@mantine/form/esm/lists/reorder-errors.mjs
434
+ // ../../node_modules/.pnpm/@mantine+form@7.10.1_react@18.3.1/node_modules/@mantine/form/esm/lists/reorder-errors.mjs
432
435
  function reorderErrors(path, { from, to }, errors) {
433
436
  const oldKeyStart = `${path}.${from}`;
434
437
  const newKeyStart = `${path}.${to}`;
@@ -456,7 +459,7 @@ function reorderErrors(path, { from, to }, errors) {
456
459
  return clone;
457
460
  }
458
461
 
459
- // ../../node_modules/klona/full/index.mjs
462
+ // ../../node_modules/.pnpm/klona@2.0.6/node_modules/klona/full/index.mjs
460
463
  function set(obj, key, val) {
461
464
  if (typeof val.value === "object")
462
465
  val.value = klona(val.value);
@@ -507,7 +510,7 @@ function klona(x) {
507
510
  return tmp || x;
508
511
  }
509
512
 
510
- // ../../node_modules/@mantine/form/esm/paths/get-splitted-path.mjs
513
+ // ../../node_modules/.pnpm/@mantine+form@7.10.1_react@18.3.1/node_modules/@mantine/form/esm/paths/get-splitted-path.mjs
511
514
  function getSplittedPath(path) {
512
515
  if (typeof path !== "string") {
513
516
  return [];
@@ -515,7 +518,7 @@ function getSplittedPath(path) {
515
518
  return path.split(".");
516
519
  }
517
520
 
518
- // ../../node_modules/@mantine/form/esm/paths/get-path.mjs
521
+ // ../../node_modules/.pnpm/@mantine+form@7.10.1_react@18.3.1/node_modules/@mantine/form/esm/paths/get-path.mjs
519
522
  function getPath(path, values) {
520
523
  const splittedPath = getSplittedPath(path);
521
524
  if (splittedPath.length === 0 || typeof values !== "object" || values === null) {
@@ -531,7 +534,7 @@ function getPath(path, values) {
531
534
  return value;
532
535
  }
533
536
 
534
- // ../../node_modules/@mantine/form/esm/paths/set-path.mjs
537
+ // ../../node_modules/.pnpm/@mantine+form@7.10.1_react@18.3.1/node_modules/@mantine/form/esm/paths/set-path.mjs
535
538
  function setPath(path, value, values) {
536
539
  const splittedPath = getSplittedPath(path);
537
540
  if (splittedPath.length === 0) {
@@ -553,7 +556,7 @@ function setPath(path, value, values) {
553
556
  return cloned;
554
557
  }
555
558
 
556
- // ../../node_modules/@mantine/form/esm/paths/reorder-path.mjs
559
+ // ../../node_modules/.pnpm/@mantine+form@7.10.1_react@18.3.1/node_modules/@mantine/form/esm/paths/reorder-path.mjs
557
560
  function reorderPath(path, { from, to }, values) {
558
561
  const currentValue = getPath(path, values);
559
562
  if (!Array.isArray(currentValue)) {
@@ -566,7 +569,7 @@ function reorderPath(path, { from, to }, values) {
566
569
  return setPath(path, cloned, values);
567
570
  }
568
571
 
569
- // ../../node_modules/@mantine/form/esm/paths/insert-path.mjs
572
+ // ../../node_modules/.pnpm/@mantine+form@7.10.1_react@18.3.1/node_modules/@mantine/form/esm/paths/insert-path.mjs
570
573
  function insertPath(path, value, index, values) {
571
574
  const currentValue = getPath(path, values);
572
575
  if (!Array.isArray(currentValue)) {
@@ -577,7 +580,7 @@ function insertPath(path, value, index, values) {
577
580
  return setPath(path, cloned, values);
578
581
  }
579
582
 
580
- // ../../node_modules/@mantine/form/esm/paths/remove-path.mjs
583
+ // ../../node_modules/.pnpm/@mantine+form@7.10.1_react@18.3.1/node_modules/@mantine/form/esm/paths/remove-path.mjs
581
584
  function removePath(path, index, values) {
582
585
  const currentValue = getPath(path, values);
583
586
  if (!Array.isArray(currentValue)) {
@@ -590,7 +593,7 @@ function removePath(path, index, values) {
590
593
  );
591
594
  }
592
595
 
593
- // ../../node_modules/@mantine/form/esm/hooks/use-form-list/use-form-list.mjs
596
+ // ../../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
594
597
  function useFormList({
595
598
  $values,
596
599
  $errors,
@@ -623,11 +626,11 @@ function useFormList({
623
626
  return { reorderListItem, removeListItem, insertListItem };
624
627
  }
625
628
 
626
- // ../../node_modules/@mantine/form/esm/hooks/use-form-status/use-form-status.mjs
629
+ // ../../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
627
630
  var import_fast_deep_equal = __toESM(require_fast_deep_equal(), 1);
628
- import { useState as useState3, useRef, useCallback as useCallback4 } from "react";
631
+ import { useState as useState3, useRef as useRef2, useCallback as useCallback4 } from "react";
629
632
 
630
- // ../../node_modules/@mantine/form/esm/get-status/get-status.mjs
633
+ // ../../node_modules/.pnpm/@mantine+form@7.10.1_react@18.3.1/node_modules/@mantine/form/esm/get-status/get-status.mjs
631
634
  function getStatus(status, path) {
632
635
  const paths = Object.keys(status);
633
636
  if (typeof path === "string") {
@@ -637,7 +640,7 @@ function getStatus(status, path) {
637
640
  return paths.some((statusPath) => status[statusPath]);
638
641
  }
639
642
 
640
- // ../../node_modules/@mantine/form/esm/hooks/use-form-status/use-form-status.mjs
643
+ // ../../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
641
644
  function useFormStatus({
642
645
  initialDirty,
643
646
  initialTouched,
@@ -646,8 +649,8 @@ function useFormStatus({
646
649
  }) {
647
650
  const [touchedState, setTouchedState] = useState3(initialTouched);
648
651
  const [dirtyState, setDirtyState] = useState3(initialDirty);
649
- const touchedRef = useRef(initialTouched);
650
- const dirtyRef = useRef(initialDirty);
652
+ const touchedRef = useRef2(initialTouched);
653
+ const dirtyRef = useRef2(initialDirty);
651
654
  const setTouched = useCallback4((values) => {
652
655
  const resolvedValues = typeof values === "function" ? values(touchedRef.current) : values;
653
656
  touchedRef.current = resolvedValues;
@@ -741,17 +744,17 @@ function useFormStatus({
741
744
  };
742
745
  }
743
746
 
744
- // ../../node_modules/@mantine/form/esm/hooks/use-form-values/use-form-values.mjs
745
- import { useRef as useRef2, useState as useState4, useCallback as useCallback5 } from "react";
747
+ // ../../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
748
+ import { useRef as useRef3, useState as useState4, useCallback as useCallback5 } from "react";
746
749
  function useFormValues({
747
750
  initialValues,
748
751
  onValuesChange,
749
752
  mode
750
753
  }) {
751
- const initialized = useRef2(false);
754
+ const initialized = useRef3(false);
752
755
  const [stateValues, setStateValues] = useState4(initialValues || {});
753
- const refValues = useRef2(stateValues);
754
- const valuesSnapshot = useRef2(stateValues);
756
+ const refValues = useRef3(stateValues);
757
+ const valuesSnapshot = useRef3(stateValues);
755
758
  const setValues = useCallback5(
756
759
  ({
757
760
  values,
@@ -814,12 +817,12 @@ function useFormValues({
814
817
  };
815
818
  }
816
819
 
817
- // ../../node_modules/@mantine/form/esm/hooks/use-form-watch/use-form-watch.mjs
818
- import { useRef as useRef3, useCallback as useCallback6, useEffect as useEffect5 } from "react";
820
+ // ../../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
821
+ import { useRef as useRef4, useCallback as useCallback6, useEffect as useEffect5 } from "react";
819
822
  function useFormWatch({
820
823
  $status
821
824
  }) {
822
- const subscribers = useRef3(
825
+ const subscribers = useRef4(
823
826
  {}
824
827
  );
825
828
  const watch = useCallback6((path, callback) => {
@@ -851,12 +854,12 @@ function useFormWatch({
851
854
  };
852
855
  }
853
856
 
854
- // ../../node_modules/@mantine/form/esm/paths/get-data-path.mjs
857
+ // ../../node_modules/.pnpm/@mantine+form@7.10.1_react@18.3.1/node_modules/@mantine/form/esm/paths/get-data-path.mjs
855
858
  function getDataPath(formName, fieldPath) {
856
859
  return formName ? `${formName}-${fieldPath.toString()}` : fieldPath.toString();
857
860
  }
858
861
 
859
- // ../../node_modules/@mantine/form/esm/validate/validate-values.mjs
862
+ // ../../node_modules/.pnpm/@mantine+form@7.10.1_react@18.3.1/node_modules/@mantine/form/esm/validate/validate-values.mjs
860
863
  function getValidationResults(errors) {
861
864
  const filteredErrors = filterErrors(errors);
862
865
  return { hasErrors: Object.keys(filteredErrors).length > 0, errors: filteredErrors };
@@ -894,7 +897,7 @@ function validateValues(validate, values) {
894
897
  return getValidationResults(validateRulesRecord(validate, values));
895
898
  }
896
899
 
897
- // ../../node_modules/@mantine/form/esm/validate/validate-field-value.mjs
900
+ // ../../node_modules/.pnpm/@mantine+form@7.10.1_react@18.3.1/node_modules/@mantine/form/esm/validate/validate-field-value.mjs
898
901
  function validateFieldValue(path, rules, values) {
899
902
  if (typeof path !== "string") {
900
903
  return { hasError: false, error: null };
@@ -906,10 +909,10 @@ function validateFieldValue(path, rules, values) {
906
909
  return { hasError: !!pathInError, error: pathInError ? results.errors[pathInError] : null };
907
910
  }
908
911
 
909
- // ../../node_modules/@mantine/form/esm/form-index.mjs
912
+ // ../../node_modules/.pnpm/@mantine+form@7.10.1_react@18.3.1/node_modules/@mantine/form/esm/form-index.mjs
910
913
  var FORM_INDEX = "__MANTINE_FORM_INDEX__";
911
914
 
912
- // ../../node_modules/@mantine/form/esm/validate/should-validate-on-change.mjs
915
+ // ../../node_modules/.pnpm/@mantine+form@7.10.1_react@18.3.1/node_modules/@mantine/form/esm/validate/should-validate-on-change.mjs
913
916
  function shouldValidateOnChange(path, validateInputOnChange) {
914
917
  if (!validateInputOnChange) {
915
918
  return false;
@@ -923,7 +926,7 @@ function shouldValidateOnChange(path, validateInputOnChange) {
923
926
  return false;
924
927
  }
925
928
 
926
- // ../../node_modules/@mantine/form/esm/use-form.mjs
929
+ // ../../node_modules/.pnpm/@mantine+form@7.10.1_react@18.3.1/node_modules/@mantine/form/esm/use-form.mjs
927
930
  function useForm({
928
931
  name,
929
932
  mode = "controlled",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@awesome-flow/noise",
3
- "version": "0.5.0",
3
+ "version": "0.6.0",
4
4
  "description": "The Awesome Flow package for noise. Provides basic components to define noise-based flows.",
5
5
  "type": "module",
6
6
  "scripts": {
@@ -12,7 +12,7 @@
12
12
  "ts:watch": "npx tsc --noEmit --incremental --watch"
13
13
  },
14
14
  "dependencies": {
15
- "@awesome-flow/core": "^0.5.0"
15
+ "@awesome-flow/core": "^0.6.0"
16
16
  },
17
17
  "peerDependencies": {
18
18
  "@mantine/core": "*",
@@ -108,5 +108,5 @@
108
108
  "url": "https://github.com/privatebytes/awesome-flow/issues"
109
109
  },
110
110
  "homepage": "https://github.com/privatebytes/awesome-flow#readme",
111
- "gitHead": "681320c7eb0167d0c9b97d42a0388875c17ae736"
111
+ "gitHead": "e1a900205037bca5d03d02892051ff525db9a1c5"
112
112
  }