@fanfare-io/fanfare-sdk-react 0.20.0 → 0.21.0
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 +10 -0
- package/dist/components/compositions/outcome-panel.d.ts +7 -0
- package/dist/components/widgets/experience-widget.d.ts +5 -0
- package/dist/hooks/use-experience-journey.d.ts +6 -0
- package/dist/{index-DOeKTtWT.js → index-DWJSw9N8.js} +3464 -3432
- package/dist/index.js +1 -1
- package/dist/lib/stock-refetch.d.ts +7 -0
- package/dist/{stripe-card-field-bfkt27xA.js → stripe-card-field-CPZoyAm1.js} +1 -1
- package/package.json +6 -6
package/README.md
CHANGED
|
@@ -40,6 +40,16 @@ export function App() {
|
|
|
40
40
|
}
|
|
41
41
|
```
|
|
42
42
|
|
|
43
|
+
`autoStart` routes the journey on mount; entering is a separate matter. A queue, draw or timed
|
|
44
|
+
release the merchant set to enter on arrival needs no Enter click: the SDK enters the consumer
|
|
45
|
+
inside the routing operation that lands on it, and the widget shows a joining wait — no Enter
|
|
46
|
+
control — until they have their place, then the participating screen. If the entry is turned down,
|
|
47
|
+
the widget falls back to the ordinary Enter screen with the refusal beside it. A host that wants
|
|
48
|
+
every entry to stay an explicit press passes `automaticEntry={false}` to `ExperienceWidget`, or the
|
|
49
|
+
same `automaticEntry` option to `useExperienceJourney`; both reach the ready view's `start`, and
|
|
50
|
+
omitting it keeps the SDK default of entering on arrival. The contract is in the core package's
|
|
51
|
+
`docs/UPGRADING-automatic-entry.md` in the SDK repository.
|
|
52
|
+
|
|
43
53
|
Customization has four levels of increasing specificity: `theme`, `variant`, `slots`, and `children` or `useExperienceJourney`.
|
|
44
54
|
|
|
45
55
|
`slots` override targeted states while keeping the default widget flow. `children` receives `{ journey, view, snapshot, error, start, isStarting }` when you want to render the full state yourself.
|
|
@@ -56,6 +56,13 @@ export interface OutcomePanelProps {
|
|
|
56
56
|
};
|
|
57
57
|
className?: string;
|
|
58
58
|
}
|
|
59
|
+
/**
|
|
60
|
+
* Re-entry is offered only where the participation ended without the distribution rejecting the
|
|
61
|
+
* consumer: a lapsed admission (`expired`) or a voluntary exit (`left`). A denial — bot detection,
|
|
62
|
+
* a validation limit, a draw the consumer simply lost — can leave the distribution open too, so the
|
|
63
|
+
* eligible reasons are named here rather than inferred from the distribution still accepting entries.
|
|
64
|
+
*/
|
|
65
|
+
export declare function outcomeOffersReentry(outcomeReason: OutcomeReason): boolean;
|
|
59
66
|
export declare function OutcomePanel({ outcomeReason, participationType, onReenter, isReentering, action, copyOverride, className, }: OutcomePanelProps): import("react/jsx-runtime").JSX.Element;
|
|
60
67
|
export declare namespace OutcomePanel {
|
|
61
68
|
var displayName: string;
|
|
@@ -176,6 +176,11 @@ export interface ExperienceWidgetProps {
|
|
|
176
176
|
experienceId: string;
|
|
177
177
|
/** Automatically start journey on mount */
|
|
178
178
|
autoStart?: boolean;
|
|
179
|
+
/**
|
|
180
|
+
* Whether the SDK may enter the consumer on arrival at a distribution the merchant set to enter
|
|
181
|
+
* automatically. Omit to keep the default (`true`); pass `false` to keep every entry explicit.
|
|
182
|
+
*/
|
|
183
|
+
automaticEntry?: boolean;
|
|
179
184
|
/** Pre-fill access code */
|
|
180
185
|
accessCode?: string;
|
|
181
186
|
/** Auto-enter waitlist when available */
|
|
@@ -3,6 +3,12 @@ import { JourneyHandle, JourneySnapshot, JourneyView } from '@fanfare-io/fanfare
|
|
|
3
3
|
export interface ExperienceJourneyOptions {
|
|
4
4
|
accessCode?: string;
|
|
5
5
|
autoEnterWaitlist?: boolean;
|
|
6
|
+
/**
|
|
7
|
+
* Whether core may enter the consumer on the consumer's behalf when routing lands on a
|
|
8
|
+
* distribution the merchant set to enter on arrival. Left unset, core's default (`true`)
|
|
9
|
+
* applies; `false` keeps every entry an explicit one the consumer presses.
|
|
10
|
+
*/
|
|
11
|
+
automaticEntry?: boolean;
|
|
6
12
|
}
|
|
7
13
|
export interface UseExperienceJourneyOptions extends ExperienceJourneyOptions {
|
|
8
14
|
/**
|