Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build: minify tailwind #346

Draft
wants to merge 22 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .changeset/unlucky-geckos-doubt.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
'@stacks/connect-ui': minor
'@stacks/connect': minor
'@stacks/connect-react': minor
---

Add new UI to allow selecting which wallet to use
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -48,3 +48,5 @@ packages/connect-ui/connect
web-ext-artifacts

docs/

storybook-static/
4 changes: 4 additions & 0 deletions .prettierrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
module.exports = {
...require('@stacks/prettier-config'),
plugins: ['prettier-plugin-tailwindcss'],
};
2 changes: 1 addition & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"typescript.tsdk": "node_modules/typescript/lib"
}
}
10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
"workspaces": [
"packages/**"
],
"prettier": "@stacks/prettier-config",
"scripts": {
"build": "lerna run build",
"build:connect": "lerna run build --scope @stacks/connect",
Expand All @@ -30,7 +29,7 @@
"@stacks/eslint-config": "^2.0.0",
"@stacks/prettier-config": "^0.0.10",
"@stencil-community/eslint-plugin": "^0.5.0",
"concurrently": "^8.2.1",
"concurrently": "^8.2.2",
"eslint": "^8.49.0",
"eslint-import-resolver-typescript": "^3.6.0",
"eslint-plugin-import": "^2.28.1",
Expand All @@ -40,11 +39,12 @@
"eslint-plugin-unused-imports": "^3.0.0",
"husky": "^8.0.3",
"lerna": "^7.3.0",
"prettier": "^3.0.3",
"prettier": "^3.1.0",
"prettier-plugin-tailwindcss": "^0.5.7",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"tsup": "^7.2.0",
"typedoc": "^0.25.1",
"typescript": "^5.2.2"
"typedoc": "^0.25.3",
"typescript": "^5.3.2"
}
}
1 change: 0 additions & 1 deletion packages/connect-react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
"name": "@stacks/connect-react",
"version": "22.2.2",
"license": "MIT",
"prettier": "@stacks/prettier-config",
"scripts": {
"build": "concurrently 'tsup src/index.ts' 'yarn types'",
"prepublishOnly": "yarn build",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ enum States {
UPDATE_AUTH_OPTIONS = 'data/update-auth-options',
}

type Action = { type: string; payload?: any };
type Action = { type: States; payload?: any };

type Dispatch = (action: Action) => void;

Expand Down Expand Up @@ -35,7 +35,7 @@ const initialState: State = {
},
};

const connectReducer = (state: State, { type, payload }: { type: string; payload?: any }) => {
const connectReducer = (state: State, { type, payload }: { type: States; payload?: any }) => {
switch (type) {
case States.UPDATE_AUTH_OPTIONS: {
return {
Expand Down
10 changes: 8 additions & 2 deletions packages/connect-ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
"name": "@stacks/connect-ui",
"version": "6.1.3",
"license": "MIT",
"prettier": "@stacks/prettier-config",
"scripts": {
"build": "stencil build --docs",
"dev": "stencil build --dev --watch",
Expand All @@ -19,7 +18,14 @@
"devDependencies": {
"@stencil/sass": "^1.5.2",
"@types/node": "^14.6.0",
"puppeteer": "^9.0.0"
"autoprefixer": "^10.4.16",
"cssnano": "^6.0.1",
"postcss": "^8.4.31",
"postcss-import": "^15.1.0",
"postcss-rename": "^0.6.1",
"stencil-tailwind-plugin": "^1.8.0",
"tailwindcss": "^3.3.5",
"tailwindcss-animate": "^1.0.7"
},
"publishConfig": {
"access": "public"
Expand Down
9 changes: 9 additions & 0 deletions packages/connect-ui/postcss.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
// postcss.config.js
module.exports = {
plugins: [
require('postcss-import'),
require('tailwindcss'),
require('autoprefixer'),
require('cssnano')
]
};
9 changes: 7 additions & 2 deletions packages/connect-ui/src/components.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,12 @@
* It contains typing information for all components that exist in this project.
*/
import { HTMLStencilElement, JSXBase } from "@stencil/core/internal";
import { WebBTCProvider } from "./providers";
export namespace Components {
interface ConnectModal {
"authOptions": any;
"callback": Function;
"defaultProviders": WebBTCProvider[];
"installedProviders": WebBTCProvider[];
}
}
declare global {
Expand All @@ -23,7 +26,9 @@ declare global {
}
declare namespace LocalJSX {
interface ConnectModal {
"authOptions"?: any;
"callback"?: Function;
"defaultProviders"?: WebBTCProvider[];
"installedProviders"?: WebBTCProvider[];
}
interface IntrinsicElements {
"connect-modal": ConnectModal;
Expand Down
Binary file not shown.
Binary file not shown.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

11 changes: 11 additions & 0 deletions packages/connect-ui/src/components/modal/modal.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
:host {
all: initial;
}

.modal-body {
-ms-overflow-style: none;
scrollbar-width: none;
&::-webkit-scrollbar {
display: none;
}
}
196 changes: 0 additions & 196 deletions packages/connect-ui/src/components/modal/modal.scss

This file was deleted.

Loading