From b2f8fc629d6cd562c6f5cfcabf2e4051039b9cb5 Mon Sep 17 00:00:00 2001 From: Eric Harris-Braun Date: Wed, 11 Oct 2023 10:51:23 -0400 Subject: [PATCH] fixes for we --- package-lock.json | 306 +++++++++++++--------------------------------- ui/package.json | 4 +- ui/src/App.svelte | 35 ++++-- 3 files changed, 111 insertions(+), 234 deletions(-) diff --git a/package-lock.json b/package-lock.json index 1087243..a738b50 100644 --- a/package-lock.json +++ b/package-lock.json @@ -125,12 +125,12 @@ "integrity": "sha512-Dn5pTV/m3XaK1Zvq3liw/vQUt7goM7Y84x2zUyH8cb9CNMs4kPCNHs3kalbJZ/ymzFvwcdiLwwNW8AKk+WWN5A==" }, "node_modules/@holochain-open-dev/elements": { - "version": "0.5.11", - "resolved": "https://registry.npmjs.org/@holochain-open-dev/elements/-/elements-0.5.11.tgz", - "integrity": "sha512-oCjQJn50A3NWtb08YlVhwIwb20fbeLooKJXZmHwTXVtVxv+7b0QrZDSVDI3kzFD5FYYfS7ITE8HD0sCjk6tBjw==", + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/@holochain-open-dev/elements/-/elements-0.7.0.tgz", + "integrity": "sha512-IW9mRlLywGTrT2v0SreQ/a32b3yqNIxEc+I+87++1BlvFAgohBVvo63/ot2c6/fEWx3Ot6pYn/7CqN5v3nf7lQ==", "dependencies": { "@holo-host/identicon": "^0.1.0", - "@holochain/client": "^0.14.1", + "@holochain/client": "^0.16.0", "@lit/localize": "^0.11.4", "@mdi/js": "^7.1.96", "@shoelace-style/shoelace": "^2.3.0", @@ -142,94 +142,106 @@ } }, "node_modules/@holochain-open-dev/elements/node_modules/@holochain/client": { - "version": "0.14.1", - "resolved": "https://registry.npmjs.org/@holochain/client/-/client-0.14.1.tgz", - "integrity": "sha512-5rWPIRdxhvV+SpKHegKsPSw7AcN1JjtLS5RhAlLT7dsXvn70BcMWsImhBs1sqw69QsbEMKlhqaOH+sOS5LkDBQ==", + "version": "0.16.2", + "resolved": "https://registry.npmjs.org/@holochain/client/-/client-0.16.2.tgz", + "integrity": "sha512-1Msw6tSdCDI3f2UIdSAYtiAqxxdHt6ufmQSw+GEbvDaIjVXPQWi39IQe5Zzep4VPJoproyurrBRNG1l+/3YrjA==", "dependencies": { "@holochain/serialization": "^0.1.0-beta-rc.3", - "@msgpack/msgpack": "^2.7.2", - "@noble/ed25519": "^2.0.0", - "@tauri-apps/api": "^1.2.0", + "@msgpack/msgpack": "^2.8.0", + "@tauri-apps/api": "^1.4.0", "emittery": "^1.0.1", "isomorphic-ws": "^5.0.0", - "js-base64": "^3.7.3", + "js-base64": "^3.7.5", + "libsodium-wrappers": "^0.7.13", "lodash-es": "^4.17.21", - "ws": "^8.13.0" + "ws": "^8.14.2" }, "engines": { "node": ">=16.0.0 || >=18.0.0" } }, "node_modules/@holochain-open-dev/profiles": { - "version": "0.14.3", - "resolved": "https://registry.npmjs.org/@holochain-open-dev/profiles/-/profiles-0.14.3.tgz", - "integrity": "sha512-QbwM9+c4IJrYlb38i54f9e/g9Q3vjchAvCYyOfX2pqk6y2bgJ19D8pm1474slL1s+lgAHXwETFR6YTdfNf4tAg==", - "dependencies": { - "@holochain-open-dev/elements": "^0.5.6", - "@holochain-open-dev/stores": "^0.5.0", - "@holochain-open-dev/utils": "^0.14.2", - "@holochain/client": "^0.14.1", + "version": "0.16.1", + "resolved": "https://registry.npmjs.org/@holochain-open-dev/profiles/-/profiles-0.16.1.tgz", + "integrity": "sha512-tLGxH7dLOiwlw+ViIHJ2cls08/TbnbIgPyd8WjOQCAvY0a/bZSMe7aykZsj75OQDFziANpPLNgsUdLnmPFadfg==", + "dependencies": { + "@holochain-open-dev/elements": "^0.7.0", + "@holochain-open-dev/stores": "^0.6.0", + "@holochain-open-dev/utils": "^0.15.0", + "@holochain/client": "^0.16.0", "@lit-labs/context": "^0.2.0", "@lit/localize": "^0.11.2", "@mdi/js": "^7.1.96", "@shoelace-style/shoelace": "^2.3.0" } }, + "node_modules/@holochain-open-dev/profiles/node_modules/@holochain-open-dev/stores": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/@holochain-open-dev/stores/-/stores-0.6.0.tgz", + "integrity": "sha512-/j+VAym4/vjQA2ezbnQnvfkHRAVDU9CaLt4JalDskIKBlapEQaUmlPLCo2iyzrZ0pfQLQpuwOXVlVtOMN7MYcw==", + "dependencies": { + "@holochain-open-dev/utils": "^0.15.0", + "@holochain/client": "^0.16.0", + "lit-svelte-stores": "^0.2.1", + "svelte": "^3.53.1" + } + }, "node_modules/@holochain-open-dev/profiles/node_modules/@holochain/client": { - "version": "0.14.1", - "resolved": "https://registry.npmjs.org/@holochain/client/-/client-0.14.1.tgz", - "integrity": "sha512-5rWPIRdxhvV+SpKHegKsPSw7AcN1JjtLS5RhAlLT7dsXvn70BcMWsImhBs1sqw69QsbEMKlhqaOH+sOS5LkDBQ==", + "version": "0.16.2", + "resolved": "https://registry.npmjs.org/@holochain/client/-/client-0.16.2.tgz", + "integrity": "sha512-1Msw6tSdCDI3f2UIdSAYtiAqxxdHt6ufmQSw+GEbvDaIjVXPQWi39IQe5Zzep4VPJoproyurrBRNG1l+/3YrjA==", "dependencies": { "@holochain/serialization": "^0.1.0-beta-rc.3", - "@msgpack/msgpack": "^2.7.2", - "@noble/ed25519": "^2.0.0", - "@tauri-apps/api": "^1.2.0", + "@msgpack/msgpack": "^2.8.0", + "@tauri-apps/api": "^1.4.0", "emittery": "^1.0.1", "isomorphic-ws": "^5.0.0", - "js-base64": "^3.7.3", + "js-base64": "^3.7.5", + "libsodium-wrappers": "^0.7.13", "lodash-es": "^4.17.21", - "ws": "^8.13.0" + "ws": "^8.14.2" }, "engines": { "node": ">=16.0.0 || >=18.0.0" } }, "node_modules/@holochain-open-dev/stores": { - "version": "0.5.4", - "resolved": "https://registry.npmjs.org/@holochain-open-dev/stores/-/stores-0.5.4.tgz", - "integrity": "sha512-EI3an5oUgCqRwABkNp+RmZowb/4SOiS411DBoVLTcbTA3mcDTTjLg0BCzTWKZQMm4TPqYg8IAevgiousNEd/FA==", + "version": "0.7.3", + "resolved": "https://registry.npmjs.org/@holochain-open-dev/stores/-/stores-0.7.3.tgz", + "integrity": "sha512-+O5knB/hD+ojAd3NYVeeXHHNXa7NvOT1Mit07J7jj6czhODPhF0Sv5PGihsu0p+a+n9d+yUSwfOGlVHajrHf4Q==", "dependencies": { - "@holochain-open-dev/utils": "^0.14.0", - "@holochain/client": "^0.14.1", + "@holochain-open-dev/utils": "^0.15.0", + "@holochain/client": "^0.16.0", + "console-log-tree": "^1.2.1", "lit-svelte-stores": "^0.2.1", "svelte": "^3.53.1" } }, "node_modules/@holochain-open-dev/stores/node_modules/@holochain/client": { - "version": "0.14.1", - "resolved": "https://registry.npmjs.org/@holochain/client/-/client-0.14.1.tgz", - "integrity": "sha512-5rWPIRdxhvV+SpKHegKsPSw7AcN1JjtLS5RhAlLT7dsXvn70BcMWsImhBs1sqw69QsbEMKlhqaOH+sOS5LkDBQ==", + "version": "0.16.2", + "resolved": "https://registry.npmjs.org/@holochain/client/-/client-0.16.2.tgz", + "integrity": "sha512-1Msw6tSdCDI3f2UIdSAYtiAqxxdHt6ufmQSw+GEbvDaIjVXPQWi39IQe5Zzep4VPJoproyurrBRNG1l+/3YrjA==", "dependencies": { "@holochain/serialization": "^0.1.0-beta-rc.3", - "@msgpack/msgpack": "^2.7.2", - "@noble/ed25519": "^2.0.0", - "@tauri-apps/api": "^1.2.0", + "@msgpack/msgpack": "^2.8.0", + "@tauri-apps/api": "^1.4.0", "emittery": "^1.0.1", "isomorphic-ws": "^5.0.0", - "js-base64": "^3.7.3", + "js-base64": "^3.7.5", + "libsodium-wrappers": "^0.7.13", "lodash-es": "^4.17.21", - "ws": "^8.13.0" + "ws": "^8.14.2" }, "engines": { "node": ">=16.0.0 || >=18.0.0" } }, "node_modules/@holochain-open-dev/utils": { - "version": "0.14.2", - "resolved": "https://registry.npmjs.org/@holochain-open-dev/utils/-/utils-0.14.2.tgz", - "integrity": "sha512-mJscNII/s0ZuICnIpBynOxv4q0cSlSvdb3e7kHbvMncioRYLrnFIu0/AxZn2MpC4IpXgUKWO2i1biB4q1IKlVw==", + "version": "0.15.0", + "resolved": "https://registry.npmjs.org/@holochain-open-dev/utils/-/utils-0.15.0.tgz", + "integrity": "sha512-h7xrsGPKPPkmH+8VM++w5wZ8wnGed9ZNt62iIfGaj1WnlcufB3YkbraGIgY1nU5LGf+r7pHqg6KRFjJPaPc5+w==", "dependencies": { - "@holochain/client": "^0.14.1", + "@holochain/client": "^0.16.0", "@msgpack/msgpack": "^2.7.2", "blakejs": "^1.2.1", "emittery": "^1.0.1", @@ -238,19 +250,19 @@ } }, "node_modules/@holochain-open-dev/utils/node_modules/@holochain/client": { - "version": "0.14.1", - "resolved": "https://registry.npmjs.org/@holochain/client/-/client-0.14.1.tgz", - "integrity": "sha512-5rWPIRdxhvV+SpKHegKsPSw7AcN1JjtLS5RhAlLT7dsXvn70BcMWsImhBs1sqw69QsbEMKlhqaOH+sOS5LkDBQ==", + "version": "0.16.2", + "resolved": "https://registry.npmjs.org/@holochain/client/-/client-0.16.2.tgz", + "integrity": "sha512-1Msw6tSdCDI3f2UIdSAYtiAqxxdHt6ufmQSw+GEbvDaIjVXPQWi39IQe5Zzep4VPJoproyurrBRNG1l+/3YrjA==", "dependencies": { "@holochain/serialization": "^0.1.0-beta-rc.3", - "@msgpack/msgpack": "^2.7.2", - "@noble/ed25519": "^2.0.0", - "@tauri-apps/api": "^1.2.0", + "@msgpack/msgpack": "^2.8.0", + "@tauri-apps/api": "^1.4.0", "emittery": "^1.0.1", "isomorphic-ws": "^5.0.0", - "js-base64": "^3.7.3", + "js-base64": "^3.7.5", + "libsodium-wrappers": "^0.7.13", "lodash-es": "^4.17.21", - "ws": "^8.13.0" + "ws": "^8.14.2" }, "engines": { "node": ">=16.0.0 || >=18.0.0" @@ -280,19 +292,6 @@ "lodash-es": "^4.17.21" } }, - "node_modules/@holochain-syn/client/node_modules/@holochain-open-dev/utils": { - "version": "0.15.0", - "resolved": "https://registry.npmjs.org/@holochain-open-dev/utils/-/utils-0.15.0.tgz", - "integrity": "sha512-h7xrsGPKPPkmH+8VM++w5wZ8wnGed9ZNt62iIfGaj1WnlcufB3YkbraGIgY1nU5LGf+r7pHqg6KRFjJPaPc5+w==", - "dependencies": { - "@holochain/client": "^0.16.0", - "@msgpack/msgpack": "^2.7.2", - "blakejs": "^1.2.1", - "emittery": "^1.0.1", - "lodash-es": "^4.17.21", - "sort-keys": "^5.0.0" - } - }, "node_modules/@holochain-syn/client/node_modules/@holochain/client": { "version": "0.16.2", "resolved": "https://registry.npmjs.org/@holochain/client/-/client-0.16.2.tgz", @@ -332,74 +331,6 @@ "lodash-es": "^4.17.21" } }, - "node_modules/@holochain-syn/core/node_modules/@holochain-open-dev/elements": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/@holochain-open-dev/elements/-/elements-0.7.0.tgz", - "integrity": "sha512-IW9mRlLywGTrT2v0SreQ/a32b3yqNIxEc+I+87++1BlvFAgohBVvo63/ot2c6/fEWx3Ot6pYn/7CqN5v3nf7lQ==", - "dependencies": { - "@holo-host/identicon": "^0.1.0", - "@holochain/client": "^0.16.0", - "@lit/localize": "^0.11.4", - "@mdi/js": "^7.1.96", - "@shoelace-style/shoelace": "^2.3.0", - "lit": "^2.6.1", - "prosemirror-commands": "^1.5.2", - "prosemirror-keymap": "^1.2.2", - "prosemirror-state": "^1.4.3", - "prosemirror-view": "^1.31.3" - } - }, - "node_modules/@holochain-syn/core/node_modules/@holochain-open-dev/profiles": { - "version": "0.16.1", - "resolved": "https://registry.npmjs.org/@holochain-open-dev/profiles/-/profiles-0.16.1.tgz", - "integrity": "sha512-tLGxH7dLOiwlw+ViIHJ2cls08/TbnbIgPyd8WjOQCAvY0a/bZSMe7aykZsj75OQDFziANpPLNgsUdLnmPFadfg==", - "dependencies": { - "@holochain-open-dev/elements": "^0.7.0", - "@holochain-open-dev/stores": "^0.6.0", - "@holochain-open-dev/utils": "^0.15.0", - "@holochain/client": "^0.16.0", - "@lit-labs/context": "^0.2.0", - "@lit/localize": "^0.11.2", - "@mdi/js": "^7.1.96", - "@shoelace-style/shoelace": "^2.3.0" - } - }, - "node_modules/@holochain-syn/core/node_modules/@holochain-open-dev/profiles/node_modules/@holochain-open-dev/stores": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/@holochain-open-dev/stores/-/stores-0.6.0.tgz", - "integrity": "sha512-/j+VAym4/vjQA2ezbnQnvfkHRAVDU9CaLt4JalDskIKBlapEQaUmlPLCo2iyzrZ0pfQLQpuwOXVlVtOMN7MYcw==", - "dependencies": { - "@holochain-open-dev/utils": "^0.15.0", - "@holochain/client": "^0.16.0", - "lit-svelte-stores": "^0.2.1", - "svelte": "^3.53.1" - } - }, - "node_modules/@holochain-syn/core/node_modules/@holochain-open-dev/stores": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/@holochain-open-dev/stores/-/stores-0.7.0.tgz", - "integrity": "sha512-7RJ/QL3SfcSALcEE0LVNMsuPgOJA4haLV0rLJMMAvbwpCSOcJZu4KaJf8RutNR1qcDTLBXcWs47CSLdki3loxw==", - "dependencies": { - "@holochain-open-dev/utils": "^0.15.0", - "@holochain/client": "^0.16.0", - "console-log-tree": "^1.2.1", - "lit-svelte-stores": "^0.2.1", - "svelte": "^3.53.1" - } - }, - "node_modules/@holochain-syn/core/node_modules/@holochain-open-dev/utils": { - "version": "0.15.0", - "resolved": "https://registry.npmjs.org/@holochain-open-dev/utils/-/utils-0.15.0.tgz", - "integrity": "sha512-h7xrsGPKPPkmH+8VM++w5wZ8wnGed9ZNt62iIfGaj1WnlcufB3YkbraGIgY1nU5LGf+r7pHqg6KRFjJPaPc5+w==", - "dependencies": { - "@holochain/client": "^0.16.0", - "@msgpack/msgpack": "^2.7.2", - "blakejs": "^1.2.1", - "emittery": "^1.0.1", - "lodash-es": "^4.17.21", - "sort-keys": "^5.0.0" - } - }, "node_modules/@holochain-syn/core/node_modules/@holochain/client": { "version": "0.16.2", "resolved": "https://registry.npmjs.org/@holochain/client/-/client-0.16.2.tgz", @@ -433,31 +364,6 @@ "lodash-es": "^4.17.21" } }, - "node_modules/@holochain-syn/store/node_modules/@holochain-open-dev/stores": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/@holochain-open-dev/stores/-/stores-0.7.0.tgz", - "integrity": "sha512-7RJ/QL3SfcSALcEE0LVNMsuPgOJA4haLV0rLJMMAvbwpCSOcJZu4KaJf8RutNR1qcDTLBXcWs47CSLdki3loxw==", - "dependencies": { - "@holochain-open-dev/utils": "^0.15.0", - "@holochain/client": "^0.16.0", - "console-log-tree": "^1.2.1", - "lit-svelte-stores": "^0.2.1", - "svelte": "^3.53.1" - } - }, - "node_modules/@holochain-syn/store/node_modules/@holochain-open-dev/utils": { - "version": "0.15.0", - "resolved": "https://registry.npmjs.org/@holochain-open-dev/utils/-/utils-0.15.0.tgz", - "integrity": "sha512-h7xrsGPKPPkmH+8VM++w5wZ8wnGed9ZNt62iIfGaj1WnlcufB3YkbraGIgY1nU5LGf+r7pHqg6KRFjJPaPc5+w==", - "dependencies": { - "@holochain/client": "^0.16.0", - "@msgpack/msgpack": "^2.7.2", - "blakejs": "^1.2.1", - "emittery": "^1.0.1", - "lodash-es": "^4.17.21", - "sort-keys": "^5.0.0" - } - }, "node_modules/@holochain-syn/store/node_modules/@holochain/client": { "version": "0.16.2", "resolved": "https://registry.npmjs.org/@holochain/client/-/client-0.16.2.tgz", @@ -548,37 +454,38 @@ "dev": true }, "node_modules/@lightningrodlabs/we-applet": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/@lightningrodlabs/we-applet/-/we-applet-0.6.1.tgz", - "integrity": "sha512-5AS+gYJ1OAEoaUQ63Pi9fQFM+hkwHvg5FwWU1VlTEhbfgfhv0RESqenwv9OlIrJoju9QwnusikfbT7uaCZXpdg==", - "dependencies": { - "@holochain-open-dev/elements": "^0.5.0", - "@holochain-open-dev/profiles": "^0.14.0", - "@holochain-open-dev/stores": "^0.5.0", - "@holochain-open-dev/utils": "^0.14.0", - "@holochain/client": "^0.14.1", + "version": "0.9.0", + "resolved": "https://registry.npmjs.org/@lightningrodlabs/we-applet/-/we-applet-0.9.0.tgz", + "integrity": "sha512-eD1i4tzwb68Lyh0hz4Yb6ltNf7Ux1lOx64K9juIgobX/UwvmaU0FHuW5hacXcql4jUXXHrN9bp4+0zwpLbJKxQ==", + "dependencies": { + "@holochain-open-dev/elements": "^0.7.0", + "@holochain-open-dev/profiles": "^0.16.1", + "@holochain-open-dev/stores": "^0.7.2", + "@holochain-open-dev/utils": "^0.15.0", + "@holochain/client": "^0.16.0", "@lit-labs/context": "^0.2.0", "@lit/localize": "^0.11.4", "@mdi/js": "^7.2.0", "@msgpack/msgpack": "^3.0.0-beta2", "@shoelace-style/shoelace": "^2.3.0", + "js-base64": "^3.7.5", "lit": "^2.6.0" } }, "node_modules/@lightningrodlabs/we-applet/node_modules/@holochain/client": { - "version": "0.14.1", - "resolved": "https://registry.npmjs.org/@holochain/client/-/client-0.14.1.tgz", - "integrity": "sha512-5rWPIRdxhvV+SpKHegKsPSw7AcN1JjtLS5RhAlLT7dsXvn70BcMWsImhBs1sqw69QsbEMKlhqaOH+sOS5LkDBQ==", + "version": "0.16.2", + "resolved": "https://registry.npmjs.org/@holochain/client/-/client-0.16.2.tgz", + "integrity": "sha512-1Msw6tSdCDI3f2UIdSAYtiAqxxdHt6ufmQSw+GEbvDaIjVXPQWi39IQe5Zzep4VPJoproyurrBRNG1l+/3YrjA==", "dependencies": { "@holochain/serialization": "^0.1.0-beta-rc.3", - "@msgpack/msgpack": "^2.7.2", - "@noble/ed25519": "^2.0.0", - "@tauri-apps/api": "^1.2.0", + "@msgpack/msgpack": "^2.8.0", + "@tauri-apps/api": "^1.4.0", "emittery": "^1.0.1", "isomorphic-ws": "^5.0.0", - "js-base64": "^3.7.3", + "js-base64": "^3.7.5", + "libsodium-wrappers": "^0.7.13", "lodash-es": "^4.17.21", - "ws": "^8.13.0" + "ws": "^8.14.2" }, "engines": { "node": ">=16.0.0 || >=18.0.0" @@ -11874,7 +11781,7 @@ "@holochain-open-dev/utils": "^0.15.0", "@holochain-syn/core": "^0.6.0", "@holochain/client": "^0.16", - "@lightningrodlabs/we-applet": "^0.6.1", + "@lightningrodlabs/we-applet": "0.9.0", "@mdi/js": "^7.1.96", "@shoelace-style/shoelace": "^2.5.2", "@ts-stack/markdown": "^1.4.0", @@ -11901,38 +11808,6 @@ "vite": "^4.0.4" } }, - "ui/node_modules/@holochain-open-dev/elements": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/@holochain-open-dev/elements/-/elements-0.7.0.tgz", - "integrity": "sha512-IW9mRlLywGTrT2v0SreQ/a32b3yqNIxEc+I+87++1BlvFAgohBVvo63/ot2c6/fEWx3Ot6pYn/7CqN5v3nf7lQ==", - "dependencies": { - "@holo-host/identicon": "^0.1.0", - "@holochain/client": "^0.16.0", - "@lit/localize": "^0.11.4", - "@mdi/js": "^7.1.96", - "@shoelace-style/shoelace": "^2.3.0", - "lit": "^2.6.1", - "prosemirror-commands": "^1.5.2", - "prosemirror-keymap": "^1.2.2", - "prosemirror-state": "^1.4.3", - "prosemirror-view": "^1.31.3" - } - }, - "ui/node_modules/@holochain-open-dev/profiles": { - "version": "0.16.0", - "resolved": "https://registry.npmjs.org/@holochain-open-dev/profiles/-/profiles-0.16.0.tgz", - "integrity": "sha512-C4Gxck7O+Z4sSoMbhncUcv/hC2neJcMIRyzveGxRrZ6drcit3I4BsJrjAZSbNIc+jMrTAZXUA6KDLO6YA5doNw==", - "dependencies": { - "@holochain-open-dev/elements": "^0.7.0", - "@holochain-open-dev/stores": "^0.6.0", - "@holochain-open-dev/utils": "^0.15.0", - "@holochain/client": "^0.16.0", - "@lit-labs/context": "^0.2.0", - "@lit/localize": "^0.11.2", - "@mdi/js": "^7.1.96", - "@shoelace-style/shoelace": "^2.3.0" - } - }, "ui/node_modules/@holochain-open-dev/stores": { "version": "0.6.0", "resolved": "https://registry.npmjs.org/@holochain-open-dev/stores/-/stores-0.6.0.tgz", @@ -11944,19 +11819,6 @@ "svelte": "^3.53.1" } }, - "ui/node_modules/@holochain-open-dev/utils": { - "version": "0.15.0", - "resolved": "https://registry.npmjs.org/@holochain-open-dev/utils/-/utils-0.15.0.tgz", - "integrity": "sha512-h7xrsGPKPPkmH+8VM++w5wZ8wnGed9ZNt62iIfGaj1WnlcufB3YkbraGIgY1nU5LGf+r7pHqg6KRFjJPaPc5+w==", - "dependencies": { - "@holochain/client": "^0.16.0", - "@msgpack/msgpack": "^2.7.2", - "blakejs": "^1.2.1", - "emittery": "^1.0.1", - "lodash-es": "^4.17.21", - "sort-keys": "^5.0.0" - } - }, "ui/node_modules/@holochain/client": { "version": "0.16.0", "resolved": "https://registry.npmjs.org/@holochain/client/-/client-0.16.0.tgz", diff --git a/ui/package.json b/ui/package.json index fe06c1e..f62b564 100644 --- a/ui/package.json +++ b/ui/package.json @@ -18,6 +18,7 @@ "@holochain-open-dev/utils": "^0.15.0", "@holochain-syn/core": "^0.6.0", "@holochain/client": "^0.16", + "@lightningrodlabs/we-applet": "0.9.0", "@mdi/js": "^7.1.96", "@ts-stack/markdown": "^1.4.0", "lodash": "^4.17.21", @@ -32,8 +33,7 @@ "svelte-awesome-color-picker": "2.4.6", "emoji-picker-element": "1.18.3", "javascript-time-ago": "2.3.7", - "@types/javascript-time-ago": "^2.0.3", - "@lightningrodlabs/we-applet": "^0.6.1" + "@types/javascript-time-ago": "^2.0.3" }, "devDependencies": { "@sveltejs/vite-plugin-svelte": "^2.0.2", diff --git a/ui/src/App.svelte b/ui/src/App.svelte index ba1b5ab..72fb894 100644 --- a/ui/src/App.svelte +++ b/ui/src/App.svelte @@ -2,6 +2,7 @@ import Controller from './Controller.svelte' import { AppAgentWebsocket, AdminWebsocket } from '@holochain/client'; import '@shoelace-style/shoelace/dist/themes/light.css'; + import { WeClient, isWeContext } from '@lightningrodlabs/we-applet'; const appId = import.meta.env.VITE_APP_ID ? import.meta.env.VITE_APP_ID : 'kando' const roleName = 'kando' @@ -15,17 +16,31 @@ initialize() async function initialize() : Promise { - console.log("adminPort is", adminPort) - if (adminPort) { - const adminWebsocket = await AdminWebsocket.connect(new URL(`ws://localhost:${adminPort}`)) - const x = await adminWebsocket.listApps({}) - console.log("apps", x) - const cellIds = await adminWebsocket.listCellIds() - console.log("CELL IDS",cellIds) - await adminWebsocket.authorizeSigningCredentials(cellIds[0]) + if (!isWeContext()) { + console.log("adminPort is", adminPort) + if (adminPort) { + const adminWebsocket = await AdminWebsocket.connect(new URL(`ws://localhost:${adminPort}`)) + const x = await adminWebsocket.listApps({}) + console.log("apps", x) + const cellIds = await adminWebsocket.listCellIds() + console.log("CELL IDS",cellIds) + await adminWebsocket.authorizeSigningCredentials(cellIds[0]) + } + console.log("appPort and Id is", appPort, appId) + client = await AppAgentWebsocket.connect(new URL(url), appId) + } + else { + const weClient = await WeClient.connect(); + + if ( + !(weClient.renderInfo.type === "applet-view") + && !(weClient.renderInfo.view.type === "main") + ) throw new Error("This Applet only implements the applet main view."); + + client = weClient.renderInfo.appletClient; + // const profilesClient = weClient.renderInfo.profilesClient; } - console.log("appPort and Id is", appPort, appId) - client = await AppAgentWebsocket.connect(new URL(url), appId) + connected = true }