|
|
@ -29,6 +29,8 @@
|
|
|
|
export let showAst = false;
|
|
|
|
export let showAst = false;
|
|
|
|
export let autocomplete = true;
|
|
|
|
export let autocomplete = true;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
let runes = false;
|
|
|
|
|
|
|
|
|
|
|
|
export function toJSON() {
|
|
|
|
export function toJSON() {
|
|
|
|
return {
|
|
|
|
return {
|
|
|
|
imports: $bundle?.imports ?? [],
|
|
|
|
imports: $bundle?.imports ?? [],
|
|
|
@ -113,9 +115,6 @@
|
|
|
|
/** @type {ReplContext['toggleable']} */
|
|
|
|
/** @type {ReplContext['toggleable']} */
|
|
|
|
const toggleable = writable(false);
|
|
|
|
const toggleable = writable(false);
|
|
|
|
|
|
|
|
|
|
|
|
/** @type {ReplContext['runes_mode']} */
|
|
|
|
|
|
|
|
const runes_mode = writable(false);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** @type {ReplContext['bundler']} */
|
|
|
|
/** @type {ReplContext['bundler']} */
|
|
|
|
const bundler = writable(null);
|
|
|
|
const bundler = writable(null);
|
|
|
|
|
|
|
|
|
|
|
@ -133,7 +132,6 @@
|
|
|
|
cursor_pos,
|
|
|
|
cursor_pos,
|
|
|
|
module_editor,
|
|
|
|
module_editor,
|
|
|
|
toggleable,
|
|
|
|
toggleable,
|
|
|
|
runes_mode,
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
EDITOR_STATE_MAP,
|
|
|
|
EDITOR_STATE_MAP,
|
|
|
|
|
|
|
|
|
|
|
@ -256,7 +254,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
if ($selected.type === 'svelte' || $selected.type === 'js') {
|
|
|
|
if ($selected.type === 'svelte' || $selected.type === 'js') {
|
|
|
|
compiled = await compiler.compile($selected, $compile_options, false);
|
|
|
|
compiled = await compiler.compile($selected, $compile_options, false);
|
|
|
|
$runes_mode = compiled.metadata?.runes ?? false;
|
|
|
|
runes = compiled.result.metadata?.runes ?? false;
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
runes = false;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -324,7 +324,7 @@
|
|
|
|
max="-4.1rem"
|
|
|
|
max="-4.1rem"
|
|
|
|
>
|
|
|
|
>
|
|
|
|
<section slot="a">
|
|
|
|
<section slot="a">
|
|
|
|
<ComponentSelector show_modified={showModified} on:add on:remove />
|
|
|
|
<ComponentSelector show_modified={showModified} {runes} on:add on:remove />
|
|
|
|
<ModuleEditor
|
|
|
|
<ModuleEditor
|
|
|
|
{autocomplete}
|
|
|
|
{autocomplete}
|
|
|
|
error={compiled?.result.error}
|
|
|
|
error={compiled?.result.error}
|
|
|
|