@hai3/react 0.2.0-alpha.1 → 0.2.0-alpha.3
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/CLAUDE.md +2 -20
- package/dist/index.cjs +384 -27378
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +22 -102
- package/dist/index.d.ts +22 -102
- package/dist/index.js +273 -27277
- package/dist/index.js.map +1 -1
- package/dist/types.cjs.map +1 -1
- package/dist/types.d.cts +2 -31
- package/dist/types.d.ts +2 -31
- package/llms.txt +0 -1
- package/package.json +4 -1
package/CLAUDE.md
CHANGED
|
@@ -145,22 +145,6 @@ function ThemeToggle() {
|
|
|
145
145
|
|
|
146
146
|
### Components
|
|
147
147
|
|
|
148
|
-
#### TextLoader
|
|
149
|
-
|
|
150
|
-
Prevents flash of untranslated content:
|
|
151
|
-
|
|
152
|
-
```tsx
|
|
153
|
-
import { TextLoader } from '@hai3/react';
|
|
154
|
-
|
|
155
|
-
function Screen() {
|
|
156
|
-
return (
|
|
157
|
-
<TextLoader fallback={<Loading />}>
|
|
158
|
-
<h1>{t('screen.demo.home:title')}</h1>
|
|
159
|
-
</TextLoader>
|
|
160
|
-
);
|
|
161
|
-
}
|
|
162
|
-
```
|
|
163
|
-
|
|
164
148
|
#### AppRouter
|
|
165
149
|
|
|
166
150
|
Renders screens with lazy loading:
|
|
@@ -187,8 +171,7 @@ function App() {
|
|
|
187
171
|
1. **Wrap with HAI3Provider** - Required for all hooks to work
|
|
188
172
|
2. **Use hooks for state access** - Don't import selectors directly from @hai3/layout
|
|
189
173
|
3. **Lazy load translations** - Use `useScreenTranslations` for screen-level i18n
|
|
190
|
-
4. **
|
|
191
|
-
5. **NO Layout components here** - Layout is in @hai3/uikit or user code
|
|
174
|
+
4. **NO Layout components here** - Layout and UI components belong in L4 (user's project via CLI scaffolding)
|
|
192
175
|
|
|
193
176
|
## Re-exports
|
|
194
177
|
|
|
@@ -207,7 +190,6 @@ This allows users to import everything from `@hai3/react` without needing `@hai3
|
|
|
207
190
|
### Components
|
|
208
191
|
- `HAI3Provider` - Main context provider
|
|
209
192
|
- `AppRouter` - Screen router
|
|
210
|
-
- `TextLoader` - Translation loading wrapper
|
|
211
193
|
|
|
212
194
|
### Hooks
|
|
213
195
|
- `useHAI3` - Access app instance
|
|
@@ -222,6 +204,6 @@ This allows users to import everything from `@hai3/react` without needing `@hai3
|
|
|
222
204
|
- `HAI3Context` - React context (for advanced use)
|
|
223
205
|
|
|
224
206
|
### Types
|
|
225
|
-
- `HAI3ProviderProps`, `AppRouterProps
|
|
207
|
+
- `HAI3ProviderProps`, `AppRouterProps`
|
|
226
208
|
- `UseTranslationReturn`, `UseNavigationReturn`, `UseThemeReturn`
|
|
227
209
|
- All types from @hai3/framework
|