tempest-react-sdk 0.1.6 → 0.3.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 +21 -16
- package/dist/index.d.ts +454 -21
- package/dist/styles.css +1 -1
- package/dist/tempest-react-sdk.cjs +3 -3
- package/dist/tempest-react-sdk.cjs.map +1 -1
- package/dist/tempest-react-sdk.js +2491 -1659
- package/dist/tempest-react-sdk.js.map +1 -1
- package/package.json +5 -23
package/README.md
CHANGED
|
@@ -17,7 +17,7 @@ The goal is to start every new React frontend with the same opinionated foundati
|
|
|
17
17
|
|
|
18
18
|
- [Recommended stack](#recommended-stack)
|
|
19
19
|
- [Install](#install)
|
|
20
|
-
- [Peer dependencies](#peer-dependencies)
|
|
20
|
+
- [Peer & bundled dependencies](#peer--bundled-dependencies)
|
|
21
21
|
- [CSS import](#css-import)
|
|
22
22
|
- [What's inside](#whats-inside)
|
|
23
23
|
- [Architecture overview](#architecture-overview)
|
|
@@ -109,28 +109,33 @@ Via `package.json`:
|
|
|
109
109
|
|
|
110
110
|
Requires React `>=18` and Node `>=20.19` to build.
|
|
111
111
|
|
|
112
|
-
### Peer dependencies
|
|
112
|
+
### Peer & bundled dependencies
|
|
113
113
|
|
|
114
|
-
|
|
114
|
+
Only **react** and **react-dom** are peer dependencies — those must come from the host app so a single React copy lives in the tree.
|
|
115
115
|
|
|
116
|
-
|
|
117
|
-
| --------------------------------------------- | ------------------------------------------------------------------- | ------------ |
|
|
118
|
-
| `react`, `react-dom` (`^18.0.0 \|\| ^19.0.0`) | Everything | **Required** |
|
|
119
|
-
| `@tanstack/react-query` (`^5`) | `QueryProvider`, `createQueryKeys` | Optional |
|
|
120
|
-
| `zod` (`^3.23 \|\| ^4`) | `parseResponse`, `validateForm`, `zodResolver`, `useZodForm` | Optional |
|
|
121
|
-
| `zustand` (`^4 \|\| ^5`) | `createAuthStore` | Optional |
|
|
122
|
-
| `dexie` (`^4.4`) | `createOfflineStore` | Optional |
|
|
123
|
-
| `react-hook-form` (`^7.76`) | `zodResolver`, `useZodForm`, masked inputs | Optional |
|
|
124
|
-
| `lucide-react` (`>=0.400`) | Component icons (`leftIcon`/`rightIcon` on `Input`, `Button`, etc.) | Optional |
|
|
116
|
+
Everything else (`zod`, `zustand`, `dexie`, `react-hook-form`, `@tanstack/react-query`, `lucide-react`) is a **direct dependency** of the SDK, installed automatically by `npm install tempest-react-sdk`. You never need to install them manually.
|
|
125
117
|
|
|
126
|
-
|
|
118
|
+
| Package | Status | Used by |
|
|
119
|
+
| ------------------------------------- | ------------------- | ------------------------------------------------------------------- |
|
|
120
|
+
| `react`, `react-dom` (`^18 \|\| ^19`) | **Peer (required)** | Everything |
|
|
121
|
+
| `@tanstack/react-query` (`^5`) | Direct dep (auto) | `QueryProvider`, `createQueryKeys` |
|
|
122
|
+
| `zod` (`^3.23 \|\| ^4`) | Direct dep (auto) | `parseResponse`, `validateForm`, `zodResolver`, `useZodForm` |
|
|
123
|
+
| `zustand` (`^4 \|\| ^5`) | Direct dep (auto) | `createAuthStore` |
|
|
124
|
+
| `dexie` (`^4.4`) | Direct dep (auto) | `createOfflineStore` |
|
|
125
|
+
| `react-hook-form` (`^7.76`) | Direct dep (auto) | `zodResolver`, `useZodForm`, masked inputs |
|
|
126
|
+
| `lucide-react` (`>=0.400`) | Direct dep (auto) | Component icons (`leftIcon`/`rightIcon` on `Input`, `Button`, etc.) |
|
|
127
|
+
|
|
128
|
+
The minimum install is just:
|
|
127
129
|
|
|
128
130
|
```bash
|
|
129
|
-
npm install tempest-react-sdk react react-dom
|
|
130
|
-
@tanstack/react-query zod zustand react-hook-form lucide-react
|
|
131
|
+
npm install tempest-react-sdk react react-dom
|
|
131
132
|
```
|
|
132
133
|
|
|
133
|
-
|
|
134
|
+
**Bundle impact**: every bundled dep is externalised in the SDK's Rollup config, so the SDK's published bundle stays at ~104 KB ESM. Your app's bundler (Vite / webpack / Rspack) resolves these from `node_modules` and tree-shakes — if you never call `createOfflineStore`, Dexie never enters your final bundle.
|
|
135
|
+
|
|
136
|
+
**Version conflicts**: if your app already pins (say) `zod@3.20`, npm dedupes when the range is compatible. If ranges diverge you get two copies — pin a single version in your own `package.json` to force one, or open an issue if the SDK's range is too tight.
|
|
137
|
+
|
|
138
|
+
Adapters for external SDKs (`@sentry/browser`, `posthog-js`, `@growthbook/growthbook`, `launchdarkly-js-client-sdk`) are **not** bundled — install those only when you opt into the adapter. The caller passes the SDK instance to the factory.
|
|
134
139
|
|
|
135
140
|
### CSS import
|
|
136
141
|
|