Commit cae5ce6
authored
feat: new react-embed actions (#23)
## Background
Adds new programmatic actions to the React embed component for advanced
integrations.
Closes:
- #3
- #5
## Changes
- Add `goTo({ page })` action to navigate to a specific page
- Add `createField({ type, page, x, y, width, height, value? })` action
to programmatically create annotation fields
- Add `clearFields({ fieldIds?, page? })` action to remove fields by ID
or page
- Add `getDocumentContent({ extractionMode? })` action to extract
document content (supports OCR)
- Introduce `ActionResult<TData>` discriminated union for typed action
responses
- Increase request timeout from 5s to 30s to support OCR extraction
- Add test coverage
- Update documentation1 parent d3c5f42 commit cae5ce6
File tree
19 files changed
+2924
-278
lines changed- .changeset
- .github/workflows
- .vscode
- react
- src
19 files changed
+2924
-278
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
0 commit comments