Skip to content

Commit 45f2890

Browse files
authored
feat(site-2): Remove legacy site-kit stuff (#8501)
* Push * Update site-kit * Update svelte REPL * Remove rollup URL * meh * Modify sidebar colors * Bump deps
1 parent 92a06e9 commit 45f2890

22 files changed

+173
-213
lines changed

sites/svelte.dev/package-lock.json

+85-125
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

sites/svelte.dev/package.json

+6-6
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
},
1818
"dependencies": {
1919
"@supabase/supabase-js": "^2.20.0",
20-
"@sveltejs/repl": "^0.2.0",
20+
"@sveltejs/repl": "^0.4.0",
2121
"cookie": "^0.5.0",
2222
"devalue": "^4.3.0",
2323
"do-not-zip": "^1.0.0",
@@ -27,9 +27,9 @@
2727
},
2828
"devDependencies": {
2929
"@resvg/resvg-js": "^2.4.1",
30-
"@sveltejs/adapter-vercel": "^2.4.1",
31-
"@sveltejs/kit": "^1.15.4",
32-
"@sveltejs/site-kit": "^4.0.2",
30+
"@sveltejs/adapter-vercel": "^2.4.2",
31+
"@sveltejs/kit": "^1.15.7",
32+
"@sveltejs/site-kit": "^5.0.3",
3333
"@types/marked": "^4.0.8",
3434
"@types/prismjs": "^1.26.0",
3535
"degit": "^2.8.4",
@@ -41,7 +41,7 @@
4141
"prettier-plugin-svelte": "^2.10.0",
4242
"prism-svelte": "^0.5.0",
4343
"prismjs": "^1.29.0",
44-
"satori": "^0.4.7",
44+
"satori": "^0.4.11",
4545
"satori-html": "^0.3.2",
4646
"shelljs": "^0.8.5",
4747
"shiki": "^0.14.1",
@@ -50,6 +50,6 @@
5050
"svelte-check": "^3.2.0",
5151
"typescript": "^5.0.4",
5252
"vite": "^4.2.1",
53-
"vite-imagetools": "^4.0.18"
53+
"vite-imagetools": "^4.0.19"
5454
}
5555
}

sites/svelte.dev/src/lib/components/PreloadingIndicator.svelte

+1-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
left: 0;
4343
top: 0;
4444
height: 100%;
45-
background-color: var(--prime);
45+
background-color: var(--sk-theme-1);
4646
transition: width 0.4s;
4747
}
4848

sites/svelte.dev/src/lib/components/ReplWidget.svelte

+3-5
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
return {
4343
name: file.slice(0, dot),
4444
type: file.slice(dot + 1),
45-
source,
45+
source
4646
};
4747
})
4848
.filter((x) => x.type === 'svelte' || x.type === 'js')
@@ -63,7 +63,7 @@
6363
);
6464
6565
repl.set({
66-
components,
66+
components
6767
});
6868
}
6969
}
@@ -80,10 +80,8 @@
8080
browser && version === 'local'
8181
? `${location.origin}/repl/local`
8282
: `https://unpkg.com/svelte@${version}`;
83-
84-
const rollupUrl = `https://unpkg.com/rollup@1/dist/rollup.browser.js`;
8583
</script>
8684

8785
{#if browser}
88-
<Repl bind:this={repl} {svelteUrl} {rollupUrl} embedded relaxed />
86+
<Repl bind:this={repl} {svelteUrl} embedded relaxed />
8987
{/if}

sites/svelte.dev/src/routes/(authed)/apps/+page.svelte

+13-13
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,11 @@
2626
const res = await fetch(`/apps/destroy`, {
2727
method: 'POST',
2828
headers: {
29-
'content-type': 'application/json',
29+
'content-type': 'application/json'
3030
},
3131
body: JSON.stringify({
32-
ids: selected,
33-
}),
32+
ids: selected
33+
})
3434
});
3535
3636
if (res.ok) {
@@ -142,8 +142,8 @@
142142

143143
<style>
144144
.apps {
145-
padding: var(--top-offset) var(--side-nav) 6rem var(--side-nav);
146-
max-width: var(--main-width);
145+
padding: var(--sk-page-padding-top) var(--sk-page-padding-side) 6rem var(--sk-page-padding-side);
146+
max-width: var(--sk-page-main-width);
147147
margin: 0 auto;
148148
}
149149
@@ -161,7 +161,7 @@
161161
padding: 0 0 0 3.2rem;
162162
position: relative;
163163
margin: 1rem 0;
164-
color: var(--text);
164+
color: var(--sk-text-2);
165165
}
166166
167167
.avatar {
@@ -217,7 +217,7 @@
217217
line-height: 1;
218218
display: flex;
219219
border: 1px solid #eee;
220-
border-radius: var(--border-r);
220+
border-radius: var(--sk-border-radius);
221221
z-index: 2;
222222
}
223223
@@ -226,7 +226,7 @@
226226
gap: 1rem;
227227
padding: 0 1rem;
228228
height: 100%;
229-
border-radius: var(--border-r);
229+
border-radius: var(--sk-border-radius);
230230
align-items: center;
231231
}
232232
@@ -247,20 +247,20 @@
247247
}
248248
249249
h2 {
250-
color: var(--text);
251-
font-size: var(--h5);
250+
color: var(--sk-text-2);
251+
font-size: var(--sk-text-s);
252252
font-weight: 400;
253253
overflow: hidden;
254254
text-overflow: ellipsis;
255255
}
256256
257257
li a {
258258
display: block;
259-
background: var(--back-light);
259+
background: var(--sk-back-3);
260260
padding: 1rem 3rem 1rem 1rem;
261261
height: 100%;
262262
line-height: 1;
263-
border-radius: var(--border-r);
263+
border-radius: var(--sk-border-radius);
264264
text-decoration: none;
265265
}
266266
@@ -282,7 +282,7 @@
282282
}
283283
284284
ul:not(.selecting) li:hover a {
285-
background-color: var(--second);
285+
background-color: var(--sk-theme-2);
286286
color: white;
287287
}
288288

sites/svelte.dev/src/routes/(authed)/repl/[id]/+page.svelte

+3-4
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
import { mapbox_setup } from '../../../../config.js';
77
import AppControls from './AppControls.svelte';
88
9-
/** @type {import('./$types').PageData} */
109
export let data;
1110
1211
let version = data.version;
@@ -41,7 +40,7 @@
4140
4241
afterNavigate(() => {
4342
repl.set({
44-
components: data.gist.components,
43+
components: data.gist.components
4544
});
4645
});
4746
@@ -99,11 +98,11 @@
9998
<style>
10099
.repl-outer {
101100
position: relative;
102-
height: calc(100vh - var(--nav-h));
101+
height: calc(100vh - var(--sk-nav-height));
103102
--app-controls-h: 5.6rem;
104103
--pane-controls-h: 4.2rem;
105104
overflow: hidden;
106-
background-color: var(--back);
105+
background-color: var(--sk-back-1);
107106
padding: var(--app-controls-h) 0 0 0;
108107
/* margin: 0 calc(var(--side-nav) * -1); */
109108
box-sizing: border-box;

sites/svelte.dev/src/routes/(authed)/repl/[id]/AppControls.svelte

+11-11
Original file line numberDiff line numberDiff line change
@@ -45,15 +45,15 @@
4545
method: 'POST',
4646
credentials: 'include',
4747
headers: {
48-
'Content-Type': 'application/json',
48+
'Content-Type': 'application/json'
4949
},
5050
body: JSON.stringify({
5151
name,
5252
files: components.map((component) => ({
5353
name: `${component.name}.${component.type}`,
54-
source: component.source,
55-
})),
56-
}),
54+
source: component.source
55+
}))
56+
})
5757
});
5858
5959
if (r.status < 200 || r.status >= 300) {
@@ -110,15 +110,15 @@
110110
method: 'PUT',
111111
credentials: 'include',
112112
headers: {
113-
'Content-Type': 'application/json',
113+
'Content-Type': 'application/json'
114114
},
115115
body: JSON.stringify({
116116
name,
117117
files: components.map((component) => ({
118118
name: `${component.name}.${component.type}`,
119-
source: component.source,
120-
})),
121-
}),
119+
source: component.source
120+
}))
121+
})
122122
});
123123
124124
if (r.status < 200 || r.status >= 300) {
@@ -164,7 +164,7 @@
164164
files.push(
165165
...components.map((component) => ({
166166
path: `src/${component.name}.${component.type}`,
167-
data: component.source,
167+
data: component.source
168168
}))
169169
);
170170
files.push({
@@ -175,7 +175,7 @@ var app = new App({
175175
target: document.body
176176
});
177177
178-
export default app;`,
178+
export default app;`
179179
});
180180
181181
downloadBlob(doNotZip.toBlob(files), 'svelte-app.zip');
@@ -242,7 +242,7 @@ export default app;`,
242242
display: flex;
243243
align-items: center;
244244
justify-content: space-between;
245-
padding: 0.6rem var(--side-nav);
245+
padding: 0.6rem var(--sk-page-padding-side);
246246
background-color: var(--sk-back-4);
247247
color: var(--sk-text-1);
248248
white-space: nowrap;

sites/svelte.dev/src/routes/(authed)/repl/[id]/UserMenu.svelte

+3-3
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
/* position: relative; padding: 0 2em 0 0; */
4848
line-height: 1;
4949
display: none;
50-
font-family: var(--font);
50+
font-family: var(--sk-font);
5151
font-size: 1.6rem;
5252
opacity: 0.7;
5353
}
@@ -72,7 +72,7 @@
7272
min-width: 10em;
7373
top: 3rem;
7474
right: -1.6rem;
75-
background-color: var(--second);
75+
background-color: var(--sk-theme-2);
7676
padding: 0.8rem 1.6rem;
7777
z-index: 99;
7878
text-align: left;
@@ -84,7 +84,7 @@
8484
.menu button,
8585
.menu a {
8686
background-color: transparent;
87-
font-family: var(--font);
87+
font-family: var(--sk-font);
8888
font-size: 1.6rem;
8989
opacity: 0.7;
9090
padding: 0.4rem 0;

sites/svelte.dev/src/routes/(authed)/repl/embed/+page.svelte

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
left: 0;
2727
width: 100%;
2828
height: 100%;
29-
background-color: var(--back);
29+
background-color: var(--sk-back-1);
3030
overflow: hidden;
3131
box-sizing: border-box;
3232
--pane-controls-h: 4.2rem;

sites/svelte.dev/src/routes/+error.svelte

+3-3
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545

4646
<style>
4747
.container {
48-
padding: var(--top-offset) var(--side-nav) 6rem var(--side-nav);
48+
padding: var(--sk-page-padding-top) var(--sk-page-padding-side) 6rem var(--sk-page-padding-side);
4949
}
5050
5151
h1,
@@ -64,10 +64,10 @@
6464
}
6565
6666
.error {
67-
background-color: var(--second);
67+
background-color: var(--sk-theme-2);
6868
color: white;
6969
padding: 12px 16px;
70-
font: 600 16px/1.7 var(--font);
70+
font: 600 16px/1.7 var(--sk-font);
7171
border-radius: 2px;
7272
}
7373
</style>

sites/svelte.dev/src/routes/+page.svelte

+3-3
Original file line numberDiff line numberDiff line change
@@ -123,12 +123,12 @@ npm run dev
123123
section {
124124
position: relative;
125125
margin: 10rem auto;
126-
padding: 0 var(--side-nav);
126+
padding: 0 var(--sk-page-padding-side);
127127
max-width: 120rem;
128128
}
129129
130130
.blurb-shifter {
131-
margin-top: calc(-10rem + var(--side-nav));
131+
margin-top: calc(-10rem + var(--sk-page-padding-side));
132132
}
133133
134134
footer {
@@ -139,7 +139,7 @@ npm run dev
139139
}
140140
141141
footer a {
142-
color: var(--text);
142+
color: var(--sk-text-2);
143143
padding: 0.5rem 1rem;
144144
display: block;
145145
}

0 commit comments

Comments
 (0)