Skip to content

Commit

Permalink
menu
Browse files Browse the repository at this point in the history
  • Loading branch information
felixfeng33 committed Sep 30, 2024
1 parent 0e5bfb9 commit 3e8cd2a
Show file tree
Hide file tree
Showing 21 changed files with 427 additions and 512 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
'use client';
import { useEffect } from 'react';

import type { actionGroup } from '@/registry/default/plate-ui/menu';
import type { actionGroup } from '@udecode/plate-menu';

import { type PlateEditor, useEditorRef } from '@udecode/plate-core/react';

Expand Down
4 changes: 2 additions & 2 deletions apps/www/src/registry/default/plate-ui/ai-actions.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Icons } from '@/components/icons';
import type { Action } from '@udecode/plate-menu';

import type { Action } from './menu';
import { Icons } from '@/components/icons';

/** Common */
const ACTION_CHINESE = 'action_chinese';
Expand Down
9 changes: 2 additions & 7 deletions apps/www/src/registry/default/plate-ui/ai-menu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import {
streamInsertTextSelection,
} from '@udecode/plate-ai/react';
import { useEditorPlugin } from '@udecode/plate-core/react';
import { Ariakit } from '@udecode/plate-menu';
import { Ariakit, filterAndBuildMenuTree } from '@udecode/plate-menu';
import { focusEditor } from '@udecode/slate-react';
import isHotkey from 'is-hotkey';

Expand All @@ -43,12 +43,7 @@ import {
} from './ai-menu-items';
import { AIPreviewEditor } from './ai-previdew-editor';
import { Button } from './button';
import {
Menu,
comboboxVariants,
filterAndBuildMenuTree,
renderSearchMenuItems,
} from './menu';
import { Menu, comboboxVariants, renderSearchMenuItems } from './menu';

// eslint-disable-next-line react/display-name
export const AIMenu = memo(({ children }: React.PropsWithChildren) => {
Expand Down
Loading

0 comments on commit 3e8cd2a

Please sign in to comment.