@popgrids/embed 0.0.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 +1 -0
- package/dist/apple-IX52EWYN.png +0 -0
- package/dist/google-Q3MFTU5A.png +0 -0
- package/dist/index.cjs +1071 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +989 -0
- package/dist/index.d.ts +989 -0
- package/dist/index.js +1071 -0
- package/dist/index.js.map +1 -0
- package/dist/swirling-ovals-ZDTHSA3L.gif +0 -0
- package/package.json +64 -0
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,989 @@
|
|
|
1
|
+
import * as lit_html from 'lit-html';
|
|
2
|
+
import { PopElement } from '@popgrids/ui';
|
|
3
|
+
import { CSSResultGroup, LitElement } from 'lit';
|
|
4
|
+
import { Client } from 'openapi-fetch';
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* @summary Auth join button that displays "Join the Conversation" with the Popgrids logo.
|
|
8
|
+
* @status experimental
|
|
9
|
+
* @since 0.0.1
|
|
10
|
+
*
|
|
11
|
+
* @event pop-click - Emitted when the button is clicked.
|
|
12
|
+
*
|
|
13
|
+
* @csspart base - The component's base wrapper.
|
|
14
|
+
*/
|
|
15
|
+
declare class PopAuthJoin extends PopElement {
|
|
16
|
+
static styles: CSSResultGroup;
|
|
17
|
+
handleClick(): void;
|
|
18
|
+
render(): lit_html.TemplateResult<1>;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
declare global {
|
|
22
|
+
interface HTMLElementTagNameMap {
|
|
23
|
+
"pop-auth-join": PopAuthJoin;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* This file was auto-generated by openapi-typescript.
|
|
29
|
+
* Do not make direct changes to the file.
|
|
30
|
+
*/
|
|
31
|
+
interface paths {
|
|
32
|
+
"/api/v1/accounts": {
|
|
33
|
+
parameters: {
|
|
34
|
+
query?: never;
|
|
35
|
+
header?: never;
|
|
36
|
+
path?: never;
|
|
37
|
+
cookie?: never;
|
|
38
|
+
};
|
|
39
|
+
/**
|
|
40
|
+
* list accounts
|
|
41
|
+
* @description List all accounts
|
|
42
|
+
*/
|
|
43
|
+
get: {
|
|
44
|
+
parameters: {
|
|
45
|
+
query?: {
|
|
46
|
+
/** @description Filter accounts by name */
|
|
47
|
+
by_name?: string;
|
|
48
|
+
/**
|
|
49
|
+
* @description Page number
|
|
50
|
+
* @default 1
|
|
51
|
+
*/
|
|
52
|
+
page?: number;
|
|
53
|
+
/**
|
|
54
|
+
* @description Number of accounts per page
|
|
55
|
+
* @default 10
|
|
56
|
+
*/
|
|
57
|
+
limit?: number;
|
|
58
|
+
};
|
|
59
|
+
header?: never;
|
|
60
|
+
path?: never;
|
|
61
|
+
cookie?: never;
|
|
62
|
+
};
|
|
63
|
+
requestBody?: never;
|
|
64
|
+
responses: {
|
|
65
|
+
/** @description successful */
|
|
66
|
+
200: {
|
|
67
|
+
headers: {
|
|
68
|
+
[name: string]: unknown;
|
|
69
|
+
};
|
|
70
|
+
content?: never;
|
|
71
|
+
};
|
|
72
|
+
};
|
|
73
|
+
};
|
|
74
|
+
put?: never;
|
|
75
|
+
post?: never;
|
|
76
|
+
delete?: never;
|
|
77
|
+
options?: never;
|
|
78
|
+
head?: never;
|
|
79
|
+
patch?: never;
|
|
80
|
+
trace?: never;
|
|
81
|
+
};
|
|
82
|
+
"/api/v1/grids/{grid_id}/comments/{id}/replies": {
|
|
83
|
+
parameters: {
|
|
84
|
+
query?: never;
|
|
85
|
+
header?: never;
|
|
86
|
+
path: {
|
|
87
|
+
/** @description grid_id */
|
|
88
|
+
grid_id: string;
|
|
89
|
+
/** @description id */
|
|
90
|
+
id: string;
|
|
91
|
+
};
|
|
92
|
+
cookie?: never;
|
|
93
|
+
};
|
|
94
|
+
/** replies comment */
|
|
95
|
+
get: {
|
|
96
|
+
parameters: {
|
|
97
|
+
query?: never;
|
|
98
|
+
header?: never;
|
|
99
|
+
path: {
|
|
100
|
+
/** @description grid_id */
|
|
101
|
+
grid_id: string;
|
|
102
|
+
/** @description id */
|
|
103
|
+
id: string;
|
|
104
|
+
};
|
|
105
|
+
cookie?: never;
|
|
106
|
+
};
|
|
107
|
+
requestBody?: never;
|
|
108
|
+
responses: {
|
|
109
|
+
/** @description successful */
|
|
110
|
+
200: {
|
|
111
|
+
headers: {
|
|
112
|
+
[name: string]: unknown;
|
|
113
|
+
};
|
|
114
|
+
content?: never;
|
|
115
|
+
};
|
|
116
|
+
};
|
|
117
|
+
};
|
|
118
|
+
put?: never;
|
|
119
|
+
post?: never;
|
|
120
|
+
delete?: never;
|
|
121
|
+
options?: never;
|
|
122
|
+
head?: never;
|
|
123
|
+
patch?: never;
|
|
124
|
+
trace?: never;
|
|
125
|
+
};
|
|
126
|
+
"/api/v1/grids/{grid_id}/comments": {
|
|
127
|
+
parameters: {
|
|
128
|
+
query?: never;
|
|
129
|
+
header?: never;
|
|
130
|
+
path: {
|
|
131
|
+
/** @description grid_id */
|
|
132
|
+
grid_id: string;
|
|
133
|
+
};
|
|
134
|
+
cookie?: never;
|
|
135
|
+
};
|
|
136
|
+
/** list comments */
|
|
137
|
+
get: {
|
|
138
|
+
parameters: {
|
|
139
|
+
query?: never;
|
|
140
|
+
header?: never;
|
|
141
|
+
path: {
|
|
142
|
+
/** @description grid_id */
|
|
143
|
+
grid_id: string;
|
|
144
|
+
};
|
|
145
|
+
cookie?: never;
|
|
146
|
+
};
|
|
147
|
+
requestBody?: never;
|
|
148
|
+
responses: {
|
|
149
|
+
/** @description successful */
|
|
150
|
+
200: {
|
|
151
|
+
headers: {
|
|
152
|
+
[name: string]: unknown;
|
|
153
|
+
};
|
|
154
|
+
content?: never;
|
|
155
|
+
};
|
|
156
|
+
};
|
|
157
|
+
};
|
|
158
|
+
put?: never;
|
|
159
|
+
post?: never;
|
|
160
|
+
delete?: never;
|
|
161
|
+
options?: never;
|
|
162
|
+
head?: never;
|
|
163
|
+
patch?: never;
|
|
164
|
+
trace?: never;
|
|
165
|
+
};
|
|
166
|
+
"/api/v1/grids/{grid_id}/comments/{id}": {
|
|
167
|
+
parameters: {
|
|
168
|
+
query?: never;
|
|
169
|
+
header?: never;
|
|
170
|
+
path: {
|
|
171
|
+
/** @description grid_id */
|
|
172
|
+
grid_id: string;
|
|
173
|
+
/** @description id */
|
|
174
|
+
id: string;
|
|
175
|
+
};
|
|
176
|
+
cookie?: never;
|
|
177
|
+
};
|
|
178
|
+
/** show comment */
|
|
179
|
+
get: {
|
|
180
|
+
parameters: {
|
|
181
|
+
query?: never;
|
|
182
|
+
header?: never;
|
|
183
|
+
path: {
|
|
184
|
+
/** @description grid_id */
|
|
185
|
+
grid_id: string;
|
|
186
|
+
/** @description id */
|
|
187
|
+
id: string;
|
|
188
|
+
};
|
|
189
|
+
cookie?: never;
|
|
190
|
+
};
|
|
191
|
+
requestBody?: never;
|
|
192
|
+
responses: {
|
|
193
|
+
/** @description successful */
|
|
194
|
+
200: {
|
|
195
|
+
headers: {
|
|
196
|
+
[name: string]: unknown;
|
|
197
|
+
};
|
|
198
|
+
content?: never;
|
|
199
|
+
};
|
|
200
|
+
};
|
|
201
|
+
};
|
|
202
|
+
put?: never;
|
|
203
|
+
post?: never;
|
|
204
|
+
delete?: never;
|
|
205
|
+
options?: never;
|
|
206
|
+
head?: never;
|
|
207
|
+
patch?: never;
|
|
208
|
+
trace?: never;
|
|
209
|
+
};
|
|
210
|
+
"/api/v1/grids/{id}": {
|
|
211
|
+
parameters: {
|
|
212
|
+
query?: never;
|
|
213
|
+
header?: never;
|
|
214
|
+
path: {
|
|
215
|
+
/** @description id */
|
|
216
|
+
id: string;
|
|
217
|
+
};
|
|
218
|
+
cookie?: never;
|
|
219
|
+
};
|
|
220
|
+
/**
|
|
221
|
+
* show grid
|
|
222
|
+
* @description Show a grid by ID
|
|
223
|
+
*/
|
|
224
|
+
get: {
|
|
225
|
+
parameters: {
|
|
226
|
+
query?: never;
|
|
227
|
+
header?: never;
|
|
228
|
+
path: {
|
|
229
|
+
/** @description id */
|
|
230
|
+
id: string;
|
|
231
|
+
};
|
|
232
|
+
cookie?: never;
|
|
233
|
+
};
|
|
234
|
+
requestBody?: never;
|
|
235
|
+
responses: {
|
|
236
|
+
/** @description successful */
|
|
237
|
+
200: {
|
|
238
|
+
headers: {
|
|
239
|
+
[name: string]: unknown;
|
|
240
|
+
};
|
|
241
|
+
content?: never;
|
|
242
|
+
};
|
|
243
|
+
};
|
|
244
|
+
};
|
|
245
|
+
put?: never;
|
|
246
|
+
post?: never;
|
|
247
|
+
delete?: never;
|
|
248
|
+
options?: never;
|
|
249
|
+
head?: never;
|
|
250
|
+
patch?: never;
|
|
251
|
+
trace?: never;
|
|
252
|
+
};
|
|
253
|
+
"/api/v1/session": {
|
|
254
|
+
parameters: {
|
|
255
|
+
query?: never;
|
|
256
|
+
header?: never;
|
|
257
|
+
path?: never;
|
|
258
|
+
cookie?: never;
|
|
259
|
+
};
|
|
260
|
+
get?: never;
|
|
261
|
+
/**
|
|
262
|
+
* update session
|
|
263
|
+
* @description Update a session
|
|
264
|
+
*/
|
|
265
|
+
put: {
|
|
266
|
+
parameters: {
|
|
267
|
+
query?: {
|
|
268
|
+
/** @description email */
|
|
269
|
+
email?: string;
|
|
270
|
+
/** @description code */
|
|
271
|
+
code?: string;
|
|
272
|
+
};
|
|
273
|
+
header?: never;
|
|
274
|
+
path?: never;
|
|
275
|
+
cookie?: never;
|
|
276
|
+
};
|
|
277
|
+
requestBody?: never;
|
|
278
|
+
responses: {
|
|
279
|
+
/** @description successful */
|
|
280
|
+
200: {
|
|
281
|
+
headers: {
|
|
282
|
+
[name: string]: unknown;
|
|
283
|
+
};
|
|
284
|
+
content?: never;
|
|
285
|
+
};
|
|
286
|
+
};
|
|
287
|
+
};
|
|
288
|
+
/**
|
|
289
|
+
* create session
|
|
290
|
+
* @description Create a session
|
|
291
|
+
*/
|
|
292
|
+
post: {
|
|
293
|
+
parameters: {
|
|
294
|
+
query?: {
|
|
295
|
+
/** @description email */
|
|
296
|
+
email?: string;
|
|
297
|
+
};
|
|
298
|
+
header?: never;
|
|
299
|
+
path?: never;
|
|
300
|
+
cookie?: never;
|
|
301
|
+
};
|
|
302
|
+
requestBody?: never;
|
|
303
|
+
responses: {
|
|
304
|
+
/** @description successful */
|
|
305
|
+
200: {
|
|
306
|
+
headers: {
|
|
307
|
+
[name: string]: unknown;
|
|
308
|
+
};
|
|
309
|
+
content?: never;
|
|
310
|
+
};
|
|
311
|
+
};
|
|
312
|
+
};
|
|
313
|
+
/**
|
|
314
|
+
* delete session
|
|
315
|
+
* @description Delete a session
|
|
316
|
+
*/
|
|
317
|
+
delete: {
|
|
318
|
+
parameters: {
|
|
319
|
+
query?: never;
|
|
320
|
+
header?: never;
|
|
321
|
+
path?: never;
|
|
322
|
+
cookie?: never;
|
|
323
|
+
};
|
|
324
|
+
requestBody?: never;
|
|
325
|
+
responses: {
|
|
326
|
+
/** @description successful */
|
|
327
|
+
200: {
|
|
328
|
+
headers: {
|
|
329
|
+
[name: string]: unknown;
|
|
330
|
+
};
|
|
331
|
+
content?: never;
|
|
332
|
+
};
|
|
333
|
+
};
|
|
334
|
+
};
|
|
335
|
+
options?: never;
|
|
336
|
+
head?: never;
|
|
337
|
+
/**
|
|
338
|
+
* update session
|
|
339
|
+
* @description Update a session
|
|
340
|
+
*/
|
|
341
|
+
patch: {
|
|
342
|
+
parameters: {
|
|
343
|
+
query?: {
|
|
344
|
+
/** @description email */
|
|
345
|
+
email?: string;
|
|
346
|
+
/** @description code */
|
|
347
|
+
code?: string;
|
|
348
|
+
};
|
|
349
|
+
header?: never;
|
|
350
|
+
path?: never;
|
|
351
|
+
cookie?: never;
|
|
352
|
+
};
|
|
353
|
+
requestBody?: never;
|
|
354
|
+
responses: {
|
|
355
|
+
/** @description successful */
|
|
356
|
+
200: {
|
|
357
|
+
headers: {
|
|
358
|
+
[name: string]: unknown;
|
|
359
|
+
};
|
|
360
|
+
content?: never;
|
|
361
|
+
};
|
|
362
|
+
};
|
|
363
|
+
};
|
|
364
|
+
trace?: never;
|
|
365
|
+
};
|
|
366
|
+
"/api/v1/users/me": {
|
|
367
|
+
parameters: {
|
|
368
|
+
query?: never;
|
|
369
|
+
header?: never;
|
|
370
|
+
path?: never;
|
|
371
|
+
cookie?: never;
|
|
372
|
+
};
|
|
373
|
+
/**
|
|
374
|
+
* me user
|
|
375
|
+
* @description Get the current user
|
|
376
|
+
*/
|
|
377
|
+
get: {
|
|
378
|
+
parameters: {
|
|
379
|
+
query?: never;
|
|
380
|
+
header?: never;
|
|
381
|
+
path?: never;
|
|
382
|
+
cookie?: never;
|
|
383
|
+
};
|
|
384
|
+
requestBody?: never;
|
|
385
|
+
responses: {
|
|
386
|
+
/** @description successful */
|
|
387
|
+
200: {
|
|
388
|
+
headers: {
|
|
389
|
+
[name: string]: unknown;
|
|
390
|
+
};
|
|
391
|
+
content?: never;
|
|
392
|
+
};
|
|
393
|
+
};
|
|
394
|
+
};
|
|
395
|
+
put?: never;
|
|
396
|
+
post?: never;
|
|
397
|
+
delete?: never;
|
|
398
|
+
options?: never;
|
|
399
|
+
head?: never;
|
|
400
|
+
patch?: never;
|
|
401
|
+
trace?: never;
|
|
402
|
+
};
|
|
403
|
+
}
|
|
404
|
+
interface components {
|
|
405
|
+
schemas: {
|
|
406
|
+
avatar: {
|
|
407
|
+
url?: string;
|
|
408
|
+
};
|
|
409
|
+
grid: {
|
|
410
|
+
/** Format: uuid */
|
|
411
|
+
id?: string;
|
|
412
|
+
/** Format: uuid */
|
|
413
|
+
accountId?: string | null;
|
|
414
|
+
publicId?: string | null;
|
|
415
|
+
preview?: string | null;
|
|
416
|
+
layout?: string | null;
|
|
417
|
+
align?: string | null;
|
|
418
|
+
island?: string | null;
|
|
419
|
+
position?: string | null;
|
|
420
|
+
icon?: string | null;
|
|
421
|
+
appearance?: string | null;
|
|
422
|
+
/** @default 0 */
|
|
423
|
+
commentsCount: number;
|
|
424
|
+
/** Format: date-time */
|
|
425
|
+
lastCommentAt?: string | null;
|
|
426
|
+
/** Format: date-time */
|
|
427
|
+
createdAt?: string;
|
|
428
|
+
/** Format: date-time */
|
|
429
|
+
updatedAt?: string;
|
|
430
|
+
customAddIcon?: string | null;
|
|
431
|
+
};
|
|
432
|
+
comment: {
|
|
433
|
+
/** Format: uuid */
|
|
434
|
+
id?: string;
|
|
435
|
+
/** Format: uuid */
|
|
436
|
+
gridId?: string;
|
|
437
|
+
/** Format: uuid */
|
|
438
|
+
accountId?: string;
|
|
439
|
+
account?: components["schemas"]["account"];
|
|
440
|
+
/** Format: uuid */
|
|
441
|
+
parentCommentId?: string | null;
|
|
442
|
+
content?: string;
|
|
443
|
+
/** @default 0 */
|
|
444
|
+
repliesCount: number;
|
|
445
|
+
/** Format: date-time */
|
|
446
|
+
lastReplyAt?: string | null;
|
|
447
|
+
/** @default [] */
|
|
448
|
+
replies: components["schemas"]["comment"][];
|
|
449
|
+
/** Format: date-time */
|
|
450
|
+
createdAt?: string;
|
|
451
|
+
/** Format: date-time */
|
|
452
|
+
updatedAt?: string;
|
|
453
|
+
};
|
|
454
|
+
account: {
|
|
455
|
+
/** Format: uuid */
|
|
456
|
+
id?: string;
|
|
457
|
+
/** Format: uuid */
|
|
458
|
+
userId?: string;
|
|
459
|
+
name?: string;
|
|
460
|
+
url?: string;
|
|
461
|
+
avatar?: components["schemas"]["avatar"];
|
|
462
|
+
/** Format: date-time */
|
|
463
|
+
createdAt?: string;
|
|
464
|
+
/** Format: date-time */
|
|
465
|
+
updatedAt?: string;
|
|
466
|
+
};
|
|
467
|
+
};
|
|
468
|
+
responses: never;
|
|
469
|
+
parameters: never;
|
|
470
|
+
requestBodies: never;
|
|
471
|
+
headers: never;
|
|
472
|
+
pathItems: never;
|
|
473
|
+
}
|
|
474
|
+
|
|
475
|
+
type Account = components["schemas"]["account"];
|
|
476
|
+
type Comment = components["schemas"]["comment"];
|
|
477
|
+
type Grid = components["schemas"]["grid"];
|
|
478
|
+
|
|
479
|
+
/**
|
|
480
|
+
* Interface for the sign-in response data
|
|
481
|
+
*/
|
|
482
|
+
interface SignInResponse {
|
|
483
|
+
msg: string;
|
|
484
|
+
message: string;
|
|
485
|
+
email: string;
|
|
486
|
+
expires: string;
|
|
487
|
+
}
|
|
488
|
+
interface AuthState {
|
|
489
|
+
currentAccount: Account | null;
|
|
490
|
+
error: Error | null;
|
|
491
|
+
isAuthenticated: boolean;
|
|
492
|
+
isVerifying: boolean;
|
|
493
|
+
signIn: (credentials: {
|
|
494
|
+
email: string;
|
|
495
|
+
}) => Promise<SignInResponse>;
|
|
496
|
+
signOut: () => void;
|
|
497
|
+
token: string | null;
|
|
498
|
+
verificationExpiresAt: string | null;
|
|
499
|
+
verifyCode: (code: string, email: string) => Promise<void>;
|
|
500
|
+
}
|
|
501
|
+
|
|
502
|
+
/**
|
|
503
|
+
* @summary Authentication panel component that handles user authentication flows.
|
|
504
|
+
* @status experimental
|
|
505
|
+
* @since 0.0.1
|
|
506
|
+
*
|
|
507
|
+
* @description
|
|
508
|
+
* The auth panel provides a complete authentication experience with multiple states:
|
|
509
|
+
* - Collapsed state showing a join button
|
|
510
|
+
* - Sign-in form for email submission
|
|
511
|
+
* - Code verification form for completing authentication
|
|
512
|
+
* - Authenticated state display
|
|
513
|
+
*
|
|
514
|
+
* The panel automatically handles height transitions between states and
|
|
515
|
+
* closes when clicking outside or pressing the Escape key.
|
|
516
|
+
*
|
|
517
|
+
* @event pop-success - Emitted when authentication is successful.
|
|
518
|
+
*
|
|
519
|
+
* @csspart base - The component's base wrapper.
|
|
520
|
+
*/
|
|
521
|
+
declare class PopAuthPanel extends PopElement {
|
|
522
|
+
static styles: CSSResultGroup;
|
|
523
|
+
authContext?: AuthState;
|
|
524
|
+
_authPanel: HTMLElement;
|
|
525
|
+
_authPanelContent: HTMLElement;
|
|
526
|
+
private _email;
|
|
527
|
+
private _open;
|
|
528
|
+
handleJoinClick(): void;
|
|
529
|
+
connectedCallback(): Promise<void>;
|
|
530
|
+
disconnectedCallback(): void;
|
|
531
|
+
private _resizeObserver;
|
|
532
|
+
private setupResizeObserver;
|
|
533
|
+
updated(changedProperties: Map<PropertyKey, unknown>): void;
|
|
534
|
+
private handleKeyDown;
|
|
535
|
+
private handleDocumentMouseDown;
|
|
536
|
+
private handleSignInSuccess;
|
|
537
|
+
private handleCodeVerificationSuccess;
|
|
538
|
+
private renderAuthenticated;
|
|
539
|
+
private renderJoinButton;
|
|
540
|
+
private renderSignInForm;
|
|
541
|
+
private renderVerifyCodeForm;
|
|
542
|
+
private renderUnauthenticated;
|
|
543
|
+
render(): lit_html.TemplateResult<1>;
|
|
544
|
+
}
|
|
545
|
+
|
|
546
|
+
declare global {
|
|
547
|
+
interface HTMLElementTagNameMap {
|
|
548
|
+
"pop-auth-panel": PopAuthPanel;
|
|
549
|
+
}
|
|
550
|
+
}
|
|
551
|
+
|
|
552
|
+
interface ApiState {
|
|
553
|
+
baseUrl: string;
|
|
554
|
+
client: Client<paths> | null;
|
|
555
|
+
}
|
|
556
|
+
|
|
557
|
+
/**
|
|
558
|
+
* @summary A component for managing authentication state and providing authentication methods.
|
|
559
|
+
* @status experimental
|
|
560
|
+
* @since 0.0.1
|
|
561
|
+
*
|
|
562
|
+
* @slot - The default slot.
|
|
563
|
+
*
|
|
564
|
+
* @csspart base - The component's base wrapper.
|
|
565
|
+
*/
|
|
566
|
+
declare class PopAuthProvider extends PopElement {
|
|
567
|
+
static styles: CSSResultGroup;
|
|
568
|
+
apiState?: ApiState;
|
|
569
|
+
private error;
|
|
570
|
+
private isAuthenticated;
|
|
571
|
+
private currentAccount;
|
|
572
|
+
private isVerifying;
|
|
573
|
+
private token;
|
|
574
|
+
private verificationExpiresAt;
|
|
575
|
+
contextData: AuthState;
|
|
576
|
+
connectedCallback(): void;
|
|
577
|
+
private fetchCurrentAccount;
|
|
578
|
+
private signIn;
|
|
579
|
+
private verifyCode;
|
|
580
|
+
private signOut;
|
|
581
|
+
private updateContextData;
|
|
582
|
+
render(): lit_html.TemplateResult<1>;
|
|
583
|
+
}
|
|
584
|
+
|
|
585
|
+
declare global {
|
|
586
|
+
interface HTMLElementTagNameMap {
|
|
587
|
+
"pop-auth-provider": PopAuthProvider;
|
|
588
|
+
}
|
|
589
|
+
}
|
|
590
|
+
|
|
591
|
+
/**
|
|
592
|
+
* @summary A sign-in component that provides email and social authentication options.
|
|
593
|
+
* @description
|
|
594
|
+
* The PopAuthSignIn component provides a comprehensive authentication interface with:
|
|
595
|
+
* - Email-based authentication with validation
|
|
596
|
+
* - Social login options (Google and Apple)
|
|
597
|
+
* - Loading states and error handling
|
|
598
|
+
* - Responsive design with Popgrids branding
|
|
599
|
+
*
|
|
600
|
+
* @status stable
|
|
601
|
+
* @since 0.0.1
|
|
602
|
+
*
|
|
603
|
+
* @dependency pop-logo - For displaying the Popgrids logo
|
|
604
|
+
* @dependency pop-form-input-simple - For the email input field
|
|
605
|
+
* @dependency pop-button-link - For the footer link
|
|
606
|
+
*
|
|
607
|
+
* @event pop-success - Emitted when authentication is successful. Detail contains {email: string, expires: string}
|
|
608
|
+
* @event pop-error - Emitted when authentication fails. Detail contains {error: string, success: false}
|
|
609
|
+
* @event pop-invalid - Emitted when form validation fails
|
|
610
|
+
*
|
|
611
|
+
* @csspart base - The component's base wrapper
|
|
612
|
+
*
|
|
613
|
+
* @cssproperty --auth-sign-in-width - Controls the width of the sign-in form
|
|
614
|
+
* @cssproperty --auth-sign-in-padding - Controls the padding of the sign-in form
|
|
615
|
+
*/
|
|
616
|
+
declare class PopAuthSignIn extends PopElement {
|
|
617
|
+
static styles: CSSResultGroup;
|
|
618
|
+
authContext?: AuthState;
|
|
619
|
+
private email;
|
|
620
|
+
private emailError;
|
|
621
|
+
private isSubmitting;
|
|
622
|
+
private isValid;
|
|
623
|
+
private validateEmail;
|
|
624
|
+
private handleBlur;
|
|
625
|
+
private handleEmailChange;
|
|
626
|
+
private handleInvalid;
|
|
627
|
+
private handleSubmit;
|
|
628
|
+
private onSuccess;
|
|
629
|
+
private onFailure;
|
|
630
|
+
render(): lit_html.TemplateResult<1>;
|
|
631
|
+
}
|
|
632
|
+
|
|
633
|
+
declare global {
|
|
634
|
+
interface HTMLElementTagNameMap {
|
|
635
|
+
"pop-auth-sign-in": PopAuthSignIn;
|
|
636
|
+
}
|
|
637
|
+
}
|
|
638
|
+
|
|
639
|
+
/**
|
|
640
|
+
* @summary Code verification component for authentication.
|
|
641
|
+
* @status experimental
|
|
642
|
+
* @since 0.0.1
|
|
643
|
+
*
|
|
644
|
+
* @event pop-success - Emitted when code verification is successful.
|
|
645
|
+
*
|
|
646
|
+
* @slot - The default slot.
|
|
647
|
+
*
|
|
648
|
+
* @csspart base - The component's base wrapper.
|
|
649
|
+
*/
|
|
650
|
+
declare class PopAuthVerifyCode extends PopElement {
|
|
651
|
+
static styles: CSSResultGroup;
|
|
652
|
+
authContext?: AuthState;
|
|
653
|
+
email: string;
|
|
654
|
+
private code;
|
|
655
|
+
private isSubmitting;
|
|
656
|
+
private error;
|
|
657
|
+
private _showingHelp;
|
|
658
|
+
private _showingToast;
|
|
659
|
+
private _toastMessage;
|
|
660
|
+
private hiddenInput;
|
|
661
|
+
private codeInputs;
|
|
662
|
+
private getCodeInput;
|
|
663
|
+
private closeToast;
|
|
664
|
+
private handleContactSupport;
|
|
665
|
+
private handleResendCode;
|
|
666
|
+
private handleInput;
|
|
667
|
+
private handleKeyDown;
|
|
668
|
+
private handleFocus;
|
|
669
|
+
private showToast;
|
|
670
|
+
private toggleHelp;
|
|
671
|
+
private handleSubmit;
|
|
672
|
+
private handlePaste;
|
|
673
|
+
private updateCodeValue;
|
|
674
|
+
private submitForm;
|
|
675
|
+
private onSuccess;
|
|
676
|
+
private onFailure;
|
|
677
|
+
render(): lit_html.TemplateResult<1>;
|
|
678
|
+
}
|
|
679
|
+
|
|
680
|
+
declare global {
|
|
681
|
+
interface HTMLElementTagNameMap {
|
|
682
|
+
"pop-auth-verify-code": PopAuthVerifyCode;
|
|
683
|
+
}
|
|
684
|
+
}
|
|
685
|
+
|
|
686
|
+
/**
|
|
687
|
+
* @summary Provides the ability to add comments to a grid.
|
|
688
|
+
* @status experimental
|
|
689
|
+
* @since 0.0.1
|
|
690
|
+
*
|
|
691
|
+
* @slot - The default slot.
|
|
692
|
+
*
|
|
693
|
+
* @csspart base - The component's base wrapper.
|
|
694
|
+
*/
|
|
695
|
+
declare class PopCommentBar extends PopElement {
|
|
696
|
+
static styles: CSSResultGroup;
|
|
697
|
+
render(): lit_html.TemplateResult<1>;
|
|
698
|
+
}
|
|
699
|
+
|
|
700
|
+
declare global {
|
|
701
|
+
interface HTMLElementTagNameMap {
|
|
702
|
+
"pop-comment-bar": PopCommentBar;
|
|
703
|
+
}
|
|
704
|
+
}
|
|
705
|
+
|
|
706
|
+
interface GridState {
|
|
707
|
+
comments: Comment[];
|
|
708
|
+
fetchGrid: (id: string) => void;
|
|
709
|
+
fetchReplies: (commentId: string) => void;
|
|
710
|
+
grid: Grid | null;
|
|
711
|
+
loading: boolean;
|
|
712
|
+
selectedCommentId: string | null;
|
|
713
|
+
selectComment: (commentId: string | null) => void;
|
|
714
|
+
}
|
|
715
|
+
|
|
716
|
+
/**
|
|
717
|
+
* @summary A comment input component that allows users to input comments with mentions.
|
|
718
|
+
* @status experimental
|
|
719
|
+
* @since 0.0.1
|
|
720
|
+
*
|
|
721
|
+
* @event {string} pop-content-change - Emitted when the content changes.
|
|
722
|
+
* @event {Error} pop-error - Emitted when an error occurs.
|
|
723
|
+
*
|
|
724
|
+
* @csspart base - The component's base wrapper.
|
|
725
|
+
*/
|
|
726
|
+
declare class PopCommentInput extends PopElement {
|
|
727
|
+
static styles: CSSResultGroup;
|
|
728
|
+
apiState?: ApiState;
|
|
729
|
+
gridContext?: GridState;
|
|
730
|
+
variant: "text" | "search";
|
|
731
|
+
_editor: HTMLElement;
|
|
732
|
+
private _content;
|
|
733
|
+
private _error;
|
|
734
|
+
private editor?;
|
|
735
|
+
private createMentionSuggestion;
|
|
736
|
+
firstUpdated(): Promise<void>;
|
|
737
|
+
disconnectedCallback(): void;
|
|
738
|
+
private initializeEditor;
|
|
739
|
+
render(): lit_html.TemplateResult<1>;
|
|
740
|
+
}
|
|
741
|
+
|
|
742
|
+
declare global {
|
|
743
|
+
interface HTMLElementTagNameMap {
|
|
744
|
+
"pop-comment-input": PopCommentInput;
|
|
745
|
+
}
|
|
746
|
+
}
|
|
747
|
+
|
|
748
|
+
/**
|
|
749
|
+
* @summary Short summary of the component's intended use.
|
|
750
|
+
* @status experimental
|
|
751
|
+
* @since 0.0.1
|
|
752
|
+
*
|
|
753
|
+
* @dependency pop-example
|
|
754
|
+
*
|
|
755
|
+
* @event pop-event-name - Emitted as an example.
|
|
756
|
+
*
|
|
757
|
+
* @slot - The default slot.
|
|
758
|
+
* @slot example - An example slot.
|
|
759
|
+
*
|
|
760
|
+
* @csspart base - The component's base wrapper.
|
|
761
|
+
*
|
|
762
|
+
* @cssproperty --example - An example CSS custom property.
|
|
763
|
+
*/
|
|
764
|
+
declare class PopCommentThread extends PopElement {
|
|
765
|
+
static styles: CSSResultGroup;
|
|
766
|
+
gridContext?: GridState;
|
|
767
|
+
id: string;
|
|
768
|
+
get comment(): {
|
|
769
|
+
id?: string;
|
|
770
|
+
gridId?: string;
|
|
771
|
+
accountId?: string;
|
|
772
|
+
account?: components["schemas"]["account"];
|
|
773
|
+
parentCommentId?: string | null;
|
|
774
|
+
content?: string;
|
|
775
|
+
repliesCount: number;
|
|
776
|
+
lastReplyAt?: string | null;
|
|
777
|
+
replies: components["schemas"]["comment"][];
|
|
778
|
+
createdAt?: string;
|
|
779
|
+
updatedAt?: string;
|
|
780
|
+
} | undefined;
|
|
781
|
+
render(): lit_html.TemplateResult<1>;
|
|
782
|
+
}
|
|
783
|
+
|
|
784
|
+
declare global {
|
|
785
|
+
interface HTMLElementTagNameMap {
|
|
786
|
+
"pop-comment-thread": PopCommentThread;
|
|
787
|
+
}
|
|
788
|
+
}
|
|
789
|
+
|
|
790
|
+
/**
|
|
791
|
+
* @summary A component for displaying a comment.
|
|
792
|
+
* @status experimental
|
|
793
|
+
* @since 0.0.1
|
|
794
|
+
*
|
|
795
|
+
* @event {{ id: string, selected: boolean }} pop-click - Emitted when the comment is clicked.
|
|
796
|
+
*
|
|
797
|
+
* @csspart base - The component's base wrapper.
|
|
798
|
+
*
|
|
799
|
+
* @cssproperty --example - An example CSS custom property.
|
|
800
|
+
*/
|
|
801
|
+
declare class PopComment extends PopElement {
|
|
802
|
+
static styles: CSSResultGroup;
|
|
803
|
+
gridContext?: GridState;
|
|
804
|
+
id: string;
|
|
805
|
+
private _randomColor;
|
|
806
|
+
private _expanded;
|
|
807
|
+
_text: HTMLElement;
|
|
808
|
+
private handleClick;
|
|
809
|
+
get comment(): {
|
|
810
|
+
id?: string;
|
|
811
|
+
gridId?: string;
|
|
812
|
+
accountId?: string;
|
|
813
|
+
account?: components["schemas"]["account"];
|
|
814
|
+
parentCommentId?: string | null;
|
|
815
|
+
content?: string;
|
|
816
|
+
repliesCount: number;
|
|
817
|
+
lastReplyAt?: string | null;
|
|
818
|
+
replies: components["schemas"]["comment"][];
|
|
819
|
+
createdAt?: string;
|
|
820
|
+
updatedAt?: string;
|
|
821
|
+
} | null;
|
|
822
|
+
get commentAvatarSize(): "sm" | "xs";
|
|
823
|
+
get selected(): boolean;
|
|
824
|
+
findCommentOrReply(comments: Comment[], id: string): {
|
|
825
|
+
id?: string;
|
|
826
|
+
gridId?: string;
|
|
827
|
+
accountId?: string;
|
|
828
|
+
account?: components["schemas"]["account"];
|
|
829
|
+
parentCommentId?: string | null;
|
|
830
|
+
content?: string;
|
|
831
|
+
repliesCount: number;
|
|
832
|
+
lastReplyAt?: string | null;
|
|
833
|
+
replies: components["schemas"]["comment"][];
|
|
834
|
+
createdAt?: string;
|
|
835
|
+
updatedAt?: string;
|
|
836
|
+
} | null;
|
|
837
|
+
render(): lit_html.TemplateResult<1>;
|
|
838
|
+
}
|
|
839
|
+
|
|
840
|
+
declare global {
|
|
841
|
+
interface HTMLElementTagNameMap {
|
|
842
|
+
"pop-comment": PopComment;
|
|
843
|
+
}
|
|
844
|
+
}
|
|
845
|
+
|
|
846
|
+
/**
|
|
847
|
+
* @summary A component for displaying a feed of comments.
|
|
848
|
+
* @status experimental
|
|
849
|
+
* @since 0.0.1
|
|
850
|
+
*
|
|
851
|
+
* @csspart base - The component's base wrapper.
|
|
852
|
+
*/
|
|
853
|
+
declare class PopFeed extends PopElement {
|
|
854
|
+
static styles: CSSResultGroup;
|
|
855
|
+
authContext?: AuthState;
|
|
856
|
+
gridContext?: GridState;
|
|
857
|
+
open: boolean;
|
|
858
|
+
size: "sm" | "md";
|
|
859
|
+
render(): lit_html.TemplateResult<1>;
|
|
860
|
+
}
|
|
861
|
+
|
|
862
|
+
declare global {
|
|
863
|
+
interface HTMLElementTagNameMap {
|
|
864
|
+
"pop-feed": PopFeed;
|
|
865
|
+
}
|
|
866
|
+
}
|
|
867
|
+
|
|
868
|
+
/**
|
|
869
|
+
* @summary A data provider for the grid component.
|
|
870
|
+
* @status experimental
|
|
871
|
+
* @since 0.0.1
|
|
872
|
+
*
|
|
873
|
+
* @slot - The default slot.
|
|
874
|
+
*/
|
|
875
|
+
declare class PopGridProvider extends PopElement {
|
|
876
|
+
static styles: CSSResultGroup;
|
|
877
|
+
apiState?: ApiState;
|
|
878
|
+
/** Grid ID */
|
|
879
|
+
id: string;
|
|
880
|
+
grid: Grid | null;
|
|
881
|
+
comments: Comment[];
|
|
882
|
+
loading: boolean;
|
|
883
|
+
contextData: GridState;
|
|
884
|
+
private initializeContextData;
|
|
885
|
+
private updateState;
|
|
886
|
+
connectedCallback(): void;
|
|
887
|
+
fetchGrid(id: string): Promise<void>;
|
|
888
|
+
fetchComments(gridId: string): Promise<void>;
|
|
889
|
+
fetchReplies(commentId: string): Promise<void>;
|
|
890
|
+
selectComment(commentId: string | null): void;
|
|
891
|
+
render(): lit_html.TemplateResult<1>;
|
|
892
|
+
}
|
|
893
|
+
|
|
894
|
+
declare global {
|
|
895
|
+
interface HTMLElementTagNameMap {
|
|
896
|
+
"pop-grid-provider": PopGridProvider;
|
|
897
|
+
}
|
|
898
|
+
}
|
|
899
|
+
|
|
900
|
+
/**
|
|
901
|
+
* @summary A Grid displays a discussion thread.
|
|
902
|
+
* @status experimental
|
|
903
|
+
* @since 0.0.1
|
|
904
|
+
*
|
|
905
|
+
* @slot - The default slot.
|
|
906
|
+
*
|
|
907
|
+
* @csspart base - The component's base wrapper.
|
|
908
|
+
*/
|
|
909
|
+
declare class PopGrid extends PopElement {
|
|
910
|
+
static styles: CSSResultGroup;
|
|
911
|
+
apiUrl: string;
|
|
912
|
+
gridId: string;
|
|
913
|
+
render(): lit_html.TemplateResult<1>;
|
|
914
|
+
}
|
|
915
|
+
|
|
916
|
+
declare global {
|
|
917
|
+
interface HTMLElementTagNameMap {
|
|
918
|
+
"pop-grid": PopGrid;
|
|
919
|
+
}
|
|
920
|
+
}
|
|
921
|
+
|
|
922
|
+
/**
|
|
923
|
+
* @summary The base widget for a pop grid.
|
|
924
|
+
* @status experimental
|
|
925
|
+
* @since 0.0.1
|
|
926
|
+
*
|
|
927
|
+
* @dependency pop-widget
|
|
928
|
+
*
|
|
929
|
+
* @slot - The default slot.
|
|
930
|
+
*/
|
|
931
|
+
declare class PopGridView extends PopElement {
|
|
932
|
+
static styles: CSSResultGroup;
|
|
933
|
+
gridContext?: GridState;
|
|
934
|
+
private _open;
|
|
935
|
+
_previews: HTMLElement;
|
|
936
|
+
_feed: HTMLElement;
|
|
937
|
+
private cleanup;
|
|
938
|
+
connectedCallback(): Promise<void>;
|
|
939
|
+
disconnectedCallback(): void;
|
|
940
|
+
private handleKeyDown;
|
|
941
|
+
private handleDocumentMouseDown;
|
|
942
|
+
private handlePopClick;
|
|
943
|
+
private reposition;
|
|
944
|
+
private start;
|
|
945
|
+
private stop;
|
|
946
|
+
updated(changedProps: Map<string, unknown>): Promise<void>;
|
|
947
|
+
get previewComments(): {
|
|
948
|
+
id?: string;
|
|
949
|
+
gridId?: string;
|
|
950
|
+
accountId?: string;
|
|
951
|
+
account?: components["schemas"]["account"];
|
|
952
|
+
parentCommentId?: string | null;
|
|
953
|
+
content?: string;
|
|
954
|
+
repliesCount: number;
|
|
955
|
+
lastReplyAt?: string | null;
|
|
956
|
+
replies: components["schemas"]["comment"][];
|
|
957
|
+
createdAt?: string;
|
|
958
|
+
updatedAt?: string;
|
|
959
|
+
}[] | undefined;
|
|
960
|
+
render(): lit_html.TemplateResult<1>;
|
|
961
|
+
}
|
|
962
|
+
|
|
963
|
+
declare global {
|
|
964
|
+
interface HTMLElementTagNameMap {
|
|
965
|
+
"pop-widget": PopGridView;
|
|
966
|
+
}
|
|
967
|
+
}
|
|
968
|
+
|
|
969
|
+
/**
|
|
970
|
+
* @summary A provider for the API context.
|
|
971
|
+
* @status experimental
|
|
972
|
+
* @since 0.0.1
|
|
973
|
+
*
|
|
974
|
+
* @slot - The default slot.
|
|
975
|
+
*/
|
|
976
|
+
declare class PopApiProvider extends LitElement {
|
|
977
|
+
apiUrl: string;
|
|
978
|
+
apiState: ApiState;
|
|
979
|
+
connectedCallback(): void;
|
|
980
|
+
render(): lit_html.TemplateResult<1>;
|
|
981
|
+
}
|
|
982
|
+
|
|
983
|
+
declare global {
|
|
984
|
+
interface HTMLElementTagNameMap {
|
|
985
|
+
"pop-api-provider": PopApiProvider;
|
|
986
|
+
}
|
|
987
|
+
}
|
|
988
|
+
|
|
989
|
+
export { PopApiProvider, PopAuthJoin, PopAuthPanel, PopAuthProvider, PopAuthSignIn, PopAuthVerifyCode, PopComment, PopCommentBar, PopCommentInput, PopCommentThread, PopFeed, PopGrid, PopGridProvider, PopGridView as PopWidget };
|