mirror of
https://github.com/docmost/docmost.git
synced 2026-08-29 18:14:58 +08:00
merge main
This commit is contained in:
@@ -1,15 +1,11 @@
|
|||||||
import {
|
import { BubbleMenu as BaseBubbleMenu } from "@tiptap/react/menus";
|
||||||
BubbleMenu as BaseBubbleMenu,
|
import { posToDOMRect, findParentNode } from "@tiptap/react";
|
||||||
posToDOMRect,
|
|
||||||
findParentNode,
|
|
||||||
} from "@tiptap/react";
|
|
||||||
import { Node as PMNode } from "@tiptap/pm/model";
|
import { Node as PMNode } from "@tiptap/pm/model";
|
||||||
import React, { useCallback } from "react";
|
import React, { useCallback } from "react";
|
||||||
import { ActionIcon, Tooltip } from "@mantine/core";
|
import { ActionIcon, Tooltip } from "@mantine/core";
|
||||||
import { IconTrash } from "@tabler/icons-react";
|
import { IconTrash } from "@tabler/icons-react";
|
||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
import { Editor } from "@tiptap/core";
|
import { Editor } from "@tiptap/core";
|
||||||
import { sticky } from "tippy.js";
|
|
||||||
|
|
||||||
interface SubpagesMenuProps {
|
interface SubpagesMenuProps {
|
||||||
editor: Editor;
|
editor: Editor;
|
||||||
@@ -64,7 +60,7 @@ export const SubpagesMenu = React.memo(
|
|||||||
editor={editor}
|
editor={editor}
|
||||||
pluginKey={`subpages-menu}`}
|
pluginKey={`subpages-menu}`}
|
||||||
updateDelay={0}
|
updateDelay={0}
|
||||||
tippyOptions={{
|
/* tippyOptions={{
|
||||||
getReferenceClientRect,
|
getReferenceClientRect,
|
||||||
offset: [0, 8],
|
offset: [0, 8],
|
||||||
zIndex: 99,
|
zIndex: 99,
|
||||||
@@ -73,7 +69,7 @@ export const SubpagesMenu = React.memo(
|
|||||||
},
|
},
|
||||||
plugins: [sticky],
|
plugins: [sticky],
|
||||||
sticky: "popper",
|
sticky: "popper",
|
||||||
}}
|
}}*/
|
||||||
shouldShow={shouldShow}
|
shouldShow={shouldShow}
|
||||||
>
|
>
|
||||||
<Tooltip position="top" label={t("Delete")}>
|
<Tooltip position="top" label={t("Delete")}>
|
||||||
|
|||||||
@@ -19,6 +19,7 @@ export default function SubpagesView(props: NodeViewProps) {
|
|||||||
const { spaceSlug, shareId } = useParams();
|
const { spaceSlug, shareId } = useParams();
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
|
|
||||||
|
//@ts-ignore
|
||||||
const currentPageId = editor.storage.pageId;
|
const currentPageId = editor.storage.pageId;
|
||||||
|
|
||||||
// Get subpages from shared tree if we're in a shared context
|
// Get subpages from shared tree if we're in a shared context
|
||||||
|
|||||||
@@ -1,13 +1,7 @@
|
|||||||
import { StarterKit } from "@tiptap/starter-kit";
|
import { StarterKit } from "@tiptap/starter-kit";
|
||||||
import { TextAlign } from "@tiptap/extension-text-align";
|
import { TextAlign } from "@tiptap/extension-text-align";
|
||||||
import {
|
import { TaskList, TaskItem } from "@tiptap/extension-list";
|
||||||
TaskList,
|
import { Placeholder, CharacterCount } from "@tiptap/extensions";
|
||||||
TaskItem,
|
|
||||||
} from "@tiptap/extension-list";
|
|
||||||
import {
|
|
||||||
Placeholder,
|
|
||||||
CharacterCount,
|
|
||||||
} from "@tiptap/extensions";
|
|
||||||
import { Superscript } from "@tiptap/extension-superscript";
|
import { Superscript } from "@tiptap/extension-superscript";
|
||||||
import SubScript from "@tiptap/extension-subscript";
|
import SubScript from "@tiptap/extension-subscript";
|
||||||
import { Highlight } from "@tiptap/extension-highlight";
|
import { Highlight } from "@tiptap/extension-highlight";
|
||||||
@@ -17,6 +11,7 @@ import { Color } from "@tiptap/extension-color";
|
|||||||
import SlashCommand from "@/features/editor/extensions/slash-command";
|
import SlashCommand from "@/features/editor/extensions/slash-command";
|
||||||
import { Collaboration } from "@tiptap/extension-collaboration";
|
import { Collaboration } from "@tiptap/extension-collaboration";
|
||||||
import { CollaborationCaret } from "@tiptap/extension-collaboration-caret";
|
import { CollaborationCaret } from "@tiptap/extension-collaboration-caret";
|
||||||
|
|
||||||
import { HocuspocusProvider } from "@hocuspocus/provider";
|
import { HocuspocusProvider } from "@hocuspocus/provider";
|
||||||
import {
|
import {
|
||||||
Comment,
|
Comment,
|
||||||
@@ -42,8 +37,8 @@ import {
|
|||||||
Embed,
|
Embed,
|
||||||
SearchAndReplace,
|
SearchAndReplace,
|
||||||
Mention,
|
Mention,
|
||||||
Subpages,
|
|
||||||
TableDndExtension,
|
TableDndExtension,
|
||||||
|
Subpages,
|
||||||
} from "@docmost/editor-ext";
|
} from "@docmost/editor-ext";
|
||||||
import {
|
import {
|
||||||
randomElement,
|
randomElement,
|
||||||
@@ -63,7 +58,6 @@ import CodeBlockView from "@/features/editor/components/code-block/code-block-vi
|
|||||||
import DrawioView from "../components/drawio/drawio-view";
|
import DrawioView from "../components/drawio/drawio-view";
|
||||||
import ExcalidrawView from "@/features/editor/components/excalidraw/excalidraw-view.tsx";
|
import ExcalidrawView from "@/features/editor/components/excalidraw/excalidraw-view.tsx";
|
||||||
import EmbedView from "@/features/editor/components/embed/embed-view.tsx";
|
import EmbedView from "@/features/editor/components/embed/embed-view.tsx";
|
||||||
import SubpagesView from "@/features/editor/components/subpages/subpages-view.tsx";
|
|
||||||
import plaintext from "highlight.js/lib/languages/plaintext";
|
import plaintext from "highlight.js/lib/languages/plaintext";
|
||||||
import powershell from "highlight.js/lib/languages/powershell";
|
import powershell from "highlight.js/lib/languages/powershell";
|
||||||
import abap from "highlightjs-sap-abap";
|
import abap from "highlightjs-sap-abap";
|
||||||
@@ -81,6 +75,7 @@ import i18n from "@/i18n.ts";
|
|||||||
import { MarkdownClipboard } from "@/features/editor/extensions/markdown-clipboard.ts";
|
import { MarkdownClipboard } from "@/features/editor/extensions/markdown-clipboard.ts";
|
||||||
import EmojiCommand from "./emoji-command";
|
import EmojiCommand from "./emoji-command";
|
||||||
import { countWords } from "alfaaz";
|
import { countWords } from "alfaaz";
|
||||||
|
import SubpagesView from "@/features/editor/components/subpages/subpages-view.tsx";
|
||||||
|
|
||||||
const lowlight = createLowlight(common);
|
const lowlight = createLowlight(common);
|
||||||
lowlight.register("mermaid", plaintext);
|
lowlight.register("mermaid", plaintext);
|
||||||
@@ -97,6 +92,8 @@ lowlight.register("scala", scala);
|
|||||||
export const mainExtensions = [
|
export const mainExtensions = [
|
||||||
StarterKit.configure({
|
StarterKit.configure({
|
||||||
undoRedo: false,
|
undoRedo: false,
|
||||||
|
link: false,
|
||||||
|
trailingNode: false,
|
||||||
dropcursor: {
|
dropcursor: {
|
||||||
width: 3,
|
width: 3,
|
||||||
color: "#70CFF8",
|
color: "#70CFF8",
|
||||||
@@ -107,8 +104,6 @@ export const mainExtensions = [
|
|||||||
spellcheck: false,
|
spellcheck: false,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
link: false,
|
|
||||||
trailingNode: false,
|
|
||||||
}),
|
}),
|
||||||
Placeholder.configure({
|
Placeholder.configure({
|
||||||
placeholder: ({ node }) => {
|
placeholder: ({ node }) => {
|
||||||
|
|||||||
@@ -55,6 +55,7 @@ export default function ReadonlyPageEditor({
|
|||||||
onCreate={({ editor }) => {
|
onCreate={({ editor }) => {
|
||||||
if (editor) {
|
if (editor) {
|
||||||
if (pageId) {
|
if (pageId) {
|
||||||
|
// @ts-ignore
|
||||||
editor.storage.pageId = pageId;
|
editor.storage.pageId = pageId;
|
||||||
}
|
}
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
|
|||||||
+1
-1
Submodule apps/server/src/ee updated: e71f70c299...d90ce7a20f
+28
-28
@@ -28,34 +28,34 @@
|
|||||||
"@joplin/turndown": "^4.0.74",
|
"@joplin/turndown": "^4.0.74",
|
||||||
"@joplin/turndown-plugin-gfm": "^1.0.56",
|
"@joplin/turndown-plugin-gfm": "^1.0.56",
|
||||||
"@sindresorhus/slugify": "1.1.0",
|
"@sindresorhus/slugify": "1.1.0",
|
||||||
"@tiptap/core": "^3.2.0",
|
"@tiptap/core": "^3.4.2",
|
||||||
"@tiptap/extension-code-block": "^3.2.0",
|
"@tiptap/extension-code-block": "^3.4.2",
|
||||||
"@tiptap/extension-collaboration": "^3.2.0",
|
"@tiptap/extension-collaboration": "^3.4.2",
|
||||||
"@tiptap/extension-collaboration-caret": "^3.2.0",
|
"@tiptap/extension-collaboration-caret": "^3.4.2",
|
||||||
"@tiptap/extension-color": "^3.2.0",
|
"@tiptap/extension-color": "^3.4.2",
|
||||||
"@tiptap/extension-document": "^3.2.0",
|
"@tiptap/extension-document": "^3.4.2",
|
||||||
"@tiptap/extension-heading": "^3.2.0",
|
"@tiptap/extension-heading": "^3.4.2",
|
||||||
"@tiptap/extension-highlight": "^3.2.0",
|
"@tiptap/extension-highlight": "^3.4.2",
|
||||||
"@tiptap/extension-history": "^3.2.0",
|
"@tiptap/extension-history": "^3.4.2",
|
||||||
"@tiptap/extension-image": "^3.2.0",
|
"@tiptap/extension-image": "^3.4.2",
|
||||||
"@tiptap/extension-link": "^3.2.0",
|
"@tiptap/extension-link": "^3.4.2",
|
||||||
"@tiptap/extension-list": "^3.2.0",
|
"@tiptap/extension-list": "^3.4.2",
|
||||||
"@tiptap/extension-list-item": "^3.2.0",
|
"@tiptap/extension-list-item": "^3.4.2",
|
||||||
"@tiptap/extension-list-keymap": "^3.2.0",
|
"@tiptap/extension-list-keymap": "^3.4.2",
|
||||||
"@tiptap/extension-placeholder": "^3.2.0",
|
"@tiptap/extension-placeholder": "^3.4.2",
|
||||||
"@tiptap/extension-subscript": "^3.2.0",
|
"@tiptap/extension-subscript": "^3.4.2",
|
||||||
"@tiptap/extension-superscript": "^3.2.0",
|
"@tiptap/extension-superscript": "^3.4.2",
|
||||||
"@tiptap/extension-table": "^3.2.0",
|
"@tiptap/extension-table": "^3.4.2",
|
||||||
"@tiptap/extension-text": "^3.2.0",
|
"@tiptap/extension-text": "^3.4.2",
|
||||||
"@tiptap/extension-text-align": "^3.2.0",
|
"@tiptap/extension-text-align": "^3.4.2",
|
||||||
"@tiptap/extension-text-style": "^3.2.0",
|
"@tiptap/extension-text-style": "^3.4.2",
|
||||||
"@tiptap/extension-typography": "^3.2.0",
|
"@tiptap/extension-typography": "^3.4.2",
|
||||||
"@tiptap/extension-youtube": "^3.2.0",
|
"@tiptap/extension-youtube": "^3.4.2",
|
||||||
"@tiptap/html": "^3.2.0",
|
"@tiptap/html": "^3.4.2",
|
||||||
"@tiptap/pm": "^3.2.0",
|
"@tiptap/pm": "^3.4.2",
|
||||||
"@tiptap/react": "^3.2.0",
|
"@tiptap/react": "^3.4.2",
|
||||||
"@tiptap/starter-kit": "^3.2.0",
|
"@tiptap/starter-kit": "^3.4.2",
|
||||||
"@tiptap/suggestion": "^3.2.0",
|
"@tiptap/suggestion": "^3.4.2",
|
||||||
"@types/qrcode": "^1.5.5",
|
"@types/qrcode": "^1.5.5",
|
||||||
"bytes": "^3.1.2",
|
"bytes": "^3.1.2",
|
||||||
"cross-env": "^7.0.3",
|
"cross-env": "^7.0.3",
|
||||||
|
|||||||
Generated
+822
-580
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user