@seatlayer/core 0.66.0 → 0.67.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.
Files changed (30) hide show
  1. package/dist/chunk-JLJHFU2I.js +1 -0
  2. package/dist/core/inventory/index.d.cts +2 -2
  3. package/dist/core/inventory/index.d.ts +2 -2
  4. package/dist/core/layout/index.d.cts +2 -2
  5. package/dist/core/layout/index.d.ts +2 -2
  6. package/dist/core/quality/index.cjs +1 -1
  7. package/dist/core/quality/index.d.cts +2 -2
  8. package/dist/core/quality/index.d.ts +2 -2
  9. package/dist/core/quality/index.js +1 -1
  10. package/dist/core/sections/index.d.cts +1 -1
  11. package/dist/core/sections/index.d.ts +1 -1
  12. package/dist/index.cjs +1 -1
  13. package/dist/index.d.cts +6 -6
  14. package/dist/index.d.ts +6 -6
  15. package/dist/index.js +1 -1
  16. package/dist/{layout-KskIwa_M.d.ts → layout-BSb0-47G.d.ts} +1 -1
  17. package/dist/{layout-c1W3klrb.d.cts → layout-wVlsj-_w.d.cts} +1 -1
  18. package/dist/openPanorama-ALLZ6ADE.js +20 -0
  19. package/dist/{renderedQuality-BSvWFkqa.d.ts → renderedQuality-CN3Y3huz.d.ts} +1 -1
  20. package/dist/{renderedQuality-B8cNVHeL.d.cts → renderedQuality-UNltbHTz.d.cts} +1 -1
  21. package/dist/{renderer-CwmnvyXA.d.ts → renderer-BxLV6zjl.d.ts} +3 -0
  22. package/dist/{renderer-ChUHIIr9.d.cts → renderer-DOVelTZw.d.cts} +3 -0
  23. package/dist/{ticketRestrictions-Dr9htXq_.d.cts → ticketRestrictions-D0GRRQ3i.d.cts} +1 -1
  24. package/dist/{ticketRestrictions-B-opYvBY.d.ts → ticketRestrictions-SteRFSGg.d.ts} +1 -1
  25. package/dist/view3d/index.cjs +47 -47
  26. package/dist/view3d/index.d.cts +1 -1
  27. package/dist/view3d/index.d.ts +1 -1
  28. package/dist/view3d/index.js +28 -47
  29. package/package.json +1 -1
  30. package/dist/chunk-LVUGIKHG.js +0 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@seatlayer/core",
3
- "version": "0.66.0",
3
+ "version": "0.67.2",
4
4
  "description": "Framework-agnostic seat-rendering runtime shared by the SeatLayer SDKs.",
5
5
  "license": "SEE LICENSE IN LICENSE",
6
6
  "author": {
@@ -1 +0,0 @@
1
- import{g as P,s as b}from"./chunk-GXMGOWKB.js";var Z=3,f=4.5,S=3,j=24,ee=20;function E(t){return t.filter(s=>s.visible&&!!s.screenBox)}function v(t,s){return t.x<s.x+s.width&&t.x+t.width>s.x&&t.y<s.y+s.height&&t.y+t.height>s.y}function m(t){return t.length?Math.round(Math.min(...t)*100)/100:null}function o(t,s,a){return a.length?{code:t,message:s,count:a.length,samples:a.slice(0,ee)}:null}function L(t,s,a){return{primaryId:t.seatId,primaryLabel:t.label,...s==null?{}:{measured:Math.round(s*100)/100},...a==null?{}:{minimum:a}}}function Q(t,s,a){return{primaryId:t.id,primaryLabel:t.label,...s==null?{}:{measured:Math.round(s*100)/100},...a==null?{}:{minimum:a}}}function H(t,s,a){return{primaryId:t.objectId,primaryLabel:t.text,...s==null?{}:{measured:Math.round(s*100)/100},...a==null?{}:{minimum:a}}}function x(t,s,a,l){return{primaryId:t,primaryLabel:s,secondaryId:a,secondaryLabel:l}}function ie(t,s="overview",a=null){let l=E(t.labels),c=E(t.hierarchyLabels),d=E(t.freeTextLabels),B=t.gaAreas.filter(e=>e.visible),O=l.map(e=>b(e.ink,e.fill)??0),D=c.map(e=>b(e.ink,e.fill)??0),$=d.map(e=>b(e.ink,e.background)??0),W=B.map(e=>b(e.effectiveBackground,t.canvasBackground)??0),u=a?t.labels.filter(e=>e.categoryKey===a):t.labels,y=a?t.gaAreas.filter(e=>e.categoryKey===a):t.gaAreas,p=u.filter(e=>e.selected),h=u.filter(e=>e.status==="held"),g=u.filter(e=>e.status==="booked"),k=u.filter(e=>e.pointerTarget.active),V=new Set([...t.labels.filter(e=>e.visible&&(e.opacity>.25||e.selected||e.status!=="free")).map(e=>e.categoryKey),...t.gaAreas.filter(e=>e.visible&&e.opacity>.1).map(e=>e.categoryKey)]),w=p.length?m(p.flatMap(e=>[b(t.selectionRingColor,t.canvasBackground)??0,b(t.selectionRingColor,e.fill)??0])):null,n=[],I=(e,i)=>Array.from({length:e},(T,R)=>({primaryId:`overview:${R+1}`,primaryLabel:i}));if(s==="overview"&&t.rung==="sections"&&(n.push(o("overview-section-category-paint","Section overview shells must use the neutral hierarchy palette, not category paint",I(t.overviewStyle.categoryPaintedSectionShells,"category-painted section shell"))),n.push(o("overview-category-detail-visible","Category-tinted section detail must wait until section focus or seat zoom",I(t.overviewStyle.visibleCategoryDetailOutlines,"category detail outline"))),n.push(o("overview-row-hints-visible","Row and seat patterns must not clutter the section overview",I(t.overviewStyle.visibleSectionRowHints,"section row hint"))),n.push(o("overview-availability-clutter","Live availability counts belong in focused detail, not on section overview shells",I(t.overviewStyle.visibleSectionAvailabilityLabels,"section availability label"))),n.push(o("overview-ga-detail-visible","Section-contained standing paint belongs in focused detail, not on section overview shells",I(t.overviewStyle.visibleSectionGADetails,"section-contained GA detail")))),n.push(o("bookable-label-undersized","Visible bookable labels must meet the rendered small-text size floor",l.filter(e=>e.renderedFontPx<t.minimumVisibleLabelPx).map(e=>L(e,e.renderedFontPx,t.minimumVisibleLabelPx)))),s==="interaction"){let e=u.length>0,i=y.length>0,T=e||i,R=y.filter(r=>r.visible),X=new Set([...u.flatMap(r=>r.sectionId?[r.sectionId]:[]),...y.flatMap(r=>r.sectionId?[r.sectionId]:[])]),Y=new Set([...t.labels.map(r=>r.categoryKey),...t.gaAreas.map(r=>r.categoryKey)]),A=r=>r.screenCenter.x>=0&&r.screenCenter.x<=t.viewport.width&&r.screenCenter.y>=0&&r.screenCenter.y<=t.viewport.height;n.push(o("detail-rung-missing","Interaction evidence with bookable inventory must render the seat-detail rung",T&&t.rung!=="seats"?[{primaryId:"renderer",primaryLabel:t.rung}]:[])),n.push(o("detail-inventory-not-visible","Interaction evidence must frame at least one real bookable unit",T&&!u.some(A)&&!R.length?[{primaryId:"renderer",primaryLabel:"no target inventory in viewport"}]:[])),n.push(o("pointer-target-inactive","Interaction evidence must expose a live production pointer target",e&&!k.some(A)||!e&&i&&!R.some(r=>r.interactive)?[{primaryId:"renderer",primaryLabel:"no active pointer target in viewport"}]:[])),n.push(o("pointer-target-undersized","Every active production pointer target must reach at least 24 CSS pixels",k.filter(r=>A(r)&&r.pointerTarget.effectiveMinimumPx<j).map(r=>L(r,r.pointerTarget.effectiveMinimumPx,j)))),n.push(o("selected-state-missing","Interaction evidence must paint a selected unit and its renderer-owned ring",e&&(!p.length||!p.some(r=>t.selectionRingSeatIds.includes(r.seatId)))?[{primaryId:"renderer",primaryLabel:"selected state"}]:[])),n.push(o("selected-state-contrast-low","The selected-state ring must maintain 3:1 graphical contrast with the canvas",p.length&&(w??0)<S?[{primaryId:p[0].seatId,primaryLabel:p[0].label,measured:Math.round((w??0)*100)/100,minimum:S}]:[])),n.push(o("held-state-missing","Interaction evidence must paint a held state when the floor has at least two status-managed units",u.length>=2&&!h.length?[{primaryId:"renderer",primaryLabel:"held state"}]:[])),n.push(o("booked-state-missing","Interaction evidence must paint a taken state when the floor has at least three status-managed units",u.length>=3&&!g.length?[{primaryId:"renderer",primaryLabel:"booked state"}]:[]));let q=new Set(h.map(r=>`${r.fill.toLowerCase()}:${r.opacity}`)),J=new Set(g.map(r=>`${r.fill.toLowerCase()}:${r.opacity}`));n.push(o("status-state-indistinct","Held and taken evidence must resolve to distinct renderer paint",h.length&&g.length&&[...q].some(r=>J.has(r))?[{primaryId:h[0].seatId,primaryLabel:h[0].label,secondaryId:g[0].seatId,secondaryLabel:g[0].label}]:[])),n.push(o("section-focus-missing","Interaction evidence must exercise section focus and its backdrop when section membership exists",X.size&&(!t.focusedSectionId||!t.focusBackdropVisible)?[{primaryId:"renderer",primaryLabel:"section focus"}]:[])),n.push(o("category-filter-missing","Interaction evidence must exercise a category filter when multiple categories exist",Y.size>=2&&(!t.categoryFilterKeys||!t.categoryFilterKeys.length)?[{primaryId:"renderer",primaryLabel:"category filter"}]:[]));let F=t.labels.filter(r=>r.status==="free"&&!r.selected&&t.categoryFilterKeys!=null&&!t.categoryFilterKeys.includes(r.categoryKey)),C=t.gaAreas.filter(r=>t.categoryFilterKeys!=null&&!t.categoryFilterKeys.includes(r.categoryKey));n.push(o("category-filter-ineffective","The active category filter must visibly dim excluded free inventory",(F.length||C.length)&&!F.some(r=>r.opacity<=.25)&&!C.some(r=>r.opacity<=.1)?[...F.map(r=>L(r,r.opacity)),...C.map(r=>({primaryId:r.areaId,primaryLabel:r.label,measured:r.opacity}))]:[])),n.push(o("target-category-not-visible","A category-specific interaction scene must visibly paint its exact target category",a&&!V.has(a)?[{primaryId:a,primaryLabel:a}]:[])),n.push(o("target-category-filter-mismatch","A category-specific interaction scene must bind its filter to only the exact target category",a&&(t.categoryFilterKeys?.length!==1||t.categoryFilterKeys[0]!==a)?[{primaryId:a,primaryLabel:a}]:[]))}n.push(o("bookable-label-contrast-low","Visible bookable labels must meet 4.5:1 contrast against their actual paint",l.flatMap(e=>{let i=b(e.ink,e.fill)??0;return i<f?[L(e,i,f)]:[]})));let M=[];for(let e=0;e<l.length;e+=1)for(let i=0;i<e;i+=1)v(l[e].screenBox,l[i].screenBox)&&M.push(x(l[i].seatId,l[i].label,l[e].seatId,l[e].label));n.push(o("bookable-label-collision","Visible bookable labels must not overlap",M)),n.push(o("hierarchy-label-undersized","Visible section and zone labels must meet the rendered small-text size floor",c.filter(e=>e.renderedFontPx<P).map(e=>Q(e,e.renderedFontPx,P)))),n.push(o("hierarchy-label-contrast-low","Visible section and zone labels must meet 4.5:1 contrast against their backing paint",c.flatMap(e=>{let i=b(e.ink,e.fill)??0;return i<f?[Q(e,i,f)]:[]}))),n.push(o("hierarchy-label-outside-section","Visible section labels must remain inside the filled section surface and outside holes",c.filter(e=>e.kind==="section"&&e.fitsContainer===!1).map(e=>Q(e))));let K=[];for(let e=0;e<c.length;e+=1)for(let i=0;i<e;i+=1)v(c[e].screenBox,c[i].screenBox)&&K.push(x(c[i].id,c[i].label,c[e].id,c[e].label));n.push(o("hierarchy-label-collision","Visible hierarchy labels must not overlap each other",K));let _=[];for(let e of c)for(let i of l)v(e.screenBox,i.screenBox)&&_.push(x(e.id,e.label,i.seatId,i.label));n.push(o("hierarchy-bookable-collision","Visible hierarchy labels must not overlap bookable labels",_)),n.push(o("free-text-undersized","Visible chart text must meet the rendered small-text size floor",d.filter(e=>e.renderedFontPx<t.minimumVisibleLabelPx).map(e=>H(e,e.renderedFontPx,t.minimumVisibleLabelPx)))),n.push(o("free-text-contrast-low","Visible chart text must meet 4.5:1 contrast against its measured background",d.flatMap(e=>{let i=b(e.ink,e.background)??0;return i<f?[H(e,i,f)]:[]})));let z=[];for(let e=0;e<d.length;e+=1)for(let i=0;i<e;i+=1)v(d[e].screenBox,d[i].screenBox)&&z.push(x(d[i].objectId,d[i].text,d[e].objectId,d[e].text));n.push(o("free-text-collision","Visible chart text labels must not overlap each other",z));let G=[];for(let e of d)for(let i of l)v(e.screenBox,i.screenBox)&&G.push(x(e.objectId,e.text,i.seatId,i.label));n.push(o("free-text-bookable-collision","Visible chart text must not overlap bookable labels",G));let U=[];for(let e of d)for(let i of c)v(e.screenBox,i.screenBox)&&U.push(x(e.objectId,e.text,i.id,i.label));n.push(o("free-text-hierarchy-collision","Visible chart text must not overlap hierarchy labels",U)),n.push(o("ga-contrast-low","Visible GA surfaces must maintain 3:1 graphical contrast with the canvas",B.flatMap(e=>{let i=b(e.effectiveBackground,t.canvasBackground)??0;return i<S?[{primaryId:e.areaId,primaryLabel:e.label,measured:Math.round(i*100)/100,minimum:S}]:[]})));let N=n.filter(e=>!!e);return{version:Z,passed:N.length===0,state:s,targetCategoryKey:a,resolvedRules:["rendered-overview-label-size","rendered-overview-label-contrast","rendered-overview-label-collision","rendered-overview-hierarchy-containment","rendered-overview-section-first-style","rendered-overview-ga-contrast",...s==="interaction"?["rendered-detail-inventory","rendered-pointer-target","rendered-selected-held-taken-states","rendered-section-focus","rendered-category-filter"]:[]],viewport:t.viewport,canvasBackground:t.canvasBackground,effectiveScale:t.effectiveScale,rung:t.rung,inventory:{totalBookableUnits:t.totalBookableUnits,totalLabelledBookableUnits:t.totalLabelledBookableUnits,visibleBookableLabels:l.length,hiddenBookableLabels:t.hiddenLabels,visibleHierarchyLabels:c.length,visibleFreeTextLabels:d.length,visibleGAAreas:B.length},overviewStyle:t.overviewStyle,composition:{hierarchy:t.hierarchyLabels.filter(e=>e.role==="name").map(e=>({id:e.id,kind:e.kind,label:e.label,visible:e.visible})).sort((e,i)=>e.kind.localeCompare(i.kind)||e.id.localeCompare(i.id)),labelledObjects:t.freeTextLabels.map(e=>({objectId:e.objectId,kind:e.kind,text:e.text,visible:e.visible})).sort((e,i)=>e.objectId.localeCompare(i.objectId)||e.kind.localeCompare(i.kind)),gaAreas:t.gaAreas.map(e=>({areaId:e.areaId,label:e.label,categoryKey:e.categoryKey,...e.sectionId?{sectionId:e.sectionId}:{},visible:e.visible})).sort((e,i)=>e.areaId.localeCompare(i.areaId)),bookableSectionIds:[...new Set(t.labels.flatMap(e=>e.sectionId?[e.sectionId]:[]))].sort(),categoryKeys:[...new Set([...t.labels.map(e=>e.categoryKey),...t.gaAreas.map(e=>e.categoryKey)])].sort(),activeCategoryKeys:[...V].sort()},metrics:{minimumRenderedBookableLabelPx:m(l.map(e=>e.renderedFontPx)),minimumBookableLabelContrast:m(O),minimumRenderedHierarchyLabelPx:m(c.map(e=>e.renderedFontPx)),minimumHierarchyLabelContrast:m(D),minimumRenderedFreeTextPx:m(d.map(e=>e.renderedFontPx)),minimumFreeTextContrast:m($),minimumGAContrast:m(W),minimumEffectivePointerTargetPx:m(k.map(e=>e.pointerTarget.effectiveMinimumPx)),selectedRingContrast:w==null?null:Math.round(w*100)/100},interaction:{applicable:{detail:u.length>0||y.length>0,pointer:u.length>0||y.length>0,held:u.length>=2,booked:u.length>=3,sectionFocus:u.some(e=>!!e.sectionId)||y.some(e=>!!e.sectionId),categoryFilter:new Set([...t.labels.map(e=>e.categoryKey),...t.gaAreas.map(e=>e.categoryKey)]).size>=2},selectedUnits:p.length,heldUnits:h.length,bookedUnits:g.length,activePointerTargets:k.length,focusedSectionId:t.focusedSectionId,focusBackdropVisible:t.focusBackdropVisible,categoryFilterKeys:t.categoryFilterKeys},findings:N}}export{Z as a,ie as b};