ink-framework-wallet 0.1.0-alpha.1 → 0.1.0-alpha.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +3 -3
- package/README.md +0 -25
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ink-framework-wallet",
|
|
3
|
-
"version": "0.1.0-alpha.
|
|
3
|
+
"version": "0.1.0-alpha.3",
|
|
4
4
|
"exports": {
|
|
5
5
|
".": "./src/index.tsx"
|
|
6
6
|
},
|
|
@@ -8,9 +8,9 @@
|
|
|
8
8
|
"valibot": "1.5.0"
|
|
9
9
|
},
|
|
10
10
|
"peerDependencies": {
|
|
11
|
-
"ink": "npm:ink-framework@0.1.0-alpha.
|
|
11
|
+
"ink": "npm:ink-framework@0.1.0-alpha.3",
|
|
12
12
|
"react": "19.2.8",
|
|
13
|
-
"@ink/barcode": "npm:ink-framework-barcode@0.1.0-alpha.
|
|
13
|
+
"@ink/barcode": "npm:ink-framework-barcode@0.1.0-alpha.3"
|
|
14
14
|
},
|
|
15
15
|
"license": "MIT",
|
|
16
16
|
"repository": {
|
package/README.md
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
# Wallet pass previews
|
|
2
|
-
|
|
3
|
-
`@ink/wallet` previews single `.pkpass` attachments on Android. `wallet.preview(source, signal)` accepts an HTTP(S) URL or an `ink-file://` managed file. Native code caches static previews by source, reusing the saved metadata and artwork before downloading or reading the ZIP. Missing artwork is rebuilt from the cached archive. Source keys are hashed, with up to eight source aliases per archive and 32 cached archives. `PassPreview` displays its fields and supported barcode using Ink components.
|
|
4
|
-
|
|
5
|
-
```tsx
|
|
6
|
-
const pass = await wallet.preview(attachment.src, signal);
|
|
7
|
-
<PassPreview pass={pass} />
|
|
8
|
-
if (await wallet.canOpen("com.vandamd.passes")) {
|
|
9
|
-
await wallet.open(pass, "com.vandamd.passes");
|
|
10
|
-
}
|
|
11
|
-
```
|
|
12
|
-
|
|
13
|
-
Receiving apps implement an exported `com.vandam.ink.PassImportActivity`. The sender must declare the receiver package in Android `<queries>` for `canOpen`. The hand-off is an explicit `ACTION_VIEW` containing a FileProvider content URI, PKPass MIME type and temporary read permission. Copy the file while that permission is active. Passes implements this contract and asks the user before saving.
|
|
14
|
-
|
|
15
|
-
Conversation rows use `filePreview: { title, label, artwork? }` and `onFilePress(message)` to reuse the native link-card layout without representing an attachment as a web link. Artwork appears in a 56 × 56 square beside the labels, preserving its aspect ratio. Beeper loads pass artwork in the background and leaves the text card usable if no artwork is available.
|
|
16
|
-
|
|
17
|
-
Artwork: logo, strip, thumbnail, background, footer and icon PNGs, preferring @3x then @2x. Artwork is displayed as images alongside the fields, with background used when no strip is present. `wallet.retain(pass)` makes artwork durable before saving its returned metadata; `wallet.release(pass)` removes saved artwork when deleting a pass. Preview eviction does not remove retained artwork.
|
|
18
|
-
|
|
19
|
-
Layout: pass field groups drive paired primary fields (with a transit arrow for boarding passes), paired details and a centred barcode with its `altText` caption. The decorative logo/title row is hidden to keep the ticket compact. Header fields remain visible as ordinary detail rows; an unlabelled boarding-pass header that repeats the displayed route is omitted. Back fields are available through Passes’ action menu’s Info page; Beeper hides them. `wallet.details(pass)` returns labelled text parts with link destinations, parsing HTML anchors and recognising plain web and email links. Render linked parts with `Text href` for underlined, tappable links. Older saved passes without group metadata retain all fields in paired rows; reimport to restore the original grouping.
|
|
20
|
-
|
|
21
|
-
Supported: classic boarding pass, coupon, event ticket, generic and store card fields; QR, PDF417, Aztec and Code128 barcodes. UTF-8 is supported, along with ASCII data in recognised legacy encodings. Unsupported barcode formats or non-ASCII legacy encodings are omitted rather than silently changing the encoded data. Passes can still save the fields.
|
|
22
|
-
|
|
23
|
-
This is a static preview, not a full Apple Wallet implementation: no signature verification, exact Wallet layout reproduction, localisation, live updates, NFC or multi-pass archives. Date and time styles use the device locale, respecting `ignoresTimeZone`; invalid dates retain their source text. Numbers retain their source values. Cached previews are regenerated when the parser version changes. See [Apple's pass format](https://developer.apple.com/library/archive/documentation/UserExperience/Conceptual/PassKit_PG/Creating.html).
|
|
24
|
-
|
|
25
|
-
Limits: 10 MB per archive, 256 ZIP entries and 256 KB of `pass.json`, and 1 KB of barcode payload. Only the six recognised artwork filenames are read, with generated managed-file names. Each image is bounded to 2 MB, 4096 pixels per side and 8 megapixels. Only the 32 most recent archives remain in the preview cache; a missing cached archive requires reopening its preview. Passes stores the decoded fields/barcode separately, so a saved pass remains available offline.
|