@rango-dev/widget-embedded 0.39.1-next.9 → 0.40.0
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.
- package/dist/components/SwapDetailsModal/SwapDetailsCompleteModal.d.ts.map +1 -1
- package/dist/components/SwapDetailsModal/SwapDetailsModal.styles.d.ts +160 -0
- package/dist/components/SwapDetailsModal/SwapDetailsModal.styles.d.ts.map +1 -1
- package/dist/constants/profileBanner.d.ts +3 -0
- package/dist/constants/profileBanner.d.ts.map +1 -0
- package/dist/constants/wallets.d.ts +1 -0
- package/dist/constants/wallets.d.ts.map +1 -1
- package/dist/containers/Wallets/Wallets.d.ts.map +1 -1
- package/dist/containers/Wallets/Wallets.helpers.d.ts +4 -0
- package/dist/containers/Wallets/Wallets.helpers.d.ts.map +1 -0
- package/dist/containers/Wallets/Wallets.types.d.ts +6 -2
- package/dist/containers/Wallets/Wallets.types.d.ts.map +1 -1
- package/dist/containers/Wallets/useUpdates.d.ts +13 -0
- package/dist/containers/Wallets/useUpdates.d.ts.map +1 -0
- package/dist/hooks/useSubscribeToWidgetEvents/useSubscribeToWidgetEvents.d.ts.map +1 -1
- package/dist/index.js +2 -2
- package/dist/index.js.map +4 -4
- package/dist/store/middlewares/keepLastUpdated.d.ts +8 -0
- package/dist/store/middlewares/keepLastUpdated.d.ts.map +1 -0
- package/dist/store/slices/wallets.d.ts +19 -13
- package/dist/store/slices/wallets.d.ts.map +1 -1
- package/dist/store/utils/wallets.d.ts +3 -3
- package/dist/store/utils/wallets.d.ts.map +1 -1
- package/dist/utils/common.d.ts +5 -0
- package/dist/utils/common.d.ts.map +1 -1
- package/dist/widget-embedded.build.json +1 -1
- package/package.json +12 -12
- package/src/components/ConfirmWalletsModal/WalletList.tsx +1 -1
- package/src/components/SwapDetailsModal/SwapDetailsCompleteModal.tsx +14 -7
- package/src/components/SwapDetailsModal/SwapDetailsModal.styles.ts +4 -0
- package/src/constants/profileBanner.ts +3 -0
- package/src/constants/wallets.ts +2 -0
- package/src/containers/Wallets/Wallets.helpers.ts +26 -0
- package/src/containers/Wallets/Wallets.tsx +23 -127
- package/src/containers/Wallets/Wallets.types.ts +16 -2
- package/src/containers/Wallets/useUpdates.ts +240 -0
- package/src/hooks/useSubscribeToWidgetEvents/useSubscribeToWidgetEvents.ts +19 -9
- package/src/store/middlewares/keepLastUpdated.ts +19 -0
- package/src/store/slices/wallets.ts +546 -414
- package/src/store/utils/wallets.ts +12 -11
- package/src/utils/common.ts +24 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SwapDetailsCompleteModal.d.ts","sourceRoot":"","sources":["../../../src/components/SwapDetailsModal/SwapDetailsCompleteModal.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAUvE,OAAO,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"SwapDetailsCompleteModal.d.ts","sourceRoot":"","sources":["../../../src/components/SwapDetailsModal/SwapDetailsCompleteModal.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAUvE,OAAO,KAAK,MAAM,OAAO,CAAC;AAc1B,wBAAgB,wBAAwB,CAAC,KAAK,EAAE,sBAAsB,qBAgHrE"}
|
|
@@ -318,4 +318,164 @@ export declare const TooltipErrorContent: import("@stitches/react/types/styled-c
|
|
|
318
318
|
zIndices: {};
|
|
319
319
|
transitions: {};
|
|
320
320
|
}, import("@stitches/react/types/config").DefaultThemeMap, {}>>;
|
|
321
|
+
export declare const ProfileBanner: import("@stitches/react/types/styled-component").StyledComponent<"img", {}, {
|
|
322
|
+
xs: string;
|
|
323
|
+
sm: string;
|
|
324
|
+
md: string;
|
|
325
|
+
lg: string;
|
|
326
|
+
}, import("@stitches/react/types/css-util").CSS<{
|
|
327
|
+
xs: string;
|
|
328
|
+
sm: string;
|
|
329
|
+
md: string;
|
|
330
|
+
lg: string;
|
|
331
|
+
}, {
|
|
332
|
+
colors: {
|
|
333
|
+
primary: string;
|
|
334
|
+
primary500: string;
|
|
335
|
+
primary550: string;
|
|
336
|
+
secondary: string;
|
|
337
|
+
secondary100: string;
|
|
338
|
+
secondary150: string;
|
|
339
|
+
secondary200: string;
|
|
340
|
+
secondary250: string;
|
|
341
|
+
secondary500: string;
|
|
342
|
+
secondary550: string;
|
|
343
|
+
neutral: string;
|
|
344
|
+
neutral100: string;
|
|
345
|
+
neutral200: string;
|
|
346
|
+
neutral300: string;
|
|
347
|
+
neutral400: string;
|
|
348
|
+
neutral500: string;
|
|
349
|
+
neutral600: string;
|
|
350
|
+
neutral700: string;
|
|
351
|
+
neutral800: string;
|
|
352
|
+
neutral900: string;
|
|
353
|
+
error100: string;
|
|
354
|
+
error300: string;
|
|
355
|
+
error500: string;
|
|
356
|
+
error600: string;
|
|
357
|
+
error700: string;
|
|
358
|
+
warning100: string;
|
|
359
|
+
warning300: string;
|
|
360
|
+
warning500: string;
|
|
361
|
+
warning600: string;
|
|
362
|
+
warning700: string;
|
|
363
|
+
info: string;
|
|
364
|
+
info100: string;
|
|
365
|
+
info300: string;
|
|
366
|
+
info500: string;
|
|
367
|
+
info600: string;
|
|
368
|
+
info700: string;
|
|
369
|
+
success100: string;
|
|
370
|
+
success300: string;
|
|
371
|
+
success500: string;
|
|
372
|
+
success600: string;
|
|
373
|
+
success700: string;
|
|
374
|
+
background: string;
|
|
375
|
+
foreground: string;
|
|
376
|
+
};
|
|
377
|
+
space: {
|
|
378
|
+
0: string;
|
|
379
|
+
5: string;
|
|
380
|
+
10: string;
|
|
381
|
+
15: string;
|
|
382
|
+
20: string;
|
|
383
|
+
25: string;
|
|
384
|
+
30: string;
|
|
385
|
+
40: string;
|
|
386
|
+
46: string;
|
|
387
|
+
50: string;
|
|
388
|
+
60: string;
|
|
389
|
+
70: string;
|
|
390
|
+
80: string;
|
|
391
|
+
90: string;
|
|
392
|
+
100: string;
|
|
393
|
+
2: string;
|
|
394
|
+
4: string;
|
|
395
|
+
6: string;
|
|
396
|
+
8: string;
|
|
397
|
+
12: string;
|
|
398
|
+
16: string;
|
|
399
|
+
24: string;
|
|
400
|
+
28: string;
|
|
401
|
+
32: string;
|
|
402
|
+
36: string;
|
|
403
|
+
};
|
|
404
|
+
radii: {
|
|
405
|
+
xs: string;
|
|
406
|
+
sm: string;
|
|
407
|
+
xm: string;
|
|
408
|
+
md: string;
|
|
409
|
+
xl: string;
|
|
410
|
+
lg: string;
|
|
411
|
+
primary: string;
|
|
412
|
+
secondary: string;
|
|
413
|
+
};
|
|
414
|
+
fontSizes: {
|
|
415
|
+
10: string;
|
|
416
|
+
12: string;
|
|
417
|
+
14: string;
|
|
418
|
+
16: string;
|
|
419
|
+
18: string;
|
|
420
|
+
20: string;
|
|
421
|
+
22: string;
|
|
422
|
+
24: string;
|
|
423
|
+
28: string;
|
|
424
|
+
32: string;
|
|
425
|
+
36: string;
|
|
426
|
+
40: string;
|
|
427
|
+
48: string;
|
|
428
|
+
};
|
|
429
|
+
fonts: {
|
|
430
|
+
primary: string;
|
|
431
|
+
widget: string;
|
|
432
|
+
};
|
|
433
|
+
fontWeights: {
|
|
434
|
+
regular: number;
|
|
435
|
+
medium: number;
|
|
436
|
+
semiBold: number;
|
|
437
|
+
bold: number;
|
|
438
|
+
};
|
|
439
|
+
lineHeights: {
|
|
440
|
+
12: string;
|
|
441
|
+
16: string;
|
|
442
|
+
20: string;
|
|
443
|
+
24: string;
|
|
444
|
+
26: string;
|
|
445
|
+
28: string;
|
|
446
|
+
30: string;
|
|
447
|
+
36: string;
|
|
448
|
+
40: string;
|
|
449
|
+
44: string;
|
|
450
|
+
52: string;
|
|
451
|
+
64: string;
|
|
452
|
+
};
|
|
453
|
+
letterSpacings: {};
|
|
454
|
+
sizes: {
|
|
455
|
+
4: string;
|
|
456
|
+
6: string;
|
|
457
|
+
8: string;
|
|
458
|
+
10: string;
|
|
459
|
+
12: string;
|
|
460
|
+
16: string;
|
|
461
|
+
18: string;
|
|
462
|
+
20: string;
|
|
463
|
+
24: string;
|
|
464
|
+
26: string;
|
|
465
|
+
28: string;
|
|
466
|
+
30: string;
|
|
467
|
+
32: string;
|
|
468
|
+
36: string;
|
|
469
|
+
40: string;
|
|
470
|
+
45: string;
|
|
471
|
+
48: string;
|
|
472
|
+
};
|
|
473
|
+
borderWidths: {};
|
|
474
|
+
borderStyles: {};
|
|
475
|
+
shadows: {
|
|
476
|
+
mainContainer: string;
|
|
477
|
+
};
|
|
478
|
+
zIndices: {};
|
|
479
|
+
transitions: {};
|
|
480
|
+
}, import("@stitches/react/types/config").DefaultThemeMap, {}>>;
|
|
321
481
|
//# sourceMappingURL=SwapDetailsModal.styles.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SwapDetailsModal.styles.d.ts","sourceRoot":"","sources":["../../../src/components/SwapDetailsModal/SwapDetailsModal.styles.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;+DAG1B,CAAC;AAEH,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;+DAM9B,CAAC"}
|
|
1
|
+
{"version":3,"file":"SwapDetailsModal.styles.d.ts","sourceRoot":"","sources":["../../../src/components/SwapDetailsModal/SwapDetailsModal.styles.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;+DAG1B,CAAC;AAEH,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;+DAM9B,CAAC;AAEH,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;+DAExB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"profileBanner.d.ts","sourceRoot":"","sources":["../../src/constants/profileBanner.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,2BAA2B,4FACmD,CAAC;AAC5F,eAAO,MAAM,8BAA8B,aAAa,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"wallets.d.ts","sourceRoot":"","sources":["../../src/constants/wallets.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AAExD,eAAO,MAAM,gBAAgB,eAAqB,CAAC"}
|
|
1
|
+
{"version":3,"file":"wallets.d.ts","sourceRoot":"","sources":["../../src/constants/wallets.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AAExD,eAAO,MAAM,iBAAiB,MAAM,CAAC;AAErC,eAAO,MAAM,gBAAgB,eAAqB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Wallets.d.ts","sourceRoot":"","sources":["../../../src/containers/Wallets/Wallets.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAEV,SAAS,EACT,sBAAsB,EACvB,MAAM,iBAAiB,CAAC;AAGzB,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"Wallets.d.ts","sourceRoot":"","sources":["../../../src/containers/Wallets/Wallets.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAEV,SAAS,EACT,sBAAsB,EACvB,MAAM,iBAAiB,CAAC;AAGzB,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAG/C,OAAO,KAAoD,MAAM,OAAO,CAAC;AASzE,eAAO,MAAM,aAAa,uCAOxB,CAAC;AAsFH,wBAAgB,aAAa,CAAC,KAAK,EAAE,iBAAiB,CAAC,SAAS,CAAC,qBAOhE"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { OnUpdateState } from './Wallets.types';
|
|
2
|
+
import type { LegacyEventHandler } from '@rango-dev/wallets-core/legacy';
|
|
3
|
+
export declare function propagateEvents(cb: OnUpdateState, eventParams: Parameters<LegacyEventHandler>): void;
|
|
4
|
+
//# sourceMappingURL=Wallets.helpers.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Wallets.helpers.d.ts","sourceRoot":"","sources":["../../../src/containers/Wallets/Wallets.helpers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AACrD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AASzE,wBAAgB,eAAe,CAC7B,EAAE,EAAE,aAAa,EACjB,WAAW,EAAE,UAAU,CAAC,kBAAkB,CAAC,GAC1C,IAAI,CAYN"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { WidgetConfig } from '../../types';
|
|
2
|
-
import type { LegacyEventHandler as EventHandler } from '@rango-dev/wallets-core/legacy';
|
|
2
|
+
import type { LegacyEventHandler as EventHandler, LegacyEvents } from '@rango-dev/wallets-core/legacy';
|
|
3
3
|
export type OnWalletConnectionChange = (key: string) => void;
|
|
4
4
|
export interface WidgetContextInterface {
|
|
5
5
|
/**
|
|
@@ -15,8 +15,12 @@ export interface WidgetContextInterface {
|
|
|
15
15
|
*/
|
|
16
16
|
onDisconnectWallet(handler: OnWalletConnectionChange): void;
|
|
17
17
|
}
|
|
18
|
+
type EventHandlerParams = Parameters<EventHandler>;
|
|
19
|
+
type EventParam = Exclude<LegacyEvents, LegacyEvents.PROVIDER_DISCONNECTED>;
|
|
20
|
+
export type OnUpdateState = (type: EventHandlerParams[0], event: EventParam, value: EventHandlerParams[2], coreState: EventHandlerParams[3], info: EventHandlerParams[4]) => void;
|
|
18
21
|
export interface PropTypes {
|
|
19
|
-
onUpdateState?:
|
|
22
|
+
onUpdateState?: OnUpdateState;
|
|
20
23
|
config: WidgetConfig;
|
|
21
24
|
}
|
|
25
|
+
export {};
|
|
22
26
|
//# sourceMappingURL=Wallets.types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Wallets.types.d.ts","sourceRoot":"","sources":["../../../src/containers/Wallets/Wallets.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"Wallets.types.d.ts","sourceRoot":"","sources":["../../../src/containers/Wallets/Wallets.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,KAAK,EACV,kBAAkB,IAAI,YAAY,EAClC,YAAY,EACb,MAAM,gCAAgC,CAAC;AAExC,MAAM,MAAM,wBAAwB,GAAG,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAC;AAC7D,MAAM,WAAW,sBAAsB;IACrC;;;;OAIG;IACH,eAAe,CAAC,OAAO,EAAE,wBAAwB,GAAG,IAAI,CAAC;IACzD;;;;OAIG;IACH,kBAAkB,CAAC,OAAO,EAAE,wBAAwB,GAAG,IAAI,CAAC;CAC7D;AAED,KAAK,kBAAkB,GAAG,UAAU,CAAC,YAAY,CAAC,CAAC;AACnD,KAAK,UAAU,GAAG,OAAO,CAAC,YAAY,EAAE,YAAY,CAAC,qBAAqB,CAAC,CAAC;AAE5E,MAAM,MAAM,aAAa,GAAG,CAC1B,IAAI,EAAE,kBAAkB,CAAC,CAAC,CAAC,EAC3B,KAAK,EAAE,UAAU,EACjB,KAAK,EAAE,kBAAkB,CAAC,CAAC,CAAC,EAC5B,SAAS,EAAE,kBAAkB,CAAC,CAAC,CAAC,EAChC,IAAI,EAAE,kBAAkB,CAAC,CAAC,CAAC,KACxB,IAAI,CAAC;AAEV,MAAM,WAAW,SAAS;IACxB,aAAa,CAAC,EAAE,aAAa,CAAC;IAC9B,MAAM,EAAE,YAAY,CAAC;CACtB"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import type { OnWalletConnectionChange } from './Wallets.types';
|
|
3
|
+
import type { LegacyEventHandler as EventHandler } from '@rango-dev/wallets-core/legacy';
|
|
4
|
+
interface UseUpdatesParams {
|
|
5
|
+
onConnectWalletHandler: React.MutableRefObject<OnWalletConnectionChange | undefined>;
|
|
6
|
+
onDisconnectWalletHandler: React.MutableRefObject<OnWalletConnectionChange | undefined>;
|
|
7
|
+
}
|
|
8
|
+
interface UseUpdates {
|
|
9
|
+
handler: EventHandler;
|
|
10
|
+
}
|
|
11
|
+
export declare function useUpdates(params: UseUpdatesParams): UseUpdates;
|
|
12
|
+
export {};
|
|
13
|
+
//# sourceMappingURL=useUpdates.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useUpdates.d.ts","sourceRoot":"","sources":["../../../src/containers/Wallets/useUpdates.ts"],"names":[],"mappings":";AAAA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,iBAAiB,CAAC;AAChE,OAAO,KAAK,EACV,kBAAkB,IAAI,YAAY,EAEnC,MAAM,gCAAgC,CAAC;AAgBxC,UAAU,gBAAgB;IACxB,sBAAsB,EAAE,KAAK,CAAC,gBAAgB,CAC5C,wBAAwB,GAAG,SAAS,CACrC,CAAC;IACF,yBAAyB,EAAE,KAAK,CAAC,gBAAgB,CAC/C,wBAAwB,GAAG,SAAS,CACrC,CAAC;CACH;AACD,UAAU,UAAU;IAClB,OAAO,EAAE,YAAY,CAAC;CACvB;AAED,wBAAgB,UAAU,CAAC,MAAM,EAAE,gBAAgB,GAAG,UAAU,CA+M/D"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useSubscribeToWidgetEvents.d.ts","sourceRoot":"","sources":["../../../src/hooks/useSubscribeToWidgetEvents/useSubscribeToWidgetEvents.ts"],"names":[],"mappings":"AAeA,wBAAgB,0BAA0B,
|
|
1
|
+
{"version":3,"file":"useSubscribeToWidgetEvents.d.ts","sourceRoot":"","sources":["../../../src/hooks/useSubscribeToWidgetEvents/useSubscribeToWidgetEvents.ts"],"names":[],"mappings":"AAeA,wBAAgB,0BAA0B,SA8DzC"}
|