@seriphxyz/solid 0.1.2 → 0.1.7
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 +292 -0
- package/dist/index.d.ts +4 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -2
- package/package.json +2 -2
package/README.md
ADDED
|
@@ -0,0 +1,292 @@
|
|
|
1
|
+
# @seriphxyz/solid
|
|
2
|
+
|
|
3
|
+
> **Note:** This repo is a read-only mirror. Source lives in a private monorepo.
|
|
4
|
+
> For issues/PRs, please open them here and we'll sync changes back.
|
|
5
|
+
|
|
6
|
+
SolidJS primitives for [Seriph](https://seriph.xyz) widgets - comments, reactions, forms, subscriptions, and more.
|
|
7
|
+
|
|
8
|
+
## Installation
|
|
9
|
+
|
|
10
|
+
```bash
|
|
11
|
+
npm install @seriphxyz/solid
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
Works with SolidJS 1.8+. Compatible with SolidStart, Astro, and standalone apps.
|
|
15
|
+
|
|
16
|
+
## Primitives
|
|
17
|
+
|
|
18
|
+
### createSubscribe
|
|
19
|
+
|
|
20
|
+
Email subscription form:
|
|
21
|
+
|
|
22
|
+
```tsx
|
|
23
|
+
import { createSubscribe } from "@seriphxyz/solid";
|
|
24
|
+
|
|
25
|
+
function SubscribeForm() {
|
|
26
|
+
const [email, setEmail] = createSignal("");
|
|
27
|
+
const { submit, status, message, error } = createSubscribe({
|
|
28
|
+
siteKey: "your-key",
|
|
29
|
+
});
|
|
30
|
+
|
|
31
|
+
const handleSubmit = async (e) => {
|
|
32
|
+
e.preventDefault();
|
|
33
|
+
await submit(email());
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
return (
|
|
37
|
+
<form onSubmit={handleSubmit}>
|
|
38
|
+
<input
|
|
39
|
+
type="email"
|
|
40
|
+
value={email()}
|
|
41
|
+
onInput={(e) => setEmail(e.target.value)}
|
|
42
|
+
placeholder="your@email.com"
|
|
43
|
+
/>
|
|
44
|
+
<button disabled={status() === "loading"}>
|
|
45
|
+
{status() === "loading" ? "Subscribing..." : "Subscribe"}
|
|
46
|
+
</button>
|
|
47
|
+
<Show when={status() === "success"}>
|
|
48
|
+
<p>{message()}</p>
|
|
49
|
+
</Show>
|
|
50
|
+
<Show when={status() === "error"}>
|
|
51
|
+
<p>{error()?.message}</p>
|
|
52
|
+
</Show>
|
|
53
|
+
</form>
|
|
54
|
+
);
|
|
55
|
+
}
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
### createReactions
|
|
59
|
+
|
|
60
|
+
Reaction buttons (like, love, clap, etc.):
|
|
61
|
+
|
|
62
|
+
```tsx
|
|
63
|
+
import { createReactions } from "@seriphxyz/solid";
|
|
64
|
+
|
|
65
|
+
function LikeButton() {
|
|
66
|
+
const { counts, userReactions, add, remove, status } = createReactions({
|
|
67
|
+
siteKey: "your-key",
|
|
68
|
+
pageId: "my-page",
|
|
69
|
+
});
|
|
70
|
+
|
|
71
|
+
const hasLiked = () => userReactions().includes("like");
|
|
72
|
+
|
|
73
|
+
return (
|
|
74
|
+
<button onClick={() => (hasLiked() ? remove("like") : add("like"))}>
|
|
75
|
+
{hasLiked() ? "Unlike" : "Like"} ({counts().like || 0})
|
|
76
|
+
</button>
|
|
77
|
+
);
|
|
78
|
+
}
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
### createComments
|
|
82
|
+
|
|
83
|
+
Threaded comments:
|
|
84
|
+
|
|
85
|
+
```tsx
|
|
86
|
+
import { createComments } from "@seriphxyz/solid";
|
|
87
|
+
|
|
88
|
+
function Comments() {
|
|
89
|
+
const { comments, post, status, error } = createComments({
|
|
90
|
+
siteKey: "your-key",
|
|
91
|
+
pageId: "my-page",
|
|
92
|
+
});
|
|
93
|
+
|
|
94
|
+
return (
|
|
95
|
+
<div>
|
|
96
|
+
<For each={comments()}>
|
|
97
|
+
{(comment) => (
|
|
98
|
+
<div>
|
|
99
|
+
<strong>{comment.authorName}</strong>
|
|
100
|
+
<p>{comment.content}</p>
|
|
101
|
+
</div>
|
|
102
|
+
)}
|
|
103
|
+
</For>
|
|
104
|
+
</div>
|
|
105
|
+
);
|
|
106
|
+
}
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
### createForm
|
|
110
|
+
|
|
111
|
+
Contact forms with spam protection:
|
|
112
|
+
|
|
113
|
+
```tsx
|
|
114
|
+
import { createForm } from "@seriphxyz/solid";
|
|
115
|
+
|
|
116
|
+
function ContactForm() {
|
|
117
|
+
const { submit, status, message } = createForm({
|
|
118
|
+
siteKey: "your-key",
|
|
119
|
+
formSlug: "contact",
|
|
120
|
+
});
|
|
121
|
+
|
|
122
|
+
const handleSubmit = async (e) => {
|
|
123
|
+
e.preventDefault();
|
|
124
|
+
const data = Object.fromEntries(new FormData(e.target));
|
|
125
|
+
await submit(data);
|
|
126
|
+
};
|
|
127
|
+
|
|
128
|
+
return (
|
|
129
|
+
<form onSubmit={handleSubmit}>
|
|
130
|
+
<input name="email" type="email" required />
|
|
131
|
+
<textarea name="message" required />
|
|
132
|
+
<button type="submit">Send</button>
|
|
133
|
+
<Show when={status() === "success"}>
|
|
134
|
+
<p>{message()}</p>
|
|
135
|
+
</Show>
|
|
136
|
+
</form>
|
|
137
|
+
);
|
|
138
|
+
}
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
### createWaitlist
|
|
142
|
+
|
|
143
|
+
Waitlist signups:
|
|
144
|
+
|
|
145
|
+
```tsx
|
|
146
|
+
import { createWaitlist } from "@seriphxyz/solid";
|
|
147
|
+
|
|
148
|
+
function WaitlistForm() {
|
|
149
|
+
const { join, status, message, position } = createWaitlist({
|
|
150
|
+
siteKey: "your-key",
|
|
151
|
+
});
|
|
152
|
+
|
|
153
|
+
const handleSubmit = async (e) => {
|
|
154
|
+
e.preventDefault();
|
|
155
|
+
await join(email(), { name: name(), source: "homepage" });
|
|
156
|
+
};
|
|
157
|
+
|
|
158
|
+
return (
|
|
159
|
+
<form onSubmit={handleSubmit}>
|
|
160
|
+
<input name="email" type="email" required />
|
|
161
|
+
<button type="submit">Join Waitlist</button>
|
|
162
|
+
<Show when={status() === "success"}>
|
|
163
|
+
<p>{message()}</p>
|
|
164
|
+
</Show>
|
|
165
|
+
</form>
|
|
166
|
+
);
|
|
167
|
+
}
|
|
168
|
+
```
|
|
169
|
+
|
|
170
|
+
### createFeedback
|
|
171
|
+
|
|
172
|
+
Feedback forms:
|
|
173
|
+
|
|
174
|
+
```tsx
|
|
175
|
+
import { createFeedback } from "@seriphxyz/solid";
|
|
176
|
+
|
|
177
|
+
function FeedbackWidget() {
|
|
178
|
+
const { submit, status, message } = createFeedback({
|
|
179
|
+
siteKey: "your-key",
|
|
180
|
+
});
|
|
181
|
+
|
|
182
|
+
const handleSubmit = async (type, content) => {
|
|
183
|
+
await submit(type, content, { email: email(), pageUrl: window.location.href });
|
|
184
|
+
};
|
|
185
|
+
|
|
186
|
+
// ...
|
|
187
|
+
}
|
|
188
|
+
```
|
|
189
|
+
|
|
190
|
+
### createPoll
|
|
191
|
+
|
|
192
|
+
Polls and voting:
|
|
193
|
+
|
|
194
|
+
```tsx
|
|
195
|
+
import { createPoll } from "@seriphxyz/solid";
|
|
196
|
+
|
|
197
|
+
function Poll() {
|
|
198
|
+
const { poll, vote, hasVoted, status } = createPoll({
|
|
199
|
+
siteKey: "your-key",
|
|
200
|
+
pollId: 123,
|
|
201
|
+
});
|
|
202
|
+
|
|
203
|
+
return (
|
|
204
|
+
<Show when={poll()} fallback={<div>Loading...</div>}>
|
|
205
|
+
<div>
|
|
206
|
+
<h3>{poll().question}</h3>
|
|
207
|
+
<For each={poll().options}>
|
|
208
|
+
{(option) => (
|
|
209
|
+
<button onClick={() => vote([option.id])} disabled={hasVoted()}>
|
|
210
|
+
{option.text} ({poll().results?.[option.id] || 0})
|
|
211
|
+
</button>
|
|
212
|
+
)}
|
|
213
|
+
</For>
|
|
214
|
+
</div>
|
|
215
|
+
</Show>
|
|
216
|
+
);
|
|
217
|
+
}
|
|
218
|
+
```
|
|
219
|
+
|
|
220
|
+
### createAnnouncements
|
|
221
|
+
|
|
222
|
+
Site announcements:
|
|
223
|
+
|
|
224
|
+
```tsx
|
|
225
|
+
import { createAnnouncements } from "@seriphxyz/solid";
|
|
226
|
+
|
|
227
|
+
function AnnouncementBanner() {
|
|
228
|
+
const { announcements, dismiss, status } = createAnnouncements({
|
|
229
|
+
siteKey: "your-key",
|
|
230
|
+
});
|
|
231
|
+
|
|
232
|
+
const visible = () => announcements().filter((a) => !a.dismissed);
|
|
233
|
+
|
|
234
|
+
return (
|
|
235
|
+
<For each={visible()}>
|
|
236
|
+
{(announcement) => (
|
|
237
|
+
<div>
|
|
238
|
+
<p>{announcement.content}</p>
|
|
239
|
+
<Show when={announcement.isDismissible}>
|
|
240
|
+
<button onClick={() => dismiss(announcement.id)}>Dismiss</button>
|
|
241
|
+
</Show>
|
|
242
|
+
</div>
|
|
243
|
+
)}
|
|
244
|
+
</For>
|
|
245
|
+
);
|
|
246
|
+
}
|
|
247
|
+
```
|
|
248
|
+
|
|
249
|
+
### createViewCounts
|
|
250
|
+
|
|
251
|
+
Page view tracking:
|
|
252
|
+
|
|
253
|
+
```tsx
|
|
254
|
+
import { createViewCounts } from "@seriphxyz/solid";
|
|
255
|
+
import { onMount } from "solid-js";
|
|
256
|
+
|
|
257
|
+
function PageViews() {
|
|
258
|
+
const { views, uniqueVisitors, record, status } = createViewCounts({
|
|
259
|
+
siteKey: "your-key",
|
|
260
|
+
pageId: "my-page",
|
|
261
|
+
});
|
|
262
|
+
|
|
263
|
+
// Record view on mount
|
|
264
|
+
onMount(() => {
|
|
265
|
+
record();
|
|
266
|
+
});
|
|
267
|
+
|
|
268
|
+
return (
|
|
269
|
+
<span>
|
|
270
|
+
{views()} views ({uniqueVisitors()} unique)
|
|
271
|
+
</span>
|
|
272
|
+
);
|
|
273
|
+
}
|
|
274
|
+
```
|
|
275
|
+
|
|
276
|
+
## All Primitives
|
|
277
|
+
|
|
278
|
+
| Primitive | Purpose |
|
|
279
|
+
|-----------|---------|
|
|
280
|
+
| `createSubscribe` | Email subscriptions |
|
|
281
|
+
| `createReactions` | Page reactions |
|
|
282
|
+
| `createComments` | Threaded comments |
|
|
283
|
+
| `createForm` | Form submissions |
|
|
284
|
+
| `createWaitlist` | Waitlist signups |
|
|
285
|
+
| `createFeedback` | Feedback forms |
|
|
286
|
+
| `createPoll` | Polls and voting |
|
|
287
|
+
| `createAnnouncements` | Site announcements |
|
|
288
|
+
| `createViewCounts` | Page view tracking |
|
|
289
|
+
|
|
290
|
+
## License
|
|
291
|
+
|
|
292
|
+
MIT
|
package/dist/index.d.ts
CHANGED
|
@@ -125,7 +125,10 @@ export interface CreateCommentsReturn {
|
|
|
125
125
|
comments: Accessor<Comment[]>;
|
|
126
126
|
status: Accessor<ControllerStatus>;
|
|
127
127
|
error: Accessor<Error | null>;
|
|
128
|
-
postComment: (author: string, content: string
|
|
128
|
+
postComment: (author: string, content: string, options?: {
|
|
129
|
+
authorEmail?: string;
|
|
130
|
+
parentId?: string;
|
|
131
|
+
}) => Promise<void>;
|
|
129
132
|
refresh: () => Promise<void>;
|
|
130
133
|
}
|
|
131
134
|
/**
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AAEH,OAAO,EAAyC,KAAK,QAAQ,EAAE,MAAM,UAAU,CAAC;AAChF,OAAO,EAKL,KAAK,YAAY,EACjB,KAAK,OAAO,EACZ,KAAK,gBAAgB,EACtB,MAAM,iBAAiB,CAAC;AAGzB,YAAY,EACV,YAAY,EACZ,cAAc,EACd,SAAS,EACT,cAAc,EACd,aAAa,EACb,OAAO,EACP,cAAc,EACd,UAAU,EACV,iBAAiB,EACjB,gBAAgB,EAChB,gBAAgB,GACjB,MAAM,iBAAiB,CAAC;AAGzB,OAAO,EACL,U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AAO,CAAC,EAAE;QAAE,WAAW,CAAC,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,EAAE,MAAM,CAAA;KAAE,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IACvH,OAAO,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;CAC9B;AAED;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAAgB,cAAc,CAAC,OAAO,EAAE,qBAAqB,GAAG,oBAAoB,CA+BnF"}
|
package/dist/index.js
CHANGED
|
@@ -189,8 +189,8 @@ export function createComments(options) {
|
|
|
189
189
|
}
|
|
190
190
|
onCleanup(unsubscribe);
|
|
191
191
|
});
|
|
192
|
-
const postComment = async (author, content) => {
|
|
193
|
-
await controller.post(author, content);
|
|
192
|
+
const postComment = async (author, content, options) => {
|
|
193
|
+
await controller.post(author, content, options);
|
|
194
194
|
};
|
|
195
195
|
const refresh = async () => {
|
|
196
196
|
await controller.fetch();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@seriphxyz/solid",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.7",
|
|
4
4
|
"description": "SolidJS primitives for Seriph widgets (forms, comments, reactions, subscriptions)",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
],
|
|
33
33
|
"license": "MIT",
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"@seriphxyz/core": "0.1.
|
|
35
|
+
"@seriphxyz/core": "0.1.7"
|
|
36
36
|
},
|
|
37
37
|
"peerDependencies": {
|
|
38
38
|
"solid-js": "^1.8.0"
|