@wirexapp/card-reveal-web 1.1.0-beta.2 → 1.1.0-beta.4

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/CHANGELOG.md CHANGED
@@ -1,5 +1,84 @@
1
1
  # @wirexapp/card-reveal-web
2
2
 
3
+ ## 1.1.0-beta.4
4
+
5
+ ### Minor Changes
6
+
7
+ - 731da3e: Wallet checkout TOKEN MODE (WPAY-4431): pass the backend's short-lived top-up
8
+ token as `auth.checkoutToken` and the hosted checkout executes the top-up
9
+ itself, reporting `onExecuted` / `onExecuteFailed` (`wallet-executed` /
10
+ `wallet-execute-failed` on the wire) — the wallet payment token never leaves
11
+ the frame. Legacy tokenize-and-return (`onToken`) is unchanged without `auth`.
12
+
13
+ Token mode also brings Google Pay to desktop (`googlePayHandoff: 'qr' | 'none'`,
14
+ probe flag `googlePayHandoff`): the frame draws a QR that carries the checkout
15
+ itself — the token, the quote and the estimate's `provider` name (new init /
16
+ `arm()` / `update()` field) — and an Android phone opens the same checkout
17
+ top-level, pays and executes. Nothing is stored on the frames service and the
18
+ desktop never learns the outcome: hosts reconcile by their own status reads
19
+ after `wallet-state: handoff-pending`. `arm(quote, config, auth?, provider?)` /
20
+ `update(quote, config?, auth?, provider?)`; `wallet-update` carries `auth` and
21
+ `provider`; new `wallet-state` values `executing`, `handoff-pending`.
22
+
23
+ `buildWalletLaunchFragment` / `buildWalletLaunchUrl` (core) build the same
24
+ compact fragment for a Chrome Custom Tab launch (`#t=&e=&s=&p=[&r=]`); the page
25
+ resolves the provider block from the public BaaS config by name.
26
+
27
+ ### Patch Changes
28
+
29
+ - Updated dependencies [731da3e]
30
+ - @wirexapp/card-sdk-core@1.1.0-beta.4
31
+
32
+ ## 1.1.0-beta.3
33
+
34
+ ### Minor Changes
35
+
36
+ - d4654e9: Reveal `copy` option — `'button'` (default: the icon button, as today),
37
+ `'row'` (the whole row is one copy control: a real `<button>`, no icon, no
38
+ reserved width; the copied state shows on the value and is announced to
39
+ assistive tech) or `'none'` (no copy affordance; the value stays selectable
40
+ text). Copy still runs inside the frame and `onCopied` still carries the
41
+ field name only. Enumerated and re-validated in the frame; an older frame
42
+ ignores the option and renders the icon button.
43
+
44
+ Reveal `showLabels` option (default `true`). `false` renders no label
45
+ element at all — not an empty one — so a row is exactly as tall as its
46
+ value; the label string becomes the value's `aria-label`, and the icon copy
47
+ button's name carries the field ("Card Number: Copy"). With `copy:
48
+ 'button'` such a row is floored at the icon's hit target (`copyIconSize` +
49
+ 12px) so adjacent buttons never overlap. Replaces the `fontSizeLabel: '0px'`
50
+ / `lineHeightLabel: '0px'` workaround.
51
+
52
+ Reveal `rowStyle` option — `'plain'` (default, as today) or `'boxed'`: each
53
+ row becomes a pill drawn from the box tokens the collect inputs already use
54
+ (`colorBackground`, `colorBorder`, `borderRadius`, `borderWidth`,
55
+ `controlMinHeight`; 16px horizontal padding, `spacingUnit` vertical,
56
+ `fieldGap` between pills), so a border hugs the value instead of the
57
+ iframe. Deliberately opt-in: those tokens already reach reveal frames from
58
+ hosts that share one appearance object with collect, so honouring them on
59
+ presence would have restyled existing reveal rows.
60
+
61
+ Reveal `layout` option — `'column'` (default) or `'row'`: the frame's
62
+ fields sit side by side with equal widths, separated by the new `fieldGap`
63
+ appearance token (length; default `12px`; also the gap between `'boxed'`
64
+ pills). `fields: ['expiry', 'cvv']` with `layout: 'row'` is one frame and
65
+ one `/details` call where two single-field frames called it twice with the
66
+ same action token. Frame-wide on purpose: a mixed arrangement is two
67
+ frames, because a nested `fields` shape would not be ignorable by older
68
+ frames.
69
+
70
+ New `wordSpacing` appearance token (length grammar): extra space between
71
+ the card number's four-digit groups in the reveal frame — the value is
72
+ still chunked with single spaces, and no other row is affected. Reveal
73
+ `fields` entries are now validated against the known row names (unknown
74
+ entries are dropped instead of rendering an `undefined` label).
75
+
76
+ ### Patch Changes
77
+
78
+ - Updated dependencies [390c416]
79
+ - Updated dependencies [d4654e9]
80
+ - @wirexapp/card-sdk-core@1.1.0-beta.3
81
+
3
82
  ## 1.1.0-beta.2
4
83
 
5
84
  ### Patch Changes
@@ -1,4 +1,4 @@
1
- import type { PciAppearance, PciFrameStrings, PciRevealField, PciRevealState } from '@wirexapp/card-sdk-core';
1
+ import type { PciAppearance, PciFrameStrings, PciRevealCopyMode, PciRevealField, PciRevealLayout, PciRevealRowStyle, PciRevealState } from '@wirexapp/card-sdk-core';
2
2
  export interface PciRevealAuth {
3
3
  getBearerToken: () => Promise<string>;
4
4
  /** Cardholder identity headers (X-User-Email / X-User-Wallet). Per-user
@@ -24,6 +24,23 @@ export interface PciRevealElementConfig {
24
24
  auth: PciRevealAuth;
25
25
  appearance?: PciAppearance;
26
26
  strings?: PciFrameStrings;
27
+ /** Copy affordance: `'button'` (default, the icon button), `'row'` (the
28
+ * whole row is one copy control, no icon) or `'none'`. Copy still runs
29
+ * inside the frame and `onCopied` still fires in `'row'` mode. Read at
30
+ * mount, like `appearance`. */
31
+ copy?: PciRevealCopyMode;
32
+ /** Render the label above each value (default `true`). `false` renders no
33
+ * label element — the row is as tall as its value and the label becomes
34
+ * the value's accessible name. Read at mount. */
35
+ showLabels?: boolean;
36
+ /** `'boxed'` draws each row as a pill from the box tokens (`colorBackground`,
37
+ * `colorBorder`, `borderRadius`, `borderWidth`, `controlMinHeight`);
38
+ * `'plain'` (default) renders text on the host surface. Read at mount. */
39
+ rowStyle?: PciRevealRowStyle;
40
+ /** `'row'` lays the fields out side by side (equal widths, `fieldGap`
41
+ * apart) so e.g. `['expiry', 'cvv']` is one frame and one `/details`
42
+ * call; `'column'` (default) stacks them. Read at mount. */
43
+ layout?: PciRevealLayout;
27
44
  onStateChange?: (state: PciRevealState) => void;
28
45
  /** The user copied a row's value inside the frame. Carries the field name
29
46
  * ONLY — never the value or anything derived from it. Intended for host
@@ -1 +1 @@
1
- {"version":3,"file":"revealElement.d.ts","sourceRoot":"","sources":["../src/revealElement.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aA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,OAAO,IAAI,IAAI;CAGhB"}
@@ -34,6 +34,10 @@ export class PciRevealElement {
34
34
  cardholderName: this.config.cardholderName,
35
35
  appearance: this.config.appearance,
36
36
  strings: this.config.strings,
37
+ copy: this.config.copy,
38
+ showLabels: this.config.showLabels,
39
+ rowStyle: this.config.rowStyle,
40
+ layout: this.config.layout,
37
41
  },
38
42
  });
39
43
  }
@@ -1 +1 @@
1
- {"version":3,"file":"revealElement.js","sourceRoot":"","sources":["../src/revealElement.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAoC1D;;;;GAIG;AACH,MAAM,OAAO,gBAAgB;IAI3B,YAAY,QAAgB,EAAE,MAA8B;QAC1D,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,IAAI,CAAC,OAAO,GAAG,IAAI,eAAe,CAAC,QAAQ,EAAE,EAAE,EAAE,EAAE,cAAc,EAAE,IAAI,EAAE,CAAC,CAAC;QAC3E,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,OAAO,CAAC,EAAE;YAC/B,IAAI,OAAO,CAAC,IAAI,KAAK,cAAc;gBAAE,MAAM,CAAC,aAAa,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;YAC3E,IAAI,OAAO,CAAC,IAAI,KAAK,eAAe;gBAAE,MAAM,CAAC,QAAQ,EAAE,CAAC,EAAE,KAAK,EAAE,OAAO,CAAC,KAAK,EAAE,CAAC,CAAC;QACpF,CAAC,CAAC,CAAC;IACL,CAAC;IAED,KAAK,CAAC,KAAK,CAAC,SAAsB;QAChC,MAAM,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC;QACpC,MAAM,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC;YACzB,IAAI,EAAE,MAAM;YACZ,MAAM,EAAE;gBACN,IAAI,EAAE,QAAQ;gBACd,IAAI,EAAE;oBACJ,WAAW,EAAE,MAAM,IAAI,CAAC,MAAM,CAA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,CAAC,OAAO,CAAC,OAAO,EAAE,CAAC;IACzB,CAAC;CACF"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wirexapp/card-reveal-web",
3
- "version": "1.1.0-beta.2",
3
+ "version": "1.1.0-beta.4",
4
4
  "type": "module",
5
5
  "description": "Reveal an issued card's PAN/expiry/CVV inside Wirex-served PCI iframes; values never reach the host page. CHD-free loader.",
6
6
  "license": "UNLICENSED",
@@ -37,6 +37,6 @@
37
37
  "prepublishOnly": "yarn clean && yarn build"
38
38
  },
39
39
  "dependencies": {
40
- "@wirexapp/card-sdk-core": "1.1.0-beta.2"
40
+ "@wirexapp/card-sdk-core": "1.1.0-beta.4"
41
41
  }
42
42
  }