@tuwaio/sdk 0.7.1 → 0.8.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/README.md CHANGED
@@ -41,7 +41,28 @@ Import the stylesheets once, for example in the global CSS file of the app:
41
41
  @import '@tuwaio/sdk/styles/all.css';
42
42
  ```
43
43
 
44
- `all.css` joins `nova-core.css` (the `--tuwa-*` theme variables), `nova-connect.css` and `nova-transactions.css`; import them one by one to leave one out.
44
+ `all.css` joins `nova-core.css` (the `--tuwa-*` theme variables and the motions of the pixel icons), `nova-connect.css` and `nova-transactions.css`; import them one by one to leave one out.
45
+
46
+ Nova draws the pixel icons of `@tuwaio/nova-icons` in its look of paper and ink. For its classic look with Heroicons, install `@heroicons/react` (an optional peer, needed only for this) and give the set to every Nova provider the app renders. A `NovaTransactionsProvider` outside `NovaConnectProvider` takes its own `icons`:
47
+
48
+ ```bash
49
+ pnpm add @heroicons/react
50
+ ```
51
+
52
+ ```tsx
53
+ import { NovaConnectProvider } from '@tuwaio/sdk/nova-connect';
54
+ import { heroicons } from '@tuwaio/sdk/nova-core/heroicons';
55
+ import { NovaTransactionsProvider } from '@tuwaio/sdk/nova-transactions/providers';
56
+ import type { ComponentProps } from 'react';
57
+
58
+ export function ClassicNovaConnect(props: ComponentProps<typeof NovaConnectProvider>) {
59
+ return <NovaConnectProvider {...props} icons={heroicons} />;
60
+ }
61
+
62
+ export function ClassicNovaTransactions(props: ComponentProps<typeof NovaTransactionsProvider>) {
63
+ return <NovaTransactionsProvider {...props} icons={heroicons} />;
64
+ }
65
+ ```
45
66
 
46
67
  ---
47
68
 
@@ -58,6 +79,12 @@ Import the stylesheets once, for example in the global CSS file of the app:
58
79
  | `@tuwaio/sdk/siwx/server-next` | `@tuwaio/siwx-server/next` | [siwx.docs.tuwa.io](https://siwx.docs.tuwa.io/packages/siwx-server/next) |
59
80
  | `@tuwaio/sdk/nova-core` | `@tuwaio/nova-core` | [Storybook](https://stories.tuwa.io/?path=/docs/packages-nova-core-overview--docs) |
60
81
  | `@tuwaio/sdk/nova-core/utils` | `@tuwaio/nova-core/utils`: only the helpers (`cn`, `deepMerge`, `getChainName`, `textCenterEllipsis`…), without React, components and icons | [Storybook](https://stories.tuwa.io/?path=/docs/packages-nova-core-overview--docs) |
82
+ | `@tuwaio/sdk/nova-core/heroicons` | `@tuwaio/nova-core/heroicons`: the Heroicons set of the classic look (needs `@heroicons/react`) | [Storybook](https://stories.tuwa.io/?path=/docs/packages-nova-core-overview--docs) |
83
+ | `@tuwaio/sdk/nova-icons` | `@tuwaio/nova-icons`: the pixel icons and the helpers that draw them | [Storybook](https://stories.tuwa.io/?path=/docs/packages-nova-icons-overview--docs) |
84
+ | `@tuwaio/sdk/nova-icons/24/outline` | `@tuwaio/nova-icons/24/outline`, the path of `@heroicons/react/24/outline` | [Gallery](https://stories.tuwa.io/?path=/story/nova-icons-gallery--gallery) |
85
+ | `@tuwaio/sdk/nova-icons/24/solid` | `@tuwaio/nova-icons/24/solid`, the path of `@heroicons/react/24/solid` | [Gallery](https://stories.tuwa.io/?path=/story/nova-icons-gallery--gallery) |
86
+ | `@tuwaio/sdk/nova-icons/tuwa` | `@tuwaio/nova-icons/tuwa`: the icons of TUWA's own | [Gallery](https://stories.tuwa.io/?path=/story/nova-icons-gallery--gallery) |
87
+ | `@tuwaio/sdk/nova-icons/brands` | `@tuwaio/nova-icons/brands`: the pixel marks of brands | [Gallery](https://stories.tuwa.io/?path=/story/nova-icons-gallery--gallery) |
61
88
  | `@tuwaio/sdk/nova-connect` | `@tuwaio/nova-connect` | [Storybook](https://stories.tuwa.io/?path=/docs/packages-nova-connect-connect-overview--docs) |
62
89
  | `@tuwaio/sdk/nova-connect/components` | `@tuwaio/nova-connect/components` | [Storybook](https://stories.tuwa.io/?path=/docs/packages-nova-connect-components-overview--docs) |
63
90
  | `@tuwaio/sdk/nova-connect/hooks` | `@tuwaio/nova-connect/hooks` | [Storybook](https://stories.tuwa.io/?path=/docs/packages-nova-connect-hooks-overview--docs) |
@@ -121,7 +148,8 @@ The versions in this package go together: Nova UI Kit 0.11 shows a transaction s
121
148
  - `orbit-core:lastConnectedConnector`, `orbit-core:recentlyConnectedConnectorsListHelpers`: the last connection and the recent wallets, in `localStorage`, or in `sessionStorage` until the tab closes when `rememberWallet` of `SatelliteConnectProvider` is `false` or "Remember this wallet" of Nova Connect is unticked ([`@tuwaio/satellite-core`](https://satellite.docs.tuwa.io/packages/satellite-core), read by Nova Connect);
122
149
  - `satellite-connect:impersonatedAddress` in `localStorage`: the impersonated address ([`@tuwaio/satellite-core`](https://satellite.docs.tuwa.io/packages/satellite-core));
123
150
  - the `name` passed to `createPulsarStore` in `localStorage`: the tracked transactions ([`@tuwaio/pulsar-core`](https://pulsar.docs.tuwa.io/packages/pulsar-core));
124
- - `siwx-react:session` in `localStorage`: the SIWX session shown in the UI ([`@tuwaio/siwx-react`](https://siwx.docs.tuwa.io/packages/siwx-react)).
151
+ - `siwx-react:session` in `localStorage`: the SIWX session shown in the UI ([`@tuwaio/siwx-react`](https://siwx.docs.tuwa.io/packages/siwx-react));
152
+ - `nova-transactions:closedToasts` in `localStorage`: the keys of up to 50 pending transactions whose toast was closed, so it stays closed after a page load ([`@tuwaio/nova-transactions`](https://stories.tuwa.io/?path=/docs/packages-nova-transactions-transactions-overview--docs)).
125
153
 
126
154
  ## 🌐 External Services
127
155
 
@@ -5,8 +5,14 @@ import '@tuwaio/nova-connect/i18n';
5
5
  import '@tuwaio/nova-connect/satellite';
6
6
  import '@tuwaio/nova-connect/solana';
7
7
  import '@tuwaio/nova-connect';
8
+ import '@tuwaio/nova-core/heroicons';
8
9
  import '@tuwaio/nova-core/utils';
9
10
  import '@tuwaio/nova-core';
11
+ import '@tuwaio/nova-icons/brands';
12
+ import '@tuwaio/nova-icons/24/outline';
13
+ import '@tuwaio/nova-icons/24/solid';
14
+ import '@tuwaio/nova-icons/tuwa';
15
+ import '@tuwaio/nova-icons';
10
16
  import '@tuwaio/nova-transactions/i18n';
11
17
  import '@tuwaio/nova-transactions/providers';
12
18
  import '@tuwaio/nova-transactions';
@@ -5,8 +5,14 @@ import '@tuwaio/nova-connect/i18n';
5
5
  import '@tuwaio/nova-connect/satellite';
6
6
  import '@tuwaio/nova-connect/solana';
7
7
  import '@tuwaio/nova-connect';
8
+ import '@tuwaio/nova-core/heroicons';
8
9
  import '@tuwaio/nova-core/utils';
9
10
  import '@tuwaio/nova-core';
11
+ import '@tuwaio/nova-icons/brands';
12
+ import '@tuwaio/nova-icons/24/outline';
13
+ import '@tuwaio/nova-icons/24/solid';
14
+ import '@tuwaio/nova-icons/tuwa';
15
+ import '@tuwaio/nova-icons';
10
16
  import '@tuwaio/nova-transactions/i18n';
11
17
  import '@tuwaio/nova-transactions/providers';
12
18
  import '@tuwaio/nova-transactions';
@@ -0,0 +1 @@
1
+ 'use strict';var heroicons=require('@tuwaio/nova-core/heroicons');Object.keys(heroicons).forEach(function(k){if(k!=='default'&&!Object.prototype.hasOwnProperty.call(exports,k))Object.defineProperty(exports,k,{enumerable:true,get:function(){return heroicons[k]}})});
@@ -0,0 +1 @@
1
+ export * from '@tuwaio/nova-core/heroicons';
@@ -0,0 +1 @@
1
+ export * from '@tuwaio/nova-core/heroicons';
@@ -0,0 +1 @@
1
+ export*from'@tuwaio/nova-core/heroicons';
@@ -0,0 +1 @@
1
+ 'use strict';var brands=require('@tuwaio/nova-icons/brands');Object.keys(brands).forEach(function(k){if(k!=='default'&&!Object.prototype.hasOwnProperty.call(exports,k))Object.defineProperty(exports,k,{enumerable:true,get:function(){return brands[k]}})});
@@ -0,0 +1 @@
1
+ export * from '@tuwaio/nova-icons/brands';
@@ -0,0 +1 @@
1
+ export * from '@tuwaio/nova-icons/brands';
@@ -0,0 +1 @@
1
+ export*from'@tuwaio/nova-icons/brands';
@@ -0,0 +1 @@
1
+ 'use strict';var outline=require('@tuwaio/nova-icons/24/outline');Object.keys(outline).forEach(function(k){if(k!=='default'&&!Object.prototype.hasOwnProperty.call(exports,k))Object.defineProperty(exports,k,{enumerable:true,get:function(){return outline[k]}})});
@@ -0,0 +1 @@
1
+ export * from '@tuwaio/nova-icons/24/outline';
@@ -0,0 +1 @@
1
+ export * from '@tuwaio/nova-icons/24/outline';
@@ -0,0 +1 @@
1
+ export*from'@tuwaio/nova-icons/24/outline';
@@ -0,0 +1 @@
1
+ 'use strict';var solid=require('@tuwaio/nova-icons/24/solid');Object.keys(solid).forEach(function(k){if(k!=='default'&&!Object.prototype.hasOwnProperty.call(exports,k))Object.defineProperty(exports,k,{enumerable:true,get:function(){return solid[k]}})});
@@ -0,0 +1 @@
1
+ export * from '@tuwaio/nova-icons/24/solid';
@@ -0,0 +1 @@
1
+ export * from '@tuwaio/nova-icons/24/solid';
@@ -0,0 +1 @@
1
+ export*from'@tuwaio/nova-icons/24/solid';
@@ -0,0 +1 @@
1
+ 'use strict';var tuwa=require('@tuwaio/nova-icons/tuwa');Object.keys(tuwa).forEach(function(k){if(k!=='default'&&!Object.prototype.hasOwnProperty.call(exports,k))Object.defineProperty(exports,k,{enumerable:true,get:function(){return tuwa[k]}})});
@@ -0,0 +1 @@
1
+ export * from '@tuwaio/nova-icons/tuwa';
@@ -0,0 +1 @@
1
+ export * from '@tuwaio/nova-icons/tuwa';
@@ -0,0 +1 @@
1
+ export*from'@tuwaio/nova-icons/tuwa';
@@ -0,0 +1 @@
1
+ 'use strict';var novaIcons=require('@tuwaio/nova-icons');Object.keys(novaIcons).forEach(function(k){if(k!=='default'&&!Object.prototype.hasOwnProperty.call(exports,k))Object.defineProperty(exports,k,{enumerable:true,get:function(){return novaIcons[k]}})});
@@ -0,0 +1 @@
1
+ export * from '@tuwaio/nova-icons';
@@ -0,0 +1 @@
1
+ export * from '@tuwaio/nova-icons';
@@ -0,0 +1 @@
1
+ export*from'@tuwaio/nova-icons';