@llmnative/react 2.2.1 → 2.3.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.
@@ -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
  *
@@ -79,6 +79,12 @@ export interface ModalYesNoProps {
79
79
  /** Async handler for the No button. Return `true` to close. */
80
80
  onNo?: (e: React.MouseEvent<HTMLElement>) => Promise<boolean>;
81
81
  onClose?: () => void;
82
+ /** The words of the confirming button: the action, e.g. "Revoca" (default "Yes" of the dictionary). */
83
+ yesLabel?: string;
84
+ /** The words of the other button, e.g. "Annulla" (default "No" of the dictionary). */
85
+ noLabel?: string;
86
+ /** The action cannot be undone: the confirming button is red (`danger`) and the other one comes first. */
87
+ danger?: boolean;
82
88
  }
83
89
  /** Props for a simple acknowledgment modal with an OK button. */
84
90
  export interface ModalOkProps {
@@ -87,6 +93,6 @@ export interface ModalOkProps {
87
93
  onClose?: () => void;
88
94
  }
89
95
  declare const Modal: (props: ModalProps) => React.JSX.Element;
90
- export declare const ModalYesNo: ({ children, title, onYes, onNo, onClose }: ModalYesNoProps) => React.JSX.Element;
96
+ export declare const ModalYesNo: ({ children, title, onYes, onNo, onClose, yesLabel, noLabel, danger }: ModalYesNoProps) => React.JSX.Element;
91
97
  export declare const ModalOk: ({ children, title, onClose }: ModalOkProps) => React.JSX.Element;
92
98
  export default Modal;
package/llms-full.txt CHANGED
@@ -743,6 +743,8 @@ Quando `commands` e presente in `mode="run"`, `Prompt` monta internamente `Conte
743
743
  {content}
744
744
  </Modal>
745
745
  <ModalYesNo title="Sicuro?" onClose={() => {}} onYes={async () => true}>Eliminare il record?</ModalYesNo>
746
+ // Un'azione che non si annulla: nominala e mettila in rosso (CR-128); "Annulla" viene per primo.
747
+ <ModalYesNo title="Revocare l'invito?" danger yesLabel="Revoca" noLabel="Annulla" onYes={revoke} onNo={async () => true}>La persona non potrà più usare il link.</ModalYesNo>
746
748
  <ModalOk title="Completato!" onClose={() => {}}>Salvato.</ModalOk>
747
749
  ```
748
750
  `size`: `'sm' | 'md' | 'lg' | 'xl' | '2xl' | 'fullscreen'`
@@ -1052,6 +1054,9 @@ Parti comuni per grafici propri: `useChartTooltip()` (`show`, `showAt`, `hide`,
1052
1054
  ## Blocks
1053
1055
 
1054
1056
  ```tsx
1057
+ // Senza trail: dall'indirizzo, ogni pezzo col titolo della sua rotta nel menu ('/impostazioni' → 'Impostazioni'),
1058
+ // altrimenti leggibile ('lead-fermi' → 'Lead fermi'); un id resta com'è.
1059
+ <Breadcrumbs />
1055
1060
  <Breadcrumbs trail={[{ label: 'Home', href: '/' }, { label: 'Utenti' }]} separator="/" jsonLd />
1056
1061
  <Brand url="/" label="MyApp" logo="/logo.svg" width={120} />
1057
1062
  <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.1",
3
+ "version": "2.3.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
@@ -226,7 +226,7 @@ export const components: Theme = {
226
226
  wrapperClassName: '',
227
227
  className: '',
228
228
  icon: 'loader-2',
229
- title: 'Loading..',
229
+ title: '',
230
230
  description: '',
231
231
  },
232
232
  ActionButton: {
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%',
@@ -242,7 +242,7 @@ export const components: Theme = {
242
242
  wrapperClassName: '',
243
243
  className: '',
244
244
  icon: 'loader-2',
245
- title: 'Loading..',
245
+ title: '',
246
246
  description: '',
247
247
  },
248
248
  ActionButton: {
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%',
@@ -226,7 +226,7 @@ export const components: Theme = {
226
226
  wrapperClassName: '',
227
227
  className: '',
228
228
  icon: 'loader-2',
229
- title: 'Loading..',
229
+ title: '',
230
230
  description: '',
231
231
  },
232
232
  ActionButton: {