Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 0 additions & 15 deletions .changeset/rename-boxed-text-to-comb-text.md

This file was deleted.

21 changes: 0 additions & 21 deletions .changeset/rename-remove-fields-to-delete-fields.md

This file was deleted.

15 changes: 0 additions & 15 deletions .changeset/replace-create-field-with-detect-fields.md

This file was deleted.

46 changes: 46 additions & 0 deletions react/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,51 @@
# @simplepdf/react-embed-pdf

## 2.0.0

### Major Changes

- 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`.

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.

```ts
// Before
await actions.selectTool('BOXED_TEXT');

// After
await actions.selectTool('COMB_TEXT');
```

- 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.

If you are not using `actions.removeFields(...)` or `sendEvent("REMOVE_FIELDS", ...)`, you can safely update to this new major version.

```ts
// Before
const result = await actions.removeFields({ page: 1 });
if (result.success) {
console.log(result.data.removed_count);
}

// After
const result = await actions.deleteFields({ page: 1 });
if (result.success) {
console.log(result.data.deleted_count);
}
```

- 9069558: Replaces `createField` with `detectFields` for automatic form field detection. This is a breaking change: the `createField` action and `CreateFieldOptions` type have been removed.

If you are not using `actions.createField(...)` or `sendEvent("CREATE_FIELD", ...)`, you can safely update to this new major version.

```ts
// Before (removed)
await actions.createField({ type: 'TEXT', page: 1, x: 100, y: 700, width: 200, height: 30 });

// After
await actions.detectFields();
```

## 1.10.0

### Minor Changes
Expand Down
13 changes: 10 additions & 3 deletions react/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@simplepdf/react-embed-pdf",
"version": "1.10.0",
"version": "2.0.0",
"description": "SimplePDF straight into your React app",
"repository": {
"type": "git",
Expand Down Expand Up @@ -57,6 +57,13 @@
"typescript": "^5.9.3",
"vitest": "4.0.17"
},
"files": ["dist"],
"keywords": ["react", "typescript", "npm", "pdf"]
"files": [
"dist"
],
"keywords": [
"react",
"typescript",
"npm",
"pdf"
]
}