@thi.ng/rdom-canvas 0.4.39 → 0.4.41

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:38Z
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
- # ![rdom-canvas](https://media.thi.ng/umbrella/banners-20220914/thing-rdom-canvas.svg?d17bbfc7)
3
+ # ![@thi.ng/rdom-canvas](https://media.thi.ng/umbrella/banners-20220914/thing-rdom-canvas.svg?d17bbfc7)
4
4
 
5
5
  [![npm version](https://img.shields.io/npm/v/@thi.ng/rdom-canvas.svg)](https://www.npmjs.com/package/@thi.ng/rdom-canvas)
6
6
  ![npm downloads](https://img.shields.io/npm/dm/@thi.ng/rdom-canvas.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
- [@thi.ng/rdom](https://github.com/thi-ng/umbrella/tree/develop/packages/rdom) component wrapper for [@thi.ng/hiccup-canvas](https://github.com/thi-ng/umbrella/tree/develop/packages/hiccup-canvas) and declarative canvas drawing.
24
+ @thi.ng/rdom component wrapper for @thi.ng/hiccup-canvas and declarative canvas drawing
25
25
 
26
26
  ## Status
27
27
 
@@ -32,7 +32,7 @@ This project is part of the
32
32
  ## Related packages
33
33
 
34
34
  - [@thi.ng/hiccup-canvas](https://github.com/thi-ng/umbrella/tree/develop/packages/hiccup-canvas) - Hiccup shape tree renderer for vanilla Canvas 2D contexts
35
- - [@thi.ng/hiccup-svg](https://github.com/thi-ng/umbrella/tree/develop/packages/hiccup-svg) - SVG element functions for [@thi.ng/hiccup](https://github.com/thi-ng/umbrella/tree/develop/packages/hiccup) & [@thi.ng/hdom](https://github.com/thi-ng/umbrella/tree/develop/packages/hdom)
35
+ - [@thi.ng/hiccup-svg](https://github.com/thi-ng/umbrella/tree/develop/packages/hiccup-svg) - SVG element functions for [@thi.ng/hiccup](https://github.com/thi-ng/umbrella/tree/develop/packages/hiccup) & related tooling
36
36
  - [@thi.ng/geom](https://github.com/thi-ng/umbrella/tree/develop/packages/geom) - Functional, polymorphic API for 2D geometry types & SVG generation
37
37
  - [@thi.ng/scenegraph](https://github.com/thi-ng/umbrella/tree/develop/packages/scenegraph) - Extensible 2D/3D scene graph with [@thi.ng/hiccup-canvas](https://github.com/thi-ng/umbrella/tree/develop/packages/hiccup-canvas) support
38
38
 
@@ -52,11 +52,8 @@ ES module import:
52
52
 
53
53
  For Node.js REPL:
54
54
 
55
- ```text
56
- # with flag only for < v16
57
- node --experimental-repl-await
58
-
59
- > const rdomCanvas = await import("@thi.ng/rdom-canvas");
55
+ ```js
56
+ const rdomCanvas = await import("@thi.ng/rdom-canvas");
60
57
  ```
61
58
 
62
59
  Package sizes (brotli'd, pre-treeshake): ESM: 646 bytes
@@ -93,7 +90,7 @@ TODO
93
90
 
94
91
  ## Authors
95
92
 
96
- Karsten Schmidt
93
+ - [Karsten Schmidt](https://thi.ng)
97
94
 
98
95
  If this project contributes to an academic publication, please cite it as:
99
96
 
@@ -108,4 +105,4 @@ If this project contributes to an academic publication, please cite it as:
108
105
 
109
106
  ## License
110
107
 
111
- &copy; 2020 - 2022 Karsten Schmidt // Apache Software License 2.0
108
+ &copy; 2020 - 2022 Karsten Schmidt // Apache License 2.0
package/index.d.ts CHANGED
@@ -12,7 +12,8 @@ export interface CanvasOpts {
12
12
  */
13
13
  onunmount: Fn<HTMLCanvasElement, void>;
14
14
  /**
15
- * Custom component event handler called when canvas size has changed (only used when canvas size is initially given as reactive value).
15
+ * Custom component event handler called when canvas size has changed (only
16
+ * used when canvas size is initially given as reactive value).
16
17
  */
17
18
  onresize: Fn3<HTMLCanvasElement, CanvasRenderingContext2D, number[], void>;
18
19
  /**
@@ -22,15 +23,15 @@ export interface CanvasOpts {
22
23
  [id: string]: any;
23
24
  }
24
25
  /**
25
- * Reactive {@link @thi.ng/hiccup-canvas} component wrapper. Returns a
26
- * canvas component wrapped in a {@link $sub} and updates/re-renders
27
- * canvas with each new input received from `body`.
26
+ * Reactive [thi.ng/hiccup-canvas](https://thi.ng/hiccup-canvas) component
27
+ * wrapper. Returns a canvas component wrapped in a {@link $sub} and
28
+ * updates/re-renders canvas with each new input received from `body`.
28
29
  *
29
30
  * @remarks
30
- * If `size` is subscribable, the canvas is resized each time a new
31
- * value is received, else will only be used to define initial canvas
32
- * size. The `attribs` SHOULD not include `width`, `height`, since these
33
- * will be overriden in any way by `size` arg.
31
+ * If `size` is subscribable, the canvas is resized each time a new value is
32
+ * received, else will only be used to define initial canvas size. The `attribs`
33
+ * SHOULD not include `width`, `height`, since these will be overriden in any
34
+ * way by `size` arg.
34
35
  */
35
36
  export declare const $canvas: (body: ISubscription<any, any[] | IToHiccup>, size: number[] | ISubscription<any, number[]>, attribs?: Partial<CanvasOpts>) => IComponent<any[] | IToHiccup>;
36
37
  export declare class $Canvas extends Component implements IMountWithState<any[] | IToHiccup> {
package/index.js CHANGED
@@ -9,15 +9,15 @@ import { isSubscribable } from "@thi.ng/rstream/checks";
9
9
  import { reactive } from "@thi.ng/rstream/stream";
10
10
  import { sideEffect } from "@thi.ng/transducers/side-effect";
11
11
  /**
12
- * Reactive {@link @thi.ng/hiccup-canvas} component wrapper. Returns a
13
- * canvas component wrapped in a {@link $sub} and updates/re-renders
14
- * canvas with each new input received from `body`.
12
+ * Reactive [thi.ng/hiccup-canvas](https://thi.ng/hiccup-canvas) component
13
+ * wrapper. Returns a canvas component wrapped in a {@link $sub} and
14
+ * updates/re-renders canvas with each new input received from `body`.
15
15
  *
16
16
  * @remarks
17
- * If `size` is subscribable, the canvas is resized each time a new
18
- * value is received, else will only be used to define initial canvas
19
- * size. The `attribs` SHOULD not include `width`, `height`, since these
20
- * will be overriden in any way by `size` arg.
17
+ * If `size` is subscribable, the canvas is resized each time a new value is
18
+ * received, else will only be used to define initial canvas size. The `attribs`
19
+ * SHOULD not include `width`, `height`, since these will be overriden in any
20
+ * way by `size` arg.
21
21
  */
22
22
  export const $canvas = (body, size, attribs) => $sub(body, new $Canvas(size, attribs));
23
23
  export class $Canvas extends Component {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thi.ng/rdom-canvas",
3
- "version": "0.4.39",
3
+ "version": "0.4.41",
4
4
  "description": "@thi.ng/rdom component wrapper for @thi.ng/hiccup-canvas and declarative canvas drawing",
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/rdom-canvas#readme",
13
+ "homepage": "https://github.com/thi-ng/umbrella/tree/develop/packages/rdom-canvas#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,22 +34,22 @@
34
34
  "test": "testament test"
35
35
  },
36
36
  "dependencies": {
37
- "@thi.ng/adapt-dpi": "^2.2.3",
38
- "@thi.ng/api": "^8.5.1",
39
- "@thi.ng/associative": "^6.2.18",
40
- "@thi.ng/checks": "^3.3.4",
41
- "@thi.ng/hiccup-canvas": "^2.1.37",
42
- "@thi.ng/rdom": "^0.10.1",
43
- "@thi.ng/rstream": "^7.2.30",
44
- "@thi.ng/transducers": "^8.3.25"
37
+ "@thi.ng/adapt-dpi": "^2.2.4",
38
+ "@thi.ng/api": "^8.6.1",
39
+ "@thi.ng/associative": "^6.2.20",
40
+ "@thi.ng/checks": "^3.3.5",
41
+ "@thi.ng/hiccup-canvas": "^2.1.39",
42
+ "@thi.ng/rdom": "^0.10.3",
43
+ "@thi.ng/rstream": "^7.2.32",
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
  "animation",
@@ -90,5 +90,5 @@
90
90
  "status": "alpha",
91
91
  "year": 2020
92
92
  },
93
- "gitHead": "5178ea1d7f4b2de86cf5101bdd73f6567518c0bd\n"
93
+ "gitHead": "7b2af448da8a63fb21704a79cc4cdf1f3d7d7a64\n"
94
94
  }