For some reason the EditorTheme is still being imported even though I'm tree shaking, thus overriding my own shadcn settings.
I think EditorTheme shouldn't be included in the index, but maybe on it's own, like so?
When I hover over a route, the route is being prefetched thus also the component listed below. And you can dynamically see my theme change π
<script lang="ts">
import type { Editor } from '@nextlint/svelte';
import { SvelteEditor } from '@nextlint/svelte';
import type { Content, Extensions, JSONContent } from '@tiptap/core';
import { cn } from '$lib/utils/ui';
export let name: string;
export let placeholder = 'Start typing...';
export let value: Content;
function handleOnChange(editor: Editor) {
value = JSON.stringify(editor.getJSON(), null);
}
</script>
<div
class={cn(
'dark:border-border min-h-[200px] rounded-md border bg-white !p-4 px-3 py-2 shadow-sm ring-offset-white dark:bg-gray-950 dark:ring-gray-950'
)}
>
<SvelteEditor content={value} {placeholder} onChange={handleOnChange} />
<input type="hidden" {name} bind:value />
</div>