Files
logseq/package.json
Tienson Qin 1f9c017998 refactor: graph view V2 (#12604)
* feat(graph): rebuild global graph view with Pixi

Summary:

- Replace /graph route with a new Pixi-based global graph implementation in ClojureScript.

- Build graph data from db-worker only (no UI DB writeback) and default to tags+objects with a toggle for all pages.

- Add fast scene rendering for large graphs with indexed hit-testing, zoom/pan, node dragging, and click/shift+click node actions.

- Introduce dynamic label management (zoom hysteresis, viewport culling, overlap control, hover-emphasis) and fix hook lifecycle cleanup issues.

- Refresh graph UI styling to full-container layout, dot-first settings control, and Logseq button usage.

- Add/expand tests for global graph modes, node actions, and Pixi label/visibility logic.

- Update graph-related dependencies/lockfile as part of the new implementation.

* enhance(graph): improve drag exploration and label visibility

- Dragging a node now pulls connected nodes with depth-based weights for easier structure exploration.

- Labels are rendered only for currently visible node dots; hover no longer reveals hidden-node titles.

- Hovered node title remains promoted in foreground while respecting visibility constraints.

- Add logic/test coverage for connected drag weights and updated label text behavior.

* enhance(graph): use d3 force layout

Summary:
- Move Graph V2 node layout into graph pixi logic.
- Use d3-force link, charge, center, collision, and y forces instead of the hand-written ring/spiral layout.
- Add coverage that linked graph nodes settle closer than an unlinked island.

Dependency:
- Verified d3-force is already latest at 3.0.0.

Tests:
- bb dev:test -v frontend.extensions.graph-pixi-logic-test
- bb dev:test -v frontend.common.graph-view-v2-test
- pnpm install --frozen-lockfile --lockfile-only

* fix: graph view interactions

* enhance: speed up large graph view

* enhance: speed up tags graph

* enhance: speed up tags layout

* enhance: bound tags force layout

* enhance: speed up graph opening

* fix: keep graph objects visible when zoomed out

* fix: resize graph with sidebars

* enhance: select graph nodes

* fix: refine graph selection controls

* support icons

* fix: sharpen graph node icons

* enhance(graph): update graph v2 settings

* fix: re-render graph when theme changes

* enhance(graph): remove legacy graph view

* fix: typo

* fix: improve graph view

* test: cover graph view improvements

* enhance: improve graph view

* test: cover graph time travel behavior

* enhance: refine graph time travel

* test: cover graph layout controls

* enhance: add graph layout controls

* test: cover graph highlight controls

* fix: refine graph highlight controls

* test: cover edge label alignment

* fix: align graph edge labels

* test: keep graph lines visible on highlight

* fix: keep graph lines visible on highlight

* fix: show graph lines by default

* test: filter graph lines on highlight

* fix: filter graph lines on highlight

* test: keep graph depth incremental

* fix: update graph depth incrementally

* test: cover graph label link occlusion

* fix: occlude graph links behind labels

* test: cover graph edge visibility defaults

* fix: smooth graph edges on highlight

* test: cover graph arrow toggle

* fix: toggle graph arrows

* test: cover reciprocal graph edge offsets

* fix: separate reciprocal graph edges

* test: cover duplicate graph edge runs

* fix: dedupe graph edge render runs

* test: cover graph tag clusters

* enhance: cluster graph tags layout

* test: cover graph tag cluster colors

* fix: color graph tag clusters by title

* test: cover subdued graph node colors

* fix: mute graph node colors

* feat: grid layout

* add more options

* enhance(graph): drill into tags on zoom

* map-like navigation

* mod+click to preview node

* edge enhancements

* more tweaks

* fix: block preview

* enhance(graph): speed up large graph layout

* fix: improve graph mode switching ux

* fix: speed up graph view switching

* fix: optimize large all-pages graph render

* fix: speed up graph data build

* fix: collapse graph tag settings on mode switch

* enhance: refine graph panel width

* fix: improve graph zoom performance

* fix: satisfy graph lint

* fix: open graph nodes by uuid

---------

Co-authored-by: rcmerci <rcmerci@gmail.com>
2026-05-10 23:26:32 +08:00

212 lines
9.5 KiB
JSON

{
"name": "logseq",
"version": "0.0.1",
"private": true,
"packageManager": "pnpm@10.33.0",
"main": "static/electron.js",
"bin": {
"logseq": "dist/logseq.js"
},
"files": [
"dist/",
"static/logseq-cli.js",
".agents/skills/logseq-cli/SKILL.md"
],
"engines": {
"node": ">=22.20.0"
},
"devDependencies": {
"@capacitor/assets": "^3.0.5",
"@capacitor/cli": "^8.3.1",
"@jcesarmobile/ssl-skip": "^0.9.0",
"@playwright/test": "^1.58.2",
"@tailwindcss/aspect-ratio": "0.4.2",
"@tailwindcss/forms": "0.5.11",
"@tailwindcss/typography": "0.5.19",
"autoprefixer": "^10.5.0",
"better-sqlite3": "^12.9.0",
"cross-env": "^10.1.0",
"cssnano": "^7.1.8",
"gulp": "^5.0.1",
"gulp-postcss": "^10.0.0",
"gulp-replace": "^1.1.4",
"npm-run-all2": "^8.0.4",
"playwright": "^1.58.2",
"postcss": "^8.5.13",
"postcss-cli": "11.0.1",
"postcss-import": "16.1.1",
"postcss-import-ext-glob": "2.1.1",
"postcss-nested": "7.0.2",
"process": "^0.11.10",
"semver": "7.7.4",
"shadow-cljs": "^3.4.6",
"source-map-loader": "^5.0.0",
"stylelint": "^13.13.1",
"stylelint-config-standard": "^20.0.0",
"tailwindcss": "3.3.5",
"tailwindcss-animate": "^1.0.7",
"typescript": "^5.9.3",
"vite": "^8.0.10",
"webpack": "^5.106.2",
"webpack-cli": "^7.0.2",
"ws": "^8.20.0"
},
"scripts": {
"watch": "run-p gulp:watch cljs:watch webpack-app-watch",
"electron-watch": "run-p gulp:watch cljs:electron-watch webpack-app-watch",
"app-watch": "run-p gulp:watch cljs:app-watch webpack-app-watch",
"mobile-watch": "run-p gulp:mobile-watch cljs:mobile-watch webpack-mobile-watch",
"dev": "run-p gulp:watch gulp:mobile-watch cljs:dev-watch webpack-watch",
"release": "run-s gulp:build cljs:release webpack-app-build",
"release-app": "run-s gulp:build cljs:release-app webpack-app-build",
"release-mobile": "run-s gulp:buildMobile cljs:release-mobile webpack-mobile-build",
"dev-release-app": "run-s gulp:build cljs:dev-release-app webpack-app-build",
"dev-electron-app": "gulp electron",
"release-electron": "run-s gulp:build && pnpm db-worker-node:release:bundle webpack-app-build && gulp electronMaker",
"debug-electron": "cd static/ && pnpm electron:debug",
"webpack-watch": "webpack --watch",
"webpack-app-watch": "pnpm exec webpack --watch --config-name app",
"webpack-mobile-watch": "pnpm exec webpack --watch --config-name mobile",
"webpack-app-build": "pnpm exec webpack build --mode production --config-name app",
"webpack-mobile-build": "pnpm exec webpack build --mode production --config-name mobile",
"sync-android-release": "pnpm clean && pnpm release-mobile && rm -rf ./static/mobile/**/*.map && pnpm exec cap sync android",
"sync-ios-release": "pnpm clean && pnpm release-mobile && rm -rf ./static/mobile/**/*.map && pnpm exec cap sync ios && pnpm test:ios-web-fonts",
"clean": "gulp clean",
"test": "run-s cljs:test cljs:run-test",
"test:ios-web-fonts": "node ./scripts/check-ios-web-fonts.mjs",
"test:node-adapter": "pnpm --dir deps/db-sync run test:node-adapter",
"report": "run-s cljs:report",
"style:lint": "stylelint \"src/**/*.css\"",
"gulp:watch": "gulp watch",
"gulp:build": "cross-env NODE_ENV=production gulp build",
"gulp:buildMobile": "cross-env NODE_ENV=production gulp buildMobile",
"css:build": "postcss tailwind.all.css -o static/css/style.css --verbose --env production",
"css:watch": "cross-env TAILWIND_MODE=watch postcss tailwind.all.css -o static/css/style.css --verbose --watch",
"cljs:watch": "clojure -M:cljs watch app db-worker db-worker-node electron",
"gulp:mobile-watch": "gulp watchMobile",
"css:mobile-build": "postcss tailwind.mobile.css -o static/mobile/css/style.css --verbose --env production",
"css:mobile-watch": "cross-env TAILWIND_MODE=watch postcss tailwind.mobile.css -o static/mobile/css/style.css --verbose --watch",
"cljs:mobile-watch": "clojure -M:cljs watch mobile db-worker db-worker-node --config-merge \"{:output-dir \\\"./static/mobile/js\\\" :asset-path \\\"/static/mobile/js\\\" :release {:asset-path \\\"http://localhost\\\"}}\"",
"cljs:release-mobile": "clojure -M:cljs release mobile db-worker db-worker-node --config-merge \"{:output-dir \\\"./static/mobile/js\\\" :asset-path \\\"/static/mobile/js\\\" :release {:asset-path \\\"http://localhost\\\"}}\"",
"cljs:dev-watch": "clojure -M:cljs watch app db-worker db-worker-node electron mobile logseq-cli",
"cljs:app-watch": "clojure -M:cljs watch app db-worker db-worker-node logseq-cli",
"cljs:electron-watch": "clojure -M:cljs watch app db-worker db-worker-node electron logseq-cli test --config-merge \"{:asset-path \\\"./js\\\"}\"",
"cljs:release": "clojure -M:cljs release app db-worker db-worker-node publishing electron",
"cljs:release-electron": "clojure -M:cljs release app db-worker db-worker-node electron logseq-cli publishing",
"cljs:release-app": "clojure -M:cljs release app db-worker db-worker-node",
"cljs:release-publishing": "clojure -M:cljs release app publishing",
"cljs:test": "clojure -M:test compile test",
"cljs:run-test": "cross-env LOGSEQ_STABLE_IDENTS=1 node static/tests.js -r \"^(?!logseq.db-sync.).*\" -e fix-me",
"cljs:test-no-worker": "clojure -M:test compile test-no-worker",
"cljs:run-test-no-worker": "node static/tests-no-worker.js",
"db-worker-node:compile": "clojure -M:cljs compile db-worker-node",
"db-worker-node:release": "clojure -M:cljs release db-worker-node",
"db-worker-node:bundle": "node ./scripts/build-db-worker-node-bundle.mjs",
"db-worker-node:release:bundle": "run-s db-worker-node:release db-worker-node:bundle",
"db-worker-node:compile:bundle": "run-s db-worker-node:compile db-worker-node:bundle",
"desktop:prepare-runtime-js": "node ./scripts/prepare-desktop-runtime-js.mjs",
"cli:e2e": "bb dev:cli-e2e",
"cli:e2e:skip-build": "bb dev:cli-e2e --skip-build",
"cljs:dev-release-app": "clojure -M:cljs release app db-worker db-worker-node --config-merge \"{:closure-defines {frontend.config/DEV-RELEASE true}}\"",
"cljs:dev-release-electron": "clojure -M:cljs release app db-worker db-worker-node electron logseq-cli --debug --config-merge \"{:closure-defines {frontend.config/DEV-RELEASE true}}\" && clojure -M:cljs release publishing",
"cljs:debug": "clojure -M:cljs release app db-worker db-worker-node --debug",
"cljs:report": "clojure -M:cljs run shadow.cljs.build-report app db-worker db-worker-node report.html",
"cljs:build-electron": "clojure -A:cljs compile app db-worker db-worker-node electron logseq-cli",
"cljs:lint": "clojure -M:clj-kondo --parallel --lint src --cache false",
"ios:dev": "cross-env PLATFORM=ios gulp cap",
"android:dev": "cross-env PLATFORM=android gulp cap",
"ui:build": "pnpm --dir packages/ui install",
"postinstall": "pnpm ui:build"
},
"dependencies": {
"@aparajita/capacitor-secure-storage": "^8.0.0",
"@capacitor-community/safe-area": "8.0.1",
"@capacitor/action-sheet": "^8.1.1",
"@capacitor/android": "^8.3.1",
"@capacitor/app": "^8.1.0",
"@capacitor/camera": "^8.2.0",
"@capacitor/clipboard": "^8.0.1",
"@capacitor/core": "^8.3.1",
"@capacitor/device": "^8.0.2",
"@capacitor/dialog": "^8.0.1",
"@capacitor/filesystem": "^8.1.2",
"@capacitor/haptics": "^8.0.2",
"@capacitor/ios": "^8.3.1",
"@capacitor/keyboard": "^8.0.3",
"@capacitor/network": "^8.0.1",
"@capacitor/share": "^8.0.1",
"@capacitor/splash-screen": "^8.0.1",
"@capacitor/status-bar": "^8.0.2",
"@capgo/capacitor-navigation-bar": "^8.1.5",
"@dnd-kit/core": "^6.3.1",
"@dnd-kit/sortable": "^10.0.0",
"@emoji-mart/data": "^1.2.1",
"@emoji-mart/react": "^1.1.1",
"@glidejs/glide": "^3.7.1",
"@highlightjs/cdn-assets": "11.11.1",
"@isomorphic-git/lightning-fs": "^4.6.2",
"@js-joda/core": "3.2.0",
"@js-joda/locale_en-us": "3.1.1",
"@js-joda/timezone": "2.5.0",
"@logseq/react-tweet-embed": "1.3.1-1",
"@logseq/simple-wave-record": "^0.0.3",
"@radix-ui/colors": "^3.0.0",
"@sentry/react": "^10.51.0",
"@sqlite.org/sqlite-wasm": "3.51.2-build9",
"@tabler/icons-react": "2.47.0",
"bignumber.js": "^9.3.1",
"chrono-node": "2.9.0",
"codemirror": "5.65.18",
"comlink": "^4.4.2",
"d3-force": "3.0.0",
"dompurify": "^3.4.2",
"emoji-mart": "^5.6.0",
"fs": "0.0.1-security",
"fs-extra": "^11.3.4",
"graphology": "0.20.0",
"html2canvas": "^1.4.1",
"inter-ui": "^4.1.1",
"interactjs": "^1.10.27",
"jszip": "3.10.1",
"katex": "^0.16.45",
"keytar": "^7.9.0",
"marked": "^17.0.6",
"mldoc": "^1.5.9",
"path": "0.12.7",
"path-complete-extname": "1.0.0",
"pdfjs-dist": "4.2.67",
"photoswipe": "^5.4.4",
"picocolors": "1.1.1",
"pixi.js": "^8.18.1",
"posthog-js": "1.10.0",
"prop-types": "^15.8.1",
"react": "18.3.1",
"react-dom": "18.3.1",
"react-intersection-observer": "^10.0.3",
"react-textarea-autosize": "8.5.9",
"react-transition-group": "4.4.5",
"react-virtuoso": "4.18.3",
"remove-accents": "0.5.0",
"sanitize-filename": "1.6.4",
"send-intent": "^7.0.0",
"string-width": "8.2.0",
"tiny-pinyin": "1.3.2",
"url": "^0.11.4",
"util": "^0.12.5"
},
"pnpm": {
"ignoredBuiltDependencies": [
"canvas",
"core-js",
"onnxruntime-node",
"protobufjs",
"sharp"
],
"onlyBuiltDependencies": [
"better-sqlite3",
"electron",
"keytar"
]
}
}