@lockerverse/react 0.2.109-dev.1 → 0.2.111-dev.1

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/README.md CHANGED
@@ -459,7 +459,7 @@ Built-in styled UI is the default for Lovable. There is no automatic headless sw
459
459
  ## Public event listings
460
460
 
461
461
  Use the public Events entry to show publicly listed Events that are happening
462
- now or start in the future. It does not load ticket or payment UI.
462
+ now, start in the future, or have ended. It does not load ticket or payment UI.
463
463
 
464
464
  ```tsx
465
465
  import {
@@ -481,7 +481,8 @@ states. `title` sets the visible heading, `showHeading` can hide it, and
481
481
  `America/New_York`. Use `style` with `LockerverseStyle` tokens or `className`
482
482
  to match the host site. Links open in a new tab when they use HTTP or HTTPS.
483
483
  Events can include an optional `imageUrl`. The list uses image cards when an
484
- image is present and a date tile when it is absent. It groups events into
485
- "Happening now" and "Upcoming" and shows a share action on each card. Sharing
486
- uses the event link when one exists; otherwise it uses a link to the event card
487
- on the host page.
484
+ image is present and a date tile when it is absent. The default view groups
485
+ events into "Happening now" and "Upcoming". The "Past Events" view loads on
486
+ demand and offers "Load more" for older events. Each card has a share action.
487
+ Sharing uses the event link when one exists; otherwise it uses a link to the
488
+ event card on the host page.
@@ -50,6 +50,29 @@
50
50
  overflow-wrap: anywhere;
51
51
  }
52
52
 
53
+ .lockerverse-public-events__tabs {
54
+ display: flex;
55
+ gap: 24px;
56
+ margin-bottom: 24px;
57
+ border-bottom: 1px solid var(--lockerverse-border);
58
+ }
59
+
60
+ .lockerverse-public-events .lockerverse-public-events__tab {
61
+ min-height: 44px;
62
+ padding: 0 0 10px;
63
+ margin: 0;
64
+ font-weight: 600;
65
+ color: var(--lockerverse-muted);
66
+ border: 0;
67
+ border-bottom: 2px solid transparent;
68
+ }
69
+
70
+ .lockerverse-public-events
71
+ .lockerverse-public-events__tab[aria-pressed="true"] {
72
+ color: var(--lockerverse-text);
73
+ border-bottom-color: var(--lockerverse-accent);
74
+ }
75
+
53
76
  .lockerverse-public-events__group + .lockerverse-public-events__group {
54
77
  margin-top: 32px;
55
78
  }
@@ -257,6 +280,12 @@
257
280
  color: var(--lockerverse-muted);
258
281
  }
259
282
 
283
+ .lockerverse-public-events .lockerverse-public-events__load-more {
284
+ display: block;
285
+ margin: 20px auto 0;
286
+ border-radius: 8px;
287
+ }
288
+
260
289
  @media (max-width: 500px) {
261
290
  .lockerverse-public-events {
262
291
  padding: 20px 8px;
@@ -1 +1 @@
1
- {"version":3,"file":"public-events.d.ts","names":[],"sources":["../src/use-lockerverse-public-events.ts","../src/lockerverse-public-events.tsx"],"mappings":";;;KAUY;EACV,QAAQ;EACR,QAAQ;EACR;EACA,OAAO;EACP;;;iBAIc,2BACd,SAAS,uCACR;;;KCfS;EACV,QAAQ;;EAER;EACA;EACA;;EAEA;EACA,QAAQ;EACR,QAAQ;EACR;;;iBA4Mc,0BACd,QACA,OACA,aACA,cACA,UACA,OACA,OACA,aACC,+CAA4B,IAAA"}
1
+ {"version":3,"file":"public-events.d.ts","names":[],"sources":["../src/use-lockerverse-public-events.ts","../src/lockerverse-public-events.tsx"],"mappings":";;;KAUY;EACV,QAAQ;EACR,QAAQ;EACR;EACA,OAAO;EACP;;;iBAIc,2BACd,SAAS,uCACR;;;KCfS;EACV,QAAQ;;EAER;EACA;EACA;;EAEA;EACA,QAAQ;EACR,QAAQ;EACR;;;iBAoNc,0BACd,QACA,OACA,aACA,cACA,UACA,OACA,OACA,aACC,+CAA4B,IAAA"}
@@ -1,2 +1,2 @@
1
- import{t as e}from"./immutable-resource-identity.js";import{Share2 as t}from"lucide-react";import{useCallback as n,useEffect as r,useRef as i,useState as a}from"react";import{Fragment as o,jsx as s,jsxs as c}from"react/jsx-runtime";import{createLockerversePublicEventsClient as l}from"@lockerverse/sdk/public-events";function u(e,t){return new Intl.DateTimeFormat(`en-US`,{day:`numeric`,month:`short`,timeZone:t,year:`numeric`}).format(new Date(e))}function d(e,t){return new Intl.DateTimeFormat(`en-US`,{hour:`numeric`,minute:`2-digit`,timeZone:t,timeZoneName:`short`}).format(new Date(e))}function f(e){if(!e)return null;try{let t=new URL(e);return t.protocol===`https:`||t.protocol===`http:`?t.toString():null}catch{return null}}function p(e){let t=f(e.link);if(t)return t;let n=new URL(window.location.href);return n.hash=`event-${e.id}`,n.toString()}function m({item:e,timeZone:n,active:r}){let[i,l]=a(!1),[m,h]=a(!1),[g,_]=a(null),v=new Date(e.startAt),y=new Intl.DateTimeFormat(`en-US`,{month:`short`,timeZone:n}).format(v),b=new Intl.DateTimeFormat(`en-US`,{day:`numeric`,timeZone:n}).format(v),x=u(e.startAt,n)===u(e.endAt,n)?d(e.endAt,n):`${u(e.endAt,n)} at ${d(e.endAt,n)}`,S=f(e.link),C=f(e.imageUrl),w=(e.description?.length??0)>130;async function T(){let t=p(e);if(navigator.share)try{await navigator.share({title:e.name,url:t});return}catch(e){if(e instanceof DOMException&&e.name===`AbortError`)return}try{await navigator.clipboard.writeText(t),h(!0)}catch{_(t)}}return s(`li`,{className:`lockerverse-public-events__item`,id:`event-${e.id}`,children:c(`article`,{className:[`lockerverse-public-events__row`,C?`lockerverse-public-events__row--with-image`:``].filter(Boolean).join(` `),children:[C?s(`img`,{alt:``,className:`lockerverse-public-events__image`,height:124,loading:`lazy`,src:C,width:154}):c(`div`,{"aria-hidden":`true`,className:`lockerverse-public-events__date`,children:[s(`span`,{className:`lockerverse-public-events__month`,children:y}),s(`span`,{className:`lockerverse-public-events__day`,children:b})]}),c(`div`,{className:`lockerverse-public-events__content`,children:[c(`div`,{className:`lockerverse-public-events__meta`,children:[s(`time`,{dateTime:e.startAt,children:u(e.startAt,n)}),r?s(`span`,{className:`lockerverse-public-events__live`,children:`Live now`}):null]}),s(`h4`,{children:e.name}),c(`p`,{className:`lockerverse-public-events__time`,children:[s(`time`,{dateTime:e.startAt,children:d(e.startAt,n)}),s(`span`,{"aria-hidden":`true`,children:` — `}),s(`time`,{dateTime:e.endAt,children:x})]}),e.location?s(`p`,{className:`lockerverse-public-events__place`,children:e.location}):null,e.description?c(o,{children:[s(`p`,{className:[`lockerverse-public-events__description`,w&&!i?`lockerverse-public-events__description--clamped`:``].filter(Boolean).join(` `),children:e.description}),w?s(`button`,{"aria-expanded":i,className:`lockerverse-public-events__more`,onClick:()=>l(!i),type:`button`,children:i?`Show less`:`Read more`}):null]}):null,c(`div`,{className:`lockerverse-public-events__actions`,children:[S?c(`a`,{className:`lockerverse-public-events__link`,href:S,rel:`noopener noreferrer`,target:`_blank`,children:[`View event `,s(`span`,{"aria-hidden":`true`,children:`↗`})]}):null,c(`button`,{"aria-label":`Share ${e.name}`,className:`lockerverse-public-events__share`,onClick:T,type:`button`,children:[s(t,{"aria-hidden":`true`,size:16,strokeWidth:1.8}),m?`Link copied`:`Share`]})]}),g?c(`label`,{className:`lockerverse-public-events__copy-link`,children:[`Copy event link`,s(`input`,{onFocus:e=>e.currentTarget.select(),readOnly:!0,value:g})]}):null]})]})})}function h({events:e,title:t=`Events`,showHeading:n=!0,emptyMessage:i=`No events yet.`,timeZone:o=`America/New_York`,theme:l=`dark`,style:u,className:d}){let[f,p]=a(()=>Date.now());r(()=>{let e=window.setInterval(()=>p(Date.now()),6e4);return()=>window.clearInterval(e)},[]);let h=e.events||[],g=h.filter(e=>new Date(e.startAt).getTime()<=f&&new Date(e.endAt).getTime()>f),_=h.filter(e=>new Date(e.startAt).getTime()>f);return c(`section`,{"aria-busy":e.loading,"aria-label":t,className:[`lockerverse-public-events`,d].filter(Boolean).join(` `),"data-lockerverse-theme":l,style:u,children:[n?s(`h2`,{children:t}):null,e.loading&&!e.events?s(`p`,{role:`status`,children:`Loading events…`}):null,e.error?c(`div`,{role:`alert`,children:[s(`p`,{children:e.error.message}),s(`button`,{onClick:e.refresh,type:`button`,children:`Try again`})]}):null,e.events&&g.length===0&&_.length===0?s(`p`,{className:`lockerverse-public-events__empty`,children:i}):null,g.length>0?c(`div`,{className:`lockerverse-public-events__group`,children:[s(`h3`,{className:`lockerverse-public-events__group-title`,children:`Happening now`}),s(`ol`,{className:`lockerverse-public-events__list`,children:g.map(e=>s(m,{active:!0,item:e,timeZone:o},e.id))})]}):null,_.length>0?c(`div`,{className:`lockerverse-public-events__group`,children:[s(`h3`,{className:`lockerverse-public-events__group-title`,children:`Upcoming`}),s(`ol`,{className:`lockerverse-public-events__list`,children:_.map(e=>s(m,{active:!1,item:e,timeZone:o},e.id))})]}):null]})}function g(t){e(`public events`,{apiBaseUrl:t.apiBaseUrl,communitySlug:t.communitySlug,environment:t.environment,slug:``});let o=i(t.onError);o.current=t.onError;let[s]=a(()=>l({...t,onError:e=>o.current?.(e)})),[c,u]=a(0),[d,f]=a({error:null,events:null,loading:!0});r(()=>{let e=!0;return s.list().then(t=>{e&&f({error:null,events:t,loading:!1})},t=>{e&&f(e=>({...e,error:t,loading:!1}))}),()=>{e=!1}},[s,c]);let p=n(()=>{f(e=>({...e,error:null,loading:!0})),u(e=>e+1)},[]);return{...d,client:s,refresh:p}}export{h as LockerversePublicEvents,g as useLockerversePublicEvents};
1
+ import{t as e}from"./immutable-resource-identity.js";import{Share2 as t}from"lucide-react";import{useCallback as n,useEffect as r,useId as i,useRef as a,useState as o}from"react";import{Fragment as s,jsx as c,jsxs as l}from"react/jsx-runtime";import{createLockerversePublicEventsClient as u}from"@lockerverse/sdk/public-events";function d(e,t){return new Intl.DateTimeFormat(`en-US`,{day:`numeric`,month:`short`,timeZone:t,year:`numeric`}).format(new Date(e))}function f(e,t){return new Intl.DateTimeFormat(`en-US`,{hour:`numeric`,minute:`2-digit`,timeZone:t,timeZoneName:`short`}).format(new Date(e))}function p(e){if(!e)return null;try{let t=new URL(e);return t.protocol===`https:`||t.protocol===`http:`?t.toString():null}catch{return null}}function m(e,t){let n=p(e.link);if(n)return n;let r=new URL(window.location.href);return t?r.searchParams.set(`lockerverseEvents`,`past`):r.searchParams.delete(`lockerverseEvents`),r.searchParams.delete(`lockerverseEventOffset`),r.hash=`event-${e.id}`,r.toString()}function h({item:e,timeZone:n,active:r,past:i=!1}){let[a,u]=o(!1),[h,g]=o(!1),[_,v]=o(null),y=new Date(e.startAt),b=new Intl.DateTimeFormat(`en-US`,{month:`short`,timeZone:n}).format(y),x=new Intl.DateTimeFormat(`en-US`,{day:`numeric`,timeZone:n}).format(y),S=d(e.startAt,n)===d(e.endAt,n)?f(e.endAt,n):`${d(e.endAt,n)} at ${f(e.endAt,n)}`,C=p(e.link),w=p(e.imageUrl),T=(e.description?.length??0)>130;async function E(){let t=m(e,i);if(navigator.share)try{await navigator.share({title:e.name,url:t});return}catch(e){if(e instanceof DOMException&&e.name===`AbortError`)return}try{await navigator.clipboard.writeText(t),g(!0)}catch{v(t)}}return c(`li`,{className:`lockerverse-public-events__item`,id:`event-${e.id}`,children:l(`article`,{className:[`lockerverse-public-events__row`,w?`lockerverse-public-events__row--with-image`:``].filter(Boolean).join(` `),children:[w?c(`img`,{alt:``,className:`lockerverse-public-events__image`,height:124,loading:`lazy`,src:w,width:154}):l(`div`,{"aria-hidden":`true`,className:`lockerverse-public-events__date`,children:[c(`span`,{className:`lockerverse-public-events__month`,children:b}),c(`span`,{className:`lockerverse-public-events__day`,children:x})]}),l(`div`,{className:`lockerverse-public-events__content`,children:[l(`div`,{className:`lockerverse-public-events__meta`,children:[c(`time`,{dateTime:e.startAt,children:d(e.startAt,n)}),r?c(`span`,{className:`lockerverse-public-events__live`,children:`Live now`}):null]}),c(`h4`,{children:e.name}),l(`p`,{className:`lockerverse-public-events__time`,children:[c(`time`,{dateTime:e.startAt,children:f(e.startAt,n)}),c(`span`,{"aria-hidden":`true`,children:` — `}),c(`time`,{dateTime:e.endAt,children:S})]}),e.location?c(`p`,{className:`lockerverse-public-events__place`,children:e.location}):null,e.description?l(s,{children:[c(`p`,{className:[`lockerverse-public-events__description`,T&&!a?`lockerverse-public-events__description--clamped`:``].filter(Boolean).join(` `),children:e.description}),T?c(`button`,{"aria-expanded":a,className:`lockerverse-public-events__more`,onClick:()=>u(!a),type:`button`,children:a?`Show less`:`Read more`}):null]}):null,l(`div`,{className:`lockerverse-public-events__actions`,children:[C?l(`a`,{className:`lockerverse-public-events__link`,href:C,rel:`noopener noreferrer`,target:`_blank`,children:[`View event `,c(`span`,{"aria-hidden":`true`,children:`↗`})]}):null,l(`button`,{"aria-label":`Share ${e.name}`,className:`lockerverse-public-events__share`,onClick:E,type:`button`,children:[c(t,{"aria-hidden":`true`,size:16,strokeWidth:1.8}),h?`Link copied`:`Share`]})]}),_?l(`label`,{className:`lockerverse-public-events__copy-link`,children:[`Copy event link`,c(`input`,{onFocus:e=>e.currentTarget.select(),readOnly:!0,value:_})]}):null]})]})})}function g({events:e,title:t=`Events`,showHeading:a=!0,emptyMessage:s=`No events yet.`,timeZone:u=`America/New_York`,theme:d=`dark`,style:f,className:p}){let[m,g]=o(()=>Date.now()),[_,v]=o(`current`),[y,b]=o([]),[x,S]=o(0),[C,w]=o(!1),[T,E]=o(!1),[D,O]=o(!1),[k,A]=o(null),[j,M]=o(null),N=i(),P=n(async(t,n=!1)=>{O(!0),A(null);try{let r=await e.client.listPast({offset:t});b(e=>n?r.events:[...e,...r.events]),S(t+r.events.length),w(r.hasMore),E(!0)}catch(e){A(e instanceof Error?e.message:`Unable to load past events.`)}finally{O(!1)}},[e.client]);r(()=>{let e=window.setInterval(()=>g(Date.now()),6e4);return()=>window.clearInterval(e)},[]),r(()=>{let e=new URL(window.location.href);e.searchParams.get(`lockerverseEvents`)===`past`&&(v(`past`),M(e.hash.slice(1)),P(0,!0))},[P]),r(()=>{let e=window.location.hash.slice(1);if(!e.startsWith(`event-`))return;if(_===`current`){document.getElementById(e)?.scrollIntoView({block:`center`});return}if(!j||D||!T)return;let t=document.getElementById(j);t?(t.scrollIntoView({block:`center`}),M(null)):C?P(x):M(null)},[e.events,P,C,T,D,x,j,_]);function F(){v(`past`),!(T||D)&&P(0,!0)}let I=e.events||[],L=I.filter(e=>new Date(e.startAt).getTime()<=m&&new Date(e.endAt).getTime()>m),R=I.filter(e=>new Date(e.startAt).getTime()>m);return l(`section`,{"aria-busy":_===`past`?D:e.loading,"aria-label":t,className:[`lockerverse-public-events`,p].filter(Boolean).join(` `),"data-lockerverse-theme":d,style:f,children:[a?c(`h2`,{children:t}):null,l(`nav`,{"aria-label":`Event views`,className:`lockerverse-public-events__tabs`,children:[c(`button`,{"aria-controls":`${N}-current-panel`,"aria-pressed":_===`current`,className:`lockerverse-public-events__tab`,id:`${N}-current-tab`,onClick:()=>v(`current`),type:`button`,children:`Upcoming Events`}),c(`button`,{"aria-controls":`${N}-past-panel`,"aria-pressed":_===`past`,className:`lockerverse-public-events__tab`,id:`${N}-past-tab`,onClick:F,type:`button`,children:`Past Events`})]}),l(`section`,{"aria-labelledby":`${N}-current-tab`,hidden:_!==`current`,id:`${N}-current-panel`,children:[e.loading&&!e.events?c(`p`,{role:`status`,children:`Loading events…`}):null,e.error?l(`div`,{role:`alert`,children:[c(`p`,{children:e.error.message}),c(`button`,{onClick:e.refresh,type:`button`,children:`Try again`})]}):null,e.events&&L.length===0&&R.length===0?c(`p`,{className:`lockerverse-public-events__empty`,children:s}):null,L.length>0?l(`div`,{className:`lockerverse-public-events__group`,children:[c(`h3`,{className:`lockerverse-public-events__group-title`,children:`Happening now`}),c(`ol`,{className:`lockerverse-public-events__list`,children:L.map(e=>c(h,{active:!0,item:e,timeZone:u},e.id))})]}):null,R.length>0?l(`div`,{className:`lockerverse-public-events__group`,children:[c(`h3`,{className:`lockerverse-public-events__group-title`,children:`Upcoming`}),c(`ol`,{className:`lockerverse-public-events__list`,children:R.map(e=>c(h,{active:!1,item:e,timeZone:u},e.id))})]}):null]}),l(`section`,{"aria-labelledby":`${N}-past-tab`,hidden:_!==`past`,id:`${N}-past-panel`,children:[k?l(`div`,{role:`alert`,children:[c(`p`,{children:k}),c(`button`,{onClick:()=>P(T?x:0,!T),type:`button`,children:`Try again`})]}):null,D&&!T?c(`p`,{role:`status`,children:`Loading past events…`}):null,T&&y.length===0?c(`p`,{className:`lockerverse-public-events__empty`,children:`No past events yet.`}):null,y.length>0?c(`ol`,{className:`lockerverse-public-events__list`,children:y.map(e=>c(h,{active:!1,item:e,past:!0,timeZone:u},e.id))}):null,C?c(`button`,{className:`lockerverse-public-events__load-more`,disabled:D,onClick:()=>P(x),type:`button`,children:D?`Loading…`:`Load more past events`}):null]})]})}function _(t){e(`public events`,{apiBaseUrl:t.apiBaseUrl,communitySlug:t.communitySlug,environment:t.environment,slug:``});let i=a(t.onError);i.current=t.onError;let[s]=o(()=>u({...t,onError:e=>i.current?.(e)})),[c,l]=o(0),[d,f]=o({error:null,events:null,loading:!0});r(()=>{let e=!0;return s.list().then(t=>{e&&f({error:null,events:t,loading:!1})},t=>{e&&f(e=>({...e,error:t,loading:!1}))}),()=>{e=!1}},[s,c]);let p=n(()=>{f(e=>({...e,error:null,loading:!0})),l(e=>e+1)},[]);return{...d,client:s,refresh:p}}export{g as LockerversePublicEvents,_ as useLockerversePublicEvents};
2
2
  //# sourceMappingURL=public-events.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"public-events.js","names":[],"sources":["../src/lockerverse-public-events.tsx","../src/use-lockerverse-public-events.ts"],"sourcesContent":["import type { LockerversePublicEvent } from \"@lockerverse/sdk/public-events\";\nimport { Share2 } from \"lucide-react\";\nimport { useEffect, useState } from \"react\";\nimport type { LockerverseStyle, LockerverseTheme } from \"./theme.ts\";\nimport type { UseLockerversePublicEventsResult } from \"./use-lockerverse-public-events.ts\";\n\nexport type LockerversePublicEventsProps = {\n events: UseLockerversePublicEventsResult;\n /** The visible heading. Defaults to Events. */\n title?: string;\n showHeading?: boolean;\n emptyMessage?: string;\n /** Used to show dates and times. Defaults to America/New_York. */\n timeZone?: string;\n theme?: LockerverseTheme;\n style?: LockerverseStyle;\n className?: string;\n};\n\nfunction formatDate(value: string, timeZone: string) {\n return new Intl.DateTimeFormat(\"en-US\", {\n day: \"numeric\",\n month: \"short\",\n timeZone,\n year: \"numeric\",\n }).format(new Date(value));\n}\n\nfunction formatTime(value: string, timeZone: string) {\n return new Intl.DateTimeFormat(\"en-US\", {\n hour: \"numeric\",\n minute: \"2-digit\",\n timeZone,\n timeZoneName: \"short\",\n }).format(new Date(value));\n}\n\nfunction getLink(value: string | null) {\n if (!value) {\n return null;\n }\n try {\n const url = new URL(value);\n return url.protocol === \"https:\" || url.protocol === \"http:\"\n ? url.toString()\n : null;\n } catch {\n return null;\n }\n}\n\nfunction getShareUrl(item: LockerversePublicEvent) {\n const link = getLink(item.link);\n if (link) {\n return link;\n }\n const url = new URL(window.location.href);\n url.hash = `event-${item.id}`;\n return url.toString();\n}\n\nfunction PublicEventRow({\n item,\n timeZone,\n active,\n}: {\n item: LockerversePublicEvent;\n timeZone: string;\n active: boolean;\n}) {\n const [expanded, setExpanded] = useState(false);\n const [copied, setCopied] = useState(false);\n const [manualShareUrl, setManualShareUrl] = useState<string | null>(null);\n const start = new Date(item.startAt);\n const month = new Intl.DateTimeFormat(\"en-US\", {\n month: \"short\",\n timeZone,\n }).format(start);\n const day = new Intl.DateTimeFormat(\"en-US\", {\n day: \"numeric\",\n timeZone,\n }).format(start);\n const sameDay =\n formatDate(item.startAt, timeZone) === formatDate(item.endAt, timeZone);\n const endLabel = sameDay\n ? formatTime(item.endAt, timeZone)\n : `${formatDate(item.endAt, timeZone)} at ${formatTime(item.endAt, timeZone)}`;\n const link = getLink(item.link);\n const imageUrl = getLink(item.imageUrl);\n const canExpand = (item.description?.length ?? 0) > 130;\n\n async function shareEvent() {\n const url = getShareUrl(item);\n if (navigator.share) {\n try {\n await navigator.share({ title: item.name, url });\n return;\n } catch (error) {\n if (error instanceof DOMException && error.name === \"AbortError\") {\n return;\n }\n }\n }\n try {\n await navigator.clipboard.writeText(url);\n setCopied(true);\n } catch {\n setManualShareUrl(url);\n }\n }\n\n return (\n <li className=\"lockerverse-public-events__item\" id={`event-${item.id}`}>\n <article\n className={[\n \"lockerverse-public-events__row\",\n imageUrl ? \"lockerverse-public-events__row--with-image\" : \"\",\n ]\n .filter(Boolean)\n .join(\" \")}\n >\n {imageUrl ? (\n <img\n alt=\"\"\n className=\"lockerverse-public-events__image\"\n height={124}\n loading=\"lazy\"\n src={imageUrl}\n width={154}\n />\n ) : (\n <div aria-hidden=\"true\" className=\"lockerverse-public-events__date\">\n <span className=\"lockerverse-public-events__month\">{month}</span>\n <span className=\"lockerverse-public-events__day\">{day}</span>\n </div>\n )}\n <div className=\"lockerverse-public-events__content\">\n <div className=\"lockerverse-public-events__meta\">\n <time dateTime={item.startAt}>\n {formatDate(item.startAt, timeZone)}\n </time>\n {active ? (\n <span className=\"lockerverse-public-events__live\">Live now</span>\n ) : null}\n </div>\n <h4>{item.name}</h4>\n <p className=\"lockerverse-public-events__time\">\n <time dateTime={item.startAt}>\n {formatTime(item.startAt, timeZone)}\n </time>\n <span aria-hidden=\"true\"> — </span>\n <time dateTime={item.endAt}>{endLabel}</time>\n </p>\n {item.location ? (\n <p className=\"lockerverse-public-events__place\">{item.location}</p>\n ) : null}\n {item.description ? (\n <>\n <p\n className={[\n \"lockerverse-public-events__description\",\n canExpand && !expanded\n ? \"lockerverse-public-events__description--clamped\"\n : \"\",\n ]\n .filter(Boolean)\n .join(\" \")}\n >\n {item.description}\n </p>\n {canExpand ? (\n <button\n aria-expanded={expanded}\n className=\"lockerverse-public-events__more\"\n onClick={() => setExpanded(!expanded)}\n type=\"button\"\n >\n {expanded ? \"Show less\" : \"Read more\"}\n </button>\n ) : null}\n </>\n ) : null}\n <div className=\"lockerverse-public-events__actions\">\n {link ? (\n <a\n className=\"lockerverse-public-events__link\"\n href={link}\n rel=\"noopener noreferrer\"\n target=\"_blank\"\n >\n View event <span aria-hidden=\"true\">↗</span>\n </a>\n ) : null}\n <button\n aria-label={`Share ${item.name}`}\n className=\"lockerverse-public-events__share\"\n onClick={shareEvent}\n type=\"button\"\n >\n <Share2 aria-hidden=\"true\" size={16} strokeWidth={1.8} />\n {copied ? \"Link copied\" : \"Share\"}\n </button>\n </div>\n {manualShareUrl ? (\n <label className=\"lockerverse-public-events__copy-link\">\n Copy event link\n <input\n onFocus={(event) => event.currentTarget.select()}\n readOnly\n value={manualShareUrl}\n />\n </label>\n ) : null}\n </div>\n </article>\n </li>\n );\n}\n\n/** Optional public list that can be embedded in any React site. */\nexport function LockerversePublicEvents({\n events,\n title = \"Events\",\n showHeading = true,\n emptyMessage = \"No events yet.\",\n timeZone = \"America/New_York\",\n theme = \"dark\",\n style,\n className,\n}: LockerversePublicEventsProps) {\n const [now, setNow] = useState(() => Date.now());\n\n useEffect(() => {\n const interval = window.setInterval(() => setNow(Date.now()), 60_000);\n return () => window.clearInterval(interval);\n }, []);\n\n const availableEvents = events.events || [];\n const activeEvents = availableEvents.filter(\n (item) =>\n new Date(item.startAt).getTime() <= now &&\n new Date(item.endAt).getTime() > now\n );\n const upcomingEvents = availableEvents.filter(\n (item) => new Date(item.startAt).getTime() > now\n );\n\n return (\n <section\n aria-busy={events.loading}\n aria-label={title}\n className={[\"lockerverse-public-events\", className]\n .filter(Boolean)\n .join(\" \")}\n data-lockerverse-theme={theme}\n style={style}\n >\n {showHeading ? <h2>{title}</h2> : null}\n {events.loading && !events.events ? (\n <p role=\"status\">Loading events…</p>\n ) : null}\n {events.error ? (\n <div role=\"alert\">\n <p>{events.error.message}</p>\n <button onClick={events.refresh} type=\"button\">\n Try again\n </button>\n </div>\n ) : null}\n {events.events &&\n activeEvents.length === 0 &&\n upcomingEvents.length === 0 ? (\n <p className=\"lockerverse-public-events__empty\">{emptyMessage}</p>\n ) : null}\n {activeEvents.length > 0 ? (\n <div className=\"lockerverse-public-events__group\">\n <h3 className=\"lockerverse-public-events__group-title\">\n Happening now\n </h3>\n <ol className=\"lockerverse-public-events__list\">\n {activeEvents.map((item) => (\n <PublicEventRow\n active\n item={item}\n key={item.id}\n timeZone={timeZone}\n />\n ))}\n </ol>\n </div>\n ) : null}\n {upcomingEvents.length > 0 ? (\n <div className=\"lockerverse-public-events__group\">\n <h3 className=\"lockerverse-public-events__group-title\">Upcoming</h3>\n <ol className=\"lockerverse-public-events__list\">\n {upcomingEvents.map((item) => (\n <PublicEventRow\n active={false}\n item={item}\n key={item.id}\n timeZone={timeZone}\n />\n ))}\n </ol>\n </div>\n ) : null}\n </section>\n );\n}\n","import {\n type CreateLockerversePublicEventsOptions,\n createLockerversePublicEventsClient,\n type LockerversePublicEvent,\n type LockerversePublicEventsClient,\n type LockerverseSdkError,\n} from \"@lockerverse/sdk/public-events\";\nimport { useCallback, useEffect, useRef, useState } from \"react\";\nimport { useImmutableResourceIdentity } from \"./immutable-resource-identity.ts\";\n\nexport type UseLockerversePublicEventsResult = {\n client: LockerversePublicEventsClient;\n events: LockerversePublicEvent[] | null;\n loading: boolean;\n error: LockerverseSdkError | null;\n refresh: () => void;\n};\n\n/** Load the public events list for one community. */\nexport function useLockerversePublicEvents(\n options: CreateLockerversePublicEventsOptions\n): UseLockerversePublicEventsResult {\n useImmutableResourceIdentity(\"public events\", {\n apiBaseUrl: options.apiBaseUrl,\n communitySlug: options.communitySlug,\n environment: options.environment,\n slug: \"\",\n });\n const onErrorRef = useRef(options.onError);\n onErrorRef.current = options.onError;\n const [client] = useState(() =>\n createLockerversePublicEventsClient({\n ...options,\n onError: (error) => onErrorRef.current?.(error),\n })\n );\n const [revision, setRevision] = useState(0);\n const [state, setState] = useState<\n Pick<UseLockerversePublicEventsResult, \"events\" | \"loading\" | \"error\">\n >({ error: null, events: null, loading: true });\n\n useEffect(() => {\n let active = true;\n client.list().then(\n (events) => {\n if (active) {\n setState({ error: null, events, loading: false });\n }\n },\n (error: LockerverseSdkError) => {\n if (active) {\n setState((current) => ({ ...current, error, loading: false }));\n }\n }\n );\n return () => {\n active = false;\n };\n }, [client, revision]);\n\n const refresh = useCallback(() => {\n setState((current) => ({ ...current, error: null, loading: true }));\n setRevision((current) => current + 1);\n }, []);\n\n return { ...state, client, refresh };\n}\n"],"mappings":"6TAmBA,SAAS,EAAW,EAAe,EAAkB,CACnD,OAAO,IAAI,KAAK,eAAe,QAAS,CACtC,IAAK,UACL,MAAO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AAK,EAAE,EAClE,EAAa,GAAY,EAAU,CAAC,CACtC,EAAG,CAAC,CAAC,EAEL,MAAO,CAAE,GAAG,EAAO,SAAQ,SAAQ,CACrC"}
1
+ {"version":3,"file":"public-events.js","names":[],"sources":["../src/lockerverse-public-events.tsx","../src/use-lockerverse-public-events.ts"],"sourcesContent":["import type { LockerversePublicEvent } from \"@lockerverse/sdk/public-events\";\nimport { Share2 } from \"lucide-react\";\nimport { useCallback, useEffect, useId, useState } from \"react\";\nimport type { LockerverseStyle, LockerverseTheme } from \"./theme.ts\";\nimport type { UseLockerversePublicEventsResult } from \"./use-lockerverse-public-events.ts\";\n\nexport type LockerversePublicEventsProps = {\n events: UseLockerversePublicEventsResult;\n /** The visible heading. Defaults to Events. */\n title?: string;\n showHeading?: boolean;\n emptyMessage?: string;\n /** Used to show dates and times. Defaults to America/New_York. */\n timeZone?: string;\n theme?: LockerverseTheme;\n style?: LockerverseStyle;\n className?: string;\n};\n\nfunction formatDate(value: string, timeZone: string) {\n return new Intl.DateTimeFormat(\"en-US\", {\n day: \"numeric\",\n month: \"short\",\n timeZone,\n year: \"numeric\",\n }).format(new Date(value));\n}\n\nfunction formatTime(value: string, timeZone: string) {\n return new Intl.DateTimeFormat(\"en-US\", {\n hour: \"numeric\",\n minute: \"2-digit\",\n timeZone,\n timeZoneName: \"short\",\n }).format(new Date(value));\n}\n\nfunction getLink(value: string | null) {\n if (!value) {\n return null;\n }\n try {\n const url = new URL(value);\n return url.protocol === \"https:\" || url.protocol === \"http:\"\n ? url.toString()\n : null;\n } catch {\n return null;\n }\n}\n\nfunction getShareUrl(item: LockerversePublicEvent, past: boolean) {\n const link = getLink(item.link);\n if (link) {\n return link;\n }\n const url = new URL(window.location.href);\n if (past) {\n url.searchParams.set(\"lockerverseEvents\", \"past\");\n } else {\n url.searchParams.delete(\"lockerverseEvents\");\n }\n url.searchParams.delete(\"lockerverseEventOffset\");\n url.hash = `event-${item.id}`;\n return url.toString();\n}\n\nfunction PublicEventRow({\n item,\n timeZone,\n active,\n past = false,\n}: {\n item: LockerversePublicEvent;\n timeZone: string;\n active: boolean;\n past?: boolean;\n}) {\n const [expanded, setExpanded] = useState(false);\n const [copied, setCopied] = useState(false);\n const [manualShareUrl, setManualShareUrl] = useState<string | null>(null);\n const start = new Date(item.startAt);\n const month = new Intl.DateTimeFormat(\"en-US\", {\n month: \"short\",\n timeZone,\n }).format(start);\n const day = new Intl.DateTimeFormat(\"en-US\", {\n day: \"numeric\",\n timeZone,\n }).format(start);\n const sameDay =\n formatDate(item.startAt, timeZone) === formatDate(item.endAt, timeZone);\n const endLabel = sameDay\n ? formatTime(item.endAt, timeZone)\n : `${formatDate(item.endAt, timeZone)} at ${formatTime(item.endAt, timeZone)}`;\n const link = getLink(item.link);\n const imageUrl = getLink(item.imageUrl);\n const canExpand = (item.description?.length ?? 0) > 130;\n\n async function shareEvent() {\n const url = getShareUrl(item, past);\n if (navigator.share) {\n try {\n await navigator.share({ title: item.name, url });\n return;\n } catch (error) {\n if (error instanceof DOMException && error.name === \"AbortError\") {\n return;\n }\n }\n }\n try {\n await navigator.clipboard.writeText(url);\n setCopied(true);\n } catch {\n setManualShareUrl(url);\n }\n }\n\n return (\n <li className=\"lockerverse-public-events__item\" id={`event-${item.id}`}>\n <article\n className={[\n \"lockerverse-public-events__row\",\n imageUrl ? \"lockerverse-public-events__row--with-image\" : \"\",\n ]\n .filter(Boolean)\n .join(\" \")}\n >\n {imageUrl ? (\n <img\n alt=\"\"\n className=\"lockerverse-public-events__image\"\n height={124}\n loading=\"lazy\"\n src={imageUrl}\n width={154}\n />\n ) : (\n <div aria-hidden=\"true\" className=\"lockerverse-public-events__date\">\n <span className=\"lockerverse-public-events__month\">{month}</span>\n <span className=\"lockerverse-public-events__day\">{day}</span>\n </div>\n )}\n <div className=\"lockerverse-public-events__content\">\n <div className=\"lockerverse-public-events__meta\">\n <time dateTime={item.startAt}>\n {formatDate(item.startAt, timeZone)}\n </time>\n {active ? (\n <span className=\"lockerverse-public-events__live\">Live now</span>\n ) : null}\n </div>\n <h4>{item.name}</h4>\n <p className=\"lockerverse-public-events__time\">\n <time dateTime={item.startAt}>\n {formatTime(item.startAt, timeZone)}\n </time>\n <span aria-hidden=\"true\"> — </span>\n <time dateTime={item.endAt}>{endLabel}</time>\n </p>\n {item.location ? (\n <p className=\"lockerverse-public-events__place\">{item.location}</p>\n ) : null}\n {item.description ? (\n <>\n <p\n className={[\n \"lockerverse-public-events__description\",\n canExpand && !expanded\n ? \"lockerverse-public-events__description--clamped\"\n : \"\",\n ]\n .filter(Boolean)\n .join(\" \")}\n >\n {item.description}\n </p>\n {canExpand ? (\n <button\n aria-expanded={expanded}\n className=\"lockerverse-public-events__more\"\n onClick={() => setExpanded(!expanded)}\n type=\"button\"\n >\n {expanded ? \"Show less\" : \"Read more\"}\n </button>\n ) : null}\n </>\n ) : null}\n <div className=\"lockerverse-public-events__actions\">\n {link ? (\n <a\n className=\"lockerverse-public-events__link\"\n href={link}\n rel=\"noopener noreferrer\"\n target=\"_blank\"\n >\n View event <span aria-hidden=\"true\">↗</span>\n </a>\n ) : null}\n <button\n aria-label={`Share ${item.name}`}\n className=\"lockerverse-public-events__share\"\n onClick={shareEvent}\n type=\"button\"\n >\n <Share2 aria-hidden=\"true\" size={16} strokeWidth={1.8} />\n {copied ? \"Link copied\" : \"Share\"}\n </button>\n </div>\n {manualShareUrl ? (\n <label className=\"lockerverse-public-events__copy-link\">\n Copy event link\n <input\n onFocus={(event) => event.currentTarget.select()}\n readOnly\n value={manualShareUrl}\n />\n </label>\n ) : null}\n </div>\n </article>\n </li>\n );\n}\n\n/** Optional public list that can be embedded in any React site. */\nexport function LockerversePublicEvents({\n events,\n title = \"Events\",\n showHeading = true,\n emptyMessage = \"No events yet.\",\n timeZone = \"America/New_York\",\n theme = \"dark\",\n style,\n className,\n}: LockerversePublicEventsProps) {\n const [now, setNow] = useState(() => Date.now());\n const [view, setView] = useState<\"current\" | \"past\">(\"current\");\n const [pastEvents, setPastEvents] = useState<LockerversePublicEvent[]>([]);\n const [pastOffset, setPastOffset] = useState(0);\n const [pastHasMore, setPastHasMore] = useState(false);\n const [pastLoaded, setPastLoaded] = useState(false);\n const [pastLoading, setPastLoading] = useState(false);\n const [pastError, setPastError] = useState<string | null>(null);\n const [pastTarget, setPastTarget] = useState<string | null>(null);\n const tabId = useId();\n\n const loadPast = useCallback(\n async (offset: number, reset = false) => {\n setPastLoading(true);\n setPastError(null);\n try {\n const page = await events.client.listPast({ offset });\n setPastEvents((current) =>\n reset ? page.events : [...current, ...page.events]\n );\n setPastOffset(offset + page.events.length);\n setPastHasMore(page.hasMore);\n setPastLoaded(true);\n } catch (error) {\n setPastError(\n error instanceof Error ? error.message : \"Unable to load past events.\"\n );\n } finally {\n setPastLoading(false);\n }\n },\n [events.client]\n );\n\n useEffect(() => {\n const interval = window.setInterval(() => setNow(Date.now()), 60_000);\n return () => window.clearInterval(interval);\n }, []);\n\n useEffect(() => {\n const url = new URL(window.location.href);\n if (url.searchParams.get(\"lockerverseEvents\") !== \"past\") {\n return;\n }\n setView(\"past\");\n setPastTarget(url.hash.slice(1));\n loadPast(0, true);\n }, [loadPast]);\n\n useEffect(() => {\n const hash = window.location.hash.slice(1);\n if (!hash.startsWith(\"event-\")) {\n return;\n }\n if (view === \"current\") {\n document.getElementById(hash)?.scrollIntoView({ block: \"center\" });\n return;\n }\n if (!pastTarget || pastLoading || !pastLoaded) {\n return;\n }\n const target = document.getElementById(pastTarget);\n if (target) {\n target.scrollIntoView({ block: \"center\" });\n setPastTarget(null);\n } else if (pastHasMore) {\n loadPast(pastOffset);\n } else {\n setPastTarget(null);\n }\n }, [\n events.events,\n loadPast,\n pastHasMore,\n pastLoaded,\n pastLoading,\n pastOffset,\n pastTarget,\n view,\n ]);\n\n function openPast() {\n setView(\"past\");\n if (pastLoaded || pastLoading) {\n return;\n }\n loadPast(0, true);\n }\n\n const availableEvents = events.events || [];\n const activeEvents = availableEvents.filter(\n (item) =>\n new Date(item.startAt).getTime() <= now &&\n new Date(item.endAt).getTime() > now\n );\n const upcomingEvents = availableEvents.filter(\n (item) => new Date(item.startAt).getTime() > now\n );\n\n return (\n <section\n aria-busy={view === \"past\" ? pastLoading : events.loading}\n aria-label={title}\n className={[\"lockerverse-public-events\", className]\n .filter(Boolean)\n .join(\" \")}\n data-lockerverse-theme={theme}\n style={style}\n >\n {showHeading ? <h2>{title}</h2> : null}\n <nav aria-label=\"Event views\" className=\"lockerverse-public-events__tabs\">\n <button\n aria-controls={`${tabId}-current-panel`}\n aria-pressed={view === \"current\"}\n className=\"lockerverse-public-events__tab\"\n id={`${tabId}-current-tab`}\n onClick={() => setView(\"current\")}\n type=\"button\"\n >\n Upcoming Events\n </button>\n <button\n aria-controls={`${tabId}-past-panel`}\n aria-pressed={view === \"past\"}\n className=\"lockerverse-public-events__tab\"\n id={`${tabId}-past-tab`}\n onClick={openPast}\n type=\"button\"\n >\n Past Events\n </button>\n </nav>\n <section\n aria-labelledby={`${tabId}-current-tab`}\n hidden={view !== \"current\"}\n id={`${tabId}-current-panel`}\n >\n {events.loading && !events.events ? (\n <p role=\"status\">Loading events…</p>\n ) : null}\n {events.error ? (\n <div role=\"alert\">\n <p>{events.error.message}</p>\n <button onClick={events.refresh} type=\"button\">\n Try again\n </button>\n </div>\n ) : null}\n {events.events &&\n activeEvents.length === 0 &&\n upcomingEvents.length === 0 ? (\n <p className=\"lockerverse-public-events__empty\">{emptyMessage}</p>\n ) : null}\n {activeEvents.length > 0 ? (\n <div className=\"lockerverse-public-events__group\">\n <h3 className=\"lockerverse-public-events__group-title\">\n Happening now\n </h3>\n <ol className=\"lockerverse-public-events__list\">\n {activeEvents.map((item) => (\n <PublicEventRow\n active\n item={item}\n key={item.id}\n timeZone={timeZone}\n />\n ))}\n </ol>\n </div>\n ) : null}\n {upcomingEvents.length > 0 ? (\n <div className=\"lockerverse-public-events__group\">\n <h3 className=\"lockerverse-public-events__group-title\">Upcoming</h3>\n <ol className=\"lockerverse-public-events__list\">\n {upcomingEvents.map((item) => (\n <PublicEventRow\n active={false}\n item={item}\n key={item.id}\n timeZone={timeZone}\n />\n ))}\n </ol>\n </div>\n ) : null}\n </section>\n <section\n aria-labelledby={`${tabId}-past-tab`}\n hidden={view !== \"past\"}\n id={`${tabId}-past-panel`}\n >\n {pastError ? (\n <div role=\"alert\">\n <p>{pastError}</p>\n <button\n onClick={() => loadPast(pastLoaded ? pastOffset : 0, !pastLoaded)}\n type=\"button\"\n >\n Try again\n </button>\n </div>\n ) : null}\n {pastLoading && !pastLoaded ? (\n <p role=\"status\">Loading past events…</p>\n ) : null}\n {pastLoaded && pastEvents.length === 0 ? (\n <p className=\"lockerverse-public-events__empty\">\n No past events yet.\n </p>\n ) : null}\n {pastEvents.length > 0 ? (\n <ol className=\"lockerverse-public-events__list\">\n {pastEvents.map((item) => (\n <PublicEventRow\n active={false}\n item={item}\n key={item.id}\n past\n timeZone={timeZone}\n />\n ))}\n </ol>\n ) : null}\n {pastHasMore ? (\n <button\n className=\"lockerverse-public-events__load-more\"\n disabled={pastLoading}\n onClick={() => loadPast(pastOffset)}\n type=\"button\"\n >\n {pastLoading ? \"Loading…\" : \"Load more past events\"}\n </button>\n ) : null}\n </section>\n </section>\n );\n}\n","import {\n type CreateLockerversePublicEventsOptions,\n createLockerversePublicEventsClient,\n type LockerversePublicEvent,\n type LockerversePublicEventsClient,\n type LockerverseSdkError,\n} from \"@lockerverse/sdk/public-events\";\nimport { useCallback, useEffect, useRef, useState } from \"react\";\nimport { useImmutableResourceIdentity } from \"./immutable-resource-identity.ts\";\n\nexport type UseLockerversePublicEventsResult = {\n client: LockerversePublicEventsClient;\n events: LockerversePublicEvent[] | null;\n loading: boolean;\n error: LockerverseSdkError | null;\n refresh: () => void;\n};\n\n/** Load the public events list for one community. */\nexport function useLockerversePublicEvents(\n options: CreateLockerversePublicEventsOptions\n): UseLockerversePublicEventsResult {\n useImmutableResourceIdentity(\"public events\", {\n apiBaseUrl: options.apiBaseUrl,\n communitySlug: options.communitySlug,\n environment: options.environment,\n slug: \"\",\n });\n const onErrorRef = useRef(options.onError);\n onErrorRef.current = options.onError;\n const [client] = useState(() =>\n createLockerversePublicEventsClient({\n ...options,\n onError: (error) => onErrorRef.current?.(error),\n })\n );\n const [revision, setRevision] = useState(0);\n const [state, setState] = useState<\n Pick<UseLockerversePublicEventsResult, \"events\" | \"loading\" | \"error\">\n >({ error: null, events: null, loading: true });\n\n useEffect(() => {\n let active = true;\n client.list().then(\n (events) => {\n if (active) {\n setState({ error: null, events, loading: false });\n }\n },\n (error: LockerverseSdkError) => {\n if (active) {\n setState((current) => ({ ...current, error, loading: false }));\n }\n }\n );\n return () => {\n active = false;\n };\n }, [client, revision]);\n\n const refresh = useCallback(() => {\n setState((current) => ({ ...current, error: null, loading: true }));\n setRevision((current) => current + 1);\n }, []);\n\n return { ...state, client, refresh };\n}\n"],"mappings":"wUAmBA,SAAS,EAAW,EAAe,EAAkB,CACnD,OAAO,IAAI,KAAK,eAAe,QAAS,CACtC,IAAK,UACL,MAAO,QACP,WACA,KAAM,SACR,CAAC,CAAC,CAAC,OAAO,IAAI,KAAK,CAAK,CAAC,CAC3B,CAEA,SAAS,EAAW,EAAe,EAAkB,CACnD,OAAO,IAAI,KAAK,eAAe,QAAS,CACtC,KAAM,UACN,OAAQ,UACR,WACA,aAAc,OAChB,CAAC,CAAC,CAAC,OAAO,IAAI,KAAK,CAAK,CAAC,CAC3B,CAEA,SAAS,EAAQ,EAAsB,CACrC,GAAI,CAAC,EACH,OAAO,KAET,GAAI,CACF,IAAM,EAAM,IAAI,IAAI,CAAK,EACzB,OAAO,EAAI,WAAa,UAAY,EAAI,WAAa,QACjD,EAAI,SAAS,EACb,IACN,MAAQ,CACN,OAAO,IACT,CACF,CAEA,SAAS,EAAY,EAA8B,EAAe,CAChE,IAAM,EAAO,EAAQ,EAAK,IAAI,EAC9B,GAAI,EACF,OAAO,EAET,IAAM,EAAM,IAAI,IAAI,OAAO,SAAS,IAAI,EAQxC,OAPI,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
2
  "name": "@lockerverse/react",
3
- "version": "0.2.109-dev.1",
3
+ "version": "0.2.111-dev.1",
4
4
  "description": "Tree-shakable React payment and signup UI for Lockerverse",
5
5
  "repository": {
6
6
  "type": "git",
@@ -117,7 +117,7 @@
117
117
  "embla-carousel-react": "8.6.0",
118
118
  "lucide-react": "0.536.0",
119
119
  "valibot": "1.4.2",
120
- "@lockerverse/sdk": "0.2.109-dev.1"
120
+ "@lockerverse/sdk": "0.2.111-dev.1"
121
121
  },
122
122
  "devDependencies": {
123
123
  "@size-limit/file": "13.0.3",