@bowlos/reservations 0.6.0 → 0.12.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 (50) hide show
  1. package/README.md +96 -9
  2. package/dist/catalog-kd07kri0.d.ts +74 -0
  3. package/dist/catalog-kdDjgvT1.d.cts +74 -0
  4. package/dist/{chunk-YICHFUAY.js → chunk-2X7MFQWY.js} +9 -3
  5. package/dist/chunk-2X7MFQWY.js.map +1 -0
  6. package/dist/{chunk-H42X4FRR.js → chunk-FPUWLOW3.js} +25 -4
  7. package/dist/chunk-FPUWLOW3.js.map +1 -0
  8. package/dist/chunk-Y3YSDO3H.js +221 -0
  9. package/dist/chunk-Y3YSDO3H.js.map +1 -0
  10. package/dist/components.cjs +366 -164
  11. package/dist/components.cjs.map +1 -1
  12. package/dist/components.d.cts +79 -4
  13. package/dist/components.d.ts +79 -4
  14. package/dist/components.js +340 -371
  15. package/dist/components.js.map +1 -1
  16. package/dist/{data-DrM0D6Pi.d.cts → data-lC-l-haz.d.cts} +33 -54
  17. package/dist/{data-DrM0D6Pi.d.ts → data-lC-l-haz.d.ts} +33 -54
  18. package/dist/errors-IIK7xibp.d.cts +54 -0
  19. package/dist/errors-IIK7xibp.d.ts +54 -0
  20. package/dist/index.cjs +34 -0
  21. package/dist/index.cjs.map +1 -1
  22. package/dist/index.d.cts +4 -3
  23. package/dist/index.d.ts +4 -3
  24. package/dist/index.js +23 -3
  25. package/dist/index.js.map +1 -1
  26. package/dist/payments.cjs +245 -0
  27. package/dist/payments.cjs.map +1 -0
  28. package/dist/payments.d.cts +37 -0
  29. package/dist/payments.d.ts +37 -0
  30. package/dist/payments.js +83 -0
  31. package/dist/payments.js.map +1 -0
  32. package/dist/{react-7ruEsubp.d.cts → react-B3dlcklN.d.ts} +2 -1
  33. package/dist/{react-Cb_NZCXa.d.ts → react-aZplAyHS.d.cts} +2 -1
  34. package/dist/react.cjs +28 -0
  35. package/dist/react.cjs.map +1 -1
  36. package/dist/react.d.cts +22 -5
  37. package/dist/react.d.ts +22 -5
  38. package/dist/react.js +2 -2
  39. package/package.json +20 -2
  40. package/templates/center-site/README.md +8 -7
  41. package/templates/center-site/app/book/page.tsx +33 -25
  42. package/templates/center-site/app/buy/page.tsx +36 -0
  43. package/templates/center-site/app/catalog/page.tsx +35 -0
  44. package/templates/center-site/app/site-header.tsx +1 -1
  45. package/templates/center-site/package.json +1 -1
  46. package/dist/account-BRapzoNI.d.cts +0 -46
  47. package/dist/account-VO6BzPNK.d.ts +0 -46
  48. package/dist/chunk-H42X4FRR.js.map +0 -1
  49. package/dist/chunk-YICHFUAY.js.map +0 -1
  50. package/templates/center-site/app/book/checkout-form.tsx +0 -85
@@ -1,7 +1,8 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
2
  import { CSSProperties, ReactNode } from 'react';
3
- import { q as PricingMode, P as PaymentIntentInfo, o as Customer } from './data-DrM0D6Pi.cjs';
4
- import { c as UseAccountResult } from './react-7ruEsubp.cjs';
3
+ import { m as PricingMode, P as PaymentIntentInfo, k as Customer } from './data-lC-l-haz.cjs';
4
+ import { c as UseAccountResult } from './react-aZplAyHS.cjs';
5
+ import './errors-IIK7xibp.cjs';
5
6
 
6
7
  /**
7
8
  * Themeable design tokens for the `@bowlos/reservations/components` layer.
@@ -50,7 +51,10 @@ interface BookingFlowLabels {
50
51
  heading: string;
51
52
  date: string;
52
53
  start: string;
54
+ loadingTimes: string;
55
+ noTimes: string;
53
56
  quantity: string;
57
+ addonsHeading: string;
54
58
  name: string;
55
59
  email: string;
56
60
  hold: string;
@@ -96,7 +100,8 @@ interface BookingFlowProps {
96
100
  reservationId: string | null;
97
101
  reservationDisplayId: string | null;
98
102
  }) => void;
99
- /** Unit noun, e.g. lane/lanes (per_unit) or player/players (per_person). */
103
+ /** Inventory noun for the availability line, e.g. lane/lanes. The COUNT field
104
+ * label is derived from `pricingMode` (Lanes / Bowlers / Games). */
100
105
  unitLabel?: {
101
106
  singular: string;
102
107
  plural: string;
@@ -412,6 +417,76 @@ interface FlashSaleIndexProps {
412
417
  */
413
418
  declare function FlashSaleIndex({ brandId, onOpen, labels, className }: FlashSaleIndexProps): react_jsx_runtime.JSX.Element;
414
419
 
420
+ /** A selectable offer, tagged by kind so the consumer can route it. */
421
+ type CatalogOffer = {
422
+ kind: "product";
423
+ id: string;
424
+ name: string;
425
+ attractionName: string;
426
+ attractionTypeKey: string;
427
+ durationMinutes: number;
428
+ pricingMode: string;
429
+ } | {
430
+ kind: "event";
431
+ id: string;
432
+ name: string;
433
+ date: string;
434
+ description: string | null;
435
+ } | {
436
+ kind: "package";
437
+ id: string;
438
+ name: string;
439
+ priceCents: number;
440
+ description: string | null;
441
+ } | {
442
+ kind: "membership";
443
+ id: string;
444
+ name: string;
445
+ priceCents: number;
446
+ description: string | null;
447
+ } | {
448
+ kind: "gamecard";
449
+ id: string;
450
+ name: string;
451
+ priceCents: number;
452
+ description: string | null;
453
+ };
454
+ interface BookingCatalogLabels {
455
+ heading: string;
456
+ loading: string;
457
+ empty: string;
458
+ bowling: string;
459
+ otherAttractions: string;
460
+ events: string;
461
+ packages: string;
462
+ memberships: string;
463
+ gamePasses: string;
464
+ select: string;
465
+ minutesAbbrev: string;
466
+ perMonth: string;
467
+ }
468
+ interface BookingCatalogProps {
469
+ /** Brand (packages + game passes) and Center (products + events + memberships). */
470
+ brandId: string;
471
+ centerId: string;
472
+ /**
473
+ * Called when a customer picks an offer. Route by `offer.kind`: a `product`
474
+ * or `event` → your `<BookingFlow>` (preset the event's date); a `package` /
475
+ * `membership` / `gamecard` → its buy page.
476
+ */
477
+ onSelect: (offer: CatalogOffer) => void;
478
+ labels?: Partial<BookingCatalogLabels>;
479
+ className?: string;
480
+ }
481
+ /**
482
+ * The categorized catalog of everything a Center sells online — Bowling, Other
483
+ * attractions, Events, Packages, Memberships, Game passes — each offer under its
484
+ * heading. Picking one hands off via `onSelect`. No prices cross the wire for
485
+ * gated surfaces; this only lists public offers. Must render inside a
486
+ * `<BowlosProvider>`; theme with `<BowlosTheme>`.
487
+ */
488
+ declare function BookingCatalog({ brandId, centerId, onSelect, labels, className }: BookingCatalogProps): react_jsx_runtime.JSX.Element;
489
+
415
490
  /**
416
491
  * Shared primitives for the `@bowlos/reservations/components` layer.
417
492
  *
@@ -427,4 +502,4 @@ declare function formatCents(cents: number): string;
427
502
  /** A min–max money range, collapsing to one value when they're equal. */
428
503
  declare function formatCentsRange(minCents: number, maxCents: number): string;
429
504
 
430
- export { AccountDashboard, type AccountDashboardLabels, type AccountDashboardProps, AccountMenu, type AccountMenuLabels, type AccountMenuProps, type AccountSection, AuthForm, AuthGate, type AuthGateLabels, type AuthGateProps, type AuthGateRenderContext, BOWLOS_DEFAULT_THEME, BookingFlow, type BookingFlowLabels, type BookingFlowProps, BowlosTheme, type BowlosThemeTokens, 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 };
505
+ 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, type CatalogOffer, 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 };
@@ -1,7 +1,8 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
2
  import { CSSProperties, ReactNode } from 'react';
3
- import { q as PricingMode, P as PaymentIntentInfo, o as Customer } from './data-DrM0D6Pi.js';
4
- import { c as UseAccountResult } from './react-Cb_NZCXa.js';
3
+ import { m as PricingMode, P as PaymentIntentInfo, k as Customer } from './data-lC-l-haz.js';
4
+ import { c as UseAccountResult } from './react-B3dlcklN.js';
5
+ import './errors-IIK7xibp.js';
5
6
 
6
7
  /**
7
8
  * Themeable design tokens for the `@bowlos/reservations/components` layer.
@@ -50,7 +51,10 @@ interface BookingFlowLabels {
50
51
  heading: string;
51
52
  date: string;
52
53
  start: string;
54
+ loadingTimes: string;
55
+ noTimes: string;
53
56
  quantity: string;
57
+ addonsHeading: string;
54
58
  name: string;
55
59
  email: string;
56
60
  hold: string;
@@ -96,7 +100,8 @@ interface BookingFlowProps {
96
100
  reservationId: string | null;
97
101
  reservationDisplayId: string | null;
98
102
  }) => void;
99
- /** Unit noun, e.g. lane/lanes (per_unit) or player/players (per_person). */
103
+ /** Inventory noun for the availability line, e.g. lane/lanes. The COUNT field
104
+ * label is derived from `pricingMode` (Lanes / Bowlers / Games). */
100
105
  unitLabel?: {
101
106
  singular: string;
102
107
  plural: string;
@@ -412,6 +417,76 @@ interface FlashSaleIndexProps {
412
417
  */
413
418
  declare function FlashSaleIndex({ brandId, onOpen, labels, className }: FlashSaleIndexProps): react_jsx_runtime.JSX.Element;
414
419
 
420
+ /** A selectable offer, tagged by kind so the consumer can route it. */
421
+ type CatalogOffer = {
422
+ kind: "product";
423
+ id: string;
424
+ name: string;
425
+ attractionName: string;
426
+ attractionTypeKey: string;
427
+ durationMinutes: number;
428
+ pricingMode: string;
429
+ } | {
430
+ kind: "event";
431
+ id: string;
432
+ name: string;
433
+ date: string;
434
+ description: string | null;
435
+ } | {
436
+ kind: "package";
437
+ id: string;
438
+ name: string;
439
+ priceCents: number;
440
+ description: string | null;
441
+ } | {
442
+ kind: "membership";
443
+ id: string;
444
+ name: string;
445
+ priceCents: number;
446
+ description: string | null;
447
+ } | {
448
+ kind: "gamecard";
449
+ id: string;
450
+ name: string;
451
+ priceCents: number;
452
+ description: string | null;
453
+ };
454
+ interface BookingCatalogLabels {
455
+ heading: string;
456
+ loading: string;
457
+ empty: string;
458
+ bowling: string;
459
+ otherAttractions: string;
460
+ events: string;
461
+ packages: string;
462
+ memberships: string;
463
+ gamePasses: string;
464
+ select: string;
465
+ minutesAbbrev: string;
466
+ perMonth: string;
467
+ }
468
+ interface BookingCatalogProps {
469
+ /** Brand (packages + game passes) and Center (products + events + memberships). */
470
+ brandId: string;
471
+ centerId: string;
472
+ /**
473
+ * Called when a customer picks an offer. Route by `offer.kind`: a `product`
474
+ * or `event` → your `<BookingFlow>` (preset the event's date); a `package` /
475
+ * `membership` / `gamecard` → its buy page.
476
+ */
477
+ onSelect: (offer: CatalogOffer) => void;
478
+ labels?: Partial<BookingCatalogLabels>;
479
+ className?: string;
480
+ }
481
+ /**
482
+ * The categorized catalog of everything a Center sells online — Bowling, Other
483
+ * attractions, Events, Packages, Memberships, Game passes — each offer under its
484
+ * heading. Picking one hands off via `onSelect`. No prices cross the wire for
485
+ * gated surfaces; this only lists public offers. Must render inside a
486
+ * `<BowlosProvider>`; theme with `<BowlosTheme>`.
487
+ */
488
+ declare function BookingCatalog({ brandId, centerId, onSelect, labels, className }: BookingCatalogProps): react_jsx_runtime.JSX.Element;
489
+
415
490
  /**
416
491
  * Shared primitives for the `@bowlos/reservations/components` layer.
417
492
  *
@@ -427,4 +502,4 @@ declare function formatCents(cents: number): string;
427
502
  /** A min–max money range, collapsing to one value when they're equal. */
428
503
  declare function formatCentsRange(minCents: number, maxCents: number): string;
429
504
 
430
- export { AccountDashboard, type AccountDashboardLabels, type AccountDashboardProps, AccountMenu, type AccountMenuLabels, type AccountMenuProps, type AccountSection, AuthForm, AuthGate, type AuthGateLabels, type AuthGateProps, type AuthGateRenderContext, BOWLOS_DEFAULT_THEME, BookingFlow, type BookingFlowLabels, type BookingFlowProps, BowlosTheme, type BowlosThemeTokens, 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 };
505
+ 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, type CatalogOffer, 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 };