chore: rename blocks to artifacts (#793)

This commit is contained in:
Jeremy 2025-02-13 08:25:57 -08:00 committed by GitHub
parent 01f589b603
commit 81f909ac3a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
41 changed files with 473 additions and 473 deletions

View file

@ -9,7 +9,7 @@ import { createRoot } from 'react-dom/client';
import { Suggestion as PreviewSuggestion } from '@/components/suggestion';
import type { Suggestion } from '@/lib/db/schema';
import { BlockKind } from '@/components/block';
import { ArtifactKind } from '@/components/artifact';
export interface UISuggestion extends Suggestion {
selectionStart: number;
@ -70,7 +70,7 @@ export function projectWithPositions(
export function createSuggestionWidget(
suggestion: UISuggestion,
view: EditorView,
blockKind: BlockKind = 'text',
artifactKind: ArtifactKind = 'text',
): { dom: HTMLElement; destroy: () => void } {
const dom = document.createElement('span');
const root = createRoot(dom);
@ -117,7 +117,7 @@ export function createSuggestionWidget(
<PreviewSuggestion
suggestion={suggestion}
onApply={onApply}
blockKind={blockKind}
artifactKind={artifactKind}
/>,
);