pxengine 0.1.96 → 0.1.97

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.
package/dist/index.d.cts CHANGED
@@ -186,6 +186,11 @@ interface InputAtomType extends BaseAtom {
186
186
  labelColor?: string;
187
187
  /** Stable key for the answer in Q/A submission. Defaults to id. */
188
188
  fieldKey?: string;
189
+ /**
190
+ * When provided, the atom renders as a live interactive input (not readOnly).
191
+ * Called with (fieldKey | id, newValue) on every change.
192
+ */
193
+ onValueChange?: (key: string, value: any) => void;
189
194
  }
190
195
  interface ToggleAtomType extends BaseAtom {
191
196
  type: "toggle";
@@ -1238,6 +1243,14 @@ interface PXEngineRendererProps {
1238
1243
  * explicitly in the schema props wins over this value.
1239
1244
  */
1240
1245
  theme?: WidgetTheme;
1246
+ /**
1247
+ * Called when a submit ButtonAtom inside the composition is clicked.
1248
+ * Receives the Q/A formatted text string (ready to send to the agent) and
1249
+ * a map of { fieldKey → value } for structured access.
1250
+ *
1251
+ * When provided, InputAtom nodes become live-editable (not readOnly).
1252
+ */
1253
+ onFormSubmit?: (qaText: string, values: Record<string, any>) => void;
1241
1254
  }
1242
1255
  declare const PXEngineRenderer: React__default.FC<PXEngineRendererProps>;
1243
1256
 
package/dist/index.d.ts CHANGED
@@ -186,6 +186,11 @@ interface InputAtomType extends BaseAtom {
186
186
  labelColor?: string;
187
187
  /** Stable key for the answer in Q/A submission. Defaults to id. */
188
188
  fieldKey?: string;
189
+ /**
190
+ * When provided, the atom renders as a live interactive input (not readOnly).
191
+ * Called with (fieldKey | id, newValue) on every change.
192
+ */
193
+ onValueChange?: (key: string, value: any) => void;
189
194
  }
190
195
  interface ToggleAtomType extends BaseAtom {
191
196
  type: "toggle";
@@ -1238,6 +1243,14 @@ interface PXEngineRendererProps {
1238
1243
  * explicitly in the schema props wins over this value.
1239
1244
  */
1240
1245
  theme?: WidgetTheme;
1246
+ /**
1247
+ * Called when a submit ButtonAtom inside the composition is clicked.
1248
+ * Receives the Q/A formatted text string (ready to send to the agent) and
1249
+ * a map of { fieldKey → value } for structured access.
1250
+ *
1251
+ * When provided, InputAtom nodes become live-editable (not readOnly).
1252
+ */
1253
+ onFormSubmit?: (qaText: string, values: Record<string, any>) => void;
1241
1254
  }
1242
1255
  declare const PXEngineRenderer: React__default.FC<PXEngineRendererProps>;
1243
1256