This commit is contained in:
Timothy Jaeryang Baek
2025-05-17 03:14:26 +04:00
parent 424f6f71cf
commit 9801a2d23f
5 changed files with 25 additions and 23 deletions

View File

@@ -25,7 +25,7 @@
export let preview = false;
export let floatingButtons = true;
export let onUpdate = () => {};
export let onSave = () => {};
export let onSourceClick = () => {};
export let onTaskClick = () => {};
@@ -164,15 +164,9 @@
}, [])}
{onSourceClick}
{onTaskClick}
{onUpdate}
onPreview={async (value) => {
await artifactCode.set(value);
await showControls.set(true);
await showArtifacts.set(true);
await showOverview.set(false);
}}
onCode={(value) => {
const { lang, code } = value;
{onSave}
onUpdate={(token) => {
const { lang, text: code } = token;
if (
($settings?.detectArtifacts ?? true) &&
@@ -184,6 +178,13 @@
showControls.set(true);
}
}}
onPreview={async (value) => {
console.log('Preview', value);
await artifactCode.set(value);
await showControls.set(true);
await showArtifacts.set(true);
await showOverview.set(false);
}}
/>
</div>