@llmnative/react 1.20.0 → 1.21.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/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +55 -56
- package/dist/index.mjs.map +1 -1
- package/dist/types/src/Theme.d.ts +1 -0
- package/dist/types/src/components/blocks/SideNav.d.ts +7 -1
- package/llms-full.txt +32 -1
- package/package.json +1 -1
- package/themes/cyber.ts +1 -0
- package/themes/default.ts +1 -0
- package/themes/flat.ts +1 -0
|
@@ -24,6 +24,12 @@ export interface SideNavProps {
|
|
|
24
24
|
menuKey?: string;
|
|
25
25
|
/** Explicit items — alternative to menuKey */
|
|
26
26
|
items?: SideNavItemDef[];
|
|
27
|
+
/**
|
|
28
|
+
* Items pinned at the bottom of the sidebar, above the footer and outside the scrolling
|
|
29
|
+
* list (e.g. Settings). Same shape as `items`: groups, children, badges and active state
|
|
30
|
+
* work the same way. In `embedded` mode they follow the main items, separated by a border.
|
|
31
|
+
*/
|
|
32
|
+
bottomItems?: SideNavItemDef[];
|
|
27
33
|
/** Initial collapsed state for UNCONTROLLED usage (ignored once `collapsed` is passed —
|
|
28
34
|
* see below). Default false. */
|
|
29
35
|
defaultCollapsed?: boolean;
|
|
@@ -59,4 +65,4 @@ export interface SideNavProps {
|
|
|
59
65
|
*/
|
|
60
66
|
embedded?: boolean;
|
|
61
67
|
}
|
|
62
|
-
export default function SideNav({ menuKey, items: itemsProp, defaultCollapsed, collapsed: collapsedProp, onCollapsedChange, showIcons, showCollapseButton, footer, header, embedded, }: SideNavProps): React.JSX.Element | null;
|
|
68
|
+
export default function SideNav({ menuKey, items: itemsProp, bottomItems, defaultCollapsed, collapsed: collapsedProp, onCollapsedChange, showIcons, showCollapseButton, footer, header, embedded, }: SideNavProps): React.JSX.Element | null;
|
package/llms-full.txt
CHANGED
|
@@ -765,7 +765,7 @@ utile quando un comando cambia famiglia sintattica (per esempio da `{{ ... }}` a
|
|
|
765
765
|
### Altre primitive
|
|
766
766
|
```tsx
|
|
767
767
|
<Icon name="user" size={20} /> // usa provider icone configurato
|
|
768
|
-
<ImageAvatar src="..."
|
|
768
|
+
<ImageAvatar src="..." title="Mario" alt="Mario" width={40} height={40} />
|
|
769
769
|
<Loader show={isLoading}>{content}</Loader> // indicatore al posto dei figli finché show è true
|
|
770
770
|
<Loader show>{null}</Loader> // solo indicatore (es. pagina in caricamento)
|
|
771
771
|
<Code language="tsx">{snippet}</Code> // syntax highlight
|
|
@@ -802,6 +802,37 @@ utile quando un comando cambia famiglia sintattica (per esempio da `{{ ... }}` a
|
|
|
802
802
|
| `width` / `height` | `number` |
|
|
803
803
|
| `wrapperClassName` / `className` / `logoClassName` / `labelClassName` | `string` |
|
|
804
804
|
|
|
805
|
+
**SideNav:**
|
|
806
|
+
| Prop | Tipo |
|
|
807
|
+
|---|---|
|
|
808
|
+
| `items` | `SideNavItemDef[]` (in alternativa a `menuKey`) |
|
|
809
|
+
| `menuKey` | `string` — voci dal menu registrato in `<App>` |
|
|
810
|
+
| `bottomItems` | `SideNavItemDef[]` — voci fissate in fondo, sopra il footer e fuori dalla lista scorrevole (es. Impostazioni) |
|
|
811
|
+
| `header` / `footer` | `ReactNode` |
|
|
812
|
+
| `collapsed` + `onCollapsedChange` / `defaultCollapsed` | `boolean` — compressione controllata o no |
|
|
813
|
+
| `showIcons` / `showCollapseButton` | `boolean` (default `true`) |
|
|
814
|
+
| `embedded` | `boolean` — solo le voci, senza guscio (drawer, pannelli); `bottomItems` seguono le voci principali |
|
|
815
|
+
|
|
816
|
+
`SideNavItemDef`: `{ path, title?, icon?, group?, end?, badge?, children? }`. La voce attiva ha
|
|
817
|
+
`aria-current="page"`.
|
|
818
|
+
|
|
819
|
+
```tsx
|
|
820
|
+
<SideNav
|
|
821
|
+
items={[{ path: '/dashboard', title: 'Dashboard', icon: 'home' }]}
|
|
822
|
+
bottomItems={[{ path: '/settings', title: 'Impostazioni', icon: 'settings' }]}
|
|
823
|
+
/>
|
|
824
|
+
```
|
|
825
|
+
|
|
826
|
+
**ImageAvatar:**
|
|
827
|
+
| Prop | Tipo |
|
|
828
|
+
|---|---|
|
|
829
|
+
| `src` | `string` (obbligatoria) |
|
|
830
|
+
| `width` / `height` | `number` |
|
|
831
|
+
| `title` / `alt` | `string` |
|
|
832
|
+
| `fit` | `AvatarFit` |
|
|
833
|
+
| `badge` | `BadgeDescriptor` |
|
|
834
|
+
| `feedback` | `ReactNode` |
|
|
835
|
+
|
|
805
836
|
**Search:**
|
|
806
837
|
| Prop | Tipo |
|
|
807
838
|
|---|---|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@llmnative/react",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.21.0",
|
|
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",
|
package/themes/cyber.ts
CHANGED
|
@@ -353,6 +353,7 @@ export const components: Theme = {
|
|
|
353
353
|
overlayClassName: 'shadow-[0_0_32px_rgba(16,185,129,0.18)]',
|
|
354
354
|
headerClassName: 'border-b border-border px-1.5 py-2',
|
|
355
355
|
navClassName: 'px-1.5 py-2',
|
|
356
|
+
bottomNavClassName: 'border-t border-border px-1.5 py-2',
|
|
356
357
|
footerClassName: 'border-t border-border px-1.5 py-2',
|
|
357
358
|
groupLabelClassName: 'text-[10px] font-semibold uppercase tracking-[0.18em] text-muted-foreground/70 select-none',
|
|
358
359
|
groupDividerClassName: 'bg-border/70',
|
package/themes/default.ts
CHANGED
|
@@ -367,6 +367,7 @@ export const components: Theme = {
|
|
|
367
367
|
overlayClassName: 'shadow-xl',
|
|
368
368
|
headerClassName: 'border-b border-border/60 px-1.5 py-2',
|
|
369
369
|
navClassName: 'px-1.5 py-2',
|
|
370
|
+
bottomNavClassName: 'border-t border-border/60 px-1.5 py-2',
|
|
370
371
|
footerClassName: 'border-t border-border/60 px-1.5 py-2',
|
|
371
372
|
groupLabelClassName: 'text-[10.5px] font-semibold uppercase tracking-widest text-muted-foreground/60 select-none',
|
|
372
373
|
groupDividerClassName: 'bg-border/50',
|
package/themes/flat.ts
CHANGED
|
@@ -353,6 +353,7 @@ export const components: Theme = {
|
|
|
353
353
|
overlayClassName: 'shadow-lg',
|
|
354
354
|
headerClassName: 'border-b border-border px-1.5 py-2',
|
|
355
355
|
navClassName: 'px-1.5 py-2',
|
|
356
|
+
bottomNavClassName: 'border-t border-border px-1.5 py-2',
|
|
356
357
|
footerClassName: 'border-t border-border px-1.5 py-2',
|
|
357
358
|
groupLabelClassName: 'text-[10px] font-semibold uppercase tracking-[0.16em] text-muted-foreground/70 select-none',
|
|
358
359
|
groupDividerClassName: 'bg-border/60',
|