@peakst8/sdk 0.0.0-stage → 0.1.0
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/index.cjs +2 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +27 -0
- package/dist/index.d.ts +27 -0
- package/dist/index.global.js +2 -0
- package/dist/index.global.js.map +1 -0
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -0
- package/package.json +28 -4
- package/README.md +0 -3
package/dist/index.cjs
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";var n=Object.defineProperty;var h=Object.getOwnPropertyDescriptor;var l=Object.getOwnPropertyNames;var d=Object.prototype.hasOwnProperty;var c=(i,e)=>{for(var t in e)n(i,t,{get:e[t],enumerable:!0})},m=(i,e,t,s)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of l(e))!d.call(i,r)&&r!==t&&n(i,r,{get:()=>e[r],enumerable:!(s=h(e,r))||s.enumerable});return i};var p=i=>m(n({},"__esModule",{value:!0}),i);var g={};c(g,{Peakst8:()=>a});module.exports=p(g);var o="90px",a=class{constructor({baseUrl:e,eventId:t}){this.bar=null;this.spacer=null;this.iframe=null;this.onMessage=e=>{if(e.origin!==this.origin||e.source!==this.iframe?.contentWindow)return;let{source:t,type:s,payload:r}=e.data??{};t!=="peakst8"||s!=="embed:resize"||this.bar&&typeof r?.height=="string"&&(this.bar.style.height=r.height)};if(!t)throw new Error("[peakst8] `eventId` is required");let s=new URL(`/event/${encodeURIComponent(t)}/embed`,e);this.src=s.toString(),this.origin=s.origin}mount(){if(this.iframe)return this.iframe;let e=document.createElement("iframe");return e.src=this.src,e.title="Peakst8 Events",e.allow="payment; clipboard-write; fullscreen; web-share",e.style.cssText="display:block;width:100%;height:100%;border:0;background:transparent",this.bar=document.createElement("div"),this.bar.style.cssText=`position:fixed;left:0;right:0;bottom:0;z-index:2147483000;height:${o}`,this.spacer=document.createElement("div"),this.spacer.setAttribute("aria-hidden","true"),this.spacer.style.height=o,this.bar.appendChild(e),document.body.append(this.spacer,this.bar),window.addEventListener("message",this.onMessage),this.iframe=e}destroy(){window.removeEventListener("message",this.onMessage),this.bar?.remove(),this.spacer?.remove(),this.bar=this.spacer=this.iframe=null}};0&&(module.exports={Peakst8});
|
|
2
|
+
//# sourceMappingURL=index.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/index.ts"],"sourcesContent":["/**\n * Peakst8 SDK — renders the Peakst8 embed page (`/event/<eventId>/embed`) in an\n * iframe fixed to the bottom of the host page. Auth, registration and payment\n * all run inside the iframe; the only message the SDK reads is `embed:resize`,\n * which the page sends to grow from the 90px bar to full screen and back.\n */\nexport interface Peakst8Config {\n /** Origin of the Peakst8 app, e.g. \"https://app.peakst8.club\". */\n baseUrl: string;\n /** Peakst8 event id. */\n eventId: string;\n}\n\nconst BAR_HEIGHT = \"90px\";\n\nexport class Peakst8 {\n private readonly src: string;\n private readonly origin: string;\n private bar: HTMLDivElement | null = null;\n private spacer: HTMLDivElement | null = null;\n private iframe: HTMLIFrameElement | null = null;\n\n constructor({ baseUrl, eventId }: Peakst8Config) {\n if (!eventId) throw new Error(\"[peakst8] `eventId` is required\");\n const url = new URL(`/event/${encodeURIComponent(eventId)}/embed`, baseUrl);\n this.src = url.toString();\n this.origin = url.origin;\n }\n\n /** Render the embed as a fixed bar at the bottom of the page. */\n mount(): HTMLIFrameElement {\n if (this.iframe) return this.iframe;\n\n const iframe = document.createElement(\"iframe\");\n iframe.src = this.src;\n iframe.title = \"Peakst8 Events\";\n // payment: Razorpay checkout; clipboard-write/web-share: ticket Share button.\n iframe.allow = \"payment; clipboard-write; fullscreen; web-share\";\n iframe.style.cssText = \"display:block;width:100%;height:100%;border:0;background:transparent\";\n\n this.bar = document.createElement(\"div\");\n this.bar.style.cssText = `position:fixed;left:0;right:0;bottom:0;z-index:2147483000;height:${BAR_HEIGHT}`;\n // Reserves room at the end of the page so the bar never covers content.\n this.spacer = document.createElement(\"div\");\n this.spacer.setAttribute(\"aria-hidden\", \"true\");\n this.spacer.style.height = BAR_HEIGHT;\n\n this.bar.appendChild(iframe);\n document.body.append(this.spacer, this.bar);\n window.addEventListener(\"message\", this.onMessage);\n return (this.iframe = iframe);\n }\n\n /** Remove the bar, iframe and message listener. */\n destroy(): void {\n window.removeEventListener(\"message\", this.onMessage);\n this.bar?.remove();\n this.spacer?.remove();\n this.bar = this.spacer = this.iframe = null;\n }\n\n private readonly onMessage = (event: MessageEvent): void => {\n if (event.origin !== this.origin || event.source !== this.iframe?.contentWindow) return;\n const { source, type, payload } = event.data ?? {};\n if (source !== \"peakst8\" || type !== \"embed:resize\") return;\n if (this.bar && typeof payload?.height === \"string\") this.bar.style.height = payload.height;\n };\n}\n"],"mappings":"yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,aAAAE,IAAA,eAAAC,EAAAH,GAaA,IAAMI,EAAa,OAENF,EAAN,KAAc,CAOnB,YAAY,CAAE,QAAAG,EAAS,QAAAC,CAAQ,EAAkB,CAJjD,KAAQ,IAA6B,KACrC,KAAQ,OAAgC,KACxC,KAAQ,OAAmC,KAyC3C,KAAiB,UAAaC,GAA8B,CAC1D,GAAIA,EAAM,SAAW,KAAK,QAAUA,EAAM,SAAW,KAAK,QAAQ,cAAe,OACjF,GAAM,CAAE,OAAAC,EAAQ,KAAAC,EAAM,QAAAC,CAAQ,EAAIH,EAAM,MAAQ,CAAC,EAC7CC,IAAW,WAAaC,IAAS,gBACjC,KAAK,KAAO,OAAOC,GAAS,QAAW,WAAU,KAAK,IAAI,MAAM,OAASA,EAAQ,OACvF,EA3CE,GAAI,CAACJ,EAAS,MAAM,IAAI,MAAM,iCAAiC,EAC/D,IAAMK,EAAM,IAAI,IAAI,UAAU,mBAAmBL,CAAO,CAAC,SAAUD,CAAO,EAC1E,KAAK,IAAMM,EAAI,SAAS,EACxB,KAAK,OAASA,EAAI,MACpB,CAGA,OAA2B,CACzB,GAAI,KAAK,OAAQ,OAAO,KAAK,OAE7B,IAAMC,EAAS,SAAS,cAAc,QAAQ,EAC9C,OAAAA,EAAO,IAAM,KAAK,IAClBA,EAAO,MAAQ,iBAEfA,EAAO,MAAQ,kDACfA,EAAO,MAAM,QAAU,uEAEvB,KAAK,IAAM,SAAS,cAAc,KAAK,EACvC,KAAK,IAAI,MAAM,QAAU,oEAAoER,CAAU,GAEvG,KAAK,OAAS,SAAS,cAAc,KAAK,EAC1C,KAAK,OAAO,aAAa,cAAe,MAAM,EAC9C,KAAK,OAAO,MAAM,OAASA,EAE3B,KAAK,IAAI,YAAYQ,CAAM,EAC3B,SAAS,KAAK,OAAO,KAAK,OAAQ,KAAK,GAAG,EAC1C,OAAO,iBAAiB,UAAW,KAAK,SAAS,EACzC,KAAK,OAASA,CACxB,CAGA,SAAgB,CACd,OAAO,oBAAoB,UAAW,KAAK,SAAS,EACpD,KAAK,KAAK,OAAO,EACjB,KAAK,QAAQ,OAAO,EACpB,KAAK,IAAM,KAAK,OAAS,KAAK,OAAS,IACzC,CAQF","names":["src_exports","__export","Peakst8","__toCommonJS","BAR_HEIGHT","baseUrl","eventId","event","source","type","payload","url","iframe"]}
|
package/dist/index.d.cts
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Peakst8 SDK — renders the Peakst8 embed page (`/event/<eventId>/embed`) in an
|
|
3
|
+
* iframe fixed to the bottom of the host page. Auth, registration and payment
|
|
4
|
+
* all run inside the iframe; the only message the SDK reads is `embed:resize`,
|
|
5
|
+
* which the page sends to grow from the 90px bar to full screen and back.
|
|
6
|
+
*/
|
|
7
|
+
interface Peakst8Config {
|
|
8
|
+
/** Origin of the Peakst8 app, e.g. "https://app.peakst8.club". */
|
|
9
|
+
baseUrl: string;
|
|
10
|
+
/** Peakst8 event id. */
|
|
11
|
+
eventId: string;
|
|
12
|
+
}
|
|
13
|
+
declare class Peakst8 {
|
|
14
|
+
private readonly src;
|
|
15
|
+
private readonly origin;
|
|
16
|
+
private bar;
|
|
17
|
+
private spacer;
|
|
18
|
+
private iframe;
|
|
19
|
+
constructor({ baseUrl, eventId }: Peakst8Config);
|
|
20
|
+
/** Render the embed as a fixed bar at the bottom of the page. */
|
|
21
|
+
mount(): HTMLIFrameElement;
|
|
22
|
+
/** Remove the bar, iframe and message listener. */
|
|
23
|
+
destroy(): void;
|
|
24
|
+
private readonly onMessage;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export { Peakst8, type Peakst8Config };
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Peakst8 SDK — renders the Peakst8 embed page (`/event/<eventId>/embed`) in an
|
|
3
|
+
* iframe fixed to the bottom of the host page. Auth, registration and payment
|
|
4
|
+
* all run inside the iframe; the only message the SDK reads is `embed:resize`,
|
|
5
|
+
* which the page sends to grow from the 90px bar to full screen and back.
|
|
6
|
+
*/
|
|
7
|
+
interface Peakst8Config {
|
|
8
|
+
/** Origin of the Peakst8 app, e.g. "https://app.peakst8.club". */
|
|
9
|
+
baseUrl: string;
|
|
10
|
+
/** Peakst8 event id. */
|
|
11
|
+
eventId: string;
|
|
12
|
+
}
|
|
13
|
+
declare class Peakst8 {
|
|
14
|
+
private readonly src;
|
|
15
|
+
private readonly origin;
|
|
16
|
+
private bar;
|
|
17
|
+
private spacer;
|
|
18
|
+
private iframe;
|
|
19
|
+
constructor({ baseUrl, eventId }: Peakst8Config);
|
|
20
|
+
/** Render the embed as a fixed bar at the bottom of the page. */
|
|
21
|
+
mount(): HTMLIFrameElement;
|
|
22
|
+
/** Remove the bar, iframe and message listener. */
|
|
23
|
+
destroy(): void;
|
|
24
|
+
private readonly onMessage;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export { Peakst8, type Peakst8Config };
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";var Peakst8SDK=(()=>{var n=Object.defineProperty;var h=Object.getOwnPropertyDescriptor;var l=Object.getOwnPropertyNames;var d=Object.prototype.hasOwnProperty;var c=(i,e)=>{for(var t in e)n(i,t,{get:e[t],enumerable:!0})},m=(i,e,t,s)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of l(e))!d.call(i,r)&&r!==t&&n(i,r,{get:()=>e[r],enumerable:!(s=h(e,r))||s.enumerable});return i};var p=i=>m(n({},"__esModule",{value:!0}),i);var g={};c(g,{Peakst8:()=>a});var o="90px",a=class{constructor({baseUrl:e,eventId:t}){this.bar=null;this.spacer=null;this.iframe=null;this.onMessage=e=>{if(e.origin!==this.origin||e.source!==this.iframe?.contentWindow)return;let{source:t,type:s,payload:r}=e.data??{};t!=="peakst8"||s!=="embed:resize"||this.bar&&typeof r?.height=="string"&&(this.bar.style.height=r.height)};if(!t)throw new Error("[peakst8] `eventId` is required");let s=new URL(`/event/${encodeURIComponent(t)}/embed`,e);this.src=s.toString(),this.origin=s.origin}mount(){if(this.iframe)return this.iframe;let e=document.createElement("iframe");return e.src=this.src,e.title="Peakst8 Events",e.allow="payment; clipboard-write; fullscreen; web-share",e.style.cssText="display:block;width:100%;height:100%;border:0;background:transparent",this.bar=document.createElement("div"),this.bar.style.cssText=`position:fixed;left:0;right:0;bottom:0;z-index:2147483000;height:${o}`,this.spacer=document.createElement("div"),this.spacer.setAttribute("aria-hidden","true"),this.spacer.style.height=o,this.bar.appendChild(e),document.body.append(this.spacer,this.bar),window.addEventListener("message",this.onMessage),this.iframe=e}destroy(){window.removeEventListener("message",this.onMessage),this.bar?.remove(),this.spacer?.remove(),this.bar=this.spacer=this.iframe=null}};return p(g);})();
|
|
2
|
+
//# sourceMappingURL=index.global.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/index.ts"],"sourcesContent":["/**\n * Peakst8 SDK — renders the Peakst8 embed page (`/event/<eventId>/embed`) in an\n * iframe fixed to the bottom of the host page. Auth, registration and payment\n * all run inside the iframe; the only message the SDK reads is `embed:resize`,\n * which the page sends to grow from the 90px bar to full screen and back.\n */\nexport interface Peakst8Config {\n /** Origin of the Peakst8 app, e.g. \"https://app.peakst8.club\". */\n baseUrl: string;\n /** Peakst8 event id. */\n eventId: string;\n}\n\nconst BAR_HEIGHT = \"90px\";\n\nexport class Peakst8 {\n private readonly src: string;\n private readonly origin: string;\n private bar: HTMLDivElement | null = null;\n private spacer: HTMLDivElement | null = null;\n private iframe: HTMLIFrameElement | null = null;\n\n constructor({ baseUrl, eventId }: Peakst8Config) {\n if (!eventId) throw new Error(\"[peakst8] `eventId` is required\");\n const url = new URL(`/event/${encodeURIComponent(eventId)}/embed`, baseUrl);\n this.src = url.toString();\n this.origin = url.origin;\n }\n\n /** Render the embed as a fixed bar at the bottom of the page. */\n mount(): HTMLIFrameElement {\n if (this.iframe) return this.iframe;\n\n const iframe = document.createElement(\"iframe\");\n iframe.src = this.src;\n iframe.title = \"Peakst8 Events\";\n // payment: Razorpay checkout; clipboard-write/web-share: ticket Share button.\n iframe.allow = \"payment; clipboard-write; fullscreen; web-share\";\n iframe.style.cssText = \"display:block;width:100%;height:100%;border:0;background:transparent\";\n\n this.bar = document.createElement(\"div\");\n this.bar.style.cssText = `position:fixed;left:0;right:0;bottom:0;z-index:2147483000;height:${BAR_HEIGHT}`;\n // Reserves room at the end of the page so the bar never covers content.\n this.spacer = document.createElement(\"div\");\n this.spacer.setAttribute(\"aria-hidden\", \"true\");\n this.spacer.style.height = BAR_HEIGHT;\n\n this.bar.appendChild(iframe);\n document.body.append(this.spacer, this.bar);\n window.addEventListener(\"message\", this.onMessage);\n return (this.iframe = iframe);\n }\n\n /** Remove the bar, iframe and message listener. */\n destroy(): void {\n window.removeEventListener(\"message\", this.onMessage);\n this.bar?.remove();\n this.spacer?.remove();\n this.bar = this.spacer = this.iframe = null;\n }\n\n private readonly onMessage = (event: MessageEvent): void => {\n if (event.origin !== this.origin || event.source !== this.iframe?.contentWindow) return;\n const { source, type, payload } = event.data ?? {};\n if (source !== \"peakst8\" || type !== \"embed:resize\") return;\n if (this.bar && typeof payload?.height === \"string\") this.bar.style.height = payload.height;\n };\n}\n"],"mappings":"8bAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,aAAAE,IAaA,IAAMC,EAAa,OAEND,EAAN,KAAc,CAOnB,YAAY,CAAE,QAAAE,EAAS,QAAAC,CAAQ,EAAkB,CAJjD,KAAQ,IAA6B,KACrC,KAAQ,OAAgC,KACxC,KAAQ,OAAmC,KAyC3C,KAAiB,UAAaC,GAA8B,CAC1D,GAAIA,EAAM,SAAW,KAAK,QAAUA,EAAM,SAAW,KAAK,QAAQ,cAAe,OACjF,GAAM,CAAE,OAAAC,EAAQ,KAAAC,EAAM,QAAAC,CAAQ,EAAIH,EAAM,MAAQ,CAAC,EAC7CC,IAAW,WAAaC,IAAS,gBACjC,KAAK,KAAO,OAAOC,GAAS,QAAW,WAAU,KAAK,IAAI,MAAM,OAASA,EAAQ,OACvF,EA3CE,GAAI,CAACJ,EAAS,MAAM,IAAI,MAAM,iCAAiC,EAC/D,IAAMK,EAAM,IAAI,IAAI,UAAU,mBAAmBL,CAAO,CAAC,SAAUD,CAAO,EAC1E,KAAK,IAAMM,EAAI,SAAS,EACxB,KAAK,OAASA,EAAI,MACpB,CAGA,OAA2B,CACzB,GAAI,KAAK,OAAQ,OAAO,KAAK,OAE7B,IAAMC,EAAS,SAAS,cAAc,QAAQ,EAC9C,OAAAA,EAAO,IAAM,KAAK,IAClBA,EAAO,MAAQ,iBAEfA,EAAO,MAAQ,kDACfA,EAAO,MAAM,QAAU,uEAEvB,KAAK,IAAM,SAAS,cAAc,KAAK,EACvC,KAAK,IAAI,MAAM,QAAU,oEAAoER,CAAU,GAEvG,KAAK,OAAS,SAAS,cAAc,KAAK,EAC1C,KAAK,OAAO,aAAa,cAAe,MAAM,EAC9C,KAAK,OAAO,MAAM,OAASA,EAE3B,KAAK,IAAI,YAAYQ,CAAM,EAC3B,SAAS,KAAK,OAAO,KAAK,OAAQ,KAAK,GAAG,EAC1C,OAAO,iBAAiB,UAAW,KAAK,SAAS,EACzC,KAAK,OAASA,CACxB,CAGA,SAAgB,CACd,OAAO,oBAAoB,UAAW,KAAK,SAAS,EACpD,KAAK,KAAK,OAAO,EACjB,KAAK,QAAQ,OAAO,EACpB,KAAK,IAAM,KAAK,OAAS,KAAK,OAAS,IACzC,CAQF","names":["src_exports","__export","Peakst8","BAR_HEIGHT","baseUrl","eventId","event","source","type","payload","url","iframe"]}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
var s="90px",n=class{constructor({baseUrl:e,eventId:t}){this.bar=null;this.spacer=null;this.iframe=null;this.onMessage=e=>{if(e.origin!==this.origin||e.source!==this.iframe?.contentWindow)return;let{source:t,type:i,payload:r}=e.data??{};t!=="peakst8"||i!=="embed:resize"||this.bar&&typeof r?.height=="string"&&(this.bar.style.height=r.height)};if(!t)throw new Error("[peakst8] `eventId` is required");let i=new URL(`/event/${encodeURIComponent(t)}/embed`,e);this.src=i.toString(),this.origin=i.origin}mount(){if(this.iframe)return this.iframe;let e=document.createElement("iframe");return e.src=this.src,e.title="Peakst8 Events",e.allow="payment; clipboard-write; fullscreen; web-share",e.style.cssText="display:block;width:100%;height:100%;border:0;background:transparent",this.bar=document.createElement("div"),this.bar.style.cssText=`position:fixed;left:0;right:0;bottom:0;z-index:2147483000;height:${s}`,this.spacer=document.createElement("div"),this.spacer.setAttribute("aria-hidden","true"),this.spacer.style.height=s,this.bar.appendChild(e),document.body.append(this.spacer,this.bar),window.addEventListener("message",this.onMessage),this.iframe=e}destroy(){window.removeEventListener("message",this.onMessage),this.bar?.remove(),this.spacer?.remove(),this.bar=this.spacer=this.iframe=null}};export{n as Peakst8};
|
|
2
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/index.ts"],"sourcesContent":["/**\n * Peakst8 SDK — renders the Peakst8 embed page (`/event/<eventId>/embed`) in an\n * iframe fixed to the bottom of the host page. Auth, registration and payment\n * all run inside the iframe; the only message the SDK reads is `embed:resize`,\n * which the page sends to grow from the 90px bar to full screen and back.\n */\nexport interface Peakst8Config {\n /** Origin of the Peakst8 app, e.g. \"https://app.peakst8.club\". */\n baseUrl: string;\n /** Peakst8 event id. */\n eventId: string;\n}\n\nconst BAR_HEIGHT = \"90px\";\n\nexport class Peakst8 {\n private readonly src: string;\n private readonly origin: string;\n private bar: HTMLDivElement | null = null;\n private spacer: HTMLDivElement | null = null;\n private iframe: HTMLIFrameElement | null = null;\n\n constructor({ baseUrl, eventId }: Peakst8Config) {\n if (!eventId) throw new Error(\"[peakst8] `eventId` is required\");\n const url = new URL(`/event/${encodeURIComponent(eventId)}/embed`, baseUrl);\n this.src = url.toString();\n this.origin = url.origin;\n }\n\n /** Render the embed as a fixed bar at the bottom of the page. */\n mount(): HTMLIFrameElement {\n if (this.iframe) return this.iframe;\n\n const iframe = document.createElement(\"iframe\");\n iframe.src = this.src;\n iframe.title = \"Peakst8 Events\";\n // payment: Razorpay checkout; clipboard-write/web-share: ticket Share button.\n iframe.allow = \"payment; clipboard-write; fullscreen; web-share\";\n iframe.style.cssText = \"display:block;width:100%;height:100%;border:0;background:transparent\";\n\n this.bar = document.createElement(\"div\");\n this.bar.style.cssText = `position:fixed;left:0;right:0;bottom:0;z-index:2147483000;height:${BAR_HEIGHT}`;\n // Reserves room at the end of the page so the bar never covers content.\n this.spacer = document.createElement(\"div\");\n this.spacer.setAttribute(\"aria-hidden\", \"true\");\n this.spacer.style.height = BAR_HEIGHT;\n\n this.bar.appendChild(iframe);\n document.body.append(this.spacer, this.bar);\n window.addEventListener(\"message\", this.onMessage);\n return (this.iframe = iframe);\n }\n\n /** Remove the bar, iframe and message listener. */\n destroy(): void {\n window.removeEventListener(\"message\", this.onMessage);\n this.bar?.remove();\n this.spacer?.remove();\n this.bar = this.spacer = this.iframe = null;\n }\n\n private readonly onMessage = (event: MessageEvent): void => {\n if (event.origin !== this.origin || event.source !== this.iframe?.contentWindow) return;\n const { source, type, payload } = event.data ?? {};\n if (source !== \"peakst8\" || type !== \"embed:resize\") return;\n if (this.bar && typeof payload?.height === \"string\") this.bar.style.height = payload.height;\n };\n}\n"],"mappings":"AAaA,IAAMA,EAAa,OAENC,EAAN,KAAc,CAOnB,YAAY,CAAE,QAAAC,EAAS,QAAAC,CAAQ,EAAkB,CAJjD,KAAQ,IAA6B,KACrC,KAAQ,OAAgC,KACxC,KAAQ,OAAmC,KAyC3C,KAAiB,UAAaC,GAA8B,CAC1D,GAAIA,EAAM,SAAW,KAAK,QAAUA,EAAM,SAAW,KAAK,QAAQ,cAAe,OACjF,GAAM,CAAE,OAAAC,EAAQ,KAAAC,EAAM,QAAAC,CAAQ,EAAIH,EAAM,MAAQ,CAAC,EAC7CC,IAAW,WAAaC,IAAS,gBACjC,KAAK,KAAO,OAAOC,GAAS,QAAW,WAAU,KAAK,IAAI,MAAM,OAASA,EAAQ,OACvF,EA3CE,GAAI,CAACJ,EAAS,MAAM,IAAI,MAAM,iCAAiC,EAC/D,IAAMK,EAAM,IAAI,IAAI,UAAU,mBAAmBL,CAAO,CAAC,SAAUD,CAAO,EAC1E,KAAK,IAAMM,EAAI,SAAS,EACxB,KAAK,OAASA,EAAI,MACpB,CAGA,OAA2B,CACzB,GAAI,KAAK,OAAQ,OAAO,KAAK,OAE7B,IAAMC,EAAS,SAAS,cAAc,QAAQ,EAC9C,OAAAA,EAAO,IAAM,KAAK,IAClBA,EAAO,MAAQ,iBAEfA,EAAO,MAAQ,kDACfA,EAAO,MAAM,QAAU,uEAEvB,KAAK,IAAM,SAAS,cAAc,KAAK,EACvC,KAAK,IAAI,MAAM,QAAU,oEAAoET,CAAU,GAEvG,KAAK,OAAS,SAAS,cAAc,KAAK,EAC1C,KAAK,OAAO,aAAa,cAAe,MAAM,EAC9C,KAAK,OAAO,MAAM,OAASA,EAE3B,KAAK,IAAI,YAAYS,CAAM,EAC3B,SAAS,KAAK,OAAO,KAAK,OAAQ,KAAK,GAAG,EAC1C,OAAO,iBAAiB,UAAW,KAAK,SAAS,EACzC,KAAK,OAASA,CACxB,CAGA,SAAgB,CACd,OAAO,oBAAoB,UAAW,KAAK,SAAS,EACpD,KAAK,KAAK,OAAO,EACjB,KAAK,QAAQ,OAAO,EACpB,KAAK,IAAM,KAAK,OAAS,KAAK,OAAS,IACzC,CAQF","names":["BAR_HEIGHT","Peakst8","baseUrl","eventId","event","source","type","payload","url","iframe"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,30 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@peakst8/sdk",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "JavaScript SDK to embed the existing Peakst8 Events website via iframe.",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "./dist/index.cjs",
|
|
7
|
+
"module": "./dist/index.js",
|
|
8
|
+
"types": "./dist/index.d.ts",
|
|
9
|
+
"unpkg": "./dist/index.global.js",
|
|
10
|
+
"exports": {
|
|
11
|
+
".": {
|
|
12
|
+
"types": "./dist/index.d.ts",
|
|
13
|
+
"import": "./dist/index.js",
|
|
14
|
+
"require": "./dist/index.cjs"
|
|
15
|
+
}
|
|
16
|
+
},
|
|
17
|
+
"files": [
|
|
18
|
+
"dist"
|
|
19
|
+
],
|
|
20
|
+
"scripts": {
|
|
21
|
+
"build": "tsup",
|
|
22
|
+
"dev": "tsup --watch",
|
|
23
|
+
"typecheck": "tsc --noEmit"
|
|
24
|
+
},
|
|
25
|
+
"sideEffects": false,
|
|
26
|
+
"devDependencies": {
|
|
27
|
+
"tsup": "^8.0.0",
|
|
28
|
+
"typescript": "^5.4.0"
|
|
29
|
+
}
|
|
30
|
+
}
|
package/README.md
DELETED