@fanfare-io/fanfare-sdk-solid 0.12.0 → 0.13.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.
@@ -11,4 +11,4 @@ export { EndedModule, type EndedModuleProps } from './ended-module';
11
11
  export { ErrorView, type ErrorViewProps } from './error-view';
12
12
  export { GrantedPanel, type GrantedPanelProps } from './granted-panel';
13
13
  export { JourneyGate, type JourneyGateProps, type JourneyGateStage } from './journey-gate';
14
- export { OutcomePanel, type OutcomePanelProps } from './outcome-panel';
14
+ export { OutcomePanel, type OutcomeAction, type OutcomePanelProps } from './outcome-panel';
@@ -4,6 +4,15 @@ import { OutcomeReason } from '../module';
4
4
  * (e.g. the expired re-enter button label) so each module shows terminology
5
5
  * appropriate to its mechanism rather than queue-specific copy.
6
6
  */
7
+ /**
8
+ * A host-provided action for a terminal panel, such as "See what's still
9
+ * available" after a loss. The widget renders it as a secondary button; the
10
+ * host decides where it leads.
11
+ */
12
+ export interface OutcomeAction {
13
+ label: string;
14
+ onClick: () => void;
15
+ }
7
16
  export type ParticipationType = "queue" | "draw" | "auction" | "timed_release" | "appointment";
8
17
  export interface OutcomePanelProps {
9
18
  outcomeReason: OutcomeReason;
@@ -14,6 +23,8 @@ export interface OutcomePanelProps {
14
23
  participationType?: ParticipationType;
15
24
  onReenter?: () => Promise<void>;
16
25
  isReentering?: boolean;
26
+ /** Secondary action offered once the outcome is final. */
27
+ action?: OutcomeAction;
17
28
  class?: string;
18
29
  className?: string;
19
30
  }
@@ -1,5 +1,6 @@
1
1
  import { AuctionDisplayState } from '@fanfare-io/fanfare-sdk-core/internals';
2
2
  import { ReadableAtom } from 'nanostores';
3
+ import { OutcomeAction } from '../compositions/outcome-panel';
3
4
  import { OutcomeReason } from '../module';
4
5
  export interface AuctionModuleProps {
5
6
  display$?: ReadableAtom<AuctionDisplayState>;
@@ -21,6 +22,8 @@ export interface AuctionModuleProps {
21
22
  checkoutUrl?: string;
22
23
  onCheckoutClick?: () => void;
23
24
  outcomeReason?: OutcomeReason;
25
+ /** Host-provided action shown on the terminal panel. */
26
+ outcomeAction?: OutcomeAction;
24
27
  onReenter?: () => Promise<void>;
25
28
  isReentering?: boolean;
26
29
  class?: string;
@@ -1,5 +1,6 @@
1
1
  import { DrawDisplayState } from '@fanfare-io/fanfare-sdk-core/internals';
2
2
  import { ReadableAtom } from 'nanostores';
3
+ import { OutcomeAction } from '../compositions/outcome-panel';
3
4
  import { OutcomeReason } from '../module';
4
5
  export interface DrawModuleProps {
5
6
  display$?: ReadableAtom<DrawDisplayState>;
@@ -16,6 +17,8 @@ export interface DrawModuleProps {
16
17
  checkoutUrl?: string;
17
18
  onCheckoutClick?: () => void;
18
19
  outcomeReason?: OutcomeReason;
20
+ /** Host-provided action shown on the terminal panel. */
21
+ outcomeAction?: OutcomeAction;
19
22
  onReenter?: () => Promise<void>;
20
23
  isReentering?: boolean;
21
24
  class?: string;
@@ -1,5 +1,6 @@
1
1
  import { QueueDisplayState } from '@fanfare-io/fanfare-sdk-core/internals';
2
2
  import { ReadableAtom } from 'nanostores';
3
+ import { OutcomeAction } from '../compositions/outcome-panel';
3
4
  import { OutcomeReason } from '../module';
4
5
  export interface QueueModuleProps {
5
6
  display$?: ReadableAtom<QueueDisplayState>;
@@ -17,6 +18,8 @@ export interface QueueModuleProps {
17
18
  checkoutUrl?: string;
18
19
  onCheckoutClick?: () => void;
19
20
  outcomeReason?: OutcomeReason;
21
+ /** Host-provided action shown on the terminal panel. */
22
+ outcomeAction?: OutcomeAction;
20
23
  onReenter?: () => Promise<void>;
21
24
  isReentering?: boolean;
22
25
  class?: string;
@@ -1,5 +1,6 @@
1
1
  import { TimedReleaseDisplayState } from '@fanfare-io/fanfare-sdk-core/internals';
2
2
  import { ReadableAtom } from 'nanostores';
3
+ import { OutcomeAction } from '../compositions/outcome-panel';
3
4
  import { OutcomeReason } from '../module';
4
5
  export interface TimedReleaseModuleProps {
5
6
  display$?: ReadableAtom<TimedReleaseDisplayState>;
@@ -17,6 +18,8 @@ export interface TimedReleaseModuleProps {
17
18
  grant?: string;
18
19
  expiresAt?: number | Date;
19
20
  outcomeReason?: OutcomeReason;
21
+ /** Host-provided action shown on the terminal panel. */
22
+ outcomeAction?: OutcomeAction;
20
23
  onReenter?: () => Promise<void>;
21
24
  isReentering?: boolean;
22
25
  class?: string;
@@ -3,3 +3,4 @@ export { InfoPanel, type InfoPanelProps } from './info-panel';
3
3
  export { normalizeOutcomeReason, normalizeSequenceOutcomeReason, type OutcomeReason } from './outcome-reason';
4
4
  export { PanelHeading, type PanelHeadingProps, type PanelHeadingVariant } from './panel-heading';
5
5
  export { PanelBody, PanelFooter, PanelLayout, type PanelBodyProps, type PanelFooterProps, type PanelLayoutProps, } from './panel-layout';
6
+ export { StageSteps, type StageStep, type StageStepStatus, type StageStepsProps } from './stage-steps';
@@ -0,0 +1,10 @@
1
+ import { JSX } from 'solid-js';
2
+ export type StageStepStatus = "done" | "active" | "pending";
3
+ export interface StageStep {
4
+ label: string;
5
+ status: StageStepStatus;
6
+ }
7
+ export interface StageStepsProps extends JSX.HTMLAttributes<HTMLDivElement> {
8
+ steps: readonly StageStep[];
9
+ }
10
+ export declare function StageSteps(props: StageStepsProps): JSX.Element;
@@ -4,6 +4,7 @@ import { BrandTheme } from '@fanfare-io/fanfare-sdk-core/theme';
4
4
  import { JSX } from 'solid-js';
5
5
  import { WidgetVariant } from '../../theme';
6
6
  import { AuthInputMode } from '../auth/auth-input';
7
+ import { OutcomeAction } from '../compositions/outcome-panel';
7
8
  type ParticipationType = "queue" | "draw" | "auction" | "timed_release" | "appointment";
8
9
  type EnterableSlotSequence = Extract<SequenceView, {
9
10
  phase: "enterable";
@@ -137,7 +138,8 @@ export interface EndedSlotProps extends SlotProps {
137
138
  }
138
139
  export interface ErrorSlotProps extends SlotProps {
139
140
  error: string;
140
- onRetry: () => void;
141
+ /** Absent when the refusal cannot be cleared by retrying — render no retry affordance. */
142
+ onRetry?: () => void;
141
143
  }
142
144
  export interface LoadingSlotProps extends SlotProps {
143
145
  /** Stage-specific message (e.g. routing). `undefined` for generic loading — show just a spinner. */
@@ -186,6 +188,11 @@ export interface ExperienceWidgetProps {
186
188
  slots?: ExperienceWidgetSlots;
187
189
  children?: (props: ExperienceRenderProps) => JSX.Element;
188
190
  checkoutUrl?: string;
191
+ /**
192
+ * Action offered on terminal panels (not selected, sold out, closed), such as
193
+ * a link back to what is still available. Omit to show none.
194
+ */
195
+ endedAction?: OutcomeAction;
189
196
  onJourneyChange?: (snapshot: JourneySnapshot) => void;
190
197
  onGranted?: (grant: string) => void;
191
198
  /** Called when a Fanfare-managed checkout completes (pre-auth capture or post-win reservation checkout) */
package/dist/index.d.ts CHANGED
@@ -25,7 +25,7 @@ export type { AccessCodeSlotProps, AuthSlotProps, ChallengeSlotProps, CheckoutPr
25
25
  export { CheckoutProcessingPanel, PaymentCollectionPanel, ReceiptPanel, ReservationCheckoutPanel, } from './components/checkout';
26
26
  export { LoadingView, StartView, UpcomingModule, WaitlistView } from './components/widgets';
27
27
  export type { LoadingViewProps, StartViewProps, UpcomingModuleProps, WaitlistViewProps } from './components/widgets';
28
- export { AuctionModule, DrawModule, QueueModule, TimedReleaseModule } from './components/widgets';
29
- export type { AuctionModuleProps, DrawModuleProps, QueueModuleProps, TimedReleaseModuleProps, } from './components/widgets';
28
+ export { AppointmentModule, AuctionModule, DrawModule, QueueModule, TimedReleaseModule } from './components/widgets';
29
+ export type { AppointmentModuleProps, AuctionModuleProps, DrawModuleProps, QueueModuleProps, TimedReleaseModuleProps, } from './components/widgets';
30
30
  export * from './styles';
31
31
  export { registerWebComponents } from './register';