@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.
- package/dist/abstract/index.cjs +42 -42
- package/dist/abstract/index.js +59 -54
- package/dist/modules/index.cjs +0 -1
- package/dist/modules/index.js +0 -1
- package/dist/nodes/generators/index.cjs +0 -1
- package/dist/nodes/generators/index.js +0 -1
- package/dist/nodes/groups/index.cjs +2 -5
- package/dist/nodes/groups/index.js +9 -7
- package/dist/nodes/index.cjs +68 -68
- package/dist/nodes/index.js +59 -54
- package/dist/nodes/modifiers/index.cjs +40 -38
- package/dist/nodes/modifiers/index.js +50 -48
- package/dist/nodes/output/index.cjs +0 -2
- package/dist/nodes/output/index.js +7 -4
- package/dist/nodes/selectors/index.cjs +0 -2
- package/dist/nodes/selectors/index.js +7 -4
- package/dist/nodes/transformers/index.cjs +0 -1
- package/dist/nodes/transformers/index.js +0 -1
- package/dist/templates/generators/index.cjs +2 -4
- package/dist/templates/generators/index.js +7 -4
- package/dist/templates/groups/index.cjs +2 -4
- package/dist/templates/groups/index.js +7 -4
- package/dist/templates/index.cjs +2 -4
- package/dist/templates/index.js +7 -4
- package/dist/templates/modifiers/index.cjs +0 -2
- package/dist/templates/modifiers/index.js +7 -4
- package/dist/templates/output/index.cjs +0 -2
- package/dist/templates/output/index.js +7 -4
- package/dist/templates/selectors/index.cjs +0 -2
- package/dist/templates/selectors/index.js +7 -4
- package/dist/templates/transformers/index.cjs +0 -2
- package/dist/templates/transformers/index.js +7 -4
- package/package.json +3 -3
- package/dist/abstract/index.cjs.map +0 -1
- package/dist/abstract/index.js.map +0 -1
- package/dist/modules/index.cjs.map +0 -1
- package/dist/modules/index.js.map +0 -1
- package/dist/nodes/generators/index.cjs.map +0 -1
- package/dist/nodes/generators/index.js.map +0 -1
- package/dist/nodes/groups/index.cjs.map +0 -1
- package/dist/nodes/groups/index.js.map +0 -1
- package/dist/nodes/index.cjs.map +0 -1
- package/dist/nodes/index.js.map +0 -1
- package/dist/nodes/modifiers/index.cjs.map +0 -1
- package/dist/nodes/modifiers/index.js.map +0 -1
- package/dist/nodes/output/index.cjs.map +0 -1
- package/dist/nodes/output/index.js.map +0 -1
- package/dist/nodes/selectors/index.cjs.map +0 -1
- package/dist/nodes/selectors/index.js.map +0 -1
- package/dist/nodes/transformers/index.cjs.map +0 -1
- package/dist/nodes/transformers/index.js.map +0 -1
- package/dist/templates/generators/index.cjs.map +0 -1
- package/dist/templates/generators/index.js.map +0 -1
- package/dist/templates/groups/index.cjs.map +0 -1
- package/dist/templates/groups/index.js.map +0 -1
- package/dist/templates/index.cjs.map +0 -1
- package/dist/templates/index.js.map +0 -1
- package/dist/templates/modifiers/index.cjs.map +0 -1
- package/dist/templates/modifiers/index.js.map +0 -1
- package/dist/templates/output/index.cjs.map +0 -1
- package/dist/templates/output/index.js.map +0 -1
- package/dist/templates/selectors/index.cjs.map +0 -1
- package/dist/templates/selectors/index.js.map +0 -1
- package/dist/templates/transformers/index.cjs.map +0 -1
- package/dist/templates/transformers/index.js.map +0 -1
|
@@ -26,7 +26,6 @@ module.exports = __toCommonJS(groups_exports);
|
|
|
26
26
|
// src/nodes/groups/module-group-node.tsx
|
|
27
27
|
var import_layout = require("@awesome-flow/core/layout");
|
|
28
28
|
var import_react = require("@xyflow/react");
|
|
29
|
-
var import_abstract = require("@awesome-flow/core/abstract");
|
|
30
29
|
var import_react2 = require("react");
|
|
31
30
|
var import_shallow = require("zustand/shallow");
|
|
32
31
|
var import_core = require("@mantine/core");
|
|
@@ -40,16 +39,15 @@ function ModuleGroupNode({
|
|
|
40
39
|
width,
|
|
41
40
|
height
|
|
42
41
|
}) {
|
|
43
|
-
const context = (0, import_react2.useContext)(import_abstract.FlowContext);
|
|
44
42
|
const updateNodeInternals = (0, import_react.useUpdateNodeInternals)();
|
|
45
43
|
const triggerNodeChanges = (0, import_react.useStore)((s) => s.triggerNodeChanges);
|
|
46
|
-
const { groupNodes, setGroupCollapsed } =
|
|
44
|
+
const { groupNodes, setGroupCollapsed } = (0, import_hooks.useFlowStore)(
|
|
47
45
|
(0, import_react2.useCallback)(
|
|
48
46
|
(state) => ({ groupNodes: state.groups[id], setGroupCollapsed: state.setGroupCollapsed }),
|
|
49
47
|
[]
|
|
50
48
|
)
|
|
51
49
|
);
|
|
52
|
-
const intersectingNode =
|
|
50
|
+
const intersectingNode = (0, import_hooks.useInteractiveStore)(
|
|
53
51
|
(0, import_react2.useCallback)((state) => state.nodeIntersectionTargets[id], [id]),
|
|
54
52
|
import_shallow.shallow
|
|
55
53
|
);
|
|
@@ -113,4 +111,3 @@ var module_group_node_default = ModuleGroupNode;
|
|
|
113
111
|
0 && (module.exports = {
|
|
114
112
|
ModuleGroupNode
|
|
115
113
|
});
|
|
116
|
-
//# sourceMappingURL=index.cjs.map
|
|
@@ -1,11 +1,15 @@
|
|
|
1
1
|
// src/nodes/groups/module-group-node.tsx
|
|
2
2
|
import { NodeContainer, NodeCollapse, NodeTrackConnections } from "@awesome-flow/core/layout";
|
|
3
3
|
import { NodeResizer, useStore, useUpdateNodeInternals } from "@xyflow/react";
|
|
4
|
-
import {
|
|
5
|
-
import { useCallback, useContext, useEffect, useMemo } from "react";
|
|
4
|
+
import { useCallback, useEffect, useMemo } from "react";
|
|
6
5
|
import { shallow } from "zustand/shallow";
|
|
7
6
|
import { Badge, Group } from "@mantine/core";
|
|
8
|
-
import {
|
|
7
|
+
import {
|
|
8
|
+
useFlowStore,
|
|
9
|
+
useIncomingComputedData,
|
|
10
|
+
useInteractiveStore,
|
|
11
|
+
useUpdateNodeComputedData
|
|
12
|
+
} from "@awesome-flow/core/hooks";
|
|
9
13
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
10
14
|
function ModuleGroupNode({
|
|
11
15
|
id,
|
|
@@ -15,16 +19,15 @@ function ModuleGroupNode({
|
|
|
15
19
|
width,
|
|
16
20
|
height
|
|
17
21
|
}) {
|
|
18
|
-
const context = useContext(FlowContext);
|
|
19
22
|
const updateNodeInternals = useUpdateNodeInternals();
|
|
20
23
|
const triggerNodeChanges = useStore((s) => s.triggerNodeChanges);
|
|
21
|
-
const { groupNodes, setGroupCollapsed } =
|
|
24
|
+
const { groupNodes, setGroupCollapsed } = useFlowStore(
|
|
22
25
|
useCallback(
|
|
23
26
|
(state) => ({ groupNodes: state.groups[id], setGroupCollapsed: state.setGroupCollapsed }),
|
|
24
27
|
[]
|
|
25
28
|
)
|
|
26
29
|
);
|
|
27
|
-
const intersectingNode =
|
|
30
|
+
const intersectingNode = useInteractiveStore(
|
|
28
31
|
useCallback((state) => state.nodeIntersectionTargets[id], [id]),
|
|
29
32
|
shallow
|
|
30
33
|
);
|
|
@@ -87,4 +90,3 @@ var module_group_node_default = ModuleGroupNode;
|
|
|
87
90
|
export {
|
|
88
91
|
module_group_node_default as ModuleGroupNode
|
|
89
92
|
};
|
|
90
|
-
//# sourceMappingURL=index.js.map
|
package/dist/nodes/index.cjs
CHANGED
|
@@ -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)
|
|
@@ -446,7 +446,6 @@ var position_grid_node_default = PositionGridNode;
|
|
|
446
446
|
// src/nodes/groups/module-group-node.tsx
|
|
447
447
|
var import_layout12 = require("@awesome-flow/core/layout");
|
|
448
448
|
var import_react12 = require("@xyflow/react");
|
|
449
|
-
var import_abstract = require("@awesome-flow/core/abstract");
|
|
450
449
|
var import_react13 = require("react");
|
|
451
450
|
var import_shallow = require("zustand/shallow");
|
|
452
451
|
var import_core4 = require("@mantine/core");
|
|
@@ -460,16 +459,15 @@ function ModuleGroupNode({
|
|
|
460
459
|
width,
|
|
461
460
|
height
|
|
462
461
|
}) {
|
|
463
|
-
const context = (0, import_react13.useContext)(import_abstract.FlowContext);
|
|
464
462
|
const updateNodeInternals = (0, import_react12.useUpdateNodeInternals)();
|
|
465
463
|
const triggerNodeChanges = (0, import_react12.useStore)((s) => s.triggerNodeChanges);
|
|
466
|
-
const { groupNodes, setGroupCollapsed } =
|
|
464
|
+
const { groupNodes, setGroupCollapsed } = (0, import_hooks12.useFlowStore)(
|
|
467
465
|
(0, import_react13.useCallback)(
|
|
468
466
|
(state) => ({ groupNodes: state.groups[id], setGroupCollapsed: state.setGroupCollapsed }),
|
|
469
467
|
[]
|
|
470
468
|
)
|
|
471
469
|
);
|
|
472
|
-
const intersectingNode =
|
|
470
|
+
const intersectingNode = (0, import_hooks12.useInteractiveStore)(
|
|
473
471
|
(0, import_react13.useCallback)((state) => state.nodeIntersectionTargets[id], [id]),
|
|
474
472
|
import_shallow.shallow
|
|
475
473
|
);
|
|
@@ -648,10 +646,10 @@ var import_layout16 = require("@awesome-flow/core/layout");
|
|
|
648
646
|
var import_core6 = require("@mantine/core");
|
|
649
647
|
var import_hooks16 = require("@awesome-flow/core/hooks");
|
|
650
648
|
|
|
651
|
-
// ../../node_modules/@mantine/form/esm/use-form.mjs
|
|
649
|
+
// ../../node_modules/.pnpm/@mantine+form@7.10.1_react@18.3.1/node_modules/@mantine/form/esm/use-form.mjs
|
|
652
650
|
var import_react23 = require("react");
|
|
653
651
|
|
|
654
|
-
// ../../node_modules/@mantine/form/esm/actions/actions.mjs
|
|
652
|
+
// ../../node_modules/.pnpm/@mantine+form@7.10.1_react@18.3.1/node_modules/@mantine/form/esm/actions/actions.mjs
|
|
655
653
|
var import_react17 = require("react");
|
|
656
654
|
function validateFormName(name) {
|
|
657
655
|
if (!/^[0-9a-zA-Z-]+$/.test(name)) {
|
|
@@ -732,7 +730,7 @@ function useFormActions(name, form) {
|
|
|
732
730
|
useFormEvent(`mantine-form:${name}:reset-touched`, form.resetTouched);
|
|
733
731
|
}
|
|
734
732
|
|
|
735
|
-
// ../../node_modules/@mantine/form/esm/get-input-on-change/get-input-on-change.mjs
|
|
733
|
+
// ../../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
|
|
736
734
|
function getInputOnChange(setValue) {
|
|
737
735
|
return (val) => {
|
|
738
736
|
if (!val) {
|
|
@@ -756,10 +754,10 @@ function getInputOnChange(setValue) {
|
|
|
756
754
|
};
|
|
757
755
|
}
|
|
758
756
|
|
|
759
|
-
// ../../node_modules/@mantine/form/esm/hooks/use-form-errors/use-form-errors.mjs
|
|
757
|
+
// ../../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
|
|
760
758
|
var import_react18 = require("react");
|
|
761
759
|
|
|
762
|
-
// ../../node_modules/@mantine/form/esm/hooks/use-form-errors/filter-errors/filter-errors.mjs
|
|
760
|
+
// ../../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
|
|
763
761
|
function filterErrors(errors) {
|
|
764
762
|
if (errors === null || typeof errors !== "object") {
|
|
765
763
|
return {};
|
|
@@ -773,18 +771,21 @@ function filterErrors(errors) {
|
|
|
773
771
|
}, {});
|
|
774
772
|
}
|
|
775
773
|
|
|
776
|
-
// ../../node_modules/@mantine/form/esm/hooks/use-form-errors/use-form-errors.mjs
|
|
774
|
+
// ../../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
|
|
777
775
|
function useFormErrors(initialErrors) {
|
|
778
776
|
const [errorsState, setErrorsState] = (0, import_react18.useState)(filterErrors(initialErrors));
|
|
777
|
+
const errorsRef = (0, import_react18.useRef)(errorsState);
|
|
779
778
|
const setErrors = (0, import_react18.useCallback)((errors) => {
|
|
780
|
-
setErrorsState(
|
|
781
|
-
|
|
782
|
-
|
|
779
|
+
setErrorsState((current) => {
|
|
780
|
+
const newErrors = filterErrors(typeof errors === "function" ? errors(current) : errors);
|
|
781
|
+
errorsRef.current = newErrors;
|
|
782
|
+
return newErrors;
|
|
783
|
+
});
|
|
783
784
|
}, []);
|
|
784
|
-
const clearErrors = (0, import_react18.useCallback)(() =>
|
|
785
|
+
const clearErrors = (0, import_react18.useCallback)(() => setErrors({}), []);
|
|
785
786
|
const clearFieldError = (0, import_react18.useCallback)(
|
|
786
787
|
(path) => {
|
|
787
|
-
if (
|
|
788
|
+
if (errorsRef.current[path] === void 0) {
|
|
788
789
|
return;
|
|
789
790
|
}
|
|
790
791
|
setErrors((current) => {
|
|
@@ -799,7 +800,7 @@ function useFormErrors(initialErrors) {
|
|
|
799
800
|
(path, error) => {
|
|
800
801
|
if (error == null || error === false) {
|
|
801
802
|
clearFieldError(path);
|
|
802
|
-
} else if (
|
|
803
|
+
} else if (errorsRef.current[path] !== error) {
|
|
803
804
|
setErrors((current) => ({ ...current, [path]: error }));
|
|
804
805
|
}
|
|
805
806
|
},
|
|
@@ -814,10 +815,10 @@ function useFormErrors(initialErrors) {
|
|
|
814
815
|
};
|
|
815
816
|
}
|
|
816
817
|
|
|
817
|
-
// ../../node_modules/@mantine/form/esm/hooks/use-form-list/use-form-list.mjs
|
|
818
|
+
// ../../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
|
|
818
819
|
var import_react19 = require("react");
|
|
819
820
|
|
|
820
|
-
// ../../node_modules/@mantine/form/esm/lists/clear-list-state.mjs
|
|
821
|
+
// ../../node_modules/.pnpm/@mantine+form@7.10.1_react@18.3.1/node_modules/@mantine/form/esm/lists/clear-list-state.mjs
|
|
821
822
|
function clearListState(field, state) {
|
|
822
823
|
if (state === null || typeof state !== "object") {
|
|
823
824
|
return {};
|
|
@@ -831,7 +832,7 @@ function clearListState(field, state) {
|
|
|
831
832
|
return clone;
|
|
832
833
|
}
|
|
833
834
|
|
|
834
|
-
// ../../node_modules/@mantine/form/esm/lists/change-error-indices.mjs
|
|
835
|
+
// ../../node_modules/.pnpm/@mantine+form@7.10.1_react@18.3.1/node_modules/@mantine/form/esm/lists/change-error-indices.mjs
|
|
835
836
|
function getIndexFromKeyAfterPath(key, path) {
|
|
836
837
|
const split = key.substring(path.length + 1).split(".")[0];
|
|
837
838
|
return parseInt(split, 10);
|
|
@@ -871,7 +872,7 @@ function changeErrorIndices(path, index, errors, change) {
|
|
|
871
872
|
return cloned;
|
|
872
873
|
}
|
|
873
874
|
|
|
874
|
-
// ../../node_modules/@mantine/form/esm/lists/reorder-errors.mjs
|
|
875
|
+
// ../../node_modules/.pnpm/@mantine+form@7.10.1_react@18.3.1/node_modules/@mantine/form/esm/lists/reorder-errors.mjs
|
|
875
876
|
function reorderErrors(path, { from, to }, errors) {
|
|
876
877
|
const oldKeyStart = `${path}.${from}`;
|
|
877
878
|
const newKeyStart = `${path}.${to}`;
|
|
@@ -899,7 +900,7 @@ function reorderErrors(path, { from, to }, errors) {
|
|
|
899
900
|
return clone;
|
|
900
901
|
}
|
|
901
902
|
|
|
902
|
-
// ../../node_modules/klona/full/index.mjs
|
|
903
|
+
// ../../node_modules/.pnpm/klona@2.0.6/node_modules/klona/full/index.mjs
|
|
903
904
|
function set(obj, key, val) {
|
|
904
905
|
if (typeof val.value === "object")
|
|
905
906
|
val.value = klona(val.value);
|
|
@@ -950,7 +951,7 @@ function klona(x) {
|
|
|
950
951
|
return tmp || x;
|
|
951
952
|
}
|
|
952
953
|
|
|
953
|
-
// ../../node_modules/@mantine/form/esm/paths/get-splitted-path.mjs
|
|
954
|
+
// ../../node_modules/.pnpm/@mantine+form@7.10.1_react@18.3.1/node_modules/@mantine/form/esm/paths/get-splitted-path.mjs
|
|
954
955
|
function getSplittedPath(path) {
|
|
955
956
|
if (typeof path !== "string") {
|
|
956
957
|
return [];
|
|
@@ -958,7 +959,7 @@ function getSplittedPath(path) {
|
|
|
958
959
|
return path.split(".");
|
|
959
960
|
}
|
|
960
961
|
|
|
961
|
-
// ../../node_modules/@mantine/form/esm/paths/get-path.mjs
|
|
962
|
+
// ../../node_modules/.pnpm/@mantine+form@7.10.1_react@18.3.1/node_modules/@mantine/form/esm/paths/get-path.mjs
|
|
962
963
|
function getPath(path, values) {
|
|
963
964
|
const splittedPath = getSplittedPath(path);
|
|
964
965
|
if (splittedPath.length === 0 || typeof values !== "object" || values === null) {
|
|
@@ -974,7 +975,7 @@ function getPath(path, values) {
|
|
|
974
975
|
return value;
|
|
975
976
|
}
|
|
976
977
|
|
|
977
|
-
// ../../node_modules/@mantine/form/esm/paths/set-path.mjs
|
|
978
|
+
// ../../node_modules/.pnpm/@mantine+form@7.10.1_react@18.3.1/node_modules/@mantine/form/esm/paths/set-path.mjs
|
|
978
979
|
function setPath(path, value, values) {
|
|
979
980
|
const splittedPath = getSplittedPath(path);
|
|
980
981
|
if (splittedPath.length === 0) {
|
|
@@ -996,7 +997,7 @@ function setPath(path, value, values) {
|
|
|
996
997
|
return cloned;
|
|
997
998
|
}
|
|
998
999
|
|
|
999
|
-
// ../../node_modules/@mantine/form/esm/paths/reorder-path.mjs
|
|
1000
|
+
// ../../node_modules/.pnpm/@mantine+form@7.10.1_react@18.3.1/node_modules/@mantine/form/esm/paths/reorder-path.mjs
|
|
1000
1001
|
function reorderPath(path, { from, to }, values) {
|
|
1001
1002
|
const currentValue = getPath(path, values);
|
|
1002
1003
|
if (!Array.isArray(currentValue)) {
|
|
@@ -1009,7 +1010,7 @@ function reorderPath(path, { from, to }, values) {
|
|
|
1009
1010
|
return setPath(path, cloned, values);
|
|
1010
1011
|
}
|
|
1011
1012
|
|
|
1012
|
-
// ../../node_modules/@mantine/form/esm/paths/insert-path.mjs
|
|
1013
|
+
// ../../node_modules/.pnpm/@mantine+form@7.10.1_react@18.3.1/node_modules/@mantine/form/esm/paths/insert-path.mjs
|
|
1013
1014
|
function insertPath(path, value, index, values) {
|
|
1014
1015
|
const currentValue = getPath(path, values);
|
|
1015
1016
|
if (!Array.isArray(currentValue)) {
|
|
@@ -1020,7 +1021,7 @@ function insertPath(path, value, index, values) {
|
|
|
1020
1021
|
return setPath(path, cloned, values);
|
|
1021
1022
|
}
|
|
1022
1023
|
|
|
1023
|
-
// ../../node_modules/@mantine/form/esm/paths/remove-path.mjs
|
|
1024
|
+
// ../../node_modules/.pnpm/@mantine+form@7.10.1_react@18.3.1/node_modules/@mantine/form/esm/paths/remove-path.mjs
|
|
1024
1025
|
function removePath(path, index, values) {
|
|
1025
1026
|
const currentValue = getPath(path, values);
|
|
1026
1027
|
if (!Array.isArray(currentValue)) {
|
|
@@ -1033,7 +1034,7 @@ function removePath(path, index, values) {
|
|
|
1033
1034
|
);
|
|
1034
1035
|
}
|
|
1035
1036
|
|
|
1036
|
-
// ../../node_modules/@mantine/form/esm/hooks/use-form-list/use-form-list.mjs
|
|
1037
|
+
// ../../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
|
|
1037
1038
|
function useFormList({
|
|
1038
1039
|
$values,
|
|
1039
1040
|
$errors,
|
|
@@ -1066,11 +1067,11 @@ function useFormList({
|
|
|
1066
1067
|
return { reorderListItem, removeListItem, insertListItem };
|
|
1067
1068
|
}
|
|
1068
1069
|
|
|
1069
|
-
// ../../node_modules/@mantine/form/esm/hooks/use-form-status/use-form-status.mjs
|
|
1070
|
+
// ../../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
|
|
1070
1071
|
var import_react20 = require("react");
|
|
1071
1072
|
var import_fast_deep_equal = __toESM(require_fast_deep_equal(), 1);
|
|
1072
1073
|
|
|
1073
|
-
// ../../node_modules/@mantine/form/esm/get-status/get-status.mjs
|
|
1074
|
+
// ../../node_modules/.pnpm/@mantine+form@7.10.1_react@18.3.1/node_modules/@mantine/form/esm/get-status/get-status.mjs
|
|
1074
1075
|
function getStatus(status, path) {
|
|
1075
1076
|
const paths = Object.keys(status);
|
|
1076
1077
|
if (typeof path === "string") {
|
|
@@ -1080,7 +1081,7 @@ function getStatus(status, path) {
|
|
|
1080
1081
|
return paths.some((statusPath) => status[statusPath]);
|
|
1081
1082
|
}
|
|
1082
1083
|
|
|
1083
|
-
// ../../node_modules/@mantine/form/esm/hooks/use-form-status/use-form-status.mjs
|
|
1084
|
+
// ../../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
|
|
1084
1085
|
function useFormStatus({
|
|
1085
1086
|
initialDirty,
|
|
1086
1087
|
initialTouched,
|
|
@@ -1184,7 +1185,7 @@ function useFormStatus({
|
|
|
1184
1185
|
};
|
|
1185
1186
|
}
|
|
1186
1187
|
|
|
1187
|
-
// ../../node_modules/@mantine/form/esm/hooks/use-form-values/use-form-values.mjs
|
|
1188
|
+
// ../../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
|
|
1188
1189
|
var import_react21 = require("react");
|
|
1189
1190
|
function useFormValues({
|
|
1190
1191
|
initialValues,
|
|
@@ -1257,7 +1258,7 @@ function useFormValues({
|
|
|
1257
1258
|
};
|
|
1258
1259
|
}
|
|
1259
1260
|
|
|
1260
|
-
// ../../node_modules/@mantine/form/esm/hooks/use-form-watch/use-form-watch.mjs
|
|
1261
|
+
// ../../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
|
|
1261
1262
|
var import_react22 = require("react");
|
|
1262
1263
|
function useFormWatch({
|
|
1263
1264
|
$status
|
|
@@ -1294,12 +1295,12 @@ function useFormWatch({
|
|
|
1294
1295
|
};
|
|
1295
1296
|
}
|
|
1296
1297
|
|
|
1297
|
-
// ../../node_modules/@mantine/form/esm/paths/get-data-path.mjs
|
|
1298
|
+
// ../../node_modules/.pnpm/@mantine+form@7.10.1_react@18.3.1/node_modules/@mantine/form/esm/paths/get-data-path.mjs
|
|
1298
1299
|
function getDataPath(formName, fieldPath) {
|
|
1299
1300
|
return formName ? `${formName}-${fieldPath.toString()}` : fieldPath.toString();
|
|
1300
1301
|
}
|
|
1301
1302
|
|
|
1302
|
-
// ../../node_modules/@mantine/form/esm/validate/validate-values.mjs
|
|
1303
|
+
// ../../node_modules/.pnpm/@mantine+form@7.10.1_react@18.3.1/node_modules/@mantine/form/esm/validate/validate-values.mjs
|
|
1303
1304
|
function getValidationResults(errors) {
|
|
1304
1305
|
const filteredErrors = filterErrors(errors);
|
|
1305
1306
|
return { hasErrors: Object.keys(filteredErrors).length > 0, errors: filteredErrors };
|
|
@@ -1337,7 +1338,7 @@ function validateValues(validate, values) {
|
|
|
1337
1338
|
return getValidationResults(validateRulesRecord(validate, values));
|
|
1338
1339
|
}
|
|
1339
1340
|
|
|
1340
|
-
// ../../node_modules/@mantine/form/esm/validate/validate-field-value.mjs
|
|
1341
|
+
// ../../node_modules/.pnpm/@mantine+form@7.10.1_react@18.3.1/node_modules/@mantine/form/esm/validate/validate-field-value.mjs
|
|
1341
1342
|
function validateFieldValue(path, rules, values) {
|
|
1342
1343
|
if (typeof path !== "string") {
|
|
1343
1344
|
return { hasError: false, error: null };
|
|
@@ -1349,10 +1350,10 @@ function validateFieldValue(path, rules, values) {
|
|
|
1349
1350
|
return { hasError: !!pathInError, error: pathInError ? results.errors[pathInError] : null };
|
|
1350
1351
|
}
|
|
1351
1352
|
|
|
1352
|
-
// ../../node_modules/@mantine/form/esm/form-index.mjs
|
|
1353
|
+
// ../../node_modules/.pnpm/@mantine+form@7.10.1_react@18.3.1/node_modules/@mantine/form/esm/form-index.mjs
|
|
1353
1354
|
var FORM_INDEX = "__MANTINE_FORM_INDEX__";
|
|
1354
1355
|
|
|
1355
|
-
// ../../node_modules/@mantine/form/esm/validate/should-validate-on-change.mjs
|
|
1356
|
+
// ../../node_modules/.pnpm/@mantine+form@7.10.1_react@18.3.1/node_modules/@mantine/form/esm/validate/should-validate-on-change.mjs
|
|
1356
1357
|
function shouldValidateOnChange(path, validateInputOnChange) {
|
|
1357
1358
|
if (!validateInputOnChange) {
|
|
1358
1359
|
return false;
|
|
@@ -1366,7 +1367,7 @@ function shouldValidateOnChange(path, validateInputOnChange) {
|
|
|
1366
1367
|
return false;
|
|
1367
1368
|
}
|
|
1368
1369
|
|
|
1369
|
-
// ../../node_modules/@mantine/form/esm/use-form.mjs
|
|
1370
|
+
// ../../node_modules/.pnpm/@mantine+form@7.10.1_react@18.3.1/node_modules/@mantine/form/esm/use-form.mjs
|
|
1370
1371
|
function useForm({
|
|
1371
1372
|
name,
|
|
1372
1373
|
mode = "controlled",
|
|
@@ -1560,7 +1561,7 @@ var import_modifier3 = require("libnoise-ts/module/modifier");
|
|
|
1560
1561
|
var import_util = require("libnoise-ts/util");
|
|
1561
1562
|
var import_icons_react2 = require("@tabler/icons-react");
|
|
1562
1563
|
var import_hooks17 = require("@mantine/hooks");
|
|
1563
|
-
var
|
|
1564
|
+
var import_abstract = require("@awesome-flow/core/abstract");
|
|
1564
1565
|
var import_jsx_runtime16 = require("react/jsx-runtime");
|
|
1565
1566
|
function NoiseCurveNode({ id, selected, data, type }) {
|
|
1566
1567
|
const incoming = (0, import_hooks16.useIncomingComputedData)(id);
|
|
@@ -1630,7 +1631,7 @@ function NoiseCurveNode({ id, selected, data, type }) {
|
|
|
1630
1631
|
},
|
|
1631
1632
|
form.key(`points.${index}.output`)
|
|
1632
1633
|
),
|
|
1633
|
-
data.state ===
|
|
1634
|
+
data.state === import_abstract.NodeState.edit && values.length > 4 && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
1634
1635
|
import_core6.ActionIcon,
|
|
1635
1636
|
{
|
|
1636
1637
|
color: "red",
|
|
@@ -1643,7 +1644,7 @@ function NoiseCurveNode({ id, selected, data, type }) {
|
|
|
1643
1644
|
] }, item.key));
|
|
1644
1645
|
return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(import_layout16.NodeContainer, { id, selected, type, data, children: [
|
|
1645
1646
|
fields,
|
|
1646
|
-
data.state ===
|
|
1647
|
+
data.state === import_abstract.NodeState.edit && /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(import_jsx_runtime16.Fragment, { children: [
|
|
1647
1648
|
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_core6.Space, { h: 10 }),
|
|
1648
1649
|
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
1649
1650
|
import_core6.Button,
|
|
@@ -1843,7 +1844,7 @@ var import_react29 = require("react");
|
|
|
1843
1844
|
var import_modifier8 = require("libnoise-ts/module/modifier");
|
|
1844
1845
|
var import_icons_react3 = require("@tabler/icons-react");
|
|
1845
1846
|
var import_hooks23 = require("@mantine/hooks");
|
|
1846
|
-
var
|
|
1847
|
+
var import_abstract2 = require("@awesome-flow/core/abstract");
|
|
1847
1848
|
var import_jsx_runtime21 = require("react/jsx-runtime");
|
|
1848
1849
|
function NoiseTerraceNode({ id, selected, data, type }) {
|
|
1849
1850
|
const incoming = (0, import_hooks22.useIncomingComputedData)(id);
|
|
@@ -1887,7 +1888,7 @@ function NoiseTerraceNode({ id, selected, data, type }) {
|
|
|
1887
1888
|
},
|
|
1888
1889
|
form.key(`points.${index}.value`)
|
|
1889
1890
|
),
|
|
1890
|
-
data.state ===
|
|
1891
|
+
data.state === import_abstract2.NodeState.edit && values.length > 2 && /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
1891
1892
|
import_core10.ActionIcon,
|
|
1892
1893
|
{
|
|
1893
1894
|
color: "red",
|
|
@@ -1900,7 +1901,7 @@ function NoiseTerraceNode({ id, selected, data, type }) {
|
|
|
1900
1901
|
] }, item.key));
|
|
1901
1902
|
return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(import_layout21.NodeContainer, { id, selected, type, data, children: [
|
|
1902
1903
|
fields,
|
|
1903
|
-
data.state ===
|
|
1904
|
+
data.state === import_abstract2.NodeState.edit && /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(import_jsx_runtime21.Fragment, { children: [
|
|
1904
1905
|
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_core10.Space, { h: 10 }),
|
|
1905
1906
|
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
1906
1907
|
import_core10.Button,
|
|
@@ -2509,7 +2510,7 @@ var NoiseConstNodeTemplateFactory = class {
|
|
|
2509
2510
|
};
|
|
2510
2511
|
|
|
2511
2512
|
// src/templates/generators/noise-cylinders-template.ts
|
|
2512
|
-
var
|
|
2513
|
+
var import_abstract5 = require("@awesome-flow/core/abstract");
|
|
2513
2514
|
var import_system3 = require("@xyflow/system");
|
|
2514
2515
|
var NoiseCylindersNodeTemplateFactory = class {
|
|
2515
2516
|
template = {
|
|
@@ -2522,7 +2523,7 @@ var NoiseCylindersNodeTemplateFactory = class {
|
|
|
2522
2523
|
handles: [
|
|
2523
2524
|
{
|
|
2524
2525
|
position: import_system3.Position.Left,
|
|
2525
|
-
dataType:
|
|
2526
|
+
dataType: import_abstract5.CoreHandleType.variableProperty,
|
|
2526
2527
|
connection: "target"
|
|
2527
2528
|
},
|
|
2528
2529
|
{
|
|
@@ -2535,7 +2536,7 @@ var NoiseCylindersNodeTemplateFactory = class {
|
|
|
2535
2536
|
};
|
|
2536
2537
|
|
|
2537
2538
|
// src/templates/generators/noise-perlin-template.ts
|
|
2538
|
-
var
|
|
2539
|
+
var import_abstract6 = require("@awesome-flow/core/abstract");
|
|
2539
2540
|
var import_system4 = require("@xyflow/system");
|
|
2540
2541
|
var NoisePerlinNodeTemplateFactory = class {
|
|
2541
2542
|
template = {
|
|
@@ -2552,7 +2553,7 @@ var NoisePerlinNodeTemplateFactory = class {
|
|
|
2552
2553
|
handles: [
|
|
2553
2554
|
{
|
|
2554
2555
|
position: import_system4.Position.Left,
|
|
2555
|
-
dataType:
|
|
2556
|
+
dataType: import_abstract6.CoreHandleType.variableProperty,
|
|
2556
2557
|
connection: "target"
|
|
2557
2558
|
},
|
|
2558
2559
|
{
|
|
@@ -2565,7 +2566,7 @@ var NoisePerlinNodeTemplateFactory = class {
|
|
|
2565
2566
|
};
|
|
2566
2567
|
|
|
2567
2568
|
// src/templates/generators/noise-ridgedmulti-template.ts
|
|
2568
|
-
var
|
|
2569
|
+
var import_abstract7 = require("@awesome-flow/core/abstract");
|
|
2569
2570
|
var import_system5 = require("@xyflow/system");
|
|
2570
2571
|
var NoiseRidgedMultiNodeTemplateFactory = class {
|
|
2571
2572
|
template = {
|
|
@@ -2583,7 +2584,7 @@ var NoiseRidgedMultiNodeTemplateFactory = class {
|
|
|
2583
2584
|
handles: [
|
|
2584
2585
|
{
|
|
2585
2586
|
position: import_system5.Position.Left,
|
|
2586
|
-
dataType:
|
|
2587
|
+
dataType: import_abstract7.CoreHandleType.variableProperty,
|
|
2587
2588
|
connection: "target"
|
|
2588
2589
|
},
|
|
2589
2590
|
{
|
|
@@ -2596,7 +2597,7 @@ var NoiseRidgedMultiNodeTemplateFactory = class {
|
|
|
2596
2597
|
};
|
|
2597
2598
|
|
|
2598
2599
|
// src/templates/generators/noise-simplex-template.ts
|
|
2599
|
-
var
|
|
2600
|
+
var import_abstract8 = require("@awesome-flow/core/abstract");
|
|
2600
2601
|
var import_system6 = require("@xyflow/system");
|
|
2601
2602
|
var NoiseSimplexNodeTemplateFactory = class {
|
|
2602
2603
|
template = {
|
|
@@ -2608,7 +2609,7 @@ var NoiseSimplexNodeTemplateFactory = class {
|
|
|
2608
2609
|
handles: [
|
|
2609
2610
|
{
|
|
2610
2611
|
position: import_system6.Position.Left,
|
|
2611
|
-
dataType:
|
|
2612
|
+
dataType: import_abstract8.CoreHandleType.variableProperty,
|
|
2612
2613
|
connection: "target"
|
|
2613
2614
|
},
|
|
2614
2615
|
{
|
|
@@ -2621,7 +2622,7 @@ var NoiseSimplexNodeTemplateFactory = class {
|
|
|
2621
2622
|
};
|
|
2622
2623
|
|
|
2623
2624
|
// src/templates/generators/noise-spheres-template.ts
|
|
2624
|
-
var
|
|
2625
|
+
var import_abstract9 = require("@awesome-flow/core/abstract");
|
|
2625
2626
|
var import_system7 = require("@xyflow/system");
|
|
2626
2627
|
var NoiseSpheresNodeTemplateFactory = class {
|
|
2627
2628
|
template = {
|
|
@@ -2634,7 +2635,7 @@ var NoiseSpheresNodeTemplateFactory = class {
|
|
|
2634
2635
|
handles: [
|
|
2635
2636
|
{
|
|
2636
2637
|
position: import_system7.Position.Left,
|
|
2637
|
-
dataType:
|
|
2638
|
+
dataType: import_abstract9.CoreHandleType.variableProperty,
|
|
2638
2639
|
connection: "target"
|
|
2639
2640
|
},
|
|
2640
2641
|
{
|
|
@@ -2647,7 +2648,7 @@ var NoiseSpheresNodeTemplateFactory = class {
|
|
|
2647
2648
|
};
|
|
2648
2649
|
|
|
2649
2650
|
// src/templates/generators/noise-voronoi-template.ts
|
|
2650
|
-
var
|
|
2651
|
+
var import_abstract10 = require("@awesome-flow/core/abstract");
|
|
2651
2652
|
var import_system8 = require("@xyflow/system");
|
|
2652
2653
|
var NoiseVoronoiNodeTemplateFactory = class {
|
|
2653
2654
|
template = {
|
|
@@ -2663,7 +2664,7 @@ var NoiseVoronoiNodeTemplateFactory = class {
|
|
|
2663
2664
|
handles: [
|
|
2664
2665
|
{
|
|
2665
2666
|
position: import_system8.Position.Left,
|
|
2666
|
-
dataType:
|
|
2667
|
+
dataType: import_abstract10.CoreHandleType.variableProperty,
|
|
2667
2668
|
connection: "target"
|
|
2668
2669
|
},
|
|
2669
2670
|
{
|
|
@@ -2917,7 +2918,7 @@ var NoiseOutputNodeTemplateFactory = class {
|
|
|
2917
2918
|
};
|
|
2918
2919
|
|
|
2919
2920
|
// src/templates/modifiers/noise-curve-template.ts
|
|
2920
|
-
var
|
|
2921
|
+
var import_abstract19 = require("@awesome-flow/core/abstract");
|
|
2921
2922
|
var import_system19 = require("@xyflow/system");
|
|
2922
2923
|
var NoiseCurveNodeTemplateFactory = class {
|
|
2923
2924
|
template = {
|
|
@@ -2936,7 +2937,7 @@ var NoiseCurveNodeTemplateFactory = class {
|
|
|
2936
2937
|
},
|
|
2937
2938
|
{
|
|
2938
2939
|
position: import_system19.Position.Left,
|
|
2939
|
-
dataType:
|
|
2940
|
+
dataType: import_abstract19.CoreHandleType.variableProperty,
|
|
2940
2941
|
connection: "target"
|
|
2941
2942
|
},
|
|
2942
2943
|
{
|
|
@@ -3269,7 +3270,7 @@ var NoiseTranslatePointNodeTemplateFactory = class {
|
|
|
3269
3270
|
};
|
|
3270
3271
|
|
|
3271
3272
|
// src/templates/transformers/noise-turbulence-template.ts
|
|
3272
|
-
var
|
|
3273
|
+
var import_abstract31 = require("@awesome-flow/core/abstract");
|
|
3273
3274
|
var import_system30 = require("@xyflow/system");
|
|
3274
3275
|
var NoiseTurbulenceNodeTemplateFactory = class {
|
|
3275
3276
|
template = {
|
|
@@ -3292,7 +3293,7 @@ var NoiseTurbulenceNodeTemplateFactory = class {
|
|
|
3292
3293
|
},
|
|
3293
3294
|
{
|
|
3294
3295
|
position: import_system30.Position.Left,
|
|
3295
|
-
dataType:
|
|
3296
|
+
dataType: import_abstract31.CoreHandleType.variableProperty,
|
|
3296
3297
|
label: "Variable Properties",
|
|
3297
3298
|
connection: "target"
|
|
3298
3299
|
},
|
|
@@ -3306,7 +3307,7 @@ var NoiseTurbulenceNodeTemplateFactory = class {
|
|
|
3306
3307
|
};
|
|
3307
3308
|
|
|
3308
3309
|
// src/templates/generators/noise-billow-template.ts
|
|
3309
|
-
var
|
|
3310
|
+
var import_abstract33 = require("@awesome-flow/core/abstract");
|
|
3310
3311
|
var import_utils2 = require("@awesome-flow/core/utils");
|
|
3311
3312
|
var import_system31 = require("@xyflow/system");
|
|
3312
3313
|
var NoiseBillowNodeTemplateFactory = class {
|
|
@@ -3325,7 +3326,7 @@ var NoiseBillowNodeTemplateFactory = class {
|
|
|
3325
3326
|
handles: [
|
|
3326
3327
|
{
|
|
3327
3328
|
position: import_system31.Position.Left,
|
|
3328
|
-
dataType:
|
|
3329
|
+
dataType: import_abstract33.CoreHandleType.variableProperty,
|
|
3329
3330
|
connection: "target"
|
|
3330
3331
|
},
|
|
3331
3332
|
{
|
|
@@ -3338,14 +3339,14 @@ var NoiseBillowNodeTemplateFactory = class {
|
|
|
3338
3339
|
};
|
|
3339
3340
|
|
|
3340
3341
|
// src/templates/groups/module-group-template.ts
|
|
3341
|
-
var
|
|
3342
|
+
var import_abstract34 = require("@awesome-flow/core/abstract");
|
|
3342
3343
|
var import_utils3 = require("@awesome-flow/core/utils");
|
|
3343
3344
|
var import_system32 = require("@xyflow/system");
|
|
3344
3345
|
var ModuleGroupNodeTemplateFactory = class {
|
|
3345
3346
|
template = {
|
|
3346
3347
|
id: import_utils3.IDGenerator.template(),
|
|
3347
3348
|
type: "group-module" /* groupModule */,
|
|
3348
|
-
group:
|
|
3349
|
+
group: import_abstract34.CoreTemplateGroup.groups,
|
|
3349
3350
|
data: {
|
|
3350
3351
|
title: "Modules Group",
|
|
3351
3352
|
isGroup: true,
|
|
@@ -3493,4 +3494,3 @@ var noise_output_node_default = NoiseOutputNode;
|
|
|
3493
3494
|
PositionGridNode,
|
|
3494
3495
|
PositionsLoggerNode
|
|
3495
3496
|
});
|
|
3496
|
-
//# sourceMappingURL=index.cjs.map
|