delete more unused stuff

pull/9385/head
Rich Harris 3 years ago
parent 7b7a7633ff
commit 9b3c38b116

@ -12,9 +12,6 @@
import Message from './Message.svelte';
import { svelteTheme } from './theme.js';
/** @type {import('./types').StartOrEnd | null} */
export let errorLoc = null;
/** @type {import('@codemirror/lint').LintSource | undefined} */
export let diagnostics = undefined;
@ -171,9 +168,6 @@
let marked = false;
/** @type {number | null}*/
let error_line = null;
let updating_externally = false;
/** @type {import('@codemirror/state').Extension[]} */
@ -181,29 +175,17 @@
let cursor_pos = 0;
$: {
if ($cmInstance.view) {
$: if ($cmInstance.view) {
fulfil_module_editor_ready();
}
}
$: if ($cmInstance.view && w && h) resize();
$: {
if (marked) {
$: if (marked) {
unmarkText();
marked = false;
}
if (errorLoc) {
markText({ from: errorLoc.character, to: errorLoc.character + 1, className: 'error-loc' });
error_line = errorLoc.line;
} else {
error_line = null;
}
}
const watcher = EditorView.updateListener.of((viewUpdate) => {
if (viewUpdate.selectionSet) {
cursorIndex.set(viewUpdate.state.selection.main.head);

@ -3,9 +3,6 @@
import { get_full_filename } from '$lib/utils.js';
import CodeMirror from '../CodeMirror.svelte';
/** @type {import('$lib/types').StartOrEnd | null} */
export let errorLoc = null;
/** @type {boolean} */
export let autocomplete;
@ -58,7 +55,6 @@
<div class="editor notranslate" translate="no">
<CodeMirror
bind:this={$module_editor}
{errorLoc}
{autocomplete}
diagnostics={$selected && $bundle ? diagnostics : () => []}
on:change={handle_change}

@ -10,9 +10,6 @@
/** @type {string | null} */
export let status;
/** @type {import('$lib/types').StartOrEnd | null} */
export let sourceErrorLoc = null;
/** @type {import('$lib/types').MessageDetails | null} */
export let runtimeError = null;
@ -97,11 +94,11 @@
<!-- js output -->
<div class="tab-content" class:visible={selected?.type !== 'md' && view === 'js'}>
{#if embedded}
<CodeMirror bind:this={js_editor} errorLoc={sourceErrorLoc} readonly />
<CodeMirror bind:this={js_editor} readonly />
{:else}
<PaneWithPanel pos="50%" panel="Compiler options">
<div slot="main">
<CodeMirror bind:this={js_editor} errorLoc={sourceErrorLoc} readonly />
<CodeMirror bind:this={js_editor} readonly />
</div>
<div slot="panel-body">
@ -113,7 +110,7 @@
<!-- css output -->
<div class="tab-content" class:visible={selected?.type !== 'md' && view === 'css'}>
<CodeMirror bind:this={css_editor} errorLoc={sourceErrorLoc} readonly />
<CodeMirror bind:this={css_editor} readonly />
</div>
<!-- ast output -->

@ -260,8 +260,6 @@
$: $toggleable = mobile && orientation === 'columns';
/** @type {import('./types').StartOrEnd} */
let sourceErrorLoc;
let width = 0;
let show_output = false;
@ -321,7 +319,7 @@
>
<section slot="a">
<ComponentSelector show_modified={showModified} on:add on:remove />
<ModuleEditor errorLoc={sourceErrorLoc} {autocomplete} />
<ModuleEditor {autocomplete} />
</section>
<section slot="b" style="height: 100%;">

Loading…
Cancel
Save