@llmnative/react 1.40.0 → 1.41.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.
@@ -129,6 +129,14 @@ interface BaseFormProps {
129
129
  log?: boolean;
130
130
  /** Show the inline save/delete notice banner. Defaults to `true`. */
131
131
  showNotice?: boolean;
132
+ /**
133
+ * Whether saving needs a changed field. Defaults to `true`: an unchanged form says "No changes
134
+ * to save" and its save is disabled. `false` makes it an action form (CR-117), whose initial
135
+ * values are already a valid submission (e.g. start a release with the proposed version):
136
+ * `save()` validates and calls `onSave` even when nothing changed. `isDirty` still tells
137
+ * whether something did.
138
+ */
139
+ requireChanges?: boolean;
132
140
  /**
133
141
  * Stable bucket that isolates this form's local draft. Omit to disable draft persistence.
134
142
  * The Form appends its own path/route identity, so one bucket safely serves many forms.
package/llms-full.txt CHANGED
@@ -305,6 +305,7 @@ export class RestDataProvider implements DataProviderAdapter {
305
305
  | `draftBucket` | `string` | Bucket stabile che isola la bozza locale; omettilo per disabilitare la persistenza |
306
306
  | `noticeAnchorRef` | `React.RefObject<HTMLElement>` | Ancoraggio sticky per notifiche |
307
307
  | `showNotice` | `boolean` | Mostra notifiche save/delete (default `true`) |
308
+ | `requireChanges` | `boolean` | Default `true`: senza un campo cambiato il salvataggio dice "No changes to save" ed è disabilitato. `false` = form d'azione (CR-117): i valori iniziali sono già un invio valido (es. avviare una release con la versione proposta), `save()` valida e chiama `onSave` anche senza modifiche; `isDirty` dice comunque se qualcosa è cambiato |
308
309
  | `children` | `ReactNode \| ((fields) => ReactNode) \| (({ record }) => ReactNode)` | Contenuto form |
309
310
  | `header` | `ReactNode` | Contenuto header custom |
310
311
  | `footer` | `ReactNode` | Contenuto footer custom |
@@ -336,6 +337,16 @@ const form = useFormController();
336
337
  <Form controller={form} draftBucket="workspace/acme" onSave={...} />
337
338
  ```
338
339
 
340
+ Esempio — form d'azione, i valori proposti si inviano anche senza modificarli (CR-117):
341
+ ```tsx
342
+ const form = useFormController();
343
+
344
+ <LoadingButton label="Avvia la release" onClick={() => form.save()} />
345
+ <Form controller={form} appearance="empty" requireChanges={false} defaultValues={{ version: '1.4.0', notes }} onSave={async ({ record }) => { await start(record); return undefined; }}>
346
+ <Input name="version" label="Versione" required />
347
+ </Form>
348
+ ```
349
+
339
350
  Esempio — uso dentro il form (senza passare controller):
340
351
  ```tsx
341
352
  function MySaveButton() {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@llmnative/react",
3
- "version": "1.40.0",
3
+ "version": "1.41.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",