Skip to content

Commit cfa0fd1

Browse files
committed
chore: changeset for the shell scan button
Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QsR2jUw36sPe8KXr9ANYMv
1 parent 4167917 commit cfa0fd1

1 file changed

Lines changed: 14 additions & 0 deletions

File tree

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
---
2+
'@object-ui/mobile': patch
3+
'@object-ui/fields': patch
4+
'@object-ui/i18n': patch
5+
---
6+
7+
feat(fields): offer the mobile shell's code scanner on text and lookup fields
8+
9+
Clause-②: yes
10+
Metadata-protocol: none
11+
12+
- `@object-ui/mobile` types the shell bridge's `scan(opts?)` method: `'scan'` joins `NativeHostMethod`, `ObjectStackNative` gains an optional `scan?(opts)` (a shell older than the scanner does not carry it), `NativeScanOptions` (`formats?: string[]`) is exported, and `nativeScan(opts?)` resolves `unavailable`, `ok` with the decoded text or `null` (the user closed the scanner), or `failed` with the shell's message.
13+
- `@object-ui/fields`: inside the shell, when the bridge announces `scan`, an editable single-line text field and a lookup field show a scan button. A text field takes the decoded text through `onChange`, as a keystroke would; a lookup opens its search with it. A closed scanner changes nothing, and a failure shows the error toast with the shell's message. A plain browser, an older shell, and a read-only or disabled field show no button. `PeoplePicker` gains an optional `initialSearch` prop that the search-first lookup uses to open seeded.
14+
- `@object-ui/i18n`: two keys, `fields.scan.button` and `fields.scan.failed`, in every locale.

0 commit comments

Comments
 (0)