@thi.ng/grid-iterators 2.0.0 → 2.0.6

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
@@ -3,6 +3,54 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [2.0.6](https://github.com/thi-ng/umbrella/compare/@thi.ng/grid-iterators@2.0.5...@thi.ng/grid-iterators@2.0.6) (2021-10-28)
7
+
8
+ **Note:** Version bump only for package @thi.ng/grid-iterators
9
+
10
+
11
+
12
+
13
+
14
+ ## [2.0.5](https://github.com/thi-ng/umbrella/compare/@thi.ng/grid-iterators@2.0.4...@thi.ng/grid-iterators@2.0.5) (2021-10-28)
15
+
16
+ **Note:** Version bump only for package @thi.ng/grid-iterators
17
+
18
+
19
+
20
+
21
+
22
+ ## [2.0.4](https://github.com/thi-ng/umbrella/compare/@thi.ng/grid-iterators@2.0.3...@thi.ng/grid-iterators@2.0.4) (2021-10-25)
23
+
24
+ **Note:** Version bump only for package @thi.ng/grid-iterators
25
+
26
+
27
+
28
+
29
+
30
+ ## [2.0.3](https://github.com/thi-ng/umbrella/compare/@thi.ng/grid-iterators@2.0.2...@thi.ng/grid-iterators@2.0.3) (2021-10-15)
31
+
32
+ **Note:** Version bump only for package @thi.ng/grid-iterators
33
+
34
+
35
+
36
+
37
+
38
+ ## [2.0.2](https://github.com/thi-ng/umbrella/compare/@thi.ng/grid-iterators@2.0.1...@thi.ng/grid-iterators@2.0.2) (2021-10-15)
39
+
40
+ **Note:** Version bump only for package @thi.ng/grid-iterators
41
+
42
+
43
+
44
+
45
+
46
+ ## [2.0.1](https://github.com/thi-ng/umbrella/compare/@thi.ng/grid-iterators@2.0.0...@thi.ng/grid-iterators@2.0.1) (2021-10-13)
47
+
48
+ **Note:** Version bump only for package @thi.ng/grid-iterators
49
+
50
+
51
+
52
+
53
+
6
54
  # [2.0.0](https://github.com/thi-ng/umbrella/compare/@thi.ng/grid-iterators@1.0.5...@thi.ng/grid-iterators@2.0.0) (2021-10-12)
7
55
 
8
56
 
package/README.md CHANGED
@@ -172,10 +172,11 @@ ES module import:
172
172
 
173
173
  [Skypack documentation](https://docs.skypack.dev/)
174
174
 
175
- For NodeJS (v14.6+):
175
+ For Node.js REPL:
176
176
 
177
177
  ```text
178
- node --experimental-specifier-resolution=node --experimental-repl-await
178
+ # with flag only for < v16
179
+ node --experimental-repl-await
179
180
 
180
181
  > const gridIterators = await import("@thi.ng/grid-iterators");
181
182
  ```
package/circle.js CHANGED
@@ -1,5 +1,5 @@
1
- import { hline } from "./hvline";
2
- import { asInt } from "./utils";
1
+ import { hline } from "./hvline.js";
2
+ import { asInt } from "./utils.js";
3
3
  export function* circle(cx, cy, r, fill = true) {
4
4
  [cx, cy, r] = asInt(cx, cy, r);
5
5
  if (r < 1)
package/column-ends.js CHANGED
@@ -1,4 +1,4 @@
1
- import { asInt } from "./utils";
1
+ import { asInt } from "./utils.js";
2
2
  /**
3
3
  * Filtered version of {@link columns2d}, only including end points of
4
4
  * each column.
package/columns.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { range2d } from "@thi.ng/transducers/range2d";
2
2
  import { map } from "@thi.ng/transducers/map";
3
- import { swapxy } from "./utils";
3
+ import { swapxy } from "./utils.js";
4
4
  /**
5
5
  * Yields sequence of 2D grid coordinates in column-major order.
6
6
  *
package/diagonal-ends.js CHANGED
@@ -1,5 +1,5 @@
1
- import { diagonal2d } from "./diagonal";
2
- import { asInt } from "./utils";
1
+ import { diagonal2d } from "./diagonal.js";
2
+ import { asInt } from "./utils.js";
3
3
  /**
4
4
  * Filtered version of {@link diagonal2d}, only including end points of
5
5
  * the diagonals, apart from the very first and last points: `[0,0]` and
package/diagonal.js CHANGED
@@ -1,4 +1,4 @@
1
- import { asInt } from "./utils";
1
+ import { asInt } from "./utils.js";
2
2
  /**
3
3
  * Yields sequence of 2D grid coordinates in diagonal order starting at
4
4
  * [0,0] and using given `cols` and `rows`. Each diagonal starts at y=0
package/hilbert.js CHANGED
@@ -1,4 +1,4 @@
1
- import { asInt } from "./utils";
1
+ import { asInt } from "./utils.js";
2
2
  /**
3
3
  * Yields sequence of 2D grid coordinates along 2D Hilbert curve using
4
4
  * given `cols` and `rows` (each max. 32768 (2^15)).
package/hvline.js CHANGED
@@ -1,4 +1,4 @@
1
- import { asInt } from "./utils";
1
+ import { asInt } from "./utils.js";
2
2
  export function* hline(x, y, len) {
3
3
  [x, y, len] = asInt(x, y, len);
4
4
  for (const xmax = x + len; x < xmax; x++) {
package/index.d.ts CHANGED
@@ -1,18 +1,18 @@
1
- export * from "./circle";
2
- export * from "./column-ends";
3
- export * from "./columns";
4
- export * from "./diagonal";
5
- export * from "./diagonal-ends";
6
- export * from "./hilbert";
7
- export * from "./hvline";
8
- export * from "./interleave";
9
- export * from "./line";
10
- export * from "./random";
11
- export * from "./row-ends";
12
- export * from "./rows";
13
- export * from "./spiral";
14
- export * from "./zcurve";
15
- export * from "./zigzag-columns";
16
- export * from "./zigzag-diagonal";
17
- export * from "./zigzag-rows";
1
+ export * from "./circle.js";
2
+ export * from "./column-ends.js";
3
+ export * from "./columns.js";
4
+ export * from "./diagonal.js";
5
+ export * from "./diagonal-ends.js";
6
+ export * from "./hilbert.js";
7
+ export * from "./hvline.js";
8
+ export * from "./interleave.js";
9
+ export * from "./line.js";
10
+ export * from "./random.js";
11
+ export * from "./row-ends.js";
12
+ export * from "./rows.js";
13
+ export * from "./spiral.js";
14
+ export * from "./zcurve.js";
15
+ export * from "./zigzag-columns.js";
16
+ export * from "./zigzag-diagonal.js";
17
+ export * from "./zigzag-rows.js";
18
18
  //# sourceMappingURL=index.d.ts.map
package/index.js CHANGED
@@ -1,17 +1,17 @@
1
- export * from "./circle";
2
- export * from "./column-ends";
3
- export * from "./columns";
4
- export * from "./diagonal";
5
- export * from "./diagonal-ends";
6
- export * from "./hilbert";
7
- export * from "./hvline";
8
- export * from "./interleave";
9
- export * from "./line";
10
- export * from "./random";
11
- export * from "./row-ends";
12
- export * from "./rows";
13
- export * from "./spiral";
14
- export * from "./zcurve";
15
- export * from "./zigzag-columns";
16
- export * from "./zigzag-diagonal";
17
- export * from "./zigzag-rows";
1
+ export * from "./circle.js";
2
+ export * from "./column-ends.js";
3
+ export * from "./columns.js";
4
+ export * from "./diagonal.js";
5
+ export * from "./diagonal-ends.js";
6
+ export * from "./hilbert.js";
7
+ export * from "./hvline.js";
8
+ export * from "./interleave.js";
9
+ export * from "./line.js";
10
+ export * from "./random.js";
11
+ export * from "./row-ends.js";
12
+ export * from "./rows.js";
13
+ export * from "./spiral.js";
14
+ export * from "./zcurve.js";
15
+ export * from "./zigzag-columns.js";
16
+ export * from "./zigzag-diagonal.js";
17
+ export * from "./zigzag-rows.js";
package/interleave.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { range2d } from "@thi.ng/transducers/range2d";
2
2
  import { map } from "@thi.ng/transducers/map";
3
- import { swapxy } from "./utils";
3
+ import { swapxy } from "./utils.js";
4
4
  /**
5
5
  * Yields 2D grid coordinates in the order of interleaved columns with
6
6
  * configurable `step` size (default: 2). I.e. returns columns in this
package/line.js CHANGED
@@ -1,4 +1,4 @@
1
- import { asInt } from "./utils";
1
+ import { asInt } from "./utils.js";
2
2
  export function* line(ax, ay, bx, by) {
3
3
  [ax, ay, bx, by] = asInt(ax, ay, bx, by);
4
4
  const dx = Math.abs(bx - ax);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thi.ng/grid-iterators",
3
- "version": "2.0.0",
3
+ "version": "2.0.6",
4
4
  "description": "2D grid iterators w/ multiple orderings",
5
5
  "type": "module",
6
6
  "module": "./index.js",
@@ -35,14 +35,14 @@
35
35
  "test": "testament test"
36
36
  },
37
37
  "dependencies": {
38
- "@thi.ng/arrays": "^2.0.0",
39
- "@thi.ng/binary": "^3.0.0",
40
- "@thi.ng/morton": "^3.0.0",
41
- "@thi.ng/random": "^3.0.0",
42
- "@thi.ng/transducers": "^8.0.0"
38
+ "@thi.ng/arrays": "^2.0.6",
39
+ "@thi.ng/binary": "^3.0.6",
40
+ "@thi.ng/morton": "^3.0.6",
41
+ "@thi.ng/random": "^3.1.2",
42
+ "@thi.ng/transducers": "^8.0.6"
43
43
  },
44
44
  "devDependencies": {
45
- "@thi.ng/testament": "^0.1.0"
45
+ "@thi.ng/testament": "^0.1.6"
46
46
  },
47
47
  "keywords": [
48
48
  "2d",
@@ -62,6 +62,9 @@
62
62
  "publishConfig": {
63
63
  "access": "public"
64
64
  },
65
+ "engines": {
66
+ "node": ">=12.7"
67
+ },
65
68
  "files": [
66
69
  "*.js",
67
70
  "*.d.ts"
@@ -129,5 +132,5 @@
129
132
  ],
130
133
  "year": 2019
131
134
  },
132
- "gitHead": "9ac1344b38b565eb894306fbf72233b6c0b2d115"
135
+ "gitHead": "c17a556ad25f6882dfa8f806a1d9e8ed7ac7cd71"
133
136
  }
package/random.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import { shuffle } from "@thi.ng/arrays/shuffle";
2
2
  import { SYSTEM } from "@thi.ng/random/system";
3
3
  import { range } from "@thi.ng/transducers/range";
4
- import { asInt } from "./utils";
4
+ import { asInt } from "./utils.js";
5
5
  /**
6
6
  * Yields 2D grid coordinates in random order w/ support for optional
7
7
  * {@link @thi.ng/random#IRandom} implementation (default:
package/row-ends.js CHANGED
@@ -1,4 +1,4 @@
1
- import { asInt } from "./utils";
1
+ import { asInt } from "./utils.js";
2
2
  /**
3
3
  * Filtered version of {@link rows2d}, only including end points of
4
4
  * each row.
package/spiral.js CHANGED
@@ -1,4 +1,4 @@
1
- import { asInt } from "./utils";
1
+ import { asInt } from "./utils.js";
2
2
  /**
3
3
  * Yields sequence of 2D grid coordinates in outward spiral order
4
4
  * starting from the center, given `cols` and `rows`.
package/zcurve.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { ceilPow2 } from "@thi.ng/binary/pow";
2
2
  import { demux2 } from "@thi.ng/morton/mux";
3
- import { asInt } from "./utils";
3
+ import { asInt } from "./utils.js";
4
4
  /**
5
5
  * Yields 2D grid coordinates in Z-curve (Morton) order. A perfect
6
6
  * Z-curve is only generated if `cols` AND `rows` are equal and a power
package/zigzag-columns.js CHANGED
@@ -1,4 +1,4 @@
1
- import { asInt } from "./utils";
1
+ import { asInt } from "./utils.js";
2
2
  /**
3
3
  * Yields sequence of 2D grid coordinates in zigzag column order
4
4
  * starting from [0,0], given `cols` and `rows`.
@@ -1,4 +1,4 @@
1
- import { asInt } from "./utils";
1
+ import { asInt } from "./utils.js";
2
2
  /**
3
3
  * Similar to {@link diagonal2d}, but yields 2D grid coordinates in zigzag
4
4
  * diagonal order starting at [0,0] and using given `cols` and `rows`.
package/zigzag-rows.js CHANGED
@@ -1,4 +1,4 @@
1
- import { asInt } from "./utils";
1
+ import { asInt } from "./utils.js";
2
2
  /**
3
3
  * Yields sequence of 2D grid coordinates in zigzag row order starting
4
4
  * from [0,0], given `cols` and `rows`.