@awesome-flow/noise 0.5.0 → 0.7.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 +701 -769
- package/dist/abstract/index.d.cts +6 -12
- package/dist/abstract/index.d.ts +6 -12
- package/dist/abstract/index.js +498 -568
- package/dist/{index-BungWYrh.d.cts → index-CfiOpOzX.d.cts} +1 -1
- package/dist/{index-DsQSjZC5.d.ts → index-mlK0X4O1.d.ts} +1 -1
- package/dist/modules/index.cjs +4 -30
- package/dist/modules/index.d.cts +2 -10
- package/dist/modules/index.d.ts +2 -10
- package/dist/modules/index.js +2 -17
- package/dist/{node-props-BbqbXDXn.d.cts → node-props-CAV2WNDN.d.cts} +3 -7
- package/dist/{node-props-BbqbXDXn.d.ts → node-props-CAV2WNDN.d.ts} +3 -7
- package/dist/nodes/generators/index.cjs +71 -114
- package/dist/nodes/generators/index.d.cts +3 -8
- package/dist/nodes/generators/index.d.ts +3 -8
- package/dist/nodes/generators/index.js +47 -79
- package/dist/nodes/index.cjs +642 -710
- package/dist/nodes/index.d.cts +3 -6
- package/dist/nodes/index.d.ts +3 -6
- package/dist/nodes/index.js +443 -512
- package/dist/nodes/modifiers/index.cjs +77 -89
- package/dist/nodes/modifiers/index.d.cts +2 -5
- package/dist/nodes/modifiers/index.d.ts +2 -5
- package/dist/nodes/modifiers/index.js +73 -85
- package/dist/nodes/output/index.cjs +239 -285
- package/dist/nodes/output/index.js +252 -290
- package/dist/nodes/selectors/index.cjs +230 -280
- package/dist/nodes/selectors/index.d.cts +2 -5
- package/dist/nodes/selectors/index.d.ts +2 -5
- package/dist/nodes/selectors/index.js +248 -290
- package/dist/nodes/transformers/index.cjs +10 -10
- package/dist/nodes/transformers/index.d.cts +2 -5
- package/dist/nodes/transformers/index.d.ts +2 -5
- package/dist/nodes/transformers/index.js +5 -5
- package/dist/templates/generators/index.cjs +201 -253
- package/dist/templates/generators/index.d.cts +3 -10
- package/dist/templates/generators/index.d.ts +3 -10
- package/dist/templates/generators/index.js +236 -279
- package/dist/templates/groups/index.cjs +201 -251
- package/dist/templates/groups/index.js +236 -278
- package/dist/templates/index.cjs +201 -253
- package/dist/templates/index.d.cts +4 -7
- package/dist/templates/index.d.ts +4 -7
- package/dist/templates/index.js +236 -279
- package/dist/templates/modifiers/index.cjs +201 -251
- package/dist/templates/modifiers/index.d.cts +2 -5
- package/dist/templates/modifiers/index.d.ts +2 -5
- package/dist/templates/modifiers/index.js +236 -278
- package/dist/templates/output/index.cjs +201 -251
- package/dist/templates/output/index.js +236 -278
- package/dist/templates/selectors/index.cjs +201 -251
- package/dist/templates/selectors/index.d.cts +2 -5
- package/dist/templates/selectors/index.d.ts +2 -5
- package/dist/templates/selectors/index.js +236 -278
- package/dist/templates/transformers/index.cjs +201 -251
- package/dist/templates/transformers/index.d.cts +3 -6
- package/dist/templates/transformers/index.d.ts +3 -6
- package/dist/templates/transformers/index.js +236 -278
- package/package.json +6 -4
|
@@ -29,43 +29,33 @@ 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
|
-
if (a === b)
|
|
38
|
-
return true;
|
|
37
|
+
if (a === b) return true;
|
|
39
38
|
if (a && b && typeof a == "object" && typeof b == "object") {
|
|
40
|
-
if (a.constructor !== b.constructor)
|
|
41
|
-
return false;
|
|
39
|
+
if (a.constructor !== b.constructor) return false;
|
|
42
40
|
var length, i, keys;
|
|
43
41
|
if (Array.isArray(a)) {
|
|
44
42
|
length = a.length;
|
|
45
|
-
if (length != b.length)
|
|
46
|
-
return false;
|
|
43
|
+
if (length != b.length) return false;
|
|
47
44
|
for (i = length; i-- !== 0; )
|
|
48
|
-
if (!equal(a[i], b[i]))
|
|
49
|
-
return false;
|
|
45
|
+
if (!equal(a[i], b[i])) return false;
|
|
50
46
|
return true;
|
|
51
47
|
}
|
|
52
|
-
if (a.constructor === RegExp)
|
|
53
|
-
|
|
54
|
-
if (a.
|
|
55
|
-
return a.valueOf() === b.valueOf();
|
|
56
|
-
if (a.toString !== Object.prototype.toString)
|
|
57
|
-
return a.toString() === b.toString();
|
|
48
|
+
if (a.constructor === RegExp) return a.source === b.source && a.flags === b.flags;
|
|
49
|
+
if (a.valueOf !== Object.prototype.valueOf) return a.valueOf() === b.valueOf();
|
|
50
|
+
if (a.toString !== Object.prototype.toString) return a.toString() === b.toString();
|
|
58
51
|
keys = Object.keys(a);
|
|
59
52
|
length = keys.length;
|
|
60
|
-
if (length !== Object.keys(b).length)
|
|
61
|
-
return false;
|
|
53
|
+
if (length !== Object.keys(b).length) return false;
|
|
62
54
|
for (i = length; i-- !== 0; )
|
|
63
|
-
if (!Object.prototype.hasOwnProperty.call(b, keys[i]))
|
|
64
|
-
return false;
|
|
55
|
+
if (!Object.prototype.hasOwnProperty.call(b, keys[i])) return false;
|
|
65
56
|
for (i = length; i-- !== 0; ) {
|
|
66
57
|
var key = keys[i];
|
|
67
|
-
if (!equal(a[key], b[key]))
|
|
68
|
-
return false;
|
|
58
|
+
if (!equal(a[key], b[key])) return false;
|
|
69
59
|
}
|
|
70
60
|
return true;
|
|
71
61
|
}
|
|
@@ -93,14 +83,14 @@ module.exports = __toCommonJS(modifiers_exports);
|
|
|
93
83
|
var import_layout = require("@awesome-flow/core/layout");
|
|
94
84
|
var import_react = require("react");
|
|
95
85
|
var import_hooks = require("@awesome-flow/core/hooks");
|
|
96
|
-
var
|
|
86
|
+
var import_libnoise_simplex_ts = require("libnoise-simplex-ts");
|
|
97
87
|
var import_jsx_runtime = require("react/jsx-runtime");
|
|
98
88
|
function NoiseAbsNode({ id, selected, data, type }) {
|
|
99
89
|
const incoming = (0, import_hooks.useIncomingComputedData)(id);
|
|
100
90
|
const updateComputedData = (0, import_hooks.useUpdateNodeComputedData)();
|
|
101
91
|
(0, import_react.useEffect)(() => {
|
|
102
92
|
if (incoming?.length > 0) {
|
|
103
|
-
const module2 = new
|
|
93
|
+
const module2 = new import_libnoise_simplex_ts.Abs(incoming[0].module);
|
|
104
94
|
updateComputedData(id, { module: module2 });
|
|
105
95
|
}
|
|
106
96
|
}, [incoming]);
|
|
@@ -113,7 +103,7 @@ var import_layout2 = require("@awesome-flow/core/layout");
|
|
|
113
103
|
var import_react2 = require("react");
|
|
114
104
|
var import_core = require("@mantine/core");
|
|
115
105
|
var import_hooks2 = require("@awesome-flow/core/hooks");
|
|
116
|
-
var
|
|
106
|
+
var import_libnoise_simplex_ts2 = require("libnoise-simplex-ts");
|
|
117
107
|
var import_jsx_runtime2 = require("react/jsx-runtime");
|
|
118
108
|
function NoiseClampNode({ id, selected, data, type }) {
|
|
119
109
|
const [lowerBound, setLowerBound] = (0, import_react2.useState)(data.lowerBound);
|
|
@@ -123,7 +113,7 @@ function NoiseClampNode({ id, selected, data, type }) {
|
|
|
123
113
|
const updateComputedData = (0, import_hooks2.useUpdateNodeComputedData)();
|
|
124
114
|
(0, import_react2.useEffect)(() => {
|
|
125
115
|
if (incoming?.length) {
|
|
126
|
-
const module2 = new
|
|
116
|
+
const module2 = new import_libnoise_simplex_ts2.Clamp(incoming[0].module, lowerBound, upperBound);
|
|
127
117
|
updateComputedData(id, { module: module2 });
|
|
128
118
|
}
|
|
129
119
|
updateNodeData(id, { lowerBound, upperBound });
|
|
@@ -163,13 +153,13 @@ var import_hooks3 = require("@awesome-flow/core/hooks");
|
|
|
163
153
|
var import_icons_react = require("@tabler/icons-react");
|
|
164
154
|
|
|
165
155
|
// src/abstract/operations.ts
|
|
166
|
-
var
|
|
156
|
+
var import_libnoise_simplex_ts3 = require("libnoise-simplex-ts");
|
|
167
157
|
var noiseCombineModuleMap = {
|
|
168
|
-
["add" /* add */]:
|
|
169
|
-
["max" /* max */]:
|
|
170
|
-
["min" /* min */]:
|
|
171
|
-
["multiply" /* multiply */]:
|
|
172
|
-
["power" /* power */]:
|
|
158
|
+
["add" /* add */]: import_libnoise_simplex_ts3.Add,
|
|
159
|
+
["max" /* max */]: import_libnoise_simplex_ts3.Max,
|
|
160
|
+
["min" /* min */]: import_libnoise_simplex_ts3.Min,
|
|
161
|
+
["multiply" /* multiply */]: import_libnoise_simplex_ts3.Multiply,
|
|
162
|
+
["power" /* power */]: import_libnoise_simplex_ts3.Power
|
|
173
163
|
};
|
|
174
164
|
|
|
175
165
|
// src/nodes/modifiers/noise-combine-node.tsx
|
|
@@ -207,10 +197,10 @@ var import_layout4 = require("@awesome-flow/core/layout");
|
|
|
207
197
|
var import_core2 = require("@mantine/core");
|
|
208
198
|
var import_hooks4 = require("@awesome-flow/core/hooks");
|
|
209
199
|
|
|
210
|
-
// ../../node_modules/@mantine/form/esm/use-form.mjs
|
|
200
|
+
// ../../node_modules/.pnpm/@mantine+form@7.10.1_react@18.3.1/node_modules/@mantine/form/esm/use-form.mjs
|
|
211
201
|
var import_react10 = require("react");
|
|
212
202
|
|
|
213
|
-
// ../../node_modules/@mantine/form/esm/actions/actions.mjs
|
|
203
|
+
// ../../node_modules/.pnpm/@mantine+form@7.10.1_react@18.3.1/node_modules/@mantine/form/esm/actions/actions.mjs
|
|
214
204
|
var import_react4 = require("react");
|
|
215
205
|
function validateFormName(name) {
|
|
216
206
|
if (!/^[0-9a-zA-Z-]+$/.test(name)) {
|
|
@@ -291,7 +281,7 @@ function useFormActions(name, form) {
|
|
|
291
281
|
useFormEvent(`mantine-form:${name}:reset-touched`, form.resetTouched);
|
|
292
282
|
}
|
|
293
283
|
|
|
294
|
-
// ../../node_modules/@mantine/form/esm/get-input-on-change/get-input-on-change.mjs
|
|
284
|
+
// ../../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
285
|
function getInputOnChange(setValue) {
|
|
296
286
|
return (val) => {
|
|
297
287
|
if (!val) {
|
|
@@ -315,10 +305,10 @@ function getInputOnChange(setValue) {
|
|
|
315
305
|
};
|
|
316
306
|
}
|
|
317
307
|
|
|
318
|
-
// ../../node_modules/@mantine/form/esm/hooks/use-form-errors/use-form-errors.mjs
|
|
308
|
+
// ../../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
309
|
var import_react5 = require("react");
|
|
320
310
|
|
|
321
|
-
// ../../node_modules/@mantine/form/esm/hooks/use-form-errors/filter-errors/filter-errors.mjs
|
|
311
|
+
// ../../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
312
|
function filterErrors(errors) {
|
|
323
313
|
if (errors === null || typeof errors !== "object") {
|
|
324
314
|
return {};
|
|
@@ -332,18 +322,21 @@ function filterErrors(errors) {
|
|
|
332
322
|
}, {});
|
|
333
323
|
}
|
|
334
324
|
|
|
335
|
-
// ../../node_modules/@mantine/form/esm/hooks/use-form-errors/use-form-errors.mjs
|
|
325
|
+
// ../../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
326
|
function useFormErrors(initialErrors) {
|
|
337
327
|
const [errorsState, setErrorsState] = (0, import_react5.useState)(filterErrors(initialErrors));
|
|
328
|
+
const errorsRef = (0, import_react5.useRef)(errorsState);
|
|
338
329
|
const setErrors = (0, import_react5.useCallback)((errors) => {
|
|
339
|
-
setErrorsState(
|
|
340
|
-
|
|
341
|
-
|
|
330
|
+
setErrorsState((current) => {
|
|
331
|
+
const newErrors = filterErrors(typeof errors === "function" ? errors(current) : errors);
|
|
332
|
+
errorsRef.current = newErrors;
|
|
333
|
+
return newErrors;
|
|
334
|
+
});
|
|
342
335
|
}, []);
|
|
343
|
-
const clearErrors = (0, import_react5.useCallback)(() =>
|
|
336
|
+
const clearErrors = (0, import_react5.useCallback)(() => setErrors({}), []);
|
|
344
337
|
const clearFieldError = (0, import_react5.useCallback)(
|
|
345
338
|
(path) => {
|
|
346
|
-
if (
|
|
339
|
+
if (errorsRef.current[path] === void 0) {
|
|
347
340
|
return;
|
|
348
341
|
}
|
|
349
342
|
setErrors((current) => {
|
|
@@ -358,7 +351,7 @@ function useFormErrors(initialErrors) {
|
|
|
358
351
|
(path, error) => {
|
|
359
352
|
if (error == null || error === false) {
|
|
360
353
|
clearFieldError(path);
|
|
361
|
-
} else if (
|
|
354
|
+
} else if (errorsRef.current[path] !== error) {
|
|
362
355
|
setErrors((current) => ({ ...current, [path]: error }));
|
|
363
356
|
}
|
|
364
357
|
},
|
|
@@ -373,10 +366,10 @@ function useFormErrors(initialErrors) {
|
|
|
373
366
|
};
|
|
374
367
|
}
|
|
375
368
|
|
|
376
|
-
// ../../node_modules/@mantine/form/esm/hooks/use-form-list/use-form-list.mjs
|
|
369
|
+
// ../../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
370
|
var import_react6 = require("react");
|
|
378
371
|
|
|
379
|
-
// ../../node_modules/@mantine/form/esm/lists/clear-list-state.mjs
|
|
372
|
+
// ../../node_modules/.pnpm/@mantine+form@7.10.1_react@18.3.1/node_modules/@mantine/form/esm/lists/clear-list-state.mjs
|
|
380
373
|
function clearListState(field, state) {
|
|
381
374
|
if (state === null || typeof state !== "object") {
|
|
382
375
|
return {};
|
|
@@ -390,7 +383,7 @@ function clearListState(field, state) {
|
|
|
390
383
|
return clone;
|
|
391
384
|
}
|
|
392
385
|
|
|
393
|
-
// ../../node_modules/@mantine/form/esm/lists/change-error-indices.mjs
|
|
386
|
+
// ../../node_modules/.pnpm/@mantine+form@7.10.1_react@18.3.1/node_modules/@mantine/form/esm/lists/change-error-indices.mjs
|
|
394
387
|
function getIndexFromKeyAfterPath(key, path) {
|
|
395
388
|
const split = key.substring(path.length + 1).split(".")[0];
|
|
396
389
|
return parseInt(split, 10);
|
|
@@ -430,7 +423,7 @@ function changeErrorIndices(path, index, errors, change) {
|
|
|
430
423
|
return cloned;
|
|
431
424
|
}
|
|
432
425
|
|
|
433
|
-
// ../../node_modules/@mantine/form/esm/lists/reorder-errors.mjs
|
|
426
|
+
// ../../node_modules/.pnpm/@mantine+form@7.10.1_react@18.3.1/node_modules/@mantine/form/esm/lists/reorder-errors.mjs
|
|
434
427
|
function reorderErrors(path, { from, to }, errors) {
|
|
435
428
|
const oldKeyStart = `${path}.${from}`;
|
|
436
429
|
const newKeyStart = `${path}.${to}`;
|
|
@@ -458,18 +451,15 @@ function reorderErrors(path, { from, to }, errors) {
|
|
|
458
451
|
return clone;
|
|
459
452
|
}
|
|
460
453
|
|
|
461
|
-
// ../../node_modules/klona/full/index.mjs
|
|
454
|
+
// ../../node_modules/.pnpm/klona@2.0.6/node_modules/klona/full/index.mjs
|
|
462
455
|
function set(obj, key, val) {
|
|
463
|
-
if (typeof val.value === "object")
|
|
464
|
-
val.value = klona(val.value);
|
|
456
|
+
if (typeof val.value === "object") val.value = klona(val.value);
|
|
465
457
|
if (!val.enumerable || val.get || val.set || !val.configurable || !val.writable || key === "__proto__") {
|
|
466
458
|
Object.defineProperty(obj, key, val);
|
|
467
|
-
} else
|
|
468
|
-
obj[key] = val.value;
|
|
459
|
+
} else obj[key] = val.value;
|
|
469
460
|
}
|
|
470
461
|
function klona(x) {
|
|
471
|
-
if (typeof x !== "object")
|
|
472
|
-
return x;
|
|
462
|
+
if (typeof x !== "object") return x;
|
|
473
463
|
var i = 0, k, list, tmp, str = Object.prototype.toString.call(x);
|
|
474
464
|
if (str === "[object Object]") {
|
|
475
465
|
tmp = Object.create(x.__proto__ || null);
|
|
@@ -501,15 +491,14 @@ function klona(x) {
|
|
|
501
491
|
set(tmp, list[i], Object.getOwnPropertyDescriptor(x, list[i]));
|
|
502
492
|
}
|
|
503
493
|
for (i = 0, list = Object.getOwnPropertyNames(x); i < list.length; i++) {
|
|
504
|
-
if (Object.hasOwnProperty.call(tmp, k = list[i]) && tmp[k] === x[k])
|
|
505
|
-
continue;
|
|
494
|
+
if (Object.hasOwnProperty.call(tmp, k = list[i]) && tmp[k] === x[k]) continue;
|
|
506
495
|
set(tmp, k, Object.getOwnPropertyDescriptor(x, k));
|
|
507
496
|
}
|
|
508
497
|
}
|
|
509
498
|
return tmp || x;
|
|
510
499
|
}
|
|
511
500
|
|
|
512
|
-
// ../../node_modules/@mantine/form/esm/paths/get-splitted-path.mjs
|
|
501
|
+
// ../../node_modules/.pnpm/@mantine+form@7.10.1_react@18.3.1/node_modules/@mantine/form/esm/paths/get-splitted-path.mjs
|
|
513
502
|
function getSplittedPath(path) {
|
|
514
503
|
if (typeof path !== "string") {
|
|
515
504
|
return [];
|
|
@@ -517,7 +506,7 @@ function getSplittedPath(path) {
|
|
|
517
506
|
return path.split(".");
|
|
518
507
|
}
|
|
519
508
|
|
|
520
|
-
// ../../node_modules/@mantine/form/esm/paths/get-path.mjs
|
|
509
|
+
// ../../node_modules/.pnpm/@mantine+form@7.10.1_react@18.3.1/node_modules/@mantine/form/esm/paths/get-path.mjs
|
|
521
510
|
function getPath(path, values) {
|
|
522
511
|
const splittedPath = getSplittedPath(path);
|
|
523
512
|
if (splittedPath.length === 0 || typeof values !== "object" || values === null) {
|
|
@@ -533,7 +522,7 @@ function getPath(path, values) {
|
|
|
533
522
|
return value;
|
|
534
523
|
}
|
|
535
524
|
|
|
536
|
-
// ../../node_modules/@mantine/form/esm/paths/set-path.mjs
|
|
525
|
+
// ../../node_modules/.pnpm/@mantine+form@7.10.1_react@18.3.1/node_modules/@mantine/form/esm/paths/set-path.mjs
|
|
537
526
|
function setPath(path, value, values) {
|
|
538
527
|
const splittedPath = getSplittedPath(path);
|
|
539
528
|
if (splittedPath.length === 0) {
|
|
@@ -555,7 +544,7 @@ function setPath(path, value, values) {
|
|
|
555
544
|
return cloned;
|
|
556
545
|
}
|
|
557
546
|
|
|
558
|
-
// ../../node_modules/@mantine/form/esm/paths/reorder-path.mjs
|
|
547
|
+
// ../../node_modules/.pnpm/@mantine+form@7.10.1_react@18.3.1/node_modules/@mantine/form/esm/paths/reorder-path.mjs
|
|
559
548
|
function reorderPath(path, { from, to }, values) {
|
|
560
549
|
const currentValue = getPath(path, values);
|
|
561
550
|
if (!Array.isArray(currentValue)) {
|
|
@@ -568,7 +557,7 @@ function reorderPath(path, { from, to }, values) {
|
|
|
568
557
|
return setPath(path, cloned, values);
|
|
569
558
|
}
|
|
570
559
|
|
|
571
|
-
// ../../node_modules/@mantine/form/esm/paths/insert-path.mjs
|
|
560
|
+
// ../../node_modules/.pnpm/@mantine+form@7.10.1_react@18.3.1/node_modules/@mantine/form/esm/paths/insert-path.mjs
|
|
572
561
|
function insertPath(path, value, index, values) {
|
|
573
562
|
const currentValue = getPath(path, values);
|
|
574
563
|
if (!Array.isArray(currentValue)) {
|
|
@@ -579,7 +568,7 @@ function insertPath(path, value, index, values) {
|
|
|
579
568
|
return setPath(path, cloned, values);
|
|
580
569
|
}
|
|
581
570
|
|
|
582
|
-
// ../../node_modules/@mantine/form/esm/paths/remove-path.mjs
|
|
571
|
+
// ../../node_modules/.pnpm/@mantine+form@7.10.1_react@18.3.1/node_modules/@mantine/form/esm/paths/remove-path.mjs
|
|
583
572
|
function removePath(path, index, values) {
|
|
584
573
|
const currentValue = getPath(path, values);
|
|
585
574
|
if (!Array.isArray(currentValue)) {
|
|
@@ -592,7 +581,7 @@ function removePath(path, index, values) {
|
|
|
592
581
|
);
|
|
593
582
|
}
|
|
594
583
|
|
|
595
|
-
// ../../node_modules/@mantine/form/esm/hooks/use-form-list/use-form-list.mjs
|
|
584
|
+
// ../../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
585
|
function useFormList({
|
|
597
586
|
$values,
|
|
598
587
|
$errors,
|
|
@@ -625,11 +614,11 @@ function useFormList({
|
|
|
625
614
|
return { reorderListItem, removeListItem, insertListItem };
|
|
626
615
|
}
|
|
627
616
|
|
|
628
|
-
// ../../node_modules/@mantine/form/esm/hooks/use-form-status/use-form-status.mjs
|
|
617
|
+
// ../../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
618
|
var import_react7 = require("react");
|
|
630
619
|
var import_fast_deep_equal = __toESM(require_fast_deep_equal(), 1);
|
|
631
620
|
|
|
632
|
-
// ../../node_modules/@mantine/form/esm/get-status/get-status.mjs
|
|
621
|
+
// ../../node_modules/.pnpm/@mantine+form@7.10.1_react@18.3.1/node_modules/@mantine/form/esm/get-status/get-status.mjs
|
|
633
622
|
function getStatus(status, path) {
|
|
634
623
|
const paths = Object.keys(status);
|
|
635
624
|
if (typeof path === "string") {
|
|
@@ -639,7 +628,7 @@ function getStatus(status, path) {
|
|
|
639
628
|
return paths.some((statusPath) => status[statusPath]);
|
|
640
629
|
}
|
|
641
630
|
|
|
642
|
-
// ../../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
|
|
643
632
|
function useFormStatus({
|
|
644
633
|
initialDirty,
|
|
645
634
|
initialTouched,
|
|
@@ -743,7 +732,7 @@ function useFormStatus({
|
|
|
743
732
|
};
|
|
744
733
|
}
|
|
745
734
|
|
|
746
|
-
// ../../node_modules/@mantine/form/esm/hooks/use-form-values/use-form-values.mjs
|
|
735
|
+
// ../../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
736
|
var import_react8 = require("react");
|
|
748
737
|
function useFormValues({
|
|
749
738
|
initialValues,
|
|
@@ -816,7 +805,7 @@ function useFormValues({
|
|
|
816
805
|
};
|
|
817
806
|
}
|
|
818
807
|
|
|
819
|
-
// ../../node_modules/@mantine/form/esm/hooks/use-form-watch/use-form-watch.mjs
|
|
808
|
+
// ../../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
809
|
var import_react9 = require("react");
|
|
821
810
|
function useFormWatch({
|
|
822
811
|
$status
|
|
@@ -853,12 +842,12 @@ function useFormWatch({
|
|
|
853
842
|
};
|
|
854
843
|
}
|
|
855
844
|
|
|
856
|
-
// ../../node_modules/@mantine/form/esm/paths/get-data-path.mjs
|
|
845
|
+
// ../../node_modules/.pnpm/@mantine+form@7.10.1_react@18.3.1/node_modules/@mantine/form/esm/paths/get-data-path.mjs
|
|
857
846
|
function getDataPath(formName, fieldPath) {
|
|
858
847
|
return formName ? `${formName}-${fieldPath.toString()}` : fieldPath.toString();
|
|
859
848
|
}
|
|
860
849
|
|
|
861
|
-
// ../../node_modules/@mantine/form/esm/validate/validate-values.mjs
|
|
850
|
+
// ../../node_modules/.pnpm/@mantine+form@7.10.1_react@18.3.1/node_modules/@mantine/form/esm/validate/validate-values.mjs
|
|
862
851
|
function getValidationResults(errors) {
|
|
863
852
|
const filteredErrors = filterErrors(errors);
|
|
864
853
|
return { hasErrors: Object.keys(filteredErrors).length > 0, errors: filteredErrors };
|
|
@@ -896,7 +885,7 @@ function validateValues(validate, values) {
|
|
|
896
885
|
return getValidationResults(validateRulesRecord(validate, values));
|
|
897
886
|
}
|
|
898
887
|
|
|
899
|
-
// ../../node_modules/@mantine/form/esm/validate/validate-field-value.mjs
|
|
888
|
+
// ../../node_modules/.pnpm/@mantine+form@7.10.1_react@18.3.1/node_modules/@mantine/form/esm/validate/validate-field-value.mjs
|
|
900
889
|
function validateFieldValue(path, rules, values) {
|
|
901
890
|
if (typeof path !== "string") {
|
|
902
891
|
return { hasError: false, error: null };
|
|
@@ -908,10 +897,10 @@ function validateFieldValue(path, rules, values) {
|
|
|
908
897
|
return { hasError: !!pathInError, error: pathInError ? results.errors[pathInError] : null };
|
|
909
898
|
}
|
|
910
899
|
|
|
911
|
-
// ../../node_modules/@mantine/form/esm/form-index.mjs
|
|
900
|
+
// ../../node_modules/.pnpm/@mantine+form@7.10.1_react@18.3.1/node_modules/@mantine/form/esm/form-index.mjs
|
|
912
901
|
var FORM_INDEX = "__MANTINE_FORM_INDEX__";
|
|
913
902
|
|
|
914
|
-
// ../../node_modules/@mantine/form/esm/validate/should-validate-on-change.mjs
|
|
903
|
+
// ../../node_modules/.pnpm/@mantine+form@7.10.1_react@18.3.1/node_modules/@mantine/form/esm/validate/should-validate-on-change.mjs
|
|
915
904
|
function shouldValidateOnChange(path, validateInputOnChange) {
|
|
916
905
|
if (!validateInputOnChange) {
|
|
917
906
|
return false;
|
|
@@ -925,7 +914,7 @@ function shouldValidateOnChange(path, validateInputOnChange) {
|
|
|
925
914
|
return false;
|
|
926
915
|
}
|
|
927
916
|
|
|
928
|
-
// ../../node_modules/@mantine/form/esm/use-form.mjs
|
|
917
|
+
// ../../node_modules/.pnpm/@mantine+form@7.10.1_react@18.3.1/node_modules/@mantine/form/esm/use-form.mjs
|
|
929
918
|
function useForm({
|
|
930
919
|
name,
|
|
931
920
|
mode = "controlled",
|
|
@@ -1115,8 +1104,7 @@ function useForm({
|
|
|
1115
1104
|
|
|
1116
1105
|
// src/nodes/modifiers/noise-curve-node.tsx
|
|
1117
1106
|
var import_react11 = require("react");
|
|
1118
|
-
var
|
|
1119
|
-
var import_util = require("libnoise-ts/util");
|
|
1107
|
+
var import_libnoise_simplex_ts4 = require("libnoise-simplex-ts");
|
|
1120
1108
|
var import_icons_react2 = require("@tabler/icons-react");
|
|
1121
1109
|
var import_hooks5 = require("@mantine/hooks");
|
|
1122
1110
|
var import_abstract = require("@awesome-flow/core/abstract");
|
|
@@ -1159,9 +1147,9 @@ function NoiseCurveNode({ id, selected, data, type }) {
|
|
|
1159
1147
|
}, []);
|
|
1160
1148
|
(0, import_react11.useEffect)(() => {
|
|
1161
1149
|
if (incoming?.length && values?.length >= 4) {
|
|
1162
|
-
const module2 = new
|
|
1150
|
+
const module2 = new import_libnoise_simplex_ts4.Curve(
|
|
1163
1151
|
incoming[0].module,
|
|
1164
|
-
values.map((p) => new
|
|
1152
|
+
values.map((p) => new import_libnoise_simplex_ts4.Tuple(p.input, p.output))
|
|
1165
1153
|
);
|
|
1166
1154
|
updateComputedData(id, { module: module2 });
|
|
1167
1155
|
}
|
|
@@ -1225,7 +1213,7 @@ var import_layout5 = require("@awesome-flow/core/layout");
|
|
|
1225
1213
|
var import_react12 = require("react");
|
|
1226
1214
|
var import_core3 = require("@mantine/core");
|
|
1227
1215
|
var import_hooks6 = require("@awesome-flow/core/hooks");
|
|
1228
|
-
var
|
|
1216
|
+
var import_libnoise_simplex_ts5 = require("libnoise-simplex-ts");
|
|
1229
1217
|
var import_jsx_runtime5 = require("react/jsx-runtime");
|
|
1230
1218
|
function NoiseExponentNode({ id, selected, data, type }) {
|
|
1231
1219
|
const [exponent, setExponent] = (0, import_react12.useState)(data.exponent);
|
|
@@ -1234,7 +1222,7 @@ function NoiseExponentNode({ id, selected, data, type }) {
|
|
|
1234
1222
|
const updateComputedData = (0, import_hooks6.useUpdateNodeComputedData)();
|
|
1235
1223
|
(0, import_react12.useEffect)(() => {
|
|
1236
1224
|
if (incoming?.length > 0) {
|
|
1237
|
-
const module2 = new
|
|
1225
|
+
const module2 = new import_libnoise_simplex_ts5.Exponent(incoming[0].module, exponent);
|
|
1238
1226
|
updateComputedData(id, { module: module2 });
|
|
1239
1227
|
}
|
|
1240
1228
|
updateNodeData(id, { exponent });
|
|
@@ -1261,14 +1249,14 @@ var noise_exponent_node_default = NoiseExponentNode;
|
|
|
1261
1249
|
var import_layout6 = require("@awesome-flow/core/layout");
|
|
1262
1250
|
var import_react13 = require("react");
|
|
1263
1251
|
var import_hooks7 = require("@awesome-flow/core/hooks");
|
|
1264
|
-
var
|
|
1252
|
+
var import_libnoise_simplex_ts6 = require("libnoise-simplex-ts");
|
|
1265
1253
|
var import_jsx_runtime6 = require("react/jsx-runtime");
|
|
1266
1254
|
function NoiseInvertNode({ id, selected, data, type }) {
|
|
1267
1255
|
const incoming = (0, import_hooks7.useIncomingComputedData)(id);
|
|
1268
1256
|
const updateComputedData = (0, import_hooks7.useUpdateNodeComputedData)();
|
|
1269
1257
|
(0, import_react13.useEffect)(() => {
|
|
1270
1258
|
if (incoming?.length > 0) {
|
|
1271
|
-
const module2 = new
|
|
1259
|
+
const module2 = new import_libnoise_simplex_ts6.Invert(incoming[0].module);
|
|
1272
1260
|
updateComputedData(id, { module: module2 });
|
|
1273
1261
|
}
|
|
1274
1262
|
}, [incoming]);
|
|
@@ -1283,8 +1271,8 @@ var import_core4 = require("@mantine/core");
|
|
|
1283
1271
|
var import_hooks8 = require("@awesome-flow/core/hooks");
|
|
1284
1272
|
|
|
1285
1273
|
// src/modules/normalize-noise-module.ts
|
|
1286
|
-
var
|
|
1287
|
-
var NormalizeNoiseModule = class extends
|
|
1274
|
+
var import_libnoise_simplex_ts7 = require("libnoise-simplex-ts");
|
|
1275
|
+
var NormalizeNoiseModule = class extends import_libnoise_simplex_ts7.ModifierModule {
|
|
1288
1276
|
constructor(source, lowerBound, upperBound) {
|
|
1289
1277
|
super(source);
|
|
1290
1278
|
this.lowerBound = lowerBound;
|
|
@@ -1345,7 +1333,7 @@ var import_layout8 = require("@awesome-flow/core/layout");
|
|
|
1345
1333
|
var import_react15 = require("react");
|
|
1346
1334
|
var import_core5 = require("@mantine/core");
|
|
1347
1335
|
var import_hooks9 = require("@awesome-flow/core/hooks");
|
|
1348
|
-
var
|
|
1336
|
+
var import_libnoise_simplex_ts8 = require("libnoise-simplex-ts");
|
|
1349
1337
|
var import_jsx_runtime8 = require("react/jsx-runtime");
|
|
1350
1338
|
function NoiseScaleBiasNode({ id, selected, data, type }) {
|
|
1351
1339
|
const [scale, setScale] = (0, import_react15.useState)(data.scale);
|
|
@@ -1355,7 +1343,7 @@ function NoiseScaleBiasNode({ id, selected, data, type }) {
|
|
|
1355
1343
|
const updateComputedData = (0, import_hooks9.useUpdateNodeComputedData)();
|
|
1356
1344
|
(0, import_react15.useEffect)(() => {
|
|
1357
1345
|
if (incoming?.length > 0) {
|
|
1358
|
-
const module2 = new
|
|
1346
|
+
const module2 = new import_libnoise_simplex_ts8.ScaleBias(incoming[0].module, scale, bias);
|
|
1359
1347
|
updateComputedData(id, { module: module2 });
|
|
1360
1348
|
}
|
|
1361
1349
|
updateNodeData(id, { scale, bias });
|
|
@@ -1399,7 +1387,7 @@ var import_layout9 = require("@awesome-flow/core/layout");
|
|
|
1399
1387
|
var import_core6 = require("@mantine/core");
|
|
1400
1388
|
var import_hooks10 = require("@awesome-flow/core/hooks");
|
|
1401
1389
|
var import_react16 = require("react");
|
|
1402
|
-
var
|
|
1390
|
+
var import_libnoise_simplex_ts9 = require("libnoise-simplex-ts");
|
|
1403
1391
|
var import_icons_react3 = require("@tabler/icons-react");
|
|
1404
1392
|
var import_hooks11 = require("@mantine/hooks");
|
|
1405
1393
|
var import_abstract2 = require("@awesome-flow/core/abstract");
|
|
@@ -1431,7 +1419,7 @@ function NoiseTerraceNode({ id, selected, data, type }) {
|
|
|
1431
1419
|
}, []);
|
|
1432
1420
|
(0, import_react16.useEffect)(() => {
|
|
1433
1421
|
if (incoming?.length && values?.length >= 2) {
|
|
1434
|
-
const module2 = new
|
|
1422
|
+
const module2 = new import_libnoise_simplex_ts9.Terrace(incoming[0].module, values);
|
|
1435
1423
|
updateComputedData(id, { module: module2 });
|
|
1436
1424
|
}
|
|
1437
1425
|
}, [values, incoming]);
|
|
@@ -1,11 +1,8 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
2
|
import { NodeProps, Node } from '@xyflow/react';
|
|
3
3
|
import { BasicNodeData } from '@awesome-flow/core/abstract';
|
|
4
|
-
import { h as NodeNormalizeNoiseData, o as NodeCombineNoiseData, i as NodeClampNoiseData, p as NodeCurveNoiseData, r as NodeExponentNoiseData, s as NodeScaleBiasNoiseData, q as NodeTerraceNoiseData } from '../../node-props-
|
|
5
|
-
import 'libnoise-ts
|
|
6
|
-
import 'libnoise-ts/noisegen';
|
|
7
|
-
import 'libnoise-ts/module/Module';
|
|
8
|
-
import 'libnoise-ts/module/combiner';
|
|
4
|
+
import { h as NodeNormalizeNoiseData, o as NodeCombineNoiseData, i as NodeClampNoiseData, p as NodeCurveNoiseData, r as NodeExponentNoiseData, s as NodeScaleBiasNoiseData, q as NodeTerraceNoiseData } from '../../node-props-CAV2WNDN.cjs';
|
|
5
|
+
import 'libnoise-simplex-ts';
|
|
9
6
|
|
|
10
7
|
declare function NoiseNormalizeNode({ id, selected, data, type }: NodeProps<Node<NodeNormalizeNoiseData>>): react_jsx_runtime.JSX.Element;
|
|
11
8
|
|
|
@@ -1,11 +1,8 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
2
|
import { NodeProps, Node } from '@xyflow/react';
|
|
3
3
|
import { BasicNodeData } from '@awesome-flow/core/abstract';
|
|
4
|
-
import { h as NodeNormalizeNoiseData, o as NodeCombineNoiseData, i as NodeClampNoiseData, p as NodeCurveNoiseData, r as NodeExponentNoiseData, s as NodeScaleBiasNoiseData, q as NodeTerraceNoiseData } from '../../node-props-
|
|
5
|
-
import 'libnoise-ts
|
|
6
|
-
import 'libnoise-ts/noisegen';
|
|
7
|
-
import 'libnoise-ts/module/Module';
|
|
8
|
-
import 'libnoise-ts/module/combiner';
|
|
4
|
+
import { h as NodeNormalizeNoiseData, o as NodeCombineNoiseData, i as NodeClampNoiseData, p as NodeCurveNoiseData, r as NodeExponentNoiseData, s as NodeScaleBiasNoiseData, q as NodeTerraceNoiseData } from '../../node-props-CAV2WNDN.js';
|
|
5
|
+
import 'libnoise-simplex-ts';
|
|
9
6
|
|
|
10
7
|
declare function NoiseNormalizeNode({ id, selected, data, type }: NodeProps<Node<NodeNormalizeNoiseData>>): react_jsx_runtime.JSX.Element;
|
|
11
8
|
|