Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@calcom/embed-core

Package Overview
Dependencies
Maintainers
3
Versions
25
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@calcom/embed-core - npm Package Compare versions

Comparing version 1.1.0 to 1.1.1

LICENSE

2

dist/embed/preview.js

@@ -1,1 +0,1 @@

!function(){const e=document.createElement("link").relList;if(!(e&&e.supports&&e.supports("modulepreload"))){for(const e of document.querySelectorAll('link[rel="modulepreload"]'))t(e);new MutationObserver((e=>{for(const n of e)if("childList"===n.type)for(const e of n.addedNodes)"LINK"===e.tagName&&"modulepreload"===e.rel&&t(e)})).observe(document,{childList:!0,subtree:!0})}function t(e){if(e.ep)return;e.ep=!0;const t=function(e){const t={};return e.integrity&&(t.integrity=e.integrity),e.referrerpolicy&&(t.referrerPolicy=e.referrerpolicy),"use-credentials"===e.crossorigin?t.credentials="include":"anonymous"===e.crossorigin?t.credentials="omit":t.credentials="same-origin",t}(e);fetch(e.href,t)}}();window.fingerprint={}.EMBED_PUBLIC_EMBED_FINGER_PRINT,function(e,t,n){const i=function(e,t){e.q.push(t)},o=e.document;e.Cal=e.Cal||function(){const r=e.Cal,c=arguments;if(r.loaded||(r.ns={},r.q=r.q||[],o.head.appendChild(o.createElement("script")).src=t,r.loaded=!0),c[0]===n){const e=function(){i(e,arguments)},t=c[1];return e.q=e.q||[],void("string"==typeof t?(r.ns[t]=e)&&i(e,c):i(r,c))}i(r,c)}}(window,"undefined","init");const e=window;e.Cal("init",{origin:"https://app.cal.com"});const t=new URL(document.URL).searchParams,n=t.get("embedType"),i=t.get("calLink");if("inline"===n)e.Cal("inline",{elementOrSelector:"#my-embed",calLink:i});else if("floating-popup"===n)e.Cal("floatingButton",{calLink:i,attributes:{id:"my-floating-button"}});else if("element-click"===n){const e=document.createElement("button");e.setAttribute("data-cal-link",i),e.innerHTML="I am a button that exists on your website",document.body.appendChild(e)}e.addEventListener("message",(e=>{const t=e.data;if("cal:preview"!==t.mode)return;const n=window.Cal;if(!n)throw new Error("Cal is not defined yet");if("instruction"==t.type&&n(t.instruction.name,t.instruction.arg),"inlineEmbedDimensionUpdate"==t.type){const e=document.querySelector("#my-embed");e&&(e.style.width=t.data.width,e.style.height=t.data.height)}}));
!function(){const e=document.createElement("link").relList;if(!(e&&e.supports&&e.supports("modulepreload"))){for(const e of document.querySelectorAll('link[rel="modulepreload"]'))t(e);new MutationObserver((e=>{for(const n of e)if("childList"===n.type)for(const e of n.addedNodes)"LINK"===e.tagName&&"modulepreload"===e.rel&&t(e)})).observe(document,{childList:!0,subtree:!0})}function t(e){if(e.ep)return;e.ep=!0;const t=function(e){const t={};return e.integrity&&(t.integrity=e.integrity),e.referrerpolicy&&(t.referrerPolicy=e.referrerpolicy),"use-credentials"===e.crossorigin?t.credentials="include":"anonymous"===e.crossorigin?t.credentials="omit":t.credentials="same-origin",t}(e);fetch(e.href,t)}}();window.fingerprint={}.EMBED_PUBLIC_EMBED_FINGER_PRINT,function(e,t,n){const i=function(e,t){e.q.push(t)},o=e.document;e.Cal=e.Cal||function(){const r=e.Cal,c=arguments;if(r.loaded||(r.ns={},r.q=r.q||[],o.head.appendChild(o.createElement("script")).src=t,r.loaded=!0),c[0]===n){const e=function(){i(e,arguments)},t=c[1];return e.q=e.q||[],void("string"==typeof t?(r.ns[t]=e)&&i(e,c):i(r,c))}i(r,c)}}(window,"http://localhost:3000/embed/embed.js","init");const e=window;e.Cal("init",{origin:"https://app.cal.com"});const t=new URL(document.URL).searchParams,n=t.get("embedType"),i=t.get("calLink");if("inline"===n)e.Cal("inline",{elementOrSelector:"#my-embed",calLink:i});else if("floating-popup"===n)e.Cal("floatingButton",{calLink:i,attributes:{id:"my-floating-button"}});else if("element-click"===n){const e=document.createElement("button");e.setAttribute("data-cal-link",i),e.innerHTML="I am a button that exists on your website",document.body.appendChild(e)}e.addEventListener("message",(e=>{const t=e.data;if("cal:preview"!==t.mode)return;const n=window.Cal;if(!n)throw new Error("Cal is not defined yet");if("instruction"==t.type&&n(t.instruction.name,t.instruction.arg),"inlineEmbedDimensionUpdate"==t.type){const e=document.querySelector("#my-embed");e&&(e.style.width=t.data.width,e.style.height=t.data.height)}}));
{
"name": "@calcom/embed-core",
"version": "1.1.0",
"version": "1.1.1",
"description": "This is the vanilla JS core script that embeds Cal Link",
"main": "./dist/embed/embed.js",
"types": "./dist/index.d.ts",
"license": "SEE LICENSE IN LICENSE",
"repository": {
"type": "git",
"url": "https://github.com/calcom/cal.com",
"directory": "packages/embeds/embed-core"
},
"scripts": {
"embed-dev": "yarn workspace @calcom/embed-core dev",
"embed-web-start": "yarn workspace @calcom/web start",
"__build": "yarn tailwind && vite build && yarn tsc --emitDeclarationOnly --declarationDir dist && cp -r ../../../apps/web/public/embed ./dist/",
"__build": "yarn tailwind && vite build && tsc --emitDeclarationOnly --declarationDir dist && cp -r ../../../apps/web/public/embed ./dist/",
"__dev": "yarn tailwind && vite build --mode development",

@@ -40,8 +46,7 @@ "build": "NEXT_PUBLIC_EMBED_FINGER_PRINT=$(git rev-parse --short HEAD) yarn __build",

"postcss": "^8.4.13",
"vite": "^2.9.9",
"tailwindcss": "^3.0.24",
"tsc": "^2.0.4",
"typescript": "^4.6.4"
"typescript": "^4.6.4",
"vite": "^2.9.9"
},
"dependencies": {}
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc