@thi.ng/geom 6.0.0 → 6.0.3

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**: 2023-11-01T11:05:34Z
3
+ - **Last updated**: 2023-11-09T10:28:19Z
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.0.2](https://github.com/thi-ng/umbrella/tree/@thi.ng/geom@6.0.2) (2023-11-09)
13
+
14
+ #### ♻️ Refactoring
15
+
16
+ - update all tests (packages A-S) ([e3085e4](https://github.com/thi-ng/umbrella/commit/e3085e4))
17
+
12
18
  # [6.0.0](https://github.com/thi-ng/umbrella/tree/@thi.ng/geom@6.0.0) (2023-11-01)
13
19
 
14
20
  #### 🛑 Breaking changes
package/README.md CHANGED
@@ -200,7 +200,7 @@ For Node.js REPL:
200
200
  const geom = await import("@thi.ng/geom");
201
201
  ```
202
202
 
203
- Package sizes (brotli'd, pre-treeshake): ESM: 12.77 KB
203
+ Package sizes (brotli'd, pre-treeshake): ESM: 12.95 KB
204
204
 
205
205
  ## Dependencies
206
206
 
package/api/aabb.js CHANGED
@@ -7,6 +7,9 @@ import { subN3 } from "@thi.ng/vectors/subn";
7
7
  import { __asVec } from "../internal/args.js";
8
8
  import { __copyAttribs } from "../internal/copy.js";
9
9
  export class AABB {
10
+ pos;
11
+ attribs;
12
+ size;
10
13
  constructor(pos = [0, 0, 0], size = 1, attribs) {
11
14
  this.pos = pos;
12
15
  this.attribs = attribs;
package/api/apc.js CHANGED
@@ -1,5 +1,7 @@
1
1
  import { ensureArray } from "@thi.ng/arrays/ensure-array";
2
2
  export class APC {
3
+ attribs;
4
+ points;
3
5
  constructor(points, attribs) {
4
6
  this.attribs = attribs;
5
7
  this.points = points ? ensureArray(points) : [];
package/api/arc.js CHANGED
@@ -3,6 +3,14 @@ import { pointAt as arcPointAt, pointAtTheta as arcPointAtTheta, } from "@thi.ng
3
3
  import { set } from "@thi.ng/vectors/set";
4
4
  import { __copyAttribs } from "../internal/copy.js";
5
5
  export class Arc {
6
+ pos;
7
+ r;
8
+ axis;
9
+ start;
10
+ end;
11
+ xl;
12
+ cw;
13
+ attribs;
6
14
  constructor(pos, r, axis, start, end, xl = false, cw = false, attribs) {
7
15
  this.pos = pos;
8
16
  this.r = r;
package/api/circle.js CHANGED
@@ -1,6 +1,9 @@
1
1
  import { set } from "@thi.ng/vectors/set";
2
2
  import { __copyAttribs } from "../internal/copy.js";
3
3
  export class Circle {
4
+ pos;
5
+ r;
6
+ attribs;
4
7
  constructor(pos = [0, 0], r = 1, attribs) {
5
8
  this.pos = pos;
6
9
  this.r = r;
package/api/ellipse.js CHANGED
@@ -2,6 +2,9 @@ import { set } from "@thi.ng/vectors/set";
2
2
  import { __asVec } from "../internal/args.js";
3
3
  import { __copyAttribs } from "../internal/copy.js";
4
4
  export class Ellipse {
5
+ pos;
6
+ attribs;
7
+ r;
5
8
  constructor(pos = [0, 0], r = [1, 1], attribs) {
6
9
  this.pos = pos;
7
10
  this.attribs = attribs;
package/api/group.js CHANGED
@@ -6,6 +6,8 @@ import { __copyAttribs } from "../internal/copy.js";
6
6
  * groups.
7
7
  */
8
8
  export class Group {
9
+ attribs;
10
+ children;
9
11
  constructor(attribs, children) {
10
12
  this.attribs = attribs;
11
13
  this.children = children ? ensureArray(children) : [];
package/api/path.js CHANGED
@@ -4,9 +4,11 @@ import { illegalState } from "@thi.ng/errors/illegal-state";
4
4
  import { copy } from "@thi.ng/vectors/copy";
5
5
  import { __copyAttribs } from "../internal/copy.js";
6
6
  export class Path {
7
+ attribs;
8
+ segments;
9
+ closed = false;
7
10
  constructor(segments, attribs) {
8
11
  this.attribs = attribs;
9
- this.closed = false;
10
12
  this.segments = segments ? ensureArray(segments) : [];
11
13
  }
12
14
  get type() {
package/api/plane.js CHANGED
@@ -1,6 +1,9 @@
1
1
  import { set3 } from "@thi.ng/vectors/set";
2
2
  import { __copyAttribs } from "../internal/copy.js";
3
3
  export class Plane {
4
+ normal;
5
+ w;
6
+ attribs;
4
7
  constructor(normal = [0, 1, 0], w = 0, attribs) {
5
8
  this.normal = normal;
6
9
  this.w = w;
package/api/ray.js CHANGED
@@ -2,6 +2,9 @@ import { maddN2 } from "@thi.ng/vectors/maddn";
2
2
  import { set } from "@thi.ng/vectors/set";
3
3
  import { __copyAttribs } from "../internal/copy.js";
4
4
  export class Ray {
5
+ pos;
6
+ dir;
7
+ attribs;
5
8
  constructor(pos, dir, attribs) {
6
9
  this.pos = pos;
7
10
  this.dir = dir;
package/api/rect.js CHANGED
@@ -7,6 +7,9 @@ import { subN2 } from "@thi.ng/vectors/subn";
7
7
  import { __asVec } from "../internal/args.js";
8
8
  import { __copyAttribs } from "../internal/copy.js";
9
9
  export class Rect {
10
+ pos;
11
+ attribs;
12
+ size;
10
13
  constructor(pos = [0, 0], size = 1, attribs) {
11
14
  this.pos = pos;
12
15
  this.attribs = attribs;
package/api/sphere.js CHANGED
@@ -1,6 +1,9 @@
1
1
  import { set3 } from "@thi.ng/vectors/set";
2
2
  import { __copyAttribs } from "../internal/copy.js";
3
3
  export class Sphere {
4
+ pos;
5
+ r;
6
+ attribs;
4
7
  constructor(pos = [0, 0, 0], r = 1, attribs) {
5
8
  this.pos = pos;
6
9
  this.r = r;
package/api/text.js CHANGED
@@ -8,6 +8,9 @@ import { __copyAttribs } from "../internal/copy.js";
8
8
  * other shape types.
9
9
  */
10
10
  export class Text {
11
+ pos;
12
+ body;
13
+ attribs;
11
14
  constructor(pos, body, attribs) {
12
15
  this.pos = pos;
13
16
  this.body = body;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thi.ng/geom",
3
- "version": "6.0.0",
3
+ "version": "6.0.3",
4
4
  "description": "Functional, polymorphic API for 2D geometry types & SVG generation",
5
5
  "type": "module",
6
6
  "module": "./index.js",
@@ -28,47 +28,46 @@
28
28
  "clean": "rimraf --glob '*.js' '*.d.ts' '*.map' doc api ctors internal",
29
29
  "doc": "typedoc --excludePrivate --excludeInternal --out doc src/index.ts",
30
30
  "doc:ae": "mkdir -p .ae/doc .ae/temp && api-extractor run --local --verbose",
31
- "doc:readme": "yarn doc:stats && tools:readme",
32
- "doc:stats": "tools:module-stats",
31
+ "doc:readme": "bun ../../tools/src/module-stats.ts && bun ../../tools/src/readme.ts",
33
32
  "pub": "yarn npm publish --access public",
34
- "test": "testament test",
33
+ "test": "bun test",
35
34
  "tool:bpatch": "tools:node-esm tools/bpatch.ts"
36
35
  },
37
36
  "dependencies": {
38
- "@thi.ng/api": "^8.9.6",
39
- "@thi.ng/arrays": "^2.7.1",
40
- "@thi.ng/associative": "^6.3.16",
41
- "@thi.ng/checks": "^3.4.6",
42
- "@thi.ng/defmulti": "^3.0.3",
43
- "@thi.ng/equiv": "^2.1.31",
44
- "@thi.ng/errors": "^2.4.0",
45
- "@thi.ng/geom-api": "^3.4.42",
46
- "@thi.ng/geom-arc": "^2.1.85",
47
- "@thi.ng/geom-clip-line": "^2.3.42",
48
- "@thi.ng/geom-clip-poly": "^2.1.84",
49
- "@thi.ng/geom-closest-point": "^2.1.80",
50
- "@thi.ng/geom-hull": "^2.1.80",
51
- "@thi.ng/geom-isec": "^2.1.84",
52
- "@thi.ng/geom-poly-utils": "^2.3.68",
53
- "@thi.ng/geom-resample": "^2.3.6",
54
- "@thi.ng/geom-splines": "^2.2.59",
55
- "@thi.ng/geom-subdiv-curve": "^2.1.84",
56
- "@thi.ng/geom-tessellate": "^2.1.85",
57
- "@thi.ng/hiccup": "^5.0.4",
58
- "@thi.ng/hiccup-svg": "^5.0.30",
59
- "@thi.ng/math": "^5.7.1",
60
- "@thi.ng/matrices": "^2.2.5",
61
- "@thi.ng/random": "^3.6.11",
62
- "@thi.ng/strings": "^3.6.3",
63
- "@thi.ng/transducers": "^8.8.7",
64
- "@thi.ng/vectors": "^7.8.1"
37
+ "@thi.ng/api": "^8.9.8",
38
+ "@thi.ng/arrays": "^2.7.4",
39
+ "@thi.ng/associative": "^6.3.19",
40
+ "@thi.ng/checks": "^3.4.8",
41
+ "@thi.ng/defmulti": "^3.0.6",
42
+ "@thi.ng/equiv": "^2.1.33",
43
+ "@thi.ng/errors": "^2.4.2",
44
+ "@thi.ng/geom-api": "^3.4.45",
45
+ "@thi.ng/geom-arc": "^2.1.88",
46
+ "@thi.ng/geom-clip-line": "^2.3.45",
47
+ "@thi.ng/geom-clip-poly": "^2.1.87",
48
+ "@thi.ng/geom-closest-point": "^2.1.83",
49
+ "@thi.ng/geom-hull": "^2.1.83",
50
+ "@thi.ng/geom-isec": "^2.1.87",
51
+ "@thi.ng/geom-poly-utils": "^2.3.71",
52
+ "@thi.ng/geom-resample": "^2.3.9",
53
+ "@thi.ng/geom-splines": "^2.2.62",
54
+ "@thi.ng/geom-subdiv-curve": "^2.1.87",
55
+ "@thi.ng/geom-tessellate": "^2.1.88",
56
+ "@thi.ng/hiccup": "^5.0.7",
57
+ "@thi.ng/hiccup-svg": "^5.0.33",
58
+ "@thi.ng/math": "^5.7.3",
59
+ "@thi.ng/matrices": "^2.2.8",
60
+ "@thi.ng/random": "^3.6.14",
61
+ "@thi.ng/strings": "^3.6.6",
62
+ "@thi.ng/transducers": "^8.8.10",
63
+ "@thi.ng/vectors": "^7.8.4"
65
64
  },
66
65
  "devDependencies": {
67
- "@microsoft/api-extractor": "^7.38.0",
68
- "@thi.ng/testament": "^0.3.24",
66
+ "@microsoft/api-extractor": "^7.38.2",
67
+ "@thi.ng/testament": "^0.4.1",
69
68
  "rimraf": "^5.0.5",
70
69
  "tools": "^0.0.1",
71
- "typedoc": "^0.25.2",
70
+ "typedoc": "^0.25.3",
72
71
  "typescript": "^5.2.2"
73
72
  },
74
73
  "keywords": [
@@ -398,5 +397,5 @@
398
397
  ],
399
398
  "year": 2013
400
399
  },
401
- "gitHead": "351014d081cee85803950eb6751c5a02dca2efbd\n"
400
+ "gitHead": "669a3151e4302480244fe3e60eff5e732ea5b7a7\n"
402
401
  }
package/path-builder.js CHANGED
@@ -12,6 +12,13 @@ import { Path } from "./api/path.js";
12
12
  import { Quadratic } from "./api/quadratic.js";
13
13
  import { arcFrom2Points } from "./arc.js";
14
14
  export class PathBuilder {
15
+ attribs;
16
+ opts;
17
+ paths;
18
+ curr;
19
+ currP;
20
+ bezierP;
21
+ startP;
15
22
  constructor(attribs, opts = {}) {
16
23
  this.attribs = attribs;
17
24
  this.opts = opts;