Files
pad/web/package.json
T
xarmian db3917f6d2 feat(web): /graph route MVP — lazy-loaded 3D force graph (TASK-1733) (#701)
* feat(web): /graph route MVP — lazy-loaded 3D force graph (TASK-1733)

New full-viewport graph page at /{username}/{workspace}/graph rendering
the TASK-1731 endpoint via 3d-force-graph. Three.js loads only through
a dynamic import inside onMount, landing in its own ~1.3MB chunk
referenced solely by the graph route node — entry bundle unchanged.

Node color = collection (local hex palette; the chart PALETTE's CSS
vars can't reach WebGL), node size = 1 + 2×child_count, blocks edges
red with directional arrows, structural links brighter than soft ones.
Click navigates to the item page (ResolveItem accepts refs in the slug
param). Active items by default with a "Show completed" toggle that
refetches in place; workspace switches refetch with a stale-response
guard. Teardown via _destructor + ResizeObserver disconnect.

Nav: 'graph' added to destinations.ts (NavKey, RESERVED_SLUGS, primary
destinations, getActiveKey) and a Sidebar entry after Insights — the
mobile More sheet picks it up from the shared source automatically.

Parent: PLAN-1730.

* fix: clear stale canvas on workspace switch + reserve 'graph' collection slug per Codex review (round 1)

1. The renderer-sync effect now pushes empty graphData when the
   reactive payload is null (workspace switch in flight / load error)
   instead of early-returning — the previous workspace's nodes no
   longer linger behind the loading overlay.
2. 'graph' added to reservedCollectionSlugs so a collection can't
   shadow the /{username}/{workspace}/graph route, matching the
   frontend's RESERVED_SLUGS.
2026-06-05 18:45:21 -04:00

69 lines
1.9 KiB
JSON

{
"name": "web",
"private": true,
"version": "0.0.1",
"license": "Apache-2.0",
"type": "module",
"scripts": {
"dev": "vite dev",
"build": "vite build",
"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:e2e": "playwright test",
"test:e2e:ui": "playwright test --ui",
"test:e2e:install": "playwright install --with-deps chromium"
},
"devDependencies": {
"@playwright/test": "^1.59.1",
"@sveltejs/adapter-auto": "^7.0.1",
"@sveltejs/adapter-static": "^3.0.10",
"@sveltejs/kit": "^2.59.1",
"@sveltejs/vite-plugin-svelte": "^7.1.2",
"@types/d3-scale": "4.0.9",
"@types/qrcode": "^1.5.6",
"marked": "^18.0.3",
"svelte": "^5.55.5",
"svelte-check": "^4.4.7",
"typescript": "^6.0.3",
"vite": "^8.0.11"
},
"overrides": {
"cookie": "^0.7.2",
"layercake": {
"typescript": "$typescript"
}
},
"dependencies": {
"@tiptap/core": "^3.22.5",
"@tiptap/extension-bubble-menu": "^3.22.5",
"@tiptap/extension-code-block-lowlight": "^3.22.5",
"@tiptap/extension-collaboration": "3.22.5",
"@tiptap/extension-collaboration-caret": "3.22.5",
"@tiptap/extension-link": "^3.22.5",
"@tiptap/extension-placeholder": "^3.22.5",
"@tiptap/extension-table": "^3.22.5",
"@tiptap/extension-task-item": "^3.22.5",
"@tiptap/extension-task-list": "^3.22.5",
"@tiptap/pm": "^3.20.4",
"@tiptap/starter-kit": "^3.22.5",
"@tiptap/suggestion": "^3.22.5",
"@tiptap/y-tiptap": "^3.0.3",
"3d-force-graph": "1.80.0",
"d3-scale": "4.0.2",
"diff": "^9.0.0",
"dompurify": "^3.4.2",
"idb": "^8.0.3",
"layercake": "10.0.2",
"lowlight": "^3.3.0",
"mermaid": "^11.14.0",
"minisearch": "7.2.0",
"qrcode": "^1.5.4",
"svelte-dnd-action": "^0.9.69",
"tiptap-markdown": "^0.9.0",
"y-protocols": "^1.0.7",
"yjs": "^13.6.30"
}
}