From 7ff31979ed3fe0204354195c509af6b5670eb9d7 Mon Sep 17 00:00:00 2001 From: Leo Date: Mon, 11 Mar 2024 15:09:58 +0100 Subject: [PATCH] update to latest we pattern --- package-lock.json | 558 +++++++++++++++++--------------- package.json | 2 +- ui/package.json | 5 +- ui/src/App.svelte | 14 +- ui/src/AttachmentsBind.svelte | 95 ------ ui/src/AttachmentsDialog.svelte | 11 +- ui/src/CalcyPane.svelte | 9 +- ui/src/ControllerCreate.svelte | 112 +++++++ ui/src/svgIcons.ts | 57 ++-- ui/src/we.ts | 32 +- we_dev/config.json | 12 +- we_dev/config.ts | 14 +- 12 files changed, 484 insertions(+), 437 deletions(-) delete mode 100644 ui/src/AttachmentsBind.svelte create mode 100644 ui/src/ControllerCreate.svelte diff --git a/package-lock.json b/package-lock.json index b766259..9763863 100644 --- a/package-lock.json +++ b/package-lock.json @@ -261,6 +261,201 @@ "resolved": "https://registry.npmjs.org/@holo-host/identicon/-/identicon-0.1.0.tgz", "integrity": "sha512-Dn5pTV/m3XaK1Zvq3liw/vQUt7goM7Y84x2zUyH8cb9CNMs4kPCNHs3kalbJZ/ymzFvwcdiLwwNW8AKk+WWN5A==" }, + "node_modules/@holochain-open-dev/elements": { + "version": "0.8.4", + "resolved": "https://registry.npmjs.org/@holochain-open-dev/elements/-/elements-0.8.4.tgz", + "integrity": "sha512-9iT59XcDJyuV8m92oPAGBaHJ7MR3pDN7mSlxj4J99HqzrxFC/IK2NaPKdCc4kfmbH28ABpavppv4/5y8Ab4CAA==", + "dependencies": { + "@holo-host/identicon": "^0.1.0", + "@holochain-open-dev/stores": "^0.7.12", + "@holochain/client": "^0.16.0", + "@lit/localize": "^0.12.0", + "@mdi/js": "^7.1.96", + "@shoelace-style/shoelace": "^2.11.0", + "lit": "^3.0.2", + "prosemirror-commands": "^1.5.2", + "prosemirror-keymap": "^1.2.2", + "prosemirror-state": "^1.4.3", + "prosemirror-view": "^1.31.3" + } + }, + "node_modules/@holochain-open-dev/elements/node_modules/@holochain-open-dev/stores": { + "version": "0.7.16", + "resolved": "https://registry.npmjs.org/@holochain-open-dev/stores/-/stores-0.7.16.tgz", + "integrity": "sha512-hBiTq7d2fIgqMyhQHlyPWi9RMkfhjFOsQG+1MRSleIOZRPepp/IkFeg8yqjImbdEj9GgHkZQPV72JZyWAohqgg==", + "dependencies": { + "@alenaksu/json-viewer": "^2.0.1", + "@holochain-open-dev/utils": "^0.16.2", + "@holochain/client": "^0.16.0", + "@scoped-elements/cytoscape": "^0.2.0", + "@shoelace-style/shoelace": "^2.11.2", + "lit": "^3.0.2", + "lit-svelte-stores": "^0.3.0", + "svelte": "^3.53.1" + } + }, + "node_modules/@holochain-open-dev/elements/node_modules/@holochain/client": { + "version": "0.16.10", + "resolved": "https://registry.npmjs.org/@holochain/client/-/client-0.16.10.tgz", + "integrity": "sha512-Urgx6vXNux2XD/4+eOxou2FKwlUBu/g/BxUSZLX6wEaYWH9wDYXR5f3VToUrAhXGF5ssc08jb8jLiQZ23k62EQ==", + "dependencies": { + "@bitgo/blake2b": "^3.2.4", + "@holochain/serialization": "^0.1.0-beta-rc.3", + "@msgpack/msgpack": "^2.8.0", + "@tauri-apps/api": "^1.4.0", + "emittery": "^1.0.1", + "isomorphic-ws": "^5.0.0", + "js-base64": "^3.7.5", + "libsodium-wrappers": "^0.7.13", + "lodash-es": "^4.17.21", + "ws": "^8.14.2" + }, + "engines": { + "node": ">=18.0.0 || >=20.0.0" + } + }, + "node_modules/@holochain-open-dev/elements/node_modules/@scoped-elements/cytoscape": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/@scoped-elements/cytoscape/-/cytoscape-0.2.0.tgz", + "integrity": "sha512-HrC7Pc1SCIHrDTUE883ArvljUENH9FW9qxRwzeXF8LxW5OP2+SaNJSSBaoPztmI15YHOL0aN7uuG9ozRn0EHpA==", + "dependencies": { + "@open-wc/scoped-elements": "^2.0.1", + "@types/cytoscape": "^3.19.0", + "cytoscape": "^3.20.0", + "cytoscape-cola": "^2.5.0", + "cytoscape-cose-bilkent": "^4.1.0", + "cytoscape-dagre": "^2.3.2", + "cytoscape-klay": "^3.1.4", + "lit": "^2.0.2", + "lodash-es": "^4.17.21" + } + }, + "node_modules/@holochain-open-dev/elements/node_modules/@scoped-elements/cytoscape/node_modules/lit": { + "version": "2.8.0", + "resolved": "https://registry.npmjs.org/lit/-/lit-2.8.0.tgz", + "integrity": "sha512-4Sc3OFX9QHOJaHbmTMk28SYgVxLN3ePDjg7hofEft2zWlehFL3LiAuapWc4U/kYwMYJSh2hTCPZ6/LIC7ii0MA==", + "dependencies": { + "@lit/reactive-element": "^1.6.0", + "lit-element": "^3.3.0", + "lit-html": "^2.8.0" + } + }, + "node_modules/@holochain-open-dev/elements/node_modules/@scoped-elements/cytoscape/node_modules/lit-html": { + "version": "2.8.0", + "resolved": "https://registry.npmjs.org/lit-html/-/lit-html-2.8.0.tgz", + "integrity": "sha512-o9t+MQM3P4y7M7yNzqAyjp7z+mQGa4NS4CxiyLqFPyFWyc4O+nodLrkrxSaCTrla6M5YOLaT3RpbbqjszB5g3Q==", + "dependencies": { + "@types/trusted-types": "^2.0.2" + } + }, + "node_modules/@holochain-open-dev/elements/node_modules/lit": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/lit/-/lit-3.1.2.tgz", + "integrity": "sha512-VZx5iAyMtX7CV4K8iTLdCkMaYZ7ipjJZ0JcSdJ0zIdGxxyurjIn7yuuSxNBD7QmjvcNJwr0JS4cAdAtsy7gZ6w==", + "dependencies": { + "@lit/reactive-element": "^2.0.4", + "lit-element": "^4.0.4", + "lit-html": "^3.1.2" + } + }, + "node_modules/@holochain-open-dev/elements/node_modules/lit-html": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/lit-html/-/lit-html-3.1.2.tgz", + "integrity": "sha512-3OBZSUrPnAHoKJ9AMjRL/m01YJxQMf+TMHanNtTHG68ubjnZxK0RFl102DPzsw4mWnHibfZIBJm3LWCZ/LmMvg==", + "dependencies": { + "@types/trusted-types": "^2.0.2" + } + }, + "node_modules/@holochain-open-dev/elements/node_modules/lit/node_modules/@lit/reactive-element": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/@lit/reactive-element/-/reactive-element-2.0.4.tgz", + "integrity": "sha512-GFn91inaUa2oHLak8awSIigYz0cU0Payr1rcFsrkf5OJ5eSPxElyZfKh0f2p9FsTiZWXQdWGJeXZICEfXXYSXQ==", + "dependencies": { + "@lit-labs/ssr-dom-shim": "^1.2.0" + } + }, + "node_modules/@holochain-open-dev/elements/node_modules/lit/node_modules/lit-element": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/lit-element/-/lit-element-4.0.4.tgz", + "integrity": "sha512-98CvgulX6eCPs6TyAIQoJZBCQPo80rgXR+dVBs61cstJXqtI+USQZAbA4gFHh6L/mxBx9MrgPLHLsUgDUHAcCQ==", + "dependencies": { + "@lit-labs/ssr-dom-shim": "^1.2.0", + "@lit/reactive-element": "^2.0.4", + "lit-html": "^3.1.2" + } + }, + "node_modules/@holochain-open-dev/profiles": { + "version": "0.17.3", + "resolved": "https://registry.npmjs.org/@holochain-open-dev/profiles/-/profiles-0.17.3.tgz", + "integrity": "sha512-V6Hn0JV5xYFTIzzqTkrNDrZPwPsqht+OqvZj6k2wHJ0tyGTuRsTCAxks27TG38f7PfXseGxIn7xLtGLLtmJwSw==", + "dependencies": { + "@holochain-open-dev/elements": "^0.8.4", + "@holochain-open-dev/stores": "^0.8.2", + "@holochain-open-dev/utils": "^0.16.2", + "@holochain/client": "^0.16.0", + "@lit/context": "^1.0.1", + "@lit/localize": "^0.12.0", + "@mdi/js": "^7.1.96", + "@shoelace-style/shoelace": "^2.11.0", + "lit": "^3.0.2" + } + }, + "node_modules/@holochain-open-dev/profiles/node_modules/@holochain/client": { + "version": "0.16.10", + "resolved": "https://registry.npmjs.org/@holochain/client/-/client-0.16.10.tgz", + "integrity": "sha512-Urgx6vXNux2XD/4+eOxou2FKwlUBu/g/BxUSZLX6wEaYWH9wDYXR5f3VToUrAhXGF5ssc08jb8jLiQZ23k62EQ==", + "dependencies": { + "@bitgo/blake2b": "^3.2.4", + "@holochain/serialization": "^0.1.0-beta-rc.3", + "@msgpack/msgpack": "^2.8.0", + "@tauri-apps/api": "^1.4.0", + "emittery": "^1.0.1", + "isomorphic-ws": "^5.0.0", + "js-base64": "^3.7.5", + "libsodium-wrappers": "^0.7.13", + "lodash-es": "^4.17.21", + "ws": "^8.14.2" + }, + "engines": { + "node": ">=18.0.0 || >=20.0.0" + } + }, + "node_modules/@holochain-open-dev/profiles/node_modules/@lit/reactive-element": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/@lit/reactive-element/-/reactive-element-2.0.4.tgz", + "integrity": "sha512-GFn91inaUa2oHLak8awSIigYz0cU0Payr1rcFsrkf5OJ5eSPxElyZfKh0f2p9FsTiZWXQdWGJeXZICEfXXYSXQ==", + "dependencies": { + "@lit-labs/ssr-dom-shim": "^1.2.0" + } + }, + "node_modules/@holochain-open-dev/profiles/node_modules/lit": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/lit/-/lit-3.1.2.tgz", + "integrity": "sha512-VZx5iAyMtX7CV4K8iTLdCkMaYZ7ipjJZ0JcSdJ0zIdGxxyurjIn7yuuSxNBD7QmjvcNJwr0JS4cAdAtsy7gZ6w==", + "dependencies": { + "@lit/reactive-element": "^2.0.4", + "lit-element": "^4.0.4", + "lit-html": "^3.1.2" + } + }, + "node_modules/@holochain-open-dev/profiles/node_modules/lit-element": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/lit-element/-/lit-element-4.0.4.tgz", + "integrity": "sha512-98CvgulX6eCPs6TyAIQoJZBCQPo80rgXR+dVBs61cstJXqtI+USQZAbA4gFHh6L/mxBx9MrgPLHLsUgDUHAcCQ==", + "dependencies": { + "@lit-labs/ssr-dom-shim": "^1.2.0", + "@lit/reactive-element": "^2.0.4", + "lit-html": "^3.1.2" + } + }, + "node_modules/@holochain-open-dev/profiles/node_modules/lit-html": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/lit-html/-/lit-html-3.1.2.tgz", + "integrity": "sha512-3OBZSUrPnAHoKJ9AMjRL/m01YJxQMf+TMHanNtTHG68ubjnZxK0RFl102DPzsw4mWnHibfZIBJm3LWCZ/LmMvg==", + "dependencies": { + "@types/trusted-types": "^2.0.2" + } + }, "node_modules/@holochain-open-dev/stores": { "version": "0.8.11", "resolved": "https://registry.npmjs.org/@holochain-open-dev/stores/-/stores-0.8.11.tgz", @@ -457,107 +652,6 @@ "lit": "^3.0.0" } }, - "node_modules/@holochain-syn/core/node_modules/@holochain-open-dev/elements": { - "version": "0.8.4", - "resolved": "https://registry.npmjs.org/@holochain-open-dev/elements/-/elements-0.8.4.tgz", - "integrity": "sha512-9iT59XcDJyuV8m92oPAGBaHJ7MR3pDN7mSlxj4J99HqzrxFC/IK2NaPKdCc4kfmbH28ABpavppv4/5y8Ab4CAA==", - "dependencies": { - "@holo-host/identicon": "^0.1.0", - "@holochain-open-dev/stores": "^0.7.12", - "@holochain/client": "^0.16.0", - "@lit/localize": "^0.12.0", - "@mdi/js": "^7.1.96", - "@shoelace-style/shoelace": "^2.11.0", - "lit": "^3.0.2", - "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/elements/node_modules/@holochain-open-dev/stores": { - "version": "0.7.16", - "resolved": "https://registry.npmjs.org/@holochain-open-dev/stores/-/stores-0.7.16.tgz", - "integrity": "sha512-hBiTq7d2fIgqMyhQHlyPWi9RMkfhjFOsQG+1MRSleIOZRPepp/IkFeg8yqjImbdEj9GgHkZQPV72JZyWAohqgg==", - "dependencies": { - "@alenaksu/json-viewer": "^2.0.1", - "@holochain-open-dev/utils": "^0.16.2", - "@holochain/client": "^0.16.0", - "@scoped-elements/cytoscape": "^0.2.0", - "@shoelace-style/shoelace": "^2.11.2", - "lit": "^3.0.2", - "lit-svelte-stores": "^0.3.0", - "svelte": "^3.53.1" - } - }, - "node_modules/@holochain-syn/core/node_modules/@holochain-open-dev/elements/node_modules/@lit/reactive-element": { - "version": "1.6.3", - "resolved": "https://registry.npmjs.org/@lit/reactive-element/-/reactive-element-1.6.3.tgz", - "integrity": "sha512-QuTgnG52Poic7uM1AN5yJ09QMe0O28e10XzSvWDz02TJiiKee4stsiownEIadWm8nYzyDAyT+gKzUoZmiWQtsQ==", - "dependencies": { - "@lit-labs/ssr-dom-shim": "^1.0.0" - } - }, - "node_modules/@holochain-syn/core/node_modules/@holochain-open-dev/elements/node_modules/@scoped-elements/cytoscape": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/@scoped-elements/cytoscape/-/cytoscape-0.2.0.tgz", - "integrity": "sha512-HrC7Pc1SCIHrDTUE883ArvljUENH9FW9qxRwzeXF8LxW5OP2+SaNJSSBaoPztmI15YHOL0aN7uuG9ozRn0EHpA==", - "dependencies": { - "@open-wc/scoped-elements": "^2.0.1", - "@types/cytoscape": "^3.19.0", - "cytoscape": "^3.20.0", - "cytoscape-cola": "^2.5.0", - "cytoscape-cose-bilkent": "^4.1.0", - "cytoscape-dagre": "^2.3.2", - "cytoscape-klay": "^3.1.4", - "lit": "^2.0.2", - "lodash-es": "^4.17.21" - } - }, - "node_modules/@holochain-syn/core/node_modules/@holochain-open-dev/elements/node_modules/@scoped-elements/cytoscape/node_modules/lit": { - "version": "2.8.0", - "resolved": "https://registry.npmjs.org/lit/-/lit-2.8.0.tgz", - "integrity": "sha512-4Sc3OFX9QHOJaHbmTMk28SYgVxLN3ePDjg7hofEft2zWlehFL3LiAuapWc4U/kYwMYJSh2hTCPZ6/LIC7ii0MA==", - "dependencies": { - "@lit/reactive-element": "^1.6.0", - "lit-element": "^3.3.0", - "lit-html": "^2.8.0" - } - }, - "node_modules/@holochain-syn/core/node_modules/@holochain-open-dev/elements/node_modules/lit-element": { - "version": "3.3.3", - "resolved": "https://registry.npmjs.org/lit-element/-/lit-element-3.3.3.tgz", - "integrity": "sha512-XbeRxmTHubXENkV4h8RIPyr8lXc+Ff28rkcQzw3G6up2xg5E8Zu1IgOWIwBLEQsu3cOVFqdYwiVi0hv0SlpqUA==", - "dependencies": { - "@lit-labs/ssr-dom-shim": "^1.1.0", - "@lit/reactive-element": "^1.3.0", - "lit-html": "^2.8.0" - } - }, - "node_modules/@holochain-syn/core/node_modules/@holochain-open-dev/elements/node_modules/lit-html": { - "version": "2.8.0", - "resolved": "https://registry.npmjs.org/lit-html/-/lit-html-2.8.0.tgz", - "integrity": "sha512-o9t+MQM3P4y7M7yNzqAyjp7z+mQGa4NS4CxiyLqFPyFWyc4O+nodLrkrxSaCTrla6M5YOLaT3RpbbqjszB5g3Q==", - "dependencies": { - "@types/trusted-types": "^2.0.2" - } - }, - "node_modules/@holochain-syn/core/node_modules/@holochain-open-dev/profiles": { - "version": "0.17.3", - "resolved": "https://registry.npmjs.org/@holochain-open-dev/profiles/-/profiles-0.17.3.tgz", - "integrity": "sha512-V6Hn0JV5xYFTIzzqTkrNDrZPwPsqht+OqvZj6k2wHJ0tyGTuRsTCAxks27TG38f7PfXseGxIn7xLtGLLtmJwSw==", - "dependencies": { - "@holochain-open-dev/elements": "^0.8.4", - "@holochain-open-dev/stores": "^0.8.2", - "@holochain-open-dev/utils": "^0.16.2", - "@holochain/client": "^0.16.0", - "@lit/context": "^1.0.1", - "@lit/localize": "^0.12.0", - "@mdi/js": "^7.1.96", - "@shoelace-style/shoelace": "^2.11.0", - "lit": "^3.0.2" - } - }, "node_modules/@holochain-syn/core/node_modules/@holochain/client": { "version": "0.16.7", "resolved": "https://registry.npmjs.org/@holochain/client/-/client-0.16.7.tgz", @@ -578,14 +672,6 @@ "node": ">=18.0.0 || >=20.0.0" } }, - "node_modules/@holochain-syn/core/node_modules/@lit/localize": { - "version": "0.12.1", - "resolved": "https://registry.npmjs.org/@lit/localize/-/localize-0.12.1.tgz", - "integrity": "sha512-uuF6OO6fjqomCf3jXsJ5cTGf1APYuN88S4Gvo/fjt9YkG4OMaMvpEUqd5oWhyzrJfY+HcenAbLJNi2Cq3H7gdg==", - "dependencies": { - "lit": "^2.0.0 || ^3.0.0" - } - }, "node_modules/@holochain-syn/core/node_modules/@lit/reactive-element": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/@lit/reactive-element/-/reactive-element-2.0.2.tgz", @@ -727,9 +813,9 @@ "dev": true }, "node_modules/@lightningrodlabs/we-applet": { - "version": "0.15.0-alpha.2", - "resolved": "https://registry.npmjs.org/@lightningrodlabs/we-applet/-/we-applet-0.15.0-alpha.2.tgz", - "integrity": "sha512-D3i3fVNGNZ4ALTr4O+AMQVrof8M+kDMpFh4IuDhbbnlD/7j+/mJuDfXnwSA6V+5VQY8kPd7w/QfOShqcI2FhgQ==", + "version": "0.15.0", + "resolved": "https://registry.npmjs.org/@lightningrodlabs/we-applet/-/we-applet-0.15.0.tgz", + "integrity": "sha512-CjSB5G0j5atpP1PWaFxI1b9lZKIxYDU5FqW2cgSR8ThbOMLCEhDNhdFp/P9V1HsFk2Wqi67hTqnz9xS9TEi4dA==", "dependencies": { "@holochain/client": "0.16.6", "@msgpack/msgpack": "^2.7.2", @@ -756,9 +842,9 @@ } }, "node_modules/@lightningrodlabs/we-dev-cli": { - "version": "0.10.5-alpha.4", - "resolved": "https://registry.npmjs.org/@lightningrodlabs/we-dev-cli/-/we-dev-cli-0.10.5-alpha.4.tgz", - "integrity": "sha512-0UtoBnB6+5+FXG54Lc8aPQNbi1HaYlNYdSICctxN1pIykMCcavnnDLbz4hLR0rWxvDS62ZLb7zJk607HheMo4g==", + "version": "0.10.5", + "resolved": "https://registry.npmjs.org/@lightningrodlabs/we-dev-cli/-/we-dev-cli-0.10.5.tgz", + "integrity": "sha512-rXonUU0A8uekzijTuraDSKB4NEOQgaL20mZrGafDJd4cTxXl+KlP8qsCZNcXEo8g4IUgHR3k0DRDggd9vpwByw==", "dev": true, "hasInstallScript": true, "dependencies": { @@ -842,6 +928,84 @@ "node": "^18 || >=20" } }, + "node_modules/@lightningrodlabs/we-elements": { + "version": "0.4.5", + "resolved": "https://registry.npmjs.org/@lightningrodlabs/we-elements/-/we-elements-0.4.5.tgz", + "integrity": "sha512-xn07+JYXmG3J6OWXmtebtHStcAXOtgDinppI39An8YvllWAiX4EGd6N4/76ekVlQ//5oRQEqT9I4ghaOLxDN8A==", + "dependencies": { + "@holochain-open-dev/elements": "^0.8.4", + "@holochain-open-dev/profiles": "^0.17.3", + "@holochain-open-dev/stores": "^0.8.3", + "@holochain-open-dev/utils": "^0.16.3", + "@holochain/client": "0.16.6", + "@lightningrodlabs/we-applet": "file:../we-applet", + "@lit/context": "^1.0.1", + "@lit/localize": "^0.12.0", + "@mdi/js": "^7.2.0", + "@shoelace-style/shoelace": "^2.3.0", + "js-base64": "^3.7.5", + "lit": "^3.0.2" + } + }, + "node_modules/@lightningrodlabs/we-elements/node_modules/@holochain/client": { + "version": "0.16.6", + "resolved": "https://registry.npmjs.org/@holochain/client/-/client-0.16.6.tgz", + "integrity": "sha512-p6Vt8Ka6bLNAgCOXKs+wwgSg9vF9ZLp6iEJaNcmv71wmtf3d8YuqCtQXn6fL7/IW/I/SxPHvlihjo9jstdeC7w==", + "dependencies": { + "@holochain/serialization": "^0.1.0-beta-rc.3", + "@msgpack/msgpack": "^2.8.0", + "@tauri-apps/api": "^1.4.0", + "emittery": "^1.0.1", + "isomorphic-ws": "^5.0.0", + "js-base64": "^3.7.5", + "libsodium-wrappers": "^0.7.13", + "lodash-es": "^4.17.21", + "ws": "^8.14.2" + }, + "engines": { + "node": ">=18.0.0 || >=20.0.0" + } + }, + "node_modules/@lightningrodlabs/we-elements/node_modules/@lightningrodlabs/we-applet": { + "resolved": "node_modules/@lightningrodlabs/we-applet", + "link": true + }, + "node_modules/@lightningrodlabs/we-elements/node_modules/@lit/reactive-element": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/@lit/reactive-element/-/reactive-element-2.0.4.tgz", + "integrity": "sha512-GFn91inaUa2oHLak8awSIigYz0cU0Payr1rcFsrkf5OJ5eSPxElyZfKh0f2p9FsTiZWXQdWGJeXZICEfXXYSXQ==", + "dependencies": { + "@lit-labs/ssr-dom-shim": "^1.2.0" + } + }, + "node_modules/@lightningrodlabs/we-elements/node_modules/lit": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/lit/-/lit-3.1.2.tgz", + "integrity": "sha512-VZx5iAyMtX7CV4K8iTLdCkMaYZ7ipjJZ0JcSdJ0zIdGxxyurjIn7yuuSxNBD7QmjvcNJwr0JS4cAdAtsy7gZ6w==", + "dependencies": { + "@lit/reactive-element": "^2.0.4", + "lit-element": "^4.0.4", + "lit-html": "^3.1.2" + } + }, + "node_modules/@lightningrodlabs/we-elements/node_modules/lit-element": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/lit-element/-/lit-element-4.0.4.tgz", + "integrity": "sha512-98CvgulX6eCPs6TyAIQoJZBCQPo80rgXR+dVBs61cstJXqtI+USQZAbA4gFHh6L/mxBx9MrgPLHLsUgDUHAcCQ==", + "dependencies": { + "@lit-labs/ssr-dom-shim": "^1.2.0", + "@lit/reactive-element": "^2.0.4", + "lit-html": "^3.1.2" + } + }, + "node_modules/@lightningrodlabs/we-elements/node_modules/lit-html": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/lit-html/-/lit-html-3.1.2.tgz", + "integrity": "sha512-3OBZSUrPnAHoKJ9AMjRL/m01YJxQMf+TMHanNtTHG68ubjnZxK0RFl102DPzsw4mWnHibfZIBJm3LWCZ/LmMvg==", + "dependencies": { + "@types/trusted-types": "^2.0.2" + } + }, "node_modules/@lightningrodlabs/we-rust-utils": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/@lightningrodlabs/we-rust-utils/-/we-rust-utils-0.1.4.tgz", @@ -922,9 +1086,9 @@ } }, "node_modules/@lit-labs/ssr-dom-shim": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@lit-labs/ssr-dom-shim/-/ssr-dom-shim-1.1.2.tgz", - "integrity": "sha512-jnOD+/+dSrfTWYfSXBXlo5l5f0q1UuJo3tkbMDCYA2lKUYq79jaxqtGEvnRoh049nt1vdo1+45RinipU6FGY2g==" + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@lit-labs/ssr-dom-shim/-/ssr-dom-shim-1.2.0.tgz", + "integrity": "sha512-yWJKmpGE6lUURKAaIltoPIE/wrbY3TEkqQt+X0m+7fQNnAv0keydnYvbiJFP1PnMhizmIWRWOG5KLhYyc/xl+g==" }, "node_modules/@lit/context": { "version": "1.0.1", @@ -942,6 +1106,14 @@ "@lit-labs/ssr-dom-shim": "^1.1.2" } }, + "node_modules/@lit/localize": { + "version": "0.12.1", + "resolved": "https://registry.npmjs.org/@lit/localize/-/localize-0.12.1.tgz", + "integrity": "sha512-uuF6OO6fjqomCf3jXsJ5cTGf1APYuN88S4Gvo/fjt9YkG4OMaMvpEUqd5oWhyzrJfY+HcenAbLJNi2Cq3H7gdg==", + "dependencies": { + "lit": "^2.0.0 || ^3.0.0" + } + }, "node_modules/@lit/react": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/@lit/react/-/react-1.0.1.tgz", @@ -13924,7 +14096,8 @@ "@holochain-syn/core": "^0.12.1", "@holochain/client": "^0.16.7", "@holochain/tryorama": "^0.11.0", - "@lightningrodlabs/we-applet": "^0.15.0-alpha.1", + "@lightningrodlabs/we-applet": "^0.15.0", + "@lightningrodlabs/we-elements": "^0.4.5", "@mdi/js": "^7.1.96", "@shoelace-style/shoelace": "^2.5.2", "@ts-stack/markdown": "^1.5.0", @@ -13954,7 +14127,7 @@ "uuid": "^8.3.2" }, "devDependencies": { - "@lightningrodlabs/we-dev-cli": "^0.10.5-alpha.3", + "@lightningrodlabs/we-dev-cli": "^0.10.5", "@sveltejs/vite-plugin-svelte": "^2.0.2", "@tsconfig/svelte": "^3.0.0", "bestzip": "^2.2.0", @@ -13965,55 +14138,6 @@ "vite": "^4.0.4" } }, - "ui/node_modules/@holochain-open-dev/elements": { - "version": "0.8.4", - "resolved": "https://registry.npmjs.org/@holochain-open-dev/elements/-/elements-0.8.4.tgz", - "integrity": "sha512-9iT59XcDJyuV8m92oPAGBaHJ7MR3pDN7mSlxj4J99HqzrxFC/IK2NaPKdCc4kfmbH28ABpavppv4/5y8Ab4CAA==", - "dependencies": { - "@holo-host/identicon": "^0.1.0", - "@holochain-open-dev/stores": "^0.7.12", - "@holochain/client": "^0.16.0", - "@lit/localize": "^0.12.0", - "@mdi/js": "^7.1.96", - "@shoelace-style/shoelace": "^2.11.0", - "lit": "^3.0.2", - "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/elements/node_modules/@holochain-open-dev/stores": { - "version": "0.7.16", - "resolved": "https://registry.npmjs.org/@holochain-open-dev/stores/-/stores-0.7.16.tgz", - "integrity": "sha512-hBiTq7d2fIgqMyhQHlyPWi9RMkfhjFOsQG+1MRSleIOZRPepp/IkFeg8yqjImbdEj9GgHkZQPV72JZyWAohqgg==", - "dependencies": { - "@alenaksu/json-viewer": "^2.0.1", - "@holochain-open-dev/utils": "^0.16.2", - "@holochain/client": "^0.16.0", - "@scoped-elements/cytoscape": "^0.2.0", - "@shoelace-style/shoelace": "^2.11.2", - "lit": "^3.0.2", - "lit-svelte-stores": "^0.3.0", - "svelte": "^3.53.1" - } - }, - "ui/node_modules/@holochain-open-dev/profiles": { - "version": "0.17.3", - "resolved": "https://registry.npmjs.org/@holochain-open-dev/profiles/-/profiles-0.17.3.tgz", - "integrity": "sha512-V6Hn0JV5xYFTIzzqTkrNDrZPwPsqht+OqvZj6k2wHJ0tyGTuRsTCAxks27TG38f7PfXseGxIn7xLtGLLtmJwSw==", - "dependencies": { - "@holochain-open-dev/elements": "^0.8.4", - "@holochain-open-dev/stores": "^0.8.2", - "@holochain-open-dev/utils": "^0.16.2", - "@holochain/client": "^0.16.0", - "@lit/context": "^1.0.1", - "@lit/localize": "^0.12.0", - "@mdi/js": "^7.1.96", - "@shoelace-style/shoelace": "^2.11.0", - "lit": "^3.0.2" - } - }, "ui/node_modules/@holochain/client": { "version": "0.16.7", "resolved": "https://registry.npmjs.org/@holochain/client/-/client-0.16.7.tgz", @@ -14034,74 +14158,6 @@ "node": ">=18.0.0 || >=20.0.0" } }, - "ui/node_modules/@lit/localize": { - "version": "0.12.1", - "resolved": "https://registry.npmjs.org/@lit/localize/-/localize-0.12.1.tgz", - "integrity": "sha512-uuF6OO6fjqomCf3jXsJ5cTGf1APYuN88S4Gvo/fjt9YkG4OMaMvpEUqd5oWhyzrJfY+HcenAbLJNi2Cq3H7gdg==", - "dependencies": { - "lit": "^2.0.0 || ^3.0.0" - } - }, - "ui/node_modules/@lit/reactive-element": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/@lit/reactive-element/-/reactive-element-2.0.1.tgz", - "integrity": "sha512-eu50SQXHRthFwWJMp0oAFg95Rvm6MTPjxSXWuvAu7It90WVFLFpNBoIno7XOXSDvVgTrtKnUV4OLJqys2Svn4g==", - "dependencies": { - "@lit-labs/ssr-dom-shim": "^1.1.2" - } - }, - "ui/node_modules/@scoped-elements/cytoscape": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/@scoped-elements/cytoscape/-/cytoscape-0.2.0.tgz", - "integrity": "sha512-HrC7Pc1SCIHrDTUE883ArvljUENH9FW9qxRwzeXF8LxW5OP2+SaNJSSBaoPztmI15YHOL0aN7uuG9ozRn0EHpA==", - "dependencies": { - "@open-wc/scoped-elements": "^2.0.1", - "@types/cytoscape": "^3.19.0", - "cytoscape": "^3.20.0", - "cytoscape-cola": "^2.5.0", - "cytoscape-cose-bilkent": "^4.1.0", - "cytoscape-dagre": "^2.3.2", - "cytoscape-klay": "^3.1.4", - "lit": "^2.0.2", - "lodash-es": "^4.17.21" - } - }, - "ui/node_modules/@scoped-elements/cytoscape/node_modules/@lit/reactive-element": { - "version": "1.6.3", - "resolved": "https://registry.npmjs.org/@lit/reactive-element/-/reactive-element-1.6.3.tgz", - "integrity": "sha512-QuTgnG52Poic7uM1AN5yJ09QMe0O28e10XzSvWDz02TJiiKee4stsiownEIadWm8nYzyDAyT+gKzUoZmiWQtsQ==", - "dependencies": { - "@lit-labs/ssr-dom-shim": "^1.0.0" - } - }, - "ui/node_modules/@scoped-elements/cytoscape/node_modules/lit": { - "version": "2.8.0", - "resolved": "https://registry.npmjs.org/lit/-/lit-2.8.0.tgz", - "integrity": "sha512-4Sc3OFX9QHOJaHbmTMk28SYgVxLN3ePDjg7hofEft2zWlehFL3LiAuapWc4U/kYwMYJSh2hTCPZ6/LIC7ii0MA==", - "dependencies": { - "@lit/reactive-element": "^1.6.0", - "lit-element": "^3.3.0", - "lit-html": "^2.8.0" - } - }, - "ui/node_modules/@scoped-elements/cytoscape/node_modules/lit-element": { - "version": "3.3.3", - "resolved": "https://registry.npmjs.org/lit-element/-/lit-element-3.3.3.tgz", - "integrity": "sha512-XbeRxmTHubXENkV4h8RIPyr8lXc+Ff28rkcQzw3G6up2xg5E8Zu1IgOWIwBLEQsu3cOVFqdYwiVi0hv0SlpqUA==", - "dependencies": { - "@lit-labs/ssr-dom-shim": "^1.1.0", - "@lit/reactive-element": "^1.3.0", - "lit-html": "^2.8.0" - } - }, - "ui/node_modules/@scoped-elements/cytoscape/node_modules/lit-html": { - "version": "2.8.0", - "resolved": "https://registry.npmjs.org/lit-html/-/lit-html-2.8.0.tgz", - "integrity": "sha512-o9t+MQM3P4y7M7yNzqAyjp7z+mQGa4NS4CxiyLqFPyFWyc4O+nodLrkrxSaCTrla6M5YOLaT3RpbbqjszB5g3Q==", - "dependencies": { - "@types/trusted-types": "^2.0.2" - } - }, "ui/node_modules/@tsconfig/svelte": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/@tsconfig/svelte/-/svelte-3.0.0.tgz", @@ -14426,34 +14482,6 @@ "rxjs": ">=7.0.0" } }, - "ui/node_modules/lit": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/lit/-/lit-3.0.2.tgz", - "integrity": "sha512-ZoVUPGgXOQocP4OvxehEOBmC4rWB4cRYDPaz7aFmH8DFytsCi/NeACbr4C6vNPGDEC07BrhUos7uVNayDKLQ2Q==", - "dependencies": { - "@lit/reactive-element": "^2.0.0", - "lit-element": "^4.0.0", - "lit-html": "^3.0.0" - } - }, - "ui/node_modules/lit-element": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/lit-element/-/lit-element-4.0.1.tgz", - "integrity": "sha512-OxRMJem4HKZt0320HplLkBPoi4KHiEHoPHKd8Lzf07ZQVAOKIjZ32yPLRKRDEolFU1RgrQBfSHQMoxKZ72V3Kw==", - "dependencies": { - "@lit-labs/ssr-dom-shim": "^1.1.2", - "@lit/reactive-element": "^2.0.0", - "lit-html": "^3.0.0" - } - }, - "ui/node_modules/lit-html": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/lit-html/-/lit-html-3.0.2.tgz", - "integrity": "sha512-Q1A5lHza3bnmxoWJn6yS6vQZQdExl4fghk8W1G+jnAEdoFNYo5oeBBb/Ol7zSEdKd3TR7+r0zsJQyuWEVguiyQ==", - "dependencies": { - "@types/trusted-types": "^2.0.2" - } - }, "ui/node_modules/nanoid": { "version": "5.0.6", "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-5.0.6.tgz", diff --git a/package.json b/package.json index f85ba56..dee1e38 100644 --- a/package.json +++ b/package.json @@ -10,7 +10,7 @@ "dev": "VITE_ADMIN_PORT=$(port) VITE_APP_PORT=$(port) SIGNAL_PORT=$(port) BOOTSTRAP_PORT=$(port) UI_PORT=8888 npm run x", "x": "hc s clean && npm run build:happ && UI_PORT=8888 concurrently \"npm start -w ui\" \"npm run start:happ\" \"hc run-local-services -b $BOOTSTRAP_PORT -s $SIGNAL_PORT\"", "applet-dev": " UI_PORT=8888 npm run applet-devy", - "applet-devy": "concurrently \"npm start -w ui\" \"we-dev-cli --agent-idx 1 --dev-config we_dev/config.ts\" \"we-dev-cli --agent-idx 2 --dev-config we_dev/config.ts\"", + "applet-devy": "concurrently \"npm start -w ui\" \"sleep 1 && we-dev-cli --agent-idx 1 --dev-config we_dev/config.ts\" \"sleep 10 && we-dev-cli --agent-idx 2 --dev-config we_dev/config.ts\"", "applet-devx": "BPORT=46263 SPORT=46262; concurrently \"hc run-local-services -b $BPORT -s $SPORT\" \"npm start -w ui\" \"./we_dev/we.AppImage --dev-config we_dev/config.json --agent-num 1 -b http://127.0.0.1:$BPORT -s ws://127.0.0.1:$SPORT\" \"sleep 10 && ./we_dev/we.AppImage --dev-config we_dev/config.json --agent-num 2 -b http://127.0.0.1:$BPORT -s ws://127.0.0.1:$SPORT\"", "network": "hc s clean && npm run build:happ && UI_PORT=8888 concurrently \"npm start -w ui\" \"npm run launch:happ\" \"holochain-playground\"", "test": "npm run build:zomes && hc app pack workdir --recursive && npm t -w tests", diff --git a/ui/package.json b/ui/package.json index cef8a54..6bec5f5 100644 --- a/ui/package.json +++ b/ui/package.json @@ -15,7 +15,8 @@ "@holochain-open-dev/utils": "^0.16.4", "@holochain-syn/core": "^0.12.1", "@holochain/client": "^0.16.7", - "@lightningrodlabs/we-applet": "^0.15.0-alpha.1", + "@lightningrodlabs/we-applet": "^0.15.0", + "@lightningrodlabs/we-elements": "^0.4.5", "@holochain/tryorama": "^0.11.0", "@mdi/js": "^7.1.96", "@ts-stack/markdown": "^1.5.0", @@ -47,7 +48,7 @@ "@univerjs/facade": "^0.1.2" }, "devDependencies": { - "@lightningrodlabs/we-dev-cli": "^0.10.5-alpha.3", + "@lightningrodlabs/we-dev-cli": "^0.10.5", "@sveltejs/vite-plugin-svelte": "^2.0.2", "@tsconfig/svelte": "^3.0.0", "bestzip": "^2.2.0", diff --git a/ui/src/App.svelte b/ui/src/App.svelte index e20365d..1bfc0b9 100644 --- a/ui/src/App.svelte +++ b/ui/src/App.svelte @@ -12,6 +12,7 @@ import "@holochain-open-dev/profiles/dist/elements/create-profile.js"; import LogoIcon from "./icons/LogoIcon.svelte"; import { appletServices } from './we'; + import ControllerCreate from './ControllerCreate.svelte' const appId = import.meta.env.VITE_APP_ID ? import.meta.env.VITE_APP_ID : 'calcy' const roleName = 'calcy' @@ -22,12 +23,14 @@ let client: AppAgentWebsocket let weClient: WeClient let profilesStore : ProfilesStore|undefined = undefined + let createView let connected = false enum RenderType { App, Hrl, + CreateSpreadsheet, BlockActiveBoards } @@ -77,6 +80,13 @@ throw new Error("Unknown applet-view block type:"+weClient.renderInfo.view.block); } break; + case "creatable": + switch (weClient.renderInfo.view.name) { + case "spreadsheet": + renderType = RenderType.CreateSpreadsheet + createView = weClient.renderInfo.view + } + break; case "attachable": switch (weClient.renderInfo.view.roleName) { case "calcy": @@ -149,7 +159,9 @@ {:else if $prof.status=="error"} Error when loading profile: {$prof.error} {:else} - {#if renderType== RenderType.App} + {#if renderType== RenderType.CreateSpreadsheet} + + {:else if renderType== RenderType.App} {:else if renderType== RenderType.Hrl && !hrlWithContext.context} diff --git a/ui/src/AttachmentsBind.svelte b/ui/src/AttachmentsBind.svelte deleted file mode 100644 index 0f55d51..0000000 --- a/ui/src/AttachmentsBind.svelte +++ /dev/null @@ -1,95 +0,0 @@ - - -
-

Create Bound Item From:

- {#each Array.from(groups.entries()) as [groupHash, group]} -
-
- {group.name}: -
-
- {#each Array.from(store.weClient.attachmentTypes.entries()) as [appletHash, record]} - {@const appletInfo = appletInfos.get(appletHash)} - {#if appletInfo.groupsIds.find(id=>hashEqual(id,groupHash))} -
- {appletInfo.appletName}: - - {#each Object.values(record) as aType,i} -
- {aType.label} - { - const hrl = await aType.create({hrl:[store.dnaHash,activeBoard.hash]}) - dispatch("add-binding",hrl) - }} > - - - {#if i>0},{/if} -
- {/each} -
- {/if} - {/each} -
- -
- {/each} -
- \ No newline at end of file diff --git a/ui/src/AttachmentsDialog.svelte b/ui/src/AttachmentsDialog.svelte index d1c942c..05b0f6c 100644 --- a/ui/src/AttachmentsDialog.svelte +++ b/ui/src/AttachmentsDialog.svelte @@ -8,7 +8,6 @@ import '@shoelace-style/shoelace/dist/components/button/button.js'; import '@shoelace-style/shoelace/dist/components/dialog/dialog.js'; import AttachmentsList from "./AttachmentsList.svelte"; - import AttachmentsBind from "./AttachmentsBind.svelte"; import SvgIcon from "./SvgIcon.svelte"; const { getStore } :any = getContext("store"); @@ -27,12 +26,10 @@ // } else { attachments = activeBoard.state().props.attachments // } - await bind.refresh() dialog.show() } let dialog $: attachments - let bind function removeAttachment(index: number) { attachments.splice(index, 1); @@ -79,15 +76,9 @@

Search Linkables:

addAttachment()} > - + - _addAttachment(e.detail)} - /> - {/if} diff --git a/ui/src/CalcyPane.svelte b/ui/src/CalcyPane.svelte index 707a825..fc579e9 100644 --- a/ui/src/CalcyPane.svelte +++ b/ui/src/CalcyPane.svelte @@ -15,7 +15,12 @@ import { exportBoard } from "./export"; import AttachmentsList from './AttachmentsList.svelte'; import AttachmentsDialog from "./AttachmentsDialog.svelte" - import {Workbook} from "@fortune-sheet/react"; + + import { weaveUrlFromWal, type HrlWithContext } from "@lightningrodlabs/we-applet"; + import { hrlB64WithContextToRaw } from "./util"; + import '@lightningrodlabs/we-elements/dist/elements/wal-embed.js'; + + // import {Workbook} from "@fortune-sheet/react"; // import ReactAdapter from "./ReactAdapter.svelte"; // import "@fortune-sheet/react/dist/index.css" import type { IWorkbookData } from '@univerjs/core'; @@ -150,7 +155,7 @@ const newValue = spreadsheet[sheet].cellData[row][col] // check if object values in previousValue differ from newValue if (!isEqual(previousValue, newValue)) { - // let microRange = activeSheet.getRange(row, col, 3, 2); + // let microRange = activeSheet.getRange(row, col, 1, 1); // microRange.setValue(newValue) compromiseValue[row][col] = newValue changed = true; diff --git a/ui/src/ControllerCreate.svelte b/ui/src/ControllerCreate.svelte new file mode 100644 index 0000000..ab8557f --- /dev/null +++ b/ui/src/ControllerCreate.svelte @@ -0,0 +1,112 @@ + +
+
+
+ +
+ +
+ disabled = !e.target.value} + label="Spreadsheet Name"> +
+ { + try { + const synStore = new SynStore(new SynClient(client, roleName)); + //const hrlB64 = hrlWithContextToB64(attachToHrlWithContext) + const board = await Board.Create(synStore, {/*boundTo:[hrlB64]*/name: inputElement.value}) + const dnaHash = await getMyDna(roleName, client) + view.resolve({hrl:[dnaHash, board.hash]}) + } catch(e) { + console.log("ERR",e) + view.reject(e) + } + }}>Create + { + view.cancel() + }}>Cancel +
+
+
+
+
+
+ \ No newline at end of file diff --git a/ui/src/svgIcons.ts b/ui/src/svgIcons.ts index 1541eff..9e4cb5f 100644 --- a/ui/src/svgIcons.ts +++ b/ui/src/svgIcons.ts @@ -1,29 +1,30 @@ export const svgIcons = { - faSearch: ``, - faCog: ``, - faTrash: ``, - faCancel: ``, - faEdit: ``, - faPlus: ``, - faSpinner: ``, - faSquarePlus: ``, - faArchive: ``, - faPaperPlane: ``, - faUserGroup: ``, - faArrowTurnDown: ``, - faArrowRight: ``, - faCheck: ``, - faComments: ``, - faGripVertical: ``, - faUser: ``, - faFileImport: ``, - faFileExport: ``, - faClose: ``, - faBug: ``, - faBars: ``, - faClone: ``, - faPaperclip: ``, - link: ``, - faShare: ``, - addToPocket: ``, - } \ No newline at end of file + faSearch: ``, + faCog: ``, + faTrash: ``, + faCancel: ``, + faEdit: ``, + faPlus: ``, + faSpinner: ``, + faSquarePlus: ``, + faArchive: ``, + faPaperPlane: ``, + faUserGroup: ``, + faArrowTurnDown: ``, + faArrowRight: ``, + faCheck: ``, + faComments: ``, + faGripVertical: ``, + faUser: ``, + faFileImport: ``, + faFileExport: ``, + faClose: ``, + faBug: ``, + faBars: ``, + faClone: ``, + faPaperclip: ``, + faEllipsisV: ``, + link: ``, + addToPocket: ``, + searchPlus: `` +} \ No newline at end of file diff --git a/ui/src/we.ts b/ui/src/we.ts index c414db9..da7bea9 100644 --- a/ui/src/we.ts +++ b/ui/src/we.ts @@ -1,10 +1,10 @@ import { DocumentStore, SynClient, SynStore, WorkspaceStore } from '@holochain-syn/core'; -import { Board, type BoardEphemeralState, type BoardState } from './board'; +import type { BoardEphemeralState, BoardState } from './board'; import { asyncDerived, pipe, sliceAndJoin, toPromise } from '@holochain-open-dev/stores'; import { BoardType } from './boardList'; import { LazyHoloHashMap } from '@holochain-open-dev/utils'; import type { AppletHash, AppletServices, AttachableInfo, HrlWithContext, WeServices } from '@lightningrodlabs/we-applet'; -import { getMyDna, hrlWithContextToB64 } from './util'; +import { getMyDna } from './util'; import type { AppAgentClient, RoleName, ZomeName } from '@holochain/client'; const ROLE_NAME = "calcy" @@ -32,25 +32,13 @@ const SHEET_ICON_SRC = `data:image/svg+xml;utf8, ` export const appletServices: AppletServices = { - // Types of attachment that this Applet offers for other Applets to attach - attachmentTypes: async ( - appletClient: AppAgentClient, - appletHash: AppletHash, - weServices: WeServices - ) => ({ - board: { - label: "Board", + // Types of attachment that this Applet offers for other Applets to be created + creatables: { + 'spreadsheet': { + label: "Spreadsheet", icon_src: SHEET_ICON_SRC, - async create(attachToHrlWithContext: HrlWithContext) { - const synStore = new SynStore(new SynClient(appletClient, ROLE_NAME)); - const board = await Board.Create(synStore, {boundTo:[hrlWithContextToB64(attachToHrlWithContext)]}) - const dnaHash = await getMyDna(ROLE_NAME, appletClient) - return { - hrl: [dnaHash, board.hash], - }; - }, - }, - }), + } + }, // Types of UI widgets/blocks that this Applet supports blockTypes: { 'active_boards': { @@ -60,6 +48,10 @@ export const appletServices: AppletServices = { view: "applet-view", }, }, + bindAsset: async (appletClient: AppAgentClient, + srcWal: HrlWithContext, dstWal: HrlWithContext): Promise => { + console.log("Bind requested. Src:", srcWal, " Dst:", dstWal) + }, getAttachableInfo: async ( appletClient: AppAgentClient, roleName: RoleName, diff --git a/we_dev/config.json b/we_dev/config.json index 3218cc4..b080020 100644 --- a/we_dev/config.json +++ b/we_dev/config.json @@ -43,8 +43,8 @@ "joiningAgents": [2] }, { - "name": "notebooks", - "instanceName": "notebooks", + "name": "talking stickies", + "instanceName": "talking stickies", "registeringAgent": 1, "joiningAgents": [2] } @@ -80,16 +80,16 @@ } }, { - "name": "notebooks", - "subtitle": "Collaborative note taking", + "name": "talking stickies", + "subtitle": "stickies", "description": "Real-time notetaking based on syn", "icon": { "type": "https", - "url": "https://lightningrodlabs.org/projects/notebooks.png" + "url": "https://lightningrodlabs.org/talking-stickies/talking-stickies_icon.png" }, "source": { "type": "https", - "url": "https://github.com/lightningrodlabs/notebooks/releases/download/v0.2.0/notebooks.webhapp" + "url": "https://github.com/holochain-apps/talking-stickies/releases/download/v0.8.101/talking-stickies.webhapp" } } ] diff --git a/we_dev/config.ts b/we_dev/config.ts index c3eb1db..5614204 100644 --- a/we_dev/config.ts +++ b/we_dev/config.ts @@ -45,8 +45,8 @@ export default defineConfig({ joiningAgents: [2], }, { - name: 'notebooks', - instanceName: 'notebooks', + name: 'talking-stickies', + instanceName: 'talking-stickies', registeringAgent: 1, joiningAgents: [2], }, @@ -82,16 +82,16 @@ export default defineConfig({ }, }, { - name: 'notebooks', - subtitle: 'Collaborative note taking', - description: 'Real-time notetaking based on syn', + name: 'talking-stickies', + subtitle: 'talking stickies', + description: 'Real-time stickies based on syn', icon: { type: 'https', - url: 'https://lightningrodlabs.org/projects/notebooks.png', + url: 'https://raw.githubusercontent.com/holochain-apps/gamez/main/we_dev/gamez_icon.svg', }, source: { type: 'https', - url: 'https://github.com/lightningrodlabs/notebooks/releases/download/v0.2.0/notebooks.webhapp', + url: 'https://github.com/holochain-apps/talking-stickies/releases/download/v0.8.101/talking-stickies.webhapp', }, }, ],