@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.
- package/README.md +96 -9
- package/dist/catalog-kd07kri0.d.ts +74 -0
- package/dist/catalog-kdDjgvT1.d.cts +74 -0
- package/dist/{chunk-YICHFUAY.js → chunk-2X7MFQWY.js} +9 -3
- package/dist/chunk-2X7MFQWY.js.map +1 -0
- package/dist/{chunk-H42X4FRR.js → chunk-FPUWLOW3.js} +25 -4
- package/dist/chunk-FPUWLOW3.js.map +1 -0
- package/dist/chunk-Y3YSDO3H.js +221 -0
- package/dist/chunk-Y3YSDO3H.js.map +1 -0
- package/dist/components.cjs +366 -164
- package/dist/components.cjs.map +1 -1
- package/dist/components.d.cts +79 -4
- package/dist/components.d.ts +79 -4
- package/dist/components.js +340 -371
- package/dist/components.js.map +1 -1
- package/dist/{data-DrM0D6Pi.d.cts → data-lC-l-haz.d.cts} +33 -54
- package/dist/{data-DrM0D6Pi.d.ts → data-lC-l-haz.d.ts} +33 -54
- package/dist/errors-IIK7xibp.d.cts +54 -0
- package/dist/errors-IIK7xibp.d.ts +54 -0
- package/dist/index.cjs +34 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +4 -3
- package/dist/index.d.ts +4 -3
- package/dist/index.js +23 -3
- package/dist/index.js.map +1 -1
- package/dist/payments.cjs +245 -0
- package/dist/payments.cjs.map +1 -0
- package/dist/payments.d.cts +37 -0
- package/dist/payments.d.ts +37 -0
- package/dist/payments.js +83 -0
- package/dist/payments.js.map +1 -0
- package/dist/{react-7ruEsubp.d.cts → react-B3dlcklN.d.ts} +2 -1
- package/dist/{react-Cb_NZCXa.d.ts → react-aZplAyHS.d.cts} +2 -1
- package/dist/react.cjs +28 -0
- package/dist/react.cjs.map +1 -1
- package/dist/react.d.cts +22 -5
- package/dist/react.d.ts +22 -5
- package/dist/react.js +2 -2
- package/package.json +20 -2
- package/templates/center-site/README.md +8 -7
- package/templates/center-site/app/book/page.tsx +33 -25
- package/templates/center-site/app/buy/page.tsx +36 -0
- package/templates/center-site/app/catalog/page.tsx +35 -0
- package/templates/center-site/app/site-header.tsx +1 -1
- package/templates/center-site/package.json +1 -1
- package/dist/account-BRapzoNI.d.cts +0 -46
- package/dist/account-VO6BzPNK.d.ts +0 -46
- package/dist/chunk-H42X4FRR.js.map +0 -1
- package/dist/chunk-YICHFUAY.js.map +0 -1
- package/templates/center-site/app/book/checkout-form.tsx +0 -85
package/dist/components.d.cts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
2
|
import { CSSProperties, ReactNode } from 'react';
|
|
3
|
-
import {
|
|
4
|
-
import { c as UseAccountResult } from './react-
|
|
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
|
-
/**
|
|
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 };
|
package/dist/components.d.ts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
2
|
import { CSSProperties, ReactNode } from 'react';
|
|
3
|
-
import {
|
|
4
|
-
import { c as UseAccountResult } from './react-
|
|
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
|
-
/**
|
|
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 };
|