Skip to content

Commit 7f62b68

Browse files
chore: version packages
1 parent 6b1e4da commit 7f62b68

5 files changed

Lines changed: 56 additions & 54 deletions

File tree

.changeset/rename-boxed-text-to-comb-text.md

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

.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: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,51 @@
11
# @simplepdf/react-embed-pdf
22

3+
## 2.0.0
4+
5+
### Major Changes
6+
7+
- fd243f0: Renames the `BOXED_TEXT` tool type to `COMB_TEXT`. "Comb" is the Acrobat / PDF-spec term for box-per-character fields (IBAN, dates, CERFA), so `actions.selectTool(...)` and the `SELECT_TOOL` iframe event now use `COMB_TEXT`, and the `ToolType` union exposes `COMB_TEXT` instead of `BOXED_TEXT`.
8+
9+
Already-deployed embeds keep working without a code change: the editor still accepts the legacy `BOXED_TEXT` value at runtime, so this only changes the TypeScript type. If you are not calling `actions.selectTool('BOXED_TEXT')` or `sendEvent("SELECT_TOOL", { tool: "BOXED_TEXT" })`, you can safely update to this new major version.
10+
11+
```ts
12+
// Before
13+
await actions.selectTool('BOXED_TEXT');
14+
15+
// After
16+
await actions.selectTool('COMB_TEXT');
17+
```
18+
19+
- 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.
20+
21+
If you are not using `actions.removeFields(...)` or `sendEvent("REMOVE_FIELDS", ...)`, you can safely update to this new major version.
22+
23+
```ts
24+
// Before
25+
const result = await actions.removeFields({ page: 1 });
26+
if (result.success) {
27+
console.log(result.data.removed_count);
28+
}
29+
30+
// After
31+
const result = await actions.deleteFields({ page: 1 });
32+
if (result.success) {
33+
console.log(result.data.deleted_count);
34+
}
35+
```
36+
37+
- 9069558: Replaces `createField` with `detectFields` for automatic form field detection. This is a breaking change: the `createField` action and `CreateFieldOptions` type have been removed.
38+
39+
If you are not using `actions.createField(...)` or `sendEvent("CREATE_FIELD", ...)`, you can safely update to this new major version.
40+
41+
```ts
42+
// Before (removed)
43+
await actions.createField({ type: 'TEXT', page: 1, x: 100, y: 700, width: 200, height: 30 });
44+
45+
// After
46+
await actions.detectFields();
47+
```
48+
349
## 1.10.0
450

551
### 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)