From c39472f319f85cf7bb4ec375e812fe5c7bbb59d0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eduard=20Bardaj=C3=AD=20Puig?= Date: Sat, 6 Apr 2024 17:45:35 +0200 Subject: [PATCH 1/5] Link UI layout to option click behavior --- docs/index.md | 2 + docs/option-click-behavior.md | 24 ++ src/exampleApp/mocks.ts | 42 +- .../components/Divider.tsx | 16 +- ...elContainer.tsx => SidePanelContainer.tsx} | 2 +- ...iner.tsx => SidePanelContentContainer.tsx} | 2 +- ...elExplainer.tsx => SidePanelExplainer.tsx} | 2 +- ...t.tsx => SidePanelInstallWalletPrompt.tsx} | 17 +- ...gWallet.tsx => SidePanelOpeningWallet.tsx} | 17 +- .../components/WalletProviderOption.tsx | 6 +- src/lib/WalletProviderSelector/index.tsx | 388 +++++++++--------- src/lib/WalletProviderSelector/types.ts | 24 +- src/lib/WalletProviderSelector/utils.ts | 13 +- src/lib/utils.ts | 24 +- 14 files changed, 309 insertions(+), 270 deletions(-) create mode 100644 docs/option-click-behavior.md rename src/lib/WalletProviderSelector/components/{RightPanelContainer.tsx => SidePanelContainer.tsx} (75%) rename src/lib/WalletProviderSelector/components/{RightPanelContentContainer.tsx => SidePanelContentContainer.tsx} (81%) rename src/lib/WalletProviderSelector/components/{RightPanelExplainer.tsx => SidePanelExplainer.tsx} (94%) rename src/lib/WalletProviderSelector/components/{RightPanelInstallWalletPrompt.tsx => SidePanelInstallWalletPrompt.tsx} (82%) rename src/lib/WalletProviderSelector/components/{RightPanelOpeningWallet.tsx => SidePanelOpeningWallet.tsx} (64%) diff --git a/docs/index.md b/docs/index.md index 2dadf1a..2efba11 100644 --- a/docs/index.md +++ b/docs/index.md @@ -1,3 +1,5 @@ [Architecture](./architecture.md) [Selector API](./selector-api.md) + +[Option click behavior](./option-click-behavior.md) diff --git a/docs/option-click-behavior.md b/docs/option-click-behavior.md new file mode 100644 index 0000000..7f1f69b --- /dev/null +++ b/docs/option-click-behavior.md @@ -0,0 +1,24 @@ +# Wallet provider option click behavior + +The click behavior of a provider option depends on whether the provider is installed as well as whether there's enough space in the UI to show a side panel. + +When an option contains the `installPrompt` property, the provider it represents is considered to not be installed. When absent, the provider is considered to be installed. + +The side panel is an informational area of the selector which is shown when there's enough space for it in the UI. + +The user flow when clicking uninstalled providers is a two step process if there's enough space for the side panel, + +1. Clicking the provider option opens the side panel. +2. Clicking the side panel action takes the user to the app store. + +and a one step process if there is no space for the panel, + +1. Clicking the provider option takes the user to the app store. + +A special case is when all provider options represent uninstalled providers: no side panel is ever shown, regardless of available UI space, and clicking the provider option takes the user to the app store. + +Clicking on an installed provider returns the selection to the caller. + +## Technical details + +An `isShowingSidePanel()` helper is used to check whether there's a side panel in the DOM and its display style. This function is how UI layout requirements are tied to the option click behavior. diff --git a/src/exampleApp/mocks.ts b/src/exampleApp/mocks.ts index eca208b..f0ba2d8 100644 --- a/src/exampleApp/mocks.ts +++ b/src/exampleApp/mocks.ts @@ -7,19 +7,17 @@ export function mockNoneInstalled(): Config { name: "Wallet 1", id: "wallet-1", icon: "https://picsum.photos/101", - isInstalled: false, - chromeWebStoreUrl: "https://example.com/?chrome-store-wallet-1", - googlePlayStoreUrl: "https://example.com/?google-play-wallet-1", - iOSAppStoreUrl: "https://example.com/?ios-wallet-1", + installPrompt: { + url: "https://example.com/?chrome-store-wallet-1", + }, }, { name: "Wallet 2", id: "wallet-2", icon: "https://picsum.photos/102", - isInstalled: false, - chromeWebStoreUrl: "https://example.com/?chrome-store-wallet-2", - googlePlayStoreUrl: "https://example.com/?google-play-wallet-2", - iOSAppStoreUrl: "https://example.com/?ios-wallet-2", + installPrompt: { + url: "https://example.com/?chrome-store-wallet-2", + }, }, ], }; @@ -32,19 +30,14 @@ export function mockSomeUninstalled(): Config { name: "Wallet 1", id: "wallet-1", icon: "https://picsum.photos/101", - isInstalled: true, - chromeWebStoreUrl: "https://example.com/?chrome-store-wallet-1", - googlePlayStoreUrl: "https://example.com/?google-play-wallet-1", - iOSAppStoreUrl: "https://example.com/?ios-wallet-1", }, { name: "Wallet 2", id: "wallet-2", icon: "https://picsum.photos/102", - isInstalled: false, - chromeWebStoreUrl: "https://example.com/?chrome-store-wallet-2", - googlePlayStoreUrl: "https://example.com/?google-play-wallet-2", - iOSAppStoreUrl: "https://example.com/?ios-wallet-2", + installPrompt: { + url: "https://example.com/?chrome-store-wallet-2", + }, }, ], }; @@ -57,19 +50,11 @@ export function mockAllInstalled(): Config { name: "Wallet 1", id: "wallet-1", icon: "https://picsum.photos/101", - isInstalled: true, - chromeWebStoreUrl: "https://example.com/?chrome-store-wallet-1", - googlePlayStoreUrl: "https://example.com/?google-play-wallet-1", - iOSAppStoreUrl: "https://example.com/?ios-wallet-1", }, { name: "Wallet 2", id: "wallet-2", icon: "https://picsum.photos/102", - isInstalled: true, - chromeWebStoreUrl: "https://example.com/?chrome-store-wallet-2", - googlePlayStoreUrl: "https://example.com/?google-play-wallet-2", - iOSAppStoreUrl: "https://example.com/?ios-wallet-2", }, ], }; @@ -84,10 +69,11 @@ export function mockManySomeInstalled() { name: `Wallet ${i + 1}`, id, icon: `https://picsum.photos/${i + 101}`, - isInstalled: i % 2 === 0, - chromeWebStoreUrl: `https://example.com/?chrome-store-${id}`, - googlePlayStoreUrl: `https://example.com/?google-play-${id}`, - iOSAppStoreUrl: `https://example.com/?ios-${id}`, + ...(i % 2 === 0 && { + installPrompt: { + url: `https://example.com/?chrome-store-${id}`, + }, + }), }; }), }; diff --git a/src/lib/WalletProviderSelector/components/Divider.tsx b/src/lib/WalletProviderSelector/components/Divider.tsx index 14fb563..0bd1dcd 100644 --- a/src/lib/WalletProviderSelector/components/Divider.tsx +++ b/src/lib/WalletProviderSelector/components/Divider.tsx @@ -1,11 +1,13 @@ export function Divider() { return ( -
+
+
+
); } diff --git a/src/lib/WalletProviderSelector/components/RightPanelContainer.tsx b/src/lib/WalletProviderSelector/components/SidePanelContainer.tsx similarity index 75% rename from src/lib/WalletProviderSelector/components/RightPanelContainer.tsx rename to src/lib/WalletProviderSelector/components/SidePanelContainer.tsx index 2f270ef..aebcab8 100644 --- a/src/lib/WalletProviderSelector/components/RightPanelContainer.tsx +++ b/src/lib/WalletProviderSelector/components/SidePanelContainer.tsx @@ -1,6 +1,6 @@ import { ParentProps } from "solid-js"; -export function RightPanelContainer(props: ParentProps) { +export function SidePanelContainer(props: ParentProps) { return (
@@ -45,8 +44,8 @@ export function RightPanelInstallWalletPrompt(props: Props) { width: "64px", "object-fit": "cover", }} - src={props.provider.icon} - alt={props.provider.name} + src={props.option.icon} + alt={props.option.name} />

- Don't have {props.provider.name}? + Don't have {props.option.name}?

Download it on the Chrome web store.

- Opening {props.provider.name}... + Opening {props.option.name}...

-

- Confirm the operation in {props.provider.name} -

+

Confirm the operation in {props.option.name}

); diff --git a/src/lib/WalletProviderSelector/components/WalletProviderOption.tsx b/src/lib/WalletProviderSelector/components/WalletProviderOption.tsx index 89c0682..38de7b0 100644 --- a/src/lib/WalletProviderSelector/components/WalletProviderOption.tsx +++ b/src/lib/WalletProviderSelector/components/WalletProviderOption.tsx @@ -1,9 +1,9 @@ -import { SupportedWallet } from "@sats-connect/core"; import { createMemo, createSignal } from "solid-js"; import { bodyTextStyles } from "../../styles"; +import { TWalletProviderOption, hasInstallPrompt } from "../../utils"; -interface Props extends SupportedWallet { +interface Props extends TWalletProviderOption { onProviderSelected: (walletId: string) => void; } @@ -12,7 +12,7 @@ export function WalletProviderOption(props: Props) { props.onProviderSelected(props.id); } - const role = createMemo(() => (props.isInstalled ? "button" : "link")); + const role = createMemo(() => (hasInstallPrompt(props) ? "button" : "link")); function handleKeyDown(e: KeyboardEvent) { if (role() === "link") { diff --git a/src/lib/WalletProviderSelector/index.tsx b/src/lib/WalletProviderSelector/index.tsx index a711d2a..abf4550 100644 --- a/src/lib/WalletProviderSelector/index.tsx +++ b/src/lib/WalletProviderSelector/index.tsx @@ -1,15 +1,6 @@ import { Dialog } from "@ark-ui/solid"; -import { SupportedWallet } from "@sats-connect/core"; -import { - For, - Match, - Show, - Switch, - batch, - createSignal, - onCleanup, - onMount, -} from "solid-js"; +import { For, Match, Show, Switch, batch, onCleanup, onMount } from "solid-js"; +import { createSignal } from "solid-js"; import { cancel, @@ -20,45 +11,58 @@ import { walletOpen, } from "../constants"; import { bodyTextStyles, titleTextStyles } from "../styles"; -import { Config } from "../utils"; +import { + Config, + TWalletProviderOption, + hasInstallPrompt, + isInstalled, +} from "../utils"; import { CloseButton } from "./components/CloseButton"; import { CssReset } from "./components/CssReset"; import { Divider } from "./components/Divider"; -import { RightPanelContainer } from "./components/RightPanelContainer"; -import { RightPanelContentContainer } from "./components/RightPanelContentContainer"; -import { RightPanelExplainer } from "./components/RightPanelExplainer"; -import { RightPanelInstallWalletPrompt } from "./components/RightPanelInstallWalletPrompt"; -import { RightPanelOpeningWallet } from "./components/RightPanelOpeningWallet"; +import { SidePanelContainer } from "./components/SidePanelContainer"; +import { SidePanelContentContainer } from "./components/SidePanelContentContainer"; +import { SidePanelExplainer } from "./components/SidePanelExplainer"; +import { SidePanelInstallWalletPrompt } from "./components/SidePanelInstallWalletPrompt"; +import { SidePanelOpeningWallet } from "./components/SidePanelOpeningWallet"; import { WalletProviderOption } from "./components/WalletProviderOption"; -import { TRightPanelDisplay, TRightPanelInstallWalletPrompt } from "./types"; +import { TSidePanelDisplay, TSidePanelInstallWalletPrompt } from "./types"; import { openAppStore } from "./utils"; const cardRadius = "24px"; export function WalletProviderSelector() { - // Note: The user flow when clicking a wallet provider varies depending on - // whether the panel is displayed. - // - // - When the panel is not displayed, clicking an uninstalled wallet provider - // will automatically open the install URL. - // - When the panel is displayed, clicking an uninstalled wallet provider will - // display the install prompt in the right panel. - const [rightPanel, setRightPanel] = createSignal(); - function isDisplayingRightPanel() { - const panel = rightPanel(); - if (!panel) return false; - - return getComputedStyle(panel).display !== "none"; + const [root, setRoot] = createSignal(); + const [sidePanel, setSidePanel] = createSignal(); + + /** + * Checks if the side panel is showing. Used to determine the click behavior + * of wallet provider options. See + * [`option-click-behavior.md`](../../../docs/option-click-behavior.md) for + * details. + */ + function isShowingSidePanel() { + const rootEl = root(); + const sidePanelEl = sidePanel(); + if (!rootEl || !sidePanelEl) return false; + + if (!rootEl.contains(sidePanelEl)) return false; + + const displayStyle = getComputedStyle(sidePanelEl).display; + if (displayStyle === "none") return false; + + return true; } const [isVisible, setIsVisible] = createSignal(false); const [shouldRender, setShouldRender] = createSignal(false); - const [providers, setProviders] = createSignal>([]); - const [rightPanelDisplay, setRightPanelDisplay] = - createSignal({ type: "none" }); + const [options, setOptions] = createSignal>([]); + const [sidePanelConfig, setSidePanelConfig] = createSignal( + { type: "none" }, + ); - const hasAnyWalletInstalled = () => providers().some((p) => p.isInstalled); + const hasAnyWalletInstalled = () => options().some((p) => isInstalled(p)); const triggerFadeOut = () => setIsVisible(false); @@ -72,15 +76,15 @@ export function WalletProviderSelector() { } function handleWalletSelected(walletId: string) { - const provider = providers().find( + const option = options().find( (p) => p.id === walletId, - ) as SupportedWallet; + ) as TWalletProviderOption; - if (!provider.isInstalled) { - if (!isDisplayingRightPanel()) { - openAppStore(provider); + if (hasInstallPrompt(option)) { + if (!isShowingSidePanel()) { + openAppStore(option); } else { - setRightPanelDisplay({ type: "install-wallet-prompt", provider }); + setSidePanelConfig({ type: "install-wallet-prompt", option }); } return; } @@ -99,12 +103,12 @@ export function WalletProviderSelector() { setShouldRender(true); const providers = e.detail.providers; - setProviders(providers); + setOptions(providers); - if (providers.some((p) => p.isInstalled)) { - setRightPanelDisplay({ type: "explainer" }); + if (providers.some((p) => !p.installPrompt)) { + setSidePanelConfig({ type: "explainer" }); } else { - setRightPanelDisplay({ type: "none" }); + setSidePanelConfig({ type: "none" }); } }); } @@ -120,15 +124,17 @@ export function WalletProviderSelector() { }; function handleWalletOpen(e: CustomEvent) { - const providerId = e.detail; - setRightPanelDisplay({ + const optionId = e.detail; + setSidePanelConfig({ type: "opening-wallet", - provider: providers().find((p) => p.id === providerId) as SupportedWallet, + option: options().find( + (option) => option.id === optionId, + ) as TWalletProviderOption, }); } function handleWalletClose() { - setRightPanelDisplay({ type: "explainer" }); + setSidePanelConfig({ type: "explainer" }); } onMount(() => { @@ -162,8 +168,6 @@ export function WalletProviderSelector() { window.removeEventListener(close, handleClose); }); - const [root, setRoot] = createSignal(); - return (
- + root()?.getRootNode() as Node} @@ -333,7 +349,7 @@ export function WalletProviderSelector() { onAnimationEnd={handleAnimationEnd} >
-
+
- + {(provider) => (
- -
- -
+ + - -
- - + +
+ + - - + - - - + +
diff --git a/src/lib/WalletProviderSelector/types.ts b/src/lib/WalletProviderSelector/types.ts index 70ae907..73ab152 100644 --- a/src/lib/WalletProviderSelector/types.ts +++ b/src/lib/WalletProviderSelector/types.ts @@ -1,17 +1,17 @@ -import { SupportedWallet } from "@sats-connect/core"; +import { TWalletProviderOption } from "../utils"; -export type TRightPanelExplainer = { type: "explainer" }; -export type TRightPanelInstallWalletPrompt = { +export type TSidePanelExplainer = { type: "explainer" }; +export type TSidePanelInstallWalletPrompt = { type: "install-wallet-prompt"; - provider: SupportedWallet; + option: TWalletProviderOption; }; -export type TRightPanelNone = { type: "none" }; -export type TRightPanelOpeningWallet = { +export type TSidePanelNone = { type: "none" }; +export type TSidePanelOpeningWallet = { type: "opening-wallet"; - provider: SupportedWallet; + option: TWalletProviderOption; }; -export type TRightPanelDisplay = - | TRightPanelExplainer - | TRightPanelInstallWalletPrompt - | TRightPanelNone - | TRightPanelOpeningWallet; +export type TSidePanelDisplay = + | TSidePanelExplainer + | TSidePanelInstallWalletPrompt + | TSidePanelNone + | TSidePanelOpeningWallet; diff --git a/src/lib/WalletProviderSelector/utils.ts b/src/lib/WalletProviderSelector/utils.ts index 740c33c..6d7f122 100644 --- a/src/lib/WalletProviderSelector/utils.ts +++ b/src/lib/WalletProviderSelector/utils.ts @@ -1,5 +1,12 @@ -import { SupportedWallet } from "@sats-connect/core"; +import { TWalletProviderOption } from "../utils"; -export function openAppStore(provider: SupportedWallet) { - window.open(provider.chromeWebStoreUrl, "_blank"); +export function openAppStore(option: TWalletProviderOption) { + const url = option.installPrompt?.url; + + if (!url) { + console.error("No install prompt URL found for", option.id); + return; + } + + window.open(url, "_blank"); } diff --git a/src/lib/utils.ts b/src/lib/utils.ts index 87603fb..5f102cb 100644 --- a/src/lib/utils.ts +++ b/src/lib/utils.ts @@ -1,4 +1,3 @@ -import { Config } from "@sats-connect/core"; import { customElement } from "solid-element"; import { WalletProviderSelector } from "./WalletProviderSelector"; @@ -11,8 +10,6 @@ import { walletOpen as walletOpenEventName, } from "./constants"; -export type { Config } from "@sats-connect/core"; - export const elementId = "sats-connect-wallet-provider-selector"; export const elementName = elementId; @@ -47,6 +44,27 @@ export interface InstallPrompt { url: string; } +export interface InstallPrompt { + url: string; +} + +export interface TWalletProviderOption { + name: string; + id: string; + icon: string; + installPrompt?: InstallPrompt; +} + +export function hasInstallPrompt(option: TWalletProviderOption): boolean { + return !!option.installPrompt; +} + +export function isInstalled(option: TWalletProviderOption): boolean { + return !hasInstallPrompt(option); +} + +export type Config = { providers: Array }; + export function selectWalletProvider(config: Config): Promise { return new Promise((resolve, reject) => { const walletSelectorElement = getWalletProviderSelectorElement(); From 9d72713474010ee40b24cbd0a1f85b0744e719f5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eduard=20Bardaj=C3=AD=20Puig?= Date: Sat, 6 Apr 2024 17:59:49 +0200 Subject: [PATCH 2/5] Update types --- src/exampleApp/mocks.ts | 6 +++--- src/lib/WalletProviderSelector/index.tsx | 10 +++++----- src/lib/utils.ts | 2 +- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/exampleApp/mocks.ts b/src/exampleApp/mocks.ts index f0ba2d8..dc2841f 100644 --- a/src/exampleApp/mocks.ts +++ b/src/exampleApp/mocks.ts @@ -2,7 +2,7 @@ import { Config } from "../lib"; export function mockNoneInstalled(): Config { return { - providers: [ + options: [ { name: "Wallet 1", id: "wallet-1", @@ -25,7 +25,7 @@ export function mockNoneInstalled(): Config { export function mockSomeUninstalled(): Config { return { - providers: [ + options: [ { name: "Wallet 1", id: "wallet-1", @@ -45,7 +45,7 @@ export function mockSomeUninstalled(): Config { export function mockAllInstalled(): Config { return { - providers: [ + options: [ { name: "Wallet 1", id: "wallet-1", diff --git a/src/lib/WalletProviderSelector/index.tsx b/src/lib/WalletProviderSelector/index.tsx index abf4550..8583ba5 100644 --- a/src/lib/WalletProviderSelector/index.tsx +++ b/src/lib/WalletProviderSelector/index.tsx @@ -102,10 +102,10 @@ export function WalletProviderSelector() { setIsVisible(true); setShouldRender(true); - const providers = e.detail.providers; - setOptions(providers); + const options = e.detail.options; + setOptions(options); - if (providers.some((p) => !p.installPrompt)) { + if (options.some((p) => !p.installPrompt)) { setSidePanelConfig({ type: "explainer" }); } else { setSidePanelConfig({ type: "none" }); @@ -385,9 +385,9 @@ export function WalletProviderSelector() { data-desc="wallet grid container" > - {(provider) => ( + {(option) => ( )} diff --git a/src/lib/utils.ts b/src/lib/utils.ts index 5f102cb..d471241 100644 --- a/src/lib/utils.ts +++ b/src/lib/utils.ts @@ -63,7 +63,7 @@ export function isInstalled(option: TWalletProviderOption): boolean { return !hasInstallPrompt(option); } -export type Config = { providers: Array }; +export type Config = { options: Array }; export function selectWalletProvider(config: Config): Promise { return new Promise((resolve, reject) => { From d397640fecac7fee60d083adb4691367f161ff55 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eduard=20Bardaj=C3=AD=20Puig?= Date: Mon, 8 Apr 2024 09:47:26 +0200 Subject: [PATCH 3/5] Update prop --- src/exampleApp/mocks.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/exampleApp/mocks.ts b/src/exampleApp/mocks.ts index dc2841f..737d71f 100644 --- a/src/exampleApp/mocks.ts +++ b/src/exampleApp/mocks.ts @@ -63,7 +63,7 @@ export function mockAllInstalled(): Config { export function mockManySomeInstalled() { return { // 25 wallets - providers: Array.from({ length: 50 }, (_, i) => { + options: Array.from({ length: 50 }, (_, i) => { const id = `wallet-${i + 1}`; return { name: `Wallet ${i + 1}`, From dbb67f92708ec35c67b4af38a4f872cd53aa33e5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eduard=20Bardaj=C3=AD=20Puig?= Date: Mon, 8 Apr 2024 17:26:43 +0200 Subject: [PATCH 4/5] Add padding to selector grid --- src/lib/WalletProviderSelector/index.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/lib/WalletProviderSelector/index.tsx b/src/lib/WalletProviderSelector/index.tsx index 8583ba5..c008f01 100644 --- a/src/lib/WalletProviderSelector/index.tsx +++ b/src/lib/WalletProviderSelector/index.tsx @@ -264,10 +264,13 @@ export function WalletProviderSelector() { } .wallets-grid { - display: grid; grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); align-content: start; + + padding-left: 24px; + padding-right: 24px; + padding-bottom: 40px; } .divider { From dd68b0a69671a0d1e56d2a3bf4c14d84fe902aa3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eduard=20Bardaj=C3=AD=20Puig?= Date: Fri, 12 Apr 2024 10:53:58 +0200 Subject: [PATCH 5/5] Remove unused core package --- package-lock.json | 231 ---------------------------------------------- package.json | 3 - 2 files changed, 234 deletions(-) diff --git a/package-lock.json b/package-lock.json index 05f954b..9413a98 100644 --- a/package-lock.json +++ b/package-lock.json @@ -7,9 +7,6 @@ "": { "name": "@sats-connect/ui", "version": "0.0.3", - "dependencies": { - "@sats-connect/core": "0.0.4" - }, "devDependencies": { "@ark-ui/solid": "2.2.0", "@trivago/prettier-plugin-sort-imports": "4.3.0", @@ -828,28 +825,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/@noble/hashes": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/@noble/hashes/-/hashes-1.4.0.tgz", - "integrity": "sha512-V1JJ1WTRUqHHrOSh597hURcMqVKVGL/ea3kv0gSnEdsEZ0/+VyPghM1lMNGc00z7CIQorSvbKpuJkxvuHbvdbg==", - "engines": { - "node": ">= 16" - }, - "funding": { - "url": "https://paulmillr.com/funding/" - } - }, - "node_modules/@noble/secp256k1": { - "version": "1.7.1", - "resolved": "https://registry.npmjs.org/@noble/secp256k1/-/secp256k1-1.7.1.tgz", - "integrity": "sha512-hOUk6AyBFmqVrv7k5WAw/LpszxVbj9gGN4JRkIX52fdFAj1UA61KXmZDvqVEm+pOyec3+fIeZB02LYa/pWOArw==", - "funding": [ - { - "type": "individual", - "url": "https://paulmillr.com/funding/" - } - ] - }, "node_modules/@rollup/pluginutils": { "version": "5.1.0", "dev": true, @@ -967,18 +942,6 @@ "string-argv": "~0.3.1" } }, - "node_modules/@sats-connect/core": { - "version": "0.0.4", - "resolved": "https://registry.npmjs.org/@sats-connect/core/-/core-0.0.4.tgz", - "integrity": "sha512-v+u49OXku8S5Mh9wzQ6pSdNU4MppMjjUyXy/ZBE6KxqgP7Nnnz3N2VmaBSIGQx/EEy4O3L8SnJZyAwQ7QfOf7g==", - "dependencies": { - "axios": "1.6.8", - "bitcoin-address-validation": "2.2.3", - "buffer": "6.0.3", - "jsontokens": "4.0.1", - "lodash.omit": "4.5.0" - } - }, "node_modules/@swc/helpers": { "version": "0.5.6", "dev": true, @@ -2022,21 +1985,6 @@ "sprintf-js": "~1.0.2" } }, - "node_modules/asynckit": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", - "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==" - }, - "node_modules/axios": { - "version": "1.6.8", - "resolved": "https://registry.npmjs.org/axios/-/axios-1.6.8.tgz", - "integrity": "sha512-v/ZHtJDU39mDpyBoFVkETcd/uNdxrWRrg3bKpOKzXFA6Bvqopts6ALSMU3y6ijYxbw2B+wPrIv46egTzJXCLGQ==", - "dependencies": { - "follow-redirects": "^1.15.6", - "form-data": "^4.0.0", - "proxy-from-env": "^1.1.0" - } - }, "node_modules/babel-plugin-jsx-dom-expressions": { "version": "0.37.17", "dev": true, @@ -2092,48 +2040,6 @@ "dev": true, "license": "MIT" }, - "node_modules/base58-js": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/base58-js/-/base58-js-1.0.5.tgz", - "integrity": "sha512-LkkAPP8Zu+c0SVNRTRVDyMfKVORThX+rCViget00xdgLRrKkClCTz1T7cIrpr69ShwV5XJuuoZvMvJ43yURwkA==", - "engines": { - "node": ">= 8" - } - }, - "node_modules/base64-js": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", - "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ] - }, - "node_modules/bech32": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/bech32/-/bech32-2.0.0.tgz", - "integrity": "sha512-LcknSilhIGatDAsY1ak2I8VtGaHNhgMSYVxFrGLXv+xLHytaKZKcaUJJUE7qmBr7h33o5YQwP55pMI0xmkpJwg==" - }, - "node_modules/bitcoin-address-validation": { - "version": "2.2.3", - "resolved": "https://registry.npmjs.org/bitcoin-address-validation/-/bitcoin-address-validation-2.2.3.tgz", - "integrity": "sha512-1uGCGl26Ye8JG5qcExtFLQfuib6qEZWNDo1ZlLlwp/z7ygUFby3IxolgEfgMGaC+LG9csbVASLcH8fRLv7DIOg==", - "dependencies": { - "base58-js": "^1.0.0", - "bech32": "^2.0.0", - "sha256-uint8array": "^0.10.3" - } - }, "node_modules/brace-expansion": { "version": "2.0.1", "dev": true, @@ -2173,29 +2079,6 @@ "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7" } }, - "node_modules/buffer": { - "version": "6.0.3", - "resolved": "https://registry.npmjs.org/buffer/-/buffer-6.0.3.tgz", - "integrity": "sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA==", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "dependencies": { - "base64-js": "^1.3.1", - "ieee754": "^1.2.1" - } - }, "node_modules/caniuse-lite": { "version": "1.0.30001597", "dev": true, @@ -2249,17 +2132,6 @@ "node": ">=0.1.90" } }, - "node_modules/combined-stream": { - "version": "1.0.8", - "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", - "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", - "dependencies": { - "delayed-stream": "~1.0.0" - }, - "engines": { - "node": ">= 0.8" - } - }, "node_modules/commander": { "version": "10.0.1", "dev": true, @@ -2310,14 +2182,6 @@ } } }, - "node_modules/delayed-stream": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", - "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==", - "engines": { - "node": ">=0.4.0" - } - }, "node_modules/detect-libc": { "version": "1.0.3", "dev": true, @@ -2423,38 +2287,6 @@ "tabbable": "^6.2.0" } }, - "node_modules/follow-redirects": { - "version": "1.15.6", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.6.tgz", - "integrity": "sha512-wWN62YITEaOpSK584EZXJafH1AGpO8RVgElfkuXbTOrPX4fIfOyEpW/CsiNd8JdYrAoOvafRTOEnvsO++qCqFA==", - "funding": [ - { - "type": "individual", - "url": "https://github.com/sponsors/RubenVerborgh" - } - ], - "engines": { - "node": ">=4.0" - }, - "peerDependenciesMeta": { - "debug": { - "optional": true - } - } - }, - "node_modules/form-data": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz", - "integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==", - "dependencies": { - "asynckit": "^0.4.0", - "combined-stream": "^1.0.8", - "mime-types": "^2.1.12" - }, - "engines": { - "node": ">= 6" - } - }, "node_modules/fs-extra": { "version": "7.0.1", "dev": true, @@ -2548,25 +2380,6 @@ "dev": true, "license": "BSD-3-Clause" }, - "node_modules/ieee754": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", - "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ] - }, "node_modules/import-lazy": { "version": "4.0.0", "dev": true, @@ -2647,16 +2460,6 @@ "graceful-fs": "^4.1.6" } }, - "node_modules/jsontokens": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/jsontokens/-/jsontokens-4.0.1.tgz", - "integrity": "sha512-+MO415LEN6M+3FGsRz4wU20g7N2JA+2j9d9+pGaNJHviG4L8N0qzavGyENw6fJqsq9CcrHOIL6iWX5yeTZ86+Q==", - "dependencies": { - "@noble/hashes": "^1.1.2", - "@noble/secp256k1": "^1.6.3", - "base64-js": "^1.5.1" - } - }, "node_modules/klona": { "version": "2.0.6", "dev": true, @@ -2753,11 +2556,6 @@ "dev": true, "license": "MIT" }, - "node_modules/lodash.omit": { - "version": "4.5.0", - "resolved": "https://registry.npmjs.org/lodash.omit/-/lodash.omit-4.5.0.tgz", - "integrity": "sha512-XeqSp49hNGmlkj2EJlfrQFIzQ6lXdNro9sddtQzcJY8QaoC2GO0DT7xaIokHeyM+mIT0mPMlPvkYzg2xCuHdZg==" - }, "node_modules/lru-cache": { "version": "5.1.1", "dev": true, @@ -2793,25 +2591,6 @@ "url": "https://github.com/sponsors/mesqueeb" } }, - "node_modules/mime-db": { - "version": "1.52.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", - "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/mime-types": { - "version": "2.1.35", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", - "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", - "dependencies": { - "mime-db": "1.52.0" - }, - "engines": { - "node": ">= 0.6" - } - }, "node_modules/minimatch": { "version": "9.0.3", "dev": true, @@ -2930,11 +2709,6 @@ "dev": true, "license": "MIT" }, - "node_modules/proxy-from-env": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz", - "integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==" - }, "node_modules/punycode": { "version": "2.3.1", "dev": true, @@ -3017,11 +2791,6 @@ "seroval": "^1.0" } }, - "node_modules/sha256-uint8array": { - "version": "0.10.7", - "resolved": "https://registry.npmjs.org/sha256-uint8array/-/sha256-uint8array-0.10.7.tgz", - "integrity": "sha512-1Q6JQU4tX9NqsDGodej6pkrUVQVNapLZnvkwIhddH/JqzBZF1fSaxSWNY6sziXBE8aEa2twtGkXUrwzGeZCMpQ==" - }, "node_modules/solid-element": { "version": "1.8.0", "dev": true, diff --git a/package.json b/package.json index f16f9d5..eae5713 100644 --- a/package.json +++ b/package.json @@ -11,9 +11,6 @@ "build": "tsc && vite build", "build-app": "tsc && vite build --config vite.config.app.ts" }, - "dependencies": { - "@sats-connect/core": "0.0.4" - }, "devDependencies": { "@ark-ui/solid": "2.2.0", "@trivago/prettier-plugin-sort-imports": "4.3.0",