File tree Expand file tree Collapse file tree 6 files changed +13
-14
lines changed Expand file tree Collapse file tree 6 files changed +13
-14
lines changed Original file line number Diff line number Diff line change 1
1
<script lang =" ts" >
2
2
import { afterNavigate } from ' $app/navigation' ;
3
- import { page } from ' $app/stores ' ;
3
+ import { page } from ' $app/state ' ;
4
4
import { focusable_children , trap } from ' @sveltejs/site-kit/actions' ;
5
5
import { Icon } from ' @sveltejs/site-kit/components' ;
6
6
import type { Snippet } from ' svelte' ;
46
46
47
47
// except parents of the current one
48
48
const current = details .querySelector (
49
- ` [href="${$ page .url .pathname }"] `
49
+ ` [href="${page .url .pathname }"] `
50
50
) as HTMLAnchorElement | null ;
51
51
if (! current ) return ;
52
52
Original file line number Diff line number Diff line change 7
7
import { mapbox_setup } from ' ../../../../config.js' ;
8
8
import AppControls from ' ./AppControls.svelte' ;
9
9
import { compress_and_encode_text , decode_and_decompress_text } from ' ./gzip.js' ;
10
- import { page } from ' $app/stores ' ;
10
+ import { page } from ' $app/state ' ;
11
11
import type { File } from ' editor' ;
12
12
13
13
let { data } = $props ();
20
20
let setting_hash: any = null ;
21
21
22
22
// svelte-ignore non_reactive_update
23
- let version = $ page .url .searchParams .get (' version' ) || ' latest' ;
23
+ let version = page .url .searchParams .get (' version' ) || ' latest' ;
24
24
let is_pr_or_commit_version = version .startsWith (' pr-' ) || version .startsWith (' commit-' );
25
25
26
26
// Hashed URLs are less safe (we can't delete malicious REPLs), therefore
27
27
// don't allow links to escape the sandbox restrictions
28
- const can_escape = browser && ! $ page .url .hash ;
28
+ const can_escape = browser && ! page .url .hash ;
29
29
30
30
if (version !== ' local' && ! is_pr_or_commit_version ) {
31
31
$effect (() => {
Original file line number Diff line number Diff line change 1
1
<script lang =" ts" >
2
- import { page } from ' $app/stores ' ;
2
+ import { page } from ' $app/state ' ;
3
3
import UserMenu from ' ./UserMenu.svelte' ;
4
4
import { Icon } from ' @sveltejs/site-kit/components' ;
5
5
import { isMac } from ' $lib/utils/compat.js' ;
193
193
<li >
194
194
<a
195
195
href ="/playground/ {example .slug }"
196
- aria-current ={$ page .params .id === example .slug ? ' page' : undefined }
196
+ aria-current ={page .params .id === example .slug ? ' page' : undefined }
197
197
>
198
198
{example .title }
199
199
</a >
Original file line number Diff line number Diff line change 4
4
import { theme } from ' @sveltejs/site-kit/stores' ;
5
5
import { Repl } from ' @sveltejs/repl' ;
6
6
import { mapbox_setup } from ' ../../../../../config.js' ;
7
- import { page } from ' $app/stores ' ;
7
+ import { page } from ' $app/state ' ;
8
8
9
9
let { data } = $props ();
10
10
11
11
let repl = $state () as ReturnType <typeof Repl >;
12
12
13
- // svelte-ignore non_reactive_update
14
- let version = $page .url .searchParams .get (' version' ) || ' latest' ;
13
+ let version = page .url .searchParams .get (' version' ) || ' latest' ;
15
14
let is_pr_or_commit_version = version .startsWith (' pr-' ) || version .startsWith (' commit-' );
16
15
17
16
if (version !== ' local' && ! is_pr_or_commit_version ) {
Original file line number Diff line number Diff line change 12
12
import { solution } from ' ./state.svelte' ;
13
13
import { needs_webcontainers , text_files } from ' ./shared' ;
14
14
import OutputRollup from ' ./OutputRollup.svelte' ;
15
- import { page } from ' $app/stores ' ;
15
+ import { page } from ' $app/state ' ;
16
16
import Controls from ' ./Controls.svelte' ;
17
17
import type { Item } from ' editor' ;
18
18
import type { Snapshot } from ' ./$types.js' ;
319
319
</section >
320
320
321
321
<section slot =" b" class =" preview" >
322
- {#if needs_webcontainers ($ page .data .exercise )}
322
+ {#if needs_webcontainers (page .data .exercise )}
323
323
<Output exercise ={data .exercise } {paused } {workspace } />
324
324
{:else }
325
325
<OutputRollup />
Original file line number Diff line number Diff line change 1
1
<script lang =" ts" >
2
- import { page } from ' $app/stores ' ;
2
+ import { page } from ' $app/state ' ;
3
3
import SecondaryNav from ' $lib/components/SecondaryNav.svelte' ;
4
4
import ModalDropdown from ' $lib/components/ModalDropdown.svelte' ;
5
5
import type { Exercise , PartStub } from ' $lib/tutorial' ;
30
30
{#each chapter .exercises as exercise }
31
31
<li value ={exercise .slug }>
32
32
<a
33
- aria-current ={$ page .url .pathname === ` /tutorial/${exercise .slug } `
33
+ aria-current ={page .url .pathname === ` /tutorial/${exercise .slug } `
34
34
? ' page'
35
35
: undefined }
36
36
href ="/tutorial/ {exercise .slug }" >{exercise .title }</a
You can’t perform that action at this time.
0 commit comments