mirror of
https://github.com/semantica-agi/semantica.git
synced 2026-09-12 04:01:35 +00:00
The deep-link protocol introduced in #1278 lived as bare "ontologyTab" / "ontologyEntity" literals in five places across three files, each with its own URLSearchParams plumbing and try/catch. Nothing tied the pieces together: in particular the rule that a selection written under one ontology must be cleared when the active ontology changes — otherwise a reload resolves the stale entity and jumps back to the old ontology — was a comment at one call site with no mechanism behind it. ontologyUrlState.ts now owns the parameter names as private constants and exposes the protocol as intent-named operations, with the write/clear pairing documented where both halves live. Parsing and serialization are pure functions over a search string, so they are covered by tests without a DOM; the window and history.replaceState interaction stays in thin shells. Absent parameters still read as undefined while blank ones read as empty strings, which preserves the differing presence checks the workspace shell and the tab selector each relied on. One behavior change, inherited from all five original call sites: writing the query string dropped any URL fragment, because replaceState with a bare "?..." replaces the whole tail. updateSearch now carries window.location.hash across, which fixes it for every writer at once — this module is the only place that knows how the URL is written, so it is the only place the fix belongs. Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
67 lines
2.6 KiB
JSON
67 lines
2.6 KiB
JSON
{
|
|
"name": "semantica-knowledge-explorer",
|
|
"private": true,
|
|
"version": "0.0.0",
|
|
"type": "module",
|
|
"scripts": {
|
|
"dev": "vite",
|
|
"build": "tsc -b && vite build",
|
|
"lint": "eslint .",
|
|
"preview": "vite preview",
|
|
"test:graph-store": "node --test tests/graphStore.multi-edge.test.mjs",
|
|
"test:graph-workspace": "node --import tsx --test tests/markdownContentViewer.test.ts tests/markdownEditorInteraction.test.tsx tests/markdownEditorState.test.ts tests/nodeMarkdownSync.test.ts tests/graphSceneState.display.test.ts tests/temporalLifecycle.test.ts tests/temporalScrubberBounds.test.ts tests/deterministicExplorerRendering.test.ts tests/explorerCapabilities.test.tsx tests/smallGraphLayout.test.ts tests/realtimeGraphAttributes.test.ts tests/ontologyEditorModel.test.ts tests/graphColorLegend.test.ts tests/ontologyUrlState.test.ts",
|
|
"test:deterministic-e2e": "node --import tsx --test tests/deterministicExplorerRendering.e2e.ts",
|
|
"test:graph-legend-e2e": "node --import tsx --test tests/graphColorLegend.e2e.ts",
|
|
"test:plugin-registry": "node --import tsx --test tests/pluginRegistry.temporal.test.mjs"
|
|
},
|
|
"dependencies": {
|
|
"@monaco-editor/react": "^4.7.0",
|
|
"@sigma/edge-curve": "^3.1.0",
|
|
"@sigma/node-border": "^3.0.0",
|
|
"@tanstack/react-query": "^5.95.2",
|
|
"@xyflow/react": "^12.10.2",
|
|
"graphology": "^0.26.0",
|
|
"graphology-communities-louvain": "^2.0.2",
|
|
"graphology-layout-forceatlas2": "^0.10.1",
|
|
"graphology-metrics": "^2.4.0",
|
|
"graphology-shortest-path": "^2.1.0",
|
|
"lucide-react": "^1.7.0",
|
|
"playwright": "^1.59.1",
|
|
"react": "^19.2.4",
|
|
"react-arborist": "^3.4.3",
|
|
"react-dom": "^19.2.4",
|
|
"react-dropzone": "^15.0.0",
|
|
"react-markdown": "^10.1.0",
|
|
"remark-gfm": "^4.0.1",
|
|
"sigma": "^3.0.2",
|
|
"vis-data": "^8.0.3",
|
|
"vis-timeline": "^8.5.0"
|
|
},
|
|
"devDependencies": {
|
|
"@babel/core": "^7.29.6",
|
|
"@eslint/js": "^9.39.4",
|
|
"@testing-library/react": "^16.3.3",
|
|
"@types/babel__core": "^7.20.5",
|
|
"@types/jsdom": "^21.1.7",
|
|
"@types/node": "^24.12.0",
|
|
"@types/react": "^19.2.14",
|
|
"@types/react-dom": "^19.2.3",
|
|
"@vitejs/plugin-react": "^4.3.0",
|
|
"babel-plugin-react-compiler": "^1.0.0",
|
|
"eslint": "^10.8.0",
|
|
"eslint-plugin-react-hooks": "^7.0.1",
|
|
"eslint-plugin-react-refresh": "^0.5.2",
|
|
"globals": "^17.4.0",
|
|
"jsdom": "^26.1.0",
|
|
"tsx": "^4.21.0",
|
|
"typescript": "~5.9.3",
|
|
"typescript-eslint": "^8.57.0",
|
|
"vite": "^6.4.2"
|
|
},
|
|
"overrides": {
|
|
"dompurify": "^3.4.0",
|
|
"uuid": "^13.0.1",
|
|
"esbuild": "^0.28.1"
|
|
}
|
|
}
|