tempest-react-sdk 0.1.0 → 0.1.1
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 +27 -0
- package/package.json +1 -5
package/README.md
CHANGED
|
@@ -15,6 +15,7 @@ The goal is to start every new React frontend with the same opinionated foundati
|
|
|
15
15
|
|
|
16
16
|
## Table of contents
|
|
17
17
|
|
|
18
|
+
- [Recommended stack](#recommended-stack)
|
|
18
19
|
- [Install](#install)
|
|
19
20
|
- [Peer dependencies](#peer-dependencies)
|
|
20
21
|
- [CSS import](#css-import)
|
|
@@ -63,6 +64,32 @@ The goal is to start every new React frontend with the same opinionated foundati
|
|
|
63
64
|
|
|
64
65
|
---
|
|
65
66
|
|
|
67
|
+
## Recommended stack
|
|
68
|
+
|
|
69
|
+
**Vite + React + TypeScript** is the supported consumer stack. The SDK is built and tested against [Vite 7](https://vite.dev) in library mode and assumes a Vite-style host app:
|
|
70
|
+
|
|
71
|
+
- ESM-first module resolution (the package's `exports` field declares `import` / `require` conditions).
|
|
72
|
+
- `import.meta.env` for env vars (the recipes use `import.meta.env.VITE_API_URL`, `import.meta.env.VITE_VAPID_PUBLIC_KEY`, etc.).
|
|
73
|
+
- Native CSS Modules (the package's hashed `tempest_*` class names are emitted as CSS Modules under the hood and consumed via the global `tempest-react-sdk/styles.css` import).
|
|
74
|
+
- Fast HMR — provider files (`ThemeProvider`, `I18nProvider`, etc.) opt into React Refresh.
|
|
75
|
+
- First-class compatibility with the Vite plugin ecosystem (`vite-plugin-pwa` for service workers, `vite-plugin-dts`, `vite-plugin-svgr`, etc.).
|
|
76
|
+
|
|
77
|
+
To bootstrap a new app:
|
|
78
|
+
|
|
79
|
+
```bash
|
|
80
|
+
npm create vite@latest my-app -- --template react-ts
|
|
81
|
+
cd my-app
|
|
82
|
+
npm install tempest-react-sdk
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
The demo gallery in [`examples/gallery`](./examples/gallery) is itself a Vite app — use it as the reference project layout.
|
|
86
|
+
|
|
87
|
+
Other bundlers (Next.js app router, Webpack, Rspack, Parcel) **may** work — the package ships standard ESM + CJS + rolled-up `.d.ts` — but they are **not** exercised in CI, and Vite-specific features used in the recipes (`import.meta.env`, `vite-plugin-pwa`) will need their own equivalents. When in doubt, start with Vite.
|
|
88
|
+
|
|
89
|
+
Vite reference: <https://vite.dev/guide/>. React + TypeScript template: <https://vite.dev/guide/#scaffolding-your-first-vite-project>.
|
|
90
|
+
|
|
91
|
+
---
|
|
92
|
+
|
|
66
93
|
## Install
|
|
67
94
|
|
|
68
95
|
```bash
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "tempest-react-sdk",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1",
|
|
4
4
|
"description": "SDK público da Tempest com componentes, hooks e integrações para projetos React.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -51,9 +51,6 @@
|
|
|
51
51
|
"test": "vitest",
|
|
52
52
|
"test:run": "vitest run",
|
|
53
53
|
"test:coverage": "vitest run --coverage",
|
|
54
|
-
"changeset": "changeset",
|
|
55
|
-
"version": "changeset version",
|
|
56
|
-
"release": "npm run build && changeset publish",
|
|
57
54
|
"clean": "rm -rf dist coverage",
|
|
58
55
|
"prepare": "husky",
|
|
59
56
|
"prepublishOnly": "npm run typecheck && npm run lint && npm run test:run && npm run build"
|
|
@@ -98,7 +95,6 @@
|
|
|
98
95
|
}
|
|
99
96
|
},
|
|
100
97
|
"devDependencies": {
|
|
101
|
-
"@changesets/cli": "^2.31.0",
|
|
102
98
|
"@eslint/js": "^9.36.0",
|
|
103
99
|
"@tanstack/react-query": "^5.90.0",
|
|
104
100
|
"@testing-library/jest-dom": "^6.9.1",
|