@synnaxlabs/x 0.45.1 → 0.46.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/.turbo/turbo-build.log +33 -31
- package/dist/array.cjs +1 -1
- package/dist/array.js +2 -5
- package/dist/binary.cjs +1 -1
- package/dist/binary.js +1 -1
- package/dist/box-BXWXSkKu.js +203 -0
- package/dist/box-rH3ggwXk.cjs +1 -0
- package/dist/box.cjs +1 -1
- package/dist/box.js +1 -1
- package/dist/caseconv.cjs +1 -1
- package/dist/caseconv.js +1 -1
- package/dist/deep.cjs +1 -1
- package/dist/deep.js +1 -1
- package/dist/{external-tyaEMW4S.js → external-2YWy569j.js} +3 -3
- package/dist/{external-uXk0Avrg.cjs → external-B6edOwoQ.cjs} +1 -1
- package/dist/{external-BPgtxa8d.js → external-B80i4ymZ.js} +2 -2
- package/dist/external-BxmTQZ6m.cjs +1 -0
- package/dist/external-DLiGrXn7.cjs +1 -0
- package/dist/external-Du5qzfYv.js +35 -0
- package/dist/get-CtJEJIC_.js +82 -0
- package/dist/get-D2VRwUw4.cjs +1 -0
- package/dist/{index-CwGPVvbl.cjs → index-Bfvg0v-N.cjs} +1 -1
- package/dist/{index-uDxeM-cl.cjs → index-CyNZHQFw.cjs} +1 -1
- package/dist/{index-Bxlv0uf_.js → index-qmkoZBNO.js} +1 -1
- package/dist/{index-BHXRDFYj.js → index-yz34Wc2p.js} +1 -1
- package/dist/index.cjs +3 -3
- package/dist/index.js +411 -378
- package/dist/{location-BPoXwOni.cjs → location-0qDBiCqP.cjs} +1 -1
- package/dist/{location-CVxysrHI.js → location-BIzpxczO.js} +1 -1
- package/dist/location.cjs +1 -1
- package/dist/location.js +1 -1
- package/dist/runtime.cjs +1 -1
- package/dist/runtime.js +1 -1
- package/dist/{scale-DjxC6ep2.js → scale-BBWhTUqJ.js} +3 -3
- package/dist/{scale-BHs716im.cjs → scale-BXy1w8R_.cjs} +1 -1
- package/dist/scale.cjs +1 -1
- package/dist/scale.js +1 -1
- package/dist/series-B2zqvP8A.cjs +6 -0
- package/dist/{series-W5Aafjeu.js → series-Clbw-fZI.js} +543 -451
- package/dist/spatial.cjs +1 -1
- package/dist/spatial.js +4 -4
- package/dist/src/array/external.d.ts +4 -0
- package/dist/src/array/external.d.ts.map +1 -0
- package/dist/src/array/index.d.ts +1 -1
- package/dist/src/array/index.d.ts.map +1 -1
- package/dist/src/array/nullable.d.ts +3 -0
- package/dist/src/array/nullable.d.ts.map +1 -0
- package/dist/src/array/update.d.ts +14 -0
- package/dist/src/array/update.d.ts.map +1 -0
- package/dist/src/array/update.spec.d.ts +2 -0
- package/dist/src/array/update.spec.d.ts.map +1 -0
- package/dist/src/index.d.ts +1 -0
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/label/index.d.ts +2 -0
- package/dist/src/label/index.d.ts.map +1 -0
- package/dist/src/label/label.d.ts +11 -0
- package/dist/src/label/label.d.ts.map +1 -0
- package/dist/src/math/constants.d.ts +16 -0
- package/dist/src/math/constants.d.ts.map +1 -0
- package/dist/src/math/external.d.ts +1 -0
- package/dist/src/math/external.d.ts.map +1 -1
- package/dist/src/migrate/migrate.d.ts +1 -1
- package/dist/src/spatial/box/box.d.ts.map +1 -1
- package/dist/src/spatial/xy/xy.d.ts +10 -0
- package/dist/src/spatial/xy/xy.d.ts.map +1 -1
- package/dist/src/status/status.d.ts +25 -15
- package/dist/src/status/status.d.ts.map +1 -1
- package/dist/src/strings/strings.d.ts +1 -0
- package/dist/src/strings/strings.d.ts.map +1 -1
- package/dist/src/telem/series.d.ts +4 -4
- package/dist/src/telem/series.d.ts.map +1 -1
- package/dist/src/telem/telem.d.ts +35 -29
- package/dist/src/telem/telem.d.ts.map +1 -1
- package/dist/telem.cjs +1 -1
- package/dist/telem.js +14 -13
- package/dist/{xy-DWwtHmgn.cjs → xy-C-MUIjVs.cjs} +1 -1
- package/dist/{xy-DYPw8-8C.js → xy-DnrCAZaw.js} +16 -9
- package/dist/xy.cjs +1 -1
- package/dist/xy.js +1 -1
- package/dist/zod.cjs +1 -1
- package/dist/zod.js +1 -1
- package/package.json +8 -8
- package/src/array/external.ts +12 -0
- package/src/array/index.ts +1 -1
- package/src/array/nullable.ts +7 -0
- package/src/array/update.spec.ts +133 -0
- package/src/array/update.ts +66 -0
- package/src/caseconv/caseconv.spec.ts +2 -0
- package/src/caseconv/caseconv.ts +9 -9
- package/src/deep/partial.spec.ts +9 -9
- package/src/deep/path.spec.ts +5 -2
- package/src/index.ts +1 -0
- package/src/label/index.ts +10 -0
- package/src/label/label.ts +20 -0
- package/src/math/constants.ts +29 -0
- package/src/math/external.ts +1 -0
- package/src/spatial/box/box.ts +1 -2
- package/src/spatial/xy/xy.ts +18 -1
- package/src/status/status.ts +47 -27
- package/src/strings/strings.spec.ts +42 -0
- package/src/strings/strings.ts +14 -0
- package/src/telem/series.ts +2 -3
- package/src/telem/telem.spec.ts +155 -18
- package/src/telem/telem.ts +185 -56
- package/src/testutil/testutil.spec.ts +1 -1
- package/src/zod/nullToUndefined.spec.ts +2 -2
- package/src/zod/toArray.spec.ts +9 -3
- package/tsconfig.tsbuildinfo +1 -1
- package/.vscode/settings.json +0 -5
- package/README.md +0 -38
- package/dist/box-BYuq-Gjx.js +0 -203
- package/dist/box-Blu-4d1n.cjs +0 -1
- package/dist/external-CtHGFcox.cjs +0 -1
- package/dist/get-CXkBfLu1.js +0 -82
- package/dist/get-OP63N4c3.cjs +0 -1
- package/dist/series-C6ZwNf8i.cjs +0 -6
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
|
|
2
|
-
> @synnaxlabs/x@0.
|
|
2
|
+
> @synnaxlabs/x@0.46.0 build /home/runner/work/synnax/synnax/x/ts
|
|
3
3
|
> tsc --noEmit && vite build
|
|
4
4
|
|
|
5
5
|
[34m Synnax - Production mode[0m
|
|
6
|
-
[36mvite v7.
|
|
6
|
+
[36mvite v7.1.5 [32mbuilding for production...[36m[39m
|
|
7
7
|
transforming...
|
|
8
|
-
[32m✓[39m
|
|
8
|
+
[32m✓[39m 154 modules transformed.
|
|
9
9
|
[33mGenerated an empty chunk: "destructor".[39m
|
|
10
10
|
rendering chunks...
|
|
11
11
|
|
|
@@ -14,6 +14,7 @@ computing gzip size...
|
|
|
14
14
|
[2mdist/[22m[36mdestructor.js [39m[1m[2m 0.00 kB[22m[1m[22m[2m │ gzip: 0.02 kB[22m
|
|
15
15
|
[2mdist/[22m[36mxy.js [39m[1m[2m 0.07 kB[22m[1m[22m[2m │ gzip: 0.08 kB[22m
|
|
16
16
|
[2mdist/[22m[36mbox.js [39m[1m[2m 0.07 kB[22m[1m[22m[2m │ gzip: 0.08 kB[22m
|
|
17
|
+
[2mdist/[22m[36marray.js [39m[1m[2m 0.07 kB[22m[1m[22m[2m │ gzip: 0.09 kB[22m
|
|
17
18
|
[2mdist/[22m[36mkv.js [39m[1m[2m 0.07 kB[22m[1m[22m[2m │ gzip: 0.09 kB[22m
|
|
18
19
|
[2mdist/[22m[36mscale.js [39m[1m[2m 0.07 kB[22m[1m[22m[2m │ gzip: 0.08 kB[22m
|
|
19
20
|
[2mdist/[22m[36mlocation.js [39m[1m[2m 0.07 kB[22m[1m[22m[2m │ gzip: 0.08 kB[22m
|
|
@@ -29,37 +30,37 @@ computing gzip size...
|
|
|
29
30
|
[2mdist/[22m[36mruntime.js [39m[1m[2m 0.08 kB[22m[1m[22m[2m │ gzip: 0.09 kB[22m
|
|
30
31
|
[2mdist/[22m[36mdimensions.js [39m[1m[2m 0.08 kB[22m[1m[22m[2m │ gzip: 0.08 kB[22m
|
|
31
32
|
[2mdist/[22m[36midentity.js [39m[1m[2m 0.10 kB[22m[1m[22m[2m │ gzip: 0.11 kB[22m
|
|
32
|
-
[2mdist/[22m[36marray.js [39m[1m[2m 0.24 kB[22m[1m[22m[2m │ gzip: 0.20 kB[22m
|
|
33
33
|
[2mdist/[22m[36mspatial-DnsaOypA.js [39m[1m[2m 0.28 kB[22m[1m[22m[2m │ gzip: 0.23 kB[22m
|
|
34
34
|
[2mdist/[22m[36mchange-DLl6DccR.js [39m[1m[2m 0.30 kB[22m[1m[22m[2m │ gzip: 0.23 kB[22m
|
|
35
35
|
[2mdist/[22m[36mdebounce.js [39m[1m[2m 0.36 kB[22m[1m[22m[2m │ gzip: 0.18 kB[22m
|
|
36
|
-
[2mdist/[22m[36mtelem.js [39m[1m[2m 0.41 kB[22m[1m[22m[2m │ gzip: 0.25 kB[22m
|
|
37
36
|
[2mdist/[22m[36mlink.js [39m[1m[2m 0.44 kB[22m[1m[22m[2m │ gzip: 0.34 kB[22m
|
|
38
37
|
[2mdist/[22m[36mindex-D4NCYiQB.js [39m[1m[2m 0.45 kB[22m[1m[22m[2m │ gzip: 0.30 kB[22m
|
|
38
|
+
[2mdist/[22m[36mtelem.js [39m[1m[2m 0.45 kB[22m[1m[22m[2m │ gzip: 0.27 kB[22m
|
|
39
39
|
[2mdist/[22m[36mspatial.js [39m[1m[2m 0.51 kB[22m[1m[22m[2m │ gzip: 0.26 kB[22m
|
|
40
40
|
[2mdist/[22m[36mrecord-tSFQKmdG.js [39m[1m[2m 0.61 kB[22m[1m[22m[2m │ gzip: 0.37 kB[22m
|
|
41
41
|
[2mdist/[22m[36mdirection-C_b4tfRN.js [39m[1m[2m 0.76 kB[22m[1m[22m[2m │ gzip: 0.41 kB[22m
|
|
42
42
|
[2mdist/[22m[36mexternal-BYuXBYJh.js [39m[1m[2m 0.79 kB[22m[1m[22m[2m │ gzip: 0.34 kB[22m
|
|
43
43
|
[2mdist/[22m[36mworker.js [39m[1m[2m 0.87 kB[22m[1m[22m[2m │ gzip: 0.40 kB[22m
|
|
44
|
-
[2mdist/[22m[36mexternal-
|
|
45
|
-
[2mdist/[22m[36mexternal-
|
|
44
|
+
[2mdist/[22m[36mexternal-2YWy569j.js [39m[1m[2m 0.87 kB[22m[1m[22m[2m │ gzip: 0.52 kB[22m
|
|
45
|
+
[2mdist/[22m[36mexternal-B80i4ymZ.js [39m[1m[2m 0.99 kB[22m[1m[22m[2m │ gzip: 0.56 kB[22m
|
|
46
46
|
[2mdist/[22m[36mobserve.js [39m[1m[2m 1.10 kB[22m[1m[22m[2m │ gzip: 0.48 kB[22m
|
|
47
|
+
[2mdist/[22m[36mexternal-Du5qzfYv.js [39m[1m[2m 1.15 kB[22m[1m[22m[2m │ gzip: 0.49 kB[22m
|
|
47
48
|
[2mdist/[22m[36mbase-DRybODwJ.js [39m[1m[2m 1.31 kB[22m[1m[22m[2m │ gzip: 0.54 kB[22m
|
|
48
49
|
[2mdist/[22m[36mdimensions-DC0uLPwn.js [39m[1m[2m 1.49 kB[22m[1m[22m[2m │ gzip: 0.66 kB[22m
|
|
49
50
|
[2mdist/[22m[36murl.js [39m[1m[2m 1.70 kB[22m[1m[22m[2m │ gzip: 0.76 kB[22m
|
|
50
|
-
[2mdist/[22m[36mindex-
|
|
51
|
-
[2mdist/[22m[36mget-
|
|
52
|
-
[2mdist/[22m[36mindex-
|
|
53
|
-
[2mdist/[22m[36mlocation-
|
|
51
|
+
[2mdist/[22m[36mindex-qmkoZBNO.js [39m[1m[2m 2.22 kB[22m[1m[22m[2m │ gzip: 0.99 kB[22m
|
|
52
|
+
[2mdist/[22m[36mget-CtJEJIC_.js [39m[1m[2m 2.26 kB[22m[1m[22m[2m │ gzip: 0.86 kB[22m
|
|
53
|
+
[2mdist/[22m[36mindex-yz34Wc2p.js [39m[1m[2m 2.56 kB[22m[1m[22m[2m │ gzip: 0.99 kB[22m
|
|
54
|
+
[2mdist/[22m[36mlocation-BIzpxczO.js [39m[1m[2m 2.83 kB[22m[1m[22m[2m │ gzip: 1.17 kB[22m
|
|
54
55
|
[2mdist/[22m[36mindex-C452Pas0.js [39m[1m[2m 3.72 kB[22m[1m[22m[2m │ gzip: 1.39 kB[22m
|
|
55
|
-
[2mdist/[22m[36mxy-
|
|
56
|
+
[2mdist/[22m[36mxy-DnrCAZaw.js [39m[1m[2m 4.40 kB[22m[1m[22m[2m │ gzip: 1.62 kB[22m
|
|
56
57
|
[2mdist/[22m[36mbounds-DeUXrllt.js [39m[1m[2m 6.20 kB[22m[1m[22m[2m │ gzip: 2.09 kB[22m
|
|
57
|
-
[2mdist/[22m[36mbox-
|
|
58
|
-
[2mdist/[22m[36mscale-
|
|
58
|
+
[2mdist/[22m[36mbox-BXWXSkKu.js [39m[1m[2m 6.35 kB[22m[1m[22m[2m │ gzip: 2.22 kB[22m
|
|
59
|
+
[2mdist/[22m[36mscale-BBWhTUqJ.js [39m[1m[2m 6.49 kB[22m[1m[22m[2m │ gzip: 1.88 kB[22m
|
|
59
60
|
[2mdist/[22m[36mdeep.js [39m[1m[2m 6.72 kB[22m[1m[22m[2m │ gzip: 2.22 kB[22m
|
|
60
|
-
[2mdist/[22m[36mindex.js [39m[1m[
|
|
61
|
-
[2mdist/[22m[36mseries-
|
|
62
|
-
[vite:dts] Declaration files built in
|
|
61
|
+
[2mdist/[22m[36mindex.js [39m[1m[2m29.84 kB[22m[1m[22m[2m │ gzip: 9.67 kB[22m
|
|
62
|
+
[2mdist/[22m[36mseries-Clbw-fZI.js [39m[1m[2m95.89 kB[22m[1m[22m[2m │ gzip: 20.50 kB[22m
|
|
63
|
+
[vite:dts] Declaration files built in 5061ms.
|
|
63
64
|
|
|
64
65
|
[33mGenerated an empty chunk: "destructor".[39m
|
|
65
66
|
[2mdist/[22m[36mdestructor.cjs [39m[1m[2m 0.01 kB[22m[1m[22m[2m │ gzip: 0.03 kB[22m
|
|
@@ -74,6 +75,7 @@ computing gzip size...
|
|
|
74
75
|
[2mdist/[22m[36mchange.cjs [39m[1m[2m 0.15 kB[22m[1m[22m[2m │ gzip: 0.15 kB[22m
|
|
75
76
|
[2mdist/[22m[36mzod.cjs [39m[1m[2m 0.15 kB[22m[1m[22m[2m │ gzip: 0.15 kB[22m
|
|
76
77
|
[2mdist/[22m[36mcompare.cjs [39m[1m[2m 0.15 kB[22m[1m[22m[2m │ gzip: 0.15 kB[22m
|
|
78
|
+
[2mdist/[22m[36marray.cjs [39m[1m[2m 0.15 kB[22m[1m[22m[2m │ gzip: 0.15 kB[22m
|
|
77
79
|
[2mdist/[22m[36mcaseconv.cjs [39m[1m[2m 0.15 kB[22m[1m[22m[2m │ gzip: 0.15 kB[22m
|
|
78
80
|
[2mdist/[22m[36mruntime.cjs [39m[1m[2m 0.15 kB[22m[1m[22m[2m │ gzip: 0.15 kB[22m
|
|
79
81
|
[2mdist/[22m[36mlocation.cjs [39m[1m[2m 0.15 kB[22m[1m[22m[2m │ gzip: 0.15 kB[22m
|
|
@@ -82,32 +84,32 @@ computing gzip size...
|
|
|
82
84
|
[2mdist/[22m[36midentity.cjs [39m[1m[2m 0.16 kB[22m[1m[22m[2m │ gzip: 0.15 kB[22m
|
|
83
85
|
[2mdist/[22m[36mchange-C-YELKx6.cjs [39m[1m[2m 0.23 kB[22m[1m[22m[2m │ gzip: 0.20 kB[22m
|
|
84
86
|
[2mdist/[22m[36mspatial-DrxzaD5U.cjs [39m[1m[2m 0.24 kB[22m[1m[22m[2m │ gzip: 0.21 kB[22m
|
|
85
|
-
[2mdist/[22m[36marray.cjs [39m[1m[2m 0.25 kB[22m[1m[22m[2m │ gzip: 0.18 kB[22m
|
|
86
87
|
[2mdist/[22m[36mindex-udOjA9d-.cjs [39m[1m[2m 0.32 kB[22m[1m[22m[2m │ gzip: 0.25 kB[22m
|
|
87
88
|
[2mdist/[22m[36mdebounce.cjs [39m[1m[2m 0.33 kB[22m[1m[22m[2m │ gzip: 0.22 kB[22m
|
|
88
89
|
[2mdist/[22m[36mlink.cjs [39m[1m[2m 0.42 kB[22m[1m[22m[2m │ gzip: 0.30 kB[22m
|
|
89
90
|
[2mdist/[22m[36mrecord-BwjIgrpU.cjs [39m[1m[2m 0.49 kB[22m[1m[22m[2m │ gzip: 0.33 kB[22m
|
|
90
|
-
[2mdist/[22m[36mtelem.cjs [39m[1m[2m 0.54 kB[22m[1m[22m[2m │ gzip: 0.27 kB[22m
|
|
91
91
|
[2mdist/[22m[36mspatial.cjs [39m[1m[2m 0.57 kB[22m[1m[22m[2m │ gzip: 0.31 kB[22m
|
|
92
92
|
[2mdist/[22m[36mexternal-B9AAGv50.cjs [39m[1m[2m 0.58 kB[22m[1m[22m[2m │ gzip: 0.30 kB[22m
|
|
93
|
+
[2mdist/[22m[36mtelem.cjs [39m[1m[2m 0.59 kB[22m[1m[22m[2m │ gzip: 0.29 kB[22m
|
|
93
94
|
[2mdist/[22m[36mdirection-DqQB9M37.cjs [39m[1m[2m 0.62 kB[22m[1m[22m[2m │ gzip: 0.38 kB[22m
|
|
94
|
-
[2mdist/[22m[36mexternal-
|
|
95
|
+
[2mdist/[22m[36mexternal-BxmTQZ6m.cjs [39m[1m[2m 0.68 kB[22m[1m[22m[2m │ gzip: 0.45 kB[22m
|
|
95
96
|
[2mdist/[22m[36mworker.cjs [39m[1m[2m 0.71 kB[22m[1m[22m[2m │ gzip: 0.39 kB[22m
|
|
96
97
|
[2mdist/[22m[36mobserve.cjs [39m[1m[2m 0.76 kB[22m[1m[22m[2m │ gzip: 0.36 kB[22m
|
|
97
|
-
[2mdist/[22m[36mexternal-
|
|
98
|
+
[2mdist/[22m[36mexternal-B6edOwoQ.cjs [39m[1m[2m 0.79 kB[22m[1m[22m[2m │ gzip: 0.49 kB[22m
|
|
99
|
+
[2mdist/[22m[36mexternal-DLiGrXn7.cjs [39m[1m[2m 0.88 kB[22m[1m[22m[2m │ gzip: 0.42 kB[22m
|
|
98
100
|
[2mdist/[22m[36murl.cjs [39m[1m[2m 0.88 kB[22m[1m[22m[2m │ gzip: 0.51 kB[22m
|
|
99
101
|
[2mdist/[22m[36mdimensions-Cg5Owbwn.cjs [39m[1m[2m 1.17 kB[22m[1m[22m[2m │ gzip: 0.58 kB[22m
|
|
100
102
|
[2mdist/[22m[36mbase-KIBsp6TI.cjs [39m[1m[2m 1.50 kB[22m[1m[22m[2m │ gzip: 0.60 kB[22m
|
|
101
|
-
[2mdist/[22m[36mindex-
|
|
102
|
-
[2mdist/[22m[36mget-
|
|
103
|
-
[2mdist/[22m[36mindex-
|
|
104
|
-
[2mdist/[22m[36mlocation-
|
|
103
|
+
[2mdist/[22m[36mindex-CyNZHQFw.cjs [39m[1m[2m 1.63 kB[22m[1m[22m[2m │ gzip: 0.81 kB[22m
|
|
104
|
+
[2mdist/[22m[36mget-D2VRwUw4.cjs [39m[1m[2m 1.74 kB[22m[1m[22m[2m │ gzip: 0.79 kB[22m
|
|
105
|
+
[2mdist/[22m[36mindex-Bfvg0v-N.cjs [39m[1m[2m 1.98 kB[22m[1m[22m[2m │ gzip: 0.90 kB[22m
|
|
106
|
+
[2mdist/[22m[36mlocation-0qDBiCqP.cjs [39m[1m[2m 2.44 kB[22m[1m[22m[2m │ gzip: 1.05 kB[22m
|
|
105
107
|
[2mdist/[22m[36mindex-xaxa1hoa.cjs [39m[1m[2m 2.64 kB[22m[1m[22m[2m │ gzip: 1.14 kB[22m
|
|
106
|
-
[2mdist/[22m[36mxy-
|
|
107
|
-
[2mdist/[22m[36mscale-
|
|
108
|
+
[2mdist/[22m[36mxy-C-MUIjVs.cjs [39m[1m[2m 3.20 kB[22m[1m[22m[2m │ gzip: 1.43 kB[22m
|
|
109
|
+
[2mdist/[22m[36mscale-BXy1w8R_.cjs [39m[1m[2m 4.11 kB[22m[1m[22m[2m │ gzip: 1.47 kB[22m
|
|
108
110
|
[2mdist/[22m[36mdeep.cjs [39m[1m[2m 4.46 kB[22m[1m[22m[2m │ gzip: 1.82 kB[22m
|
|
109
111
|
[2mdist/[22m[36mbounds-C2TKFgVk.cjs [39m[1m[2m 4.67 kB[22m[1m[22m[2m │ gzip: 1.85 kB[22m
|
|
110
|
-
[2mdist/[22m[36mbox-
|
|
111
|
-
[2mdist/[22m[36mindex.cjs [39m[1m[
|
|
112
|
-
[2mdist/[22m[36mseries-
|
|
113
|
-
[32m✓ built in 5.
|
|
112
|
+
[2mdist/[22m[36mbox-rH3ggwXk.cjs [39m[1m[2m 4.84 kB[22m[1m[22m[2m │ gzip: 1.98 kB[22m
|
|
113
|
+
[2mdist/[22m[36mindex.cjs [39m[1m[2m22.70 kB[22m[1m[22m[2m │ gzip: 8.47 kB[22m
|
|
114
|
+
[2mdist/[22m[36mseries-B2zqvP8A.cjs [39m[1m[2m42.09 kB[22m[1m[22m[2m │ gzip: 11.19 kB[22m
|
|
115
|
+
[32m✓ built in 5.90s[39m
|
package/dist/array.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./external-DLiGrXn7.cjs");exports.array=e.external;
|
package/dist/array.js
CHANGED
|
@@ -1,7 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
__proto__: null,
|
|
3
|
-
toArray: o
|
|
4
|
-
}, Symbol.toStringTag, { value: "Module" }));
|
|
1
|
+
import { e } from "./external-Du5qzfYv.js";
|
|
5
2
|
export {
|
|
6
|
-
|
|
3
|
+
e as array
|
|
7
4
|
};
|
package/dist/binary.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-Bfvg0v-N.cjs");exports.binary=e.codec;
|
package/dist/binary.js
CHANGED
|
@@ -0,0 +1,203 @@
|
|
|
1
|
+
import { z as x } from "zod";
|
|
2
|
+
import { c as O } from "./direction-C_b4tfRN.js";
|
|
3
|
+
import { c as S, T as C, B as j, x as Z, a as q, b as F, d as G, e as D, f as X, C as Y, g as U } from "./location-BIzpxczO.js";
|
|
4
|
+
import { Z as g, O as k, e as I, t as T, c as J, a as L, r as $ } from "./xy-DnrCAZaw.js";
|
|
5
|
+
import { x as N, X as H, Y as K } from "./base-DRybODwJ.js";
|
|
6
|
+
const _ = x.union([x.number(), x.string()]), Q = x.object({
|
|
7
|
+
top: _,
|
|
8
|
+
left: _,
|
|
9
|
+
width: _,
|
|
10
|
+
height: _
|
|
11
|
+
}), V = x.object({
|
|
12
|
+
left: x.number(),
|
|
13
|
+
top: x.number(),
|
|
14
|
+
right: x.number(),
|
|
15
|
+
bottom: x.number()
|
|
16
|
+
}), tt = x.object({
|
|
17
|
+
one: N,
|
|
18
|
+
two: N,
|
|
19
|
+
root: S
|
|
20
|
+
}), P = { one: g, two: g, root: C }, ot = { one: g, two: k, root: j }, v = (t, o) => ({
|
|
21
|
+
one: t.one,
|
|
22
|
+
two: t.two,
|
|
23
|
+
root: o ?? t.root
|
|
24
|
+
}), c = (t, o, e = 0, n = 0, s) => {
|
|
25
|
+
const r = {
|
|
26
|
+
one: { ...g },
|
|
27
|
+
two: { ...g },
|
|
28
|
+
root: s ?? C
|
|
29
|
+
};
|
|
30
|
+
if (typeof t == "number") {
|
|
31
|
+
if (typeof o != "number")
|
|
32
|
+
throw new Error("Box constructor called with invalid arguments");
|
|
33
|
+
return r.one = { x: t, y: o }, r.two = { x: r.one.x + e, y: r.one.y + n }, r;
|
|
34
|
+
}
|
|
35
|
+
return "one" in t && "two" in t && "root" in t ? { ...t, root: s ?? t.root } : ("getBoundingClientRect" in t && (t = t.getBoundingClientRect()), "left" in t ? (r.one = { x: t.left, y: t.top }, r.two = { x: t.right, y: t.bottom }, r) : (r.one = t, o == null ? r.two = { x: r.one.x + e, y: r.one.y + n } : typeof o == "number" ? r.two = { x: r.one.x + o, y: r.one.y + e } : "width" in o ? r.two = {
|
|
36
|
+
x: r.one.x + o.width,
|
|
37
|
+
y: r.one.y + o.height
|
|
38
|
+
} : "signedWidth" in o ? r.two = {
|
|
39
|
+
x: r.one.x + o.signedWidth,
|
|
40
|
+
y: r.one.y + o.signedHeight
|
|
41
|
+
} : r.two = o, r));
|
|
42
|
+
}, nt = (t, o, e) => {
|
|
43
|
+
const n = c(t);
|
|
44
|
+
if (typeof o == "string") {
|
|
45
|
+
if (e == null) throw new Error("Invalid arguments for resize");
|
|
46
|
+
const s = O(o);
|
|
47
|
+
return c(
|
|
48
|
+
n.one,
|
|
49
|
+
void 0,
|
|
50
|
+
s === "x" ? e : d(n),
|
|
51
|
+
s === "y" ? e : f(n),
|
|
52
|
+
n.root
|
|
53
|
+
);
|
|
54
|
+
}
|
|
55
|
+
return c(n.one, o, void 0, void 0, n.root);
|
|
56
|
+
}, et = (t, o, e = !0) => {
|
|
57
|
+
const n = c(t);
|
|
58
|
+
let s = (r, i) => r < i;
|
|
59
|
+
return e && (s = (r, i) => r <= i), "one" in o ? s(u(n), u(o)) && s(w(o), w(n)) && s(a(n), a(o)) && s(l(o), l(n)) : s(u(n), o.x) && s(o.x, w(n)) && s(a(n), o.y) && s(o.y, l(n));
|
|
60
|
+
}, rt = (t, o) => I(t.one, o.one) && I(t.two, o.two) && Z(t.root, o.root), W = (t) => ({
|
|
61
|
+
width: d(t),
|
|
62
|
+
height: f(t)
|
|
63
|
+
}), st = (t) => ({
|
|
64
|
+
signedWidth: h(t),
|
|
65
|
+
signedHeight: b(t)
|
|
66
|
+
}), ct = (t) => ({
|
|
67
|
+
top: a(t),
|
|
68
|
+
left: u(t),
|
|
69
|
+
width: d(t),
|
|
70
|
+
height: f(t)
|
|
71
|
+
}), M = (t, o, e = !1) => {
|
|
72
|
+
const n = O(o) === "y" ? b(t) : h(t);
|
|
73
|
+
return e ? n : Math.abs(n);
|
|
74
|
+
}, y = (t, o) => {
|
|
75
|
+
const e = c(t);
|
|
76
|
+
return {
|
|
77
|
+
x: o.x === "center" ? E(e).x : m(e, o.x),
|
|
78
|
+
y: o.y === "center" ? E(e).y : m(e, o.y)
|
|
79
|
+
};
|
|
80
|
+
}, m = (t, o) => {
|
|
81
|
+
const e = c(t), n = q(e.root).includes(o) ? Math.min : Math.max;
|
|
82
|
+
return H.includes(o) ? n(e.one.x, e.two.x) : n(e.one.y, e.two.y);
|
|
83
|
+
}, it = (t) => A(t) === 0, d = (t) => M(t, "x"), f = (t) => M(t, "y"), h = (t) => {
|
|
84
|
+
const o = c(t);
|
|
85
|
+
return o.two.x - o.one.x;
|
|
86
|
+
}, b = (t) => {
|
|
87
|
+
const o = c(t);
|
|
88
|
+
return o.two.y - o.one.y;
|
|
89
|
+
}, z = (t) => y(t, C), xt = (t) => y(t, F), yt = (t) => y(t, G), ut = (t) => y(t, j), at = (t) => y(t, D), dt = (t) => y(t, X), ft = (t) => y(t, Y), wt = (t) => y(t, U), w = (t) => m(t, "right"), l = (t) => m(t, "bottom"), u = (t) => m(t, "left"), a = (t) => m(t, "top"), E = (t) => T(z(t), {
|
|
90
|
+
x: h(t) / 2,
|
|
91
|
+
y: b(t) / 2
|
|
92
|
+
}), B = (t) => {
|
|
93
|
+
const o = c(t);
|
|
94
|
+
return o.root.x === "left" ? u(o) : w(o);
|
|
95
|
+
}, R = (t) => {
|
|
96
|
+
const o = c(t);
|
|
97
|
+
return o.root.y === "top" ? a(o) : l(o);
|
|
98
|
+
}, lt = (t) => ({ x: B(t), y: R(t) }), mt = (t) => {
|
|
99
|
+
const o = c(t);
|
|
100
|
+
return { lower: o.one.x, upper: o.two.x };
|
|
101
|
+
}, pt = (t) => {
|
|
102
|
+
const o = c(t);
|
|
103
|
+
return { lower: o.one.y, upper: o.two.y };
|
|
104
|
+
}, gt = (t, o) => v(t, o), _t = (t, o) => {
|
|
105
|
+
const e = c(t), n = H.includes(o) ? "x" : K.includes(o) ? "y" : null;
|
|
106
|
+
if (n === null) throw new Error(`Invalid location: ${o}`);
|
|
107
|
+
const s = o === "top" || o === "left" ? Math.min : Math.max, r = { ...e.one }, i = { ...e.two };
|
|
108
|
+
return r[n] = s(e.one[n], e.two[n]), i[n] = s(e.one[n], e.two[n]), [r, i];
|
|
109
|
+
}, ht = (t, o) => {
|
|
110
|
+
const e = c(t), n = c(o), s = B(n) + (d(n) - d(e)) / 2, r = R(n) + (f(n) - f(e)) / 2;
|
|
111
|
+
return c({ x: s, y: r }, W(e));
|
|
112
|
+
}, bt = (t) => typeof t != "object" || t == null ? !1 : "one" in t && "two" in t && "root" in t, Tt = (t) => d(t) / f(t), Et = (t, o, e) => {
|
|
113
|
+
if (typeof o == "string") {
|
|
114
|
+
if (e == null) throw new Error("Undefined amount passed into box.translate");
|
|
115
|
+
const s = O(o);
|
|
116
|
+
o = J(s, e);
|
|
117
|
+
}
|
|
118
|
+
const n = c(t);
|
|
119
|
+
return c(
|
|
120
|
+
T(n.one, o),
|
|
121
|
+
T(n.two, o),
|
|
122
|
+
void 0,
|
|
123
|
+
void 0,
|
|
124
|
+
n.root
|
|
125
|
+
);
|
|
126
|
+
}, Ot = (t, o) => {
|
|
127
|
+
const e = Math.max(u(t), u(o)), n = Math.max(a(t), a(o)), s = Math.min(w(t), w(o)), r = Math.min(l(t), l(o));
|
|
128
|
+
return e > s || n > r ? P : c({ x: e, y: n }, { x: s, y: r }, void 0, void 0, t.root);
|
|
129
|
+
}, A = (t) => d(t) * f(t), Ct = (t, o) => {
|
|
130
|
+
const e = c(t);
|
|
131
|
+
return c(
|
|
132
|
+
L(e.one, o),
|
|
133
|
+
L(e.two, o),
|
|
134
|
+
void 0,
|
|
135
|
+
void 0,
|
|
136
|
+
e.root
|
|
137
|
+
);
|
|
138
|
+
}, Mt = (t, o, e, n, s, r) => {
|
|
139
|
+
const i = { x: t, y: o }, p = { x: t + e, y: o + n };
|
|
140
|
+
return s.x !== r.x && (s.x === "center" ? (i.x -= e / 2, p.x -= e / 2) : (i.x -= e, p.x -= e)), s.y !== r.y && (s.y === "center" ? (i.y -= n / 2, p.y -= n / 2) : (i.y -= n, p.y -= n)), c(i, p, void 0, void 0, r);
|
|
141
|
+
}, Bt = (t) => {
|
|
142
|
+
const o = c(t);
|
|
143
|
+
return c($(o.one), $(o.two), void 0, void 0, o.root);
|
|
144
|
+
}, jt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
145
|
+
__proto__: null,
|
|
146
|
+
DECIMAL: ot,
|
|
147
|
+
ZERO: P,
|
|
148
|
+
area: A,
|
|
149
|
+
areaIsZero: it,
|
|
150
|
+
aspect: Tt,
|
|
151
|
+
bottom: l,
|
|
152
|
+
bottomCenter: at,
|
|
153
|
+
bottomLeft: ut,
|
|
154
|
+
bottomRight: dt,
|
|
155
|
+
box: tt,
|
|
156
|
+
center: E,
|
|
157
|
+
centerLeft: ft,
|
|
158
|
+
centerRight: wt,
|
|
159
|
+
construct: c,
|
|
160
|
+
constructWithAlternateRoot: Mt,
|
|
161
|
+
contains: et,
|
|
162
|
+
copy: v,
|
|
163
|
+
css: ct,
|
|
164
|
+
cssBox: Q,
|
|
165
|
+
dim: M,
|
|
166
|
+
dims: W,
|
|
167
|
+
domRect: V,
|
|
168
|
+
edgePoints: _t,
|
|
169
|
+
equals: rt,
|
|
170
|
+
height: f,
|
|
171
|
+
intersection: Ot,
|
|
172
|
+
isBox: bt,
|
|
173
|
+
left: u,
|
|
174
|
+
loc: m,
|
|
175
|
+
positionInCenter: ht,
|
|
176
|
+
reRoot: gt,
|
|
177
|
+
resize: nt,
|
|
178
|
+
right: w,
|
|
179
|
+
root: lt,
|
|
180
|
+
round: Bt,
|
|
181
|
+
signedDims: st,
|
|
182
|
+
signedHeight: b,
|
|
183
|
+
signedWidth: h,
|
|
184
|
+
top: a,
|
|
185
|
+
topCenter: xt,
|
|
186
|
+
topLeft: z,
|
|
187
|
+
topRight: yt,
|
|
188
|
+
translate: Et,
|
|
189
|
+
truncate: Ct,
|
|
190
|
+
width: d,
|
|
191
|
+
x: B,
|
|
192
|
+
xBounds: mt,
|
|
193
|
+
xyLoc: y,
|
|
194
|
+
y: R,
|
|
195
|
+
yBounds: pt
|
|
196
|
+
}, Symbol.toStringTag, { value: "Module" }));
|
|
197
|
+
export {
|
|
198
|
+
jt as b,
|
|
199
|
+
c,
|
|
200
|
+
bt as i,
|
|
201
|
+
mt as x,
|
|
202
|
+
pt as y
|
|
203
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const y=require("zod"),M=require("./direction-DqQB9M37.cjs"),u=require("./location-0qDBiCqP.cjs"),i=require("./xy-C-MUIjVs.cjs"),m=require("./base-KIBsp6TI.cjs"),p=y.z.union([y.z.number(),y.z.string()]),F=y.z.object({top:p,left:p,width:p,height:p}),H=y.z.object({left:y.z.number(),top:y.z.number(),right:y.z.number(),bottom:y.z.number()}),v=y.z.object({one:m.xy,two:m.xy,root:u.corner}),C={one:i.ZERO,two:i.ZERO,root:u.TOP_LEFT},A={one:i.ZERO,two:i.ONE,root:u.BOTTOM_LEFT},L=(t,o)=>({one:t.one,two:t.two,root:o??t.root}),c=(t,o,e=0,n=0,s)=>{const r={one:{...i.ZERO},two:{...i.ZERO},root:s??u.TOP_LEFT};if(typeof t=="number"){if(typeof o!="number")throw new Error("Box constructor called with invalid arguments");return r.one={x:t,y:o},r.two={x:r.one.x+e,y:r.one.y+n},r}return"one"in t&&"two"in t&&"root"in t?{...t,root:s??t.root}:("getBoundingClientRect"in t&&(t=t.getBoundingClientRect()),"left"in t?(r.one={x:t.left,y:t.top},r.two={x:t.right,y:t.bottom},r):(r.one=t,o==null?r.two={x:r.one.x+e,y:r.one.y+n}:typeof o=="number"?r.two={x:r.one.x+o,y:r.one.y+e}:"width"in o?r.two={x:r.one.x+o.width,y:r.one.y+o.height}:"signedWidth"in o?r.two={x:r.one.x+o.signedWidth,y:r.one.y+o.signedHeight}:r.two=o,r))},S=(t,o,e)=>{const n=c(t);if(typeof o=="string"){if(e==null)throw new Error("Invalid arguments for resize");const s=M.construct(o);return c(n.one,void 0,s==="x"?e:f(n),s==="y"?e:_(n),n.root)}return c(n.one,o,void 0,void 0,n.root)},W=(t,o,e=!0)=>{const n=c(t);let s=(r,x)=>r<x;return e&&(s=(r,x)=>r<=x),"one"in o?s(l(n),l(o))&&s(a(o),a(n))&&s(w(n),w(o))&&s(g(o),g(n)):s(l(n),o.x)&&s(o.x,a(n))&&s(w(n),o.y)&&s(o.y,g(n))},G=(t,o)=>i.equals(t.one,o.one)&&i.equals(t.two,o.two)&&u.xyEquals(t.root,o.root),I=t=>({width:f(t),height:_(t)}),D=t=>({signedWidth:O(t),signedHeight:E(t)}),X=t=>({top:w(t),left:l(t),width:f(t),height:_(t)}),R=(t,o,e=!1)=>{const n=M.construct(o)==="y"?E(t):O(t);return e?n:Math.abs(n)},d=(t,o)=>{const e=c(t);return{x:o.x==="center"?b(e).x:T(e,o.x),y:o.y==="center"?b(e).y:T(e,o.y)}},T=(t,o)=>{const e=c(t),n=u.xyCouple(e.root).includes(o)?Math.min:Math.max;return m.X_LOCATIONS.includes(o)?n(e.one.x,e.two.x):n(e.one.y,e.two.y)},$=t=>j(t)===0,f=t=>R(t,"x"),_=t=>R(t,"y"),O=t=>{const o=c(t);return o.two.x-o.one.x},E=t=>{const o=c(t);return o.two.y-o.one.y},q=t=>d(t,u.TOP_LEFT),U=t=>d(t,u.TOP_CENTER),Y=t=>d(t,u.TOP_RIGHT),k=t=>d(t,u.BOTTOM_LEFT),J=t=>d(t,u.BOTTOM_CENTER),K=t=>d(t,u.BOTTOM_RIGHT),Q=t=>d(t,u.CENTER_LEFT),V=t=>d(t,u.CENTER_RIGHT),a=t=>T(t,"right"),g=t=>T(t,"bottom"),l=t=>T(t,"left"),w=t=>T(t,"top"),b=t=>i.translate(q(t),{x:O(t)/2,y:E(t)/2}),z=t=>{const o=c(t);return o.root.x==="left"?l(o):a(o)},B=t=>{const o=c(t);return o.root.y==="top"?w(o):g(o)},tt=t=>({x:z(t),y:B(t)}),N=t=>{const o=c(t);return{lower:o.one.x,upper:o.two.x}},P=t=>{const o=c(t);return{lower:o.one.y,upper:o.two.y}},ot=(t,o)=>L(t,o),nt=(t,o)=>{const e=c(t),n=m.X_LOCATIONS.includes(o)?"x":m.Y_LOCATIONS.includes(o)?"y":null;if(n===null)throw new Error(`Invalid location: ${o}`);const s=o==="top"||o==="left"?Math.min:Math.max,r={...e.one},x={...e.two};return r[n]=s(e.one[n],e.two[n]),x[n]=s(e.one[n],e.two[n]),[r,x]},et=(t,o)=>{const e=c(t),n=c(o),s=z(n)+(f(n)-f(e))/2,r=B(n)+(_(n)-_(e))/2;return c({x:s,y:r},I(e))},Z=t=>typeof t!="object"||t==null?!1:"one"in t&&"two"in t&&"root"in t,rt=t=>f(t)/_(t),st=(t,o,e)=>{if(typeof o=="string"){if(e==null)throw new Error("Undefined amount passed into box.translate");const s=M.construct(o);o=i.construct(s,e)}const n=c(t);return c(i.translate(n.one,o),i.translate(n.two,o),void 0,void 0,n.root)},ct=(t,o)=>{const e=Math.max(l(t),l(o)),n=Math.max(w(t),w(o)),s=Math.min(a(t),a(o)),r=Math.min(g(t),g(o));return e>s||n>r?C:c({x:e,y:n},{x:s,y:r},void 0,void 0,t.root)},j=t=>f(t)*_(t),it=(t,o)=>{const e=c(t);return c(i.truncate(e.one,o),i.truncate(e.two,o),void 0,void 0,e.root)},ut=(t,o,e,n,s,r)=>{const x={x:t,y:o},h={x:t+e,y:o+n};return s.x!==r.x&&(s.x==="center"?(x.x-=e/2,h.x-=e/2):(x.x-=e,h.x-=e)),s.y!==r.y&&(s.y==="center"?(x.y-=n/2,h.y-=n/2):(x.y-=n,h.y-=n)),c(x,h,void 0,void 0,r)},xt=t=>{const o=c(t);return c(i.round(o.one),i.round(o.two),void 0,void 0,o.root)},yt=Object.freeze(Object.defineProperty({__proto__:null,DECIMAL:A,ZERO:C,area:j,areaIsZero:$,aspect:rt,bottom:g,bottomCenter:J,bottomLeft:k,bottomRight:K,box:v,center:b,centerLeft:Q,centerRight:V,construct:c,constructWithAlternateRoot:ut,contains:W,copy:L,css:X,cssBox:F,dim:R,dims:I,domRect:H,edgePoints:nt,equals:G,height:_,intersection:ct,isBox:Z,left:l,loc:T,positionInCenter:et,reRoot:ot,resize:S,right:a,root:tt,round:xt,signedDims:D,signedHeight:E,signedWidth:O,top:w,topCenter:U,topLeft:q,topRight:Y,translate:st,truncate:it,width:f,x:z,xBounds:N,xyLoc:d,y:B,yBounds:P},Symbol.toStringTag,{value:"Module"}));exports.box=yt;exports.construct=c;exports.isBox=Z;exports.xBounds=N;exports.yBounds=P;
|
package/dist/box.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./box-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./box-rH3ggwXk.cjs");exports.box=e.box;
|
package/dist/box.js
CHANGED
package/dist/caseconv.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-CyNZHQFw.cjs");exports.caseconv=e.caseconv;
|
package/dist/caseconv.js
CHANGED
package/dist/deep.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const y=require("./get-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const y=require("./get-D2VRwUw4.cjs"),d=require("./identity.cjs"),A=l=>{try{return structuredClone(l)}catch{return console.warn("Failed to deep copy object, falling back to JSON.parse(JSON.stringify)",l),console.trace(),JSON.parse(JSON.stringify(l))}},j=(l,c,o="")=>{const t={},n=(i,e,r)=>{if(typeof i!=typeof e||i===null||e===null){t[r]=[i,e];return}if(typeof i=="object"&&typeof e=="object")if(Array.isArray(i)&&Array.isArray(e)){if(i.length!==e.length){t[r]=[i,e];return}for(let s=0;s<i.length;s++)n(i[s],e[s],`${r}[${s}]`)}else new Set([...Object.keys(i),...Object.keys(e)]).forEach(f=>{n(i[f],e[f],r!==""?`${r}.${f}`:f)});else i!==e&&(t[r]=[i,e])};return n(l,c,o),t},g=(l,c)=>{const o=Array.isArray(l),t=Array.isArray(c);if(o!==t)return!1;if(o&&t){const e=l,r=c;if(e.length!==r.length)return!1;for(let s=0;s<e.length;s++)if(!g(e[s],r[s]))return!1;return!0}if(l==null||c==null||typeof l!="object"||typeof c!="object")return l===c;if("equals"in l)return l.equals(c);const n=Object.keys(l),i=Object.keys(c);if(n.length!==i.length)return!1;for(const e of n){const r=l[e],s=c[e];if(typeof r=="object"&&typeof s=="object"){if(!g(r,s))return!1}else if(r!==s)return!1}return!0},h=(l,c)=>{if(typeof l!="object"||l==null)return l===c;const o=Object.keys(l),t=Object.keys(c);if(t.length>o.length)return!1;for(const n of t){const i=l[n],e=c[n];if(typeof i=="object"&&typeof e=="object"){if(!h(i,e))return!1}else if(i!==e)return!1}return!0},p=(l,...c)=>{if(c.length===0)return l;const o=c.shift();if(d.isObject(l)&&d.isObject(o))for(const t in o)try{d.isObject(o[t])?(t in l||Object.assign(l,{[t]:{}}),p(l[t],o[t])):Object.assign(l,{[t]:o[t]})}catch(n){throw n instanceof TypeError?new TypeError(`.${t}: ${n.message}`):n}return p(l,...c)},x=(l,c,o)=>{const t=(n,i,e)=>{if(e.def?.type==="union")return e.def.options.reduce((r,s)=>t(r,i,s),n);if(e.def?.type==="intersection"){const r=t(n,i,e.def.left);return t(r,i,e.def.right)}for(const r in i){const s=i[r];let f=e?.shape;if(f!=null)for(;f!=null;){if(f[r]!=null){const u=f[r].safeParse(s);if(u.success){n[r]=u.data;break}}f=f.def?.shape}typeof s=="object"&&!Array.isArray(s)&&s!==null&&e&&e.shape&&e.shape[r]&&(n[r]||={},t(n[r],s,e.shape[r]))}return n};return t({...l},c,o)},k=(l,c)=>{const o=c.split(y.SEPARATOR);let t=l,n=0;for(;n<o.length;){if(n===o.length-1){const e=o[n];if(Array.isArray(t)){const r=parseInt(e);if(!isNaN(r)&&r<t.length){t.splice(r,1);return}const s=t[0];if(typeof s=="object"&&"key"in s){const f=t.findIndex(u=>u.key===e);if(f!==-1){t.splice(f,1);return}}return}delete t[e];return}let i=!1;if(Array.isArray(t)&&t.length>0){const e=t[0];if(typeof e=="object"&&"key"in e)for(let r=o.length-n;r>=1;r--){const s=o.slice(n,n+r).join(y.SEPARATOR),f=t.find(u=>u.key===s);if(f!=null){if(n+r===o.length){const u=t.findIndex(a=>a.key===s);u!==-1&&t.splice(u,1);return}t=f,n+=r,i=!0;break}}}if(!i)for(let e=o.length-n;e>=1;e--){const r=o.slice(n,n+e).join(y.SEPARATOR);if(!Array.isArray(t)&&typeof t=="object"&&t!==null&&r in t){if(n+e===o.length){delete t[r];return}t=t[r],n+=e,i=!0;break}}if(!i){const e=y.defaultGetter(t,o[n]);if(e==null)return;t=e,n++}}},I=(l,c,o)=>{const t=c.split(y.SEPARATOR);let n=l,i=0;for(;i<t.length-1;){const e=y.findBestKey(n,t.slice(i,t.length-1));let r;e!=null?[r,i]=[e[0],i+e[1]]:(r=t[i],i++);let s=y.defaultGetter(n,r);if(s==null){const f=t[i];let u=y.getIndex(f);u==null&&f.startsWith("-")&&y.getIndex(f.substring(1))!=null&&(u=0),s=u!=null?[]:{},n[r]=s}n=s}try{const e=t[t.length-1];if(Array.isArray(n)){let s=y.getIndex(e);if(s==null){if(e.startsWith("-")){const f=y.getIndex(e.substring(1));f!=null&&(s=n.length-f)}if(s==null){if(n.length===0){const u=y.getIndex(e);if(u!=null){n[u]=o;return}}const f=n[0];if(typeof f=="object"&&"key"in f){const u=n.findIndex(a=>a.key===e);if(u!==-1){n[u]=o;return}}return}}n[s]=o;return}const r=y.findBestKey(n,[e]);if(r!=null){n[r[0]]=o;return}n[e]=o}catch(e){throw console.error("failed to set value",o,"at path",c,"on object",l),e}},O=Object.freeze(Object.defineProperty({__proto__:null,SEPARATOR:y.SEPARATOR,copy:A,defaultGetter:y.defaultGetter,difference:j,element:y.element,equal:g,findBestKey:y.findBestKey,get:y.get,getIndex:y.getIndex,has:y.has,override:p,overrideValidItems:x,partialEqual:h,pathsMatch:y.pathsMatch,remove:k,resolvePath:y.resolvePath,set:I,transformPath:y.transformPath},Symbol.toStringTag,{value:"Module"}));exports.deep=O;
|
package/dist/deep.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { S as a, d as j, f as g, a as u, e as x, g as I, h as w, p as K, r as O, t as V } from "./get-
|
|
1
|
+
import { S as a, d as j, f as g, a as u, e as x, g as I, h as w, p as K, r as O, t as V } from "./get-CtJEJIC_.js";
|
|
2
2
|
import { isObject as d } from "./identity.js";
|
|
3
3
|
const N = (i) => {
|
|
4
4
|
try {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import a from "zod";
|
|
2
|
-
import { t as i, g as f } from "./get-
|
|
2
|
+
import { t as i, g as f } from "./get-CtJEJIC_.js";
|
|
3
3
|
const m = (e) => e.nullable().transform((t) => t === null ? void 0 : t).optional(), p = (e) => a.array(e).or(e.transform((t) => [t])), s = (e) => i(e, (t, r, n) => {
|
|
4
4
|
const l = r === n.length - 1, u = !isNaN(parseInt(t)), c = !isNaN(parseInt(n[r + 1]));
|
|
5
5
|
return u && (t = "element"), l || c ? t : [t, "shape"];
|
|
@@ -7,11 +7,11 @@ const m = (e) => e.nullable().transform((t) => t === null ? void 0 : t).optional
|
|
|
7
7
|
if (e == null) return null;
|
|
8
8
|
const r = e[t];
|
|
9
9
|
return r == null && typeof e == "object" && "sourceType" in e ? e.sourceType()[t] : r;
|
|
10
|
-
}, y = (e, t, r) => t === "" ? e : f(
|
|
10
|
+
}, y = ((e, t, r) => t === "" ? e : f(
|
|
11
11
|
o(e, "shape"),
|
|
12
12
|
s(t),
|
|
13
13
|
{ ...r, getter: o }
|
|
14
|
-
), d = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
14
|
+
)), d = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
15
15
|
__proto__: null,
|
|
16
16
|
getFieldSchema: y,
|
|
17
17
|
getFieldSchemaPath: s,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const r=require("zod"),t=()=>typeof process<"u"&&process.versions!=null&&process.versions.node!=null?"node":typeof window>"u"||window.document===void 0?"webworker":"browser",u=t(),s=["macOS","Windows","Linux"],c=["macos","windows","linux"],d={macos:"macOS",windows:"Windows",linux:"Linux"},l=r.z.enum(s).or(r.z.enum(c).transform(n=>d[n])),f=()=>{if(typeof window>"u")return;const n=window.navigator.userAgent.toLowerCase();if(n.includes("mac"))return"macOS";if(n.includes("win"))return"Windows";if(n.includes("linux"))return"Linux"};let e;const w=(n={})=>{const{force:o,default:i}=n;return o??e??(e=f(),e??i)},a=Object.freeze(Object.defineProperty({__proto__:null,OPERATING_SYSTEMS:s,RUNTIME:u,detect:t,getOS:w,osZ:l},Symbol.toStringTag,{value:"Module"}));exports.external=a;
|
|
1
|
+
"use strict";const r=require("zod"),t=()=>typeof process<"u"&&process.versions!=null&&process.versions.node!=null?"node":typeof window>"u"||window.document===void 0?"webworker":"browser",u=t(),s=["macOS","Windows","Linux"],c=["macos","windows","linux"],d={macos:"macOS",windows:"Windows",linux:"Linux"},l=r.z.enum(s).or(r.z.enum(c).transform(n=>d[n])),f=()=>{if(typeof window>"u")return;const n=window.navigator.userAgent.toLowerCase();if(n.includes("mac"))return"macOS";if(n.includes("win"))return"Windows";if(n.includes("linux"))return"Linux"};let e;const w=((n={})=>{const{force:o,default:i}=n;return o??e??(e=f(),e??i)}),a=Object.freeze(Object.defineProperty({__proto__:null,OPERATING_SYSTEMS:s,RUNTIME:u,detect:t,getOS:w,osZ:l},Symbol.toStringTag,{value:"Module"}));exports.external=a;
|
|
@@ -13,10 +13,10 @@ const t = () => typeof process < "u" && process.versions != null && process.vers
|
|
|
13
13
|
if (n.includes("linux")) return "Linux";
|
|
14
14
|
};
|
|
15
15
|
let e;
|
|
16
|
-
const w = (n = {}) => {
|
|
16
|
+
const w = ((n = {}) => {
|
|
17
17
|
const { force: o, default: s } = n;
|
|
18
18
|
return o ?? e ?? (e = f(), e ?? s);
|
|
19
|
-
}, S = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
19
|
+
}), S = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
20
20
|
__proto__: null,
|
|
21
21
|
OPERATING_SYSTEMS: i,
|
|
22
22
|
RUNTIME: u,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const a=require("zod"),s=require("./get-D2VRwUw4.cjs"),f=e=>e.nullable().transform(t=>t===null?void 0:t).optional(),y=e=>a.array(e).or(e.transform(t=>[t])),u=e=>s.transformPath(e,(t,r,n)=>{const l=r===n.length-1,c=!isNaN(parseInt(t)),i=!isNaN(parseInt(n[r+1]));return c&&(t="element"),l||i?t:[t,"shape"]}),o=(e,t)=>{if(e==null)return null;const r=e[t];return r==null&&typeof e=="object"&&"sourceType"in e?e.sourceType()[t]:r},g=((e,t,r)=>t===""?e:s.get(o(e,"shape"),u(t),{...r,getter:o})),p=Object.freeze(Object.defineProperty({__proto__:null,getFieldSchema:g,getFieldSchemaPath:u,nullToUndefined:f,toArray:y},Symbol.toStringTag,{value:"Module"}));exports.external=p;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const u=require("zod"),o=r=>u.union([u.union([u.null(),u.undefined()]).transform(()=>[]),r.array()]),d=r=>Array.isArray(r)?r:r==null?[]:[r],f=(r,n)=>{if(Array.isArray(n))return n.reduce((i,l)=>f(i,l),r??[]);if(r==null)return[n];const t=r.findIndex(i=>i==n),e=[...r];return t===-1?e.push(n):e[t]=n,e},s=((r,n)=>{if(r!=null)return Array.isArray(n)?r.filter(t=>!n.includes(t)):r.filter(t=>t!=n)}),y=(r,n)=>{if(Array.isArray(n))return n.reduce((i,l)=>y(i,l),r??[]);if(r==null)return[n];const t=r.findIndex(i=>i.key===n.key),e=[...r];return t===-1?e.push(n):e[t]=n,e},A=((r,n)=>{if(r!=null)return Array.isArray(n)?r.filter(t=>!n.includes(t.key)):r.filter(t=>t.key!==n)}),c=Object.freeze(Object.defineProperty({__proto__:null,nullableZ:o,remove:s,removeKeyed:A,toArray:d,upsert:f,upsertKeyed:y},Symbol.toStringTag,{value:"Module"}));exports.external=c;exports.nullableZ=o;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import u from "zod";
|
|
2
|
+
const y = (r) => u.union([
|
|
3
|
+
u.union([u.null(), u.undefined()]).transform(() => []),
|
|
4
|
+
r.array()
|
|
5
|
+
]), d = (r) => Array.isArray(r) ? r : r == null ? [] : [r], l = (r, n) => {
|
|
6
|
+
if (Array.isArray(n))
|
|
7
|
+
return n.reduce((e, o) => l(e, o), r ?? []);
|
|
8
|
+
if (r == null) return [n];
|
|
9
|
+
const t = r.findIndex((e) => e == n), i = [...r];
|
|
10
|
+
return t === -1 ? i.push(n) : i[t] = n, i;
|
|
11
|
+
}, s = ((r, n) => {
|
|
12
|
+
if (r != null)
|
|
13
|
+
return Array.isArray(n) ? r.filter((t) => !n.includes(t)) : r.filter((t) => t != n);
|
|
14
|
+
}), f = (r, n) => {
|
|
15
|
+
if (Array.isArray(n))
|
|
16
|
+
return n.reduce((e, o) => f(e, o), r ?? []);
|
|
17
|
+
if (r == null) return [n];
|
|
18
|
+
const t = r.findIndex((e) => e.key === n.key), i = [...r];
|
|
19
|
+
return t === -1 ? i.push(n) : i[t] = n, i;
|
|
20
|
+
}, A = ((r, n) => {
|
|
21
|
+
if (r != null)
|
|
22
|
+
return Array.isArray(n) ? r.filter((t) => !n.includes(t.key)) : r.filter((t) => t.key !== n);
|
|
23
|
+
}), a = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
24
|
+
__proto__: null,
|
|
25
|
+
nullableZ: y,
|
|
26
|
+
remove: s,
|
|
27
|
+
removeKeyed: A,
|
|
28
|
+
toArray: d,
|
|
29
|
+
upsert: l,
|
|
30
|
+
upsertKeyed: f
|
|
31
|
+
}, Symbol.toStringTag, { value: "Module" }));
|
|
32
|
+
export {
|
|
33
|
+
a as e,
|
|
34
|
+
y as n
|
|
35
|
+
};
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
const R = ".", g = (n, t, r = ".") => {
|
|
2
|
+
const e = n.split(r);
|
|
3
|
+
return e.map((s, o) => {
|
|
4
|
+
const l = t(s, o, e);
|
|
5
|
+
return l == null ? null : typeof l == "string" ? l : l.join(r);
|
|
6
|
+
}).filter((s) => s != null).join(r);
|
|
7
|
+
}, a = (n, t) => {
|
|
8
|
+
if (!Array.isArray(n)) return n[t];
|
|
9
|
+
const r = n[t];
|
|
10
|
+
if (r != null || n.length == 0) return r;
|
|
11
|
+
const e = n[0];
|
|
12
|
+
if (typeof e == "object" && "key" in e)
|
|
13
|
+
return n.find((i) => i.key === t);
|
|
14
|
+
}, E = (n, t) => {
|
|
15
|
+
const r = n.split(".");
|
|
16
|
+
return r.forEach((e, i) => {
|
|
17
|
+
t = a(t, e), t != null && typeof t == "object" && "key" in t && (r[i] = t.key);
|
|
18
|
+
}), r.join(".");
|
|
19
|
+
}, P = (n, t) => {
|
|
20
|
+
const r = n.split(".");
|
|
21
|
+
return t < 0 ? r[r.length + t] : r[t];
|
|
22
|
+
}, S = (n, t) => {
|
|
23
|
+
if (t.length === 0) return !0;
|
|
24
|
+
const r = n.split("."), e = t.split(".");
|
|
25
|
+
if (e.length > r.length) return !1;
|
|
26
|
+
for (let i = 0; i < e.length; i++) {
|
|
27
|
+
const s = r[i], o = e[i];
|
|
28
|
+
if (o !== "*" && s !== o)
|
|
29
|
+
return !1;
|
|
30
|
+
}
|
|
31
|
+
return !0;
|
|
32
|
+
}, p = (n) => {
|
|
33
|
+
const t = parseInt(n);
|
|
34
|
+
return isNaN(t) || t < 0 || t.toString() !== n ? null : t;
|
|
35
|
+
}, y = (n, t) => {
|
|
36
|
+
for (let r = 1; r <= t.length; r++) {
|
|
37
|
+
const e = t.slice(0, r).join(".");
|
|
38
|
+
if (a(n, e) != null) return [e, r];
|
|
39
|
+
}
|
|
40
|
+
return null;
|
|
41
|
+
}, h = ((n, t, r = { optional: !1 }) => {
|
|
42
|
+
const { optional: e, getter: i = a } = r;
|
|
43
|
+
if (t === "") return n;
|
|
44
|
+
const s = t.split(".");
|
|
45
|
+
if (s.length === 1) {
|
|
46
|
+
const l = i(n, s[0]);
|
|
47
|
+
if (l === void 0) {
|
|
48
|
+
if (e) return null;
|
|
49
|
+
throw new Error(`Path ${t} does not exist. ${s[0]} is undefined`);
|
|
50
|
+
}
|
|
51
|
+
return l;
|
|
52
|
+
}
|
|
53
|
+
const o = (l, u) => {
|
|
54
|
+
if (u >= s.length) return l;
|
|
55
|
+
for (let f = s.length - u; f >= 1; f--) {
|
|
56
|
+
const A = s.slice(u, u + f).join("."), c = i(l, A);
|
|
57
|
+
if (c !== void 0) {
|
|
58
|
+
if (u + f === s.length) return c;
|
|
59
|
+
if (c === null) {
|
|
60
|
+
if (e) return null;
|
|
61
|
+
throw new Error(`Path ${t} does not exist. ${A} is null`);
|
|
62
|
+
}
|
|
63
|
+
return o(c, u + f);
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
if (e) return null;
|
|
67
|
+
throw new Error(`Path ${t} does not exist. ${s[u]} is undefined`);
|
|
68
|
+
};
|
|
69
|
+
return o(n, 0);
|
|
70
|
+
}), d = (n, t) => h(n, t, { optional: !0 }) !== null;
|
|
71
|
+
export {
|
|
72
|
+
R as S,
|
|
73
|
+
p as a,
|
|
74
|
+
a as d,
|
|
75
|
+
P as e,
|
|
76
|
+
y as f,
|
|
77
|
+
h as g,
|
|
78
|
+
d as h,
|
|
79
|
+
S as p,
|
|
80
|
+
E as r,
|
|
81
|
+
g as t
|
|
82
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const a=(n,t,e=".")=>{const r=n.split(e);return r.map((s,o)=>{const i=t(s,o,r);return i==null?null:typeof i=="string"?i:i.join(e)}).filter(s=>s!=null).join(e)},A=(n,t)=>{if(!Array.isArray(n))return n[t];const e=n[t];if(e!=null||n.length==0)return e;const r=n[0];if(typeof r=="object"&&"key"in r)return n.find(l=>l.key===t)},P=(n,t)=>{const e=n.split(".");return e.forEach((r,l)=>{t=A(t,r),t!=null&&typeof t=="object"&&"key"in t&&(e[l]=t.key)}),e.join(".")},g=(n,t)=>{const e=n.split(".");return t<0?e[e.length+t]:e[t]},E=(n,t)=>{if(t.length===0)return!0;const e=n.split("."),r=t.split(".");if(r.length>e.length)return!1;for(let l=0;l<r.length;l++){const s=e[l],o=r[l];if(o!=="*"&&s!==o)return!1}return!0},S=n=>{const t=parseInt(n);return isNaN(t)||t<0||t.toString()!==n?null:t},d=(n,t)=>{for(let e=1;e<=t.length;e++){const r=t.slice(0,e).join(".");if(A(n,r)!=null)return[r,e]}return null},R=((n,t,e={optional:!1})=>{const{optional:r,getter:l=A}=e;if(t==="")return n;const s=t.split(".");if(s.length===1){const i=l(n,s[0]);if(i===void 0){if(r)return null;throw new Error(`Path ${t} does not exist. ${s[0]} is undefined`)}return i}const o=(i,u)=>{if(u>=s.length)return i;for(let f=s.length-u;f>=1;f--){const h=s.slice(u,u+f).join("."),c=l(i,h);if(c!==void 0){if(u+f===s.length)return c;if(c===null){if(r)return null;throw new Error(`Path ${t} does not exist. ${h} is null`)}return o(c,u+f)}}if(r)return null;throw new Error(`Path ${t} does not exist. ${s[u]} is undefined`)};return o(n,0)}),y=(n,t)=>R(n,t,{optional:!0})!==null;exports.SEPARATOR=".";exports.defaultGetter=A;exports.element=g;exports.findBestKey=d;exports.get=R;exports.getIndex=S;exports.has=y;exports.pathsMatch=E;exports.resolvePath=P;exports.transformPath=a;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
"use strict";const l=require("./index-
|
|
1
|
+
"use strict";const l=require("./index-CyNZHQFw.cjs"),C=require("./identity.cjs");class p{contentType="application/json";decoder;encoder;constructor(){this.decoder=new TextDecoder,this.encoder=new TextEncoder}encode(e){return this.encoder.encode(this.encodeString(e))}decode(e,t){return this.decodeString(this.decoder.decode(e),t)}decodeString(e,t){const n=JSON.parse(e),r=l.snakeToCamel(n);return t!=null?t.parse(r):r}encodeString(e){const t=l.camelToSnake(e);return JSON.stringify(t,(n,r)=>ArrayBuffer.isView(r)?Array.from(r):typeof r=="bigint"?r.toString():r)}}class f{contentType="text/csv";encode(e){const t=this.encodeString(e);return new TextEncoder().encode(t)}decode(e,t){const n=new TextDecoder().decode(e);return this.decodeString(n,t)}encodeString(e){if(!Array.isArray(e)||e.length===0||!C.isObject(e[0]))throw new Error("Payload must be an array of objects");const t=Object.keys(e[0]),n=[t.join(",")];return e.forEach(r=>{const s=t.map(c=>JSON.stringify(r[c]??""));n.push(s.join(","))}),n.join(`
|
|
2
2
|
`)}decodeString(e,t){const[n,...r]=e.trim().split(`
|
|
3
3
|
`).map(o=>o.trim());if(n.length===0)return t!=null?t.parse({}):{};const s=n.split(",").map(o=>o.trim()),c={};return s.forEach(o=>{c[o]=[]}),r.forEach(o=>{const g=o.split(",").map(i=>i.trim());s.forEach((i,h)=>{const a=this.parseValue(g[h]);a!=null&&c[i].push(a)})}),t!=null?t.parse(c):c}parseValue(e){if(e==null||e.length===0)return null;const t=Number(e);return isNaN(t)?e.startsWith('"')&&e.endsWith('"')?e.slice(1,-1):e:t}}class S{contentType="text/plain";encode(e){if(typeof e!="string")throw new Error("TextCodec.encode payload must be a string");return new TextEncoder().encode(e)}decode(e,t){const n=new TextDecoder().decode(e);return t!=null?t.parse(n):n}}const d=new p,E=new f,T=new S,w=[d],O=Object.freeze(Object.defineProperty({__proto__:null,CSVCodec:f,CSV_CODEC:E,ENCODERS:w,JSONCodec:p,JSON_CODEC:d,TEXT_CODEC:T,TextCodec:S},Symbol.toStringTag,{value:"Module"}));exports.JSON_CODEC=d;exports.codec=O;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const O=e=>{const r=e.replace(/_[a-z]/g,t=>t[1].toUpperCase());return r.length>1&&r[0]===r[0].toUpperCase()&&r[1]===r[1].toUpperCase()||r.length===0?r:r[0].toLowerCase()+r.slice(1)},u=e=>{const r=(t,n=f)=>{if(typeof t=="string")return e(t);if(Array.isArray(t))return t.map(i=>r(i,n));if(!p(t))return t;n=T(n);const s={},c=t;return"toJSON"in c&&typeof c.toJSON=="function"?r(c.toJSON(),n):(Object.keys(c).forEach(i=>{let a=c[i];const S=e(i);n.recursive&&(p(a)?g(a)||(a=r(a,n)):n.recursiveInArray&&y(a)&&(a=[...a].map(o=>{let l=o;return p(o)?g(l)||(l=r(o,n)):y(o)&&(l=r({key:o},n).key),l}))),s[S]=a}),s)};return r},A=u(O),_=e=>e.replace(/([a-z0-9])([A-Z])/g,(r,t,n)=>`${t}_${n.toLowerCase()}`),m=u(_),C=e=>e.length===0?e:e[0].toUpperCase()+e.slice(1),k=[Number,String,Uint8Array],f={recursive:!0,recursiveInArray:!0},T=(e=f)=>(e.recursive==null?e=f:e.recursiveInArray??=!1,e),y=e=>e!=null&&Array.isArray(e),p=e=>e!=null&&typeof e=="object"&&!Array.isArray(e),g=e=>k.some(r=>e instanceof r),v=e=>e.replace(
|
|
1
|
+
"use strict";const O=e=>{const r=e.replace(/_[a-z]/g,t=>t[1].toUpperCase());return r.length>1&&r[0]===r[0].toUpperCase()&&r[1]===r[1].toUpperCase()||r.length===0?r:r[0].toLowerCase()+r.slice(1)},u=e=>{const r=(t,n=f)=>{if(typeof t=="string")return e(t);if(Array.isArray(t))return t.map(i=>r(i,n));if(!p(t))return t;n=T(n);const s={},c=t;return"toJSON"in c&&typeof c.toJSON=="function"?r(c.toJSON(),n):(Object.keys(c).forEach(i=>{let a=c[i];const S=e(i);n.recursive&&(p(a)?g(a)||(a=r(a,n)):n.recursiveInArray&&y(a)&&(a=[...a].map(o=>{let l=o;return p(o)?g(l)||(l=r(o,n)):y(o)&&(l=r({key:o},n).key),l}))),s[S]=a}),s)};return r},A=u(O),_=e=>e.replace(/([a-z0-9])([A-Z])/g,(r,t,n)=>`${t}_${n.toLowerCase()}`),m=u(_),C=e=>e.length===0?e:e[0].toUpperCase()+e.slice(1),k=[Number,String,Uint8Array],f={recursive:!0,recursiveInArray:!0},T=(e=f)=>(e.recursive==null?e=f:e.recursiveInArray??=!1,e),y=e=>e!=null&&Array.isArray(e),p=e=>e!=null&&typeof e=="object"&&!Array.isArray(e),g=e=>k.some(r=>e instanceof r),v=e=>e.replace(/[\s_]+/g,"-").replace(/([a-z0-9])([A-Z])/g,(r,t,n)=>`${t}-${n.toLowerCase()}`).toLowerCase(),z=u(v),$=e=>{if(e.length===0)return e;let r=e.replace(/[_-]/g," ");return r=r.replace(/([a-z0-9])([A-Z])/g,(t,n,s)=>`${n} ${s}`),r=r.replace(/([A-Z]+)([A-Z][a-z])/g,(t,n,s)=>`${n} ${s}`),r=r.replace(/\s+/g," ").trim(),r=r.replace(/\b\w/g,t=>t.toUpperCase()),r},b=u($),N=Object.freeze(Object.defineProperty({__proto__:null,camelToSnake:m,capitalize:C,snakeToCamel:A,toKebab:z,toProperNoun:b},Symbol.toStringTag,{value:"Module"}));exports.camelToSnake=m;exports.capitalize=C;exports.caseconv=N;exports.snakeToCamel=A;
|