@plasmicpkgs/vanilla-cookieconsent 0.0.3 → 0.0.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/index.esm.js CHANGED
@@ -205,7 +205,7 @@ function CookieConsent(props) {
205
205
 
206
206
  // src/cookie-consent-meta.ts
207
207
  import registerToken from "@plasmicapp/host/registerToken";
208
- var modulePath = "@plasmicpkgs/plasmic-vanilla-cookieconsent";
208
+ var modulePath = "@plasmicpkgs/vanilla-cookieconsent";
209
209
  function registerTokens(loader) {
210
210
  const tokenRegistrations = [
211
211
  // Basic colors
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../src/index.ts", "../src/cookie-consent.tsx", "../src/cookie-consent-meta.ts"],
4
- "sourcesContent": ["import registerComponent, {\n CodeComponentMeta,\n} from \"@plasmicapp/host/registerComponent\";\nimport registerToken from \"@plasmicapp/host/registerToken\";\n\nimport { CookieConsent } from \"./cookie-consent\";\nimport { CookieConsentMeta, registerTokens } from \"./cookie-consent-meta\";\n\nexport function registerAll(loader?: {\n registerComponent: typeof registerComponent;\n registerToken: typeof registerToken;\n}) {\n const _registerComponent = <T extends React.ComponentType<any>>(\n Component: T,\n defaultMeta: CodeComponentMeta<React.ComponentProps<T>>\n ) => {\n if (loader) {\n loader.registerComponent(Component, defaultMeta);\n } else {\n registerComponent(Component, defaultMeta);\n }\n };\n\n // Register tokens first\n registerTokens(loader);\n\n // Then register component\n _registerComponent(CookieConsent, CookieConsentMeta);\n}\n\nexport * from \"./cookie-consent\";\n", "import {\n usePlasmicCanvasComponentInfo,\n usePlasmicCanvasContext,\n} from \"@plasmicapp/host\";\nimport React from \"react\";\nimport * as ConsentApi from \"vanilla-cookieconsent\";\n\nimport { CookieConsentProps } from \"./types\";\n\nexport function CookieConsent(props: CookieConsentProps) {\n const {\n mode,\n revision,\n autoShow,\n disablePageInteraction,\n hideFromBots,\n cookieName,\n cookieDomain,\n cookiePath,\n cookieSecure,\n cookieExpiresAfterDays,\n cookieSameSite,\n cookieUseLocalStorage,\n consentModal,\n preferencesModal,\n necessaryEnabled,\n necessaryReadOnly,\n analyticsEnabled,\n analyticsAutoClearCookies,\n adsEnabled,\n languageDefault,\n languageAutoDetect,\n languageRtl,\n onFirstConsent,\n onConsent,\n onChange,\n onModalReady,\n onModalShow,\n onModalHide,\n sections,\n services,\n plasmicNotifyAutoOpenedContent,\n } = props;\n const inPlasmicCanvas = usePlasmicCanvasContext();\n const isSelected =\n usePlasmicCanvasComponentInfo?.(props)?.isSelected ?? false;\n\n React.useEffect(() => {\n if (!isSelected && inPlasmicCanvas) {\n ConsentApi.reset(true);\n return;\n }\n plasmicNotifyAutoOpenedContent?.();\n\n // Parse analytics auto-clear cookies\n const analyticsAutoClearCookiesArray =\n analyticsAutoClearCookies\n ?.split(\",\")\n ?.map((cookie) => cookie.trim())\n ?.filter((cookie) => cookie.length > 0)\n ?.map((cookie) => ({\n name:\n cookie.startsWith(\"/\") && cookie.endsWith(\"/\")\n ? new RegExp(cookie.slice(1, -1))\n : cookie,\n })) || [];\n\n const config: ConsentApi.CookieConsentConfig = {\n root: \"#plasmic-cookie-consent\",\n mode,\n revision,\n autoShow,\n disablePageInteraction,\n hideFromBots,\n cookie: {\n name: cookieName,\n domain: cookieDomain || window?.location?.hostname,\n path: cookiePath,\n secure: cookieSecure,\n expiresAfterDays: cookieExpiresAfterDays,\n sameSite: cookieSameSite,\n useLocalStorage: cookieUseLocalStorage,\n },\n guiOptions: {\n consentModal: {\n layout: consentModal?.layout,\n position: consentModal?.position,\n equalWeightButtons: consentModal?.equalWeightButtons,\n flipButtons: consentModal?.flipButtons,\n },\n preferencesModal: {\n layout: preferencesModal?.layout,\n equalWeightButtons: preferencesModal?.equalWeightButtons,\n flipButtons: preferencesModal?.flipButtons,\n },\n },\n onFirstConsent: ({ cookie }) => {\n onFirstConsent?.(cookie);\n },\n onConsent: ({ cookie }) => {\n onConsent?.(cookie);\n },\n onChange: ({ changedCategories, changedServices, cookie }) => {\n onChange?.(changedCategories, changedServices, cookie);\n },\n onModalReady: ({ modalName }) => {\n onModalReady?.(modalName);\n },\n onModalShow: ({ modalName }) => {\n onModalShow?.(modalName);\n },\n onModalHide: ({ modalName }) => {\n onModalHide?.(modalName);\n },\n categories: {\n necessary: {\n enabled: necessaryEnabled,\n readOnly: necessaryReadOnly,\n },\n analytics: {\n enabled: analyticsEnabled,\n autoClear: {\n cookies: analyticsAutoClearCookiesArray,\n },\n services: services?.reduce((acc, service) => {\n acc[service.key] = {\n label: service.label || service.key,\n onAccept: service.onAccept || (() => {}),\n onReject: service.onReject || (() => {}),\n };\n return acc;\n }, {} as Record<string, ConsentApi.Service>),\n },\n ads: {\n enabled: adsEnabled,\n },\n },\n language: {\n default: languageDefault,\n autoDetect: languageAutoDetect,\n rtl: languageRtl,\n translations: {\n [languageDefault || \"en\"]: {\n consentModal,\n preferencesModal: {\n ...preferencesModal,\n sections: sections,\n },\n },\n },\n },\n };\n\n ConsentApi.run(config);\n\n return () => {\n ConsentApi.reset();\n };\n }, [\n mode,\n revision,\n autoShow,\n disablePageInteraction,\n hideFromBots,\n cookieName,\n cookieDomain,\n cookiePath,\n cookieSecure,\n cookieExpiresAfterDays,\n cookieSameSite,\n cookieUseLocalStorage,\n consentModal,\n preferencesModal,\n necessaryEnabled,\n necessaryReadOnly,\n analyticsEnabled,\n analyticsAutoClearCookies,\n adsEnabled,\n languageDefault,\n languageAutoDetect,\n languageRtl,\n onFirstConsent,\n onConsent,\n onChange,\n onModalReady,\n onModalShow,\n onModalHide,\n sections,\n services,\n inPlasmicCanvas,\n isSelected,\n plasmicNotifyAutoOpenedContent,\n ]);\n\n return <div id=\"plasmic-cookie-consent\" />;\n}\n", "import { TokenRegistration } from \"@plasmicapp/host\";\nimport { CodeComponentMeta } from \"@plasmicapp/host/registerComponent\";\nimport registerToken from \"@plasmicapp/host/registerToken\";\nimport { CookieConsentProps } from \"./types\";\n\nconst modulePath = \"@plasmicpkgs/plasmic-vanilla-cookieconsent\";\n\nexport interface Registerable {\n registerToken: typeof registerToken;\n}\n\nexport function registerTokens(loader?: Registerable) {\n const tokenRegistrations = [\n // Basic colors\n {\n name: \"--cc-font-family\",\n type: \"font-family\",\n value: \"Inter\",\n },\n {\n name: \"--cc-bg\",\n type: \"color\",\n value: \"#ffffff\",\n },\n {\n name: \"--cc-primary-color\",\n type: \"color\",\n value: \"#2c2f31\",\n },\n {\n name: \"--cc-secondary-color\",\n type: \"color\",\n value: \"#5e6266\",\n },\n\n // Primary button styling\n {\n name: \"--cc-btn-primary-bg\",\n type: \"color\",\n value: \"#30363c\",\n },\n {\n name: \"--cc-btn-primary-color\",\n type: \"color\",\n value: \"#ffffff\",\n },\n {\n name: \"--cc-btn-primary-hover-bg\",\n type: \"color\",\n value: \"#000000\",\n },\n {\n name: \"--cc-btn-primary-hover-color\",\n type: \"color\",\n value: \"#ffffff\",\n },\n\n // Secondary button styling\n {\n name: \"--cc-btn-secondary-bg\",\n type: \"color\",\n value: \"#eaeff2\",\n },\n {\n name: \"--cc-btn-secondary-hover-bg\",\n type: \"color\",\n value: \"#d4dae0\",\n },\n {\n name: \"--cc-btn-secondary-hover-color\",\n type: \"color\",\n value: \"#000000\",\n },\n {\n name: \"--cc-btn-secondary-hover-border-color\",\n type: \"color\",\n value: \"#d4dae0\",\n },\n\n // Button border radius\n {\n name: \"--cc-btn-border-radius\",\n type: \"spacing\",\n value: \"10px\",\n },\n\n // Separator\n {\n name: \"--cc-separator-border-color\",\n type: \"color\",\n value: \"#f0f4f7\",\n },\n\n // Toggle styling\n {\n name: \"--cc-toggle-off-bg\",\n type: \"color\",\n value: \"#667481\",\n },\n {\n name: \"--cc-toggle-on-knob-bg\",\n type: \"color\",\n value: \"#ffffff\",\n },\n\n // Toggle readonly\n {\n name: \"--cc-toggle-readonly-bg\",\n type: \"color\",\n value: \"#d5dee2\",\n },\n {\n name: \"--cc-toggle-readonly-knob-bg\",\n type: \"color\",\n value: \"#ffffff\",\n },\n\n // Cookie category sections\n {\n name: \"--cc-cookie-category-block-bg\",\n type: \"color\",\n value: \"#f0f4f7\",\n },\n {\n name: \"--cc-cookie-category-block-border\",\n type: \"color\",\n value: \"#f0f4f7\",\n },\n {\n name: \"--cc-cookie-category-block-hover-bg\",\n type: \"color\",\n value: \"#e9eff4\",\n },\n {\n name: \"--cc-cookie-category-block-hover-border\",\n type: \"color\",\n value: \"#e9eff4\",\n },\n {\n name: \"--cc-cookie-category-expanded-block-bg\",\n type: \"color\",\n value: \"transparent\",\n },\n {\n name: \"--cc-cookie-category-expanded-block-hover-bg\",\n type: \"color\",\n value: \"#dee4e9\",\n },\n\n // Overlay and scrollbar\n {\n name: \"--cc-overlay-bg\",\n type: \"color\",\n value: \"rgba(0, 0, 0, 0.65)\",\n },\n\n // Footer\n {\n name: \"--cc-footer-border-color\",\n type: \"color\",\n value: \"#e4eaed\",\n },\n ].map((token) => ({\n ...token,\n displayName: token.name,\n type: token.type as TokenRegistration[\"type\"],\n }));\n\n // Register all tokens\n if (loader) {\n tokenRegistrations.forEach((token) => loader.registerToken(token));\n } else {\n tokenRegistrations.forEach((token) => registerToken(token));\n }\n}\n\nexport const CookieConsentMeta: CodeComponentMeta<CookieConsentProps> = {\n name: \"hostless-vanilla-cookieconsent\",\n displayName: \"Cookie Consent\",\n importName: \"CookieConsent\",\n importPath: modulePath,\n description: \"Shows Cookie Consent Banner\",\n defaultStyles: {\n maxWidth: \"100%\",\n },\n props: {\n mode: {\n type: \"choice\",\n options: [\"opt-in\", \"opt-out\"],\n displayName: \"Consent Mode\",\n description:\n \"Changes the scripts' activation logic when consent is not valid. opt-in: scripts will run only if the user accepts that category (GDPR compliant). opt-out: scripts will run automatically (not GDPR compliant).\",\n defaultValue: \"opt-in\",\n },\n revision: {\n type: \"number\",\n displayName: \"Revision\",\n description:\n \"Manages consent revisions; useful if you'd like to ask your users again for consent after a change in your cookie/privacy policy\",\n defaultValue: 0,\n },\n autoShow: {\n type: \"boolean\",\n displayName: \"Auto Show\",\n description:\n \"Automatically show the consent modal if consent is not valid\",\n defaultValue: true,\n },\n disablePageInteraction: {\n type: \"boolean\",\n displayName: \"Disable Page Interaction\",\n description:\n \"Creates a dark overlay and blocks the page scroll until consent is expressed\",\n defaultValue: false,\n },\n hideFromBots: {\n type: \"boolean\",\n displayName: \"Hide From Bots\",\n description:\n \"Stops the plugin's execution when a bot/crawler is detected, to prevent them from indexing the modal's content\",\n defaultValue: true,\n },\n cookieName: {\n type: \"string\",\n displayName: \"Cookie Name\",\n description: \"Name of the consent cookie\",\n defaultValue: \"cc_cookie\",\n },\n cookieDomain: {\n type: \"string\",\n displayName: \"Cookie Domain\",\n description:\n \"Current domain/subdomain's name, retrieved automatically if left empty\",\n },\n cookiePath: {\n type: \"string\",\n displayName: \"Cookie Path\",\n description: \"Path for the consent cookie\",\n defaultValue: \"/\",\n },\n cookieSecure: {\n type: \"boolean\",\n displayName: \"Cookie Secure\",\n description:\n \"Toggle the secure flag (won't be set if there is no https connection)\",\n defaultValue: true,\n },\n cookieExpiresAfterDays: {\n type: \"number\",\n displayName: \"Cookie Expires After Days\",\n description: \"Number of days before the cookie expires\",\n defaultValue: 182,\n },\n cookieSameSite: {\n type: \"choice\",\n options: [\"Lax\", \"Strict\", \"None\"],\n displayName: \"Cookie SameSite\",\n description: \"SameSite attribute for the consent cookie\",\n defaultValue: \"Lax\",\n },\n cookieUseLocalStorage: {\n type: \"boolean\",\n displayName: \"Use Local Storage\",\n description:\n \"Store the value of the cookie in localStorage (ignores domain, path, sameSite when enabled)\",\n defaultValue: false,\n },\n consentModal: {\n type: \"object\",\n displayName: \"Consent Modal\",\n description: \"Configuration for the consent modal\",\n defaultValue: {\n layout: \"cloud inline\",\n position: \"bottom center\",\n equalWeightButtons: true,\n title: \"We use cookies\",\n description: \"Description text for the consent modal\",\n acceptAllBtn: \"Accept all\",\n acceptNecessaryBtn: \"Reject all\",\n showPreferencesBtn: \"Manage Individual Preferences\",\n closeIconLabel: \"Close\",\n revisionMessage: \"\",\n footer:\n '<a href=\"#path-to-impressum.html\" target=\"_blank\">Impressum</a><a href=\"#path-to-privacy-policy.html\" target=\"_blank\">Privacy Policy</a>',\n },\n fields: {\n layout: {\n type: \"choice\",\n options: [\"cloud\", \"cloud inline\", \"box\", \"bar\"],\n displayName: \"Layout\",\n description: \"Layout style for the consent modal\",\n },\n position: {\n type: \"choice\",\n options: [\n \"top\",\n \"bottom\",\n \"top left\",\n \"top center\",\n \"top right\",\n \"bottom left\",\n \"bottom center\",\n \"bottom right\",\n ],\n displayName: \"Position\",\n description: \"Position of the consent modal\",\n },\n equalWeightButtons: {\n type: \"boolean\",\n displayName: \"Equal Weight Buttons\",\n description: \"Make buttons in consent modal equal weight\",\n },\n flipButtons: {\n type: \"boolean\",\n displayName: \"Flip Buttons\",\n description: \"Flip button order in consent modal\",\n },\n title: {\n type: \"string\",\n displayName: \"Title\",\n description: \"Title text for the consent modal\",\n },\n description: {\n type: \"string\",\n displayName: \"Description\",\n description: \"Description text for the consent modal\",\n },\n acceptAllBtn: {\n type: \"string\",\n displayName: \"Accept All Button Text\",\n description: \"Text for the accept all button\",\n },\n acceptNecessaryBtn: {\n type: \"string\",\n displayName: \"Accept Necessary Button Text\",\n description: \"Text for the accept necessary button\",\n },\n showPreferencesBtn: {\n type: \"string\",\n displayName: \"Show Preferences Button Text\",\n description: \"Text for the show preferences button\",\n },\n closeIconLabel: {\n type: \"string\",\n displayName: \"Close Icon Label\",\n description:\n \"If specified, a big X button will be generated (visible only in box layout). Acts the same as acceptNecessaryBtn\",\n },\n revisionMessage: {\n type: \"string\",\n displayName: \"Revision Message\",\n description: \"Message shown when there's a revision change\",\n },\n footer: {\n type: \"string\",\n displayName: \"Footer\",\n description:\n \"A small area where you can place your links (impressum, privacy policy, etc.) - allows HTML markup\",\n },\n },\n },\n preferencesModal: {\n type: \"object\",\n displayName: \"Preferences Modal\",\n description: \"Configuration for the preferences modal\",\n defaultValue: {\n layout: \"box\",\n equalWeightButtons: true,\n flipButtons: false,\n title: \"Manage cookie preferences\",\n acceptAllBtn: \"Accept all\",\n acceptNecessaryBtn: \"Reject all\",\n savePreferencesBtn: \"Accept current selection\",\n closeIconLabel: \"Close modal\",\n serviceCounterLabel: \"Service|Services\",\n },\n fields: {\n layout: {\n type: \"choice\",\n options: [\"box\", \"bar\"],\n displayName: \"Layout\",\n description: \"Layout style for the preferences modal\",\n },\n equalWeightButtons: {\n type: \"boolean\",\n displayName: \"Equal Weight Buttons\",\n description: \"Make buttons in preferences modal equal weight\",\n },\n flipButtons: {\n type: \"boolean\",\n displayName: \"Flip Buttons\",\n description: \"Flip button order in preferences modal\",\n },\n title: {\n type: \"string\",\n displayName: \"Title\",\n description: \"Title text for the preferences modal\",\n },\n acceptAllBtn: {\n type: \"string\",\n displayName: \"Accept All Button Text\",\n description: \"Text for the accept all button in preferences modal\",\n },\n acceptNecessaryBtn: {\n type: \"string\",\n displayName: \"Accept Necessary Button Text\",\n description:\n \"Text for the accept necessary button in preferences modal\",\n },\n savePreferencesBtn: {\n type: \"string\",\n displayName: \"Save Preferences Button Text\",\n description: \"Text for the save preferences button\",\n },\n closeIconLabel: {\n type: \"string\",\n displayName: \"Close Icon Label\",\n description: \"Label for the close icon\",\n },\n serviceCounterLabel: {\n type: \"string\",\n displayName: \"Service Counter Label\",\n description: \"Label for service counter (singular|plural)\",\n },\n },\n },\n necessaryEnabled: {\n type: \"boolean\",\n displayName: \"Necessary Category Enabled\",\n description: \"Enable the necessary category by default\",\n defaultValue: true,\n },\n necessaryReadOnly: {\n type: \"boolean\",\n displayName: \"Necessary Category Read Only\",\n description: \"Make the necessary category read-only (cannot be disabled)\",\n defaultValue: true,\n },\n analyticsEnabled: {\n type: \"boolean\",\n displayName: \"Analytics Category Enabled\",\n description: \"Enable the analytics category by default\",\n defaultValue: false,\n },\n analyticsAutoClearCookies: {\n type: \"string\",\n displayName: \"Analytics Auto Clear Cookies\",\n description:\n \"Comma-separated list of cookie names to auto-clear (supports regex patterns)\",\n defaultValue: \"_ga,_gid\",\n },\n adsEnabled: {\n type: \"boolean\",\n displayName: \"Ads Category Enabled\",\n description: \"Enable the ads category by default\",\n defaultValue: false,\n },\n languageDefault: {\n type: \"string\",\n displayName: \"Default Language\",\n description: \"The desired default language\",\n defaultValue: \"en\",\n },\n languageAutoDetect: {\n type: \"choice\",\n options: [\"document\", \"browser\"],\n displayName: \"Language Auto Detect\",\n description:\n \"Set the current language dynamically. 'document': retrieve language from the lang attribute. 'browser': retrieve the user's browser language\",\n },\n languageRtl: {\n type: \"string\",\n displayName: \"RTL Languages\",\n description:\n \"List of languages that should use the RTL layout (comma-separated)\",\n },\n onFirstConsent: {\n type: \"eventHandler\",\n displayName: \"On First Consent\",\n description: \"Event handler called when user gives first consent\",\n argTypes: [\n {\n name: \"cookie\",\n type: \"object\",\n },\n ],\n },\n onConsent: {\n type: \"eventHandler\",\n displayName: \"On Consent\",\n description: \"Event handler called when user gives consent\",\n argTypes: [\n {\n name: \"cookie\",\n type: \"object\",\n },\n ],\n },\n onChange: {\n type: \"eventHandler\",\n displayName: \"On Change\",\n description: \"Event handler called when consent categories change\",\n argTypes: [\n {\n name: \"changedCategories\",\n type: \"object\",\n },\n {\n name: \"changedServices\",\n type: \"object\",\n },\n ],\n },\n onModalReady: {\n type: \"eventHandler\",\n displayName: \"On Modal Ready\",\n description: \"Event handler called when modal is ready\",\n argTypes: [\n {\n name: \"modalName\",\n type: \"string\",\n },\n ],\n },\n onModalShow: {\n type: \"eventHandler\",\n displayName: \"On Modal Show\",\n description: \"Event handler called when modal is shown\",\n argTypes: [\n {\n name: \"modalName\",\n type: \"string\",\n },\n ],\n },\n onModalHide: {\n type: \"eventHandler\",\n displayName: \"On Modal Hide\",\n description: \"Event handler called when modal is hidden\",\n argTypes: [\n {\n name: \"modalName\",\n type: \"string\",\n },\n ],\n },\n sections: {\n type: \"array\",\n displayName: \"Preferences Modal Sections\",\n description: \"Sections to display in the preferences modal\",\n itemType: {\n nameFunc: (item) => item?.title,\n type: \"object\",\n fields: {\n title: {\n type: \"string\",\n displayName: \"Section Title\",\n description: \"Title of the section\",\n },\n description: {\n type: \"string\",\n displayName: \"Section Description\",\n description: \"Description text for the section\",\n },\n linkedCategory: {\n type: \"string\",\n displayName: \"Linked Category\",\n description:\n \"Category name to link this section to (e.g., 'necessary', 'analytics', 'ads')\",\n },\n cookieTable: {\n type: \"object\",\n displayName: \"Cookie Table\",\n description: \"Cookie table configuration for this section\",\n fields: {\n caption: {\n type: \"string\",\n displayName: \"Table Caption\",\n description: \"Caption for the cookie table\",\n },\n headers: {\n type: \"object\",\n displayName: \"Table Headers\",\n description: \"Headers for the cookie table\",\n fields: {\n name: {\n type: \"string\",\n displayName: \"Name Header\",\n description: \"Header for cookie name column\",\n },\n domain: {\n type: \"string\",\n displayName: \"Domain Header\",\n description: \"Header for domain column\",\n },\n desc: {\n type: \"string\",\n displayName: \"Description Header\",\n description: \"Header for description column\",\n },\n },\n },\n body: {\n type: \"array\",\n displayName: \"Table Body\",\n description: \"Rows in the cookie table\",\n itemType: {\n type: \"object\",\n nameFunc: (item) => item?.name || item?.domain,\n fields: {\n name: {\n type: \"string\",\n displayName: \"Cookie Name\",\n description: \"Name of the cookie\",\n },\n domain: {\n type: \"string\",\n displayName: \"Domain\",\n description: \"Domain where the cookie is set\",\n },\n desc: {\n type: \"string\",\n displayName: \"Description\",\n description: \"Description of what the cookie does\",\n },\n },\n },\n },\n },\n },\n },\n },\n defaultValue: [\n {\n title: \"Your Privacy Choices\",\n description:\n 'In this panel you can express some preferences related to the processing of your personal information. You may review and change expressed choices at any time by resurfacing this panel via the provided link. To deny your consent to the specific processing activities described below, switch the toggles to off or use the \"Reject all\" button and confirm you want to save your choices.',\n },\n {\n title: \"Strictly Necessary\",\n description:\n \"These cookies are essential for the proper functioning of the website and cannot be disabled.\",\n linkedCategory: \"necessary\",\n },\n {\n title: \"Performance and Analytics\",\n description:\n \"These cookies collect information about how you use our website. All of the data is anonymized and cannot be used to identify you.\",\n linkedCategory: \"analytics\",\n cookieTable: {\n caption: \"Cookie table\",\n headers: {\n name: \"Cookie\",\n domain: \"Domain\",\n desc: \"Description\",\n },\n body: [\n {\n name: \"_ga\",\n domain: \"example.com\",\n desc: \"Description 1\",\n },\n {\n name: \"_gid\",\n domain: \"example.com\",\n desc: \"Description 2\",\n },\n ],\n },\n },\n {\n title: \"Targeting and Advertising\",\n description:\n \"These cookies are used to make advertising messages more relevant to you and your interests. The intention is to display ads that are relevant and engaging for the individual user and thereby more valuable for publishers and third party advertisers.\",\n linkedCategory: \"ads\",\n },\n {\n title: \"More information\",\n description:\n 'For any queries in relation to my policy on cookies and your choices, please <a href=\"#contact-page\">contact us</a>',\n },\n ],\n },\n services: {\n type: \"array\",\n displayName: \"Analytics Services\",\n description: \"Services to display in the analytics category\",\n itemType: {\n type: \"object\",\n nameFunc: (item) => item?.label || item?.key,\n fields: {\n key: {\n type: \"string\",\n displayName: \"Service Key\",\n description:\n \"Unique identifier for the service (e.g., 'ga', 'youtube')\",\n },\n label: {\n type: \"string\",\n displayName: \"Service Label\",\n description: \"Display name for the service\",\n },\n onAccept: {\n type: \"eventHandler\",\n displayName: \"On Accept\",\n description: \"Event handler called when user accepts this service\",\n argTypes: [],\n },\n onReject: {\n type: \"eventHandler\",\n displayName: \"On Reject\",\n description: \"Event handler called when user rejects this service\",\n argTypes: [],\n },\n },\n },\n defaultValue: [\n {\n key: \"ga\",\n label: \"Google Analytics\",\n },\n {\n key: \"youtube\",\n label: \"Youtube Embed\",\n },\n ],\n },\n },\n};\n"],
4
+ "sourcesContent": ["import registerComponent, {\n CodeComponentMeta,\n} from \"@plasmicapp/host/registerComponent\";\nimport registerToken from \"@plasmicapp/host/registerToken\";\n\nimport { CookieConsent } from \"./cookie-consent\";\nimport { CookieConsentMeta, registerTokens } from \"./cookie-consent-meta\";\n\nexport function registerAll(loader?: {\n registerComponent: typeof registerComponent;\n registerToken: typeof registerToken;\n}) {\n const _registerComponent = <T extends React.ComponentType<any>>(\n Component: T,\n defaultMeta: CodeComponentMeta<React.ComponentProps<T>>\n ) => {\n if (loader) {\n loader.registerComponent(Component, defaultMeta);\n } else {\n registerComponent(Component, defaultMeta);\n }\n };\n\n // Register tokens first\n registerTokens(loader);\n\n // Then register component\n _registerComponent(CookieConsent, CookieConsentMeta);\n}\n\nexport * from \"./cookie-consent\";\n", "import {\n usePlasmicCanvasComponentInfo,\n usePlasmicCanvasContext,\n} from \"@plasmicapp/host\";\nimport React from \"react\";\nimport * as ConsentApi from \"vanilla-cookieconsent\";\n\nimport { CookieConsentProps } from \"./types\";\n\nexport function CookieConsent(props: CookieConsentProps) {\n const {\n mode,\n revision,\n autoShow,\n disablePageInteraction,\n hideFromBots,\n cookieName,\n cookieDomain,\n cookiePath,\n cookieSecure,\n cookieExpiresAfterDays,\n cookieSameSite,\n cookieUseLocalStorage,\n consentModal,\n preferencesModal,\n necessaryEnabled,\n necessaryReadOnly,\n analyticsEnabled,\n analyticsAutoClearCookies,\n adsEnabled,\n languageDefault,\n languageAutoDetect,\n languageRtl,\n onFirstConsent,\n onConsent,\n onChange,\n onModalReady,\n onModalShow,\n onModalHide,\n sections,\n services,\n plasmicNotifyAutoOpenedContent,\n } = props;\n const inPlasmicCanvas = usePlasmicCanvasContext();\n const isSelected =\n usePlasmicCanvasComponentInfo?.(props)?.isSelected ?? false;\n\n React.useEffect(() => {\n if (!isSelected && inPlasmicCanvas) {\n ConsentApi.reset(true);\n return;\n }\n plasmicNotifyAutoOpenedContent?.();\n\n // Parse analytics auto-clear cookies\n const analyticsAutoClearCookiesArray =\n analyticsAutoClearCookies\n ?.split(\",\")\n ?.map((cookie) => cookie.trim())\n ?.filter((cookie) => cookie.length > 0)\n ?.map((cookie) => ({\n name:\n cookie.startsWith(\"/\") && cookie.endsWith(\"/\")\n ? new RegExp(cookie.slice(1, -1))\n : cookie,\n })) || [];\n\n const config: ConsentApi.CookieConsentConfig = {\n root: \"#plasmic-cookie-consent\",\n mode,\n revision,\n autoShow,\n disablePageInteraction,\n hideFromBots,\n cookie: {\n name: cookieName,\n domain: cookieDomain || window?.location?.hostname,\n path: cookiePath,\n secure: cookieSecure,\n expiresAfterDays: cookieExpiresAfterDays,\n sameSite: cookieSameSite,\n useLocalStorage: cookieUseLocalStorage,\n },\n guiOptions: {\n consentModal: {\n layout: consentModal?.layout,\n position: consentModal?.position,\n equalWeightButtons: consentModal?.equalWeightButtons,\n flipButtons: consentModal?.flipButtons,\n },\n preferencesModal: {\n layout: preferencesModal?.layout,\n equalWeightButtons: preferencesModal?.equalWeightButtons,\n flipButtons: preferencesModal?.flipButtons,\n },\n },\n onFirstConsent: ({ cookie }) => {\n onFirstConsent?.(cookie);\n },\n onConsent: ({ cookie }) => {\n onConsent?.(cookie);\n },\n onChange: ({ changedCategories, changedServices, cookie }) => {\n onChange?.(changedCategories, changedServices, cookie);\n },\n onModalReady: ({ modalName }) => {\n onModalReady?.(modalName);\n },\n onModalShow: ({ modalName }) => {\n onModalShow?.(modalName);\n },\n onModalHide: ({ modalName }) => {\n onModalHide?.(modalName);\n },\n categories: {\n necessary: {\n enabled: necessaryEnabled,\n readOnly: necessaryReadOnly,\n },\n analytics: {\n enabled: analyticsEnabled,\n autoClear: {\n cookies: analyticsAutoClearCookiesArray,\n },\n services: services?.reduce((acc, service) => {\n acc[service.key] = {\n label: service.label || service.key,\n onAccept: service.onAccept || (() => {}),\n onReject: service.onReject || (() => {}),\n };\n return acc;\n }, {} as Record<string, ConsentApi.Service>),\n },\n ads: {\n enabled: adsEnabled,\n },\n },\n language: {\n default: languageDefault,\n autoDetect: languageAutoDetect,\n rtl: languageRtl,\n translations: {\n [languageDefault || \"en\"]: {\n consentModal,\n preferencesModal: {\n ...preferencesModal,\n sections: sections,\n },\n },\n },\n },\n };\n\n ConsentApi.run(config);\n\n return () => {\n ConsentApi.reset();\n };\n }, [\n mode,\n revision,\n autoShow,\n disablePageInteraction,\n hideFromBots,\n cookieName,\n cookieDomain,\n cookiePath,\n cookieSecure,\n cookieExpiresAfterDays,\n cookieSameSite,\n cookieUseLocalStorage,\n consentModal,\n preferencesModal,\n necessaryEnabled,\n necessaryReadOnly,\n analyticsEnabled,\n analyticsAutoClearCookies,\n adsEnabled,\n languageDefault,\n languageAutoDetect,\n languageRtl,\n onFirstConsent,\n onConsent,\n onChange,\n onModalReady,\n onModalShow,\n onModalHide,\n sections,\n services,\n inPlasmicCanvas,\n isSelected,\n plasmicNotifyAutoOpenedContent,\n ]);\n\n return <div id=\"plasmic-cookie-consent\" />;\n}\n", "import { TokenRegistration } from \"@plasmicapp/host\";\nimport { CodeComponentMeta } from \"@plasmicapp/host/registerComponent\";\nimport registerToken from \"@plasmicapp/host/registerToken\";\nimport { CookieConsentProps } from \"./types\";\n\nconst modulePath = \"@plasmicpkgs/vanilla-cookieconsent\";\n\nexport interface Registerable {\n registerToken: typeof registerToken;\n}\n\nexport function registerTokens(loader?: Registerable) {\n const tokenRegistrations = [\n // Basic colors\n {\n name: \"--cc-font-family\",\n type: \"font-family\",\n value: \"Inter\",\n },\n {\n name: \"--cc-bg\",\n type: \"color\",\n value: \"#ffffff\",\n },\n {\n name: \"--cc-primary-color\",\n type: \"color\",\n value: \"#2c2f31\",\n },\n {\n name: \"--cc-secondary-color\",\n type: \"color\",\n value: \"#5e6266\",\n },\n\n // Primary button styling\n {\n name: \"--cc-btn-primary-bg\",\n type: \"color\",\n value: \"#30363c\",\n },\n {\n name: \"--cc-btn-primary-color\",\n type: \"color\",\n value: \"#ffffff\",\n },\n {\n name: \"--cc-btn-primary-hover-bg\",\n type: \"color\",\n value: \"#000000\",\n },\n {\n name: \"--cc-btn-primary-hover-color\",\n type: \"color\",\n value: \"#ffffff\",\n },\n\n // Secondary button styling\n {\n name: \"--cc-btn-secondary-bg\",\n type: \"color\",\n value: \"#eaeff2\",\n },\n {\n name: \"--cc-btn-secondary-hover-bg\",\n type: \"color\",\n value: \"#d4dae0\",\n },\n {\n name: \"--cc-btn-secondary-hover-color\",\n type: \"color\",\n value: \"#000000\",\n },\n {\n name: \"--cc-btn-secondary-hover-border-color\",\n type: \"color\",\n value: \"#d4dae0\",\n },\n\n // Button border radius\n {\n name: \"--cc-btn-border-radius\",\n type: \"spacing\",\n value: \"10px\",\n },\n\n // Separator\n {\n name: \"--cc-separator-border-color\",\n type: \"color\",\n value: \"#f0f4f7\",\n },\n\n // Toggle styling\n {\n name: \"--cc-toggle-off-bg\",\n type: \"color\",\n value: \"#667481\",\n },\n {\n name: \"--cc-toggle-on-knob-bg\",\n type: \"color\",\n value: \"#ffffff\",\n },\n\n // Toggle readonly\n {\n name: \"--cc-toggle-readonly-bg\",\n type: \"color\",\n value: \"#d5dee2\",\n },\n {\n name: \"--cc-toggle-readonly-knob-bg\",\n type: \"color\",\n value: \"#ffffff\",\n },\n\n // Cookie category sections\n {\n name: \"--cc-cookie-category-block-bg\",\n type: \"color\",\n value: \"#f0f4f7\",\n },\n {\n name: \"--cc-cookie-category-block-border\",\n type: \"color\",\n value: \"#f0f4f7\",\n },\n {\n name: \"--cc-cookie-category-block-hover-bg\",\n type: \"color\",\n value: \"#e9eff4\",\n },\n {\n name: \"--cc-cookie-category-block-hover-border\",\n type: \"color\",\n value: \"#e9eff4\",\n },\n {\n name: \"--cc-cookie-category-expanded-block-bg\",\n type: \"color\",\n value: \"transparent\",\n },\n {\n name: \"--cc-cookie-category-expanded-block-hover-bg\",\n type: \"color\",\n value: \"#dee4e9\",\n },\n\n // Overlay and scrollbar\n {\n name: \"--cc-overlay-bg\",\n type: \"color\",\n value: \"rgba(0, 0, 0, 0.65)\",\n },\n\n // Footer\n {\n name: \"--cc-footer-border-color\",\n type: \"color\",\n value: \"#e4eaed\",\n },\n ].map((token) => ({\n ...token,\n displayName: token.name,\n type: token.type as TokenRegistration[\"type\"],\n }));\n\n // Register all tokens\n if (loader) {\n tokenRegistrations.forEach((token) => loader.registerToken(token));\n } else {\n tokenRegistrations.forEach((token) => registerToken(token));\n }\n}\n\nexport const CookieConsentMeta: CodeComponentMeta<CookieConsentProps> = {\n name: \"hostless-vanilla-cookieconsent\",\n displayName: \"Cookie Consent\",\n importName: \"CookieConsent\",\n importPath: modulePath,\n description: \"Shows Cookie Consent Banner\",\n defaultStyles: {\n maxWidth: \"100%\",\n },\n props: {\n mode: {\n type: \"choice\",\n options: [\"opt-in\", \"opt-out\"],\n displayName: \"Consent Mode\",\n description:\n \"Changes the scripts' activation logic when consent is not valid. opt-in: scripts will run only if the user accepts that category (GDPR compliant). opt-out: scripts will run automatically (not GDPR compliant).\",\n defaultValue: \"opt-in\",\n },\n revision: {\n type: \"number\",\n displayName: \"Revision\",\n description:\n \"Manages consent revisions; useful if you'd like to ask your users again for consent after a change in your cookie/privacy policy\",\n defaultValue: 0,\n },\n autoShow: {\n type: \"boolean\",\n displayName: \"Auto Show\",\n description:\n \"Automatically show the consent modal if consent is not valid\",\n defaultValue: true,\n },\n disablePageInteraction: {\n type: \"boolean\",\n displayName: \"Disable Page Interaction\",\n description:\n \"Creates a dark overlay and blocks the page scroll until consent is expressed\",\n defaultValue: false,\n },\n hideFromBots: {\n type: \"boolean\",\n displayName: \"Hide From Bots\",\n description:\n \"Stops the plugin's execution when a bot/crawler is detected, to prevent them from indexing the modal's content\",\n defaultValue: true,\n },\n cookieName: {\n type: \"string\",\n displayName: \"Cookie Name\",\n description: \"Name of the consent cookie\",\n defaultValue: \"cc_cookie\",\n },\n cookieDomain: {\n type: \"string\",\n displayName: \"Cookie Domain\",\n description:\n \"Current domain/subdomain's name, retrieved automatically if left empty\",\n },\n cookiePath: {\n type: \"string\",\n displayName: \"Cookie Path\",\n description: \"Path for the consent cookie\",\n defaultValue: \"/\",\n },\n cookieSecure: {\n type: \"boolean\",\n displayName: \"Cookie Secure\",\n description:\n \"Toggle the secure flag (won't be set if there is no https connection)\",\n defaultValue: true,\n },\n cookieExpiresAfterDays: {\n type: \"number\",\n displayName: \"Cookie Expires After Days\",\n description: \"Number of days before the cookie expires\",\n defaultValue: 182,\n },\n cookieSameSite: {\n type: \"choice\",\n options: [\"Lax\", \"Strict\", \"None\"],\n displayName: \"Cookie SameSite\",\n description: \"SameSite attribute for the consent cookie\",\n defaultValue: \"Lax\",\n },\n cookieUseLocalStorage: {\n type: \"boolean\",\n displayName: \"Use Local Storage\",\n description:\n \"Store the value of the cookie in localStorage (ignores domain, path, sameSite when enabled)\",\n defaultValue: false,\n },\n consentModal: {\n type: \"object\",\n displayName: \"Consent Modal\",\n description: \"Configuration for the consent modal\",\n defaultValue: {\n layout: \"cloud inline\",\n position: \"bottom center\",\n equalWeightButtons: true,\n title: \"We use cookies\",\n description: \"Description text for the consent modal\",\n acceptAllBtn: \"Accept all\",\n acceptNecessaryBtn: \"Reject all\",\n showPreferencesBtn: \"Manage Individual Preferences\",\n closeIconLabel: \"Close\",\n revisionMessage: \"\",\n footer:\n '<a href=\"#path-to-impressum.html\" target=\"_blank\">Impressum</a><a href=\"#path-to-privacy-policy.html\" target=\"_blank\">Privacy Policy</a>',\n },\n fields: {\n layout: {\n type: \"choice\",\n options: [\"cloud\", \"cloud inline\", \"box\", \"bar\"],\n displayName: \"Layout\",\n description: \"Layout style for the consent modal\",\n },\n position: {\n type: \"choice\",\n options: [\n \"top\",\n \"bottom\",\n \"top left\",\n \"top center\",\n \"top right\",\n \"bottom left\",\n \"bottom center\",\n \"bottom right\",\n ],\n displayName: \"Position\",\n description: \"Position of the consent modal\",\n },\n equalWeightButtons: {\n type: \"boolean\",\n displayName: \"Equal Weight Buttons\",\n description: \"Make buttons in consent modal equal weight\",\n },\n flipButtons: {\n type: \"boolean\",\n displayName: \"Flip Buttons\",\n description: \"Flip button order in consent modal\",\n },\n title: {\n type: \"string\",\n displayName: \"Title\",\n description: \"Title text for the consent modal\",\n },\n description: {\n type: \"string\",\n displayName: \"Description\",\n description: \"Description text for the consent modal\",\n },\n acceptAllBtn: {\n type: \"string\",\n displayName: \"Accept All Button Text\",\n description: \"Text for the accept all button\",\n },\n acceptNecessaryBtn: {\n type: \"string\",\n displayName: \"Accept Necessary Button Text\",\n description: \"Text for the accept necessary button\",\n },\n showPreferencesBtn: {\n type: \"string\",\n displayName: \"Show Preferences Button Text\",\n description: \"Text for the show preferences button\",\n },\n closeIconLabel: {\n type: \"string\",\n displayName: \"Close Icon Label\",\n description:\n \"If specified, a big X button will be generated (visible only in box layout). Acts the same as acceptNecessaryBtn\",\n },\n revisionMessage: {\n type: \"string\",\n displayName: \"Revision Message\",\n description: \"Message shown when there's a revision change\",\n },\n footer: {\n type: \"string\",\n displayName: \"Footer\",\n description:\n \"A small area where you can place your links (impressum, privacy policy, etc.) - allows HTML markup\",\n },\n },\n },\n preferencesModal: {\n type: \"object\",\n displayName: \"Preferences Modal\",\n description: \"Configuration for the preferences modal\",\n defaultValue: {\n layout: \"box\",\n equalWeightButtons: true,\n flipButtons: false,\n title: \"Manage cookie preferences\",\n acceptAllBtn: \"Accept all\",\n acceptNecessaryBtn: \"Reject all\",\n savePreferencesBtn: \"Accept current selection\",\n closeIconLabel: \"Close modal\",\n serviceCounterLabel: \"Service|Services\",\n },\n fields: {\n layout: {\n type: \"choice\",\n options: [\"box\", \"bar\"],\n displayName: \"Layout\",\n description: \"Layout style for the preferences modal\",\n },\n equalWeightButtons: {\n type: \"boolean\",\n displayName: \"Equal Weight Buttons\",\n description: \"Make buttons in preferences modal equal weight\",\n },\n flipButtons: {\n type: \"boolean\",\n displayName: \"Flip Buttons\",\n description: \"Flip button order in preferences modal\",\n },\n title: {\n type: \"string\",\n displayName: \"Title\",\n description: \"Title text for the preferences modal\",\n },\n acceptAllBtn: {\n type: \"string\",\n displayName: \"Accept All Button Text\",\n description: \"Text for the accept all button in preferences modal\",\n },\n acceptNecessaryBtn: {\n type: \"string\",\n displayName: \"Accept Necessary Button Text\",\n description:\n \"Text for the accept necessary button in preferences modal\",\n },\n savePreferencesBtn: {\n type: \"string\",\n displayName: \"Save Preferences Button Text\",\n description: \"Text for the save preferences button\",\n },\n closeIconLabel: {\n type: \"string\",\n displayName: \"Close Icon Label\",\n description: \"Label for the close icon\",\n },\n serviceCounterLabel: {\n type: \"string\",\n displayName: \"Service Counter Label\",\n description: \"Label for service counter (singular|plural)\",\n },\n },\n },\n necessaryEnabled: {\n type: \"boolean\",\n displayName: \"Necessary Category Enabled\",\n description: \"Enable the necessary category by default\",\n defaultValue: true,\n },\n necessaryReadOnly: {\n type: \"boolean\",\n displayName: \"Necessary Category Read Only\",\n description: \"Make the necessary category read-only (cannot be disabled)\",\n defaultValue: true,\n },\n analyticsEnabled: {\n type: \"boolean\",\n displayName: \"Analytics Category Enabled\",\n description: \"Enable the analytics category by default\",\n defaultValue: false,\n },\n analyticsAutoClearCookies: {\n type: \"string\",\n displayName: \"Analytics Auto Clear Cookies\",\n description:\n \"Comma-separated list of cookie names to auto-clear (supports regex patterns)\",\n defaultValue: \"_ga,_gid\",\n },\n adsEnabled: {\n type: \"boolean\",\n displayName: \"Ads Category Enabled\",\n description: \"Enable the ads category by default\",\n defaultValue: false,\n },\n languageDefault: {\n type: \"string\",\n displayName: \"Default Language\",\n description: \"The desired default language\",\n defaultValue: \"en\",\n },\n languageAutoDetect: {\n type: \"choice\",\n options: [\"document\", \"browser\"],\n displayName: \"Language Auto Detect\",\n description:\n \"Set the current language dynamically. 'document': retrieve language from the lang attribute. 'browser': retrieve the user's browser language\",\n },\n languageRtl: {\n type: \"string\",\n displayName: \"RTL Languages\",\n description:\n \"List of languages that should use the RTL layout (comma-separated)\",\n },\n onFirstConsent: {\n type: \"eventHandler\",\n displayName: \"On First Consent\",\n description: \"Event handler called when user gives first consent\",\n argTypes: [\n {\n name: \"cookie\",\n type: \"object\",\n },\n ],\n },\n onConsent: {\n type: \"eventHandler\",\n displayName: \"On Consent\",\n description: \"Event handler called when user gives consent\",\n argTypes: [\n {\n name: \"cookie\",\n type: \"object\",\n },\n ],\n },\n onChange: {\n type: \"eventHandler\",\n displayName: \"On Change\",\n description: \"Event handler called when consent categories change\",\n argTypes: [\n {\n name: \"changedCategories\",\n type: \"object\",\n },\n {\n name: \"changedServices\",\n type: \"object\",\n },\n ],\n },\n onModalReady: {\n type: \"eventHandler\",\n displayName: \"On Modal Ready\",\n description: \"Event handler called when modal is ready\",\n argTypes: [\n {\n name: \"modalName\",\n type: \"string\",\n },\n ],\n },\n onModalShow: {\n type: \"eventHandler\",\n displayName: \"On Modal Show\",\n description: \"Event handler called when modal is shown\",\n argTypes: [\n {\n name: \"modalName\",\n type: \"string\",\n },\n ],\n },\n onModalHide: {\n type: \"eventHandler\",\n displayName: \"On Modal Hide\",\n description: \"Event handler called when modal is hidden\",\n argTypes: [\n {\n name: \"modalName\",\n type: \"string\",\n },\n ],\n },\n sections: {\n type: \"array\",\n displayName: \"Preferences Modal Sections\",\n description: \"Sections to display in the preferences modal\",\n itemType: {\n nameFunc: (item) => item?.title,\n type: \"object\",\n fields: {\n title: {\n type: \"string\",\n displayName: \"Section Title\",\n description: \"Title of the section\",\n },\n description: {\n type: \"string\",\n displayName: \"Section Description\",\n description: \"Description text for the section\",\n },\n linkedCategory: {\n type: \"string\",\n displayName: \"Linked Category\",\n description:\n \"Category name to link this section to (e.g., 'necessary', 'analytics', 'ads')\",\n },\n cookieTable: {\n type: \"object\",\n displayName: \"Cookie Table\",\n description: \"Cookie table configuration for this section\",\n fields: {\n caption: {\n type: \"string\",\n displayName: \"Table Caption\",\n description: \"Caption for the cookie table\",\n },\n headers: {\n type: \"object\",\n displayName: \"Table Headers\",\n description: \"Headers for the cookie table\",\n fields: {\n name: {\n type: \"string\",\n displayName: \"Name Header\",\n description: \"Header for cookie name column\",\n },\n domain: {\n type: \"string\",\n displayName: \"Domain Header\",\n description: \"Header for domain column\",\n },\n desc: {\n type: \"string\",\n displayName: \"Description Header\",\n description: \"Header for description column\",\n },\n },\n },\n body: {\n type: \"array\",\n displayName: \"Table Body\",\n description: \"Rows in the cookie table\",\n itemType: {\n type: \"object\",\n nameFunc: (item) => item?.name || item?.domain,\n fields: {\n name: {\n type: \"string\",\n displayName: \"Cookie Name\",\n description: \"Name of the cookie\",\n },\n domain: {\n type: \"string\",\n displayName: \"Domain\",\n description: \"Domain where the cookie is set\",\n },\n desc: {\n type: \"string\",\n displayName: \"Description\",\n description: \"Description of what the cookie does\",\n },\n },\n },\n },\n },\n },\n },\n },\n defaultValue: [\n {\n title: \"Your Privacy Choices\",\n description:\n 'In this panel you can express some preferences related to the processing of your personal information. You may review and change expressed choices at any time by resurfacing this panel via the provided link. To deny your consent to the specific processing activities described below, switch the toggles to off or use the \"Reject all\" button and confirm you want to save your choices.',\n },\n {\n title: \"Strictly Necessary\",\n description:\n \"These cookies are essential for the proper functioning of the website and cannot be disabled.\",\n linkedCategory: \"necessary\",\n },\n {\n title: \"Performance and Analytics\",\n description:\n \"These cookies collect information about how you use our website. All of the data is anonymized and cannot be used to identify you.\",\n linkedCategory: \"analytics\",\n cookieTable: {\n caption: \"Cookie table\",\n headers: {\n name: \"Cookie\",\n domain: \"Domain\",\n desc: \"Description\",\n },\n body: [\n {\n name: \"_ga\",\n domain: \"example.com\",\n desc: \"Description 1\",\n },\n {\n name: \"_gid\",\n domain: \"example.com\",\n desc: \"Description 2\",\n },\n ],\n },\n },\n {\n title: \"Targeting and Advertising\",\n description:\n \"These cookies are used to make advertising messages more relevant to you and your interests. The intention is to display ads that are relevant and engaging for the individual user and thereby more valuable for publishers and third party advertisers.\",\n linkedCategory: \"ads\",\n },\n {\n title: \"More information\",\n description:\n 'For any queries in relation to my policy on cookies and your choices, please <a href=\"#contact-page\">contact us</a>',\n },\n ],\n },\n services: {\n type: \"array\",\n displayName: \"Analytics Services\",\n description: \"Services to display in the analytics category\",\n itemType: {\n type: \"object\",\n nameFunc: (item) => item?.label || item?.key,\n fields: {\n key: {\n type: \"string\",\n displayName: \"Service Key\",\n description:\n \"Unique identifier for the service (e.g., 'ga', 'youtube')\",\n },\n label: {\n type: \"string\",\n displayName: \"Service Label\",\n description: \"Display name for the service\",\n },\n onAccept: {\n type: \"eventHandler\",\n displayName: \"On Accept\",\n description: \"Event handler called when user accepts this service\",\n argTypes: [],\n },\n onReject: {\n type: \"eventHandler\",\n displayName: \"On Reject\",\n description: \"Event handler called when user rejects this service\",\n argTypes: [],\n },\n },\n },\n defaultValue: [\n {\n key: \"ga\",\n label: \"Google Analytics\",\n },\n {\n key: \"youtube\",\n label: \"Youtube Embed\",\n },\n ],\n },\n },\n};\n"],
5
5
  "mappings": ";;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,uBAEA;;;ACFP;AAAA,EACE;AAAA,EACA;AAAA,OACK;AACP,OAAO,WAAW;AAClB,YAAY,gBAAgB;AAIrB,SAAS,cAAc,OAA2B;AATzD;AAUE,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF,IAAI;AACJ,QAAM,kBAAkB,wBAAwB;AAChD,QAAM,cACJ,sEAAgC,WAAhC,mBAAwC,eAAxC,YAAsD;AAExD,QAAM,UAAU,MAAM;AA/CxB,QAAAA,KAAAC,KAAAC,KAAA;AAgDI,QAAI,CAAC,cAAc,iBAAiB;AAClC,MAAW,iBAAM,IAAI;AACrB;AAAA,IACF;AACA;AAGA,UAAM,mCACJA,OAAAD,OAAAD,MAAA,uEACI,MAAM,SADV,gBAAAA,IAEI,IAAI,CAAC,WAAW,OAAO,KAAK,OAFhC,gBAAAC,IAGI,OAAO,CAAC,WAAW,OAAO,SAAS,OAHvC,gBAAAC,IAII,IAAI,CAAC,YAAY;AAAA,MACjB,MACE,OAAO,WAAW,GAAG,KAAK,OAAO,SAAS,GAAG,IACzC,IAAI,OAA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UACF;AAAA,QACF;AAAA,QACA;AAAA,UACE,OAAO;AAAA,UACP,aACE;AAAA,UACF,gBAAgB;AAAA,QAClB;AAAA,QACA;AAAA,UACE,OAAO;AAAA,UACP,aACE;AAAA,QACJ;AAAA,MACF;AAAA,IACF;AAAA,IACA,UAAU;AAAA,MACR,MAAM;AAAA,MACN,aAAa;AAAA,MACb,aAAa;AAAA,MACb,UAAU;AAAA,QACR,MAAM;AAAA,QACN,UAAU,CAAC,UAAS,6BAAM,WAAS,6BAAM;AAAA,QACzC,QAAQ;AAAA,UACN,KAAK;AAAA,YACH,MAAM;AAAA,YACN,aAAa;AAAA,YACb,aACE;AAAA,UACJ;AAAA,UACA,OAAO;AAAA,YACL,MAAM;AAAA,YACN,aAAa;AAAA,YACb,aAAa;AAAA,UACf;AAAA,UACA,UAAU;AAAA,YACR,MAAM;AAAA,YACN,aAAa;AAAA,YACb,aAAa;AAAA,YACb,UAAU,CAAC;AAAA,UACb;AAAA,UACA,UAAU;AAAA,YACR,MAAM;AAAA,YACN,aAAa;AAAA,YACb,aAAa;AAAA,YACb,UAAU,CAAC;AAAA,UACb;AAAA,QACF;AAAA,MACF;AAAA,MACA,cAAc;AAAA,QACZ;AAAA,UACE,KAAK;AAAA,UACL,OAAO;AAAA,QACT;AAAA,QACA;AAAA,UACE,KAAK;AAAA,UACL,OAAO;AAAA,QACT;AAAA,MACF;AAAA,IACF;AAAA,EACF;AACF;;;AFhtBO,SAAS,YAAY,QAGzB;AACD,QAAM,qBAAqB,CACzB,WACA,gBACG;AACH,QAAI,QAAQ;AACV,aAAO,kBAAkB,WAAW,WAAW;AAAA,IACjD,OAAO;AACL,wBAAkB,WAAW,WAAW;AAAA,IAC1C;AAAA,EACF;AAGA,iBAAe,MAAM;AAGrB,qBAAmB,eAAe,iBAAiB;AACrD;",
6
6
  "names": ["_a", "_b", "_c"]
7
7
  }
package/dist/index.js CHANGED
@@ -234,7 +234,7 @@ function CookieConsent(props) {
234
234
 
235
235
  // src/cookie-consent-meta.ts
236
236
  var import_registerToken = __toESM(require("@plasmicapp/host/registerToken"));
237
- var modulePath = "@plasmicpkgs/plasmic-vanilla-cookieconsent";
237
+ var modulePath = "@plasmicpkgs/vanilla-cookieconsent";
238
238
  function registerTokens(loader) {
239
239
  const tokenRegistrations = [
240
240
  // Basic colors
package/dist/index.js.map CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../src/index.ts", "../src/cookie-consent.tsx", "../src/cookie-consent-meta.ts"],
4
- "sourcesContent": ["import registerComponent, {\n CodeComponentMeta,\n} from \"@plasmicapp/host/registerComponent\";\nimport registerToken from \"@plasmicapp/host/registerToken\";\n\nimport { CookieConsent } from \"./cookie-consent\";\nimport { CookieConsentMeta, registerTokens } from \"./cookie-consent-meta\";\n\nexport function registerAll(loader?: {\n registerComponent: typeof registerComponent;\n registerToken: typeof registerToken;\n}) {\n const _registerComponent = <T extends React.ComponentType<any>>(\n Component: T,\n defaultMeta: CodeComponentMeta<React.ComponentProps<T>>\n ) => {\n if (loader) {\n loader.registerComponent(Component, defaultMeta);\n } else {\n registerComponent(Component, defaultMeta);\n }\n };\n\n // Register tokens first\n registerTokens(loader);\n\n // Then register component\n _registerComponent(CookieConsent, CookieConsentMeta);\n}\n\nexport * from \"./cookie-consent\";\n", "import {\n usePlasmicCanvasComponentInfo,\n usePlasmicCanvasContext,\n} from \"@plasmicapp/host\";\nimport React from \"react\";\nimport * as ConsentApi from \"vanilla-cookieconsent\";\n\nimport { CookieConsentProps } from \"./types\";\n\nexport function CookieConsent(props: CookieConsentProps) {\n const {\n mode,\n revision,\n autoShow,\n disablePageInteraction,\n hideFromBots,\n cookieName,\n cookieDomain,\n cookiePath,\n cookieSecure,\n cookieExpiresAfterDays,\n cookieSameSite,\n cookieUseLocalStorage,\n consentModal,\n preferencesModal,\n necessaryEnabled,\n necessaryReadOnly,\n analyticsEnabled,\n analyticsAutoClearCookies,\n adsEnabled,\n languageDefault,\n languageAutoDetect,\n languageRtl,\n onFirstConsent,\n onConsent,\n onChange,\n onModalReady,\n onModalShow,\n onModalHide,\n sections,\n services,\n plasmicNotifyAutoOpenedContent,\n } = props;\n const inPlasmicCanvas = usePlasmicCanvasContext();\n const isSelected =\n usePlasmicCanvasComponentInfo?.(props)?.isSelected ?? false;\n\n React.useEffect(() => {\n if (!isSelected && inPlasmicCanvas) {\n ConsentApi.reset(true);\n return;\n }\n plasmicNotifyAutoOpenedContent?.();\n\n // Parse analytics auto-clear cookies\n const analyticsAutoClearCookiesArray =\n analyticsAutoClearCookies\n ?.split(\",\")\n ?.map((cookie) => cookie.trim())\n ?.filter((cookie) => cookie.length > 0)\n ?.map((cookie) => ({\n name:\n cookie.startsWith(\"/\") && cookie.endsWith(\"/\")\n ? new RegExp(cookie.slice(1, -1))\n : cookie,\n })) || [];\n\n const config: ConsentApi.CookieConsentConfig = {\n root: \"#plasmic-cookie-consent\",\n mode,\n revision,\n autoShow,\n disablePageInteraction,\n hideFromBots,\n cookie: {\n name: cookieName,\n domain: cookieDomain || window?.location?.hostname,\n path: cookiePath,\n secure: cookieSecure,\n expiresAfterDays: cookieExpiresAfterDays,\n sameSite: cookieSameSite,\n useLocalStorage: cookieUseLocalStorage,\n },\n guiOptions: {\n consentModal: {\n layout: consentModal?.layout,\n position: consentModal?.position,\n equalWeightButtons: consentModal?.equalWeightButtons,\n flipButtons: consentModal?.flipButtons,\n },\n preferencesModal: {\n layout: preferencesModal?.layout,\n equalWeightButtons: preferencesModal?.equalWeightButtons,\n flipButtons: preferencesModal?.flipButtons,\n },\n },\n onFirstConsent: ({ cookie }) => {\n onFirstConsent?.(cookie);\n },\n onConsent: ({ cookie }) => {\n onConsent?.(cookie);\n },\n onChange: ({ changedCategories, changedServices, cookie }) => {\n onChange?.(changedCategories, changedServices, cookie);\n },\n onModalReady: ({ modalName }) => {\n onModalReady?.(modalName);\n },\n onModalShow: ({ modalName }) => {\n onModalShow?.(modalName);\n },\n onModalHide: ({ modalName }) => {\n onModalHide?.(modalName);\n },\n categories: {\n necessary: {\n enabled: necessaryEnabled,\n readOnly: necessaryReadOnly,\n },\n analytics: {\n enabled: analyticsEnabled,\n autoClear: {\n cookies: analyticsAutoClearCookiesArray,\n },\n services: services?.reduce((acc, service) => {\n acc[service.key] = {\n label: service.label || service.key,\n onAccept: service.onAccept || (() => {}),\n onReject: service.onReject || (() => {}),\n };\n return acc;\n }, {} as Record<string, ConsentApi.Service>),\n },\n ads: {\n enabled: adsEnabled,\n },\n },\n language: {\n default: languageDefault,\n autoDetect: languageAutoDetect,\n rtl: languageRtl,\n translations: {\n [languageDefault || \"en\"]: {\n consentModal,\n preferencesModal: {\n ...preferencesModal,\n sections: sections,\n },\n },\n },\n },\n };\n\n ConsentApi.run(config);\n\n return () => {\n ConsentApi.reset();\n };\n }, [\n mode,\n revision,\n autoShow,\n disablePageInteraction,\n hideFromBots,\n cookieName,\n cookieDomain,\n cookiePath,\n cookieSecure,\n cookieExpiresAfterDays,\n cookieSameSite,\n cookieUseLocalStorage,\n consentModal,\n preferencesModal,\n necessaryEnabled,\n necessaryReadOnly,\n analyticsEnabled,\n analyticsAutoClearCookies,\n adsEnabled,\n languageDefault,\n languageAutoDetect,\n languageRtl,\n onFirstConsent,\n onConsent,\n onChange,\n onModalReady,\n onModalShow,\n onModalHide,\n sections,\n services,\n inPlasmicCanvas,\n isSelected,\n plasmicNotifyAutoOpenedContent,\n ]);\n\n return <div id=\"plasmic-cookie-consent\" />;\n}\n", "import { TokenRegistration } from \"@plasmicapp/host\";\nimport { CodeComponentMeta } from \"@plasmicapp/host/registerComponent\";\nimport registerToken from \"@plasmicapp/host/registerToken\";\nimport { CookieConsentProps } from \"./types\";\n\nconst modulePath = \"@plasmicpkgs/plasmic-vanilla-cookieconsent\";\n\nexport interface Registerable {\n registerToken: typeof registerToken;\n}\n\nexport function registerTokens(loader?: Registerable) {\n const tokenRegistrations = [\n // Basic colors\n {\n name: \"--cc-font-family\",\n type: \"font-family\",\n value: \"Inter\",\n },\n {\n name: \"--cc-bg\",\n type: \"color\",\n value: \"#ffffff\",\n },\n {\n name: \"--cc-primary-color\",\n type: \"color\",\n value: \"#2c2f31\",\n },\n {\n name: \"--cc-secondary-color\",\n type: \"color\",\n value: \"#5e6266\",\n },\n\n // Primary button styling\n {\n name: \"--cc-btn-primary-bg\",\n type: \"color\",\n value: \"#30363c\",\n },\n {\n name: \"--cc-btn-primary-color\",\n type: \"color\",\n value: \"#ffffff\",\n },\n {\n name: \"--cc-btn-primary-hover-bg\",\n type: \"color\",\n value: \"#000000\",\n },\n {\n name: \"--cc-btn-primary-hover-color\",\n type: \"color\",\n value: \"#ffffff\",\n },\n\n // Secondary button styling\n {\n name: \"--cc-btn-secondary-bg\",\n type: \"color\",\n value: \"#eaeff2\",\n },\n {\n name: \"--cc-btn-secondary-hover-bg\",\n type: \"color\",\n value: \"#d4dae0\",\n },\n {\n name: \"--cc-btn-secondary-hover-color\",\n type: \"color\",\n value: \"#000000\",\n },\n {\n name: \"--cc-btn-secondary-hover-border-color\",\n type: \"color\",\n value: \"#d4dae0\",\n },\n\n // Button border radius\n {\n name: \"--cc-btn-border-radius\",\n type: \"spacing\",\n value: \"10px\",\n },\n\n // Separator\n {\n name: \"--cc-separator-border-color\",\n type: \"color\",\n value: \"#f0f4f7\",\n },\n\n // Toggle styling\n {\n name: \"--cc-toggle-off-bg\",\n type: \"color\",\n value: \"#667481\",\n },\n {\n name: \"--cc-toggle-on-knob-bg\",\n type: \"color\",\n value: \"#ffffff\",\n },\n\n // Toggle readonly\n {\n name: \"--cc-toggle-readonly-bg\",\n type: \"color\",\n value: \"#d5dee2\",\n },\n {\n name: \"--cc-toggle-readonly-knob-bg\",\n type: \"color\",\n value: \"#ffffff\",\n },\n\n // Cookie category sections\n {\n name: \"--cc-cookie-category-block-bg\",\n type: \"color\",\n value: \"#f0f4f7\",\n },\n {\n name: \"--cc-cookie-category-block-border\",\n type: \"color\",\n value: \"#f0f4f7\",\n },\n {\n name: \"--cc-cookie-category-block-hover-bg\",\n type: \"color\",\n value: \"#e9eff4\",\n },\n {\n name: \"--cc-cookie-category-block-hover-border\",\n type: \"color\",\n value: \"#e9eff4\",\n },\n {\n name: \"--cc-cookie-category-expanded-block-bg\",\n type: \"color\",\n value: \"transparent\",\n },\n {\n name: \"--cc-cookie-category-expanded-block-hover-bg\",\n type: \"color\",\n value: \"#dee4e9\",\n },\n\n // Overlay and scrollbar\n {\n name: \"--cc-overlay-bg\",\n type: \"color\",\n value: \"rgba(0, 0, 0, 0.65)\",\n },\n\n // Footer\n {\n name: \"--cc-footer-border-color\",\n type: \"color\",\n value: \"#e4eaed\",\n },\n ].map((token) => ({\n ...token,\n displayName: token.name,\n type: token.type as TokenRegistration[\"type\"],\n }));\n\n // Register all tokens\n if (loader) {\n tokenRegistrations.forEach((token) => loader.registerToken(token));\n } else {\n tokenRegistrations.forEach((token) => registerToken(token));\n }\n}\n\nexport const CookieConsentMeta: CodeComponentMeta<CookieConsentProps> = {\n name: \"hostless-vanilla-cookieconsent\",\n displayName: \"Cookie Consent\",\n importName: \"CookieConsent\",\n importPath: modulePath,\n description: \"Shows Cookie Consent Banner\",\n defaultStyles: {\n maxWidth: \"100%\",\n },\n props: {\n mode: {\n type: \"choice\",\n options: [\"opt-in\", \"opt-out\"],\n displayName: \"Consent Mode\",\n description:\n \"Changes the scripts' activation logic when consent is not valid. opt-in: scripts will run only if the user accepts that category (GDPR compliant). opt-out: scripts will run automatically (not GDPR compliant).\",\n defaultValue: \"opt-in\",\n },\n revision: {\n type: \"number\",\n displayName: \"Revision\",\n description:\n \"Manages consent revisions; useful if you'd like to ask your users again for consent after a change in your cookie/privacy policy\",\n defaultValue: 0,\n },\n autoShow: {\n type: \"boolean\",\n displayName: \"Auto Show\",\n description:\n \"Automatically show the consent modal if consent is not valid\",\n defaultValue: true,\n },\n disablePageInteraction: {\n type: \"boolean\",\n displayName: \"Disable Page Interaction\",\n description:\n \"Creates a dark overlay and blocks the page scroll until consent is expressed\",\n defaultValue: false,\n },\n hideFromBots: {\n type: \"boolean\",\n displayName: \"Hide From Bots\",\n description:\n \"Stops the plugin's execution when a bot/crawler is detected, to prevent them from indexing the modal's content\",\n defaultValue: true,\n },\n cookieName: {\n type: \"string\",\n displayName: \"Cookie Name\",\n description: \"Name of the consent cookie\",\n defaultValue: \"cc_cookie\",\n },\n cookieDomain: {\n type: \"string\",\n displayName: \"Cookie Domain\",\n description:\n \"Current domain/subdomain's name, retrieved automatically if left empty\",\n },\n cookiePath: {\n type: \"string\",\n displayName: \"Cookie Path\",\n description: \"Path for the consent cookie\",\n defaultValue: \"/\",\n },\n cookieSecure: {\n type: \"boolean\",\n displayName: \"Cookie Secure\",\n description:\n \"Toggle the secure flag (won't be set if there is no https connection)\",\n defaultValue: true,\n },\n cookieExpiresAfterDays: {\n type: \"number\",\n displayName: \"Cookie Expires After Days\",\n description: \"Number of days before the cookie expires\",\n defaultValue: 182,\n },\n cookieSameSite: {\n type: \"choice\",\n options: [\"Lax\", \"Strict\", \"None\"],\n displayName: \"Cookie SameSite\",\n description: \"SameSite attribute for the consent cookie\",\n defaultValue: \"Lax\",\n },\n cookieUseLocalStorage: {\n type: \"boolean\",\n displayName: \"Use Local Storage\",\n description:\n \"Store the value of the cookie in localStorage (ignores domain, path, sameSite when enabled)\",\n defaultValue: false,\n },\n consentModal: {\n type: \"object\",\n displayName: \"Consent Modal\",\n description: \"Configuration for the consent modal\",\n defaultValue: {\n layout: \"cloud inline\",\n position: \"bottom center\",\n equalWeightButtons: true,\n title: \"We use cookies\",\n description: \"Description text for the consent modal\",\n acceptAllBtn: \"Accept all\",\n acceptNecessaryBtn: \"Reject all\",\n showPreferencesBtn: \"Manage Individual Preferences\",\n closeIconLabel: \"Close\",\n revisionMessage: \"\",\n footer:\n '<a href=\"#path-to-impressum.html\" target=\"_blank\">Impressum</a><a href=\"#path-to-privacy-policy.html\" target=\"_blank\">Privacy Policy</a>',\n },\n fields: {\n layout: {\n type: \"choice\",\n options: [\"cloud\", \"cloud inline\", \"box\", \"bar\"],\n displayName: \"Layout\",\n description: \"Layout style for the consent modal\",\n },\n position: {\n type: \"choice\",\n options: [\n \"top\",\n \"bottom\",\n \"top left\",\n \"top center\",\n \"top right\",\n \"bottom left\",\n \"bottom center\",\n \"bottom right\",\n ],\n displayName: \"Position\",\n description: \"Position of the consent modal\",\n },\n equalWeightButtons: {\n type: \"boolean\",\n displayName: \"Equal Weight Buttons\",\n description: \"Make buttons in consent modal equal weight\",\n },\n flipButtons: {\n type: \"boolean\",\n displayName: \"Flip Buttons\",\n description: \"Flip button order in consent modal\",\n },\n title: {\n type: \"string\",\n displayName: \"Title\",\n description: \"Title text for the consent modal\",\n },\n description: {\n type: \"string\",\n displayName: \"Description\",\n description: \"Description text for the consent modal\",\n },\n acceptAllBtn: {\n type: \"string\",\n displayName: \"Accept All Button Text\",\n description: \"Text for the accept all button\",\n },\n acceptNecessaryBtn: {\n type: \"string\",\n displayName: \"Accept Necessary Button Text\",\n description: \"Text for the accept necessary button\",\n },\n showPreferencesBtn: {\n type: \"string\",\n displayName: \"Show Preferences Button Text\",\n description: \"Text for the show preferences button\",\n },\n closeIconLabel: {\n type: \"string\",\n displayName: \"Close Icon Label\",\n description:\n \"If specified, a big X button will be generated (visible only in box layout). Acts the same as acceptNecessaryBtn\",\n },\n revisionMessage: {\n type: \"string\",\n displayName: \"Revision Message\",\n description: \"Message shown when there's a revision change\",\n },\n footer: {\n type: \"string\",\n displayName: \"Footer\",\n description:\n \"A small area where you can place your links (impressum, privacy policy, etc.) - allows HTML markup\",\n },\n },\n },\n preferencesModal: {\n type: \"object\",\n displayName: \"Preferences Modal\",\n description: \"Configuration for the preferences modal\",\n defaultValue: {\n layout: \"box\",\n equalWeightButtons: true,\n flipButtons: false,\n title: \"Manage cookie preferences\",\n acceptAllBtn: \"Accept all\",\n acceptNecessaryBtn: \"Reject all\",\n savePreferencesBtn: \"Accept current selection\",\n closeIconLabel: \"Close modal\",\n serviceCounterLabel: \"Service|Services\",\n },\n fields: {\n layout: {\n type: \"choice\",\n options: [\"box\", \"bar\"],\n displayName: \"Layout\",\n description: \"Layout style for the preferences modal\",\n },\n equalWeightButtons: {\n type: \"boolean\",\n displayName: \"Equal Weight Buttons\",\n description: \"Make buttons in preferences modal equal weight\",\n },\n flipButtons: {\n type: \"boolean\",\n displayName: \"Flip Buttons\",\n description: \"Flip button order in preferences modal\",\n },\n title: {\n type: \"string\",\n displayName: \"Title\",\n description: \"Title text for the preferences modal\",\n },\n acceptAllBtn: {\n type: \"string\",\n displayName: \"Accept All Button Text\",\n description: \"Text for the accept all button in preferences modal\",\n },\n acceptNecessaryBtn: {\n type: \"string\",\n displayName: \"Accept Necessary Button Text\",\n description:\n \"Text for the accept necessary button in preferences modal\",\n },\n savePreferencesBtn: {\n type: \"string\",\n displayName: \"Save Preferences Button Text\",\n description: \"Text for the save preferences button\",\n },\n closeIconLabel: {\n type: \"string\",\n displayName: \"Close Icon Label\",\n description: \"Label for the close icon\",\n },\n serviceCounterLabel: {\n type: \"string\",\n displayName: \"Service Counter Label\",\n description: \"Label for service counter (singular|plural)\",\n },\n },\n },\n necessaryEnabled: {\n type: \"boolean\",\n displayName: \"Necessary Category Enabled\",\n description: \"Enable the necessary category by default\",\n defaultValue: true,\n },\n necessaryReadOnly: {\n type: \"boolean\",\n displayName: \"Necessary Category Read Only\",\n description: \"Make the necessary category read-only (cannot be disabled)\",\n defaultValue: true,\n },\n analyticsEnabled: {\n type: \"boolean\",\n displayName: \"Analytics Category Enabled\",\n description: \"Enable the analytics category by default\",\n defaultValue: false,\n },\n analyticsAutoClearCookies: {\n type: \"string\",\n displayName: \"Analytics Auto Clear Cookies\",\n description:\n \"Comma-separated list of cookie names to auto-clear (supports regex patterns)\",\n defaultValue: \"_ga,_gid\",\n },\n adsEnabled: {\n type: \"boolean\",\n displayName: \"Ads Category Enabled\",\n description: \"Enable the ads category by default\",\n defaultValue: false,\n },\n languageDefault: {\n type: \"string\",\n displayName: \"Default Language\",\n description: \"The desired default language\",\n defaultValue: \"en\",\n },\n languageAutoDetect: {\n type: \"choice\",\n options: [\"document\", \"browser\"],\n displayName: \"Language Auto Detect\",\n description:\n \"Set the current language dynamically. 'document': retrieve language from the lang attribute. 'browser': retrieve the user's browser language\",\n },\n languageRtl: {\n type: \"string\",\n displayName: \"RTL Languages\",\n description:\n \"List of languages that should use the RTL layout (comma-separated)\",\n },\n onFirstConsent: {\n type: \"eventHandler\",\n displayName: \"On First Consent\",\n description: \"Event handler called when user gives first consent\",\n argTypes: [\n {\n name: \"cookie\",\n type: \"object\",\n },\n ],\n },\n onConsent: {\n type: \"eventHandler\",\n displayName: \"On Consent\",\n description: \"Event handler called when user gives consent\",\n argTypes: [\n {\n name: \"cookie\",\n type: \"object\",\n },\n ],\n },\n onChange: {\n type: \"eventHandler\",\n displayName: \"On Change\",\n description: \"Event handler called when consent categories change\",\n argTypes: [\n {\n name: \"changedCategories\",\n type: \"object\",\n },\n {\n name: \"changedServices\",\n type: \"object\",\n },\n ],\n },\n onModalReady: {\n type: \"eventHandler\",\n displayName: \"On Modal Ready\",\n description: \"Event handler called when modal is ready\",\n argTypes: [\n {\n name: \"modalName\",\n type: \"string\",\n },\n ],\n },\n onModalShow: {\n type: \"eventHandler\",\n displayName: \"On Modal Show\",\n description: \"Event handler called when modal is shown\",\n argTypes: [\n {\n name: \"modalName\",\n type: \"string\",\n },\n ],\n },\n onModalHide: {\n type: \"eventHandler\",\n displayName: \"On Modal Hide\",\n description: \"Event handler called when modal is hidden\",\n argTypes: [\n {\n name: \"modalName\",\n type: \"string\",\n },\n ],\n },\n sections: {\n type: \"array\",\n displayName: \"Preferences Modal Sections\",\n description: \"Sections to display in the preferences modal\",\n itemType: {\n nameFunc: (item) => item?.title,\n type: \"object\",\n fields: {\n title: {\n type: \"string\",\n displayName: \"Section Title\",\n description: \"Title of the section\",\n },\n description: {\n type: \"string\",\n displayName: \"Section Description\",\n description: \"Description text for the section\",\n },\n linkedCategory: {\n type: \"string\",\n displayName: \"Linked Category\",\n description:\n \"Category name to link this section to (e.g., 'necessary', 'analytics', 'ads')\",\n },\n cookieTable: {\n type: \"object\",\n displayName: \"Cookie Table\",\n description: \"Cookie table configuration for this section\",\n fields: {\n caption: {\n type: \"string\",\n displayName: \"Table Caption\",\n description: \"Caption for the cookie table\",\n },\n headers: {\n type: \"object\",\n displayName: \"Table Headers\",\n description: \"Headers for the cookie table\",\n fields: {\n name: {\n type: \"string\",\n displayName: \"Name Header\",\n description: \"Header for cookie name column\",\n },\n domain: {\n type: \"string\",\n displayName: \"Domain Header\",\n description: \"Header for domain column\",\n },\n desc: {\n type: \"string\",\n displayName: \"Description Header\",\n description: \"Header for description column\",\n },\n },\n },\n body: {\n type: \"array\",\n displayName: \"Table Body\",\n description: \"Rows in the cookie table\",\n itemType: {\n type: \"object\",\n nameFunc: (item) => item?.name || item?.domain,\n fields: {\n name: {\n type: \"string\",\n displayName: \"Cookie Name\",\n description: \"Name of the cookie\",\n },\n domain: {\n type: \"string\",\n displayName: \"Domain\",\n description: \"Domain where the cookie is set\",\n },\n desc: {\n type: \"string\",\n displayName: \"Description\",\n description: \"Description of what the cookie does\",\n },\n },\n },\n },\n },\n },\n },\n },\n defaultValue: [\n {\n title: \"Your Privacy Choices\",\n description:\n 'In this panel you can express some preferences related to the processing of your personal information. You may review and change expressed choices at any time by resurfacing this panel via the provided link. To deny your consent to the specific processing activities described below, switch the toggles to off or use the \"Reject all\" button and confirm you want to save your choices.',\n },\n {\n title: \"Strictly Necessary\",\n description:\n \"These cookies are essential for the proper functioning of the website and cannot be disabled.\",\n linkedCategory: \"necessary\",\n },\n {\n title: \"Performance and Analytics\",\n description:\n \"These cookies collect information about how you use our website. All of the data is anonymized and cannot be used to identify you.\",\n linkedCategory: \"analytics\",\n cookieTable: {\n caption: \"Cookie table\",\n headers: {\n name: \"Cookie\",\n domain: \"Domain\",\n desc: \"Description\",\n },\n body: [\n {\n name: \"_ga\",\n domain: \"example.com\",\n desc: \"Description 1\",\n },\n {\n name: \"_gid\",\n domain: \"example.com\",\n desc: \"Description 2\",\n },\n ],\n },\n },\n {\n title: \"Targeting and Advertising\",\n description:\n \"These cookies are used to make advertising messages more relevant to you and your interests. The intention is to display ads that are relevant and engaging for the individual user and thereby more valuable for publishers and third party advertisers.\",\n linkedCategory: \"ads\",\n },\n {\n title: \"More information\",\n description:\n 'For any queries in relation to my policy on cookies and your choices, please <a href=\"#contact-page\">contact us</a>',\n },\n ],\n },\n services: {\n type: \"array\",\n displayName: \"Analytics Services\",\n description: \"Services to display in the analytics category\",\n itemType: {\n type: \"object\",\n nameFunc: (item) => item?.label || item?.key,\n fields: {\n key: {\n type: \"string\",\n displayName: \"Service Key\",\n description:\n \"Unique identifier for the service (e.g., 'ga', 'youtube')\",\n },\n label: {\n type: \"string\",\n displayName: \"Service Label\",\n description: \"Display name for the service\",\n },\n onAccept: {\n type: \"eventHandler\",\n displayName: \"On Accept\",\n description: \"Event handler called when user accepts this service\",\n argTypes: [],\n },\n onReject: {\n type: \"eventHandler\",\n displayName: \"On Reject\",\n description: \"Event handler called when user rejects this service\",\n argTypes: [],\n },\n },\n },\n defaultValue: [\n {\n key: \"ga\",\n label: \"Google Analytics\",\n },\n {\n key: \"youtube\",\n label: \"Youtube Embed\",\n },\n ],\n },\n },\n};\n"],
4
+ "sourcesContent": ["import registerComponent, {\n CodeComponentMeta,\n} from \"@plasmicapp/host/registerComponent\";\nimport registerToken from \"@plasmicapp/host/registerToken\";\n\nimport { CookieConsent } from \"./cookie-consent\";\nimport { CookieConsentMeta, registerTokens } from \"./cookie-consent-meta\";\n\nexport function registerAll(loader?: {\n registerComponent: typeof registerComponent;\n registerToken: typeof registerToken;\n}) {\n const _registerComponent = <T extends React.ComponentType<any>>(\n Component: T,\n defaultMeta: CodeComponentMeta<React.ComponentProps<T>>\n ) => {\n if (loader) {\n loader.registerComponent(Component, defaultMeta);\n } else {\n registerComponent(Component, defaultMeta);\n }\n };\n\n // Register tokens first\n registerTokens(loader);\n\n // Then register component\n _registerComponent(CookieConsent, CookieConsentMeta);\n}\n\nexport * from \"./cookie-consent\";\n", "import {\n usePlasmicCanvasComponentInfo,\n usePlasmicCanvasContext,\n} from \"@plasmicapp/host\";\nimport React from \"react\";\nimport * as ConsentApi from \"vanilla-cookieconsent\";\n\nimport { CookieConsentProps } from \"./types\";\n\nexport function CookieConsent(props: CookieConsentProps) {\n const {\n mode,\n revision,\n autoShow,\n disablePageInteraction,\n hideFromBots,\n cookieName,\n cookieDomain,\n cookiePath,\n cookieSecure,\n cookieExpiresAfterDays,\n cookieSameSite,\n cookieUseLocalStorage,\n consentModal,\n preferencesModal,\n necessaryEnabled,\n necessaryReadOnly,\n analyticsEnabled,\n analyticsAutoClearCookies,\n adsEnabled,\n languageDefault,\n languageAutoDetect,\n languageRtl,\n onFirstConsent,\n onConsent,\n onChange,\n onModalReady,\n onModalShow,\n onModalHide,\n sections,\n services,\n plasmicNotifyAutoOpenedContent,\n } = props;\n const inPlasmicCanvas = usePlasmicCanvasContext();\n const isSelected =\n usePlasmicCanvasComponentInfo?.(props)?.isSelected ?? false;\n\n React.useEffect(() => {\n if (!isSelected && inPlasmicCanvas) {\n ConsentApi.reset(true);\n return;\n }\n plasmicNotifyAutoOpenedContent?.();\n\n // Parse analytics auto-clear cookies\n const analyticsAutoClearCookiesArray =\n analyticsAutoClearCookies\n ?.split(\",\")\n ?.map((cookie) => cookie.trim())\n ?.filter((cookie) => cookie.length > 0)\n ?.map((cookie) => ({\n name:\n cookie.startsWith(\"/\") && cookie.endsWith(\"/\")\n ? new RegExp(cookie.slice(1, -1))\n : cookie,\n })) || [];\n\n const config: ConsentApi.CookieConsentConfig = {\n root: \"#plasmic-cookie-consent\",\n mode,\n revision,\n autoShow,\n disablePageInteraction,\n hideFromBots,\n cookie: {\n name: cookieName,\n domain: cookieDomain || window?.location?.hostname,\n path: cookiePath,\n secure: cookieSecure,\n expiresAfterDays: cookieExpiresAfterDays,\n sameSite: cookieSameSite,\n useLocalStorage: cookieUseLocalStorage,\n },\n guiOptions: {\n consentModal: {\n layout: consentModal?.layout,\n position: consentModal?.position,\n equalWeightButtons: consentModal?.equalWeightButtons,\n flipButtons: consentModal?.flipButtons,\n },\n preferencesModal: {\n layout: preferencesModal?.layout,\n equalWeightButtons: preferencesModal?.equalWeightButtons,\n flipButtons: preferencesModal?.flipButtons,\n },\n },\n onFirstConsent: ({ cookie }) => {\n onFirstConsent?.(cookie);\n },\n onConsent: ({ cookie }) => {\n onConsent?.(cookie);\n },\n onChange: ({ changedCategories, changedServices, cookie }) => {\n onChange?.(changedCategories, changedServices, cookie);\n },\n onModalReady: ({ modalName }) => {\n onModalReady?.(modalName);\n },\n onModalShow: ({ modalName }) => {\n onModalShow?.(modalName);\n },\n onModalHide: ({ modalName }) => {\n onModalHide?.(modalName);\n },\n categories: {\n necessary: {\n enabled: necessaryEnabled,\n readOnly: necessaryReadOnly,\n },\n analytics: {\n enabled: analyticsEnabled,\n autoClear: {\n cookies: analyticsAutoClearCookiesArray,\n },\n services: services?.reduce((acc, service) => {\n acc[service.key] = {\n label: service.label || service.key,\n onAccept: service.onAccept || (() => {}),\n onReject: service.onReject || (() => {}),\n };\n return acc;\n }, {} as Record<string, ConsentApi.Service>),\n },\n ads: {\n enabled: adsEnabled,\n },\n },\n language: {\n default: languageDefault,\n autoDetect: languageAutoDetect,\n rtl: languageRtl,\n translations: {\n [languageDefault || \"en\"]: {\n consentModal,\n preferencesModal: {\n ...preferencesModal,\n sections: sections,\n },\n },\n },\n },\n };\n\n ConsentApi.run(config);\n\n return () => {\n ConsentApi.reset();\n };\n }, [\n mode,\n revision,\n autoShow,\n disablePageInteraction,\n hideFromBots,\n cookieName,\n cookieDomain,\n cookiePath,\n cookieSecure,\n cookieExpiresAfterDays,\n cookieSameSite,\n cookieUseLocalStorage,\n consentModal,\n preferencesModal,\n necessaryEnabled,\n necessaryReadOnly,\n analyticsEnabled,\n analyticsAutoClearCookies,\n adsEnabled,\n languageDefault,\n languageAutoDetect,\n languageRtl,\n onFirstConsent,\n onConsent,\n onChange,\n onModalReady,\n onModalShow,\n onModalHide,\n sections,\n services,\n inPlasmicCanvas,\n isSelected,\n plasmicNotifyAutoOpenedContent,\n ]);\n\n return <div id=\"plasmic-cookie-consent\" />;\n}\n", "import { TokenRegistration } from \"@plasmicapp/host\";\nimport { CodeComponentMeta } from \"@plasmicapp/host/registerComponent\";\nimport registerToken from \"@plasmicapp/host/registerToken\";\nimport { CookieConsentProps } from \"./types\";\n\nconst modulePath = \"@plasmicpkgs/vanilla-cookieconsent\";\n\nexport interface Registerable {\n registerToken: typeof registerToken;\n}\n\nexport function registerTokens(loader?: Registerable) {\n const tokenRegistrations = [\n // Basic colors\n {\n name: \"--cc-font-family\",\n type: \"font-family\",\n value: \"Inter\",\n },\n {\n name: \"--cc-bg\",\n type: \"color\",\n value: \"#ffffff\",\n },\n {\n name: \"--cc-primary-color\",\n type: \"color\",\n value: \"#2c2f31\",\n },\n {\n name: \"--cc-secondary-color\",\n type: \"color\",\n value: \"#5e6266\",\n },\n\n // Primary button styling\n {\n name: \"--cc-btn-primary-bg\",\n type: \"color\",\n value: \"#30363c\",\n },\n {\n name: \"--cc-btn-primary-color\",\n type: \"color\",\n value: \"#ffffff\",\n },\n {\n name: \"--cc-btn-primary-hover-bg\",\n type: \"color\",\n value: \"#000000\",\n },\n {\n name: \"--cc-btn-primary-hover-color\",\n type: \"color\",\n value: \"#ffffff\",\n },\n\n // Secondary button styling\n {\n name: \"--cc-btn-secondary-bg\",\n type: \"color\",\n value: \"#eaeff2\",\n },\n {\n name: \"--cc-btn-secondary-hover-bg\",\n type: \"color\",\n value: \"#d4dae0\",\n },\n {\n name: \"--cc-btn-secondary-hover-color\",\n type: \"color\",\n value: \"#000000\",\n },\n {\n name: \"--cc-btn-secondary-hover-border-color\",\n type: \"color\",\n value: \"#d4dae0\",\n },\n\n // Button border radius\n {\n name: \"--cc-btn-border-radius\",\n type: \"spacing\",\n value: \"10px\",\n },\n\n // Separator\n {\n name: \"--cc-separator-border-color\",\n type: \"color\",\n value: \"#f0f4f7\",\n },\n\n // Toggle styling\n {\n name: \"--cc-toggle-off-bg\",\n type: \"color\",\n value: \"#667481\",\n },\n {\n name: \"--cc-toggle-on-knob-bg\",\n type: \"color\",\n value: \"#ffffff\",\n },\n\n // Toggle readonly\n {\n name: \"--cc-toggle-readonly-bg\",\n type: \"color\",\n value: \"#d5dee2\",\n },\n {\n name: \"--cc-toggle-readonly-knob-bg\",\n type: \"color\",\n value: \"#ffffff\",\n },\n\n // Cookie category sections\n {\n name: \"--cc-cookie-category-block-bg\",\n type: \"color\",\n value: \"#f0f4f7\",\n },\n {\n name: \"--cc-cookie-category-block-border\",\n type: \"color\",\n value: \"#f0f4f7\",\n },\n {\n name: \"--cc-cookie-category-block-hover-bg\",\n type: \"color\",\n value: \"#e9eff4\",\n },\n {\n name: \"--cc-cookie-category-block-hover-border\",\n type: \"color\",\n value: \"#e9eff4\",\n },\n {\n name: \"--cc-cookie-category-expanded-block-bg\",\n type: \"color\",\n value: \"transparent\",\n },\n {\n name: \"--cc-cookie-category-expanded-block-hover-bg\",\n type: \"color\",\n value: \"#dee4e9\",\n },\n\n // Overlay and scrollbar\n {\n name: \"--cc-overlay-bg\",\n type: \"color\",\n value: \"rgba(0, 0, 0, 0.65)\",\n },\n\n // Footer\n {\n name: \"--cc-footer-border-color\",\n type: \"color\",\n value: \"#e4eaed\",\n },\n ].map((token) => ({\n ...token,\n displayName: token.name,\n type: token.type as TokenRegistration[\"type\"],\n }));\n\n // Register all tokens\n if (loader) {\n tokenRegistrations.forEach((token) => loader.registerToken(token));\n } else {\n tokenRegistrations.forEach((token) => registerToken(token));\n }\n}\n\nexport const CookieConsentMeta: CodeComponentMeta<CookieConsentProps> = {\n name: \"hostless-vanilla-cookieconsent\",\n displayName: \"Cookie Consent\",\n importName: \"CookieConsent\",\n importPath: modulePath,\n description: \"Shows Cookie Consent Banner\",\n defaultStyles: {\n maxWidth: \"100%\",\n },\n props: {\n mode: {\n type: \"choice\",\n options: [\"opt-in\", \"opt-out\"],\n displayName: \"Consent Mode\",\n description:\n \"Changes the scripts' activation logic when consent is not valid. opt-in: scripts will run only if the user accepts that category (GDPR compliant). opt-out: scripts will run automatically (not GDPR compliant).\",\n defaultValue: \"opt-in\",\n },\n revision: {\n type: \"number\",\n displayName: \"Revision\",\n description:\n \"Manages consent revisions; useful if you'd like to ask your users again for consent after a change in your cookie/privacy policy\",\n defaultValue: 0,\n },\n autoShow: {\n type: \"boolean\",\n displayName: \"Auto Show\",\n description:\n \"Automatically show the consent modal if consent is not valid\",\n defaultValue: true,\n },\n disablePageInteraction: {\n type: \"boolean\",\n displayName: \"Disable Page Interaction\",\n description:\n \"Creates a dark overlay and blocks the page scroll until consent is expressed\",\n defaultValue: false,\n },\n hideFromBots: {\n type: \"boolean\",\n displayName: \"Hide From Bots\",\n description:\n \"Stops the plugin's execution when a bot/crawler is detected, to prevent them from indexing the modal's content\",\n defaultValue: true,\n },\n cookieName: {\n type: \"string\",\n displayName: \"Cookie Name\",\n description: \"Name of the consent cookie\",\n defaultValue: \"cc_cookie\",\n },\n cookieDomain: {\n type: \"string\",\n displayName: \"Cookie Domain\",\n description:\n \"Current domain/subdomain's name, retrieved automatically if left empty\",\n },\n cookiePath: {\n type: \"string\",\n displayName: \"Cookie Path\",\n description: \"Path for the consent cookie\",\n defaultValue: \"/\",\n },\n cookieSecure: {\n type: \"boolean\",\n displayName: \"Cookie Secure\",\n description:\n \"Toggle the secure flag (won't be set if there is no https connection)\",\n defaultValue: true,\n },\n cookieExpiresAfterDays: {\n type: \"number\",\n displayName: \"Cookie Expires After Days\",\n description: \"Number of days before the cookie expires\",\n defaultValue: 182,\n },\n cookieSameSite: {\n type: \"choice\",\n options: [\"Lax\", \"Strict\", \"None\"],\n displayName: \"Cookie SameSite\",\n description: \"SameSite attribute for the consent cookie\",\n defaultValue: \"Lax\",\n },\n cookieUseLocalStorage: {\n type: \"boolean\",\n displayName: \"Use Local Storage\",\n description:\n \"Store the value of the cookie in localStorage (ignores domain, path, sameSite when enabled)\",\n defaultValue: false,\n },\n consentModal: {\n type: \"object\",\n displayName: \"Consent Modal\",\n description: \"Configuration for the consent modal\",\n defaultValue: {\n layout: \"cloud inline\",\n position: \"bottom center\",\n equalWeightButtons: true,\n title: \"We use cookies\",\n description: \"Description text for the consent modal\",\n acceptAllBtn: \"Accept all\",\n acceptNecessaryBtn: \"Reject all\",\n showPreferencesBtn: \"Manage Individual Preferences\",\n closeIconLabel: \"Close\",\n revisionMessage: \"\",\n footer:\n '<a href=\"#path-to-impressum.html\" target=\"_blank\">Impressum</a><a href=\"#path-to-privacy-policy.html\" target=\"_blank\">Privacy Policy</a>',\n },\n fields: {\n layout: {\n type: \"choice\",\n options: [\"cloud\", \"cloud inline\", \"box\", \"bar\"],\n displayName: \"Layout\",\n description: \"Layout style for the consent modal\",\n },\n position: {\n type: \"choice\",\n options: [\n \"top\",\n \"bottom\",\n \"top left\",\n \"top center\",\n \"top right\",\n \"bottom left\",\n \"bottom center\",\n \"bottom right\",\n ],\n displayName: \"Position\",\n description: \"Position of the consent modal\",\n },\n equalWeightButtons: {\n type: \"boolean\",\n displayName: \"Equal Weight Buttons\",\n description: \"Make buttons in consent modal equal weight\",\n },\n flipButtons: {\n type: \"boolean\",\n displayName: \"Flip Buttons\",\n description: \"Flip button order in consent modal\",\n },\n title: {\n type: \"string\",\n displayName: \"Title\",\n description: \"Title text for the consent modal\",\n },\n description: {\n type: \"string\",\n displayName: \"Description\",\n description: \"Description text for the consent modal\",\n },\n acceptAllBtn: {\n type: \"string\",\n displayName: \"Accept All Button Text\",\n description: \"Text for the accept all button\",\n },\n acceptNecessaryBtn: {\n type: \"string\",\n displayName: \"Accept Necessary Button Text\",\n description: \"Text for the accept necessary button\",\n },\n showPreferencesBtn: {\n type: \"string\",\n displayName: \"Show Preferences Button Text\",\n description: \"Text for the show preferences button\",\n },\n closeIconLabel: {\n type: \"string\",\n displayName: \"Close Icon Label\",\n description:\n \"If specified, a big X button will be generated (visible only in box layout). Acts the same as acceptNecessaryBtn\",\n },\n revisionMessage: {\n type: \"string\",\n displayName: \"Revision Message\",\n description: \"Message shown when there's a revision change\",\n },\n footer: {\n type: \"string\",\n displayName: \"Footer\",\n description:\n \"A small area where you can place your links (impressum, privacy policy, etc.) - allows HTML markup\",\n },\n },\n },\n preferencesModal: {\n type: \"object\",\n displayName: \"Preferences Modal\",\n description: \"Configuration for the preferences modal\",\n defaultValue: {\n layout: \"box\",\n equalWeightButtons: true,\n flipButtons: false,\n title: \"Manage cookie preferences\",\n acceptAllBtn: \"Accept all\",\n acceptNecessaryBtn: \"Reject all\",\n savePreferencesBtn: \"Accept current selection\",\n closeIconLabel: \"Close modal\",\n serviceCounterLabel: \"Service|Services\",\n },\n fields: {\n layout: {\n type: \"choice\",\n options: [\"box\", \"bar\"],\n displayName: \"Layout\",\n description: \"Layout style for the preferences modal\",\n },\n equalWeightButtons: {\n type: \"boolean\",\n displayName: \"Equal Weight Buttons\",\n description: \"Make buttons in preferences modal equal weight\",\n },\n flipButtons: {\n type: \"boolean\",\n displayName: \"Flip Buttons\",\n description: \"Flip button order in preferences modal\",\n },\n title: {\n type: \"string\",\n displayName: \"Title\",\n description: \"Title text for the preferences modal\",\n },\n acceptAllBtn: {\n type: \"string\",\n displayName: \"Accept All Button Text\",\n description: \"Text for the accept all button in preferences modal\",\n },\n acceptNecessaryBtn: {\n type: \"string\",\n displayName: \"Accept Necessary Button Text\",\n description:\n \"Text for the accept necessary button in preferences modal\",\n },\n savePreferencesBtn: {\n type: \"string\",\n displayName: \"Save Preferences Button Text\",\n description: \"Text for the save preferences button\",\n },\n closeIconLabel: {\n type: \"string\",\n displayName: \"Close Icon Label\",\n description: \"Label for the close icon\",\n },\n serviceCounterLabel: {\n type: \"string\",\n displayName: \"Service Counter Label\",\n description: \"Label for service counter (singular|plural)\",\n },\n },\n },\n necessaryEnabled: {\n type: \"boolean\",\n displayName: \"Necessary Category Enabled\",\n description: \"Enable the necessary category by default\",\n defaultValue: true,\n },\n necessaryReadOnly: {\n type: \"boolean\",\n displayName: \"Necessary Category Read Only\",\n description: \"Make the necessary category read-only (cannot be disabled)\",\n defaultValue: true,\n },\n analyticsEnabled: {\n type: \"boolean\",\n displayName: \"Analytics Category Enabled\",\n description: \"Enable the analytics category by default\",\n defaultValue: false,\n },\n analyticsAutoClearCookies: {\n type: \"string\",\n displayName: \"Analytics Auto Clear Cookies\",\n description:\n \"Comma-separated list of cookie names to auto-clear (supports regex patterns)\",\n defaultValue: \"_ga,_gid\",\n },\n adsEnabled: {\n type: \"boolean\",\n displayName: \"Ads Category Enabled\",\n description: \"Enable the ads category by default\",\n defaultValue: false,\n },\n languageDefault: {\n type: \"string\",\n displayName: \"Default Language\",\n description: \"The desired default language\",\n defaultValue: \"en\",\n },\n languageAutoDetect: {\n type: \"choice\",\n options: [\"document\", \"browser\"],\n displayName: \"Language Auto Detect\",\n description:\n \"Set the current language dynamically. 'document': retrieve language from the lang attribute. 'browser': retrieve the user's browser language\",\n },\n languageRtl: {\n type: \"string\",\n displayName: \"RTL Languages\",\n description:\n \"List of languages that should use the RTL layout (comma-separated)\",\n },\n onFirstConsent: {\n type: \"eventHandler\",\n displayName: \"On First Consent\",\n description: \"Event handler called when user gives first consent\",\n argTypes: [\n {\n name: \"cookie\",\n type: \"object\",\n },\n ],\n },\n onConsent: {\n type: \"eventHandler\",\n displayName: \"On Consent\",\n description: \"Event handler called when user gives consent\",\n argTypes: [\n {\n name: \"cookie\",\n type: \"object\",\n },\n ],\n },\n onChange: {\n type: \"eventHandler\",\n displayName: \"On Change\",\n description: \"Event handler called when consent categories change\",\n argTypes: [\n {\n name: \"changedCategories\",\n type: \"object\",\n },\n {\n name: \"changedServices\",\n type: \"object\",\n },\n ],\n },\n onModalReady: {\n type: \"eventHandler\",\n displayName: \"On Modal Ready\",\n description: \"Event handler called when modal is ready\",\n argTypes: [\n {\n name: \"modalName\",\n type: \"string\",\n },\n ],\n },\n onModalShow: {\n type: \"eventHandler\",\n displayName: \"On Modal Show\",\n description: \"Event handler called when modal is shown\",\n argTypes: [\n {\n name: \"modalName\",\n type: \"string\",\n },\n ],\n },\n onModalHide: {\n type: \"eventHandler\",\n displayName: \"On Modal Hide\",\n description: \"Event handler called when modal is hidden\",\n argTypes: [\n {\n name: \"modalName\",\n type: \"string\",\n },\n ],\n },\n sections: {\n type: \"array\",\n displayName: \"Preferences Modal Sections\",\n description: \"Sections to display in the preferences modal\",\n itemType: {\n nameFunc: (item) => item?.title,\n type: \"object\",\n fields: {\n title: {\n type: \"string\",\n displayName: \"Section Title\",\n description: \"Title of the section\",\n },\n description: {\n type: \"string\",\n displayName: \"Section Description\",\n description: \"Description text for the section\",\n },\n linkedCategory: {\n type: \"string\",\n displayName: \"Linked Category\",\n description:\n \"Category name to link this section to (e.g., 'necessary', 'analytics', 'ads')\",\n },\n cookieTable: {\n type: \"object\",\n displayName: \"Cookie Table\",\n description: \"Cookie table configuration for this section\",\n fields: {\n caption: {\n type: \"string\",\n displayName: \"Table Caption\",\n description: \"Caption for the cookie table\",\n },\n headers: {\n type: \"object\",\n displayName: \"Table Headers\",\n description: \"Headers for the cookie table\",\n fields: {\n name: {\n type: \"string\",\n displayName: \"Name Header\",\n description: \"Header for cookie name column\",\n },\n domain: {\n type: \"string\",\n displayName: \"Domain Header\",\n description: \"Header for domain column\",\n },\n desc: {\n type: \"string\",\n displayName: \"Description Header\",\n description: \"Header for description column\",\n },\n },\n },\n body: {\n type: \"array\",\n displayName: \"Table Body\",\n description: \"Rows in the cookie table\",\n itemType: {\n type: \"object\",\n nameFunc: (item) => item?.name || item?.domain,\n fields: {\n name: {\n type: \"string\",\n displayName: \"Cookie Name\",\n description: \"Name of the cookie\",\n },\n domain: {\n type: \"string\",\n displayName: \"Domain\",\n description: \"Domain where the cookie is set\",\n },\n desc: {\n type: \"string\",\n displayName: \"Description\",\n description: \"Description of what the cookie does\",\n },\n },\n },\n },\n },\n },\n },\n },\n defaultValue: [\n {\n title: \"Your Privacy Choices\",\n description:\n 'In this panel you can express some preferences related to the processing of your personal information. You may review and change expressed choices at any time by resurfacing this panel via the provided link. To deny your consent to the specific processing activities described below, switch the toggles to off or use the \"Reject all\" button and confirm you want to save your choices.',\n },\n {\n title: \"Strictly Necessary\",\n description:\n \"These cookies are essential for the proper functioning of the website and cannot be disabled.\",\n linkedCategory: \"necessary\",\n },\n {\n title: \"Performance and Analytics\",\n description:\n \"These cookies collect information about how you use our website. All of the data is anonymized and cannot be used to identify you.\",\n linkedCategory: \"analytics\",\n cookieTable: {\n caption: \"Cookie table\",\n headers: {\n name: \"Cookie\",\n domain: \"Domain\",\n desc: \"Description\",\n },\n body: [\n {\n name: \"_ga\",\n domain: \"example.com\",\n desc: \"Description 1\",\n },\n {\n name: \"_gid\",\n domain: \"example.com\",\n desc: \"Description 2\",\n },\n ],\n },\n },\n {\n title: \"Targeting and Advertising\",\n description:\n \"These cookies are used to make advertising messages more relevant to you and your interests. The intention is to display ads that are relevant and engaging for the individual user and thereby more valuable for publishers and third party advertisers.\",\n linkedCategory: \"ads\",\n },\n {\n title: \"More information\",\n description:\n 'For any queries in relation to my policy on cookies and your choices, please <a href=\"#contact-page\">contact us</a>',\n },\n ],\n },\n services: {\n type: \"array\",\n displayName: \"Analytics Services\",\n description: \"Services to display in the analytics category\",\n itemType: {\n type: \"object\",\n nameFunc: (item) => item?.label || item?.key,\n fields: {\n key: {\n type: \"string\",\n displayName: \"Service Key\",\n description:\n \"Unique identifier for the service (e.g., 'ga', 'youtube')\",\n },\n label: {\n type: \"string\",\n displayName: \"Service Label\",\n description: \"Display name for the service\",\n },\n onAccept: {\n type: \"eventHandler\",\n displayName: \"On Accept\",\n description: \"Event handler called when user accepts this service\",\n argTypes: [],\n },\n onReject: {\n type: \"eventHandler\",\n displayName: \"On Reject\",\n description: \"Event handler called when user rejects this service\",\n argTypes: [],\n },\n },\n },\n defaultValue: [\n {\n key: \"ga\",\n label: \"Google Analytics\",\n },\n {\n key: \"youtube\",\n label: \"You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,UACP,aACE;AAAA,QACJ;AAAA,MACF;AAAA,IACF;AAAA,IACA,UAAU;AAAA,MACR,MAAM;AAAA,MACN,aAAa;AAAA,MACb,aAAa;AAAA,MACb,UAAU;AAAA,QACR,MAAM;AAAA,QACN,UAAU,CAAC,UAAS,6BAAM,WAAS,6BAAM;AAAA,QACzC,QAAQ;AAAA,UACN,KAAK;AAAA,YACH,MAAM;AAAA,YACN,aAAa;AAAA,YACb,aACE;AAAA,UACJ;AAAA,UACA,OAAO;AAAA,YACL,MAAM;AAAA,YACN,aAAa;AAAA,YACb,aAAa;AAAA,UACf;AAAA,UACA,UAAU;AAAA,YACR,MAAM;AAAA,YACN,aAAa;AAAA,YACb,aAAa;AAAA,YACb,UAAU,CAAC;AAAA,UACb;AAAA,UACA,UAAU;AAAA,YACR,MAAM;AAAA,YACN,aAAa;AAAA,YACb,aAAa;AAAA,YACb,UAAU,CAAC;AAAA,UACb;AAAA,QACF;AAAA,MACF;AAAA,MACA,cAAc;AAAA,QACZ;AAAA,UACE,KAAK;AAAA,UACL,OAAO;AAAA,QACT;AAAA,QACA;AAAA,UACE,KAAK;AAAA,UACL,OAAO;AAAA,QACT;AAAA,MACF;AAAA,IACF;AAAA,EACF;AACF;;;AFhtBO,SAAS,YAAY,QAGzB;AACD,QAAM,qBAAqB,CACzB,WACA,gBACG;AACH,QAAI,QAAQ;AACV,aAAO,kBAAkB,WAAW,WAAW;AAAA,IACjD,OAAO;AACL,mCAAAC,SAAkB,WAAW,WAAW;AAAA,IAC1C;AAAA,EACF;AAGA,iBAAe,MAAM;AAGrB,qBAAmB,eAAe,iBAAiB;AACrD;",
6
6
  "names": ["React", "_a", "_b", "_c", "registerToken", "registerComponent"]
7
7
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@plasmicpkgs/vanilla-cookieconsent",
3
- "version": "0.0.3",
3
+ "version": "0.0.4",
4
4
  "description": "Plasmic cookie consent banner component.",
5
5
  "repository": {
6
6
  "type": "git",
@@ -35,10 +35,10 @@
35
35
  "typescript": "^5.7.3"
36
36
  },
37
37
  "peerDependencies": {
38
- "@plasmicapp/host": "^1.0.211"
38
+ "@plasmicapp/host": "^1.0.226"
39
39
  },
40
40
  "dependencies": {
41
41
  "vanilla-cookieconsent": "^3.1.0"
42
42
  },
43
- "gitHead": "3ed3b7bdb9795a4feed21f38bba4bbffcadc8571"
43
+ "gitHead": "aed54ca6b4ade8457b545b79647fff611ded221b"
44
44
  }