Skip to content
This repository was archived by the owner on Feb 28, 2026. It is now read-only.

Commit 2329044

Browse files
committed
Types for vite svg loader
1 parent 9adcd26 commit 2329044

File tree

2 files changed

+113
-70
lines changed

2 files changed

+113
-70
lines changed

packages/player/src/__snapshots__/App.test.tsx.snap

Lines changed: 108 additions & 69 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,38 @@
33
exports[`App > should render snapshot 1`] = `
44
<DocumentFragment>
55
<div
6-
class="h-screen w-screen grid grid-rows-[auto_1fr_auto] "
6+
class="h-screen w-screen overflow-hidden grid grid-rows-[auto_1fr_auto] "
77
>
88
<header
99
class="h-12 bg-background border-b-2 border-border flex items-center px-4 "
10-
/>
10+
>
11+
<svg
12+
class="inline-flex w-6 h-6"
13+
height="100"
14+
viewBox="0 0 100 100"
15+
width="100"
16+
xmlns="http://www.w3.org/2000/svg"
17+
>
18+
<g
19+
fill="none"
20+
stroke="currentColor"
21+
stroke-width="8"
22+
transform="matrix(.96157 0 0 .95989 1.9231 1.9198)"
23+
>
24+
<rect
25+
height="96"
26+
rx="19.2"
27+
ry="19.2"
28+
width="96"
29+
x="2"
30+
y="2"
31+
/>
32+
<path
33+
d="m30 23.6 20 26.4 20-26.4zm20 26.4 20 26.4 20-26.4zm0 0h-40l20 26.4z"
34+
/>
35+
</g>
36+
</svg>
37+
</header>
1138
<div
1239
class="grid grid-cols-[auto_1fr_auto] h-full bg-background-secondary "
1340
>
@@ -59,28 +86,32 @@ exports[`App > should render snapshot 1`] = `
5986
<button
6087
class="transition-all rounded text-foreground bg-transparent h-9 px-3 inline-flex flex-row items-center justify-between"
6188
>
62-
<svg
63-
class="lucide lucide-compass"
64-
fill="none"
65-
height="24"
66-
stroke="currentColor"
67-
stroke-linecap="round"
68-
stroke-linejoin="round"
69-
stroke-width="2"
70-
viewBox="0 0 24 24"
71-
width="24"
72-
xmlns="http://www.w3.org/2000/svg"
89+
<span
90+
class="inline-flex flex-row gap-2 items-center"
7391
>
74-
<path
75-
d="m16.24 7.76-1.804 5.411a2 2 0 0 1-1.265 1.265L7.76 16.24l1.804-5.411a2 2 0 0 1 1.265-1.265z"
76-
/>
77-
<circle
78-
cx="12"
79-
cy="12"
80-
r="10"
81-
/>
82-
</svg>
83-
Explore
92+
<svg
93+
class="lucide lucide-compass"
94+
fill="none"
95+
height="24"
96+
stroke="currentColor"
97+
stroke-linecap="round"
98+
stroke-linejoin="round"
99+
stroke-width="2"
100+
viewBox="0 0 24 24"
101+
width="24"
102+
xmlns="http://www.w3.org/2000/svg"
103+
>
104+
<path
105+
d="m16.24 7.76-1.804 5.411a2 2 0 0 1-1.265 1.265L7.76 16.24l1.804-5.411a2 2 0 0 1 1.265-1.265z"
106+
/>
107+
<circle
108+
cx="12"
109+
cy="12"
110+
r="10"
111+
/>
112+
</svg>
113+
Explore
114+
</span>
84115
<div>
85116
<svg
86117
class="lucide lucide-chevron-right"
@@ -107,28 +138,32 @@ exports[`App > should render snapshot 1`] = `
107138
<button
108139
class="transition-all rounded text-foreground bg-transparent h-9 px-3 inline-flex flex-row items-center justify-between"
109140
>
110-
<svg
111-
class="lucide lucide-settings"
112-
fill="none"
113-
height="24"
114-
stroke="currentColor"
115-
stroke-linecap="round"
116-
stroke-linejoin="round"
117-
stroke-width="2"
118-
viewBox="0 0 24 24"
119-
width="24"
120-
xmlns="http://www.w3.org/2000/svg"
141+
<span
142+
class="inline-flex flex-row gap-2 items-center"
121143
>
122-
<path
123-
d="M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z"
124-
/>
125-
<circle
126-
cx="12"
127-
cy="12"
128-
r="3"
129-
/>
130-
</svg>
131-
Preferences
144+
<svg
145+
class="lucide lucide-settings"
146+
fill="none"
147+
height="24"
148+
stroke="currentColor"
149+
stroke-linecap="round"
150+
stroke-linejoin="round"
151+
stroke-width="2"
152+
viewBox="0 0 24 24"
153+
width="24"
154+
xmlns="http://www.w3.org/2000/svg"
155+
>
156+
<path
157+
d="M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z"
158+
/>
159+
<circle
160+
cx="12"
161+
cy="12"
162+
r="3"
163+
/>
164+
</svg>
165+
Preferences
166+
</span>
132167
<div>
133168
<svg
134169
class="lucide lucide-chevron-right"
@@ -155,32 +190,36 @@ exports[`App > should render snapshot 1`] = `
155190
<button
156191
class="transition-all rounded text-foreground bg-transparent h-9 px-3 inline-flex flex-row items-center justify-between"
157192
>
158-
<svg
159-
class="lucide lucide-library"
160-
fill="none"
161-
height="24"
162-
stroke="currentColor"
163-
stroke-linecap="round"
164-
stroke-linejoin="round"
165-
stroke-width="2"
166-
viewBox="0 0 24 24"
167-
width="24"
168-
xmlns="http://www.w3.org/2000/svg"
193+
<span
194+
class="inline-flex flex-row gap-2 items-center"
169195
>
170-
<path
171-
d="m16 6 4 14"
172-
/>
173-
<path
174-
d="M12 6v14"
175-
/>
176-
<path
177-
d="M8 8v12"
178-
/>
179-
<path
180-
d="M4 4v16"
181-
/>
182-
</svg>
183-
Collection
196+
<svg
197+
class="lucide lucide-library"
198+
fill="none"
199+
height="24"
200+
stroke="currentColor"
201+
stroke-linecap="round"
202+
stroke-linejoin="round"
203+
stroke-width="2"
204+
viewBox="0 0 24 24"
205+
width="24"
206+
xmlns="http://www.w3.org/2000/svg"
207+
>
208+
<path
209+
d="m16 6 4 14"
210+
/>
211+
<path
212+
d="M12 6v14"
213+
/>
214+
<path
215+
d="M8 8v12"
216+
/>
217+
<path
218+
d="M4 4v16"
219+
/>
220+
</svg>
221+
Collection
222+
</span>
184223
<div>
185224
<svg
186225
class="lucide lucide-chevron-right"

packages/ui/tsconfig.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,11 @@
88
"declaration": true,
99
"declarationMap": true,
1010
"sourceMap": true,
11-
"types": ["vitest/globals", "@testing-library/jest-dom"]
11+
"types": [
12+
"vitest/globals",
13+
"@testing-library/jest-dom",
14+
"vite-plugin-svgr/client"
15+
]
1216
},
1317
"include": ["src/**/*"],
1418
"exclude": ["node_modules", "dist"]

0 commit comments

Comments
 (0)