Skip to content

Commit bd30145

Browse files
committed
fix
1 parent 2a13955 commit bd30145

File tree

5 files changed

+8
-7
lines changed

5 files changed

+8
-7
lines changed

apps/www/src/registry/default/plate-ui/block-discussion.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,8 @@ import {
4343
isResolvedSuggestion,
4444
useResolveSuggestion,
4545
} from './block-suggestion';
46+
import { type TComment, CommentItem } from './comment';
4647
import { CommentCreateForm } from './comment-create-form';
47-
import { type TComment, CommentItem } from './comment-item';
4848

4949
export const ForceUpdateContext = createContext<() => void>(() => {});
5050

apps/www/src/registry/default/plate-ui/block-suggestion.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,8 @@ import type { TDiscussion } from './block-discussion';
5151
import { suggestionPlugin } from '../components/editor/plugins/suggestion-plugin';
5252
import { Avatar, AvatarFallback, AvatarImage } from './avatar';
5353
import { Button } from './button';
54+
import { type TComment, CommentItem, formatCommentDate } from './comment';
5455
import { CommentCreateForm } from './comment-create-form';
55-
import { type TComment, CommentItem, formatCommentDate } from './comment-item';
5656

5757
export interface ResolvedSuggestion extends TResolvedSuggestion {
5858
comments: TComment[];

apps/www/src/registry/registry-ui.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ export const uiComponents: Registry['items'] = [
216216
files: [
217217
// { path: 'plate-ui/comment-avatar.tsx', type: 'registry:ui' },
218218
{ path: 'plate-ui/comment-create-form.tsx', type: 'registry:ui' },
219-
{ path: 'plate-ui/comment-item.tsx', type: 'registry:ui' },
219+
{ path: 'plate-ui/comment.tsx', type: 'registry:ui' },
220220
// { path: 'plate-ui/comment-more-dropdown.tsx', type: 'registry:ui' },
221221
// { path: 'plate-ui/comment-reply-items.tsx', type: 'registry:ui' },
222222
// { path: 'plate-ui/comment-resolve-button.tsx', type: 'registry:ui' },

packages/suggestion/src/lib/queries/findSuggestionProps.ts

+5-4
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
import {
2+
type NodeEntry,
23
type Point,
34
type SlateEditor,
45
type TLocation,
56
nanoid,
67
} from '@udecode/plate';
78

8-
import type { TSuggestionElement } from '../types';
9+
import type { TSuggestionElement, TSuggestionText } from '../types';
910

1011
import { BaseSuggestionPlugin } from '../BaseSuggestionPlugin';
1112
import { getInlineSuggestionData, isCurrentUserSuggestion } from '../utils';
@@ -24,7 +25,7 @@ export const findSuggestionProps = (
2425
let entry = api.suggestion.node({
2526
at,
2627
isText: true,
27-
});
28+
}) as NodeEntry<TSuggestionText> | undefined;
2829

2930
if (!entry) {
3031
let start: Point;
@@ -42,7 +43,7 @@ export const findSuggestionProps = (
4243
entry = api.suggestion.node({
4344
at: nextPoint,
4445
isText: true,
45-
});
46+
}) as NodeEntry<TSuggestionText> | undefined;
4647

4748
if (!entry) {
4849
const prevPoint = editor.api.before(start);
@@ -51,7 +52,7 @@ export const findSuggestionProps = (
5152
entry = api.suggestion.node({
5253
at: prevPoint,
5354
isText: true,
54-
});
55+
}) as NodeEntry<TSuggestionText> | undefined;
5556
}
5657
// <p>111111<insert_break></p>
5758
// <p><cursor /></p>

0 commit comments

Comments
 (0)