mirror of
https://github.com/docmost/docmost.git
synced 2026-08-27 08:47:06 +08:00
Compare commits
5
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
92e2278d49 | ||
|
|
f3d6b4b2a7 | ||
|
|
56ac42767a | ||
|
|
38380211a5 | ||
|
|
cd34594b5d |
@@ -61,7 +61,7 @@
|
|||||||
"react-error-boundary": "6.1.1",
|
"react-error-boundary": "6.1.1",
|
||||||
"react-helmet-async": "3.0.0",
|
"react-helmet-async": "3.0.0",
|
||||||
"react-i18next": "16.5.8",
|
"react-i18next": "16.5.8",
|
||||||
"react-router-dom": "7.18.0",
|
"react-router-dom": "7.18.2",
|
||||||
"semver": "7.7.4",
|
"semver": "7.7.4",
|
||||||
"socket.io-client": "4.8.3",
|
"socket.io-client": "4.8.3",
|
||||||
"zod": "4.3.6"
|
"zod": "4.3.6"
|
||||||
@@ -86,7 +86,7 @@
|
|||||||
"globals": "15.13.0",
|
"globals": "15.13.0",
|
||||||
"jsdom": "25.0.0",
|
"jsdom": "25.0.0",
|
||||||
"optics-ts": "2.4.1",
|
"optics-ts": "2.4.1",
|
||||||
"postcss": "8.5.14",
|
"postcss": "8.5.25",
|
||||||
"postcss-preset-mantine": "1.18.0",
|
"postcss-preset-mantine": "1.18.0",
|
||||||
"postcss-simple-vars": "7.0.1",
|
"postcss-simple-vars": "7.0.1",
|
||||||
"prettier": "3.8.1",
|
"prettier": "3.8.1",
|
||||||
|
|||||||
@@ -3,7 +3,8 @@ import { StarterKit } from "@tiptap/starter-kit";
|
|||||||
import { Code } from "@tiptap/extension-code";
|
import { Code } from "@tiptap/extension-code";
|
||||||
import { TextAlign } from "@tiptap/extension-text-align";
|
import { TextAlign } from "@tiptap/extension-text-align";
|
||||||
import { TaskList, TaskItem } from "@tiptap/extension-list";
|
import { TaskList, TaskItem } from "@tiptap/extension-list";
|
||||||
import { Placeholder, CharacterCount, UndoRedo } from "@tiptap/extensions";
|
import { CharacterCount, UndoRedo } from "@tiptap/extensions";
|
||||||
|
import { Placeholder } from "@/features/editor/extensions/placeholder";
|
||||||
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 { Typography } from "@tiptap/extension-typography";
|
import { Typography } from "@tiptap/extension-typography";
|
||||||
@@ -194,16 +195,18 @@ export const mainExtensions = [
|
|||||||
return i18n.t("Toggle title");
|
return i18n.t("Toggle title");
|
||||||
}
|
}
|
||||||
if (node.type.name === "paragraph") {
|
if (node.type.name === "paragraph") {
|
||||||
const $pos = editor.state.doc.resolve(pos);
|
const doc = editor.state.doc;
|
||||||
const parentName = $pos.parent.type.name;
|
if (pos >= 0 && pos <= doc.content.size) {
|
||||||
if (
|
const parentName = doc.resolve(pos).parent.type.name;
|
||||||
parentName === "column" ||
|
if (
|
||||||
parentName === "tableCell" ||
|
parentName === "column" ||
|
||||||
parentName === "tableHeader" ||
|
parentName === "tableCell" ||
|
||||||
parentName === "callout" ||
|
parentName === "tableHeader" ||
|
||||||
parentName === "blockquote"
|
parentName === "callout" ||
|
||||||
) {
|
parentName === "blockquote"
|
||||||
return i18n.t("Write...");
|
) {
|
||||||
|
return i18n.t("Write...");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return i18n.t('Write anything. Enter "/" for commands');
|
return i18n.t('Write anything. Enter "/" for commands');
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,64 @@
|
|||||||
|
import { isNodeEmpty } from "@tiptap/core";
|
||||||
|
import { Plugin, PluginKey } from "@tiptap/pm/state";
|
||||||
|
import { Decoration, DecorationSet } from "@tiptap/pm/view";
|
||||||
|
import { Placeholder as TiptapPlaceholder } from "@tiptap/extensions";
|
||||||
|
|
||||||
|
export const Placeholder = TiptapPlaceholder.extend({
|
||||||
|
addProseMirrorPlugins() {
|
||||||
|
const editor = this.editor;
|
||||||
|
const options = this.options;
|
||||||
|
const dataAttribute = `data-${options.dataAttribute || "placeholder"}`;
|
||||||
|
|
||||||
|
return [
|
||||||
|
new Plugin({
|
||||||
|
key: new PluginKey("docmostPlaceholder"),
|
||||||
|
props: {
|
||||||
|
decorations: (state) => {
|
||||||
|
if (options.showOnlyWhenEditable && !editor.isEditable) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
const { doc, selection } = state;
|
||||||
|
const { anchor } = selection;
|
||||||
|
const decorations: Decoration[] = [];
|
||||||
|
const isEmptyDoc = editor.isEmpty;
|
||||||
|
|
||||||
|
doc.descendants((node, pos) => {
|
||||||
|
if (!node.type.isTextblock) {
|
||||||
|
return options.includeChildren;
|
||||||
|
}
|
||||||
|
|
||||||
|
const hasAnchor = anchor >= pos && anchor <= pos + node.nodeSize;
|
||||||
|
const isEmpty = !node.isLeaf && isNodeEmpty(node);
|
||||||
|
|
||||||
|
if ((hasAnchor || !options.showOnlyCurrent) && isEmpty) {
|
||||||
|
const emptyNodeClass =
|
||||||
|
typeof options.emptyNodeClass === "function"
|
||||||
|
? options.emptyNodeClass({ editor, node, pos, hasAnchor })
|
||||||
|
: options.emptyNodeClass;
|
||||||
|
const classes = [emptyNodeClass];
|
||||||
|
if (isEmptyDoc) {
|
||||||
|
classes.push(options.emptyEditorClass);
|
||||||
|
}
|
||||||
|
|
||||||
|
decorations.push(
|
||||||
|
Decoration.node(pos, pos + node.nodeSize, {
|
||||||
|
class: classes.join(" "),
|
||||||
|
[dataAttribute]:
|
||||||
|
typeof options.placeholder === "function"
|
||||||
|
? options.placeholder({ editor, node, pos, hasAnchor })
|
||||||
|
: options.placeholder,
|
||||||
|
}),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
return options.includeChildren;
|
||||||
|
});
|
||||||
|
|
||||||
|
return DecorationSet.create(doc, decorations);
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}),
|
||||||
|
];
|
||||||
|
},
|
||||||
|
});
|
||||||
@@ -40,14 +40,14 @@
|
|||||||
"@clickhouse/client": "1.18.2",
|
"@clickhouse/client": "1.18.2",
|
||||||
"@docmost/base-formula": "workspace:*",
|
"@docmost/base-formula": "workspace:*",
|
||||||
"@docmost/pdf-inspector": "1.9.6",
|
"@docmost/pdf-inspector": "1.9.6",
|
||||||
"@fastify/cookie": "^11.0.2",
|
"@fastify/cookie": "11.0.2",
|
||||||
"@fastify/multipart": "^10.0.0",
|
"@fastify/multipart": "10.0.0",
|
||||||
"@fastify/static": "^9.1.3",
|
"@fastify/static": "10.1.2",
|
||||||
"@keyv/redis": "^5.1.6",
|
"@keyv/redis": "5.1.6",
|
||||||
"@langchain/core": "1.1.46",
|
"@langchain/core": "1.1.46",
|
||||||
"@langchain/textsplitters": "1.0.1",
|
"@langchain/textsplitters": "1.0.1",
|
||||||
"@modelcontextprotocol/sdk": "1.29.0",
|
"@modelcontextprotocol/sdk": "1.30.0",
|
||||||
"@nest-lab/throttler-storage-redis": "^1.2.0",
|
"@nest-lab/throttler-storage-redis": "1.2.0",
|
||||||
"@nestjs-labs/nestjs-ioredis": "11.0.4",
|
"@nestjs-labs/nestjs-ioredis": "11.0.4",
|
||||||
"@nestjs/bullmq": "11.0.4",
|
"@nestjs/bullmq": "11.0.4",
|
||||||
"@nestjs/cache-manager": "3.1.3",
|
"@nestjs/cache-manager": "3.1.3",
|
||||||
@@ -118,7 +118,7 @@
|
|||||||
"tlds": "1.261.0",
|
"tlds": "1.261.0",
|
||||||
"tmp-promise": "3.0.3",
|
"tmp-promise": "3.0.3",
|
||||||
"typesense": "3.0.5",
|
"typesense": "3.0.5",
|
||||||
"undici": "7.28.0",
|
"undici": "7.29.0",
|
||||||
"ws": "8.21.0",
|
"ws": "8.21.0",
|
||||||
"yauzl": "3.4.0",
|
"yauzl": "3.4.0",
|
||||||
"zod": "4.3.6"
|
"zod": "4.3.6"
|
||||||
|
|||||||
+1
-1
Submodule apps/server/src/ee updated: 74d68dc5c5...05529bcf97
@@ -15,7 +15,7 @@ import { getMimeType } from '../../../common/helpers';
|
|||||||
import { Upload } from '@aws-sdk/lib-storage';
|
import { Upload } from '@aws-sdk/lib-storage';
|
||||||
import { Logger } from '@nestjs/common';
|
import { Logger } from '@nestjs/common';
|
||||||
|
|
||||||
const S3_MAX_SOCKETS = 200;
|
const S3_MAX_SOCKETS = parseInt(process.env.AWS_S3_MAX_SOCKETS) || 200;
|
||||||
|
|
||||||
export class S3Driver implements StorageDriver {
|
export class S3Driver implements StorageDriver {
|
||||||
private readonly s3Client: S3Client;
|
private readonly s3Client: S3Client;
|
||||||
|
|||||||
+32
-32
@@ -31,41 +31,41 @@
|
|||||||
"@joplin/turndown": "4.0.82",
|
"@joplin/turndown": "4.0.82",
|
||||||
"@joplin/turndown-plugin-gfm": "1.0.64",
|
"@joplin/turndown-plugin-gfm": "1.0.64",
|
||||||
"@sindresorhus/slugify": "3.0.0",
|
"@sindresorhus/slugify": "3.0.0",
|
||||||
"@tiptap/core": "3.28.0",
|
"@tiptap/core": "3.29.2",
|
||||||
"@tiptap/extension-audio": "3.28.0",
|
"@tiptap/extension-audio": "3.29.2",
|
||||||
"@tiptap/extension-code-block": "3.28.0",
|
"@tiptap/extension-code-block": "3.29.2",
|
||||||
"@tiptap/extension-collaboration": "3.28.0",
|
"@tiptap/extension-collaboration": "3.29.2",
|
||||||
"@tiptap/extension-collaboration-caret": "3.28.0",
|
"@tiptap/extension-collaboration-caret": "3.29.2",
|
||||||
"@tiptap/extension-color": "3.28.0",
|
"@tiptap/extension-color": "3.29.2",
|
||||||
"@tiptap/extension-document": "3.28.0",
|
"@tiptap/extension-document": "3.29.2",
|
||||||
"@tiptap/extension-heading": "3.28.0",
|
"@tiptap/extension-heading": "3.29.2",
|
||||||
"@tiptap/extension-highlight": "3.28.0",
|
"@tiptap/extension-highlight": "3.29.2",
|
||||||
"@tiptap/extension-history": "3.28.0",
|
"@tiptap/extension-history": "3.29.2",
|
||||||
"@tiptap/extension-image": "3.28.0",
|
"@tiptap/extension-image": "3.29.2",
|
||||||
"@tiptap/extension-link": "3.28.0",
|
"@tiptap/extension-link": "3.29.2",
|
||||||
"@tiptap/extension-list": "3.28.0",
|
"@tiptap/extension-list": "3.29.2",
|
||||||
"@tiptap/extension-placeholder": "3.28.0",
|
"@tiptap/extension-placeholder": "3.29.2",
|
||||||
"@tiptap/extension-subscript": "3.28.0",
|
"@tiptap/extension-subscript": "3.29.2",
|
||||||
"@tiptap/extension-superscript": "3.28.0",
|
"@tiptap/extension-superscript": "3.29.2",
|
||||||
"@tiptap/extension-table": "3.28.0",
|
"@tiptap/extension-table": "3.29.2",
|
||||||
"@tiptap/extension-text": "3.28.0",
|
"@tiptap/extension-text": "3.29.2",
|
||||||
"@tiptap/extension-text-align": "3.28.0",
|
"@tiptap/extension-text-align": "3.29.2",
|
||||||
"@tiptap/extension-text-style": "3.28.0",
|
"@tiptap/extension-text-style": "3.29.2",
|
||||||
"@tiptap/extension-typography": "3.28.0",
|
"@tiptap/extension-typography": "3.29.2",
|
||||||
"@tiptap/extension-unique-id": "3.28.0",
|
"@tiptap/extension-unique-id": "3.29.2",
|
||||||
"@tiptap/extension-youtube": "3.28.0",
|
"@tiptap/extension-youtube": "3.29.2",
|
||||||
"@tiptap/html": "3.28.0",
|
"@tiptap/html": "3.29.2",
|
||||||
"@tiptap/pm": "3.28.0",
|
"@tiptap/pm": "3.29.2",
|
||||||
"@tiptap/react": "3.28.0",
|
"@tiptap/react": "3.29.2",
|
||||||
"@tiptap/starter-kit": "3.28.0",
|
"@tiptap/starter-kit": "3.29.2",
|
||||||
"@tiptap/suggestion": "3.28.0",
|
"@tiptap/suggestion": "3.29.2",
|
||||||
"@tiptap/y-tiptap": "3.0.7",
|
"@tiptap/y-tiptap": "3.0.7",
|
||||||
"bytes": "3.1.2",
|
"bytes": "3.1.2",
|
||||||
"cross-env": "10.1.0",
|
"cross-env": "10.1.0",
|
||||||
"date-fns": "4.1.0",
|
"date-fns": "4.1.0",
|
||||||
"diff": "8.0.3",
|
"diff": "8.0.3",
|
||||||
"docx": "9.7.1",
|
"docx": "9.7.1",
|
||||||
"dompurify": "3.4.11",
|
"dompurify": "3.4.12",
|
||||||
"fractional-indexing-jittered": "1.0.0",
|
"fractional-indexing-jittered": "1.0.0",
|
||||||
"highlight.js": "11.11.1",
|
"highlight.js": "11.11.1",
|
||||||
"image-dimensions": "2.5.0",
|
"image-dimensions": "2.5.0",
|
||||||
@@ -81,12 +81,12 @@
|
|||||||
"yjs": "^13.6.30"
|
"yjs": "^13.6.30"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@nx/js": "22.6.1",
|
"@nx/js": "22.7.2",
|
||||||
"@types/bytes": "3.1.5",
|
"@types/bytes": "3.1.5",
|
||||||
"@types/qrcode": "1.5.6",
|
"@types/qrcode": "1.5.6",
|
||||||
"@types/turndown": "5.0.6",
|
"@types/turndown": "5.0.6",
|
||||||
"concurrently": "9.2.3",
|
"concurrently": "10.0.4",
|
||||||
"nx": "22.6.1",
|
"nx": "22.7.2",
|
||||||
"tsx": "^4.21.0"
|
"tsx": "^4.21.0"
|
||||||
},
|
},
|
||||||
"workspaces": {
|
"workspaces": {
|
||||||
|
|||||||
Generated
+1936
-2449
File diff suppressed because it is too large
Load Diff
+8
-36
@@ -5,56 +5,28 @@ patchedDependencies:
|
|||||||
scimmy@1.3.5: patches/scimmy@1.3.5.patch
|
scimmy@1.3.5: patches/scimmy@1.3.5.patch
|
||||||
overrides:
|
overrides:
|
||||||
prosemirror-changeset: 2.4.0
|
prosemirror-changeset: 2.4.0
|
||||||
y-prosemirror: 1.3.7
|
|
||||||
glob: 13.0.6
|
glob: 13.0.6
|
||||||
ws: 8.21.0
|
ws: 8.21.0
|
||||||
dompurify: 3.4.11
|
dompurify: 3.4.12
|
||||||
tmp: 0.2.7
|
|
||||||
hono: 4.12.25
|
|
||||||
mermaid: 11.15.0
|
mermaid: 11.15.0
|
||||||
|
undici: 7.29.0
|
||||||
|
tmp: 0.2.7
|
||||||
nanoid@^3: 3.3.8
|
nanoid@^3: 3.3.8
|
||||||
socket.io-parser: 4.2.6
|
|
||||||
serialize-javascript: 7.0.3
|
|
||||||
lodash-es: 4.18.1
|
lodash-es: 4.18.1
|
||||||
lodash: 4.18.1
|
|
||||||
'@hono/node-server': 1.19.13
|
|
||||||
undici: 7.28.0
|
|
||||||
ajv@^6: 6.14.0
|
|
||||||
ajv@^8: 8.18.0
|
|
||||||
underscore: 1.13.8
|
|
||||||
immutable: 4.3.8
|
|
||||||
express-rate-limit: 8.2.2
|
express-rate-limit: 8.2.2
|
||||||
minimatch@^3: 3.1.5
|
|
||||||
minimatch@^5: 5.1.8
|
|
||||||
flatted: 3.4.2
|
flatted: 3.4.2
|
||||||
picomatch@<2.3.2: 2.3.2
|
find-my-way: 9.7.0
|
||||||
picomatch@>=4.0.0 <4.0.4: 4.0.4
|
|
||||||
fastify: 5.8.5
|
|
||||||
yaml@>=1.0.0 <1.10.3: 1.10.3
|
|
||||||
yaml@>=2.0.0 <2.8.3: 2.8.3
|
yaml@>=2.0.0 <2.8.3: 2.8.3
|
||||||
path-to-regexp@^8: 8.4.0
|
brace-expansion@^5: 5.0.9
|
||||||
brace-expansion@^5: 5.0.6
|
|
||||||
'@xmldom/xmldom': 0.8.13
|
|
||||||
handlebars: 4.7.9
|
|
||||||
axios: 1.18.1
|
axios: 1.18.1
|
||||||
langsmith: 0.7.0
|
ip-address: 10.3.1
|
||||||
follow-redirects: 1.16.0
|
fast-uri: 3.1.5
|
||||||
protobufjs: 7.5.8
|
|
||||||
ip-address: 10.1.1
|
|
||||||
fast-uri: 3.1.3
|
|
||||||
form-data@>=4.0.0 <4.0.6: 4.0.6
|
form-data@>=4.0.0 <4.0.6: 4.0.6
|
||||||
nanoid@>=4.0.0 <5.0.9: 5.1.16
|
nanoid@>=4.0.0 <5.0.9: 5.1.16
|
||||||
qs: 6.15.3
|
|
||||||
esbuild@>=0.27.3 <0.28.1: 0.28.1
|
esbuild@>=0.27.3 <0.28.1: 0.28.1
|
||||||
'@babel/core@<=7.29.0': 7.29.7
|
|
||||||
'@opentelemetry/core@>=2.0.0 <2.8.0': 2.9.0
|
'@opentelemetry/core@>=2.0.0 <2.8.0': 2.9.0
|
||||||
'@babel/plugin-transform-modules-systemjs@<=7.29.3': 7.29.7
|
|
||||||
brace-expansion@<1.1.13: 1.1.15
|
|
||||||
brace-expansion@>=2.0.0 <2.0.3: 2.0.3
|
|
||||||
js-yaml@>=3.0.0 <3.15.0: 3.15.0
|
|
||||||
js-yaml@>=4.0.0 <=4.1.1: 4.3.0
|
|
||||||
shamefullyHoist: true
|
shamefullyHoist: true
|
||||||
minimumReleaseAge: 5760
|
minimumReleaseAge: 4320
|
||||||
allowBuilds:
|
allowBuilds:
|
||||||
'@swc/core': true
|
'@swc/core': true
|
||||||
bcrypt: true
|
bcrypt: true
|
||||||
|
|||||||
Reference in New Issue
Block a user