@fluxbase/sdk-react 0.0.1-rc.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/CHANGELOG.md +67 -0
- package/README-ADMIN.md +1076 -0
- package/README.md +178 -0
- package/dist/index.d.mts +606 -0
- package/dist/index.d.ts +606 -0
- package/dist/index.js +992 -0
- package/dist/index.js.map +1 -0
- package/dist/index.mjs +926 -0
- package/dist/index.mjs.map +1 -0
- package/examples/AdminDashboard.tsx +513 -0
- package/examples/README.md +163 -0
- package/package.json +52 -0
- package/src/context.tsx +33 -0
- package/src/index.ts +113 -0
- package/src/use-admin-auth.ts +168 -0
- package/src/use-admin-hooks.ts +309 -0
- package/src/use-api-keys.ts +174 -0
- package/src/use-auth.ts +146 -0
- package/src/use-query.ts +165 -0
- package/src/use-realtime.ts +161 -0
- package/src/use-rpc.ts +109 -0
- package/src/use-storage.ts +257 -0
- package/src/use-users.ts +191 -0
- package/tsconfig.json +24 -0
- package/tsconfig.tsbuildinfo +1 -0
- package/tsup.config.ts +11 -0
- package/typedoc.json +35 -0
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to @fluxbase/sdk-react will be documented in this file.
|
|
4
|
+
|
|
5
|
+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
|
+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
|
+
|
|
8
|
+
## [0.1.0] - 2025-10-26
|
|
9
|
+
|
|
10
|
+
### Added
|
|
11
|
+
|
|
12
|
+
- Initial release of Fluxbase React hooks library
|
|
13
|
+
- **Authentication Hooks**
|
|
14
|
+
- `useAuth`: Complete auth state and methods
|
|
15
|
+
- `useUser`: Current user data with auto-refetch
|
|
16
|
+
- `useSession`: Access current session
|
|
17
|
+
- `useSignIn`: Sign in mutation hook
|
|
18
|
+
- `useSignUp`: Sign up mutation hook
|
|
19
|
+
- `useSignOut`: Sign out mutation hook
|
|
20
|
+
- `useUpdateUser`: Update user profile hook
|
|
21
|
+
- **Database Query Hooks**
|
|
22
|
+
- `useTable`: Query table data with filters, ordering, pagination
|
|
23
|
+
- `useFluxbaseQuery`: Lower-level query hook for custom queries
|
|
24
|
+
- `useInsert`: Insert rows with automatic cache invalidation
|
|
25
|
+
- `useUpdate`: Update rows
|
|
26
|
+
- `useUpsert`: Insert or update (upsert)
|
|
27
|
+
- `useDelete`: Delete rows
|
|
28
|
+
- **Realtime Hooks**
|
|
29
|
+
- `useRealtime`: Subscribe to database changes
|
|
30
|
+
- `useTableSubscription`: Auto-refetch queries on table changes
|
|
31
|
+
- `useTableInserts`: Listen to INSERT events
|
|
32
|
+
- `useTableUpdates`: Listen to UPDATE events
|
|
33
|
+
- `useTableDeletes`: Listen to DELETE events
|
|
34
|
+
- **Storage Hooks**
|
|
35
|
+
- `useStorageList`: List files in bucket
|
|
36
|
+
- `useStorageUpload`: Upload files
|
|
37
|
+
- `useStorageDownload`: Download files
|
|
38
|
+
- `useStorageDelete`: Delete files
|
|
39
|
+
- `useStoragePublicUrl`: Get public URL
|
|
40
|
+
- `useStorageSignedUrl`: Generate signed URLs
|
|
41
|
+
- `useStorageMove`: Move files
|
|
42
|
+
- `useStorageCopy`: Copy files
|
|
43
|
+
- `useStorageBuckets`: List buckets
|
|
44
|
+
- `useCreateBucket`: Create bucket
|
|
45
|
+
- `useDeleteBucket`: Delete bucket
|
|
46
|
+
- **Context & Provider**
|
|
47
|
+
- `FluxbaseProvider`: Provide Fluxbase client to React tree
|
|
48
|
+
- `useFluxbaseClient`: Access Fluxbase client from context
|
|
49
|
+
- **TypeScript Support**
|
|
50
|
+
- Full type safety for all hooks
|
|
51
|
+
- Generic type parameters for table data
|
|
52
|
+
- Type inference from query builders
|
|
53
|
+
- **Built on TanStack Query**
|
|
54
|
+
- Automatic caching and refetching
|
|
55
|
+
- Optimistic updates support
|
|
56
|
+
- Request deduplication
|
|
57
|
+
- Background refetching
|
|
58
|
+
- Stale-while-revalidate pattern
|
|
59
|
+
- SSR support
|
|
60
|
+
|
|
61
|
+
### Peer Dependencies
|
|
62
|
+
|
|
63
|
+
- `@fluxbase/sdk`: ^0.1.0
|
|
64
|
+
- `@tanstack/react-query`: ^5.0.0
|
|
65
|
+
- `react`: ^18.0.0 || ^19.0.0
|
|
66
|
+
|
|
67
|
+
[0.1.0]: https://github.com/wayli-app/fluxbase/releases/tag/sdk-react-v0.1.0
|