mirror of
https://github.com/StanGirard/quivr.git
synced 2024-11-23 12:26:03 +03:00
feat(chatInput): use tiptap editor (#1752)
Issue: - https://github.com/StanGirard/quivr/issues/1700 - https://github.com/StanGirard/quivr/issues/1722 Follow-up: - https://github.com/StanGirard/quivr/issues/1753 Demo: https://github.com/StanGirard/quivr/assets/63923024/1e2f8ed9-2a08-48fa-ac19-60910feb4f8d
This commit is contained in:
parent
b912af86b8
commit
77c6ef6d98
@ -72,6 +72,13 @@ vi.mock("@tanstack/react-query", async () => {
|
||||
};
|
||||
});
|
||||
|
||||
vi.mock(
|
||||
"../components/ActionsBar/components/ChatInput/components/ChatEditor/ChatEditor",
|
||||
() => ({
|
||||
ChatEditor: () => <div data-testid="chat-input" />,
|
||||
})
|
||||
);
|
||||
|
||||
describe("Chat page", () => {
|
||||
it("should render chat page correctly", () => {
|
||||
const { getByTestId } = render(
|
||||
|
@ -1,51 +0,0 @@
|
||||
"use client";
|
||||
|
||||
import { useBrainContext } from "@/lib/context/BrainProvider/hooks/useBrainContext";
|
||||
|
||||
import { MentionInput } from "./components";
|
||||
import { MentionItem } from "./components/MentionItem";
|
||||
|
||||
type ChatBarProps = {
|
||||
onSubmit: () => void;
|
||||
setMessage: (text: string) => void;
|
||||
message: string;
|
||||
};
|
||||
|
||||
export const ChatBar = ({
|
||||
onSubmit,
|
||||
setMessage,
|
||||
message,
|
||||
}: ChatBarProps): JSX.Element => {
|
||||
const { currentBrain, setCurrentBrainId, currentPrompt, setCurrentPromptId } =
|
||||
useBrainContext();
|
||||
|
||||
return (
|
||||
<div className="flex flex-row flex-1 w-full item-start overflow-y-auto max-h-[10em] whitespace-pre-wrap">
|
||||
{currentBrain !== undefined && (
|
||||
<MentionItem
|
||||
text={currentBrain.name}
|
||||
onRemove={() => {
|
||||
setCurrentBrainId(null);
|
||||
}}
|
||||
trigger={"@"}
|
||||
/>
|
||||
)}
|
||||
{currentPrompt !== undefined && (
|
||||
<MentionItem
|
||||
text={currentPrompt.title}
|
||||
onRemove={() => {
|
||||
setCurrentPromptId(null);
|
||||
}}
|
||||
trigger={"#"}
|
||||
/>
|
||||
)}
|
||||
<div className="flex-1">
|
||||
<MentionInput
|
||||
message={message}
|
||||
setMessage={setMessage}
|
||||
onSubmit={onSubmit}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
};
|
@ -1,88 +0,0 @@
|
||||
import Editor from "@draft-js-plugins/editor";
|
||||
import { PopoverProps } from "@draft-js-plugins/mention/lib/MentionSuggestions/Popover";
|
||||
import { ComponentType, ReactElement } from "react";
|
||||
import { useTranslation } from "react-i18next";
|
||||
|
||||
import "@draft-js-plugins/mention/lib/plugin.css";
|
||||
import "draft-js/dist/Draft.css";
|
||||
|
||||
import { MentionTriggerType } from "@/app/chat/[chatId]/components/ActionsBar/types";
|
||||
|
||||
import { BrainSuggestionsContainer } from "./components/BrainSuggestionsContainer";
|
||||
import { PromptSuggestionsContainer } from "./components/PromptSuggestionsContainer";
|
||||
import { SuggestionRow } from "./components/SuggestionRow";
|
||||
import { useMentionInput } from "./hooks/useMentionInput";
|
||||
|
||||
type MentionInputProps = {
|
||||
onSubmit: () => void;
|
||||
setMessage: (text: string) => void;
|
||||
message: string;
|
||||
};
|
||||
|
||||
const triggerToSuggestionsContainer: Record<
|
||||
MentionTriggerType,
|
||||
ComponentType<PopoverProps>
|
||||
> = {
|
||||
"@": BrainSuggestionsContainer,
|
||||
"#": PromptSuggestionsContainer,
|
||||
};
|
||||
|
||||
export const MentionInput = ({
|
||||
onSubmit,
|
||||
setMessage,
|
||||
message,
|
||||
}: MentionInputProps): ReactElement => {
|
||||
const {
|
||||
mentionInputRef,
|
||||
MentionSuggestions,
|
||||
keyBindingFn,
|
||||
editorState,
|
||||
setOpen,
|
||||
onSearchChange,
|
||||
open,
|
||||
plugins,
|
||||
suggestions,
|
||||
onAddMention,
|
||||
handleEditorChange,
|
||||
currentTrigger,
|
||||
} = useMentionInput({
|
||||
message,
|
||||
onSubmit,
|
||||
setMessage,
|
||||
});
|
||||
|
||||
const { t } = useTranslation(["chat"]);
|
||||
|
||||
return (
|
||||
<div className="w-full" data-testid="chat-input">
|
||||
<Editor
|
||||
editorKey={"editor"}
|
||||
editorState={editorState}
|
||||
onChange={handleEditorChange}
|
||||
plugins={plugins}
|
||||
ref={mentionInputRef}
|
||||
placeholder={t("actions_bar_placeholder")}
|
||||
keyBindingFn={keyBindingFn}
|
||||
/>
|
||||
<div
|
||||
style={{
|
||||
// `open` should be directly passed to the MentionSuggestions component.
|
||||
// However, it is not working as expected since we are not able to click on button in custom suggestion renderer.
|
||||
// So, we are using this hack to make it work.
|
||||
opacity: open ? 1 : 0,
|
||||
}}
|
||||
>
|
||||
<MentionSuggestions
|
||||
open
|
||||
onOpenChange={setOpen}
|
||||
suggestions={suggestions}
|
||||
onSearchChange={onSearchChange}
|
||||
popoverContainer={triggerToSuggestionsContainer[currentTrigger]}
|
||||
onAddMention={onAddMention}
|
||||
entryComponent={SuggestionRow}
|
||||
renderEmptyPopup
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
};
|
@ -1,17 +0,0 @@
|
||||
import Link from "next/link";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import { MdAdd } from "react-icons/md";
|
||||
|
||||
export const AddNewPromptButton = (): JSX.Element => {
|
||||
const { t } = useTranslation(["chat"]);
|
||||
|
||||
return (
|
||||
<Link
|
||||
href={"/brains-management"}
|
||||
className="flex px-5 py-3 text-sm decoration-none text-center w-full justify-between items-center"
|
||||
>
|
||||
{t("new_prompt")}
|
||||
<MdAdd />
|
||||
</Link>
|
||||
);
|
||||
};
|
@ -1,8 +0,0 @@
|
||||
type BrainSuggestionProps = {
|
||||
content: string;
|
||||
};
|
||||
export const BrainSuggestion = ({
|
||||
content,
|
||||
}: BrainSuggestionProps): JSX.Element => {
|
||||
return <span>{content}</span>;
|
||||
};
|
@ -1,21 +0,0 @@
|
||||
import { Popover } from "@draft-js-plugins/mention";
|
||||
import { PopoverProps } from "@draft-js-plugins/mention/lib/MentionSuggestions/Popover";
|
||||
|
||||
import { AddBrainModal } from "@/lib/components/AddBrainModal";
|
||||
|
||||
export const BrainSuggestionsContainer = ({
|
||||
children,
|
||||
...popoverProps
|
||||
}: PopoverProps): JSX.Element => (
|
||||
<Popover {...popoverProps}>
|
||||
<div
|
||||
style={{
|
||||
width: "max-content",
|
||||
}}
|
||||
className="bg-white dark:bg-black border border-black/10 dark:border-white/25 rounded-md shadow-md overflow-y-auto"
|
||||
>
|
||||
{children}
|
||||
<AddBrainModal />
|
||||
</div>
|
||||
</Popover>
|
||||
);
|
@ -1,14 +0,0 @@
|
||||
type PromptSuggestionProps = {
|
||||
content: string;
|
||||
};
|
||||
export const PromptSuggestion = ({
|
||||
content,
|
||||
}: PromptSuggestionProps): JSX.Element => {
|
||||
return (
|
||||
<div className="flex flex-1 flex-row gap-2 w-full text-left px-5 py-2 text-sm text-gray-900 dark:text-gray-300">
|
||||
<div className="flex flex-1">
|
||||
<span>{content}</span>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
};
|
@ -1,21 +0,0 @@
|
||||
import { Popover } from "@draft-js-plugins/mention";
|
||||
import { PopoverProps } from "@draft-js-plugins/mention/lib/MentionSuggestions/Popover";
|
||||
|
||||
import { AddNewPromptButton } from "./AddNewPromptButton";
|
||||
|
||||
export const PromptSuggestionsContainer = ({
|
||||
children,
|
||||
...popoverProps
|
||||
}: PopoverProps): JSX.Element => (
|
||||
<Popover {...popoverProps}>
|
||||
<div
|
||||
style={{
|
||||
width: "max-content",
|
||||
}}
|
||||
className="bg-white dark:bg-black border border-black/10 dark:border-white/25 rounded-md shadow-md overflow-y-auto"
|
||||
>
|
||||
{children}
|
||||
<AddNewPromptButton />
|
||||
</div>
|
||||
</Popover>
|
||||
);
|
@ -1,44 +0,0 @@
|
||||
import { EntryComponentProps } from "@draft-js-plugins/mention/lib/MentionSuggestions/Entry/Entry";
|
||||
import { useRouter } from "next/navigation";
|
||||
import { MdShare } from "react-icons/md";
|
||||
|
||||
import { MentionTriggerType } from "@/app/chat/[chatId]/components/ActionsBar/types";
|
||||
import Button from "@/lib/components/ui/Button";
|
||||
|
||||
import { BrainSuggestion } from "./BrainSuggestion";
|
||||
import { PromptSuggestion } from "./PromptSuggestion";
|
||||
|
||||
export const SuggestionRow = ({
|
||||
mention,
|
||||
...otherProps
|
||||
}: EntryComponentProps): JSX.Element => {
|
||||
const router = useRouter();
|
||||
if ((mention.trigger as MentionTriggerType) === "@") {
|
||||
return (
|
||||
<div {...otherProps}>
|
||||
<div className="relative flex group px-4">
|
||||
<BrainSuggestion content={mention.name} />
|
||||
<div className="absolute right-0 flex flex-row">
|
||||
<Button
|
||||
className="group-hover:visible invisible hover:text-red-500 transition-[colors,opacity] p-1"
|
||||
onClick={() =>
|
||||
router.push(`/brains-management/${mention.id as string}#people`)
|
||||
}
|
||||
variant={"tertiary"}
|
||||
data-testId="share-brain-button"
|
||||
type="button"
|
||||
>
|
||||
<MdShare className="text-xl" />
|
||||
</Button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
return (
|
||||
<div {...otherProps}>
|
||||
<PromptSuggestion content={mention.name} />
|
||||
</div>
|
||||
);
|
||||
};
|
@ -1,5 +0,0 @@
|
||||
export * from "./AddNewPromptButton";
|
||||
export * from "./BrainSuggestion";
|
||||
export * from "./BrainSuggestionsContainer";
|
||||
export * from "./PromptSuggestion";
|
||||
export * from "./SuggestionRow";
|
@ -1,44 +0,0 @@
|
||||
import createMentionPlugin from "@draft-js-plugins/mention";
|
||||
import { useMemo } from "react";
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
|
||||
export const useMentionPlugin = () => {
|
||||
const { MentionSuggestions, plugins } = useMemo(() => {
|
||||
const mentionPlugin = createMentionPlugin({
|
||||
mentionComponent: () => <span />,
|
||||
mentionTrigger: ["@", "#"],
|
||||
mentionPrefix: "@#",
|
||||
popperOptions: {
|
||||
placement: "top-end",
|
||||
modifiers: [
|
||||
{
|
||||
name: "customStyle", // Custom modifier for applying styles
|
||||
enabled: true,
|
||||
phase: "beforeWrite",
|
||||
fn: ({ state }) => {
|
||||
state.styles.popper = {
|
||||
...state.styles.popper,
|
||||
minWidth: "auto",
|
||||
backgroundColor: "transparent",
|
||||
padding: "0",
|
||||
// We are adding a bottom margin to the suggestions container since it is overlapping with mention remove icon
|
||||
// Please, do not remove!
|
||||
marginBottom: "20px",
|
||||
};
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
});
|
||||
|
||||
const { MentionSuggestions: LegacyMentionSuggestions } = mentionPlugin;
|
||||
const legacyPlugins = [mentionPlugin];
|
||||
|
||||
return {
|
||||
plugins: legacyPlugins,
|
||||
MentionSuggestions: LegacyMentionSuggestions,
|
||||
};
|
||||
}, []);
|
||||
|
||||
return { MentionSuggestions, plugins };
|
||||
};
|
@ -1,48 +0,0 @@
|
||||
/* eslint-disable max-lines */
|
||||
import { MentionData } from "@draft-js-plugins/mention";
|
||||
import { EditorState } from "draft-js";
|
||||
import { useEffect, useState } from "react";
|
||||
|
||||
import { useBrainContext } from "@/lib/context/BrainProvider/hooks/useBrainContext";
|
||||
|
||||
import { MentionInputMentionsType } from "../../../../types";
|
||||
import { mapMinimalBrainToMentionData } from "../../utils/mapMinimalBrainToMentionData";
|
||||
import { mapPromptToMentionData } from "../../utils/mapPromptToMentionData";
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
|
||||
export const useMentionState = () => {
|
||||
const { allBrains, publicPrompts } = useBrainContext();
|
||||
|
||||
const [editorState, setEditorState] = useState(EditorState.createEmpty());
|
||||
|
||||
const [mentionItems, setMentionItems] = useState<MentionInputMentionsType>({
|
||||
"@": allBrains.map(mapMinimalBrainToMentionData),
|
||||
"#": publicPrompts.map(mapPromptToMentionData),
|
||||
});
|
||||
|
||||
const [suggestions, setSuggestions] = useState<MentionData[]>([]);
|
||||
|
||||
useEffect(() => {
|
||||
setMentionItems({
|
||||
...mentionItems,
|
||||
"@": allBrains.map(mapMinimalBrainToMentionData),
|
||||
});
|
||||
}, [allBrains]);
|
||||
|
||||
useEffect(() => {
|
||||
setMentionItems({
|
||||
...mentionItems,
|
||||
"#": publicPrompts.map(mapPromptToMentionData),
|
||||
});
|
||||
}, [publicPrompts]);
|
||||
|
||||
return {
|
||||
editorState,
|
||||
setEditorState,
|
||||
mentionItems,
|
||||
setSuggestions,
|
||||
setMentionItems,
|
||||
suggestions,
|
||||
publicPrompts,
|
||||
};
|
||||
};
|
@ -1,21 +0,0 @@
|
||||
import { MentionData } from "@draft-js-plugins/mention";
|
||||
import { EditorState } from "draft-js";
|
||||
|
||||
import { isMention } from "../../utils/isMention";
|
||||
|
||||
export const getEditorMentions = (editorState: EditorState): MentionData[] => {
|
||||
const contentState = editorState.getCurrentContent();
|
||||
const entities = contentState.getAllEntities();
|
||||
|
||||
const mentions: MentionData[] = [];
|
||||
|
||||
entities.forEach((contentBlock) => {
|
||||
if (isMention(contentBlock?.getType())) {
|
||||
mentions.push(
|
||||
(contentBlock?.getData() as { mention: MentionData }).mention
|
||||
);
|
||||
}
|
||||
});
|
||||
|
||||
return mentions;
|
||||
};
|
@ -1,22 +0,0 @@
|
||||
import { MentionData } from "@draft-js-plugins/mention";
|
||||
import { EditorState } from "draft-js";
|
||||
|
||||
export const getEditorText = (editorState: EditorState): string => {
|
||||
const mentions: string[] = [];
|
||||
const editorEntities = editorState.getCurrentContent().getAllEntities();
|
||||
|
||||
editorEntities.forEach((entity) => {
|
||||
const entityData = entity?.getData() as { mention?: MentionData };
|
||||
if (entityData.mention !== undefined) {
|
||||
mentions.push(entityData.mention.name);
|
||||
}
|
||||
});
|
||||
|
||||
let content = editorState.getCurrentContent().getPlainText();
|
||||
|
||||
for (const mention of mentions) {
|
||||
content = content.replace(`@#${mention}`, "");
|
||||
}
|
||||
|
||||
return content.trim();
|
||||
};
|
@ -1,201 +0,0 @@
|
||||
/* eslint-disable max-lines */
|
||||
import Editor from "@draft-js-plugins/editor";
|
||||
import {
|
||||
defaultSuggestionsFilter,
|
||||
MentionData,
|
||||
} from "@draft-js-plugins/mention";
|
||||
import { UUID } from "crypto";
|
||||
import { EditorState, getDefaultKeyBinding } from "draft-js";
|
||||
import { useCallback, useEffect, useRef, useState } from "react";
|
||||
|
||||
import {
|
||||
mentionTriggers,
|
||||
MentionTriggerType,
|
||||
} from "@/app/chat/[chatId]/components/ActionsBar/types";
|
||||
import { useBrainContext } from "@/lib/context/BrainProvider/hooks/useBrainContext";
|
||||
import { useJune } from "@/services/analytics/june/useJune";
|
||||
import "@draft-js-plugins/mention/lib/plugin.css";
|
||||
import "draft-js/dist/Draft.css";
|
||||
|
||||
import { useMentionPlugin } from "./helpers/MentionPlugin";
|
||||
import { useMentionState } from "./helpers/MentionState";
|
||||
import { getEditorText } from "./helpers/getEditorText";
|
||||
|
||||
type UseMentionInputProps = {
|
||||
message: string;
|
||||
onSubmit: () => void;
|
||||
setMessage: (text: string) => void;
|
||||
};
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
|
||||
export const useMentionInput = ({
|
||||
message,
|
||||
onSubmit,
|
||||
setMessage,
|
||||
}: UseMentionInputProps) => {
|
||||
const {
|
||||
currentBrainId,
|
||||
currentPromptId,
|
||||
setCurrentBrainId,
|
||||
setCurrentPromptId,
|
||||
} = useBrainContext();
|
||||
|
||||
const analytics = useJune();
|
||||
const {
|
||||
editorState,
|
||||
setEditorState,
|
||||
mentionItems,
|
||||
setSuggestions,
|
||||
suggestions,
|
||||
publicPrompts,
|
||||
} = useMentionState();
|
||||
|
||||
const { MentionSuggestions, plugins } = useMentionPlugin();
|
||||
|
||||
const [currentTrigger, setCurrentTrigger] = useState<MentionTriggerType>("@");
|
||||
|
||||
const mentionInputRef = useRef<Editor>(null);
|
||||
|
||||
const [open, setOpen] = useState(false);
|
||||
|
||||
const onAddMention = useCallback(
|
||||
(mention: MentionData) => {
|
||||
if (mention.trigger === "#") {
|
||||
void analytics?.track("CHANGE_PROMPT");
|
||||
setCurrentPromptId(mention.id as UUID);
|
||||
}
|
||||
|
||||
if (mention.trigger === "@") {
|
||||
void analytics?.track("CHANGE_BRAIN");
|
||||
setCurrentBrainId(mention.id as UUID);
|
||||
}
|
||||
},
|
||||
[analytics, setCurrentBrainId, setCurrentPromptId]
|
||||
);
|
||||
|
||||
const onSearchChange = useCallback(
|
||||
({ trigger, value }: { trigger: MentionTriggerType; value: string }) => {
|
||||
setCurrentTrigger(trigger);
|
||||
if (trigger === "@") {
|
||||
if (currentBrainId !== null) {
|
||||
setSuggestions([]);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
if (value === "") {
|
||||
setSuggestions(mentionItems["@"]);
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (trigger === "#") {
|
||||
if (currentPromptId !== null) {
|
||||
setSuggestions([]);
|
||||
|
||||
return;
|
||||
}
|
||||
if (value === "") {
|
||||
setSuggestions(mentionItems["#"]);
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
setSuggestions(defaultSuggestionsFilter(value, mentionItems, trigger));
|
||||
},
|
||||
[currentBrainId, currentPromptId, mentionItems, setSuggestions]
|
||||
);
|
||||
|
||||
const resetEditorContent = useCallback(() => {
|
||||
setEditorState(EditorState.createEmpty());
|
||||
}, [setEditorState]);
|
||||
|
||||
const keyBindingFn = useCallback(
|
||||
// eslint-disable-next-line complexity
|
||||
(e: React.KeyboardEvent<HTMLDivElement>) => {
|
||||
if (mentionTriggers.includes(e.key as MentionTriggerType)) {
|
||||
setOpen(true);
|
||||
|
||||
return getDefaultKeyBinding(e);
|
||||
}
|
||||
|
||||
if (e.key === "Backspace" || e.key === "Delete") {
|
||||
const editorContent = getEditorText(editorState);
|
||||
|
||||
if (editorContent !== "") {
|
||||
return getDefaultKeyBinding(e);
|
||||
}
|
||||
if (currentPromptId !== null) {
|
||||
setCurrentPromptId(null);
|
||||
|
||||
return "backspace";
|
||||
}
|
||||
if (currentBrainId !== null) {
|
||||
setCurrentBrainId(null);
|
||||
|
||||
return "backspace";
|
||||
}
|
||||
|
||||
return "backspace";
|
||||
}
|
||||
|
||||
if (e.key === "Enter" && !e.shiftKey) {
|
||||
onSubmit();
|
||||
|
||||
return "submit";
|
||||
}
|
||||
|
||||
if (e.key === "ArrowUp" || e.key === "ArrowDown") {
|
||||
return undefined;
|
||||
}
|
||||
|
||||
return getDefaultKeyBinding(e);
|
||||
},
|
||||
[
|
||||
currentBrainId,
|
||||
currentPromptId,
|
||||
editorState,
|
||||
onSubmit,
|
||||
setCurrentBrainId,
|
||||
setCurrentPromptId,
|
||||
]
|
||||
);
|
||||
|
||||
const handleEditorChange = useCallback(
|
||||
(newEditorState: EditorState) => {
|
||||
setEditorState(newEditorState);
|
||||
},
|
||||
[setEditorState]
|
||||
);
|
||||
|
||||
useEffect(() => {
|
||||
const currentMessage = getEditorText(editorState);
|
||||
|
||||
if (currentMessage !== "") {
|
||||
setMessage(currentMessage);
|
||||
}
|
||||
}, [editorState, setMessage]);
|
||||
|
||||
useEffect(() => {
|
||||
if (message === "") {
|
||||
resetEditorContent();
|
||||
}
|
||||
}, [message, resetEditorContent]);
|
||||
|
||||
return {
|
||||
mentionInputRef,
|
||||
plugins,
|
||||
MentionSuggestions,
|
||||
onSearchChange,
|
||||
open,
|
||||
suggestions,
|
||||
onAddMention,
|
||||
editorState,
|
||||
handleEditorChange,
|
||||
keyBindingFn,
|
||||
publicPrompts,
|
||||
currentTrigger,
|
||||
setOpen,
|
||||
};
|
||||
};
|
@ -1 +0,0 @@
|
||||
export * from "./MentionInput";
|
@ -1,9 +0,0 @@
|
||||
import { mentionTriggers } from "@/app/chat/[chatId]/components/ActionsBar/types";
|
||||
|
||||
const mentionsTags = [
|
||||
"mention",
|
||||
...mentionTriggers.map((trigger) => `${trigger}mention`),
|
||||
];
|
||||
|
||||
export const isMention = (type?: string): boolean =>
|
||||
type !== undefined && mentionsTags.includes(type);
|
@ -1,11 +0,0 @@
|
||||
import { MentionData } from "@draft-js-plugins/mention";
|
||||
|
||||
import { MinimalBrainForUser } from "@/lib/context/BrainProvider/types";
|
||||
|
||||
export const mapMinimalBrainToMentionData = (
|
||||
brain: MinimalBrainForUser
|
||||
): MentionData => ({
|
||||
name: brain.name,
|
||||
id: brain.id as string,
|
||||
trigger: "@",
|
||||
});
|
@ -1,9 +0,0 @@
|
||||
import { MentionData } from "@draft-js-plugins/mention";
|
||||
|
||||
import { Prompt } from "@/lib/types/Prompt";
|
||||
|
||||
export const mapPromptToMentionData = (prompt: Prompt): MentionData => ({
|
||||
name: prompt.title,
|
||||
id: prompt.id,
|
||||
trigger: "#",
|
||||
});
|
@ -1,31 +0,0 @@
|
||||
import { MdRemoveCircleOutline } from "react-icons/md";
|
||||
|
||||
import { MentionTriggerType } from "../../../../../types";
|
||||
|
||||
type MentionItemProps = {
|
||||
text: string;
|
||||
onRemove: () => void;
|
||||
trigger?: MentionTriggerType;
|
||||
};
|
||||
|
||||
export const MentionItem = ({
|
||||
text,
|
||||
onRemove,
|
||||
trigger,
|
||||
}: MentionItemProps): JSX.Element => {
|
||||
return (
|
||||
<div
|
||||
className="relative inline-block w-fit-content"
|
||||
data-testid="mention-item"
|
||||
>
|
||||
<div className="flex items-center bg-gray-300 mr-2 text-gray-600 rounded-2xl py-1 px-2">
|
||||
<span className="flex-grow">{`${trigger ?? ""}${text}`}</span>
|
||||
<MdRemoveCircleOutline
|
||||
className="cursor-pointer absolute top-0 right-0 mt-0 mr-0"
|
||||
data-testid="remove-mention"
|
||||
onClick={onRemove}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
};
|
@ -1 +0,0 @@
|
||||
export * from "./MentionInput";
|
@ -1 +0,0 @@
|
||||
export * from "./ChatBar";
|
@ -1,8 +0,0 @@
|
||||
import { MentionData } from "@draft-js-plugins/mention";
|
||||
|
||||
import { MentionTriggerType } from "../../../../types";
|
||||
|
||||
export type MentionInputMentionsType = Record<
|
||||
MentionTriggerType,
|
||||
MentionData[]
|
||||
>;
|
@ -0,0 +1,14 @@
|
||||
import { Editor } from "./components/Editor/Editor";
|
||||
|
||||
type ChatEditorProps = {
|
||||
onSubmit: () => void;
|
||||
setMessage: (text: string) => void;
|
||||
message: string;
|
||||
};
|
||||
export const ChatEditor = ({
|
||||
onSubmit,
|
||||
setMessage,
|
||||
message,
|
||||
}: ChatEditorProps): JSX.Element => (
|
||||
<Editor onSubmit={onSubmit} setMessage={setMessage} message={message} />
|
||||
);
|
@ -0,0 +1,43 @@
|
||||
import { EditorContent } from "@tiptap/react";
|
||||
import "./styles.css";
|
||||
|
||||
import { useChatStateUpdater } from "./hooks/useChatStateUpdater";
|
||||
import { useCreateEditorState } from "./hooks/useCreateEditorState";
|
||||
import { useEditor } from "./hooks/useEditor";
|
||||
import { useEditorStateUpdater } from "./hooks/useEditorStateUpdater";
|
||||
|
||||
type EditorProps = {
|
||||
onSubmit: () => void;
|
||||
setMessage: (text: string) => void;
|
||||
message: string;
|
||||
};
|
||||
|
||||
export const Editor = ({
|
||||
setMessage,
|
||||
message,
|
||||
onSubmit,
|
||||
}: EditorProps): JSX.Element => {
|
||||
const { editor } = useCreateEditorState();
|
||||
|
||||
useChatStateUpdater({
|
||||
editor,
|
||||
setMessage,
|
||||
});
|
||||
|
||||
useEditorStateUpdater({
|
||||
editor,
|
||||
message,
|
||||
});
|
||||
|
||||
const { submitOnEnter } = useEditor({
|
||||
onSubmit,
|
||||
});
|
||||
|
||||
return (
|
||||
<EditorContent
|
||||
className="w-full"
|
||||
onKeyDown={submitOnEnter}
|
||||
editor={editor}
|
||||
/>
|
||||
);
|
||||
};
|
@ -0,0 +1,40 @@
|
||||
import { SuggestionKeyDownProps } from "@tiptap/suggestion";
|
||||
import { forwardRef } from "react";
|
||||
|
||||
import { AddBrainModal } from "@/lib/components/AddBrainModal";
|
||||
|
||||
import { AddNewPromptButton } from "./components/AddNewPromptButton";
|
||||
import { MentionItem } from "./components/MentionItem/MentionItem";
|
||||
import { useMentionList } from "./hooks/useMentionList";
|
||||
import { MentionListProps } from "./types";
|
||||
|
||||
export type MentionListRef = {
|
||||
onKeyDown: (event: SuggestionKeyDownProps) => boolean;
|
||||
};
|
||||
|
||||
export const MentionList = forwardRef<MentionListRef, MentionListProps>(
|
||||
(props, ref) => {
|
||||
const { selectItem, selectedIndex, isBrain, isPrompt } = useMentionList({
|
||||
...props,
|
||||
ref,
|
||||
});
|
||||
|
||||
return (
|
||||
<div className="items flex flex-col p-2 px-4 bg-gray-50 rounded-md shadow-md z-40">
|
||||
{props.suggestionData.items.map((item, index) => (
|
||||
<MentionItem
|
||||
key={item.id}
|
||||
item={item}
|
||||
isSelected={index === selectedIndex}
|
||||
onClick={() => selectItem(index)}
|
||||
type={props.suggestionData.type}
|
||||
/>
|
||||
))}
|
||||
{isBrain && <AddBrainModal />}
|
||||
{isPrompt && <AddNewPromptButton />}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
);
|
||||
|
||||
MentionList.displayName = "MentionList";
|
@ -0,0 +1,22 @@
|
||||
import { useRouter } from "next/navigation";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import { MdAdd } from "react-icons/md";
|
||||
|
||||
import Button from "@/lib/components/ui/Button";
|
||||
|
||||
export const AddNewPromptButton = (): JSX.Element => {
|
||||
const { t } = useTranslation(["chat"]);
|
||||
const router = useRouter();
|
||||
|
||||
return (
|
||||
<Button
|
||||
onClick={() => router.push("/brains-management")}
|
||||
variant={"tertiary"}
|
||||
className={"border-0"}
|
||||
data-testid="add-brain-button"
|
||||
>
|
||||
{t("new_prompt")}
|
||||
<MdAdd className="text-xl" />
|
||||
</Button>
|
||||
);
|
||||
};
|
@ -0,0 +1,34 @@
|
||||
import { cn } from "@/lib/utils";
|
||||
|
||||
import { useMentionItemIcon } from "./hooks/useMentionItemIcon";
|
||||
import { SuggestionDataType, SuggestionItem } from "../../../../types";
|
||||
|
||||
type MentionItemProps = {
|
||||
item: SuggestionItem;
|
||||
type: SuggestionDataType;
|
||||
isSelected: boolean;
|
||||
onClick: () => void;
|
||||
};
|
||||
|
||||
export const MentionItem = ({
|
||||
item,
|
||||
isSelected,
|
||||
onClick,
|
||||
type,
|
||||
}: MentionItemProps): JSX.Element => {
|
||||
const { icon } = useMentionItemIcon({ item, type });
|
||||
|
||||
return (
|
||||
<span
|
||||
className={cn(
|
||||
isSelected ? "bg-msg-purple" : "bg-transparent",
|
||||
"hover:text-blue-500",
|
||||
"px-3 py-1 rounded-md cursor-pointer flex flex-row gap-1"
|
||||
)}
|
||||
key={item.id}
|
||||
onClick={onClick}
|
||||
>
|
||||
{icon} {item.label}
|
||||
</span>
|
||||
);
|
||||
};
|
@ -0,0 +1,32 @@
|
||||
import { CgFileDocument } from "react-icons/cg";
|
||||
|
||||
import { useBrainContext } from "@/lib/context/BrainProvider/hooks/useBrainContext";
|
||||
import { getBrainIconFromBrainType } from "@/lib/helpers/getBrainIconFromBrainType";
|
||||
|
||||
import { SuggestionDataType, SuggestionItem } from "../../../../../types";
|
||||
|
||||
type UseBrainIcon = {
|
||||
item: SuggestionItem;
|
||||
type: SuggestionDataType;
|
||||
};
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
|
||||
export const useMentionItemIcon = ({ item, type }: UseBrainIcon) => {
|
||||
const isBrain = type === "brain";
|
||||
|
||||
const { allBrains } = useBrainContext();
|
||||
const brain = isBrain ? allBrains.find((b) => b.id === item.id) : undefined;
|
||||
|
||||
if (brain === undefined) {
|
||||
return {
|
||||
icon: undefined,
|
||||
};
|
||||
}
|
||||
|
||||
return {
|
||||
icon: getBrainIconFromBrainType(brain.brain_type, {
|
||||
iconSize: 24,
|
||||
DocBrainIcon: CgFileDocument,
|
||||
}),
|
||||
};
|
||||
};
|
@ -0,0 +1,78 @@
|
||||
import { SuggestionKeyDownProps } from "@tiptap/suggestion";
|
||||
import { ForwardedRef, useEffect, useImperativeHandle, useState } from "react";
|
||||
|
||||
import { MentionListRef } from "../MentionsList";
|
||||
import { MentionListProps } from "../types";
|
||||
|
||||
type UseMentionListProps = MentionListProps & {
|
||||
ref: ForwardedRef<MentionListRef>;
|
||||
};
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
|
||||
export const useMentionList = (props: UseMentionListProps) => {
|
||||
const [selectedIndex, setSelectedIndex] = useState<number>(0);
|
||||
|
||||
const selectItem = (index: number) => {
|
||||
const item = props.suggestionData.items[index];
|
||||
|
||||
if (item !== undefined) {
|
||||
props.command(item);
|
||||
}
|
||||
};
|
||||
|
||||
const upHandler = () => {
|
||||
setSelectedIndex(
|
||||
(selectedIndex + props.suggestionData.items.length - 1) %
|
||||
props.suggestionData.items.length
|
||||
);
|
||||
};
|
||||
|
||||
const downHandler = () => {
|
||||
setSelectedIndex((selectedIndex + 1) % props.suggestionData.items.length);
|
||||
};
|
||||
|
||||
const enterHandler = () => {
|
||||
selectItem(selectedIndex);
|
||||
};
|
||||
|
||||
useEffect(() => setSelectedIndex(0), [props.suggestionData]);
|
||||
|
||||
useImperativeHandle(props.ref, () => ({
|
||||
onKeyDown: ({ event }: SuggestionKeyDownProps) => {
|
||||
const { key } = event;
|
||||
|
||||
if (key === "ArrowUp") {
|
||||
upHandler();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
if (key === "ArrowDown") {
|
||||
downHandler();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
if (key === "Enter" && !event.shiftKey) {
|
||||
event.preventDefault();
|
||||
event.stopPropagation();
|
||||
enterHandler();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
},
|
||||
}));
|
||||
|
||||
const isBrain = props.suggestionData.type === "brain";
|
||||
|
||||
const isPrompt = props.suggestionData.type === "prompt";
|
||||
|
||||
return {
|
||||
isBrain,
|
||||
selectedIndex,
|
||||
selectItem,
|
||||
isPrompt,
|
||||
};
|
||||
};
|
@ -0,0 +1,6 @@
|
||||
import { SuggestionData, SuggestionItem } from "../../types";
|
||||
|
||||
export type MentionListProps = {
|
||||
suggestionData: SuggestionData;
|
||||
command: (item: SuggestionItem) => void;
|
||||
};
|
@ -0,0 +1,28 @@
|
||||
import { useBrainContext } from "@/lib/context/BrainProvider/hooks/useBrainContext";
|
||||
|
||||
import { useMentionConfig } from "./useMentionConfig";
|
||||
import { SuggestionItem } from "../types";
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
|
||||
export const useBrainMention = () => {
|
||||
const { allBrains } = useBrainContext();
|
||||
|
||||
const items: SuggestionItem[] = allBrains.map((brain) => ({
|
||||
id: brain.id,
|
||||
label: brain.name,
|
||||
type: "brain",
|
||||
}));
|
||||
|
||||
const { Mention: BrainMention } = useMentionConfig({
|
||||
char: "@",
|
||||
suggestionData: {
|
||||
type: "brain",
|
||||
items,
|
||||
},
|
||||
});
|
||||
|
||||
return {
|
||||
BrainMention,
|
||||
items,
|
||||
};
|
||||
};
|
@ -0,0 +1,72 @@
|
||||
import { Editor, EditorEvents } from "@tiptap/core";
|
||||
import { UUID } from "crypto";
|
||||
import { useCallback, useEffect } from "react";
|
||||
|
||||
import { useBrainContext } from "@/lib/context/BrainProvider/hooks/useBrainContext";
|
||||
|
||||
import { getChatInputAttributesFromEditorState } from "../utils/getChatInputAttributesFromEditorState";
|
||||
import { removeExistingMentionFromEditor } from "../utils/removeExistingMentionFromEditor";
|
||||
|
||||
type UseChatStateUpdaterProps = {
|
||||
editor: Editor | null;
|
||||
setMessage: (message: string) => void;
|
||||
};
|
||||
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
|
||||
export const useChatStateUpdater = ({
|
||||
editor,
|
||||
setMessage,
|
||||
}: UseChatStateUpdaterProps) => {
|
||||
const {
|
||||
currentBrainId,
|
||||
currentPromptId,
|
||||
setCurrentBrainId,
|
||||
setCurrentPromptId,
|
||||
} = useBrainContext();
|
||||
|
||||
const onEditorUpdate = useCallback(
|
||||
({ editor: editorNewState }: EditorEvents["update"]) => {
|
||||
const { text, brainId, promptId } =
|
||||
getChatInputAttributesFromEditorState(editorNewState);
|
||||
|
||||
if (text !== "") {
|
||||
setMessage(text);
|
||||
}
|
||||
|
||||
if (brainId !== currentBrainId) {
|
||||
if (brainId === "") {
|
||||
setCurrentBrainId(null);
|
||||
} else {
|
||||
if (currentBrainId !== null) {
|
||||
removeExistingMentionFromEditor(editorNewState, "mention@");
|
||||
}
|
||||
setCurrentBrainId(brainId as UUID);
|
||||
}
|
||||
}
|
||||
if (promptId !== currentPromptId) {
|
||||
if (promptId === "") {
|
||||
setCurrentPromptId(null);
|
||||
} else {
|
||||
if (currentPromptId !== null) {
|
||||
removeExistingMentionFromEditor(editorNewState, "mention#");
|
||||
}
|
||||
setCurrentPromptId(promptId as UUID);
|
||||
}
|
||||
}
|
||||
},
|
||||
[
|
||||
currentBrainId,
|
||||
currentPromptId,
|
||||
setCurrentBrainId,
|
||||
setCurrentPromptId,
|
||||
setMessage,
|
||||
]
|
||||
);
|
||||
|
||||
useEffect(() => {
|
||||
editor?.on("update", onEditorUpdate);
|
||||
|
||||
return () => {
|
||||
editor?.off("update", onEditorUpdate);
|
||||
};
|
||||
}, [editor, onEditorUpdate, setMessage]);
|
||||
};
|
@ -0,0 +1,40 @@
|
||||
import Document from "@tiptap/extension-document";
|
||||
import HardBreak from "@tiptap/extension-hard-break";
|
||||
import Paragraph from "@tiptap/extension-paragraph";
|
||||
import Placeholder from "@tiptap/extension-placeholder";
|
||||
import Text from "@tiptap/extension-text";
|
||||
import { useEditor } from "@tiptap/react";
|
||||
import { useTranslation } from "react-i18next";
|
||||
|
||||
import { useBrainMention } from "./useBrainMention";
|
||||
import { usePromptMention } from "./usePromptSuggestionsConfig";
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
|
||||
export const useCreateEditorState = () => {
|
||||
const { t } = useTranslation(["chat"]);
|
||||
const { BrainMention, items } = useBrainMention();
|
||||
const { PromptMention } = usePromptMention();
|
||||
|
||||
const editor = useEditor(
|
||||
{
|
||||
autofocus: true,
|
||||
extensions: [
|
||||
Placeholder.configure({
|
||||
showOnlyWhenEditable: true,
|
||||
placeholder: t("actions_bar_placeholder"),
|
||||
}),
|
||||
Document,
|
||||
Text,
|
||||
Paragraph,
|
||||
PromptMention,
|
||||
BrainMention,
|
||||
HardBreak,
|
||||
],
|
||||
},
|
||||
[items.length]
|
||||
);
|
||||
|
||||
return {
|
||||
editor,
|
||||
};
|
||||
};
|
@ -0,0 +1,19 @@
|
||||
import { KeyboardEvent } from "react";
|
||||
|
||||
type UseEditorProps = {
|
||||
onSubmit: () => void;
|
||||
};
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
|
||||
export const useEditor = ({ onSubmit }: UseEditorProps) => {
|
||||
const submitOnEnter = (ev: KeyboardEvent<HTMLDivElement>) => {
|
||||
if (ev.key === "Enter" && !ev.shiftKey) {
|
||||
ev.preventDefault();
|
||||
onSubmit();
|
||||
}
|
||||
};
|
||||
|
||||
return {
|
||||
submitOnEnter,
|
||||
};
|
||||
};
|
@ -0,0 +1,80 @@
|
||||
import { Editor } from "@tiptap/core";
|
||||
import { useCallback, useEffect } from "react";
|
||||
|
||||
import { useBrainContext } from "@/lib/context/BrainProvider/hooks/useBrainContext";
|
||||
|
||||
import { getChatInputAttributesFromEditorState } from "../utils/getChatInputAttributesFromEditorState";
|
||||
|
||||
type UseEditorStateUpdaterProps = {
|
||||
editor: Editor | null;
|
||||
message: string;
|
||||
};
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
|
||||
export const useEditorStateUpdater = ({
|
||||
message,
|
||||
editor,
|
||||
}: UseEditorStateUpdaterProps) => {
|
||||
const { currentBrain, currentPrompt } = useBrainContext();
|
||||
|
||||
const setCurrentBrainAndPrompt = useCallback(() => {
|
||||
const { promptId, brainId } = getChatInputAttributesFromEditorState(editor);
|
||||
|
||||
if (
|
||||
currentBrain !== undefined &&
|
||||
currentBrain.id !== brainId &&
|
||||
brainId === ""
|
||||
) {
|
||||
editor
|
||||
?.chain()
|
||||
.focus()
|
||||
.insertContent({
|
||||
type: "mention@",
|
||||
attrs: {
|
||||
id: currentBrain.id,
|
||||
label: currentBrain.name,
|
||||
},
|
||||
})
|
||||
.insertContent({
|
||||
type: "text",
|
||||
text: " ",
|
||||
})
|
||||
.run();
|
||||
}
|
||||
|
||||
if (
|
||||
currentPrompt !== undefined &&
|
||||
currentPrompt.id !== promptId &&
|
||||
promptId === ""
|
||||
) {
|
||||
editor
|
||||
?.chain()
|
||||
.focus()
|
||||
.insertContent({
|
||||
type: "mention#",
|
||||
attrs: {
|
||||
id: currentPrompt.id,
|
||||
label: currentPrompt.title,
|
||||
},
|
||||
})
|
||||
.insertContent({
|
||||
type: "text",
|
||||
text: " ",
|
||||
})
|
||||
.run();
|
||||
}
|
||||
editor?.commands.focus("end");
|
||||
}, [currentBrain, currentPrompt, editor]);
|
||||
|
||||
useEffect(() => {
|
||||
setCurrentBrainAndPrompt();
|
||||
}, [setCurrentBrainAndPrompt]);
|
||||
|
||||
useEffect(() => {
|
||||
const { text } = getChatInputAttributesFromEditorState(editor);
|
||||
if (text !== message) {
|
||||
editor?.commands.setContent(message);
|
||||
}
|
||||
setCurrentBrainAndPrompt();
|
||||
}, [editor, message, setCurrentBrainAndPrompt]);
|
||||
};
|
@ -0,0 +1,121 @@
|
||||
import { default as TiptapMention } from "@tiptap/extension-mention";
|
||||
import { PluginKey } from "@tiptap/pm/state";
|
||||
import { ReactRenderer } from "@tiptap/react";
|
||||
import { SuggestionOptions } from "@tiptap/suggestion";
|
||||
import { RefAttributes, useMemo } from "react";
|
||||
import tippy, { Instance } from "tippy.js";
|
||||
|
||||
import {
|
||||
MentionList,
|
||||
MentionListRef,
|
||||
} from "../components/MentionsList/MentionsList";
|
||||
import { MentionListProps } from "../components/MentionsList/types";
|
||||
import { SuggestionData, SuggestionItem } from "../types";
|
||||
|
||||
type UseMentionConfigProps = {
|
||||
char: string;
|
||||
suggestionData: SuggestionData;
|
||||
};
|
||||
|
||||
const MAX_ITEMS_DISPLAYED = 15;
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
|
||||
export const useMentionConfig = ({
|
||||
char,
|
||||
suggestionData,
|
||||
}: UseMentionConfigProps) => {
|
||||
const mentionKey = `mention${char}`;
|
||||
const items = suggestionData.items;
|
||||
|
||||
const suggestionsConfig = useMemo<
|
||||
Omit<SuggestionOptions<SuggestionItem>, "editor">
|
||||
>(
|
||||
() => ({
|
||||
char,
|
||||
allowSpaces: true,
|
||||
pluginKey: new PluginKey(mentionKey),
|
||||
items: ({ query }) =>
|
||||
items
|
||||
.filter((item) =>
|
||||
item.label.toLowerCase().startsWith(query.toLowerCase())
|
||||
)
|
||||
.slice(0, MAX_ITEMS_DISPLAYED),
|
||||
render: () => {
|
||||
let reactRenderer:
|
||||
| ReactRenderer<
|
||||
MentionListRef,
|
||||
MentionListProps & RefAttributes<MentionListRef>
|
||||
>
|
||||
| undefined;
|
||||
let popup: Instance[] | undefined;
|
||||
|
||||
return {
|
||||
onStart: (props) => {
|
||||
if (!props.clientRect) {
|
||||
return;
|
||||
}
|
||||
reactRenderer = new ReactRenderer(MentionList, {
|
||||
props: {
|
||||
...props,
|
||||
suggestionData: {
|
||||
...suggestionData,
|
||||
items: props.items,
|
||||
},
|
||||
},
|
||||
editor: props.editor,
|
||||
});
|
||||
popup = tippy("body", {
|
||||
getReferenceClientRect: () => {
|
||||
const rect = props.clientRect?.();
|
||||
|
||||
return rect ? rect : new DOMRect(0, 0, 0, 0);
|
||||
},
|
||||
appendTo: () => document.body,
|
||||
content: reactRenderer.element,
|
||||
showOnCreate: true,
|
||||
interactive: true,
|
||||
trigger: "manual",
|
||||
placement: "top-start",
|
||||
});
|
||||
},
|
||||
onUpdate: (props) => {
|
||||
reactRenderer?.updateProps(props);
|
||||
|
||||
if (!props.clientRect) {
|
||||
return;
|
||||
}
|
||||
},
|
||||
onKeyDown: (props) => {
|
||||
if (props.event.key === "Escape") {
|
||||
popup?.[0].hide();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
return reactRenderer?.ref?.onKeyDown(props) ?? false;
|
||||
},
|
||||
onExit: () => {
|
||||
popup?.[0].destroy();
|
||||
reactRenderer?.destroy();
|
||||
},
|
||||
};
|
||||
},
|
||||
}),
|
||||
[char, items, mentionKey, suggestionData]
|
||||
);
|
||||
|
||||
const Mention = TiptapMention.extend({
|
||||
name: mentionKey,
|
||||
}).configure({
|
||||
HTMLAttributes: {
|
||||
class: "mention",
|
||||
},
|
||||
suggestion: suggestionsConfig,
|
||||
renderLabel: ({ options, node }) =>
|
||||
`${options.suggestion.char ?? ""}${node.attrs.label as string}`,
|
||||
});
|
||||
|
||||
return {
|
||||
Mention,
|
||||
};
|
||||
};
|
@ -0,0 +1,27 @@
|
||||
import { useBrainContext } from "@/lib/context/BrainProvider/hooks/useBrainContext";
|
||||
|
||||
import { useMentionConfig } from "./useMentionConfig";
|
||||
import { SuggestionItem } from "../types";
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
|
||||
export const usePromptMention = () => {
|
||||
const { publicPrompts } = useBrainContext();
|
||||
|
||||
const items: SuggestionItem[] = publicPrompts.map((prompt) => ({
|
||||
id: prompt.id,
|
||||
label: prompt.title,
|
||||
type: "prompt",
|
||||
}));
|
||||
|
||||
const { Mention: PromptMention } = useMentionConfig({
|
||||
char: "#",
|
||||
suggestionData: {
|
||||
type: "prompt",
|
||||
items,
|
||||
},
|
||||
});
|
||||
|
||||
return {
|
||||
PromptMention,
|
||||
};
|
||||
};
|
@ -0,0 +1,12 @@
|
||||
.ProseMirror p.is-editor-empty:first-child::before {
|
||||
content: attr(data-placeholder);
|
||||
float: left;
|
||||
color: #adb5bd;
|
||||
pointer-events: none;
|
||||
height: 0;
|
||||
}
|
||||
.mention {
|
||||
background-color: #E0DDFC;
|
||||
border-radius: 4px;
|
||||
padding: 2px 4px;
|
||||
}
|
@ -0,0 +1,11 @@
|
||||
export type SuggestionDataType = "prompt" | "brain";
|
||||
|
||||
export type SuggestionItem = {
|
||||
id: string;
|
||||
label: string;
|
||||
};
|
||||
|
||||
export type SuggestionData = {
|
||||
type: SuggestionDataType;
|
||||
items: SuggestionItem[];
|
||||
};
|
@ -0,0 +1,60 @@
|
||||
import { Editor } from "@tiptap/core";
|
||||
|
||||
type ChatInputAttributes = {
|
||||
text: string;
|
||||
promptId: string;
|
||||
brainId: string;
|
||||
};
|
||||
|
||||
export const getChatInputAttributesFromEditorState = (
|
||||
editor: Editor | null
|
||||
): ChatInputAttributes => {
|
||||
if (editor === null) {
|
||||
return {
|
||||
text: "",
|
||||
promptId: "",
|
||||
brainId: "",
|
||||
};
|
||||
}
|
||||
|
||||
const editorJsonContent = editor.getJSON();
|
||||
|
||||
if (
|
||||
editorJsonContent.content === undefined ||
|
||||
editorJsonContent.content.length === 0
|
||||
) {
|
||||
return {
|
||||
text: "",
|
||||
promptId: "",
|
||||
brainId: "",
|
||||
};
|
||||
}
|
||||
|
||||
let text = "";
|
||||
let prompt = "";
|
||||
let brain = "";
|
||||
|
||||
editorJsonContent.content.forEach((block) => {
|
||||
if (block.content === undefined || block.content.length === 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
block.content.forEach((innerBlock) => {
|
||||
if (innerBlock.type === "text") {
|
||||
text += innerBlock.text;
|
||||
}
|
||||
if (innerBlock.type === "mention#") {
|
||||
prompt = (innerBlock.attrs?.id as string | undefined) ?? "";
|
||||
}
|
||||
if (innerBlock.type === "mention@") {
|
||||
brain = (innerBlock.attrs?.id as string | undefined) ?? "";
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
return {
|
||||
text,
|
||||
promptId: prompt,
|
||||
brainId: brain,
|
||||
};
|
||||
};
|
@ -0,0 +1,33 @@
|
||||
import { Editor, JSONContent } from "@tiptap/core";
|
||||
|
||||
export const removeExistingMentionFromEditor = (
|
||||
editor: Editor,
|
||||
mentionName: string
|
||||
): void => {
|
||||
let newContent = editor.state.doc.toJSON() as JSONContent | undefined;
|
||||
|
||||
if (newContent?.content !== undefined) {
|
||||
let mentionRemoved = false;
|
||||
|
||||
const filteredContent = newContent.content.map((contentItem) => {
|
||||
if (contentItem.content) {
|
||||
const filtered = contentItem.content.filter((node) => {
|
||||
if (!mentionRemoved && node.type === mentionName) {
|
||||
mentionRemoved = true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
});
|
||||
|
||||
return { ...contentItem, content: filtered };
|
||||
}
|
||||
|
||||
return contentItem;
|
||||
});
|
||||
|
||||
newContent = { ...newContent, content: filteredContent };
|
||||
editor.commands.setContent(newContent);
|
||||
}
|
||||
};
|
@ -1,3 +1,2 @@
|
||||
export * from "./ChatBar";
|
||||
export * from "./ConfigModal";
|
||||
export * from "./OnboardingQuestions";
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { useState } from "react";
|
||||
import { useCallback, useState } from "react";
|
||||
|
||||
import { useChat } from "@/app/chat/[chatId]/hooks/useChat";
|
||||
|
||||
@ -7,11 +7,11 @@ export const useChatInput = () => {
|
||||
const [message, setMessage] = useState<string>("");
|
||||
const { addQuestion, generatingAnswer, chatId } = useChat();
|
||||
|
||||
const submitQuestion = () => {
|
||||
const submitQuestion = useCallback(() => {
|
||||
if (!generatingAnswer) {
|
||||
void addQuestion(message, () => setMessage(""));
|
||||
}
|
||||
};
|
||||
}, [addQuestion, generatingAnswer, message]);
|
||||
|
||||
return {
|
||||
message,
|
||||
|
@ -4,12 +4,12 @@ import { useTranslation } from "react-i18next";
|
||||
import Button from "@/lib/components/ui/Button";
|
||||
import { useBrainContext } from "@/lib/context/BrainProvider/hooks/useBrainContext";
|
||||
import { useKnowledgeToFeedContext } from "@/lib/context/KnowledgeToFeedProvider/hooks/useKnowledgeToFeedContext";
|
||||
import { getBrainIconFromBrainType } from "@/lib/helpers/getBrainIconFromBrainType";
|
||||
|
||||
import { OnboardingQuestions } from "./components";
|
||||
import { ChatBar } from "./components/ChatBar/ChatBar";
|
||||
import { ChatEditor } from "./components/ChatEditor/ChatEditor";
|
||||
import { ConfigModal } from "./components/ConfigModal";
|
||||
import { useChatInput } from "./hooks/useChatInput";
|
||||
import { getBrainIconFromBrainType } from "../../../../../../../lib/helpers/getBrainIconFromBrainType";
|
||||
|
||||
type ChatInputProps = {
|
||||
shouldDisplayFeedOrSecretsCard: boolean;
|
||||
@ -50,8 +50,8 @@ export const ChatInput = ({
|
||||
</Button>
|
||||
)}
|
||||
|
||||
<div className="flex flex-1 flex-col items-center">
|
||||
<ChatBar
|
||||
<div className="flex flex-1">
|
||||
<ChatEditor
|
||||
message={message}
|
||||
setMessage={setMessage}
|
||||
onSubmit={submitQuestion}
|
||||
|
@ -1 +0,0 @@
|
||||
export * from "./utils";
|
@ -1,21 +0,0 @@
|
||||
import { MentionData } from "@draft-js-plugins/mention";
|
||||
import { EditorState } from "draft-js";
|
||||
|
||||
import { isMention } from "./isMention";
|
||||
|
||||
export const getEditorMentions = (editorState: EditorState): MentionData[] => {
|
||||
const contentState = editorState.getCurrentContent();
|
||||
const entities = contentState.getAllEntities();
|
||||
|
||||
const mentions: MentionData[] = [];
|
||||
|
||||
entities.forEach((contentBlock) => {
|
||||
if (isMention(contentBlock?.getType())) {
|
||||
mentions.push(
|
||||
(contentBlock?.getData() as { mention: MentionData }).mention
|
||||
);
|
||||
}
|
||||
});
|
||||
|
||||
return mentions;
|
||||
};
|
@ -1,22 +0,0 @@
|
||||
import { MentionData } from "@draft-js-plugins/mention";
|
||||
import { EditorState } from "draft-js";
|
||||
|
||||
export const getEditorText = (editorState: EditorState): string => {
|
||||
const mentions: string[] = [];
|
||||
const editorEntities = editorState.getCurrentContent().getAllEntities();
|
||||
|
||||
editorEntities.forEach((entity) => {
|
||||
const entityData = entity?.getData() as { mention?: MentionData };
|
||||
if (entityData.mention !== undefined) {
|
||||
mentions.push(entityData.mention.name);
|
||||
}
|
||||
});
|
||||
|
||||
let content = editorState.getCurrentContent().getPlainText();
|
||||
|
||||
for (const mention of mentions) {
|
||||
content = content.replace(`@#${mention}`, "");
|
||||
}
|
||||
|
||||
return content.trim();
|
||||
};
|
@ -1,3 +0,0 @@
|
||||
export * from "./isMention";
|
||||
export * from "./mapMinimalBrainToMentionData";
|
||||
export * from "./mapPromptToMentionData";
|
@ -1,9 +0,0 @@
|
||||
import { mentionTriggers } from "@/app/chat/[chatId]/components/ActionsBar/types";
|
||||
|
||||
const mentionsTags = [
|
||||
"mention",
|
||||
...mentionTriggers.map((trigger) => `${trigger}mention`),
|
||||
];
|
||||
|
||||
export const isMention = (type?: string): boolean =>
|
||||
type !== undefined && mentionsTags.includes(type);
|
@ -1,11 +0,0 @@
|
||||
import { MentionData } from "@draft-js-plugins/mention";
|
||||
|
||||
import { MinimalBrainForUser } from "@/lib/context/BrainProvider/types";
|
||||
|
||||
export const mapMinimalBrainToMentionData = (
|
||||
brain: MinimalBrainForUser
|
||||
): MentionData => ({
|
||||
name: brain.name,
|
||||
id: brain.id as string,
|
||||
trigger: "@",
|
||||
});
|
@ -1,9 +0,0 @@
|
||||
import { MentionData } from "@draft-js-plugins/mention";
|
||||
|
||||
import { Prompt } from "@/lib/types/Prompt";
|
||||
|
||||
export const mapPromptToMentionData = (prompt: Prompt): MentionData => ({
|
||||
name: prompt.title,
|
||||
id: prompt.id,
|
||||
trigger: "#",
|
||||
});
|
@ -22,7 +22,6 @@ const Ellipsis = ({
|
||||
originalContent.length > maxCharacters
|
||||
? `${originalContent.slice(0, maxCharacters)}...`
|
||||
: originalContent;
|
||||
console.log(originalContent, maxCharacters, tooltip, renderedContent);
|
||||
|
||||
if (tooltip && originalContent !== renderedContent) {
|
||||
return (
|
||||
|
@ -51,7 +51,7 @@ export const Modal = ({
|
||||
<Dialog.Portal forceMount>
|
||||
<Dialog.Overlay asChild forceMount>
|
||||
<motion.div
|
||||
className="z-50 md:z-40 py-20 fixed inset-0 flex justify-center overflow-auto cursor-pointer bg-black/50 backdrop-blur-sm"
|
||||
className="z-[10000] py-20 fixed inset-0 flex justify-center overflow-auto cursor-pointer bg-black/50 backdrop-blur-sm"
|
||||
initial={{ opacity: 0 }}
|
||||
animate={{ opacity: 1 }}
|
||||
exit={{ opacity: 0 }}
|
||||
|
@ -18,8 +18,6 @@
|
||||
"format-fix": "prettier --write ."
|
||||
},
|
||||
"dependencies": {
|
||||
"@draft-js-plugins/editor": "^4.1.4",
|
||||
"@draft-js-plugins/mention": "^5.2.2",
|
||||
"@emotion/react": "^11.11.0",
|
||||
"@emotion/styled": "^11.11.0",
|
||||
"@growthbook/growthbook-react": "^0.17.0",
|
||||
@ -39,8 +37,18 @@
|
||||
"@supabase/supabase-js": "^2.22.0",
|
||||
"@tanstack/react-query": "^5.4.3",
|
||||
"@testing-library/user-event": "^14.5.1",
|
||||
"@tiptap/core": "^2.1.12",
|
||||
"@tiptap/extension-document": "^2.1.12",
|
||||
"@tiptap/extension-hard-break": "^2.1.12",
|
||||
"@tiptap/extension-mention": "^2.1.12",
|
||||
"@tiptap/extension-paragraph": "^2.1.12",
|
||||
"@tiptap/extension-placeholder": "^2.1.12",
|
||||
"@tiptap/extension-text": "^2.1.12",
|
||||
"@tiptap/pm": "^2.1.12",
|
||||
"@tiptap/react": "^2.1.12",
|
||||
"@tiptap/starter-kit": "^2.1.12",
|
||||
"@tiptap/suggestion": "^2.1.12",
|
||||
"@types/dom-speech-recognition": "^0.0.1",
|
||||
"@types/draft-js": "^0.11.12",
|
||||
"@types/lodash": "^4.14.197",
|
||||
"@types/node": "20.1.7",
|
||||
"@types/react": "18",
|
||||
@ -53,7 +61,6 @@
|
||||
"class-variance-authority": "^0.7.0",
|
||||
"clsx": "^1.2.1",
|
||||
"date-fns": "^2.30.0",
|
||||
"draft-js": "^0.11.7",
|
||||
"encoding": "^0.1.13",
|
||||
"eslint": "^8.41.0",
|
||||
"eslint-config-next": "13.4.2",
|
||||
@ -83,6 +90,7 @@
|
||||
"sharp": "^0.32.4",
|
||||
"tailwind-merge": "^1.12.0",
|
||||
"tailwindcss": "3.3.2",
|
||||
"tippy.js": "^6.3.7",
|
||||
"typescript": "^5.0.4",
|
||||
"victory": "^36.6.10"
|
||||
},
|
||||
|
@ -241,28 +241,6 @@
|
||||
resolved "https://registry.yarnpkg.com/@corex/deepmerge/-/deepmerge-4.0.43.tgz#9bd42559ebb41cc5a7fb7cfeea5f231c20977dca"
|
||||
integrity sha512-N8uEMrMPL0cu/bdboEWpQYb/0i2K5Qn8eCsxzOmxSggJbbQte7ljMRoXm917AbntqTGOzdTu+vP3KOOzoC70HQ==
|
||||
|
||||
"@draft-js-plugins/editor@^4.1.4":
|
||||
version "4.1.4"
|
||||
resolved "https://registry.npmjs.org/@draft-js-plugins/editor/-/editor-4.1.4.tgz"
|
||||
integrity sha512-NlE1AIsPPfmdn+JIwwmcAm18FgwJ9/A55+2VXf3US3PmITJVL+y9VORCwLbGh2sb0RXvgFOIbqs8pPAOe8F8WQ==
|
||||
dependencies:
|
||||
immutable "~3.7.4"
|
||||
prop-types "^15.8.1"
|
||||
|
||||
"@draft-js-plugins/mention@^5.2.2":
|
||||
version "5.2.2"
|
||||
resolved "https://registry.npmjs.org/@draft-js-plugins/mention/-/mention-5.2.2.tgz"
|
||||
integrity sha512-CoympO4FTBHD11mb+lSdD2KvtvwvHeUl+YDUymgtQBncZI4TKNKwZji60JdfNoGFQzDu87QkwKzv3iG8XQmNzA==
|
||||
dependencies:
|
||||
"@popperjs/core" "^2.11.8"
|
||||
"@types/lodash" "^4.14.195"
|
||||
clsx "^1.2.1"
|
||||
immutable "~3.7.4"
|
||||
lodash "^4.17.21"
|
||||
lodash-es "^4.17.21"
|
||||
prop-types "^15.8.1"
|
||||
react-popper "^2.3.0"
|
||||
|
||||
"@emotion/babel-plugin@^11.11.0":
|
||||
version "11.11.0"
|
||||
resolved "https://registry.npmjs.org/@emotion/babel-plugin/-/babel-plugin-11.11.0.tgz"
|
||||
@ -795,7 +773,7 @@
|
||||
dependencies:
|
||||
playwright "1.38.0"
|
||||
|
||||
"@popperjs/core@^2.11.8":
|
||||
"@popperjs/core@^2.9.0":
|
||||
version "2.11.8"
|
||||
resolved "https://registry.npmjs.org/@popperjs/core/-/core-2.11.8.tgz"
|
||||
integrity sha512-P1st0aksCrn9sGZhp8GMYwBnQsbvAWsZAX44oXNNvLHGqAOcoVxmjZiohstwQ7SqKnbR47akdNi+uleWD8+g6A==
|
||||
@ -1197,6 +1175,37 @@
|
||||
dependencies:
|
||||
"@babel/runtime" "^7.13.10"
|
||||
|
||||
"@remirror/core-constants@^2.0.2":
|
||||
version "2.0.2"
|
||||
resolved "https://registry.yarnpkg.com/@remirror/core-constants/-/core-constants-2.0.2.tgz#f05eccdc69e3a65e7d524b52548f567904a11a1a"
|
||||
integrity sha512-dyHY+sMF0ihPus3O27ODd4+agdHMEmuRdyiZJ2CCWjPV5UFmn17ZbElvk6WOGVE4rdCJKZQCrPV2BcikOMLUGQ==
|
||||
|
||||
"@remirror/core-helpers@^3.0.0":
|
||||
version "3.0.0"
|
||||
resolved "https://registry.yarnpkg.com/@remirror/core-helpers/-/core-helpers-3.0.0.tgz#3a35c2346bc23ebc3cee585b7840b5567755c5f1"
|
||||
integrity sha512-tusEgQJIqg4qKj6HSBUFcyRnWnziw3neh4T9wOmsPGHFC3w9kl5KSrDb9UAgE8uX6y32FnS7vJ955mWOl3n50A==
|
||||
dependencies:
|
||||
"@remirror/core-constants" "^2.0.2"
|
||||
"@remirror/types" "^1.0.1"
|
||||
"@types/object.omit" "^3.0.0"
|
||||
"@types/object.pick" "^1.3.2"
|
||||
"@types/throttle-debounce" "^2.1.0"
|
||||
case-anything "^2.1.13"
|
||||
dash-get "^1.0.2"
|
||||
deepmerge "^4.3.1"
|
||||
fast-deep-equal "^3.1.3"
|
||||
make-error "^1.3.6"
|
||||
object.omit "^3.0.0"
|
||||
object.pick "^1.3.0"
|
||||
throttle-debounce "^3.0.1"
|
||||
|
||||
"@remirror/types@^1.0.1":
|
||||
version "1.0.1"
|
||||
resolved "https://registry.yarnpkg.com/@remirror/types/-/types-1.0.1.tgz#768502497a0fbbc23338a1586b893f729310cf70"
|
||||
integrity sha512-VlZQxwGnt1jtQ18D6JqdIF+uFZo525WEqrfp9BOc3COPpK4+AWCgdnAWL+ho6imWcoINlGjR/+3b6y5C1vBVEA==
|
||||
dependencies:
|
||||
type-fest "^2.19.0"
|
||||
|
||||
"@rollup/plugin-commonjs@24.0.0":
|
||||
version "24.0.0"
|
||||
resolved "https://registry.npmjs.org/@rollup/plugin-commonjs/-/plugin-commonjs-24.0.0.tgz"
|
||||
@ -2405,6 +2414,187 @@
|
||||
resolved "https://registry.yarnpkg.com/@testing-library/user-event/-/user-event-14.5.1.tgz#27337d72046d5236b32fd977edee3f74c71d332f"
|
||||
integrity sha512-UCcUKrUYGj7ClomOo2SpNVvx4/fkd/2BbIHDCle8A0ax+P3bU7yJwDBDrS6ZwdTMARWTGODX1hEsCcO+7beJjg==
|
||||
|
||||
"@tiptap/core@^2.1.12":
|
||||
version "2.1.12"
|
||||
resolved "https://registry.yarnpkg.com/@tiptap/core/-/core-2.1.12.tgz#904fdf147e91b5e60561c76e7563c1b5a32f54ab"
|
||||
integrity sha512-ZGc3xrBJA9KY8kln5AYTj8y+GDrKxi7u95xIl2eccrqTY5CQeRu6HRNM1yT4mAjuSaG9jmazyjGRlQuhyxCKxQ==
|
||||
|
||||
"@tiptap/extension-blockquote@^2.1.12":
|
||||
version "2.1.12"
|
||||
resolved "https://registry.yarnpkg.com/@tiptap/extension-blockquote/-/extension-blockquote-2.1.12.tgz#97b43419606acf9bfd93b9f482a1827dcac8c3e9"
|
||||
integrity sha512-Qb3YRlCfugx9pw7VgLTb+jY37OY4aBJeZnqHzx4QThSm13edNYjasokbX0nTwL1Up4NPTcY19JUeHt6fVaVVGg==
|
||||
|
||||
"@tiptap/extension-bold@^2.1.12":
|
||||
version "2.1.12"
|
||||
resolved "https://registry.yarnpkg.com/@tiptap/extension-bold/-/extension-bold-2.1.12.tgz#5dbf41105fc0fbde8adbff629312187fbebc39b0"
|
||||
integrity sha512-AZGxIxcGU1/y6V2YEbKsq6BAibL8yQrbRm6EdcBnby41vj1WziewEKswhLGmZx5IKM2r2ldxld03KlfSIlKQZg==
|
||||
|
||||
"@tiptap/extension-bubble-menu@^2.1.12":
|
||||
version "2.1.12"
|
||||
resolved "https://registry.yarnpkg.com/@tiptap/extension-bubble-menu/-/extension-bubble-menu-2.1.12.tgz#4103a21a6433e58690c8f742ece39fad78dc26eb"
|
||||
integrity sha512-gAGi21EQ4wvLmT7klgariAc2Hf+cIjaNU2NWze3ut6Ku9gUo5ZLqj1t9SKHmNf4d5JG63O8GxpErqpA7lHlRtw==
|
||||
dependencies:
|
||||
tippy.js "^6.3.7"
|
||||
|
||||
"@tiptap/extension-bullet-list@^2.1.12":
|
||||
version "2.1.12"
|
||||
resolved "https://registry.yarnpkg.com/@tiptap/extension-bullet-list/-/extension-bullet-list-2.1.12.tgz#7c905a577ce30ef2cb335870a23f9d24fd26f6aa"
|
||||
integrity sha512-vtD8vWtNlmAZX8LYqt2yU9w3mU9rPCiHmbp4hDXJs2kBnI0Ju/qAyXFx6iJ3C3XyuMnMbJdDI9ee0spAvFz7cQ==
|
||||
|
||||
"@tiptap/extension-code-block@^2.1.12":
|
||||
version "2.1.12"
|
||||
resolved "https://registry.yarnpkg.com/@tiptap/extension-code-block/-/extension-code-block-2.1.12.tgz#20416baef1b5fc839490a8416e97fdcbb5fdf918"
|
||||
integrity sha512-RXtSYCVsnk8D+K80uNZShClfZjvv1EgO42JlXLVGWQdIgaNyuOv/6I/Jdf+ZzhnpsBnHufW+6TJjwP5vJPSPHA==
|
||||
|
||||
"@tiptap/extension-code@^2.1.12":
|
||||
version "2.1.12"
|
||||
resolved "https://registry.yarnpkg.com/@tiptap/extension-code/-/extension-code-2.1.12.tgz#86d2eb5f63725af472c5fd858e5a9c7ccae06ef3"
|
||||
integrity sha512-CRiRq5OTC1lFgSx6IMrECqmtb93a0ZZKujEnaRhzWliPBjLIi66va05f/P1vnV6/tHaC3yfXys6dxB5A4J8jxw==
|
||||
|
||||
"@tiptap/extension-document@^2.1.12":
|
||||
version "2.1.12"
|
||||
resolved "https://registry.yarnpkg.com/@tiptap/extension-document/-/extension-document-2.1.12.tgz#e19e4716dfad60cbeb6abaf2f362fed759963529"
|
||||
integrity sha512-0QNfAkCcFlB9O8cUNSwTSIQMV9TmoEhfEaLz/GvbjwEq4skXK3bU+OQX7Ih07waCDVXIGAZ7YAZogbvrn/WbOw==
|
||||
|
||||
"@tiptap/extension-dropcursor@^2.1.12":
|
||||
version "2.1.12"
|
||||
resolved "https://registry.yarnpkg.com/@tiptap/extension-dropcursor/-/extension-dropcursor-2.1.12.tgz#9da0c275291c9d47497d3db41b4d70d96366b4ff"
|
||||
integrity sha512-0tT/q8nL4NBCYPxr9T0Brck+RQbWuczm9nV0bnxgt0IiQXoRHutfPWdS7GA65PTuVRBS/3LOco30fbjFhkfz/A==
|
||||
|
||||
"@tiptap/extension-floating-menu@^2.1.12":
|
||||
version "2.1.12"
|
||||
resolved "https://registry.yarnpkg.com/@tiptap/extension-floating-menu/-/extension-floating-menu-2.1.12.tgz#68a658b2b9bdd3a0fc1afc5165231838061a8fde"
|
||||
integrity sha512-uo0ydCJNg6AWwLT6cMUJYVChfvw2PY9ZfvKRhh9YJlGfM02jS4RUG/bJBts6R37f+a5FsOvAVwg8EvqPlNND1A==
|
||||
dependencies:
|
||||
tippy.js "^6.3.7"
|
||||
|
||||
"@tiptap/extension-gapcursor@^2.1.12":
|
||||
version "2.1.12"
|
||||
resolved "https://registry.yarnpkg.com/@tiptap/extension-gapcursor/-/extension-gapcursor-2.1.12.tgz#63844c3abd1a38af915839cf0c097b6d2e5a86fe"
|
||||
integrity sha512-zFYdZCqPgpwoB7whyuwpc8EYLYjUE5QYKb8vICvc+FraBUDM51ujYhFSgJC3rhs8EjI+8GcK8ShLbSMIn49YOQ==
|
||||
|
||||
"@tiptap/extension-hard-break@^2.1.12":
|
||||
version "2.1.12"
|
||||
resolved "https://registry.yarnpkg.com/@tiptap/extension-hard-break/-/extension-hard-break-2.1.12.tgz#54d0c9996e1173594852394975a9356eec98bc9a"
|
||||
integrity sha512-nqKcAYGEOafg9D+2cy1E4gHNGuL12LerVa0eS2SQOb+PT8vSel9OTKU1RyZldsWSQJ5rq/w4uIjmLnrSR2w6Yw==
|
||||
|
||||
"@tiptap/extension-heading@^2.1.12":
|
||||
version "2.1.12"
|
||||
resolved "https://registry.yarnpkg.com/@tiptap/extension-heading/-/extension-heading-2.1.12.tgz#05ae4684d6f29ae611495ab114038e14a5d1dff6"
|
||||
integrity sha512-MoANP3POAP68Ko9YXarfDKLM/kXtscgp6m+xRagPAghRNujVY88nK1qBMZ3JdvTVN6b/ATJhp8UdrZX96TLV2w==
|
||||
|
||||
"@tiptap/extension-history@^2.1.12":
|
||||
version "2.1.12"
|
||||
resolved "https://registry.yarnpkg.com/@tiptap/extension-history/-/extension-history-2.1.12.tgz#03bcb9422e8ea2b82dc45207d1a1b0bc0241b055"
|
||||
integrity sha512-6b7UFVkvPjq3LVoCTrYZAczt5sQrQUaoDWAieVClVZoFLfjga2Fwjcfgcie8IjdPt8YO2hG/sar/c07i9vM0Sg==
|
||||
|
||||
"@tiptap/extension-horizontal-rule@^2.1.12":
|
||||
version "2.1.12"
|
||||
resolved "https://registry.yarnpkg.com/@tiptap/extension-horizontal-rule/-/extension-horizontal-rule-2.1.12.tgz#2191d4ff68ed39381d65971ad8e2aa1be43e6d6b"
|
||||
integrity sha512-RRuoK4KxrXRrZNAjJW5rpaxjiP0FJIaqpi7nFbAua2oHXgsCsG8qbW2Y0WkbIoS8AJsvLZ3fNGsQ8gpdliuq3A==
|
||||
|
||||
"@tiptap/extension-italic@^2.1.12":
|
||||
version "2.1.12"
|
||||
resolved "https://registry.yarnpkg.com/@tiptap/extension-italic/-/extension-italic-2.1.12.tgz#e99480eb77f8b4e5444fc236add8a831d5aa2343"
|
||||
integrity sha512-/XYrW4ZEWyqDvnXVKbgTXItpJOp2ycswk+fJ3vuexyolO6NSs0UuYC6X4f+FbHYL5VuWqVBv7EavGa+tB6sl3A==
|
||||
|
||||
"@tiptap/extension-list-item@^2.1.12":
|
||||
version "2.1.12"
|
||||
resolved "https://registry.yarnpkg.com/@tiptap/extension-list-item/-/extension-list-item-2.1.12.tgz#3eb28dc998490a98f14765783770b3cf6587d39e"
|
||||
integrity sha512-Gk7hBFofAPmNQ8+uw8w5QSsZOMEGf7KQXJnx5B022YAUJTYYxO3jYVuzp34Drk9p+zNNIcXD4kc7ff5+nFOTrg==
|
||||
|
||||
"@tiptap/extension-mention@^2.1.12":
|
||||
version "2.1.12"
|
||||
resolved "https://registry.yarnpkg.com/@tiptap/extension-mention/-/extension-mention-2.1.12.tgz#a395e7757b45630ec3047f14b0ba2dde8e1c9c93"
|
||||
integrity sha512-Nc8wFlyPp+/48IpOFPk2O3hYsF465wizcM3aihMvZM96Ahic7dvv9yVptyOfoOwgpExl2FIn1QPjRDXF60VAUg==
|
||||
|
||||
"@tiptap/extension-ordered-list@^2.1.12":
|
||||
version "2.1.12"
|
||||
resolved "https://registry.yarnpkg.com/@tiptap/extension-ordered-list/-/extension-ordered-list-2.1.12.tgz#f41a45bc66b4d19e379d4833f303f2e0cd6b9d60"
|
||||
integrity sha512-tF6VGl+D2avCgn9U/2YLJ8qVmV6sPE/iEzVAFZuOSe6L0Pj7SQw4K6AO640QBob/d8VrqqJFHCb6l10amJOnXA==
|
||||
|
||||
"@tiptap/extension-paragraph@^2.1.12":
|
||||
version "2.1.12"
|
||||
resolved "https://registry.yarnpkg.com/@tiptap/extension-paragraph/-/extension-paragraph-2.1.12.tgz#922447b2aa1c7184787d351ceec593a74d24ed03"
|
||||
integrity sha512-hoH/uWPX+KKnNAZagudlsrr4Xu57nusGekkJWBcrb5MCDE91BS+DN2xifuhwXiTHxnwOMVFjluc0bPzQbkArsw==
|
||||
|
||||
"@tiptap/extension-placeholder@^2.1.12":
|
||||
version "2.1.12"
|
||||
resolved "https://registry.yarnpkg.com/@tiptap/extension-placeholder/-/extension-placeholder-2.1.12.tgz#f6267a563d17a5ae8a04da32231eac8d8868519e"
|
||||
integrity sha512-K52o7B1zkP4vaVy3z4ZwHn+tQy6KlXtedj1skLg+796ImwH2GYS5z6MFOTfKzBO2hLncUzLco/s0C5PLCD6SDw==
|
||||
|
||||
"@tiptap/extension-strike@^2.1.12":
|
||||
version "2.1.12"
|
||||
resolved "https://registry.yarnpkg.com/@tiptap/extension-strike/-/extension-strike-2.1.12.tgz#2b049aedf2985e9c9e3c3f1cc0b203a574c85bd8"
|
||||
integrity sha512-HlhrzIjYUT8oCH9nYzEL2QTTn8d1ECnVhKvzAe6x41xk31PjLMHTUy8aYjeQEkWZOWZ34tiTmslV1ce6R3Dt8g==
|
||||
|
||||
"@tiptap/extension-text@^2.1.12":
|
||||
version "2.1.12"
|
||||
resolved "https://registry.yarnpkg.com/@tiptap/extension-text/-/extension-text-2.1.12.tgz#466e3244bdd9b2db2304c0c9a1d51ce59f5327d0"
|
||||
integrity sha512-rCNUd505p/PXwU9Jgxo4ZJv4A3cIBAyAqlx/dtcY6cjztCQuXJhuQILPhjGhBTOLEEL4kW2wQtqzCmb7O8i2jg==
|
||||
|
||||
"@tiptap/pm@^2.1.12":
|
||||
version "2.1.12"
|
||||
resolved "https://registry.yarnpkg.com/@tiptap/pm/-/pm-2.1.12.tgz#88a4b19be0eabb13d42ddd540c19ba1bbe74b322"
|
||||
integrity sha512-Q3MXXQABG4CZBesSp82yV84uhJh/W0Gag6KPm2HRWPimSFELM09Z9/5WK9RItAYE0aLhe4Krnyiczn9AAa1tQQ==
|
||||
dependencies:
|
||||
prosemirror-changeset "^2.2.0"
|
||||
prosemirror-collab "^1.3.0"
|
||||
prosemirror-commands "^1.3.1"
|
||||
prosemirror-dropcursor "^1.5.0"
|
||||
prosemirror-gapcursor "^1.3.1"
|
||||
prosemirror-history "^1.3.0"
|
||||
prosemirror-inputrules "^1.2.0"
|
||||
prosemirror-keymap "^1.2.0"
|
||||
prosemirror-markdown "^1.10.1"
|
||||
prosemirror-menu "^1.2.1"
|
||||
prosemirror-model "^1.18.1"
|
||||
prosemirror-schema-basic "^1.2.0"
|
||||
prosemirror-schema-list "^1.2.2"
|
||||
prosemirror-state "^1.4.1"
|
||||
prosemirror-tables "^1.3.0"
|
||||
prosemirror-trailing-node "^2.0.2"
|
||||
prosemirror-transform "^1.7.0"
|
||||
prosemirror-view "^1.28.2"
|
||||
|
||||
"@tiptap/react@^2.1.12":
|
||||
version "2.1.12"
|
||||
resolved "https://registry.yarnpkg.com/@tiptap/react/-/react-2.1.12.tgz#23566c7992b9642137171b282335e646922ae559"
|
||||
integrity sha512-RMO4QmmpL7sPR7w8o1Wq0hrUe/ttHzsn5I/eWwqg1d3fGx5y9mOdfCoQ9XBtm49Xzdejy3QVzt4zYp9fX0X/xg==
|
||||
dependencies:
|
||||
"@tiptap/extension-bubble-menu" "^2.1.12"
|
||||
"@tiptap/extension-floating-menu" "^2.1.12"
|
||||
|
||||
"@tiptap/starter-kit@^2.1.12":
|
||||
version "2.1.12"
|
||||
resolved "https://registry.yarnpkg.com/@tiptap/starter-kit/-/starter-kit-2.1.12.tgz#2bf28091ed08dc8f7b903ba92925e4ffe06257ea"
|
||||
integrity sha512-+RoP1rWV7rSCit2+3wl2bjvSRiePRJE/7YNKbvH8Faz/+AMO23AFegHoUFynR7U0ouGgYDljGkkj35e0asbSDA==
|
||||
dependencies:
|
||||
"@tiptap/core" "^2.1.12"
|
||||
"@tiptap/extension-blockquote" "^2.1.12"
|
||||
"@tiptap/extension-bold" "^2.1.12"
|
||||
"@tiptap/extension-bullet-list" "^2.1.12"
|
||||
"@tiptap/extension-code" "^2.1.12"
|
||||
"@tiptap/extension-code-block" "^2.1.12"
|
||||
"@tiptap/extension-document" "^2.1.12"
|
||||
"@tiptap/extension-dropcursor" "^2.1.12"
|
||||
"@tiptap/extension-gapcursor" "^2.1.12"
|
||||
"@tiptap/extension-hard-break" "^2.1.12"
|
||||
"@tiptap/extension-heading" "^2.1.12"
|
||||
"@tiptap/extension-history" "^2.1.12"
|
||||
"@tiptap/extension-horizontal-rule" "^2.1.12"
|
||||
"@tiptap/extension-italic" "^2.1.12"
|
||||
"@tiptap/extension-list-item" "^2.1.12"
|
||||
"@tiptap/extension-ordered-list" "^2.1.12"
|
||||
"@tiptap/extension-paragraph" "^2.1.12"
|
||||
"@tiptap/extension-strike" "^2.1.12"
|
||||
"@tiptap/extension-text" "^2.1.12"
|
||||
|
||||
"@tiptap/suggestion@^2.1.12":
|
||||
version "2.1.12"
|
||||
resolved "https://registry.yarnpkg.com/@tiptap/suggestion/-/suggestion-2.1.12.tgz#a13782d1e625ec03b3f61b6839ecc95b6b685d3f"
|
||||
integrity sha512-rhlLWwVkOodBGRMK0mAmE34l2a+BqM2Y7q1ViuQRBhs/6sZ8d83O4hARHKVwqT5stY4i1l7d7PoemV3uAGI6+g==
|
||||
|
||||
"@tootallnate/once@2":
|
||||
version "2.0.0"
|
||||
resolved "https://registry.npmjs.org/@tootallnate/once/-/once-2.0.0.tgz"
|
||||
@ -2490,14 +2680,6 @@
|
||||
resolved "https://registry.npmjs.org/@types/dom-speech-recognition/-/dom-speech-recognition-0.0.1.tgz"
|
||||
integrity sha512-udCxb8DvjcDKfk1WTBzDsxFbLgYxmQGKrE/ricoMqHRNjSlSUCcamVTA5lIQqzY10mY5qCY0QDwBfFEwhfoDPw==
|
||||
|
||||
"@types/draft-js@^0.11.12":
|
||||
version "0.11.12"
|
||||
resolved "https://registry.npmjs.org/@types/draft-js/-/draft-js-0.11.12.tgz"
|
||||
integrity sha512-J/e4QYz8wCXvPpiCaiKcJrtLo65px4nnfFVZ/0EKHoKnQ4nWdzXwGHOQLIePAJM+Ho4V9/mb4Nhw4v/08y98jQ==
|
||||
dependencies:
|
||||
"@types/react" "*"
|
||||
immutable "~3.7.4"
|
||||
|
||||
"@types/estree@*", "@types/estree@^1.0.0":
|
||||
version "1.0.1"
|
||||
resolved "https://registry.npmjs.org/@types/estree/-/estree-1.0.1.tgz"
|
||||
@ -2532,7 +2714,7 @@
|
||||
resolved "https://registry.npmjs.org/@types/json5/-/json5-0.0.29.tgz"
|
||||
integrity sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ==
|
||||
|
||||
"@types/lodash@^4.14.195", "@types/lodash@^4.14.197":
|
||||
"@types/lodash@^4.14.197":
|
||||
version "4.14.197"
|
||||
resolved "https://registry.npmjs.org/@types/lodash/-/lodash-4.14.197.tgz"
|
||||
integrity sha512-BMVOiWs0uNxHVlHBgzTIqJYmj+PgCo4euloGF+5m4okL3rEYzM2EEv78mw8zWSMM57dM7kVIgJ2QDvwHSoCI5g==
|
||||
@ -2561,6 +2743,16 @@
|
||||
resolved "https://registry.npmjs.org/@types/node/-/node-20.1.7.tgz"
|
||||
integrity sha512-WCuw/o4GSwDGMoonES8rcvwsig77dGCMbZDrZr2x4ZZiNW4P/gcoZXe/0twgtobcTkmg9TuKflxYL/DuwDyJzg==
|
||||
|
||||
"@types/object.omit@^3.0.0":
|
||||
version "3.0.3"
|
||||
resolved "https://registry.yarnpkg.com/@types/object.omit/-/object.omit-3.0.3.tgz#cc52b1d9774c1619b5c6fc50229d087f01eabd68"
|
||||
integrity sha512-xrq4bQTBGYY2cw+gV4PzoG2Lv3L0pjZ1uXStRRDQoATOYW1lCsFQHhQ+OkPhIcQoqLjAq7gYif7D14Qaa6Zbew==
|
||||
|
||||
"@types/object.pick@^1.3.2":
|
||||
version "1.3.4"
|
||||
resolved "https://registry.yarnpkg.com/@types/object.pick/-/object.pick-1.3.4.tgz#1a38b6e69a35f36ec2dcc8b9f5ffd555c1c4d7fc"
|
||||
integrity sha512-5PjwB0uP2XDp3nt5u5NJAG2DORHIRClPzWT/TTZhJ2Ekwe8M5bA9tvPdi9NO/n2uvu2/ictat8kgqvLfcIE1SA==
|
||||
|
||||
"@types/parse-json@^4.0.0":
|
||||
version "4.0.0"
|
||||
resolved "https://registry.npmjs.org/@types/parse-json/-/parse-json-4.0.0.tgz"
|
||||
@ -2614,6 +2806,11 @@
|
||||
resolved "https://registry.npmjs.org/@types/semver/-/semver-7.5.0.tgz"
|
||||
integrity sha512-G8hZ6XJiHnuhQKR7ZmysCeJWE08o8T0AXtk5darsCaTVsYZhhgUrq53jizaR2FvsoeCwJhlmwTjkXBY5Pn/ZHw==
|
||||
|
||||
"@types/throttle-debounce@^2.1.0":
|
||||
version "2.1.0"
|
||||
resolved "https://registry.yarnpkg.com/@types/throttle-debounce/-/throttle-debounce-2.1.0.tgz#1c3df624bfc4b62f992d3012b84c56d41eab3776"
|
||||
integrity sha512-5eQEtSCoESnh2FsiLTxE121IiE60hnMqcb435fShf4bpLRjEu1Eoekht23y6zXS9Ts3l+Szu3TARnTsA0GkOkQ==
|
||||
|
||||
"@types/unist@*", "@types/unist@^3.0.0":
|
||||
version "3.0.1"
|
||||
resolved "https://registry.yarnpkg.com/@types/unist/-/unist-3.0.1.tgz#778652d02ddec1bfc9e5e938fec8d407b8e56cba"
|
||||
@ -3003,11 +3200,6 @@ arraybuffer.prototype.slice@^1.0.1:
|
||||
is-array-buffer "^3.0.2"
|
||||
is-shared-array-buffer "^1.0.2"
|
||||
|
||||
asap@~2.0.3:
|
||||
version "2.0.6"
|
||||
resolved "https://registry.npmjs.org/asap/-/asap-2.0.6.tgz"
|
||||
integrity sha512-BSHWgDSAiKs50o2Re8ppvp3seVHXSRM44cdSsT9FfNEUUZLOGWVCsiWaRPWM1Znn+mqZ1OfVZ3z3DWEzSp7hRA==
|
||||
|
||||
assertion-error@^1.1.0:
|
||||
version "1.1.0"
|
||||
resolved "https://registry.npmjs.org/assertion-error/-/assertion-error-1.1.0.tgz"
|
||||
@ -3228,6 +3420,11 @@ caniuse-lite@^1.0.30001406, caniuse-lite@^1.0.30001464, caniuse-lite@^1.0.300015
|
||||
resolved "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001519.tgz"
|
||||
integrity sha512-0QHgqR+Jv4bxHMp8kZ1Kn8CH55OikjKJ6JmKkZYP1F3D7w+lnFXF70nG5eNfsZS89jadi5Ywy5UCSKLAglIRkg==
|
||||
|
||||
case-anything@^2.1.13:
|
||||
version "2.1.13"
|
||||
resolved "https://registry.yarnpkg.com/case-anything/-/case-anything-2.1.13.tgz#0cdc16278cb29a7fcdeb072400da3f342ba329e9"
|
||||
integrity sha512-zlOQ80VrQ2Ue+ymH5OuM/DlDq64mEm+B9UTdHULv5osUMD6HalNTblf2b1u/m6QecjsnOkBpqVZ+XPwIVsy7Ng==
|
||||
|
||||
chai@^4.3.7:
|
||||
version "4.3.7"
|
||||
resolved "https://registry.npmjs.org/chai/-/chai-4.3.7.tgz"
|
||||
@ -3412,11 +3609,6 @@ copy-to-clipboard@^3.3.1:
|
||||
dependencies:
|
||||
toggle-selection "^1.0.6"
|
||||
|
||||
core-js@^3.6.4:
|
||||
version "3.32.0"
|
||||
resolved "https://registry.npmjs.org/core-js/-/core-js-3.32.0.tgz"
|
||||
integrity sha512-rd4rYZNlF3WuoYuRIDEmbR/ga9CeuWX9U05umAvgrrZoHY4Z++cp/xwPQMvUpBB4Ag6J8KfD80G0zwCyaSxDww==
|
||||
|
||||
cosmiconfig@^7.0.0:
|
||||
version "7.1.0"
|
||||
resolved "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-7.1.0.tgz"
|
||||
@ -3428,6 +3620,11 @@ cosmiconfig@^7.0.0:
|
||||
path-type "^4.0.0"
|
||||
yaml "^1.10.0"
|
||||
|
||||
crelt@^1.0.0:
|
||||
version "1.0.6"
|
||||
resolved "https://registry.yarnpkg.com/crelt/-/crelt-1.0.6.tgz#7cc898ea74e190fb6ef9dae57f8f81cf7302df72"
|
||||
integrity sha512-VQ2MBenTq1fWZUH9DJNGti7kKv6EeAuYr3cLwxUWhIu1baTaXh4Ib5W2CqHVqib4/MqbYGJqiL3Zb8GJZr3l4g==
|
||||
|
||||
cross-fetch@3.1.6:
|
||||
version "3.1.6"
|
||||
resolved "https://registry.npmjs.org/cross-fetch/-/cross-fetch-3.1.6.tgz"
|
||||
@ -3435,7 +3632,7 @@ cross-fetch@3.1.6:
|
||||
dependencies:
|
||||
node-fetch "^2.6.11"
|
||||
|
||||
cross-fetch@^3.0.4, cross-fetch@^3.1.5:
|
||||
cross-fetch@^3.1.5:
|
||||
version "3.1.8"
|
||||
resolved "https://registry.npmjs.org/cross-fetch/-/cross-fetch-3.1.8.tgz"
|
||||
integrity sha512-cvA+JwZoU0Xq+h6WkMvAUqPEYy92Obet6UdKLfW60qn99ftItKjB5T+BkyWOFWe2pUyfQ+IJHmpOTznqk1M6Kg==
|
||||
@ -3577,6 +3774,11 @@ damerau-levenshtein@^1.0.8:
|
||||
resolved "https://registry.npmjs.org/damerau-levenshtein/-/damerau-levenshtein-1.0.8.tgz"
|
||||
integrity sha512-sdQSFB7+llfUcQHUQO3+B8ERRj0Oa4w9POWMI/puGtuf7gFywGmkaLCElnudfTiKZV+NvHqL0ifzdrI8Ro7ESA==
|
||||
|
||||
dash-get@^1.0.2:
|
||||
version "1.0.2"
|
||||
resolved "https://registry.yarnpkg.com/dash-get/-/dash-get-1.0.2.tgz#4c9e9ad5ef04c4bf9d3c9a451f6f7997298dcc7c"
|
||||
integrity sha512-4FbVrHDwfOASx7uQVxeiCTo7ggSdYZbqs8lH+WU6ViypPlDbe9y6IP5VVUDQBv9DcnyaiPT5XT0UWHgJ64zLeQ==
|
||||
|
||||
data-urls@^4.0.0:
|
||||
version "4.0.0"
|
||||
resolved "https://registry.npmjs.org/data-urls/-/data-urls-4.0.0.tgz"
|
||||
@ -3674,6 +3876,11 @@ deep-is@^0.1.3:
|
||||
resolved "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz"
|
||||
integrity sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==
|
||||
|
||||
deepmerge@^4.3.1:
|
||||
version "4.3.1"
|
||||
resolved "https://registry.yarnpkg.com/deepmerge/-/deepmerge-4.3.1.tgz#44b5f2147cd3b00d4b56137685966f26fd25dd4a"
|
||||
integrity sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A==
|
||||
|
||||
default-browser-id@^3.0.0:
|
||||
version "3.0.0"
|
||||
resolved "https://registry.npmjs.org/default-browser-id/-/default-browser-id-3.0.0.tgz"
|
||||
@ -3807,15 +4014,6 @@ dotenv@^16.3.1:
|
||||
resolved "https://registry.npmjs.org/dotenv/-/dotenv-16.3.1.tgz"
|
||||
integrity sha512-IPzF4w4/Rd94bA9imS68tZBaYyBWSCE47V1RGuMrB94iyTOIEwRmVL2x/4An+6mETpLrKJ5hQkB8W4kFAadeIQ==
|
||||
|
||||
draft-js@^0.11.7:
|
||||
version "0.11.7"
|
||||
resolved "https://registry.npmjs.org/draft-js/-/draft-js-0.11.7.tgz"
|
||||
integrity sha512-ne7yFfN4sEL82QPQEn80xnADR8/Q6ALVworbC5UOSzOvjffmYfFsr3xSZtxbIirti14R7Y33EZC5rivpLgIbsg==
|
||||
dependencies:
|
||||
fbjs "^2.0.0"
|
||||
immutable "~3.7.4"
|
||||
object-assign "^4.1.1"
|
||||
|
||||
dset@^3.1.1, dset@^3.1.2:
|
||||
version "3.1.2"
|
||||
resolved "https://registry.npmjs.org/dset/-/dset-3.1.2.tgz"
|
||||
@ -3868,6 +4066,11 @@ entities@^4.4.0:
|
||||
resolved "https://registry.npmjs.org/entities/-/entities-4.5.0.tgz"
|
||||
integrity sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==
|
||||
|
||||
entities@~3.0.1:
|
||||
version "3.0.1"
|
||||
resolved "https://registry.yarnpkg.com/entities/-/entities-3.0.1.tgz#2b887ca62585e96db3903482d336c1006c3001d4"
|
||||
integrity sha512-WiyBqoomrwMdFG1e0kqvASYfnlb0lp8M5o5Fw2OFq1hNZxxcNk8Ik0Xm7LxzBhuidnZB/UtBqVCgUz3kBOP51Q==
|
||||
|
||||
env-paths@^2.2.0:
|
||||
version "2.2.1"
|
||||
resolved "https://registry.yarnpkg.com/env-paths/-/env-paths-2.2.1.tgz#420399d416ce1fbe9bc0a07c62fa68d67fd0f8f2"
|
||||
@ -4392,25 +4595,6 @@ fault@^2.0.0:
|
||||
dependencies:
|
||||
format "^0.2.0"
|
||||
|
||||
fbjs-css-vars@^1.0.0:
|
||||
version "1.0.2"
|
||||
resolved "https://registry.npmjs.org/fbjs-css-vars/-/fbjs-css-vars-1.0.2.tgz"
|
||||
integrity sha512-b2XGFAFdWZWg0phtAWLHCk836A1Xann+I+Dgd3Gk64MHKZO44FfoD1KxyvbSh0qZsIoXQGGlVztIY+oitJPpRQ==
|
||||
|
||||
fbjs@^2.0.0:
|
||||
version "2.0.0"
|
||||
resolved "https://registry.npmjs.org/fbjs/-/fbjs-2.0.0.tgz"
|
||||
integrity sha512-8XA8ny9ifxrAWlyhAbexXcs3rRMtxWcs3M0lctLfB49jRDHiaxj+Mo0XxbwE7nKZYzgCFoq64FS+WFd4IycPPQ==
|
||||
dependencies:
|
||||
core-js "^3.6.4"
|
||||
cross-fetch "^3.0.4"
|
||||
fbjs-css-vars "^1.0.0"
|
||||
loose-envify "^1.0.0"
|
||||
object-assign "^4.1.0"
|
||||
promise "^7.1.1"
|
||||
setimmediate "^1.0.5"
|
||||
ua-parser-js "^0.7.18"
|
||||
|
||||
file-entry-cache@^6.0.1:
|
||||
version "6.0.1"
|
||||
resolved "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz"
|
||||
@ -5006,11 +5190,6 @@ immediate@~3.0.5:
|
||||
resolved "https://registry.npmjs.org/immediate/-/immediate-3.0.6.tgz"
|
||||
integrity sha512-XXOFtyqDjNDAQxVfYxuF7g9Il/IbWmmlQg2MYKOH8ExIT1qg6xc4zyS3HaEEATgs1btfzxq15ciUiY7gjSXRGQ==
|
||||
|
||||
immutable@~3.7.4:
|
||||
version "3.7.6"
|
||||
resolved "https://registry.npmjs.org/immutable/-/immutable-3.7.6.tgz"
|
||||
integrity sha512-AizQPcaofEtO11RZhPPHBOJRdo/20MKQF9mBLnVkBoyHi1/zXK8fzVdnEpSV9gxqtnh6Qomfp3F0xT5qP/vThw==
|
||||
|
||||
import-fresh@^3.2.1:
|
||||
version "3.3.0"
|
||||
resolved "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz"
|
||||
@ -5169,6 +5348,13 @@ is-docker@^3.0.0:
|
||||
resolved "https://registry.npmjs.org/is-docker/-/is-docker-3.0.0.tgz"
|
||||
integrity sha512-eljcgEDlEns/7AXFosB5K/2nCM4P7FQPkGc/DWLy5rmFEWvZayGrik1d9/QIY5nJ4f9YsVvBkA6kJpHn9rISdQ==
|
||||
|
||||
is-extendable@^1.0.0:
|
||||
version "1.0.1"
|
||||
resolved "https://registry.yarnpkg.com/is-extendable/-/is-extendable-1.0.1.tgz#a7470f9e426733d81bd81e1155264e3a3507cab4"
|
||||
integrity sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==
|
||||
dependencies:
|
||||
is-plain-object "^2.0.4"
|
||||
|
||||
is-extglob@^2.1.1:
|
||||
version "2.1.1"
|
||||
resolved "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz"
|
||||
@ -5230,6 +5416,13 @@ is-plain-obj@^4.0.0:
|
||||
resolved "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-4.1.0.tgz"
|
||||
integrity sha512-+Pgi+vMuUNkJyExiMBt5IlFoMyKnr5zhJ4Uspz58WOhBF5QoIZkFyNHIbBAtHwzVAgk5RtndVNsDRN61/mmDqg==
|
||||
|
||||
is-plain-object@^2.0.4:
|
||||
version "2.0.4"
|
||||
resolved "https://registry.yarnpkg.com/is-plain-object/-/is-plain-object-2.0.4.tgz#2c163b3fafb1b606d9d17928f05c2a1c38e07677"
|
||||
integrity sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==
|
||||
dependencies:
|
||||
isobject "^3.0.1"
|
||||
|
||||
is-potential-custom-element-name@^1.0.1:
|
||||
version "1.0.1"
|
||||
resolved "https://registry.npmjs.org/is-potential-custom-element-name/-/is-potential-custom-element-name-1.0.1.tgz"
|
||||
@ -5340,6 +5533,11 @@ isexe@^3.1.1:
|
||||
resolved "https://registry.yarnpkg.com/isexe/-/isexe-3.1.1.tgz#4a407e2bd78ddfb14bea0c27c6f7072dde775f0d"
|
||||
integrity sha512-LpB/54B+/2J5hqQ7imZHfdU31OlgQqx7ZicVlkm9kzg9/w8GKLEcFfJl/t7DCEDueOyBAD6zCCwTO6Fzs0NoEQ==
|
||||
|
||||
isobject@^3.0.1:
|
||||
version "3.0.1"
|
||||
resolved "https://registry.yarnpkg.com/isobject/-/isobject-3.0.1.tgz#4e431e92b11a9731636aa1f9c8d1ccbcfdab78df"
|
||||
integrity sha512-WhB9zCku7EGTj/HQQRz5aUQEUeoQZH2bWcltRErOpymJ4boYE6wL9Tbr23krRPSZ+C5zqNSrSw+Cc7sZZ4b7vg==
|
||||
|
||||
jackspeak@^2.3.5:
|
||||
version "2.3.6"
|
||||
resolved "https://registry.yarnpkg.com/jackspeak/-/jackspeak-2.3.6.tgz#647ecc472238aee4b06ac0e461acc21a8c505ca8"
|
||||
@ -5512,6 +5710,13 @@ lines-and-columns@^1.1.6:
|
||||
resolved "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.2.4.tgz"
|
||||
integrity sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==
|
||||
|
||||
linkify-it@^4.0.1:
|
||||
version "4.0.1"
|
||||
resolved "https://registry.yarnpkg.com/linkify-it/-/linkify-it-4.0.1.tgz#01f1d5e508190d06669982ba31a7d9f56a5751ec"
|
||||
integrity sha512-C7bfi1UZmoj8+PQx22XyeXCuBlokoyWQL5pWSP+EI6nzRylyThouddufc2c1NDIcP9k5agmN9fLpA7VNJfIiqw==
|
||||
dependencies:
|
||||
uc.micro "^1.0.1"
|
||||
|
||||
local-pkg@^0.4.3:
|
||||
version "0.4.3"
|
||||
resolved "https://registry.npmjs.org/local-pkg/-/local-pkg-0.4.3.tgz"
|
||||
@ -5531,11 +5736,6 @@ locate-path@^6.0.0:
|
||||
dependencies:
|
||||
p-locate "^5.0.0"
|
||||
|
||||
lodash-es@^4.17.21:
|
||||
version "4.17.21"
|
||||
resolved "https://registry.npmjs.org/lodash-es/-/lodash-es-4.17.21.tgz"
|
||||
integrity sha512-mKnC+QJ9pWVzv+C4/U3rRsHapFfHvQFoFB92e52xeyGMcX6/OlIl78je1u8vePzYZSkkogMPJ2yjxxsb89cxyw==
|
||||
|
||||
lodash.castarray@^4.4.0:
|
||||
version "4.4.0"
|
||||
resolved "https://registry.npmjs.org/lodash.castarray/-/lodash.castarray-4.4.0.tgz"
|
||||
@ -5622,6 +5822,11 @@ magic-string@^0.30.0:
|
||||
dependencies:
|
||||
"@jridgewell/sourcemap-codec" "^1.4.15"
|
||||
|
||||
make-error@^1.3.6:
|
||||
version "1.3.6"
|
||||
resolved "https://registry.yarnpkg.com/make-error/-/make-error-1.3.6.tgz#2eb2e37ea9b67c4891f684a1394799af484cf7a2"
|
||||
integrity sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==
|
||||
|
||||
make-fetch-happen@^13.0.0:
|
||||
version "13.0.0"
|
||||
resolved "https://registry.yarnpkg.com/make-fetch-happen/-/make-fetch-happen-13.0.0.tgz#705d6f6cbd7faecb8eac2432f551e49475bfedf0"
|
||||
@ -5639,6 +5844,17 @@ make-fetch-happen@^13.0.0:
|
||||
promise-retry "^2.0.1"
|
||||
ssri "^10.0.0"
|
||||
|
||||
markdown-it@^13.0.1:
|
||||
version "13.0.2"
|
||||
resolved "https://registry.yarnpkg.com/markdown-it/-/markdown-it-13.0.2.tgz#1bc22e23379a6952e5d56217fbed881e0c94d536"
|
||||
integrity sha512-FtwnEuuK+2yVU7goGn/MJ0WBZMM9ZPgU9spqlFs7/A/pDIUNSOQZhUgOqYCficIuR2QaFnrt8LHqBWsbTAoI5w==
|
||||
dependencies:
|
||||
argparse "^2.0.1"
|
||||
entities "~3.0.1"
|
||||
linkify-it "^4.0.1"
|
||||
mdurl "^1.0.1"
|
||||
uc.micro "^1.0.5"
|
||||
|
||||
marked@^9.0.3:
|
||||
version "9.0.3"
|
||||
resolved "https://registry.yarnpkg.com/marked/-/marked-9.0.3.tgz#95be5e8cba93f2c2ca1d6503794c4f02d81c97d9"
|
||||
@ -5711,6 +5927,11 @@ mdn-data@2.0.14:
|
||||
resolved "https://registry.npmjs.org/mdn-data/-/mdn-data-2.0.14.tgz"
|
||||
integrity sha512-dn6wd0uw5GsdswPFfsgMp5NSB0/aDe6fK94YJV/AJDYXL6HVLWBsxeq7js7Ad+mU2K9LAlwpk6kN2D5mwCPVow==
|
||||
|
||||
mdurl@^1.0.1:
|
||||
version "1.0.1"
|
||||
resolved "https://registry.yarnpkg.com/mdurl/-/mdurl-1.0.1.tgz#fe85b2ec75a59037f2adfec100fd6c601761152e"
|
||||
integrity sha512-/sKlQJCBYVY9Ers9hqzKou4H6V5UWc/M59TH2dvkt+84itfnq7uFOMLpOiOS4ujvHP4etln18fmIxA5R5fll0g==
|
||||
|
||||
merge-stream@^2.0.0:
|
||||
version "2.0.0"
|
||||
resolved "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz"
|
||||
@ -6314,7 +6535,7 @@ obj-case@0.2.1:
|
||||
resolved "https://registry.npmjs.org/obj-case/-/obj-case-0.2.1.tgz"
|
||||
integrity sha512-PquYBBTy+Y6Ob/O2574XHhDtHJlV1cJHMCgW+rDRc9J5hhmRelJB3k5dTK/3cVmFVtzvAKuENeuLpoyTzMzkOg==
|
||||
|
||||
object-assign@^4.0.1, object-assign@^4.1.0, object-assign@^4.1.1:
|
||||
object-assign@^4.0.1, object-assign@^4.1.1:
|
||||
version "4.1.1"
|
||||
resolved "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz"
|
||||
integrity sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==
|
||||
@ -6388,6 +6609,20 @@ object.hasown@^1.1.2:
|
||||
define-properties "^1.1.4"
|
||||
es-abstract "^1.20.4"
|
||||
|
||||
object.omit@^3.0.0:
|
||||
version "3.0.0"
|
||||
resolved "https://registry.yarnpkg.com/object.omit/-/object.omit-3.0.0.tgz#0e3edc2fce2ba54df5577ff529f6d97bd8a522af"
|
||||
integrity sha512-EO+BCv6LJfu+gBIF3ggLicFebFLN5zqzz/WWJlMFfkMyGth+oBkhxzDl0wx2W4GkLzuQs/FsSkXZb2IMWQqmBQ==
|
||||
dependencies:
|
||||
is-extendable "^1.0.0"
|
||||
|
||||
object.pick@^1.3.0:
|
||||
version "1.3.0"
|
||||
resolved "https://registry.yarnpkg.com/object.pick/-/object.pick-1.3.0.tgz#87a10ac4c1694bd2e1cbf53591a66141fb5dd747"
|
||||
integrity sha512-tqa/UMy/CCoYmj+H5qc07qvSL9dqcs/WZENZ1JbtWBlATP+iVOe778gE6MSijnyCnORzDuX6hU+LA4SZ09YjFQ==
|
||||
dependencies:
|
||||
isobject "^3.0.1"
|
||||
|
||||
object.values@^1.1.6:
|
||||
version "1.1.6"
|
||||
resolved "https://registry.npmjs.org/object.values/-/object.values-1.1.6.tgz"
|
||||
@ -6440,6 +6675,11 @@ optionator@^0.9.3:
|
||||
prelude-ls "^1.2.1"
|
||||
type-check "^0.4.0"
|
||||
|
||||
orderedmap@^2.0.0:
|
||||
version "2.1.1"
|
||||
resolved "https://registry.yarnpkg.com/orderedmap/-/orderedmap-2.1.1.tgz#61481269c44031c449915497bf5a4ad273c512d2"
|
||||
integrity sha512-TvAWxi0nDe1j/rtMcWcIj94+Ffe6n7zhow33h40SKxmsmozs6dz/e+EajymfoFcHd7sxNn8yHM8839uixMOV6g==
|
||||
|
||||
p-limit@^3.0.2:
|
||||
version "3.1.0"
|
||||
resolved "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz"
|
||||
@ -6731,13 +6971,6 @@ promise-retry@^2.0.1:
|
||||
err-code "^2.0.2"
|
||||
retry "^0.12.0"
|
||||
|
||||
promise@^7.1.1:
|
||||
version "7.3.1"
|
||||
resolved "https://registry.npmjs.org/promise/-/promise-7.3.1.tgz"
|
||||
integrity sha512-nolQXZ/4L+bP/UGlkfaIujX9BKxGwmQ9OT4mOt5yvy8iK1h3wqTEJCijzGANTCCl9nWjY41juyAn2K3Q1hLLTg==
|
||||
dependencies:
|
||||
asap "~2.0.3"
|
||||
|
||||
prop-types@^15.0.0, prop-types@^15.7.2, prop-types@^15.8.1:
|
||||
version "15.8.1"
|
||||
resolved "https://registry.npmjs.org/prop-types/-/prop-types-15.8.1.tgz"
|
||||
@ -6757,6 +6990,160 @@ property-information@^6.0.0:
|
||||
resolved "https://registry.npmjs.org/property-information/-/property-information-6.2.0.tgz"
|
||||
integrity sha512-kma4U7AFCTwpqq5twzC1YVIDXSqg6qQK6JN0smOw8fgRy1OkMi0CYSzFmsy6dnqSenamAtj0CyXMUJ1Mf6oROg==
|
||||
|
||||
prosemirror-changeset@^2.2.0:
|
||||
version "2.2.1"
|
||||
resolved "https://registry.yarnpkg.com/prosemirror-changeset/-/prosemirror-changeset-2.2.1.tgz#dae94b63aec618fac7bb9061648e6e2a79988383"
|
||||
integrity sha512-J7msc6wbxB4ekDFj+n9gTW/jav/p53kdlivvuppHsrZXCaQdVgRghoZbSS3kwrRyAstRVQ4/+u5k7YfLgkkQvQ==
|
||||
dependencies:
|
||||
prosemirror-transform "^1.0.0"
|
||||
|
||||
prosemirror-collab@^1.3.0:
|
||||
version "1.3.1"
|
||||
resolved "https://registry.yarnpkg.com/prosemirror-collab/-/prosemirror-collab-1.3.1.tgz#0e8c91e76e009b53457eb3b3051fb68dad029a33"
|
||||
integrity sha512-4SnynYR9TTYaQVXd/ieUvsVV4PDMBzrq2xPUWutHivDuOshZXqQ5rGbZM84HEaXKbLdItse7weMGOUdDVcLKEQ==
|
||||
dependencies:
|
||||
prosemirror-state "^1.0.0"
|
||||
|
||||
prosemirror-commands@^1.0.0, prosemirror-commands@^1.3.1:
|
||||
version "1.5.2"
|
||||
resolved "https://registry.yarnpkg.com/prosemirror-commands/-/prosemirror-commands-1.5.2.tgz#e94aeea52286f658cd984270de9b4c3fff580852"
|
||||
integrity sha512-hgLcPaakxH8tu6YvVAaILV2tXYsW3rAdDR8WNkeKGcgeMVQg3/TMhPdVoh7iAmfgVjZGtcOSjKiQaoeKjzd2mQ==
|
||||
dependencies:
|
||||
prosemirror-model "^1.0.0"
|
||||
prosemirror-state "^1.0.0"
|
||||
prosemirror-transform "^1.0.0"
|
||||
|
||||
prosemirror-dropcursor@^1.5.0:
|
||||
version "1.8.1"
|
||||
resolved "https://registry.yarnpkg.com/prosemirror-dropcursor/-/prosemirror-dropcursor-1.8.1.tgz#49b9fb2f583e0d0f4021ff87db825faa2be2832d"
|
||||
integrity sha512-M30WJdJZLyXHi3N8vxN6Zh5O8ZBbQCz0gURTfPmTIBNQ5pxrdU7A58QkNqfa98YEjSAL1HUyyU34f6Pm5xBSGw==
|
||||
dependencies:
|
||||
prosemirror-state "^1.0.0"
|
||||
prosemirror-transform "^1.1.0"
|
||||
prosemirror-view "^1.1.0"
|
||||
|
||||
prosemirror-gapcursor@^1.3.1:
|
||||
version "1.3.2"
|
||||
resolved "https://registry.yarnpkg.com/prosemirror-gapcursor/-/prosemirror-gapcursor-1.3.2.tgz#5fa336b83789c6199a7341c9493587e249215cb4"
|
||||
integrity sha512-wtjswVBd2vaQRrnYZaBCbyDqr232Ed4p2QPtRIUK5FuqHYKGWkEwl08oQM4Tw7DOR0FsasARV5uJFvMZWxdNxQ==
|
||||
dependencies:
|
||||
prosemirror-keymap "^1.0.0"
|
||||
prosemirror-model "^1.0.0"
|
||||
prosemirror-state "^1.0.0"
|
||||
prosemirror-view "^1.0.0"
|
||||
|
||||
prosemirror-history@^1.0.0, prosemirror-history@^1.3.0:
|
||||
version "1.3.2"
|
||||
resolved "https://registry.yarnpkg.com/prosemirror-history/-/prosemirror-history-1.3.2.tgz#ce6ad7ab9db83e761aee716f3040d74738311b15"
|
||||
integrity sha512-/zm0XoU/N/+u7i5zepjmZAEnpvjDtzoPWW6VmKptcAnPadN/SStsBjMImdCEbb3seiNTpveziPTIrXQbHLtU1g==
|
||||
dependencies:
|
||||
prosemirror-state "^1.2.2"
|
||||
prosemirror-transform "^1.0.0"
|
||||
prosemirror-view "^1.31.0"
|
||||
rope-sequence "^1.3.0"
|
||||
|
||||
prosemirror-inputrules@^1.2.0:
|
||||
version "1.3.0"
|
||||
resolved "https://registry.yarnpkg.com/prosemirror-inputrules/-/prosemirror-inputrules-1.3.0.tgz#d43ce469ffe09a1b4cbac3f0ad367b0e4b504875"
|
||||
integrity sha512-z1GRP2vhh5CihYMQYsJSa1cOwXb3SYxALXOIfAkX8nZserARtl9LiL+CEl+T+OFIsXc3mJIHKhbsmRzC0HDAXA==
|
||||
dependencies:
|
||||
prosemirror-state "^1.0.0"
|
||||
prosemirror-transform "^1.0.0"
|
||||
|
||||
prosemirror-keymap@^1.0.0, prosemirror-keymap@^1.1.2, prosemirror-keymap@^1.2.0:
|
||||
version "1.2.2"
|
||||
resolved "https://registry.yarnpkg.com/prosemirror-keymap/-/prosemirror-keymap-1.2.2.tgz#14a54763a29c7b2704f561088ccf3384d14eb77e"
|
||||
integrity sha512-EAlXoksqC6Vbocqc0GtzCruZEzYgrn+iiGnNjsJsH4mrnIGex4qbLdWWNza3AW5W36ZRrlBID0eM6bdKH4OStQ==
|
||||
dependencies:
|
||||
prosemirror-state "^1.0.0"
|
||||
w3c-keyname "^2.2.0"
|
||||
|
||||
prosemirror-markdown@^1.10.1:
|
||||
version "1.11.2"
|
||||
resolved "https://registry.yarnpkg.com/prosemirror-markdown/-/prosemirror-markdown-1.11.2.tgz#f6e529e669d11fa3eec859e93c0d2c91788d6c80"
|
||||
integrity sha512-Eu5g4WPiCdqDTGhdSsG9N6ZjACQRYrsAkrF9KYfdMaCmjIApH75aVncsWYOJvEk2i1B3i8jZppv3J/tnuHGiUQ==
|
||||
dependencies:
|
||||
markdown-it "^13.0.1"
|
||||
prosemirror-model "^1.0.0"
|
||||
|
||||
prosemirror-menu@^1.2.1:
|
||||
version "1.2.4"
|
||||
resolved "https://registry.yarnpkg.com/prosemirror-menu/-/prosemirror-menu-1.2.4.tgz#3cfdc7c06d10f9fbd1bce29082c498bd11a0a79a"
|
||||
integrity sha512-S/bXlc0ODQup6aiBbWVsX/eM+xJgCTAfMq/nLqaO5ID/am4wS0tTCIkzwytmao7ypEtjj39i7YbJjAgO20mIqA==
|
||||
dependencies:
|
||||
crelt "^1.0.0"
|
||||
prosemirror-commands "^1.0.0"
|
||||
prosemirror-history "^1.0.0"
|
||||
prosemirror-state "^1.0.0"
|
||||
|
||||
prosemirror-model@^1.0.0, prosemirror-model@^1.16.0, prosemirror-model@^1.18.1, prosemirror-model@^1.19.0, prosemirror-model@^1.8.1:
|
||||
version "1.19.3"
|
||||
resolved "https://registry.yarnpkg.com/prosemirror-model/-/prosemirror-model-1.19.3.tgz#f0d55285487fefd962d0ac695f716f4ec6705006"
|
||||
integrity sha512-tgSnwN7BS7/UM0sSARcW+IQryx2vODKX4MI7xpqY2X+iaepJdKBPc7I4aACIsDV/LTaTjt12Z56MhDr9LsyuZQ==
|
||||
dependencies:
|
||||
orderedmap "^2.0.0"
|
||||
|
||||
prosemirror-schema-basic@^1.2.0:
|
||||
version "1.2.2"
|
||||
resolved "https://registry.yarnpkg.com/prosemirror-schema-basic/-/prosemirror-schema-basic-1.2.2.tgz#6695f5175e4628aab179bf62e5568628b9cfe6c7"
|
||||
integrity sha512-/dT4JFEGyO7QnNTe9UaKUhjDXbTNkiWTq/N4VpKaF79bBjSExVV2NXmJpcM7z/gD7mbqNjxbmWW5nf1iNSSGnw==
|
||||
dependencies:
|
||||
prosemirror-model "^1.19.0"
|
||||
|
||||
prosemirror-schema-list@^1.2.2:
|
||||
version "1.3.0"
|
||||
resolved "https://registry.yarnpkg.com/prosemirror-schema-list/-/prosemirror-schema-list-1.3.0.tgz#05374702cf35a3ba5e7ec31079e355a488d52519"
|
||||
integrity sha512-Hz/7gM4skaaYfRPNgr421CU4GSwotmEwBVvJh5ltGiffUJwm7C8GfN/Bc6DR1EKEp5pDKhODmdXXyi9uIsZl5A==
|
||||
dependencies:
|
||||
prosemirror-model "^1.0.0"
|
||||
prosemirror-state "^1.0.0"
|
||||
prosemirror-transform "^1.7.3"
|
||||
|
||||
prosemirror-state@^1.0.0, prosemirror-state@^1.2.2, prosemirror-state@^1.3.1, prosemirror-state@^1.4.1:
|
||||
version "1.4.3"
|
||||
resolved "https://registry.yarnpkg.com/prosemirror-state/-/prosemirror-state-1.4.3.tgz#94aecf3ffd54ec37e87aa7179d13508da181a080"
|
||||
integrity sha512-goFKORVbvPuAQaXhpbemJFRKJ2aixr+AZMGiquiqKxaucC6hlpHNZHWgz5R7dS4roHiwq9vDctE//CZ++o0W1Q==
|
||||
dependencies:
|
||||
prosemirror-model "^1.0.0"
|
||||
prosemirror-transform "^1.0.0"
|
||||
prosemirror-view "^1.27.0"
|
||||
|
||||
prosemirror-tables@^1.3.0:
|
||||
version "1.3.4"
|
||||
resolved "https://registry.yarnpkg.com/prosemirror-tables/-/prosemirror-tables-1.3.4.tgz#0b7cc16d49f90c5b834c9f29291c545478ce9ab0"
|
||||
integrity sha512-z6uLSQ1BLC3rgbGwZmpfb+xkdvD7W/UOsURDfognZFYaTtc0gsk7u/t71Yijp2eLflVpffMk6X0u0+u+MMDvIw==
|
||||
dependencies:
|
||||
prosemirror-keymap "^1.1.2"
|
||||
prosemirror-model "^1.8.1"
|
||||
prosemirror-state "^1.3.1"
|
||||
prosemirror-transform "^1.2.1"
|
||||
prosemirror-view "^1.13.3"
|
||||
|
||||
prosemirror-trailing-node@^2.0.2:
|
||||
version "2.0.7"
|
||||
resolved "https://registry.yarnpkg.com/prosemirror-trailing-node/-/prosemirror-trailing-node-2.0.7.tgz#ba782a7929f18bcae650b1c7082a2d10443eab19"
|
||||
integrity sha512-8zcZORYj/8WEwsGo6yVCRXFMOfBo0Ub3hCUvmoWIZYfMP26WqENU0mpEP27w7mt8buZWuGrydBewr0tOArPb1Q==
|
||||
dependencies:
|
||||
"@remirror/core-constants" "^2.0.2"
|
||||
"@remirror/core-helpers" "^3.0.0"
|
||||
escape-string-regexp "^4.0.0"
|
||||
|
||||
prosemirror-transform@^1.0.0, prosemirror-transform@^1.1.0, prosemirror-transform@^1.2.1, prosemirror-transform@^1.7.0, prosemirror-transform@^1.7.3:
|
||||
version "1.8.0"
|
||||
resolved "https://registry.yarnpkg.com/prosemirror-transform/-/prosemirror-transform-1.8.0.tgz#a47c64a3c373c1bd0ff46e95be3210c8dda0cd11"
|
||||
integrity sha512-BaSBsIMv52F1BVVMvOmp1yzD3u65uC3HTzCBQV1WDPqJRQ2LuHKcyfn0jwqodo8sR9vVzMzZyI+Dal5W9E6a9A==
|
||||
dependencies:
|
||||
prosemirror-model "^1.0.0"
|
||||
|
||||
prosemirror-view@^1.0.0, prosemirror-view@^1.1.0, prosemirror-view@^1.13.3, prosemirror-view@^1.27.0, prosemirror-view@^1.28.2, prosemirror-view@^1.31.0:
|
||||
version "1.32.4"
|
||||
resolved "https://registry.yarnpkg.com/prosemirror-view/-/prosemirror-view-1.32.4.tgz#c8f24bab3bcc8b57bcfb62490fc468180559f51b"
|
||||
integrity sha512-WoT+ZYePp0WQvp5coABAysheZg9WttW3TSEUNgsfDQXmVOJlnjkbFbXicKPvWFLiC0ZjKt1ykbyoVKqhVnCiSQ==
|
||||
dependencies:
|
||||
prosemirror-model "^1.16.0"
|
||||
prosemirror-state "^1.0.0"
|
||||
prosemirror-transform "^1.1.0"
|
||||
|
||||
proxy-from-env@^1.1.0:
|
||||
version "1.1.0"
|
||||
resolved "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz"
|
||||
@ -6822,7 +7209,7 @@ react-dropzone@^14.2.3:
|
||||
file-selector "^0.6.0"
|
||||
prop-types "^15.8.1"
|
||||
|
||||
react-fast-compare@^3.0.1, react-fast-compare@^3.2.0:
|
||||
react-fast-compare@^3.2.0:
|
||||
version "3.2.2"
|
||||
resolved "https://registry.npmjs.org/react-fast-compare/-/react-fast-compare-3.2.2.tgz"
|
||||
integrity sha512-nsO+KSNgo1SbJqJEYRE9ERzo7YtYbou/OqjSQKxV7jcKox7+usiUVZOAC+XnDOABXggQTno0Y1CpVnuWEc1boQ==
|
||||
@ -6886,14 +7273,6 @@ react-markdown@^8.0.7:
|
||||
unist-util-visit "^4.0.0"
|
||||
vfile "^5.0.0"
|
||||
|
||||
react-popper@^2.3.0:
|
||||
version "2.3.0"
|
||||
resolved "https://registry.npmjs.org/react-popper/-/react-popper-2.3.0.tgz"
|
||||
integrity sha512-e1hj8lL3uM+sgSR4Lxzn5h1GxBlpa4CQz0XLF8kx4MDrDRWY0Ena4c97PUeSX9i5W3UAfDP0z0FXCTQkoXUl3Q==
|
||||
dependencies:
|
||||
react-fast-compare "^3.0.1"
|
||||
warning "^4.0.2"
|
||||
|
||||
react-refresh@^0.14.0:
|
||||
version "0.14.0"
|
||||
resolved "https://registry.npmjs.org/react-refresh/-/react-refresh-0.14.0.tgz"
|
||||
@ -7117,6 +7496,11 @@ rollup@^3.27.1:
|
||||
optionalDependencies:
|
||||
fsevents "~2.3.2"
|
||||
|
||||
rope-sequence@^1.3.0:
|
||||
version "1.3.4"
|
||||
resolved "https://registry.yarnpkg.com/rope-sequence/-/rope-sequence-1.3.4.tgz#df85711aaecd32f1e756f76e43a415171235d425"
|
||||
integrity sha512-UT5EDe2cu2E/6O4igUr5PSFs23nvvukicWHx6GnOPlHAiiYbzNuCRQCuiUdHJQcqKalLKlrYJnjY0ySGsXNQXQ==
|
||||
|
||||
rrweb-cssom@^0.6.0:
|
||||
version "0.6.0"
|
||||
resolved "https://registry.npmjs.org/rrweb-cssom/-/rrweb-cssom-0.6.0.tgz"
|
||||
@ -7215,11 +7599,6 @@ set-harmonic-interval@^1.0.1:
|
||||
resolved "https://registry.npmjs.org/set-harmonic-interval/-/set-harmonic-interval-1.0.1.tgz"
|
||||
integrity sha512-AhICkFV84tBP1aWqPwLZqFvAwqEoVA9kxNMniGEUvzOlm4vLmOFLiTT3UZ6bziJTy4bOVpzWGTfSCbmaayGx8g==
|
||||
|
||||
setimmediate@^1.0.5:
|
||||
version "1.0.5"
|
||||
resolved "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.5.tgz"
|
||||
integrity sha512-MATJdZp8sLqDl/68LfQmbP8zKPLQNV6BIZoIgrscFDQ+RsvK/BxeDQOgyxKKoh0y/8h3BqVFnCqQ/gd+reiIXA==
|
||||
|
||||
sharp@^0.32.4:
|
||||
version "0.32.4"
|
||||
resolved "https://registry.npmjs.org/sharp/-/sharp-0.32.4.tgz"
|
||||
@ -7437,6 +7816,7 @@ streamx@^2.15.0:
|
||||
queue-tick "^1.0.1"
|
||||
|
||||
"string-width-cjs@npm:string-width@^4.2.0", string-width@^4.1.0:
|
||||
name string-width-cjs
|
||||
version "4.2.3"
|
||||
resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010"
|
||||
integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==
|
||||
@ -7765,6 +8145,13 @@ tinyspy@^2.1.1:
|
||||
resolved "https://registry.npmjs.org/tinyspy/-/tinyspy-2.1.1.tgz"
|
||||
integrity sha512-XPJL2uSzcOyBMky6OFrusqWlzfFrXtE0hPuMgW8A2HmaqrPo4ZQHRN/V0QXN3FSjKxpsbRrFc5LI7KOwBsT1/w==
|
||||
|
||||
tippy.js@^6.3.7:
|
||||
version "6.3.7"
|
||||
resolved "https://registry.yarnpkg.com/tippy.js/-/tippy.js-6.3.7.tgz#8ccfb651d642010ed9a32ff29b0e9e19c5b8c61c"
|
||||
integrity sha512-E1d3oP2emgJ9dRQZdf3Kkn0qJgI6ZLpyS5z6ZkY1DF3kaQaBsGZsndEpHwx+eC+tYM41HaSNvNtLx8tU57FzTQ==
|
||||
dependencies:
|
||||
"@popperjs/core" "^2.9.0"
|
||||
|
||||
titleize@^3.0.0:
|
||||
version "3.0.0"
|
||||
resolved "https://registry.npmjs.org/titleize/-/titleize-3.0.0.tgz"
|
||||
@ -7885,6 +8272,11 @@ type-fest@^0.7.1:
|
||||
resolved "https://registry.npmjs.org/type-fest/-/type-fest-0.7.1.tgz"
|
||||
integrity sha512-Ne2YiiGN8bmrmJJEuTWTLJR32nh/JdL1+PSicowtNb0WFpn59GK8/lfD61bVtzguz7b3PBt74nxpv/Pw5po5Rg==
|
||||
|
||||
type-fest@^2.19.0:
|
||||
version "2.19.0"
|
||||
resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-2.19.0.tgz#88068015bb33036a598b952e55e9311a60fd3a9b"
|
||||
integrity sha512-RAH822pAdBgcNMAfWnCBU3CFZcfZ/i1eZjwFU/dsLKumyuuP3niueg2UAukXYF0E2AAoc82ZSSf9J0WQBinzHA==
|
||||
|
||||
type@^1.0.1:
|
||||
version "1.2.0"
|
||||
resolved "https://registry.npmjs.org/type/-/type-1.2.0.tgz"
|
||||
@ -7951,10 +8343,10 @@ typescript@^5.0.4:
|
||||
resolved "https://registry.npmjs.org/typescript/-/typescript-5.1.6.tgz"
|
||||
integrity sha512-zaWCozRZ6DLEWAWFrVDz1H6FVXzUSfTy5FUMWsQlU8Ym5JP9eO4xkTIROFCQvhQf61z6O/G6ugw3SgAnvvm+HA==
|
||||
|
||||
ua-parser-js@^0.7.18:
|
||||
version "0.7.35"
|
||||
resolved "https://registry.npmjs.org/ua-parser-js/-/ua-parser-js-0.7.35.tgz"
|
||||
integrity sha512-veRf7dawaj9xaWEu9HoTVn5Pggtc/qj+kqTOFvNiN1l0YdxwC1kvel57UCjThjGa3BHBihE8/UJAHI+uQHmd/g==
|
||||
uc.micro@^1.0.1, uc.micro@^1.0.5:
|
||||
version "1.0.6"
|
||||
resolved "https://registry.yarnpkg.com/uc.micro/-/uc.micro-1.0.6.tgz#9c411a802a409a91fc6cf74081baba34b24499ac"
|
||||
integrity sha512-8Y75pvTYkLJW2hWQHXxoqRgV7qb9B+9vFEtidML+7koHUFapnVJAZ6cKs+Qjz5Aw3aZWHMC6u0wJE3At+nSGwA==
|
||||
|
||||
ufo@^1.1.2:
|
||||
version "1.2.0"
|
||||
@ -8594,6 +8986,11 @@ void-elements@3.1.0:
|
||||
resolved "https://registry.npmjs.org/void-elements/-/void-elements-3.1.0.tgz"
|
||||
integrity sha512-Dhxzh5HZuiHQhbvTW9AMetFfBHDMYpo23Uo9btPXgdYP+3T5S+p+jgNy7spra+veYhBP2dCSgxR/i2Y02h5/6w==
|
||||
|
||||
w3c-keyname@^2.2.0:
|
||||
version "2.2.8"
|
||||
resolved "https://registry.yarnpkg.com/w3c-keyname/-/w3c-keyname-2.2.8.tgz#7b17c8c6883d4e8b86ac8aba79d39e880f8869c5"
|
||||
integrity sha512-dpojBhNsCNN7T82Tm7k26A6G9ML3NkhDsnw9n/eoxSRlVBB4CEtIQ/KTCLI2Fwf3ataSXRhYFkQi3SlnFwPvPQ==
|
||||
|
||||
w3c-xmlserializer@^4.0.0:
|
||||
version "4.0.0"
|
||||
resolved "https://registry.npmjs.org/w3c-xmlserializer/-/w3c-xmlserializer-4.0.0.tgz"
|
||||
@ -8601,13 +8998,6 @@ w3c-xmlserializer@^4.0.0:
|
||||
dependencies:
|
||||
xml-name-validator "^4.0.0"
|
||||
|
||||
warning@^4.0.2:
|
||||
version "4.0.3"
|
||||
resolved "https://registry.npmjs.org/warning/-/warning-4.0.3.tgz"
|
||||
integrity sha512-rpJyN222KWIvHJ/F53XSZv0Zl/accqHR8et1kpaMTD/fLCRxtV8iX8czMzY7sVZupTI3zcUTg8eycS2kNF9l6w==
|
||||
dependencies:
|
||||
loose-envify "^1.0.0"
|
||||
|
||||
watchpack@2.4.0:
|
||||
version "2.4.0"
|
||||
resolved "https://registry.npmjs.org/watchpack/-/watchpack-2.4.0.tgz"
|
||||
|
Loading…
Reference in New Issue
Block a user