@thi.ng/hiccup-svg 4.3.23 → 4.3.25

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
- # ![hiccup-svg](https://media.thi.ng/umbrella/banners-20220914/thing-hiccup-svg.svg?63f904cc)
3
+ # ![@thi.ng/hiccup-svg](https://media.thi.ng/umbrella/banners-20220914/thing-hiccup-svg.svg?63f904cc)
4
4
 
5
5
  [![npm version](https://img.shields.io/npm/v/@thi.ng/hiccup-svg.svg)](https://www.npmjs.com/package/@thi.ng/hiccup-svg)
6
6
  ![npm downloads](https://img.shields.io/npm/dm/@thi.ng/hiccup-svg.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.
@@ -25,7 +25,7 @@ This project is part of the
25
25
 
26
26
  ## About
27
27
 
28
- 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).
28
+ SVG element functions for @thi.ng/hiccup & related tooling
29
29
 
30
30
  ### Important
31
31
 
@@ -155,11 +155,8 @@ ES module import:
155
155
 
156
156
  For Node.js REPL:
157
157
 
158
- ```text
159
- # with flag only for < v16
160
- node --experimental-repl-await
161
-
162
- > const hiccupSvg = await import("@thi.ng/hiccup-svg");
158
+ ```js
159
+ const hiccupSvg = await import("@thi.ng/hiccup-svg");
163
160
  ```
164
161
 
165
162
  Package sizes (brotli'd, pre-treeshake): ESM: 2.31 KB
@@ -244,7 +241,7 @@ Result:
244
241
 
245
242
  ```xml
246
243
  <svg version="1.1"
247
- xmlns="http://www.w3.org/2000/svg"
244
+ xmlns="http://www.w3.org/2000/svg"
248
245
  xmlns:xlink="http://www.w3.org/1999/xlink" width="300" height="300">
249
246
  <defs>
250
247
  <radialGradient id="bg" fx="150.00" fy="280.00" cx="150.00" cy="300.00" fr="300.00" r="100.00" gradientUnits="userSpaceOnUse">
@@ -265,7 +262,7 @@ Result:
265
262
 
266
263
  ## Authors
267
264
 
268
- Karsten Schmidt
265
+ - [Karsten Schmidt](https://thi.ng)
269
266
 
270
267
  If this project contributes to an academic publication, please cite it as:
271
268
 
@@ -280,4 +277,4 @@ If this project contributes to an academic publication, please cite it as:
280
277
 
281
278
  ## License
282
279
 
283
- &copy; 2016 - 2022 Karsten Schmidt // Apache Software License 2.0
280
+ &copy; 2016 - 2022 Karsten Schmidt // Apache License 2.0
package/api.d.ts CHANGED
@@ -1,13 +1,13 @@
1
- export declare type Vec2Like = ArrayLike<number>;
2
- export declare type PathSegmentMove = ["M" | "m", Vec2Like];
3
- export declare type PathSegmentLine = ["L" | "l", Vec2Like];
4
- export declare type PathSegmentHLine = ["H" | "h", number];
5
- export declare type PathSegmentVLine = ["V" | "v", number];
6
- export declare type PathSegmentCubic = ["C" | "c", Vec2Like, Vec2Like, Vec2Like];
7
- export declare type PathSegmentQuadratic = ["Q" | "q", Vec2Like, Vec2Like];
8
- export declare type PathSegmentCubicChain = ["S" | "s", Vec2Like, Vec2Like];
9
- export declare type PathSegmentQuadraticChain = ["T" | "t", Vec2Like];
10
- export declare type PathSegmentArc = [
1
+ export type Vec2Like = ArrayLike<number>;
2
+ export type PathSegmentMove = ["M" | "m", Vec2Like];
3
+ export type PathSegmentLine = ["L" | "l", Vec2Like];
4
+ export type PathSegmentHLine = ["H" | "h", number];
5
+ export type PathSegmentVLine = ["V" | "v", number];
6
+ export type PathSegmentCubic = ["C" | "c", Vec2Like, Vec2Like, Vec2Like];
7
+ export type PathSegmentQuadratic = ["Q" | "q", Vec2Like, Vec2Like];
8
+ export type PathSegmentCubicChain = ["S" | "s", Vec2Like, Vec2Like];
9
+ export type PathSegmentQuadraticChain = ["T" | "t", Vec2Like];
10
+ export type PathSegmentArc = [
11
11
  "A" | "a",
12
12
  number,
13
13
  number,
@@ -16,7 +16,7 @@ export declare type PathSegmentArc = [
16
16
  boolean,
17
17
  Vec2Like
18
18
  ];
19
- export declare type PathSegmentClose = ["Z" | "z"];
20
- export declare type PathSegment = PathSegmentMove | PathSegmentLine | PathSegmentHLine | PathSegmentVLine | PathSegmentCubic | PathSegmentQuadratic | PathSegmentCubicChain | PathSegmentQuadraticChain | PathSegmentArc | PathSegmentClose;
21
- export declare type GradientStop = [string | number, string];
19
+ export type PathSegmentClose = ["Z" | "z"];
20
+ export type PathSegment = PathSegmentMove | PathSegmentLine | PathSegmentHLine | PathSegmentVLine | PathSegmentCubic | PathSegmentQuadratic | PathSegmentCubicChain | PathSegmentQuadraticChain | PathSegmentArc | PathSegmentClose;
21
+ export type GradientStop = [string | number, string];
22
22
  //# sourceMappingURL=api.d.ts.map
package/convert.d.ts CHANGED
@@ -1,10 +1,10 @@
1
1
  /**
2
- * Takes a normalized hiccup tree of {@link @thi.ng/geom# | @thi.ng/geom} or
3
- * {@link @thi.ng/hdom-canvas# | @thi.ng/hdom-canvas} shape definitions and recursively
4
- * converts it into an hiccup flavor which is compatible for SVG
5
- * serialization. This conversion also involves translation & reorg of
6
- * various attributes. Returns new tree. The original remains untouched,
7
- * as will any unrecognized tree/shape nodes.
2
+ * Takes a normalized hiccup tree of [`thi.ng/geom`](https://thi.ng/geom) or
3
+ * [thi.ng/hdom-canvas](https://thi.ng/hdom-canvas) shape definitions and
4
+ * recursively converts it into an hiccup flavor which is compatible for SVG
5
+ * serialization. This conversion also involves translation & reorg of various
6
+ * attributes. Returns new tree. The original remains untouched, as will any
7
+ * unrecognized tree/shape nodes.
8
8
  *
9
9
  * @param tree - shape tree
10
10
  */
package/convert.js CHANGED
@@ -33,12 +33,12 @@ const BASE_LINE = {
33
33
  bottom: "text-bottom",
34
34
  };
35
35
  /**
36
- * Takes a normalized hiccup tree of {@link @thi.ng/geom# | @thi.ng/geom} or
37
- * {@link @thi.ng/hdom-canvas# | @thi.ng/hdom-canvas} shape definitions and recursively
38
- * converts it into an hiccup flavor which is compatible for SVG
39
- * serialization. This conversion also involves translation & reorg of
40
- * various attributes. Returns new tree. The original remains untouched,
41
- * as will any unrecognized tree/shape nodes.
36
+ * Takes a normalized hiccup tree of [`thi.ng/geom`](https://thi.ng/geom) or
37
+ * [thi.ng/hdom-canvas](https://thi.ng/hdom-canvas) shape definitions and
38
+ * recursively converts it into an hiccup flavor which is compatible for SVG
39
+ * serialization. This conversion also involves translation & reorg of various
40
+ * attributes. Returns new tree. The original remains untouched, as will any
41
+ * unrecognized tree/shape nodes.
42
42
  *
43
43
  * @param tree - shape tree
44
44
  */
package/format.d.ts CHANGED
@@ -24,8 +24,10 @@ export declare const fpoints: (pts: Vec2Like[], sep?: string) => string;
24
24
  * complete, e.g. `{ rotate: "rotate(60)" }`
25
25
  *
26
26
  * For color related attribs (`fill`, `stroke`), if given value is array-like, a
27
- * number or an {@link @thi.ng/color#IColor} instance, it will be converted into
28
- * a CSS color string using {@link @thi.ng/color#asCSS}.
27
+ * number or an
28
+ * [`IColor`](https://docs.thi.ng/umbrella/color/interfaces/IColor.html)
29
+ * instance, it will be converted into a CSS color string using
30
+ * [`asCSS()`](https://docs.thi.ng/umbrella/color/functions/asCSS.html).
29
31
  *
30
32
  * String color attribs prefixed with `$` are replaced with `url(#...)` refs
31
33
  * (used for referencing gradients).
package/format.js CHANGED
@@ -49,8 +49,10 @@ const numericAttribs = (attribs, ids) => {
49
49
  * complete, e.g. `{ rotate: "rotate(60)" }`
50
50
  *
51
51
  * For color related attribs (`fill`, `stroke`), if given value is array-like, a
52
- * number or an {@link @thi.ng/color#IColor} instance, it will be converted into
53
- * a CSS color string using {@link @thi.ng/color#asCSS}.
52
+ * number or an
53
+ * [`IColor`](https://docs.thi.ng/umbrella/color/interfaces/IColor.html)
54
+ * instance, it will be converted into a CSS color string using
55
+ * [`asCSS()`](https://docs.thi.ng/umbrella/color/functions/asCSS.html).
54
56
  *
55
57
  * String color attribs prefixed with `$` are replaced with `url(#...)` refs
56
58
  * (used for referencing gradients).
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@thi.ng/hiccup-svg",
3
- "version": "4.3.23",
4
- "description": "SVG element functions for @thi.ng/hiccup & @thi.ng/hdom",
3
+ "version": "4.3.25",
4
+ "description": "SVG element functions for @thi.ng/hiccup & related tooling",
5
5
  "type": "module",
6
6
  "module": "./index.js",
7
7
  "typings": "./index.d.ts",
@@ -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,17 +34,17 @@
34
34
  "test": "testament test"
35
35
  },
36
36
  "dependencies": {
37
- "@thi.ng/checks": "^3.3.4",
38
- "@thi.ng/color": "^5.2.12",
39
- "@thi.ng/prefixes": "^2.1.14"
37
+ "@thi.ng/checks": "^3.3.5",
38
+ "@thi.ng/color": "^5.2.14",
39
+ "@thi.ng/prefixes": "^2.1.15"
40
40
  },
41
41
  "devDependencies": {
42
- "@microsoft/api-extractor": "^7.33.5",
43
- "@thi.ng/testament": "^0.3.6",
42
+ "@microsoft/api-extractor": "^7.33.7",
43
+ "@thi.ng/testament": "^0.3.7",
44
44
  "rimraf": "^3.0.2",
45
45
  "tools": "^0.0.1",
46
- "typedoc": "^0.23.20",
47
- "typescript": "^4.8.4"
46
+ "typedoc": "^0.23.22",
47
+ "typescript": "^4.9.4"
48
48
  },
49
49
  "keywords": [
50
50
  "arc",
@@ -135,5 +135,5 @@
135
135
  "parent": "@thi.ng/hiccup",
136
136
  "year": 2016
137
137
  },
138
- "gitHead": "1fe40da507070653f420156d91e6b27cf682004f\n"
138
+ "gitHead": "7b2af448da8a63fb21704a79cc4cdf1f3d7d7a64\n"
139
139
  }