@bowlos/reservations 0.24.0 → 0.25.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.
Files changed (39) hide show
  1. package/HEADLESS.md +48 -0
  2. package/README.md +10 -0
  3. package/dist/{account-B9tDfXke.d.ts → account-5oZrwcaq.d.ts} +1 -1
  4. package/dist/{account-C9SvfE3q.d.cts → account-nHac98qx.d.cts} +1 -1
  5. package/dist/{catalog-BPh01sfG.d.ts → catalog-BMdk6ZSC.d.ts} +9 -1
  6. package/dist/{catalog-I7Lpar3V.d.cts → catalog-Ca7eN9CP.d.cts} +9 -1
  7. package/dist/{chunk-S5T4OCBY.js → chunk-5JWJBLPE.js} +2 -2
  8. package/dist/{chunk-S5T4OCBY.js.map → chunk-5JWJBLPE.js.map} +1 -1
  9. package/dist/{chunk-CRETIPLS.js → chunk-7OHHK65Q.js} +11 -4
  10. package/dist/chunk-7OHHK65Q.js.map +1 -0
  11. package/dist/components.cjs +40 -0
  12. package/dist/components.cjs.map +1 -1
  13. package/dist/components.d.cts +17 -5
  14. package/dist/components.d.ts +17 -5
  15. package/dist/components.js +37 -5
  16. package/dist/components.js.map +1 -1
  17. package/dist/{data-BKlgn8Ln.d.cts → data-CVq9zXz7.d.cts} +34 -0
  18. package/dist/{data-BKlgn8Ln.d.ts → data-CVq9zXz7.d.ts} +34 -0
  19. package/dist/index.cjs.map +1 -1
  20. package/dist/index.d.cts +4 -4
  21. package/dist/index.d.ts +4 -4
  22. package/dist/index.js +2 -2
  23. package/dist/index.js.map +1 -1
  24. package/dist/payments.cjs +4 -2
  25. package/dist/payments.cjs.map +1 -1
  26. package/dist/payments.d.cts +11 -3
  27. package/dist/payments.d.ts +11 -3
  28. package/dist/payments.js +4 -2
  29. package/dist/payments.js.map +1 -1
  30. package/dist/{react--584Q9zx.d.cts → react-Bhpzhr01.d.cts} +2 -2
  31. package/dist/{react-C0c5k3Tt.d.ts → react-C9bUP9LB.d.ts} +2 -2
  32. package/dist/react.cjs +8 -0
  33. package/dist/react.cjs.map +1 -1
  34. package/dist/react.d.cts +18 -6
  35. package/dist/react.d.ts +18 -6
  36. package/dist/react.js +3 -3
  37. package/package.json +2 -2
  38. package/templates/center-site/package.json +1 -1
  39. package/dist/chunk-CRETIPLS.js.map +0 -1
@@ -1,9 +1,9 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
2
  import { CSSProperties, ReactNode } from 'react';
3
- import { U as PricingMode, S as PaymentIntentInfo, l as Customer } from './data-BKlgn8Ln.cjs';
4
- import { d as UseAccountResult } from './react--584Q9zx.cjs';
5
- import { g as CatalogItem } from './catalog-I7Lpar3V.cjs';
6
- export { h as CatalogResult, i as CatalogSection } from './catalog-I7Lpar3V.cjs';
3
+ import { m as PublicSurface, g as CatalogItem } from './catalog-Ca7eN9CP.cjs';
4
+ export { h as CatalogResult, i as CatalogSection } from './catalog-Ca7eN9CP.cjs';
5
+ import { U as PricingMode, S as PaymentIntentInfo, l as Customer } from './data-CVq9zXz7.cjs';
6
+ import { d as UseAccountResult } from './react-Bhpzhr01.cjs';
7
7
 
8
8
  /**
9
9
  * Themeable design tokens for the `@bowlos/reservations/components` layer.
@@ -47,6 +47,18 @@ declare function BowlosTheme({ theme, className, style, children, }: {
47
47
  children: ReactNode;
48
48
  }): react_jsx_runtime.JSX.Element;
49
49
 
50
+ interface MaintenanceBannerProps {
51
+ brandId: string;
52
+ centerId: string;
53
+ /** Which surface's catalog/visibility to read. Default "sdk_custom_site". */
54
+ surface?: PublicSurface;
55
+ /** Override the default customer-facing copy (never mention "test mode"). */
56
+ message?: string;
57
+ className?: string;
58
+ style?: CSSProperties;
59
+ }
60
+ declare function MaintenanceBanner({ brandId, centerId, surface, message, className, style, }: MaintenanceBannerProps): react_jsx_runtime.JSX.Element | null;
61
+
50
62
  /** Visible strings — override any subset for copy/i18n. */
51
63
  interface BookingFlowLabels {
52
64
  heading: string;
@@ -493,4 +505,4 @@ declare function formatCents(cents: number): string;
493
505
  /** A min–max money range, collapsing to one value when they're equal. */
494
506
  declare function formatCentsRange(minCents: number, maxCents: number): string;
495
507
 
496
- export { AccountDashboard, type AccountDashboardLabels, type AccountDashboardProps, AccountMenu, type AccountMenuLabels, type AccountMenuProps, type AccountSection, AuthForm, AuthGate, type AuthGateLabels, type AuthGateProps, type AuthGateRenderContext, BOWLOS_DEFAULT_THEME, BookingCatalog, type BookingCatalogLabels, type BookingCatalogProps, BookingFlow, type BookingFlowLabels, type BookingFlowProps, BowlosTheme, type BowlosThemeTokens, CatalogItem, type FlashBrand, FlashSale, FlashSaleIndex, type FlashSaleIndexItem, type FlashSaleIndexLabels, type FlashSaleIndexProps, type FlashSaleIndexView, type FlashSaleItem, type FlashSaleLabels, type FlashSaleProps, type FlashSaleView, type MyCreditEntry, type MyCredits, type MyLoyalty, type MyMembershipSummary, type MyPass, type MyReservationSummary, formatCents, formatCentsRange };
508
+ export { AccountDashboard, type AccountDashboardLabels, type AccountDashboardProps, AccountMenu, type AccountMenuLabels, type AccountMenuProps, type AccountSection, AuthForm, AuthGate, type AuthGateLabels, type AuthGateProps, type AuthGateRenderContext, BOWLOS_DEFAULT_THEME, BookingCatalog, type BookingCatalogLabels, type BookingCatalogProps, BookingFlow, type BookingFlowLabels, type BookingFlowProps, BowlosTheme, type BowlosThemeTokens, CatalogItem, type FlashBrand, FlashSale, FlashSaleIndex, type FlashSaleIndexItem, type FlashSaleIndexLabels, type FlashSaleIndexProps, type FlashSaleIndexView, type FlashSaleItem, type FlashSaleLabels, type FlashSaleProps, type FlashSaleView, MaintenanceBanner, type MaintenanceBannerProps, type MyCreditEntry, type MyCredits, type MyLoyalty, type MyMembershipSummary, type MyPass, type MyReservationSummary, formatCents, formatCentsRange };
@@ -1,9 +1,9 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
2
  import { CSSProperties, ReactNode } from 'react';
3
- import { U as PricingMode, S as PaymentIntentInfo, l as Customer } from './data-BKlgn8Ln.js';
4
- import { d as UseAccountResult } from './react-C0c5k3Tt.js';
5
- import { g as CatalogItem } from './catalog-BPh01sfG.js';
6
- export { h as CatalogResult, i as CatalogSection } from './catalog-BPh01sfG.js';
3
+ import { m as PublicSurface, g as CatalogItem } from './catalog-BMdk6ZSC.js';
4
+ export { h as CatalogResult, i as CatalogSection } from './catalog-BMdk6ZSC.js';
5
+ import { U as PricingMode, S as PaymentIntentInfo, l as Customer } from './data-CVq9zXz7.js';
6
+ import { d as UseAccountResult } from './react-C9bUP9LB.js';
7
7
 
8
8
  /**
9
9
  * Themeable design tokens for the `@bowlos/reservations/components` layer.
@@ -47,6 +47,18 @@ declare function BowlosTheme({ theme, className, style, children, }: {
47
47
  children: ReactNode;
48
48
  }): react_jsx_runtime.JSX.Element;
49
49
 
50
+ interface MaintenanceBannerProps {
51
+ brandId: string;
52
+ centerId: string;
53
+ /** Which surface's catalog/visibility to read. Default "sdk_custom_site". */
54
+ surface?: PublicSurface;
55
+ /** Override the default customer-facing copy (never mention "test mode"). */
56
+ message?: string;
57
+ className?: string;
58
+ style?: CSSProperties;
59
+ }
60
+ declare function MaintenanceBanner({ brandId, centerId, surface, message, className, style, }: MaintenanceBannerProps): react_jsx_runtime.JSX.Element | null;
61
+
50
62
  /** Visible strings — override any subset for copy/i18n. */
51
63
  interface BookingFlowLabels {
52
64
  heading: string;
@@ -493,4 +505,4 @@ declare function formatCents(cents: number): string;
493
505
  /** A min–max money range, collapsing to one value when they're equal. */
494
506
  declare function formatCentsRange(minCents: number, maxCents: number): string;
495
507
 
496
- export { AccountDashboard, type AccountDashboardLabels, type AccountDashboardProps, AccountMenu, type AccountMenuLabels, type AccountMenuProps, type AccountSection, AuthForm, AuthGate, type AuthGateLabels, type AuthGateProps, type AuthGateRenderContext, BOWLOS_DEFAULT_THEME, BookingCatalog, type BookingCatalogLabels, type BookingCatalogProps, BookingFlow, type BookingFlowLabels, type BookingFlowProps, BowlosTheme, type BowlosThemeTokens, CatalogItem, type FlashBrand, FlashSale, FlashSaleIndex, type FlashSaleIndexItem, type FlashSaleIndexLabels, type FlashSaleIndexProps, type FlashSaleIndexView, type FlashSaleItem, type FlashSaleLabels, type FlashSaleProps, type FlashSaleView, type MyCreditEntry, type MyCredits, type MyLoyalty, type MyMembershipSummary, type MyPass, type MyReservationSummary, formatCents, formatCentsRange };
508
+ export { AccountDashboard, type AccountDashboardLabels, type AccountDashboardProps, AccountMenu, type AccountMenuLabels, type AccountMenuProps, type AccountSection, AuthForm, AuthGate, type AuthGateLabels, type AuthGateProps, type AuthGateRenderContext, BOWLOS_DEFAULT_THEME, BookingCatalog, type BookingCatalogLabels, type BookingCatalogProps, BookingFlow, type BookingFlowLabels, type BookingFlowProps, BowlosTheme, type BowlosThemeTokens, CatalogItem, type FlashBrand, FlashSale, FlashSaleIndex, type FlashSaleIndexItem, type FlashSaleIndexLabels, type FlashSaleIndexProps, type FlashSaleIndexView, type FlashSaleItem, type FlashSaleLabels, type FlashSaleProps, type FlashSaleView, MaintenanceBanner, type MaintenanceBannerProps, type MyCreditEntry, type MyCredits, type MyLoyalty, type MyMembershipSummary, type MyPass, type MyReservationSummary, formatCents, formatCentsRange };
@@ -1,10 +1,42 @@
1
- import { useAccount, useAvailability, useBookingPreview, useAddons, useStartTimes, useBookingFlow, useMyReservations, useMyMemberships, useMyLoyalty, useMyCredits, useMyPasses, useFlashSale, useFlashSales, useCatalog } from './chunk-CRETIPLS.js';
2
- import { availableUnitCount } from './chunk-S5T4OCBY.js';
3
- import { styles, formatCents, formatMinuteLabel, token, minutesToTime, useCountdown, formatCentsRange } from './chunk-Y3YSDO3H.js';
1
+ import { useTestMode, useAccount, useAvailability, useBookingPreview, useAddons, useStartTimes, useBookingFlow, useMyReservations, useMyMemberships, useMyLoyalty, useMyCredits, useMyPasses, useFlashSale, useFlashSales, useCatalog } from './chunk-7OHHK65Q.js';
2
+ import { availableUnitCount } from './chunk-5JWJBLPE.js';
3
+ import { token, styles, formatCents, formatMinuteLabel, minutesToTime, useCountdown, formatCentsRange } from './chunk-Y3YSDO3H.js';
4
4
  export { BOWLOS_DEFAULT_THEME, BowlosTheme, formatCents, formatCentsRange } from './chunk-Y3YSDO3H.js';
5
- import { useState, useEffect, useMemo, useRef } from 'react';
6
5
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
6
+ import { useState, useEffect, useMemo, useRef } from 'react';
7
7
 
8
+ var DEFAULT_MESSAGE = "We're performing maintenance \u2014 online booking is temporarily unavailable. Please check back soon.";
9
+ function MaintenanceBanner({
10
+ brandId,
11
+ centerId,
12
+ surface = "sdk_custom_site",
13
+ message,
14
+ className,
15
+ style
16
+ }) {
17
+ const { maintenanceMode } = useTestMode({ brandId, centerId, surface });
18
+ if (!maintenanceMode) return null;
19
+ return /* @__PURE__ */ jsx(
20
+ "div",
21
+ {
22
+ role: "status",
23
+ className,
24
+ style: {
25
+ fontFamily: token("fontFamily"),
26
+ color: token("colorText"),
27
+ background: token("colorBg"),
28
+ borderLeft: `4px solid ${token("colorPrimary")}`,
29
+ border: `1px solid ${token("colorBorder")}`,
30
+ borderLeftWidth: 4,
31
+ borderRadius: token("radius"),
32
+ padding: "0.75rem 1rem",
33
+ fontWeight: 600,
34
+ ...style
35
+ },
36
+ children: message ?? DEFAULT_MESSAGE
37
+ }
38
+ );
39
+ }
8
40
  var DEFAULT_LABELS = {
9
41
  signInHeading: "Sign in",
10
42
  signUpHeading: "Create your account",
@@ -991,6 +1023,6 @@ function formatDay(iso) {
991
1023
  });
992
1024
  }
993
1025
 
994
- export { AccountDashboard, AccountMenu, AuthForm, AuthGate, BookingCatalog, BookingFlow, FlashSale, FlashSaleIndex };
1026
+ export { AccountDashboard, AccountMenu, AuthForm, AuthGate, BookingCatalog, BookingFlow, FlashSale, FlashSaleIndex, MaintenanceBanner };
995
1027
  //# sourceMappingURL=components.js.map
996
1028
  //# sourceMappingURL=components.js.map