@whop/embedded-components-vanilla-js 0.0.13-beta.3 → 0.0.13-beta.4
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/dist/lib/index.d.ts +27 -2
- package/dist/url.js +3 -3
- package/dist/url.mjs +3 -3
- package/package.json +1 -1
package/dist/lib/index.d.ts
CHANGED
|
@@ -14,6 +14,16 @@ interface TypedEventCreatorFn<Events, EventKeys extends keyof Events> {
|
|
|
14
14
|
}
|
|
15
15
|
type InferEvent<Fn> = Fn extends TypedEventCreatorFn<infer Events, infer EventKeys> ? TypedEventUnion<Events, EventKeys> : never;
|
|
16
16
|
|
|
17
|
+
interface EmptyStateOptions {
|
|
18
|
+
image?: {
|
|
19
|
+
url: string;
|
|
20
|
+
width?: number;
|
|
21
|
+
height?: number;
|
|
22
|
+
};
|
|
23
|
+
title?: string;
|
|
24
|
+
description?: string;
|
|
25
|
+
}
|
|
26
|
+
|
|
17
27
|
/**
|
|
18
28
|
* A CSS property value.
|
|
19
29
|
*/
|
|
@@ -269,9 +279,10 @@ interface ChatElementEvents {
|
|
|
269
279
|
snapshot: (snapshot: ChatElementSnapshot) => void;
|
|
270
280
|
/**
|
|
271
281
|
* Emitted when the user clicks on a profile.
|
|
272
|
-
* @param ev - The event containing the `username` in `ev.detail`.
|
|
282
|
+
* @param ev - The event containing the `id` and `username` in `ev.detail`.
|
|
273
283
|
*/
|
|
274
284
|
profileClick: (ev: CustomEvent<{
|
|
285
|
+
id: string;
|
|
275
286
|
username: string;
|
|
276
287
|
}>) => void;
|
|
277
288
|
/**
|
|
@@ -313,6 +324,16 @@ interface ChatElementOptions {
|
|
|
313
324
|
* The ID of the message to deep link to.
|
|
314
325
|
*/
|
|
315
326
|
deeplinkToPostId?: string;
|
|
327
|
+
/**
|
|
328
|
+
* Disables link navigation.
|
|
329
|
+
* Listen to the `linkClick` event to handle navigation yourself.
|
|
330
|
+
* @default false
|
|
331
|
+
*/
|
|
332
|
+
disableNavigation?: boolean;
|
|
333
|
+
/**
|
|
334
|
+
* Custom empty state displayed when there are no messages.
|
|
335
|
+
*/
|
|
336
|
+
emptyState?: EmptyStateOptions;
|
|
316
337
|
/**
|
|
317
338
|
* Callback fired when the element has finished loading and is ready for interaction.
|
|
318
339
|
* This is equivalent to listening to the `ready` event.
|
|
@@ -366,7 +387,7 @@ interface ChatElementSnapshot {
|
|
|
366
387
|
* });
|
|
367
388
|
*
|
|
368
389
|
* element.on("profileClick", (ev) => {
|
|
369
|
-
* console.log("Profile clicked:", ev.detail.
|
|
390
|
+
* console.log("Profile clicked:", ev.detail.id);
|
|
370
391
|
* });
|
|
371
392
|
*
|
|
372
393
|
* element.on("linkClick", (ev) => {
|
|
@@ -439,6 +460,10 @@ interface DmsListElementOptions {
|
|
|
439
460
|
* The ID of the currently selected channel.
|
|
440
461
|
*/
|
|
441
462
|
selectedChannel?: string;
|
|
463
|
+
/**
|
|
464
|
+
* Custom empty state displayed when there are no channels.
|
|
465
|
+
*/
|
|
466
|
+
emptyState?: EmptyStateOptions;
|
|
442
467
|
/**
|
|
443
468
|
* Callback fired when the element has finished loading and is ready for interaction.
|
|
444
469
|
* This is equivalent to listening to the `ready` event.
|
package/dist/url.js
CHANGED
|
@@ -24,10 +24,10 @@ __export(url_exports, {
|
|
|
24
24
|
getScriptUrl: () => getScriptUrl
|
|
25
25
|
});
|
|
26
26
|
module.exports = __toCommonJS(url_exports);
|
|
27
|
-
const getOrigin = () => "https://0-0-13-beta-
|
|
27
|
+
const getOrigin = () => "https://0-0-13-beta-4.elements.whop.com/";
|
|
28
28
|
const getScriptUrl = () => {
|
|
29
29
|
return new URL(`/release/elements.js`, getOrigin()).toString();
|
|
30
30
|
};
|
|
31
|
-
const ORIGIN = "https://0-0-13-beta-
|
|
32
|
-
const SCRIPT_URL = new URL(`/release/elements.js`, "https://0-0-13-beta-
|
|
31
|
+
const ORIGIN = "https://0-0-13-beta-4.elements.whop.com/";
|
|
32
|
+
const SCRIPT_URL = new URL(`/release/elements.js`, "https://0-0-13-beta-4.elements.whop.com/").toString();
|
|
33
33
|
//# sourceMappingURL=url.js.map
|
package/dist/url.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
const getOrigin = ()=>"https://0-0-13-beta-
|
|
1
|
+
const getOrigin = ()=>"https://0-0-13-beta-4.elements.whop.com/";
|
|
2
2
|
const getScriptUrl = ()=>{
|
|
3
3
|
return new URL(`/release/elements.js`, getOrigin()).toString();
|
|
4
4
|
};
|
|
5
|
-
const ORIGIN = "https://0-0-13-beta-
|
|
6
|
-
const SCRIPT_URL = new URL(`/release/elements.js`, "https://0-0-13-beta-
|
|
5
|
+
const ORIGIN = "https://0-0-13-beta-4.elements.whop.com/";
|
|
6
|
+
const SCRIPT_URL = new URL(`/release/elements.js`, "https://0-0-13-beta-4.elements.whop.com/").toString();
|
|
7
7
|
export { ORIGIN, SCRIPT_URL, getOrigin, getScriptUrl };
|