@seatlayer/js 0.74.0 → 0.75.2

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/manager.js CHANGED
@@ -1,4 +1,4 @@
1
- import{d as T,e as M,g as H}from"./chunk-KESIJ3PK.js";import{A as ye,C as Se,a as v,b as C,c as Z,d as Y,e as Q,f as X,g as J,h as ee,i as te,j as se,k as ie,l as oe,m as ae,n as le,o as ne,p as re,q as ce,r as de,s as he,t as pe,u as me,v as ue,w as be,x as fe,y as ge,z as ve}from"./chunk-Z3G64HUG.js";import"./chunk-OSZ7DOEH.js";import{SeatmapRenderer as Ce,expandChart as Re,computeSections as Ee,floorsOf as Ae,gaAreasOf as $e,gaUnitLabels as He,UNGROUPED_ID as g}from"@seatlayer/core";var ke=/^[a-zA-Z0-9._-]+$/;function we(d){let e;try{e=new URL(d,"https://seatlayer.invalid")}catch{return null}if(e.search||e.hash)return null;let t=/^\/v1\/events\/([^/]+)\/assets\/([^/]+)$/.exec(e.pathname);if(!t)return null;try{let s=decodeURIComponent(t[1]),i=decodeURIComponent(t[2]);return!s||!ke.test(i)?null:{eventKey:s,asset:i}}catch{return null}}function xe(d){try{return/^\/v1\/events\/[^/]+\/assets(?:\/|$)/.test(new URL(d,"https://seatlayer.invalid").pathname)}catch{return!1}}var S=class{constructor(e,t){this.eventKey=e;this.load=t;this.pending=new Map;this.created=new Set;this.disposed=!1}resolve(e){let t=we(e);if(!t)return Promise.resolve(xe(e)?null:e);if(t.eventKey!==this.eventKey||this.disposed)return Promise.resolve(null);let s=`${t.eventKey}/${t.asset}`,i=this.pending.get(s);if(i)return i;let o=this.load(t.eventKey,t.asset).then(a=>{let l=URL.createObjectURL(a);return this.disposed?(URL.revokeObjectURL(l),null):(this.created.add(l),l)}).catch(a=>{throw this.pending.delete(s),a});return this.pending.set(s,o),o}async prepareRendererChart(e){let t=async o=>{if(!o?.url)return;let a=await this.resolve(o.url);if(!a)throw new Error("organizer_event_asset_scope_mismatch");o.url=a},s=async o=>{for(let a of o){if(a.type!=="decorImage")continue;let l=a,r=await this.resolve(l.href);if(!r)throw new Error("organizer_event_asset_scope_mismatch");l.href=r}},i=async o=>{await t(o.backgroundImage),await s(o.objects)};await i(e);for(let o of e.floors??[])await i(o);return e}dispose(){if(!this.disposed){this.disposed=!0;for(let e of this.created)URL.revokeObjectURL(e);this.created.clear(),this.pending.clear()}}};var I="seatlayer-manager-style",B="seatlayer-manager-channels-style",Le=`
1
+ import{b as T,c as M,e as H}from"./chunk-ZE36NABM.js";import{A as ye,C as Se,a as v,b as C,c as Z,d as Y,e as Q,f as X,g as J,h as ee,i as te,j as se,k as ie,l as oe,m as ae,n as le,o as ne,p as re,q as ce,r as de,s as he,t as pe,u as me,v as ue,w as be,x as fe,y as ge,z as ve}from"./chunk-Z3G64HUG.js";import"./chunk-OSZ7DOEH.js";import{SeatmapRenderer as Ce,expandChart as Re,computeSections as Ee,floorsOf as Ae,gaAreasOf as $e,gaUnitLabels as He,UNGROUPED_ID as g}from"@seatlayer/core";var ke=/^[a-zA-Z0-9._-]+$/;function we(d){let e;try{e=new URL(d,"https://seatlayer.invalid")}catch{return null}if(e.search||e.hash)return null;let t=/^\/v1\/events\/([^/]+)\/assets\/([^/]+)$/.exec(e.pathname);if(!t)return null;try{let s=decodeURIComponent(t[1]),i=decodeURIComponent(t[2]);return!s||!ke.test(i)?null:{eventKey:s,asset:i}}catch{return null}}function xe(d){try{return/^\/v1\/events\/[^/]+\/assets(?:\/|$)/.test(new URL(d,"https://seatlayer.invalid").pathname)}catch{return!1}}var S=class{constructor(e,t){this.eventKey=e;this.load=t;this.pending=new Map;this.created=new Set;this.disposed=!1}resolve(e){let t=we(e);if(!t)return Promise.resolve(xe(e)?null:e);if(t.eventKey!==this.eventKey||this.disposed)return Promise.resolve(null);let s=`${t.eventKey}/${t.asset}`,i=this.pending.get(s);if(i)return i;let o=this.load(t.eventKey,t.asset).then(a=>{let l=URL.createObjectURL(a);return this.disposed?(URL.revokeObjectURL(l),null):(this.created.add(l),l)}).catch(a=>{throw this.pending.delete(s),a});return this.pending.set(s,o),o}async prepareRendererChart(e){let t=async o=>{if(!o?.url)return;let a=await this.resolve(o.url);if(!a)throw new Error("organizer_event_asset_scope_mismatch");o.url=a},s=async o=>{for(let a of o){if(a.type!=="decorImage")continue;let l=a,r=await this.resolve(l.href);if(!r)throw new Error("organizer_event_asset_scope_mismatch");l.href=r}},i=async o=>{await t(o.backgroundImage),await s(o.objects)};await i(e);for(let o of e.floors??[])await i(o);return e}dispose(){if(!this.disposed){this.disposed=!0;for(let e of this.created)URL.revokeObjectURL(e);this.created.clear(),this.pending.clear()}}};var I="seatlayer-manager-style",B="seatlayer-manager-channels-style",Le=`
2
2
  /* The floor was 480px, which trapped the cockpit in any host shorter than that:
3
3
  every ancestor here is overflow:hidden, so the bottom of the rail (Create
4
4
  channel, Show archived) was rendered but clipped away by the host and could
package/package.json CHANGED
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "@seatlayer/js",
3
- "version": "0.74.0",
3
+ "version": "0.75.2",
4
4
  "description": "SeatLayer's official JavaScript seating chart and seat map SDK — live availability, seat selection, temporary holds, and a typed API for any web ticketing app.",
5
5
  "license": "SEE LICENSE IN LICENSE",
6
6
  "author": {
7
7
  "name": "SeatLayer",
8
8
  "url": "https://seatlayer.io/"
9
9
  },
10
- "homepage": "https://seatlayer.io/",
10
+ "homepage": "https://docs.seatlayer.io/buyer-sdk/install/",
11
11
  "bugs": {
12
12
  "url": "https://github.com/seatlayer/seatlayer-sdk/issues"
13
13
  },
@@ -68,7 +68,7 @@
68
68
  "typescript"
69
69
  ],
70
70
  "dependencies": {
71
- "@seatlayer/core": "0.74.0"
71
+ "@seatlayer/core": "0.75.2"
72
72
  },
73
73
  "devDependencies": {
74
74
  "tsup": "^8.5.1",