mirror of
https://github.com/opf/openproject.git
synced 2026-06-14 03:30:14 +00:00
chore: upgrade @blocknote/* to 0.51, op-blocknote-extensions to 0.1.0 (FEASIBILITY)
Feasibility-study draft showing the openproject-side consumer changes that go with op-blocknote-extensions v0.1.0 (opf/op-blocknote-extensions PRs #133 and #134, not yet merged): frontend - @blocknote/{core,mantine,react}: ^0.44.2 → ^0.51.0 - op-blocknote-extensions: v0.0.26 → v0.1.0 (URL not live yet) - OpBlockNoteEditor.tsx: BlockNote 0.51 tightened CollaborationOptions — omit the whole `collaboration` block when no hocuspocusProvider is wired up; cast the provider at the boundary because Hocuspocus's `awareness: Awareness | null` doesn't match BlockNote's `Awareness | undefined`. hocuspocus (extensions/op-blocknote-hocuspocus) - @blocknote/server-util: ^0.44.2 → ^0.51.0 - @blocknote/core (dev): ^0.44.2 → ^0.51.0 - op-blocknote-extensions: v0.0.18 → v0.1.0 - openProjectApi.ts: import the static specs from the new `op-blocknote-extensions/server` subpath (keeps @blocknote/react out of Node); align schema key with the post-refactor block type ("openProjectWorkPackage" → "openProjectWorkPackageBlock"); register the inline static spec so inline work-package chips survive the markdown export. Lockfiles intentionally not regenerated: the v0.1.0 GitHub URL doesn't resolve yet. Reviewers should treat this PR as a feasibility study, not a mergeable artefact. Refs: https://community.openproject.org/wp/74654 Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
committed by
Judith Roth
parent
9993792dbf
commit
aeb5e34ea1
@@ -23,14 +23,14 @@
|
||||
"node": ">=22.18"
|
||||
},
|
||||
"dependencies": {
|
||||
"@blocknote/server-util": "^0.44.2",
|
||||
"@blocknote/server-util": "^0.51.0",
|
||||
"@hocuspocus/extension-logger": "^3.4.4",
|
||||
"@hocuspocus/server": "^3.4.0",
|
||||
"op-blocknote-extensions": "https://github.com/opf/op-blocknote-extensions/releases/download/v0.0.18/op-blocknote-extensions-0.0.18.tgz",
|
||||
"op-blocknote-extensions": "https://github.com/opf/op-blocknote-extensions/releases/download/v0.1.0/op-blocknote-extensions-0.1.0.tgz",
|
||||
"tsx": "^4.21.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@blocknote/core": "^0.44.2",
|
||||
"@blocknote/core": "^0.51.0",
|
||||
"@eslint/js": "^9.35.0",
|
||||
"@eslint/json": "^1.2.0",
|
||||
"@stylistic/eslint-plugin": "^5.3.1",
|
||||
|
||||
@@ -2,7 +2,10 @@ import { BlockNoteSchema } from "@blocknote/core";
|
||||
import { ServerBlockNoteEditor } from "@blocknote/server-util";
|
||||
import type { beforeHandleMessagePayload, onAuthenticatePayload, onLoadDocumentPayload, onStoreDocumentPayload, onTokenSyncPayload } from "@hocuspocus/server";
|
||||
import { Extension } from "@hocuspocus/server";
|
||||
import { openProjectWorkPackageStaticBlockSpec } from "op-blocknote-extensions";
|
||||
import {
|
||||
openProjectWorkPackageStaticBlockSpec,
|
||||
openProjectWorkPackageStaticInlineSpec,
|
||||
} from "op-blocknote-extensions/server";
|
||||
import * as Y from "yjs";
|
||||
import { TokenExpired, TokenExpiryMissing, unauthorized } from "../closeEvents";
|
||||
import { decryptAndValidateToken } from "../services/tokenValidationService";
|
||||
@@ -11,7 +14,10 @@ import { fetchResource } from "../services/resourceService";
|
||||
|
||||
export const editorSchema = BlockNoteSchema.create().extend({
|
||||
blockSpecs: {
|
||||
"openProjectWorkPackage": openProjectWorkPackageStaticBlockSpec(),
|
||||
openProjectWorkPackageBlock: openProjectWorkPackageStaticBlockSpec(),
|
||||
},
|
||||
inlineContentSpecs: {
|
||||
openProjectWorkPackageInline: openProjectWorkPackageStaticInlineSpec,
|
||||
},
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user