Update broken imports

This commit is contained in:
Nate Kelley 2025-07-29 18:05:16 -06:00
parent 0d0ec231c3
commit d132dca2a5
No known key found for this signature in database
GPG Key ID: FD90372AB8D98B4F
4 changed files with 10 additions and 7 deletions

View File

@ -524,14 +524,15 @@ const _THEMES = {
} as const; } as const;
Object.entries(_THEMES).forEach(([key, theme]) => { Object.entries(_THEMES).forEach(([key, theme]) => {
(_THEMES as any)[key] = { // @ts-expect-error - key is a string
_THEMES[key] = {
...theme, ...theme,
dark: themeColorsToCssVariables(theme.dark), dark: themeColorsToCssVariables(theme.dark),
light: themeColorsToCssVariables(theme.light) light: themeColorsToCssVariables(theme.light)
}; };
}); });
export const THEMES: Record<ThemeId, Theme> = _THEMES as any; export const THEMES: Record<ThemeId, Theme> = _THEMES;
export function themeColorsToCssVariables(colors: Record<string, string>): Record<string, string> { export function themeColorsToCssVariables(colors: Record<string, string>): Record<string, string> {
const cssVars = colors const cssVars = colors

View File

@ -64,7 +64,9 @@ export const BlockDraggable: RenderNodeWrapper = (props) => {
if (!enabled) return; if (!enabled) return;
return (props) => <Draggable {...props} />; const Component = (props: PlateElementProps) => <Draggable {...props} />;
Component.displayName = 'BlockDraggable';
return Component;
}; };
function Draggable(props: PlateElementProps) { function Draggable(props: PlateElementProps) {

View File

@ -13,7 +13,7 @@ import {
Heading1, Heading1,
Heading2, Heading2,
Heading3, Heading3,
Image, Image as ImageIcon,
Link2, Link2,
UnorderedList, UnorderedList,
OrderedList, OrderedList,
@ -138,7 +138,7 @@ const groups: Group[] = [
group: 'Media', group: 'Media',
items: [ items: [
{ {
icon: <Image />, icon: <ImageIcon />,
label: 'Image', label: 'Image',
value: KEYS.img value: KEYS.img
}, },

View File

@ -5,7 +5,7 @@ import * as React from 'react';
import type { DropdownMenuProps } from '@radix-ui/react-dropdown-menu'; import type { DropdownMenuProps } from '@radix-ui/react-dropdown-menu';
import { PlaceholderPlugin } from '@platejs/media/react'; import { PlaceholderPlugin } from '@platejs/media/react';
import { VolumeUp, FileCloud, Film, Image, Link } from '@/components/ui/icons'; import { VolumeUp, FileCloud, Film, Image as ImageIcon, Link } from '@/components/ui/icons';
import { isUrl, KEYS } from 'platejs'; import { isUrl, KEYS } from 'platejs';
import { useEditorRef } from 'platejs/react'; import { useEditorRef } from 'platejs/react';
import { toast } from 'sonner'; import { toast } from 'sonner';
@ -69,7 +69,7 @@ const MEDIA_CONFIG: Record<
accept: ['image/*'], accept: ['image/*'],
icon: ( icon: (
<div className="size-4"> <div className="size-4">
<Image /> <ImageIcon />
</div> </div>
), ),
title: 'Insert Image', title: 'Insert Image',