@fanfare-io/fanfare-sdk-solid 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 CHANGED
@@ -38,6 +38,8 @@ npm install @fanfare-io/fanfare-sdk-core @fanfare-io/fanfare-sdk-solid solid-js
38
38
 
39
39
  Solid applications can use `FanfareProvider`, `ExperienceWidget`, and `useExperienceJourney` directly: the same journey contract as the React adapter, with Solid reactivity.
40
40
 
41
+ `auto-start` (`autoStart` in Solid) routes the journey on mount; entering is a separate matter. A queue, draw or timed release the merchant set to enter on arrival needs no Enter click: the SDK enters the consumer inside the routing operation that lands on it, and the widget shows a joining wait — no Enter control — until they have their place, then the participating screen. If the entry is turned down, the widget falls back to the ordinary Enter screen with the refusal beside it. A host that wants every entry to stay an explicit press passes `automaticEntry={false}` to the Solid `ExperienceWidget`, the same `automaticEntry` option to `useExperienceJourney`, or `automatic-entry="false"` on `<fanfare-experience-widget>`; all three reach the ready view's `start`, and omitting it keeps the SDK default of entering on arrival. The contract is in the core package's `docs/UPGRADING-automatic-entry.md` in the SDK repository.
42
+
41
43
  `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. Solid `ExperienceWidget` accepts both `class` and `className`.
42
44
 
43
45
  ## Selection
@@ -28,6 +28,13 @@ export interface OutcomePanelProps {
28
28
  class?: string;
29
29
  className?: string;
30
30
  }
31
+ /**
32
+ * Re-entry is offered only where the participation ended without the distribution rejecting the
33
+ * consumer: a lapsed admission (`expired`) or a voluntary exit (`left`). A denial — bot detection,
34
+ * a validation limit, a draw the consumer simply lost — can leave the distribution open too, so the
35
+ * eligible reasons are named here rather than inferred from the distribution still accepting entries.
36
+ */
37
+ export declare function outcomeOffersReentry(outcomeReason: OutcomeReason): boolean;
31
38
  export declare function OutcomePanel(props: OutcomePanelProps): import("solid-js").JSX.Element;
32
39
  export declare namespace OutcomePanel {
33
40
  var displayName: string;
@@ -172,6 +172,11 @@ export interface ExperienceRenderProps {
172
172
  export interface ExperienceWidgetProps {
173
173
  experienceId: string;
174
174
  autoStart?: boolean;
175
+ /**
176
+ * Whether the SDK may enter the consumer on arrival at a distribution the merchant set to enter
177
+ * automatically. Omit to keep the default (`true`); pass `false` to keep every entry explicit.
178
+ */
179
+ automaticEntry?: boolean;
175
180
  accessCode?: string;
176
181
  autoEnterWaitlist?: boolean;
177
182
  theme?: BrandTheme;
@@ -4,6 +4,12 @@ import { MaybeAccessor } from '../utils/to-accessor';
4
4
  export interface ExperienceJourneyOptions {
5
5
  accessCode?: MaybeAccessor<string | undefined>;
6
6
  autoEnterWaitlist?: MaybeAccessor<boolean | undefined>;
7
+ /**
8
+ * Whether core may enter the consumer on the consumer's behalf when routing lands on a
9
+ * distribution the merchant set to enter on arrival. Left unset, core's default (`true`)
10
+ * applies; `false` keeps every entry an explicit one the consumer presses.
11
+ */
12
+ automaticEntry?: MaybeAccessor<boolean | undefined>;
7
13
  }
8
14
  export interface UseExperienceJourneyOptions extends ExperienceJourneyOptions {
9
15
  autoStart?: MaybeAccessor<boolean | undefined>;