chore: update vite.config.ts and IMEditor dependencies
This commit is contained in:
parent
881fbdb6ea
commit
963e3ee299
@ -31,6 +31,8 @@ export interface IMEditorProps {
|
|||||||
};
|
};
|
||||||
onUploadFile?: (file: File) => Promise<{ id: string; url: string }>;
|
onUploadFile?: (file: File) => Promise<{ id: string; url: string }>;
|
||||||
placeholder?: string;
|
placeholder?: string;
|
||||||
|
/** Called whenever the editor content changes (on every keystroke) */
|
||||||
|
onUpdate?: (text: string) => void;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface IMEditorHandle {
|
export interface IMEditorHandle {
|
||||||
@ -321,7 +323,7 @@ function MentionDropdown({
|
|||||||
// ─── Main Component ────────────────────────────────────────────────────────────
|
// ─── Main Component ────────────────────────────────────────────────────────────
|
||||||
|
|
||||||
export const IMEditor = forwardRef<IMEditorHandle, IMEditorProps>(function IMEditor(
|
export const IMEditor = forwardRef<IMEditorHandle, IMEditorProps>(function IMEditor(
|
||||||
{replyingTo, onCancelReply, onSend, mentionItems, onUploadFile, placeholder = 'Message…'},
|
{replyingTo, onCancelReply, onSend, mentionItems, onUploadFile, placeholder = 'Message…', onUpdate},
|
||||||
ref,
|
ref,
|
||||||
) {
|
) {
|
||||||
const {resolvedTheme} = useTheme();
|
const {resolvedTheme} = useTheme();
|
||||||
@ -559,6 +561,7 @@ export const IMEditor = forwardRef<IMEditorHandle, IMEditorProps>(function IMEdi
|
|||||||
} else {
|
} else {
|
||||||
setMentionOpen(false);
|
setMentionOpen(false);
|
||||||
}
|
}
|
||||||
|
onUpdate?.(text);
|
||||||
},
|
},
|
||||||
onFocus: () => setFocused(true),
|
onFocus: () => setFocused(true),
|
||||||
onBlur: () => setFocused(false),
|
onBlur: () => setFocused(false),
|
||||||
|
|||||||
@ -14,9 +14,7 @@ export default defineConfig({
|
|||||||
'react-dom',
|
'react-dom',
|
||||||
'react-router-dom',
|
'react-router-dom',
|
||||||
],
|
],
|
||||||
exclude: [
|
exclude: []
|
||||||
// Exclude local Rust compilation artifacts - not npm packages
|
|
||||||
]
|
|
||||||
},
|
},
|
||||||
resolve: {
|
resolve: {
|
||||||
alias: {
|
alias: {
|
||||||
@ -26,7 +24,6 @@ export default defineConfig({
|
|||||||
build: {
|
build: {
|
||||||
rolldownOptions: {
|
rolldownOptions: {
|
||||||
external: [
|
external: [
|
||||||
// Use forward slashes for cross-platform compatibility
|
|
||||||
'libs/',
|
'libs/',
|
||||||
'target/',
|
'target/',
|
||||||
],
|
],
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user