@thi.ng/geom 6.1.6 → 6.1.7

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/CHANGELOG.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Change Log
2
2
 
3
- - **Last updated**: 2024-04-11T12:32:44Z
3
+ - **Last updated**: 2024-04-20T14:42:45Z
4
4
  - **Generator**: [thi.ng/monopub](https://thi.ng/monopub)
5
5
 
6
6
  All notable changes to this project will be documented in this file.
@@ -9,6 +9,12 @@ See [Conventional Commits](https://conventionalcommits.org/) for commit guidelin
9
9
  **Note:** Unlisted _patch_ versions only involve non-code or otherwise excluded changes
10
10
  and/or version bumps of transitive dependencies.
11
11
 
12
+ ### [6.1.7](https://github.com/thi-ng/umbrella/tree/@thi.ng/geom@6.1.7) (2024-04-20)
13
+
14
+ #### ♻️ Refactoring
15
+
16
+ - update type usage ([2d72859](https://github.com/thi-ng/umbrella/commit/2d72859))
17
+
12
18
  ## [6.1.0](https://github.com/thi-ng/umbrella/tree/@thi.ng/geom@6.1.0) (2024-03-21)
13
19
 
14
20
  #### 🚀 Features
package/README.md CHANGED
@@ -199,10 +199,10 @@ import * as geom from "@thi.ng/geom";
199
199
  Browser ESM import:
200
200
 
201
201
  ```html
202
- <script type="module" src="https://cdn.skypack.dev/@thi.ng/geom"></script>
202
+ <script type="module" src="https://esm.run/@thi.ng/geom"></script>
203
203
  ```
204
204
 
205
- [Skypack documentation](https://docs.skypack.dev/)
205
+ [JSDelivr documentation](https://www.jsdelivr.com/)
206
206
 
207
207
  For Node.js REPL:
208
208
 
package/api/line.d.ts CHANGED
@@ -7,6 +7,6 @@ export declare class Line extends APC implements IHiccupShape, IHiccupPathSegmen
7
7
  copy(): Line;
8
8
  withAttribs(attribs: Attribs): Line;
9
9
  toHiccup(): (string | Vec | Attribs | undefined)[];
10
- toHiccupPathSegments(): ((string | number)[] | (string | Vec)[])[];
10
+ toHiccupPathSegments(): ((string | Vec)[] | (string | number)[])[];
11
11
  }
12
12
  //# sourceMappingURL=line.d.ts.map
package/bounds.d.ts CHANGED
@@ -1,3 +1,4 @@
1
+ import type { Maybe } from "@thi.ng/api";
1
2
  import type { MultiFn1O } from "@thi.ng/defmulti";
2
3
  import type { AABBLike, IShape } from "@thi.ng/geom-api";
3
4
  /**
@@ -28,5 +29,5 @@ import type { AABBLike, IShape } from "@thi.ng/geom-api";
28
29
  * @param shape
29
30
  * @param margin
30
31
  */
31
- export declare const bounds: MultiFn1O<IShape, number, AABBLike | undefined>;
32
+ export declare const bounds: MultiFn1O<IShape, number, Maybe<AABBLike>>;
32
33
  //# sourceMappingURL=bounds.d.ts.map
package/center.d.ts CHANGED
@@ -1,3 +1,4 @@
1
+ import type { Maybe } from "@thi.ng/api";
1
2
  import type { MultiFn1O } from "@thi.ng/defmulti";
2
3
  import type { IShape } from "@thi.ng/geom-api";
3
4
  import { type ReadonlyVec } from "@thi.ng/vectors/api";
@@ -12,5 +13,5 @@ import { type ReadonlyVec } from "@thi.ng/vectors/api";
12
13
  * @param shape
13
14
  * @param p
14
15
  */
15
- export declare const center: MultiFn1O<IShape, ReadonlyVec, IShape | undefined>;
16
+ export declare const center: MultiFn1O<IShape, ReadonlyVec, Maybe<IShape>>;
16
17
  //# sourceMappingURL=center.d.ts.map
package/centroid.d.ts CHANGED
@@ -1,3 +1,4 @@
1
+ import type { Maybe } from "@thi.ng/api";
1
2
  import type { MultiFn1O } from "@thi.ng/defmulti";
2
3
  import type { IShape } from "@thi.ng/geom-api";
3
4
  import type { Vec } from "@thi.ng/vectors";
@@ -28,5 +29,5 @@ import type { Vec } from "@thi.ng/vectors";
28
29
  * @param shape
29
30
  * @param out
30
31
  */
31
- export declare const centroid: MultiFn1O<IShape, Vec, Vec | undefined>;
32
+ export declare const centroid: MultiFn1O<IShape, Vec, Maybe<Vec>>;
32
33
  //# sourceMappingURL=centroid.d.ts.map
package/clip-convex.d.ts CHANGED
@@ -1,3 +1,4 @@
1
+ import type { Maybe } from "@thi.ng/api";
1
2
  import type { MultiFn2 } from "@thi.ng/defmulti";
2
3
  import type { IShape } from "@thi.ng/geom-api";
3
4
  import type { ReadonlyVec } from "@thi.ng/vectors";
@@ -15,5 +16,5 @@ import type { ReadonlyVec } from "@thi.ng/vectors";
15
16
  * @param shape
16
17
  * @param boundary
17
18
  */
18
- export declare const clipConvex: MultiFn2<IShape, IShape | ReadonlyVec[], IShape | undefined>;
19
+ export declare const clipConvex: MultiFn2<IShape, IShape | ReadonlyVec[], Maybe<IShape>>;
19
20
  //# sourceMappingURL=clip-convex.d.ts.map
@@ -1,3 +1,4 @@
1
+ import type { Maybe } from "@thi.ng/api";
1
2
  import type { MultiFn2O } from "@thi.ng/defmulti";
2
3
  import type { IShape } from "@thi.ng/geom-api";
3
4
  import type { ReadonlyVec, Vec } from "@thi.ng/vectors";
@@ -27,5 +28,5 @@ import type { ReadonlyVec, Vec } from "@thi.ng/vectors";
27
28
  * @param p
28
29
  * @param out
29
30
  */
30
- export declare const closestPoint: MultiFn2O<IShape, ReadonlyVec, Vec, Vec | undefined>;
31
+ export declare const closestPoint: MultiFn2O<IShape, ReadonlyVec, Vec, Maybe<Vec>>;
31
32
  //# sourceMappingURL=closest-point.d.ts.map
@@ -1,4 +1,4 @@
1
- import type { Fn } from "@thi.ng/api";
1
+ import type { Fn, Maybe } from "@thi.ng/api";
2
2
  import type { AABBLike, IShape } from "@thi.ng/geom-api";
3
3
  import type { ReadonlyVec, VecPair } from "@thi.ng/vectors";
4
4
  /**
@@ -10,7 +10,7 @@ import type { ReadonlyVec, VecPair } from "@thi.ng/vectors";
10
10
  * @param shapes - input shapes
11
11
  * @param bounds - bbox function
12
12
  */
13
- export declare const __collBounds: (shapes: IShape[], bounds: Fn<IShape, AABBLike | undefined>) => import("@thi.ng/vectors").Vec[] | undefined;
13
+ export declare const __collBounds: (shapes: IShape[], bounds: Fn<IShape, Maybe<AABBLike>>) => import("@thi.ng/vectors").Vec[] | undefined;
14
14
  /**
15
15
  * Takes the position and size vectors of 2
16
16
  * [`AABBLike`](https://docs.thi.ng/umbrella/geom-api/interfaces/AABBLike.html)s
@@ -1,3 +1,4 @@
1
+ import type { Maybe } from "@thi.ng/api";
1
2
  import type { Attribs } from "@thi.ng/geom-api";
2
3
  import { type SamplingOpts } from "@thi.ng/geom-api/sample";
3
4
  /** @internal */
@@ -8,5 +9,5 @@ export declare const __circleOpts: (opts: number | Partial<SamplingOpts>, r: num
8
9
  *
9
10
  * @internal
10
11
  */
11
- export declare const __sampleAttribs: (opts?: number | Partial<SamplingOpts>, attribs?: Attribs) => number | Partial<SamplingOpts> | undefined;
12
+ export declare const __sampleAttribs: (opts?: number | Partial<SamplingOpts>, attribs?: Attribs) => Maybe<number | Partial<SamplingOpts>>;
12
13
  //# sourceMappingURL=vertices.d.ts.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thi.ng/geom",
3
- "version": "6.1.6",
3
+ "version": "6.1.7",
4
4
  "description": "Functional, polymorphic API for 2D geometry types & SVG generation",
5
5
  "type": "module",
6
6
  "module": "./index.js",
@@ -37,33 +37,33 @@
37
37
  "tool:tangle": "../../node_modules/.bin/tangle src/**/*.ts"
38
38
  },
39
39
  "dependencies": {
40
- "@thi.ng/api": "^8.10.1",
41
- "@thi.ng/arrays": "^2.9.3",
42
- "@thi.ng/associative": "^6.3.56",
43
- "@thi.ng/checks": "^3.6.1",
44
- "@thi.ng/defmulti": "^3.0.36",
45
- "@thi.ng/equiv": "^2.1.55",
46
- "@thi.ng/errors": "^2.5.4",
47
- "@thi.ng/geom-api": "^4.0.6",
48
- "@thi.ng/geom-arc": "^2.1.128",
49
- "@thi.ng/geom-clip-line": "^2.3.85",
50
- "@thi.ng/geom-clip-poly": "^2.1.127",
51
- "@thi.ng/geom-closest-point": "^2.1.123",
52
- "@thi.ng/geom-hull": "^2.1.123",
53
- "@thi.ng/geom-isec": "^3.0.6",
54
- "@thi.ng/geom-poly-utils": "^2.3.111",
55
- "@thi.ng/geom-resample": "^2.3.49",
56
- "@thi.ng/geom-splines": "^2.2.102",
57
- "@thi.ng/geom-subdiv-curve": "^2.1.127",
58
- "@thi.ng/geom-tessellate": "^2.1.128",
59
- "@thi.ng/hiccup": "^5.1.28",
60
- "@thi.ng/hiccup-svg": "^5.2.33",
61
- "@thi.ng/math": "^5.10.10",
62
- "@thi.ng/matrices": "^2.3.33",
63
- "@thi.ng/random": "^3.7.3",
64
- "@thi.ng/strings": "^3.7.30",
65
- "@thi.ng/transducers": "^9.0.1",
66
- "@thi.ng/vectors": "^7.10.27"
40
+ "@thi.ng/api": "^8.11.0",
41
+ "@thi.ng/arrays": "^2.9.4",
42
+ "@thi.ng/associative": "^6.3.57",
43
+ "@thi.ng/checks": "^3.6.2",
44
+ "@thi.ng/defmulti": "^3.0.37",
45
+ "@thi.ng/equiv": "^2.1.56",
46
+ "@thi.ng/errors": "^2.5.5",
47
+ "@thi.ng/geom-api": "^4.0.7",
48
+ "@thi.ng/geom-arc": "^2.1.129",
49
+ "@thi.ng/geom-clip-line": "^2.3.86",
50
+ "@thi.ng/geom-clip-poly": "^2.1.128",
51
+ "@thi.ng/geom-closest-point": "^2.1.124",
52
+ "@thi.ng/geom-hull": "^2.1.124",
53
+ "@thi.ng/geom-isec": "^3.0.7",
54
+ "@thi.ng/geom-poly-utils": "^2.3.112",
55
+ "@thi.ng/geom-resample": "^2.3.50",
56
+ "@thi.ng/geom-splines": "^2.2.103",
57
+ "@thi.ng/geom-subdiv-curve": "^2.1.128",
58
+ "@thi.ng/geom-tessellate": "^2.1.129",
59
+ "@thi.ng/hiccup": "^5.1.29",
60
+ "@thi.ng/hiccup-svg": "^5.2.34",
61
+ "@thi.ng/math": "^5.10.11",
62
+ "@thi.ng/matrices": "^2.3.34",
63
+ "@thi.ng/random": "^3.7.4",
64
+ "@thi.ng/strings": "^3.7.31",
65
+ "@thi.ng/transducers": "^9.0.2",
66
+ "@thi.ng/vectors": "^7.10.28"
67
67
  },
68
68
  "devDependencies": {
69
69
  "@microsoft/api-extractor": "^7.43.0",
@@ -399,5 +399,5 @@
399
399
  ],
400
400
  "year": 2013
401
401
  },
402
- "gitHead": "18a0c063a7b33d790e5bc2486c106f45f663ac28\n"
402
+ "gitHead": "8339d05ecc857e529c7325a9839c0063b89e728d\n"
403
403
  }
package/point-at.d.ts CHANGED
@@ -1,3 +1,4 @@
1
+ import type { Maybe } from "@thi.ng/api";
1
2
  import type { MultiFn2 } from "@thi.ng/defmulti";
2
3
  import type { IShape } from "@thi.ng/geom-api";
3
4
  import type { Vec } from "@thi.ng/vectors";
@@ -27,5 +28,5 @@ import type { Vec } from "@thi.ng/vectors";
27
28
  * @param shape
28
29
  * @param t
29
30
  */
30
- export declare const pointAt: MultiFn2<IShape, number, Vec | undefined>;
31
+ export declare const pointAt: MultiFn2<IShape, number, Maybe<Vec>>;
31
32
  //# sourceMappingURL=point-at.d.ts.map
package/split-at.d.ts CHANGED
@@ -1,3 +1,4 @@
1
+ import type { Maybe } from "@thi.ng/api";
1
2
  import type { MultiFn2 } from "@thi.ng/defmulti";
2
3
  import type { IShape } from "@thi.ng/geom-api";
3
4
  /**
@@ -15,5 +16,5 @@ import type { IShape } from "@thi.ng/geom-api";
15
16
  * @param shape
16
17
  * @param t
17
18
  */
18
- export declare const splitAt: MultiFn2<IShape, number, IShape[] | undefined>;
19
+ export declare const splitAt: MultiFn2<IShape, number, Maybe<IShape[]>>;
19
20
  //# sourceMappingURL=split-at.d.ts.map
package/split-near.d.ts CHANGED
@@ -1,3 +1,4 @@
1
+ import type { Maybe } from "@thi.ng/api";
1
2
  import type { MultiFn2 } from "@thi.ng/defmulti";
2
3
  import type { IShape } from "@thi.ng/geom-api";
3
4
  import type { ReadonlyVec } from "@thi.ng/vectors";
@@ -16,5 +17,5 @@ import type { ReadonlyVec } from "@thi.ng/vectors";
16
17
  * @param shape - shape to operate on
17
18
  * @param p - split point
18
19
  */
19
- export declare const splitNearPoint: MultiFn2<IShape, ReadonlyVec, IShape[] | undefined>;
20
+ export declare const splitNearPoint: MultiFn2<IShape, ReadonlyVec, Maybe<IShape[]>>;
20
21
  //# sourceMappingURL=split-near.d.ts.map
package/tangent-at.d.ts CHANGED
@@ -1,3 +1,4 @@
1
+ import type { Maybe } from "@thi.ng/api";
1
2
  import type { MultiFn2 } from "@thi.ng/defmulti";
2
3
  import type { IShape } from "@thi.ng/geom-api";
3
4
  import type { Vec } from "@thi.ng/vectors";
@@ -20,5 +21,5 @@ import type { Vec } from "@thi.ng/vectors";
20
21
  * @param shape
21
22
  * @param t
22
23
  */
23
- export declare const tangentAt: MultiFn2<IShape, number, Vec | undefined>;
24
+ export declare const tangentAt: MultiFn2<IShape, number, Maybe<Vec>>;
24
25
  //# sourceMappingURL=tangent-at.d.ts.map