Skip to content

Commit

Permalink
Merge branch 'main' into update-upload-component-with-editor
Browse files Browse the repository at this point in the history
  • Loading branch information
albertfolch-redeemeum committed Jun 11, 2024
2 parents 3e72d4b + a14ce87 commit 1601363
Show file tree
Hide file tree
Showing 12 changed files with 155 additions and 43 deletions.
4 changes: 2 additions & 2 deletions e2e/meta-tx-gateway/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "meta-tx-gateway",
"version": "1.7.8-alpha.3",
"version": "1.7.8-alpha.5",
"description": "",
"main": "index.js",
"private": true,
Expand All @@ -23,7 +23,7 @@
},
"homepage": "https://github.com/bosonprotocol/core-components#readme",
"dependencies": {
"@bosonprotocol/common": "^1.28.0-alpha.3",
"@bosonprotocol/common": "^1.28.0-alpha.5",
"cors": "^2.8.5",
"dotenv": "^16.0.2",
"ethers": "^5.7.0",
Expand Down
4 changes: 2 additions & 2 deletions e2e/opensea-api-mock/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "opensea-api-mock",
"version": "1.0.3-alpha.3",
"version": "1.0.3-alpha.5",
"description": "",
"main": "index.js",
"private": true,
Expand All @@ -23,7 +23,7 @@
},
"homepage": "https://github.com/bosonprotocol/core-components#readme",
"dependencies": {
"@bosonprotocol/common": "^1.28.0-alpha.3",
"@bosonprotocol/common": "^1.28.0-alpha.5",
"@opensea/seaport-js": "^4.0.0",
"cors": "^2.8.5",
"dotenv": "^16.0.2",
Expand Down
28 changes: 14 additions & 14 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion packages/common/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@bosonprotocol/common",
"version": "1.28.0-alpha.3",
"version": "1.28.0-alpha.5",
"description": "Common configs, types, interfaces and utilities shared by the core components of the Boson Protocol.",
"main": "./dist/cjs/index.js",
"module": "./dist/esm/index.js",
Expand Down
12 changes: 6 additions & 6 deletions packages/common/src/configs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ export const envConfigs: Record<EnvironmentType, ProtocolConfig[]> = {
nativeCoin: chainIdToInfo.get(80002),
getTxExplorerUrl: chainIdToGraphTx.get(80002),
subgraphUrl:
"https://api.studio.thegraph.com/query/71250/llx-amoy-testing/v0.0.1",
"https://api.studio.thegraph.com/query/19713/boson-testing-amoy/v0.0.1",
jsonRpcUrl:
"https://polygon-amoy.infura.io/v3/b832a48b9bce4aa6bd9da86eb0126300",
theGraphIpfsUrl: "https://api.thegraph.com/ipfs/api/v0",
Expand Down Expand Up @@ -82,7 +82,7 @@ export const envConfigs: Record<EnvironmentType, ProtocolConfig[]> = {
nativeCoin: chainIdToInfo.get(11155111),
getTxExplorerUrl: chainIdToGraphTx.get(11155111),
subgraphUrl:
"https://api.thegraph.com/subgraphs/name/bosonprotocol/sepolia-testing",
"https://api.studio.thegraph.com/query/19713/boson-testing-sepolia/v0.0.1",
jsonRpcUrl:
"https://sepolia.infura.io/v3/b832a48b9bce4aa6bd9da86eb0126300",
theGraphIpfsUrl: "https://api.thegraph.com/ipfs/api/v0",
Expand All @@ -109,7 +109,7 @@ export const envConfigs: Record<EnvironmentType, ProtocolConfig[]> = {
nativeCoin: chainIdToInfo.get(80002),
getTxExplorerUrl: chainIdToGraphTx.get(80002),
subgraphUrl:
"https://api.studio.thegraph.com/query/71250/llx-amoy-staging/v0.0.1",
"https://api.studio.thegraph.com/query/19713/boson-staging-amoy/v0.0.1",
jsonRpcUrl:
"https://polygon-amoy.infura.io/v3/b832a48b9bce4aa6bd9da86eb0126300",
theGraphIpfsUrl: "https://api.thegraph.com/ipfs/api/v0",
Expand Down Expand Up @@ -138,7 +138,7 @@ export const envConfigs: Record<EnvironmentType, ProtocolConfig[]> = {
nativeCoin: chainIdToInfo.get(11155111),
getTxExplorerUrl: chainIdToGraphTx.get(11155111),
subgraphUrl:
"https://api.thegraph.com/subgraphs/name/bosonprotocol/sepolia-staging",
"https://api.studio.thegraph.com/query/19713/boson-staging-sepolia/v0.0.1",
jsonRpcUrl:
"https://sepolia.infura.io/v3/b832a48b9bce4aa6bd9da86eb0126300",
theGraphIpfsUrl: "https://api.thegraph.com/ipfs/api/v0",
Expand All @@ -165,7 +165,7 @@ export const envConfigs: Record<EnvironmentType, ProtocolConfig[]> = {
nativeCoin: chainIdToInfo.get(137),
getTxExplorerUrl: chainIdToGraphTx.get(137),
subgraphUrl:
"https://api.thegraph.com/subgraphs/name/bosonprotocol/polygon",
"https://api.studio.thegraph.com/query/19713/boson-polygon/v0.0.1",
jsonRpcUrl:
"https://polygon-mainnet.infura.io/v3/383117b55d614525b07f03b5979c5f19",
theGraphIpfsUrl: "https://api.thegraph.com/ipfs/api/v0",
Expand Down Expand Up @@ -194,7 +194,7 @@ export const envConfigs: Record<EnvironmentType, ProtocolConfig[]> = {
nativeCoin: chainIdToInfo.get(1),
getTxExplorerUrl: chainIdToGraphTx.get(1),
subgraphUrl:
"https://api.thegraph.com/subgraphs/name/bosonprotocol/ethereum",
"https://api.studio.thegraph.com/query/19713/boson-ethereum/v0.0.1",
jsonRpcUrl:
"https://mainnet.infura.io/v3/b5b499e704f840b5b84b0580466d658e",
theGraphIpfsUrl: "https://api.thegraph.com/ipfs/api/v0",
Expand Down
4 changes: 2 additions & 2 deletions packages/core-sdk/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@bosonprotocol/core-sdk",
"version": "1.40.4-alpha.3",
"version": "1.40.4-alpha.5",
"description": "Facilitates interaction with the contracts and subgraphs of the Boson Protocol",
"main": "./dist/cjs/index.js",
"module": "./dist/esm/index.js",
Expand Down Expand Up @@ -35,7 +35,7 @@
"access": "public"
},
"dependencies": {
"@bosonprotocol/common": "^1.28.0-alpha.3",
"@bosonprotocol/common": "^1.28.0-alpha.5",
"@ethersproject/abi": "^5.5.0",
"@ethersproject/address": "^5.5.0",
"@ethersproject/bignumber": "^5.5.0",
Expand Down
4 changes: 2 additions & 2 deletions packages/eth-connect-sdk/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@bosonprotocol/eth-connect-sdk",
"version": "1.6.7-alpha.3",
"version": "1.6.7-alpha.5",
"description": "Implementation of the Web3LibAdapter interface and contract abstractions targeting eth-connect for the Boson Protocol.",
"main": "./dist/cjs/index.js",
"module": "./dist/esm/index.js",
Expand Down Expand Up @@ -31,7 +31,7 @@
"access": "public"
},
"dependencies": {
"@bosonprotocol/common": "^1.28.0-alpha.3"
"@bosonprotocol/common": "^1.28.0-alpha.5"
},
"devDependencies": {
"eslint": "^8.10.0",
Expand Down
4 changes: 2 additions & 2 deletions packages/ethers-sdk/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@bosonprotocol/ethers-sdk",
"version": "1.14.4-alpha.3",
"version": "1.14.4-alpha.5",
"description": "Implementation of the Web3LibAdapter interface and contract abstractions targeting ethers for the Boson Protocol.",
"main": "./dist/cjs/index.js",
"module": "./dist/esm/index.js",
Expand Down Expand Up @@ -32,7 +32,7 @@
"access": "public"
},
"dependencies": {
"@bosonprotocol/common": "^1.28.0-alpha.3"
"@bosonprotocol/common": "^1.28.0-alpha.5"
},
"devDependencies": {
"@typechain/ethers-v5": "^9.0.0",
Expand Down
6 changes: 3 additions & 3 deletions packages/react-kit/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@bosonprotocol/react-kit",
"description": "React toolkit with smart components and hooks for building on top of the Boson Protocol.",
"version": "0.32.0-alpha.5",
"version": "0.32.0-alpha.7",
"main": "./dist/cjs/index.js",
"module": "./dist/esm/index.js",
"types": "./dist/cjs/index.d.ts",
Expand All @@ -15,8 +15,8 @@
"license": "Apache-2.0",
"dependencies": {
"@bosonprotocol/chat-sdk": "^1.3.1-alpha.9",
"@bosonprotocol/core-sdk": "^1.40.4-alpha.3",
"@bosonprotocol/ethers-sdk": "^1.14.4-alpha.3",
"@bosonprotocol/core-sdk": "^1.40.4-alpha.5",
"@bosonprotocol/ethers-sdk": "^1.14.4-alpha.5",
"@bosonprotocol/ipfs-storage": "^1.11.3",
"@davatar/react": "1.11.1",
"@ethersproject/units": "5.6.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -483,9 +483,11 @@ function RedeemNonModal({
return jsx;
}
const deliveryAddressVar =
process?.env?.REACT_APP_DELIVERY_ADDRESS_MOCK ||
// @ts-expect-error import.meta.env only exists in vite environments
import.meta?.env?.REACT_APP_DELIVERY_ADDRESS_MOCK;
typeof process !== "undefined"
? process?.env?.REACT_APP_DELIVERY_ADDRESS_MOCK || // @ts-expect-error import.meta.env only exists in vite environments
import.meta?.env?.REACT_APP_DELIVERY_ADDRESS_MOCK
: // @ts-expect-error import.meta.env only exists in vite environments
import.meta?.env?.REACT_APP_DELIVERY_ADDRESS_MOCK;
const mockedDeliveryAddress = deliveryAddressVar
? JSON.parse(deliveryAddressVar)
: undefined;
Expand Down
110 changes: 110 additions & 0 deletions packages/react-kit/src/stories/buttons/Button2.stories.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,110 @@
import { fn } from "@storybook/test";
import { Button } from "../../components/buttons/Button";
import React from "react";
import { Meta } from "@storybook/react";

// More on default export: https://storybook.js.org/docs/react/writing-stories/introduction#default-export
export default {
title: "Visual Components/Buttons/Button",
component: Button,
parameters: {
// Optional parameter to center the component in the Canvas. More info: https://storybook.js.org/docs/configure/story-layout
layout: "centered"
},
// This component will have an automatically generated Autodocs entry: https://storybook.js.org/docs/writing-docs/autodocs
tags: ["autodocs"],
args: { onClick: fn() },
argTypes: {
disabled: { control: "boolean" },
size: {
control: "select",
options: ["small", "regular", "large"]
},
children: { control: "text" },
tooltip: { control: "text" }
},
decorators: [
(Story) => {
return <Story />;
}
]
} satisfies Meta<typeof Button>;

const BASE_ARGS = {
children: "Button Text",
size: "regular",
tooltip: "tooltip shown when disabled only"
} as const;

// More on args: https://storybook.js.org/docs/react/writing-stories/args
export const PrimaryFill = {
args: {
...BASE_ARGS,
disabled: false,
loading: false,
variant: "primaryFill"
}
};

export const PrimaryInverted = {
args: {
...BASE_ARGS,
disabled: false,
loading: false,
variant: "primaryInverted"
}
};

export const SecondaryFill = {
args: {
...BASE_ARGS,
disabled: false,
loading: false,
variant: "secondaryFill"
}
};

export const SecondaryInverted = {
args: {
...BASE_ARGS,
disabled: false,
loading: false,
variant: "secondaryInverted"
}
};

export const AccentFill = {
args: {
...BASE_ARGS,
disabled: false,
loading: false,
variant: "accentFill"
}
};

export const AccentInverted = {
args: {
...BASE_ARGS,
disabled: false,
loading: false,
variant: "accentInverted"
}
};

export const Disabled = {
args: {
...BASE_ARGS,
disabled: true,
loading: false,
variant: "primaryFill"
}
};

export const Loading = {
args: {
...BASE_ARGS,
disabled: false,
loading: true,
variant: "primaryFill"
}
};
Loading

0 comments on commit 1601363

Please sign in to comment.