@digitalsamba/assets 2.0.0-canary.04d7155d2b9d

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 (234) hide show
  1. package/CHANGELOG.md +132 -0
  2. package/LICENSE +190 -0
  3. package/README.md +5 -0
  4. package/embed-icons/codepen.png +0 -0
  5. package/embed-icons/codesandbox.png +0 -0
  6. package/embed-icons/excalidraw.png +0 -0
  7. package/embed-icons/felt.png +0 -0
  8. package/embed-icons/figma.png +0 -0
  9. package/embed-icons/github_gist.png +0 -0
  10. package/embed-icons/google_calendar.png +0 -0
  11. package/embed-icons/google_maps.png +0 -0
  12. package/embed-icons/google_slides.png +0 -0
  13. package/embed-icons/observable.png +0 -0
  14. package/embed-icons/replit.png +0 -0
  15. package/embed-icons/scratch.png +0 -0
  16. package/embed-icons/spotify.png +0 -0
  17. package/embed-icons/tldraw.png +0 -0
  18. package/embed-icons/val_town.png +0 -0
  19. package/embed-icons/vimeo.png +0 -0
  20. package/embed-icons/youtube.png +0 -0
  21. package/fonts/IBMPlexMono-Medium.woff2 +0 -0
  22. package/fonts/IBMPlexSans-Medium.woff2 +0 -0
  23. package/fonts/IBMPlexSerif-Medium.woff2 +0 -0
  24. package/fonts/Shantell_Sans-Normal-SemiBold.woff2 +0 -0
  25. package/icons/icon/align-bottom-center.svg +1 -0
  26. package/icons/icon/align-bottom-left.svg +1 -0
  27. package/icons/icon/align-bottom-right.svg +1 -0
  28. package/icons/icon/align-bottom.svg +1 -0
  29. package/icons/icon/align-center-center.svg +1 -0
  30. package/icons/icon/align-center-horizontal.svg +1 -0
  31. package/icons/icon/align-center-left.svg +1 -0
  32. package/icons/icon/align-center-right.svg +1 -0
  33. package/icons/icon/align-center-vertical.svg +1 -0
  34. package/icons/icon/align-left.svg +1 -0
  35. package/icons/icon/align-right.svg +1 -0
  36. package/icons/icon/align-top-center.svg +1 -0
  37. package/icons/icon/align-top-left.svg +1 -0
  38. package/icons/icon/align-top-right.svg +1 -0
  39. package/icons/icon/align-top.svg +1 -0
  40. package/icons/icon/arrow-left.svg +1 -0
  41. package/icons/icon/arrowhead-arrow.svg +1 -0
  42. package/icons/icon/arrowhead-bar.svg +1 -0
  43. package/icons/icon/arrowhead-diamond.svg +1 -0
  44. package/icons/icon/arrowhead-dot.svg +1 -0
  45. package/icons/icon/arrowhead-none.svg +1 -0
  46. package/icons/icon/arrowhead-square.svg +1 -0
  47. package/icons/icon/arrowhead-triangle-inverted.svg +1 -0
  48. package/icons/icon/arrowhead-triangle.svg +1 -0
  49. package/icons/icon/aspect-ratio.svg +1 -0
  50. package/icons/icon/avatar.svg +1 -0
  51. package/icons/icon/blob.svg +1 -0
  52. package/icons/icon/bring-forward.svg +1 -0
  53. package/icons/icon/bring-to-front.svg +1 -0
  54. package/icons/icon/check.svg +1 -0
  55. package/icons/icon/checkbox-checked.svg +1 -0
  56. package/icons/icon/checkbox-empty.svg +1 -0
  57. package/icons/icon/chevron-down.svg +1 -0
  58. package/icons/icon/chevron-left.svg +1 -0
  59. package/icons/icon/chevron-right.svg +1 -0
  60. package/icons/icon/chevron-up.svg +1 -0
  61. package/icons/icon/chevrons-ne.svg +1 -0
  62. package/icons/icon/chevrons-sw.svg +1 -0
  63. package/icons/icon/clipboard-copied.svg +1 -0
  64. package/icons/icon/clipboard-copy.svg +1 -0
  65. package/icons/icon/code.svg +1 -0
  66. package/icons/icon/collab.svg +1 -0
  67. package/icons/icon/color.svg +1 -0
  68. package/icons/icon/comment.svg +1 -0
  69. package/icons/icon/cross-2.svg +1 -0
  70. package/icons/icon/cross.svg +1 -0
  71. package/icons/icon/dash-dashed.svg +1 -0
  72. package/icons/icon/dash-dotted.svg +1 -0
  73. package/icons/icon/dash-draw.svg +1 -0
  74. package/icons/icon/dash-solid.svg +1 -0
  75. package/icons/icon/discord.svg +1 -0
  76. package/icons/icon/distribute-horizontal.svg +1 -0
  77. package/icons/icon/distribute-vertical.svg +1 -0
  78. package/icons/icon/dot.svg +1 -0
  79. package/icons/icon/dots-horizontal.svg +1 -0
  80. package/icons/icon/dots-vertical.svg +1 -0
  81. package/icons/icon/drag-handle-dots.svg +1 -0
  82. package/icons/icon/duplicate.svg +1 -0
  83. package/icons/icon/edit.svg +1 -0
  84. package/icons/icon/external-link.svg +1 -0
  85. package/icons/icon/file.svg +1 -0
  86. package/icons/icon/fill-none.svg +1 -0
  87. package/icons/icon/fill-pattern.svg +1 -0
  88. package/icons/icon/fill-semi.svg +1 -0
  89. package/icons/icon/fill-solid.svg +1 -0
  90. package/icons/icon/follow.svg +1 -0
  91. package/icons/icon/following.svg +1 -0
  92. package/icons/icon/font-draw.svg +1 -0
  93. package/icons/icon/font-mono.svg +1 -0
  94. package/icons/icon/font-sans.svg +1 -0
  95. package/icons/icon/font-serif.svg +1 -0
  96. package/icons/icon/geo-arrow-down.svg +1 -0
  97. package/icons/icon/geo-arrow-left.svg +1 -0
  98. package/icons/icon/geo-arrow-right.svg +1 -0
  99. package/icons/icon/geo-arrow-up.svg +1 -0
  100. package/icons/icon/geo-check-box.svg +1 -0
  101. package/icons/icon/geo-cloud.svg +1 -0
  102. package/icons/icon/geo-diamond.svg +1 -0
  103. package/icons/icon/geo-ellipse.svg +1 -0
  104. package/icons/icon/geo-hexagon.svg +1 -0
  105. package/icons/icon/geo-octagon.svg +1 -0
  106. package/icons/icon/geo-oval.svg +1 -0
  107. package/icons/icon/geo-pentagon.svg +1 -0
  108. package/icons/icon/geo-rectangle.svg +1 -0
  109. package/icons/icon/geo-rhombus-2.svg +1 -0
  110. package/icons/icon/geo-rhombus.svg +1 -0
  111. package/icons/icon/geo-star.svg +1 -0
  112. package/icons/icon/geo-trapezoid.svg +1 -0
  113. package/icons/icon/geo-triangle.svg +1 -0
  114. package/icons/icon/geo-x-box.svg +1 -0
  115. package/icons/icon/github.svg +1 -0
  116. package/icons/icon/group.svg +1 -0
  117. package/icons/icon/hidden.svg +1 -0
  118. package/icons/icon/icon-names.json +166 -0
  119. package/icons/icon/image.svg +1 -0
  120. package/icons/icon/info-circle.svg +1 -0
  121. package/icons/icon/leading.svg +1 -0
  122. package/icons/icon/link.svg +1 -0
  123. package/icons/icon/lock-small.svg +1 -0
  124. package/icons/icon/lock.svg +1 -0
  125. package/icons/icon/menu.svg +1 -0
  126. package/icons/icon/minus.svg +1 -0
  127. package/icons/icon/mixed.svg +1 -0
  128. package/icons/icon/pack.svg +1 -0
  129. package/icons/icon/page.svg +1 -0
  130. package/icons/icon/plus.svg +1 -0
  131. package/icons/icon/question-mark-circle.svg +1 -0
  132. package/icons/icon/question-mark.svg +1 -0
  133. package/icons/icon/redo.svg +1 -0
  134. package/icons/icon/reset-zoom.svg +1 -0
  135. package/icons/icon/rotate-ccw.svg +1 -0
  136. package/icons/icon/rotate-cw.svg +1 -0
  137. package/icons/icon/ruler.svg +1 -0
  138. package/icons/icon/search.svg +1 -0
  139. package/icons/icon/send-backward.svg +1 -0
  140. package/icons/icon/send-to-back.svg +1 -0
  141. package/icons/icon/settings-horizontal.svg +1 -0
  142. package/icons/icon/settings-vertical-1.svg +1 -0
  143. package/icons/icon/settings-vertical.svg +1 -0
  144. package/icons/icon/share-1.svg +1 -0
  145. package/icons/icon/share-2.svg +1 -0
  146. package/icons/icon/size-extra-large.svg +1 -0
  147. package/icons/icon/size-large.svg +1 -0
  148. package/icons/icon/size-medium.svg +1 -0
  149. package/icons/icon/size-small.svg +1 -0
  150. package/icons/icon/spline-cubic.svg +1 -0
  151. package/icons/icon/spline-line.svg +1 -0
  152. package/icons/icon/stack-horizontal.svg +1 -0
  153. package/icons/icon/stack-vertical.svg +1 -0
  154. package/icons/icon/status-offline.svg +1 -0
  155. package/icons/icon/status-online.svg +1 -0
  156. package/icons/icon/stretch-horizontal.svg +1 -0
  157. package/icons/icon/stretch-vertical.svg +1 -0
  158. package/icons/icon/text-align-center.svg +1 -0
  159. package/icons/icon/text-align-justify.svg +1 -0
  160. package/icons/icon/text-align-left.svg +1 -0
  161. package/icons/icon/text-align-right.svg +1 -0
  162. package/icons/icon/tool-arrow.svg +1 -0
  163. package/icons/icon/tool-embed.svg +1 -0
  164. package/icons/icon/tool-eraser.svg +1 -0
  165. package/icons/icon/tool-frame.svg +1 -0
  166. package/icons/icon/tool-hand.svg +1 -0
  167. package/icons/icon/tool-highlight.svg +1 -0
  168. package/icons/icon/tool-laser.svg +1 -0
  169. package/icons/icon/tool-line.svg +1 -0
  170. package/icons/icon/tool-media.svg +1 -0
  171. package/icons/icon/tool-note.svg +1 -0
  172. package/icons/icon/tool-pencil.svg +1 -0
  173. package/icons/icon/tool-pointer.svg +1 -0
  174. package/icons/icon/tool-text.svg +1 -0
  175. package/icons/icon/trash.svg +1 -0
  176. package/icons/icon/triangle-down.svg +1 -0
  177. package/icons/icon/triangle-up.svg +1 -0
  178. package/icons/icon/twitter.svg +1 -0
  179. package/icons/icon/undo.svg +1 -0
  180. package/icons/icon/ungroup.svg +1 -0
  181. package/icons/icon/unlock-small.svg +1 -0
  182. package/icons/icon/unlock.svg +1 -0
  183. package/icons/icon/vertical-align-center.svg +1 -0
  184. package/icons/icon/vertical-align-end.svg +1 -0
  185. package/icons/icon/vertical-align-start.svg +1 -0
  186. package/icons/icon/visible.svg +1 -0
  187. package/icons/icon/warning-triangle.svg +1 -0
  188. package/icons/icon/zoom-in.svg +1 -0
  189. package/icons/icon/zoom-out.svg +1 -0
  190. package/imports.d.ts +2 -0
  191. package/imports.js +464 -0
  192. package/package.json +61 -0
  193. package/selfHosted.d.ts +2 -0
  194. package/selfHosted.js +246 -0
  195. package/translations/ar.json +295 -0
  196. package/translations/ca.json +295 -0
  197. package/translations/da.json +160 -0
  198. package/translations/de.json +307 -0
  199. package/translations/en.json +1 -0
  200. package/translations/es.json +295 -0
  201. package/translations/fa.json +343 -0
  202. package/translations/fi.json +312 -0
  203. package/translations/fr.json +295 -0
  204. package/translations/gl.json +349 -0
  205. package/translations/he.json +86 -0
  206. package/translations/hi-in.json +290 -0
  207. package/translations/hu.json +5 -0
  208. package/translations/it.json +330 -0
  209. package/translations/ja.json +86 -0
  210. package/translations/ko-kr.json +301 -0
  211. package/translations/ku.json +93 -0
  212. package/translations/languages.json +134 -0
  213. package/translations/main.json +351 -0
  214. package/translations/my.json +112 -0
  215. package/translations/ne.json +295 -0
  216. package/translations/no.json +62 -0
  217. package/translations/pl.json +113 -0
  218. package/translations/pt-br.json +109 -0
  219. package/translations/pt-pt.json +86 -0
  220. package/translations/ro.json +299 -0
  221. package/translations/ru.json +344 -0
  222. package/translations/sv.json +96 -0
  223. package/translations/te.json +112 -0
  224. package/translations/th.json +295 -0
  225. package/translations/tr.json +294 -0
  226. package/translations/uk.json +343 -0
  227. package/translations/vi.json +295 -0
  228. package/translations/zh-cn.json +348 -0
  229. package/translations/zh-tw.json +316 -0
  230. package/types.d.ts +235 -0
  231. package/urls.d.ts +2 -0
  232. package/urls.js +639 -0
  233. package/utils.d.ts +2 -0
  234. package/utils.js +20 -0
package/urls.js ADDED
@@ -0,0 +1,639 @@
1
+ // This file is automatically generated by scripts/refresh-assets.ts.
2
+ // Do not edit manually.
3
+
4
+ // eslint-disable-next-line @typescript-eslint/triple-slash-reference
5
+ /// <reference path="./modules.d.ts" />
6
+ import { formatAssetUrl } from './utils.js'
7
+
8
+ /**
9
+ * @param {AssetUrlOptions} [opts]
10
+ * @public
11
+ */
12
+ export function getAssetUrlsByMetaUrl(opts) {
13
+ return {
14
+ fonts: {
15
+ monospace: formatAssetUrl(
16
+ new URL('./fonts/IBMPlexMono-Medium.woff2', import.meta.url).href,
17
+ opts
18
+ ),
19
+ sansSerif: formatAssetUrl(
20
+ new URL('./fonts/IBMPlexSans-Medium.woff2', import.meta.url).href,
21
+ opts
22
+ ),
23
+ serif: formatAssetUrl(
24
+ new URL('./fonts/IBMPlexSerif-Medium.woff2', import.meta.url).href,
25
+ opts
26
+ ),
27
+ draw: formatAssetUrl(
28
+ new URL('./fonts/Shantell_Sans-Normal-SemiBold.woff2', import.meta.url).href,
29
+ opts
30
+ ),
31
+ },
32
+ icons: {
33
+ 'align-bottom-center': formatAssetUrl(
34
+ new URL('./icons/icon/align-bottom-center.svg', import.meta.url).href,
35
+ opts
36
+ ),
37
+ 'align-bottom-left': formatAssetUrl(
38
+ new URL('./icons/icon/align-bottom-left.svg', import.meta.url).href,
39
+ opts
40
+ ),
41
+ 'align-bottom-right': formatAssetUrl(
42
+ new URL('./icons/icon/align-bottom-right.svg', import.meta.url).href,
43
+ opts
44
+ ),
45
+ 'align-bottom': formatAssetUrl(
46
+ new URL('./icons/icon/align-bottom.svg', import.meta.url).href,
47
+ opts
48
+ ),
49
+ 'align-center-center': formatAssetUrl(
50
+ new URL('./icons/icon/align-center-center.svg', import.meta.url).href,
51
+ opts
52
+ ),
53
+ 'align-center-horizontal': formatAssetUrl(
54
+ new URL('./icons/icon/align-center-horizontal.svg', import.meta.url).href,
55
+ opts
56
+ ),
57
+ 'align-center-left': formatAssetUrl(
58
+ new URL('./icons/icon/align-center-left.svg', import.meta.url).href,
59
+ opts
60
+ ),
61
+ 'align-center-right': formatAssetUrl(
62
+ new URL('./icons/icon/align-center-right.svg', import.meta.url).href,
63
+ opts
64
+ ),
65
+ 'align-center-vertical': formatAssetUrl(
66
+ new URL('./icons/icon/align-center-vertical.svg', import.meta.url).href,
67
+ opts
68
+ ),
69
+ 'align-left': formatAssetUrl(
70
+ new URL('./icons/icon/align-left.svg', import.meta.url).href,
71
+ opts
72
+ ),
73
+ 'align-right': formatAssetUrl(
74
+ new URL('./icons/icon/align-right.svg', import.meta.url).href,
75
+ opts
76
+ ),
77
+ 'align-top-center': formatAssetUrl(
78
+ new URL('./icons/icon/align-top-center.svg', import.meta.url).href,
79
+ opts
80
+ ),
81
+ 'align-top-left': formatAssetUrl(
82
+ new URL('./icons/icon/align-top-left.svg', import.meta.url).href,
83
+ opts
84
+ ),
85
+ 'align-top-right': formatAssetUrl(
86
+ new URL('./icons/icon/align-top-right.svg', import.meta.url).href,
87
+ opts
88
+ ),
89
+ 'align-top': formatAssetUrl(
90
+ new URL('./icons/icon/align-top.svg', import.meta.url).href,
91
+ opts
92
+ ),
93
+ 'arrow-left': formatAssetUrl(
94
+ new URL('./icons/icon/arrow-left.svg', import.meta.url).href,
95
+ opts
96
+ ),
97
+ 'arrowhead-arrow': formatAssetUrl(
98
+ new URL('./icons/icon/arrowhead-arrow.svg', import.meta.url).href,
99
+ opts
100
+ ),
101
+ 'arrowhead-bar': formatAssetUrl(
102
+ new URL('./icons/icon/arrowhead-bar.svg', import.meta.url).href,
103
+ opts
104
+ ),
105
+ 'arrowhead-diamond': formatAssetUrl(
106
+ new URL('./icons/icon/arrowhead-diamond.svg', import.meta.url).href,
107
+ opts
108
+ ),
109
+ 'arrowhead-dot': formatAssetUrl(
110
+ new URL('./icons/icon/arrowhead-dot.svg', import.meta.url).href,
111
+ opts
112
+ ),
113
+ 'arrowhead-none': formatAssetUrl(
114
+ new URL('./icons/icon/arrowhead-none.svg', import.meta.url).href,
115
+ opts
116
+ ),
117
+ 'arrowhead-square': formatAssetUrl(
118
+ new URL('./icons/icon/arrowhead-square.svg', import.meta.url).href,
119
+ opts
120
+ ),
121
+ 'arrowhead-triangle-inverted': formatAssetUrl(
122
+ new URL('./icons/icon/arrowhead-triangle-inverted.svg', import.meta.url).href,
123
+ opts
124
+ ),
125
+ 'arrowhead-triangle': formatAssetUrl(
126
+ new URL('./icons/icon/arrowhead-triangle.svg', import.meta.url).href,
127
+ opts
128
+ ),
129
+ 'aspect-ratio': formatAssetUrl(
130
+ new URL('./icons/icon/aspect-ratio.svg', import.meta.url).href,
131
+ opts
132
+ ),
133
+ avatar: formatAssetUrl(new URL('./icons/icon/avatar.svg', import.meta.url).href, opts),
134
+ blob: formatAssetUrl(new URL('./icons/icon/blob.svg', import.meta.url).href, opts),
135
+ 'bring-forward': formatAssetUrl(
136
+ new URL('./icons/icon/bring-forward.svg', import.meta.url).href,
137
+ opts
138
+ ),
139
+ 'bring-to-front': formatAssetUrl(
140
+ new URL('./icons/icon/bring-to-front.svg', import.meta.url).href,
141
+ opts
142
+ ),
143
+ check: formatAssetUrl(new URL('./icons/icon/check.svg', import.meta.url).href, opts),
144
+ 'checkbox-checked': formatAssetUrl(
145
+ new URL('./icons/icon/checkbox-checked.svg', import.meta.url).href,
146
+ opts
147
+ ),
148
+ 'checkbox-empty': formatAssetUrl(
149
+ new URL('./icons/icon/checkbox-empty.svg', import.meta.url).href,
150
+ opts
151
+ ),
152
+ 'chevron-down': formatAssetUrl(
153
+ new URL('./icons/icon/chevron-down.svg', import.meta.url).href,
154
+ opts
155
+ ),
156
+ 'chevron-left': formatAssetUrl(
157
+ new URL('./icons/icon/chevron-left.svg', import.meta.url).href,
158
+ opts
159
+ ),
160
+ 'chevron-right': formatAssetUrl(
161
+ new URL('./icons/icon/chevron-right.svg', import.meta.url).href,
162
+ opts
163
+ ),
164
+ 'chevron-up': formatAssetUrl(
165
+ new URL('./icons/icon/chevron-up.svg', import.meta.url).href,
166
+ opts
167
+ ),
168
+ 'chevrons-ne': formatAssetUrl(
169
+ new URL('./icons/icon/chevrons-ne.svg', import.meta.url).href,
170
+ opts
171
+ ),
172
+ 'chevrons-sw': formatAssetUrl(
173
+ new URL('./icons/icon/chevrons-sw.svg', import.meta.url).href,
174
+ opts
175
+ ),
176
+ 'clipboard-copied': formatAssetUrl(
177
+ new URL('./icons/icon/clipboard-copied.svg', import.meta.url).href,
178
+ opts
179
+ ),
180
+ 'clipboard-copy': formatAssetUrl(
181
+ new URL('./icons/icon/clipboard-copy.svg', import.meta.url).href,
182
+ opts
183
+ ),
184
+ code: formatAssetUrl(new URL('./icons/icon/code.svg', import.meta.url).href, opts),
185
+ collab: formatAssetUrl(new URL('./icons/icon/collab.svg', import.meta.url).href, opts),
186
+ color: formatAssetUrl(new URL('./icons/icon/color.svg', import.meta.url).href, opts),
187
+ comment: formatAssetUrl(new URL('./icons/icon/comment.svg', import.meta.url).href, opts),
188
+ 'cross-2': formatAssetUrl(new URL('./icons/icon/cross-2.svg', import.meta.url).href, opts),
189
+ cross: formatAssetUrl(new URL('./icons/icon/cross.svg', import.meta.url).href, opts),
190
+ 'dash-dashed': formatAssetUrl(
191
+ new URL('./icons/icon/dash-dashed.svg', import.meta.url).href,
192
+ opts
193
+ ),
194
+ 'dash-dotted': formatAssetUrl(
195
+ new URL('./icons/icon/dash-dotted.svg', import.meta.url).href,
196
+ opts
197
+ ),
198
+ 'dash-draw': formatAssetUrl(
199
+ new URL('./icons/icon/dash-draw.svg', import.meta.url).href,
200
+ opts
201
+ ),
202
+ 'dash-solid': formatAssetUrl(
203
+ new URL('./icons/icon/dash-solid.svg', import.meta.url).href,
204
+ opts
205
+ ),
206
+ discord: formatAssetUrl(new URL('./icons/icon/discord.svg', import.meta.url).href, opts),
207
+ 'distribute-horizontal': formatAssetUrl(
208
+ new URL('./icons/icon/distribute-horizontal.svg', import.meta.url).href,
209
+ opts
210
+ ),
211
+ 'distribute-vertical': formatAssetUrl(
212
+ new URL('./icons/icon/distribute-vertical.svg', import.meta.url).href,
213
+ opts
214
+ ),
215
+ dot: formatAssetUrl(new URL('./icons/icon/dot.svg', import.meta.url).href, opts),
216
+ 'dots-horizontal': formatAssetUrl(
217
+ new URL('./icons/icon/dots-horizontal.svg', import.meta.url).href,
218
+ opts
219
+ ),
220
+ 'dots-vertical': formatAssetUrl(
221
+ new URL('./icons/icon/dots-vertical.svg', import.meta.url).href,
222
+ opts
223
+ ),
224
+ 'drag-handle-dots': formatAssetUrl(
225
+ new URL('./icons/icon/drag-handle-dots.svg', import.meta.url).href,
226
+ opts
227
+ ),
228
+ duplicate: formatAssetUrl(new URL('./icons/icon/duplicate.svg', import.meta.url).href, opts),
229
+ edit: formatAssetUrl(new URL('./icons/icon/edit.svg', import.meta.url).href, opts),
230
+ 'external-link': formatAssetUrl(
231
+ new URL('./icons/icon/external-link.svg', import.meta.url).href,
232
+ opts
233
+ ),
234
+ file: formatAssetUrl(new URL('./icons/icon/file.svg', import.meta.url).href, opts),
235
+ 'fill-none': formatAssetUrl(
236
+ new URL('./icons/icon/fill-none.svg', import.meta.url).href,
237
+ opts
238
+ ),
239
+ 'fill-pattern': formatAssetUrl(
240
+ new URL('./icons/icon/fill-pattern.svg', import.meta.url).href,
241
+ opts
242
+ ),
243
+ 'fill-semi': formatAssetUrl(
244
+ new URL('./icons/icon/fill-semi.svg', import.meta.url).href,
245
+ opts
246
+ ),
247
+ 'fill-solid': formatAssetUrl(
248
+ new URL('./icons/icon/fill-solid.svg', import.meta.url).href,
249
+ opts
250
+ ),
251
+ follow: formatAssetUrl(new URL('./icons/icon/follow.svg', import.meta.url).href, opts),
252
+ following: formatAssetUrl(new URL('./icons/icon/following.svg', import.meta.url).href, opts),
253
+ 'font-draw': formatAssetUrl(
254
+ new URL('./icons/icon/font-draw.svg', import.meta.url).href,
255
+ opts
256
+ ),
257
+ 'font-mono': formatAssetUrl(
258
+ new URL('./icons/icon/font-mono.svg', import.meta.url).href,
259
+ opts
260
+ ),
261
+ 'font-sans': formatAssetUrl(
262
+ new URL('./icons/icon/font-sans.svg', import.meta.url).href,
263
+ opts
264
+ ),
265
+ 'font-serif': formatAssetUrl(
266
+ new URL('./icons/icon/font-serif.svg', import.meta.url).href,
267
+ opts
268
+ ),
269
+ 'geo-arrow-down': formatAssetUrl(
270
+ new URL('./icons/icon/geo-arrow-down.svg', import.meta.url).href,
271
+ opts
272
+ ),
273
+ 'geo-arrow-left': formatAssetUrl(
274
+ new URL('./icons/icon/geo-arrow-left.svg', import.meta.url).href,
275
+ opts
276
+ ),
277
+ 'geo-arrow-right': formatAssetUrl(
278
+ new URL('./icons/icon/geo-arrow-right.svg', import.meta.url).href,
279
+ opts
280
+ ),
281
+ 'geo-arrow-up': formatAssetUrl(
282
+ new URL('./icons/icon/geo-arrow-up.svg', import.meta.url).href,
283
+ opts
284
+ ),
285
+ 'geo-check-box': formatAssetUrl(
286
+ new URL('./icons/icon/geo-check-box.svg', import.meta.url).href,
287
+ opts
288
+ ),
289
+ 'geo-cloud': formatAssetUrl(
290
+ new URL('./icons/icon/geo-cloud.svg', import.meta.url).href,
291
+ opts
292
+ ),
293
+ 'geo-diamond': formatAssetUrl(
294
+ new URL('./icons/icon/geo-diamond.svg', import.meta.url).href,
295
+ opts
296
+ ),
297
+ 'geo-ellipse': formatAssetUrl(
298
+ new URL('./icons/icon/geo-ellipse.svg', import.meta.url).href,
299
+ opts
300
+ ),
301
+ 'geo-hexagon': formatAssetUrl(
302
+ new URL('./icons/icon/geo-hexagon.svg', import.meta.url).href,
303
+ opts
304
+ ),
305
+ 'geo-octagon': formatAssetUrl(
306
+ new URL('./icons/icon/geo-octagon.svg', import.meta.url).href,
307
+ opts
308
+ ),
309
+ 'geo-oval': formatAssetUrl(new URL('./icons/icon/geo-oval.svg', import.meta.url).href, opts),
310
+ 'geo-pentagon': formatAssetUrl(
311
+ new URL('./icons/icon/geo-pentagon.svg', import.meta.url).href,
312
+ opts
313
+ ),
314
+ 'geo-rectangle': formatAssetUrl(
315
+ new URL('./icons/icon/geo-rectangle.svg', import.meta.url).href,
316
+ opts
317
+ ),
318
+ 'geo-rhombus-2': formatAssetUrl(
319
+ new URL('./icons/icon/geo-rhombus-2.svg', import.meta.url).href,
320
+ opts
321
+ ),
322
+ 'geo-rhombus': formatAssetUrl(
323
+ new URL('./icons/icon/geo-rhombus.svg', import.meta.url).href,
324
+ opts
325
+ ),
326
+ 'geo-star': formatAssetUrl(new URL('./icons/icon/geo-star.svg', import.meta.url).href, opts),
327
+ 'geo-trapezoid': formatAssetUrl(
328
+ new URL('./icons/icon/geo-trapezoid.svg', import.meta.url).href,
329
+ opts
330
+ ),
331
+ 'geo-triangle': formatAssetUrl(
332
+ new URL('./icons/icon/geo-triangle.svg', import.meta.url).href,
333
+ opts
334
+ ),
335
+ 'geo-x-box': formatAssetUrl(
336
+ new URL('./icons/icon/geo-x-box.svg', import.meta.url).href,
337
+ opts
338
+ ),
339
+ github: formatAssetUrl(new URL('./icons/icon/github.svg', import.meta.url).href, opts),
340
+ group: formatAssetUrl(new URL('./icons/icon/group.svg', import.meta.url).href, opts),
341
+ hidden: formatAssetUrl(new URL('./icons/icon/hidden.svg', import.meta.url).href, opts),
342
+ image: formatAssetUrl(new URL('./icons/icon/image.svg', import.meta.url).href, opts),
343
+ 'info-circle': formatAssetUrl(
344
+ new URL('./icons/icon/info-circle.svg', import.meta.url).href,
345
+ opts
346
+ ),
347
+ leading: formatAssetUrl(new URL('./icons/icon/leading.svg', import.meta.url).href, opts),
348
+ link: formatAssetUrl(new URL('./icons/icon/link.svg', import.meta.url).href, opts),
349
+ 'lock-small': formatAssetUrl(
350
+ new URL('./icons/icon/lock-small.svg', import.meta.url).href,
351
+ opts
352
+ ),
353
+ lock: formatAssetUrl(new URL('./icons/icon/lock.svg', import.meta.url).href, opts),
354
+ menu: formatAssetUrl(new URL('./icons/icon/menu.svg', import.meta.url).href, opts),
355
+ minus: formatAssetUrl(new URL('./icons/icon/minus.svg', import.meta.url).href, opts),
356
+ mixed: formatAssetUrl(new URL('./icons/icon/mixed.svg', import.meta.url).href, opts),
357
+ pack: formatAssetUrl(new URL('./icons/icon/pack.svg', import.meta.url).href, opts),
358
+ page: formatAssetUrl(new URL('./icons/icon/page.svg', import.meta.url).href, opts),
359
+ plus: formatAssetUrl(new URL('./icons/icon/plus.svg', import.meta.url).href, opts),
360
+ 'question-mark-circle': formatAssetUrl(
361
+ new URL('./icons/icon/question-mark-circle.svg', import.meta.url).href,
362
+ opts
363
+ ),
364
+ 'question-mark': formatAssetUrl(
365
+ new URL('./icons/icon/question-mark.svg', import.meta.url).href,
366
+ opts
367
+ ),
368
+ redo: formatAssetUrl(new URL('./icons/icon/redo.svg', import.meta.url).href, opts),
369
+ 'reset-zoom': formatAssetUrl(
370
+ new URL('./icons/icon/reset-zoom.svg', import.meta.url).href,
371
+ opts
372
+ ),
373
+ 'rotate-ccw': formatAssetUrl(
374
+ new URL('./icons/icon/rotate-ccw.svg', import.meta.url).href,
375
+ opts
376
+ ),
377
+ 'rotate-cw': formatAssetUrl(
378
+ new URL('./icons/icon/rotate-cw.svg', import.meta.url).href,
379
+ opts
380
+ ),
381
+ ruler: formatAssetUrl(new URL('./icons/icon/ruler.svg', import.meta.url).href, opts),
382
+ search: formatAssetUrl(new URL('./icons/icon/search.svg', import.meta.url).href, opts),
383
+ 'send-backward': formatAssetUrl(
384
+ new URL('./icons/icon/send-backward.svg', import.meta.url).href,
385
+ opts
386
+ ),
387
+ 'send-to-back': formatAssetUrl(
388
+ new URL('./icons/icon/send-to-back.svg', import.meta.url).href,
389
+ opts
390
+ ),
391
+ 'settings-horizontal': formatAssetUrl(
392
+ new URL('./icons/icon/settings-horizontal.svg', import.meta.url).href,
393
+ opts
394
+ ),
395
+ 'settings-vertical-1': formatAssetUrl(
396
+ new URL('./icons/icon/settings-vertical-1.svg', import.meta.url).href,
397
+ opts
398
+ ),
399
+ 'settings-vertical': formatAssetUrl(
400
+ new URL('./icons/icon/settings-vertical.svg', import.meta.url).href,
401
+ opts
402
+ ),
403
+ 'share-1': formatAssetUrl(new URL('./icons/icon/share-1.svg', import.meta.url).href, opts),
404
+ 'share-2': formatAssetUrl(new URL('./icons/icon/share-2.svg', import.meta.url).href, opts),
405
+ 'size-extra-large': formatAssetUrl(
406
+ new URL('./icons/icon/size-extra-large.svg', import.meta.url).href,
407
+ opts
408
+ ),
409
+ 'size-large': formatAssetUrl(
410
+ new URL('./icons/icon/size-large.svg', import.meta.url).href,
411
+ opts
412
+ ),
413
+ 'size-medium': formatAssetUrl(
414
+ new URL('./icons/icon/size-medium.svg', import.meta.url).href,
415
+ opts
416
+ ),
417
+ 'size-small': formatAssetUrl(
418
+ new URL('./icons/icon/size-small.svg', import.meta.url).href,
419
+ opts
420
+ ),
421
+ 'spline-cubic': formatAssetUrl(
422
+ new URL('./icons/icon/spline-cubic.svg', import.meta.url).href,
423
+ opts
424
+ ),
425
+ 'spline-line': formatAssetUrl(
426
+ new URL('./icons/icon/spline-line.svg', import.meta.url).href,
427
+ opts
428
+ ),
429
+ 'stack-horizontal': formatAssetUrl(
430
+ new URL('./icons/icon/stack-horizontal.svg', import.meta.url).href,
431
+ opts
432
+ ),
433
+ 'stack-vertical': formatAssetUrl(
434
+ new URL('./icons/icon/stack-vertical.svg', import.meta.url).href,
435
+ opts
436
+ ),
437
+ 'status-offline': formatAssetUrl(
438
+ new URL('./icons/icon/status-offline.svg', import.meta.url).href,
439
+ opts
440
+ ),
441
+ 'status-online': formatAssetUrl(
442
+ new URL('./icons/icon/status-online.svg', import.meta.url).href,
443
+ opts
444
+ ),
445
+ 'stretch-horizontal': formatAssetUrl(
446
+ new URL('./icons/icon/stretch-horizontal.svg', import.meta.url).href,
447
+ opts
448
+ ),
449
+ 'stretch-vertical': formatAssetUrl(
450
+ new URL('./icons/icon/stretch-vertical.svg', import.meta.url).href,
451
+ opts
452
+ ),
453
+ 'text-align-center': formatAssetUrl(
454
+ new URL('./icons/icon/text-align-center.svg', import.meta.url).href,
455
+ opts
456
+ ),
457
+ 'text-align-justify': formatAssetUrl(
458
+ new URL('./icons/icon/text-align-justify.svg', import.meta.url).href,
459
+ opts
460
+ ),
461
+ 'text-align-left': formatAssetUrl(
462
+ new URL('./icons/icon/text-align-left.svg', import.meta.url).href,
463
+ opts
464
+ ),
465
+ 'text-align-right': formatAssetUrl(
466
+ new URL('./icons/icon/text-align-right.svg', import.meta.url).href,
467
+ opts
468
+ ),
469
+ 'tool-arrow': formatAssetUrl(
470
+ new URL('./icons/icon/tool-arrow.svg', import.meta.url).href,
471
+ opts
472
+ ),
473
+ 'tool-embed': formatAssetUrl(
474
+ new URL('./icons/icon/tool-embed.svg', import.meta.url).href,
475
+ opts
476
+ ),
477
+ 'tool-eraser': formatAssetUrl(
478
+ new URL('./icons/icon/tool-eraser.svg', import.meta.url).href,
479
+ opts
480
+ ),
481
+ 'tool-frame': formatAssetUrl(
482
+ new URL('./icons/icon/tool-frame.svg', import.meta.url).href,
483
+ opts
484
+ ),
485
+ 'tool-hand': formatAssetUrl(
486
+ new URL('./icons/icon/tool-hand.svg', import.meta.url).href,
487
+ opts
488
+ ),
489
+ 'tool-highlight': formatAssetUrl(
490
+ new URL('./icons/icon/tool-highlight.svg', import.meta.url).href,
491
+ opts
492
+ ),
493
+ 'tool-laser': formatAssetUrl(
494
+ new URL('./icons/icon/tool-laser.svg', import.meta.url).href,
495
+ opts
496
+ ),
497
+ 'tool-line': formatAssetUrl(
498
+ new URL('./icons/icon/tool-line.svg', import.meta.url).href,
499
+ opts
500
+ ),
501
+ 'tool-media': formatAssetUrl(
502
+ new URL('./icons/icon/tool-media.svg', import.meta.url).href,
503
+ opts
504
+ ),
505
+ 'tool-note': formatAssetUrl(
506
+ new URL('./icons/icon/tool-note.svg', import.meta.url).href,
507
+ opts
508
+ ),
509
+ 'tool-pencil': formatAssetUrl(
510
+ new URL('./icons/icon/tool-pencil.svg', import.meta.url).href,
511
+ opts
512
+ ),
513
+ 'tool-pointer': formatAssetUrl(
514
+ new URL('./icons/icon/tool-pointer.svg', import.meta.url).href,
515
+ opts
516
+ ),
517
+ 'tool-text': formatAssetUrl(
518
+ new URL('./icons/icon/tool-text.svg', import.meta.url).href,
519
+ opts
520
+ ),
521
+ trash: formatAssetUrl(new URL('./icons/icon/trash.svg', import.meta.url).href, opts),
522
+ 'triangle-down': formatAssetUrl(
523
+ new URL('./icons/icon/triangle-down.svg', import.meta.url).href,
524
+ opts
525
+ ),
526
+ 'triangle-up': formatAssetUrl(
527
+ new URL('./icons/icon/triangle-up.svg', import.meta.url).href,
528
+ opts
529
+ ),
530
+ twitter: formatAssetUrl(new URL('./icons/icon/twitter.svg', import.meta.url).href, opts),
531
+ undo: formatAssetUrl(new URL('./icons/icon/undo.svg', import.meta.url).href, opts),
532
+ ungroup: formatAssetUrl(new URL('./icons/icon/ungroup.svg', import.meta.url).href, opts),
533
+ 'unlock-small': formatAssetUrl(
534
+ new URL('./icons/icon/unlock-small.svg', import.meta.url).href,
535
+ opts
536
+ ),
537
+ unlock: formatAssetUrl(new URL('./icons/icon/unlock.svg', import.meta.url).href, opts),
538
+ 'vertical-align-center': formatAssetUrl(
539
+ new URL('./icons/icon/vertical-align-center.svg', import.meta.url).href,
540
+ opts
541
+ ),
542
+ 'vertical-align-end': formatAssetUrl(
543
+ new URL('./icons/icon/vertical-align-end.svg', import.meta.url).href,
544
+ opts
545
+ ),
546
+ 'vertical-align-start': formatAssetUrl(
547
+ new URL('./icons/icon/vertical-align-start.svg', import.meta.url).href,
548
+ opts
549
+ ),
550
+ visible: formatAssetUrl(new URL('./icons/icon/visible.svg', import.meta.url).href, opts),
551
+ 'warning-triangle': formatAssetUrl(
552
+ new URL('./icons/icon/warning-triangle.svg', import.meta.url).href,
553
+ opts
554
+ ),
555
+ 'zoom-in': formatAssetUrl(new URL('./icons/icon/zoom-in.svg', import.meta.url).href, opts),
556
+ 'zoom-out': formatAssetUrl(new URL('./icons/icon/zoom-out.svg', import.meta.url).href, opts),
557
+ },
558
+ translations: {
559
+ ar: formatAssetUrl(new URL('./translations/ar.json', import.meta.url).href, opts),
560
+ ca: formatAssetUrl(new URL('./translations/ca.json', import.meta.url).href, opts),
561
+ da: formatAssetUrl(new URL('./translations/da.json', import.meta.url).href, opts),
562
+ de: formatAssetUrl(new URL('./translations/de.json', import.meta.url).href, opts),
563
+ en: formatAssetUrl(new URL('./translations/en.json', import.meta.url).href, opts),
564
+ es: formatAssetUrl(new URL('./translations/es.json', import.meta.url).href, opts),
565
+ fa: formatAssetUrl(new URL('./translations/fa.json', import.meta.url).href, opts),
566
+ fi: formatAssetUrl(new URL('./translations/fi.json', import.meta.url).href, opts),
567
+ fr: formatAssetUrl(new URL('./translations/fr.json', import.meta.url).href, opts),
568
+ gl: formatAssetUrl(new URL('./translations/gl.json', import.meta.url).href, opts),
569
+ he: formatAssetUrl(new URL('./translations/he.json', import.meta.url).href, opts),
570
+ 'hi-in': formatAssetUrl(new URL('./translations/hi-in.json', import.meta.url).href, opts),
571
+ hu: formatAssetUrl(new URL('./translations/hu.json', import.meta.url).href, opts),
572
+ it: formatAssetUrl(new URL('./translations/it.json', import.meta.url).href, opts),
573
+ ja: formatAssetUrl(new URL('./translations/ja.json', import.meta.url).href, opts),
574
+ 'ko-kr': formatAssetUrl(new URL('./translations/ko-kr.json', import.meta.url).href, opts),
575
+ ku: formatAssetUrl(new URL('./translations/ku.json', import.meta.url).href, opts),
576
+ languages: formatAssetUrl(
577
+ new URL('./translations/languages.json', import.meta.url).href,
578
+ opts
579
+ ),
580
+ main: formatAssetUrl(new URL('./translations/main.json', import.meta.url).href, opts),
581
+ my: formatAssetUrl(new URL('./translations/my.json', import.meta.url).href, opts),
582
+ ne: formatAssetUrl(new URL('./translations/ne.json', import.meta.url).href, opts),
583
+ no: formatAssetUrl(new URL('./translations/no.json', import.meta.url).href, opts),
584
+ pl: formatAssetUrl(new URL('./translations/pl.json', import.meta.url).href, opts),
585
+ 'pt-br': formatAssetUrl(new URL('./translations/pt-br.json', import.meta.url).href, opts),
586
+ 'pt-pt': formatAssetUrl(new URL('./translations/pt-pt.json', import.meta.url).href, opts),
587
+ ro: formatAssetUrl(new URL('./translations/ro.json', import.meta.url).href, opts),
588
+ ru: formatAssetUrl(new URL('./translations/ru.json', import.meta.url).href, opts),
589
+ sv: formatAssetUrl(new URL('./translations/sv.json', import.meta.url).href, opts),
590
+ te: formatAssetUrl(new URL('./translations/te.json', import.meta.url).href, opts),
591
+ th: formatAssetUrl(new URL('./translations/th.json', import.meta.url).href, opts),
592
+ tr: formatAssetUrl(new URL('./translations/tr.json', import.meta.url).href, opts),
593
+ uk: formatAssetUrl(new URL('./translations/uk.json', import.meta.url).href, opts),
594
+ vi: formatAssetUrl(new URL('./translations/vi.json', import.meta.url).href, opts),
595
+ 'zh-cn': formatAssetUrl(new URL('./translations/zh-cn.json', import.meta.url).href, opts),
596
+ 'zh-tw': formatAssetUrl(new URL('./translations/zh-tw.json', import.meta.url).href, opts),
597
+ },
598
+ embedIcons: {
599
+ codepen: formatAssetUrl(new URL('./embed-icons/codepen.png', import.meta.url).href, opts),
600
+ codesandbox: formatAssetUrl(
601
+ new URL('./embed-icons/codesandbox.png', import.meta.url).href,
602
+ opts
603
+ ),
604
+ excalidraw: formatAssetUrl(
605
+ new URL('./embed-icons/excalidraw.png', import.meta.url).href,
606
+ opts
607
+ ),
608
+ felt: formatAssetUrl(new URL('./embed-icons/felt.png', import.meta.url).href, opts),
609
+ figma: formatAssetUrl(new URL('./embed-icons/figma.png', import.meta.url).href, opts),
610
+ github_gist: formatAssetUrl(
611
+ new URL('./embed-icons/github_gist.png', import.meta.url).href,
612
+ opts
613
+ ),
614
+ google_calendar: formatAssetUrl(
615
+ new URL('./embed-icons/google_calendar.png', import.meta.url).href,
616
+ opts
617
+ ),
618
+ google_maps: formatAssetUrl(
619
+ new URL('./embed-icons/google_maps.png', import.meta.url).href,
620
+ opts
621
+ ),
622
+ google_slides: formatAssetUrl(
623
+ new URL('./embed-icons/google_slides.png', import.meta.url).href,
624
+ opts
625
+ ),
626
+ observable: formatAssetUrl(
627
+ new URL('./embed-icons/observable.png', import.meta.url).href,
628
+ opts
629
+ ),
630
+ replit: formatAssetUrl(new URL('./embed-icons/replit.png', import.meta.url).href, opts),
631
+ scratch: formatAssetUrl(new URL('./embed-icons/scratch.png', import.meta.url).href, opts),
632
+ spotify: formatAssetUrl(new URL('./embed-icons/spotify.png', import.meta.url).href, opts),
633
+ tldraw: formatAssetUrl(new URL('./embed-icons/tldraw.png', import.meta.url).href, opts),
634
+ val_town: formatAssetUrl(new URL('./embed-icons/val_town.png', import.meta.url).href, opts),
635
+ vimeo: formatAssetUrl(new URL('./embed-icons/vimeo.png', import.meta.url).href, opts),
636
+ youtube: formatAssetUrl(new URL('./embed-icons/youtube.png', import.meta.url).href, opts),
637
+ },
638
+ }
639
+ }
package/utils.d.ts ADDED
@@ -0,0 +1,2 @@
1
+ import { AssetUrl, AssetUrlOptions } from './types'
2
+ export function formatAssetUrl(assetUrl: AssetUrl, format: AssetUrlOptions): string
package/utils.js ADDED
@@ -0,0 +1,20 @@
1
+ // eslint-disable-next-line @typescript-eslint/triple-slash-reference
2
+ /// <reference path="./modules.d.ts" />
3
+
4
+ /**
5
+ * @param {AssetUrl} assetUrl
6
+ * @param {AssetUrlOptions} [format]
7
+ * @returns {string}
8
+ */
9
+ export function formatAssetUrl(assetUrl, format = {}) {
10
+ const assetUrlString = typeof assetUrl === 'string' ? assetUrl : assetUrl.src
11
+
12
+ if (typeof format === 'function') return format(assetUrlString)
13
+
14
+ const { baseUrl = '' } = format
15
+
16
+ if (assetUrlString.startsWith('data:')) return assetUrlString
17
+ if (assetUrlString.match(/^https?:\/\//)) return assetUrlString
18
+
19
+ return `${baseUrl.replace(/\/$/, '')}/${assetUrlString.replace(/^\.?\//, '')}`
20
+ }