Skip to content

Commit 5d76cdd

Browse files
committed
oops
1 parent a42ba71 commit 5d76cdd

File tree

13 files changed

+32
-39
lines changed

13 files changed

+32
-39
lines changed

packages/svelte/src/compiler/phases/2-analyze/visitors/BindDirective.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ export function BindDirective(node, context) {
2424
validate_no_const_assignment(node, node.expression, context.state.scope, true);
2525

2626
const assignee = node.expression;
27-
2827
const left = object(assignee);
2928

3029
if (left === null) {

sites/svelte-5-preview/src/lib/Input/ComponentSelector.svelte

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -248,8 +248,7 @@
248248
<input
249249
autofocus
250250
spellcheck={false}
251-
bind:value
252-
input_value}
251+
bind:value={input_value}
253252
on:focus={select_input}
254253
on:blur={close_edit}
255254
on:keydown={(e) => {

sites/svelte-5-preview/src/lib/Input/ModuleEditor.svelte

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,7 @@
2121
<div class="editor-wrapper">
2222
<div class="editor notranslate" translate="no">
2323
<CodeMirror
24-
bind:this
25-
$module_editor}
24+
bind:this={$module_editor}
2625
diagnostics={() => {
2726
if (error) {
2827
return [

sites/svelte-5-preview/src/lib/Output/AstNode.svelte

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,7 @@
7777
</script>
7878
7979
<li
80-
bind:this
81-
list_item_el}
80+
bind:this={list_item_el}
8281
class:marked={!is_root && is_leaf}
8382
on:mouseover={handle_mark_text}
8483
on:focus={handle_mark_text}

sites/svelte-5-preview/src/lib/Output/CompilerOptions.svelte

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,32 +11,32 @@
1111
<div class="option">
1212
<span class="key">generate:</span>
1313

14-
<input id="client" type="radio" bind:group $compile_options.generate} value="client" />
14+
<input id="client" type="radio" bind:group={$compile_options.generate} value="client" />
1515
<label for="client"><span class="string">"client"</span></label>
1616

17-
<input id="server" type="radio" bind:group $compile_options.generate} value="server" />
17+
<input id="server" type="radio" bind:group={$compile_options.generate} value="server" />
1818
<label for="server"><span class="string">"server"</span>,</label>
1919
</div>
2020

2121
<div class="option">
2222
<span class="key">css:</span>
2323

24-
<input id="injected" type="radio" bind:group $compile_options.css} value="injected" />
24+
<input id="injected" type="radio" bind:group={$compile_options.css} value="injected" />
2525
<label for="injected"><span class="string">"injected"</span></label>
2626

27-
<input id="external" type="radio" bind:group $compile_options.css} value="external" />
27+
<input id="external" type="radio" bind:group={$compile_options.css} value="external" />
2828
<label for="external"><span class="string">"external"</span>,</label>
2929
</div>
3030

3131
<label class="option">
3232
<span class="key">dev:</span>
33-
<Checkbox bind:checked $compile_options.dev} />
33+
<Checkbox bind:checked={$compile_options.dev} />
3434
<span class="boolean">{$compile_options.dev}</span>,
3535
</label>
3636

3737
<label class="option">
3838
<span class="key">hmr:</span>
39-
<Checkbox bind:checked $compile_options.hmr} />
39+
<Checkbox bind:checked={$compile_options.hmr} />
4040
<span class="boolean">{$compile_options.hmr}</span>,
4141
</label>
4242
});

sites/svelte-5-preview/src/lib/Output/Output.svelte

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,7 @@
7777
<!-- component viewer -->
7878
<div class="tab-content" class:visible={selected?.type !== 'md' && view === 'result'}>
7979
<Viewer
80-
bind:error
81-
runtimeError}
80+
bind:error={runtimeError}
8281
{status}
8382
{relaxed}
8483
{injectedJS}
@@ -90,11 +89,11 @@
9089
<!-- js output -->
9190
<div class="tab-content" class:visible={selected?.type !== 'md' && view === 'js'}>
9291
{#if embedded}
93-
<CodeMirror bind:this js_editor} readonly />
92+
<CodeMirror bind:this={js_editor} readonly />
9493
{:else}
9594
<PaneWithPanel pos="50%" panel="Compiler options">
9695
<div slot="main">
97-
<CodeMirror bind:this js_editor} readonly />
96+
<CodeMirror bind:this={js_editor} readonly />
9897
</div>
9998
10099
<div slot="panel-body">
@@ -106,7 +105,7 @@
106105
107106
<!-- css output -->
108107
<div class="tab-content" class:visible={selected?.type !== 'md' && view === 'css'}>
109-
<CodeMirror bind:this css_editor} readonly />
108+
<CodeMirror bind:this={css_editor} readonly />
110109
</div>
111110
112111
<!-- ast output -->

sites/svelte-5-preview/src/lib/Output/Viewer.svelte

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -254,8 +254,7 @@
254254
<iframe
255255
title="Result"
256256
class:inited
257-
bind:this
258-
iframe}
257+
bind:this={iframe}
259258
sandbox={[
260259
'allow-popups-to-escape-sandbox',
261260
'allow-scripts',

sites/svelte-5-preview/src/lib/Repl.svelte

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -338,7 +338,7 @@
338338
339339
<svelte:window on:beforeunload={before_unload} />
340340
341-
<div class="container" class:toggleable={$toggleable} bind:clientWidth width}>
341+
<div class="container" class:toggleable={$toggleable} bind:clientWidth={width}>
342342
<div class="viewport" class:output={show_output}>
343343
<SplitPane
344344
--color="var(--sk-text-4)"
@@ -374,7 +374,7 @@
374374
</div>
375375
376376
{#if $toggleable}
377-
<InputOutputToggle bind:checked show_output} />
377+
<InputOutputToggle bind:checked={show_output} />
378378
{/if}
379379
</div>
380380

sites/svelte-5-preview/src/routes/+page.svelte

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,8 +88,7 @@
8888
/>
8989

9090
<Repl
91-
bind:this
92-
repl}
91+
bind:this={repl}
9392
autocomplete={true}
9493
on:add={change_from_editor}
9594
on:change={change_from_editor}

sites/svelte-5-preview/src/routes/docs/content/01-api/02-runes.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ To run _side-effects_ when the component is mounted to the DOM, and when values
193193
});
194194
</script>
195195
196-
<canvas bind:this canvas} width="100" height="100" />
196+
<canvas bind:this={canvas} width="100" height="100" />
197197
```
198198

199199
The function passed to `$effect` will run when the component mounts, and will re-run after any changes to the values it reads that were declared with `$state` or `$derived` (including those passed in with `$props`). Re-runs are batched (i.e. changing `color` and `size` in the same moment won't cause two separate runs), and happen after any DOM updates have been applied.
@@ -346,12 +346,12 @@ You might be tempted to do something convoluted with effects to link one value t
346346
</script>
347347
348348
<label>
349-
<input type="range" bind:value spent} max={total} />
349+
<input type="range" bind:value={spent} max={total} />
350350
{spent}/{total} spent
351351
</label>
352352
353353
<label>
354-
<input type="range" bind:value left} max={total} />
354+
<input type="range" bind:value={left} max={total} />
355355
{left}/{total} left
356356
</label>
357357
```
@@ -414,12 +414,12 @@ If you need to use bindings, for whatever reason (for example when you want some
414414
</script>
415415
416416
<label>
417-
<input type="range" bind:value spent} max={total} />
417+
<input type="range" bind:value={spent} max={total} />
418418
{spent}/{total} spent
419419
</label>
420420
421421
<label>
422-
<input type="range" bind:value left.value} max={total} />
422+
<input type="range" bind:value={left.value} max={total} />
423423
{left.value}/{total} left
424424
</label>
425425
```
@@ -467,7 +467,7 @@ In rare cases, you may need to run code _before_ the DOM updates. For this we ca
467467
});
468468
</script>
469469
470-
<div bind:this div}>
470+
<div bind:this={div}>
471471
{#each messages as message}
472472
<p>{message}</p>
473473
{/each}
@@ -627,7 +627,7 @@ or array using [fine-grained reactivity](/docs/fine-grained-reactivity) will cau
627627
</script>
628628
629629
<button onclick={() => count++}>Increment</button>
630-
<input bind:value message} />
630+
<input bind:value={message} />
631631
```
632632

633633
`$inspect` returns a property `with`, which you can invoke with a callback, which will then be invoked instead of `console.log`. The first argument to the callback is either `"init"` or `"update"`, all following arguments are the values passed to `$inspect`. [Demo:](/#H4sIAAAAAAAACkVQ24qDMBD9lSEUqlTqPlsj7ON-w7pQG8c2VCchmVSK-O-bKMs-DefKYRYx6BG9qL4XQd2EohKf1opC8Nsm4F84MkbsTXAqMbVXTltuWmp5RAZlAjFIOHjuGLOP_BKVqB00eYuKs82Qn2fNjyxLtcWeyUE2sCRry3qATQIpJRyD7WPVMf9TW-7xFu53dBcoSzAOrsqQNyOe2XUKr0Xi5kcMvdDB2wSYO-I9vKazplV1-T-d6ltgNgSG1KjVUy7ZtmdbdjqtzRcphxMS1-XubOITJtPrQWMvKnYB15_1F7KKadA_AQAA)

0 commit comments

Comments
 (0)