@wormhole-foundation/wormhole-connect 0.0.2 → 0.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,60 @@
1
+ "use strict";
2
+ var __extends = (this && this.__extends) || (function () {
3
+ var extendStatics = function (d, b) {
4
+ extendStatics = Object.setPrototypeOf ||
5
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
6
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
7
+ return extendStatics(d, b);
8
+ };
9
+ return function (d, b) {
10
+ if (typeof b !== "function" && b !== null)
11
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
12
+ extendStatics(d, b);
13
+ function __() { this.constructor = d; }
14
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
15
+ };
16
+ })();
17
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
18
+ if (k2 === undefined) k2 = k;
19
+ var desc = Object.getOwnPropertyDescriptor(m, k);
20
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
21
+ desc = { enumerable: true, get: function() { return m[k]; } };
22
+ }
23
+ Object.defineProperty(o, k2, desc);
24
+ }) : (function(o, m, k, k2) {
25
+ if (k2 === undefined) k2 = k;
26
+ o[k2] = m[k];
27
+ }));
28
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
29
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
30
+ };
31
+ var __importDefault = (this && this.__importDefault) || function (mod) {
32
+ return (mod && mod.__esModule) ? mod : { "default": mod };
33
+ };
34
+ Object.defineProperty(exports, "__esModule", { value: true });
35
+ var jsx_runtime_1 = require("react/jsx-runtime");
36
+ var react_1 = __importDefault(require("react"));
37
+ var WormholeBridge = /** @class */ (function (_super) {
38
+ __extends(WormholeBridge, _super);
39
+ function WormholeBridge() {
40
+ return _super !== null && _super.apply(this, arguments) || this;
41
+ }
42
+ WormholeBridge.prototype.componentDidMount = function () {
43
+ var script = document.createElement("script");
44
+ script.src = "https://www.unpkg.com/@wormhole-foundation/wormhole-connect@0.0.3/dist/main.js";
45
+ script.async = true;
46
+ var link = document.createElement("link");
47
+ link.href = "https://www.unpkg.com/@wormhole-foundation/wormhole-connect@0.0.3/dist/main.css";
48
+ document.body.appendChild(script);
49
+ document.body.appendChild(link);
50
+ };
51
+ WormholeBridge.prototype.render = function () {
52
+ return (
53
+ // @ts-ignore
54
+ (0, jsx_runtime_1.jsx)("div", { id: "wormhole-connect", config: this.props.config ? JSON.stringify(this.props.config) : null }));
55
+ };
56
+ return WormholeBridge;
57
+ }(react_1.default.Component));
58
+ __exportStar(require("./theme"), exports);
59
+ __exportStar(require("./types"), exports);
60
+ exports.default = WormholeBridge;
@@ -0,0 +1,242 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.defaultTheme = exports.dark = exports.light = exports.OPACITY = void 0;
4
+ var colors_1 = require("@mui/material/colors");
5
+ exports.OPACITY = {
6
+ 0: '00',
7
+ 5: '0C',
8
+ 7: '0F',
9
+ 10: '19',
10
+ 15: '26',
11
+ 20: '33',
12
+ 25: '3F',
13
+ 30: '4C',
14
+ 35: '59',
15
+ 40: '66',
16
+ 45: '72',
17
+ 50: '7F',
18
+ 55: '8C',
19
+ 60: '99',
20
+ 65: 'A5',
21
+ 70: 'B2',
22
+ 75: 'BF',
23
+ 80: 'CC',
24
+ 85: 'D8',
25
+ 90: 'E5',
26
+ 95: 'F2',
27
+ 100: 'FF',
28
+ };
29
+ exports.light = {
30
+ primary: {
31
+ 50: '#161718',
32
+ 100: '#2d2e30',
33
+ 200: '#444548',
34
+ 300: '#5b5c60',
35
+ 400: '#727479',
36
+ 500: '#898b91',
37
+ 600: '#a0a2a9',
38
+ 700: '#b7b9c1',
39
+ 800: '#ced0d9',
40
+ 900: '#E5E8F2',
41
+ A100: '#ceced1',
42
+ A200: '#9d9ea4',
43
+ A400: '#535660',
44
+ A700: '#0a0e1c',
45
+ },
46
+ secondary: colors_1.grey,
47
+ divider: '#a0a2a9',
48
+ background: {
49
+ default: '#E5E8F2',
50
+ },
51
+ text: {
52
+ primary: colors_1.grey[900],
53
+ secondary: colors_1.grey[800],
54
+ },
55
+ error: colors_1.red,
56
+ info: {
57
+ 50: '#d1e3f9',
58
+ 100: '#c8def7',
59
+ 200: '#bfd8f6',
60
+ 300: '#b6d3f5',
61
+ 400: '#adcdf4',
62
+ 500: '#A4C8F3',
63
+ 600: '#93b4da',
64
+ 700: '#83a0c2',
65
+ 800: '#728caa',
66
+ 900: '#627891',
67
+ A100: '#A4C8F3',
68
+ A200: '#A4C8F3',
69
+ A400: '#A4C8F3',
70
+ A700: '#A4C8F3',
71
+ },
72
+ success: colors_1.green,
73
+ warning: colors_1.orange,
74
+ button: {
75
+ primary: '#ffffff',
76
+ primaryText: colors_1.grey[900],
77
+ disabled: '#c8cad1',
78
+ disabledText: colors_1.grey[800],
79
+ action: '#F3A01E',
80
+ actionText: '#000000',
81
+ hover: '#b7b9c1',
82
+ },
83
+ options: {
84
+ hover: '#f9f9fb',
85
+ select: '#F0F0F5',
86
+ },
87
+ card: {
88
+ background: '#ffffff',
89
+ elevation: '10px 10px 30px 15px #CCD2E7',
90
+ secondary: '#F0F0F5',
91
+ },
92
+ popover: {
93
+ background: '#ffffff',
94
+ elevation: '10px 10px 30px 15px #CCD2E7',
95
+ secondary: '#F0F0F5',
96
+ },
97
+ modal: {
98
+ background: '#ffffff',
99
+ },
100
+ font: {
101
+ primary: '"Inter", sans-serif',
102
+ header: '"IBM Plex Mono", monospace',
103
+ },
104
+ };
105
+ exports.dark = {
106
+ primary: colors_1.grey,
107
+ secondary: colors_1.grey,
108
+ divider: '#ffffff' + exports.OPACITY[20],
109
+ background: {
110
+ default: '#212121',
111
+ },
112
+ text: {
113
+ primary: '#ffffff',
114
+ secondary: colors_1.grey[500],
115
+ },
116
+ error: colors_1.red,
117
+ info: colors_1.cyan,
118
+ success: colors_1.green,
119
+ warning: colors_1.orange,
120
+ button: {
121
+ primary: '#ffffff' + exports.OPACITY[20],
122
+ primaryText: '#ffffff',
123
+ disabled: '#ffffff' + exports.OPACITY[10],
124
+ disabledText: '#ffffff' + exports.OPACITY[40],
125
+ action: colors_1.purple[400],
126
+ actionText: '#000000',
127
+ hover: '#ffffff' + exports.OPACITY[7],
128
+ },
129
+ options: {
130
+ hover: '#373737',
131
+ select: '#3F3F3F',
132
+ },
133
+ card: {
134
+ background: '#2F2F2F',
135
+ secondary: '#474747',
136
+ elevation: 'none',
137
+ },
138
+ popover: {
139
+ background: '#111111',
140
+ secondary: '#ffffff' + exports.OPACITY[5],
141
+ elevation: 'none',
142
+ },
143
+ modal: {
144
+ background: '#2d2d2d',
145
+ },
146
+ font: {
147
+ primary: '"Inter", sans-serif',
148
+ header: '"IBM Plex Mono", monospace',
149
+ },
150
+ };
151
+ exports.defaultTheme = {
152
+ primary: colors_1.grey,
153
+ secondary: colors_1.grey,
154
+ divider: '#ffffff' + exports.OPACITY[20],
155
+ background: {
156
+ default: 'wormhole',
157
+ },
158
+ text: {
159
+ primary: '#ffffff',
160
+ secondary: colors_1.grey[500],
161
+ },
162
+ error: colors_1.red,
163
+ info: {
164
+ 50: '#97a5b7',
165
+ 100: '#8293a9',
166
+ 200: '#6e819a',
167
+ 300: '#596f8c',
168
+ 400: '#445d7e',
169
+ 500: '#304C70',
170
+ 600: '#2b4464',
171
+ 700: '#263c59',
172
+ 800: '#21354e',
173
+ 900: '#1c2d43',
174
+ A100: '#304C70',
175
+ A200: '#304C70',
176
+ A400: '#304C70',
177
+ A700: '#304C70',
178
+ },
179
+ // success: green,
180
+ success: {
181
+ 50: '#66d6cd',
182
+ 100: '#4dcfc4',
183
+ 200: '#33c8bc',
184
+ 300: '#1ac1b4',
185
+ 400: '#01BBAC',
186
+ 500: '#00a89a',
187
+ 600: '#009589',
188
+ 700: '#008278',
189
+ 800: '#007067',
190
+ 900: '#005d56',
191
+ A100: '#00a89a',
192
+ A200: '#00a89a',
193
+ A400: '#00a89a',
194
+ A700: '#00a89a',
195
+ },
196
+ warning: {
197
+ 50: '#ffe3a4',
198
+ 100: '#ffdd91',
199
+ 200: '#ffd77f',
200
+ 300: '#ffd26d',
201
+ 400: '#ffcc5b',
202
+ 500: '#FFC749',
203
+ 600: '#e5b341',
204
+ 700: '#cc9f3a',
205
+ 800: '#b28b33',
206
+ 900: '#99772b',
207
+ A100: '#FFC749',
208
+ A200: '#FFC749',
209
+ A400: '#FFC749',
210
+ A700: '#FFC749',
211
+ },
212
+ button: {
213
+ primary: '#ffffff' + exports.OPACITY[10],
214
+ primaryText: '#ffffff',
215
+ disabled: '#ffffff' + exports.OPACITY[7],
216
+ disabledText: '#ffffff' + exports.OPACITY[40],
217
+ action: '#ffffff',
218
+ actionText: '#000000',
219
+ hover: '#ffffff' + exports.OPACITY[7],
220
+ },
221
+ options: {
222
+ hover: '#ffffff' + exports.OPACITY[7],
223
+ select: '#ffffff' + exports.OPACITY[10],
224
+ },
225
+ card: {
226
+ background: '#ffffff' + exports.OPACITY[5],
227
+ secondary: '#ffffff' + exports.OPACITY[5],
228
+ elevation: 'none',
229
+ },
230
+ popover: {
231
+ background: '#1b2033',
232
+ secondary: '#ffffff' + exports.OPACITY[5],
233
+ elevation: 'none',
234
+ },
235
+ modal: {
236
+ background: '#0F1024',
237
+ },
238
+ font: {
239
+ primary: '"Inter", sans-serif',
240
+ header: '"IBM Plex Mono", monospace',
241
+ },
242
+ };
@@ -0,0 +1,23 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.TESTNET_CHAINS = exports.MAINNET_CHAINS = void 0;
4
+ exports.MAINNET_CHAINS = {
5
+ solana: 1,
6
+ ethereum: 2,
7
+ bsc: 4,
8
+ polygon: 5,
9
+ avalanche: 6,
10
+ fantom: 10,
11
+ celo: 14,
12
+ moonbeam: 16,
13
+ };
14
+ exports.TESTNET_CHAINS = {
15
+ solana: 1,
16
+ goerli: 2,
17
+ bsc: 4,
18
+ mumbai: 5,
19
+ fuji: 6,
20
+ fantom: 10,
21
+ alfajores: 14,
22
+ moonbasealpha: 16,
23
+ };
@@ -22,10 +22,10 @@ var WormholeBridge = /** @class */ (function (_super) {
22
22
  }
23
23
  WormholeBridge.prototype.componentDidMount = function () {
24
24
  var script = document.createElement("script");
25
- script.src = "https://www.unpkg.com/@wormhole-foundation/wormhole-connect@0.0.2/dist/main.js";
25
+ script.src = "https://www.unpkg.com/@wormhole-foundation/wormhole-connect@0.0.3/dist/main.js";
26
26
  script.async = true;
27
27
  var link = document.createElement("link");
28
- link.href = "https://www.unpkg.com/@wormhole-foundation/wormhole-connect@0.0.2/dist/main.css";
28
+ link.href = "https://www.unpkg.com/@wormhole-foundation/wormhole-connect@0.0.3/dist/main.css";
29
29
  document.body.appendChild(script);
30
30
  document.body.appendChild(link);
31
31
  };
@@ -211,8 +211,8 @@ export var defaultTheme = {
211
211
  primaryText: '#ffffff',
212
212
  disabled: '#ffffff' + OPACITY[7],
213
213
  disabledText: '#ffffff' + OPACITY[40],
214
- action: '#ffffff' + OPACITY[20],
215
- actionText: '#ffffff',
214
+ action: '#ffffff',
215
+ actionText: '#000000',
216
216
  hover: '#ffffff' + OPACITY[7],
217
217
  },
218
218
  options: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wormhole-foundation/wormhole-connect",
3
- "version": "0.0.2",
3
+ "version": "0.0.4",
4
4
  "dependencies": {
5
5
  "@mui/material": "^5.12.1"
6
6
  },
@@ -25,7 +25,9 @@
25
25
  "react-dom": "^18.2.0"
26
26
  },
27
27
  "scripts": {
28
- "build": "tsc"
28
+ "build:cjs": "tsc -p tsconfig.cjs.json",
29
+ "build:esm": "tsc -p tsconfig.esm.json",
30
+ "build": "rm -rf lib && npm run build:cjs && npm run build:esm"
29
31
  },
30
32
  "eslintConfig": {
31
33
  "extends": [
@@ -46,9 +48,17 @@
46
48
  ]
47
49
  },
48
50
  "description": "This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app).",
49
- "main": "lib/index.js",
50
- "types": "lib/index.d.ts",
51
- "files": [ "lib/*.js", "lib/*.d.ts", "dist/main.js", "dist/main.css" ],
51
+ "main": "lib/cjs/index.js",
52
+ "module": "lib/esm/index.js",
53
+ "types": "lib/types/index.d.ts",
54
+ "exports": {
55
+ ".": {
56
+ "require": "./lib/cjs/index.js",
57
+ "import": "./lib/esm/index.js",
58
+ "types": "./lib/index.d.ts"
59
+ }
60
+ },
61
+ "files": [ "lib", "dist" ],
52
62
  "repository": {
53
63
  "type": "git",
54
64
  "url": "git+https://github.com/wormhole-foundation/wormhole-connect.git"
File without changes
File without changes
File without changes
File without changes