diff --git a/Cargo.lock b/Cargo.lock index 4c8f180..b61c107 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -202,6 +202,12 @@ version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" +[[package]] +name = "bytes" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a2bd12c1caf447e69cd4528f47f94d203fd2582878ecb9e9465484c4148a8223" + [[package]] name = "camino" version = "1.1.6" @@ -389,9 +395,9 @@ dependencies = [ [[package]] name = "crossbeam-deque" -version = "0.8.3" +version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce6fd6f855243022dcecf8702fef0c297d4338e226845fe067f6341ad9fa0cef" +checksum = "fca89a0e215bab21874660c67903c5f143333cab1da83d041c7ded6053774751" dependencies = [ "cfg-if 1.0.0", "crossbeam-epoch", @@ -400,22 +406,21 @@ dependencies = [ [[package]] name = "crossbeam-epoch" -version = "0.9.15" +version = "0.9.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae211234986c545741a7dc064309f67ee1e5ad243d0e48335adc0484d960bcc7" +checksum = "2d2fe95351b870527a5d09bf563ed3c97c0cffb87cf1c78a591bf48bb218d9aa" dependencies = [ "autocfg", "cfg-if 1.0.0", "crossbeam-utils", "memoffset 0.9.0", - "scopeguard", ] [[package]] name = "crossbeam-utils" -version = "0.8.16" +version = "0.8.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a22b2d63d4d1dc0b7f1b6b2747dd0088008a9be28b6ddf0b1e7d335e3037294" +checksum = "c06d96137f14f244c37f989d9fff8f95e6c18b918e71f36638f8c49112e4c78f" dependencies = [ "cfg-if 1.0.0", ] @@ -474,7 +479,7 @@ dependencies = [ "ident_case", "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.41", ] [[package]] @@ -496,7 +501,7 @@ checksum = "836a9bbc7ad63342d6d6e7b815ccab164bc77a2d95d84bc3117a8c0d5c98e2d5" dependencies = [ "darling_core 0.20.3", "quote", - "syn 2.0.39", + "syn 2.0.41", ] [[package]] @@ -583,7 +588,7 @@ dependencies = [ "darling 0.20.3", "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.41", ] [[package]] @@ -682,7 +687,7 @@ checksum = "53b153fd91e4b0147f4aced87be237c98248656bb01050b96bf3ee89220a8ddb" dependencies = [ "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.41", ] [[package]] @@ -813,7 +818,7 @@ dependencies = [ [[package]] name = "hc_zome_syn_coordinator" version = "0.1.0" -source = "git+https://github.com/holochain/syn?branch=develop#f04b2e23d1e614bab5dee194a8142b89a3d16b8d" +source = "git+https://github.com/holochain/syn?branch=main#cc0b6154ebb623a7f3ae5851519418e39cf9d228" dependencies = [ "derive_more", "hc_zome_syn_integrity", @@ -825,7 +830,7 @@ dependencies = [ [[package]] name = "hc_zome_syn_integrity" version = "0.1.0" -source = "git+https://github.com/holochain/syn?branch=develop#f04b2e23d1e614bab5dee194a8142b89a3d16b8d" +source = "git+https://github.com/holochain/syn?branch=main#cc0b6154ebb623a7f3ae5851519418e39cf9d228" dependencies = [ "derive_more", "hdi", @@ -834,9 +839,9 @@ dependencies = [ [[package]] name = "hdi" -version = "0.3.3" +version = "0.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6568919485f54572855a9f7629f2814d11d76f8f5affa848bae2f426d0634c22" +checksum = "433896b20fa55c3b571567d0a8904be61f71c91eb49f6cdeef338ac8598e3e2b" dependencies = [ "hdk_derive", "holo_hash", @@ -851,9 +856,9 @@ dependencies = [ [[package]] name = "hdk" -version = "0.2.3" +version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff843e6ee200443fcfe4a9a1008386fac5bb41b1a36764b61ade96769a84b38c" +checksum = "32b49aec7019a737dc1104814edd970315954f477f4508e317f7cc10938ffa36" dependencies = [ "getrandom", "hdi", @@ -871,9 +876,9 @@ dependencies = [ [[package]] name = "hdk_derive" -version = "0.2.3" +version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d773202681553c81ee86b4fc0d9c865cb8839bf936a3c55030e796a789069736" +checksum = "bf3dfc8932e6668d5a93a1a2d678977fb32acb92c5a4bdbd48beafba32af570d" dependencies = [ "darling 0.14.4", "heck", @@ -905,9 +910,9 @@ checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" [[package]] name = "holo_hash" -version = "0.2.3" +version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9756c43b8162a6bc08d04922fc6efe05669e9663a505f0cf84e77e96ad330baf" +checksum = "25fb90402dbfcf179f2f96a8dc247bde1d86ccf4ed2ecbbe7fe34446027e30fd" dependencies = [ "base64", "blake2b_simd", @@ -923,9 +928,9 @@ dependencies = [ [[package]] name = "holochain_integrity_types" -version = "0.2.3" +version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a3c4a6e37dc8cbeac95a3e1a1eaf64d7c616b82431944115183cbf9c9aeead90" +checksum = "294ba29e9e11b31137544f07d51c1b132dd336fbb7ca5b6ce33ca6619e416189" dependencies = [ "holo_hash", "holochain_serialized_bytes", @@ -966,9 +971,9 @@ dependencies = [ [[package]] name = "holochain_util" -version = "0.2.3" +version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc771b636f31071efee6840b421c9fafe8bbe16559e62fa72f859803fb1aaf74" +checksum = "a19dfedf84953843a45ebbe273b59daabb444146e98499f136c3b2bfb2fc3d5d" dependencies = [ "cfg-if 0.1.10", "derive_more", @@ -1009,9 +1014,9 @@ dependencies = [ [[package]] name = "holochain_zome_types" -version = "0.2.3" +version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e65e6e564fbea4eb006a59fb3a75133f42661753f953b32641d0d433bb226174" +checksum = "2c0366fdc03fd8cad948456579183124b2778be4b5e21230ceb221dc4818523e" dependencies = [ "holo_hash", "holochain_integrity_types", @@ -1019,7 +1024,6 @@ dependencies = [ "holochain_wasmer_common", "kitsune_p2p_bin_data", "kitsune_p2p_block", - "kitsune_p2p_dht", "kitsune_p2p_timestamp", "paste", "serde", @@ -1031,11 +1035,11 @@ dependencies = [ [[package]] name = "home" -version = "0.5.5" +version = "0.5.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5444c27eef6923071f7ebcc33e3444508466a76f7a2b93da00ed6e19f30c1ddb" +checksum = "e3d1354bf6b7235cb4a0576c2619fd4ed18183f689b12b006a0ee7329eeff9a5" dependencies = [ - "windows-sys 0.48.0", + "windows-sys 0.52.0", ] [[package]] @@ -1096,9 +1100,9 @@ dependencies = [ [[package]] name = "intervallum" -version = "1.4.0" +version = "1.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c8ccecd834666f695ecec3ff0d5fc32e32c91abea91a28fd0aceb4b35a82cee1" +checksum = "18bfda24d3930aa647f90044d5ef87d0c8120f13b86b2d60e8aade66e656e659" dependencies = [ "bit-set", "gcollections", @@ -1138,9 +1142,9 @@ dependencies = [ [[package]] name = "itoa" -version = "1.0.9" +version = "1.0.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af150ab688ff2122fcef229be89cb50dd66af9e01a4ff320cc137eecc9bacc38" +checksum = "b1a46d1a171d865aa5f83f92695765caa047a9b4cbae2cbf37dbd613a793fd4c" [[package]] name = "js-sys" @@ -1153,9 +1157,9 @@ dependencies = [ [[package]] name = "kitsune_p2p_bin_data" -version = "0.2.3" +version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0a581c9c6e762a2fde360641e162e9c1384d6c508ad4da9d59ff902003262ebc" +checksum = "26a444a4508397be02027442fa3bc106db8a8ff79a02e680a652146ef07802aa" dependencies = [ "base64", "derive_more", @@ -1168,9 +1172,9 @@ dependencies = [ [[package]] name = "kitsune_p2p_block" -version = "0.2.3" +version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f4aa00dd7253f936aaee72e494db3de81dac9a051f768827e8bedb91a324763" +checksum = "c49c5cde7b3a68e0c8759a4be3820af90a0e79d5697254538d183823ecada823" dependencies = [ "kitsune_p2p_bin_data", "kitsune_p2p_timestamp", @@ -1180,9 +1184,9 @@ dependencies = [ [[package]] name = "kitsune_p2p_dht" -version = "0.2.3" +version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1646c207ebd2477468fe7f1fb65ae8d79cf51d88a6048926baeda66568930f92" +checksum = "ea8a9866ba8cb51f443aeda15646d0cc6ea35eac7dc82e2ca3e101e2089ed109" dependencies = [ "colored", "derivative", @@ -1204,9 +1208,9 @@ dependencies = [ [[package]] name = "kitsune_p2p_dht_arc" -version = "0.2.3" +version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "062325e9bc7110fe96057f8e221b073d9a2975681e832d0951c8c84aec310519" +checksum = "c6ab2c05e469ccade1e6a3f50138998148ff25330d83a4a334516fd0daec35c7" dependencies = [ "derive_more", "gcollections", @@ -1217,9 +1221,9 @@ dependencies = [ [[package]] name = "kitsune_p2p_timestamp" -version = "0.2.3" +version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41451ee2b505c4b489e5f23e098ad423d477d2e40b01ea7b93b17a1887407592" +checksum = "8f1b199e027c58d7cd55530431dddbdfe622258fda3e9aa0b61b4e938fcf463d" dependencies = [ "chrono", "derive_more", @@ -1240,9 +1244,9 @@ checksum = "884e2677b40cc8c339eaefcb701c32ef1fd2493d71118dc0ca4b6a736c93bd67" [[package]] name = "libc" -version = "0.2.150" +version = "0.2.151" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89d92a4743f9a61002fae18374ed11e7973f530cb3a3255fb354818118b2203c" +checksum = "302d7ab3130588088d277783b1e2d2e10c9e9e4a16dd9050e6ec93fb3e7048f4" [[package]] name = "libloading" @@ -1482,9 +1486,9 @@ dependencies = [ [[package]] name = "once_cell" -version = "1.18.0" +version = "1.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd8b5dd2ae5ed71462c540258bedcb51965123ad7e7ccf4b9a8cafaa4a63576d" +checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" [[package]] name = "parking_lot" @@ -1764,12 +1768,13 @@ dependencies = [ [[package]] name = "rkyv" -version = "0.7.42" +version = "0.7.43" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0200c8230b013893c0b2d6213d6ec64ed2b9be2e0e016682b7224ff82cff5c58" +checksum = "527a97cdfef66f65998b5f3b637c26f5a5ec09cc52a3f9932313ac645f4190f5" dependencies = [ "bitvec", "bytecheck", + "bytes", "hashbrown 0.12.3", "ptr_meta", "rend", @@ -1781,9 +1786,9 @@ dependencies = [ [[package]] name = "rkyv_derive" -version = "0.7.42" +version = "0.7.43" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2e06b915b5c230a17d7a736d1e2e63ee753c256a8614ef3f5147b13a4f5541d" +checksum = "b5c462a1328c8e67e4d6dbad1eb0355dd43e8ab432c6e227a43657f16ade5033" dependencies = [ "proc-macro2", "quote", @@ -1835,9 +1840,9 @@ dependencies = [ [[package]] name = "rustix" -version = "0.38.26" +version = "0.38.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9470c4bf8246c8daf25f9598dca807fb6510347b1e1cfa55749113850c79d88a" +checksum = "72e572a5e8ca657d7366229cdde4bd14c4eb5499a9573d4d366fe1b599daa316" dependencies = [ "bitflags 2.4.1", "errno", @@ -1854,9 +1859,9 @@ checksum = "7ffc183a10b4478d04cbbbfc96d0873219d962dd5accaff2ffbd4ceb7df837f4" [[package]] name = "ryu" -version = "1.0.15" +version = "1.0.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ad4cc8da4ef723ed60bced201181d83791ad433213d8c24efffda1eec85d741" +checksum = "f98d2aa92eebf49b69786be48e4477826b256916e84a57ff2a4f21923b48eb4c" [[package]] name = "same-file" @@ -1941,7 +1946,7 @@ checksum = "5dd83d6dde2b6b2d466e14d9d1acce8816dedee94f735eac6395808b3483c6d6" dependencies = [ "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.41", ] [[package]] @@ -2087,9 +2092,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.39" +version = "2.0.41" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23e78b90f2fcf45d3e842032ce32e3f2d1545ba6636271dcbf24fa306d87be7a" +checksum = "44c8b28c477cc3bf0e7966561e3460130e1255f7a1cf71931075f1c5e7a7e269" dependencies = [ "proc-macro2", "quote", @@ -2187,22 +2192,22 @@ dependencies = [ [[package]] name = "thiserror" -version = "1.0.50" +version = "1.0.51" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f9a7210f5c9a7156bb50aa36aed4c95afb51df0df00713949448cf9e97d382d2" +checksum = "f11c217e1416d6f036b870f14e0413d480dbf28edbee1f877abaf0206af43bb7" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.50" +version = "1.0.51" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "266b2e40bc00e5a6c09c3584011e08b06f123c00362c92b975ba9843aaaa14b8" +checksum = "01742297787513b79cf8e29d1056ede1313e2420b7b3b15d0a768b4921f549df" dependencies = [ "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.41", ] [[package]] @@ -2253,7 +2258,7 @@ checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.41", ] [[package]] @@ -2362,7 +2367,7 @@ dependencies = [ "once_cell", "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.41", "wasm-bindgen-shared", ] @@ -2384,7 +2389,7 @@ checksum = "f0eb82fcb7930ae6219a7ecfd55b217f5f0893484b7a13022ebb2b2bf20b5283" dependencies = [ "proc-macro2", "quote", - "syn 2.0.39", + "syn 2.0.41", "wasm-bindgen-backend", "wasm-bindgen-shared", ] diff --git a/dnas/kando/zomes/coordinator/syn/Cargo.toml b/dnas/kando/zomes/coordinator/syn/Cargo.toml index 7b2e407..570a8ac 100644 --- a/dnas/kando/zomes/coordinator/syn/Cargo.toml +++ b/dnas/kando/zomes/coordinator/syn/Cargo.toml @@ -12,4 +12,4 @@ name = "syn" #derive_more = "0" #serde = { workspace = true } -hc_zome_syn_coordinator = {git = "https://github.com/holochain/syn", branch = "develop"} +hc_zome_syn_coordinator = {git = "https://github.com/holochain/syn", branch = "main"} diff --git a/dnas/kando/zomes/integrity/syn/Cargo.toml b/dnas/kando/zomes/integrity/syn/Cargo.toml index 32292dc..c2a0e04 100644 --- a/dnas/kando/zomes/integrity/syn/Cargo.toml +++ b/dnas/kando/zomes/integrity/syn/Cargo.toml @@ -12,4 +12,4 @@ name = "syn_integrity" #derive_more = "0" #serde = { workspace = true } -hc_zome_syn_integrity = {git = "https://github.com/holochain/syn", branch = "develop"} +hc_zome_syn_integrity = {git = "https://github.com/holochain/syn", branch = "main"} diff --git a/package-lock.json b/package-lock.json index a3aa5ce..8f4336c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -143,9 +143,9 @@ "integrity": "sha512-Dn5pTV/m3XaK1Zvq3liw/vQUt7goM7Y84x2zUyH8cb9CNMs4kPCNHs3kalbJZ/ymzFvwcdiLwwNW8AKk+WWN5A==" }, "node_modules/@holochain-open-dev/stores": { - "version": "0.8.5", - "resolved": "https://registry.npmjs.org/@holochain-open-dev/stores/-/stores-0.8.5.tgz", - "integrity": "sha512-lTLup1M1p4Uf2Q15LNeGN7NWBb7Xk+I8ltYZGCzPXbxBE/cwebfisa6PpyfCUuoppX+eYVDtK1cLjY/lbliz1w==", + "version": "0.8.9", + "resolved": "https://registry.npmjs.org/@holochain-open-dev/stores/-/stores-0.8.9.tgz", + "integrity": "sha512-Au7mAL0ZIZbeH8MFZFky12wo3UXsUX+3LO3+LydzJBqw9jqtm7epM4kr5lQZfivkm0tMtAXpYWi/lBqd14wI1w==", "dependencies": { "@alenaksu/json-viewer": "^2.0.1", "@holochain-open-dev/utils": "^0.16.2", @@ -289,9 +289,9 @@ } }, "node_modules/@holochain-syn/client": { - "version": "0.9.0", - "resolved": "https://registry.npmjs.org/@holochain-syn/client/-/client-0.9.0.tgz", - "integrity": "sha512-5EEAWMu5jcJK45/utrA3RdJv4aLIzaisSlVAI3bz8gbakzvTpV6XE7zRnTcwUbWEcZzsXS97WhG95BJj8pVEYw==", + "version": "0.11.0", + "resolved": "https://registry.npmjs.org/@holochain-syn/client/-/client-0.11.0.tgz", + "integrity": "sha512-sWSllrtDznqJIO6dk7KCj1acobNkPeAN8OUae2OjUsqT2n2cIiTdfzR6yLh5dn8gX+iwnCPSybVVVs0dTeklCg==", "dependencies": { "@holochain-open-dev/utils": "^0.16.3", "@holochain/client": "^0.16.1", @@ -320,16 +320,16 @@ } }, "node_modules/@holochain-syn/core": { - "version": "0.10.0", - "resolved": "https://registry.npmjs.org/@holochain-syn/core/-/core-0.10.0.tgz", - "integrity": "sha512-oOXQeDqTdeE8g8+HN187harQ506gE9be+vq0qep/1mNbjPztjtOjigOpVmDVvX+1w4DRdn509c9IAOqyQuOn6w==", + "version": "0.12.0", + "resolved": "https://registry.npmjs.org/@holochain-syn/core/-/core-0.12.0.tgz", + "integrity": "sha512-Z+UCiFfw3r1r3Hv3HvIyEJbf3mQnMiAcHxzxO59qwpIjGDu8R/KoFRvnd0PScLX5IJeGiulCXuqk+XmqgZc3yg==", "dependencies": { "@holochain-open-dev/elements": "^0.8.0", "@holochain-open-dev/profiles": "^0.17.3", "@holochain-open-dev/stores": "^0.8.3", "@holochain-open-dev/utils": "^0.16.0", - "@holochain-syn/client": "^0.9.0", - "@holochain-syn/store": "^0.9.0", + "@holochain-syn/client": "^0.11.0", + "@holochain-syn/store": "^0.11.0", "@holochain/client": "^0.16.0", "@lit/context": "^1.0.0", "@lit/localize": "^0.12.0", @@ -504,19 +504,30 @@ } }, "node_modules/@holochain-syn/store": { - "version": "0.9.0", - "resolved": "https://registry.npmjs.org/@holochain-syn/store/-/store-0.9.0.tgz", - "integrity": "sha512-cRYqAskiItNY+W8lRnLqvTaaFyDXhBwFLIq5kk67bJ4sXemhOYvMAGp4tQ/F54Q5u7PZ8iGpUc/BMyjuhV4uBw==", + "version": "0.11.0", + "resolved": "https://registry.npmjs.org/@holochain-syn/store/-/store-0.11.0.tgz", + "integrity": "sha512-lq+sEL3t3U7l1bR5I28iuFTQs9REJiIWJiEbcykqzfuUzAC0pI1zZJXa8tqvDr46j3Gx/fgDlZj5Y9WTdbZdPQ==", "dependencies": { - "@holochain-open-dev/stores": "^0.8.3", + "@holochain-open-dev/stores": "^0.8.9", "@holochain-open-dev/utils": "^0.16.3", - "@holochain-syn/client": "^0.9.0", + "@holochain-syn/client": "^0.10.0", "@holochain/client": "^0.16.1", "@msgpack/msgpack": "^2.7.2", "automerge": "^1.0.1-preview.7", "lodash-es": "^4.17.21" } }, + "node_modules/@holochain-syn/store/node_modules/@holochain-syn/client": { + "version": "0.10.0", + "resolved": "https://registry.npmjs.org/@holochain-syn/client/-/client-0.10.0.tgz", + "integrity": "sha512-j5RVuV84B/XBXJJVgyT1Y9tl/2602aVgm8mbP4VGzoO27GsPwb/TD1yK2SYBQkTMwKrMc4QBVRUHjBv73TTg3Q==", + "dependencies": { + "@holochain-open-dev/utils": "^0.16.3", + "@holochain/client": "^0.16.1", + "@msgpack/msgpack": "^2.7.0", + "automerge": "^1.0.1-preview.7" + } + }, "node_modules/@holochain-syn/store/node_modules/@holochain/client": { "version": "0.16.7", "resolved": "https://registry.npmjs.org/@holochain/client/-/client-0.16.7.tgz", @@ -11876,7 +11887,7 @@ "@holochain-open-dev/profiles": "^0.17.3", "@holochain-open-dev/stores": "^0.8.5", "@holochain-open-dev/utils": "^0.16.3", - "@holochain-syn/core": "^0.10.0", + "@holochain-syn/core": "^0.12.0", "@holochain/client": "^0.16.7", "@lightningrodlabs/we-applet": "^0.12.2", "@mdi/js": "^7.1.96", diff --git a/ui/package.json b/ui/package.json index a6031db..19313fe 100644 --- a/ui/package.json +++ b/ui/package.json @@ -16,7 +16,7 @@ "@holochain-open-dev/profiles": "^0.17.3", "@holochain-open-dev/stores": "^0.8.5", "@holochain-open-dev/utils": "^0.16.3", - "@holochain-syn/core": "^0.10.0", + "@holochain-syn/core": "^0.12.0", "@holochain/client": "^0.16.7", "@lightningrodlabs/we-applet": "^0.12.2", "@mdi/js": "^7.1.96", diff --git a/ui/src/AboutDialog.svelte b/ui/src/AboutDialog.svelte index c7bb260..613b02c 100644 --- a/ui/src/AboutDialog.svelte +++ b/ui/src/AboutDialog.svelte @@ -5,7 +5,7 @@ import type { KanDoStore } from "./store"; import {asyncDerived, toPromise} from '@holochain-open-dev/stores' import { BoardType } from "./boardList"; - import { boardGrammar, Board, type BoardState } from "./board"; + import type { Board, BoardState } from "./board"; import { deserializeExport, exportBoards } from "./export"; import { DocumentStore, WorkspaceStore } from "@holochain-syn/core"; import { encodeHashToBase64 } from "@holochain/client"; @@ -51,7 +51,7 @@ exporting = true const hashes = await toPromise(asyncDerived(store.synStore.documentsByTag.get(BoardType.active),x=>Array.from(x.keys()))) - const docs = hashes.map(hash=>new DocumentStore(store.synStore, boardGrammar, hash)) + const docs = hashes.map(hash=>new DocumentStore(store.synStore, hash)) for (const docStore of docs) { try { const workspaces = await toPromise(docStore.allWorkspaces) @@ -69,7 +69,7 @@ - +

KanDo! is a demonstration Holochain app built by the Holochain Foundation.

Developers: diff --git a/ui/src/board.ts b/ui/src/board.ts index 514652a..124ff30 100644 --- a/ui/src/board.ts +++ b/ui/src/board.ts @@ -1,4 +1,4 @@ -import { DocumentStore, type SessionStore, type SynGrammar, WorkspaceStore, type SynStore } from "@holochain-syn/core"; +import type { DocumentStore, SessionStore, WorkspaceStore, SynStore } from "@holochain-syn/core"; import { get, type Readable } from "svelte/store"; import { v1 as uuidv1 } from "uuid"; import { type AgentPubKey, type EntryHash, type EntryHashB64, encodeHashToBase64, type AgentPubKeyB64, type Timestamp } from "@holochain/client"; @@ -67,6 +67,8 @@ export type BoardProps = { bgUrl: string, } +export type BoardEphemeralState = { [key: string]: string }; + export interface BoardState { status: string; name: string; @@ -167,11 +169,6 @@ export interface BoardState { id: string; }; - export type BoardGrammar = SynGrammar< - BoardDelta, - BoardState - >; - const _removeCardFromGroups = (state: BoardState, cardId: uuidv1) => { _initGrouping(state) // remove the item from the group it's in @@ -233,16 +230,19 @@ export interface BoardState { }) } - export const boardGrammar: BoardGrammar = { - initState(state) { - state.status = "" - state.name = "untitled" - state.groups = [{id:UngroupedId, name:""}] - state.cards = [] - state.labelDefs = [] - state.categoryDefs = [] - state.props = {bgUrl:""} + export const boardGrammar = { + initialState() { + const state = { + status: "", + name: "untitled", + groups: [{id:UngroupedId, name:""}], + cards: [], + labelDefs: [], + categoryDefs: [], + props: {bgUrl:""}, + } _initGrouping(state) + return state }, applyDelta( delta: BoardDelta, @@ -383,24 +383,24 @@ export type BoardStateData = { } export class Board { - public session: SessionStore | undefined + public session: SessionStore | undefined public hashB64: EntryHashB64 - constructor(public document: DocumentStore, public workspace: WorkspaceStore) { + constructor(public document: DocumentStore, public workspace: WorkspaceStore) { this.hashB64 = encodeHashToBase64(this.document.documentHash) } public static async Create(synStore: SynStore) { - const {documentHash, firstCommitHash} = await synStore.createDocument(boardGrammar) + const initState = boardGrammar.initialState() + console.log("creating", initState) + const documentStore = await synStore.createDocument(initState,{}) - const documentStore = new DocumentStore(synStore, boardGrammar, documentHash) - await synStore.client.tagDocument(documentHash, BoardType.active) + await synStore.client.tagDocument(documentStore.documentHash, BoardType.active) - const workspaceHash = await documentStore.createWorkspace( + const workspaceStore = await documentStore.createWorkspace( `${new Date}`, - firstCommitHash + undefined ); - const workspaceStore = new WorkspaceStore(documentStore, workspaceHash) const me = new Board(documentStore, workspaceStore); await me.join() @@ -443,7 +443,11 @@ export class Board { requestChanges(deltas: Array) { console.log("REQUESTING BOARD CHANGES: ", deltas) - this.session.requestChanges(deltas) + this.session.change((state,_eph)=>{ + for (const delta of deltas) { + boardGrammar.applyDelta(delta, state,_eph, undefined) + } + }) } sessionParticipants() { diff --git a/ui/src/boardList.ts b/ui/src/boardList.ts index bfd799f..1369e1b 100644 --- a/ui/src/boardList.ts +++ b/ui/src/boardList.ts @@ -1,12 +1,11 @@ -import { Board } from "./board"; import { LazyHoloHashMap } from "@holochain-open-dev/utils"; import { derived, get, writable, type Readable, type Writable } from "svelte/store"; -import { boardGrammar, type BoardDelta, type BoardGrammar, type BoardState } from "./board"; import { type AgentPubKey, type EntryHash, type EntryHashB64, encodeHashToBase64 } from "@holochain/client"; import {toPromise, type AsyncReadable, pipe, joinAsync, asyncDerived, sliceAndJoin, alwaysSubscribed} from '@holochain-open-dev/stores' -import { DocumentStore, SynStore, WorkspaceStore } from "@holochain-syn/core"; +import { SynStore, WorkspaceStore } from "@holochain-syn/core"; import type { ProfilesStore } from "@holochain-open-dev/profiles"; import { cloneDeep } from "lodash"; +import { Board, type BoardDelta, type BoardState } from "./board"; export enum BoardType { active = "active", @@ -33,11 +32,9 @@ export class BoardList { activeBoardHash: Writable = writable(undefined) activeBoardHashB64: Readable = derived(this.activeBoardHash, s=> s ? encodeHashToBase64(s): undefined) boardCount: AsyncReadable - documents: LazyHoloHashMap> = new LazyHoloHashMap( documentHash => - new DocumentStore(this.synStore, boardGrammar, documentHash)) boardData2 = new LazyHoloHashMap( documentHash => { - const docStore = this.documents.get(documentHash) + const docStore = this.synStore.documents.get(documentHash) const board = pipe(docStore.allWorkspaces, workspaces => @@ -51,7 +48,7 @@ export class BoardList { agentBoardHashes: LazyHoloHashMap>> = new LazyHoloHashMap(agent => pipe(this.activeBoardHashes, - documentHashes => joinAsync(documentHashes.map(documentHash=>this.documents.get(documentHash).allAuthors)), + documentHashes => joinAsync(documentHashes.map(documentHash=>this.synStore.documents.get(documentHash).allAuthors)), (documentsAuthors, documentHashes) => { const agentBoardHashes: AsyncReadable[] = [] const b64 = encodeHashToBase64(agent)