@thi.ng/hiccup-svg 4.1.5 → 4.2.2

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.
Files changed (4) hide show
  1. package/CHANGELOG.md +177 -105
  2. package/README.md +1 -1
  3. package/package.json +138 -133
  4. package/points.js +1 -1
package/CHANGELOG.md CHANGED
@@ -1,213 +1,285 @@
1
1
  # Change Log
2
2
 
3
- All notable changes to this project will be documented in this file.
4
- See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
-
6
- ## [4.1.5](https://github.com/thi-ng/umbrella/compare/@thi.ng/hiccup-svg@4.1.4...@thi.ng/hiccup-svg@4.1.5) (2021-11-04)
7
-
8
- **Note:** Version bump only for package @thi.ng/hiccup-svg
9
-
10
-
11
-
3
+ - **Last updated**: 2021-11-21T17:09:28Z
4
+ - **Generator**: [thi.ng/monopub](https://thi.ng/monopub)
12
5
 
6
+ All notable changes to this project will be documented in this file.
7
+ See [Conventional Commits](https://conventionalcommits.org/) for commit guidelines.
13
8
 
14
- ## [4.1.4](https://github.com/thi-ng/umbrella/compare/@thi.ng/hiccup-svg@4.1.3...@thi.ng/hiccup-svg@4.1.4) (2021-11-03)
9
+ **Note:** Unlisted _patch_ versions only involve non-code or otherwise excluded changes
10
+ and/or version bumps of transitive dependencies.
15
11
 
16
- **Note:** Version bump only for package @thi.ng/hiccup-svg
12
+ ## [4.2.0](https://github.com/thi-ng/umbrella/tree/@thi.ng/hiccup-svg@4.2.0) (2021-11-17)
17
13
 
14
+ #### 🚀 Features
18
15
 
16
+ - Using workspaces for local tools ([bf7a404](https://github.com/thi-ng/umbrella/commit/bf7a404))
17
+ Improving the overall build ergonomics
18
+ - introduced a tools workspaces
19
+ - imported it in all needed packages/examples
20
+ - inclusive project root
19
21
 
22
+ #### ♻️ Refactoring
20
23
 
24
+ - testrunner to binary ([4ebbbb2](https://github.com/thi-ng/umbrella/commit/4ebbbb2))
25
+ this commit reverts (partly) changes made in:
26
+ ef346d7a8753590dc9094108a3d861a8dbd5dd2c
27
+ overall purpose is better testament ergonomics:
28
+ instead of having to pass NODE_OPTIONS with every invocation
29
+ having a binary to handle this for us.
21
30
 
22
- ## [4.1.1](https://github.com/thi-ng/umbrella/compare/@thi.ng/hiccup-svg@4.1.0...@thi.ng/hiccup-svg@4.1.1) (2021-10-27)
31
+ ### [4.1.6](https://github.com/thi-ng/umbrella/tree/@thi.ng/hiccup-svg@4.1.6) (2021-11-10)
23
32
 
33
+ #### ♻️ Refactoring
24
34
 
25
- ### Bug Fixes
35
+ - update all countdown loops ([a5f374b](https://github.com/thi-ng/umbrella/commit/a5f374b))
26
36
 
27
- * **hiccup-svg:** re-enable `filter` attrib in conversion ([7c75fbe](https://github.com/thi-ng/umbrella/commit/7c75fbe48e9a1c57c79c2ac770f967d5b725c622))
37
+ ### [4.1.1](https://github.com/thi-ng/umbrella/tree/@thi.ng/hiccup-svg@4.1.1) (2021-10-27)
28
38
 
39
+ #### 🩹 Bug fixes
29
40
 
41
+ - re-enable `filter` attrib in conversion ([7c75fbe](https://github.com/thi-ng/umbrella/commit/7c75fbe))
42
+ - update convertAttrib() to treat filter attrib as normal attrib
30
43
 
44
+ ## [4.1.0](https://github.com/thi-ng/umbrella/tree/@thi.ng/hiccup-svg@4.1.0) (2021-10-25)
31
45
 
46
+ #### 🚀 Features
32
47
 
33
- # [4.1.0](https://github.com/thi-ng/umbrella/compare/@thi.ng/hiccup-svg@4.0.3...@thi.ng/hiccup-svg@4.1.0) (2021-10-25)
48
+ - update numericAttribs() ([bf06b65](https://github.com/thi-ng/umbrella/commit/bf06b65))
49
+ - add `DEFAULT_NUMERIC_IDS` to always include in numericAttribs()
50
+ - now called automatically by fattribs(), no more explicit calls needed
34
51
 
52
+ ### [4.0.1](https://github.com/thi-ng/umbrella/tree/@thi.ng/hiccup-svg@4.0.1) (2021-10-13)
35
53
 
36
- ### Features
54
+ #### ♻️ Refactoring
37
55
 
38
- * **hiccup-svg:** update numericAttribs() ([bf06b65](https://github.com/thi-ng/umbrella/commit/bf06b655393f1d08f8bab6d451ca8171ee71796f))
56
+ - update imports in all tests/pkgs ([effd591](https://github.com/thi-ng/umbrella/commit/effd591))
57
+ - update imports in all pkgs ([5fa2b6f](https://github.com/thi-ng/umbrella/commit/5fa2b6f))
58
+ - add .js suffix for all relative imports
39
59
 
60
+ # [4.0.0](https://github.com/thi-ng/umbrella/tree/@thi.ng/hiccup-svg@4.0.0) (2021-10-12)
40
61
 
62
+ #### 🛑 Breaking changes
41
63
 
64
+ - major update of ALL pkgs (export maps, ESM only) ([0d1d6ea](https://github.com/thi-ng/umbrella/commit/0d1d6ea))
65
+ - BREAKING CHANGE: discontinue CommonJS & UMD versions
66
+ - only ESM modules will be published from now on
67
+ - CJS obsolete due to ESM support in recent versions of node:
68
+ - i.e. launch NodeJS via:
69
+ - `node --experimental-specifier-resolution=node --experimental-repl-await`
70
+ - in the node REPL use `await import(...)` instead of `require()`
71
+ - UMD obsolete due to widespread browser support for ESM
72
+ Also:
73
+ - normalize/restructure/reorg all package.json files
74
+ - cleanup all build scripts, remove obsolete
75
+ - switch from mocha to [@thi.ng/testament](https://github.com/thi-ng/umbrella/tree/main/packages/testament) for all tests
42
76
 
77
+ #### 🩹 Bug fixes
43
78
 
44
- # [4.0.0](https://github.com/thi-ng/umbrella/compare/@thi.ng/hiccup-svg@3.8.1...@thi.ng/hiccup-svg@4.0.0) (2021-10-12)
79
+ - check values passed to numericAttribs are actually numeric ([dbd51c3](https://github.com/thi-ng/umbrella/commit/dbd51c3))
45
80
 
81
+ #### ♻️ Refactoring
46
82
 
47
- ### Bug Fixes
83
+ - update imports ([138571a](https://github.com/thi-ng/umbrella/commit/138571a))
84
+ - update all test stubs ([f2d6d53](https://github.com/thi-ng/umbrella/commit/f2d6d53))
85
+ - update all tests in _all_ pkgs ([8b582bc](https://github.com/thi-ng/umbrella/commit/8b582bc))
86
+ - update all to use [@thi.ng/testament](https://github.com/thi-ng/umbrella/tree/main/packages/testament)
48
87
 
49
- * **hiccup-svg:** check values passed to numericAttribs are actually numeric ([dbd51c3](https://github.com/thi-ng/umbrella/commit/dbd51c301dbd32430ae00d34521b6e1c2f32c7cc))
88
+ ## [3.8.0](https://github.com/thi-ng/umbrella/tree/@thi.ng/hiccup-svg@3.8.0) (2021-08-22)
50
89
 
90
+ #### 🚀 Features
51
91
 
52
- ### Build System
92
+ - add numericAttribs(), fix svg() ([d6cb992](https://github.com/thi-ng/umbrella/commit/d6cb992))
93
+ - update svg() to format some attribs using ff()
53
94
 
54
- * major update of ALL pkgs (export maps, ESM only) ([0d1d6ea](https://github.com/thi-ng/umbrella/commit/0d1d6ea9fab2a645d6c5f2bf2591459b939c09b6))
95
+ ### [3.7.31](https://github.com/thi-ng/umbrella/tree/@thi.ng/hiccup-svg@3.7.31) (2021-08-17)
55
96
 
97
+ #### ♻️ Refactoring
56
98
 
57
- ### BREAKING CHANGES
99
+ - single return in svg() ([a770847](https://github.com/thi-ng/umbrella/commit/a770847))
58
100
 
59
- * discontinue CommonJS & UMD versions
101
+ ### [3.7.6](https://github.com/thi-ng/umbrella/tree/@thi.ng/hiccup-svg@3.7.6) (2021-02-20)
60
102
 
61
- - only ESM modules will be published from now on
62
- - CJS obsolete due to ESM support in recent versions of node:
63
- - i.e. launch NodeJS via:
64
- - `node --experimental-specifier-resolution=node --experimental-repl-await`
65
- - in the node REPL use `await import(...)` instead of `require()`
66
- - UMD obsolete due to widespread browser support for ESM
103
+ #### ♻️ Refactoring
67
104
 
68
- Also:
69
- - normalize/restructure/reorg all package.json files
70
- - cleanup all build scripts, remove obsolete
71
- - switch from mocha to @thi.ng/testament for all tests
105
+ - update color attrib resolution/conversion ([5415760](https://github.com/thi-ng/umbrella/commit/5415760))
106
+ - update fcolor() (resolveAsCss()) ([f58ca90](https://github.com/thi-ng/umbrella/commit/f58ca90))
72
107
 
108
+ ## [3.7.0](https://github.com/thi-ng/umbrella/tree/@thi.ng/hiccup-svg@3.7.0) (2021-01-02)
73
109
 
110
+ #### 🚀 Features
74
111
 
112
+ - update svg(), add convert attrib ([cd67a09](https://github.com/thi-ng/umbrella/commit/cd67a09))
113
+ - update attrib handling and call convertTree() if requested
114
+ - update docstrings
75
115
 
116
+ ### [3.6.5](https://github.com/thi-ng/umbrella/tree/@thi.ng/hiccup-svg@3.6.5) (2020-12-07)
76
117
 
118
+ #### ♻️ Refactoring
77
119
 
78
- # [3.8.0](https://github.com/thi-ng/umbrella/compare/@thi.ng/hiccup-svg@3.7.33...@thi.ng/hiccup-svg@3.8.0) (2021-08-22)
120
+ - update type-only imports in various tests/pkgs ([3fd9c24](https://github.com/thi-ng/umbrella/commit/3fd9c24))
79
121
 
80
- ### Features
122
+ ## [3.6.0](https://github.com/thi-ng/umbrella/tree/@thi.ng/hiccup-svg@3.6.0) (2020-09-13)
81
123
 
82
- - **hiccup-svg:** add numericAttribs(), fix svg() ([d6cb992](https://github.com/thi-ng/umbrella/commit/d6cb9929d274c83e89670e9140bba1cb172a0deb))
124
+ #### 🚀 Features
83
125
 
84
- # [3.7.0](https://github.com/thi-ng/umbrella/compare/@thi.ng/hiccup-svg@3.6.6...@thi.ng/hiccup-svg@3.7.0) (2021-01-02)
126
+ - update ff() formatter (int check) ([609d278](https://github.com/thi-ng/umbrella/commit/609d278))
127
+ - add integer check and use as is if true (improves result filesize)
128
+ - fix/update convertTree() ([997dbf6](https://github.com/thi-ng/umbrella/commit/997dbf6))
129
+ - add support for child elements within shapes (do not traverse!)
130
+ - treat <a> as group-like element (do traverse children!)
131
+ - add support for nullish elements in shape tree (skip)
132
+ - allow child elements in shapes ([7447ee1](https://github.com/thi-ng/umbrella/commit/7447ee1))
133
+ - update all shape functions to allow optional child elements
134
+ (e.g. required for adding <animate>, <title>, <desc> etc.)
135
+ - fix [#194](https://github.com/thi-ng/umbrella/issues/194), add `baseline` support ([f8d4a38](https://github.com/thi-ng/umbrella/commit/f8d4a38))
136
+ - add BASE_LINE value mappings
137
+ - update convertAttrib()
85
138
 
86
- ### Features
139
+ ## [3.5.0](https://github.com/thi-ng/umbrella/tree/@thi.ng/hiccup-svg@3.5.0) (2020-07-02)
87
140
 
88
- - **hiccup-svg:** update svg(), add convert attrib ([cd67a09](https://github.com/thi-ng/umbrella/commit/cd67a09c61c93bc7a84ac63eab48f85ab6c52d2a))
141
+ #### 🚀 Features
89
142
 
90
- # [3.6.0](https://github.com/thi-ng/umbrella/compare/@thi.ng/hiccup-svg@3.5.11...@thi.ng/hiccup-svg@3.6.0) (2020-09-13)
143
+ - update deps, update xmlns import ([aab66bb](https://github.com/thi-ng/umbrella/commit/aab66bb))
91
144
 
92
- ### Features
145
+ #### 🩹 Bug fixes
93
146
 
94
- - **hiccup-svg:** allow child elements in shapes ([7447ee1](https://github.com/thi-ng/umbrella/commit/7447ee1e93641921956a8c3194465613576a9697))
95
- - **hiccup-svg:** fix [#194](https://github.com/thi-ng/umbrella/issues/194), add `baseline` support ([f8d4a38](https://github.com/thi-ng/umbrella/commit/f8d4a3868a59f6ce426b8c6fa258b0dda69f1d97))
96
- - **hiccup-svg:** fix/update convertTree() ([997dbf6](https://github.com/thi-ng/umbrella/commit/997dbf6eb6da314e8c7f93908a973139fc650eec))
97
- - **hiccup-svg:** update ff() formatter (int check) ([609d278](https://github.com/thi-ng/umbrella/commit/609d27812b76ebfad96bdc74821840b96ca26307))
147
+ - update XML ns imports ([32bd8d7](https://github.com/thi-ng/umbrella/commit/32bd8d7))
98
148
 
99
- # [3.5.0](https://github.com/thi-ng/umbrella/compare/@thi.ng/hiccup-svg@3.4.26...@thi.ng/hiccup-svg@3.5.0) (2020-07-02)
149
+ ### [3.4.2](https://github.com/thi-ng/umbrella/tree/@thi.ng/hiccup-svg@3.4.2) (2020-02-25)
100
150
 
101
- ### Bug Fixes
151
+ #### ♻️ Refactoring
102
152
 
103
- - **hiccup-svg:** update XML ns imports ([32bd8d7](https://github.com/thi-ng/umbrella/commit/32bd8d71a818f06b0fd2f1fe098e477cbce62f1c))
153
+ - update imports ([eda42ed](https://github.com/thi-ng/umbrella/commit/eda42ed))
154
+ - fix [#197](https://github.com/thi-ng/umbrella/issues/197), update points() ([89f6c36](https://github.com/thi-ng/umbrella/commit/89f6c36))
104
155
 
105
- ### Features
156
+ ## [3.4.0](https://github.com/thi-ng/umbrella/tree/@thi.ng/hiccup-svg@3.4.0) (2020-01-24)
106
157
 
107
- - **hiccup-svg:** update deps, update xmlns import ([aab66bb](https://github.com/thi-ng/umbrella/commit/aab66bb07ac3db85a741e0b1eb42433517470bc1))
158
+ #### 🚀 Features
108
159
 
109
- # [3.4.0](https://github.com/thi-ng/umbrella/compare/@thi.ng/hiccup-svg@3.3.3...@thi.ng/hiccup-svg@3.4.0) (2020-01-24)
160
+ - add packedPoints(), update convertTree() ([67be25e](https://github.com/thi-ng/umbrella/commit/67be25e))
110
161
 
111
- ### Features
162
+ ### [3.3.2](https://github.com/thi-ng/umbrella/tree/@thi.ng/hiccup-svg@3.3.2) (2019-11-09)
112
163
 
113
- - **hiccup-svg:** add packedPoints(), update convertTree() ([67be25e](https://github.com/thi-ng/umbrella/commit/67be25e425d224279a91bf070bfe4ee53cf6847b))
164
+ #### 🩹 Bug fixes
114
165
 
115
- ## [3.3.2](https://github.com/thi-ng/umbrella/compare/@thi.ng/hiccup-svg@3.3.1...@thi.ng/hiccup-svg@3.3.2) (2019-11-09)
166
+ - fix [#142](https://github.com/thi-ng/umbrella/issues/142), add missing exports (ellipse, image) ([1bd7f64](https://github.com/thi-ng/umbrella/commit/1bd7f64))
116
167
 
117
- ### Bug Fixes
168
+ ## [3.3.0](https://github.com/thi-ng/umbrella/tree/@thi.ng/hiccup-svg@3.3.0) (2019-08-21)
118
169
 
119
- - **hiccup-svg:** fix [#142](https://github.com/thi-ng/umbrella/issues/142), add missing exports (ellipse, image) ([1bd7f64](https://github.com/thi-ng/umbrella/commit/1bd7f6408e7b13f45363a8f90a9c043d27baffcb))
170
+ #### 🚀 Features
120
171
 
121
- # [3.3.0](https://github.com/thi-ng/umbrella/compare/@thi.ng/hiccup-svg@3.2.6...@thi.ng/hiccup-svg@3.3.0) (2019-08-21)
172
+ - update polyline(), add fill: none default ([cff9e30](https://github.com/thi-ng/umbrella/commit/cff9e30))
122
173
 
123
- ### Bug Fixes
174
+ #### 🩹 Bug fixes
124
175
 
125
- - **hiccup-svg:** convertAttrib() arg order ([8b48a27](https://github.com/thi-ng/umbrella/commit/8b48a27))
176
+ - convertAttrib() arg order ([8b48a27](https://github.com/thi-ng/umbrella/commit/8b48a27))
126
177
 
127
- ### Features
178
+ #### ♻️ Refactoring
128
179
 
129
- - **hiccup-svg:** update polyline(), add fill: none default ([cff9e30](https://github.com/thi-ng/umbrella/commit/cff9e30))
180
+ - update points(), extract buildShape() ([e01fae3](https://github.com/thi-ng/umbrella/commit/e01fae3))
181
+ - update convertAttribs ([9cc6849](https://github.com/thi-ng/umbrella/commit/9cc6849))
182
+ - update fcolor(), extract buildTransform() ([101bb94](https://github.com/thi-ng/umbrella/commit/101bb94))
183
+ - re-use resolveAsCSS()
130
184
 
131
- ## [3.2.2](https://github.com/thi-ng/umbrella/compare/@thi.ng/hiccup-svg@3.2.1...@thi.ng/hiccup-svg@3.2.2) (2019-07-12)
185
+ ### [3.2.2](https://github.com/thi-ng/umbrella/tree/@thi.ng/hiccup-svg@3.2.2) (2019-07-12)
132
186
 
133
- ### Bug Fixes
187
+ #### 🩹 Bug fixes
134
188
 
135
- - **hiccup-svg:** update points(), use centered rects ([c7d6aaa](https://github.com/thi-ng/umbrella/commit/c7d6aaa))
189
+ - update points(), use centered rects ([c7d6aaa](https://github.com/thi-ng/umbrella/commit/c7d6aaa))
136
190
 
137
- # [3.2.0](https://github.com/thi-ng/umbrella/compare/@thi.ng/hiccup-svg@3.1.22...@thi.ng/hiccup-svg@3.2.0) (2019-07-07)
191
+ ## [3.2.0](https://github.com/thi-ng/umbrella/tree/@thi.ng/hiccup-svg@3.2.0) (2019-07-07)
138
192
 
139
- ### Features
193
+ #### 🚀 Features
140
194
 
141
- - **hiccup-svg:** enable TS strict compiler flags (refactor) ([3143141](https://github.com/thi-ng/umbrella/commit/3143141))
195
+ - enable TS strict compiler flags (refactor) ([3143141](https://github.com/thi-ng/umbrella/commit/3143141))
142
196
 
143
- ## [3.1.7](https://github.com/thi-ng/umbrella/compare/@thi.ng/hiccup-svg@3.1.6...@thi.ng/hiccup-svg@3.1.7) (2019-02-27)
197
+ #### ♻️ Refactoring
144
198
 
145
- ### Bug Fixes
199
+ - address TS strictNullChecks flag ([9a1b92e](https://github.com/thi-ng/umbrella/commit/9a1b92e))
146
200
 
147
- - **hiccup-svg:** update convert() image (new arg order in hdom-canvas) ([b206cff](https://github.com/thi-ng/umbrella/commit/b206cff))
201
+ ### [3.1.7](https://github.com/thi-ng/umbrella/tree/@thi.ng/hiccup-svg@3.1.7) (2019-02-27)
148
202
 
149
- # [3.1.0](https://github.com/thi-ng/umbrella/compare/@thi.ng/hiccup-svg@3.0.1...@thi.ng/hiccup-svg@3.1.0) (2019-01-22)
203
+ #### 🩹 Bug fixes
150
204
 
151
- ### Features
205
+ - update convert() image (new arg order in hdom-canvas) ([b206cff](https://github.com/thi-ng/umbrella/commit/b206cff))
152
206
 
153
- - **hiccup-svg:** add color dep, add attrib conversion for all elements ([7f6011e](https://github.com/thi-ng/umbrella/commit/7f6011e))
207
+ ## [3.1.0](https://github.com/thi-ng/umbrella/tree/@thi.ng/hiccup-svg@3.1.0) (2019-01-22)
154
208
 
155
- # [3.0.0](https://github.com/thi-ng/umbrella/compare/@thi.ng/hiccup-svg@2.0.10...@thi.ng/hiccup-svg@3.0.0) (2019-01-21)
209
+ #### 🚀 Features
156
210
 
157
- ### Bug Fixes
211
+ - add color dep, add attrib conversion for all elements ([7f6011e](https://github.com/thi-ng/umbrella/commit/7f6011e))
212
+ - fix "rect" size handling in convertTree(), revert back to individual
213
+ width/height values
214
+ - add [@thi.ng/color](https://github.com/thi-ng/umbrella/tree/main/packages/color) dependency
215
+ - add fattrib() & fcolor() helpers
216
+ - update & move convertTransforms => ftransforms()
217
+ - update attrib handling for all elements
158
218
 
159
- - **hiccup-svg:** convert path arc segment axis theta to degrees ([370f928](https://github.com/thi-ng/umbrella/commit/370f928))
219
+ # [3.0.0](https://github.com/thi-ng/umbrella/tree/@thi.ng/hiccup-svg@3.0.0) (2019-01-21)
160
220
 
161
- ### Build System
221
+ #### 🛑 Breaking changes
162
222
 
163
223
  - update package build scripts & outputs, imports in ~50 packages ([b54b703](https://github.com/thi-ng/umbrella/commit/b54b703))
224
+ - BREAKING CHANGE: enabled multi-outputs (ES6 modules, CJS, UMD)
225
+ - build scripts now first build ES6 modules in package root, then call
226
+ `scripts/bundle-module` to build minified CJS & UMD bundles in `/lib`
227
+ - all imports MUST be updated to only refer to package level
228
+ (not individual files anymore). tree shaking in user land will get rid of
229
+ all unused imported symbols.
230
+
231
+ #### 🚀 Features
164
232
 
165
- ### Features
233
+ - add ellipse shape type, update convert() ([a39811c](https://github.com/thi-ng/umbrella/commit/a39811c))
166
234
 
167
- - **hiccup-svg:** add ellipse shape type, update convert() ([a39811c](https://github.com/thi-ng/umbrella/commit/a39811c))
168
- - **hiccup-svg:** add toHiccup() support in convertTree() ([e197f90](https://github.com/thi-ng/umbrella/commit/e197f90))
235
+ #### 🩹 Bug fixes
169
236
 
170
- ### Reverts
237
+ - convert path arc segment axis theta to degrees ([370f928](https://github.com/thi-ng/umbrella/commit/370f928))
171
238
 
172
- - **hiccup-svg:** undo merge mistake in convert.ts ([82f8ef2](https://github.com/thi-ng/umbrella/commit/82f8ef2))
239
+ ### [2.0.5](https://github.com/thi-ng/umbrella/tree/@thi.ng/hiccup-svg@2.0.5) (2018-11-06)
173
240
 
174
- ### BREAKING CHANGES
241
+ #### 🚀 Features
175
242
 
176
- - enabled multi-outputs (ES6 modules, CJS, UMD)
177
- - build scripts now first build ES6 modules in package root, then call `scripts/bundle-module` to build minified CJS & UMD bundles in `/lib`
178
- - all imports MUST be updated to only refer to package level (not individual files anymore). tree shaking in user land will get rid of all unused imported symbols.
243
+ - add toHiccup() support in convertTree() ([e197f90](https://github.com/thi-ng/umbrella/commit/e197f90))
179
244
 
180
- ## [2.0.4](https://github.com/thi-ng/umbrella/compare/@thi.ng/hiccup-svg@2.0.3...@thi.ng/hiccup-svg@2.0.4) (2018-10-21)
245
+ #### ♻️ Refactoring
181
246
 
182
- ### Bug Fixes
247
+ - update convertTransforms(), update formatting ([3713c02](https://github.com/thi-ng/umbrella/commit/3713c02))
183
248
 
184
- - **hiccup-svg:** fix arc segment handling ([85426d9](https://github.com/thi-ng/umbrella/commit/85426d9))
249
+ ### [2.0.4](https://github.com/thi-ng/umbrella/tree/@thi.ng/hiccup-svg@2.0.4) (2018-10-21)
185
250
 
186
- # [1.0.0](https://github.com/thi-ng/umbrella/compare/@thi.ng/hiccup-svg@0.2.13...@thi.ng/hiccup-svg@1.0.0) (2018-05-13)
251
+ #### 🩹 Bug fixes
187
252
 
188
- ### Code Refactoring
253
+ - fix arc segment handling ([85426d9](https://github.com/thi-ng/umbrella/commit/85426d9))
189
254
 
190
- - **hiccup-svg:** rename svgdoc => svg ([396faec](https://github.com/thi-ng/umbrella/commit/396faec))
255
+ # [1.0.0](https://github.com/thi-ng/umbrella/tree/@thi.ng/hiccup-svg@1.0.0) (2018-05-13)
191
256
 
192
- ### Documentation
257
+ #### 🛑 Breaking changes
193
258
 
194
- - **hiccup-svg:** resolve [#19](https://github.com/thi-ng/umbrella/issues/19), update readme, add invocation notes ([dc77540](https://github.com/thi-ng/umbrella/commit/dc77540))
259
+ - resolve [#19](https://github.com/thi-ng/umbrella/issues/19), update readme, add invocation notes ([dc77540](https://github.com/thi-ng/umbrella/commit/dc77540))
260
+ - BREAKING CHANGE: technically identical to previous version, however
261
+ due to breaking changes and new context support in [@thi.ng/hiccup](https://github.com/thi-ng/umbrella/tree/main/packages/hiccup),
262
+ SVG functions MUST be invoked directly now and do not support lazy
263
+ evaluation anymore. see notice in readme.
264
+ - rename svgdoc => svg ([396faec](https://github.com/thi-ng/umbrella/commit/396faec))
265
+ - BREAKING CHANGE: rename svgdoc => svg
195
266
 
196
- ### BREAKING CHANGES
267
+ ### [0.2.11](https://github.com/thi-ng/umbrella/tree/@thi.ng/hiccup-svg@0.2.11) (2018-05-10)
197
268
 
198
- - **hiccup-svg:** technically identical to previous version, however due to breaking changes and new context support in @thi.ng/hiccup, SVG functions MUST be invoked directly now and do not support lazy evaluation anymore. see notice in readme.
199
- - **hiccup-svg:** rename svgdoc => svg
269
+ #### ♻️ Refactoring
200
270
 
201
- ## [0.2.13](https://github.com/thi-ng/umbrella/compare/@thi.ng/hiccup-svg@0.2.12...@thi.ng/hiccup-svg@0.2.13) (2018-05-12)
271
+ - update deps & imports in all packages due to [@thi.ng/api](https://github.com/thi-ng/umbrella/tree/main/packages/api) split ([bc45636](https://github.com/thi-ng/umbrella/commit/bc45636))
202
272
 
203
- ## [0.2.1](https://github.com/thi-ng/umbrella/compare/@thi.ng/hiccup-svg@0.2.0...@thi.ng/hiccup-svg@0.2.1) (2018-04-09)
273
+ ### [0.2.1](https://github.com/thi-ng/umbrella/tree/@thi.ng/hiccup-svg@0.2.1) (2018-04-09)
204
274
 
205
- ### Bug Fixes
275
+ #### 🩹 Bug fixes
206
276
 
207
- - **hiccup-svg:** path(), update add null check for points() ([b9d9a49](https://github.com/thi-ng/umbrella/commit/b9d9a49))
277
+ - path(), update add null check for points() ([b9d9a49](https://github.com/thi-ng/umbrella/commit/b9d9a49))
208
278
 
209
- # 0.2.0 (2018-04-08)
279
+ ## [0.2.0](https://github.com/thi-ng/umbrella/tree/@thi.ng/hiccup-svg@0.2.0) (2018-04-08)
210
280
 
211
- ### Features
281
+ #### 🚀 Features
212
282
 
213
- - **hiccup-svg:** re-add svg fns as new [@thi](https://github.com/thi).ng/hiccup-svg package ([afccabd](https://github.com/thi-ng/umbrella/commit/afccabd))
283
+ - re-add svg fns as new [@thi.ng/hiccup-svg](https://github.com/thi-ng/umbrella/tree/main/packages/hiccup-svg) package ([afccabd](https://github.com/thi-ng/umbrella/commit/afccabd))
284
+ - split existing source file into (mostly) single-fn modules
285
+ - minor refactoring
package/README.md CHANGED
@@ -162,7 +162,7 @@ node --experimental-repl-await
162
162
  > const hiccupSvg = await import("@thi.ng/hiccup-svg");
163
163
  ```
164
164
 
165
- Package sizes (gzipped, pre-treeshake): ESM: 2.61 KB
165
+ Package sizes (gzipped, pre-treeshake): ESM: 2.53 KB
166
166
 
167
167
  ## Dependencies
168
168
 
package/package.json CHANGED
@@ -1,134 +1,139 @@
1
1
  {
2
- "name": "@thi.ng/hiccup-svg",
3
- "version": "4.1.5",
4
- "description": "SVG element functions for @thi.ng/hiccup & @thi.ng/hdom",
5
- "type": "module",
6
- "module": "./index.js",
7
- "typings": "./index.d.ts",
8
- "sideEffects": false,
9
- "repository": {
10
- "type": "git",
11
- "url": "https://github.com/thi-ng/umbrella.git"
12
- },
13
- "homepage": "https://github.com/thi-ng/umbrella/tree/develop/packages/hiccup-svg#readme",
14
- "funding": [
15
- {
16
- "type": "github",
17
- "url": "https://github.com/sponsors/postspectacular"
18
- },
19
- {
20
- "type": "patreon",
21
- "url": "https://patreon.com/thing_umbrella"
22
- }
23
- ],
24
- "author": "Karsten Schmidt <k+npm@thi.ng>",
25
- "license": "Apache-2.0",
26
- "scripts": {
27
- "build": "yarn clean && tsc --declaration",
28
- "clean": "rimraf *.js *.d.ts *.map doc",
29
- "doc": "typedoc --excludePrivate --excludeInternal --out doc src/index.ts",
30
- "doc:ae": "mkdir -p .ae/doc .ae/temp && node_modules/.bin/api-extractor run --local --verbose",
31
- "doc:readme": "yarn doc:stats && ../../scripts/node-esm ../../tools/src/readme.ts",
32
- "doc:stats": "../../scripts/node-esm ../../tools/src/module-stats.ts",
33
- "pub": "yarn build && yarn publish --access public",
34
- "test": "testament test"
35
- },
36
- "dependencies": {
37
- "@thi.ng/checks": "^3.0.6",
38
- "@thi.ng/color": "^4.0.8",
39
- "@thi.ng/prefixes": "^2.0.6"
40
- },
41
- "devDependencies": {
42
- "@thi.ng/testament": "^0.1.6"
43
- },
44
- "keywords": [
45
- "arc",
46
- "bezier",
47
- "circle",
48
- "color",
49
- "conversion",
50
- "export",
51
- "fileformat",
52
- "gradient",
53
- "hdom",
54
- "hiccup",
55
- "shape",
56
- "svg",
57
- "tree",
58
- "typescript",
59
- "ui",
60
- "visualization",
61
- "xml"
62
- ],
63
- "publishConfig": {
64
- "access": "public"
65
- },
66
- "engines": {
67
- "node": ">=12.7"
68
- },
69
- "files": [
70
- "*.js",
71
- "*.d.ts"
72
- ],
73
- "exports": {
74
- ".": {
75
- "import": "./index.js"
76
- },
77
- "./api": {
78
- "import": "./api.js"
79
- },
80
- "./circle": {
81
- "import": "./circle.js"
82
- },
83
- "./convert": {
84
- "import": "./convert.js"
85
- },
86
- "./defs": {
87
- "import": "./defs.js"
88
- },
89
- "./ellipse": {
90
- "import": "./ellipse.js"
91
- },
92
- "./format": {
93
- "import": "./format.js"
94
- },
95
- "./gradients": {
96
- "import": "./gradients.js"
97
- },
98
- "./group": {
99
- "import": "./group.js"
100
- },
101
- "./image": {
102
- "import": "./image.js"
103
- },
104
- "./line": {
105
- "import": "./line.js"
106
- },
107
- "./path": {
108
- "import": "./path.js"
109
- },
110
- "./points": {
111
- "import": "./points.js"
112
- },
113
- "./polygon": {
114
- "import": "./polygon.js"
115
- },
116
- "./polyline": {
117
- "import": "./polyline.js"
118
- },
119
- "./rect": {
120
- "import": "./rect.js"
121
- },
122
- "./svg": {
123
- "import": "./svg.js"
124
- },
125
- "./text": {
126
- "import": "./text.js"
127
- }
128
- },
129
- "thi.ng": {
130
- "parent": "@thi.ng/hiccup",
131
- "year": 2016
132
- },
133
- "gitHead": "d6aca4b4edb697613ed6635b1c0b12f0bf27b1f0"
134
- }
2
+ "name": "@thi.ng/hiccup-svg",
3
+ "version": "4.2.2",
4
+ "description": "SVG element functions for @thi.ng/hiccup & @thi.ng/hdom",
5
+ "type": "module",
6
+ "module": "./index.js",
7
+ "typings": "./index.d.ts",
8
+ "sideEffects": false,
9
+ "repository": {
10
+ "type": "git",
11
+ "url": "https://github.com/thi-ng/umbrella.git"
12
+ },
13
+ "homepage": "https://github.com/thi-ng/umbrella/tree/develop/packages/hiccup-svg#readme",
14
+ "funding": [
15
+ {
16
+ "type": "github",
17
+ "url": "https://github.com/sponsors/postspectacular"
18
+ },
19
+ {
20
+ "type": "patreon",
21
+ "url": "https://patreon.com/thing_umbrella"
22
+ }
23
+ ],
24
+ "author": "Karsten Schmidt <k+npm@thi.ng>",
25
+ "license": "Apache-2.0",
26
+ "scripts": {
27
+ "build": "yarn clean && tsc --declaration",
28
+ "clean": "rimraf '*.js' '*.d.ts' '*.map' doc",
29
+ "doc": "typedoc --excludePrivate --excludeInternal --out doc src/index.ts",
30
+ "doc:ae": "mkdir -p .ae/doc .ae/temp && api-extractor run --local --verbose",
31
+ "doc:readme": "yarn doc:stats && tools:readme",
32
+ "doc:stats": "tools:module-stats",
33
+ "pub": "yarn npm publish --access public",
34
+ "test": "testament test"
35
+ },
36
+ "dependencies": {
37
+ "@thi.ng/checks": "^3.1.2",
38
+ "@thi.ng/color": "^4.1.2",
39
+ "@thi.ng/prefixes": "^2.1.2"
40
+ },
41
+ "devDependencies": {
42
+ "@microsoft/api-extractor": "^7.18.19",
43
+ "@thi.ng/testament": "^0.2.2",
44
+ "rimraf": "^3.0.2",
45
+ "tools": "^0.0.1",
46
+ "typedoc": "^0.22.9",
47
+ "typescript": "^4.5.2"
48
+ },
49
+ "keywords": [
50
+ "arc",
51
+ "bezier",
52
+ "circle",
53
+ "color",
54
+ "conversion",
55
+ "export",
56
+ "fileformat",
57
+ "gradient",
58
+ "hdom",
59
+ "hiccup",
60
+ "shape",
61
+ "svg",
62
+ "tree",
63
+ "typescript",
64
+ "ui",
65
+ "visualization",
66
+ "xml"
67
+ ],
68
+ "publishConfig": {
69
+ "access": "public"
70
+ },
71
+ "engines": {
72
+ "node": ">=12.7"
73
+ },
74
+ "files": [
75
+ "*.js",
76
+ "*.d.ts"
77
+ ],
78
+ "exports": {
79
+ ".": {
80
+ "import": "./index.js"
81
+ },
82
+ "./api": {
83
+ "import": "./api.js"
84
+ },
85
+ "./circle": {
86
+ "import": "./circle.js"
87
+ },
88
+ "./convert": {
89
+ "import": "./convert.js"
90
+ },
91
+ "./defs": {
92
+ "import": "./defs.js"
93
+ },
94
+ "./ellipse": {
95
+ "import": "./ellipse.js"
96
+ },
97
+ "./format": {
98
+ "import": "./format.js"
99
+ },
100
+ "./gradients": {
101
+ "import": "./gradients.js"
102
+ },
103
+ "./group": {
104
+ "import": "./group.js"
105
+ },
106
+ "./image": {
107
+ "import": "./image.js"
108
+ },
109
+ "./line": {
110
+ "import": "./line.js"
111
+ },
112
+ "./path": {
113
+ "import": "./path.js"
114
+ },
115
+ "./points": {
116
+ "import": "./points.js"
117
+ },
118
+ "./polygon": {
119
+ "import": "./polygon.js"
120
+ },
121
+ "./polyline": {
122
+ "import": "./polyline.js"
123
+ },
124
+ "./rect": {
125
+ "import": "./rect.js"
126
+ },
127
+ "./svg": {
128
+ "import": "./svg.js"
129
+ },
130
+ "./text": {
131
+ "import": "./text.js"
132
+ }
133
+ },
134
+ "thi.ng": {
135
+ "parent": "@thi.ng/hiccup",
136
+ "year": 2016
137
+ },
138
+ "gitHead": "e8a7c2a40191b391cef182c2978e5a6c85987a87\n"
139
+ }
package/points.js CHANGED
@@ -62,7 +62,7 @@ export const packedPoints = (pts, shape, size = 1, attribs, ...body) => {
62
62
  ...body,
63
63
  ];
64
64
  const href = buildSymbol(group, shape, size);
65
- for (let i = start; --num >= 0; i += estride) {
65
+ for (let i = start; num-- > 0; i += estride) {
66
66
  // TODO replace w/ SVG2 `href` once Safari supports it
67
67
  group.push([
68
68
  "use",