You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: rename BOXED_TEXT tool type to COMB_TEXT (#35)
## Background
The editor renamed its `BOXED_TEXT` comb-field type to `COMB_TEXT`
("comb" is the Acrobat / PDF-spec term for box-per-character fields like
IBAN, dates, CERFA). The embed artifacts still referenced the old name.
The editor accepts both values at runtime, so this is a type/naming
change, not a runtime break.
## Changes
- Replace `BOXED_TEXT` with `COMB_TEXT` in the react `ToolType` (README
+ test updated)
- Add a major changeset for `@simplepdf/react-embed-pdf`
- Rename comb references across the copilot (code, schemas, types,
tools, toolbar) and all 23 locale keys (`boxedText` -> `combText`, en
label "Comb text")
- Update `documentation/IFRAME.md` and the `with-custom-sidebar` example
- Fix the pre-existing copilot `biome check` failures (formatting +
`useOptionalChain`) and add two justified `biome-ignore`s so `check` is
green
## Notes
Runtime is backwards-compatible: the editor still accepts `BOXED_TEXT`,
so already-deployed embeds keep working; only the TypeScript type
changes.
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`.
6
+
7
+
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.
// the visible width. Reset height to 'auto' first so scrollHeight reflects
860
862
// the wrapped content, then clamp to MAX. The CSS transition on the element
861
863
// animates the height change.
864
+
// biome-ignore lint/correctness/useExhaustiveDependencies: `draft` is a deliberate re-run trigger (the body reads scrollHeight, not draft) so the textarea resizes on every keystroke; removing it freezes the height.
field_ids: z.array(z.string()).optional().describe('Specific field identifiers to delete (omit to target by page or all)'),
32
-
page: z.number().int().positive().optional().describe('1-indexed visible page to clear (omit to target specific ids or all)'),
31
+
field_ids: z
32
+
.array(z.string())
33
+
.optional()
34
+
.describe('Specific field identifiers to delete (omit to target by page or all)'),
35
+
page: z
36
+
.number()
37
+
.int()
38
+
.positive()
39
+
.optional()
40
+
.describe('1-indexed visible page to clear (omit to target specific ids or all)'),
33
41
})
34
42
.describe(
35
43
'Deletes fields from the document. Pass field_ids to delete specific fields, page to clear a single page, or both omitted to delete every field. Destructive: only call when the user explicitly asks.',
36
44
)
37
45
38
46
exportconstSelectToolInput=z
39
47
.object({
40
-
tool: SupportedFieldTypeSchema.nullable().describe('Editor tool to activate. Pass null to return to the cursor.'),
'Editor tool to activate. Pass null to return to the cursor.',
50
+
),
41
51
})
42
52
.describe(
43
-
'Switches the active editor tool. Use tool="TEXT" for free-form text, "BOXED_TEXT" for box-per-character fields (e.g. IBAN), or any of the other field types to let the user drop fields on a document without native AcroFields.',
53
+
'Switches the active editor tool. Use tool="TEXT" for free-form text, "COMB_TEXT" for box-per-character fields (e.g. IBAN), or any of the other field types to let the user drop fields on a document without native AcroFields.',
44
54
)
45
55
46
56
exportconstSetFieldValueInput=z
@@ -50,7 +60,7 @@ export const SetFieldValueInput = z
50
60
.string()
51
61
.nullable()
52
62
.describe(
53
-
'Value to write. TEXT/BOXED_TEXT: any string. CHECKBOX: "checked" ticks, null un-ticks (never "true"/"false"). Do not use this tool for SIGNATURE or PICTURE fields.',
63
+
'Value to write. TEXT/COMB_TEXT: any string. CHECKBOX: "checked" ticks, null un-ticks (never "true"/"false"). Do not use this tool for SIGNATURE or PICTURE fields.',
54
64
),
55
65
})
56
66
.describe('Writes a value into a single field in the PDF')
0 commit comments