From 8f6cf9322db4bd39f16004ea6e1994b43d7fd7d1 Mon Sep 17 00:00:00 2001 From: ibro Date: Thu, 1 Aug 2024 11:40:24 +0100 Subject: [PATCH 1/5] migrating switch bundler to @svelte/package add svelte-preprocess to handle global styles --- packages/ui/package.json | 22 ++ .../ui/src/components/AccountModal.svelte | 5 +- .../ui/src/components/Common/Modal.svelte | 1 - .../ConnectModal/ConnectModal.svelte | 4 +- packages/ui/src/components/index.ts | 32 +- packages/ui/src/components/zorb/Zorb.svelte | 3 +- packages/ui/src/components/zorb/index.ts | 2 +- packages/ui/src/index.ts | 45 ++- packages/ui/src/styles/index.css | 41 +-- packages/ui/svelte.config.js | 8 +- pnpm-lock.yaml | 314 +++++++++++------- 11 files changed, 280 insertions(+), 197 deletions(-) diff --git a/packages/ui/package.json b/packages/ui/package.json index 804bd4b..0a6fff1 100644 --- a/packages/ui/package.json +++ b/packages/ui/package.json @@ -22,6 +22,21 @@ ".": { "types": "./dist/index.d.ts", "import": "./dist/index.js" + }, + "./svelte": { + "types": "./dist/components/index.d.ts", + "import": "./dist/components/index.js", + "svelte": "./dist/components/index.ts" + } + }, + "typesVersions": { + ">4.0": { + "index.d.ts": [ + "./dist/index.d.ts" + ], + "svelte": [ + "./dist/components/index.d.ts" + ] } }, "scripts": { @@ -32,18 +47,25 @@ "devDependencies": { "@fractl-ui/types": "workspace:^", "@melt-ui/svelte": "^0.67.0", + "@sveltejs/package": "^2.3.2", "@sveltejs/vite-plugin-svelte": "^3.0.1", "@tsconfig/svelte": "^5.0.2", "@types/qrcode": "^1.5.5", "@wagmi/core": "2.0.1", + "postcss": "^8.4.40", "postcss-preset-env": "^9.3.0", "qrcode": "^1.5.3", + "sass": "^1.77.8", "svelte": "^4.2.9", "svelte-check": "^3.6.3", + "svelte-preprocess": "^6.0.2", "tslib": "^2.6.2", "typescript": "^5.3.3", "viem": "2.0.1", "vite": "^5.0.12", "vite-plugin-dts": "^3.7.2" + }, + "peerDependencies": { + "svelte": "^3 || ^4 || ^5.0.0-next.180" } } diff --git a/packages/ui/src/components/AccountModal.svelte b/packages/ui/src/components/AccountModal.svelte index a0c893f..de8929e 100644 --- a/packages/ui/src/components/AccountModal.svelte +++ b/packages/ui/src/components/AccountModal.svelte @@ -1,5 +1,4 @@