@thi.ng/grid-iterators 2.3.24 → 2.3.26

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**: 2022-11-30T22:27:37Z
3
+ - **Last updated**: 2022-12-20T16:33:11Z
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
@@ -1,10 +1,10 @@
1
1
  <!-- This file is generated - DO NOT EDIT! -->
2
2
 
3
- # ![grid-iterators](https://media.thi.ng/umbrella/banners-20220914/thing-grid-iterators.svg?9ea1cbba)
3
+ # ![@thi.ng/grid-iterators](https://media.thi.ng/umbrella/banners-20220914/thing-grid-iterators.svg?9ea1cbba)
4
4
 
5
5
  [![npm version](https://img.shields.io/npm/v/@thi.ng/grid-iterators.svg)](https://www.npmjs.com/package/@thi.ng/grid-iterators)
6
6
  ![npm downloads](https://img.shields.io/npm/dm/@thi.ng/grid-iterators.svg)
7
- [![Twitter Follow](https://img.shields.io/twitter/follow/thing_umbrella.svg?style=flat-square&label=twitter)](https://twitter.com/thing_umbrella)
7
+ [![Mastodon Follow](https://img.shields.io/mastodon/follow/109331703950160316?domain=https%3A%2F%2Fmastodon.thi.ng&style=social)](https://mastodon.thi.ng/@toxi)
8
8
 
9
9
  This project is part of the
10
10
  [@thi.ng/umbrella](https://github.com/thi-ng/umbrella/) monorepo.
@@ -35,7 +35,7 @@ This project is part of the
35
35
 
36
36
  ## About
37
37
 
38
- 2D grid and shape iterators w/ multiple orderings.
38
+ 2D grid and shape iterators w/ multiple orderings
39
39
 
40
40
  Provides the altogether 25 following orderings to generate grid coordinates,
41
41
  including iterators for shape rasterization, drawing, clipping, filling,
@@ -218,11 +218,8 @@ ES module import:
218
218
 
219
219
  For Node.js REPL:
220
220
 
221
- ```text
222
- # with flag only for < v16
223
- node --experimental-repl-await
224
-
225
- > const gridIterators = await import("@thi.ng/grid-iterators");
221
+ ```js
222
+ const gridIterators = await import("@thi.ng/grid-iterators");
226
223
  ```
227
224
 
228
225
  Package sizes (brotli'd, pre-treeshake): ESM: 2.19 KB
@@ -268,7 +265,7 @@ import * as gi from "@thi.ng/grid-iterators";
268
265
 
269
266
  ## Authors
270
267
 
271
- Karsten Schmidt
268
+ - [Karsten Schmidt](https://thi.ng)
272
269
 
273
270
  If this project contributes to an academic publication, please cite it as:
274
271
 
@@ -283,4 +280,4 @@ If this project contributes to an academic publication, please cite it as:
283
280
 
284
281
  ## License
285
282
 
286
- &copy; 2019 - 2022 Karsten Schmidt // Apache Software License 2.0
283
+ &copy; 2019 - 2022 Karsten Schmidt // Apache License 2.0
package/clipping.d.ts CHANGED
@@ -11,7 +11,8 @@ import type { FnU7, FnU8, Tuple } from "@thi.ng/api";
11
11
  */
12
12
  export declare function clipped(src: Iterable<number[]>, left: number, top: number, right: number, bottom: number): Generator<number[], void, unknown>;
13
13
  /**
14
- * Based on {@link @thi.ng/geom-isec}, but inlined to avoid dependency.
14
+ * Based on [thi.ng/geom-isec](https://thi.ng/geom-isec), but inlined to avoid
15
+ * dependency.
15
16
  *
16
17
  * @param x -
17
18
  * @param y -
@@ -25,7 +26,7 @@ export declare function clipped(src: Iterable<number[]>, left: number, top: numb
25
26
  */
26
27
  export declare const intersectRectCircle: FnU7<number, boolean>;
27
28
  /**
28
- * Based on {@link @thi.ng/geom-clip-line#liangBarsky2Raw}, but with diff return type.
29
+ * Based on [`liangBarsky2Raw()`](https://docs.thi.ng/umbrella/geom-clip-line/functions/liangBarsky2Raw.html), but with diff return type.
29
30
  *
30
31
  * @param ax -
31
32
  * @param ay -
package/clipping.js CHANGED
@@ -17,7 +17,8 @@ export function* clipped(src, left, top, right, bottom) {
17
17
  /** @internal */
18
18
  const axis = (a, b, c) => (a < b ? a - b : a > b + c ? a - b - c : 0) ** 2;
19
19
  /**
20
- * Based on {@link @thi.ng/geom-isec}, but inlined to avoid dependency.
20
+ * Based on [thi.ng/geom-isec](https://thi.ng/geom-isec), but inlined to avoid
21
+ * dependency.
21
22
  *
22
23
  * @param x -
23
24
  * @param y -
@@ -31,7 +32,7 @@ const axis = (a, b, c) => (a < b ? a - b : a > b + c ? a - b - c : 0) ** 2;
31
32
  */
32
33
  export const intersectRectCircle = (x, y, w, h, cx, cy, r) => axis(cx, x, w) + axis(cy, y, h) <= r * r;
33
34
  /**
34
- * Based on {@link @thi.ng/geom-clip-line#liangBarsky2Raw}, but with diff return type.
35
+ * Based on [`liangBarsky2Raw()`](https://docs.thi.ng/umbrella/geom-clip-line/functions/liangBarsky2Raw.html), but with diff return type.
35
36
  *
36
37
  * @param ax -
37
38
  * @param ay -
package/diagonal.d.ts CHANGED
@@ -1,10 +1,10 @@
1
1
  /**
2
- * Yields sequence of 2D grid coordinates in diagonal order starting at
3
- * [0,0] and using given `cols` and `rows`. Each diagonal starts at y=0
4
- * and progresses in -x,+y direction.
2
+ * Yields sequence of 2D grid coordinates in diagonal order starting at [0,0]
3
+ * and using given `cols` and `rows`. Each diagonal starts at y=0 and progresses
4
+ * in -x,+y direction.
5
5
  *
6
6
  * Ported & modified from original Java code by Christopher Kulla.
7
- * {@link https://sourceforge.net/p/sunflow/code/HEAD/tree/trunk/src/org/sunflow/core/bucket/DiagonalBucketOrder.java}
7
+ * https://sourceforge.net/p/sunflow/code/HEAD/tree/trunk/src/org/sunflow/core/bucket/DiagonalBucketOrder.java
8
8
  *
9
9
  * @param cols -
10
10
  * @param rows -
package/diagonal.js CHANGED
@@ -1,11 +1,11 @@
1
1
  import { asInt } from "@thi.ng/api/typedarray";
2
2
  /**
3
- * Yields sequence of 2D grid coordinates in diagonal order starting at
4
- * [0,0] and using given `cols` and `rows`. Each diagonal starts at y=0
5
- * and progresses in -x,+y direction.
3
+ * Yields sequence of 2D grid coordinates in diagonal order starting at [0,0]
4
+ * and using given `cols` and `rows`. Each diagonal starts at y=0 and progresses
5
+ * in -x,+y direction.
6
6
  *
7
7
  * Ported & modified from original Java code by Christopher Kulla.
8
- * {@link https://sourceforge.net/p/sunflow/code/HEAD/tree/trunk/src/org/sunflow/core/bucket/DiagonalBucketOrder.java}
8
+ * https://sourceforge.net/p/sunflow/code/HEAD/tree/trunk/src/org/sunflow/core/bucket/DiagonalBucketOrder.java
9
9
  *
10
10
  * @param cols -
11
11
  * @param rows -
package/hilbert.d.ts CHANGED
@@ -1,9 +1,9 @@
1
1
  /**
2
- * Yields sequence of 2D grid coordinates along 2D Hilbert curve using
3
- * given `cols` and `rows` (each max. 32768 (2^15)).
2
+ * Yields sequence of 2D grid coordinates along 2D Hilbert curve using given
3
+ * `cols` and `rows` (each max. 32768 (2^15)).
4
4
  *
5
5
  * Ported & modified from original Java code by Christopher Kulla.
6
- * {@link https://sourceforge.net/p/sunflow/code/HEAD/tree/trunk/src/org/sunflow/core/bucket/HilbertBucketOrder.java}
6
+ * https://sourceforge.net/p/sunflow/code/HEAD/tree/trunk/src/org/sunflow/core/bucket/HilbertBucketOrder.java
7
7
  *
8
8
  * @param cols -
9
9
  * @param rows -
package/hilbert.js CHANGED
@@ -1,10 +1,10 @@
1
1
  import { asInt } from "@thi.ng/api/typedarray";
2
2
  /**
3
- * Yields sequence of 2D grid coordinates along 2D Hilbert curve using
4
- * given `cols` and `rows` (each max. 32768 (2^15)).
3
+ * Yields sequence of 2D grid coordinates along 2D Hilbert curve using given
4
+ * `cols` and `rows` (each max. 32768 (2^15)).
5
5
  *
6
6
  * Ported & modified from original Java code by Christopher Kulla.
7
- * {@link https://sourceforge.net/p/sunflow/code/HEAD/tree/trunk/src/org/sunflow/core/bucket/HilbertBucketOrder.java}
7
+ * https://sourceforge.net/p/sunflow/code/HEAD/tree/trunk/src/org/sunflow/core/bucket/HilbertBucketOrder.java
8
8
  *
9
9
  * @param cols -
10
10
  * @param rows -
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thi.ng/grid-iterators",
3
- "version": "2.3.24",
3
+ "version": "2.3.26",
4
4
  "description": "2D grid and shape iterators w/ multiple orderings",
5
5
  "type": "module",
6
6
  "module": "./index.js",
@@ -21,12 +21,12 @@
21
21
  "url": "https://patreon.com/thing_umbrella"
22
22
  }
23
23
  ],
24
- "author": "Karsten Schmidt <k+npm@thi.ng>",
24
+ "author": "Karsten Schmidt (https://thi.ng)",
25
25
  "license": "Apache-2.0",
26
26
  "scripts": {
27
27
  "build": "yarn clean && tsc --declaration",
28
28
  "build:assets": "node tools/build-assets",
29
- "clean": "rimraf '*.js' '*.d.ts' '*.map' doc",
29
+ "clean": "rimraf '*.js' '*.d.ts' '*.map' doc internal",
30
30
  "doc": "typedoc --excludePrivate --excludeInternal --out doc src/index.ts",
31
31
  "doc:ae": "mkdir -p .ae/doc .ae/temp && api-extractor run --local --verbose",
32
32
  "doc:readme": "yarn doc:stats && tools:readme",
@@ -35,21 +35,21 @@
35
35
  "test": "testament test"
36
36
  },
37
37
  "dependencies": {
38
- "@thi.ng/api": "^8.5.1",
39
- "@thi.ng/arrays": "^2.4.4",
40
- "@thi.ng/binary": "^3.3.12",
41
- "@thi.ng/bitfield": "^2.2.14",
42
- "@thi.ng/morton": "^3.1.23",
43
- "@thi.ng/random": "^3.3.17",
44
- "@thi.ng/transducers": "^8.3.25"
38
+ "@thi.ng/api": "^8.6.1",
39
+ "@thi.ng/arrays": "^2.4.6",
40
+ "@thi.ng/binary": "^3.3.14",
41
+ "@thi.ng/bitfield": "^2.2.16",
42
+ "@thi.ng/morton": "^3.1.25",
43
+ "@thi.ng/random": "^3.3.19",
44
+ "@thi.ng/transducers": "^8.3.27"
45
45
  },
46
46
  "devDependencies": {
47
- "@microsoft/api-extractor": "^7.33.5",
48
- "@thi.ng/testament": "^0.3.6",
47
+ "@microsoft/api-extractor": "^7.33.7",
48
+ "@thi.ng/testament": "^0.3.7",
49
49
  "rimraf": "^3.0.2",
50
50
  "tools": "^0.0.1",
51
- "typedoc": "^0.23.20",
52
- "typescript": "^4.8.4"
51
+ "typedoc": "^0.23.22",
52
+ "typescript": "^4.9.4"
53
53
  },
54
54
  "keywords": [
55
55
  "2d",
@@ -152,5 +152,5 @@
152
152
  ],
153
153
  "year": 2019
154
154
  },
155
- "gitHead": "1fe40da507070653f420156d91e6b27cf682004f\n"
155
+ "gitHead": "7b2af448da8a63fb21704a79cc4cdf1f3d7d7a64\n"
156
156
  }
package/random.d.ts CHANGED
@@ -1,8 +1,10 @@
1
1
  import type { IRandom } from "@thi.ng/random";
2
2
  /**
3
3
  * Yields 2D grid coordinates in random order w/ support for optional
4
- * {@link @thi.ng/random#IRandom} implementation (default:
5
- * {@link @thi.ng/random#SYSTEM} aka `Math.random`).
4
+ * [`IRandom`](https://docs.thi.ng/umbrella/random/interfaces/IRandom.html)
5
+ * implementation (default:
6
+ * [`SYSTEM`](https://docs.thi.ng/umbrella/random/variables/SYSTEM.html) aka
7
+ * `Math.random`).
6
8
  *
7
9
  * @param cols -
8
10
  * @param rows -
package/random.js CHANGED
@@ -4,8 +4,10 @@ import { SYSTEM } from "@thi.ng/random/system";
4
4
  import { range } from "@thi.ng/transducers/range";
5
5
  /**
6
6
  * Yields 2D grid coordinates in random order w/ support for optional
7
- * {@link @thi.ng/random#IRandom} implementation (default:
8
- * {@link @thi.ng/random#SYSTEM} aka `Math.random`).
7
+ * [`IRandom`](https://docs.thi.ng/umbrella/random/interfaces/IRandom.html)
8
+ * implementation (default:
9
+ * [`SYSTEM`](https://docs.thi.ng/umbrella/random/variables/SYSTEM.html) aka
10
+ * `Math.random`).
9
11
  *
10
12
  * @param cols -
11
13
  * @param rows -
package/rows.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Yields sequence of 2D grid coordinates in row-major order. Same as
3
- * {@link @thi.ng/transducers#range2d}.
3
+ * [`range2d()`](https://docs.thi.ng/umbrella/transducers/functions/range2d.html).
4
4
  *
5
5
  * @param cols -
6
6
  * @param rows -
package/rows.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import { range2d } from "@thi.ng/transducers/range2d";
2
2
  /**
3
3
  * Yields sequence of 2D grid coordinates in row-major order. Same as
4
- * {@link @thi.ng/transducers#range2d}.
4
+ * [`range2d()`](https://docs.thi.ng/umbrella/transducers/functions/range2d.html).
5
5
  *
6
6
  * @param cols -
7
7
  * @param rows -
package/spiral.d.ts CHANGED
@@ -1,9 +1,9 @@
1
1
  /**
2
- * Yields sequence of 2D grid coordinates in outward spiral order
3
- * starting from the center, given `cols` and `rows`.
2
+ * Yields sequence of 2D grid coordinates in outward spiral order starting from
3
+ * the center, given `cols` and `rows`.
4
4
  *
5
5
  * Ported & modified from original Java code by Christopher Kulla.
6
- * {@link https://sourceforge.net/p/sunflow/code/HEAD/tree/trunk/src/org/sunflow/core/bucket/SpiralBucketOrder.java}
6
+ * https://sourceforge.net/p/sunflow/code/HEAD/tree/trunk/src/org/sunflow/core/bucket/SpiralBucketOrder.java
7
7
  *
8
8
  * @param cols -
9
9
  * @param rows -
package/spiral.js CHANGED
@@ -1,10 +1,10 @@
1
1
  import { asInt } from "@thi.ng/api/typedarray";
2
2
  /**
3
- * Yields sequence of 2D grid coordinates in outward spiral order
4
- * starting from the center, given `cols` and `rows`.
3
+ * Yields sequence of 2D grid coordinates in outward spiral order starting from
4
+ * the center, given `cols` and `rows`.
5
5
  *
6
6
  * Ported & modified from original Java code by Christopher Kulla.
7
- * {@link https://sourceforge.net/p/sunflow/code/HEAD/tree/trunk/src/org/sunflow/core/bucket/SpiralBucketOrder.java}
7
+ * https://sourceforge.net/p/sunflow/code/HEAD/tree/trunk/src/org/sunflow/core/bucket/SpiralBucketOrder.java
8
8
  *
9
9
  * @param cols -
10
10
  * @param rows -
@@ -1,9 +1,9 @@
1
1
  /**
2
- * Yields sequence of 2D grid coordinates in zigzag column order
3
- * starting from [0,0], given `cols` and `rows`.
2
+ * Yields sequence of 2D grid coordinates in zigzag column order starting from
3
+ * [0,0], given `cols` and `rows`.
4
4
  *
5
5
  * Ported & modified from original Java code by Christopher Kulla.
6
- * {@link https://sourceforge.net/p/sunflow/code/HEAD/tree/trunk/src/org/sunflow/core/bucket/SpiralBucketOrder.java}
6
+ * https://sourceforge.net/p/sunflow/code/HEAD/tree/trunk/src/org/sunflow/core/bucket/SpiralBucketOrder.java
7
7
  *
8
8
  * @param cols -
9
9
  * @param rows -
package/zigzag-columns.js CHANGED
@@ -1,10 +1,10 @@
1
1
  import { asInt } from "@thi.ng/api/typedarray";
2
2
  /**
3
- * Yields sequence of 2D grid coordinates in zigzag column order
4
- * starting from [0,0], given `cols` and `rows`.
3
+ * Yields sequence of 2D grid coordinates in zigzag column order starting from
4
+ * [0,0], given `cols` and `rows`.
5
5
  *
6
6
  * Ported & modified from original Java code by Christopher Kulla.
7
- * {@link https://sourceforge.net/p/sunflow/code/HEAD/tree/trunk/src/org/sunflow/core/bucket/SpiralBucketOrder.java}
7
+ * https://sourceforge.net/p/sunflow/code/HEAD/tree/trunk/src/org/sunflow/core/bucket/SpiralBucketOrder.java
8
8
  *
9
9
  * @param cols -
10
10
  * @param rows -
package/zigzag-rows.d.ts CHANGED
@@ -1,9 +1,9 @@
1
1
  /**
2
- * Yields sequence of 2D grid coordinates in zigzag row order starting
3
- * from [0,0], given `cols` and `rows`.
2
+ * Yields sequence of 2D grid coordinates in zigzag row order starting from
3
+ * [0,0], given `cols` and `rows`.
4
4
  *
5
5
  * Ported & modified from original Java code by Christopher Kulla.
6
- * {@link https://sourceforge.net/p/sunflow/code/HEAD/tree/trunk/src/org/sunflow/core/bucket/SpiralBucketOrder.java}
6
+ * https://sourceforge.net/p/sunflow/code/HEAD/tree/trunk/src/org/sunflow/core/bucket/SpiralBucketOrder.java
7
7
  *
8
8
  * @param cols -
9
9
  * @param rows -
package/zigzag-rows.js CHANGED
@@ -1,10 +1,10 @@
1
1
  import { asInt } from "@thi.ng/api/typedarray";
2
2
  /**
3
- * Yields sequence of 2D grid coordinates in zigzag row order starting
4
- * from [0,0], given `cols` and `rows`.
3
+ * Yields sequence of 2D grid coordinates in zigzag row order starting from
4
+ * [0,0], given `cols` and `rows`.
5
5
  *
6
6
  * Ported & modified from original Java code by Christopher Kulla.
7
- * {@link https://sourceforge.net/p/sunflow/code/HEAD/tree/trunk/src/org/sunflow/core/bucket/SpiralBucketOrder.java}
7
+ * https://sourceforge.net/p/sunflow/code/HEAD/tree/trunk/src/org/sunflow/core/bucket/SpiralBucketOrder.java
8
8
  *
9
9
  * @param cols -
10
10
  * @param rows -