@thi.ng/axidraw 1.1.33 → 1.1.35

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-10-23T07:37:37Z
3
+ - **Last updated**: 2023-11-09T10:28:18Z
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.
package/README.md CHANGED
@@ -187,7 +187,7 @@ For Node.js REPL:
187
187
  const axidraw = await import("@thi.ng/axidraw");
188
188
  ```
189
189
 
190
- Package sizes (brotli'd, pre-treeshake): ESM: 3.13 KB
190
+ Package sizes (brotli'd, pre-treeshake): ESM: 3.28 KB
191
191
 
192
192
  ## Dependencies
193
193
 
package/axidraw.js CHANGED
@@ -42,12 +42,18 @@ export const DEFAULT_OPTS = {
42
42
  sigint: true,
43
43
  };
44
44
  export class AxiDraw {
45
+ serial;
46
+ opts;
47
+ isConnected = false;
48
+ isPenDown = false;
49
+ penLimits;
50
+ penState = [];
51
+ pos = [0, 0];
52
+ targetPos = [0, 0];
53
+ homePos;
54
+ scale;
55
+ bounds;
45
56
  constructor(opts = {}) {
46
- this.isConnected = false;
47
- this.isPenDown = false;
48
- this.penState = [];
49
- this.pos = [0, 0];
50
- this.targetPos = [0, 0];
51
57
  this.opts = { ...DEFAULT_OPTS, ...opts };
52
58
  this.penLimits = [this.opts.down, this.opts.up];
53
59
  this.scale = this.opts.stepsPerInch / this.opts.unitsPerInch;
package/control.js CHANGED
@@ -7,9 +7,10 @@ import { AxiDrawState } from "./api.js";
7
7
  * See {@link AxiDrawOpts.control} for further details.
8
8
  */
9
9
  export class AxiDrawControl {
10
+ interval;
11
+ state = AxiDrawState.CONTINUE;
10
12
  constructor(interval = 1000) {
11
13
  this.interval = interval;
12
- this.state = AxiDrawState.CONTINUE;
13
14
  }
14
15
  deref() {
15
16
  return this.state;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thi.ng/axidraw",
3
- "version": "1.1.33",
3
+ "version": "1.1.35",
4
4
  "description": "Minimal AxiDraw plotter/drawing machine controller for Node.js",
5
5
  "type": "module",
6
6
  "module": "./index.js",
@@ -28,30 +28,29 @@
28
28
  "clean": "rimraf --glob '*.js' '*.d.ts' '*.map' doc",
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
  },
36
35
  "dependencies": {
37
- "@thi.ng/api": "^8.9.6",
38
- "@thi.ng/checks": "^3.4.6",
39
- "@thi.ng/compose": "^2.1.45",
40
- "@thi.ng/date": "^2.5.0",
41
- "@thi.ng/errors": "^2.4.0",
42
- "@thi.ng/logger": "^1.4.22",
43
- "@thi.ng/math": "^5.7.1",
44
- "@thi.ng/transducers": "^8.8.8",
45
- "@thi.ng/units": "^0.4.13",
46
- "@thi.ng/vectors": "^7.8.2",
36
+ "@thi.ng/api": "^8.9.8",
37
+ "@thi.ng/checks": "^3.4.8",
38
+ "@thi.ng/compose": "^2.1.47",
39
+ "@thi.ng/date": "^2.5.2",
40
+ "@thi.ng/errors": "^2.4.2",
41
+ "@thi.ng/logger": "^1.4.24",
42
+ "@thi.ng/math": "^5.7.3",
43
+ "@thi.ng/transducers": "^8.8.10",
44
+ "@thi.ng/units": "^0.4.15",
45
+ "@thi.ng/vectors": "^7.8.4",
47
46
  "serialport": "^12.0.0"
48
47
  },
49
48
  "devDependencies": {
50
- "@microsoft/api-extractor": "^7.38.0",
51
- "@thi.ng/testament": "^0.3.24",
49
+ "@microsoft/api-extractor": "^7.38.2",
50
+ "@thi.ng/testament": "^0.4.1",
52
51
  "rimraf": "^5.0.5",
53
52
  "tools": "^0.0.1",
54
- "typedoc": "^0.25.2",
53
+ "typedoc": "^0.25.3",
55
54
  "typescript": "^5.2.2"
56
55
  },
57
56
  "keywords": [
@@ -115,5 +114,5 @@
115
114
  "status": "alpha",
116
115
  "year": 2022
117
116
  },
118
- "gitHead": "336bd1bf95825b3c318a3ab49c54451c94aaa883\n"
117
+ "gitHead": "669a3151e4302480244fe3e60eff5e732ea5b7a7\n"
119
118
  }
package/serial.js CHANGED
@@ -20,10 +20,8 @@ export const MOCK_SERIAL = {
20
20
  * sent messages into an internal string array for later analysis.
21
21
  */
22
22
  export class MockSerial {
23
- constructor() {
24
- this.sent = [];
25
- this.isClosed = false;
26
- }
23
+ sent = [];
24
+ isClosed = false;
27
25
  /**
28
26
  * Clears internal log of "sent" message.
29
27
  */