@thi.ng/fuzzy-viz 2.1.40 → 2.1.42

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
- # ![fuzzy-viz](https://media.thi.ng/umbrella/banners-20220914/thing-fuzzy-viz.svg?61b5d627)
3
+ # ![@thi.ng/fuzzy-viz](https://media.thi.ng/umbrella/banners-20220914/thing-fuzzy-viz.svg?61b5d627)
4
4
 
5
5
  [![npm version](https://img.shields.io/npm/v/@thi.ng/fuzzy-viz.svg)](https://www.npmjs.com/package/@thi.ng/fuzzy-viz)
6
6
  ![npm downloads](https://img.shields.io/npm/dm/@thi.ng/fuzzy-viz.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.
@@ -21,7 +21,7 @@ This project is part of the
21
21
 
22
22
  ## About
23
23
 
24
- Visualization, instrumentation & introspection utils for [@thi.ng/fuzzy](https://github.com/thi-ng/umbrella/tree/develop/packages/fuzzy).
24
+ Visualization, instrumentation & introspection utils for @thi.ng/fuzzy
25
25
 
26
26
  ## Status
27
27
 
@@ -45,11 +45,8 @@ ES module import:
45
45
 
46
46
  For Node.js REPL:
47
47
 
48
- ```text
49
- # with flag only for < v16
50
- node --experimental-repl-await
51
-
52
- > const fuzzyViz = await import("@thi.ng/fuzzy-viz");
48
+ ```js
49
+ const fuzzyViz = await import("@thi.ng/fuzzy-viz");
53
50
  ```
54
51
 
55
52
  Package sizes (brotli'd, pre-treeshake): ESM: 1.00 KB
@@ -149,7 +146,7 @@ created following the same pattern as above:
149
146
 
150
147
  ## Authors
151
148
 
152
- Karsten Schmidt
149
+ - [Karsten Schmidt](https://thi.ng)
153
150
 
154
151
  If this project contributes to an academic publication, please cite it as:
155
152
 
@@ -164,4 +161,4 @@ If this project contributes to an academic publication, please cite it as:
164
161
 
165
162
  ## License
166
163
 
167
- &copy; 2020 - 2022 Karsten Schmidt // Apache Software License 2.0
164
+ &copy; 2020 - 2022 Karsten Schmidt // Apache License 2.0
package/api.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import type { Fn, Fn3 } from "@thi.ng/api";
2
2
  import type { FuzzyFn, LVarDomain } from "@thi.ng/fuzzy";
3
- export declare type InstrumentFn<T> = Fn3<FuzzyFn, LVarDomain, number, T>;
3
+ export type InstrumentFn<T> = Fn3<FuzzyFn, LVarDomain, number, T>;
4
4
  export interface AsciiVizOpts {
5
5
  /**
6
6
  * Width in characters
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thi.ng/fuzzy-viz",
3
- "version": "2.1.40",
3
+ "version": "2.1.42",
4
4
  "description": "Visualization, instrumentation & introspection utils for @thi.ng/fuzzy",
5
5
  "type": "module",
6
6
  "module": "./index.js",
@@ -10,7 +10,7 @@
10
10
  "type": "git",
11
11
  "url": "https://github.com/thi-ng/umbrella.git"
12
12
  },
13
- "homepage": "https://github.com/thi-ng/umbrella/tree/master/packages/fuzzy-viz#readme",
13
+ "homepage": "https://github.com/thi-ng/umbrella/tree/develop/packages/fuzzy-viz#readme",
14
14
  "funding": [
15
15
  {
16
16
  "type": "github",
@@ -21,7 +21,7 @@
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",
@@ -34,21 +34,21 @@
34
34
  "test": "testament test"
35
35
  },
36
36
  "dependencies": {
37
- "@thi.ng/api": "^8.5.1",
38
- "@thi.ng/fuzzy": "^2.1.19",
39
- "@thi.ng/hiccup": "^4.2.25",
40
- "@thi.ng/hiccup-svg": "^4.3.23",
41
- "@thi.ng/math": "^5.3.15",
42
- "@thi.ng/strings": "^3.3.19",
43
- "@thi.ng/text-canvas": "^2.4.20"
37
+ "@thi.ng/api": "^8.6.1",
38
+ "@thi.ng/fuzzy": "^2.1.21",
39
+ "@thi.ng/hiccup": "^4.2.27",
40
+ "@thi.ng/hiccup-svg": "^4.3.25",
41
+ "@thi.ng/math": "^5.3.17",
42
+ "@thi.ng/strings": "^3.3.21",
43
+ "@thi.ng/text-canvas": "^2.4.22"
44
44
  },
45
45
  "devDependencies": {
46
- "@microsoft/api-extractor": "^7.33.5",
47
- "@thi.ng/testament": "^0.3.6",
46
+ "@microsoft/api-extractor": "^7.33.7",
47
+ "@thi.ng/testament": "^0.3.7",
48
48
  "rimraf": "^3.0.2",
49
49
  "tools": "^0.0.1",
50
- "typedoc": "^0.23.20",
51
- "typescript": "^4.8.4"
50
+ "typedoc": "^0.23.22",
51
+ "typescript": "^4.9.4"
52
52
  },
53
53
  "keywords": [
54
54
  "area plot",
@@ -91,5 +91,5 @@
91
91
  "parent": "@thi.ng/fuzzy",
92
92
  "year": 2020
93
93
  },
94
- "gitHead": "5178ea1d7f4b2de86cf5101bdd73f6567518c0bd\n"
94
+ "gitHead": "7b2af448da8a63fb21704a79cc4cdf1f3d7d7a64\n"
95
95
  }
package/strategy.d.ts CHANGED
@@ -2,7 +2,8 @@ import type { Fn3, IClear, IDeref } from "@thi.ng/api";
2
2
  import type { DefuzzStrategy, FuzzyFn, LVarDomain } from "@thi.ng/fuzzy";
3
3
  import type { AsciiVizOpts, InstrumentFn, VizualizeVarOpts } from "./api.js";
4
4
  /**
5
- * Higher order function. Takes an existing {@link @thi.ng/fuzzy#DefuzzStrategy}
5
+ * Higher order function. Takes an existing
6
+ * [`DefuzzStrategy`](https://docs.thi.ng/umbrella/fuzzy/types/DefuzzStrategy.html)
6
7
  * and an instrumentation function. Returns new `DefuzzStrategy` which first
7
8
  * executes original `strategy`, then calls `instrument` with the same args AND
8
9
  * the computed result obtained from `strategy`. Returns result of original
@@ -11,10 +12,11 @@ import type { AsciiVizOpts, InstrumentFn, VizualizeVarOpts } from "./api.js";
11
12
  * @remarks
12
13
  * The instrumentation function is intended to perform side effects (e.g. debug
13
14
  * outputs) and/or produce secondary results (e.g. visualizations). The latter
14
- * can be obtained through the {@link @thi.ng/api#IDeref} mechanism implemented
15
- * by the returned function. Since {@link defuzz} might call the strategy
16
- * multiple times (i.e. if there are multiple output vars used), `.deref()` will
17
- * always return an array of secondary results.
15
+ * can be obtained through the
16
+ * [`IDeref`](https://docs.thi.ng/umbrella/api/interfaces/IDeref.html) mechanism
17
+ * implemented by the returned function. Since {@link defuzz} might call the
18
+ * strategy multiple times (i.e. if there are multiple output vars used),
19
+ * `.deref()` will always return an array of secondary results.
18
20
  *
19
21
  * Note: The secondary results from the instrumentation function will persist &
20
22
  * accumulate. If re-using the instrumented strategy for multiple `defuzz()`
package/strategy.js CHANGED
@@ -6,7 +6,8 @@ import { repeat } from "@thi.ng/strings/repeat";
6
6
  import { barChartHLines } from "@thi.ng/text-canvas/bars";
7
7
  import { varToHiccup } from "./var.js";
8
8
  /**
9
- * Higher order function. Takes an existing {@link @thi.ng/fuzzy#DefuzzStrategy}
9
+ * Higher order function. Takes an existing
10
+ * [`DefuzzStrategy`](https://docs.thi.ng/umbrella/fuzzy/types/DefuzzStrategy.html)
10
11
  * and an instrumentation function. Returns new `DefuzzStrategy` which first
11
12
  * executes original `strategy`, then calls `instrument` with the same args AND
12
13
  * the computed result obtained from `strategy`. Returns result of original
@@ -15,10 +16,11 @@ import { varToHiccup } from "./var.js";
15
16
  * @remarks
16
17
  * The instrumentation function is intended to perform side effects (e.g. debug
17
18
  * outputs) and/or produce secondary results (e.g. visualizations). The latter
18
- * can be obtained through the {@link @thi.ng/api#IDeref} mechanism implemented
19
- * by the returned function. Since {@link defuzz} might call the strategy
20
- * multiple times (i.e. if there are multiple output vars used), `.deref()` will
21
- * always return an array of secondary results.
19
+ * can be obtained through the
20
+ * [`IDeref`](https://docs.thi.ng/umbrella/api/interfaces/IDeref.html) mechanism
21
+ * implemented by the returned function. Since {@link defuzz} might call the
22
+ * strategy multiple times (i.e. if there are multiple output vars used),
23
+ * `.deref()` will always return an array of secondary results.
22
24
  *
23
25
  * Note: The secondary results from the instrumentation function will persist &
24
26
  * accumulate. If re-using the instrumented strategy for multiple `defuzz()`
package/var.d.ts CHANGED
@@ -1,10 +1,11 @@
1
1
  import type { LVar } from "@thi.ng/fuzzy";
2
2
  import type { VizualizeVarOpts } from "./api.js";
3
3
  /**
4
- * Takes an {@link @thi.ng/fuzzy#LVar} and visualization options. Evaluates all
5
- * of the var's fuzzy sets in the var's value domain and visualizes them as
6
- * polygons. Returns a {@link @thi.ng/hiccup-canvas#} compatible shape component
7
- * tree.
4
+ * Takes an [`LVar`](https://docs.thi.ng/umbrella/fuzzy/interfaces/LVar.html)
5
+ * and visualization options. Evaluates all of the var's fuzzy sets in the var's
6
+ * value domain and visualizes them as polygons. Returns a
7
+ * [thi.ng/hiccup-canvas](https://thi.ng/thi.ng/hiccup-canvas) compatible shape
8
+ * component tree.
8
9
  *
9
10
  * @param var -
10
11
  * @param opts -
package/var.js CHANGED
@@ -4,10 +4,11 @@ import { serialize } from "@thi.ng/hiccup/serialize";
4
4
  import { fit } from "@thi.ng/math/fit";
5
5
  import { inRange } from "@thi.ng/math/interval";
6
6
  /**
7
- * Takes an {@link @thi.ng/fuzzy#LVar} and visualization options. Evaluates all
8
- * of the var's fuzzy sets in the var's value domain and visualizes them as
9
- * polygons. Returns a {@link @thi.ng/hiccup-canvas#} compatible shape component
10
- * tree.
7
+ * Takes an [`LVar`](https://docs.thi.ng/umbrella/fuzzy/interfaces/LVar.html)
8
+ * and visualization options. Evaluates all of the var's fuzzy sets in the var's
9
+ * value domain and visualizes them as polygons. Returns a
10
+ * [thi.ng/hiccup-canvas](https://thi.ng/thi.ng/hiccup-canvas) compatible shape
11
+ * component tree.
11
12
  *
12
13
  * @param var -
13
14
  * @param opts -