@odla-ai/chapter 0.56.1 → 0.56.2
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/README.md +39 -0
- package/dist/{chunk-NK267YQZ.js → chunk-E7CB5K2D.js} +668 -504
- package/dist/chunk-E7CB5K2D.js.map +1 -0
- package/dist/ui/index.d.ts +1 -1
- package/dist/ui/index.js +11 -1
- package/dist/ui/member/index.d.ts +83 -1
- package/dist/ui/member/index.js +11 -1
- package/package.json +1 -1
- package/dist/chunk-NK267YQZ.js.map +0 -1
package/README.md
CHANGED
|
@@ -395,6 +395,45 @@ The same renderer can also replace the placeholder chooser inside
|
|
|
395
395
|
```
|
|
396
396
|
|
|
397
397
|
`initialState` accepts trusted server state. On a browser redirect,
|
|
398
|
+
### Shared application and additional-member controls
|
|
399
|
+
|
|
400
|
+
`JoinIsland` owns application readiness. Its default Submit button and the
|
|
401
|
+
`disabled` value passed to `renderSubmit` reflect required controls, native
|
|
402
|
+
constraints, host-provided custom validity checks, conditional fields and recipient
|
|
403
|
+
prefill. Use `JoinSubmitButton` in a custom submit slot to retain the packaged
|
|
404
|
+
theme and disabled styling. `submitDisabled` remains an additional host gate.
|
|
405
|
+
|
|
406
|
+
Use `AdditionalMemberFields` on Apply and `payment.additionalMember` for the
|
|
407
|
+
packaged editor. Supply copy, application field names and theme tokens; do not
|
|
408
|
+
reimplement validation, save/error handling, or action spacing in the host.
|
|
409
|
+
Declare the same conditional name/email requirements in the server application
|
|
410
|
+
field contract. The quote remains authoritative for price and saved details.
|
|
411
|
+
|
|
412
|
+
```tsx
|
|
413
|
+
const memberOptions = {
|
|
414
|
+
copy: { label: "A membership for your mother, daughter, or sister" },
|
|
415
|
+
names: { selected: "familySelected", name: "familyName", email: "familyEmail" },
|
|
416
|
+
};
|
|
417
|
+
const [member, setMember] = useState({ selected: false, name: "", email: "" });
|
|
418
|
+
<JoinIsland config={config} payment={{
|
|
419
|
+
initialNamedSeat: additionalMemberSelection(member) ?? undefined,
|
|
420
|
+
additionalMember: { ...memberOptions, onSaved: setMember },
|
|
421
|
+
namedSeatLabel: "Additional family member",
|
|
422
|
+
}}>
|
|
423
|
+
{/* Other site application fields */}
|
|
424
|
+
<AdditionalMemberFields {...memberOptions} value={member} onChange={setMember} offer={selectedTier?.seatOffer} />
|
|
425
|
+
</JoinIsland>
|
|
426
|
+
```
|
|
427
|
+
|
|
428
|
+
Import these controls from `@odla-ai/chapter/ui/member`. The editor uses Save
|
|
429
|
+
details for both included and paid members, a separate Cancel action, retryable
|
|
430
|
+
errors, and disabled controls while saving. Checkout remains read-only until
|
|
431
|
+
Edit details is chosen. Legacy `renderNamedSeatEditor` remains available for
|
|
432
|
+
specialized composition; new hosts should use the packaged controls.
|
|
433
|
+
`JourneyFrame` supplies responsive layout and uses `--ui-accent`,
|
|
434
|
+
`--ui-on-accent`, `--ui-text-muted` and `--ui-surface-2` for enabled and disabled
|
|
435
|
+
states. The default checkout editor also uses these shared fields and readiness.
|
|
436
|
+
|
|
398
437
|
`JoinIsland` reads the `application` capability from the query string and asks
|
|
399
438
|
`GET /api/join/resume` for the canonical payment, booking, or done state; raw
|
|
400
439
|
`redirect_status` and `reschedule` values never choose a UI step. Supply
|