@seatlayer/core 0.59.0 → 0.60.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 +122 -39
- package/dist/index.d.ts +122 -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;
|
|
@@ -1214,6 +1216,8 @@ declare class PickerController {
|
|
|
1214
1216
|
private selectableSeatIds;
|
|
1215
1217
|
private lastSelectionValidity;
|
|
1216
1218
|
private renderer;
|
|
1219
|
+
/** Host-tracked pending GA quantity per area id (the widget cart's chips). */
|
|
1220
|
+
private gaSelected;
|
|
1217
1221
|
private _doc;
|
|
1218
1222
|
/** Section/zone ids hidden from buyers this event (3.3) — seats vanish, not grey. */
|
|
1219
1223
|
private hidden;
|
|
@@ -1405,6 +1409,13 @@ declare class PickerController {
|
|
|
1405
1409
|
/** Seat ids belonging to a currently-closed section (excluded from counts). */
|
|
1406
1410
|
private closedMemberIds;
|
|
1407
1411
|
getGAAreas(): PickerGAArea[];
|
|
1412
|
+
/**
|
|
1413
|
+
* The buyer's own pending GA quantities, per area id — the widget's cart. Kept
|
|
1414
|
+
* here so every availability push repaints the count chips from one truth.
|
|
1415
|
+
*/
|
|
1416
|
+
setGASelection(selected: ReadonlyMap<string, number> | null): void;
|
|
1417
|
+
/** Mirror live GA availability (and the pending chip) onto the map. */
|
|
1418
|
+
pushGAState(): void;
|
|
1408
1419
|
/** Select a quantity from one GA area and hold it atomically. */
|
|
1409
1420
|
holdGA(areaId: string, qty: number, options?: {
|
|
1410
1421
|
tierId?: string | null;
|
|
@@ -1716,37 +1727,95 @@ declare function generateSeatThumb(seat: ExpandedSeat, focalPoint: Point, _neigh
|
|
|
1716
1727
|
|
|
1717
1728
|
/**
|
|
1718
1729
|
* 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
|
-
*
|
|
1730
|
+
* it without dragging in a runtime library. Every KB here lands in the complete
|
|
1731
|
+
* CDN bundle every buyer downloads, which is ~227 KB brotli as of 0.59.0.
|
|
1732
|
+
*
|
|
1733
|
+
* NOTHING in this file may import a non-English locale. English is the built-in
|
|
1734
|
+
* fallback and must resolve synchronously; the other 36 locales are fetched on
|
|
1735
|
+
* demand — see `./bundles.ts` for why that split is load-bearing rather than a
|
|
1736
|
+
* nicety, and `./localeLoaders.ts` for the map the npm build code-splits on.
|
|
1726
1737
|
*
|
|
1727
|
-
* Scope: the buyer surface (picker, public event
|
|
1728
|
-
*
|
|
1729
|
-
*
|
|
1738
|
+
* Scope: the buyer surface (picker, public event page, SDK). Dashboard and
|
|
1739
|
+
* Designer pages route strings through t() as they are rebuilt but ship
|
|
1740
|
+
* English — that is a deliberate scope call, not a gap.
|
|
1730
1741
|
*
|
|
1731
1742
|
* Keys are flat dot-namespaced strings ("picker.holdSeats"). Interpolation
|
|
1732
1743
|
* uses {name} placeholders. Missing keys fall back to English, then to the
|
|
1733
1744
|
* key itself — a page never crashes over a translation.
|
|
1734
1745
|
*/
|
|
1735
|
-
|
|
1746
|
+
/**
|
|
1747
|
+
* Every locale the buyer surface can render, matching the set a chart embed is
|
|
1748
|
+
* expected to cover. `zh-Hans`/`zh-Hant` carry a script subtag because Chinese
|
|
1749
|
+
* cannot be selected by language alone — see {@link resolveLocale}.
|
|
1750
|
+
*/
|
|
1751
|
+
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
1752
|
declare const SUPPORTED_LOCALES: Locale[];
|
|
1753
|
+
/**
|
|
1754
|
+
* Each language's name in itself. A reader scanning a language switcher for
|
|
1755
|
+
* their own language finds "Deutsch", never "German" — an English list is
|
|
1756
|
+
* unreadable to exactly the people who need to change it.
|
|
1757
|
+
*
|
|
1758
|
+
* Exported because a language switcher is integrator surface, not page
|
|
1759
|
+
* furniture: the SDK playground and any customer picker read the same table.
|
|
1760
|
+
*/
|
|
1761
|
+
declare const LOCALE_NAMES: Record<Locale, string>;
|
|
1762
|
+
/**
|
|
1763
|
+
* The locales that actually have a dictionary today, as opposed to the ones the
|
|
1764
|
+
* product intends to cover.
|
|
1765
|
+
*
|
|
1766
|
+
* Two lists rather than one because the CDN build cannot see `localeLoaders.ts`
|
|
1767
|
+
* — that module is deliberately unreachable there — and without this it would
|
|
1768
|
+
* fire a doomed cross-origin request for every locale it does not ship, wait for
|
|
1769
|
+
* the 404, and only then fall back to English. During a rollout that is the
|
|
1770
|
+
* COMMON case, and it delays first paint for a buyer who was always going to see
|
|
1771
|
+
* English.
|
|
1772
|
+
*
|
|
1773
|
+
* Deliberately written out rather than `[...SUPPORTED_LOCALES]`, even now that
|
|
1774
|
+
* the two agree: spreading would make the guard vacuous the moment someone adds
|
|
1775
|
+
* a 38th locale to the supported set, which is exactly when it is needed.
|
|
1776
|
+
* `test/i18nBundles.test.ts` pins this against the loader map and the files on
|
|
1777
|
+
* disk, so the two cannot drift.
|
|
1778
|
+
*/
|
|
1779
|
+
declare const TRANSLATED_LOCALES: Locale[];
|
|
1780
|
+
type Direction = 'ltr' | 'rtl';
|
|
1737
1781
|
type Dict = Record<string, string>;
|
|
1738
|
-
/**
|
|
1782
|
+
/**
|
|
1783
|
+
* explicit setting → stored preference → browser languages → en.
|
|
1784
|
+
*
|
|
1785
|
+
* `navigator.languages` is preferred over `navigator.language` so a reader
|
|
1786
|
+
* whose first choice we do not ship still gets their second rather than
|
|
1787
|
+
* English.
|
|
1788
|
+
*/
|
|
1739
1789
|
declare function resolveLocale(explicit?: string | null, stored?: string | null): Locale;
|
|
1740
1790
|
declare function getLocale(): Locale;
|
|
1791
|
+
/** Whether `locale` (default: the active one) is written right-to-left. */
|
|
1792
|
+
declare function localeDirection(locale?: Locale): Direction;
|
|
1793
|
+
/** Whether a bundle for `locale` is already registered (English always is). */
|
|
1794
|
+
declare function isLocaleLoaded(locale: Locale): boolean;
|
|
1741
1795
|
/**
|
|
1742
1796
|
* Set the active locale. Locale bundles other than English are registered by
|
|
1743
|
-
* the surface that needs them (
|
|
1744
|
-
*
|
|
1797
|
+
* the surface that needs them — `loadLocale()` in `./bundles.ts` is the one
|
|
1798
|
+
* caller that should normally do this.
|
|
1799
|
+
*
|
|
1800
|
+
* Deliberately does NOT touch `document.documentElement.dir`. This module runs
|
|
1801
|
+
* inside an embedded widget on somebody else's page, and flipping the host
|
|
1802
|
+
* document to RTL to render an Arabic seat map would mirror THEIR layout. The
|
|
1803
|
+
* picker sets `lang`/`dir` on its own container instead; read
|
|
1804
|
+
* {@link localeDirection} to do the same on any new surface.
|
|
1745
1805
|
*/
|
|
1746
1806
|
declare function setLocale(locale: Locale, bundle?: Dict): void;
|
|
1747
1807
|
declare function setStringOverrides(next: Dict): void;
|
|
1748
1808
|
declare function t(key: string, vars?: Record<string, string | number>): string;
|
|
1749
|
-
/**
|
|
1809
|
+
/**
|
|
1810
|
+
* "1 seat" / "3 seats" without hand-rolled concatenation.
|
|
1811
|
+
*
|
|
1812
|
+
* The category comes from `Intl.PluralRules`, so a locale that needs `few` or
|
|
1813
|
+
* `many` (most Slavic languages, Romanian, Arabic) gets the right form AS LONG
|
|
1814
|
+
* AS its bundle defines those keys. A bundle missing the exact category falls
|
|
1815
|
+
* back to `.other` rather than throwing — wrong grammar beats a blank string —
|
|
1816
|
+
* which is why `test/i18nBundles.test.ts` fails the build when a bundle omits
|
|
1817
|
+
* a category its own plural rules require.
|
|
1818
|
+
*/
|
|
1750
1819
|
declare function tCount(key: string, count: number, vars?: Record<string, string | number>): string;
|
|
1751
1820
|
/**
|
|
1752
1821
|
* Kept for the SDK surface that imports dates from here. It is a thin pass to
|
|
@@ -1759,24 +1828,38 @@ declare function tCount(key: string, count: number, vars?: Record<string, string
|
|
|
1759
1828
|
declare function formatDate(value: number | Date, opts?: Intl.DateTimeFormatOptions): string;
|
|
1760
1829
|
|
|
1761
1830
|
/**
|
|
1762
|
-
* Locale bundle loader —
|
|
1763
|
-
*
|
|
1764
|
-
*
|
|
1765
|
-
*
|
|
1766
|
-
*
|
|
1767
|
-
*
|
|
1831
|
+
* Locale bundle loader — the ONE place that decides how a non-English
|
|
1832
|
+
* dictionary reaches the page, and the reason 36 locales cost the buyer
|
|
1833
|
+
* nothing.
|
|
1834
|
+
*
|
|
1835
|
+
* There are two delivery paths because there are two builds:
|
|
1836
|
+
*
|
|
1837
|
+
* - **npm / bundler consumers** (and the vendored app copy): a dynamic import
|
|
1838
|
+
* of `./localeLoaders`, whose specifiers every bundler code-splits into one
|
|
1839
|
+
* chunk per locale.
|
|
1840
|
+
* - **the CDN artifact**: a Vite `lib` build with `codeSplitting: false`. It
|
|
1841
|
+
* physically cannot emit a chunk, so a reachable `import('./locales/de')`
|
|
1842
|
+
* is INLINED. Until 0.59.0 that is exactly what happened — es/de/fr shipped
|
|
1843
|
+
* inside `seatlayer.js` to every buyer of every chart while this file's own
|
|
1844
|
+
* comment claimed they were code-split. At ~5 KB brotli each, carrying all
|
|
1845
|
+
* 36 that way would have added ~180 KB to a 227 KB bundle. So the CDN path
|
|
1846
|
+
* loads a sibling ESM asset by absolute URL instead, exactly like the 3D
|
|
1847
|
+
* scene, panorama and hosted-checkout chunks do.
|
|
1848
|
+
*
|
|
1849
|
+
* English is built into the core and never fetched — it is the synchronous
|
|
1850
|
+
* fallback `t()` reads when a key is missing, so it cannot be a network call.
|
|
1768
1851
|
*
|
|
1769
|
-
*
|
|
1770
|
-
*
|
|
1771
|
-
*
|
|
1772
|
-
* codes fall back to English without throwing.
|
|
1852
|
+
* Unknown, unsupported, and not-yet-translated codes fall back to English
|
|
1853
|
+
* without throwing, as does any network or parse failure. A seat map renders
|
|
1854
|
+
* in English rather than not at all.
|
|
1773
1855
|
*/
|
|
1774
1856
|
|
|
1775
1857
|
/**
|
|
1776
1858
|
* 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
|
|
1859
|
+
* active. Returns the locale that ended up active (English on any failure, on
|
|
1860
|
+
* an unsupported code, or on a locale we have not translated yet).
|
|
1778
1861
|
*/
|
|
1779
|
-
declare function loadLocale(code?: string | null): Promise<Locale>;
|
|
1862
|
+
declare function loadLocale(code?: string | null, stored?: string | null): Promise<Locale>;
|
|
1780
1863
|
|
|
1781
1864
|
/**
|
|
1782
1865
|
* Money formatting — the ONE place currency rendering happens.
|
|
@@ -1839,4 +1922,4 @@ declare function formatMinor(minor: number, currency?: string, locale?: string):
|
|
|
1839
1922
|
/** Bare symbol for input adornments ("€", "$", "₹"). */
|
|
1840
1923
|
declare function currencySymbol(currency?: string): string;
|
|
1841
1924
|
|
|
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 };
|
|
1925
|
+
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;
|
|
@@ -1214,6 +1216,8 @@ declare class PickerController {
|
|
|
1214
1216
|
private selectableSeatIds;
|
|
1215
1217
|
private lastSelectionValidity;
|
|
1216
1218
|
private renderer;
|
|
1219
|
+
/** Host-tracked pending GA quantity per area id (the widget cart's chips). */
|
|
1220
|
+
private gaSelected;
|
|
1217
1221
|
private _doc;
|
|
1218
1222
|
/** Section/zone ids hidden from buyers this event (3.3) — seats vanish, not grey. */
|
|
1219
1223
|
private hidden;
|
|
@@ -1405,6 +1409,13 @@ declare class PickerController {
|
|
|
1405
1409
|
/** Seat ids belonging to a currently-closed section (excluded from counts). */
|
|
1406
1410
|
private closedMemberIds;
|
|
1407
1411
|
getGAAreas(): PickerGAArea[];
|
|
1412
|
+
/**
|
|
1413
|
+
* The buyer's own pending GA quantities, per area id — the widget's cart. Kept
|
|
1414
|
+
* here so every availability push repaints the count chips from one truth.
|
|
1415
|
+
*/
|
|
1416
|
+
setGASelection(selected: ReadonlyMap<string, number> | null): void;
|
|
1417
|
+
/** Mirror live GA availability (and the pending chip) onto the map. */
|
|
1418
|
+
pushGAState(): void;
|
|
1408
1419
|
/** Select a quantity from one GA area and hold it atomically. */
|
|
1409
1420
|
holdGA(areaId: string, qty: number, options?: {
|
|
1410
1421
|
tierId?: string | null;
|
|
@@ -1716,37 +1727,95 @@ declare function generateSeatThumb(seat: ExpandedSeat, focalPoint: Point, _neigh
|
|
|
1716
1727
|
|
|
1717
1728
|
/**
|
|
1718
1729
|
* 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
|
-
*
|
|
1730
|
+
* it without dragging in a runtime library. Every KB here lands in the complete
|
|
1731
|
+
* CDN bundle every buyer downloads, which is ~227 KB brotli as of 0.59.0.
|
|
1732
|
+
*
|
|
1733
|
+
* NOTHING in this file may import a non-English locale. English is the built-in
|
|
1734
|
+
* fallback and must resolve synchronously; the other 36 locales are fetched on
|
|
1735
|
+
* demand — see `./bundles.ts` for why that split is load-bearing rather than a
|
|
1736
|
+
* nicety, and `./localeLoaders.ts` for the map the npm build code-splits on.
|
|
1726
1737
|
*
|
|
1727
|
-
* Scope: the buyer surface (picker, public event
|
|
1728
|
-
*
|
|
1729
|
-
*
|
|
1738
|
+
* Scope: the buyer surface (picker, public event page, SDK). Dashboard and
|
|
1739
|
+
* Designer pages route strings through t() as they are rebuilt but ship
|
|
1740
|
+
* English — that is a deliberate scope call, not a gap.
|
|
1730
1741
|
*
|
|
1731
1742
|
* Keys are flat dot-namespaced strings ("picker.holdSeats"). Interpolation
|
|
1732
1743
|
* uses {name} placeholders. Missing keys fall back to English, then to the
|
|
1733
1744
|
* key itself — a page never crashes over a translation.
|
|
1734
1745
|
*/
|
|
1735
|
-
|
|
1746
|
+
/**
|
|
1747
|
+
* Every locale the buyer surface can render, matching the set a chart embed is
|
|
1748
|
+
* expected to cover. `zh-Hans`/`zh-Hant` carry a script subtag because Chinese
|
|
1749
|
+
* cannot be selected by language alone — see {@link resolveLocale}.
|
|
1750
|
+
*/
|
|
1751
|
+
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
1752
|
declare const SUPPORTED_LOCALES: Locale[];
|
|
1753
|
+
/**
|
|
1754
|
+
* Each language's name in itself. A reader scanning a language switcher for
|
|
1755
|
+
* their own language finds "Deutsch", never "German" — an English list is
|
|
1756
|
+
* unreadable to exactly the people who need to change it.
|
|
1757
|
+
*
|
|
1758
|
+
* Exported because a language switcher is integrator surface, not page
|
|
1759
|
+
* furniture: the SDK playground and any customer picker read the same table.
|
|
1760
|
+
*/
|
|
1761
|
+
declare const LOCALE_NAMES: Record<Locale, string>;
|
|
1762
|
+
/**
|
|
1763
|
+
* The locales that actually have a dictionary today, as opposed to the ones the
|
|
1764
|
+
* product intends to cover.
|
|
1765
|
+
*
|
|
1766
|
+
* Two lists rather than one because the CDN build cannot see `localeLoaders.ts`
|
|
1767
|
+
* — that module is deliberately unreachable there — and without this it would
|
|
1768
|
+
* fire a doomed cross-origin request for every locale it does not ship, wait for
|
|
1769
|
+
* the 404, and only then fall back to English. During a rollout that is the
|
|
1770
|
+
* COMMON case, and it delays first paint for a buyer who was always going to see
|
|
1771
|
+
* English.
|
|
1772
|
+
*
|
|
1773
|
+
* Deliberately written out rather than `[...SUPPORTED_LOCALES]`, even now that
|
|
1774
|
+
* the two agree: spreading would make the guard vacuous the moment someone adds
|
|
1775
|
+
* a 38th locale to the supported set, which is exactly when it is needed.
|
|
1776
|
+
* `test/i18nBundles.test.ts` pins this against the loader map and the files on
|
|
1777
|
+
* disk, so the two cannot drift.
|
|
1778
|
+
*/
|
|
1779
|
+
declare const TRANSLATED_LOCALES: Locale[];
|
|
1780
|
+
type Direction = 'ltr' | 'rtl';
|
|
1737
1781
|
type Dict = Record<string, string>;
|
|
1738
|
-
/**
|
|
1782
|
+
/**
|
|
1783
|
+
* explicit setting → stored preference → browser languages → en.
|
|
1784
|
+
*
|
|
1785
|
+
* `navigator.languages` is preferred over `navigator.language` so a reader
|
|
1786
|
+
* whose first choice we do not ship still gets their second rather than
|
|
1787
|
+
* English.
|
|
1788
|
+
*/
|
|
1739
1789
|
declare function resolveLocale(explicit?: string | null, stored?: string | null): Locale;
|
|
1740
1790
|
declare function getLocale(): Locale;
|
|
1791
|
+
/** Whether `locale` (default: the active one) is written right-to-left. */
|
|
1792
|
+
declare function localeDirection(locale?: Locale): Direction;
|
|
1793
|
+
/** Whether a bundle for `locale` is already registered (English always is). */
|
|
1794
|
+
declare function isLocaleLoaded(locale: Locale): boolean;
|
|
1741
1795
|
/**
|
|
1742
1796
|
* Set the active locale. Locale bundles other than English are registered by
|
|
1743
|
-
* the surface that needs them (
|
|
1744
|
-
*
|
|
1797
|
+
* the surface that needs them — `loadLocale()` in `./bundles.ts` is the one
|
|
1798
|
+
* caller that should normally do this.
|
|
1799
|
+
*
|
|
1800
|
+
* Deliberately does NOT touch `document.documentElement.dir`. This module runs
|
|
1801
|
+
* inside an embedded widget on somebody else's page, and flipping the host
|
|
1802
|
+
* document to RTL to render an Arabic seat map would mirror THEIR layout. The
|
|
1803
|
+
* picker sets `lang`/`dir` on its own container instead; read
|
|
1804
|
+
* {@link localeDirection} to do the same on any new surface.
|
|
1745
1805
|
*/
|
|
1746
1806
|
declare function setLocale(locale: Locale, bundle?: Dict): void;
|
|
1747
1807
|
declare function setStringOverrides(next: Dict): void;
|
|
1748
1808
|
declare function t(key: string, vars?: Record<string, string | number>): string;
|
|
1749
|
-
/**
|
|
1809
|
+
/**
|
|
1810
|
+
* "1 seat" / "3 seats" without hand-rolled concatenation.
|
|
1811
|
+
*
|
|
1812
|
+
* The category comes from `Intl.PluralRules`, so a locale that needs `few` or
|
|
1813
|
+
* `many` (most Slavic languages, Romanian, Arabic) gets the right form AS LONG
|
|
1814
|
+
* AS its bundle defines those keys. A bundle missing the exact category falls
|
|
1815
|
+
* back to `.other` rather than throwing — wrong grammar beats a blank string —
|
|
1816
|
+
* which is why `test/i18nBundles.test.ts` fails the build when a bundle omits
|
|
1817
|
+
* a category its own plural rules require.
|
|
1818
|
+
*/
|
|
1750
1819
|
declare function tCount(key: string, count: number, vars?: Record<string, string | number>): string;
|
|
1751
1820
|
/**
|
|
1752
1821
|
* Kept for the SDK surface that imports dates from here. It is a thin pass to
|
|
@@ -1759,24 +1828,38 @@ declare function tCount(key: string, count: number, vars?: Record<string, string
|
|
|
1759
1828
|
declare function formatDate(value: number | Date, opts?: Intl.DateTimeFormatOptions): string;
|
|
1760
1829
|
|
|
1761
1830
|
/**
|
|
1762
|
-
* Locale bundle loader —
|
|
1763
|
-
*
|
|
1764
|
-
*
|
|
1765
|
-
*
|
|
1766
|
-
*
|
|
1767
|
-
*
|
|
1831
|
+
* Locale bundle loader — the ONE place that decides how a non-English
|
|
1832
|
+
* dictionary reaches the page, and the reason 36 locales cost the buyer
|
|
1833
|
+
* nothing.
|
|
1834
|
+
*
|
|
1835
|
+
* There are two delivery paths because there are two builds:
|
|
1836
|
+
*
|
|
1837
|
+
* - **npm / bundler consumers** (and the vendored app copy): a dynamic import
|
|
1838
|
+
* of `./localeLoaders`, whose specifiers every bundler code-splits into one
|
|
1839
|
+
* chunk per locale.
|
|
1840
|
+
* - **the CDN artifact**: a Vite `lib` build with `codeSplitting: false`. It
|
|
1841
|
+
* physically cannot emit a chunk, so a reachable `import('./locales/de')`
|
|
1842
|
+
* is INLINED. Until 0.59.0 that is exactly what happened — es/de/fr shipped
|
|
1843
|
+
* inside `seatlayer.js` to every buyer of every chart while this file's own
|
|
1844
|
+
* comment claimed they were code-split. At ~5 KB brotli each, carrying all
|
|
1845
|
+
* 36 that way would have added ~180 KB to a 227 KB bundle. So the CDN path
|
|
1846
|
+
* loads a sibling ESM asset by absolute URL instead, exactly like the 3D
|
|
1847
|
+
* scene, panorama and hosted-checkout chunks do.
|
|
1848
|
+
*
|
|
1849
|
+
* English is built into the core and never fetched — it is the synchronous
|
|
1850
|
+
* fallback `t()` reads when a key is missing, so it cannot be a network call.
|
|
1768
1851
|
*
|
|
1769
|
-
*
|
|
1770
|
-
*
|
|
1771
|
-
*
|
|
1772
|
-
* codes fall back to English without throwing.
|
|
1852
|
+
* Unknown, unsupported, and not-yet-translated codes fall back to English
|
|
1853
|
+
* without throwing, as does any network or parse failure. A seat map renders
|
|
1854
|
+
* in English rather than not at all.
|
|
1773
1855
|
*/
|
|
1774
1856
|
|
|
1775
1857
|
/**
|
|
1776
1858
|
* 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
|
|
1859
|
+
* active. Returns the locale that ended up active (English on any failure, on
|
|
1860
|
+
* an unsupported code, or on a locale we have not translated yet).
|
|
1778
1861
|
*/
|
|
1779
|
-
declare function loadLocale(code?: string | null): Promise<Locale>;
|
|
1862
|
+
declare function loadLocale(code?: string | null, stored?: string | null): Promise<Locale>;
|
|
1780
1863
|
|
|
1781
1864
|
/**
|
|
1782
1865
|
* Money formatting — the ONE place currency rendering happens.
|
|
@@ -1839,4 +1922,4 @@ declare function formatMinor(minor: number, currency?: string, locale?: string):
|
|
|
1839
1922
|
/** Bare symbol for input adornments ("€", "$", "₹"). */
|
|
1840
1923
|
declare function currencySymbol(currency?: string): string;
|
|
1841
1924
|
|
|
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 };
|
|
1925
|
+
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 };
|