stellavault 0.2.0 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/packages/core/dist/api/dashboard.d.ts +3 -0
- package/packages/core/{src/api/dashboard.ts → dist/api/dashboard.js} +8 -11
- package/packages/core/dist/api/graph-data.d.ts +11 -0
- package/packages/core/dist/api/graph-data.js +255 -0
- package/packages/core/dist/api/pwa.d.ts +3 -0
- package/packages/core/{src/api/pwa.ts → dist/api/pwa.js} +27 -32
- package/packages/core/dist/api/server.d.ts +16 -0
- package/packages/core/dist/api/server.js +718 -0
- package/packages/core/dist/capture/voice.d.ts +24 -0
- package/packages/core/dist/capture/voice.js +135 -0
- package/packages/core/{src/cloud/index.ts → dist/cloud/index.d.ts} +1 -0
- package/packages/core/dist/cloud/index.js +2 -0
- package/packages/core/dist/cloud/sync.d.ts +29 -0
- package/packages/core/dist/cloud/sync.js +137 -0
- package/packages/core/dist/config.d.ts +27 -0
- package/packages/core/dist/config.js +55 -0
- package/packages/core/dist/federation/credits.d.ts +26 -0
- package/packages/core/dist/federation/credits.js +56 -0
- package/packages/core/dist/federation/identity.d.ts +14 -0
- package/packages/core/dist/federation/identity.js +74 -0
- package/packages/core/{src/federation/index.ts → dist/federation/index.d.ts} +1 -2
- package/packages/core/dist/federation/index.js +5 -0
- package/packages/core/dist/federation/node.d.ts +31 -0
- package/packages/core/dist/federation/node.js +216 -0
- package/packages/core/dist/federation/privacy.d.ts +8 -0
- package/packages/core/dist/federation/privacy.js +40 -0
- package/packages/core/dist/federation/reputation.d.ts +37 -0
- package/packages/core/dist/federation/reputation.js +139 -0
- package/packages/core/dist/federation/search.d.ts +19 -0
- package/packages/core/dist/federation/search.js +101 -0
- package/packages/core/dist/federation/sharing.d.ts +72 -0
- package/packages/core/dist/federation/sharing.js +246 -0
- package/packages/core/dist/federation/trust.d.ts +15 -0
- package/packages/core/dist/federation/trust.js +60 -0
- package/packages/core/dist/federation/types.d.ts +40 -0
- package/packages/core/dist/federation/types.js +3 -0
- package/packages/core/dist/i18n/index.d.ts +6 -0
- package/packages/core/dist/i18n/index.js +81 -0
- package/packages/core/{src/index.ts → dist/index.d.ts} +46 -65
- package/packages/core/dist/index.js +69 -0
- package/packages/core/dist/indexer/chunker.d.ts +14 -0
- package/packages/core/dist/indexer/chunker.js +148 -0
- package/packages/core/dist/indexer/embedder.d.ts +8 -0
- package/packages/core/dist/indexer/embedder.js +3 -0
- package/packages/core/dist/indexer/index.d.ts +28 -0
- package/packages/core/dist/indexer/index.js +74 -0
- package/packages/core/dist/indexer/local-embedder.d.ts +3 -0
- package/packages/core/dist/indexer/local-embedder.js +29 -0
- package/packages/core/dist/indexer/scanner.d.ts +11 -0
- package/packages/core/dist/indexer/scanner.js +137 -0
- package/packages/core/dist/indexer/watcher.d.ts +19 -0
- package/packages/core/dist/indexer/watcher.js +49 -0
- package/packages/core/dist/intelligence/code-linker.d.ts +20 -0
- package/packages/core/dist/intelligence/code-linker.js +88 -0
- package/packages/core/dist/intelligence/contradiction-detector.d.ts +20 -0
- package/packages/core/dist/intelligence/contradiction-detector.js +115 -0
- package/packages/core/dist/intelligence/decay-engine.d.ts +27 -0
- package/packages/core/dist/intelligence/decay-engine.js +190 -0
- package/packages/core/dist/intelligence/duplicate-detector.d.ts +20 -0
- package/packages/core/dist/intelligence/duplicate-detector.js +55 -0
- package/packages/core/dist/intelligence/fsrs.d.ts +43 -0
- package/packages/core/dist/intelligence/fsrs.js +70 -0
- package/packages/core/dist/intelligence/gap-detector.d.ts +25 -0
- package/packages/core/dist/intelligence/gap-detector.js +78 -0
- package/packages/core/dist/intelligence/learning-path.d.ts +31 -0
- package/packages/core/dist/intelligence/learning-path.js +53 -0
- package/packages/core/dist/intelligence/notifications.d.ts +31 -0
- package/packages/core/dist/intelligence/notifications.js +65 -0
- package/packages/core/dist/intelligence/predictive-gaps.d.ts +14 -0
- package/packages/core/dist/intelligence/predictive-gaps.js +74 -0
- package/packages/core/dist/intelligence/semantic-versioning.d.ts +37 -0
- package/packages/core/dist/intelligence/semantic-versioning.js +68 -0
- package/packages/core/dist/intelligence/types.d.ts +28 -0
- package/packages/core/dist/intelligence/types.js +3 -0
- package/packages/core/dist/mcp/custom-tools.d.ts +29 -0
- package/packages/core/dist/mcp/custom-tools.js +70 -0
- package/packages/core/{src/mcp/index.ts → dist/mcp/index.d.ts} +1 -0
- package/packages/core/dist/mcp/index.js +2 -0
- package/packages/core/dist/mcp/server.d.ts +49 -0
- package/packages/core/dist/mcp/server.js +151 -0
- package/packages/core/dist/mcp/tools/agentic-graph.d.ts +87 -0
- package/packages/core/dist/mcp/tools/agentic-graph.js +88 -0
- package/packages/core/dist/mcp/tools/brief.d.ts +31 -0
- package/packages/core/dist/mcp/tools/brief.js +39 -0
- package/packages/core/dist/mcp/tools/decay.d.ts +33 -0
- package/packages/core/dist/mcp/tools/decay.js +32 -0
- package/packages/core/dist/mcp/tools/decision-journal.d.ts +78 -0
- package/packages/core/dist/mcp/tools/decision-journal.js +79 -0
- package/packages/core/dist/mcp/tools/detect-gaps.d.ts +24 -0
- package/packages/core/dist/mcp/tools/detect-gaps.js +47 -0
- package/packages/core/dist/mcp/tools/export.d.ts +29 -0
- package/packages/core/dist/mcp/tools/export.js +60 -0
- package/packages/core/dist/mcp/tools/federated-search.d.ts +29 -0
- package/packages/core/dist/mcp/tools/federated-search.js +36 -0
- package/packages/core/dist/mcp/tools/generate-claude-md.d.ts +35 -0
- package/packages/core/dist/mcp/tools/generate-claude-md.js +107 -0
- package/packages/core/dist/mcp/tools/get-document.d.ts +35 -0
- package/packages/core/dist/mcp/tools/get-document.js +25 -0
- package/packages/core/dist/mcp/tools/get-evolution.d.ts +28 -0
- package/packages/core/dist/mcp/tools/get-evolution.js +70 -0
- package/packages/core/dist/mcp/tools/get-related.d.ts +32 -0
- package/packages/core/dist/mcp/tools/get-related.js +33 -0
- package/packages/core/dist/mcp/tools/learning-path.d.ts +23 -0
- package/packages/core/dist/mcp/tools/learning-path.js +45 -0
- package/packages/core/dist/mcp/tools/link-code.d.ts +34 -0
- package/packages/core/dist/mcp/tools/link-code.js +44 -0
- package/packages/core/dist/mcp/tools/list-topics.d.ts +15 -0
- package/packages/core/dist/mcp/tools/list-topics.js +18 -0
- package/packages/core/dist/mcp/tools/search.d.ts +39 -0
- package/packages/core/dist/mcp/tools/search.js +29 -0
- package/packages/core/dist/mcp/tools/snapshot.d.ts +47 -0
- package/packages/core/dist/mcp/tools/snapshot.js +84 -0
- package/packages/core/dist/multi-vault/index.d.ts +26 -0
- package/packages/core/dist/multi-vault/index.js +80 -0
- package/packages/core/dist/pack/creator.d.ts +21 -0
- package/packages/core/dist/pack/creator.js +105 -0
- package/packages/core/dist/pack/exporter.d.ts +4 -0
- package/packages/core/dist/pack/exporter.js +18 -0
- package/packages/core/dist/pack/importer.d.ts +10 -0
- package/packages/core/dist/pack/importer.js +55 -0
- package/packages/core/{src/pack/index.ts → dist/pack/index.d.ts} +1 -0
- package/packages/core/dist/pack/index.js +5 -0
- package/packages/core/dist/pack/marketplace.d.ts +14 -0
- package/packages/core/dist/pack/marketplace.js +90 -0
- package/packages/core/dist/pack/pii-masker.d.ts +7 -0
- package/packages/core/dist/pack/pii-masker.js +29 -0
- package/packages/core/dist/pack/types.d.ts +36 -0
- package/packages/core/dist/pack/types.js +3 -0
- package/packages/core/dist/plugins/index.d.ts +35 -0
- package/packages/core/dist/plugins/index.js +57 -0
- package/packages/core/dist/plugins/webhooks.d.ts +30 -0
- package/packages/core/dist/plugins/webhooks.js +79 -0
- package/packages/core/dist/search/adaptive.d.ts +16 -0
- package/packages/core/dist/search/adaptive.js +67 -0
- package/packages/core/dist/search/bm25.d.ts +4 -0
- package/packages/core/dist/search/bm25.js +10 -0
- package/packages/core/dist/search/index.d.ts +15 -0
- package/packages/core/dist/search/index.js +64 -0
- package/packages/core/dist/search/rrf.d.ts +7 -0
- package/packages/core/dist/search/rrf.js +21 -0
- package/packages/core/dist/search/semantic.d.ts +5 -0
- package/packages/core/dist/search/semantic.js +6 -0
- package/packages/core/{src/store/index.ts → dist/store/index.d.ts} +1 -0
- package/packages/core/dist/store/index.js +2 -0
- package/packages/core/dist/store/sqlite-vec.d.ts +6 -0
- package/packages/core/dist/store/sqlite-vec.js +251 -0
- package/packages/core/dist/store/types.d.ts +20 -0
- package/packages/core/dist/store/types.js +3 -0
- package/packages/core/dist/team/index.d.ts +25 -0
- package/packages/core/dist/team/index.js +97 -0
- package/packages/core/dist/types/chunk.d.ts +23 -0
- package/packages/core/dist/types/chunk.js +3 -0
- package/packages/core/dist/types/document.d.ts +23 -0
- package/packages/core/dist/types/document.js +3 -0
- package/packages/core/dist/types/graph.d.ts +39 -0
- package/packages/core/dist/types/graph.js +3 -0
- package/packages/core/dist/types/index.d.ts +5 -0
- package/packages/core/dist/types/index.js +2 -0
- package/packages/core/dist/types/search.d.ts +39 -0
- package/packages/core/dist/types/search.js +3 -0
- package/packages/core/dist/utils/retry.d.ts +25 -0
- package/packages/core/dist/utils/retry.js +59 -0
- package/.github/workflows/pages.yml +0 -37
- package/memory/MEMORY.md +0 -25
- package/packages/cli/dist/commands/brief-cmd.d.ts.map +0 -1
- package/packages/cli/dist/commands/brief-cmd.js.map +0 -1
- package/packages/cli/dist/commands/capture-cmd.d.ts.map +0 -1
- package/packages/cli/dist/commands/capture-cmd.js.map +0 -1
- package/packages/cli/dist/commands/card-cmd.d.ts.map +0 -1
- package/packages/cli/dist/commands/card-cmd.js.map +0 -1
- package/packages/cli/dist/commands/clip-cmd.d.ts.map +0 -1
- package/packages/cli/dist/commands/clip-cmd.js.map +0 -1
- package/packages/cli/dist/commands/cloud-cmd.d.ts.map +0 -1
- package/packages/cli/dist/commands/cloud-cmd.js.map +0 -1
- package/packages/cli/dist/commands/contradictions-cmd.d.ts.map +0 -1
- package/packages/cli/dist/commands/contradictions-cmd.js.map +0 -1
- package/packages/cli/dist/commands/decay-cmd.d.ts.map +0 -1
- package/packages/cli/dist/commands/decay-cmd.js.map +0 -1
- package/packages/cli/dist/commands/digest-cmd.d.ts.map +0 -1
- package/packages/cli/dist/commands/digest-cmd.js.map +0 -1
- package/packages/cli/dist/commands/duplicates-cmd.d.ts.map +0 -1
- package/packages/cli/dist/commands/duplicates-cmd.js.map +0 -1
- package/packages/cli/dist/commands/federate-cmd.d.ts.map +0 -1
- package/packages/cli/dist/commands/federate-cmd.js.map +0 -1
- package/packages/cli/dist/commands/gaps-cmd.d.ts.map +0 -1
- package/packages/cli/dist/commands/gaps-cmd.js.map +0 -1
- package/packages/cli/dist/commands/graph-cmd.d.ts.map +0 -1
- package/packages/cli/dist/commands/graph-cmd.js.map +0 -1
- package/packages/cli/dist/commands/index-cmd.d.ts.map +0 -1
- package/packages/cli/dist/commands/index-cmd.js.map +0 -1
- package/packages/cli/dist/commands/init-cmd.d.ts.map +0 -1
- package/packages/cli/dist/commands/init-cmd.js.map +0 -1
- package/packages/cli/dist/commands/learn-cmd.d.ts.map +0 -1
- package/packages/cli/dist/commands/learn-cmd.js.map +0 -1
- package/packages/cli/dist/commands/pack-cmd.d.ts.map +0 -1
- package/packages/cli/dist/commands/pack-cmd.js.map +0 -1
- package/packages/cli/dist/commands/review-cmd.d.ts.map +0 -1
- package/packages/cli/dist/commands/review-cmd.js.map +0 -1
- package/packages/cli/dist/commands/search-cmd.d.ts.map +0 -1
- package/packages/cli/dist/commands/search-cmd.js.map +0 -1
- package/packages/cli/dist/commands/serve-cmd.d.ts.map +0 -1
- package/packages/cli/dist/commands/serve-cmd.js.map +0 -1
- package/packages/cli/dist/commands/status-cmd.d.ts.map +0 -1
- package/packages/cli/dist/commands/status-cmd.js.map +0 -1
- package/packages/cli/dist/commands/sync-cmd.d.ts.map +0 -1
- package/packages/cli/dist/commands/sync-cmd.js.map +0 -1
- package/packages/cli/dist/commands/vault-cmd.d.ts.map +0 -1
- package/packages/cli/dist/commands/vault-cmd.js.map +0 -1
- package/packages/cli/dist/index.d.ts.map +0 -1
- package/packages/cli/dist/index.js.map +0 -1
- package/packages/cli/src/commands/brief-cmd.ts +0 -87
- package/packages/cli/src/commands/capture-cmd.ts +0 -34
- package/packages/cli/src/commands/card-cmd.ts +0 -29
- package/packages/cli/src/commands/clip-cmd.ts +0 -172
- package/packages/cli/src/commands/cloud-cmd.ts +0 -75
- package/packages/cli/src/commands/contradictions-cmd.ts +0 -41
- package/packages/cli/src/commands/decay-cmd.ts +0 -57
- package/packages/cli/src/commands/digest-cmd.ts +0 -89
- package/packages/cli/src/commands/duplicates-cmd.ts +0 -38
- package/packages/cli/src/commands/federate-cmd.ts +0 -256
- package/packages/cli/src/commands/gaps-cmd.ts +0 -40
- package/packages/cli/src/commands/graph-cmd.ts +0 -88
- package/packages/cli/src/commands/index-cmd.ts +0 -65
- package/packages/cli/src/commands/init-cmd.ts +0 -145
- package/packages/cli/src/commands/learn-cmd.ts +0 -56
- package/packages/cli/src/commands/pack-cmd.ts +0 -121
- package/packages/cli/src/commands/review-cmd.ts +0 -125
- package/packages/cli/src/commands/search-cmd.ts +0 -45
- package/packages/cli/src/commands/serve-cmd.ts +0 -17
- package/packages/cli/src/commands/status-cmd.ts +0 -37
- package/packages/cli/src/commands/sync-cmd.ts +0 -68
- package/packages/cli/src/commands/vault-cmd.ts +0 -64
- package/packages/cli/src/index.ts +0 -187
- package/packages/core/src/api/graph-data.ts +0 -286
- package/packages/core/src/api/server.ts +0 -660
- package/packages/core/src/capture/voice.ts +0 -168
- package/packages/core/src/cloud/sync.ts +0 -167
- package/packages/core/src/config.ts +0 -82
- package/packages/core/src/federation/credits.ts +0 -80
- package/packages/core/src/federation/hyperswarm.d.ts +0 -19
- package/packages/core/src/federation/identity.ts +0 -90
- package/packages/core/src/federation/node.ts +0 -235
- package/packages/core/src/federation/privacy.ts +0 -52
- package/packages/core/src/federation/reputation.ts +0 -202
- package/packages/core/src/federation/search.ts +0 -129
- package/packages/core/src/federation/sharing.ts +0 -315
- package/packages/core/src/federation/trust.ts +0 -76
- package/packages/core/src/federation/types.ts +0 -25
- package/packages/core/src/i18n/index.ts +0 -85
- package/packages/core/src/indexer/chunker.ts +0 -180
- package/packages/core/src/indexer/embedder.ts +0 -9
- package/packages/core/src/indexer/index.ts +0 -113
- package/packages/core/src/indexer/local-embedder.ts +0 -35
- package/packages/core/src/indexer/scanner.ts +0 -142
- package/packages/core/src/indexer/watcher.ts +0 -62
- package/packages/core/src/intelligence/contradiction-detector.ts +0 -134
- package/packages/core/src/intelligence/decay-engine.ts +0 -229
- package/packages/core/src/intelligence/duplicate-detector.ts +0 -71
- package/packages/core/src/intelligence/fsrs.ts +0 -79
- package/packages/core/src/intelligence/gap-detector.ts +0 -109
- package/packages/core/src/intelligence/learning-path.ts +0 -86
- package/packages/core/src/intelligence/notifications.ts +0 -106
- package/packages/core/src/intelligence/predictive-gaps.ts +0 -94
- package/packages/core/src/intelligence/semantic-versioning.ts +0 -97
- package/packages/core/src/intelligence/types.ts +0 -28
- package/packages/core/src/mcp/custom-tools.ts +0 -97
- package/packages/core/src/mcp/server.ts +0 -142
- package/packages/core/src/mcp/tools/agentic-graph.ts +0 -96
- package/packages/core/src/mcp/tools/brief.ts +0 -49
- package/packages/core/src/mcp/tools/decay.ts +0 -40
- package/packages/core/src/mcp/tools/decision-journal.ts +0 -95
- package/packages/core/src/mcp/tools/export.ts +0 -72
- package/packages/core/src/mcp/tools/federated-search.ts +0 -43
- package/packages/core/src/mcp/tools/generate-claude-md.ts +0 -130
- package/packages/core/src/mcp/tools/get-document.ts +0 -26
- package/packages/core/src/mcp/tools/get-related.ts +0 -41
- package/packages/core/src/mcp/tools/learning-path.ts +0 -52
- package/packages/core/src/mcp/tools/list-topics.ts +0 -20
- package/packages/core/src/mcp/tools/search.ts +0 -35
- package/packages/core/src/mcp/tools/snapshot.ts +0 -98
- package/packages/core/src/multi-vault/index.ts +0 -118
- package/packages/core/src/pack/creator.ts +0 -127
- package/packages/core/src/pack/exporter.ts +0 -21
- package/packages/core/src/pack/importer.ts +0 -82
- package/packages/core/src/pack/marketplace.ts +0 -103
- package/packages/core/src/pack/pii-masker.ts +0 -38
- package/packages/core/src/pack/types.ts +0 -39
- package/packages/core/src/plugins/index.ts +0 -100
- package/packages/core/src/plugins/webhooks.ts +0 -110
- package/packages/core/src/search/bm25.ts +0 -16
- package/packages/core/src/search/index.ts +0 -83
- package/packages/core/src/search/rrf.ts +0 -31
- package/packages/core/src/search/semantic.ts +0 -15
- package/packages/core/src/store/sqlite-vec.ts +0 -290
- package/packages/core/src/store/types.ts +0 -22
- package/packages/core/src/team/index.ts +0 -126
- package/packages/core/src/types/chunk.ts +0 -25
- package/packages/core/src/types/document.ts +0 -24
- package/packages/core/src/types/graph.ts +0 -44
- package/packages/core/src/types/index.ts +0 -15
- package/packages/core/src/types/search.ts +0 -38
- package/packages/core/src/utils/retry.ts +0 -85
- package/packages/core/tests/api-card.test.ts +0 -60
- package/packages/core/tests/api-routes.test.ts +0 -98
- package/packages/core/tests/bm25.test.ts +0 -87
- package/packages/core/tests/chunker.test.ts +0 -48
- package/packages/core/tests/cluster.test.ts +0 -75
- package/packages/core/tests/constellation.test.ts +0 -77
- package/packages/core/tests/export-utils.test.ts +0 -97
- package/packages/core/tests/fsrs.test.ts +0 -96
- package/packages/core/tests/gesture-detector.test.ts +0 -45
- package/packages/core/tests/graph-data.test.ts +0 -87
- package/packages/core/tests/layout.test.ts +0 -83
- package/packages/core/tests/mcp.test.ts +0 -148
- package/packages/core/tests/pack.test.ts +0 -127
- package/packages/core/tests/pii-masker.test.ts +0 -42
- package/packages/core/tests/profile-card.test.ts +0 -62
- package/packages/core/tests/rrf.test.ts +0 -29
- package/packages/core/tests/search-integration.test.ts +0 -139
- package/packages/core/tests/store.test.ts +0 -80
- package/packages/graph/click-result.png +0 -0
- package/packages/graph/dist/assets/camera_utils-BMxqtvoZ.js +0 -1
- package/packages/graph/dist/assets/hands-DXA01_mx.js +0 -18
- package/packages/graph/dist/assets/index-DMEe2diW.js +0 -4192
- package/packages/graph/dist/assets/layout.worker-DbKCEFTz.js +0 -1
- package/packages/graph/dist/index.html +0 -17
- package/packages/graph/index.html +0 -17
- package/packages/graph/package.json +0 -32
- package/packages/graph/src/App.tsx +0 -7
- package/packages/graph/src/api/client.ts +0 -39
- package/packages/graph/src/components/ClusterFilter.tsx +0 -73
- package/packages/graph/src/components/ConstellationView.tsx +0 -232
- package/packages/graph/src/components/ExportPanel.tsx +0 -177
- package/packages/graph/src/components/Graph3D.tsx +0 -230
- package/packages/graph/src/components/GraphEdges.tsx +0 -100
- package/packages/graph/src/components/GraphNodes.tsx +0 -386
- package/packages/graph/src/components/HealthDashboard.tsx +0 -173
- package/packages/graph/src/components/Layout.tsx +0 -214
- package/packages/graph/src/components/MotionOverlay.tsx +0 -81
- package/packages/graph/src/components/MotionToggle.tsx +0 -33
- package/packages/graph/src/components/MultiverseView.tsx +0 -286
- package/packages/graph/src/components/NodeDetail.tsx +0 -232
- package/packages/graph/src/components/PulseParticle.tsx +0 -232
- package/packages/graph/src/components/SearchBar.tsx +0 -107
- package/packages/graph/src/components/StarField.tsx +0 -197
- package/packages/graph/src/components/StatusBar.tsx +0 -53
- package/packages/graph/src/components/Timeline.tsx +0 -148
- package/packages/graph/src/components/ToolsPanel.tsx +0 -512
- package/packages/graph/src/components/Tooltip.tsx +0 -100
- package/packages/graph/src/components/TypeFilter.tsx +0 -131
- package/packages/graph/src/embed/EmbedGraph.tsx +0 -144
- package/packages/graph/src/hooks/useConstellationLOD.ts +0 -76
- package/packages/graph/src/hooks/useDecay.ts +0 -37
- package/packages/graph/src/hooks/useExport.ts +0 -165
- package/packages/graph/src/hooks/useGraph.ts +0 -69
- package/packages/graph/src/hooks/useKeyboardNav.ts +0 -122
- package/packages/graph/src/hooks/useLayout.ts +0 -45
- package/packages/graph/src/hooks/useMotion.ts +0 -120
- package/packages/graph/src/hooks/usePulse.ts +0 -58
- package/packages/graph/src/hooks/useSearch.ts +0 -71
- package/packages/graph/src/lib/constellation.ts +0 -107
- package/packages/graph/src/lib/export-utils.ts +0 -48
- package/packages/graph/src/lib/gesture-detector.ts +0 -123
- package/packages/graph/src/lib/layout.worker.ts +0 -153
- package/packages/graph/src/lib/motion-controller.ts +0 -83
- package/packages/graph/src/lib/profile-card.ts +0 -122
- package/packages/graph/src/main.tsx +0 -4
- package/packages/graph/src/stores/graph-store.ts +0 -155
- package/packages/graph/success.png +0 -0
- package/packages/graph/test-click.mjs +0 -49
- package/packages/graph/test-explore.mjs +0 -102
- package/packages/graph/test-final.mjs +0 -61
- package/packages/graph/test-graph.mjs +0 -139
- package/packages/graph/test-hover.mjs +0 -48
- package/packages/graph/test-pulse.mjs +0 -68
- package/packages/graph/test-screenshot.mjs +0 -56
- package/packages/graph/test-v2.mjs +0 -97
- package/packages/graph/tsconfig.tsbuildinfo +0 -1
- package/packages/graph/vite.config.ts +0 -15
- package/packages/sync/.env.example +0 -11
- package/packages/sync/.sync-state.json +0 -317
- package/packages/sync/.upload-state.json +0 -1009
- package/packages/sync/create-stella-network-notion.mjs +0 -151
- package/packages/sync/create-stellavault-project-notion.mjs +0 -322
- package/packages/sync/logs/sync-2026-03-28.log +0 -6
- package/packages/sync/logs/sync-2026-03-29.log +0 -12
- package/packages/sync/logs/sync-2026-03-30.log +0 -6
- package/packages/sync/logs/sync-2026-03-31.log +0 -6
- package/packages/sync/logs/sync-2026-04-01.log +0 -6
- package/packages/sync/logs/sync-2026-04-02.log +0 -6
- package/packages/sync/package-lock.json +0 -373
- package/packages/sync/package.json +0 -16
- package/packages/sync/run-sync.bat +0 -18
- package/packages/sync/run-sync.mjs +0 -46
- package/packages/sync/setup-scheduler.mjs +0 -119
- package/packages/sync/structured-sync.mjs +0 -187
- package/packages/sync/sync-to-obsidian.mjs +0 -264
- package/packages/sync/upload-pdca-to-notion.mjs +0 -495
- package/tsconfig.base.json +0 -18
|
@@ -1,232 +0,0 @@
|
|
|
1
|
-
// 사이드패널: 클릭된 노드의 문서 미리보기
|
|
2
|
-
|
|
3
|
-
import { useEffect, useState, useRef, useMemo } from 'react';
|
|
4
|
-
import Markdown from 'react-markdown';
|
|
5
|
-
import { fetchDocument } from '../api/client.js';
|
|
6
|
-
import { useGraphStore } from '../stores/graph-store.js';
|
|
7
|
-
|
|
8
|
-
interface DocData {
|
|
9
|
-
id: string;
|
|
10
|
-
title: string;
|
|
11
|
-
filePath: string;
|
|
12
|
-
content: string;
|
|
13
|
-
tags: string[];
|
|
14
|
-
lastModified: string;
|
|
15
|
-
related: Array<{ id: string; title: string; score: number }>;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
export function NodeDetail() {
|
|
19
|
-
const selectedNodeId = useGraphStore((s) => s.selectedNodeId);
|
|
20
|
-
const selectNode = useGraphStore((s) => s.selectNode);
|
|
21
|
-
const theme = useGraphStore((s) => s.theme);
|
|
22
|
-
const isDark = theme === 'dark';
|
|
23
|
-
const [doc, setDoc] = useState<DocData | null>(null);
|
|
24
|
-
const [loading, setLoading] = useState(false);
|
|
25
|
-
const cacheRef = useRef<Map<string, DocData>>(new Map());
|
|
26
|
-
|
|
27
|
-
useEffect(() => {
|
|
28
|
-
if (!selectedNodeId) { setDoc(null); return; }
|
|
29
|
-
|
|
30
|
-
const cached = cacheRef.current.get(selectedNodeId);
|
|
31
|
-
if (cached) { setDoc(cached); return; }
|
|
32
|
-
|
|
33
|
-
let cancelled = false;
|
|
34
|
-
setLoading(true);
|
|
35
|
-
fetchDocument(selectedNodeId)
|
|
36
|
-
.then((data: any) => {
|
|
37
|
-
if (!cancelled) { setDoc(data); cacheRef.current.set(selectedNodeId, data); }
|
|
38
|
-
})
|
|
39
|
-
.catch(() => { if (!cancelled) setDoc(null); })
|
|
40
|
-
.finally(() => { if (!cancelled) setLoading(false); });
|
|
41
|
-
return () => { cancelled = true; };
|
|
42
|
-
}, [selectedNodeId]);
|
|
43
|
-
|
|
44
|
-
if (!selectedNodeId) return null;
|
|
45
|
-
|
|
46
|
-
// Theme colors
|
|
47
|
-
const bg = isDark ? '#0d0d18' : '#fafafa';
|
|
48
|
-
const border = isDark ? 'rgba(100, 120, 255, 0.15)' : 'rgba(0, 0, 0, 0.08)';
|
|
49
|
-
const textPrimary = isDark ? '#e0e0f0' : '#1a1a2e';
|
|
50
|
-
const textSecondary = isDark ? '#556' : '#888';
|
|
51
|
-
const textBody = isDark ? '#b0b0c0' : '#444';
|
|
52
|
-
const tagBg = isDark ? 'rgba(100, 120, 255, 0.1)' : 'rgba(80, 100, 200, 0.08)';
|
|
53
|
-
const tagColor = isDark ? '#88aaff' : '#4466aa';
|
|
54
|
-
const btnBg = isDark ? 'rgba(100, 120, 255, 0.1)' : 'rgba(80, 100, 200, 0.06)';
|
|
55
|
-
const btnBorder = isDark ? 'rgba(100, 120, 255, 0.2)' : 'rgba(80, 100, 200, 0.15)';
|
|
56
|
-
const btnColor = isDark ? '#88aaff' : '#4466aa';
|
|
57
|
-
|
|
58
|
-
return (
|
|
59
|
-
<div style={{
|
|
60
|
-
width: '380px', background: bg,
|
|
61
|
-
borderLeft: `1px solid ${border}`,
|
|
62
|
-
display: 'flex', flexDirection: 'column', overflow: 'hidden',
|
|
63
|
-
}}>
|
|
64
|
-
<div style={{
|
|
65
|
-
padding: '10px 16px',
|
|
66
|
-
borderBottom: `1px solid ${border}`,
|
|
67
|
-
display: 'flex', justifyContent: 'space-between', alignItems: 'center',
|
|
68
|
-
}}>
|
|
69
|
-
<span style={{ fontSize: '11px', color: textSecondary, textTransform: 'uppercase', letterSpacing: '1px' }}>
|
|
70
|
-
Document Preview
|
|
71
|
-
</span>
|
|
72
|
-
<button
|
|
73
|
-
onClick={() => selectNode(null)}
|
|
74
|
-
style={{ background: 'none', border: 'none', color: textSecondary, cursor: 'pointer', fontSize: '14px', padding: '2px 6px' }}
|
|
75
|
-
>
|
|
76
|
-
x
|
|
77
|
-
</button>
|
|
78
|
-
</div>
|
|
79
|
-
|
|
80
|
-
{loading ? (
|
|
81
|
-
<div style={{ padding: '24px 16px', color: textSecondary }}>Loading...</div>
|
|
82
|
-
) : doc ? (
|
|
83
|
-
<div style={{ flex: 1, overflowY: 'auto', padding: '16px' }}>
|
|
84
|
-
<h2 style={{ fontSize: '16px', fontWeight: 600, color: textPrimary, marginBottom: '6px', lineHeight: 1.3 }}>
|
|
85
|
-
{doc.title}
|
|
86
|
-
</h2>
|
|
87
|
-
{doc.tags.length > 0 && (
|
|
88
|
-
<div style={{ display: 'flex', gap: '5px', flexWrap: 'wrap', marginBottom: '10px' }}>
|
|
89
|
-
{doc.tags.map((tag) => (
|
|
90
|
-
<span key={tag} style={{ fontSize: '10px', color: tagColor, background: tagBg, padding: '1px 7px', borderRadius: '4px' }}>
|
|
91
|
-
#{tag}
|
|
92
|
-
</span>
|
|
93
|
-
))}
|
|
94
|
-
</div>
|
|
95
|
-
)}
|
|
96
|
-
<div style={{ fontSize: '10px', color: textSecondary, marginBottom: '12px' }}>
|
|
97
|
-
{new Date(doc.lastModified).toLocaleDateString('ko-KR')}
|
|
98
|
-
</div>
|
|
99
|
-
<button
|
|
100
|
-
onClick={() => {
|
|
101
|
-
setTimeout(() => (window as any).__sv_pulse?.(doc.id), 100);
|
|
102
|
-
}}
|
|
103
|
-
style={{
|
|
104
|
-
width: '100%', padding: '7px', marginBottom: '8px',
|
|
105
|
-
background: btnBg, border: `1px solid ${btnBorder}`,
|
|
106
|
-
borderRadius: '5px', color: btnColor, fontSize: '11px', cursor: 'pointer',
|
|
107
|
-
}}
|
|
108
|
-
>
|
|
109
|
-
Explore connections
|
|
110
|
-
</button>
|
|
111
|
-
<button
|
|
112
|
-
onClick={async () => {
|
|
113
|
-
const relFile = (doc.filePath ?? doc.title).replace(/\\/g, '/').replace(/\.md$/, '');
|
|
114
|
-
let vault = 'Evan';
|
|
115
|
-
try {
|
|
116
|
-
const res = await fetch('http://127.0.0.1:3333/api/stats');
|
|
117
|
-
const stats = await res.json();
|
|
118
|
-
if (stats.vaultName) vault = stats.vaultName;
|
|
119
|
-
} catch { /* fallback */ }
|
|
120
|
-
const uri = `obsidian://open?vault=${encodeURIComponent(vault)}&file=${encodeURIComponent(relFile)}`;
|
|
121
|
-
window.location.href = uri;
|
|
122
|
-
}}
|
|
123
|
-
style={{
|
|
124
|
-
width: '100%', padding: '7px', marginBottom: '14px',
|
|
125
|
-
background: isDark ? 'rgba(140, 100, 255, 0.08)' : 'rgba(120, 80, 200, 0.05)',
|
|
126
|
-
border: `1px solid ${isDark ? 'rgba(140, 100, 255, 0.15)' : 'rgba(120, 80, 200, 0.12)'}`,
|
|
127
|
-
borderRadius: '5px', color: isDark ? '#a088ff' : '#6644aa', fontSize: '11px', cursor: 'pointer',
|
|
128
|
-
}}
|
|
129
|
-
>
|
|
130
|
-
Open in Obsidian
|
|
131
|
-
</button>
|
|
132
|
-
<ContentAccordion content={doc.content} isDark={isDark} />
|
|
133
|
-
{doc.related.length > 0 && (
|
|
134
|
-
<div style={{ marginTop: '20px', paddingTop: '12px', borderTop: `1px solid ${border}` }}>
|
|
135
|
-
<div style={{ fontSize: '10px', color: textSecondary, textTransform: 'uppercase', letterSpacing: '1px', marginBottom: '6px' }}>
|
|
136
|
-
Related
|
|
137
|
-
</div>
|
|
138
|
-
{doc.related.map((r) => (
|
|
139
|
-
<div
|
|
140
|
-
key={r.id}
|
|
141
|
-
onClick={() => selectNode(r.id)}
|
|
142
|
-
style={{ padding: '4px 0', fontSize: '11px', color: isDark ? '#778' : '#555', cursor: 'pointer' }}
|
|
143
|
-
>
|
|
144
|
-
{r.title}
|
|
145
|
-
</div>
|
|
146
|
-
))}
|
|
147
|
-
</div>
|
|
148
|
-
)}
|
|
149
|
-
</div>
|
|
150
|
-
) : null}
|
|
151
|
-
</div>
|
|
152
|
-
);
|
|
153
|
-
}
|
|
154
|
-
|
|
155
|
-
function ContentAccordion({ content, isDark }: { content: string; isDark: boolean }) {
|
|
156
|
-
const sections = useMemo(() => {
|
|
157
|
-
const parts: Array<{ heading: string; body: string }> = [];
|
|
158
|
-
const lines = content.split('\n');
|
|
159
|
-
let currentHeading = 'Overview';
|
|
160
|
-
let currentBody: string[] = [];
|
|
161
|
-
|
|
162
|
-
for (const line of lines) {
|
|
163
|
-
const match = line.match(/^#{1,3}\s+(.+)$/);
|
|
164
|
-
if (match) {
|
|
165
|
-
if (currentBody.length > 0) {
|
|
166
|
-
parts.push({ heading: currentHeading, body: currentBody.join('\n') });
|
|
167
|
-
}
|
|
168
|
-
currentHeading = match[1];
|
|
169
|
-
currentBody = [];
|
|
170
|
-
} else {
|
|
171
|
-
currentBody.push(line);
|
|
172
|
-
}
|
|
173
|
-
}
|
|
174
|
-
if (currentBody.length > 0) {
|
|
175
|
-
parts.push({ heading: currentHeading, body: currentBody.join('\n') });
|
|
176
|
-
}
|
|
177
|
-
|
|
178
|
-
return parts;
|
|
179
|
-
}, [content]);
|
|
180
|
-
|
|
181
|
-
const bodyColor = isDark ? '#b0b0c0' : '#444';
|
|
182
|
-
|
|
183
|
-
if (content.length < 500 || sections.length <= 1) {
|
|
184
|
-
return (
|
|
185
|
-
<div style={{ fontSize: '13px', lineHeight: 1.7, color: bodyColor }}>
|
|
186
|
-
<Markdown>{content}</Markdown>
|
|
187
|
-
</div>
|
|
188
|
-
);
|
|
189
|
-
}
|
|
190
|
-
|
|
191
|
-
return (
|
|
192
|
-
<div>
|
|
193
|
-
{sections.map((sec, i) => (
|
|
194
|
-
<AccordionSection key={i} heading={sec.heading} body={sec.body} defaultOpen={i === 0} isDark={isDark} />
|
|
195
|
-
))}
|
|
196
|
-
</div>
|
|
197
|
-
);
|
|
198
|
-
}
|
|
199
|
-
|
|
200
|
-
function AccordionSection({ heading, body, defaultOpen, isDark }: { heading: string; body: string; defaultOpen: boolean; isDark: boolean }) {
|
|
201
|
-
const [open, setOpen] = useState(defaultOpen);
|
|
202
|
-
const trimmed = body.trim();
|
|
203
|
-
if (!trimmed) return null;
|
|
204
|
-
|
|
205
|
-
return (
|
|
206
|
-
<div style={{ borderBottom: `1px solid ${isDark ? 'rgba(100,120,255,0.06)' : 'rgba(0,0,0,0.05)'}`, marginBottom: '4px' }}>
|
|
207
|
-
<button
|
|
208
|
-
onClick={() => setOpen(!open)}
|
|
209
|
-
style={{
|
|
210
|
-
width: '100%', textAlign: 'left', background: 'none', border: 'none',
|
|
211
|
-
padding: '8px 0', cursor: 'pointer', display: 'flex', alignItems: 'center', gap: '6px',
|
|
212
|
-
}}
|
|
213
|
-
>
|
|
214
|
-
<span style={{
|
|
215
|
-
fontSize: '10px', color: isDark ? '#556' : '#999', transition: 'transform 0.2s',
|
|
216
|
-
transform: open ? 'rotate(90deg)' : 'rotate(0deg)',
|
|
217
|
-
display: 'inline-block',
|
|
218
|
-
}}>
|
|
219
|
-
▶
|
|
220
|
-
</span>
|
|
221
|
-
<span style={{ fontSize: '12px', fontWeight: 600, color: isDark ? '#99a' : '#555' }}>
|
|
222
|
-
{heading}
|
|
223
|
-
</span>
|
|
224
|
-
</button>
|
|
225
|
-
{open && (
|
|
226
|
-
<div style={{ fontSize: '13px', lineHeight: 1.7, color: isDark ? '#b0b0c0' : '#444', paddingBottom: '8px' }}>
|
|
227
|
-
<Markdown>{trimmed}</Markdown>
|
|
228
|
-
</div>
|
|
229
|
-
)}
|
|
230
|
-
</div>
|
|
231
|
-
);
|
|
232
|
-
}
|
|
@@ -1,232 +0,0 @@
|
|
|
1
|
-
// 빛 입자 + 궤적 — 작고 화려한 입자가 부드럽게 이동, 지나간 경로 표시
|
|
2
|
-
|
|
3
|
-
import { useRef } from 'react';
|
|
4
|
-
import { useFrame } from '@react-three/fiber';
|
|
5
|
-
import * as THREE from 'three';
|
|
6
|
-
import { useGraphStore } from '../stores/graph-store.js';
|
|
7
|
-
import { pulseData } from '../hooks/usePulse.js';
|
|
8
|
-
|
|
9
|
-
const TRAIL_LENGTH = 60; // 궤적 점 개수
|
|
10
|
-
|
|
11
|
-
export function PulseAnimator() {
|
|
12
|
-
const coreRef = useRef<THREE.Points>(null);
|
|
13
|
-
const glowRef = useRef<THREE.Points>(null);
|
|
14
|
-
const trailRef = useRef<THREE.Line>(null);
|
|
15
|
-
const theme = useGraphStore((s) => s.theme);
|
|
16
|
-
const isLight = theme === 'light';
|
|
17
|
-
|
|
18
|
-
const stepRef = useRef(0);
|
|
19
|
-
const tRef = useRef(0);
|
|
20
|
-
const litRef = useRef<string[]>([]);
|
|
21
|
-
const flashRef = useRef(0);
|
|
22
|
-
|
|
23
|
-
// 궤적 위치 버퍼 (ring buffer)
|
|
24
|
-
const trailBuf = useRef(new Float32Array(TRAIL_LENGTH * 3));
|
|
25
|
-
const trailHead = useRef(0);
|
|
26
|
-
const trailCount = useRef(0);
|
|
27
|
-
|
|
28
|
-
// 원형 텍스처 (노드와 동일 스타일)
|
|
29
|
-
const texture = useRef<THREE.Texture | null>(null);
|
|
30
|
-
if (!texture.current) {
|
|
31
|
-
const sz = 64;
|
|
32
|
-
const cv = document.createElement('canvas');
|
|
33
|
-
cv.width = sz; cv.height = sz;
|
|
34
|
-
const ctx = cv.getContext('2d')!;
|
|
35
|
-
const g = ctx.createRadialGradient(sz/2, sz/2, 0, sz/2, sz/2, sz/2);
|
|
36
|
-
g.addColorStop(0, 'rgba(255,255,255,1)');
|
|
37
|
-
g.addColorStop(0.2, 'rgba(180,220,255,0.9)');
|
|
38
|
-
g.addColorStop(0.5, 'rgba(100,180,255,0.3)');
|
|
39
|
-
g.addColorStop(1, 'rgba(60,120,255,0)');
|
|
40
|
-
ctx.fillStyle = g;
|
|
41
|
-
ctx.fillRect(0, 0, sz, sz);
|
|
42
|
-
texture.current = new THREE.CanvasTexture(cv);
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
useFrame(() => {
|
|
46
|
-
const core = coreRef.current;
|
|
47
|
-
const glow = glowRef.current;
|
|
48
|
-
const trail = trailRef.current;
|
|
49
|
-
if (!core || !glow || !trail) return;
|
|
50
|
-
|
|
51
|
-
if (!pulseData.running || pulseData.visitOrder.length === 0) {
|
|
52
|
-
core.visible = false;
|
|
53
|
-
glow.visible = false;
|
|
54
|
-
trail.visible = false;
|
|
55
|
-
return;
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
core.visible = true;
|
|
59
|
-
glow.visible = true;
|
|
60
|
-
trail.visible = true;
|
|
61
|
-
|
|
62
|
-
const { visitOrder, positions } = pulseData;
|
|
63
|
-
const step = stepRef.current;
|
|
64
|
-
|
|
65
|
-
if (step >= visitOrder.length - 1) {
|
|
66
|
-
pulseData.running = false;
|
|
67
|
-
core.visible = false;
|
|
68
|
-
glow.visible = false;
|
|
69
|
-
// 탐색 완료 — 하이라이트 3초간 유지 후 해제
|
|
70
|
-
const finalLit = [...litRef.current];
|
|
71
|
-
setTimeout(() => {
|
|
72
|
-
// 아직 같은 하이라이트 상태이면 해제
|
|
73
|
-
const current = useGraphStore.getState().highlightedNodeIds;
|
|
74
|
-
if (finalLit.length > 0 && finalLit.every(id => current.has(id))) {
|
|
75
|
-
useGraphStore.getState().setHighlightedNodes([]);
|
|
76
|
-
}
|
|
77
|
-
useGraphStore.getState().setPulseParticlePos(null);
|
|
78
|
-
stepRef.current = 0;
|
|
79
|
-
tRef.current = 0;
|
|
80
|
-
litRef.current = [];
|
|
81
|
-
trailCount.current = 0;
|
|
82
|
-
if (trail) trail.visible = false;
|
|
83
|
-
}, 3000);
|
|
84
|
-
return;
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
const from = positions.get(visitOrder[step]) ?? [0, 0, 0];
|
|
88
|
-
const to = positions.get(visitOrder[step + 1]) ?? [0, 0, 0];
|
|
89
|
-
|
|
90
|
-
// 부드러운 이동
|
|
91
|
-
tRef.current += 0.03;
|
|
92
|
-
const t = tRef.current;
|
|
93
|
-
const ease = t < 0.5 ? 2 * t * t : 1 - Math.pow(-2 * t + 2, 2) / 2;
|
|
94
|
-
|
|
95
|
-
const x = from[0] + (to[0] - from[0]) * ease;
|
|
96
|
-
const y = from[1] + (to[1] - from[1]) * ease;
|
|
97
|
-
const z = from[2] + (to[2] - from[2]) * ease;
|
|
98
|
-
|
|
99
|
-
// 코어 입자 위치
|
|
100
|
-
const corePos = core.geometry.getAttribute('position') as THREE.BufferAttribute;
|
|
101
|
-
corePos.setXYZ(0, x, y, z);
|
|
102
|
-
corePos.needsUpdate = true;
|
|
103
|
-
|
|
104
|
-
const glowPos = glow.geometry.getAttribute('position') as THREE.BufferAttribute;
|
|
105
|
-
glowPos.setXYZ(0, x, y, z);
|
|
106
|
-
glowPos.needsUpdate = true;
|
|
107
|
-
|
|
108
|
-
// 궤적 기록
|
|
109
|
-
const tb = trailBuf.current;
|
|
110
|
-
const hi = trailHead.current % TRAIL_LENGTH;
|
|
111
|
-
tb[hi * 3] = x;
|
|
112
|
-
tb[hi * 3 + 1] = y;
|
|
113
|
-
tb[hi * 3 + 2] = z;
|
|
114
|
-
trailHead.current++;
|
|
115
|
-
trailCount.current = Math.min(trailCount.current + 1, TRAIL_LENGTH);
|
|
116
|
-
|
|
117
|
-
// 궤적 라인 업데이트
|
|
118
|
-
const trailPos = trail.geometry.getAttribute('position') as THREE.BufferAttribute;
|
|
119
|
-
const count = trailCount.current;
|
|
120
|
-
for (let i = 0; i < TRAIL_LENGTH; i++) {
|
|
121
|
-
if (i < count) {
|
|
122
|
-
const idx = ((trailHead.current - count + i) % TRAIL_LENGTH + TRAIL_LENGTH) % TRAIL_LENGTH;
|
|
123
|
-
trailPos.setXYZ(i, tb[idx * 3], tb[idx * 3 + 1], tb[idx * 3 + 2]);
|
|
124
|
-
} else {
|
|
125
|
-
trailPos.setXYZ(i, x, y, z); // 아직 안 채워진 부분은 현재 위치
|
|
126
|
-
}
|
|
127
|
-
}
|
|
128
|
-
trailPos.needsUpdate = true;
|
|
129
|
-
trail.geometry.setDrawRange(0, count);
|
|
130
|
-
|
|
131
|
-
// 플래시 감쇠
|
|
132
|
-
flashRef.current *= 0.88;
|
|
133
|
-
|
|
134
|
-
// Light mode: 진한 색 + NormalBlending / Dark mode: 밝은 색 + AdditiveBlending
|
|
135
|
-
const currentIsLight = useGraphStore.getState().theme === 'light';
|
|
136
|
-
|
|
137
|
-
// 코어
|
|
138
|
-
const coreMat = core.material as THREE.PointsMaterial;
|
|
139
|
-
coreMat.size = (currentIsLight ? 12 : 8) + flashRef.current * 6;
|
|
140
|
-
coreMat.color.set(currentIsLight ? '#1144cc' : '#ffffff');
|
|
141
|
-
coreMat.blending = currentIsLight ? THREE.NormalBlending : THREE.AdditiveBlending;
|
|
142
|
-
coreMat.opacity = currentIsLight ? 1.0 : 0.95;
|
|
143
|
-
|
|
144
|
-
// 글로우
|
|
145
|
-
const glowMat = glow.material as THREE.PointsMaterial;
|
|
146
|
-
glowMat.size = (currentIsLight ? 28 : 20) + flashRef.current * 15;
|
|
147
|
-
glowMat.opacity = currentIsLight ? (0.3 + flashRef.current * 0.3) : (0.25 + flashRef.current * 0.2);
|
|
148
|
-
glowMat.color.set(currentIsLight ? '#2266dd' : '#66ddff');
|
|
149
|
-
glowMat.blending = currentIsLight ? THREE.NormalBlending : THREE.AdditiveBlending;
|
|
150
|
-
|
|
151
|
-
// 궤적
|
|
152
|
-
const trailMat = trail.material as THREE.LineBasicMaterial;
|
|
153
|
-
trailMat.color.set(currentIsLight ? '#2255bb' : '#44bbff');
|
|
154
|
-
trailMat.opacity = currentIsLight ? 0.5 : 0.25;
|
|
155
|
-
trailMat.blending = currentIsLight ? THREE.NormalBlending : THREE.AdditiveBlending;
|
|
156
|
-
|
|
157
|
-
// 노드 도착
|
|
158
|
-
if (t >= 1) {
|
|
159
|
-
tRef.current = 0;
|
|
160
|
-
stepRef.current++;
|
|
161
|
-
|
|
162
|
-
const arrivedId = visitOrder[Math.min(step + 1, visitOrder.length - 1)];
|
|
163
|
-
if (!litRef.current.includes(arrivedId)) {
|
|
164
|
-
litRef.current.push(arrivedId);
|
|
165
|
-
useGraphStore.getState().setHighlightedNodes([...litRef.current]);
|
|
166
|
-
}
|
|
167
|
-
flashRef.current = 1;
|
|
168
|
-
|
|
169
|
-
// 도착 노드 툴팁 표시 (0.8초 후 자동 해제)
|
|
170
|
-
useGraphStore.getState().hoverNode(arrivedId);
|
|
171
|
-
setTimeout(() => {
|
|
172
|
-
// 아직 같은 노드를 표시 중이면 해제
|
|
173
|
-
if (useGraphStore.getState().hoveredNodeId === arrivedId) {
|
|
174
|
-
useGraphStore.getState().hoverNode(null);
|
|
175
|
-
}
|
|
176
|
-
}, 800);
|
|
177
|
-
}
|
|
178
|
-
});
|
|
179
|
-
|
|
180
|
-
return (
|
|
181
|
-
<group>
|
|
182
|
-
{/* 궤적 라인 — 시안 글로우 */}
|
|
183
|
-
<primitive
|
|
184
|
-
ref={trailRef}
|
|
185
|
-
object={(() => {
|
|
186
|
-
const geo = new THREE.BufferGeometry();
|
|
187
|
-
geo.setAttribute('position', new THREE.Float32BufferAttribute(new Float32Array(TRAIL_LENGTH * 3), 3));
|
|
188
|
-
const mat = new THREE.LineBasicMaterial({
|
|
189
|
-
color: '#44bbff', transparent: true, opacity: 0.25,
|
|
190
|
-
depthWrite: false, blending: THREE.AdditiveBlending,
|
|
191
|
-
});
|
|
192
|
-
return new THREE.Line(geo, mat);
|
|
193
|
-
})()}
|
|
194
|
-
visible={false}
|
|
195
|
-
/>
|
|
196
|
-
|
|
197
|
-
{/* 글로우 (부드러운 빛 번짐) */}
|
|
198
|
-
<points ref={glowRef} visible={false}>
|
|
199
|
-
<bufferGeometry>
|
|
200
|
-
<bufferAttribute attach="attributes-position" args={[new Float32Array(3), 3]} />
|
|
201
|
-
</bufferGeometry>
|
|
202
|
-
<pointsMaterial
|
|
203
|
-
color="#66ddff"
|
|
204
|
-
size={20}
|
|
205
|
-
transparent
|
|
206
|
-
opacity={0.25}
|
|
207
|
-
depthWrite={false}
|
|
208
|
-
blending={THREE.AdditiveBlending}
|
|
209
|
-
sizeAttenuation
|
|
210
|
-
map={texture.current}
|
|
211
|
-
/>
|
|
212
|
-
</points>
|
|
213
|
-
|
|
214
|
-
{/* 코어 (밝은 화이트 점) */}
|
|
215
|
-
<points ref={coreRef} visible={false}>
|
|
216
|
-
<bufferGeometry>
|
|
217
|
-
<bufferAttribute attach="attributes-position" args={[new Float32Array(3), 3]} />
|
|
218
|
-
</bufferGeometry>
|
|
219
|
-
<pointsMaterial
|
|
220
|
-
color="#ffffff"
|
|
221
|
-
size={8}
|
|
222
|
-
transparent
|
|
223
|
-
opacity={0.95}
|
|
224
|
-
depthWrite={false}
|
|
225
|
-
blending={THREE.AdditiveBlending}
|
|
226
|
-
sizeAttenuation
|
|
227
|
-
map={texture.current}
|
|
228
|
-
/>
|
|
229
|
-
</points>
|
|
230
|
-
</group>
|
|
231
|
-
);
|
|
232
|
-
}
|
|
@@ -1,107 +0,0 @@
|
|
|
1
|
-
// 검색바 — 상단 헤더에 통합, 결과 수 표시, 검색 히스토리
|
|
2
|
-
|
|
3
|
-
import { useRef, useState } from 'react';
|
|
4
|
-
import { useSearch } from '../hooks/useSearch.js';
|
|
5
|
-
import { useGraphStore } from '../stores/graph-store.js';
|
|
6
|
-
|
|
7
|
-
export function SearchBar() {
|
|
8
|
-
const inputRef = useRef<HTMLInputElement>(null);
|
|
9
|
-
const { search, clearSearch } = useSearch();
|
|
10
|
-
const query = useGraphStore((s) => s.searchQuery);
|
|
11
|
-
const highlightedCount = useGraphStore((s) => s.highlightedNodeIds.size);
|
|
12
|
-
const searchHistory = useGraphStore((s) => s.searchHistory);
|
|
13
|
-
const clearSearchHistory = useGraphStore((s) => s.clearSearchHistory);
|
|
14
|
-
const theme = useGraphStore((s) => s.theme);
|
|
15
|
-
const isDark = theme === 'dark';
|
|
16
|
-
const [showHistory, setShowHistory] = useState(false);
|
|
17
|
-
|
|
18
|
-
return (
|
|
19
|
-
<div style={{ display: 'flex', alignItems: 'center', gap: '8px' }}>
|
|
20
|
-
<div style={{
|
|
21
|
-
position: 'relative',
|
|
22
|
-
display: 'flex', alignItems: 'center',
|
|
23
|
-
background: isDark ? 'rgba(100, 120, 255, 0.06)' : 'rgba(0, 0, 0, 0.03)',
|
|
24
|
-
border: `1px solid ${isDark ? 'rgba(100, 120, 255, 0.15)' : 'rgba(0, 0, 0, 0.1)'}`,
|
|
25
|
-
borderRadius: '6px', padding: '0 10px',
|
|
26
|
-
}}>
|
|
27
|
-
<span style={{ fontSize: '12px', color: isDark ? '#556' : '#999', marginRight: '6px' }}>
|
|
28
|
-
{'\u{1F50D}'}
|
|
29
|
-
</span>
|
|
30
|
-
<input
|
|
31
|
-
ref={inputRef}
|
|
32
|
-
type="text"
|
|
33
|
-
placeholder="Search knowledge..."
|
|
34
|
-
value={query}
|
|
35
|
-
onChange={(e) => search(e.target.value)}
|
|
36
|
-
onFocus={() => setShowHistory(true)}
|
|
37
|
-
onBlur={() => setTimeout(() => setShowHistory(false), 200)}
|
|
38
|
-
onKeyDown={(e) => { if (e.key === 'Escape') { clearSearch(); setShowHistory(false); inputRef.current?.blur(); } }}
|
|
39
|
-
style={{
|
|
40
|
-
background: 'transparent', border: 'none', outline: 'none',
|
|
41
|
-
color: isDark ? '#c0c0f0' : '#2a2a4a',
|
|
42
|
-
fontSize: '12px', padding: '5px 0',
|
|
43
|
-
width: '160px',
|
|
44
|
-
}}
|
|
45
|
-
/>
|
|
46
|
-
{query && (
|
|
47
|
-
<button
|
|
48
|
-
onClick={clearSearch}
|
|
49
|
-
style={{
|
|
50
|
-
background: 'none', border: 'none',
|
|
51
|
-
color: isDark ? '#556' : '#999',
|
|
52
|
-
cursor: 'pointer', fontSize: '12px', padding: '0 2px',
|
|
53
|
-
}}
|
|
54
|
-
>
|
|
55
|
-
x
|
|
56
|
-
</button>
|
|
57
|
-
)}
|
|
58
|
-
|
|
59
|
-
{/* 검색 히스토리 드롭다운 */}
|
|
60
|
-
{showHistory && !query && searchHistory.length > 0 && (
|
|
61
|
-
<div style={{
|
|
62
|
-
position: 'absolute', top: '100%', left: 0, marginTop: '4px',
|
|
63
|
-
background: isDark ? 'rgba(10,10,20,0.95)' : 'rgba(255,255,255,0.97)',
|
|
64
|
-
border: `1px solid ${isDark ? 'rgba(100,120,255,0.15)' : 'rgba(0,0,0,0.1)'}`,
|
|
65
|
-
borderRadius: '8px', padding: '4px', minWidth: '220px',
|
|
66
|
-
backdropFilter: 'blur(8px)', zIndex: 100,
|
|
67
|
-
boxShadow: isDark ? 'none' : '0 4px 16px rgba(0,0,0,0.08)',
|
|
68
|
-
}}>
|
|
69
|
-
<div style={{ display: 'flex', justifyContent: 'space-between', padding: '2px 6px', marginBottom: '2px' }}>
|
|
70
|
-
<span style={{ fontSize: '9px', color: isDark ? '#556' : '#999', textTransform: 'uppercase', letterSpacing: '0.5px' }}>
|
|
71
|
-
Recent
|
|
72
|
-
</span>
|
|
73
|
-
<button
|
|
74
|
-
onMouseDown={(e) => { e.preventDefault(); clearSearchHistory(); }}
|
|
75
|
-
style={{
|
|
76
|
-
fontSize: '9px', color: isDark ? '#556' : '#999', background: 'none', border: 'none',
|
|
77
|
-
cursor: 'pointer', textDecoration: 'underline',
|
|
78
|
-
}}
|
|
79
|
-
>
|
|
80
|
-
Clear
|
|
81
|
-
</button>
|
|
82
|
-
</div>
|
|
83
|
-
{searchHistory.slice(0, 10).map((q) => (
|
|
84
|
-
<div
|
|
85
|
-
key={q}
|
|
86
|
-
onMouseDown={(e) => { e.preventDefault(); search(q); setShowHistory(false); }}
|
|
87
|
-
style={{
|
|
88
|
-
padding: '4px 8px', fontSize: '11px', cursor: 'pointer', borderRadius: '4px',
|
|
89
|
-
color: isDark ? '#aab' : '#444',
|
|
90
|
-
}}
|
|
91
|
-
onMouseEnter={(e) => { (e.target as HTMLElement).style.background = isDark ? 'rgba(100,120,255,0.1)' : 'rgba(0,0,0,0.04)'; }}
|
|
92
|
-
onMouseLeave={(e) => { (e.target as HTMLElement).style.background = 'transparent'; }}
|
|
93
|
-
>
|
|
94
|
-
{q}
|
|
95
|
-
</div>
|
|
96
|
-
))}
|
|
97
|
-
</div>
|
|
98
|
-
)}
|
|
99
|
-
</div>
|
|
100
|
-
{query && highlightedCount > 0 && (
|
|
101
|
-
<span style={{ fontSize: '11px', color: isDark ? '#88aaff' : '#5577cc' }}>
|
|
102
|
-
{highlightedCount} found
|
|
103
|
-
</span>
|
|
104
|
-
)}
|
|
105
|
-
</div>
|
|
106
|
-
);
|
|
107
|
-
}
|