@fanfare-io/fanfare-sdk-solid 0.1.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/LICENSE +202 -0
- package/README.md +53 -0
- package/dist/components/auth/access-code-input.d.ts +17 -0
- package/dist/components/auth/auth-form.d.ts +34 -0
- package/dist/components/auth/auth-input.d.ts +19 -0
- package/dist/components/auth/email-input.d.ts +14 -0
- package/dist/components/auth/index.d.ts +6 -0
- package/dist/components/auth/otp-input.d.ts +21 -0
- package/dist/components/auth/phone-input.d.ts +14 -0
- package/dist/components/compositions/access-code-form.d.ts +25 -0
- package/dist/components/compositions/challenge-gate.d.ts +24 -0
- package/dist/components/compositions/ended-module.d.ts +13 -0
- package/dist/components/compositions/error-view.d.ts +21 -0
- package/dist/components/compositions/granted-panel.d.ts +14 -0
- package/dist/components/compositions/index.d.ts +14 -0
- package/dist/components/compositions/journey-gate.d.ts +27 -0
- package/dist/components/compositions/outcome-panel.d.ts +12 -0
- package/dist/components/internal/appointment-day-tabs.d.ts +18 -0
- package/dist/components/internal/appointment-module.d.ts +27 -0
- package/dist/components/internal/appointment-slot-grid.d.ts +9 -0
- package/dist/components/internal/appointment-slot-item.d.ts +9 -0
- package/dist/components/internal/auction-module.d.ts +32 -0
- package/dist/components/internal/draw-module.d.ts +27 -0
- package/dist/components/internal/index.d.ts +15 -0
- package/dist/components/internal/loading-view.d.ts +9 -0
- package/dist/components/internal/queue-module.d.ts +28 -0
- package/dist/components/internal/start-view.d.ts +19 -0
- package/dist/components/internal/timed-release-module.d.ts +28 -0
- package/dist/components/internal/upcoming-module.d.ts +15 -0
- package/dist/components/internal/waitlist-view.d.ts +14 -0
- package/dist/components/module/alert-panel.d.ts +17 -0
- package/dist/components/module/index.d.ts +5 -0
- package/dist/components/module/info-panel.d.ts +8 -0
- package/dist/components/module/outcome-reason.d.ts +27 -0
- package/dist/components/module/panel-heading.d.ts +13 -0
- package/dist/components/module/panel-layout.d.ts +21 -0
- package/dist/components/primitives/badge.d.ts +17 -0
- package/dist/components/primitives/button.d.ts +16 -0
- package/dist/components/primitives/card.d.ts +49 -0
- package/dist/components/primitives/countdown.d.ts +16 -0
- package/dist/components/primitives/fade-presence.d.ts +11 -0
- package/dist/components/primitives/fanfare-logo.d.ts +8 -0
- package/dist/components/primitives/index.d.ts +11 -0
- package/dist/components/primitives/input.d.ts +18 -0
- package/dist/components/primitives/progress.d.ts +11 -0
- package/dist/components/primitives/skeleton.d.ts +8 -0
- package/dist/components/primitives/spinner.d.ts +14 -0
- package/dist/components/primitives/transition.d.ts +13 -0
- package/dist/components/provider.d.ts +27 -0
- package/dist/components/web/fanfare-web-component-provider.d.ts +20 -0
- package/dist/components/web/web-component-styles.d.ts +4 -0
- package/dist/components/widgets/auction/auction-actions.d.ts +21 -0
- package/dist/components/widgets/auction/auction-bid-display.d.ts +19 -0
- package/dist/components/widgets/auction/index.d.ts +7 -0
- package/dist/components/widgets/draw/draw-actions.d.ts +22 -0
- package/dist/components/widgets/draw/index.d.ts +6 -0
- package/dist/components/widgets/experience-widget.d.ts +127 -0
- package/dist/components/widgets/index.d.ts +11 -0
- package/dist/components/widgets/queue/index.d.ts +6 -0
- package/dist/components/widgets/queue/queue-actions.d.ts +20 -0
- package/dist/components/widgets/timed-release/index.d.ts +6 -0
- package/dist/components/widgets/timed-release/timed-release-actions.d.ts +21 -0
- package/dist/components/widgets/waitlist/index.d.ts +6 -0
- package/dist/components/widgets/waitlist/waitlist-actions.d.ts +22 -0
- package/dist/hooks/index.d.ts +12 -0
- package/dist/hooks/use-auth.d.ts +11 -0
- package/dist/hooks/use-experience-journey.d.ts +17 -0
- package/dist/hooks/use-journey-snapshot.d.ts +8 -0
- package/dist/hooks/use-nanostore.d.ts +7 -0
- package/dist/i18n/i18n-context.d.ts +19 -0
- package/dist/i18n/i18n-provider.d.ts +16 -0
- package/dist/i18n/index.d.ts +12 -0
- package/dist/index.d.ts +18 -0
- package/dist/index.js +6370 -0
- package/dist/internal-sdk.d.ts +2 -0
- package/dist/lib/animations.d.ts +31 -0
- package/dist/lib/appointment-format.d.ts +26 -0
- package/dist/lib/confetti.d.ts +3 -0
- package/dist/lib/currency.d.ts +9 -0
- package/dist/lib/phone-formatter-lite.d.ts +4 -0
- package/dist/lib/use-grant-celebration.d.ts +2 -0
- package/dist/lib/utils.d.ts +13 -0
- package/dist/register.d.ts +52 -0
- package/dist/styles/base.css +2301 -0
- package/dist/styles/index.d.ts +2 -0
- package/dist/styles/theme.css +82 -0
- package/dist/theme/index.d.ts +8 -0
- package/dist/theme/theme-context.d.ts +10 -0
- package/dist/theme/theme-provider.d.ts +15 -0
- package/dist/theme/theme-utils.d.ts +6 -0
- package/dist/theme/theme.types.d.ts +47 -0
- package/dist/theme/use-theme.d.ts +8 -0
- package/dist/utils/solid.d.ts +1 -0
- package/dist/utils/to-accessor.d.ts +3 -0
- package/docs/SLOTS.md +91 -0
- package/package.json +128 -0
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
@theme {
|
|
2
|
+
/* Core colors - overridden by ThemeProvider inline styles */
|
|
3
|
+
--color-primary: #1d1f27;
|
|
4
|
+
--color-primary-foreground: #ffffff;
|
|
5
|
+
--color-secondary: #f4f4f5;
|
|
6
|
+
--color-background: #ffffff;
|
|
7
|
+
--color-surface: #ffffff;
|
|
8
|
+
--color-surface-foreground: #1d1f27;
|
|
9
|
+
--color-foreground: #1d1f27;
|
|
10
|
+
--color-muted: #4b4e56cc;
|
|
11
|
+
--color-muted-foreground: #4b4e5699;
|
|
12
|
+
--color-border: #4b4e5666;
|
|
13
|
+
|
|
14
|
+
/* Status colors */
|
|
15
|
+
--color-success: oklch(0.77 0.18 130);
|
|
16
|
+
--color-success-foreground: #111111;
|
|
17
|
+
--color-warning: oklch(0.72 0.18 65);
|
|
18
|
+
--color-warning-foreground: #111111;
|
|
19
|
+
--color-danger: oklch(0.63 0.24 25);
|
|
20
|
+
--color-danger-foreground: #ffffff;
|
|
21
|
+
|
|
22
|
+
/* Typography */
|
|
23
|
+
--font-sans: "Inter", system-ui, sans-serif;
|
|
24
|
+
--font-heading: "Inter", system-ui, sans-serif;
|
|
25
|
+
|
|
26
|
+
/* Extension below Tailwind's default `text-xs` (12px) for badge / pill / micro-label copy. */
|
|
27
|
+
--text-xxs: 0.625rem;
|
|
28
|
+
--text-xxs--line-height: 0.875rem;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
@layer base {
|
|
32
|
+
/**
|
|
33
|
+
* Default theme values for .fanfare-themed elements.
|
|
34
|
+
* ThemeProvider overrides these via inline styles.
|
|
35
|
+
*/
|
|
36
|
+
.fanfare-themed {
|
|
37
|
+
font-family: var(--ff-font-sans);
|
|
38
|
+
color: var(--ff-color-foreground);
|
|
39
|
+
background-color: var(--ff-color-background);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* Ensure all descendants inherit border and outline colors
|
|
44
|
+
*/
|
|
45
|
+
.fanfare-themed *,
|
|
46
|
+
.fanfare-themed ::after,
|
|
47
|
+
.fanfare-themed ::before,
|
|
48
|
+
.fanfare-themed ::backdrop,
|
|
49
|
+
.fanfare-themed ::file-selector-button {
|
|
50
|
+
border-color: var(--ff-color-border);
|
|
51
|
+
outline-color: var(--ff-color-border);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* Interactive elements
|
|
56
|
+
*/
|
|
57
|
+
.fanfare-themed button:not(:disabled),
|
|
58
|
+
.fanfare-themed [role="button"]:not(:disabled) {
|
|
59
|
+
cursor: pointer;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
* Focus styles
|
|
64
|
+
*/
|
|
65
|
+
.fanfare-themed :focus-visible {
|
|
66
|
+
outline: 2px solid var(--ff-color-primary);
|
|
67
|
+
outline-offset: 2px;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
* Respect reduced motion preferences
|
|
72
|
+
*/
|
|
73
|
+
@media (prefers-reduced-motion: reduce) {
|
|
74
|
+
.fanfare-themed *,
|
|
75
|
+
.fanfare-themed ::before,
|
|
76
|
+
.fanfare-themed ::after {
|
|
77
|
+
animation-duration: 0.01ms !important;
|
|
78
|
+
animation-iteration-count: 1 !important;
|
|
79
|
+
transition-duration: 0.01ms !important;
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export { ThemeContext, createMergedTheme, useThemeContext } from './theme-context';
|
|
2
|
+
export type { ThemeContextValue } from './theme-context';
|
|
3
|
+
export { ThemeProvider } from './theme-provider';
|
|
4
|
+
export type { ThemeProviderProps } from './theme-provider';
|
|
5
|
+
export { buildThemeCssVars } from './theme-utils';
|
|
6
|
+
export { THEME_CSS_VARS } from './theme.types';
|
|
7
|
+
export type { BrandTheme, ResolvedTheme, ThemeCssVar, WidgetThemeConfig, WidgetVariant } from './theme.types';
|
|
8
|
+
export { useTheme, useThemeAndVariant, useVariant } from './use-theme';
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { BrandTheme, WidgetVariant } from '@fanfare-io/fanfare-sdk-core/theme';
|
|
2
|
+
import { Accessor } from 'solid-js';
|
|
3
|
+
export interface ThemeContextValue {
|
|
4
|
+
theme: Accessor<BrandTheme>;
|
|
5
|
+
variant: Accessor<WidgetVariant>;
|
|
6
|
+
isRoot: boolean;
|
|
7
|
+
}
|
|
8
|
+
export declare const ThemeContext: import('solid-js').Context<ThemeContextValue>;
|
|
9
|
+
export declare function useThemeContext(): ThemeContextValue;
|
|
10
|
+
export declare function createMergedTheme(parent: ThemeContextValue, theme: Accessor<BrandTheme | null | undefined>, variant: Accessor<WidgetVariant | undefined>): ThemeContextValue;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { BrandTheme, WidgetVariant } from '@fanfare-io/fanfare-sdk-core/theme';
|
|
2
|
+
import { JSX } from 'solid-js';
|
|
3
|
+
export interface ThemeProviderProps {
|
|
4
|
+
/** Theme overrides to merge with parent theme */
|
|
5
|
+
theme?: BrandTheme | null;
|
|
6
|
+
/** Widget variant (layout/density) */
|
|
7
|
+
variant?: WidgetVariant;
|
|
8
|
+
/** HTML element to render as wrapper */
|
|
9
|
+
as?: keyof JSX.IntrinsicElements;
|
|
10
|
+
/** Additional CSS classes */
|
|
11
|
+
className?: string;
|
|
12
|
+
/** Child components */
|
|
13
|
+
children: JSX.Element;
|
|
14
|
+
}
|
|
15
|
+
export declare function ThemeProvider(props: ThemeProviderProps): JSX.Element;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { BrandTheme } from '@fanfare-io/fanfare-sdk-core/theme';
|
|
2
|
+
/**
|
|
3
|
+
* Builds CSS custom property values from a theme.
|
|
4
|
+
* Used by ThemeProvider to apply theme as inline styles.
|
|
5
|
+
*/
|
|
6
|
+
export declare function buildThemeCssVars(theme: BrandTheme): Record<string, string>;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { BrandTheme, WidgetVariant } from '@fanfare-io/fanfare-sdk-core/theme';
|
|
2
|
+
export type { BrandTheme, WidgetVariant } from '@fanfare-io/fanfare-sdk-core/theme';
|
|
3
|
+
/**
|
|
4
|
+
* Extended theme configuration for widgets.
|
|
5
|
+
* Builds on BrandTheme from fanfare-sdk-core.
|
|
6
|
+
*/
|
|
7
|
+
export interface WidgetThemeConfig {
|
|
8
|
+
/** Base theme from experience configuration */
|
|
9
|
+
theme?: BrandTheme;
|
|
10
|
+
/** Layout/density variant (not related to colors) */
|
|
11
|
+
variant?: WidgetVariant;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Resolved theme with all defaults applied.
|
|
15
|
+
* This is what components receive from the theme context.
|
|
16
|
+
*/
|
|
17
|
+
export interface ResolvedTheme {
|
|
18
|
+
/** The fully-merged BrandTheme with defaults */
|
|
19
|
+
theme: BrandTheme;
|
|
20
|
+
/** The active variant */
|
|
21
|
+
variant: WidgetVariant;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* CSS custom property names used by the theme system.
|
|
25
|
+
* Maps to Tailwind V4 variables with ff- prefix (--ff-color-*, --ff-font-*).
|
|
26
|
+
*/
|
|
27
|
+
export declare const THEME_CSS_VARS: {
|
|
28
|
+
readonly primary: "--ff-color-primary";
|
|
29
|
+
readonly primaryForeground: "--ff-color-primary-foreground";
|
|
30
|
+
readonly secondary: "--ff-color-secondary";
|
|
31
|
+
readonly background: "--ff-color-background";
|
|
32
|
+
readonly surface: "--ff-color-surface";
|
|
33
|
+
readonly surfaceForeground: "--ff-color-surface-foreground";
|
|
34
|
+
readonly foreground: "--ff-color-foreground";
|
|
35
|
+
readonly muted: "--ff-color-muted";
|
|
36
|
+
readonly mutedForeground: "--ff-color-muted-foreground";
|
|
37
|
+
readonly border: "--ff-color-border";
|
|
38
|
+
readonly success: "--ff-color-success";
|
|
39
|
+
readonly successForeground: "--ff-color-success-foreground";
|
|
40
|
+
readonly warning: "--ff-color-warning";
|
|
41
|
+
readonly warningForeground: "--ff-color-warning-foreground";
|
|
42
|
+
readonly danger: "--ff-color-danger";
|
|
43
|
+
readonly dangerForeground: "--ff-color-danger-foreground";
|
|
44
|
+
readonly fontFamily: "--ff-font-sans";
|
|
45
|
+
readonly fontHeading: "--ff-font-heading";
|
|
46
|
+
};
|
|
47
|
+
export type ThemeCssVar = (typeof THEME_CSS_VARS)[keyof typeof THEME_CSS_VARS];
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { BrandTheme, WidgetVariant } from '@fanfare-io/fanfare-sdk-core/theme';
|
|
2
|
+
import { Accessor } from 'solid-js';
|
|
3
|
+
export declare function useTheme(): Accessor<BrandTheme>;
|
|
4
|
+
export declare function useVariant(): Accessor<WidgetVariant>;
|
|
5
|
+
export declare function useThemeAndVariant(): {
|
|
6
|
+
theme: Accessor<BrandTheme>;
|
|
7
|
+
variant: Accessor<WidgetVariant>;
|
|
8
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { cn, extractAriaProps, extractDataProps, fanfareClass } from '../lib/utils';
|
package/docs/SLOTS.md
ADDED
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
# ExperienceWidget Slots
|
|
2
|
+
|
|
3
|
+
`ExperienceWidget` slots are render props for targeted UI overrides. Each slot is called only when the matching journey or sequence state is active; all other states keep the default Fanfare UI.
|
|
4
|
+
|
|
5
|
+
The slot surface is derived from the same model as `JourneyView`: `journeyStage` -> `sequence.phase` -> `sequence.mechanism`. Actions are not serialized as a separate source of truth, and the server stays authoritative over what is permitted.
|
|
6
|
+
|
|
7
|
+
Use `children` or `useExperienceJourney` when you need to replace the full widget. Use `slots` when the default flow is correct and a specific state needs custom UI.
|
|
8
|
+
|
|
9
|
+
The slot inventory and props match the React adapter; Solid slots are render props returning `JSX.Element` and read SDK state through Solid reactivity.
|
|
10
|
+
|
|
11
|
+
## Shared Props
|
|
12
|
+
|
|
13
|
+
Every slot receives:
|
|
14
|
+
|
|
15
|
+
- `snapshot`: the current `JourneySnapshot | null`.
|
|
16
|
+
- `view`: the current `JourneyView | null`.
|
|
17
|
+
- `error`: the current widget error string, or `null`.
|
|
18
|
+
|
|
19
|
+
## Journey Slots
|
|
20
|
+
|
|
21
|
+
| Slot | Meaningful state | Extra props |
|
|
22
|
+
| ------------ | ------------------------------------------------------------- | --------------------------------------------------------- |
|
|
23
|
+
| `start` | `journeyStage: "ready"` | `onStart`, `isStarting` |
|
|
24
|
+
| `loading` | `journeyStage: "routing"`, gated loading, or fallback loading | `message?` |
|
|
25
|
+
| `auth` | `journeyStage: "gated"` with an auth gate | `onSubmit`, `onVerify`, `onSkip?` |
|
|
26
|
+
| `accessCode` | `journeyStage: "gated"` with an access-code gate | `onSubmit`, `onSkip?` |
|
|
27
|
+
| `challenge` | `journeyStage: "gated"` with a bot-check gate | `challenge`, `botMitigation?`, `onVerifyToken`, `onRetry` |
|
|
28
|
+
| `error` | Widget action or loading error | `error`, `onRetry` |
|
|
29
|
+
|
|
30
|
+
## Routed Sequence Slots
|
|
31
|
+
|
|
32
|
+
| Slot | Meaningful state | Mechanisms | Extra props |
|
|
33
|
+
| --------------- | ----------------------------------------------- | ---------------------------------------------------------- | ------------------------------------------------ |
|
|
34
|
+
| `upcoming` | `phase: "scheduled"` | `queue`, `draw`, `auction`, `timed_release`, `appointment` | `startsAt?`, `canEnter`, `onEnter`, `isEntering` |
|
|
35
|
+
| `upcoming` | `phase: "enterable"` | `waitlist` | `startsAt?`, `canEnter`, `onEnter`, `isEntering` |
|
|
36
|
+
| `waitlist` | `phase: "participating"` | `waitlist` | `startsAt?`, `onLeave`, `isLeaving` |
|
|
37
|
+
| `enterable` | `phase: "enterable"` | `queue`, `draw`, `auction`, `timed_release`, `appointment` | `sequence`, `participationType` |
|
|
38
|
+
| `participating` | `phase: "participating"` | `queue`, `draw`, `auction`, `timed_release`, `appointment` | `sequence`, `participationType`, `position?` |
|
|
39
|
+
| `granted` | `phase: "granted"` | `queue`, `draw`, `auction`, `timed_release` | `sequence`, `grant?`, `expiresAt?` |
|
|
40
|
+
| `expired` | `phase: "ended"` with `outcome.type: "expired"` | any ended mechanism | `reason`, `endedAt?` |
|
|
41
|
+
| `ended` | `phase: "unavailable"` or `phase: "ended"` | any ended mechanism | `reason`, `endedAt?` |
|
|
42
|
+
|
|
43
|
+
There is no slot for `phase: "settling"`; `draw` and `auction` render their default settling modules. There is no `granted` state for `appointment` or `waitlist`. The `ended` slot also renders `phase: "unavailable"` for convenience; `unavailable` is not a terminal phase.
|
|
44
|
+
|
|
45
|
+
## `slots.enterable`
|
|
46
|
+
|
|
47
|
+
`slots.enterable` receives the typed `sequence` view. Call the method exposed for that exact `phase` and `mechanism`.
|
|
48
|
+
|
|
49
|
+
```tsx
|
|
50
|
+
<ExperienceWidget
|
|
51
|
+
experienceId="exp_123"
|
|
52
|
+
slots={{
|
|
53
|
+
enterable: ({ sequence, participationType }) => {
|
|
54
|
+
if (sequence.mechanism === "auction") {
|
|
55
|
+
return <button onClick={() => void sequence.bid("125.00")}>Bid</button>;
|
|
56
|
+
}
|
|
57
|
+
if (sequence.mechanism === "appointment") {
|
|
58
|
+
return <button onClick={() => void sequence.book("slot_123")}>Book</button>;
|
|
59
|
+
}
|
|
60
|
+
return <button onClick={() => void sequence.enter()}>Enter {participationType}</button>;
|
|
61
|
+
},
|
|
62
|
+
}}
|
|
63
|
+
/>
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
`participationType` is the slot prop carrying `sequence.mechanism` for the five non-waitlist mechanisms: `queue`, `draw`, `auction`, `timed_release`, or `appointment`. See the Mechanisms section of the core SDK `JOURNEY_MODEL.md`.
|
|
67
|
+
|
|
68
|
+
## `slots.participating`
|
|
69
|
+
|
|
70
|
+
`slots.participating` receives the typed `sequence` view for `queue`, `draw`, `auction`, `timed_release`, and `appointment`.
|
|
71
|
+
|
|
72
|
+
- `queue`, `draw`: `state$`, `leave()`.
|
|
73
|
+
- `auction`: `state$`, `bid(amount)`, `leave()`.
|
|
74
|
+
- `timed_release`: `state$`, `leave()`, `complete()`.
|
|
75
|
+
- `appointment`: `state$`, `cancel(reason?)`, `reschedule(newSlotId, newLocationId?)`.
|
|
76
|
+
|
|
77
|
+
`position` is populated when queue display state includes a queue position.
|
|
78
|
+
|
|
79
|
+
## Default Rendering
|
|
80
|
+
|
|
81
|
+
Without a slot:
|
|
82
|
+
|
|
83
|
+
- `ready` uses `StartView`.
|
|
84
|
+
- `routing` and loading fallbacks use `LoadingView`.
|
|
85
|
+
- `gated` uses `JourneyGate` or `ChallengeGate`.
|
|
86
|
+
- `scheduled` and enterable `waitlist` use `UpcomingModule`.
|
|
87
|
+
- participating `waitlist` uses `WaitlistView`.
|
|
88
|
+
- `queue`, `draw`, `auction`, `timed_release`, and `appointment` use their default modules for supported phases.
|
|
89
|
+
- `granted` uses the distribution module's granted panel.
|
|
90
|
+
- `ended` uses the distribution module's outcome UI for `queue`, `draw`, `auction`, `timed_release`, and `appointment`; `unavailable` uses `EndedModule`.
|
|
91
|
+
- ended `waitlist` can be handled with `slots.ended` or full custom rendering.
|
package/package.json
ADDED
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@fanfare-io/fanfare-sdk-solid",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "SolidJS web components for Fanfare experiences",
|
|
5
|
+
"publishConfig": {
|
|
6
|
+
"registry": "https://registry.npmjs.org",
|
|
7
|
+
"access": "public"
|
|
8
|
+
},
|
|
9
|
+
"repository": {
|
|
10
|
+
"type": "git",
|
|
11
|
+
"url": "https://github.com/fanfare-io/fanfare-sdk.git"
|
|
12
|
+
},
|
|
13
|
+
"homepage": "https://docs.fanfare.io/sdk/components/web-components",
|
|
14
|
+
"bugs": {
|
|
15
|
+
"url": "https://github.com/fanfare-io/fanfare-sdk/issues"
|
|
16
|
+
},
|
|
17
|
+
"type": "module",
|
|
18
|
+
"files": [
|
|
19
|
+
"dist/",
|
|
20
|
+
"docs/",
|
|
21
|
+
"README.md"
|
|
22
|
+
],
|
|
23
|
+
"module": "./dist/index.js",
|
|
24
|
+
"types": "./dist/index.d.ts",
|
|
25
|
+
"exports": {
|
|
26
|
+
".": {
|
|
27
|
+
"types": "./dist/index.d.ts",
|
|
28
|
+
"import": "./dist/index.js"
|
|
29
|
+
},
|
|
30
|
+
"./styles": {
|
|
31
|
+
"import": "./dist/styles/base.css"
|
|
32
|
+
},
|
|
33
|
+
"./package.json": "./package.json"
|
|
34
|
+
},
|
|
35
|
+
"peerDependencies": {
|
|
36
|
+
"solid-js": "^1.9.6"
|
|
37
|
+
},
|
|
38
|
+
"dependencies": {
|
|
39
|
+
"canvas-confetti": "^1.9.4",
|
|
40
|
+
"class-variance-authority": "^0.7.1",
|
|
41
|
+
"clsx": "^2.1.1",
|
|
42
|
+
"nanostores": "^1.1.0",
|
|
43
|
+
"solid-element": "^1.8.0",
|
|
44
|
+
"tailwind-merge": "^2.6.0",
|
|
45
|
+
"valibot": "^1.1.0",
|
|
46
|
+
"@fanfare-io/fanfare-sdk-core": "0.1.0",
|
|
47
|
+
"@fanfare-io/fanfare-sdk-i18n": "0.1.0"
|
|
48
|
+
},
|
|
49
|
+
"devDependencies": {
|
|
50
|
+
"@size-limit/preset-small-lib": "^11.1.8",
|
|
51
|
+
"@solidjs/testing-library": "^0.8.0",
|
|
52
|
+
"@storybook/addon-a11y": "^10.4.0",
|
|
53
|
+
"@storybook/addon-docs": "^10.4.0",
|
|
54
|
+
"@storybook/addon-themes": "^10.4.0",
|
|
55
|
+
"@storybook/addon-vitest": "~10.2.16",
|
|
56
|
+
"@tailwindcss/cli": "^4.1.16",
|
|
57
|
+
"@tailwindcss/vite": "^4.1.3",
|
|
58
|
+
"@testing-library/jest-dom": "^6.6.4",
|
|
59
|
+
"@types/testing-library__jest-dom": "^6.0.0",
|
|
60
|
+
"@vitest/browser": "^3.2.4",
|
|
61
|
+
"@vitest/ui": "^3.2.4",
|
|
62
|
+
"jsdom": "^26.1.0",
|
|
63
|
+
"playwright": "^1.51.1",
|
|
64
|
+
"prettier": "^3.5.3",
|
|
65
|
+
"prettier-plugin-organize-imports": "^4.1.0",
|
|
66
|
+
"rimraf": "^6.0.1",
|
|
67
|
+
"size-limit": "^11.1.8",
|
|
68
|
+
"solid-js": "^1.9.6",
|
|
69
|
+
"storybook": "^10.4.0",
|
|
70
|
+
"storybook-solidjs-vite": "^10.0.12",
|
|
71
|
+
"tailwindcss": "^4.1.3",
|
|
72
|
+
"tailwindcss-animate": "^1.0.7",
|
|
73
|
+
"typescript": "^5.9.2",
|
|
74
|
+
"vite": "^7.3.1",
|
|
75
|
+
"vite-plugin-dts": "^4.5.4",
|
|
76
|
+
"vite-plugin-solid": "^2.11.6",
|
|
77
|
+
"vite-tsconfig-paths": "^5.1.4",
|
|
78
|
+
"vitest": "^3.2.4",
|
|
79
|
+
"@fanfare-io/fanfare-sdk-core": "0.1.0",
|
|
80
|
+
"@fanfare-io/fanfare-sdk-react": "0.1.0"
|
|
81
|
+
},
|
|
82
|
+
"sideEffects": [
|
|
83
|
+
"**/*.css"
|
|
84
|
+
],
|
|
85
|
+
"keywords": [
|
|
86
|
+
"fanfare",
|
|
87
|
+
"solidjs",
|
|
88
|
+
"web-components",
|
|
89
|
+
"queue",
|
|
90
|
+
"ecommerce"
|
|
91
|
+
],
|
|
92
|
+
"license": "Apache-2.0",
|
|
93
|
+
"size-limit": [
|
|
94
|
+
{
|
|
95
|
+
"name": "Solid adapter",
|
|
96
|
+
"path": "dist/index.js",
|
|
97
|
+
"limit": "50 KB",
|
|
98
|
+
"ignore": [
|
|
99
|
+
"solid-js",
|
|
100
|
+
"solid-js/web",
|
|
101
|
+
"@fanfare-io/fanfare-sdk-core",
|
|
102
|
+
"@fanfare-io/fanfare-sdk-core/internals",
|
|
103
|
+
"@fanfare-io/fanfare-sdk-core/test-utils",
|
|
104
|
+
"@fanfare-io/fanfare-sdk-i18n"
|
|
105
|
+
]
|
|
106
|
+
}
|
|
107
|
+
],
|
|
108
|
+
"scripts": {
|
|
109
|
+
"prebuild": "rimraf dist && pnpm -F @fanfare-io/fanfare-sdk-i18n build:deps && pnpm -F @fanfare-io/fanfare-sdk-core build:deps",
|
|
110
|
+
"pretest": "pnpm -F @fanfare-io/fanfare-sdk-i18n build:deps && pnpm -F @fanfare-io/fanfare-sdk-core build:deps && pnpm -F @fanfare-io/fanfare-sdk-react build:incremental",
|
|
111
|
+
"build": "vite build && tailwindcss -i src/styles/base.css -o dist/styles/base.css && pnpm size",
|
|
112
|
+
"build:incremental": "vite build --emptyOutDir false",
|
|
113
|
+
"build:strict": "pnpm typecheck && pnpm build",
|
|
114
|
+
"build-storybook": "storybook build",
|
|
115
|
+
"dev": "vite build --watch",
|
|
116
|
+
"fmt": "prettier src --write",
|
|
117
|
+
"lint": "oxlint src",
|
|
118
|
+
"lint:fix": "oxlint --fix src",
|
|
119
|
+
"size": "size-limit",
|
|
120
|
+
"storybook": "storybook dev -p 6008 --no-open",
|
|
121
|
+
"test": "vitest run",
|
|
122
|
+
"test:browser": "vitest run --project storybook",
|
|
123
|
+
"test:watch": "vitest",
|
|
124
|
+
"test:unit": "vitest run .unit.test.ts --passWithNoTests",
|
|
125
|
+
"test:component": "vitest run .test.tsx --passWithNoTests",
|
|
126
|
+
"typecheck": "tsc --noEmit"
|
|
127
|
+
}
|
|
128
|
+
}
|