@thi.ng/hdom-canvas 4.1.38 → 4.1.40

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-12-16T12:52:25Z
3
+ - **Last updated**: 2022-12-22T21:47:07Z
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
@@ -27,7 +27,7 @@ This project is part of the
27
27
 
28
28
  ## About
29
29
 
30
- @thi.ng/hdom component wrapper for declarative canvas scenegraphs
30
+ [@thi.ng/hdom](https://github.com/thi-ng/umbrella/tree/develop/packages/hdom) component wrapper for declarative canvas scenegraphs.
31
31
 
32
32
  This package provides a [re-usable canvas
33
33
  component](https://github.com/thi-ng/umbrella/tree/develop/packages/hdom-canvas/src/index.ts#L66),
package/index.d.ts CHANGED
@@ -1,37 +1,38 @@
1
1
  import type { HDOMImplementation, HDOMOpts } from "@thi.ng/hdom";
2
2
  /**
3
3
  * Special HTML5 canvas component which injects a branch-local hdom
4
- * implementation for virtual SVG-like shape components / elements.
5
- * These elements are then translated into canvas draw commands during
6
- * the hdom update process.
4
+ * implementation for virtual SVG-like shape components / elements. These
5
+ * elements are then translated into canvas draw commands during the hdom update
6
+ * process.
7
7
  *
8
- * The canvas component automatically adjusts its size for HDPI displays
9
- * by adding CSS `width` & `height` properties and pre-scaling the
10
- * drawing context accordingly before shapes are processed.
8
+ * The canvas component automatically adjusts its size for HDPI displays by
9
+ * adding CSS `width` & `height` properties and pre-scaling the drawing context
10
+ * accordingly before shapes are processed.
11
11
  *
12
- * Shape components are expressed in standard hiccup syntax, however
13
- * with the following restrictions:
12
+ * Shape components are expressed in standard hiccup syntax, however with the
13
+ * following restrictions:
14
14
  *
15
15
  * - Shape component objects with life cycle methods are only partially
16
- * supported, i.e. only the {@link @thi.ng/hdom#ILifecycle.render} &
17
- * {@link @thi.ng/hdom#ILifecycle.release} methods are used (Note, for
18
- * performance reasons `release` methods are ignored by default. If
19
- * your shape tree contains stateful components which use the
20
- * `release` life cycle method, you'll need to explicitly enable the
16
+ * supported, i.e. only the
17
+ * [`ILifecycle.render()`](https://docs.thi.ng/umbrella/hdom/interfaces/ILifecycle.html#render)
18
+ * &
19
+ * [`ILifecycle.release()`](https://docs.thi.ng/umbrella/hdom/interfaces/ILifecycle.html#release)
20
+ * methods are used (Note, for performance reasons `release` methods are
21
+ * ignored by default. If your shape tree contains stateful components which
22
+ * use the `release` life cycle method, you'll need to explicitly enable the
21
23
  * canvas component's `__release` attribute by setting it to `true`).
22
- * - Currently no event listeners can be assigned to shapes (ignored),
23
- * though this is planned for a future version. The canvas element
24
- * itself can of course have event handlers as usual.
24
+ * - Currently no event listeners can be assigned to shapes (ignored), though
25
+ * this is planned for a future version. The canvas element itself can of
26
+ * course have event handlers as usual.
25
27
  *
26
- * All embedded component functions receive the user context object just
27
- * like normal hdom components.
28
+ * All embedded component functions receive the user context object just like
29
+ * normal hdom components.
28
30
  *
29
31
  * For best performance, it's recommended to ensure all resulting shapes
30
- * elements are provided in already normalized hiccup format (i.e.
31
- * `[tag, {attribs}, ...]`). That way the `__normalize: false` control
32
- * attribute can be added either to the canvas component itself (or to
33
- * individual shapes / groups), and if present, will skip normalization
34
- * of all children.
32
+ * elements are provided in already normalized hiccup format (i.e. `[tag,
33
+ * {attribs}, ...]`). That way the `__normalize: false` control attribute can be
34
+ * added either to the canvas component itself (or to individual shapes /
35
+ * groups), and if present, will skip normalization of all children.
35
36
  *
36
37
  * @param _ - hdom user context (ignored)
37
38
  * @param attribs - canvas attribs
package/index.js CHANGED
@@ -9,37 +9,38 @@ const FN = "function";
9
9
  const STR = "string";
10
10
  /**
11
11
  * Special HTML5 canvas component which injects a branch-local hdom
12
- * implementation for virtual SVG-like shape components / elements.
13
- * These elements are then translated into canvas draw commands during
14
- * the hdom update process.
12
+ * implementation for virtual SVG-like shape components / elements. These
13
+ * elements are then translated into canvas draw commands during the hdom update
14
+ * process.
15
15
  *
16
- * The canvas component automatically adjusts its size for HDPI displays
17
- * by adding CSS `width` & `height` properties and pre-scaling the
18
- * drawing context accordingly before shapes are processed.
16
+ * The canvas component automatically adjusts its size for HDPI displays by
17
+ * adding CSS `width` & `height` properties and pre-scaling the drawing context
18
+ * accordingly before shapes are processed.
19
19
  *
20
- * Shape components are expressed in standard hiccup syntax, however
21
- * with the following restrictions:
20
+ * Shape components are expressed in standard hiccup syntax, however with the
21
+ * following restrictions:
22
22
  *
23
23
  * - Shape component objects with life cycle methods are only partially
24
- * supported, i.e. only the {@link @thi.ng/hdom#ILifecycle.render} &
25
- * {@link @thi.ng/hdom#ILifecycle.release} methods are used (Note, for
26
- * performance reasons `release` methods are ignored by default. If
27
- * your shape tree contains stateful components which use the
28
- * `release` life cycle method, you'll need to explicitly enable the
24
+ * supported, i.e. only the
25
+ * [`ILifecycle.render()`](https://docs.thi.ng/umbrella/hdom/interfaces/ILifecycle.html#render)
26
+ * &
27
+ * [`ILifecycle.release()`](https://docs.thi.ng/umbrella/hdom/interfaces/ILifecycle.html#release)
28
+ * methods are used (Note, for performance reasons `release` methods are
29
+ * ignored by default. If your shape tree contains stateful components which
30
+ * use the `release` life cycle method, you'll need to explicitly enable the
29
31
  * canvas component's `__release` attribute by setting it to `true`).
30
- * - Currently no event listeners can be assigned to shapes (ignored),
31
- * though this is planned for a future version. The canvas element
32
- * itself can of course have event handlers as usual.
32
+ * - Currently no event listeners can be assigned to shapes (ignored), though
33
+ * this is planned for a future version. The canvas element itself can of
34
+ * course have event handlers as usual.
33
35
  *
34
- * All embedded component functions receive the user context object just
35
- * like normal hdom components.
36
+ * All embedded component functions receive the user context object just like
37
+ * normal hdom components.
36
38
  *
37
39
  * For best performance, it's recommended to ensure all resulting shapes
38
- * elements are provided in already normalized hiccup format (i.e.
39
- * `[tag, {attribs}, ...]`). That way the `__normalize: false` control
40
- * attribute can be added either to the canvas component itself (or to
41
- * individual shapes / groups), and if present, will skip normalization
42
- * of all children.
40
+ * elements are provided in already normalized hiccup format (i.e. `[tag,
41
+ * {attribs}, ...]`). That way the `__normalize: false` control attribute can be
42
+ * added either to the canvas component itself (or to individual shapes /
43
+ * groups), and if present, will skip normalization of all children.
43
44
  *
44
45
  * @param _ - hdom user context (ignored)
45
46
  * @param attribs - canvas attribs
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thi.ng/hdom-canvas",
3
- "version": "4.1.38",
3
+ "version": "4.1.40",
4
4
  "description": "@thi.ng/hdom component wrapper for declarative canvas scenegraphs",
5
5
  "type": "module",
6
6
  "module": "./index.js",
@@ -37,16 +37,16 @@
37
37
  "test": "testament test"
38
38
  },
39
39
  "dependencies": {
40
- "@thi.ng/api": "^8.6.0",
41
- "@thi.ng/checks": "^3.3.5",
42
- "@thi.ng/diff": "^5.1.19",
43
- "@thi.ng/errors": "^2.2.6",
44
- "@thi.ng/hdom": "^9.2.0",
45
- "@thi.ng/hiccup-canvas": "^2.1.38"
40
+ "@thi.ng/api": "^8.6.2",
41
+ "@thi.ng/checks": "^3.3.6",
42
+ "@thi.ng/diff": "^5.1.21",
43
+ "@thi.ng/errors": "^2.2.7",
44
+ "@thi.ng/hdom": "^9.2.2",
45
+ "@thi.ng/hiccup-canvas": "^2.1.40"
46
46
  },
47
47
  "devDependencies": {
48
48
  "@microsoft/api-extractor": "^7.33.7",
49
- "@thi.ng/testament": "^0.3.7",
49
+ "@thi.ng/testament": "^0.3.8",
50
50
  "rimraf": "^3.0.2",
51
51
  "tools": "^0.0.1",
52
52
  "typedoc": "^0.23.22",
@@ -92,5 +92,5 @@
92
92
  ],
93
93
  "year": 2018
94
94
  },
95
- "gitHead": "f445a9cc8022bcdebbf6ff91fd66ced016d72f01\n"
95
+ "gitHead": "bc6f7f5e2765bb96fe64db804eaf4b2443b47fc6\n"
96
96
  }