Skip to content

Commit 5f5b2a4

Browse files
chore: version packages
1 parent 9062b12 commit 5f5b2a4

4 files changed

Lines changed: 44 additions & 39 deletions

File tree

.changeset/rename-remove-fields-to-delete-fields.md

Lines changed: 0 additions & 21 deletions
This file was deleted.

.changeset/replace-create-field-with-detect-fields.md

Lines changed: 0 additions & 15 deletions
This file was deleted.

react/CHANGELOG.md

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,39 @@
11
# @simplepdf/react-embed-pdf
22

3+
## 2.0.0
4+
5+
### Major Changes
6+
7+
- 4b86b72: Renames `actions.removeFields` to `actions.deleteFields` and the corresponding iframe event from `REMOVE_FIELDS` to `DELETE_FIELDS`. The result payload field is renamed from `removed_count` to `deleted_count`. Aligns naming with the new `DELETE_PAGES` event so all destructive operations use `delete_*` consistently.
8+
9+
If you are not using `actions.removeFields(...)` or `sendEvent("REMOVE_FIELDS", ...)`, you can safely update to this new major version.
10+
11+
```ts
12+
// Before
13+
const result = await actions.removeFields({ page: 1 });
14+
if (result.success) {
15+
console.log(result.data.removed_count);
16+
}
17+
18+
// After
19+
const result = await actions.deleteFields({ page: 1 });
20+
if (result.success) {
21+
console.log(result.data.deleted_count);
22+
}
23+
```
24+
25+
- 9069558: Replaces `createField` with `detectFields` for automatic form field detection. This is a breaking change: the `createField` action and `CreateFieldOptions` type have been removed.
26+
27+
If you are not using `actions.createField(...)` or `sendEvent("CREATE_FIELD", ...)`, you can safely update to this new major version.
28+
29+
```ts
30+
// Before (removed)
31+
await actions.createField({ type: 'TEXT', page: 1, x: 100, y: 700, width: 200, height: 30 });
32+
33+
// After
34+
await actions.detectFields();
35+
```
36+
337
## 1.10.0
438

539
### Minor Changes

react/package.json

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@simplepdf/react-embed-pdf",
3-
"version": "1.10.0",
3+
"version": "2.0.0",
44
"description": "SimplePDF straight into your React app",
55
"repository": {
66
"type": "git",
@@ -57,6 +57,13 @@
5757
"typescript": "^5.9.3",
5858
"vitest": "4.0.17"
5959
},
60-
"files": ["dist"],
61-
"keywords": ["react", "typescript", "npm", "pdf"]
60+
"files": [
61+
"dist"
62+
],
63+
"keywords": [
64+
"react",
65+
"typescript",
66+
"npm",
67+
"pdf"
68+
]
6269
}

0 commit comments

Comments
 (0)