@fanfare-io/fanfare-sdk-solid 0.1.0 → 0.3.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/dist/components/compositions/outcome-panel.d.ts +11 -0
- package/dist/components/internal/appointment-module.d.ts +1 -1
- package/dist/components/internal/auction-module.d.ts +1 -1
- package/dist/components/internal/draw-module.d.ts +1 -1
- package/dist/components/internal/queue-module.d.ts +1 -1
- package/dist/components/internal/timed-release-module.d.ts +1 -1
- package/dist/components/internal/upcoming-module.d.ts +1 -0
- package/dist/components/module/outcome-reason.d.ts +13 -9
- package/dist/components/provider.d.ts +1 -2
- package/dist/components/widgets/waitlist/index.d.ts +1 -2
- package/dist/index.d.ts +20 -8
- package/dist/index.js +2109 -2284
- package/dist/styles/base.css +1 -2300
- package/dist/styles/theme.css +48 -0
- package/dist/theme/theme-utils.d.ts +19 -2
- package/package.json +6 -7
- package/dist/components/widgets/auction/auction-actions.d.ts +0 -21
- package/dist/components/widgets/auction/auction-bid-display.d.ts +0 -19
- package/dist/components/widgets/auction/index.d.ts +0 -7
- package/dist/components/widgets/waitlist/waitlist-actions.d.ts +0 -22
- package/docs/SLOTS.md +0 -91
|
@@ -1,6 +1,17 @@
|
|
|
1
1
|
import { OutcomeReason } from '../module';
|
|
2
|
+
/**
|
|
3
|
+
* The distribution mechanism a module owns. Drives mechanism-specific copy
|
|
4
|
+
* (e.g. the expired re-enter button label) so each module shows terminology
|
|
5
|
+
* appropriate to its mechanism rather than queue-specific copy.
|
|
6
|
+
*/
|
|
7
|
+
export type ParticipationType = "queue" | "draw" | "auction" | "timed_release" | "appointment";
|
|
2
8
|
export interface OutcomePanelProps {
|
|
3
9
|
outcomeReason: OutcomeReason;
|
|
10
|
+
/**
|
|
11
|
+
* The mechanism this panel belongs to. Selects the mechanism-specific
|
|
12
|
+
* re-enter label; when omitted, the mechanism-free fallback is used.
|
|
13
|
+
*/
|
|
14
|
+
participationType?: ParticipationType;
|
|
4
15
|
onReenter?: () => Promise<void>;
|
|
5
16
|
isReentering?: boolean;
|
|
6
17
|
class?: string;
|
|
@@ -3,7 +3,7 @@ import { ReadableAtom } from 'nanostores';
|
|
|
3
3
|
import { OutcomeReason } from '../module';
|
|
4
4
|
export interface AppointmentModuleProps {
|
|
5
5
|
appointmentId: string;
|
|
6
|
-
|
|
6
|
+
display$?: ReadableAtom<AppointmentDisplayState>;
|
|
7
7
|
sequencePhase: "enterable" | "participating" | "ended";
|
|
8
8
|
bookingWindowOpenAt?: string;
|
|
9
9
|
bookingWindowCloseAt?: string;
|
|
@@ -2,7 +2,7 @@ import { AuctionDisplayState } from '@fanfare-io/fanfare-sdk-core/internals';
|
|
|
2
2
|
import { ReadableAtom } from 'nanostores';
|
|
3
3
|
import { OutcomeReason } from '../module';
|
|
4
4
|
export interface AuctionModuleProps {
|
|
5
|
-
|
|
5
|
+
display$?: ReadableAtom<AuctionDisplayState>;
|
|
6
6
|
fallbackState?: AuctionDisplayState;
|
|
7
7
|
sequencePhase: "enterable" | "participating" | "settling" | "granted" | "ended";
|
|
8
8
|
canEnter: boolean;
|
|
@@ -2,7 +2,7 @@ import { DrawDisplayState } from '@fanfare-io/fanfare-sdk-core/internals';
|
|
|
2
2
|
import { ReadableAtom } from 'nanostores';
|
|
3
3
|
import { OutcomeReason } from '../module';
|
|
4
4
|
export interface DrawModuleProps {
|
|
5
|
-
|
|
5
|
+
display$?: ReadableAtom<DrawDisplayState>;
|
|
6
6
|
sequencePhase: "enterable" | "participating" | "settling" | "granted" | "ended";
|
|
7
7
|
canEnter: boolean;
|
|
8
8
|
canLeave: boolean;
|
|
@@ -2,7 +2,7 @@ import { QueueDisplayState } from '@fanfare-io/fanfare-sdk-core/internals';
|
|
|
2
2
|
import { ReadableAtom } from 'nanostores';
|
|
3
3
|
import { OutcomeReason } from '../module';
|
|
4
4
|
export interface QueueModuleProps {
|
|
5
|
-
|
|
5
|
+
display$?: ReadableAtom<QueueDisplayState>;
|
|
6
6
|
sequencePhase: "enterable" | "participating" | "granted" | "ended";
|
|
7
7
|
canEnter: boolean;
|
|
8
8
|
canLeave: boolean;
|
|
@@ -2,7 +2,7 @@ import { TimedReleaseDisplayState } from '@fanfare-io/fanfare-sdk-core/internals
|
|
|
2
2
|
import { ReadableAtom } from 'nanostores';
|
|
3
3
|
import { OutcomeReason } from '../module';
|
|
4
4
|
export interface TimedReleaseModuleProps {
|
|
5
|
-
|
|
5
|
+
display$?: ReadableAtom<TimedReleaseDisplayState>;
|
|
6
6
|
sequencePhase: "enterable" | "participating" | "granted" | "ended";
|
|
7
7
|
canEnter: boolean;
|
|
8
8
|
canLeave: boolean;
|
|
@@ -10,18 +10,22 @@
|
|
|
10
10
|
* already-normalized UI value) to a member of the union. Unknown values
|
|
11
11
|
* fall back to `"ended"`.
|
|
12
12
|
*
|
|
13
|
-
* journey machine code
|
|
13
|
+
* journey machine code -> UI outcome reason
|
|
14
14
|
* ----------------------------------------------
|
|
15
|
-
* expired
|
|
16
|
-
* queue_denied
|
|
17
|
-
*
|
|
18
|
-
*
|
|
19
|
-
*
|
|
20
|
-
*
|
|
21
|
-
* unknown / other
|
|
15
|
+
* expired -> expired
|
|
16
|
+
* queue_denied / draw_denied / denied / lost -> not_selected
|
|
17
|
+
* timed_release_denied -> sold_out
|
|
18
|
+
* outbid -> outbid
|
|
19
|
+
* reserve_not_met -> reserve_not_met
|
|
20
|
+
* completed / already_completed -> completed (a success terminal, not a loss)
|
|
21
|
+
* closed / unknown / other -> ended
|
|
22
|
+
*
|
|
23
|
+
* The terminal projection carries the outcome TYPE (completed/denied/lost);
|
|
24
|
+
* mapping it here makes a paying winner, a denied entrant, and a plain loss
|
|
25
|
+
* render distinct copy rather than collapsing to the generic "ended" panel.
|
|
22
26
|
*
|
|
23
27
|
* Static story lanes pass UI values directly (e.g. `"outbid"`); those
|
|
24
28
|
* pass through unchanged.
|
|
25
29
|
*/
|
|
26
|
-
export type OutcomeReason = "expired" | "not_selected" | "sold_out" | "outbid" | "reserve_not_met" | "ended";
|
|
30
|
+
export type OutcomeReason = "expired" | "not_selected" | "sold_out" | "outbid" | "reserve_not_met" | "completed" | "ended";
|
|
27
31
|
export declare function normalizeOutcomeReason(reason: string | undefined): OutcomeReason;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { FanfareSDK } from '@fanfare-io/fanfare-sdk-core';
|
|
2
2
|
import { Locale, PartialTranslationMessages, TranslationMessageKey } from '@fanfare-io/fanfare-sdk-i18n';
|
|
3
3
|
import { JSX } from 'solid-js';
|
|
4
|
-
interface FanfareProviderProps {
|
|
4
|
+
export interface FanfareProviderProps {
|
|
5
5
|
sdk: FanfareSDK;
|
|
6
6
|
locale?: Locale;
|
|
7
7
|
translations?: PartialTranslationMessages<TranslationMessageKey>;
|
|
@@ -24,4 +24,3 @@ export declare function FanfareProvider(props: FanfareProviderProps): JSX.Elemen
|
|
|
24
24
|
* Hook to access Fanfare SDK in SolidJS
|
|
25
25
|
*/
|
|
26
26
|
export declare function useFanfare(): FanfareSDK;
|
|
27
|
-
export {};
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Waitlist Widget Internal Components
|
|
3
3
|
*
|
|
4
|
-
*
|
|
4
|
+
* Waitlist confirmation is rendered by the shared internal WaitlistView.
|
|
5
5
|
*/
|
|
6
|
-
export { WaitlistActions, type WaitlistActionsProps, type WaitlistStatus } from './waitlist-actions';
|
package/dist/index.d.ts
CHANGED
|
@@ -6,13 +6,25 @@
|
|
|
6
6
|
* @packageDocumentation
|
|
7
7
|
*/
|
|
8
8
|
export { FanfareProvider, useFanfare } from './components/provider';
|
|
9
|
-
export
|
|
10
|
-
export
|
|
11
|
-
export
|
|
12
|
-
export
|
|
13
|
-
export
|
|
14
|
-
export
|
|
15
|
-
export
|
|
16
|
-
export
|
|
9
|
+
export type { FanfareProviderProps } from './components/provider';
|
|
10
|
+
export { useExperienceJourney, useFanfareAuth, useJourneySnapshot, useNanostore } from './hooks';
|
|
11
|
+
export { I18nProvider, RTL_LOCALES, isRTLLocale, useTranslations } from './i18n';
|
|
12
|
+
export type { I18nConfig, I18nProviderProps, Locale, PartialTranslationMessages, RTLLocale, TextDirection, TranslateFunction, TranslateOptions, TranslationKey, TranslationMessageKey, TranslationMessages, } from './i18n';
|
|
13
|
+
export { THEME_CSS_VARS, ThemeProvider, buildThemeCssVars } from './theme';
|
|
14
|
+
export type { ResolvedTheme, ThemeCssVar, ThemeProviderProps, WidgetThemeConfig, WidgetVariant } from './theme';
|
|
15
|
+
export { AuthForm, AuthInput, OTPInput } from './components/auth';
|
|
16
|
+
export type { AuthFormProps, AuthInputProps } from './components/auth';
|
|
17
|
+
export { Button, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Input, buttonVariants, } from './components/primitives';
|
|
18
|
+
export type { ButtonProps } from './components/primitives';
|
|
19
|
+
export { InfoPanel, PanelBody, PanelFooter, PanelHeading, PanelLayout, normalizeOutcomeReason, } from './components/module';
|
|
20
|
+
export type { InfoPanelProps, OutcomeReason, PanelBodyProps, PanelFooterProps, PanelHeadingProps, PanelHeadingVariant, PanelLayoutProps, } from './components/module';
|
|
21
|
+
export { AccessCodeForm, ChallengeGate, EndedModule, ErrorView, GrantedPanel, OutcomePanel, } from './components/compositions';
|
|
22
|
+
export type { AccessCodeFormProps, ChallengeGateProps, EndedModuleProps, ErrorViewProps, GrantedPanelProps, OutcomePanelProps, } from './components/compositions';
|
|
23
|
+
export { ExperienceWidget } from './components/widgets';
|
|
24
|
+
export type { AccessCodeSlotProps, AuthSlotProps, ChallengeSlotProps, EndedSlotProps, EnterableSlotProps, ErrorSlotProps, ExperienceRenderProps, ExperienceWidgetProps, ExperienceWidgetSlots, ExpiredSlotProps, GrantedSlotProps, LoadingSlotProps, ParticipatingSlotProps, SlotProps, StartSlotProps, UpcomingSlotProps, WaitlistSlotProps, } from './components/widgets';
|
|
25
|
+
export { LoadingView, StartView, UpcomingModule, WaitlistView } from './components/widgets';
|
|
26
|
+
export type { LoadingViewProps, StartViewProps, UpcomingModuleProps, WaitlistViewProps } from './components/widgets';
|
|
27
|
+
export { AuctionModule, DrawModule, QueueModule, TimedReleaseModule } from './components/widgets';
|
|
28
|
+
export type { AuctionModuleProps, DrawModuleProps, QueueModuleProps, TimedReleaseModuleProps, } from './components/widgets';
|
|
17
29
|
export * from './styles';
|
|
18
30
|
export { registerWebComponents } from './register';
|