Files
pentagi/frontend/package.json
T
Sergey KozyrenkoandClaude Opus 4.8 e1e7817dd6 feat(editor): migrate markdown round-trip to official @tiptap/markdown
Replace the unified rich editor's markdown engine: drop the community
tiptap-markdown (markdown-it parse + prosemirror-markdown serialize) and
our 5 prosemirror-internal monkey-patch extensions for the official
@tiptap/markdown (marked-based MarkdownManager). The consumer moves to the
new API (editor.getMarkdown() / contentType:'markdown' / markdown.parse).

editor-markdown.ts adds three small, supported-API customizations:
- a private HTML-neutralized marked instance so literal <xml-tags> survive
  (marked otherwise swallows real-HTML-element names like <input>);
- FaithfulMarkdownText overrides MarkdownManager.encodeTextForMarkdown to
  drop entity-encoding and over-escaping of literal punctuation;
- MarkdownTable wraps renderTableToMarkdown to escape cell pipes (#7884).

Verified: tsc, 747 vitest (rewritten extension + 39-prompt corpus tests),
lint, build; live on the dev stand — knowledge tables render and resize,
prompt <tags> stay literal (124 tag + 116 variable highlights, no
entity-encoding), console clean.

Known accepted bug, pinned by a test (marked parser, 0 corpus impact):
a code block nested ordered-list > bullet-sublist > code is dropped on
parse. Repro recorded for an upstream report.

Folds in the in-progress unified-editor work it depends on: knowledge
Plain/Visual toggle, settings-prompt and template editor wiring, the
CodeMirror removal, and the editor table/tag/variable styles.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-29 22:33:22 +07:00

139 lines
5.3 KiB
JSON

{
"name": "pentagi",
"type": "module",
"version": "0.2.0",
"scripts": {
"build": "tsc -b && vite build",
"dev": "vite",
"graphql:generate": "graphql-codegen --config graphql-codegen.ts",
"lint": "eslint \"src/**/*.{ts,tsx,js,jsx}\"",
"lint:fix": "eslint \"src/**/*.{ts,tsx,js,jsx}\" --fix",
"prettier": "prettier --check \"src/**/*.{ts,tsx,js,jsx,json,css,scss}\"",
"prettier:fix": "prettier --write \"src/**/*.{ts,tsx,js,jsx,json,css,scss}\"",
"ssl:generate": "tsx --eval 'import { generateCertificates } from \"./scripts/generate-ssl.ts\"; generateCertificates();'",
"test": "vitest run",
"test:coverage": "vitest run --coverage",
"test:watch": "vitest",
"typescript": "tsc -b"
},
"dependencies": {
"@apollo/client": "^4.2.3",
"@graphql-typed-document-node/core": "^3.2.0",
"@hookform/resolvers": "^5.4.0",
"@radix-ui/react-accordion": "^1.2.14",
"@radix-ui/react-avatar": "^1.2.0",
"@radix-ui/react-checkbox": "^1.3.5",
"@radix-ui/react-collapsible": "^1.1.14",
"@radix-ui/react-context-menu": "^2.3.1",
"@radix-ui/react-dialog": "^1.1.17",
"@radix-ui/react-dropdown-menu": "^2.1.18",
"@radix-ui/react-icons": "^1.3.2",
"@radix-ui/react-label": "^2.1.10",
"@radix-ui/react-popover": "^1.1.17",
"@radix-ui/react-progress": "^1.1.10",
"@radix-ui/react-scroll-area": "^1.2.12",
"@radix-ui/react-select": "^2.3.1",
"@radix-ui/react-separator": "^1.1.10",
"@radix-ui/react-slot": "^1.3.0",
"@radix-ui/react-switch": "^1.3.1",
"@radix-ui/react-tabs": "^1.1.15",
"@radix-ui/react-toggle": "^1.1.12",
"@radix-ui/react-toggle-group": "^1.1.13",
"@radix-ui/react-tooltip": "^1.2.10",
"@react-pdf/renderer": "^4.5.1",
"@tanstack/react-table": "^8.21.3",
"@tanstack/react-virtual": "^3.14.3",
"@tiptap/core": "^3.27.1",
"@tiptap/extension-code": "^3.27.1",
"@tiptap/extension-code-block": "^3.27.1",
"@tiptap/extension-hard-break": "^3.27.1",
"@tiptap/extension-image": "^3.27.1",
"@tiptap/extension-list": "^3.27.1",
"@tiptap/extension-table": "^3.27.1",
"@tiptap/extensions": "^3.27.1",
"@tiptap/markdown": "^3.27.1",
"@tiptap/pm": "^3.27.1",
"@tiptap/react": "^3.27.1",
"@tiptap/starter-kit": "^3.27.1",
"@xterm/addon-fit": "^0.11.0",
"@xterm/addon-search": "^0.16.0",
"@xterm/addon-unicode11": "^0.9.0",
"@xterm/addon-web-links": "^0.12.0",
"@xterm/addon-webgl": "^0.19.0",
"@xterm/xterm": "^6.0.0",
"axios": "^1.18.0",
"class-variance-authority": "^0.7.1",
"clsx": "^2.1.1",
"cmdk": "^1.1.1",
"date-fns": "^4.4.0",
"github-slugger": "^2.0.0",
"graphql": "^16.14.2",
"graphql-ws": "^6.0.8",
"highlight.js": "^11.11.1",
"lodash": "^4.18.1",
"lowlight": "^3.3.0",
"lru-cache": "^11.5.1",
"lucide-react": "^1.20.0",
"marked": "^18.0.5",
"motion": "^12.40.0",
"react": "^19.2.7",
"react-day-picker": "^10.0.1",
"react-diff-viewer-continued": "^4.2.2",
"react-dom": "^19.2.7",
"react-hook-form": "^7.79.0",
"react-markdown": "^10.1.0",
"react-resizable-panels": "^4.11.2",
"react-router-dom": "^7.18.0",
"react-textarea-autosize": "^8.5.9",
"recharts": "^3.8.1",
"rehype-highlight": "^7.0.2",
"rehype-slug": "^6.0.0",
"remark-gfm": "^4.0.1",
"sonner": "^2.0.7",
"tailwind-merge": "^3.6.0",
"tw-animate-css": "^1.4.0",
"use-debounce": "^10.1.1",
"vaul": "^1.1.2",
"zod": "^4.4.3"
},
"devDependencies": {
"@eslint/eslintrc": "^3.3.5",
"@eslint/js": "^9.39.4",
"@graphql-codegen/cli": "^7.1.3",
"@graphql-codegen/typed-document-node": "^7.0.3",
"@graphql-codegen/typescript-operations": "^6.0.4",
"@prettier/plugin-xml": "^3.4.2",
"@tailwindcss/postcss": "^4.3.1",
"@tailwindcss/typography": "^0.5.20",
"@testing-library/dom": "^10.4.1",
"@testing-library/jest-dom": "^6.9.1",
"@testing-library/react": "^16.3.2",
"@testing-library/user-event": "^14.6.1",
"@types/lodash": "^4.17.24",
"@types/node": "^24.13.2",
"@types/react": "^19.2.17",
"@types/react-dom": "^19.2.3",
"@typescript-eslint/eslint-plugin": "^8.61.1",
"@typescript-eslint/parser": "^8.61.1",
"@vitejs/plugin-react-swc": "^4.3.1",
"@vitest/coverage-v8": "^4.1.9",
"eslint": "^9.39.4",
"eslint-config-prettier": "^10.1.8",
"eslint-plugin-perfectionist": "^5.9.1",
"eslint-plugin-react": "^7.37.5",
"eslint-plugin-react-hooks": "^7.1.1",
"jsdom": "^29.1.1",
"postcss": "^8.5.15",
"prettier": "^3.8.4",
"prettier-plugin-tailwindcss": "^0.8.0",
"tailwindcss": "^4.3.1",
"tsx": "^4.22.4",
"typescript": "^6.0.3",
"vite": "^8.0.16",
"vite-plugin-html": "^3.2.2",
"vite-tsconfig-paths": "^6.1.1",
"vitest": "^4.1.9"
},
"packageManager": "pnpm@11.8.0"
}