@llmnative/react 2.2.2 → 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.
@@ -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'`
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@llmnative/react",
3
- "version": "2.2.2",
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
@@ -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
@@ -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: {