@seatlayer/core 0.1.3 → 0.2.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/{de-Y3E6YTGP.js → de-YMAVF5S2.js} +5 -2
- package/dist/de-YMAVF5S2.js.map +1 -0
- package/dist/{es-UM4ZS357.js → es-MLM3IFIY.js} +5 -2
- package/dist/es-MLM3IFIY.js.map +1 -0
- package/dist/{fr-IGRD2M4W.js → fr-N7AAVATM.js} +5 -2
- package/dist/fr-N7AAVATM.js.map +1 -0
- package/dist/index.cjs +255 -24
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +88 -5
- package/dist/index.d.ts +88 -5
- package/dist/index.js +240 -24
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/dist/de-Y3E6YTGP.js.map +0 -1
- package/dist/es-UM4ZS357.js.map +0 -1
- package/dist/fr-IGRD2M4W.js.map +0 -1
package/dist/index.d.cts
CHANGED
|
@@ -425,6 +425,12 @@ interface ISeatmapRenderer {
|
|
|
425
425
|
setCategoryHighlight?(key: string | null): void;
|
|
426
426
|
/** Dim the seats of these section/zone ids (organizer manager: held-back inventory). */
|
|
427
427
|
setDimmedSections?(ids: string[] | null): void;
|
|
428
|
+
/**
|
|
429
|
+
* Colorblind-safe mode: category hues switch to an Okabe-Ito palette and
|
|
430
|
+
* booked seats render hollow (a non-color cue), so seat state never relies
|
|
431
|
+
* on hue alone. Off (the default) renders exactly as before.
|
|
432
|
+
*/
|
|
433
|
+
setColorblindSafe?(on: boolean): void;
|
|
428
434
|
/**
|
|
429
435
|
* Switch the projection. `'flat'` = normal top-down; `'isometric'` = the "3D"
|
|
430
436
|
* view (affine skew/rotate + elevation lift), hit-testing preserved in screen
|
|
@@ -541,6 +547,14 @@ declare function chartBounds(doc: ChartDoc): {
|
|
|
541
547
|
height: number;
|
|
542
548
|
};
|
|
543
549
|
|
|
550
|
+
declare const MAX_GA_CAPACITY = 100000;
|
|
551
|
+
declare const MAX_EVENT_INVENTORY = 100000;
|
|
552
|
+
/** Stable internal inventory label for one unit of a GA area's capacity. */
|
|
553
|
+
declare function gaUnitLabel(areaId: string, index: number): string;
|
|
554
|
+
declare function gaUnitLabels(area: GAAreaObject): string[];
|
|
555
|
+
declare function gaAreasOf(doc: ChartDoc): GAAreaObject[];
|
|
556
|
+
declare function isGaUnitLabel(label: string): boolean;
|
|
557
|
+
|
|
544
558
|
/**
|
|
545
559
|
* Section membership + hide/show resolution (Batch 3.3).
|
|
546
560
|
*
|
|
@@ -645,6 +659,10 @@ declare class SeatmapRenderer implements ISeatmapRenderer {
|
|
|
645
659
|
private statusById;
|
|
646
660
|
private catColor;
|
|
647
661
|
private theme;
|
|
662
|
+
/** Colorblind-safe mode (Okabe-Ito hues + hollow booked seats). */
|
|
663
|
+
private colorblind;
|
|
664
|
+
/** Category order from the doc — the stable index into the CB palette. */
|
|
665
|
+
private catOrder;
|
|
648
666
|
private selection;
|
|
649
667
|
private selectionRings;
|
|
650
668
|
private hoverRing;
|
|
@@ -797,8 +815,15 @@ declare class SeatmapRenderer implements ISeatmapRenderer {
|
|
|
797
815
|
private renderSeats;
|
|
798
816
|
/** A booth renders as a click-selectable rounded block (dims from the doc). */
|
|
799
817
|
private renderBoothUnit;
|
|
818
|
+
/** The category's display color — Okabe-Ito hue when colorblind-safe is on. */
|
|
819
|
+
private seatBaseColor;
|
|
800
820
|
/** Apply fill/stroke/opacity for a seat's current status + selection. */
|
|
801
821
|
private paintSeat;
|
|
822
|
+
/**
|
|
823
|
+
* Colorblind-safe mode: swap category hues for the Okabe-Ito palette and
|
|
824
|
+
* render booked seats hollow. Off restores the exact default rendering.
|
|
825
|
+
*/
|
|
826
|
+
setColorblindSafe(on: boolean): void;
|
|
802
827
|
/**
|
|
803
828
|
* Dim the seats of these section/zone ids (organizer manager use) so held-back
|
|
804
829
|
* inventory is visually distinct on the canvas without hiding it. `null`/empty
|
|
@@ -930,7 +955,7 @@ interface PickerSeat {
|
|
|
930
955
|
}
|
|
931
956
|
interface HoldConflict {
|
|
932
957
|
label: string;
|
|
933
|
-
|
|
958
|
+
status: string;
|
|
934
959
|
}
|
|
935
960
|
/** An open hold — its id, the labels it covers, and the server's expiry time (ms epoch). */
|
|
936
961
|
interface HoldInfo {
|
|
@@ -939,6 +964,8 @@ interface HoldInfo {
|
|
|
939
964
|
expiresAt: number;
|
|
940
965
|
/** The held seats with their chosen ticket tier — what the host books against. */
|
|
941
966
|
seats: PickerSeat[];
|
|
967
|
+
/** Server-authoritative commercial line items, including GA units and resolved prices. */
|
|
968
|
+
items?: HoldServerItem[];
|
|
942
969
|
}
|
|
943
970
|
/** One category's slice of a section (dot + price + count) for the summary card. */
|
|
944
971
|
interface SectionCategory {
|
|
@@ -970,6 +997,21 @@ interface SectionSummary {
|
|
|
970
997
|
interface HoldResponse {
|
|
971
998
|
holdId: string;
|
|
972
999
|
expiresAt: number;
|
|
1000
|
+
items?: HoldServerItem[];
|
|
1001
|
+
}
|
|
1002
|
+
interface HoldServerItem {
|
|
1003
|
+
label: string;
|
|
1004
|
+
objectId: string;
|
|
1005
|
+
objectType: 'seat' | 'booth' | 'ga';
|
|
1006
|
+
categoryKey: string;
|
|
1007
|
+
tierId: string | null;
|
|
1008
|
+
unitPrice: number;
|
|
1009
|
+
currency: string;
|
|
1010
|
+
quantity?: number;
|
|
1011
|
+
}
|
|
1012
|
+
interface HoldSelectionRequest {
|
|
1013
|
+
label: string;
|
|
1014
|
+
tierId?: string | null;
|
|
973
1015
|
}
|
|
974
1016
|
interface BestAvailableResponse extends HoldResponse {
|
|
975
1017
|
labels: string[];
|
|
@@ -985,13 +1027,14 @@ interface PickerTransport {
|
|
|
985
1027
|
venue?: string | null;
|
|
986
1028
|
startsAt?: number | null;
|
|
987
1029
|
currency?: string;
|
|
1030
|
+
mode?: string;
|
|
988
1031
|
};
|
|
989
1032
|
}>;
|
|
990
1033
|
objects(key: string): Promise<{
|
|
991
1034
|
seats: Record<string, string>;
|
|
992
1035
|
hidden?: string[];
|
|
993
1036
|
}>;
|
|
994
|
-
hold(key: string,
|
|
1037
|
+
hold(key: string, selections: HoldSelectionRequest[], ttlMs?: number, replaceHoldId?: string): Promise<HoldResponse>;
|
|
995
1038
|
bestAvailable(key: string, qty: number, categoryKey?: string): Promise<BestAvailableResponse>;
|
|
996
1039
|
release(key: string, labels: string[], holdId: string): Promise<unknown>;
|
|
997
1040
|
/** Optional — the SDK omits booking (it hands the holdId to the host page). */
|
|
@@ -1019,6 +1062,12 @@ interface PickerCallbacks extends RendererCallbacks {
|
|
|
1019
1062
|
onSectionFocus?: (summary: SectionSummary | null) => void;
|
|
1020
1063
|
/** A deck was tapped in the 3D all-floors overview — host enters that floor in 2D. */
|
|
1021
1064
|
onDeckTap?: (floorId: string) => void;
|
|
1065
|
+
/**
|
|
1066
|
+
* Non-blocking selection advice (localized): currently the orphan-seat hint —
|
|
1067
|
+
* the selection would strand a single free seat between unavailable
|
|
1068
|
+
* neighbors. `null` clears a previously shown hint. Never prevents anything.
|
|
1069
|
+
*/
|
|
1070
|
+
onHint?: (message: string | null) => void;
|
|
1022
1071
|
onError?: (err: unknown) => void;
|
|
1023
1072
|
}
|
|
1024
1073
|
interface PickerOptions extends PickerCallbacks {
|
|
@@ -1031,6 +1080,8 @@ interface PickerOptions extends PickerCallbacks {
|
|
|
1031
1080
|
currency?: string;
|
|
1032
1081
|
/** Flash a pulse when a seat we didn't touch goes free→taken (live-activity cue). */
|
|
1033
1082
|
flashOnLiveChange?: boolean;
|
|
1083
|
+
/** Start in colorblind-safe rendering (Okabe-Ito hues + hollow booked seats). */
|
|
1084
|
+
colorblindSafe?: boolean;
|
|
1034
1085
|
}
|
|
1035
1086
|
declare class PickerController {
|
|
1036
1087
|
private readonly opts;
|
|
@@ -1054,6 +1105,8 @@ declare class PickerController {
|
|
|
1054
1105
|
private attempt;
|
|
1055
1106
|
private closed;
|
|
1056
1107
|
private hold_;
|
|
1108
|
+
private liveStatuses;
|
|
1109
|
+
private currency;
|
|
1057
1110
|
private expiryTimer;
|
|
1058
1111
|
constructor(options: PickerOptions);
|
|
1059
1112
|
get doc(): ChartDoc | null;
|
|
@@ -1073,6 +1126,8 @@ declare class PickerController {
|
|
|
1073
1126
|
venue?: string | null;
|
|
1074
1127
|
startsAt?: number | null;
|
|
1075
1128
|
currency?: string;
|
|
1129
|
+
/** 'test' ⇒ sandbox event (hosts show a TEST MODE ribbon). */
|
|
1130
|
+
mode?: string;
|
|
1076
1131
|
} | null>;
|
|
1077
1132
|
getSelection(): PickerSeat[];
|
|
1078
1133
|
clearSelection(): void;
|
|
@@ -1083,7 +1138,23 @@ declare class PickerController {
|
|
|
1083
1138
|
* re-throws so the caller can choose the banner copy. Returns null only when
|
|
1084
1139
|
* there's nothing to hold.
|
|
1085
1140
|
*/
|
|
1086
|
-
hold(labelsArg?: string[]): Promise<HoldInfo | null>;
|
|
1141
|
+
hold(labelsArg?: string[], ttlMs?: number): Promise<HoldInfo | null>;
|
|
1142
|
+
/** Public GA inventory derived from the live synthetic-unit status stream. */
|
|
1143
|
+
getGAAreas(): {
|
|
1144
|
+
id: string;
|
|
1145
|
+
label: string;
|
|
1146
|
+
capacity: number;
|
|
1147
|
+
available: number;
|
|
1148
|
+
categoryKey: string;
|
|
1149
|
+
price: number;
|
|
1150
|
+
currency: string;
|
|
1151
|
+
tiers?: CategoryTier[];
|
|
1152
|
+
}[];
|
|
1153
|
+
/** Select a quantity from one GA area and hold it atomically. */
|
|
1154
|
+
holdGA(areaId: string, qty: number, options?: {
|
|
1155
|
+
tierId?: string | null;
|
|
1156
|
+
ttlMs?: number;
|
|
1157
|
+
}): Promise<HoldInfo | null>;
|
|
1087
1158
|
/** Server-picks `qty` best free seats and holds them atomically. Throws on failure. */
|
|
1088
1159
|
bestAvailable(qty: number, categoryKey?: string): Promise<HoldInfo | null>;
|
|
1089
1160
|
/**
|
|
@@ -1162,14 +1233,26 @@ declare class PickerController {
|
|
|
1162
1233
|
/** PickerSeats (with chosen tier) for a set of held labels. */
|
|
1163
1234
|
private seatsForLabels;
|
|
1164
1235
|
private emitSelectionChange;
|
|
1236
|
+
/** Whether the last emitted hint was non-null (avoids clearing repeatedly). */
|
|
1237
|
+
private hintShown;
|
|
1238
|
+
/**
|
|
1239
|
+
* Orphan-seat advice on manual selection: when the buyer's current picks
|
|
1240
|
+
* strand one (or more) single free seats between unavailable same-row
|
|
1241
|
+
* neighbors, surface a localized, non-blocking hint. Cleared (null) as soon
|
|
1242
|
+
* as the selection stops stranding anyone.
|
|
1243
|
+
*/
|
|
1244
|
+
private emitOrphanHint;
|
|
1245
|
+
/** Toggle colorblind-safe rendering at runtime (see PickerOptions.colorblindSafe). */
|
|
1246
|
+
setColorblindSafe(on: boolean): void;
|
|
1165
1247
|
private emitError;
|
|
1166
1248
|
private holdCovers;
|
|
1167
1249
|
private handle409Conflicts;
|
|
1168
1250
|
/** Set the open hold + (re)arm the server-authoritative expiry timer. */
|
|
1169
1251
|
private setHold;
|
|
1170
1252
|
private clearHold;
|
|
1171
|
-
private
|
|
1253
|
+
private expireActiveHold;
|
|
1172
1254
|
private applySeatsMap;
|
|
1255
|
+
private clearBookedHoldIfSettled;
|
|
1173
1256
|
private resnapshot;
|
|
1174
1257
|
private connect;
|
|
1175
1258
|
private scheduleReconnect;
|
|
@@ -1247,4 +1330,4 @@ declare function formatMoney(amount: number, currency?: string, fractionDigits?:
|
|
|
1247
1330
|
/** Bare symbol for input adornments ("€", "$", "₹"). */
|
|
1248
1331
|
declare function currencySymbol(currency?: string): string;
|
|
1249
1332
|
|
|
1250
|
-
export { ACCESSIBILITY_TYPES, type AccessibilityMeta, type AccessibilityType, type AvailabilityRule, type BoothObject, CHART_STORAGE_KEY, type Category, type CategoryTier, type ChartDoc, type ChartObject, type ChartTheme, DEFAULT_CURRENCY, type Dict, type ExpandedSeat, type Floor, type GAAreaObject, type HoldConflict, type HoldInfo, type ISeatmapRenderer, type Locale, type LodRung, type PickerCallbacks, PickerController, type PickerOptions, type PickerSeat, type PickerTransport, type Point, type RendererCallbacks, type RendererOptions, type RowObject, type RowSeatSlot, SUPPORTED_LOCALES, type SeatOverride, type SeatStatus, SeatmapRenderer, type SectionCategory, type SectionNode, type SectionObject, type SectionSummary, type SelectionLayer, type ShapeObject, type TableObject, type TextObject, UNGROUPED_ID, type ZoneDef, accessibilityMeta, allObjects, applyHidden, chartBounds, computeSections, createRenderer, currencySymbol, expandBooth, expandChart, expandRow, expandRowSlots, expandTable, floorObjects, floorsOf, formatDate, formatMoney, getLocale, hiddenObjectIds, isSectionHidden, layerOf, loadLocale, objectCenter, pointInPolygon, resolveLocale, setLocale, setMoneyLocale, setStringOverrides, stackFloors, t, tCount };
|
|
1333
|
+
export { ACCESSIBILITY_TYPES, type AccessibilityMeta, type AccessibilityType, type AvailabilityRule, type BoothObject, CHART_STORAGE_KEY, type Category, type CategoryTier, type ChartDoc, type ChartObject, type ChartTheme, DEFAULT_CURRENCY, type Dict, type ExpandedSeat, type Floor, type GAAreaObject, type HoldConflict, type HoldInfo, type HoldSelectionRequest, type HoldServerItem, type ISeatmapRenderer, type Locale, type LodRung, MAX_EVENT_INVENTORY, MAX_GA_CAPACITY, type PickerCallbacks, PickerController, type PickerOptions, type PickerSeat, type PickerTransport, type Point, type RendererCallbacks, type RendererOptions, type RowObject, type RowSeatSlot, SUPPORTED_LOCALES, type SeatOverride, type SeatStatus, SeatmapRenderer, type SectionCategory, type SectionNode, type SectionObject, type SectionSummary, type SelectionLayer, type ShapeObject, type TableObject, type TextObject, UNGROUPED_ID, type ZoneDef, accessibilityMeta, allObjects, applyHidden, chartBounds, computeSections, createRenderer, currencySymbol, expandBooth, expandChart, expandRow, expandRowSlots, expandTable, floorObjects, floorsOf, formatDate, formatMoney, gaAreasOf, gaUnitLabel, gaUnitLabels, getLocale, hiddenObjectIds, isGaUnitLabel, isSectionHidden, layerOf, loadLocale, objectCenter, pointInPolygon, resolveLocale, setLocale, setMoneyLocale, setStringOverrides, stackFloors, t, tCount };
|
package/dist/index.d.ts
CHANGED
|
@@ -425,6 +425,12 @@ interface ISeatmapRenderer {
|
|
|
425
425
|
setCategoryHighlight?(key: string | null): void;
|
|
426
426
|
/** Dim the seats of these section/zone ids (organizer manager: held-back inventory). */
|
|
427
427
|
setDimmedSections?(ids: string[] | null): void;
|
|
428
|
+
/**
|
|
429
|
+
* Colorblind-safe mode: category hues switch to an Okabe-Ito palette and
|
|
430
|
+
* booked seats render hollow (a non-color cue), so seat state never relies
|
|
431
|
+
* on hue alone. Off (the default) renders exactly as before.
|
|
432
|
+
*/
|
|
433
|
+
setColorblindSafe?(on: boolean): void;
|
|
428
434
|
/**
|
|
429
435
|
* Switch the projection. `'flat'` = normal top-down; `'isometric'` = the "3D"
|
|
430
436
|
* view (affine skew/rotate + elevation lift), hit-testing preserved in screen
|
|
@@ -541,6 +547,14 @@ declare function chartBounds(doc: ChartDoc): {
|
|
|
541
547
|
height: number;
|
|
542
548
|
};
|
|
543
549
|
|
|
550
|
+
declare const MAX_GA_CAPACITY = 100000;
|
|
551
|
+
declare const MAX_EVENT_INVENTORY = 100000;
|
|
552
|
+
/** Stable internal inventory label for one unit of a GA area's capacity. */
|
|
553
|
+
declare function gaUnitLabel(areaId: string, index: number): string;
|
|
554
|
+
declare function gaUnitLabels(area: GAAreaObject): string[];
|
|
555
|
+
declare function gaAreasOf(doc: ChartDoc): GAAreaObject[];
|
|
556
|
+
declare function isGaUnitLabel(label: string): boolean;
|
|
557
|
+
|
|
544
558
|
/**
|
|
545
559
|
* Section membership + hide/show resolution (Batch 3.3).
|
|
546
560
|
*
|
|
@@ -645,6 +659,10 @@ declare class SeatmapRenderer implements ISeatmapRenderer {
|
|
|
645
659
|
private statusById;
|
|
646
660
|
private catColor;
|
|
647
661
|
private theme;
|
|
662
|
+
/** Colorblind-safe mode (Okabe-Ito hues + hollow booked seats). */
|
|
663
|
+
private colorblind;
|
|
664
|
+
/** Category order from the doc — the stable index into the CB palette. */
|
|
665
|
+
private catOrder;
|
|
648
666
|
private selection;
|
|
649
667
|
private selectionRings;
|
|
650
668
|
private hoverRing;
|
|
@@ -797,8 +815,15 @@ declare class SeatmapRenderer implements ISeatmapRenderer {
|
|
|
797
815
|
private renderSeats;
|
|
798
816
|
/** A booth renders as a click-selectable rounded block (dims from the doc). */
|
|
799
817
|
private renderBoothUnit;
|
|
818
|
+
/** The category's display color — Okabe-Ito hue when colorblind-safe is on. */
|
|
819
|
+
private seatBaseColor;
|
|
800
820
|
/** Apply fill/stroke/opacity for a seat's current status + selection. */
|
|
801
821
|
private paintSeat;
|
|
822
|
+
/**
|
|
823
|
+
* Colorblind-safe mode: swap category hues for the Okabe-Ito palette and
|
|
824
|
+
* render booked seats hollow. Off restores the exact default rendering.
|
|
825
|
+
*/
|
|
826
|
+
setColorblindSafe(on: boolean): void;
|
|
802
827
|
/**
|
|
803
828
|
* Dim the seats of these section/zone ids (organizer manager use) so held-back
|
|
804
829
|
* inventory is visually distinct on the canvas without hiding it. `null`/empty
|
|
@@ -930,7 +955,7 @@ interface PickerSeat {
|
|
|
930
955
|
}
|
|
931
956
|
interface HoldConflict {
|
|
932
957
|
label: string;
|
|
933
|
-
|
|
958
|
+
status: string;
|
|
934
959
|
}
|
|
935
960
|
/** An open hold — its id, the labels it covers, and the server's expiry time (ms epoch). */
|
|
936
961
|
interface HoldInfo {
|
|
@@ -939,6 +964,8 @@ interface HoldInfo {
|
|
|
939
964
|
expiresAt: number;
|
|
940
965
|
/** The held seats with their chosen ticket tier — what the host books against. */
|
|
941
966
|
seats: PickerSeat[];
|
|
967
|
+
/** Server-authoritative commercial line items, including GA units and resolved prices. */
|
|
968
|
+
items?: HoldServerItem[];
|
|
942
969
|
}
|
|
943
970
|
/** One category's slice of a section (dot + price + count) for the summary card. */
|
|
944
971
|
interface SectionCategory {
|
|
@@ -970,6 +997,21 @@ interface SectionSummary {
|
|
|
970
997
|
interface HoldResponse {
|
|
971
998
|
holdId: string;
|
|
972
999
|
expiresAt: number;
|
|
1000
|
+
items?: HoldServerItem[];
|
|
1001
|
+
}
|
|
1002
|
+
interface HoldServerItem {
|
|
1003
|
+
label: string;
|
|
1004
|
+
objectId: string;
|
|
1005
|
+
objectType: 'seat' | 'booth' | 'ga';
|
|
1006
|
+
categoryKey: string;
|
|
1007
|
+
tierId: string | null;
|
|
1008
|
+
unitPrice: number;
|
|
1009
|
+
currency: string;
|
|
1010
|
+
quantity?: number;
|
|
1011
|
+
}
|
|
1012
|
+
interface HoldSelectionRequest {
|
|
1013
|
+
label: string;
|
|
1014
|
+
tierId?: string | null;
|
|
973
1015
|
}
|
|
974
1016
|
interface BestAvailableResponse extends HoldResponse {
|
|
975
1017
|
labels: string[];
|
|
@@ -985,13 +1027,14 @@ interface PickerTransport {
|
|
|
985
1027
|
venue?: string | null;
|
|
986
1028
|
startsAt?: number | null;
|
|
987
1029
|
currency?: string;
|
|
1030
|
+
mode?: string;
|
|
988
1031
|
};
|
|
989
1032
|
}>;
|
|
990
1033
|
objects(key: string): Promise<{
|
|
991
1034
|
seats: Record<string, string>;
|
|
992
1035
|
hidden?: string[];
|
|
993
1036
|
}>;
|
|
994
|
-
hold(key: string,
|
|
1037
|
+
hold(key: string, selections: HoldSelectionRequest[], ttlMs?: number, replaceHoldId?: string): Promise<HoldResponse>;
|
|
995
1038
|
bestAvailable(key: string, qty: number, categoryKey?: string): Promise<BestAvailableResponse>;
|
|
996
1039
|
release(key: string, labels: string[], holdId: string): Promise<unknown>;
|
|
997
1040
|
/** Optional — the SDK omits booking (it hands the holdId to the host page). */
|
|
@@ -1019,6 +1062,12 @@ interface PickerCallbacks extends RendererCallbacks {
|
|
|
1019
1062
|
onSectionFocus?: (summary: SectionSummary | null) => void;
|
|
1020
1063
|
/** A deck was tapped in the 3D all-floors overview — host enters that floor in 2D. */
|
|
1021
1064
|
onDeckTap?: (floorId: string) => void;
|
|
1065
|
+
/**
|
|
1066
|
+
* Non-blocking selection advice (localized): currently the orphan-seat hint —
|
|
1067
|
+
* the selection would strand a single free seat between unavailable
|
|
1068
|
+
* neighbors. `null` clears a previously shown hint. Never prevents anything.
|
|
1069
|
+
*/
|
|
1070
|
+
onHint?: (message: string | null) => void;
|
|
1022
1071
|
onError?: (err: unknown) => void;
|
|
1023
1072
|
}
|
|
1024
1073
|
interface PickerOptions extends PickerCallbacks {
|
|
@@ -1031,6 +1080,8 @@ interface PickerOptions extends PickerCallbacks {
|
|
|
1031
1080
|
currency?: string;
|
|
1032
1081
|
/** Flash a pulse when a seat we didn't touch goes free→taken (live-activity cue). */
|
|
1033
1082
|
flashOnLiveChange?: boolean;
|
|
1083
|
+
/** Start in colorblind-safe rendering (Okabe-Ito hues + hollow booked seats). */
|
|
1084
|
+
colorblindSafe?: boolean;
|
|
1034
1085
|
}
|
|
1035
1086
|
declare class PickerController {
|
|
1036
1087
|
private readonly opts;
|
|
@@ -1054,6 +1105,8 @@ declare class PickerController {
|
|
|
1054
1105
|
private attempt;
|
|
1055
1106
|
private closed;
|
|
1056
1107
|
private hold_;
|
|
1108
|
+
private liveStatuses;
|
|
1109
|
+
private currency;
|
|
1057
1110
|
private expiryTimer;
|
|
1058
1111
|
constructor(options: PickerOptions);
|
|
1059
1112
|
get doc(): ChartDoc | null;
|
|
@@ -1073,6 +1126,8 @@ declare class PickerController {
|
|
|
1073
1126
|
venue?: string | null;
|
|
1074
1127
|
startsAt?: number | null;
|
|
1075
1128
|
currency?: string;
|
|
1129
|
+
/** 'test' ⇒ sandbox event (hosts show a TEST MODE ribbon). */
|
|
1130
|
+
mode?: string;
|
|
1076
1131
|
} | null>;
|
|
1077
1132
|
getSelection(): PickerSeat[];
|
|
1078
1133
|
clearSelection(): void;
|
|
@@ -1083,7 +1138,23 @@ declare class PickerController {
|
|
|
1083
1138
|
* re-throws so the caller can choose the banner copy. Returns null only when
|
|
1084
1139
|
* there's nothing to hold.
|
|
1085
1140
|
*/
|
|
1086
|
-
hold(labelsArg?: string[]): Promise<HoldInfo | null>;
|
|
1141
|
+
hold(labelsArg?: string[], ttlMs?: number): Promise<HoldInfo | null>;
|
|
1142
|
+
/** Public GA inventory derived from the live synthetic-unit status stream. */
|
|
1143
|
+
getGAAreas(): {
|
|
1144
|
+
id: string;
|
|
1145
|
+
label: string;
|
|
1146
|
+
capacity: number;
|
|
1147
|
+
available: number;
|
|
1148
|
+
categoryKey: string;
|
|
1149
|
+
price: number;
|
|
1150
|
+
currency: string;
|
|
1151
|
+
tiers?: CategoryTier[];
|
|
1152
|
+
}[];
|
|
1153
|
+
/** Select a quantity from one GA area and hold it atomically. */
|
|
1154
|
+
holdGA(areaId: string, qty: number, options?: {
|
|
1155
|
+
tierId?: string | null;
|
|
1156
|
+
ttlMs?: number;
|
|
1157
|
+
}): Promise<HoldInfo | null>;
|
|
1087
1158
|
/** Server-picks `qty` best free seats and holds them atomically. Throws on failure. */
|
|
1088
1159
|
bestAvailable(qty: number, categoryKey?: string): Promise<HoldInfo | null>;
|
|
1089
1160
|
/**
|
|
@@ -1162,14 +1233,26 @@ declare class PickerController {
|
|
|
1162
1233
|
/** PickerSeats (with chosen tier) for a set of held labels. */
|
|
1163
1234
|
private seatsForLabels;
|
|
1164
1235
|
private emitSelectionChange;
|
|
1236
|
+
/** Whether the last emitted hint was non-null (avoids clearing repeatedly). */
|
|
1237
|
+
private hintShown;
|
|
1238
|
+
/**
|
|
1239
|
+
* Orphan-seat advice on manual selection: when the buyer's current picks
|
|
1240
|
+
* strand one (or more) single free seats between unavailable same-row
|
|
1241
|
+
* neighbors, surface a localized, non-blocking hint. Cleared (null) as soon
|
|
1242
|
+
* as the selection stops stranding anyone.
|
|
1243
|
+
*/
|
|
1244
|
+
private emitOrphanHint;
|
|
1245
|
+
/** Toggle colorblind-safe rendering at runtime (see PickerOptions.colorblindSafe). */
|
|
1246
|
+
setColorblindSafe(on: boolean): void;
|
|
1165
1247
|
private emitError;
|
|
1166
1248
|
private holdCovers;
|
|
1167
1249
|
private handle409Conflicts;
|
|
1168
1250
|
/** Set the open hold + (re)arm the server-authoritative expiry timer. */
|
|
1169
1251
|
private setHold;
|
|
1170
1252
|
private clearHold;
|
|
1171
|
-
private
|
|
1253
|
+
private expireActiveHold;
|
|
1172
1254
|
private applySeatsMap;
|
|
1255
|
+
private clearBookedHoldIfSettled;
|
|
1173
1256
|
private resnapshot;
|
|
1174
1257
|
private connect;
|
|
1175
1258
|
private scheduleReconnect;
|
|
@@ -1247,4 +1330,4 @@ declare function formatMoney(amount: number, currency?: string, fractionDigits?:
|
|
|
1247
1330
|
/** Bare symbol for input adornments ("€", "$", "₹"). */
|
|
1248
1331
|
declare function currencySymbol(currency?: string): string;
|
|
1249
1332
|
|
|
1250
|
-
export { ACCESSIBILITY_TYPES, type AccessibilityMeta, type AccessibilityType, type AvailabilityRule, type BoothObject, CHART_STORAGE_KEY, type Category, type CategoryTier, type ChartDoc, type ChartObject, type ChartTheme, DEFAULT_CURRENCY, type Dict, type ExpandedSeat, type Floor, type GAAreaObject, type HoldConflict, type HoldInfo, type ISeatmapRenderer, type Locale, type LodRung, type PickerCallbacks, PickerController, type PickerOptions, type PickerSeat, type PickerTransport, type Point, type RendererCallbacks, type RendererOptions, type RowObject, type RowSeatSlot, SUPPORTED_LOCALES, type SeatOverride, type SeatStatus, SeatmapRenderer, type SectionCategory, type SectionNode, type SectionObject, type SectionSummary, type SelectionLayer, type ShapeObject, type TableObject, type TextObject, UNGROUPED_ID, type ZoneDef, accessibilityMeta, allObjects, applyHidden, chartBounds, computeSections, createRenderer, currencySymbol, expandBooth, expandChart, expandRow, expandRowSlots, expandTable, floorObjects, floorsOf, formatDate, formatMoney, getLocale, hiddenObjectIds, isSectionHidden, layerOf, loadLocale, objectCenter, pointInPolygon, resolveLocale, setLocale, setMoneyLocale, setStringOverrides, stackFloors, t, tCount };
|
|
1333
|
+
export { ACCESSIBILITY_TYPES, type AccessibilityMeta, type AccessibilityType, type AvailabilityRule, type BoothObject, CHART_STORAGE_KEY, type Category, type CategoryTier, type ChartDoc, type ChartObject, type ChartTheme, DEFAULT_CURRENCY, type Dict, type ExpandedSeat, type Floor, type GAAreaObject, type HoldConflict, type HoldInfo, type HoldSelectionRequest, type HoldServerItem, type ISeatmapRenderer, type Locale, type LodRung, MAX_EVENT_INVENTORY, MAX_GA_CAPACITY, type PickerCallbacks, PickerController, type PickerOptions, type PickerSeat, type PickerTransport, type Point, type RendererCallbacks, type RendererOptions, type RowObject, type RowSeatSlot, SUPPORTED_LOCALES, type SeatOverride, type SeatStatus, SeatmapRenderer, type SectionCategory, type SectionNode, type SectionObject, type SectionSummary, type SelectionLayer, type ShapeObject, type TableObject, type TextObject, UNGROUPED_ID, type ZoneDef, accessibilityMeta, allObjects, applyHidden, chartBounds, computeSections, createRenderer, currencySymbol, expandBooth, expandChart, expandRow, expandRowSlots, expandTable, floorObjects, floorsOf, formatDate, formatMoney, gaAreasOf, gaUnitLabel, gaUnitLabels, getLocale, hiddenObjectIds, isGaUnitLabel, isSectionHidden, layerOf, loadLocale, objectCenter, pointInPolygon, resolveLocale, setLocale, setMoneyLocale, setStringOverrides, stackFloors, t, tCount };
|