@thi.ng/axidraw 1.1.59 → 1.1.61

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-02-22T23:15:26Z
3
+ - **Last updated**: 2024-02-25T14:07:53Z
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/axidraw.d.ts CHANGED
@@ -49,13 +49,19 @@ export declare class AxiDraw implements IReset {
49
49
  * Reference:
50
50
  * - http://evil-mad.github.io/EggBot/ebb.html
51
51
  *
52
+ * Also see {@link complete}.
53
+ *
52
54
  * @example
53
55
  * ```ts
56
+ * import { AxiDraw, polyline, START, STOP } from "@thi.ng/axidraw";
57
+ *
58
+ * const axi = new AxiDraw();
59
+ *
54
60
  * // execute start sequence, draw a triangle, then exec stop sequence
55
61
  * axi.draw([
56
- * ["start"],
57
- * ...axi.polyline([[50,50], [100,50], [75, 100], [50,50]]),
58
- * ["stop"]
62
+ * START,
63
+ * ...polyline([[50, 50], [100, 50], [75, 100], [50, 50]]),
64
+ * STOP
59
65
  * ]);
60
66
  * ```
61
67
  *
package/axidraw.js CHANGED
@@ -132,13 +132,19 @@ class AxiDraw {
132
132
  * Reference:
133
133
  * - http://evil-mad.github.io/EggBot/ebb.html
134
134
  *
135
+ * Also see {@link complete}.
136
+ *
135
137
  * @example
136
138
  * ```ts
139
+ * import { AxiDraw, polyline, START, STOP } from "@thi.ng/axidraw";
140
+ *
141
+ * const axi = new AxiDraw();
142
+ *
137
143
  * // execute start sequence, draw a triangle, then exec stop sequence
138
144
  * axi.draw([
139
- * ["start"],
140
- * ...axi.polyline([[50,50], [100,50], [75, 100], [50,50]]),
141
- * ["stop"]
145
+ * START,
146
+ * ...polyline([[50, 50], [100, 50], [75, 100], [50, 50]]),
147
+ * STOP
142
148
  * ]);
143
149
  * ```
144
150
  *
package/commands.d.ts CHANGED
@@ -63,6 +63,8 @@ export declare const COMMENT: (msg: string) => CommentCommand;
63
63
  *
64
64
  * @example
65
65
  * ```ts
66
+ * import { complete, MOVE } from "@thi.ng/axidraw";
67
+ *
66
68
  * [...complete([ MOVE([0, 0]) ])]
67
69
  * // [ ["start"], ["M", [0, 0]], ["stop"] ]
68
70
  * ```
package/dip.d.ts CHANGED
@@ -35,8 +35,10 @@ export interface DipOpts {
35
35
  *
36
36
  * @example
37
37
  * ```ts
38
+ * import { dip, MOVE } from "@thi.ng/axidraw";
39
+ *
38
40
  * // simple 2x up/down
39
- * [...DIP(2)]
41
+ * [...dip(2)]
40
42
  * // [
41
43
  * // [ "d", undefined ],
42
44
  * // [ "u", undefined ],
@@ -45,7 +47,7 @@ export interface DipOpts {
45
47
  * // ]
46
48
  *
47
49
  * // 3x dipping with custom up/down delays, each time at a random position
48
- * [...DIP(3, {
50
+ * [...dip(3, {
49
51
  * down: 300,
50
52
  * up: 400,
51
53
  * commands: () => [ MOVE([Math.random()* 5, Math.random()* 5]) ]
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thi.ng/axidraw",
3
- "version": "1.1.59",
3
+ "version": "1.1.61",
4
4
  "description": "Minimal AxiDraw plotter/drawing machine controller for Node.js",
5
5
  "type": "module",
6
6
  "module": "./index.js",
@@ -35,16 +35,16 @@
35
35
  "test": "bun test"
36
36
  },
37
37
  "dependencies": {
38
- "@thi.ng/api": "^8.9.25",
38
+ "@thi.ng/api": "^8.9.26",
39
39
  "@thi.ng/checks": "^3.5.0",
40
- "@thi.ng/compose": "^2.1.64",
41
- "@thi.ng/date": "^2.7.0",
40
+ "@thi.ng/compose": "^2.1.65",
41
+ "@thi.ng/date": "^2.7.2",
42
42
  "@thi.ng/errors": "^2.4.18",
43
- "@thi.ng/logger": "^3.0.2",
44
- "@thi.ng/math": "^5.10.2",
45
- "@thi.ng/transducers": "^8.9.6",
46
- "@thi.ng/units": "^0.4.32",
47
- "@thi.ng/vectors": "^7.10.11",
43
+ "@thi.ng/logger": "^3.0.3",
44
+ "@thi.ng/math": "^5.10.3",
45
+ "@thi.ng/transducers": "^8.9.7",
46
+ "@thi.ng/units": "^0.4.33",
47
+ "@thi.ng/vectors": "^7.10.13",
48
48
  "serialport": "^12.0.0"
49
49
  },
50
50
  "devDependencies": {
@@ -115,5 +115,5 @@
115
115
  "status": "alpha",
116
116
  "year": 2022
117
117
  },
118
- "gitHead": "16f2b92b5410bd35dcde6c2971c8e62783ebc472\n"
118
+ "gitHead": "190d68e7f7524631b333cfdbf32c6a23be27c166\n"
119
119
  }
package/palettes.d.ts CHANGED
@@ -70,6 +70,7 @@ export interface RadialPaletteOpts extends BasePaletteOpts {
70
70
  *
71
71
  * @example
72
72
  * ```ts
73
+ * import { AxiDraw, linearPalette } from "@thi.ng/axidraw";
73
74
  * import { points } from "@thi.ng/geom";
74
75
  * import { asAxiDraw } from "@thi.ng/geom-axidraw";
75
76
  * import { repeatedly } from "@thi.ng/transducers";
package/polyline.js CHANGED
@@ -2,7 +2,7 @@ import { DOWN, MOVE, PEN, UP } from "./commands.js";
2
2
  function* polyline(pts, opts = {}) {
3
3
  if (!pts.length)
4
4
  return;
5
- const { speed = 1, onlyGeo = true, delayDown, delayUp, down } = opts;
5
+ const { speed = 1, onlyGeo = false, delayDown, delayUp, down } = opts;
6
6
  if (onlyGeo) {
7
7
  for (let p of pts)
8
8
  yield MOVE(p, speed);
package/registration.d.ts CHANGED
@@ -6,7 +6,12 @@ import type { DrawCommand } from "./api.js";
6
6
  *
7
7
  * @example
8
8
  * ```ts
9
- * axi.draw(registrationMark([20, 20]))
9
+ * import { AxiDraw, registrationMark } from "@thi.ng/axidraw";
10
+ *
11
+ * const axi = new AxiDraw();
12
+ *
13
+ * // draw registration mark @ 20,20 with radius 10
14
+ * axi.draw(registrationMark([20, 20], 10))
10
15
  * ```
11
16
  *
12
17
  * @param pos