diff --git a/packages/core/package.json b/packages/core/package.json index 0cec766..4b85d9a 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -29,6 +29,9 @@ "dev": "vite build --watch", "test": "vitest" }, + "dependencies": { + "@module-federation/runtime": "^0.1.2" + }, "devDependencies": { "c8": "^7.12.0", "happy-dom": "^6.0.4", diff --git a/packages/core/src/StarknetWindowObject.ts b/packages/core/src/StarknetWindowObject.ts index ca6b002..cd97aaa 100644 --- a/packages/core/src/StarknetWindowObject.ts +++ b/packages/core/src/StarknetWindowObject.ts @@ -94,6 +94,7 @@ export interface IStarknetWindowObject { provider?: ProviderInterface | ProviderInterfaceV4 selectedAddress?: string chainId?: string + isConnected: boolean } export interface ConnectedStarknetWindowObject extends IStarknetWindowObject { @@ -118,6 +119,7 @@ declare global { starknet?: StarknetWindowObject starknet_braavos?: StarknetWindowObject starknet_argentX?: StarknetWindowObject + starknet_metamask?: StarknetWindowObject [key: `starknet_${string}`]: StarknetWindowObject | undefined } } diff --git a/packages/core/src/__test__/main.test.ts b/packages/core/src/__test__/main.test.ts index 8dd0500..52ff0ad 100644 --- a/packages/core/src/__test__/main.test.ts +++ b/packages/core/src/__test__/main.test.ts @@ -137,7 +137,7 @@ describe("getDiscoveryWallets()", () => { it("should return all discovery wallets", async () => { const sn = getWallet({}) const discoveryWallets = await sn.getDiscoveryWallets() - expect(discoveryWallets.length).toBe(3) + expect(discoveryWallets.length).toBe(4) expect(discoveryWallets.map((w) => w.id)).contains(ArgentXMock.id) expect(discoveryWallets.map((w) => w.id)).contains(BraavosMock.id) expect(discoveryWallets.map((w) => w.id)).contains(OKXMock.id) diff --git a/packages/core/src/discovery.ts b/packages/core/src/discovery.ts index e623843..8c08a58 100644 --- a/packages/core/src/discovery.ts +++ b/packages/core/src/discovery.ts @@ -44,6 +44,17 @@ const wallets: WalletProvider[] = [ safari: "https://apps.apple.com/us/app/okx-wallet/id6463797825", }, }, + { + id: "metamask", + name: "MetaMask", + icon: `data:image/svg+xml;utf8;base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wb2ludHM9IjcwLjMxMyAxMTIuNSA2NC4xMjUgMTI1LjQzOCA4Ni4wNjMgMTE5LjgxMyIgdHJhbnNmb3JtPSJtYXRyaXgoLTEgMCAwIDEgMTUwLjE4OCAwKSIvPjxwb2x5Z29uIGZpbGw9IiNFODhGMzUiIHBvaW50cz0iMTIuMzc1IC41NjMgODguODc1IDU4LjUgNzUuOTM4IDI3Ii8+PHBhdGggZmlsbD0iIzhFNUEzMCIgZD0iTTEyLjM3NTAwMDIsMC41NjI1MDAwMDggTDIuMjUwMDAwMDMsMzEuNTAwMDAwNSBMNy44NzUwMDAxMiw2NS4yNTAwMDEgTDMuOTM3NTAwMDYsNjcuNTAwMDAxIEw5LjU2MjUwMDE0LDcyLjU2MjUgTDUuMDYyNTAwMDgsNzYuNTAwMDAxMSBMMTEuMjUsODIuMTI1MDAxMiBMNy4zMTI1MDAxMSw4NS41MDAwMDEzIEwxNi4zMTI1MDAyLDk2Ljc1MDAwMTQgTDU4LjUwMDAwMDksODMuODEyNTAxMiBDNzkuMTI1MDAxMiw2Ny4zMTI1MDA0IDg5LjI1MDAwMTMsNTguODc1MDAwMyA4OC44NzUwMDEzLDU4LjUwMDAwMDkgQzg4LjUwMDAwMTMsNTguMTI1MDAwOSA2My4wMDAwMDA5LDM4LjgxMjUwMDYgMTIuMzc1MDAwMiwwLjU2MjUwMDAwOCBaIi8+PC9nPjwvZz48L3N2Zz4=`, + downloads: { + chrome: + "https://chrome.google.com/webstore/detail/metamask/nkbihfbeogaeaoehlefnkodbefgpgknn", + firefox: "https://addons.mozilla.org/en-US/firefox/addon/ether-metamask/", + edge: "https://microsoftedge.microsoft.com/addons/detail/metamask/ejbalbakoplchlghecdalmeeeajnimhm?hl=en-US", + }, + }, ] export default wallets diff --git a/packages/core/src/main.ts b/packages/core/src/main.ts index 16241b9..245a96e 100644 --- a/packages/core/src/main.ts +++ b/packages/core/src/main.ts @@ -7,6 +7,7 @@ import { IStorageWrapper, LocalStorageWrapper } from "./localStorageStore" import { pipe } from "./utils" import { FilterList, filterBy, filterByPreAuthorized } from "./wallet/filter" import { isWalletObj } from "./wallet/isWalletObject" +import { injectMetamaskBridge } from "./wallet/metamaskBridge" import { scanObjectForWallets } from "./wallet/scan" import { Sort, sortBy } from "./wallet/sort" @@ -75,6 +76,8 @@ export function getStarknet( } const lastConnectedStore = storageFactoryImplementation("gsw-last") + injectMetamaskBridge(windowObject) + return { getAvailableWallets: async (options = {}) => { const availableWallets = scanObjectForWallets( diff --git a/packages/core/src/wallet/metamaskBridge.ts b/packages/core/src/wallet/metamaskBridge.ts new file mode 100644 index 0000000..6462f58 --- /dev/null +++ b/packages/core/src/wallet/metamaskBridge.ts @@ -0,0 +1,197 @@ +import type { + IStarknetWindowObject, + RpcMessage, + StarknetWindowObject, + WalletEvents, +} from "../StarknetWindowObject" +import wallets, { WalletProvider } from "../discovery" +import { init, loadRemote } from "@module-federation/runtime" + +interface MetaMaskProvider { + isMetaMask: boolean + request(options: { method: string }): Promise +} + +function isMetaMaskProvider(obj: unknown): obj is MetaMaskProvider { + return ( + obj !== null && + typeof obj === "object" && + obj.hasOwnProperty("isMetaMask") && + obj.hasOwnProperty("request") + ) +} + +function detectMetaMaskProvider( + windowObject: Record, + { timeout = 3000 } = {}, +) { + let handled = false + return new Promise((resolve) => { + if (windowObject.ethereum) { + handleEthereum() + } else { + if (typeof windowObject.addEventListener === "function") { + windowObject.addEventListener("ethereum#initialized", handleEthereum, { + once: true, + }) + } + setTimeout(() => { + handleEthereum() + }, timeout) + } + function handleEthereum() { + if (handled) { + return + } + handled = true + if (typeof windowObject.removeEventListener === "function") { + windowObject.removeEventListener("ethereum#initialized", handleEthereum) + } + const { ethereum } = windowObject + if (isMetaMaskProvider(ethereum)) { + resolve(ethereum) + } else { + resolve(null) + } + } + }) +} + +async function waitForMetaMaskProvider( + windowObject: Record, + options: { timeout?: number; retries?: number } = {}, +): Promise { + const { timeout = 3000, retries = 0 } = options + + let provider: MetaMaskProvider | null = null + try { + provider = await detectMetaMaskProvider(windowObject, { timeout }) + } catch { + // Silent error - do nothing + } + + if (provider) { + return provider + } + + if (retries === 0) { + return null + } + + provider = await waitForMetaMaskProvider({ timeout, retries: retries - 1 }) + return provider +} + +async function detectMetamaskSupport(windowObject: Record) { + const provider = await waitForMetaMaskProvider(windowObject, { retries: 3 }) + return provider +} + +function createMetaMaskProviderWrapper( + walletInfo: WalletProvider, + provider: unknown, +): StarknetWindowObject { + let metaMaskSnapWallet: IStarknetWindowObject | undefined + const metaMaskProviderWrapper: IStarknetWindowObject = { + id: walletInfo.id, + name: walletInfo.name, + icon: walletInfo.icon, + get version() { + return metaMaskSnapWallet?.version ?? "0.0.0" + }, + get isConnected() { + return metaMaskSnapWallet?.isConnected ?? false + }, + get provider() { + return metaMaskSnapWallet?.provider + }, + get account() { + return metaMaskSnapWallet?.account + }, + get selectedAddress() { + return metaMaskSnapWallet?.selectedAddress + }, + get chainId() { + return metaMaskSnapWallet?.chainId + }, + request( + call: Omit, + ): Promise { + if (!metaMaskSnapWallet) { + throw new Error("Wallet not enabled") + } + return metaMaskSnapWallet.request(call) + }, + async enable(): Promise { + if (!metaMaskSnapWallet) { + await init({ + name: "MetaMaskStarknetSnapWallet", + remotes: [ + { + name: "MetaMaskStarknetSnapWallet", + alias: "MetaMaskStarknetSnapWallet", + entry: + "https://snaps.consensys.io/starknet/get-starknet/v1/remoteEntry.js", + }, + ], + }) + + const result = await loadRemote("MetaMaskStarknetSnapWallet/index") + + const { MetaMaskSnapWallet } = result as { + MetaMaskSnapWallet: any + MetaMaskSnap: any + } + + metaMaskSnapWallet = new MetaMaskSnapWallet(provider, "*") + } + + return await metaMaskSnapWallet!.enable() + }, + isPreauthorized() { + return metaMaskSnapWallet?.isPreauthorized() ?? Promise.resolve(false) + }, + on( + event: E["type"], + handleEvent: E["handler"], + ): void { + if (!metaMaskSnapWallet) { + throw new Error("Wallet not enabled") + } + // @ts-ignore: Metamask currently doesn't support on method + return metaMaskSnapWallet.on(event, handleEvent) + }, + off(event: E["type"], handleEvent: E["handler"]) { + if (!metaMaskSnapWallet) { + throw new Error("Wallet not enabled") + } + // @ts-ignore: Metamask currently doesn't support off method + return metaMaskSnapWallet.off(event, handleEvent) + }, + } + + return metaMaskProviderWrapper as StarknetWindowObject +} + +async function injectMetamaskBridge(windowObject: Record) { + if (window.hasOwnProperty("starknet_metamask")) { + return + } + + const metamaskWalletInfo = wallets.find((wallet) => wallet.id === "metamask") + if (!metamaskWalletInfo) { + return + } + + const provider = await detectMetamaskSupport(windowObject) + if (!provider) { + return + } + + window.starknet_metamask = createMetaMaskProviderWrapper( + metamaskWalletInfo, + provider, + ) +} + +export { injectMetamaskBridge } diff --git a/packages/ui/package.json b/packages/ui/package.json index 4f33159..9263666 100644 --- a/packages/ui/package.json +++ b/packages/ui/package.json @@ -37,7 +37,7 @@ "@sveltejs/vite-plugin-svelte": "^1.0.1", "@tsconfig/svelte": "^3.0.0", "autoprefixer": "^10.4.7", - "postcss": "^8.4.14", + "postcss": "^8.4.21", "svelte": "^3.49.0", "svelte-check": "^2.8.0", "svelte-preprocess": "^4.10.7", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index f79396e..be4aeea 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -65,6 +65,10 @@ importers: version: 3.0.0 packages/core: + dependencies: + '@module-federation/runtime': + specifier: ^0.1.2 + version: 0.1.2 devDependencies: c8: specifier: ^7.12.0 @@ -86,7 +90,7 @@ importers: version: 3.0.0 vite-plugin-dts: specifier: ^1.4.0 - version: 1.4.0(@types/node@20.3.1)(vite@3.0.0) + version: 1.4.0(vite@3.0.0) vitest: specifier: ^0.19.1 version: 0.19.1(c8@7.12.0)(happy-dom@6.0.4) @@ -108,22 +112,22 @@ importers: version: 3.0.0 autoprefixer: specifier: ^10.4.7 - version: 10.4.7(postcss@8.4.14) + version: 10.4.7(postcss@8.4.32) postcss: - specifier: ^8.4.14 - version: 8.4.14 + specifier: ^8.4.21 + version: 8.4.32 svelte: specifier: ^3.49.0 version: 3.49.0 svelte-check: specifier: ^2.8.0 - version: 2.8.0(@babel/core@7.17.8)(postcss@8.4.14)(svelte@3.49.0) + version: 2.8.0(@babel/core@7.17.8)(postcss@8.4.32)(svelte@3.49.0) svelte-preprocess: specifier: ^4.10.7 - version: 4.10.7(@babel/core@7.17.8)(postcss@8.4.14)(svelte@3.49.0)(typescript@4.6.4) + version: 4.10.7(@babel/core@7.17.8)(postcss@8.4.32)(svelte@3.49.0)(typescript@4.6.4) tailwindcss: specifier: ^3.1.6 - version: 3.1.6(postcss@8.4.14)(ts-node@10.9.1) + version: 3.1.6(postcss@8.4.32)(ts-node@10.9.1) tslib: specifier: ^2.4.0 version: 2.4.0 @@ -959,6 +963,16 @@ packages: read-yaml-file: 1.1.0 dev: true + /@microsoft/api-extractor-model@7.27.3: + resolution: {integrity: sha512-fSFvw7otYHduOkyshjTbapKKgwF8bgquVHvgF8VgeKtMYvqXkoaj7W6VcM7PNY7E2bbblhUgC4XNdqZLD4SJGw==} + dependencies: + '@microsoft/tsdoc': 0.14.2 + '@microsoft/tsdoc-config': 0.16.2 + '@rushstack/node-core-library': 3.59.4 + transitivePeerDependencies: + - '@types/node' + dev: true + /@microsoft/api-extractor-model@7.27.3(@types/node@20.3.1): resolution: {integrity: sha512-fSFvw7otYHduOkyshjTbapKKgwF8bgquVHvgF8VgeKtMYvqXkoaj7W6VcM7PNY7E2bbblhUgC4XNdqZLD4SJGw==} dependencies: @@ -969,6 +983,26 @@ packages: - '@types/node' dev: true + /@microsoft/api-extractor@7.36.0: + resolution: {integrity: sha512-P+kYgJFDXIr+UNzhRMhlpM/dderi6ab4lxn35vdhfAIMPtGCSXIJxrrtpTOQmQW8CZtmoZX06LYoUsKCc1zjow==} + hasBin: true + dependencies: + '@microsoft/api-extractor-model': 7.27.3 + '@microsoft/tsdoc': 0.14.2 + '@microsoft/tsdoc-config': 0.16.2 + '@rushstack/node-core-library': 3.59.4 + '@rushstack/rig-package': 0.4.0 + '@rushstack/ts-command-line': 4.15.1 + colors: 1.2.5 + lodash: 4.17.21 + resolve: 1.22.2 + semver: 7.3.8 + source-map: 0.6.1 + typescript: 5.0.4 + transitivePeerDependencies: + - '@types/node' + dev: true + /@microsoft/api-extractor@7.36.0(@types/node@20.3.1): resolution: {integrity: sha512-P+kYgJFDXIr+UNzhRMhlpM/dderi6ab4lxn35vdhfAIMPtGCSXIJxrrtpTOQmQW8CZtmoZX06LYoUsKCc1zjow==} hasBin: true @@ -1002,6 +1036,16 @@ packages: resolution: {integrity: sha512-9b8mPpKrfeGRuhFH5iO1iwCLeIIsV6+H1sRfxbkoGXIyQE2BTsPd9zqSqQJ+pv5sJ/hT5M1zvOFL02MnEezFug==} dev: true + /@module-federation/runtime@0.1.2: + resolution: {integrity: sha512-KdTL2aR48p+hOdMuim5osN15xkxzm1ccyXnvqR6TSl61r+chq7qFhU124JQYDU/SSkmbRm7Fb53IaaXo/PjKQw==} + dependencies: + '@module-federation/sdk': 0.1.2 + dev: false + + /@module-federation/sdk@0.1.2: + resolution: {integrity: sha512-G9af5sV/yyz5EpHOpg+y5gtDxomT6T1c7KETMs9k76GOcHKGBAoqiC8RJimgncN6O2wPhiBKEvNjf9VxrrX+gw==} + dev: false + /@noble/curves@1.0.0: resolution: {integrity: sha512-2upgEu0iLiDVDZkNLeFV2+ht0BAVgQnEmCk6JsOch9Rp8xfkMCbvbAZlA2pBHQc73dbl+vFOXfqkf4uemdn0bw==} dependencies: @@ -1054,6 +1098,23 @@ packages: picomatch: 2.3.1 dev: true + /@rushstack/node-core-library@3.59.4: + resolution: {integrity: sha512-YAKJDC6Mz/KA1D7bvB88WaRX3knt/ZuLzkRu5G9QADGSjLtvTWzCNCytRF2PCSaaHOZaZsWul4F1KQdgFgUDqA==} + peerDependencies: + '@types/node': '*' + peerDependenciesMeta: + '@types/node': + optional: true + dependencies: + colors: 1.2.5 + fs-extra: 7.0.1 + import-lazy: 4.0.0 + jju: 1.4.0 + resolve: 1.22.2 + semver: 7.3.8 + z-schema: 5.0.5 + dev: true + /@rushstack/node-core-library@3.59.4(@types/node@20.3.1): resolution: {integrity: sha512-YAKJDC6Mz/KA1D7bvB88WaRX3knt/ZuLzkRu5G9QADGSjLtvTWzCNCytRF2PCSaaHOZaZsWul4F1KQdgFgUDqA==} peerDependencies: @@ -1485,7 +1546,7 @@ packages: resolution: {integrity: sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==} dev: true - /autoprefixer@10.4.7(postcss@8.4.14): + /autoprefixer@10.4.7(postcss@8.4.32): resolution: {integrity: sha512-ypHju4Y2Oav95SipEcCcI5J7CGPuvz8oat7sUtYj3ClK44bldfvtvcxK6IEK++7rqB7YchDGzweZIBG+SD0ZAA==} engines: {node: ^10 || ^12 || >=14} hasBin: true @@ -1497,7 +1558,7 @@ packages: fraction.js: 4.2.0 normalize-range: 0.1.2 picocolors: 1.0.0 - postcss: 8.4.14 + postcss: 8.4.32 postcss-value-parser: 4.2.0 dev: true @@ -1805,6 +1866,7 @@ packages: /commander@9.5.0: resolution: {integrity: sha512-KRs7WVDKg86PWiuAqhDrAQnTXZKraVcCc6vFdL14qrZ/DcWwuRo7VoiYXalXO7S5GKpqYiVEwCbgFDfxNHKJBQ==} engines: {node: ^12.20.0 || >=14} + requiresBuild: true dev: true /compare-func@2.0.0: @@ -3614,6 +3676,12 @@ packages: hasBin: true dev: true + /nanoid@3.3.7: + resolution: {integrity: sha512-eSRppjcPIatRIMC1U6UngP8XFcz8MQWGQdt1MTBQ7NaAmvXDfvNxbvWV3x2y6CdEUciCSsDHDQZbhYaB8QEo2g==} + engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1} + hasBin: true + dev: true + /node-fetch@2.6.11: resolution: {integrity: sha512-4I6pdBY1EthSqDmJkiNk3JIT8cswwR9nfeW/cPdUagJYEQG7R95WRH74wpz7ma8Gh/9dI9FP+OU+0E4FvtA55w==} engines: {node: 4.x || >=6.0.0} @@ -3872,29 +3940,29 @@ packages: find-up: 4.1.0 dev: true - /postcss-import@14.1.0(postcss@8.4.14): + /postcss-import@14.1.0(postcss@8.4.32): resolution: {integrity: sha512-flwI+Vgm4SElObFVPpTIT7SU7R3qk2L7PyduMcokiaVKuWv9d/U+Gm/QAd8NDLuykTWTkcrjOeD2Pp1rMeBTGw==} engines: {node: '>=10.0.0'} peerDependencies: postcss: ^8.0.0 dependencies: - postcss: 8.4.14 + postcss: 8.4.32 postcss-value-parser: 4.2.0 read-cache: 1.0.0 resolve: 1.22.2 dev: true - /postcss-js@4.0.1(postcss@8.4.14): + /postcss-js@4.0.1(postcss@8.4.32): resolution: {integrity: sha512-dDLF8pEO191hJMtlHFPRa8xsizHaM82MLfNkUHdUtVEV3tgTp5oj+8qbEqYM57SLfc74KSbw//4SeJma2LRVIw==} engines: {node: ^12 || ^14 || >= 16} peerDependencies: postcss: ^8.4.21 dependencies: camelcase-css: 2.0.1 - postcss: 8.4.14 + postcss: 8.4.32 dev: true - /postcss-load-config@3.1.4(postcss@8.4.14)(ts-node@10.9.1): + /postcss-load-config@3.1.4(postcss@8.4.32)(ts-node@10.9.1): resolution: {integrity: sha512-6DiM4E7v4coTE4uzA8U//WhtPwyhiim3eyjEMFCnUpzbrkK9wJHgKDT2mR+HbtSrd/NubVaYTOpSpjUl8NQeRg==} engines: {node: '>= 10'} peerDependencies: @@ -3907,18 +3975,18 @@ packages: optional: true dependencies: lilconfig: 2.1.0 - postcss: 8.4.14 + postcss: 8.4.32 ts-node: 10.9.1(@types/node@20.3.1)(typescript@4.6.4) yaml: 1.10.2 dev: true - /postcss-nested@5.0.6(postcss@8.4.14): + /postcss-nested@5.0.6(postcss@8.4.32): resolution: {integrity: sha512-rKqm2Fk0KbA8Vt3AdGN0FB9OBOMDVajMG6ZCf/GoHgdxUJ4sBFp0A/uMIRm+MJUdo33YXEtjqIz8u7DAp8B7DA==} engines: {node: '>=12.0'} peerDependencies: postcss: ^8.2.14 dependencies: - postcss: 8.4.14 + postcss: 8.4.32 postcss-selector-parser: 6.0.13 dev: true @@ -3943,6 +4011,15 @@ packages: source-map-js: 1.0.2 dev: true + /postcss@8.4.32: + resolution: {integrity: sha512-D/kj5JNu6oo2EIy+XL/26JEDTlIbB8hw85G8StOE6L74RQAVVP5rej6wxCNqyMbR4RkPfqvezVbPw81Ngd6Kcw==} + engines: {node: ^10 || ^12 || >=14} + dependencies: + nanoid: 3.3.7 + picocolors: 1.0.0 + source-map-js: 1.0.2 + dev: true + /preferred-pm@3.0.3: resolution: {integrity: sha512-+wZgbxNES/KlJs9q40F/1sfOd/j7f1O9JaHcW5Dsn3aUUOZg3L2bjpVUcKV2jvtElYfoTuQiNeMfQJ4kwUAhCQ==} engines: {node: '>=10'} @@ -4645,7 +4722,7 @@ packages: engines: {node: '>= 0.4'} dev: true - /svelte-check@2.8.0(@babel/core@7.17.8)(postcss@8.4.14)(svelte@3.49.0): + /svelte-check@2.8.0(@babel/core@7.17.8)(postcss@8.4.32)(svelte@3.49.0): resolution: {integrity: sha512-HRL66BxffMAZusqe5I5k26mRWQ+BobGd9Rxm3onh7ZVu0nTk8YTKJ9vu3LVPjUGLU9IX7zS+jmwPVhJYdXJ8vg==} hasBin: true peerDependencies: @@ -4658,7 +4735,7 @@ packages: picocolors: 1.0.0 sade: 1.8.1 svelte: 3.49.0 - svelte-preprocess: 4.10.7(@babel/core@7.17.8)(postcss@8.4.14)(svelte@3.49.0)(typescript@4.6.4) + svelte-preprocess: 4.10.7(@babel/core@7.17.8)(postcss@8.4.32)(svelte@3.49.0)(typescript@4.6.4) typescript: 4.6.4 transitivePeerDependencies: - '@babel/core' @@ -4682,7 +4759,7 @@ packages: svelte: 3.49.0 dev: true - /svelte-preprocess@4.10.7(@babel/core@7.17.8)(postcss@8.4.14)(svelte@3.49.0)(typescript@4.6.4): + /svelte-preprocess@4.10.7(@babel/core@7.17.8)(postcss@8.4.32)(svelte@3.49.0)(typescript@4.6.4): resolution: {integrity: sha512-sNPBnqYD6FnmdBrUmBCaqS00RyCsCpj2BG58A1JBswNF7b0OKviwxqVrOL/CKyJrLSClrSeqQv5BXNg2RUbPOw==} engines: {node: '>= 9.11.2'} requiresBuild: true @@ -4728,7 +4805,7 @@ packages: '@types/sass': 1.45.0 detect-indent: 6.1.0 magic-string: 0.25.9 - postcss: 8.4.14 + postcss: 8.4.32 sorcery: 0.10.0 strip-indent: 3.0.0 svelte: 3.49.0 @@ -4755,7 +4832,7 @@ packages: get-port: 3.2.0 dev: true - /tailwindcss@3.1.6(postcss@8.4.14)(ts-node@10.9.1): + /tailwindcss@3.1.6(postcss@8.4.32)(ts-node@10.9.1): resolution: {integrity: sha512-7skAOY56erZAFQssT1xkpk+kWt2NrO45kORlxFPXUt3CiGsVPhH1smuH5XoDH6sGPXLyBv+zgCKA2HWBsgCytg==} engines: {node: '>=12.13.0'} hasBin: true @@ -4775,11 +4852,11 @@ packages: normalize-path: 3.0.0 object-hash: 3.0.0 picocolors: 1.0.0 - postcss: 8.4.14 - postcss-import: 14.1.0(postcss@8.4.14) - postcss-js: 4.0.1(postcss@8.4.14) - postcss-load-config: 3.1.4(postcss@8.4.14)(ts-node@10.9.1) - postcss-nested: 5.0.6(postcss@8.4.14) + postcss: 8.4.32 + postcss-import: 14.1.0(postcss@8.4.32) + postcss-js: 4.0.1(postcss@8.4.32) + postcss-load-config: 3.1.4(postcss@8.4.32)(ts-node@10.9.1) + postcss-nested: 5.0.6(postcss@8.4.32) postcss-selector-parser: 6.0.13 postcss-value-parser: 4.2.0 quick-lru: 5.1.1 @@ -5075,6 +5152,25 @@ packages: - supports-color dev: true + /vite-plugin-dts@1.4.0(vite@3.0.0): + resolution: {integrity: sha512-RyDCjQzVxUeDqF+Rl1hQT+t/rKmvfvo04gaGV/l3597FpeIWGKtNF1S4x509Kx1AfHOjLa1JdmjVgnSEIv+lpw==} + engines: {node: '>=12.0.0'} + peerDependencies: + vite: '>=2.4.4' + dependencies: + '@microsoft/api-extractor': 7.36.0 + '@rushstack/node-core-library': 3.59.4 + chalk: 4.1.2 + debug: 4.3.4 + fast-glob: 3.2.12 + fs-extra: 10.1.0 + ts-morph: 14.0.0 + vite: 3.0.0 + transitivePeerDependencies: + - '@types/node' + - supports-color + dev: true + /vite@3.0.0: resolution: {integrity: sha512-M7phQhY3+fRZa0H+1WzI6N+/onruwPTBTMvaj7TzgZ0v2TE+N2sdLKxJOfOv9CckDWt5C4HmyQP81xB4dwRKzA==} engines: {node: '>=14.18.0'}