Upgrade all major frontend dependencies
- TipTap 2 → 3: Extension from @tiptap/core, Placeholder from @tiptap/extensions, TaskList/TaskItem from @tiptap/extension-list, link: false in StarterKit (now bundles Link), @tiptap/core added - marked 15 → 17: heading renderer updated to tokens/parseInline API - Pinia 2 → 3, Vue Router 4 → 5 (no code changes required) - Vite 6 → 7, @vitejs/plugin-vue 5 → 6, vue-tsc 2 → 3 - TypeScript 5.6 → 5.9: fixed Uint8Array<ArrayBuffer> strictness in push.ts, removed unused bodyEl ref in NoteViewerView.vue - .npmrc: legacy-peer-deps=true for TipTap v3 peer dep resolution TipTap 3 new capabilities now available: static renderer (createStaticRenderer), MarkViews, @tiptap/extensions package. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1 @@
|
||||
legacy-peer-deps=true
|
||||
Generated
+918
-494
File diff suppressed because it is too large
Load Diff
+15
-15
@@ -9,27 +9,27 @@
|
||||
"preview": "vite preview"
|
||||
},
|
||||
"dependencies": {
|
||||
"@tiptap/extension-link": "^2.11.0",
|
||||
"@tiptap/extension-placeholder": "^2.11.0",
|
||||
"@tiptap/extension-task-item": "^2.27.2",
|
||||
"@tiptap/extension-task-list": "^2.27.2",
|
||||
"@tiptap/pm": "^2.11.0",
|
||||
"@tiptap/starter-kit": "^2.11.0",
|
||||
"@tiptap/suggestion": "^2.11.0",
|
||||
"@tiptap/vue-3": "^2.11.0",
|
||||
"@tiptap/core": "^3.0.0",
|
||||
"@tiptap/extension-link": "^3.0.0",
|
||||
"@tiptap/extension-list": "^3.0.0",
|
||||
"@tiptap/extensions": "^3.0.0",
|
||||
"@tiptap/pm": "^3.0.0",
|
||||
"@tiptap/starter-kit": "^3.0.0",
|
||||
"@tiptap/suggestion": "^3.0.0",
|
||||
"@tiptap/vue-3": "^3.0.0",
|
||||
"d3": "^7",
|
||||
"dompurify": "^3.1.0",
|
||||
"marked": "^15.0.0",
|
||||
"pinia": "^2.2.0",
|
||||
"marked": "^17.0.0",
|
||||
"pinia": "^3.0.0",
|
||||
"vue": "3.5.30",
|
||||
"vue-router": "^4.4.0"
|
||||
"vue-router": "^5.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/d3": "^7",
|
||||
"@types/dompurify": "^3.0.0",
|
||||
"@vitejs/plugin-vue": "^5.1.0",
|
||||
"typescript": "~5.6.0",
|
||||
"vite": "^6.0.0",
|
||||
"vue-tsc": "^2.1.0"
|
||||
"@vitejs/plugin-vue": "^6.0.0",
|
||||
"typescript": "~5.9.0",
|
||||
"vite": "^7.0.0",
|
||||
"vue-tsc": "^3.0.0"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,12 +3,11 @@ import { watch, onBeforeUnmount } from "vue";
|
||||
import { Editor, EditorContent } from "@tiptap/vue-3";
|
||||
import StarterKit from "@tiptap/starter-kit";
|
||||
import Link from "@tiptap/extension-link";
|
||||
import Placeholder from "@tiptap/extension-placeholder";
|
||||
import { Placeholder } from "@tiptap/extensions";
|
||||
import { marked } from "marked";
|
||||
import DOMPurify from "dompurify";
|
||||
import { serializeToMarkdown } from "@/utils/markdownSerializer";
|
||||
import TaskList from "@tiptap/extension-task-list";
|
||||
import TaskItem from "@tiptap/extension-task-item";
|
||||
import { TaskList, TaskItem } from "@tiptap/extension-list";
|
||||
import { TagDecoration } from "@/extensions/TagDecoration";
|
||||
import { WikilinkDecoration } from "@/extensions/WikilinkDecoration";
|
||||
import { WikilinkSuggestion } from "@/extensions/WikilinkSuggestion";
|
||||
@@ -71,6 +70,7 @@ try {
|
||||
extensions: [
|
||||
StarterKit.configure({
|
||||
heading: { levels: [1, 2, 3, 4, 5, 6] },
|
||||
link: false,
|
||||
}),
|
||||
Link.configure({
|
||||
openOnClick: false,
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { Extension } from "@tiptap/vue-3";
|
||||
import { Extension } from "@tiptap/core";
|
||||
import { PluginKey } from "@tiptap/pm/state";
|
||||
import Suggestion from "@tiptap/suggestion";
|
||||
import { createSuggestionRenderer } from "./suggestionRenderer";
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { Extension } from "@tiptap/vue-3";
|
||||
import { Extension } from "@tiptap/core";
|
||||
import { Plugin, PluginKey } from "@tiptap/pm/state";
|
||||
import { Decoration, DecorationSet } from "@tiptap/pm/view";
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { Extension } from "@tiptap/vue-3";
|
||||
import { Extension } from "@tiptap/core";
|
||||
import { PluginKey } from "@tiptap/pm/state";
|
||||
import Suggestion from "@tiptap/suggestion";
|
||||
import { createSuggestionRenderer } from "./suggestionRenderer";
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { Extension } from "@tiptap/vue-3";
|
||||
import { Extension } from "@tiptap/core";
|
||||
import { Plugin, PluginKey } from "@tiptap/pm/state";
|
||||
import { Decoration, DecorationSet } from "@tiptap/pm/view";
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { Extension } from "@tiptap/vue-3";
|
||||
import { Extension } from "@tiptap/core";
|
||||
import { PluginKey } from "@tiptap/pm/state";
|
||||
import Suggestion from "@tiptap/suggestion";
|
||||
import { createSuggestionRenderer } from "./suggestionRenderer";
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
import { defineStore } from 'pinia'
|
||||
import { ref } from 'vue'
|
||||
|
||||
function urlBase64ToUint8Array(base64String: string): Uint8Array {
|
||||
function urlBase64ToUint8Array(base64String: string): Uint8Array<ArrayBuffer> {
|
||||
const padding = '='.repeat((4 - (base64String.length % 4)) % 4)
|
||||
const base64 = (base64String + padding).replace(/-/g, '+').replace(/_/g, '/')
|
||||
const rawData = window.atob(base64)
|
||||
const outputArray = new Uint8Array(rawData.length)
|
||||
const buf = new ArrayBuffer(rawData.length)
|
||||
const outputArray = new Uint8Array<ArrayBuffer>(buf)
|
||||
for (let i = 0; i < rawData.length; ++i) {
|
||||
outputArray[i] = rawData.charCodeAt(i)
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { marked } from "marked";
|
||||
import { marked, type RendererThis, type Tokens } from "marked";
|
||||
import DOMPurify from "dompurify";
|
||||
import { linkifyTags, linkifyWikilinks } from "@/utils/tags";
|
||||
|
||||
@@ -28,7 +28,8 @@ export function stripFirstLineTags(text: string): string {
|
||||
}
|
||||
|
||||
const headingRenderer = {
|
||||
heading({ text, depth }: { text: string; depth: number }): string {
|
||||
heading(this: RendererThis, { tokens, depth }: Tokens.Heading): string {
|
||||
const text = this.parser.parseInline(tokens);
|
||||
const id = slugify(text);
|
||||
return `<h${depth} id="${id}">${text}</h${depth}>`;
|
||||
},
|
||||
|
||||
@@ -12,7 +12,6 @@ import TableOfContents from "@/components/TableOfContents.vue";
|
||||
const route = useRoute();
|
||||
const router = useRouter();
|
||||
const store = useNotesStore();
|
||||
const bodyEl = ref<HTMLElement | null>(null);
|
||||
const backlinks = ref<{ type: string; id: number; title: string }[]>([]);
|
||||
const converting = ref(false);
|
||||
|
||||
@@ -198,7 +197,6 @@ async function convertToTask() {
|
||||
/>
|
||||
</div>
|
||||
<div
|
||||
ref="bodyEl"
|
||||
class="body prose"
|
||||
v-html="renderedBody"
|
||||
@click="onBodyClick"
|
||||
|
||||
Reference in New Issue
Block a user