This commit is contained in:
Michael Zhang 2024-03-10 11:39:09 -07:00
parent 1b4e74485b
commit b7cad16044
6 changed files with 152 additions and 5 deletions

1
.tokeignore Normal file
View file

@ -0,0 +1 @@
pnpm-lock.yaml

136
src-tauri/Cargo.lock generated
View file

@ -329,6 +329,52 @@ version = "1.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa"
[[package]]
name = "automerge"
version = "0.5.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c059747d9ef133802da22926ea54039de90f85b349a920f16a6d1573da0f2580"
dependencies = [
"flate2",
"fxhash",
"hex",
"im",
"itertools 0.12.1",
"leb128",
"serde",
"sha2",
"smol_str",
"thiserror",
"tinyvec",
"tracing",
"unicode-segmentation",
"uuid",
]
[[package]]
name = "autosurgeon"
version = "0.8.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "92812a868b2b92cfdb7580e99b17a85c92f5cffc14f2b549d098dad115e4e59c"
dependencies = [
"automerge",
"autosurgeon-derive",
"similar",
"thiserror",
]
[[package]]
name = "autosurgeon-derive"
version = "0.8.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "fc29f8d0e1a775161058f84a0c79d95cdaae4a7981822a5924bbab73dbc76c93"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.48",
"thiserror",
]
[[package]]
name = "backtrace"
version = "0.3.69"
@ -383,6 +429,15 @@ dependencies = [
"serde",
]
[[package]]
name = "bitmaps"
version = "2.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "031043d04099746d8db04daf1fa424b2bc8bd69d92b25962dcde24da39ab64a2"
dependencies = [
"typenum",
]
[[package]]
name = "block"
version = "0.1.6"
@ -435,6 +490,17 @@ dependencies = [
"alloc-stdlib",
]
[[package]]
name = "bstr"
version = "0.2.17"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ba3569f383e8f1598449f1a423e72e99569137b47740b1da11ef19af3d5c3223"
dependencies = [
"lazy_static",
"memchr",
"regex-automata 0.1.10",
]
[[package]]
name = "bumpalo"
version = "3.14.0"
@ -761,7 +827,7 @@ dependencies = [
"env_logger",
"fast2s",
"graph",
"itertools",
"itertools 0.11.0",
"jieba-rs",
"lazy_static",
"log",
@ -2049,6 +2115,20 @@ dependencies = [
"unicode-normalization",
]
[[package]]
name = "im"
version = "15.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d0acd33ff0285af998aaf9b57342af478078f53492322fafc47450e09397e0e9"
dependencies = [
"bitmaps",
"rand_core 0.6.4",
"rand_xoshiro",
"sized-chunks",
"typenum",
"version_check",
]
[[package]]
name = "image"
version = "0.24.7"
@ -2170,6 +2250,15 @@ dependencies = [
"either",
]
[[package]]
name = "itertools"
version = "0.12.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ba291022dbbd398a455acf126c1e341954079855bc60dfdda641363bd6922569"
dependencies = [
"either",
]
[[package]]
name = "itoa"
version = "0.4.8"
@ -2293,6 +2382,12 @@ version = "1.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646"
[[package]]
name = "leb128"
version = "0.2.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "884e2677b40cc8c339eaefcb701c32ef1fd2493d71118dc0ca4b6a736c93bd67"
[[package]]
name = "libappindicator"
version = "0.9.0"
@ -2956,6 +3051,7 @@ dependencies = [
name = "panorama"
version = "0.0.0"
dependencies = [
"autosurgeon",
"cozo",
"dirs",
"eyre",
@ -3489,6 +3585,15 @@ dependencies = [
"rand_core 0.5.1",
]
[[package]]
name = "rand_xoshiro"
version = "0.6.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6f97cdb2a36ed4183de61b2f824cc45c9f1037f28afe0a322e9fff4c108b5aaa"
dependencies = [
"rand_core 0.6.4",
]
[[package]]
name = "raw-window-handle"
version = "0.5.2"
@ -4018,12 +4123,32 @@ version = "0.3.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d66dc143e6b11c1eddc06d5c423cfc97062865baf299914ab64caa38182078fe"
[[package]]
name = "similar"
version = "2.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "32fea41aca09ee824cc9724996433064c89f7777e60762749a4170a14abbfa21"
dependencies = [
"bstr",
"unicode-segmentation",
]
[[package]]
name = "siphasher"
version = "0.3.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "38b58827f4464d87d377d175e90bf58eb00fd8716ff0a62f80356b5e61555d0d"
[[package]]
name = "sized-chunks"
version = "0.6.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "16d69225bde7a69b235da73377861095455d298f2b970996eec25ddbb42b3d1e"
dependencies = [
"bitmaps",
"typenum",
]
[[package]]
name = "slab"
version = "0.4.9"
@ -4060,6 +4185,15 @@ version = "0.3.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b7c388c1b5e93756d0c740965c41e8822f866621d41acbdf6336a6a168f8840c"
[[package]]
name = "smol_str"
version = "0.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e6845563ada680337a52d43bb0b29f396f2d911616f6573012645b9e3d048a49"
dependencies = [
"serde",
]
[[package]]
name = "socket2"
version = "0.4.10"

View file

@ -25,6 +25,7 @@ cozo = { version = "0.7.5", features = ["storage-rocksdb"] }
dirs = "5.0.1"
eyre = "0.6.12"
miette = { version = "5.10.0", features = ["backtrace", "fancy", "is-terminal", "serde"] }
autosurgeon = "0.8.3"
[features]
# this feature is used for production builds or when `devPath` points to the filesystem

View file

@ -2,5 +2,5 @@
#![cfg_attr(not(debug_assertions), windows_subsystem = "windows")]
fn main() {
panorama_lib::run()
panorama_lib::run()
}

View file

@ -1,12 +1,19 @@
import NodeContainer from "./components/NodeContainer";
import Sidebar from "./components/Sidebar";
import styles from "./App.module.scss";
import { createSignal } from "solid-js";
function App() {
const [getFocusedNodeId, setFocusedNodeId] = createSignal<string | null>(
null,
);
const focusedNodeId = getFocusedNodeId();
return (
<div class={styles.container}>
<Sidebar />
<NodeContainer />
{focusedNodeId !== null && <NodeContainer id={focusedNodeId} />}
</div>
);
}

View file

@ -1,3 +1,7 @@
export default function NodeContainer({}) {
return <></>;
export interface NodeContainerProps {
id: string;
}
export default function NodeContainer({ id }: NodeContainerProps) {
return <>{id}</>;
}