@atlaspack/transformer-svg 2.14.5-canary.39 → 2.14.5-canary.391
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 +340 -0
- package/dist/SVGTransformer.js +65 -0
- package/dist/dependencies.js +155 -0
- package/dist/inline.js +124 -0
- package/lib/SVGTransformer.js +1 -0
- package/lib/dependencies.js +7 -0
- package/lib/inline.js +6 -2
- package/lib/types/SVGTransformer.d.ts +3 -0
- package/lib/types/dependencies.d.ts +3 -0
- package/lib/types/inline.d.ts +2 -0
- package/package.json +15 -8
- package/src/{SVGTransformer.js → SVGTransformer.ts} +4 -5
- package/src/{dependencies.js → dependencies.ts} +11 -6
- package/src/{inline.js → inline.ts} +11 -6
- package/test/{parseFuncIRI.test.js → parseFuncIRI.test.ts} +0 -1
- package/tsconfig.json +18 -0
- package/tsconfig.tsbuildinfo +1 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,345 @@
|
|
|
1
1
|
# @atlaspack/transformer-svg
|
|
2
2
|
|
|
3
|
+
## 2.14.51
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies [[`a631dcd`](https://github.com/atlassian-labs/atlaspack/commit/a631dcd961112db072b0f8de0831efd178f355a7), [`e9dce31`](https://github.com/atlassian-labs/atlaspack/commit/e9dce3168a8e6727a994bf2a6ac6041eb29f6027), [`59e1345`](https://github.com/atlassian-labs/atlaspack/commit/59e1345f84f43e0632d434ab42c06bf748241985), [`783118c`](https://github.com/atlassian-labs/atlaspack/commit/783118c772f45a0cf6a3b6b447fb9a0e225b25a6), [`fcaf517`](https://github.com/atlassian-labs/atlaspack/commit/fcaf517010d15c9300393bcad3f9b465689d9d16)]:
|
|
8
|
+
- @atlaspack/rust@3.21.0
|
|
9
|
+
- @atlaspack/plugin@2.14.51
|
|
10
|
+
|
|
11
|
+
## 2.14.50
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- Updated dependencies [[`e8ea59b`](https://github.com/atlassian-labs/atlaspack/commit/e8ea59beabb4b4fef647dc9ebea3519b6d56d7b5), [`3753cb1`](https://github.com/atlassian-labs/atlaspack/commit/3753cb1bf9155eaf3a1a8f952886864682738647), [`8826fd0`](https://github.com/atlassian-labs/atlaspack/commit/8826fd02c29c9c67cf0c80da41f424257fbdef93), [`225683f`](https://github.com/atlassian-labs/atlaspack/commit/225683f7c59355da53b7004d2b8596701ce3af41), [`43adda0`](https://github.com/atlassian-labs/atlaspack/commit/43adda06bf3b6a404b54f8ba2a3b810d92e61d75), [`dbcaabb`](https://github.com/atlassian-labs/atlaspack/commit/dbcaabbf15d4fbc8ecd9c0be58cf7b2317eebfc4)]:
|
|
16
|
+
- @atlaspack/rust@3.20.0
|
|
17
|
+
- @atlaspack/plugin@2.14.50
|
|
18
|
+
|
|
19
|
+
## 2.14.49
|
|
20
|
+
|
|
21
|
+
### Patch Changes
|
|
22
|
+
|
|
23
|
+
- Updated dependencies [[`fc3adc0`](https://github.com/atlassian-labs/atlaspack/commit/fc3adc098f583e40d6d7687412cac6dde7cbb3f3), [`f33f9c4`](https://github.com/atlassian-labs/atlaspack/commit/f33f9c48dd24b319df352d197e4a83cbb1b053bc), [`53da216`](https://github.com/atlassian-labs/atlaspack/commit/53da216320e19c9b71b001386eb420d05f111db8)]:
|
|
24
|
+
- @atlaspack/rust@3.19.0
|
|
25
|
+
- @atlaspack/plugin@2.14.49
|
|
26
|
+
|
|
27
|
+
## 2.14.48
|
|
28
|
+
|
|
29
|
+
### Patch Changes
|
|
30
|
+
|
|
31
|
+
- Updated dependencies [[`564fb4f`](https://github.com/atlassian-labs/atlaspack/commit/564fb4fecc2a20bdeb951863a8fac29b618d91b7), [`9df722c`](https://github.com/atlassian-labs/atlaspack/commit/9df722c38b225054883693ba9731344f701767a7), [`34b01ec`](https://github.com/atlassian-labs/atlaspack/commit/34b01ec03e2264bd617be000465821e1ed11eae5), [`6e5fec1`](https://github.com/atlassian-labs/atlaspack/commit/6e5fec1406c53257be7e7fbe06c028beda70fcf1), [`e4e5522`](https://github.com/atlassian-labs/atlaspack/commit/e4e55222422d8c73653d3ea09f1a0d13946345b9)]:
|
|
32
|
+
- @atlaspack/rust@3.18.0
|
|
33
|
+
- @atlaspack/plugin@2.14.48
|
|
34
|
+
|
|
35
|
+
## 2.14.47
|
|
36
|
+
|
|
37
|
+
### Patch Changes
|
|
38
|
+
|
|
39
|
+
- Updated dependencies [[`7cb8569`](https://github.com/atlassian-labs/atlaspack/commit/7cb85698143e381fcb887173b2bfd15f0aea7918), [`695339e`](https://github.com/atlassian-labs/atlaspack/commit/695339e4fd46df9590013c2ef4de74cb22225927)]:
|
|
40
|
+
- @atlaspack/rust@3.17.0
|
|
41
|
+
- @atlaspack/plugin@2.14.47
|
|
42
|
+
|
|
43
|
+
## 2.14.46
|
|
44
|
+
|
|
45
|
+
### Patch Changes
|
|
46
|
+
|
|
47
|
+
- Updated dependencies [[`515149d`](https://github.com/atlassian-labs/atlaspack/commit/515149d0a0767d844af803efdc611646780ad0fe), [`02cc8b3`](https://github.com/atlassian-labs/atlaspack/commit/02cc8b32c06ca6b51806b33f6f707ca06e55e957), [`02cc8b3`](https://github.com/atlassian-labs/atlaspack/commit/02cc8b32c06ca6b51806b33f6f707ca06e55e957)]:
|
|
48
|
+
- @atlaspack/rust@3.16.0
|
|
49
|
+
- @atlaspack/plugin@2.14.46
|
|
50
|
+
|
|
51
|
+
## 2.14.45
|
|
52
|
+
|
|
53
|
+
### Patch Changes
|
|
54
|
+
|
|
55
|
+
- Updated dependencies []:
|
|
56
|
+
- @atlaspack/plugin@2.14.45
|
|
57
|
+
|
|
58
|
+
## 2.14.44
|
|
59
|
+
|
|
60
|
+
### Patch Changes
|
|
61
|
+
|
|
62
|
+
- Updated dependencies [[`362a85d`](https://github.com/atlassian-labs/atlaspack/commit/362a85deb9722f769eeb5099bae915f8b858a126), [`c81b368`](https://github.com/atlassian-labs/atlaspack/commit/c81b368db20af701d9e019a11272b138f9cfe080)]:
|
|
63
|
+
- @atlaspack/rust@3.15.0
|
|
64
|
+
- @atlaspack/plugin@2.14.44
|
|
65
|
+
|
|
66
|
+
## 2.14.43
|
|
67
|
+
|
|
68
|
+
### Patch Changes
|
|
69
|
+
|
|
70
|
+
- Updated dependencies []:
|
|
71
|
+
- @atlaspack/plugin@2.14.43
|
|
72
|
+
|
|
73
|
+
## 2.14.42
|
|
74
|
+
|
|
75
|
+
### Patch Changes
|
|
76
|
+
|
|
77
|
+
- Updated dependencies [[`787290a`](https://github.com/atlassian-labs/atlaspack/commit/787290a63b3f781e7af86097201dfdb5a36c8551), [`cbb66a5`](https://github.com/atlassian-labs/atlaspack/commit/cbb66a554f7ad679fd4dfc9e2bf2d5abb859f846), [`7815a93`](https://github.com/atlassian-labs/atlaspack/commit/7815a931b18983c3f34a39990b2f4b8b86855cc6), [`25aa273`](https://github.com/atlassian-labs/atlaspack/commit/25aa2735f4db920960de3d65d3a427775086b7d5), [`9468e16`](https://github.com/atlassian-labs/atlaspack/commit/9468e164e8ca20a5e8f552f5dc203aa3716cb154), [`e55c80c`](https://github.com/atlassian-labs/atlaspack/commit/e55c80cd0ae3cc40356fe063cb7d45fbb9095356)]:
|
|
78
|
+
- @atlaspack/rust@3.14.0
|
|
79
|
+
- @atlaspack/plugin@2.14.42
|
|
80
|
+
|
|
81
|
+
## 2.14.41
|
|
82
|
+
|
|
83
|
+
### Patch Changes
|
|
84
|
+
|
|
85
|
+
- Updated dependencies [[`96f1d7f`](https://github.com/atlassian-labs/atlaspack/commit/96f1d7f3efef12ce4f5966e34d00b299fcefb4dd), [`91738fd`](https://github.com/atlassian-labs/atlaspack/commit/91738fd77cb6b3b7acc93e799327ec283d27f7c0), [`38f3569`](https://github.com/atlassian-labs/atlaspack/commit/38f3569a7024357c43274666312bc6d024bfe5f9), [`3f6a3b8`](https://github.com/atlassian-labs/atlaspack/commit/3f6a3b8df4589fd4d65c072281c7f33bd37341d6), [`96f1d7f`](https://github.com/atlassian-labs/atlaspack/commit/96f1d7f3efef12ce4f5966e34d00b299fcefb4dd), [`d8024ce`](https://github.com/atlassian-labs/atlaspack/commit/d8024ce5c9ced1a9bc39144c979138be3a12b2fb), [`308e7ff`](https://github.com/atlassian-labs/atlaspack/commit/308e7ff979c05c1ae97fe6b08a65666b53d86cc7), [`d98c992`](https://github.com/atlassian-labs/atlaspack/commit/d98c992a56121a4f9f6a011ced5e103f96fe3999)]:
|
|
86
|
+
- @atlaspack/rust@3.13.0
|
|
87
|
+
- @atlaspack/plugin@2.14.41
|
|
88
|
+
|
|
89
|
+
## 2.14.40
|
|
90
|
+
|
|
91
|
+
### Patch Changes
|
|
92
|
+
|
|
93
|
+
- Updated dependencies [[`a884bd2`](https://github.com/atlassian-labs/atlaspack/commit/a884bd2a6bd6f37d088fb886dd9b88e85328501b), [`25fee72`](https://github.com/atlassian-labs/atlaspack/commit/25fee723d2228d0482ec8a8f1b8379ccd2977ce7), [`6fac01d`](https://github.com/atlassian-labs/atlaspack/commit/6fac01dbb1bfc5b971176c1a1c008297bf4b8f91), [`432d571`](https://github.com/atlassian-labs/atlaspack/commit/432d571ea4e9fc67be12304fcafe8c445e844174), [`042cd95`](https://github.com/atlassian-labs/atlaspack/commit/042cd95a32ad38cd02d57aa3344c36d4e7ab8f9c), [`28f5424`](https://github.com/atlassian-labs/atlaspack/commit/28f5424f7e2080dd4fbbeb1bc5314a530197a23e), [`a884bd2`](https://github.com/atlassian-labs/atlaspack/commit/a884bd2a6bd6f37d088fb886dd9b88e85328501b), [`5710532`](https://github.com/atlassian-labs/atlaspack/commit/57105322b26ce42af2cbfcc0506cff929e50b630), [`44eb8c3`](https://github.com/atlassian-labs/atlaspack/commit/44eb8c388d3e63f1ef5d835aee7aee5d1bb0620f)]:
|
|
94
|
+
- @atlaspack/rust@3.12.0
|
|
95
|
+
- @atlaspack/plugin@2.14.40
|
|
96
|
+
|
|
97
|
+
## 2.14.39
|
|
98
|
+
|
|
99
|
+
### Patch Changes
|
|
100
|
+
|
|
101
|
+
- Updated dependencies [[`7dd5bd8`](https://github.com/atlassian-labs/atlaspack/commit/7dd5bd89ff60c7b324347d772729eb4c3314f01e), [`c8a0e51`](https://github.com/atlassian-labs/atlaspack/commit/c8a0e51b1096d038a64644ad02fe68383f58682a), [`71900f3`](https://github.com/atlassian-labs/atlaspack/commit/71900f3508d53c3882ca8ea71501ba3069687d4e), [`73168c2`](https://github.com/atlassian-labs/atlaspack/commit/73168c275a5d9abff9907bcf536b340bca1ed5f0), [`2c4953e`](https://github.com/atlassian-labs/atlaspack/commit/2c4953e20dc1a6b012792081667aefeb9340505e), [`3fe7d4e`](https://github.com/atlassian-labs/atlaspack/commit/3fe7d4e821bee162fcbbaf9278b107a5eead944f)]:
|
|
102
|
+
- @atlaspack/rust@3.11.0
|
|
103
|
+
- @atlaspack/plugin@2.14.39
|
|
104
|
+
|
|
105
|
+
## 2.14.38
|
|
106
|
+
|
|
107
|
+
### Patch Changes
|
|
108
|
+
|
|
109
|
+
- Updated dependencies [[`ec3abe4`](https://github.com/atlassian-labs/atlaspack/commit/ec3abe4dffc98560a850fd2f71fb566577e6c99c), [`c7fe3f7`](https://github.com/atlassian-labs/atlaspack/commit/c7fe3f76f247e9e20299e205e2df0a16c418eaf2), [`cfb4707`](https://github.com/atlassian-labs/atlaspack/commit/cfb4707087498e4fa4dcf10753fe984a248d196b), [`1468695`](https://github.com/atlassian-labs/atlaspack/commit/1468695fc0c9d06f060a6da9e9b0e154f11dff34), [`f31b041`](https://github.com/atlassian-labs/atlaspack/commit/f31b04107e9077c9946aadb99f6f91bb69703bb7), [`8180981`](https://github.com/atlassian-labs/atlaspack/commit/8180981be14c00f9570adb70d3f350bd91d6ec0a), [`ae77e74`](https://github.com/atlassian-labs/atlaspack/commit/ae77e7452a466b43b3fa5bed24d4ba26345ed765), [`f0a496f`](https://github.com/atlassian-labs/atlaspack/commit/f0a496f70fc8652e090cf1b3f6260e8cfbb796e2), [`540f253`](https://github.com/atlassian-labs/atlaspack/commit/540f253dfdcd1a5caebbdc0b197319d439404aae)]:
|
|
110
|
+
- @atlaspack/rust@3.10.0
|
|
111
|
+
- @atlaspack/plugin@2.14.38
|
|
112
|
+
|
|
113
|
+
## 2.14.37
|
|
114
|
+
|
|
115
|
+
### Patch Changes
|
|
116
|
+
|
|
117
|
+
- Updated dependencies [[`339b600`](https://github.com/atlassian-labs/atlaspack/commit/339b60095d755742cea50f811d08ccc44a4ae521), [`373ee2d`](https://github.com/atlassian-labs/atlaspack/commit/373ee2d3b5cc315df1e90e647619f915892e2b87)]:
|
|
118
|
+
- @atlaspack/rust@3.9.1
|
|
119
|
+
- @atlaspack/plugin@2.14.37
|
|
120
|
+
|
|
121
|
+
## 2.14.36
|
|
122
|
+
|
|
123
|
+
### Patch Changes
|
|
124
|
+
|
|
125
|
+
- Updated dependencies [[`02f6aa1`](https://github.com/atlassian-labs/atlaspack/commit/02f6aa1906953fc184d2b49c905c2ef815cb878d), [`58527ee`](https://github.com/atlassian-labs/atlaspack/commit/58527eec15c1aebaaadbeb63586f3082c16beae3), [`525898e`](https://github.com/atlassian-labs/atlaspack/commit/525898e33cc229a4bc938ae853732be36d20c01a), [`cfb39a0`](https://github.com/atlassian-labs/atlaspack/commit/cfb39a0d729eb620cf2ca1611750a2bf7a080d08), [`d0c7bea`](https://github.com/atlassian-labs/atlaspack/commit/d0c7bea04458255b4c5d4299600e734b5f919fe1), [`1086c6a`](https://github.com/atlassian-labs/atlaspack/commit/1086c6a2c59271b63b3fb78e6acdb9d3a0dbf354), [`9cd9521`](https://github.com/atlassian-labs/atlaspack/commit/9cd9521978f783046e2ae4ce78f2de7aeb07d073)]:
|
|
126
|
+
- @atlaspack/rust@3.9.0
|
|
127
|
+
- @atlaspack/plugin@2.14.36
|
|
128
|
+
|
|
129
|
+
## 2.14.35
|
|
130
|
+
|
|
131
|
+
### Patch Changes
|
|
132
|
+
|
|
133
|
+
- Updated dependencies [[`79a7e22`](https://github.com/atlassian-labs/atlaspack/commit/79a7e22ef119891a2f4180a9d3cc66b38dd52092), [`17dfea9`](https://github.com/atlassian-labs/atlaspack/commit/17dfea9e9f3169807808520df9c09ebf70dc8b10), [`27fd73f`](https://github.com/atlassian-labs/atlaspack/commit/27fd73fa07d358653f1be6f2d15d72dc5d8fc2fd), [`3091fa3`](https://github.com/atlassian-labs/atlaspack/commit/3091fa36425ecffe3938e55247a035b08cda37a2)]:
|
|
134
|
+
- @atlaspack/rust@3.8.3
|
|
135
|
+
- @atlaspack/plugin@2.14.35
|
|
136
|
+
|
|
137
|
+
## 2.14.34
|
|
138
|
+
|
|
139
|
+
### Patch Changes
|
|
140
|
+
|
|
141
|
+
- Updated dependencies []:
|
|
142
|
+
- @atlaspack/plugin@2.14.34
|
|
143
|
+
|
|
144
|
+
## 2.14.33
|
|
145
|
+
|
|
146
|
+
### Patch Changes
|
|
147
|
+
|
|
148
|
+
- Updated dependencies []:
|
|
149
|
+
- @atlaspack/plugin@2.14.33
|
|
150
|
+
|
|
151
|
+
## 2.14.32
|
|
152
|
+
|
|
153
|
+
### Patch Changes
|
|
154
|
+
|
|
155
|
+
- Updated dependencies [[`0207171`](https://github.com/atlassian-labs/atlaspack/commit/0207171e59e985c51e105aec2e0a99de174374bd), [`bbe4e28`](https://github.com/atlassian-labs/atlaspack/commit/bbe4e28c89e5e9284bd730075d4d6f2a3cb37b21)]:
|
|
156
|
+
- @atlaspack/rust@3.8.2
|
|
157
|
+
- @atlaspack/plugin@2.14.32
|
|
158
|
+
|
|
159
|
+
## 2.14.31
|
|
160
|
+
|
|
161
|
+
### Patch Changes
|
|
162
|
+
|
|
163
|
+
- [#785](https://github.com/atlassian-labs/atlaspack/pull/785) [`0e7dd5e`](https://github.com/atlassian-labs/atlaspack/commit/0e7dd5ec6fbe05aa9e0bb5775a9d0975f206a922) Thanks [@matt-koko](https://github.com/matt-koko)! - We need to re-publish every package in Atlaspack with the corrected types field.
|
|
164
|
+
|
|
165
|
+
- Updated dependencies [[`0e7dd5e`](https://github.com/atlassian-labs/atlaspack/commit/0e7dd5ec6fbe05aa9e0bb5775a9d0975f206a922), [`686a398`](https://github.com/atlassian-labs/atlaspack/commit/686a398faa1f9e19cbf9274add2c46e246bafba8)]:
|
|
166
|
+
- @atlaspack/diagnostic@2.14.4
|
|
167
|
+
- @atlaspack/plugin@2.14.31
|
|
168
|
+
- @atlaspack/rust@3.8.1
|
|
169
|
+
|
|
170
|
+
## 2.14.30
|
|
171
|
+
|
|
172
|
+
### Patch Changes
|
|
173
|
+
|
|
174
|
+
- Updated dependencies [[`eedcbc4`](https://github.com/atlassian-labs/atlaspack/commit/eedcbc408fc1e86a2a8e25f1a41c57146d8529e1), [`5a0363f`](https://github.com/atlassian-labs/atlaspack/commit/5a0363f1086e81068959b87e92064bed5a11a9b4), [`038e87a`](https://github.com/atlassian-labs/atlaspack/commit/038e87a7858d39556d59d3a2d17db534d45f62c6), [`f6532d7`](https://github.com/atlassian-labs/atlaspack/commit/f6532d7a4f7f007bd4e5e36af04dd466f0b9f572), [`0684997`](https://github.com/atlassian-labs/atlaspack/commit/0684997c127a6204af1376b36e556fddd1ba5557), [`602f8ed`](https://github.com/atlassian-labs/atlaspack/commit/602f8ed9d8381301df8b2cc82c1d5cf6f2f94fec)]:
|
|
175
|
+
- @atlaspack/rust@3.8.0
|
|
176
|
+
- @atlaspack/plugin@2.14.30
|
|
177
|
+
|
|
178
|
+
## 2.14.29
|
|
179
|
+
|
|
180
|
+
### Patch Changes
|
|
181
|
+
|
|
182
|
+
- Updated dependencies [[`53dd47b`](https://github.com/atlassian-labs/atlaspack/commit/53dd47bd6d23cd47f87297347f03a609ab38a03d)]:
|
|
183
|
+
- @atlaspack/rust@3.7.0
|
|
184
|
+
- @atlaspack/plugin@2.14.29
|
|
185
|
+
|
|
186
|
+
## 2.14.28
|
|
187
|
+
|
|
188
|
+
### Patch Changes
|
|
189
|
+
|
|
190
|
+
- Updated dependencies []:
|
|
191
|
+
- @atlaspack/plugin@2.14.28
|
|
192
|
+
|
|
193
|
+
## 2.14.27
|
|
194
|
+
|
|
195
|
+
### Patch Changes
|
|
196
|
+
|
|
197
|
+
- Updated dependencies [[`3cfb7cf`](https://github.com/atlassian-labs/atlaspack/commit/3cfb7cfd90b78a5c48ce717e779ff789769825a3)]:
|
|
198
|
+
- @atlaspack/rust@3.6.2
|
|
199
|
+
- @atlaspack/plugin@2.14.27
|
|
200
|
+
|
|
201
|
+
## 2.14.26
|
|
202
|
+
|
|
203
|
+
### Patch Changes
|
|
204
|
+
|
|
205
|
+
- [#742](https://github.com/atlassian-labs/atlaspack/pull/742) [`ee040bb`](https://github.com/atlassian-labs/atlaspack/commit/ee040bb6428f29b57d892ddd8107e29077d08ffd) Thanks [@yamadapc](https://github.com/yamadapc)! - Internal changes and bug fixes to environmentDeduplication flag
|
|
206
|
+
|
|
207
|
+
- Updated dependencies [[`ee040bb`](https://github.com/atlassian-labs/atlaspack/commit/ee040bb6428f29b57d892ddd8107e29077d08ffd)]:
|
|
208
|
+
- @atlaspack/diagnostic@2.14.3
|
|
209
|
+
- @atlaspack/plugin@2.14.26
|
|
210
|
+
- @atlaspack/rust@3.6.1
|
|
211
|
+
|
|
212
|
+
## 2.14.25
|
|
213
|
+
|
|
214
|
+
### Patch Changes
|
|
215
|
+
|
|
216
|
+
- Updated dependencies []:
|
|
217
|
+
- @atlaspack/plugin@2.14.25
|
|
218
|
+
|
|
219
|
+
## 2.14.24
|
|
220
|
+
|
|
221
|
+
### Patch Changes
|
|
222
|
+
|
|
223
|
+
- Updated dependencies [[`ad26146`](https://github.com/atlassian-labs/atlaspack/commit/ad26146f13b4c1cc65d4a0f9c67060b90ef14ff3), [`f1b48e7`](https://github.com/atlassian-labs/atlaspack/commit/f1b48e7a04e005cef0f36a3e692087a9ecdb6f7a), [`7f5841c`](https://github.com/atlassian-labs/atlaspack/commit/7f5841c39df049f9546cccbeea2a7337e0337b45)]:
|
|
224
|
+
- @atlaspack/rust@3.6.0
|
|
225
|
+
- @atlaspack/plugin@2.14.24
|
|
226
|
+
|
|
227
|
+
## 2.14.23
|
|
228
|
+
|
|
229
|
+
### Patch Changes
|
|
230
|
+
|
|
231
|
+
- Updated dependencies [[`23d561e`](https://github.com/atlassian-labs/atlaspack/commit/23d561e51e68b0c38fd1ff4e4fb173e5e7b01cf2)]:
|
|
232
|
+
- @atlaspack/rust@3.5.0
|
|
233
|
+
- @atlaspack/plugin@2.14.23
|
|
234
|
+
|
|
235
|
+
## 2.14.22
|
|
236
|
+
|
|
237
|
+
### Patch Changes
|
|
238
|
+
|
|
239
|
+
- [#720](https://github.com/atlassian-labs/atlaspack/pull/720) [`d2fd849`](https://github.com/atlassian-labs/atlaspack/commit/d2fd849770fe6305e9c694bd97b1bd905abd9d94) Thanks [@alshdavid](https://github.com/alshdavid)! - Migrate to TypeScript
|
|
240
|
+
|
|
241
|
+
- Updated dependencies [[`d2fd849`](https://github.com/atlassian-labs/atlaspack/commit/d2fd849770fe6305e9c694bd97b1bd905abd9d94)]:
|
|
242
|
+
- @atlaspack/diagnostic@2.14.2
|
|
243
|
+
- @atlaspack/plugin@2.14.22
|
|
244
|
+
- @atlaspack/rust@3.4.2
|
|
245
|
+
|
|
246
|
+
## 2.14.21
|
|
247
|
+
|
|
248
|
+
### Patch Changes
|
|
249
|
+
|
|
250
|
+
- Updated dependencies []:
|
|
251
|
+
- @atlaspack/plugin@2.14.21
|
|
252
|
+
|
|
253
|
+
## 2.14.20
|
|
254
|
+
|
|
255
|
+
### Patch Changes
|
|
256
|
+
|
|
257
|
+
- [#702](https://github.com/atlassian-labs/atlaspack/pull/702) [`daaa768`](https://github.com/atlassian-labs/atlaspack/commit/daaa7688786772d7e3713b71c5bba6b89ec704aa) Thanks [@alshdavid](https://github.com/alshdavid)! - Fixes to Flow types
|
|
258
|
+
|
|
259
|
+
- Updated dependencies [[`daaa768`](https://github.com/atlassian-labs/atlaspack/commit/daaa7688786772d7e3713b71c5bba6b89ec704aa)]:
|
|
260
|
+
- @atlaspack/plugin@2.14.20
|
|
261
|
+
|
|
262
|
+
## 2.14.19
|
|
263
|
+
|
|
264
|
+
### Patch Changes
|
|
265
|
+
|
|
266
|
+
- Updated dependencies []:
|
|
267
|
+
- @atlaspack/plugin@2.14.19
|
|
268
|
+
|
|
269
|
+
## 2.14.18
|
|
270
|
+
|
|
271
|
+
### Patch Changes
|
|
272
|
+
|
|
273
|
+
- Updated dependencies [[`becf977`](https://github.com/atlassian-labs/atlaspack/commit/becf977f625d5ee46dae3d4c679f173bf5f40cc0), [`f0f7c71`](https://github.com/atlassian-labs/atlaspack/commit/f0f7c7168a1d3d18c6f30d2daed611275692b7c5)]:
|
|
274
|
+
- @atlaspack/rust@3.4.1
|
|
275
|
+
- @atlaspack/plugin@2.14.18
|
|
276
|
+
|
|
277
|
+
## 2.14.17
|
|
278
|
+
|
|
279
|
+
### Patch Changes
|
|
280
|
+
|
|
281
|
+
- Updated dependencies [[`c75bf55`](https://github.com/atlassian-labs/atlaspack/commit/c75bf553fff4decc285b5fd499a275853b18f8f2)]:
|
|
282
|
+
- @atlaspack/rust@3.4.0
|
|
283
|
+
- @atlaspack/plugin@2.14.17
|
|
284
|
+
|
|
285
|
+
## 2.14.16
|
|
286
|
+
|
|
287
|
+
### Patch Changes
|
|
288
|
+
|
|
289
|
+
- Updated dependencies []:
|
|
290
|
+
- @atlaspack/plugin@2.14.16
|
|
291
|
+
|
|
292
|
+
## 2.14.15
|
|
293
|
+
|
|
294
|
+
### Patch Changes
|
|
295
|
+
|
|
296
|
+
- Updated dependencies []:
|
|
297
|
+
- @atlaspack/plugin@2.14.15
|
|
298
|
+
|
|
299
|
+
## 2.14.14
|
|
300
|
+
|
|
301
|
+
### Patch Changes
|
|
302
|
+
|
|
303
|
+
- Updated dependencies []:
|
|
304
|
+
- @atlaspack/plugin@2.14.14
|
|
305
|
+
|
|
306
|
+
## 2.14.13
|
|
307
|
+
|
|
308
|
+
### Patch Changes
|
|
309
|
+
|
|
310
|
+
- Updated dependencies []:
|
|
311
|
+
- @atlaspack/plugin@2.14.13
|
|
312
|
+
|
|
313
|
+
## 2.14.12
|
|
314
|
+
|
|
315
|
+
### Patch Changes
|
|
316
|
+
|
|
317
|
+
- Updated dependencies []:
|
|
318
|
+
- @atlaspack/plugin@2.14.12
|
|
319
|
+
|
|
320
|
+
## 2.14.11
|
|
321
|
+
|
|
322
|
+
### Patch Changes
|
|
323
|
+
|
|
324
|
+
- Updated dependencies []:
|
|
325
|
+
- @atlaspack/plugin@2.14.11
|
|
326
|
+
|
|
327
|
+
## 2.14.10
|
|
328
|
+
|
|
329
|
+
### Patch Changes
|
|
330
|
+
|
|
331
|
+
- Updated dependencies [[`35fdd4b`](https://github.com/atlassian-labs/atlaspack/commit/35fdd4b52da0af20f74667f7b8adfb2f90279b7c), [`6dd4ccb`](https://github.com/atlassian-labs/atlaspack/commit/6dd4ccb753541de32322d881f973d571dd57e4ca)]:
|
|
332
|
+
- @atlaspack/rust@3.3.5
|
|
333
|
+
- @atlaspack/plugin@2.14.10
|
|
334
|
+
|
|
335
|
+
## 2.14.9
|
|
336
|
+
|
|
337
|
+
### Patch Changes
|
|
338
|
+
|
|
339
|
+
- Updated dependencies [[`124b7ff`](https://github.com/atlassian-labs/atlaspack/commit/124b7fff44f71aac9fbad289a9a9509b3dfc9aaa), [`e052521`](https://github.com/atlassian-labs/atlaspack/commit/e0525210850ed1606146eb86991049cf567c5dec), [`15c6d70`](https://github.com/atlassian-labs/atlaspack/commit/15c6d7000bd89da876bc590aa75b17a619a41896), [`e4d966c`](https://github.com/atlassian-labs/atlaspack/commit/e4d966c3c9c4292c5013372ae65b10d19d4bacc6), [`42a775d`](https://github.com/atlassian-labs/atlaspack/commit/42a775de8eec638ad188f3271964170d8c04d84b), [`29c2f10`](https://github.com/atlassian-labs/atlaspack/commit/29c2f106de9679adfb5afa04e1910471dc65a427), [`1ef91fc`](https://github.com/atlassian-labs/atlaspack/commit/1ef91fcc863fdd2831511937083dbbc1263b3d9d)]:
|
|
340
|
+
- @atlaspack/rust@3.3.4
|
|
341
|
+
- @atlaspack/plugin@2.14.9
|
|
342
|
+
|
|
3
343
|
## 2.14.8
|
|
4
344
|
|
|
5
345
|
### Patch Changes
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const plugin_1 = require("@atlaspack/plugin");
|
|
7
|
+
const nullthrows_1 = __importDefault(require("nullthrows"));
|
|
8
|
+
const semver_1 = __importDefault(require("semver"));
|
|
9
|
+
const posthtml_parser_1 = require("posthtml-parser");
|
|
10
|
+
const posthtml_render_1 = require("posthtml-render");
|
|
11
|
+
const dependencies_1 = __importDefault(require("./dependencies"));
|
|
12
|
+
const inline_1 = __importDefault(require("./inline"));
|
|
13
|
+
const diagnostic_1 = __importDefault(require("@atlaspack/diagnostic"));
|
|
14
|
+
exports.default = new plugin_1.Transformer({
|
|
15
|
+
canReuseAST({ ast }) {
|
|
16
|
+
return ast.type === 'posthtml' && semver_1.default.satisfies(ast.version, '^0.4.0');
|
|
17
|
+
},
|
|
18
|
+
async parse({ asset }) {
|
|
19
|
+
return {
|
|
20
|
+
type: 'posthtml',
|
|
21
|
+
version: '0.4.1',
|
|
22
|
+
program: (0, posthtml_parser_1.parser)(await asset.getCode(), {
|
|
23
|
+
directives: [
|
|
24
|
+
{
|
|
25
|
+
name: /^\?/,
|
|
26
|
+
start: '<',
|
|
27
|
+
end: '>',
|
|
28
|
+
},
|
|
29
|
+
],
|
|
30
|
+
sourceLocations: true,
|
|
31
|
+
xmlMode: true,
|
|
32
|
+
}),
|
|
33
|
+
};
|
|
34
|
+
},
|
|
35
|
+
async transform({ asset }) {
|
|
36
|
+
asset.bundleBehavior = 'isolated';
|
|
37
|
+
const ast = (0, nullthrows_1.default)(await asset.getAST());
|
|
38
|
+
try {
|
|
39
|
+
(0, dependencies_1.default)(asset, ast);
|
|
40
|
+
}
|
|
41
|
+
catch (errors) {
|
|
42
|
+
throw new diagnostic_1.default({
|
|
43
|
+
// @ts-expect-error TS7006
|
|
44
|
+
diagnostic: errors.map((error) => ({
|
|
45
|
+
message: error.message,
|
|
46
|
+
origin: '@atlaspack/transformer-svg',
|
|
47
|
+
codeFrames: [
|
|
48
|
+
{
|
|
49
|
+
filePath: error.filePath,
|
|
50
|
+
language: 'svg',
|
|
51
|
+
codeHighlights: [error.loc],
|
|
52
|
+
},
|
|
53
|
+
],
|
|
54
|
+
})),
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
const inlineAssets = (0, inline_1.default)(asset, ast);
|
|
58
|
+
return [asset, ...inlineAssets];
|
|
59
|
+
},
|
|
60
|
+
generate({ ast }) {
|
|
61
|
+
return {
|
|
62
|
+
content: (0, posthtml_render_1.render)(ast.program),
|
|
63
|
+
};
|
|
64
|
+
},
|
|
65
|
+
});
|
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.parseFuncIRI = parseFuncIRI;
|
|
7
|
+
exports.default = collectDependencies;
|
|
8
|
+
const posthtml_1 = __importDefault(require("posthtml"));
|
|
9
|
+
// A list of all attributes that may produce a dependency
|
|
10
|
+
// Based on https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute
|
|
11
|
+
// See also https://www.w3.org/TR/SVG/attindex.html and https://www.w3.org/TR/SVG11/attindex.html
|
|
12
|
+
// SVG animation elements are excluded because they may only reference elements in the same document: https://www.w3.org/TR/SVG/linking.html#processingURL-fetch
|
|
13
|
+
const HREF_ATTRS = [
|
|
14
|
+
'a',
|
|
15
|
+
'use',
|
|
16
|
+
'feImage',
|
|
17
|
+
'image',
|
|
18
|
+
'linearGradient',
|
|
19
|
+
'radialGradient',
|
|
20
|
+
'pattern',
|
|
21
|
+
'mpath',
|
|
22
|
+
'textPath',
|
|
23
|
+
'script',
|
|
24
|
+
];
|
|
25
|
+
const ATTRS = {
|
|
26
|
+
href: HREF_ATTRS,
|
|
27
|
+
'xlink:href': [
|
|
28
|
+
...HREF_ATTRS,
|
|
29
|
+
'altGlyph',
|
|
30
|
+
'cursor',
|
|
31
|
+
'filter',
|
|
32
|
+
'font-face-uri',
|
|
33
|
+
'glyphRef',
|
|
34
|
+
'tref',
|
|
35
|
+
'color-profile',
|
|
36
|
+
],
|
|
37
|
+
};
|
|
38
|
+
// Attributes that allow url() to reference another element, either in the same document or a different one.
|
|
39
|
+
// https://www.w3.org/TR/SVG11/linking.html#processingIRI
|
|
40
|
+
const FUNC_IRI_ATTRS = new Set([
|
|
41
|
+
'fill',
|
|
42
|
+
'stroke',
|
|
43
|
+
'clip-path',
|
|
44
|
+
'color-profile',
|
|
45
|
+
'cursor',
|
|
46
|
+
'filter',
|
|
47
|
+
'marker',
|
|
48
|
+
'marker-start',
|
|
49
|
+
'marker-mid',
|
|
50
|
+
'marker-end',
|
|
51
|
+
'mask',
|
|
52
|
+
// SVG2 - https://www.w3.org/TR/SVG/linking.html#processingURL-validity
|
|
53
|
+
'shape-inside',
|
|
54
|
+
'shape-subtract',
|
|
55
|
+
'mask-image',
|
|
56
|
+
]);
|
|
57
|
+
// https://www.w3.org/TR/css3-values/#urls
|
|
58
|
+
const FUNC_IRI_RE = /^url\((?:((['"])(.*?)\2(\s+.*)?)|((?:\\[\s'"]|[^\s'"])+))\)$/;
|
|
59
|
+
const ESCAPE_RE = /\\(.|\n|\r|\u2028|\u2029)/;
|
|
60
|
+
function parseFuncIRI(value) {
|
|
61
|
+
let m = value.match(FUNC_IRI_RE);
|
|
62
|
+
if (m) {
|
|
63
|
+
let url = (m[3] || m[5]).replace(ESCAPE_RE, '$1');
|
|
64
|
+
let modifier = m[4] ?? '';
|
|
65
|
+
return [url, modifier];
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
// Options to be passed to `addDependency` for certain tags + attributes
|
|
69
|
+
const OPTIONS = {
|
|
70
|
+
a: {
|
|
71
|
+
href: { needsStableName: true },
|
|
72
|
+
'xlink:href': { needsStableName: true },
|
|
73
|
+
},
|
|
74
|
+
};
|
|
75
|
+
function collectDependencies(asset, ast) {
|
|
76
|
+
let isDirty = false;
|
|
77
|
+
// @ts-expect-error TS7034
|
|
78
|
+
const errors = [];
|
|
79
|
+
// @ts-expect-error TS2339
|
|
80
|
+
(0, posthtml_1.default)().walk.call(ast.program, (node) => {
|
|
81
|
+
// Ideally we'd have location information for specific attributes...
|
|
82
|
+
let getLoc = () => node.location
|
|
83
|
+
? {
|
|
84
|
+
filePath: asset.filePath,
|
|
85
|
+
start: node.location.start,
|
|
86
|
+
end: node.location.end,
|
|
87
|
+
}
|
|
88
|
+
: undefined;
|
|
89
|
+
if (typeof node === 'string' && node.startsWith('<?xml-stylesheet')) {
|
|
90
|
+
return node.replace(/(?<=(?:^|\s)href\s*=\s*")(.+?)(?=")/i, (href) => {
|
|
91
|
+
isDirty = true;
|
|
92
|
+
return asset.addURLDependency(href, { priority: 'parallel' });
|
|
93
|
+
});
|
|
94
|
+
}
|
|
95
|
+
const { tag, attrs } = node;
|
|
96
|
+
if (!attrs) {
|
|
97
|
+
return node;
|
|
98
|
+
}
|
|
99
|
+
for (const attr in attrs) {
|
|
100
|
+
// Check for id references
|
|
101
|
+
if (attrs[attr][0] === '#') {
|
|
102
|
+
continue;
|
|
103
|
+
}
|
|
104
|
+
// @ts-expect-error TS7053
|
|
105
|
+
const elements = ATTRS[attr];
|
|
106
|
+
if (elements && elements.includes(node.tag)) {
|
|
107
|
+
// Check for empty string
|
|
108
|
+
if (attrs[attr].length === 0) {
|
|
109
|
+
errors.push({
|
|
110
|
+
message: `'${attr}' should not be empty string`,
|
|
111
|
+
filePath: asset.filePath,
|
|
112
|
+
loc: node.location,
|
|
113
|
+
});
|
|
114
|
+
}
|
|
115
|
+
// @ts-expect-error TS7053
|
|
116
|
+
let options = OPTIONS[tag]?.[attr];
|
|
117
|
+
if (node.tag === 'script') {
|
|
118
|
+
options = {
|
|
119
|
+
priority: 'parallel',
|
|
120
|
+
env: {
|
|
121
|
+
sourceType: attrs.type === 'module' ? 'module' : 'script',
|
|
122
|
+
// SVG script elements do not support type="module" natively yet.
|
|
123
|
+
outputFormat: 'global',
|
|
124
|
+
loc: getLoc(),
|
|
125
|
+
},
|
|
126
|
+
};
|
|
127
|
+
delete attrs.type;
|
|
128
|
+
}
|
|
129
|
+
attrs[attr] = asset.addURLDependency(attrs[attr], {
|
|
130
|
+
...options,
|
|
131
|
+
loc: getLoc(),
|
|
132
|
+
});
|
|
133
|
+
isDirty = true;
|
|
134
|
+
}
|
|
135
|
+
if (FUNC_IRI_ATTRS.has(attr)) {
|
|
136
|
+
let parsed = parseFuncIRI(attrs[attr]);
|
|
137
|
+
if (parsed) {
|
|
138
|
+
let depId = asset.addURLDependency(parsed[0], {
|
|
139
|
+
loc: getLoc(),
|
|
140
|
+
});
|
|
141
|
+
attrs[attr] = `url('${depId}'${parsed[1]})`;
|
|
142
|
+
isDirty = true;
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
return node;
|
|
147
|
+
});
|
|
148
|
+
if (errors.length > 0) {
|
|
149
|
+
// @ts-expect-error TS7005
|
|
150
|
+
throw errors;
|
|
151
|
+
}
|
|
152
|
+
if (isDirty) {
|
|
153
|
+
asset.setAST(ast);
|
|
154
|
+
}
|
|
155
|
+
}
|