Skip to content

Commit 9b3c38b

Browse files
committed
delete more unused stuff
1 parent 7b7a763 commit 9b3c38b

File tree

4 files changed

+9
-36
lines changed

4 files changed

+9
-36
lines changed

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

Lines changed: 5 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,6 @@
1212
import Message from './Message.svelte';
1313
import { svelteTheme } from './theme.js';
1414
15-
/** @type {import('./types').StartOrEnd | null} */
16-
export let errorLoc = null;
17-
1815
/** @type {import('@codemirror/lint').LintSource | undefined} */
1916
export let diagnostics = undefined;
2017
@@ -171,37 +168,22 @@
171168
172169
let marked = false;
173170
174-
/** @type {number | null}*/
175-
let error_line = null;
176-
177171
let updating_externally = false;
178172
179173
/** @type {import('@codemirror/state').Extension[]} */
180174
let extensions = [];
181175
182176
let cursor_pos = 0;
183177
184-
$: {
185-
if ($cmInstance.view) {
186-
fulfil_module_editor_ready();
187-
}
178+
$: if ($cmInstance.view) {
179+
fulfil_module_editor_ready();
188180
}
189181
190182
$: if ($cmInstance.view && w && h) resize();
191183
192-
$: {
193-
if (marked) {
194-
unmarkText();
195-
marked = false;
196-
}
197-
198-
if (errorLoc) {
199-
markText({ from: errorLoc.character, to: errorLoc.character + 1, className: 'error-loc' });
200-
201-
error_line = errorLoc.line;
202-
} else {
203-
error_line = null;
204-
}
184+
$: if (marked) {
185+
unmarkText();
186+
marked = false;
205187
}
206188
207189
const watcher = EditorView.updateListener.of((viewUpdate) => {

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

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,6 @@
33
import { get_full_filename } from '$lib/utils.js';
44
import CodeMirror from '../CodeMirror.svelte';
55
6-
/** @type {import('$lib/types').StartOrEnd | null} */
7-
export let errorLoc = null;
8-
96
/** @type {boolean} */
107
export let autocomplete;
118
@@ -58,7 +55,6 @@
5855
<div class="editor notranslate" translate="no">
5956
<CodeMirror
6057
bind:this={$module_editor}
61-
{errorLoc}
6258
{autocomplete}
6359
diagnostics={$selected && $bundle ? diagnostics : () => []}
6460
on:change={handle_change}

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

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,6 @@
1010
/** @type {string | null} */
1111
export let status;
1212
13-
/** @type {import('$lib/types').StartOrEnd | null} */
14-
export let sourceErrorLoc = null;
15-
1613
/** @type {import('$lib/types').MessageDetails | null} */
1714
export let runtimeError = null;
1815
@@ -97,11 +94,11 @@
9794
<!-- js output -->
9895
<div class="tab-content" class:visible={selected?.type !== 'md' && view === 'js'}>
9996
{#if embedded}
100-
<CodeMirror bind:this={js_editor} errorLoc={sourceErrorLoc} readonly />
97+
<CodeMirror bind:this={js_editor} readonly />
10198
{:else}
10299
<PaneWithPanel pos="50%" panel="Compiler options">
103100
<div slot="main">
104-
<CodeMirror bind:this={js_editor} errorLoc={sourceErrorLoc} readonly />
101+
<CodeMirror bind:this={js_editor} readonly />
105102
</div>
106103

107104
<div slot="panel-body">
@@ -113,7 +110,7 @@
113110

114111
<!-- css output -->
115112
<div class="tab-content" class:visible={selected?.type !== 'md' && view === 'css'}>
116-
<CodeMirror bind:this={css_editor} errorLoc={sourceErrorLoc} readonly />
113+
<CodeMirror bind:this={css_editor} readonly />
117114
</div>
118115

119116
<!-- ast output -->

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

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -260,8 +260,6 @@
260260
261261
$: $toggleable = mobile && orientation === 'columns';
262262
263-
/** @type {import('./types').StartOrEnd} */
264-
let sourceErrorLoc;
265263
let width = 0;
266264
let show_output = false;
267265
@@ -321,7 +319,7 @@
321319
>
322320
<section slot="a">
323321
<ComponentSelector show_modified={showModified} on:add on:remove />
324-
<ModuleEditor errorLoc={sourceErrorLoc} {autocomplete} />
322+
<ModuleEditor {autocomplete} />
325323
</section>
326324
327325
<section slot="b" style="height: 100%;">

0 commit comments

Comments
 (0)