@mydatavalue/polter 0.1.3 → 0.1.4

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.
Files changed (2) hide show
  1. package/README.md +22 -0
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -79,6 +79,28 @@ import { z } from 'zod';
79
79
  </AgentAction>
80
80
  ```
81
81
 
82
+ **Modal interactions** — click a button to open a modal, type a value, then confirm:
83
+
84
+ ```tsx
85
+ // Parent — 3-step flow: open → type → confirm
86
+ <AgentAction name="apply_discount" parameters={z.object({ pct: z.number() })}
87
+ onExecute={async () => { /* await async work started by the confirm click */ }}>
88
+ <AgentStep label="Open settings">
89
+ <SettingsButton />
90
+ </AgentStep>
91
+ <AgentStep label="Set value" fromTarget="discount-input" setParam="pct" />
92
+ <AgentStep label="Confirm" fromTarget="confirm-btn" />
93
+ </AgentAction>
94
+
95
+ // Child (modal) — targets with prepareView to set up internal state
96
+ <AgentTarget name="discount-input" prepareView={() => setMode("custom")}>
97
+ <Input value={value} onChange={...} />
98
+ </AgentTarget>
99
+ <AgentTarget name="confirm-btn">
100
+ <ConfirmButton />
101
+ </AgentTarget>
102
+ ```
103
+
82
104
  ### 3. Connect to your agent
83
105
 
84
106
  ```tsx
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mydatavalue/polter",
3
- "version": "0.1.3",
3
+ "version": "0.1.4",
4
4
  "description": "Declarative React library for agent-driven UI control with visual guided execution",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",