@lockerverse/react 0.2.155 → 0.2.157
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 +14 -57
- package/dist/auction-catalog.css +3 -1
- package/dist/auction-item-layout.css +3 -0
- package/dist/auction-item.d.ts +2 -0
- package/dist/auction-item.d.ts.map +1 -1
- package/dist/auction-item.js +1 -1
- package/dist/auction-item.js.map +1 -1
- package/dist/lockerverse-auction-item-card.d.ts +5 -1
- package/dist/lockerverse-auction-item-card.d.ts.map +1 -1
- package/dist/lockerverse-auction.js +1 -1
- package/dist/lockerverse-auction.js.map +1 -1
- package/dist/use-auction-boundary.js +1 -1
- package/dist/use-auction-boundary.js.map +1 -1
- package/guides/auctions.md +547 -0
- package/guides/events.md +100 -0
- package/guides/integration.md +259 -0
- package/guides/payment-widgets.md +704 -0
- package/guides/signup.md +94 -0
- package/package.json +7 -5
package/guides/signup.md
ADDED
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
# Lockerverse signup guide
|
|
2
|
+
|
|
3
|
+
Package: @lockerverse/react@0.2.157
|
|
4
|
+
|
|
5
|
+
Generated from this release's maintained documentation. Do not edit this copy.
|
|
6
|
+
|
|
7
|
+
Read [the shared integration guide](integration.md) first.
|
|
8
|
+
|
|
9
|
+
## Signup component
|
|
10
|
+
|
|
11
|
+
```tsx
|
|
12
|
+
import {
|
|
13
|
+
LockerverseSignup,
|
|
14
|
+
type LockerverseSignupProps,
|
|
15
|
+
useLockerverseSignup,
|
|
16
|
+
} from "@lockerverse/react/signup";
|
|
17
|
+
import "@lockerverse/react/signup.css";
|
|
18
|
+
|
|
19
|
+
const handleSignupComplete: NonNullable<
|
|
20
|
+
LockerverseSignupProps["onSignupComplete"]
|
|
21
|
+
> = (submission) => {
|
|
22
|
+
console.info("Signup complete", submission.id);
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
export function Signup() {
|
|
26
|
+
const widget = useLockerverseSignup({
|
|
27
|
+
communitySlug: "your-community",
|
|
28
|
+
signupSlug: "your-signup",
|
|
29
|
+
});
|
|
30
|
+
return (
|
|
31
|
+
<LockerverseSignup
|
|
32
|
+
onSignupComplete={handleSignupComplete}
|
|
33
|
+
widget={widget}
|
|
34
|
+
/>
|
|
35
|
+
);
|
|
36
|
+
}
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
## Properties
|
|
40
|
+
|
|
41
|
+
```ts
|
|
42
|
+
type LockerverseSignupProps = {
|
|
43
|
+
widget: UseLockerverseSignupResult;
|
|
44
|
+
branding?: {
|
|
45
|
+
accentColor?: string;
|
|
46
|
+
imageUrl?: string | null;
|
|
47
|
+
name: string;
|
|
48
|
+
};
|
|
49
|
+
googlePlacesApiKey?: string;
|
|
50
|
+
onSignupComplete?: (submission: {
|
|
51
|
+
id: string;
|
|
52
|
+
submittedAt: string;
|
|
53
|
+
}) => void;
|
|
54
|
+
style?: LockerverseStyle;
|
|
55
|
+
theme?: "dark" | "light";
|
|
56
|
+
};
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
Use `useLockerverseSignup(options)` and pass its result as `widget={widget}`.
|
|
60
|
+
The hook is the only source for the client, definition, loading state, and load
|
|
61
|
+
error. This entry does not import Stripe.
|
|
62
|
+
|
|
63
|
+
The API, environment, community slug, and signup slug stay fixed for the
|
|
64
|
+
mounted hook. To show a different signup, remount the owning component
|
|
65
|
+
with a new React `key`. Theme, branding, and callbacks can change without a
|
|
66
|
+
remount. `refresh()` reloads the same signup.
|
|
67
|
+
|
|
68
|
+
Use the same `LockerverseStyle` tokens as payment and donate launcher. See
|
|
69
|
+
[Theming](integration.md#styling) and the [live theme workbench](https://sdk.lockerverse.com/examples/theming).
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
## Host integration and verification
|
|
73
|
+
|
|
74
|
+
Use the saved `communitySlug`, `signupSlug`, `apiBaseUrl`, and `environment`
|
|
75
|
+
from the prompt. Reuse the existing signup section and host theme. Load the
|
|
76
|
+
live definition; do not hard-code fields, required flags, choices, or consent
|
|
77
|
+
text. The SDK supplies loading, validation, error, and completion states.
|
|
78
|
+
Show completion only through `onSignupComplete`. Do not turn this form into a
|
|
79
|
+
payment flow, account signup, or a separate backend integration.
|
|
80
|
+
|
|
81
|
+
Pass `googlePlacesApiKey` only when the host has an appropriate public,
|
|
82
|
+
restricted browser key and address suggestions are wanted. Manual address
|
|
83
|
+
entry must remain available. Never put private API keys or submitted contact
|
|
84
|
+
data in page source, metadata, URLs, analytics, or logs.
|
|
85
|
+
|
|
86
|
+
On an SSR host, fetch the definition through `createLockerverseSignupClient`
|
|
87
|
+
from `@lockerverse/sdk/signup` and its `load()` method. Seed
|
|
88
|
+
`useLockerverseSignup(options, { initialSignup })`; keep the available
|
|
89
|
+
definition visible during refresh. Use the installed types for the complete
|
|
90
|
+
validated snapshot. Read the shared guide for static-site constraints.
|
|
91
|
+
|
|
92
|
+
Build and check the form on desktop and 390 by 844 mobile. Check keyboard access,
|
|
93
|
+
required-field validation, loading and error states, and manual address entry
|
|
94
|
+
when configured. Do not send a live signup submission during this check.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lockerverse/react",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.157",
|
|
4
4
|
"description": "Tree-shakable React payment and signup UI for Lockerverse",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -118,13 +118,15 @@
|
|
|
118
118
|
"types": "./dist/payment-primitives.d.ts",
|
|
119
119
|
"import": "./dist/payment-primitives.js",
|
|
120
120
|
"default": "./dist/payment-primitives.js"
|
|
121
|
-
}
|
|
121
|
+
},
|
|
122
|
+
"./guides/*": "./guides/*"
|
|
122
123
|
},
|
|
123
124
|
"module": "./dist/index.js",
|
|
124
125
|
"types": "./dist/index.d.ts",
|
|
125
126
|
"files": [
|
|
126
127
|
"dist",
|
|
127
|
-
"README.md"
|
|
128
|
+
"README.md",
|
|
129
|
+
"guides"
|
|
128
130
|
],
|
|
129
131
|
"dependencies": {
|
|
130
132
|
"@base-ui/react": "1.6.0",
|
|
@@ -132,7 +134,7 @@
|
|
|
132
134
|
"embla-carousel-react": "8.6.0",
|
|
133
135
|
"lucide-react": "0.536.0",
|
|
134
136
|
"valibot": "1.4.2",
|
|
135
|
-
"@lockerverse/sdk": "0.2.
|
|
137
|
+
"@lockerverse/sdk": "0.2.157"
|
|
136
138
|
},
|
|
137
139
|
"devDependencies": {
|
|
138
140
|
"@size-limit/file": "13.0.3",
|
|
@@ -219,7 +221,7 @@
|
|
|
219
221
|
}
|
|
220
222
|
],
|
|
221
223
|
"scripts": {
|
|
222
|
-
"build": "tsdown",
|
|
224
|
+
"build": "node ../../scripts/build-integration-guides.mjs && tsdown",
|
|
223
225
|
"pack:check": "pnpm build && pnpm pack --dry-run",
|
|
224
226
|
"size": "size-limit",
|
|
225
227
|
"pretest": "pnpm --filter @lockerverse/sdk build",
|