@llmnative/react 2.0.0 → 2.0.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/llms-full.txt +35 -1
- package/package.json +1 -1
package/llms-full.txt
CHANGED
|
@@ -54,7 +54,7 @@ import '@llmnative/react/dist/index.css'
|
|
|
54
54
|
themeProvider="default" // 'default' | 'flat' | 'cyber' | AppThemeProviderConfig
|
|
55
55
|
menuConfig={menuConfig}
|
|
56
56
|
importPage={(path) => import(path)}
|
|
57
|
-
LayoutDefault={MyLayout} // layout wrapper custom (opzionale)
|
|
57
|
+
LayoutDefault={MyLayout} // layout wrapper custom (opzionale): avvolge ogni voce di menuConfig senza `layout`
|
|
58
58
|
appName="MyApp" // nome app (opzionale)
|
|
59
59
|
i18n={{ locale: 'it', translations: { ... } }}
|
|
60
60
|
contextProviders={MyContextProvider}
|
|
@@ -113,6 +113,40 @@ The VS Code and Tokyo Night themes are compiled from the original VS Code theme
|
|
|
113
113
|
| ai | `AIProviderAdapter` | `openai`, `gemini`, `anthropic`, `deepseek`, `mistral`, `openrouter`, `opencode`, `opencode-go`, `cloudflare`, `groq` | `Config.tsx AIConfig` | no |
|
|
114
114
|
| credentials | `CredentialsAdapter` | `googleServiceAccount` | `providers.google.serviceAccount` | no |
|
|
115
115
|
|
|
116
|
+
### Firebase: quale app usano auth, dati e storage
|
|
117
|
+
|
|
118
|
+
- `providers.firebase` inizializza l'app Firebase **di default** dell'SDK (`[DEFAULT]`). `firestoreDb` e `firestorage` la
|
|
119
|
+
usano, e il driver `firebaseAuth` (`services.auth: 'firebaseAuth'`) fa login su quella stessa app: login, Firestore
|
|
120
|
+
e Storage condividono la sessione.
|
|
121
|
+
- Un'app che chiama già `initializeApp(config)` per conto suo condivide l'app di default con il framework solo se ha lo
|
|
122
|
+
**stesso `appId`**. Con un `appId` diverso il framework chiude quell'app e la reinizializza con la propria config, e
|
|
123
|
+
la sessione dell'app cade. Per questo il client Firebase si crea una volta sola: o `providers.firebase`, o il codice
|
|
124
|
+
dell'app con la stessa config.
|
|
125
|
+
- Una sessione separata, che non deve cadere quando l'app di default cambia (cambio di tenant): istanziare
|
|
126
|
+
`new FirebaseAuthProvider({ config, appName: 'control-plane' })`. `appName` è un'app con un nome suo; senza
|
|
127
|
+
`config` usa un'app già inizializzata con quel nome.
|
|
128
|
+
- Le Cloud Functions callable: `callFirebaseFunction(name, data, appName?, region?)`, sull'app di default se non si
|
|
129
|
+
passa `appName`. Il token della sessione lo aggiunge l'SDK.
|
|
130
|
+
|
|
131
|
+
### Layout per voce di menu
|
|
132
|
+
|
|
133
|
+
Ogni voce di `menuConfig` è una route. Viene avvolta da `item.layout` se presente, altrimenti da `LayoutDefault` di
|
|
134
|
+
`<App>`, altrimenti da `LayoutEmpty`. Una pagina con un guscio diverso, per esempio l'accesso a tutta pagina senza
|
|
135
|
+
sidebar, dichiara `layout` sulla sua voce:
|
|
136
|
+
|
|
137
|
+
```tsx
|
|
138
|
+
export const menuConfig: MenuConfig = {
|
|
139
|
+
main: [
|
|
140
|
+
{ path: '/', title: 'Home', icon: 'home', page: HomePage }, // LayoutDefault
|
|
141
|
+
],
|
|
142
|
+
public: [
|
|
143
|
+
{ path: '/login', page: LoginPage, layout: AccessLayout }, // senza header né sidebar
|
|
144
|
+
],
|
|
145
|
+
};
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
La home va dichiarata con `path: '/'`: senza quella voce, `/` mostra "Missing Page".
|
|
149
|
+
|
|
116
150
|
### Hooks
|
|
117
151
|
|
|
118
152
|
```ts
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@llmnative/react",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.1",
|
|
4
4
|
"description": "LLM-native React framework for deterministic UI generation. Data-driven by default, schema-driven optional. Ultra-low token consumption — built for AI agents, not just humans.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.mjs",
|