@coinlist-co/react 0.12.2-rc.e1f6c82 → 0.12.2
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 +79 -43
- package/dist/{chunk-GIE4UWB3.js → chunk-2FZAXGVH.js} +384 -618
- package/dist/chunk-2FZAXGVH.js.map +1 -0
- package/dist/{chunk-PIOQA6HW.js → chunk-EAPBF7T2.js} +88 -109
- package/dist/chunk-EAPBF7T2.js.map +1 -0
- package/dist/{chunk-MJ6YXZWH.js → chunk-IWQ6A52U.js} +4 -2
- package/dist/chunk-IWQ6A52U.js.map +1 -0
- package/dist/{chunk-EKLUJZ7T.js → chunk-OQ2ANYUF.js} +328 -21
- package/dist/chunk-OQ2ANYUF.js.map +1 -0
- package/dist/client/index.d.ts +1634 -1268
- package/dist/client/index.js +10261 -10050
- package/dist/client/index.js.map +1 -1
- package/dist/client-credentials-BwcmPcn-.d.ts +13 -0
- package/dist/server/index.d.ts +58 -106
- package/dist/server/index.js +208 -170
- package/dist/server/index.js.map +1 -1
- package/dist/{time-Bbqlt2x7.d.ts → time-ChSGmKZe.d.ts} +114 -66
- package/dist/{token-registry-snapshot-DttZXGvY.d.ts → token-registry-snapshot-DMubXr2c.d.ts} +19 -21
- package/dist/universal/index.d.ts +86 -73
- package/dist/universal/index.js +12 -8
- package/package.json +1 -1
- package/dist/chunk-EKLUJZ7T.js.map +0 -1
- package/dist/chunk-GIE4UWB3.js.map +0 -1
- package/dist/chunk-MJ6YXZWH.js.map +0 -1
- package/dist/chunk-PIOQA6HW.js.map +0 -1
package/README.md
CHANGED
|
@@ -1,49 +1,85 @@
|
|
|
1
|
-
#
|
|
1
|
+
# This package has moved to `@passage-cl/react`
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
https://docs.coinlist.co/
|
|
6
|
-
|
|
7
|
-
Please refer to the docs site for installation, configuration, and integration guides.
|
|
8
|
-
|
|
9
|
-
## Local development
|
|
10
|
-
|
|
11
|
-
The toolchain (Node 24, TypeScript) is pinned by `flake.nix` and frozen by `flake.lock`.
|
|
12
|
-
|
|
13
|
-
Prerequisites:
|
|
14
|
-
|
|
15
|
-
1. Nix — install with the [Determinate Systems installer](https://github.com/DeterminateSystems/nix-installer),
|
|
16
|
-
which enables flakes out of the box and supports clean uninstalls:
|
|
17
|
-
|
|
18
|
-
```bash
|
|
19
|
-
curl --proto '=https' --tlsv1.2 -sSf -L https://install.determinate.systems/nix | sh -s -- install
|
|
20
|
-
```
|
|
21
|
-
|
|
22
|
-
2. [direnv](https://direnv.net/) and [nix-direnv](https://github.com/nix-community/nix-direnv)
|
|
23
|
-
(direnv on its own does not provide `use flake`).
|
|
24
|
-
|
|
25
|
-
```bash
|
|
26
|
-
direnv allow # activates the dev shell on every cd into the repo
|
|
27
|
-
```
|
|
28
|
-
|
|
29
|
-
Without direnv, enter the same shell manually:
|
|
30
|
-
|
|
31
|
-
```bash
|
|
32
|
-
nix develop
|
|
33
|
-
```
|
|
34
|
-
|
|
35
|
-
The flake provides the toolchain, not `node_modules` — install JS dependencies as usual:
|
|
3
|
+
> **`@coinlist-co/react` is deprecated and will receive no further releases.**
|
|
4
|
+
> The SDK continues as [`@passage-cl/react`](https://www.npmjs.com/package/@passage-cl/react).
|
|
36
5
|
|
|
37
6
|
```bash
|
|
38
|
-
npm
|
|
7
|
+
npm uninstall @coinlist-co/react
|
|
8
|
+
npm install @passage-cl/react
|
|
39
9
|
```
|
|
40
10
|
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
11
|
+
`0.12.2` is functionally identical to `0.12.1`: it only updates this README.
|
|
12
|
+
There will be no further releases under the `@coinlist-co/react` name.
|
|
13
|
+
|
|
14
|
+
## Migrating
|
|
15
|
+
|
|
16
|
+
`@passage-cl/react` starts at `0.13.0` and is a clean break: there are no
|
|
17
|
+
aliases for the old names, so every import and every renamed symbol below has
|
|
18
|
+
to be updated. Everything not listed keeps its name.
|
|
19
|
+
|
|
20
|
+
### Import paths
|
|
21
|
+
|
|
22
|
+
| `@coinlist-co/react` | `@passage-cl/react` |
|
|
23
|
+
|---|---|
|
|
24
|
+
| `@coinlist-co/react` | `@passage-cl/react` |
|
|
25
|
+
| `@coinlist-co/react/universal` | `@passage-cl/react/universal` |
|
|
26
|
+
| `@coinlist-co/react/server` | `@passage-cl/react/server` |
|
|
27
|
+
|
|
28
|
+
### Renamed exports
|
|
29
|
+
|
|
30
|
+
| Old | New |
|
|
31
|
+
|---|---|
|
|
32
|
+
| `CoinListProvider` | `PassageProvider` |
|
|
33
|
+
| `CoinListProviderProps` | `PassageProviderProps` |
|
|
34
|
+
| `useCoinList` | `usePassage` |
|
|
35
|
+
| `UseCoinListResult` | `UsePassageResult` |
|
|
36
|
+
| `UseCoinListResult.coinlist` | `UsePassageResult.passage` |
|
|
37
|
+
| `CoinListClient` | `PassageClient` |
|
|
38
|
+
| `createCoinListClient` | `createPassageClient` |
|
|
39
|
+
| `CoinListClientInitializationError` | `PassageClientInitializationError` |
|
|
40
|
+
| `CoinListServer` | `PassageServer` |
|
|
41
|
+
| `createCoinListServer` | `createPassageServer` |
|
|
42
|
+
| `CoinListStyleScope` | `PassageStyleScope` |
|
|
43
|
+
| `CoinListStyleScopeProps` | `PassageStyleScopeProps` |
|
|
44
|
+
|
|
45
|
+
### CSS and other host-visible names
|
|
46
|
+
|
|
47
|
+
Hosts that override the SDK's styles, or filter its logs, must update them:
|
|
48
|
+
|
|
49
|
+
| What | Old | New |
|
|
50
|
+
|---|---|---|
|
|
51
|
+
| Scope class | `.clco-sdk-root` | `.pcl-sdk-root` |
|
|
52
|
+
| Utility class prefix | `clcosdk:` (e.g. `clcosdk:flex`) | `pclsdk:` (e.g. `pclsdk:flex`) |
|
|
53
|
+
| Theme variables | `--clcosdk-*` | `--pclsdk-*` |
|
|
54
|
+
| Injected `<style>` key | `clco-sdk-styles` | `pcl-sdk-styles` |
|
|
55
|
+
| Pino logger `name` | `@coinlist-co/react` | `@passage-cl/react` |
|
|
56
|
+
|
|
57
|
+
### Unchanged
|
|
58
|
+
|
|
59
|
+
Names that refer to CoinList the company, rather than to the SDK, keep their
|
|
60
|
+
names:
|
|
61
|
+
|
|
62
|
+
- everything about the CoinList token sale, such as `CoinListTokenSale*`,
|
|
63
|
+
`ClientCoinListTokenSaleNamespace` and
|
|
64
|
+
`LoadCoinListTokenSaleParticipationsState` (for example `CoinListTokenSaleNamespace`,
|
|
65
|
+
`CoinListTokenSaleOffer`, `useCoinListTokenSaleCheckoutViewModel`)
|
|
66
|
+
- `CoinListSignInButton`
|
|
67
|
+
- `CoinListSignInCard*` (for example `CoinListSignInCardContainer`,
|
|
68
|
+
`useCoinListSignInCardViewModel`)
|
|
69
|
+
- the `coinlistFee` field and the "CoinList fee" copy
|
|
70
|
+
- the `coinlistBaseUrl` config field
|
|
71
|
+
- the `coinlist::*` offer types
|
|
72
|
+
|
|
73
|
+
### Example
|
|
74
|
+
|
|
75
|
+
```diff
|
|
76
|
+
-import { CoinListProvider, useCoinList } from '@coinlist-co/react';
|
|
77
|
+
-import { createCoinListServer } from '@coinlist-co/react/server';
|
|
78
|
+
+import { PassageProvider, usePassage } from '@passage-cl/react';
|
|
79
|
+
+import { createPassageServer } from '@passage-cl/react/server';
|
|
80
|
+
|
|
81
|
+
-const { coinlist } = useCoinList();
|
|
82
|
+
-await coinlist.offers.list();
|
|
83
|
+
+const { passage } = usePassage();
|
|
84
|
+
+await passage.offers.list();
|
|
47
85
|
```
|
|
48
|
-
|
|
49
|
-
The hook runs typecheck, Biome, and deslop.
|