@whop/embedded-components-vanilla-js 0.0.13-beta.4 → 0.0.13-beta.6
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 +13 -3
- package/dist/url.js +3 -3
- package/dist/url.mjs +3 -3
- package/package.json +1 -1
package/dist/lib/index.d.ts
CHANGED
|
@@ -279,11 +279,10 @@ interface ChatElementEvents {
|
|
|
279
279
|
snapshot: (snapshot: ChatElementSnapshot) => void;
|
|
280
280
|
/**
|
|
281
281
|
* Emitted when the user clicks on a profile.
|
|
282
|
-
* @param ev - The event containing the `id`
|
|
282
|
+
* @param ev - The event containing the `id` in `ev.detail`.
|
|
283
283
|
*/
|
|
284
284
|
profileClick: (ev: CustomEvent<{
|
|
285
285
|
id: string;
|
|
286
|
-
username: string;
|
|
287
286
|
}>) => void;
|
|
288
287
|
/**
|
|
289
288
|
* Emitted when the user clicks on a link.
|
|
@@ -299,8 +298,15 @@ interface ChatElementEvents {
|
|
|
299
298
|
messageSent: (ev: CustomEvent<{
|
|
300
299
|
content: string;
|
|
301
300
|
}>) => void;
|
|
301
|
+
/**
|
|
302
|
+
* Emitted when the user clicks on an experience mention.
|
|
303
|
+
* @param ev - The event containing the `id` in `ev.detail`.
|
|
304
|
+
*/
|
|
305
|
+
experienceClick: (ev: CustomEvent<{
|
|
306
|
+
id: string;
|
|
307
|
+
}>) => void;
|
|
302
308
|
}
|
|
303
|
-
declare const createTypedEvent$1: TypedEventCreatorFn<ChatElementEvents, "profileClick" | "linkClick" | "messageSent">;
|
|
309
|
+
declare const createTypedEvent$1: TypedEventCreatorFn<ChatElementEvents, "profileClick" | "linkClick" | "messageSent" | "experienceClick">;
|
|
304
310
|
type ChatElementEvent = InferEvent<typeof createTypedEvent$1>;
|
|
305
311
|
/**
|
|
306
312
|
* Configuration options for the ChatElement.
|
|
@@ -398,6 +404,10 @@ interface ChatElementSnapshot {
|
|
|
398
404
|
* console.log("Message sent:", ev.detail.content);
|
|
399
405
|
* });
|
|
400
406
|
*
|
|
407
|
+
* element.on("experienceClick", (ev) => {
|
|
408
|
+
* console.log("Experience clicked:", ev.detail.id);
|
|
409
|
+
* });
|
|
410
|
+
*
|
|
401
411
|
* element.mount("#chat-container");
|
|
402
412
|
* ```
|
|
403
413
|
*/
|
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-6.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-6.elements.whop.com/";
|
|
32
|
+
const SCRIPT_URL = new URL(`/release/elements.js`, "https://0-0-13-beta-6.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-6.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-6.elements.whop.com/";
|
|
6
|
+
const SCRIPT_URL = new URL(`/release/elements.js`, "https://0-0-13-beta-6.elements.whop.com/").toString();
|
|
7
7
|
export { ORIGIN, SCRIPT_URL, getOrigin, getScriptUrl };
|