@seatlayer/core 0.59.0 → 0.61.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/ar-H46G25IW.js +1 -0
- package/dist/be-X2N4CNF6.js +1 -0
- package/dist/bg-WAFRHN4U.js +1 -0
- package/dist/ca-KJY6UBX2.js +1 -0
- package/dist/{categoryInventory-BwarniiK.d.ts → categoryInventory-B-0p5PBr.d.ts} +1 -1
- package/dist/{categoryInventory-D3qPwfKz.d.cts → categoryInventory-DjFHXtp6.d.cts} +1 -1
- package/dist/{chunk-4BVXDBFE.js → chunk-ATFAQDPR.js} +1 -1
- package/dist/chunk-CNCFI5RT.js +1 -0
- package/dist/chunk-FOYQOIWG.js +1 -0
- package/dist/{chunk-66HGMU7D.js → chunk-IZTHA3X2.js} +1 -1
- package/dist/{chunk-PSHBUDSB.js → chunk-P2NJ6UO6.js} +1 -1
- package/dist/chunk-T2LWVOQ3.js +1 -0
- package/dist/{chunk-6XJN4REG.js → chunk-VI3IZS2B.js} +1 -1
- package/dist/{chunk-IRFG5DVH.js → chunk-VOJMGPDK.js} +1 -1
- package/dist/{chunk-PMU3VPNK.js → chunk-XU73MULJ.js} +1 -1
- package/dist/core/cdnAsset.cjs +1 -0
- package/dist/core/cdnAsset.d.cts +35 -0
- package/dist/core/cdnAsset.d.ts +35 -0
- package/dist/core/cdnAsset.js +1 -0
- package/dist/core/chart-ops/index.cjs +1 -1
- package/dist/core/chart-ops/index.d.cts +5 -5
- package/dist/core/chart-ops/index.d.ts +5 -5
- package/dist/core/chart-ops/index.js +1 -1
- package/dist/core/inventory/index.cjs +1 -1
- package/dist/core/inventory/index.d.cts +4 -4
- package/dist/core/inventory/index.d.ts +4 -4
- package/dist/core/inventory/index.js +1 -1
- package/dist/core/layout/index.cjs +1 -1
- package/dist/core/layout/index.d.cts +4 -4
- package/dist/core/layout/index.d.ts +4 -4
- package/dist/core/layout/index.js +1 -1
- package/dist/core/quality/index.d.cts +3 -3
- package/dist/core/quality/index.d.ts +3 -3
- package/dist/core/render-assets/index.d.cts +1 -1
- package/dist/core/render-assets/index.d.ts +1 -1
- package/dist/core/seatConfidence.d.cts +1 -1
- package/dist/core/seatConfidence.d.ts +1 -1
- package/dist/core/sections/index.cjs +1 -1
- package/dist/core/sections/index.d.cts +5 -5
- package/dist/core/sections/index.d.ts +5 -5
- package/dist/core/sections/index.js +1 -1
- package/dist/cs-6DGE2CXL.js +1 -0
- package/dist/cy-IN3H2JGF.js +1 -0
- package/dist/da-CW77LCG4.js +1 -0
- package/dist/{de-JS2HQ675.js → de-BTL7PM4X.js} +1 -1
- package/dist/el-TWE62U4P.js +1 -0
- package/dist/es-EJCQGGF7.js +1 -0
- package/dist/et-UQ6VFRG2.js +1 -0
- package/dist/fa-A5636YDV.js +1 -0
- package/dist/fi-6YNSAFLB.js +1 -0
- package/dist/fr-TGUAIAOM.js +1 -0
- package/dist/he-PAFZSFIR.js +1 -0
- package/dist/hr-SIQR4W7D.js +1 -0
- package/dist/hu-YBOAMZ2D.js +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +138 -39
- package/dist/index.d.ts +138 -39
- package/dist/index.js +1 -1
- package/dist/it-KCSKVAKE.js +1 -0
- package/dist/ja-4454OUK5.js +1 -0
- package/dist/ku-JPB5LQ72.js +1 -0
- package/dist/{labeling-BmCzW50y.d.ts → labeling-BPCTQfDG.d.ts} +1 -1
- package/dist/{labeling-VfJBEOn0.d.cts → labeling-iVwhgoip.d.cts} +1 -1
- package/dist/{layout-Ds42yIZT.d.cts → layout-D-R46h1m.d.ts} +40 -4
- package/dist/{layout-GZ2DPliB.d.ts → layout-Vk2ZGdMS.d.cts} +40 -4
- package/dist/localeLoaders-KUIWB7O3.js +1 -0
- package/dist/lt-54TNW6YF.js +1 -0
- package/dist/lv-TJ75JL4U.js +1 -0
- package/dist/nl-B67UFSMM.js +1 -0
- package/dist/no-6JQSRSCX.js +1 -0
- package/dist/pl-MKZX6GFZ.js +1 -0
- package/dist/pt-F2GLS7QA.js +1 -0
- package/dist/{renderedQuality-ChkM7pSo.d.ts → renderedQuality-CsXNQCCH.d.ts} +1 -1
- package/dist/{renderedQuality-CU5I5Hrg.d.cts → renderedQuality-h9RvUWMo.d.cts} +1 -1
- package/dist/{renderer-Bk65QPKq.d.ts → renderer-Bo9JzqMA.d.ts} +27 -2
- package/dist/{renderer-C313N0nM.d.cts → renderer-QnB3a1yh.d.cts} +27 -2
- package/dist/ro-2WKWAK7S.js +1 -0
- package/dist/ru-I7I76LMP.js +1 -0
- package/dist/{sections-DIzgtDjF.d.ts → sections-9_Ka3i-z.d.ts} +1 -1
- package/dist/{sections-Dna1nZgR.d.cts → sections-Dmjtj1BQ.d.cts} +1 -1
- package/dist/{segmentedRowModel-COXw4GCh.d.ts → segmentedRowModel-CO6Jogaa.d.ts} +1 -1
- package/dist/{segmentedRowModel-BNXEUeHp.d.cts → segmentedRowModel-s157HmRp.d.cts} +1 -1
- package/dist/sk-6ERFVKXJ.js +1 -0
- package/dist/sl-AVE6GE3D.js +1 -0
- package/dist/sr-D5KFFJNW.js +1 -0
- package/dist/sv-JJ7HXVOK.js +1 -0
- package/dist/{ticketRestrictions-C-ohIpd0.d.cts → ticketRestrictions-DetdPbsL.d.cts} +2 -2
- package/dist/{ticketRestrictions-CC75C4L0.d.ts → ticketRestrictions-EJTEWPGN.d.ts} +2 -2
- package/dist/tr-KKJMU4QY.js +1 -0
- package/dist/{types-DTSG6_Hq.d.cts → types-Db9rXT14.d.cts} +155 -1
- package/dist/{types-DTSG6_Hq.d.ts → types-Db9rXT14.d.ts} +155 -1
- package/dist/uk-KX5ZFXAR.js +1 -0
- package/dist/view3d/crossfade/panorama.d.cts +1 -1
- package/dist/view3d/crossfade/panorama.d.ts +1 -1
- package/dist/view3d/index.cjs +21 -21
- package/dist/view3d/index.d.cts +2 -2
- package/dist/view3d/index.d.ts +2 -2
- package/dist/view3d/index.js +23 -23
- package/dist/zh-Hans-TTCOG4UW.js +1 -0
- package/dist/zh-Hant-37V5VMCE.js +1 -0
- package/package.json +19 -2
- package/dist/chunk-GHJUDU3U.js +0 -1
- package/dist/es-XJUREIJL.js +0 -1
- package/dist/fr-CAT46QLZ.js +0 -1
package/dist/index.d.cts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { C as ChartDoc, P as Point, A as AccessibilityType, l as CategoryTier, f as SeatCommercialAttributes } from './types-
|
|
2
|
-
export { t as ACCESSIBILITY_RING_COLOR, u as ACCESSIBILITY_TYPES, v as AccessibilityMeta, w as AuthoringObjectState, B as BoothObject, x as Category, y as ChartLayoutConstraint, c as ChartObject, m as ChartReferenceImage, z as ChartTheme, r as CubicPath, D as DecorImageObject, F as Floor, G as GAAreaObject, k as GAInventorySegment, E as LABEL_STYLE_MAX_SIZE, H as LABEL_STYLE_MIN_SIZE, I as LabelPresentation, L as LabelStyle, O as ObjectEditorState, J as Physical3dEvidence, K as RadialClearanceLayoutConstraint, e as RectTableSeatCounts, b as RectTableSide, M as ReferenceAccessibilitySource, N as ReferenceCalibration, Q as ReferenceCategorySource, U as ReferenceDerivedScale, V as
|
|
3
|
-
export { E as ExpandChartOptions, R as RowSeatSlot, T as TableSeatSlot, a as allObjects, c as chartBounds, e as expandBooth, b as expandChart, d as expandRow, f as expandRowSlots, g as expandTable, h as expandTableSlots, i as floorObjects, j as floorOverviewTranslations, k as floorsOf, l as layoutFloorOverview, o as objectCenter,
|
|
4
|
-
import { c as TicketSelectionIssue } from './ticketRestrictions-
|
|
5
|
-
export { M as MAX_EVENT_INVENTORY, a as MAX_GA_CAPACITY, g as gaAreasOf, h as gaInventorySegments, i as gaUnitLabel, j as gaUnitLabels, k as growJoinedGAInventory, l as isGaUnitLabel, v as validGAInventorySegments } from './ticketRestrictions-
|
|
6
|
-
export { A as AvailabilityRule, S as SectionNode, T as TIER_HEIGHT_M, U as UNGROUPED_ID, a as applyHidden, c as computeSections, h as hiddenObjectIds, i as isSectionHidden, s as sectionGeometry } from './sections-
|
|
7
|
-
export { R as RENDERED_QUALITY_REPORT_VERSION, a as RenderedEvidenceState, b as RenderedQualityFinding, c as RenderedQualityFindingCode, d as RenderedQualityReport, e as RenderedQualitySample, i as inspectRenderedQualityEvidence } from './renderedQuality-
|
|
8
|
-
import { I as ISeatmapRenderer, b as RendererOptions, S as SeatStatus, E as ExpandedSeat, c as RendererViewMode, d as RendererMinimapSnapshot, L as LodRung, R as RendererQualityEvidence, e as RendererCallbacks } from './renderer-
|
|
9
|
-
export { C as CHART_STORAGE_KEY, f as RenderedBookableLabelEvidence, a as RenderedFreeTextEvidence, g as RenderedGAAreaEvidence, h as RenderedHierarchyLabelEvidence, i as RenderedLabelHiddenReason, j as RenderedRowLabelEvidence, k as RendererMinimapSeat, l as RendererMinimapSection } from './renderer-
|
|
10
|
-
import './segmentedRowModel-
|
|
1
|
+
import { C as ChartDoc, P as Point, A as AccessibilityType, l as CategoryTier, f as SeatCommercialAttributes } from './types-Db9rXT14.cjs';
|
|
2
|
+
export { t as ACCESSIBILITY_RING_COLOR, u as ACCESSIBILITY_TYPES, v as AccessibilityMeta, w as AuthoringObjectState, B as BoothObject, x as Category, y as ChartLayoutConstraint, c as ChartObject, m as ChartReferenceImage, z as ChartTheme, r as CubicPath, D as DecorImageObject, F as Floor, G as GAAreaObject, k as GAInventorySegment, E as LABEL_STYLE_MAX_SIZE, H as LABEL_STYLE_MIN_SIZE, I as LabelPresentation, L as LabelStyle, O as ObjectEditorState, J as Physical3dEvidence, K as RadialClearanceLayoutConstraint, e as RectTableSeatCounts, b as RectTableSide, M as ReferenceAccessibilitySource, N as ReferenceCalibration, Q as ReferenceCategorySource, U as ReferenceDerivedScale, V as ReferenceEnrichmentStatus, W as ReferenceExtractEmptyReason, X as ReferenceExtractEnrichment, Y as ReferenceExtractInput, Z as ReferenceExtractProposal, _ as ReferenceExtractRegionSeats, $ as ReferenceInventoryExclusionSource, a0 as ReferenceInventorySource, a1 as ReferenceScanProposal, a2 as ReferenceScanRowProposal, a3 as ReferenceScanSectionProposal, a4 as ReferenceSeatSeed, a5 as ReferenceSectionTraceBatchInput, a6 as ReferenceSectionTraceBatchProposal, a7 as ReferenceSectionTraceInput, a8 as ReferenceSectionTraceProposal, g as ResolvedSeatConfidenceEvidence, R as RowObject, a9 as SEAT_COMMERCIAL_MARKS, aa as SURROUNDINGS_SHAPE_ROLES, ab as SeatCommercialMark, ac as SeatCommercialMeta, ad as SeatConfidenceCoverage, ae as SeatConfidenceEvidence, af as SeatConfidenceModelLevel, ag as SeatConfidenceModeledTarget, ah as SeatConfidenceRealityLevel, S as SeatOverride, h as SeatViewCoverage, a as SeatViewMetadata, d as SectionObject, i as SectionOutlinePath, j as SectionPathSegment, ai as SelectionLayer, n as ShapeLineCap, o as ShapeLineEnding, p as ShapeLineJoin, q as ShapeObject, T as TableObject, aj as TextAlignment, ak as TextBackground, s as TextObject, al as TicketTierApplicability, am as TicketTierEvidence, an as TicketTierRestriction, ao as ZoneDef, ap as accessibilityMeta, aq as accessibilityRingColor, ar as layerOf, as as seatCommercialMeta } from './types-Db9rXT14.cjs';
|
|
3
|
+
export { E as ExpandChartOptions, R as RowSeatSlot, T as TableSeatSlot, a as allObjects, c as chartBounds, e as expandBooth, b as expandChart, d as expandRow, f as expandRowSlots, g as expandTable, h as expandTableSlots, i as floorObjects, j as floorOverviewTranslations, k as floorsOf, l as floorsShareFootprint, m as layoutFloorOverview, n as layoutFloorRings, o as objectCenter, p as owningSectionForObject, q as pointInPolygon, r as pointInPolygonWithHoles, s as polygonLabelPoint, t as rowInventoryCount, u as rowSeatPositions, v as stackFloors, w as tableInventoryCount, x as tableSeatCountsBySide, y as translateObject } from './layout-Vk2ZGdMS.cjs';
|
|
4
|
+
import { c as TicketSelectionIssue } from './ticketRestrictions-DetdPbsL.cjs';
|
|
5
|
+
export { M as MAX_EVENT_INVENTORY, a as MAX_GA_CAPACITY, g as gaAreasOf, h as gaInventorySegments, i as gaUnitLabel, j as gaUnitLabels, k as growJoinedGAInventory, l as isGaUnitLabel, v as validGAInventorySegments } from './ticketRestrictions-DetdPbsL.cjs';
|
|
6
|
+
export { A as AvailabilityRule, S as SectionNode, T as TIER_HEIGHT_M, U as UNGROUPED_ID, a as applyHidden, c as computeSections, h as hiddenObjectIds, i as isSectionHidden, s as sectionGeometry } from './sections-Dmjtj1BQ.cjs';
|
|
7
|
+
export { R as RENDERED_QUALITY_REPORT_VERSION, a as RenderedEvidenceState, b as RenderedQualityFinding, c as RenderedQualityFindingCode, d as RenderedQualityReport, e as RenderedQualitySample, i as inspectRenderedQualityEvidence } from './renderedQuality-h9RvUWMo.cjs';
|
|
8
|
+
import { I as ISeatmapRenderer, b as RendererOptions, S as SeatStatus, E as ExpandedSeat, G as GAAreaState, c as RendererViewMode, d as RendererMinimapSnapshot, L as LodRung, R as RendererQualityEvidence, e as RendererCallbacks } from './renderer-QnB3a1yh.cjs';
|
|
9
|
+
export { C as CHART_STORAGE_KEY, f as RenderedBookableLabelEvidence, a as RenderedFreeTextEvidence, g as RenderedGAAreaEvidence, h as RenderedHierarchyLabelEvidence, i as RenderedLabelHiddenReason, j as RenderedRowLabelEvidence, k as RendererMinimapSeat, l as RendererMinimapSection } from './renderer-QnB3a1yh.cjs';
|
|
10
|
+
import './segmentedRowModel-s157HmRp.cjs';
|
|
11
11
|
|
|
12
12
|
declare class SeatmapRenderer implements ISeatmapRenderer {
|
|
13
13
|
private container;
|
|
@@ -324,10 +324,12 @@ declare class SeatmapRenderer implements ISeatmapRenderer {
|
|
|
324
324
|
* widget resolves which categories fall inside the buyer's chosen band.
|
|
325
325
|
*/
|
|
326
326
|
setCategoryFilter(keys: string[] | null): void;
|
|
327
|
-
private gaCategoryDimmed;
|
|
328
327
|
/** Keep GA paint and its two labels in the same legend/price-filter state. */
|
|
329
328
|
private applyGAFilterState;
|
|
330
329
|
private paintGAStateForView;
|
|
330
|
+
/** Host-pushed GA availability / pending quantity — see {@link paintGAState}. */
|
|
331
|
+
setGAStates(states: Record<string, GAAreaState>): void;
|
|
332
|
+
setGAState(areaId: string, state: GAAreaState): void;
|
|
331
333
|
/** Frame the currently available inventory that survived a buyer price
|
|
332
334
|
* filter. Clearing the filter glides back to the full venue. */
|
|
333
335
|
focusCategories(keys: string[] | null): void;
|
|
@@ -1001,6 +1003,7 @@ interface PickerTransport {
|
|
|
1001
1003
|
mode?: string;
|
|
1002
1004
|
inventoryModelVersion?: 1 | 2;
|
|
1003
1005
|
posterUrl?: string | null;
|
|
1006
|
+
locale?: string | null;
|
|
1004
1007
|
};
|
|
1005
1008
|
}>;
|
|
1006
1009
|
/**
|
|
@@ -1214,6 +1217,8 @@ declare class PickerController {
|
|
|
1214
1217
|
private selectableSeatIds;
|
|
1215
1218
|
private lastSelectionValidity;
|
|
1216
1219
|
private renderer;
|
|
1220
|
+
/** Host-tracked pending GA quantity per area id (the widget cart's chips). */
|
|
1221
|
+
private gaSelected;
|
|
1217
1222
|
private _doc;
|
|
1218
1223
|
/** Section/zone ids hidden from buyers this event (3.3) — seats vanish, not grey. */
|
|
1219
1224
|
private hidden;
|
|
@@ -1299,6 +1304,19 @@ declare class PickerController {
|
|
|
1299
1304
|
* Returns whether anything actually changed, so a caller may call it freely.
|
|
1300
1305
|
*/
|
|
1301
1306
|
setMapTheme(theme: PickerMapTheme | null): boolean;
|
|
1307
|
+
/**
|
|
1308
|
+
* `setChart` with everything the buyer can see or has done put back: floor,
|
|
1309
|
+
* overview, palette, closed sections, the statuses we already hold, and the
|
|
1310
|
+
* SELECTION. Written once because two callers getting this subtly different
|
|
1311
|
+
* is how a buyer silently loses their seats. False = not mounted yet.
|
|
1312
|
+
*/
|
|
1313
|
+
private rebuildPreservingState;
|
|
1314
|
+
/**
|
|
1315
|
+
* Rebuild so every on-canvas string is re-evaluated. `map.seatsLeft` and
|
|
1316
|
+
* friends are baked into Konva `Text` when the scene is built, so a repaint
|
|
1317
|
+
* faithfully redraws the OLD language — only a rebuild picks up new copy.
|
|
1318
|
+
*/
|
|
1319
|
+
refreshMapCopy(): void;
|
|
1302
1320
|
/** Adopt a new hidden set; rebuild the visible chart only if it differs. */
|
|
1303
1321
|
private syncHidden;
|
|
1304
1322
|
/** Adopt a new closed-section set; restyle (grey + non-pickable) if it differs.
|
|
@@ -1342,6 +1360,8 @@ declare class PickerController {
|
|
|
1342
1360
|
currency?: string;
|
|
1343
1361
|
/** 'test' ⇒ sandbox event (hosts show a TEST MODE ribbon). */
|
|
1344
1362
|
mode?: string;
|
|
1363
|
+
/** The organizer's language, or null when they have no opinion. */
|
|
1364
|
+
locale?: string | null;
|
|
1345
1365
|
/** Absolute event-poster URL, when the server can publicly serve one. */
|
|
1346
1366
|
posterUrl?: string | null;
|
|
1347
1367
|
performanceProfile: PickerRenderPerformanceProfile;
|
|
@@ -1405,6 +1425,13 @@ declare class PickerController {
|
|
|
1405
1425
|
/** Seat ids belonging to a currently-closed section (excluded from counts). */
|
|
1406
1426
|
private closedMemberIds;
|
|
1407
1427
|
getGAAreas(): PickerGAArea[];
|
|
1428
|
+
/**
|
|
1429
|
+
* The buyer's own pending GA quantities, per area id — the widget's cart. Kept
|
|
1430
|
+
* here so every availability push repaints the count chips from one truth.
|
|
1431
|
+
*/
|
|
1432
|
+
setGASelection(selected: ReadonlyMap<string, number> | null): void;
|
|
1433
|
+
/** Mirror live GA availability (and the pending chip) onto the map. */
|
|
1434
|
+
pushGAState(): void;
|
|
1408
1435
|
/** Select a quantity from one GA area and hold it atomically. */
|
|
1409
1436
|
holdGA(areaId: string, qty: number, options?: {
|
|
1410
1437
|
tierId?: string | null;
|
|
@@ -1716,37 +1743,95 @@ declare function generateSeatThumb(seat: ExpandedSeat, focalPoint: Point, _neigh
|
|
|
1716
1743
|
|
|
1717
1744
|
/**
|
|
1718
1745
|
* i18n core — deliberately tiny and framework-free so the embed SDK can share
|
|
1719
|
-
* it without dragging in a runtime library
|
|
1720
|
-
* CDN bundle every buyer downloads, which is ~
|
|
1721
|
-
*
|
|
1722
|
-
*
|
|
1723
|
-
*
|
|
1724
|
-
*
|
|
1725
|
-
*
|
|
1746
|
+
* it without dragging in a runtime library. Every KB here lands in the complete
|
|
1747
|
+
* CDN bundle every buyer downloads, which is ~227 KB brotli as of 0.59.0.
|
|
1748
|
+
*
|
|
1749
|
+
* NOTHING in this file may import a non-English locale. English is the built-in
|
|
1750
|
+
* fallback and must resolve synchronously; the other 36 locales are fetched on
|
|
1751
|
+
* demand — see `./bundles.ts` for why that split is load-bearing rather than a
|
|
1752
|
+
* nicety, and `./localeLoaders.ts` for the map the npm build code-splits on.
|
|
1726
1753
|
*
|
|
1727
|
-
* Scope: the buyer surface (picker, public event
|
|
1728
|
-
*
|
|
1729
|
-
*
|
|
1754
|
+
* Scope: the buyer surface (picker, public event page, SDK). Dashboard and
|
|
1755
|
+
* Designer pages route strings through t() as they are rebuilt but ship
|
|
1756
|
+
* English — that is a deliberate scope call, not a gap.
|
|
1730
1757
|
*
|
|
1731
1758
|
* Keys are flat dot-namespaced strings ("picker.holdSeats"). Interpolation
|
|
1732
1759
|
* uses {name} placeholders. Missing keys fall back to English, then to the
|
|
1733
1760
|
* key itself — a page never crashes over a translation.
|
|
1734
1761
|
*/
|
|
1735
|
-
|
|
1762
|
+
/**
|
|
1763
|
+
* Every locale the buyer surface can render, matching the set a chart embed is
|
|
1764
|
+
* expected to cover. `zh-Hans`/`zh-Hant` carry a script subtag because Chinese
|
|
1765
|
+
* cannot be selected by language alone — see {@link resolveLocale}.
|
|
1766
|
+
*/
|
|
1767
|
+
type Locale = 'ar' | 'be' | 'bg' | 'ca' | 'cs' | 'cy' | 'da' | 'de' | 'el' | 'en' | 'es' | 'et' | 'fa' | 'fi' | 'fr' | 'he' | 'hr' | 'hu' | 'it' | 'ja' | 'ku' | 'lt' | 'lv' | 'nl' | 'no' | 'pl' | 'pt' | 'ro' | 'ru' | 'sk' | 'sl' | 'sr' | 'sv' | 'tr' | 'uk' | 'zh-Hans' | 'zh-Hant';
|
|
1736
1768
|
declare const SUPPORTED_LOCALES: Locale[];
|
|
1769
|
+
/**
|
|
1770
|
+
* Each language's name in itself. A reader scanning a language switcher for
|
|
1771
|
+
* their own language finds "Deutsch", never "German" — an English list is
|
|
1772
|
+
* unreadable to exactly the people who need to change it.
|
|
1773
|
+
*
|
|
1774
|
+
* Exported because a language switcher is integrator surface, not page
|
|
1775
|
+
* furniture: the SDK playground and any customer picker read the same table.
|
|
1776
|
+
*/
|
|
1777
|
+
declare const LOCALE_NAMES: Record<Locale, string>;
|
|
1778
|
+
/**
|
|
1779
|
+
* The locales that actually have a dictionary today, as opposed to the ones the
|
|
1780
|
+
* product intends to cover.
|
|
1781
|
+
*
|
|
1782
|
+
* Two lists rather than one because the CDN build cannot see `localeLoaders.ts`
|
|
1783
|
+
* — that module is deliberately unreachable there — and without this it would
|
|
1784
|
+
* fire a doomed cross-origin request for every locale it does not ship, wait for
|
|
1785
|
+
* the 404, and only then fall back to English. During a rollout that is the
|
|
1786
|
+
* COMMON case, and it delays first paint for a buyer who was always going to see
|
|
1787
|
+
* English.
|
|
1788
|
+
*
|
|
1789
|
+
* Deliberately written out rather than `[...SUPPORTED_LOCALES]`, even now that
|
|
1790
|
+
* the two agree: spreading would make the guard vacuous the moment someone adds
|
|
1791
|
+
* a 38th locale to the supported set, which is exactly when it is needed.
|
|
1792
|
+
* `test/i18nBundles.test.ts` pins this against the loader map and the files on
|
|
1793
|
+
* disk, so the two cannot drift.
|
|
1794
|
+
*/
|
|
1795
|
+
declare const TRANSLATED_LOCALES: Locale[];
|
|
1796
|
+
type Direction = 'ltr' | 'rtl';
|
|
1737
1797
|
type Dict = Record<string, string>;
|
|
1738
|
-
/**
|
|
1798
|
+
/**
|
|
1799
|
+
* explicit setting → stored preference → browser languages → en.
|
|
1800
|
+
*
|
|
1801
|
+
* `navigator.languages` is preferred over `navigator.language` so a reader
|
|
1802
|
+
* whose first choice we do not ship still gets their second rather than
|
|
1803
|
+
* English.
|
|
1804
|
+
*/
|
|
1739
1805
|
declare function resolveLocale(explicit?: string | null, stored?: string | null): Locale;
|
|
1740
1806
|
declare function getLocale(): Locale;
|
|
1807
|
+
/** Whether `locale` (default: the active one) is written right-to-left. */
|
|
1808
|
+
declare function localeDirection(locale?: Locale): Direction;
|
|
1809
|
+
/** Whether a bundle for `locale` is already registered (English always is). */
|
|
1810
|
+
declare function isLocaleLoaded(locale: Locale): boolean;
|
|
1741
1811
|
/**
|
|
1742
1812
|
* Set the active locale. Locale bundles other than English are registered by
|
|
1743
|
-
* the surface that needs them (
|
|
1744
|
-
*
|
|
1813
|
+
* the surface that needs them — `loadLocale()` in `./bundles.ts` is the one
|
|
1814
|
+
* caller that should normally do this.
|
|
1815
|
+
*
|
|
1816
|
+
* Deliberately does NOT touch `document.documentElement.dir`. This module runs
|
|
1817
|
+
* inside an embedded widget on somebody else's page, and flipping the host
|
|
1818
|
+
* document to RTL to render an Arabic seat map would mirror THEIR layout. The
|
|
1819
|
+
* picker sets `lang`/`dir` on its own container instead; read
|
|
1820
|
+
* {@link localeDirection} to do the same on any new surface.
|
|
1745
1821
|
*/
|
|
1746
1822
|
declare function setLocale(locale: Locale, bundle?: Dict): void;
|
|
1747
1823
|
declare function setStringOverrides(next: Dict): void;
|
|
1748
1824
|
declare function t(key: string, vars?: Record<string, string | number>): string;
|
|
1749
|
-
/**
|
|
1825
|
+
/**
|
|
1826
|
+
* "1 seat" / "3 seats" without hand-rolled concatenation.
|
|
1827
|
+
*
|
|
1828
|
+
* The category comes from `Intl.PluralRules`, so a locale that needs `few` or
|
|
1829
|
+
* `many` (most Slavic languages, Romanian, Arabic) gets the right form AS LONG
|
|
1830
|
+
* AS its bundle defines those keys. A bundle missing the exact category falls
|
|
1831
|
+
* back to `.other` rather than throwing — wrong grammar beats a blank string —
|
|
1832
|
+
* which is why `test/i18nBundles.test.ts` fails the build when a bundle omits
|
|
1833
|
+
* a category its own plural rules require.
|
|
1834
|
+
*/
|
|
1750
1835
|
declare function tCount(key: string, count: number, vars?: Record<string, string | number>): string;
|
|
1751
1836
|
/**
|
|
1752
1837
|
* Kept for the SDK surface that imports dates from here. It is a thin pass to
|
|
@@ -1759,24 +1844,38 @@ declare function tCount(key: string, count: number, vars?: Record<string, string
|
|
|
1759
1844
|
declare function formatDate(value: number | Date, opts?: Intl.DateTimeFormatOptions): string;
|
|
1760
1845
|
|
|
1761
1846
|
/**
|
|
1762
|
-
* Locale bundle loader —
|
|
1763
|
-
*
|
|
1764
|
-
*
|
|
1765
|
-
*
|
|
1766
|
-
*
|
|
1767
|
-
*
|
|
1847
|
+
* Locale bundle loader — the ONE place that decides how a non-English
|
|
1848
|
+
* dictionary reaches the page, and the reason 36 locales cost the buyer
|
|
1849
|
+
* nothing.
|
|
1850
|
+
*
|
|
1851
|
+
* There are two delivery paths because there are two builds:
|
|
1852
|
+
*
|
|
1853
|
+
* - **npm / bundler consumers** (and the vendored app copy): a dynamic import
|
|
1854
|
+
* of `./localeLoaders`, whose specifiers every bundler code-splits into one
|
|
1855
|
+
* chunk per locale.
|
|
1856
|
+
* - **the CDN artifact**: a Vite `lib` build with `codeSplitting: false`. It
|
|
1857
|
+
* physically cannot emit a chunk, so a reachable `import('./locales/de')`
|
|
1858
|
+
* is INLINED. Until 0.59.0 that is exactly what happened — es/de/fr shipped
|
|
1859
|
+
* inside `seatlayer.js` to every buyer of every chart while this file's own
|
|
1860
|
+
* comment claimed they were code-split. At ~5 KB brotli each, carrying all
|
|
1861
|
+
* 36 that way would have added ~180 KB to a 227 KB bundle. So the CDN path
|
|
1862
|
+
* loads a sibling ESM asset by absolute URL instead, exactly like the 3D
|
|
1863
|
+
* scene, panorama and hosted-checkout chunks do.
|
|
1864
|
+
*
|
|
1865
|
+
* English is built into the core and never fetched — it is the synchronous
|
|
1866
|
+
* fallback `t()` reads when a key is missing, so it cannot be a network call.
|
|
1768
1867
|
*
|
|
1769
|
-
*
|
|
1770
|
-
*
|
|
1771
|
-
*
|
|
1772
|
-
* codes fall back to English without throwing.
|
|
1868
|
+
* Unknown, unsupported, and not-yet-translated codes fall back to English
|
|
1869
|
+
* without throwing, as does any network or parse failure. A seat map renders
|
|
1870
|
+
* in English rather than not at all.
|
|
1773
1871
|
*/
|
|
1774
1872
|
|
|
1775
1873
|
/**
|
|
1776
1874
|
* Resolve `code` to a supported locale, load its bundle if needed, and make it
|
|
1777
|
-
* active. Returns the locale that ended up active (English on any failure
|
|
1875
|
+
* active. Returns the locale that ended up active (English on any failure, on
|
|
1876
|
+
* an unsupported code, or on a locale we have not translated yet).
|
|
1778
1877
|
*/
|
|
1779
|
-
declare function loadLocale(code?: string | null): Promise<Locale>;
|
|
1878
|
+
declare function loadLocale(code?: string | null, stored?: string | null): Promise<Locale>;
|
|
1780
1879
|
|
|
1781
1880
|
/**
|
|
1782
1881
|
* Money formatting — the ONE place currency rendering happens.
|
|
@@ -1839,4 +1938,4 @@ declare function formatMinor(minor: number, currency?: string, locale?: string):
|
|
|
1839
1938
|
/** Bare symbol for input adornments ("€", "$", "₹"). */
|
|
1840
1939
|
declare function currencySymbol(currency?: string): string;
|
|
1841
1940
|
|
|
1842
|
-
export { AccessibilityType, CURRENCY_CHOICES, CategoryTier, ChartDoc, DEFAULT_CURRENCY, type Dict, ExpandedSeat, type HoldConflict, type HoldInfo, type HoldSelectionRequest, type HoldServerItem, ISeatmapRenderer, type Locale, LodRung, type MoneyFormatOptions, type PanoramaResult, type PickerCallbacks, PickerController, type PickerGAArea, type PickerMapTheme, type PickerOptions, type PickerRealtimeConnection, type PickerRealtimeSink, type PickerRenderPerformanceProfile, type PickerSeat, PickerSelectionError, type PickerSelectionValidator, type PickerSelectionValidity, type PickerSelectionViolation, type PickerStatusChange, type PickerTransport, Point, RendererCallbacks, RendererMinimapSnapshot, RendererOptions, RendererQualityEvidence, RendererViewMode, SUPPORTED_LOCALES, SeatCommercialAttributes, type SeatHoverDetails, SeatStatus, SeatmapRenderer, type SectionCategory, type SectionSummary, type TableSelectionDetails, createRenderer, currencyExponent, currencySymbol, formatDate, formatMinor, formatMoney, fromMinorUnits, generateSeatPanorama, generateSeatThumb, getLocale, loadLocale, resolveLocale, setLocale, setMoneyLocale, setStringOverrides, t, tCount };
|
|
1941
|
+
export { AccessibilityType, CURRENCY_CHOICES, CategoryTier, ChartDoc, DEFAULT_CURRENCY, type Dict, type Direction, ExpandedSeat, GAAreaState, type HoldConflict, type HoldInfo, type HoldSelectionRequest, type HoldServerItem, ISeatmapRenderer, LOCALE_NAMES, type Locale, LodRung, type MoneyFormatOptions, type PanoramaResult, type PickerCallbacks, PickerController, type PickerGAArea, type PickerMapTheme, type PickerOptions, type PickerRealtimeConnection, type PickerRealtimeSink, type PickerRenderPerformanceProfile, type PickerSeat, PickerSelectionError, type PickerSelectionValidator, type PickerSelectionValidity, type PickerSelectionViolation, type PickerStatusChange, type PickerTransport, Point, RendererCallbacks, RendererMinimapSnapshot, RendererOptions, RendererQualityEvidence, RendererViewMode, SUPPORTED_LOCALES, SeatCommercialAttributes, type SeatHoverDetails, SeatStatus, SeatmapRenderer, type SectionCategory, type SectionSummary, TRANSLATED_LOCALES, type TableSelectionDetails, createRenderer, currencyExponent, currencySymbol, formatDate, formatMinor, formatMoney, fromMinorUnits, generateSeatPanorama, generateSeatThumb, getLocale, isLocaleLoaded, loadLocale, localeDirection, resolveLocale, setLocale, setMoneyLocale, setStringOverrides, t, tCount };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { C as ChartDoc, P as Point, A as AccessibilityType, l as CategoryTier, f as SeatCommercialAttributes } from './types-
|
|
2
|
-
export { t as ACCESSIBILITY_RING_COLOR, u as ACCESSIBILITY_TYPES, v as AccessibilityMeta, w as AuthoringObjectState, B as BoothObject, x as Category, y as ChartLayoutConstraint, c as ChartObject, m as ChartReferenceImage, z as ChartTheme, r as CubicPath, D as DecorImageObject, F as Floor, G as GAAreaObject, k as GAInventorySegment, E as LABEL_STYLE_MAX_SIZE, H as LABEL_STYLE_MIN_SIZE, I as LabelPresentation, L as LabelStyle, O as ObjectEditorState, J as Physical3dEvidence, K as RadialClearanceLayoutConstraint, e as RectTableSeatCounts, b as RectTableSide, M as ReferenceAccessibilitySource, N as ReferenceCalibration, Q as ReferenceCategorySource, U as ReferenceDerivedScale, V as
|
|
3
|
-
export { E as ExpandChartOptions, R as RowSeatSlot, T as TableSeatSlot, a as allObjects, c as chartBounds, e as expandBooth, b as expandChart, d as expandRow, f as expandRowSlots, g as expandTable, h as expandTableSlots, i as floorObjects, j as floorOverviewTranslations, k as floorsOf, l as layoutFloorOverview, o as objectCenter,
|
|
4
|
-
import { c as TicketSelectionIssue } from './ticketRestrictions-
|
|
5
|
-
export { M as MAX_EVENT_INVENTORY, a as MAX_GA_CAPACITY, g as gaAreasOf, h as gaInventorySegments, i as gaUnitLabel, j as gaUnitLabels, k as growJoinedGAInventory, l as isGaUnitLabel, v as validGAInventorySegments } from './ticketRestrictions-
|
|
6
|
-
export { A as AvailabilityRule, S as SectionNode, T as TIER_HEIGHT_M, U as UNGROUPED_ID, a as applyHidden, c as computeSections, h as hiddenObjectIds, i as isSectionHidden, s as sectionGeometry } from './sections-
|
|
7
|
-
export { R as RENDERED_QUALITY_REPORT_VERSION, a as RenderedEvidenceState, b as RenderedQualityFinding, c as RenderedQualityFindingCode, d as RenderedQualityReport, e as RenderedQualitySample, i as inspectRenderedQualityEvidence } from './renderedQuality-
|
|
8
|
-
import { I as ISeatmapRenderer, b as RendererOptions, S as SeatStatus, E as ExpandedSeat, c as RendererViewMode, d as RendererMinimapSnapshot, L as LodRung, R as RendererQualityEvidence, e as RendererCallbacks } from './renderer-
|
|
9
|
-
export { C as CHART_STORAGE_KEY, f as RenderedBookableLabelEvidence, a as RenderedFreeTextEvidence, g as RenderedGAAreaEvidence, h as RenderedHierarchyLabelEvidence, i as RenderedLabelHiddenReason, j as RenderedRowLabelEvidence, k as RendererMinimapSeat, l as RendererMinimapSection } from './renderer-
|
|
10
|
-
import './segmentedRowModel-
|
|
1
|
+
import { C as ChartDoc, P as Point, A as AccessibilityType, l as CategoryTier, f as SeatCommercialAttributes } from './types-Db9rXT14.js';
|
|
2
|
+
export { t as ACCESSIBILITY_RING_COLOR, u as ACCESSIBILITY_TYPES, v as AccessibilityMeta, w as AuthoringObjectState, B as BoothObject, x as Category, y as ChartLayoutConstraint, c as ChartObject, m as ChartReferenceImage, z as ChartTheme, r as CubicPath, D as DecorImageObject, F as Floor, G as GAAreaObject, k as GAInventorySegment, E as LABEL_STYLE_MAX_SIZE, H as LABEL_STYLE_MIN_SIZE, I as LabelPresentation, L as LabelStyle, O as ObjectEditorState, J as Physical3dEvidence, K as RadialClearanceLayoutConstraint, e as RectTableSeatCounts, b as RectTableSide, M as ReferenceAccessibilitySource, N as ReferenceCalibration, Q as ReferenceCategorySource, U as ReferenceDerivedScale, V as ReferenceEnrichmentStatus, W as ReferenceExtractEmptyReason, X as ReferenceExtractEnrichment, Y as ReferenceExtractInput, Z as ReferenceExtractProposal, _ as ReferenceExtractRegionSeats, $ as ReferenceInventoryExclusionSource, a0 as ReferenceInventorySource, a1 as ReferenceScanProposal, a2 as ReferenceScanRowProposal, a3 as ReferenceScanSectionProposal, a4 as ReferenceSeatSeed, a5 as ReferenceSectionTraceBatchInput, a6 as ReferenceSectionTraceBatchProposal, a7 as ReferenceSectionTraceInput, a8 as ReferenceSectionTraceProposal, g as ResolvedSeatConfidenceEvidence, R as RowObject, a9 as SEAT_COMMERCIAL_MARKS, aa as SURROUNDINGS_SHAPE_ROLES, ab as SeatCommercialMark, ac as SeatCommercialMeta, ad as SeatConfidenceCoverage, ae as SeatConfidenceEvidence, af as SeatConfidenceModelLevel, ag as SeatConfidenceModeledTarget, ah as SeatConfidenceRealityLevel, S as SeatOverride, h as SeatViewCoverage, a as SeatViewMetadata, d as SectionObject, i as SectionOutlinePath, j as SectionPathSegment, ai as SelectionLayer, n as ShapeLineCap, o as ShapeLineEnding, p as ShapeLineJoin, q as ShapeObject, T as TableObject, aj as TextAlignment, ak as TextBackground, s as TextObject, al as TicketTierApplicability, am as TicketTierEvidence, an as TicketTierRestriction, ao as ZoneDef, ap as accessibilityMeta, aq as accessibilityRingColor, ar as layerOf, as as seatCommercialMeta } from './types-Db9rXT14.js';
|
|
3
|
+
export { E as ExpandChartOptions, R as RowSeatSlot, T as TableSeatSlot, a as allObjects, c as chartBounds, e as expandBooth, b as expandChart, d as expandRow, f as expandRowSlots, g as expandTable, h as expandTableSlots, i as floorObjects, j as floorOverviewTranslations, k as floorsOf, l as floorsShareFootprint, m as layoutFloorOverview, n as layoutFloorRings, o as objectCenter, p as owningSectionForObject, q as pointInPolygon, r as pointInPolygonWithHoles, s as polygonLabelPoint, t as rowInventoryCount, u as rowSeatPositions, v as stackFloors, w as tableInventoryCount, x as tableSeatCountsBySide, y as translateObject } from './layout-D-R46h1m.js';
|
|
4
|
+
import { c as TicketSelectionIssue } from './ticketRestrictions-EJTEWPGN.js';
|
|
5
|
+
export { M as MAX_EVENT_INVENTORY, a as MAX_GA_CAPACITY, g as gaAreasOf, h as gaInventorySegments, i as gaUnitLabel, j as gaUnitLabels, k as growJoinedGAInventory, l as isGaUnitLabel, v as validGAInventorySegments } from './ticketRestrictions-EJTEWPGN.js';
|
|
6
|
+
export { A as AvailabilityRule, S as SectionNode, T as TIER_HEIGHT_M, U as UNGROUPED_ID, a as applyHidden, c as computeSections, h as hiddenObjectIds, i as isSectionHidden, s as sectionGeometry } from './sections-9_Ka3i-z.js';
|
|
7
|
+
export { R as RENDERED_QUALITY_REPORT_VERSION, a as RenderedEvidenceState, b as RenderedQualityFinding, c as RenderedQualityFindingCode, d as RenderedQualityReport, e as RenderedQualitySample, i as inspectRenderedQualityEvidence } from './renderedQuality-CsXNQCCH.js';
|
|
8
|
+
import { I as ISeatmapRenderer, b as RendererOptions, S as SeatStatus, E as ExpandedSeat, G as GAAreaState, c as RendererViewMode, d as RendererMinimapSnapshot, L as LodRung, R as RendererQualityEvidence, e as RendererCallbacks } from './renderer-Bo9JzqMA.js';
|
|
9
|
+
export { C as CHART_STORAGE_KEY, f as RenderedBookableLabelEvidence, a as RenderedFreeTextEvidence, g as RenderedGAAreaEvidence, h as RenderedHierarchyLabelEvidence, i as RenderedLabelHiddenReason, j as RenderedRowLabelEvidence, k as RendererMinimapSeat, l as RendererMinimapSection } from './renderer-Bo9JzqMA.js';
|
|
10
|
+
import './segmentedRowModel-CO6Jogaa.js';
|
|
11
11
|
|
|
12
12
|
declare class SeatmapRenderer implements ISeatmapRenderer {
|
|
13
13
|
private container;
|
|
@@ -324,10 +324,12 @@ declare class SeatmapRenderer implements ISeatmapRenderer {
|
|
|
324
324
|
* widget resolves which categories fall inside the buyer's chosen band.
|
|
325
325
|
*/
|
|
326
326
|
setCategoryFilter(keys: string[] | null): void;
|
|
327
|
-
private gaCategoryDimmed;
|
|
328
327
|
/** Keep GA paint and its two labels in the same legend/price-filter state. */
|
|
329
328
|
private applyGAFilterState;
|
|
330
329
|
private paintGAStateForView;
|
|
330
|
+
/** Host-pushed GA availability / pending quantity — see {@link paintGAState}. */
|
|
331
|
+
setGAStates(states: Record<string, GAAreaState>): void;
|
|
332
|
+
setGAState(areaId: string, state: GAAreaState): void;
|
|
331
333
|
/** Frame the currently available inventory that survived a buyer price
|
|
332
334
|
* filter. Clearing the filter glides back to the full venue. */
|
|
333
335
|
focusCategories(keys: string[] | null): void;
|
|
@@ -1001,6 +1003,7 @@ interface PickerTransport {
|
|
|
1001
1003
|
mode?: string;
|
|
1002
1004
|
inventoryModelVersion?: 1 | 2;
|
|
1003
1005
|
posterUrl?: string | null;
|
|
1006
|
+
locale?: string | null;
|
|
1004
1007
|
};
|
|
1005
1008
|
}>;
|
|
1006
1009
|
/**
|
|
@@ -1214,6 +1217,8 @@ declare class PickerController {
|
|
|
1214
1217
|
private selectableSeatIds;
|
|
1215
1218
|
private lastSelectionValidity;
|
|
1216
1219
|
private renderer;
|
|
1220
|
+
/** Host-tracked pending GA quantity per area id (the widget cart's chips). */
|
|
1221
|
+
private gaSelected;
|
|
1217
1222
|
private _doc;
|
|
1218
1223
|
/** Section/zone ids hidden from buyers this event (3.3) — seats vanish, not grey. */
|
|
1219
1224
|
private hidden;
|
|
@@ -1299,6 +1304,19 @@ declare class PickerController {
|
|
|
1299
1304
|
* Returns whether anything actually changed, so a caller may call it freely.
|
|
1300
1305
|
*/
|
|
1301
1306
|
setMapTheme(theme: PickerMapTheme | null): boolean;
|
|
1307
|
+
/**
|
|
1308
|
+
* `setChart` with everything the buyer can see or has done put back: floor,
|
|
1309
|
+
* overview, palette, closed sections, the statuses we already hold, and the
|
|
1310
|
+
* SELECTION. Written once because two callers getting this subtly different
|
|
1311
|
+
* is how a buyer silently loses their seats. False = not mounted yet.
|
|
1312
|
+
*/
|
|
1313
|
+
private rebuildPreservingState;
|
|
1314
|
+
/**
|
|
1315
|
+
* Rebuild so every on-canvas string is re-evaluated. `map.seatsLeft` and
|
|
1316
|
+
* friends are baked into Konva `Text` when the scene is built, so a repaint
|
|
1317
|
+
* faithfully redraws the OLD language — only a rebuild picks up new copy.
|
|
1318
|
+
*/
|
|
1319
|
+
refreshMapCopy(): void;
|
|
1302
1320
|
/** Adopt a new hidden set; rebuild the visible chart only if it differs. */
|
|
1303
1321
|
private syncHidden;
|
|
1304
1322
|
/** Adopt a new closed-section set; restyle (grey + non-pickable) if it differs.
|
|
@@ -1342,6 +1360,8 @@ declare class PickerController {
|
|
|
1342
1360
|
currency?: string;
|
|
1343
1361
|
/** 'test' ⇒ sandbox event (hosts show a TEST MODE ribbon). */
|
|
1344
1362
|
mode?: string;
|
|
1363
|
+
/** The organizer's language, or null when they have no opinion. */
|
|
1364
|
+
locale?: string | null;
|
|
1345
1365
|
/** Absolute event-poster URL, when the server can publicly serve one. */
|
|
1346
1366
|
posterUrl?: string | null;
|
|
1347
1367
|
performanceProfile: PickerRenderPerformanceProfile;
|
|
@@ -1405,6 +1425,13 @@ declare class PickerController {
|
|
|
1405
1425
|
/** Seat ids belonging to a currently-closed section (excluded from counts). */
|
|
1406
1426
|
private closedMemberIds;
|
|
1407
1427
|
getGAAreas(): PickerGAArea[];
|
|
1428
|
+
/**
|
|
1429
|
+
* The buyer's own pending GA quantities, per area id — the widget's cart. Kept
|
|
1430
|
+
* here so every availability push repaints the count chips from one truth.
|
|
1431
|
+
*/
|
|
1432
|
+
setGASelection(selected: ReadonlyMap<string, number> | null): void;
|
|
1433
|
+
/** Mirror live GA availability (and the pending chip) onto the map. */
|
|
1434
|
+
pushGAState(): void;
|
|
1408
1435
|
/** Select a quantity from one GA area and hold it atomically. */
|
|
1409
1436
|
holdGA(areaId: string, qty: number, options?: {
|
|
1410
1437
|
tierId?: string | null;
|
|
@@ -1716,37 +1743,95 @@ declare function generateSeatThumb(seat: ExpandedSeat, focalPoint: Point, _neigh
|
|
|
1716
1743
|
|
|
1717
1744
|
/**
|
|
1718
1745
|
* i18n core — deliberately tiny and framework-free so the embed SDK can share
|
|
1719
|
-
* it without dragging in a runtime library
|
|
1720
|
-
* CDN bundle every buyer downloads, which is ~
|
|
1721
|
-
*
|
|
1722
|
-
*
|
|
1723
|
-
*
|
|
1724
|
-
*
|
|
1725
|
-
*
|
|
1746
|
+
* it without dragging in a runtime library. Every KB here lands in the complete
|
|
1747
|
+
* CDN bundle every buyer downloads, which is ~227 KB brotli as of 0.59.0.
|
|
1748
|
+
*
|
|
1749
|
+
* NOTHING in this file may import a non-English locale. English is the built-in
|
|
1750
|
+
* fallback and must resolve synchronously; the other 36 locales are fetched on
|
|
1751
|
+
* demand — see `./bundles.ts` for why that split is load-bearing rather than a
|
|
1752
|
+
* nicety, and `./localeLoaders.ts` for the map the npm build code-splits on.
|
|
1726
1753
|
*
|
|
1727
|
-
* Scope: the buyer surface (picker, public event
|
|
1728
|
-
*
|
|
1729
|
-
*
|
|
1754
|
+
* Scope: the buyer surface (picker, public event page, SDK). Dashboard and
|
|
1755
|
+
* Designer pages route strings through t() as they are rebuilt but ship
|
|
1756
|
+
* English — that is a deliberate scope call, not a gap.
|
|
1730
1757
|
*
|
|
1731
1758
|
* Keys are flat dot-namespaced strings ("picker.holdSeats"). Interpolation
|
|
1732
1759
|
* uses {name} placeholders. Missing keys fall back to English, then to the
|
|
1733
1760
|
* key itself — a page never crashes over a translation.
|
|
1734
1761
|
*/
|
|
1735
|
-
|
|
1762
|
+
/**
|
|
1763
|
+
* Every locale the buyer surface can render, matching the set a chart embed is
|
|
1764
|
+
* expected to cover. `zh-Hans`/`zh-Hant` carry a script subtag because Chinese
|
|
1765
|
+
* cannot be selected by language alone — see {@link resolveLocale}.
|
|
1766
|
+
*/
|
|
1767
|
+
type Locale = 'ar' | 'be' | 'bg' | 'ca' | 'cs' | 'cy' | 'da' | 'de' | 'el' | 'en' | 'es' | 'et' | 'fa' | 'fi' | 'fr' | 'he' | 'hr' | 'hu' | 'it' | 'ja' | 'ku' | 'lt' | 'lv' | 'nl' | 'no' | 'pl' | 'pt' | 'ro' | 'ru' | 'sk' | 'sl' | 'sr' | 'sv' | 'tr' | 'uk' | 'zh-Hans' | 'zh-Hant';
|
|
1736
1768
|
declare const SUPPORTED_LOCALES: Locale[];
|
|
1769
|
+
/**
|
|
1770
|
+
* Each language's name in itself. A reader scanning a language switcher for
|
|
1771
|
+
* their own language finds "Deutsch", never "German" — an English list is
|
|
1772
|
+
* unreadable to exactly the people who need to change it.
|
|
1773
|
+
*
|
|
1774
|
+
* Exported because a language switcher is integrator surface, not page
|
|
1775
|
+
* furniture: the SDK playground and any customer picker read the same table.
|
|
1776
|
+
*/
|
|
1777
|
+
declare const LOCALE_NAMES: Record<Locale, string>;
|
|
1778
|
+
/**
|
|
1779
|
+
* The locales that actually have a dictionary today, as opposed to the ones the
|
|
1780
|
+
* product intends to cover.
|
|
1781
|
+
*
|
|
1782
|
+
* Two lists rather than one because the CDN build cannot see `localeLoaders.ts`
|
|
1783
|
+
* — that module is deliberately unreachable there — and without this it would
|
|
1784
|
+
* fire a doomed cross-origin request for every locale it does not ship, wait for
|
|
1785
|
+
* the 404, and only then fall back to English. During a rollout that is the
|
|
1786
|
+
* COMMON case, and it delays first paint for a buyer who was always going to see
|
|
1787
|
+
* English.
|
|
1788
|
+
*
|
|
1789
|
+
* Deliberately written out rather than `[...SUPPORTED_LOCALES]`, even now that
|
|
1790
|
+
* the two agree: spreading would make the guard vacuous the moment someone adds
|
|
1791
|
+
* a 38th locale to the supported set, which is exactly when it is needed.
|
|
1792
|
+
* `test/i18nBundles.test.ts` pins this against the loader map and the files on
|
|
1793
|
+
* disk, so the two cannot drift.
|
|
1794
|
+
*/
|
|
1795
|
+
declare const TRANSLATED_LOCALES: Locale[];
|
|
1796
|
+
type Direction = 'ltr' | 'rtl';
|
|
1737
1797
|
type Dict = Record<string, string>;
|
|
1738
|
-
/**
|
|
1798
|
+
/**
|
|
1799
|
+
* explicit setting → stored preference → browser languages → en.
|
|
1800
|
+
*
|
|
1801
|
+
* `navigator.languages` is preferred over `navigator.language` so a reader
|
|
1802
|
+
* whose first choice we do not ship still gets their second rather than
|
|
1803
|
+
* English.
|
|
1804
|
+
*/
|
|
1739
1805
|
declare function resolveLocale(explicit?: string | null, stored?: string | null): Locale;
|
|
1740
1806
|
declare function getLocale(): Locale;
|
|
1807
|
+
/** Whether `locale` (default: the active one) is written right-to-left. */
|
|
1808
|
+
declare function localeDirection(locale?: Locale): Direction;
|
|
1809
|
+
/** Whether a bundle for `locale` is already registered (English always is). */
|
|
1810
|
+
declare function isLocaleLoaded(locale: Locale): boolean;
|
|
1741
1811
|
/**
|
|
1742
1812
|
* Set the active locale. Locale bundles other than English are registered by
|
|
1743
|
-
* the surface that needs them (
|
|
1744
|
-
*
|
|
1813
|
+
* the surface that needs them — `loadLocale()` in `./bundles.ts` is the one
|
|
1814
|
+
* caller that should normally do this.
|
|
1815
|
+
*
|
|
1816
|
+
* Deliberately does NOT touch `document.documentElement.dir`. This module runs
|
|
1817
|
+
* inside an embedded widget on somebody else's page, and flipping the host
|
|
1818
|
+
* document to RTL to render an Arabic seat map would mirror THEIR layout. The
|
|
1819
|
+
* picker sets `lang`/`dir` on its own container instead; read
|
|
1820
|
+
* {@link localeDirection} to do the same on any new surface.
|
|
1745
1821
|
*/
|
|
1746
1822
|
declare function setLocale(locale: Locale, bundle?: Dict): void;
|
|
1747
1823
|
declare function setStringOverrides(next: Dict): void;
|
|
1748
1824
|
declare function t(key: string, vars?: Record<string, string | number>): string;
|
|
1749
|
-
/**
|
|
1825
|
+
/**
|
|
1826
|
+
* "1 seat" / "3 seats" without hand-rolled concatenation.
|
|
1827
|
+
*
|
|
1828
|
+
* The category comes from `Intl.PluralRules`, so a locale that needs `few` or
|
|
1829
|
+
* `many` (most Slavic languages, Romanian, Arabic) gets the right form AS LONG
|
|
1830
|
+
* AS its bundle defines those keys. A bundle missing the exact category falls
|
|
1831
|
+
* back to `.other` rather than throwing — wrong grammar beats a blank string —
|
|
1832
|
+
* which is why `test/i18nBundles.test.ts` fails the build when a bundle omits
|
|
1833
|
+
* a category its own plural rules require.
|
|
1834
|
+
*/
|
|
1750
1835
|
declare function tCount(key: string, count: number, vars?: Record<string, string | number>): string;
|
|
1751
1836
|
/**
|
|
1752
1837
|
* Kept for the SDK surface that imports dates from here. It is a thin pass to
|
|
@@ -1759,24 +1844,38 @@ declare function tCount(key: string, count: number, vars?: Record<string, string
|
|
|
1759
1844
|
declare function formatDate(value: number | Date, opts?: Intl.DateTimeFormatOptions): string;
|
|
1760
1845
|
|
|
1761
1846
|
/**
|
|
1762
|
-
* Locale bundle loader —
|
|
1763
|
-
*
|
|
1764
|
-
*
|
|
1765
|
-
*
|
|
1766
|
-
*
|
|
1767
|
-
*
|
|
1847
|
+
* Locale bundle loader — the ONE place that decides how a non-English
|
|
1848
|
+
* dictionary reaches the page, and the reason 36 locales cost the buyer
|
|
1849
|
+
* nothing.
|
|
1850
|
+
*
|
|
1851
|
+
* There are two delivery paths because there are two builds:
|
|
1852
|
+
*
|
|
1853
|
+
* - **npm / bundler consumers** (and the vendored app copy): a dynamic import
|
|
1854
|
+
* of `./localeLoaders`, whose specifiers every bundler code-splits into one
|
|
1855
|
+
* chunk per locale.
|
|
1856
|
+
* - **the CDN artifact**: a Vite `lib` build with `codeSplitting: false`. It
|
|
1857
|
+
* physically cannot emit a chunk, so a reachable `import('./locales/de')`
|
|
1858
|
+
* is INLINED. Until 0.59.0 that is exactly what happened — es/de/fr shipped
|
|
1859
|
+
* inside `seatlayer.js` to every buyer of every chart while this file's own
|
|
1860
|
+
* comment claimed they were code-split. At ~5 KB brotli each, carrying all
|
|
1861
|
+
* 36 that way would have added ~180 KB to a 227 KB bundle. So the CDN path
|
|
1862
|
+
* loads a sibling ESM asset by absolute URL instead, exactly like the 3D
|
|
1863
|
+
* scene, panorama and hosted-checkout chunks do.
|
|
1864
|
+
*
|
|
1865
|
+
* English is built into the core and never fetched — it is the synchronous
|
|
1866
|
+
* fallback `t()` reads when a key is missing, so it cannot be a network call.
|
|
1768
1867
|
*
|
|
1769
|
-
*
|
|
1770
|
-
*
|
|
1771
|
-
*
|
|
1772
|
-
* codes fall back to English without throwing.
|
|
1868
|
+
* Unknown, unsupported, and not-yet-translated codes fall back to English
|
|
1869
|
+
* without throwing, as does any network or parse failure. A seat map renders
|
|
1870
|
+
* in English rather than not at all.
|
|
1773
1871
|
*/
|
|
1774
1872
|
|
|
1775
1873
|
/**
|
|
1776
1874
|
* Resolve `code` to a supported locale, load its bundle if needed, and make it
|
|
1777
|
-
* active. Returns the locale that ended up active (English on any failure
|
|
1875
|
+
* active. Returns the locale that ended up active (English on any failure, on
|
|
1876
|
+
* an unsupported code, or on a locale we have not translated yet).
|
|
1778
1877
|
*/
|
|
1779
|
-
declare function loadLocale(code?: string | null): Promise<Locale>;
|
|
1878
|
+
declare function loadLocale(code?: string | null, stored?: string | null): Promise<Locale>;
|
|
1780
1879
|
|
|
1781
1880
|
/**
|
|
1782
1881
|
* Money formatting — the ONE place currency rendering happens.
|
|
@@ -1839,4 +1938,4 @@ declare function formatMinor(minor: number, currency?: string, locale?: string):
|
|
|
1839
1938
|
/** Bare symbol for input adornments ("€", "$", "₹"). */
|
|
1840
1939
|
declare function currencySymbol(currency?: string): string;
|
|
1841
1940
|
|
|
1842
|
-
export { AccessibilityType, CURRENCY_CHOICES, CategoryTier, ChartDoc, DEFAULT_CURRENCY, type Dict, ExpandedSeat, type HoldConflict, type HoldInfo, type HoldSelectionRequest, type HoldServerItem, ISeatmapRenderer, type Locale, LodRung, type MoneyFormatOptions, type PanoramaResult, type PickerCallbacks, PickerController, type PickerGAArea, type PickerMapTheme, type PickerOptions, type PickerRealtimeConnection, type PickerRealtimeSink, type PickerRenderPerformanceProfile, type PickerSeat, PickerSelectionError, type PickerSelectionValidator, type PickerSelectionValidity, type PickerSelectionViolation, type PickerStatusChange, type PickerTransport, Point, RendererCallbacks, RendererMinimapSnapshot, RendererOptions, RendererQualityEvidence, RendererViewMode, SUPPORTED_LOCALES, SeatCommercialAttributes, type SeatHoverDetails, SeatStatus, SeatmapRenderer, type SectionCategory, type SectionSummary, type TableSelectionDetails, createRenderer, currencyExponent, currencySymbol, formatDate, formatMinor, formatMoney, fromMinorUnits, generateSeatPanorama, generateSeatThumb, getLocale, loadLocale, resolveLocale, setLocale, setMoneyLocale, setStringOverrides, t, tCount };
|
|
1941
|
+
export { AccessibilityType, CURRENCY_CHOICES, CategoryTier, ChartDoc, DEFAULT_CURRENCY, type Dict, type Direction, ExpandedSeat, GAAreaState, type HoldConflict, type HoldInfo, type HoldSelectionRequest, type HoldServerItem, ISeatmapRenderer, LOCALE_NAMES, type Locale, LodRung, type MoneyFormatOptions, type PanoramaResult, type PickerCallbacks, PickerController, type PickerGAArea, type PickerMapTheme, type PickerOptions, type PickerRealtimeConnection, type PickerRealtimeSink, type PickerRenderPerformanceProfile, type PickerSeat, PickerSelectionError, type PickerSelectionValidator, type PickerSelectionValidity, type PickerSelectionViolation, type PickerStatusChange, type PickerTransport, Point, RendererCallbacks, RendererMinimapSnapshot, RendererOptions, RendererQualityEvidence, RendererViewMode, SUPPORTED_LOCALES, SeatCommercialAttributes, type SeatHoverDetails, SeatStatus, SeatmapRenderer, type SectionCategory, type SectionSummary, TRANSLATED_LOCALES, type TableSelectionDetails, createRenderer, currencyExponent, currencySymbol, formatDate, formatMinor, formatMoney, fromMinorUnits, generateSeatPanorama, generateSeatThumb, getLocale, isLocaleLoaded, loadLocale, localeDirection, resolveLocale, setLocale, setMoneyLocale, setStringOverrides, t, tCount };
|