@seatlayer/core 0.21.0 → 0.22.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-HLJXYBWA.js → de-KPTY7UOT.js} +6 -2
- package/dist/{de-HLJXYBWA.js.map → de-KPTY7UOT.js.map} +1 -1
- package/dist/{es-LDI3FESI.js → es-ALPR5FBB.js} +6 -2
- package/dist/{es-LDI3FESI.js.map → es-ALPR5FBB.js.map} +1 -1
- package/dist/{fr-H4KTK4F5.js → fr-HVQLQD2N.js} +6 -2
- package/dist/{fr-H4KTK4F5.js.map → fr-HVQLQD2N.js.map} +1 -1
- package/dist/index.cjs +67 -9
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +26 -6
- package/dist/index.d.ts +26 -6
- package/dist/index.js +48 -7
- package/dist/index.js.map +1 -1
- package/package.json +9 -4
package/dist/index.d.cts
CHANGED
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
* SeatMap chart document — the single source of truth shared by the
|
|
3
3
|
* Designer (authoring) and the Renderer (buyer picker).
|
|
4
4
|
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
5
|
+
* Coordinates are abstract units (roughly "pixels at scale 1"); the renderer
|
|
6
|
+
* fits the chart to its container.
|
|
7
7
|
* Rows are PARAMETRIC (origin + count + spacing + curve + rotation) — never
|
|
8
8
|
* store per-seat coordinates in the document; expansion happens in layout.ts.
|
|
9
9
|
*/
|
|
@@ -499,7 +499,7 @@ interface ZoneDef {
|
|
|
499
499
|
* Fixed set of four; derived from object type via `layerOf()` (no per-object field yet).
|
|
500
500
|
*/
|
|
501
501
|
type SelectionLayer = 'interactive' | 'background' | 'foreground' | 'surroundings';
|
|
502
|
-
/** Derive an object's selection layer from its type
|
|
502
|
+
/** Derive an object's selection layer from its type. */
|
|
503
503
|
declare function layerOf(obj: ChartObject): SelectionLayer;
|
|
504
504
|
/** Free-standing text on the chart (aisle names, door labels…). */
|
|
505
505
|
interface TextObject {
|
|
@@ -1275,6 +1275,9 @@ declare class SeatmapRenderer implements ISeatmapRenderer {
|
|
|
1275
1275
|
private categoryHighlight;
|
|
1276
1276
|
/** Price-band filter (F4): dim free seats whose category is NOT in this set. */
|
|
1277
1277
|
private categoryFilter;
|
|
1278
|
+
/** Commercial "hide limited-view seats" toggle: dim free seats flagged
|
|
1279
|
+
* restrictedView/obstructedView. Parallel to the accessibility filter. */
|
|
1280
|
+
private commercialLimitedFilter;
|
|
1278
1281
|
private sections;
|
|
1279
1282
|
private zones;
|
|
1280
1283
|
private seatSection;
|
|
@@ -1433,6 +1436,12 @@ declare class SeatmapRenderer implements ISeatmapRenderer {
|
|
|
1433
1436
|
setAccessibleFilter(on: boolean): void;
|
|
1434
1437
|
setAccessibilityFilter(types: AccessibilityType[] | null): void;
|
|
1435
1438
|
private sameAccessFilter;
|
|
1439
|
+
/**
|
|
1440
|
+
* "Hide limited-view seats" toggle (commercial): when on, dim free, unselected
|
|
1441
|
+
* seats flagged restrictedView or obstructedView — the same visual dimming the
|
|
1442
|
+
* accessibility filter uses, just keyed off the seat's commercial attributes.
|
|
1443
|
+
*/
|
|
1444
|
+
setCommercialLimitedFilter(on: boolean): void;
|
|
1436
1445
|
/**
|
|
1437
1446
|
* Price-band filter (F4): dim free, unselected seats whose category key is NOT
|
|
1438
1447
|
* in `keys`. `null` clears the filter (all categories fully visible). The
|
|
@@ -1768,6 +1777,10 @@ interface PickerSeat {
|
|
|
1768
1777
|
tiers?: CategoryTier[];
|
|
1769
1778
|
/** The chosen tier's id — defaults to the first tier; absent when no tiers. */
|
|
1770
1779
|
tierId?: string;
|
|
1780
|
+
/** Commercial selling/view attributes (restricted/obstructed view, premium,
|
|
1781
|
+
* note) resolved for this seat; absent when the seat carries none. Lets the
|
|
1782
|
+
* buyer cart + confirm surface flag limited-view/premium seats. */
|
|
1783
|
+
commercial?: SeatCommercialAttributes;
|
|
1771
1784
|
}
|
|
1772
1785
|
/**
|
|
1773
1786
|
* Rich hover payload for seat tooltips — the PickerSeat plus everything a
|
|
@@ -2089,6 +2102,13 @@ declare class PickerController {
|
|
|
2089
2102
|
};
|
|
2090
2103
|
setSelectionFocus(seatId: string | null): void;
|
|
2091
2104
|
setAccessibilityFilter(types: string[] | null): void;
|
|
2105
|
+
/**
|
|
2106
|
+
* "Hide limited-view seats" toggle — dims free seats flagged
|
|
2107
|
+
* restricted/obstructed view. Additive commercial parallel to the
|
|
2108
|
+
* accessibility filter; called via the concrete renderer (not on the shared
|
|
2109
|
+
* ISeatmapRenderer interface).
|
|
2110
|
+
*/
|
|
2111
|
+
setCommercialLimitedFilter(on: boolean): void;
|
|
2092
2112
|
/** Floors for the buyer's switcher (>1 ⇒ show it). Single-floor ⇒ one entry. */
|
|
2093
2113
|
getFloors(): {
|
|
2094
2114
|
id: string;
|
|
@@ -2234,10 +2254,10 @@ declare function generateSeatThumb(seat: ExpandedSeat, focalPoint: Point, _neigh
|
|
|
2234
2254
|
|
|
2235
2255
|
/**
|
|
2236
2256
|
* i18n core — deliberately tiny and framework-free so the embed SDK can share
|
|
2237
|
-
* it without dragging in a runtime library (the
|
|
2257
|
+
* it without dragging in a runtime library (the 150KB-gzipped complete CDN budget is a
|
|
2238
2258
|
* product contract).
|
|
2239
2259
|
*
|
|
2240
|
-
* Scope
|
|
2260
|
+
* Scope: the buyer surface (picker, public event
|
|
2241
2261
|
* page, SDK) ships fully translated in en/es/de/fr; dashboard pages route
|
|
2242
2262
|
* their strings through t() as they are rebuilt but ship English this round.
|
|
2243
2263
|
*
|
|
@@ -2265,7 +2285,7 @@ declare function formatDate(value: number | Date, opts?: Intl.DateTimeFormatOpti
|
|
|
2265
2285
|
|
|
2266
2286
|
/**
|
|
2267
2287
|
* Locale bundle loader — keeps non-English translations OUT of the initial
|
|
2268
|
-
* bundle (the
|
|
2288
|
+
* bundle (the 150 KB complete CDN budget is a product contract) and code-splits each
|
|
2269
2289
|
* locale so a page/SDK only downloads the language it actually uses.
|
|
2270
2290
|
*
|
|
2271
2291
|
* `loadLocale('de')` dynamic-imports the German dictionary, registers it via
|
package/dist/index.d.ts
CHANGED
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
* SeatMap chart document — the single source of truth shared by the
|
|
3
3
|
* Designer (authoring) and the Renderer (buyer picker).
|
|
4
4
|
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
5
|
+
* Coordinates are abstract units (roughly "pixels at scale 1"); the renderer
|
|
6
|
+
* fits the chart to its container.
|
|
7
7
|
* Rows are PARAMETRIC (origin + count + spacing + curve + rotation) — never
|
|
8
8
|
* store per-seat coordinates in the document; expansion happens in layout.ts.
|
|
9
9
|
*/
|
|
@@ -499,7 +499,7 @@ interface ZoneDef {
|
|
|
499
499
|
* Fixed set of four; derived from object type via `layerOf()` (no per-object field yet).
|
|
500
500
|
*/
|
|
501
501
|
type SelectionLayer = 'interactive' | 'background' | 'foreground' | 'surroundings';
|
|
502
|
-
/** Derive an object's selection layer from its type
|
|
502
|
+
/** Derive an object's selection layer from its type. */
|
|
503
503
|
declare function layerOf(obj: ChartObject): SelectionLayer;
|
|
504
504
|
/** Free-standing text on the chart (aisle names, door labels…). */
|
|
505
505
|
interface TextObject {
|
|
@@ -1275,6 +1275,9 @@ declare class SeatmapRenderer implements ISeatmapRenderer {
|
|
|
1275
1275
|
private categoryHighlight;
|
|
1276
1276
|
/** Price-band filter (F4): dim free seats whose category is NOT in this set. */
|
|
1277
1277
|
private categoryFilter;
|
|
1278
|
+
/** Commercial "hide limited-view seats" toggle: dim free seats flagged
|
|
1279
|
+
* restrictedView/obstructedView. Parallel to the accessibility filter. */
|
|
1280
|
+
private commercialLimitedFilter;
|
|
1278
1281
|
private sections;
|
|
1279
1282
|
private zones;
|
|
1280
1283
|
private seatSection;
|
|
@@ -1433,6 +1436,12 @@ declare class SeatmapRenderer implements ISeatmapRenderer {
|
|
|
1433
1436
|
setAccessibleFilter(on: boolean): void;
|
|
1434
1437
|
setAccessibilityFilter(types: AccessibilityType[] | null): void;
|
|
1435
1438
|
private sameAccessFilter;
|
|
1439
|
+
/**
|
|
1440
|
+
* "Hide limited-view seats" toggle (commercial): when on, dim free, unselected
|
|
1441
|
+
* seats flagged restrictedView or obstructedView — the same visual dimming the
|
|
1442
|
+
* accessibility filter uses, just keyed off the seat's commercial attributes.
|
|
1443
|
+
*/
|
|
1444
|
+
setCommercialLimitedFilter(on: boolean): void;
|
|
1436
1445
|
/**
|
|
1437
1446
|
* Price-band filter (F4): dim free, unselected seats whose category key is NOT
|
|
1438
1447
|
* in `keys`. `null` clears the filter (all categories fully visible). The
|
|
@@ -1768,6 +1777,10 @@ interface PickerSeat {
|
|
|
1768
1777
|
tiers?: CategoryTier[];
|
|
1769
1778
|
/** The chosen tier's id — defaults to the first tier; absent when no tiers. */
|
|
1770
1779
|
tierId?: string;
|
|
1780
|
+
/** Commercial selling/view attributes (restricted/obstructed view, premium,
|
|
1781
|
+
* note) resolved for this seat; absent when the seat carries none. Lets the
|
|
1782
|
+
* buyer cart + confirm surface flag limited-view/premium seats. */
|
|
1783
|
+
commercial?: SeatCommercialAttributes;
|
|
1771
1784
|
}
|
|
1772
1785
|
/**
|
|
1773
1786
|
* Rich hover payload for seat tooltips — the PickerSeat plus everything a
|
|
@@ -2089,6 +2102,13 @@ declare class PickerController {
|
|
|
2089
2102
|
};
|
|
2090
2103
|
setSelectionFocus(seatId: string | null): void;
|
|
2091
2104
|
setAccessibilityFilter(types: string[] | null): void;
|
|
2105
|
+
/**
|
|
2106
|
+
* "Hide limited-view seats" toggle — dims free seats flagged
|
|
2107
|
+
* restricted/obstructed view. Additive commercial parallel to the
|
|
2108
|
+
* accessibility filter; called via the concrete renderer (not on the shared
|
|
2109
|
+
* ISeatmapRenderer interface).
|
|
2110
|
+
*/
|
|
2111
|
+
setCommercialLimitedFilter(on: boolean): void;
|
|
2092
2112
|
/** Floors for the buyer's switcher (>1 ⇒ show it). Single-floor ⇒ one entry. */
|
|
2093
2113
|
getFloors(): {
|
|
2094
2114
|
id: string;
|
|
@@ -2234,10 +2254,10 @@ declare function generateSeatThumb(seat: ExpandedSeat, focalPoint: Point, _neigh
|
|
|
2234
2254
|
|
|
2235
2255
|
/**
|
|
2236
2256
|
* i18n core — deliberately tiny and framework-free so the embed SDK can share
|
|
2237
|
-
* it without dragging in a runtime library (the
|
|
2257
|
+
* it without dragging in a runtime library (the 150KB-gzipped complete CDN budget is a
|
|
2238
2258
|
* product contract).
|
|
2239
2259
|
*
|
|
2240
|
-
* Scope
|
|
2260
|
+
* Scope: the buyer surface (picker, public event
|
|
2241
2261
|
* page, SDK) ships fully translated in en/es/de/fr; dashboard pages route
|
|
2242
2262
|
* their strings through t() as they are rebuilt but ship English this round.
|
|
2243
2263
|
*
|
|
@@ -2265,7 +2285,7 @@ declare function formatDate(value: number | Date, opts?: Intl.DateTimeFormatOpti
|
|
|
2265
2285
|
|
|
2266
2286
|
/**
|
|
2267
2287
|
* Locale bundle loader — keeps non-English translations OUT of the initial
|
|
2268
|
-
* bundle (the
|
|
2288
|
+
* bundle (the 150 KB complete CDN budget is a product contract) and code-splits each
|
|
2269
2289
|
* locale so a page/SDK only downloads the language it actually uses.
|
|
2270
2290
|
*
|
|
2271
2291
|
* `loadLocale('de')` dynamic-imports the German dictionary, registers it via
|
package/dist/index.js
CHANGED
|
@@ -742,7 +742,7 @@ var en = {
|
|
|
742
742
|
"common.close": "Close",
|
|
743
743
|
"common.done": "Done",
|
|
744
744
|
"common.copied": "\u2713 Copied",
|
|
745
|
-
// buyer picker
|
|
745
|
+
// buyer picker
|
|
746
746
|
"picker.holdSeats": "Hold seats & checkout",
|
|
747
747
|
"picker.completeBooking": "Complete booking",
|
|
748
748
|
"picker.seatsHeld": "Seats held \u2014 {time}",
|
|
@@ -806,7 +806,11 @@ var en = {
|
|
|
806
806
|
"picker.on": "ON",
|
|
807
807
|
"picker.off": "OFF",
|
|
808
808
|
"picker.panorama360": "360\xB0 venue photo",
|
|
809
|
-
"picker.illustrationCaption": "illustration \xB7 \u2248 {m} m from stage"
|
|
809
|
+
"picker.illustrationCaption": "illustration \xB7 \u2248 {m} m from stage",
|
|
810
|
+
"picker.restrictedView": "Restricted view",
|
|
811
|
+
"picker.obstructedView": "Obstructed view",
|
|
812
|
+
"picker.premiumSeat": "Premium seat",
|
|
813
|
+
"picker.hideLimitedView": "Hide limited-view seats"
|
|
810
814
|
};
|
|
811
815
|
|
|
812
816
|
// src/i18n/index.ts
|
|
@@ -1180,6 +1184,9 @@ var _SeatmapRenderer = class _SeatmapRenderer {
|
|
|
1180
1184
|
this.categoryHighlight = null;
|
|
1181
1185
|
/** Price-band filter (F4): dim free seats whose category is NOT in this set. */
|
|
1182
1186
|
this.categoryFilter = null;
|
|
1187
|
+
/** Commercial "hide limited-view seats" toggle: dim free seats flagged
|
|
1188
|
+
* restrictedView/obstructedView. Parallel to the accessibility filter. */
|
|
1189
|
+
this.commercialLimitedFilter = false;
|
|
1183
1190
|
// Section/zone overlays (bgLayer) — the 3-rung LOD: seats → section blocks →
|
|
1184
1191
|
// zone blocks. Kept for the melt restyle and for hit-testing a zoomed-out tap.
|
|
1185
1192
|
this.sections = [];
|
|
@@ -2043,6 +2050,26 @@ var _SeatmapRenderer = class _SeatmapRenderer {
|
|
|
2043
2050
|
if (cur === null || next === null) return cur === next;
|
|
2044
2051
|
return cur.length === next.length && cur.every((t2, i) => t2 === next[i]);
|
|
2045
2052
|
}
|
|
2053
|
+
/**
|
|
2054
|
+
* "Hide limited-view seats" toggle (commercial): when on, dim free, unselected
|
|
2055
|
+
* seats flagged restrictedView or obstructedView — the same visual dimming the
|
|
2056
|
+
* accessibility filter uses, just keyed off the seat's commercial attributes.
|
|
2057
|
+
*/
|
|
2058
|
+
setCommercialLimitedFilter(on) {
|
|
2059
|
+
if (this.commercialLimitedFilter === on) return;
|
|
2060
|
+
this.commercialLimitedFilter = on;
|
|
2061
|
+
for (const seat of this.seats) {
|
|
2062
|
+
const c = this.circleById.get(seat.id);
|
|
2063
|
+
if (c) this.paintSeat(c, seat.id);
|
|
2064
|
+
}
|
|
2065
|
+
this.updateLabels();
|
|
2066
|
+
if (this.cached) {
|
|
2067
|
+
this.seatLayer.clearCache();
|
|
2068
|
+
this.cacheSeatLayer();
|
|
2069
|
+
} else {
|
|
2070
|
+
this.seatLayer.batchDraw();
|
|
2071
|
+
}
|
|
2072
|
+
}
|
|
2046
2073
|
/**
|
|
2047
2074
|
* Price-band filter (F4): dim free, unselected seats whose category key is NOT
|
|
2048
2075
|
* in `keys`. `null` clears the filter (all categories fully visible). The
|
|
@@ -2482,6 +2509,9 @@ var _SeatmapRenderer = class _SeatmapRenderer {
|
|
|
2482
2509
|
if (this.categoryFilter && status === "free" && !selected && !this.categoryFilter.has(seat.categoryKey)) {
|
|
2483
2510
|
c.opacity(0.22);
|
|
2484
2511
|
}
|
|
2512
|
+
if (this.commercialLimitedFilter && status === "free" && !selected && (seat.commercial?.restrictedView || seat.commercial?.obstructedView)) {
|
|
2513
|
+
c.opacity(0.22);
|
|
2514
|
+
}
|
|
2485
2515
|
if (this.dimmedSections.size) {
|
|
2486
2516
|
const sec = this.seatSection.get(id);
|
|
2487
2517
|
if (sec && (this.dimmedSections.has(sec.id) || this.dimmedSections.has(sec.logicalId) || sec.zone != null && this.dimmedSections.has(sec.zone))) {
|
|
@@ -4969,6 +4999,15 @@ var PickerController = class {
|
|
|
4969
4999
|
setAccessibilityFilter(types) {
|
|
4970
5000
|
this.renderer?.setAccessibilityFilter?.(types);
|
|
4971
5001
|
}
|
|
5002
|
+
/**
|
|
5003
|
+
* "Hide limited-view seats" toggle — dims free seats flagged
|
|
5004
|
+
* restricted/obstructed view. Additive commercial parallel to the
|
|
5005
|
+
* accessibility filter; called via the concrete renderer (not on the shared
|
|
5006
|
+
* ISeatmapRenderer interface).
|
|
5007
|
+
*/
|
|
5008
|
+
setCommercialLimitedFilter(on) {
|
|
5009
|
+
this.renderer?.setCommercialLimitedFilter?.(on);
|
|
5010
|
+
}
|
|
4972
5011
|
// ---- multi-floor (Batch 5) ------------------------------------------------
|
|
4973
5012
|
/** Floors for the buyer's switcher (>1 ⇒ show it). Single-floor ⇒ one entry. */
|
|
4974
5013
|
getFloors() {
|
|
@@ -5162,9 +5201,10 @@ var PickerController = class {
|
|
|
5162
5201
|
}
|
|
5163
5202
|
// ---- internals ------------------------------------------------------------
|
|
5164
5203
|
toSeat(s) {
|
|
5204
|
+
const commercial = s.commercial ? { commercial: s.commercial } : void 0;
|
|
5165
5205
|
const tiers = this.tiersFor(s.categoryKey);
|
|
5166
5206
|
if (!tiers) {
|
|
5167
|
-
return { id: s.id, label: s.label, categoryKey: s.categoryKey, price: this.priceFor(s.categoryKey) };
|
|
5207
|
+
return { id: s.id, label: s.label, categoryKey: s.categoryKey, price: this.priceFor(s.categoryKey), ...commercial };
|
|
5168
5208
|
}
|
|
5169
5209
|
const chosen = tiers.find((t2) => t2.id === this.seatTiers.get(s.id)) ?? tiers[0];
|
|
5170
5210
|
return {
|
|
@@ -5173,7 +5213,8 @@ var PickerController = class {
|
|
|
5173
5213
|
categoryKey: s.categoryKey,
|
|
5174
5214
|
price: chosen.price,
|
|
5175
5215
|
tiers,
|
|
5176
|
-
tierId: chosen.id
|
|
5216
|
+
tierId: chosen.id,
|
|
5217
|
+
...commercial
|
|
5177
5218
|
};
|
|
5178
5219
|
}
|
|
5179
5220
|
/** Tooltip payload for a hovered seat — see PickerCallbacks.onSeatHover. */
|
|
@@ -5661,9 +5702,9 @@ function generateSeatThumb(seat, focalPoint, _neighborSeats) {
|
|
|
5661
5702
|
|
|
5662
5703
|
// src/i18n/bundles.ts
|
|
5663
5704
|
var LOADERS = {
|
|
5664
|
-
es: () => import("./es-
|
|
5665
|
-
de: () => import("./de-
|
|
5666
|
-
fr: () => import("./fr-
|
|
5705
|
+
es: () => import("./es-ALPR5FBB.js").then((m) => ({ default: m.es })),
|
|
5706
|
+
de: () => import("./de-KPTY7UOT.js").then((m) => ({ default: m.de })),
|
|
5707
|
+
fr: () => import("./fr-HVQLQD2N.js").then((m) => ({ default: m.fr }))
|
|
5667
5708
|
};
|
|
5668
5709
|
var loaded = /* @__PURE__ */ new Set(["en"]);
|
|
5669
5710
|
async function loadLocale(code) {
|