@llmnative/react 2.2.0 → 2.2.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.
@@ -120,6 +120,8 @@ export type AppProps = AppProviderProps & {
120
120
  export declare const setStaticMenu: (config: MenuConfig) => void;
121
121
  export declare const getStaticMenu: (type: string) => MenuItem[];
122
122
  export declare const getContextMenu: () => string[];
123
+ /** The title of the route at `path` in any menu of the app (hidden routes too), for a breadcrumb. */
124
+ export declare const menuTitleOf: (path: string) => string | undefined;
123
125
  /**
124
126
  * The full framework provider stack as a standalone component.
125
127
  *
@@ -14,6 +14,8 @@ export interface I18nDict {
14
14
  next: string;
15
15
  notFoundMessage: string;
16
16
  goHome: string;
17
+ /** The button that opens the menu on a small screen (the header of the scaffold). */
18
+ openNavigation: string;
17
19
  };
18
20
  auth: {
19
21
  signIn: string;
package/llms-full.txt CHANGED
@@ -1052,6 +1052,9 @@ Parti comuni per grafici propri: `useChartTooltip()` (`show`, `showAt`, `hide`,
1052
1052
  ## Blocks
1053
1053
 
1054
1054
  ```tsx
1055
+ // Senza trail: dall'indirizzo, ogni pezzo col titolo della sua rotta nel menu ('/impostazioni' → 'Impostazioni'),
1056
+ // altrimenti leggibile ('lead-fermi' → 'Lead fermi'); un id resta com'è.
1057
+ <Breadcrumbs />
1055
1058
  <Breadcrumbs trail={[{ label: 'Home', href: '/' }, { label: 'Utenti' }]} separator="/" jsonLd />
1056
1059
  <Brand url="/" label="MyApp" logo="/logo.svg" width={120} />
1057
1060
  <Search onQueryChange={(e) => setQ(e.target.value)} />
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@llmnative/react",
3
- "version": "2.2.0",
3
+ "version": "2.2.2",
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",
@@ -1,9 +1,9 @@
1
- import React from 'react';
2
-
3
- export default function Footer() {
4
- return (
5
- <footer className="shrink-0 border-t border-footer-border bg-footer px-4 py-1.5 text-end text-xs text-footer-foreground">
6
- Powered by [projectname]
7
- </footer>
8
- );
9
- }
1
+ import React from 'react';
2
+
3
+ export default function Footer() {
4
+ return (
5
+ <footer className="shrink-0 border-t border-footer-border bg-footer px-4 py-1.5 text-end text-xs text-footer-foreground">
6
+ © {new Date().getFullYear()} [projectname]
7
+ </footer>
8
+ );
9
+ }
@@ -1,24 +1,26 @@
1
- import React from 'react';
2
- import { ActionButton, AuthButton, Brand } from '@llmnative/react';
3
-
4
- type HeaderProps = {
5
- onMenuToggle: () => void;
6
- };
7
-
8
- export default function Header({ onMenuToggle }: HeaderProps) {
9
- return (
10
- <header className="flex h-14 shrink-0 items-center gap-3 border-b border-header-border bg-header px-4 text-header-foreground">
11
- <ActionButton
12
- icon="menu"
13
- ariaLabel="Toggle navigation"
14
- variant="link"
15
- wrapperClassName="lg:hidden"
16
- onClick={onMenuToggle}
17
- />
18
- <Brand url="/" label="[projectname]" />
19
- <div className="ms-auto">
20
- <AuthButton aspect="avatar" />
21
- </div>
22
- </header>
23
- );
24
- }
1
+ import React from 'react';
2
+ import { ActionButton, AuthButton, Brand, useI18n } from '@llmnative/react';
3
+
4
+ type HeaderProps = {
5
+ onMenuToggle: () => void;
6
+ };
7
+
8
+ export default function Header({ onMenuToggle }: HeaderProps) {
9
+ const common = useI18n('common');
10
+
11
+ return (
12
+ <header className="flex h-14 shrink-0 items-center gap-3 border-b border-header-border bg-header px-4 text-header-foreground">
13
+ <ActionButton
14
+ icon="menu"
15
+ ariaLabel={common.openNavigation}
16
+ variant="link"
17
+ wrapperClassName="lg:hidden"
18
+ onClick={onMenuToggle}
19
+ />
20
+ <Brand url="/" label="[projectname]" />
21
+ <div className="ms-auto">
22
+ <AuthButton aspect="avatar" />
23
+ </div>
24
+ </header>
25
+ );
26
+ }
package/themes/default.ts CHANGED
@@ -48,7 +48,7 @@ export const preset: ThemePresetConfig = {
48
48
  mutedForeground: '215 20.2% 65.1%',
49
49
  accent: '217.2 32.6% 17.5%',
50
50
  accentForeground: '210 40% 98%',
51
- destructive: '0 62.8% 30.6%',
51
+ destructive: '0 72% 51%',
52
52
  destructiveForeground:'210 40% 98%',
53
53
  success: '142.1 70.6% 45.3%',
54
54
  successForeground: '0 0% 100%',
package/themes/flat.ts CHANGED
@@ -46,7 +46,7 @@ export const preset: ThemePresetConfig = {
46
46
  mutedForeground: '215 10% 55%',
47
47
  accent: '215 20% 22%',
48
48
  accentForeground: '215 10% 85%',
49
- destructive: '0 62% 40%',
49
+ destructive: '0 72% 51%',
50
50
  destructiveForeground:'0 0% 100%',
51
51
  success: '142.1 70.6% 45.3%',
52
52
  successForeground: '0 0% 100%',