@lockerverse/react 0.2.105 → 0.2.108-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 +26 -1
- package/dist/auction-base.css +1 -1
- package/dist/auction-catalog.css +1 -1
- package/dist/immutable-resource-identity.js.map +1 -1
- package/dist/public-events.css +163 -0
- package/dist/public-events.d.ts +31 -0
- package/dist/public-events.d.ts.map +1 -0
- package/dist/public-events.js +2 -0
- package/dist/public-events.js.map +1 -0
- package/dist/signup.css +1 -2
- package/dist/styles.css +1 -2
- package/package.json +15 -5
package/README.md
CHANGED
|
@@ -261,7 +261,7 @@ Auction checkout, payment, and signup use common email, phone, field-error, and
|
|
|
261
261
|
|
|
262
262
|
Payment and auction Stripe forms resolve the rendered SDK font and theme tokens before passing them to Stripe. Custom font files are not loaded into Stripe by a font family name alone. See [the shared form foundation](https://github.com/Lockerverse/lockerverse-sdk/blob/main/docs/shared-form-foundation.md) for module boundaries and bundle measurement.
|
|
263
263
|
|
|
264
|
-
Use `theme="dark"` or `theme="light"
|
|
264
|
+
Use `theme="dark"` or `theme="light"` to match the host background. The outer payment, signup, auction, and Events widgets are transparent, so the host controls their canvas. Lockerverse applies the community branding returned by the widget API. Pass the same `LockerverseStyle` object to payment, signup, and donate launcher components.
|
|
265
265
|
|
|
266
266
|
```tsx
|
|
267
267
|
import type { LockerverseStyle } from "@lockerverse/react";
|
|
@@ -455,3 +455,28 @@ to host navigation. Resource identity changes require a new React key.
|
|
|
455
455
|
|
|
456
456
|
[Complete direct-auction example](https://sdk.lockerverse.com/examples/auctions?community=lckrvrs-internal&auction=auction).
|
|
457
457
|
Built-in styled UI is the default for Lovable. There is no automatic headless switch.
|
|
458
|
+
|
|
459
|
+
## Public event listings
|
|
460
|
+
|
|
461
|
+
Use the public Events entry to show future, publicly listed Events. It does not
|
|
462
|
+
load ticket or payment UI.
|
|
463
|
+
|
|
464
|
+
```tsx
|
|
465
|
+
import {
|
|
466
|
+
LockerversePublicEvents,
|
|
467
|
+
useLockerversePublicEvents,
|
|
468
|
+
} from "@lockerverse/react/public-events";
|
|
469
|
+
import "@lockerverse/react/public-events.css";
|
|
470
|
+
|
|
471
|
+
function CommunityEvents() {
|
|
472
|
+
const events = useLockerversePublicEvents({ communitySlug: "auburn" });
|
|
473
|
+
return <LockerversePublicEvents events={events} title="Events" theme="light" />;
|
|
474
|
+
}
|
|
475
|
+
```
|
|
476
|
+
|
|
477
|
+
The hook returns `client`, `events`, `loading`, `error`, and `refresh`. The
|
|
478
|
+
component takes the full hook result so it can show loading, empty, and retry
|
|
479
|
+
states. `title` sets the visible heading, `showHeading` can hide it, and
|
|
480
|
+
`timeZone` controls date display. The default time zone is
|
|
481
|
+
`America/New_York`. Use `style` with `LockerverseStyle` tokens or `className`
|
|
482
|
+
to match the host site. Links open in a new tab when they use HTTP or HTTPS.
|
package/dist/auction-base.css
CHANGED
package/dist/auction-catalog.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"immutable-resource-identity.js","names":[],"sources":["../src/immutable-resource-identity.ts"],"sourcesContent":["import { useRef } from \"react\";\n\ntype LockerverseResourceIdentity = {\n apiBaseUrl: string | undefined;\n communitySlug: string;\n mediaBaseUrl?: string | undefined;\n environment: string | undefined;\n slug: string;\n};\n\nfunction hasSameIdentity(\n initial: LockerverseResourceIdentity,\n current: LockerverseResourceIdentity\n) {\n return (\n initial.apiBaseUrl === current.apiBaseUrl &&\n initial.communitySlug === current.communitySlug &&\n initial.mediaBaseUrl === current.mediaBaseUrl &&\n initial.environment === current.environment &&\n initial.slug === current.slug\n );\n}\n\nexport function useImmutableResourceIdentity(\n resource
|
|
1
|
+
{"version":3,"file":"immutable-resource-identity.js","names":[],"sources":["../src/immutable-resource-identity.ts"],"sourcesContent":["import { useRef } from \"react\";\n\ntype LockerverseResourceIdentity = {\n apiBaseUrl: string | undefined;\n communitySlug: string;\n mediaBaseUrl?: string | undefined;\n environment: string | undefined;\n slug: string;\n};\n\nfunction hasSameIdentity(\n initial: LockerverseResourceIdentity,\n current: LockerverseResourceIdentity\n) {\n return (\n initial.apiBaseUrl === current.apiBaseUrl &&\n initial.communitySlug === current.communitySlug &&\n initial.mediaBaseUrl === current.mediaBaseUrl &&\n initial.environment === current.environment &&\n initial.slug === current.slug\n );\n}\n\nexport function useImmutableResourceIdentity(\n resource:\n | \"payment widget\"\n | \"signup\"\n | \"auctions\"\n | \"auction\"\n | \"public events\",\n identity: LockerverseResourceIdentity\n) {\n const initial = useRef(identity);\n if (!hasSameIdentity(initial.current, identity)) {\n throw new TypeError(\n `Lockerverse ${resource} identity cannot change after initialization. Remount with a new React key.`\n );\n }\n}\n"],"mappings":"+BAUA,SAAS,EACP,EACA,EACA,CACA,OACE,EAAQ,aAAe,EAAQ,YAC/B,EAAQ,gBAAkB,EAAQ,eAClC,EAAQ,eAAiB,EAAQ,cACjC,EAAQ,cAAgB,EAAQ,aAChC,EAAQ,OAAS,EAAQ,IAE7B,CAEA,SAAgB,EACd,EAMA,EACA,CAEA,GAAI,CAAC,EADW,EAAO,CACI,CAAC,CAAC,QAAS,CAAQ,EAC5C,MAAU,UACR,eAAe,EAAS,4EAC1B,CAEJ"}
|
|
@@ -0,0 +1,163 @@
|
|
|
1
|
+
.lockerverse-public-events {
|
|
2
|
+
--lockerverse-bg: #090a0b;
|
|
3
|
+
--lockerverse-text: #f8f8f7;
|
|
4
|
+
--lockerverse-muted: #a7aaac;
|
|
5
|
+
--lockerverse-border: rgb(255 255 255 / 18%);
|
|
6
|
+
--lockerverse-accent: #83baa1;
|
|
7
|
+
--lockerverse-font-family: ui-sans-serif, system-ui, sans-serif;
|
|
8
|
+
box-sizing: border-box;
|
|
9
|
+
width: 100%;
|
|
10
|
+
padding: 28px;
|
|
11
|
+
font: 14px / 1.5 var(--lockerverse-font-family);
|
|
12
|
+
color: var(--lockerverse-text);
|
|
13
|
+
background: transparent;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.lockerverse-public-events[data-lockerverse-theme="light"] {
|
|
17
|
+
--lockerverse-bg: #fff;
|
|
18
|
+
--lockerverse-text: #171919;
|
|
19
|
+
--lockerverse-muted: #565f60;
|
|
20
|
+
--lockerverse-border: rgb(23 25 25 / 18%);
|
|
21
|
+
--lockerverse-accent: #2d7052;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.lockerverse-public-events *,
|
|
25
|
+
.lockerverse-public-events *::before,
|
|
26
|
+
.lockerverse-public-events *::after {
|
|
27
|
+
box-sizing: border-box;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.lockerverse-public-events h2,
|
|
31
|
+
.lockerverse-public-events h3,
|
|
32
|
+
.lockerverse-public-events p {
|
|
33
|
+
margin: 0;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.lockerverse-public-events h2 {
|
|
37
|
+
margin-bottom: 24px;
|
|
38
|
+
font-size: 24px;
|
|
39
|
+
font-weight: 600;
|
|
40
|
+
line-height: 1.2;
|
|
41
|
+
text-wrap: balance;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.lockerverse-public-events h3 {
|
|
45
|
+
font-size: 18px;
|
|
46
|
+
font-weight: 600;
|
|
47
|
+
line-height: 1.3;
|
|
48
|
+
overflow-wrap: anywhere;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
.lockerverse-public-events__list {
|
|
52
|
+
padding: 0;
|
|
53
|
+
margin: 0;
|
|
54
|
+
list-style: none;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
.lockerverse-public-events__item {
|
|
58
|
+
border-top: 1px solid var(--lockerverse-border);
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
.lockerverse-public-events__item:last-child {
|
|
62
|
+
border-bottom: 1px solid var(--lockerverse-border);
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
.lockerverse-public-events__row {
|
|
66
|
+
display: grid;
|
|
67
|
+
grid-template-columns: 68px minmax(0, 1fr);
|
|
68
|
+
gap: 20px;
|
|
69
|
+
padding: 20px 0;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
.lockerverse-public-events__date {
|
|
73
|
+
display: flex;
|
|
74
|
+
flex-direction: column;
|
|
75
|
+
align-items: flex-start;
|
|
76
|
+
line-height: 1;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
.lockerverse-public-events__month {
|
|
80
|
+
font-size: 12px;
|
|
81
|
+
font-weight: 700;
|
|
82
|
+
color: var(--lockerverse-accent);
|
|
83
|
+
text-transform: uppercase;
|
|
84
|
+
letter-spacing: 0.08em;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
.lockerverse-public-events__day {
|
|
88
|
+
margin-top: 5px;
|
|
89
|
+
font-size: 34px;
|
|
90
|
+
font-weight: 600;
|
|
91
|
+
letter-spacing: -0.04em;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
.lockerverse-public-events__content {
|
|
95
|
+
min-width: 0;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
.lockerverse-public-events .lockerverse-public-events__time,
|
|
99
|
+
.lockerverse-public-events .lockerverse-public-events__place {
|
|
100
|
+
margin-top: 5px;
|
|
101
|
+
color: var(--lockerverse-muted);
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
.lockerverse-public-events .lockerverse-public-events__description {
|
|
105
|
+
margin-top: 12px;
|
|
106
|
+
overflow-wrap: anywhere;
|
|
107
|
+
white-space: pre-line;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
.lockerverse-public-events .lockerverse-public-events__link {
|
|
111
|
+
display: inline-flex;
|
|
112
|
+
gap: 8px;
|
|
113
|
+
align-items: center;
|
|
114
|
+
min-height: 44px;
|
|
115
|
+
padding: 8px 14px;
|
|
116
|
+
margin-top: 14px;
|
|
117
|
+
font-weight: 600;
|
|
118
|
+
color: var(--lockerverse-accent);
|
|
119
|
+
text-decoration: none;
|
|
120
|
+
border: 1px solid var(--lockerverse-border);
|
|
121
|
+
border-radius: 8px;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
.lockerverse-public-events .lockerverse-public-events__link:hover {
|
|
125
|
+
border-color: var(--lockerverse-accent);
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
.lockerverse-public-events a:focus-visible,
|
|
129
|
+
.lockerverse-public-events button:focus-visible {
|
|
130
|
+
outline: 2px solid var(--lockerverse-accent);
|
|
131
|
+
outline-offset: 4px;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
.lockerverse-public-events button {
|
|
135
|
+
min-height: 44px;
|
|
136
|
+
padding: 8px 12px;
|
|
137
|
+
margin-top: 12px;
|
|
138
|
+
font: inherit;
|
|
139
|
+
color: var(--lockerverse-text);
|
|
140
|
+
cursor: pointer;
|
|
141
|
+
background: transparent;
|
|
142
|
+
border: 1px solid var(--lockerverse-border);
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
.lockerverse-public-events__empty {
|
|
146
|
+
padding: 24px 0;
|
|
147
|
+
color: var(--lockerverse-muted);
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
@media (max-width: 500px) {
|
|
151
|
+
.lockerverse-public-events {
|
|
152
|
+
padding: 20px;
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
.lockerverse-public-events__row {
|
|
156
|
+
grid-template-columns: 52px minmax(0, 1fr);
|
|
157
|
+
gap: 14px;
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
.lockerverse-public-events__day {
|
|
161
|
+
font-size: 28px;
|
|
162
|
+
}
|
|
163
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { n as LockerverseTheme, t as LockerverseStyle } from "./theme.js";
|
|
2
|
+
import { CreateLockerversePublicEventsOptions, LockerversePublicEvent, LockerversePublicEventsClient, LockerverseSdkError } from "@lockerverse/sdk/public-events";
|
|
3
|
+
//#region src/use-lockerverse-public-events.d.ts
|
|
4
|
+
type UseLockerversePublicEventsResult = {
|
|
5
|
+
client: LockerversePublicEventsClient;
|
|
6
|
+
events: LockerversePublicEvent[] | null;
|
|
7
|
+
loading: boolean;
|
|
8
|
+
error: LockerverseSdkError | null;
|
|
9
|
+
refresh: () => void;
|
|
10
|
+
};
|
|
11
|
+
/** Load the public events list for one community. */
|
|
12
|
+
declare function useLockerversePublicEvents(options: CreateLockerversePublicEventsOptions): UseLockerversePublicEventsResult;
|
|
13
|
+
//#endregion
|
|
14
|
+
//#region src/lockerverse-public-events.d.ts
|
|
15
|
+
type LockerversePublicEventsProps = {
|
|
16
|
+
events: UseLockerversePublicEventsResult;
|
|
17
|
+
/** The visible heading. Defaults to Events. */
|
|
18
|
+
title?: string;
|
|
19
|
+
showHeading?: boolean;
|
|
20
|
+
emptyMessage?: string;
|
|
21
|
+
/** Used to show dates and times. Defaults to America/New_York. */
|
|
22
|
+
timeZone?: string;
|
|
23
|
+
theme?: LockerverseTheme;
|
|
24
|
+
style?: LockerverseStyle;
|
|
25
|
+
className?: string;
|
|
26
|
+
};
|
|
27
|
+
/** Optional public list that can be embedded in any React site. */
|
|
28
|
+
declare function LockerversePublicEvents({ events, title, showHeading, emptyMessage, timeZone, theme, style, className }: LockerversePublicEventsProps): import("react").JSX.Element;
|
|
29
|
+
//#endregion
|
|
30
|
+
export { LockerversePublicEvents, type LockerversePublicEventsProps, type LockerverseStyle, type LockerverseTheme, type UseLockerversePublicEventsResult, useLockerversePublicEvents };
|
|
31
|
+
//# sourceMappingURL=public-events.d.ts.map
|
|
@@ -0,0 +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;;;KCjBS;EACV,QAAQ;;EAER;EACA;EACA;;EAEA;EACA,QAAQ;EACR,QAAQ;EACR;;;iBAoGc,0BACd,QACA,OACA,aACA,cACA,UACA,OACA,OACA,aACC,+CAA4B,IAAA"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{t as e}from"./immutable-resource-identity.js";import{useCallback as t,useEffect as n,useRef as r,useState as i}from"react";import{jsx as a,jsxs as o}from"react/jsx-runtime";import{createLockerversePublicEventsClient as s}from"@lockerverse/sdk/public-events";function c(e,t){return new Intl.DateTimeFormat(`en-US`,{day:`numeric`,month:`short`,timeZone:t,year:`numeric`}).format(new Date(e))}function l(e,t){return new Intl.DateTimeFormat(`en-US`,{hour:`numeric`,minute:`2-digit`,timeZone:t,timeZoneName:`short`}).format(new Date(e))}function u(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 d({item:e,timeZone:t}){let n=new Date(e.startAt),r=new Intl.DateTimeFormat(`en-US`,{month:`short`,timeZone:t}).format(n),i=new Intl.DateTimeFormat(`en-US`,{day:`numeric`,timeZone:t}).format(n),s=c(e.startAt,t)===c(e.endAt,t)?l(e.endAt,t):`${c(e.endAt,t)} at ${l(e.endAt,t)}`,d=u(e.link);return a(`li`,{className:`lockerverse-public-events__item`,children:o(`article`,{className:`lockerverse-public-events__row`,children:[o(`div`,{"aria-hidden":`true`,className:`lockerverse-public-events__date`,children:[a(`span`,{className:`lockerverse-public-events__month`,children:r}),a(`span`,{className:`lockerverse-public-events__day`,children:i})]}),o(`div`,{className:`lockerverse-public-events__content`,children:[a(`h3`,{children:e.name}),o(`p`,{className:`lockerverse-public-events__time`,children:[o(`time`,{dateTime:e.startAt,children:[c(e.startAt,t),` at`,` `,l(e.startAt,t)]}),a(`span`,{"aria-hidden":`true`,children:` — `}),a(`time`,{dateTime:e.endAt,children:s})]}),e.location?a(`p`,{className:`lockerverse-public-events__place`,children:e.location}):null,e.description?a(`p`,{className:`lockerverse-public-events__description`,children:e.description}):null,d?o(`a`,{className:`lockerverse-public-events__link`,href:d,rel:`noopener noreferrer`,target:`_blank`,children:[`View event `,a(`span`,{"aria-hidden":`true`,children:`↗`})]}):null]})]})})}function f({events:e,title:t=`Events`,showHeading:n=!0,emptyMessage:r=`No events yet.`,timeZone:i=`America/New_York`,theme:s=`dark`,style:c,className:l}){return o(`section`,{"aria-busy":e.loading,"aria-label":t,className:[`lockerverse-public-events`,l].filter(Boolean).join(` `),"data-lockerverse-theme":s,style:c,children:[n?a(`h2`,{children:t}):null,e.loading&&!e.events?a(`p`,{role:`status`,children:`Loading events…`}):null,e.error?o(`div`,{role:`alert`,children:[a(`p`,{children:e.error.message}),a(`button`,{onClick:e.refresh,type:`button`,children:`Try again`})]}):null,e.events?.length===0?a(`p`,{className:`lockerverse-public-events__empty`,children:r}):null,e.events&&e.events.length>0?a(`ol`,{className:`lockerverse-public-events__list`,children:e.events.map(e=>a(d,{item:e,timeZone:i},e.id))}):null]})}function p(a){e(`public events`,{apiBaseUrl:a.apiBaseUrl,communitySlug:a.communitySlug,environment:a.environment,slug:``});let o=r(a.onError);o.current=a.onError;let[c]=i(()=>s({...a,onError:e=>o.current?.(e)})),[l,u]=i(0),[d,f]=i({error:null,events:null,loading:!0});n(()=>{let e=!0;return c.list().then(t=>{e&&f({error:null,events:t,loading:!1})},t=>{e&&f(e=>({...e,error:t,loading:!1}))}),()=>{e=!1}},[c,l]);let p=t(()=>{f(e=>({...e,error:null,loading:!0})),u(e=>e+1)},[]);return{...d,client:c,refresh:p}}export{f as LockerversePublicEvents,p as useLockerversePublicEvents};
|
|
2
|
+
//# sourceMappingURL=public-events.js.map
|
|
@@ -0,0 +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 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 PublicEventRow({\n item,\n timeZone,\n}: {\n item: LockerversePublicEvent;\n timeZone: string;\n}) {\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\n return (\n <li className=\"lockerverse-public-events__item\">\n <article className=\"lockerverse-public-events__row\">\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 <div className=\"lockerverse-public-events__content\">\n <h3>{item.name}</h3>\n <p className=\"lockerverse-public-events__time\">\n <time dateTime={item.startAt}>\n {formatDate(item.startAt, timeZone)} at{\" \"}\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 <p className=\"lockerverse-public-events__description\">\n {item.description}\n </p>\n ) : null}\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 </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 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?.length === 0 ? (\n <p className=\"lockerverse-public-events__empty\">{emptyMessage}</p>\n ) : null}\n {events.events && events.events.length > 0 ? (\n <ol className=\"lockerverse-public-events__list\">\n {events.events.map((item) => (\n <PublicEventRow item={item} key={item.id} timeZone={timeZone} />\n ))}\n </ol>\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":"yQAiBA,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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,cAAe,EAAQ,cACvB,YAAa,EAAQ,YACrB,KAAM,EACR,CAAC,EACD,IAAM,EAAa,EAAO,EAAQ,OAAO,EACzC,EAAW,QAAU,EAAQ,QAC7B,GAAM,CAAC,GAAU,MACf,EAAoC,CAClC,GAAG,EACH,QAAU,GAAU,EAAW,UAAU,CAAK,CAChD,CAAC,CACH,EACM,CAAC,EAAU,GAAe,EAAS,CAAC,EACpC,CAAC,EAAO,GAAY,EAExB,CAAE,MAAO,KAAM,OAAQ,KAAM,QAAS,EAAK,CAAC,EAE9C,MAAgB,CACd,IAAI,EAAS,GAab,OAZA,EAAO,KAAK,CAAC,CAAC,KACX,GAAW,CACN,GACF,EAAS,CAAE,MAAO,KAAM,SAAQ,QAAS,EAAM,CAAC,CAEpD,EACC,GAA+B,CAC1B,GACF,EAAU,IAAa,CAAE,GAAG,EAAS,QAAO,QAAS,EAAM,EAAE,CAEjE,CACF,MACa,CACX,EAAS,EACX,CACF,EAAG,CAAC,EAAQ,CAAQ,CAAC,EAErB,IAAM,EAAU,MAAkB,CAChC,EAAU,IAAa,CAAE,GAAG,EAAS,MAAO,KAAM,QAAS,EAAK,EAAE,EAClE,EAAa,GAAY,EAAU,CAAC,CACtC,EAAG,CAAC,CAAC,EAEL,MAAO,CAAE,GAAG,EAAO,SAAQ,SAAQ,CACrC"}
|
package/dist/signup.css
CHANGED
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
font-size: 15px;
|
|
39
39
|
line-height: 1.4;
|
|
40
40
|
color: var(--lockerverse-text);
|
|
41
|
-
background:
|
|
41
|
+
background: transparent;
|
|
42
42
|
border-radius: var(--lockerverse-radius);
|
|
43
43
|
}
|
|
44
44
|
|
|
@@ -54,7 +54,6 @@
|
|
|
54
54
|
);
|
|
55
55
|
--lockerverse-subtle: var(--lockerverse-signup-subtle, rgb(18 20 22 / 8%));
|
|
56
56
|
--lockerverse-text: var(--lockerverse-signup-text, #121416);
|
|
57
|
-
box-shadow: 0 18px 55px rgb(20 25 32 / 10%);
|
|
58
57
|
}
|
|
59
58
|
|
|
60
59
|
.lockerverse-signup *,
|
package/dist/styles.css
CHANGED
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
font-size: 15px;
|
|
27
27
|
line-height: 1.4;
|
|
28
28
|
color: var(--lockerverse-text);
|
|
29
|
-
background:
|
|
29
|
+
background: transparent;
|
|
30
30
|
border-radius: var(--lockerverse-radius);
|
|
31
31
|
}
|
|
32
32
|
|
|
@@ -41,7 +41,6 @@
|
|
|
41
41
|
--lockerverse-subtle: rgb(18 20 22 / 8%);
|
|
42
42
|
--lockerverse-success: #157a42;
|
|
43
43
|
--lockerverse-text: #121416;
|
|
44
|
-
box-shadow: 0 18px 55px rgb(20 25 32 / 10%);
|
|
45
44
|
}
|
|
46
45
|
|
|
47
46
|
.lockerverse-payment *,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lockerverse/react",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.108-dev.1",
|
|
4
4
|
"description": "Tree-shakable React payment and signup UI for Lockerverse",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -21,7 +21,8 @@
|
|
|
21
21
|
"./dist/auction.css",
|
|
22
22
|
"./dist/auction-item.css",
|
|
23
23
|
"./dist/auction-base.css",
|
|
24
|
-
"./dist/auction-item-layout.css"
|
|
24
|
+
"./dist/auction-item-layout.css",
|
|
25
|
+
"./dist/public-events.css"
|
|
25
26
|
],
|
|
26
27
|
"type": "module",
|
|
27
28
|
"exports": {
|
|
@@ -93,6 +94,15 @@
|
|
|
93
94
|
"./auction-item.css": {
|
|
94
95
|
"types": "./dist/styles.d.ts",
|
|
95
96
|
"default": "./dist/auction-item.css"
|
|
97
|
+
},
|
|
98
|
+
"./public-events": {
|
|
99
|
+
"types": "./dist/public-events.d.ts",
|
|
100
|
+
"import": "./dist/public-events.js",
|
|
101
|
+
"default": "./dist/public-events.js"
|
|
102
|
+
},
|
|
103
|
+
"./public-events.css": {
|
|
104
|
+
"types": "./dist/styles.d.ts",
|
|
105
|
+
"default": "./dist/public-events.css"
|
|
96
106
|
}
|
|
97
107
|
},
|
|
98
108
|
"module": "./dist/index.js",
|
|
@@ -107,7 +117,7 @@
|
|
|
107
117
|
"embla-carousel-react": "8.6.0",
|
|
108
118
|
"lucide-react": "0.536.0",
|
|
109
119
|
"valibot": "1.4.2",
|
|
110
|
-
"@lockerverse/sdk": "0.2.
|
|
120
|
+
"@lockerverse/sdk": "0.2.108-dev.1"
|
|
111
121
|
},
|
|
112
122
|
"devDependencies": {
|
|
113
123
|
"@size-limit/file": "13.0.3",
|
|
@@ -129,8 +139,8 @@
|
|
|
129
139
|
"peerDependencies": {
|
|
130
140
|
"@stripe/react-stripe-js": "^6.8.0",
|
|
131
141
|
"@stripe/stripe-js": "^9.12.0",
|
|
132
|
-
"react": "^19.2.0",
|
|
133
|
-
"react-dom": "^19.2.0"
|
|
142
|
+
"react": "^18.2.0 || ^19.2.0",
|
|
143
|
+
"react-dom": "^18.2.0 || ^19.2.0"
|
|
134
144
|
},
|
|
135
145
|
"peerDependenciesMeta": {
|
|
136
146
|
"@stripe/react-stripe-js": {
|