forked from mirror/crumbs-original
Closes #90. Code blocks and inline code inherited the typography plugin's defaults, which shrank them to ~86% of an already-monospace body and painted them --bg-surface — the same colour as the default note card — so a snippet was only recognisable by being smaller. Long lines also grew a horizontal scrollbar inside card previews. - New --code-bg surface (one step below the page in light mode, page-level ink in dark) with a subtle border, and code keeps the surrounding text size. Decorative backtick pseudo-elements dropped now that the chip carries the signal. - Card previews clip wide code instead of scrolling; editor and share page keep horizontal scroll. - Syntax highlighting via one shared lowlight instance feeding both the TipTap editor (extension-code-block-lowlight) and the markdown-it renderer, so a fence looks identical in the editor, on cards and on the share page. Only highlight.js "common" grammars are bundled. - No auto-detection: highlight.js misreads note-sized snippets too often (JavaScript as CSS, SQL as VB.NET). Unlabelled fences stay plain; the language comes from the fence info string or a toolbar picker shown while the cursor is in a code block. - Six --hl-* token colours per theme; a unit test parses app.css and asserts AA contrast against --code-bg and mutual distinguishability. - Sanitizer now allows only language-* / hljs-* classes on code and span. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014u5WimmZvshm9RJSd1c6wx
116 lines
3.7 KiB
JSON
116 lines
3.7 KiB
JSON
{
|
|
"name": "crumbs",
|
|
"private": true,
|
|
"version": "0.34.2",
|
|
"type": "module",
|
|
"packageManager": "pnpm@9.15.9",
|
|
"license": "MIT",
|
|
"author": "Bretzel (https://bretzel.app)",
|
|
"homepage": "https://crumbs.bretzel.app",
|
|
"repository": {
|
|
"type": "git",
|
|
"url": "https://github.com/bretzel-app/crumbs.git"
|
|
},
|
|
"scripts": {
|
|
"dev": "vite dev",
|
|
"build": "npx tsx scripts/generate-openapi.ts && vite build",
|
|
"openapi": "npx tsx scripts/generate-openapi.ts",
|
|
"preview": "vite preview",
|
|
"prepare": "svelte-kit sync || echo ''",
|
|
"check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json",
|
|
"check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch",
|
|
"test:unit": "vitest run",
|
|
"test:unit:watch": "vitest",
|
|
"test:unit:coverage": "vitest run --coverage",
|
|
"test:e2e": "playwright test",
|
|
"test:e2e:coverage": "VITE_COVERAGE=true pnpm build && pnpm test:e2e && nyc report",
|
|
"coverage:merge-e2e": "nyc merge coverage/e2e/raw coverage/e2e/merged.json && nyc report",
|
|
"test": "pnpm test:unit && pnpm test:e2e",
|
|
"db:push": "drizzle-kit push",
|
|
"db:generate": "drizzle-kit generate",
|
|
"db:migrate": "drizzle-kit migrate",
|
|
"db:studio": "drizzle-kit studio",
|
|
"lint": "eslint .",
|
|
"docs:api": "tsx scripts/generate-api-docs.ts"
|
|
},
|
|
"dependencies": {
|
|
"@modelcontextprotocol/sdk": "^1.30.0",
|
|
"@sveltejs/adapter-node": "^5.5.7",
|
|
"@tiptap/core": "^3.31.0",
|
|
"@tiptap/extension-code-block-lowlight": "^3.31.0",
|
|
"@tiptap/extension-link": "^3.31.0",
|
|
"@tiptap/extension-placeholder": "^3.31.0",
|
|
"@tiptap/extension-table": "^3.31.0",
|
|
"@tiptap/extension-table-cell": "^3.31.0",
|
|
"@tiptap/extension-table-header": "^3.31.0",
|
|
"@tiptap/extension-table-row": "^3.31.0",
|
|
"@tiptap/extension-task-item": "^3.31.0",
|
|
"@tiptap/extension-task-list": "^3.31.0",
|
|
"@tiptap/extension-text-align": "^3.31.0",
|
|
"@tiptap/extension-underline": "^3.31.0",
|
|
"@tiptap/pm": "^3.31.0",
|
|
"@tiptap/starter-kit": "^3.31.0",
|
|
"arctic": "^3.7.0",
|
|
"argon2": "^0.45.1",
|
|
"better-sqlite3": "^11.10.0",
|
|
"drizzle-orm": "^0.45.2",
|
|
"idb": "^8.0.3",
|
|
"lowlight": "^3.3.0",
|
|
"lucide-svelte": "^0.577.0",
|
|
"markdown-it": "^15.0.1",
|
|
"nanoid": "^5.1.16",
|
|
"node-diff3": "^3.2.1",
|
|
"nodemailer": "^9.1.0",
|
|
"sanitize-html": "^2.17.7",
|
|
"svelte-dnd-action": "^0.9.79",
|
|
"tiptap-markdown": "^0.9.0",
|
|
"uuid": "^14.0.2",
|
|
"zod": "^4.5.4",
|
|
"zxcvbn": "^4.4.2"
|
|
},
|
|
"devDependencies": {
|
|
"@playwright/test": "^1.62.1",
|
|
"@sveltejs/kit": "^2.70.3",
|
|
"@sveltejs/vite-plugin-svelte": "^6.2.4",
|
|
"@tailwindcss/typography": "^0.5.20",
|
|
"@tailwindcss/vite": "^4.3.3",
|
|
"@types/better-sqlite3": "^7.6.13",
|
|
"@types/nodemailer": "^8.0.1",
|
|
"@types/sanitize-html": "^2.16.1",
|
|
"@types/zxcvbn": "^4.4.5",
|
|
"@vite-pwa/sveltekit": "^1.1.0",
|
|
"@vitest/coverage-v8": "^3.2.7",
|
|
"drizzle-kit": "^0.31.10",
|
|
"jsdom": "^29.1.1",
|
|
"nyc": "^18.0.0",
|
|
"svelte": "^5.57.0",
|
|
"svelte-check": "^4.7.6",
|
|
"tailwindcss": "^4.3.3",
|
|
"tsx": "^4.23.13",
|
|
"typescript": "^5.9.3",
|
|
"vite": "^7.3.6",
|
|
"vite-plugin-istanbul": "^7.2.1",
|
|
"vite-plugin-pwa": "^1.3.0",
|
|
"vitest": "^3.2.7",
|
|
"workbox-window": "^7.4.1",
|
|
"yaml": "^2.9.0"
|
|
},
|
|
"pnpm": {
|
|
"onlyBuiltDependencies": [
|
|
"argon2",
|
|
"better-sqlite3",
|
|
"esbuild"
|
|
],
|
|
"overrides": {
|
|
"serialize-javascript": ">=7.0.3",
|
|
"esbuild@<0.25.0": "0.25.12",
|
|
"cookie": ">=0.7.0 <1",
|
|
"hono": ">=4.12.7",
|
|
"devalue": ">=5.8.1",
|
|
"path-to-regexp@8": ">=8.4.0",
|
|
"fast-uri": ">=3.1.2",
|
|
"postcss>nanoid": ">=3.3.18 <4"
|
|
}
|
|
}
|
|
}
|