@llmnative/react 1.34.0 → 1.36.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.
@@ -344,6 +344,8 @@ export interface I18nDict {
344
344
  chooseOne: string;
345
345
  chooseMany: string;
346
346
  keyboardHint: string;
347
+ /** CR-110 — hint while typing the free-text answer (Enter adds a line). */
348
+ textKeyboardHint: string;
347
349
  next: string;
348
350
  back: string;
349
351
  submit: string;
@@ -76,5 +76,9 @@ export interface ChatQuestionsProps {
76
76
  * choices (the recommended one stands out), single or multiple choice, "Other" with free text, a
77
77
  * review and one submit for all the answers. Keyboard: number (or letter) keys choose, arrows move
78
78
  * between tabs and choices, Enter continues. With `answers` it shows a set already answered.
79
+ *
80
+ * CR-110 — The free text ("Other", or a question without options) is a textarea that grows with
81
+ * the text (two lines, then up to a height and it scrolls; resizable vertically): Enter adds a
82
+ * line, Ctrl/Cmd+Enter continues or sends.
79
83
  */
80
84
  export default function ChatQuestions({ questions, onSubmit, numbering, allowOther, answers, disabled, autoFocus, submitLabel, className, classNames, }: ChatQuestionsProps): React.JSX.Element | null;
package/llms-full.txt CHANGED
@@ -817,6 +817,13 @@ cancellazione delle richieste precedenti tramite `AbortSignal` e stati loading/e
817
817
  </ContextMenu>
818
818
  ```
819
819
  Funziona su qualsiasi `<textarea>` / `<input>` figlio. Trigger custom (`/`, `@`, `{`), filtro searchable, navigazione tastiera, floating positioning.
820
+ `ContextMenu.Item` accetta `description` (opzionale): seconda riga attenuata (`text-muted-foreground`)
821
+ sotto la label, troncata; il menu è largo al massimo 28rem e il testo completo resta nel `title`
822
+ della voce. Il filtro cerca nel testo digitato dopo il trigger su label, value e description (CR-111).
823
+
824
+ ```tsx
825
+ <ContextMenu.Item label="/plan" value="plan" icon="list" description="Scrive il piano della release" />
826
+ ```
820
827
 
821
828
  | Prop | Tipo | Note |
822
829
  |---|---|---|
@@ -825,7 +832,7 @@ Funziona su qualsiasi `<textarea>` / `<input>` figlio. Trigger custom (`/`, `@`,
825
832
  | `controlled` | `ContextMenuControlledState` | Stato controllato esterno |
826
833
  | `onSelect` | `(item, context) => void` | |
827
834
 
828
- **EditorCommand** (usato da `commands` prop su `RichText`, `CodeEditor`, `Prompt`):
835
+ **EditorCommand** (usato da `commands` prop su `Chatbot`, `Prompt`, `RichText`, `CodeEditor`):
829
836
  ```ts
830
837
  {
831
838
  name: string;
@@ -837,6 +844,11 @@ Funziona su qualsiasi `<textarea>` / `<input>` figlio. Trigger custom (`/`, `@`,
837
844
  }
838
845
  ```
839
846
 
847
+ `description` compare sotto `/name` nel menu dei comandi di tutti e quattro i consumer e il filtro
848
+ la usa (digitare `/release` trova un comando descritto come "…release…"). Un comando senza `handler`
849
+ sostituisce il trigger con `/name ` (spazio finale) e il testo resta tale: in `Chatbot`/`Prompt` il
850
+ messaggio inviato è letteralmente `"/name …"`, da interpretare a cura di chi lo riceve.
851
+
840
852
  `consumeSuffix` elimina una chiusura automatica adiacente durante la sostituzione del trigger,
841
853
  utile quando un comando cambia famiglia sintattica (per esempio da `{{ ... }}` a `{% ... %}`).
842
854
 
@@ -1027,8 +1039,12 @@ Parti di un messaggio di un modello, da comporre nel proprio thread (anche accan
1027
1039
  // (numbering, altrimenti dedotto da etichette "A) …" / "1. …", che vengono tolte); consigliata
1028
1040
  // (recommended: indice da 0 o etichetta; anche il suffisso "(Recommended)"); multiple; "Altro" con
1029
1041
  // testo libero (allowOther, default true; per domanda `custom`); senza options è a testo libero.
1042
+ // Il testo libero è una textarea (CR-110) di 2 righe che cresce col testo fino a ~160px e poi
1043
+ // scorre; ridimensionabile in verticale. Lì Invio va a capo, Ctrl/Cmd+Invio prosegue o invia
1044
+ // (suggerimento `chat.textKeyboardHint` nel piè mentre si scrive).
1030
1045
  // Tastiera: numeri (o lettere con A-B-C) scelgono, frecce sinistra/destra tra le schede, su/giù tra
1031
- // le opzioni, Spazio seleziona, Invio prosegue o invia (su una scelta singola prima la sceglie).
1046
+ // le opzioni, Spazio seleziona, Invio prosegue o invia (su una scelta singola prima la sceglie;
1047
+ // nel testo libero serve Ctrl/Cmd+Invio).
1032
1048
  // Ruoli tablist/tab/tabpanel, radiogroup/radio o group/checkbox.
1033
1049
  // Scelta singola: il click sceglie e passa alla domanda dopo. onSubmit che rifiuta lascia il form.
1034
1050
  // answers={[…]} mostra un insieme già risposto (sola lettura); disabled, autoFocus, submitLabel,
@@ -1079,6 +1095,12 @@ const registry = createAIProviderRegistry(definitions)
1079
1095
  // Azioni di Chatbot (CR-107): con `content` aprono un menu; senza, sono pulsanti con `onClick`.
1080
1096
  // <Chatbot actions={[{ key: 'finish', icon: 'git-pull-request', label: 'Concludi', showLabel: true,
1081
1097
  // disabled: running, onClick: finish }]} … />
1098
+ // Comandi "/" di Chatbot: `commands` (EditorCommand[]) + `commandsTrigger` (default "/").
1099
+ // Il menu mostra `/name` e sotto la `description`; il filtro cerca in entrambi (CR-111).
1100
+ // Senza `handler` la scelta inserisce "/name " e l'invio manda il testo così com'è.
1101
+ // Tastiera: Invio invia a menu chiuso e sceglie il comando evidenziato a menu aperto;
1102
+ // Maiusc+Invio (e Invio durante la composizione IME) va a capo.
1103
+ // <Chatbot commands={[{ name: 'plan', icon: 'list', description: 'Scrive il piano' }]} … />
1082
1104
  ```
1083
1105
 
1084
1106
  ### Identità dei modelli indipendente dal provider (CR-103)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@llmnative/react",
3
- "version": "1.34.0",
3
+ "version": "1.36.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",