@lockerverse/react 0.2.246 → 0.2.247

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.
@@ -1,6 +1,6 @@
1
1
  # Lockerverse auctions guide
2
2
 
3
- Package: @lockerverse/react@0.2.246
3
+ Package: @lockerverse/react@0.2.247
4
4
 
5
5
  Generated from this release's maintained documentation. Do not edit this copy.
6
6
 
@@ -1,6 +1,6 @@
1
1
  # Lockerverse bookings guide
2
2
 
3
- Package: @lockerverse/react@0.2.246
3
+ Package: @lockerverse/react@0.2.247
4
4
 
5
5
  Generated from this release's maintained documentation. Do not edit this copy.
6
6
 
@@ -99,6 +99,46 @@ booking status and recovery controls outside this boundary, so a module load
99
99
  error cannot remove the recovery path. Reload or retry card entry only for the
100
100
  same recovered attempt; do not create another attempt to handle a load error.
101
101
 
102
+ ### Contact details and card entry on one step
103
+
104
+ A live booking does not need a separate contact step. While
105
+ `configuration.ready` is true, `configuration.payment` holds the public
106
+ `publishableKey` and `stripeAccountId`. Show the contact fields and the payment
107
+ component together before an attempt exists, and create the attempt in
108
+ `beforeConfirm`. It runs after the card details pass validation and before the
109
+ confirmation token is created:
110
+
111
+ ```tsx
112
+ const payment = booking.configuration?.payment;
113
+ const ready = booking.attempt
114
+ ? booking.canPay || booking.needsPaymentAction
115
+ : Boolean(payment && booking.recovered && contactIsValid && !booking.busy);
116
+
117
+ <BookingPayment
118
+ key={`${service.serviceVariationId}:${start}`}
119
+ publishableKey={booking.attempt?.publishableKey ?? payment.publishableKey}
120
+ stripeAccountId={payment.stripeAccountId}
121
+ amountCents={service.amountCents}
122
+ currency={service.currency}
123
+ attempt={booking.attempt ?? undefined}
124
+ beforeConfirm={async () => {
125
+ if (!booking.attempt) {
126
+ await booking.initialize({ date, start, customer, serviceVariationId });
127
+ }
128
+ }}
129
+ onConfirm={booking.confirm}
130
+ onRecover={booking.recover}
131
+ disabled={!ready}
132
+ />
133
+ ```
134
+
135
+ Keep the component mounted when the attempt arrives; it uses the same account and
136
+ amount. Lock the contact fields while an attempt exists, because the saved attempt
137
+ keeps the details it was created with. If `beforeConfirm` rejects, no payment is
138
+ sent and the customer can correct the problem and pay again. Show the hook error
139
+ next to the form. A saved or recovered attempt still uses the saved amount and the
140
+ recovery rules below.
141
+
102
142
  The optional payment entry needs the Stripe peer versions in the package
103
143
  manifest. It creates a confirmation token with off-session setup and sends it to
104
144
  the Lockerverse backend. It does not confirm or charge on the client. Its button
@@ -1,6 +1,6 @@
1
1
  # Lockerverse browser-embed guide
2
2
 
3
- Package: @lockerverse/react@0.2.246
3
+ Package: @lockerverse/react@0.2.247
4
4
 
5
5
  Generated from this release's maintained documentation. Do not edit this copy.
6
6
 
package/guides/events.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Lockerverse events guide
2
2
 
3
- Package: @lockerverse/react@0.2.246
3
+ Package: @lockerverse/react@0.2.247
4
4
 
5
5
  Generated from this release's maintained documentation. Do not edit this copy.
6
6
 
@@ -1,6 +1,6 @@
1
1
  # Lockerverse integration guide
2
2
 
3
- Package: @lockerverse/react@0.2.246
3
+ Package: @lockerverse/react@0.2.247
4
4
 
5
5
  Generated from this release's maintained documentation. Do not edit this copy.
6
6
 
@@ -1,6 +1,6 @@
1
1
  # Lockerverse payment-widgets guide
2
2
 
3
- Package: @lockerverse/react@0.2.246
3
+ Package: @lockerverse/react@0.2.247
4
4
 
5
5
  Generated from this release's maintained documentation. Do not edit this copy.
6
6
 
package/guides/signup.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Lockerverse signup guide
2
2
 
3
- Package: @lockerverse/react@0.2.246
3
+ Package: @lockerverse/react@0.2.247
4
4
 
5
5
  Generated from this release's maintained documentation. Do not edit this copy.
6
6
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lockerverse/react",
3
- "version": "0.2.246",
3
+ "version": "0.2.247",
4
4
  "description": "Tree-shakable React payment and signup UI for Lockerverse",
5
5
  "repository": {
6
6
  "type": "git",
@@ -152,7 +152,7 @@
152
152
  "embla-carousel-react": "8.6.0",
153
153
  "lucide-react": "0.536.0",
154
154
  "valibot": "1.4.2",
155
- "@lockerverse/sdk": "0.2.246"
155
+ "@lockerverse/sdk": "0.2.247"
156
156
  },
157
157
  "devDependencies": {
158
158
  "@size-limit/file": "13.0.3",