@openpolicy/react 0.0.17 → 0.0.18
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.d.ts +5 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +11 -2
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/styles.css +15 -15
package/dist/index.d.ts
CHANGED
|
@@ -3,6 +3,8 @@ import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
|
3
3
|
|
|
4
4
|
//#region ../core/dist/index.d.ts
|
|
5
5
|
type Jurisdiction = "us" | "eu" | "ca" | "au" | "nz" | "other";
|
|
6
|
+
type UserRight = "access" | "rectification" | "erasure" | "portability" | "restriction" | "objection" | "opt_out_sale" | "non_discrimination";
|
|
7
|
+
type LegalBasis = "consent" | "contract" | "legal_obligation" | "vital_interests" | "public_task" | "legitimate_interests";
|
|
6
8
|
type CompanyConfig = {
|
|
7
9
|
name: string;
|
|
8
10
|
legalName: string;
|
|
@@ -13,7 +15,7 @@ type PrivacyPolicyConfig = {
|
|
|
13
15
|
effectiveDate: string;
|
|
14
16
|
company: CompanyConfig;
|
|
15
17
|
dataCollected: Record<string, string[]>;
|
|
16
|
-
legalBasis:
|
|
18
|
+
legalBasis: LegalBasis | LegalBasis[];
|
|
17
19
|
retention: Record<string, string>;
|
|
18
20
|
cookies: {
|
|
19
21
|
essential: boolean;
|
|
@@ -23,8 +25,9 @@ type PrivacyPolicyConfig = {
|
|
|
23
25
|
thirdParties: {
|
|
24
26
|
name: string;
|
|
25
27
|
purpose: string;
|
|
28
|
+
policyUrl?: string;
|
|
26
29
|
}[];
|
|
27
|
-
userRights:
|
|
30
|
+
userRights: UserRight[];
|
|
28
31
|
jurisdictions: Jurisdiction[];
|
|
29
32
|
children?: {
|
|
30
33
|
underAge: number;
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","names":["OutputFormat","CompileOptions","formats","Jurisdiction","CompanyConfig","name","legalName","address","contact","PrivacyPolicyConfig","Record","effectiveDate","company","dataCollected","legalBasis","retention","cookies","essential","analytics","marketing","thirdParties","purpose","userRights","jurisdictions","children","underAge","noticeUrl","DisputeResolutionMethod","TermsOfServiceConfig","acceptance","methods","eligibility","minimumAge","jurisdictionRestrictions","accounts","registrationRequired","userResponsibleForCredentials","companyCanTerminate","prohibitedUses","userContent","usersOwnContent","licenseGrantedToCompany","licenseDescription","companyCanRemoveContent","intellectualProperty","companyOwnsService","usersMayNotCopy","payments","hasPaidFeatures","refundPolicy","priceChangesNotice","availability","noUptimeGuarantee","maintenanceWindows","termination","userCanTerminate","effectOfTermination","disclaimers","serviceProvidedAsIs","noWarranties","limitationOfLiability","excludesIndirectDamages","liabilityCap","indemnification","userIndemnifiesCompany","scope","thirdPartyServices","disputeResolution","method","venue","classActionWaiver","governingLaw","jurisdiction","changesPolicy","noticeMethod","noticePeriodDays","privacyPolicyUrl","CookiePolicyCookies","key","CookiePolicyConfig","
|
|
1
|
+
{"version":3,"file":"index.d.ts","names":["OutputFormat","CompileOptions","formats","Jurisdiction","UserRight","LegalBasis","CompanyConfig","name","legalName","address","contact","PrivacyPolicyConfig","Record","effectiveDate","company","dataCollected","legalBasis","retention","cookies","essential","analytics","marketing","thirdParties","purpose","policyUrl","userRights","jurisdictions","children","underAge","noticeUrl","DisputeResolutionMethod","TermsOfServiceConfig","acceptance","methods","eligibility","minimumAge","jurisdictionRestrictions","accounts","registrationRequired","userResponsibleForCredentials","companyCanTerminate","prohibitedUses","userContent","usersOwnContent","licenseGrantedToCompany","licenseDescription","companyCanRemoveContent","intellectualProperty","companyOwnsService","usersMayNotCopy","payments","hasPaidFeatures","refundPolicy","priceChangesNotice","availability","noUptimeGuarantee","maintenanceWindows","termination","userCanTerminate","effectOfTermination","disclaimers","serviceProvidedAsIs","noWarranties","limitationOfLiability","excludesIndirectDamages","liabilityCap","indemnification","userIndemnifiesCompany","scope","thirdPartyServices","disputeResolution","method","venue","classActionWaiver","governingLaw","jurisdiction","changesPolicy","noticeMethod","noticePeriodDays","privacyPolicyUrl","CookiePolicyCookies","key","CookiePolicyConfig","trackingTechnologies","consentMechanism","hasBanner","hasPreferencePanel","canWithdraw","PolicyInput","type","OpenPolicyConfig","Omit","privacy","terms","cookie","isOpenPolicyConfig","value","ValidationIssue","level","message","CookieConsent","CookieConsentStatus","acceptAll","config","rejectAll","NodeContext","reason","TextNode","context","BoldNode","ItalicNode","LinkNode","href","InlineNode","HeadingNode","ParagraphNode","ListItemNode","ListNode","ordered","items","ContentNode","DocumentSection","id","content","PolicyType","Document","policyType","sections","Node","heading","levelOrContext","text","bold","italic","link","p","li","ul","ol","section","compile","input","validatePrivacyPolicy","validateCookiePolicy","validateTermsOfService","expandOpenPolicyConfig"],"sources":["../../core/dist/index.d.ts","../src/context.tsx","../src/components/ConsentGate.tsx","../src/types.ts","../src/components/CookiePolicy.tsx","../src/components/defaults.tsx","../src/components/PrivacyPolicy.tsx","../src/components/TermsOfService.tsx","../src/hooks/useCookies.ts","../src/hooks/useShouldShowCookieBanner.ts","../src/render.tsx","../src/styles.ts"],"mappings":";;;;KAKKG,YAAAA;AAAAA,KACAC,SAAAA;AAAAA,KACAC,UAAAA;AAAAA,KACAC,aAAAA;EACHC,IAAAA;EACAC,SAAAA;EACAC,OAAAA;EACAC,OAAAA;AAAAA;AAAAA,KAEGC,mBAAAA;EACHE,aAAAA;EACAC,OAAAA,EAASR,aAAAA;EACTS,aAAAA,EAAeH,MAAAA;EACfI,UAAAA,EAAYX,UAAAA,GAAaA,UAAAA;EACzBY,SAAAA,EAAWL,MAAAA;EACXM,OAAAA;IACEC,SAAAA;IACAC,SAAAA;IACAC,SAAAA;EAAAA;EAEFC,YAAAA;IACEf,IAAAA;IACAgB,OAAAA;IACAC,SAAAA;EAAAA;EAEFC,UAAAA,EAAYrB,SAAAA;EACZsB,aAAAA,EAAevB,YAAAA;EACfwB,QAAAA;IACEC,QAAAA;IACAC,S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gBAAA,CAAA;EACf,IAAA,EAAM,KAAA;EACN;AAAA;EAEA,IAAA,EAFQ,aAAA;EAGR,QAAA,EAAU,SAAA;AAAA,IACV,kBAAA,CAAA,GAAA,CAAA,OAAA;AAAA,iBAQe,WAAA,CAAA;EACf,IAAA;EACA;AAAA;EAEA,IAAA,EAFQ,QAAA;EAGR,QAAA,EAAU,SAAA;AAAA,IACV,kBAAA,CAAA,GAAA,CAAA,OAAA;AAAA,iBASe,UAAA,CACf,IAAA,EAAM,IAAA,EACN,UAAA,EAAY,gBAAA,EACZ,GAAA,YACE,SAAA;;;UCpFO,kBAAA;EACT,MAAA,GAAS,gBAAA,GAAmB,mBAAA;EAC5B,UAAA,GAAa,gBAAA;EACb,KAAA,GAAQ,aAAA;AAAA;AAAA,iBAGO,aAAA,CAAA;EACf,MAAA,EAAQ,UAAA;EACR,UAAA;EACA;AAAA,GACE,kBAAA,GAAkB,kBAAA,CAAA,GAAA,CAAA,OAAA;;;UCVX,mBAAA;EACT,MAAA,GAAS,gBAAA,GAAmB,oBAAA;EAC5B,UAAA,GAAa,gBAAA;EACb,KAAA,GAAQ,aAAA;AAAA;AAAA,iBAGO,cAAA,CAAA;EACf,MAAA,EAAQ,UAAA;EACR,UAAA;EACA;AAAA,GACE,mBAAA,GAAmB,kBAAA,CAAA,GAAA,CAAA,OAAA;;;iBChBN,UAAA,CAAA;EAAA,iBAAU,mBAAA;EAAA;;;;;;;;;;;;;iBCHV,yBAAA,CACf,MAAA,EAAQ,mBAAA,EACR,UAAA,SAAmB,OAAA;;;iBCAJ,cAAA,CACf,GAAA,EAAK,QAAA,EACL,UAAA,GAAY,gBAAA,GACV,SAAA;;;cCRU,aAAA"}
|
package/dist/index.js
CHANGED
|
@@ -179,6 +179,14 @@ const SECTION_BUILDERS$2 = [
|
|
|
179
179
|
function compileCookieDocument(config) {
|
|
180
180
|
return SECTION_BUILDERS$2.map((builder) => builder(config)).filter((s) => s !== null);
|
|
181
181
|
}
|
|
182
|
+
const LEGAL_BASIS_LABELS = {
|
|
183
|
+
consent: "Consent (Article 6(1)(a))",
|
|
184
|
+
contract: "Performance of a contract (Article 6(1)(b))",
|
|
185
|
+
legal_obligation: "Compliance with a legal obligation (Article 6(1)(c))",
|
|
186
|
+
vital_interests: "Protection of vital interests (Article 6(1)(d))",
|
|
187
|
+
public_task: "Performance of a public task (Article 6(1)(e))",
|
|
188
|
+
legitimate_interests: "Legitimate interests (Article 6(1)(f))"
|
|
189
|
+
};
|
|
182
190
|
const RIGHTS_LABELS = {
|
|
183
191
|
access: "Right to access your personal data",
|
|
184
192
|
rectification: "Right to correct inaccurate data",
|
|
@@ -219,7 +227,8 @@ function buildDataCollected(config) {
|
|
|
219
227
|
}
|
|
220
228
|
function buildLegalBasis(config) {
|
|
221
229
|
if (!config.jurisdictions.includes("eu")) return null;
|
|
222
|
-
|
|
230
|
+
const labelled = (Array.isArray(config.legalBasis) ? config.legalBasis : [config.legalBasis]).map((b) => LEGAL_BASIS_LABELS[b] ?? b);
|
|
231
|
+
return section("legal-basis", [heading("Legal Basis for Processing", { reason: "Required by GDPR Article 13" }), p([labelled.join(" and ")])]);
|
|
223
232
|
}
|
|
224
233
|
function buildDataRetention(config) {
|
|
225
234
|
const items = Object.entries(config.retention).map(([category, period]) => li([
|
|
@@ -251,7 +260,7 @@ function buildThirdParties(config) {
|
|
|
251
260
|
heading("Third-Party Services"),
|
|
252
261
|
p(["We share data with the following third-party services:"]),
|
|
253
262
|
ul(config.thirdParties.map((t) => li([
|
|
254
|
-
bold(t.name),
|
|
263
|
+
t.policyUrl ? link(t.policyUrl, t.name) : bold(t.name),
|
|
255
264
|
" — ",
|
|
256
265
|
t.purpose
|
|
257
266
|
])))
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":[],"sources":["../../core/dist/index.js","../src/hooks/useShouldShowCookieBanner.ts","../src/styles.ts","../src/context.tsx","../src/hooks/useCookies.ts","../src/components/ConsentGate.tsx","../src/components/defaults.tsx","../src/render.tsx","../src/components/CookiePolicy.tsx","../src/components/PrivacyPolicy.tsx","../src/components/TermsOfService.tsx"],"sourcesContent":["//#region src/consent.ts\nfunction acceptAll(config) {\n\tconst consent = { essential: true };\n\tfor (const [key, value] of Object.entries(config.cookies)) {\n\t\tif (key === \"essential\") continue;\n\t\tconsent[key] = Boolean(value);\n\t}\n\treturn consent;\n}\nfunction rejectAll(config) {\n\tconst consent = { essential: true };\n\tif (config) for (const key of Object.keys(config.cookies)) {\n\t\tif (key === \"essential\") continue;\n\t\tconsent[key] = false;\n\t}\n\treturn consent;\n}\n//#endregion\n//#region src/documents/helpers.ts\nconst heading = (value, levelOrContext, context) => {\n\tconst level = typeof levelOrContext === \"number\" ? levelOrContext : void 0;\n\tconst ctx = typeof levelOrContext === \"object\" ? levelOrContext : context;\n\treturn {\n\t\ttype: \"heading\",\n\t\t...level !== void 0 && { level },\n\t\tvalue,\n\t\t...ctx && { context: ctx }\n\t};\n};\nconst text = (value, context) => ({\n\ttype: \"text\",\n\tvalue,\n\t...context && { context }\n});\nconst bold = (value, context) => ({\n\ttype: \"bold\",\n\tvalue,\n\t...context && { context }\n});\nconst italic = (value, context) => ({\n\ttype: \"italic\",\n\tvalue,\n\t...context && { context }\n});\nconst link = (href, value, context) => ({\n\ttype: \"link\",\n\thref,\n\tvalue,\n\t...context && { context }\n});\nconst p = (children, context) => ({\n\ttype: \"paragraph\",\n\tchildren: children.map((c) => typeof c === \"string\" ? text(c) : c),\n\t...context && { context }\n});\nconst li = (children, context) => ({\n\ttype: \"listItem\",\n\tchildren: children.map((c) => typeof c === \"string\" ? text(c) : c),\n\t...context && { context }\n});\nconst ul = (items, context) => ({\n\ttype: \"list\",\n\titems,\n\t...context && { context }\n});\nconst ol = (items, context) => ({\n\ttype: \"list\",\n\tordered: true,\n\titems,\n\t...context && { context }\n});\nconst section = (id, content, context) => ({\n\ttype: \"section\",\n\tid,\n\tcontent,\n\t...context && { context }\n});\n//#endregion\n//#region src/documents/cookie.ts\nfunction buildIntroduction$2(config) {\n\treturn section(\"cookie-introduction\", [heading(\"Cookie Policy\"), p([`This Cookie Policy explains how ${config.company.name} (\"we\", \"us\", or \"our\") uses cookies and similar tracking technologies on our services. Effective Date: ${config.effectiveDate}.`])]);\n}\nfunction buildWhatAreCookies() {\n\treturn section(\"cookie-what-are-cookies\", [\n\t\theading(\"What Are Cookies?\"),\n\t\tp([\"Cookies are small text files placed on your device by websites you visit. They are widely used to make websites work more efficiently and to provide information to site owners.\"]),\n\t\tp([\"Cookies can be \\\"session cookies\\\" (deleted when you close your browser) or \\\"persistent cookies\\\" (remain on your device until they expire or you delete them).\"])\n\t]);\n}\nfunction buildTypes(config) {\n\tconst types = [];\n\tif (config.cookies.essential) types.push({\n\t\tlabel: \"Essential Cookies\",\n\t\tdescription: \"Required for the basic functioning of our services. These cannot be disabled.\"\n\t});\n\tif (config.cookies.analytics) types.push({\n\t\tlabel: \"Analytics Cookies\",\n\t\tdescription: \"Help us understand how visitors interact with our services so we can improve them.\"\n\t});\n\tif (config.cookies.functional) types.push({\n\t\tlabel: \"Functional Cookies\",\n\t\tdescription: \"Enable enhanced functionality and personalisation, such as remembering your preferences.\"\n\t});\n\tif (config.cookies.marketing) types.push({\n\t\tlabel: \"Marketing Cookies\",\n\t\tdescription: \"Used to deliver advertisements more relevant to you and your interests.\"\n\t});\n\tif (types.length === 0) return section(\"cookie-types\", [heading(\"Types of Cookies We Use\"), p([\"We do not currently use any cookies.\"])]);\n\treturn section(\"cookie-types\", [heading(\"Types of Cookies We Use\"), ul(types.map((t) => li([\n\t\tbold(t.label),\n\t\t\" — \",\n\t\tt.description\n\t])))]);\n}\nfunction buildTrackingTechnologies(config) {\n\tif (!config.trackingTechnologies || config.trackingTechnologies.length === 0) return null;\n\treturn section(\"cookie-tracking-technologies\", [\n\t\theading(\"Other Tracking Technologies\"),\n\t\tp([\"In addition to cookies, we may use the following tracking technologies:\"]),\n\t\tul(config.trackingTechnologies.map((t) => li([t])))\n\t]);\n}\nfunction buildThirdParties$1(config) {\n\tif (!config.thirdParties || config.thirdParties.length === 0) return null;\n\treturn section(\"cookie-third-parties\", [\n\t\theading(\"Third-Party Cookies\"),\n\t\tp([\"The following third parties may set cookies through our services:\"]),\n\t\tul(config.thirdParties.map((t) => li([\n\t\t\tbold(t.name),\n\t\t\t\" — \",\n\t\t\tt.purpose,\n\t\t\t...t.policyUrl ? [\n\t\t\t\t\" (\",\n\t\t\t\tlink(t.policyUrl, \"Privacy Policy\"),\n\t\t\t\t\")\"\n\t\t\t] : []\n\t\t])))\n\t]);\n}\nfunction buildConsent(config) {\n\tif (!config.consentMechanism) return null;\n\tconst { hasBanner, hasPreferencePanel, canWithdraw } = config.consentMechanism;\n\tconst items = [];\n\tif (hasBanner) items.push(\"We display a cookie consent banner when you first visit our services.\");\n\tif (hasPreferencePanel) items.push(\"You can manage your cookie preferences at any time via our preference panel.\");\n\tif (canWithdraw) items.push(\"You may withdraw your consent at any time; however, this will not affect the lawfulness of processing based on consent before its withdrawal.\");\n\tif (items.length === 0) return null;\n\treturn section(\"cookie-consent\", [heading(\"Your Consent\"), ul(items.map((i) => li([i])))]);\n}\nfunction buildManaging() {\n\treturn section(\"cookie-managing\", [\n\t\theading(\"Managing Cookies\"),\n\t\tp([\"Most web browsers allow you to control cookies through their settings. You can:\"]),\n\t\tul([\n\t\t\tli([\"Delete cookies already stored on your device\"]),\n\t\t\tli([\"Block cookies from being set on your device\"]),\n\t\t\tli([\"Set your browser to notify you when a cookie is being set\"])\n\t\t]),\n\t\tp([\"Please note that restricting cookies may impact the functionality of our services. Consult your browser's help documentation for instructions on managing cookies.\"])\n\t]);\n}\nfunction buildJurisdictionEu(config) {\n\tif (!config.jurisdictions.includes(\"eu\")) return null;\n\treturn section(\"cookie-jurisdiction-eu\", [\n\t\theading(\"European Users (GDPR)\", { reason: \"Required under ePrivacy Directive and GDPR\" }),\n\t\tp([\"If you are located in the European Economic Area, we rely on your consent as our legal basis for setting non-essential cookies. You have the right to withdraw consent at any time.\"]),\n\t\tp([\"Essential cookies are set on the basis of our legitimate interests to provide you with a functioning service.\"])\n\t]);\n}\nfunction buildContact$2(config) {\n\treturn section(\"cookie-contact\", [\n\t\theading(\"Contact Us\"),\n\t\tp([\"If you have questions about this Cookie Policy, please contact us:\"]),\n\t\tul([\n\t\t\tli([bold(\"Legal Name: \"), config.company.legalName]),\n\t\t\tli([bold(\"Address: \"), config.company.address]),\n\t\t\tli([bold(\"Email: \"), config.company.contact])\n\t\t])\n\t]);\n}\nconst SECTION_BUILDERS$2 = [\n\tbuildIntroduction$2,\n\t() => buildWhatAreCookies(),\n\tbuildTypes,\n\tbuildTrackingTechnologies,\n\tbuildThirdParties$1,\n\tbuildConsent,\n\t() => buildManaging(),\n\tbuildJurisdictionEu,\n\tbuildContact$2\n];\nfunction compileCookieDocument(config) {\n\treturn SECTION_BUILDERS$2.map((builder) => builder(config)).filter((s) => s !== null);\n}\n//#endregion\n//#region src/documents/privacy.ts\nconst RIGHTS_LABELS = {\n\taccess: \"Right to access your personal data\",\n\trectification: \"Right to correct inaccurate data\",\n\terasure: \"Right to request deletion of your data\",\n\tportability: \"Right to receive your data in a portable format\",\n\trestriction: \"Right to restrict how we process your data\",\n\tobjection: \"Right to object to processing\",\n\topt_out_sale: \"Right to opt out of the sale of your personal information\",\n\tnon_discrimination: \"Right to non-discriminatory treatment for exercising your rights\"\n};\nfunction buildIntroduction$1(config) {\n\treturn section(\"introduction\", [\n\t\theading(\"Introduction\"),\n\t\tp([`This Privacy Policy describes how ${config.company.name} (\"we\", \"us\", or \"our\") collects, uses, and shares information about you when you use our services. Effective Date: ${config.effectiveDate}.`]),\n\t\tp([`If you have questions about this policy, please contact us at ${config.company.contact}.`])\n\t]);\n}\nfunction buildChildrenPrivacy(config) {\n\tif (!config.children) return null;\n\tconst { underAge, noticeUrl } = config.children;\n\treturn section(\"children-privacy\", [\n\t\theading(\"Children's Privacy\", { reason: \"Required by COPPA\" }),\n\t\tp([`Our services are not directed to children under the age of ${underAge}. We do not knowingly collect personal information from children under ${underAge}. If you believe we have collected information from a child, please contact us immediately.`]),\n\t\t...noticeUrl ? [p([\n\t\t\t\"For more information, see our \",\n\t\t\tlink(noticeUrl, \"Children's Privacy Notice\"),\n\t\t\t\".\"\n\t\t])] : []\n\t]);\n}\nfunction buildDataCollected(config) {\n\tconst items = Object.entries(config.dataCollected).map(([category, fields]) => li([bold(category), ul(fields.map((f) => li([f])))]));\n\treturn section(\"data-collected\", [\n\t\theading(\"Information We Collect\"),\n\t\tp([\"We collect the following categories of information:\"]),\n\t\tul(items)\n\t]);\n}\nfunction buildLegalBasis(config) {\n\tif (!config.jurisdictions.includes(\"eu\")) return null;\n\treturn section(\"legal-basis\", [heading(\"Legal Basis for Processing\", { reason: \"Required by GDPR Article 13\" }), p([config.legalBasis])]);\n}\nfunction buildDataRetention(config) {\n\tconst items = Object.entries(config.retention).map(([category, period]) => li([\n\t\tbold(category),\n\t\t\": \",\n\t\tperiod\n\t]));\n\treturn section(\"data-retention\", [\n\t\theading(\"Data Retention\"),\n\t\tp([\"We retain your data for the following periods:\"]),\n\t\tul(items)\n\t]);\n}\nfunction buildCookies(config) {\n\tconst enabled = [];\n\tif (config.cookies.essential) enabled.push(\"Essential cookies — required for the service to function\");\n\tif (config.cookies.analytics) enabled.push(\"Analytics cookies — help us understand how the service is used\");\n\tif (config.cookies.marketing) enabled.push(\"Marketing cookies — used to deliver relevant advertisements\");\n\tif (enabled.length === 0) return section(\"cookies\", [heading(\"Cookies and Tracking\"), p([\"We do not use cookies or similar tracking technologies.\"])]);\n\treturn section(\"cookies\", [\n\t\theading(\"Cookies and Tracking\"),\n\t\tp([\"We use the following types of cookies and tracking technologies:\"]),\n\t\tul(enabled.map((e) => li([e])))\n\t]);\n}\nfunction buildThirdParties(config) {\n\tif (config.thirdParties.length === 0) return section(\"third-parties\", [heading(\"Third-Party Services\"), p([\"We do not share your personal information with third parties except as required by law.\"])]);\n\treturn section(\"third-parties\", [\n\t\theading(\"Third-Party Services\"),\n\t\tp([\"We share data with the following third-party services:\"]),\n\t\tul(config.thirdParties.map((t) => li([\n\t\t\tbold(t.name),\n\t\t\t\" — \",\n\t\t\tt.purpose\n\t\t])))\n\t]);\n}\nfunction buildUserRights(config) {\n\tconst items = config.userRights.map((right) => {\n\t\treturn li([RIGHTS_LABELS[right] ?? right]);\n\t});\n\treturn section(\"user-rights\", [\n\t\theading(\"Your Rights\"),\n\t\tp([\"You have the following rights regarding your personal data:\"]),\n\t\tul(items)\n\t]);\n}\nfunction buildGdprSupplement(config) {\n\tif (!config.jurisdictions.includes(\"eu\")) return null;\n\treturn section(\"gdpr-supplement\", [\n\t\theading(\"GDPR Supplemental Disclosures\", { reason: \"Required by GDPR Article 13\" }),\n\t\tp([\"This section applies to individuals in the European Economic Area (EEA) under the General Data Protection Regulation (GDPR).\"]),\n\t\tp([\n\t\t\t\"Data Controller: \",\n\t\t\tbold(config.company.legalName),\n\t\t\t`, ${config.company.address}`\n\t\t]),\n\t\tp([\"In addition to the rights listed above, you have the right to lodge a complaint with your local data protection authority if you believe we have not handled your data in accordance with applicable law.\"]),\n\t\tp([\"If we transfer your personal data outside the EEA, we ensure adequate safeguards are in place in accordance with GDPR requirements.\"])\n\t]);\n}\nfunction buildCcpaSupplement(config) {\n\tif (!config.jurisdictions.includes(\"ca\")) return null;\n\treturn section(\"ccpa-supplement\", [\n\t\theading(\"California Privacy Rights (CCPA)\", { reason: \"Required by CCPA\" }),\n\t\tp([\"If you are a California resident, you have the following additional rights:\"]),\n\t\tul([\n\t\t\tli([\"Right to Know — You may request disclosure of the personal information we collect, use, and share about you.\"]),\n\t\t\tli([\"Right to Delete — You may request deletion of personal information we have collected about you.\"]),\n\t\t\tli([\"Right to Opt-Out — You may opt out of the sale of your personal information.\"]),\n\t\t\tli([\"Right to Non-Discrimination — We will not discriminate against you for exercising your CCPA rights.\"])\n\t\t])\n\t]);\n}\nfunction buildContact$1(config) {\n\treturn section(\"contact\", [\n\t\theading(\"Contact Us\"),\n\t\tp([\"Contact us:\"]),\n\t\tul([\n\t\t\tli([\n\t\t\t\tbold(\"Legal Name:\"),\n\t\t\t\t\" \",\n\t\t\t\tconfig.company.legalName\n\t\t\t]),\n\t\t\tli([\n\t\t\t\tbold(\"Address:\"),\n\t\t\t\t\" \",\n\t\t\t\tconfig.company.address\n\t\t\t]),\n\t\t\tli([\n\t\t\t\tbold(\"Email:\"),\n\t\t\t\t\" \",\n\t\t\t\tconfig.company.contact\n\t\t\t])\n\t\t])\n\t]);\n}\nconst SECTION_BUILDERS$1 = [\n\tbuildIntroduction$1,\n\tbuildChildrenPrivacy,\n\tbuildDataCollected,\n\tbuildLegalBasis,\n\tbuildDataRetention,\n\tbuildCookies,\n\tbuildThirdParties,\n\tbuildUserRights,\n\tbuildGdprSupplement,\n\tbuildCcpaSupplement,\n\tbuildContact$1\n];\nfunction compilePrivacyDocument(config) {\n\treturn SECTION_BUILDERS$1.map((builder) => builder(config)).filter((s) => s !== null);\n}\n//#endregion\n//#region src/documents/terms.ts\nfunction buildIntroduction(config) {\n\treturn section(\"tos-introduction\", [heading(\"Terms of Service\"), p([`These Terms of Service (\"Terms\") govern your use of services provided by ${config.company.name} (\"we\", \"us\", or \"our\"). By using our services, you agree to these Terms. Effective Date: ${config.effectiveDate}.`])]);\n}\nfunction buildAcceptance(config) {\n\treturn section(\"tos-acceptance\", [\n\t\theading(\"Acceptance of Terms\"),\n\t\tp([\"You accept these Terms by:\"]),\n\t\tul(config.acceptance.methods.map((m) => li([m])))\n\t]);\n}\nfunction buildEligibility(config) {\n\tif (!config.eligibility) return null;\n\tconst { minimumAge, jurisdictionRestrictions } = config.eligibility;\n\treturn section(\"tos-eligibility\", [\n\t\theading(\"Eligibility\"),\n\t\tp([`You must be at least ${minimumAge} years old to use our services. By using the services, you represent that you meet this age requirement.`]),\n\t\t...jurisdictionRestrictions && jurisdictionRestrictions.length > 0 ? [p([\"Our services are not available in the following jurisdictions:\"]), ul(jurisdictionRestrictions.map((j) => li([j])))] : []\n\t]);\n}\nfunction buildAccounts(config) {\n\tif (!config.accounts) return null;\n\tconst { registrationRequired, userResponsibleForCredentials, companyCanTerminate } = config.accounts;\n\tconst items = [];\n\tif (registrationRequired) items.push(\"Registration is required to access certain features of our services.\");\n\tif (userResponsibleForCredentials) items.push(\"You are responsible for maintaining the confidentiality of your account credentials and for all activity under your account.\");\n\tif (companyCanTerminate) items.push(\"We reserve the right to terminate or suspend accounts at our discretion.\");\n\treturn section(\"tos-accounts\", [heading(\"Accounts\"), ul(items.map((i) => li([i])))]);\n}\nfunction buildProhibitedUses(config) {\n\tif (!config.prohibitedUses || config.prohibitedUses.length === 0) return null;\n\treturn section(\"tos-prohibited-uses\", [\n\t\theading(\"Prohibited Uses\"),\n\t\tp([\"You may not use our services for the following purposes:\"]),\n\t\tul(config.prohibitedUses.map((u) => li([u])))\n\t]);\n}\nfunction buildUserContent(config) {\n\tif (!config.userContent) return null;\n\tconst { usersOwnContent, licenseGrantedToCompany, licenseDescription, companyCanRemoveContent } = config.userContent;\n\tconst items = [];\n\tif (usersOwnContent) items.push(\"You retain ownership of content you submit to our services.\");\n\tif (licenseGrantedToCompany) items.push(licenseDescription ?? \"By submitting content, you grant us a license to use, reproduce, and display that content in connection with our services.\");\n\tif (companyCanRemoveContent) items.push(\"We reserve the right to remove content that violates these Terms or that we find objectionable.\");\n\treturn section(\"tos-user-content\", [heading(\"User Content\"), ul(items.map((i) => li([i])))]);\n}\nfunction buildIntellectualProperty(config) {\n\tif (!config.intellectualProperty) return null;\n\tconst { companyOwnsService, usersMayNotCopy } = config.intellectualProperty;\n\tconst items = [];\n\tif (companyOwnsService) items.push(`All content, features, and functionality of our services are owned by ${config.company.name} and are protected by intellectual property laws.`);\n\tif (usersMayNotCopy) items.push(\"You may not copy, modify, distribute, sell, or lease any part of our services without our express written permission.\");\n\treturn section(\"tos-intellectual-property\", [heading(\"Intellectual Property\"), ul(items.map((i) => li([i])))]);\n}\nfunction buildPayments(config) {\n\tif (!config.payments) return null;\n\tconst { hasPaidFeatures, refundPolicy, priceChangesNotice } = config.payments;\n\tconst items = [];\n\tif (hasPaidFeatures) items.push(\"Some features of our services require payment.\");\n\tif (refundPolicy) items.push(refundPolicy);\n\tif (priceChangesNotice) items.push(priceChangesNotice);\n\tif (items.length === 0) return null;\n\treturn section(\"tos-payments\", [heading(\"Payments\"), ul(items.map((i) => li([i])))]);\n}\nfunction buildAvailability(config) {\n\tif (!config.availability) return null;\n\tconst { noUptimeGuarantee, maintenanceWindows } = config.availability;\n\tconst items = [];\n\tif (noUptimeGuarantee) items.push(\"We do not guarantee uninterrupted or error-free access to our services.\");\n\tif (maintenanceWindows) items.push(maintenanceWindows);\n\treturn section(\"tos-availability\", [heading(\"Service Availability\"), ul(items.map((i) => li([i])))]);\n}\nfunction buildTermination(config) {\n\tif (!config.termination) return null;\n\tconst { companyCanTerminate, userCanTerminate, effectOfTermination } = config.termination;\n\tconst items = [];\n\tif (companyCanTerminate) items.push(\"We may terminate or suspend your access to our services at any time, with or without cause or notice.\");\n\tif (userCanTerminate) items.push(\"You may terminate your use of our services at any time.\");\n\tif (effectOfTermination) items.push(effectOfTermination);\n\treturn section(\"tos-termination\", [heading(\"Termination\"), ul(items.map((i) => li([i])))]);\n}\nfunction buildDisclaimers(config) {\n\tif (!config.disclaimers) return null;\n\tconst { serviceProvidedAsIs, noWarranties } = config.disclaimers;\n\tconst items = [];\n\tif (serviceProvidedAsIs) items.push(\"Our services are provided on an \\\"as is\\\" and \\\"as available\\\" basis.\");\n\tif (noWarranties) items.push(\"We make no warranties, express or implied, regarding the reliability, accuracy, or fitness for a particular purpose of our services.\");\n\treturn section(\"tos-disclaimers\", [heading(\"Disclaimers\"), ul(items.map((i) => li([i])))]);\n}\nfunction buildLimitationOfLiability(config) {\n\tif (!config.limitationOfLiability) return null;\n\tconst { excludesIndirectDamages, liabilityCap } = config.limitationOfLiability;\n\tconst items = [];\n\tif (excludesIndirectDamages) items.push(\"To the fullest extent permitted by law, we shall not be liable for any indirect, incidental, special, or consequential damages.\");\n\tif (liabilityCap) items.push(liabilityCap);\n\treturn section(\"tos-limitation-of-liability\", [heading(\"Limitation of Liability\"), ul(items.map((i) => li([i])))]);\n}\nfunction buildIndemnification(config) {\n\tif (!config.indemnification) return null;\n\tconst { userIndemnifiesCompany, scope } = config.indemnification;\n\tif (!userIndemnifiesCompany) return null;\n\treturn section(\"tos-indemnification\", [heading(\"Indemnification\"), p([scope ?? `You agree to indemnify and hold harmless ${config.company.name} and its officers, directors, employees, and agents from any claims arising out of your use of the services or violation of these Terms.`])]);\n}\nfunction buildThirdPartyServices(config) {\n\tif (!config.thirdPartyServices || config.thirdPartyServices.length === 0) return null;\n\treturn section(\"tos-third-party-services\", [\n\t\theading(\"Third-Party Services\"),\n\t\tp([\"Our services may integrate with or link to third-party services:\"]),\n\t\tul(config.thirdPartyServices.map((t) => li([\n\t\t\tbold(t.name),\n\t\t\t\" — \",\n\t\t\tt.purpose\n\t\t])))\n\t]);\n}\nfunction buildDisputeResolution(config) {\n\tif (!config.disputeResolution) return null;\n\tconst { method, venue, classActionWaiver } = config.disputeResolution;\n\tconst items = [];\n\tconst methodLabel = method === \"arbitration\" ? \"binding arbitration\" : method === \"mediation\" ? \"mediation\" : \"litigation\";\n\titems.push(`Any disputes arising from these Terms or your use of our services shall be resolved through ${methodLabel}.`);\n\tif (venue) items.push(`Venue: ${venue}.`);\n\tif (classActionWaiver) items.push(\"You waive any right to participate in class action lawsuits or class-wide arbitration.\");\n\treturn section(\"tos-dispute-resolution\", [heading(\"Dispute Resolution\"), ul(items.map((i) => li([i])))]);\n}\nfunction buildGoverningLaw(config) {\n\treturn section(\"tos-governing-law\", [heading(\"Governing Law\"), p([`These Terms are governed by the laws of ${config.governingLaw.jurisdiction}, without regard to conflict of law principles.`])]);\n}\nfunction buildChanges(config) {\n\tif (!config.changesPolicy) return null;\n\tconst { noticeMethod, noticePeriodDays } = config.changesPolicy;\n\tconst notice = noticePeriodDays ? `at least ${noticePeriodDays} days' notice via ${noticeMethod}` : `notice via ${noticeMethod}`;\n\treturn section(\"tos-changes\", [heading(\"Changes to These Terms\"), p([`We may update these Terms from time to time. We will provide ${notice} before changes take effect. Continued use of our services after changes constitutes acceptance of the revised Terms.`])]);\n}\nfunction buildContact(config) {\n\treturn section(\"tos-contact\", [\n\t\theading(\"Contact Us\"),\n\t\tp([\"If you have questions about these Terms, please contact us:\"]),\n\t\tul([\n\t\t\tli([\n\t\t\t\tbold(\"Legal Name:\"),\n\t\t\t\t\" \",\n\t\t\t\tconfig.company.legalName\n\t\t\t]),\n\t\t\tli([\n\t\t\t\tbold(\"Address:\"),\n\t\t\t\t\" \",\n\t\t\t\tconfig.company.address\n\t\t\t]),\n\t\t\tli([\n\t\t\t\tbold(\"Email:\"),\n\t\t\t\t\" \",\n\t\t\t\tconfig.company.contact\n\t\t\t])\n\t\t])\n\t]);\n}\nconst SECTION_BUILDERS = [\n\tbuildIntroduction,\n\tbuildAcceptance,\n\tbuildEligibility,\n\tbuildAccounts,\n\tbuildProhibitedUses,\n\tbuildUserContent,\n\tbuildIntellectualProperty,\n\tbuildPayments,\n\tbuildAvailability,\n\tbuildTermination,\n\tbuildDisclaimers,\n\tbuildLimitationOfLiability,\n\tbuildIndemnification,\n\tbuildThirdPartyServices,\n\tbuildDisputeResolution,\n\tbuildGoverningLaw,\n\tbuildChanges,\n\tbuildContact\n];\nfunction compileTermsDocument(config) {\n\treturn SECTION_BUILDERS.map((builder) => builder(config)).filter((s) => s !== null);\n}\n//#endregion\n//#region src/documents/index.ts\nfunction compile(input) {\n\tif (input.type === \"privacy\") {\n\t\tconst { type: _, ...config } = input;\n\t\treturn {\n\t\t\ttype: \"document\",\n\t\t\tpolicyType: \"privacy\",\n\t\t\tsections: compilePrivacyDocument(config)\n\t\t};\n\t}\n\tif (input.type === \"terms\") {\n\t\tconst { type: _, ...config } = input;\n\t\treturn {\n\t\t\ttype: \"document\",\n\t\t\tpolicyType: \"terms\",\n\t\t\tsections: compileTermsDocument(config)\n\t\t};\n\t}\n\tconst { type: _, ...config } = input;\n\treturn {\n\t\ttype: \"document\",\n\t\tpolicyType: \"cookie\",\n\t\tsections: compileCookieDocument(config)\n\t};\n}\n//#endregion\n//#region src/types.ts\nfunction isOpenPolicyConfig(value) {\n\tif (value === null || typeof value !== \"object\") return false;\n\tconst obj = value;\n\treturn \"company\" in obj && !(\"effectiveDate\" in obj) && (\"privacy\" in obj || \"terms\" in obj || \"cookie\" in obj);\n}\n//#endregion\n//#region src/validate.ts\nfunction validatePrivacyPolicy(config) {\n\tconst issues = [];\n\tif (!config.effectiveDate) issues.push({\n\t\tlevel: \"error\",\n\t\tmessage: \"effectiveDate is required\"\n\t});\n\tif (!config.company.name) issues.push({\n\t\tlevel: \"error\",\n\t\tmessage: \"company.name is required\"\n\t});\n\tif (!config.company.legalName) issues.push({\n\t\tlevel: \"error\",\n\t\tmessage: \"company.legalName is required\"\n\t});\n\tif (!config.company.address) issues.push({\n\t\tlevel: \"error\",\n\t\tmessage: \"company.address is required\"\n\t});\n\tif (!config.company.contact) issues.push({\n\t\tlevel: \"error\",\n\t\tmessage: \"company.contact is required\"\n\t});\n\tif (Object.keys(config.dataCollected).length === 0) issues.push({\n\t\tlevel: \"error\",\n\t\tmessage: \"dataCollected must have at least one entry\"\n\t});\n\tif (config.userRights.length === 0) issues.push({\n\t\tlevel: \"warning\",\n\t\tmessage: \"userRights is empty — consider listing applicable rights\"\n\t});\n\tif (config.jurisdictions.includes(\"eu\")) {\n\t\tif (!config.legalBasis) issues.push({\n\t\t\tlevel: \"error\",\n\t\t\tmessage: \"GDPR requires a legalBasis\"\n\t\t});\n\t\tfor (const right of [\n\t\t\t\"access\",\n\t\t\t\"rectification\",\n\t\t\t\"erasure\",\n\t\t\t\"portability\",\n\t\t\t\"restriction\",\n\t\t\t\"objection\"\n\t\t]) if (!config.userRights.includes(right)) issues.push({\n\t\t\tlevel: \"warning\",\n\t\t\tmessage: `GDPR recommends including the \"${right}\" right`\n\t\t});\n\t}\n\tif (config.jurisdictions.includes(\"ca\")) {\n\t\tfor (const right of [\n\t\t\t\"access\",\n\t\t\t\"erasure\",\n\t\t\t\"opt_out_sale\",\n\t\t\t\"non_discrimination\"\n\t\t]) if (!config.userRights.includes(right)) issues.push({\n\t\t\tlevel: \"warning\",\n\t\t\tmessage: `CCPA recommends including the \"${right}\" right`\n\t\t});\n\t}\n\tif (config.children) {\n\t\tif (config.children.underAge <= 0) issues.push({\n\t\t\tlevel: \"error\",\n\t\t\tmessage: \"children.underAge must be a positive number\"\n\t\t});\n\t}\n\treturn issues;\n}\n//#endregion\n//#region src/validate-cookie.ts\nfunction validateCookiePolicy(config) {\n\tconst issues = [];\n\tif (!config.effectiveDate) issues.push({\n\t\tlevel: \"error\",\n\t\tmessage: \"effectiveDate is required\"\n\t});\n\tif (!config.company.name) issues.push({\n\t\tlevel: \"error\",\n\t\tmessage: \"company.name is required\"\n\t});\n\tif (!config.company.legalName) issues.push({\n\t\tlevel: \"error\",\n\t\tmessage: \"company.legalName is required\"\n\t});\n\tif (!config.company.address) issues.push({\n\t\tlevel: \"error\",\n\t\tmessage: \"company.address is required\"\n\t});\n\tif (!config.company.contact) issues.push({\n\t\tlevel: \"error\",\n\t\tmessage: \"company.contact is required\"\n\t});\n\tconst { essential, analytics, functional, marketing } = config.cookies;\n\tif (!essential && !analytics && !functional && !marketing) issues.push({\n\t\tlevel: \"error\",\n\t\tmessage: \"At least one cookie type must be enabled (essential, analytics, functional, or marketing)\"\n\t});\n\tif (!config.consentMechanism) issues.push({\n\t\tlevel: \"warning\",\n\t\tmessage: \"consentMechanism is not provided — consider describing how users can manage cookie consent\"\n\t});\n\tif (config.jurisdictions.includes(\"eu\") && config.consentMechanism && !config.consentMechanism.canWithdraw) issues.push({\n\t\tlevel: \"warning\",\n\t\tmessage: \"GDPR requires that users can withdraw cookie consent — consider setting consentMechanism.canWithdraw to true\"\n\t});\n\treturn issues;\n}\n//#endregion\n//#region src/validate-terms.ts\nfunction validateTermsOfService(config) {\n\tconst issues = [];\n\tif (!config.effectiveDate) issues.push({\n\t\tlevel: \"error\",\n\t\tmessage: \"effectiveDate is required\"\n\t});\n\tif (!config.company.name) issues.push({\n\t\tlevel: \"error\",\n\t\tmessage: \"company.name is required\"\n\t});\n\tif (!config.company.legalName) issues.push({\n\t\tlevel: \"error\",\n\t\tmessage: \"company.legalName is required\"\n\t});\n\tif (!config.company.address) issues.push({\n\t\tlevel: \"error\",\n\t\tmessage: \"company.address is required\"\n\t});\n\tif (!config.company.contact) issues.push({\n\t\tlevel: \"error\",\n\t\tmessage: \"company.contact is required\"\n\t});\n\tif (!config.governingLaw.jurisdiction) issues.push({\n\t\tlevel: \"error\",\n\t\tmessage: \"governingLaw.jurisdiction is required\"\n\t});\n\tif (!config.disclaimers) issues.push({\n\t\tlevel: \"warning\",\n\t\tmessage: \"disclaimers is missing — consider adding a disclaimer of warranties\"\n\t});\n\tif (!config.limitationOfLiability) issues.push({\n\t\tlevel: \"warning\",\n\t\tmessage: \"limitationOfLiability is missing — consider adding a limitation of liability clause\"\n\t});\n\tif (config.acceptance.methods.length === 0) issues.push({\n\t\tlevel: \"warning\",\n\t\tmessage: \"acceptance.methods is empty — consider listing how users accept these Terms\"\n\t});\n\treturn issues;\n}\n//#endregion\n//#region src/index.ts\nfunction expandOpenPolicyConfig(config) {\n\tconst inputs = [];\n\tif (config.privacy) inputs.push({\n\t\ttype: \"privacy\",\n\t\tcompany: config.company,\n\t\t...config.privacy\n\t});\n\tif (config.terms) inputs.push({\n\t\ttype: \"terms\",\n\t\tcompany: config.company,\n\t\t...config.terms\n\t});\n\tif (config.cookie) inputs.push({\n\t\ttype: \"cookie\",\n\t\tcompany: config.company,\n\t\t...config.cookie\n\t});\n\treturn inputs;\n}\n//#endregion\nexport { acceptAll, bold, compile, expandOpenPolicyConfig, heading, isOpenPolicyConfig, italic, li, link, ol, p, rejectAll, section, text, ul, validateCookiePolicy, validatePrivacyPolicy, validateTermsOfService };\n\n//# sourceMappingURL=index.js.map","import type { CookieConsentStatus } from \"@openpolicy/core\";\nimport { useEffect, useRef, useState } from \"react\";\n\nexport function useShouldShowCookieBanner(\n\tstatus: CookieConsentStatus,\n\tshouldShow?: () => Promise<boolean>,\n): boolean {\n\tconst [visible, setVisible] = useState(false);\n\tconst shouldShowRef = useRef(shouldShow);\n\n\tuseEffect(() => {\n\t\tif (status !== \"undecided\") {\n\t\t\tsetVisible(false);\n\t\t\treturn;\n\t\t}\n\t\tlet cancelled = false;\n\t\tconst check = shouldShowRef.current ?? (() => Promise.resolve(true));\n\t\tcheck().then((show) => {\n\t\t\tif (!cancelled) setVisible(show);\n\t\t});\n\t\treturn () => {\n\t\t\tcancelled = true;\n\t\t};\n\t}, [status]);\n\n\treturn visible;\n}\n","export const defaultStyles = `\n.op-policy {\n --op-font-family: system-ui, -apple-system, BlinkMacSystemFont, \"Segoe UI\", sans-serif;\n --op-font-size-body: 1rem;\n --op-font-size-heading: 1.125rem;\n --op-font-weight-heading: 600;\n --op-line-height: 1.7;\n --op-body-color: #374151;\n --op-heading-color: #111827;\n --op-link-color: #2563eb;\n --op-link-color-hover: #1d4ed8;\n --op-section-gap: 2rem;\n --op-border-color: #e5e7eb;\n --op-border-radius: 0.375rem;\n\n font-family: var(--op-font-family);\n font-size: var(--op-font-size-body);\n color: var(--op-body-color);\n line-height: var(--op-line-height);\n max-width: 65ch;\n}\n\n.op-section {\n margin-bottom: var(--op-section-gap);\n padding-bottom: var(--op-section-gap);\n border-bottom: 1px solid var(--op-border-color);\n}\n.op-section:last-child {\n border-bottom: none;\n margin-bottom: 0;\n padding-bottom: 0;\n}\n\n.op-heading {\n font-size: var(--op-font-size-heading);\n font-weight: var(--op-font-weight-heading);\n color: var(--op-heading-color);\n line-height: 1.3;\n margin: 0 0 0.75rem;\n}\n\n.op-paragraph {\n margin: 0 0 0.75rem;\n}\n.op-paragraph:last-child { margin-bottom: 0; }\n\n.op-list {\n margin: 0 0 0.75rem;\n padding-left: 1.5rem;\n list-style-type: disc;\n}\n.op-list:last-child { margin-bottom: 0; }\n.op-list .op-list {\n margin-top: 0.375rem;\n margin-bottom: 0;\n list-style-type: circle;\n}\n\n.op-list-item {\n margin-bottom: 0.375rem;\n}\n.op-list-item:last-child { margin-bottom: 0; }\n\n.op-bold {\n font-weight: 600;\n color: var(--op-heading-color);\n}\n\n.op-link {\n color: var(--op-link-color);\n text-decoration: underline;\n text-underline-offset: 2px;\n transition: color 0.15s ease;\n}\n.op-link:hover { color: var(--op-link-color-hover); }\n`;\n","import {\n\tacceptAll,\n\ttype CookieConsent,\n\ttype CookieConsentStatus,\n\ttype CookiePolicyConfig,\n\tisOpenPolicyConfig,\n\ttype OpenPolicyConfig,\n\trejectAll,\n} from \"@openpolicy/core\";\nimport {\n\tcreateContext,\n\ttype ReactNode,\n\tuseCallback,\n\tuseContext,\n\tuseEffect,\n\tuseMemo,\n\tuseState,\n\tuseSyncExternalStore,\n} from \"react\";\nimport { useShouldShowCookieBanner } from \"./hooks/useShouldShowCookieBanner\";\nimport { defaultStyles } from \"./styles\";\n\n// ─── Types ────────────────────────────────────────────────────────────────────\n\nexport type CookieRoute = \"cookie\" | \"preferences\" | \"closed\";\n\nexport type CookieCategory = {\n\tkey: string;\n\tlabel: string;\n\tenabled: boolean;\n\tlocked: boolean;\n};\n\nexport type HasExpression =\n\t| string\n\t| { and: HasExpression[] }\n\t| { or: HasExpression[] }\n\t| { not: HasExpression };\n\n// ─── localStorage helpers ─────────────────────────────────────────────────────\n\nconst LS_KEY = \"op_consent\";\n\nfunction getConsentFromStorage(): CookieConsent | null {\n\ttry {\n\t\tconst raw = localStorage.getItem(LS_KEY);\n\t\tif (!raw) return null;\n\t\treturn JSON.parse(raw) as CookieConsent;\n\t} catch {\n\t\treturn null;\n\t}\n}\n\nfunction setConsentToStorage(consent: CookieConsent): void {\n\tconst value: CookieConsent = { ...consent, essential: true };\n\tlocalStorage.setItem(LS_KEY, JSON.stringify(value));\n}\n\nfunction clearConsentFromStorage(): void {\n\tlocalStorage.removeItem(LS_KEY);\n}\n\n// ─── Config resolution ────────────────────────────────────────────────────────\n\nexport function resolveCookieConfig(\n\traw: OpenPolicyConfig | CookiePolicyConfig | null | undefined,\n): CookiePolicyConfig | undefined {\n\tif (!raw) return undefined;\n\tif (isOpenPolicyConfig(raw) && raw.cookie)\n\t\treturn { ...raw.cookie, company: raw.company } as CookiePolicyConfig;\n\tif (!isOpenPolicyConfig(raw)) return raw as CookiePolicyConfig;\n\treturn undefined;\n}\n\nconst CATEGORY_LABELS: Record<string, string> = {\n\tessential: \"Essential\",\n\tanalytics: \"Analytics\",\n\tfunctional: \"Functional\",\n\tmarketing: \"Marketing\",\n};\n\n// ─── Pure helpers (exported for tests) ───────────────────────────────────────\n\nexport function acceptAllForConfig(config: CookiePolicyConfig): CookieConsent {\n\tconst consent = acceptAll(config);\n\tsetConsentToStorage(consent);\n\treturn consent;\n}\n\nexport function rejectAllForConfig(config?: CookiePolicyConfig): CookieConsent {\n\tconst consent = rejectAll(config);\n\tsetConsentToStorage(consent);\n\treturn consent;\n}\n\nexport function updateConsent(partial: Partial<CookieConsent>): CookieConsent {\n\tconst current = getConsentFromStorage() ?? { essential: true };\n\tconst next: CookieConsent = { ...current, ...partial, essential: true };\n\tsetConsentToStorage(next);\n\treturn next;\n}\n\nexport function evalHas(\n\tconsent: CookieConsent | null,\n\texpr: HasExpression,\n): boolean {\n\tif (!consent) return false;\n\tif (typeof expr === \"string\") return Boolean(consent[expr]);\n\tif (\"and\" in expr) return expr.and.every((child) => evalHas(consent, child));\n\tif (\"or\" in expr) return expr.or.some((child) => evalHas(consent, child));\n\tif (\"not\" in expr) return !evalHas(consent, expr.not);\n\treturn false;\n}\n\n// ─── Cookie store ─────────────────────────────────────────────────────────────\n\ntype Listener = () => void;\nconst listeners = new Set<Listener>();\n\nfunction subscribe(listener: Listener): () => void {\n\tlisteners.add(listener);\n\treturn () => listeners.delete(listener);\n}\n\nfunction notifyListeners(): void {\n\tfor (const l of listeners) l();\n}\n\nlet cachedRaw = \"\";\nlet cachedValue: CookieConsent | null = null;\n\nexport function getSnapshotCached(): CookieConsent | null {\n\tconst rawStr = localStorage.getItem(LS_KEY) ?? \"\";\n\tif (rawStr === cachedRaw) return cachedValue;\n\tcachedRaw = rawStr;\n\tcachedValue = getConsentFromStorage();\n\treturn cachedValue;\n}\n\nfunction getServerSnapshot(): CookieConsent | null {\n\treturn null;\n}\n\n// ─── Context ──────────────────────────────────────────────────────────────────\n\ntype OpenPolicyContextValue = {\n\tconfig: OpenPolicyConfig | null;\n\tcookieConfig: CookiePolicyConfig | null;\n\troute: CookieRoute;\n\tsetRoute: (route: CookieRoute) => void;\n\tstatus: CookieConsentStatus;\n\tconsent: CookieConsent | null;\n\taccept: () => void;\n\treject: () => void;\n\tupdate: (partial: Partial<CookieConsent>) => void;\n\treset: () => void;\n\thas: (expr: HasExpression) => boolean;\n\tcategories: CookieCategory[];\n\ttoggle: (key: string) => void;\n\tsave: (onSave?: (consent: CookieConsent) => void) => void;\n\trejectAll: () => void;\n};\n\nexport const OpenPolicyContext = createContext<OpenPolicyContextValue>({\n\tconfig: null,\n\tcookieConfig: null,\n\troute: \"closed\",\n\tsetRoute: () => {},\n\tstatus: \"undecided\",\n\tconsent: null,\n\taccept: () => {},\n\treject: () => {},\n\tupdate: () => {},\n\treset: () => {},\n\thas: () => false,\n\tcategories: [],\n\ttoggle: () => {},\n\tsave: () => {},\n\trejectAll: () => {},\n});\n\n// ─── Provider ─────────────────────────────────────────────────────────────────\n\ntype OpenPolicyProviderProps = {\n\tconfig: OpenPolicyConfig;\n\tshouldShow?: () => Promise<boolean>;\n\tchildren?: ReactNode;\n};\n\nexport function OpenPolicyProvider({\n\tconfig,\n\tshouldShow,\n\tchildren,\n}: OpenPolicyProviderProps) {\n\tconst cookieConfig = useMemo(\n\t\t() => resolveCookieConfig(config) ?? null,\n\t\t[config],\n\t);\n\n\tconst consent = useSyncExternalStore(\n\t\tsubscribe,\n\t\tgetSnapshotCached,\n\t\tgetServerSnapshot,\n\t);\n\n\tconst status: CookieConsentStatus = consent ? \"completed\" : \"undecided\";\n\n\t// Sync data attributes on document.body for CSS hooks\n\tuseEffect(() => {\n\t\tconst body = document.body;\n\t\tif (status) body.dataset.status = status;\n\t\tif (cookieConfig) {\n\t\t\tfor (const key of Object.keys(cookieConfig.cookies)) {\n\t\t\t\tconst value = consent ? (consent[key] ?? false) : false;\n\t\t\t\tbody.setAttribute(`data-consent-${key}`, String(Boolean(value)));\n\t\t\t}\n\t\t}\n\t\treturn () => {\n\t\t\tif (body.dataset.status === status) delete body.dataset.status;\n\t\t\tif (cookieConfig) {\n\t\t\t\tfor (const key of Object.keys(cookieConfig.cookies)) {\n\t\t\t\t\tbody.removeAttribute(`data-consent-${key}`);\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t}, [consent, cookieConfig, status]);\n\n\tconst has = useCallback(\n\t\t(expr: HasExpression) => evalHas(consent, expr),\n\t\t[consent],\n\t);\n\n\tconst visible = useShouldShowCookieBanner(status, shouldShow);\n\n\tconst [route, setRoute] = useState<CookieRoute>(\"closed\");\n\tconst [draft, setDraft] = useState<Partial<CookieConsent>>({});\n\n\tuseEffect(() => {\n\t\tif (visible) {\n\t\t\tsetRoute((prev) => (prev === \"closed\" ? \"cookie\" : prev));\n\t\t} else {\n\t\t\tsetRoute(\"closed\");\n\t\t}\n\t}, [visible]);\n\n\tconst rawAccept = useCallback(() => {\n\t\tif (!cookieConfig) return;\n\t\tacceptAllForConfig(cookieConfig);\n\t\tnotifyListeners();\n\t}, [cookieConfig]);\n\n\tconst rawReject = useCallback(() => {\n\t\trejectAllForConfig(cookieConfig ?? undefined);\n\t\tnotifyListeners();\n\t}, [cookieConfig]);\n\n\tconst update = useCallback((partial: Partial<CookieConsent>) => {\n\t\tupdateConsent(partial);\n\t\tnotifyListeners();\n\t}, []);\n\n\tconst reset = useCallback(() => {\n\t\tclearConsentFromStorage();\n\t\tnotifyListeners();\n\t}, []);\n\n\tconst accept = () => {\n\t\trawAccept();\n\t\tsetRoute(\"closed\");\n\t};\n\n\tconst reject = () => {\n\t\trawReject();\n\t\tsetRoute(\"closed\");\n\t};\n\n\tconst categories: CookieCategory[] = cookieConfig\n\t\t? Object.keys(cookieConfig.cookies)\n\t\t\t\t.filter(\n\t\t\t\t\t(key) =>\n\t\t\t\t\t\tcookieConfig.cookies[key as keyof typeof cookieConfig.cookies],\n\t\t\t\t)\n\t\t\t\t.map((key) => ({\n\t\t\t\t\tkey,\n\t\t\t\t\tlabel: CATEGORY_LABELS[String(key)] ?? String(key),\n\t\t\t\t\tenabled:\n\t\t\t\t\t\tkey === \"essential\"\n\t\t\t\t\t\t\t? true\n\t\t\t\t\t\t\t: (draft[key as keyof CookieConsent] ??\n\t\t\t\t\t\t\t\tconsent?.[key as keyof CookieConsent] ??\n\t\t\t\t\t\t\t\tfalse),\n\t\t\t\t\tlocked: key === \"essential\",\n\t\t\t\t}))\n\t\t: [];\n\n\tconst toggle = (key: string) => {\n\t\tif (key === \"essential\") return;\n\t\tsetDraft((prev) => ({\n\t\t\t...prev,\n\t\t\t[key]: !(\n\t\t\t\tprev[key as keyof CookieConsent] ??\n\t\t\t\tconsent?.[key as keyof CookieConsent] ??\n\t\t\t\tfalse\n\t\t\t),\n\t\t}));\n\t};\n\n\tconst save = (onSave?: (consent: CookieConsent) => void) => {\n\t\tconst next = {\n\t\t\t...(consent ?? {}),\n\t\t\t...draft,\n\t\t\tessential: true,\n\t\t} as CookieConsent;\n\t\tupdate(next);\n\t\tsetDraft({});\n\t\tonSave?.(next);\n\t\tsetRoute(\"closed\");\n\t};\n\n\tconst rejectAllCategories = () => {\n\t\tif (!cookieConfig) return;\n\t\tconst next: CookieConsent = { essential: true };\n\t\tfor (const key of Object.keys(cookieConfig.cookies)) {\n\t\t\tif (key !== \"essential\") (next as Record<string, boolean>)[key] = false;\n\t\t}\n\t\tupdate(next);\n\t\tsetDraft({});\n\t\tsetRoute(\"closed\");\n\t};\n\n\treturn (\n\t\t<>\n\t\t\t<style href=\"@openpolicy/react\" precedence=\"default\">\n\t\t\t\t{defaultStyles}\n\t\t\t</style>\n\t\t\t<OpenPolicyContext.Provider\n\t\t\t\tvalue={{\n\t\t\t\t\tconfig,\n\t\t\t\t\tcookieConfig,\n\t\t\t\t\troute,\n\t\t\t\t\tsetRoute,\n\t\t\t\t\tstatus,\n\t\t\t\t\tconsent,\n\t\t\t\t\taccept,\n\t\t\t\t\treject,\n\t\t\t\t\tupdate,\n\t\t\t\t\treset,\n\t\t\t\t\thas,\n\t\t\t\t\tcategories,\n\t\t\t\t\ttoggle,\n\t\t\t\t\tsave,\n\t\t\t\t\trejectAll: rejectAllCategories,\n\t\t\t\t}}\n\t\t\t>\n\t\t\t\t{children}\n\t\t\t</OpenPolicyContext.Provider>\n\t\t</>\n\t);\n}\n","import { useContext } from \"react\";\nimport type { CookieCategory, CookieRoute } from \"../context\";\nimport { OpenPolicyContext } from \"../context\";\n\nexport type { CookieCategory, CookieRoute };\n\nexport function useCookies() {\n\tconst {\n\t\troute,\n\t\tsetRoute,\n\t\tstatus,\n\t\tconsent,\n\t\taccept,\n\t\trejectAll,\n\t\tcategories,\n\t\ttoggle,\n\t\tsave,\n\t\treset,\n\t\thas,\n\t} = useContext(OpenPolicyContext);\n\n\treturn {\n\t\tstatus,\n\t\tconsent,\n\t\tcategories,\n\t\troute,\n\t\thas,\n\t\tacceptAll: accept,\n\t\tacceptNecessary: rejectAll,\n\t\ttoggle,\n\t\tsave,\n\t\treset,\n\t\tsetRoute,\n\t} as const;\n}\n","import type { ReactNode } from \"react\";\nimport type { HasExpression } from \"../context\";\nimport { useCookies } from \"../hooks/useCookies\";\n\ninterface ConsentGateProps {\n\trequires: HasExpression;\n\tfallback?: ReactNode;\n\tchildren: ReactNode;\n}\n\nexport function ConsentGate({\n\trequires,\n\tfallback = null,\n\tchildren,\n}: ConsentGateProps) {\n\tconst { has } = useCookies();\n\treturn has(requires) ? children : fallback;\n}\n","import type {\n\tBoldNode,\n\tDocumentSection,\n\tHeadingNode,\n\tItalicNode,\n\tLinkNode,\n\tNode,\n\tTextNode,\n} from \"@openpolicy/core\";\nimport type { ReactNode } from \"react\";\nimport type { PolicyComponents } from \"../types\";\n\nexport function DefaultHeading({ node }: { node: HeadingNode }) {\n\tconst level = node.level ?? 2;\n\tconst Tag = `h${level}` as \"h1\" | \"h2\" | \"h3\" | \"h4\" | \"h5\" | \"h6\";\n\treturn (\n\t\t<Tag data-op-heading className=\"op-heading\">\n\t\t\t{node.value}\n\t\t</Tag>\n\t);\n}\n\nexport function DefaultText({ node }: { node: TextNode }) {\n\treturn <>{node.value}</>;\n}\n\nexport function DefaultBold({ node }: { node: BoldNode }) {\n\treturn <strong className=\"op-bold\">{node.value}</strong>;\n}\n\nfunction DefaultItalic({ node }: { node: ItalicNode }) {\n\treturn <em className=\"op-italic\">{node.value}</em>;\n}\n\nexport function DefaultLink({ node }: { node: LinkNode }) {\n\treturn (\n\t\t<a href={node.href} className=\"op-link\">\n\t\t\t{node.value}\n\t\t</a>\n\t);\n}\n\nexport function DefaultSection({\n\tsection,\n\tchildren,\n}: {\n\tsection: DocumentSection;\n\tchildren: ReactNode;\n}) {\n\treturn (\n\t\t<section\n\t\t\tdata-op-section\n\t\t\tclassName=\"op-section\"\n\t\t\tid={section.id}\n\t\t\t{...(section.context?.reason && {\n\t\t\t\t\"data-op-reason\": section.context.reason,\n\t\t\t})}\n\t\t>\n\t\t\t{children}\n\t\t</section>\n\t);\n}\n\nexport function DefaultParagraph({\n\tnode: _node,\n\tchildren,\n}: {\n\tnode: import(\"@openpolicy/core\").ParagraphNode;\n\tchildren: ReactNode;\n}) {\n\treturn (\n\t\t<p data-op-paragraph className=\"op-paragraph\">\n\t\t\t{children}\n\t\t</p>\n\t);\n}\n\nexport function DefaultList({\n\tnode,\n\tchildren,\n}: {\n\tnode: import(\"@openpolicy/core\").ListNode;\n\tchildren: ReactNode;\n}) {\n\tconst Tag = node.ordered ? \"ol\" : \"ul\";\n\treturn (\n\t\t<Tag data-op-list className=\"op-list\">\n\t\t\t{children}\n\t\t</Tag>\n\t);\n}\n\nexport function renderNode(\n\tnode: Node,\n\tcomponents: PolicyComponents,\n\tkey?: number,\n): ReactNode {\n\tswitch (node.type) {\n\t\tcase \"document\":\n\t\t\treturn <>{node.sections.map((s, i) => renderNode(s, components, i))}</>;\n\n\t\tcase \"section\": {\n\t\t\tconst SectionComp = components.Section ?? DefaultSection;\n\t\t\treturn (\n\t\t\t\t<SectionComp key={key} section={node}>\n\t\t\t\t\t{node.content.map((n, i) => renderNode(n, components, i))}\n\t\t\t\t</SectionComp>\n\t\t\t);\n\t\t}\n\n\t\tcase \"heading\": {\n\t\t\tconst HeadingComp = components.Heading ?? DefaultHeading;\n\t\t\treturn <HeadingComp key={key} node={node} />;\n\t\t}\n\n\t\tcase \"paragraph\": {\n\t\t\tconst children = node.children.map((n, i) =>\n\t\t\t\trenderNode(n, components, i),\n\t\t\t);\n\t\t\tif (components.Paragraph)\n\t\t\t\treturn (\n\t\t\t\t\t<components.Paragraph key={key} node={node}>\n\t\t\t\t\t\t{children}\n\t\t\t\t\t</components.Paragraph>\n\t\t\t\t);\n\t\t\treturn (\n\t\t\t\t<p key={key} data-op-paragraph className=\"op-paragraph\">\n\t\t\t\t\t{children}\n\t\t\t\t</p>\n\t\t\t);\n\t\t}\n\n\t\tcase \"list\": {\n\t\t\tconst children = node.items.map((item, i) =>\n\t\t\t\trenderNode(item, components, i),\n\t\t\t);\n\t\t\tif (components.List)\n\t\t\t\treturn (\n\t\t\t\t\t<components.List key={key} node={node}>\n\t\t\t\t\t\t{children}\n\t\t\t\t\t</components.List>\n\t\t\t\t);\n\t\t\tconst ListTag = node.ordered ? \"ol\" : \"ul\";\n\t\t\treturn (\n\t\t\t\t<ListTag key={key} data-op-list className=\"op-list\">\n\t\t\t\t\t{children}\n\t\t\t\t</ListTag>\n\t\t\t);\n\t\t}\n\n\t\tcase \"listItem\":\n\t\t\treturn (\n\t\t\t\t<li key={key} data-op-list-item className=\"op-list-item\">\n\t\t\t\t\t{node.children.map((n, i) => renderNode(n, components, i))}\n\t\t\t\t</li>\n\t\t\t);\n\n\t\tcase \"text\": {\n\t\t\tconst Comp = components.Text ?? DefaultText;\n\t\t\treturn <Comp key={key} node={node} />;\n\t\t}\n\t\tcase \"bold\": {\n\t\t\tconst Comp = components.Bold ?? DefaultBold;\n\t\t\treturn <Comp key={key} node={node} />;\n\t\t}\n\t\tcase \"italic\": {\n\t\t\tconst Comp = components.Italic ?? DefaultItalic;\n\t\t\treturn <Comp key={key} node={node} />;\n\t\t}\n\t\tcase \"link\": {\n\t\t\tconst Comp = components.Link ?? DefaultLink;\n\t\t\treturn <Comp key={key} node={node} />;\n\t\t}\n\t}\n}\n","import type { Document } from \"@openpolicy/core\";\nimport type { ReactNode } from \"react\";\nimport { renderNode } from \"./components/defaults\";\nimport type { PolicyComponents } from \"./types\";\n\nexport function renderDocument(\n\tdoc: Document,\n\tcomponents: PolicyComponents = {},\n): ReactNode {\n\treturn renderNode(doc, components);\n}\n","import {\n\ttype CookiePolicyConfig,\n\tcompile,\n\texpandOpenPolicyConfig,\n\tisOpenPolicyConfig,\n\ttype OpenPolicyConfig,\n} from \"@openpolicy/core\";\nimport { type CSSProperties, useContext } from \"react\";\nimport { OpenPolicyContext } from \"../context\";\nimport { renderDocument } from \"../render\";\nimport type { PolicyComponents } from \"../types\";\n\ninterface CookiePolicyProps {\n\tconfig?: OpenPolicyConfig | CookiePolicyConfig;\n\tcomponents?: PolicyComponents;\n\tstyle?: CSSProperties;\n}\n\nexport function CookiePolicy({\n\tconfig: configProp,\n\tcomponents,\n\tstyle,\n}: CookiePolicyProps) {\n\tconst { config: contextConfig } = useContext(OpenPolicyContext);\n\tconst config = configProp ?? contextConfig ?? undefined;\n\tif (!config) return null;\n\tconst input = isOpenPolicyConfig(config)\n\t\t? expandOpenPolicyConfig(config).find((i) => i.type === \"cookie\")\n\t\t: { type: \"cookie\" as const, ...config };\n\tif (!input) return null;\n\tconst doc = compile(input);\n\treturn (\n\t\t<div data-op-policy className=\"op-policy\" style={style}>\n\t\t\t{renderDocument(doc, components)}\n\t\t</div>\n\t);\n}\n","import {\n\tcompile,\n\texpandOpenPolicyConfig,\n\tisOpenPolicyConfig,\n\ttype OpenPolicyConfig,\n\ttype PrivacyPolicyConfig,\n} from \"@openpolicy/core\";\nimport { type CSSProperties, useContext } from \"react\";\nimport { OpenPolicyContext } from \"../context\";\nimport { renderDocument } from \"../render\";\nimport type { PolicyComponents } from \"../types\";\n\ninterface PrivacyPolicyProps {\n\tconfig?: OpenPolicyConfig | PrivacyPolicyConfig;\n\tcomponents?: PolicyComponents;\n\tstyle?: CSSProperties;\n}\n\nexport function PrivacyPolicy({\n\tconfig: configProp,\n\tcomponents,\n\tstyle,\n}: PrivacyPolicyProps) {\n\tconst { config: contextConfig } = useContext(OpenPolicyContext);\n\tconst config = configProp ?? contextConfig ?? undefined;\n\tif (!config) return null;\n\tconst input = isOpenPolicyConfig(config)\n\t\t? expandOpenPolicyConfig(config).find((i) => i.type === \"privacy\")\n\t\t: { type: \"privacy\" as const, ...config };\n\tif (!input) return null;\n\tconst doc = compile(input);\n\treturn (\n\t\t<div data-op-policy className=\"op-policy\" style={style}>\n\t\t\t{renderDocument(doc, components)}\n\t\t</div>\n\t);\n}\n","import {\n\tcompile,\n\texpandOpenPolicyConfig,\n\tisOpenPolicyConfig,\n\ttype OpenPolicyConfig,\n\ttype TermsOfServiceConfig,\n} from \"@openpolicy/core\";\nimport { type CSSProperties, useContext } from \"react\";\nimport { OpenPolicyContext } from \"../context\";\nimport { renderDocument } from \"../render\";\nimport type { PolicyComponents } from \"../types\";\n\ninterface TermsOfServiceProps {\n\tconfig?: OpenPolicyConfig | TermsOfServiceConfig;\n\tcomponents?: PolicyComponents;\n\tstyle?: CSSProperties;\n}\n\nexport function TermsOfService({\n\tconfig: configProp,\n\tcomponents,\n\tstyle,\n}: TermsOfServiceProps) {\n\tconst { config: contextConfig } = useContext(OpenPolicyContext);\n\tconst config = configProp ?? contextConfig ?? undefined;\n\tif (!config) return null;\n\tconst input = isOpenPolicyConfig(config)\n\t\t? expandOpenPolicyConfig(config).find((i) => i.type === \"terms\")\n\t\t: { type: \"terms\" as const, ...config };\n\tif (!input) return null;\n\tconst doc = compile(input);\n\treturn (\n\t\t<div data-op-policy className=\"op-policy\" style={style}>\n\t\t\t{renderDocument(doc, components)}\n\t\t</div>\n\t);\n}\n"],"mappings":";;;AACA,SAAS,UAAU,QAAQ;CAC1B,MAAM,UAAU,EAAE,WAAW,MAAM;AACnC,MAAK,MAAM,CAAC,KAAK,UAAU,OAAO,QAAQ,OAAO,QAAQ,EAAE;AAC1D,MAAI,QAAQ,YAAa;AACzB,UAAQ,OAAO,QAAQ,MAAM;;AAE9B,QAAO;;AAER,SAAS,UAAU,QAAQ;CAC1B,MAAM,UAAU,EAAE,WAAW,MAAM;AACnC,KAAI,OAAQ,MAAK,MAAM,OAAO,OAAO,KAAK,OAAO,QAAQ,EAAE;AAC1D,MAAI,QAAQ,YAAa;AACzB,UAAQ,OAAO;;AAEhB,QAAO;;AAIR,MAAM,WAAW,OAAO,gBAAgB,YAAY;CACnD,MAAM,QAAQ,OAAO,mBAAmB,WAAW,iBAAiB,KAAK;CACzE,MAAM,MAAM,OAAO,mBAAmB,WAAW,iBAAiB;AAClE,QAAO;EACN,MAAM;EACN,GAAG,UAAU,KAAK,KAAK,EAAE,OAAO;EAChC;EACA,GAAG,OAAO,EAAE,SAAS,KAAK;EAC1B;;AAEF,MAAM,QAAQ,OAAO,aAAa;CACjC,MAAM;CACN;CACA,GAAG,WAAW,EAAE,SAAS;CACzB;AACD,MAAM,QAAQ,OAAO,aAAa;CACjC,MAAM;CACN;CACA,GAAG,WAAW,EAAE,SAAS;CACzB;AAMD,MAAM,QAAQ,MAAM,OAAO,aAAa;CACvC,MAAM;CACN;CACA;CACA,GAAG,WAAW,EAAE,SAAS;CACzB;AACD,MAAM,KAAK,UAAU,aAAa;CACj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M;EAAmB,GAAG;EAAQ;AACzC,KAAI,CAAC,MAAO,QAAO;CACnB,MAAM,MAAM,QAAQ,MAAM;AAC1B,QACC,oBAAC,OAAD;EAAK,kBAAA;EAAe,WAAU;EAAmB;YAC/C,eAAe,KAAK,WAAW;EAC3B,CAAA;;;;AChBR,SAAgB,cAAc,EAC7B,QAAQ,YACR,YACA,SACsB;CACtB,MAAM,EAAE,QAAQ,kBAAkB,WAAW,kBAAkB;CAC/D,MAAM,SAAS,cAAc,iBAAiB,KAAA;AAC9C,KAAI,CAAC,OAAQ,QAAO;CACpB,MAAM,QAAQ,mBAAmB,OAAO,GACrC,uBAAuB,OAAO,CAAC,MAAM,MAAM,EAAE,SAAS,UAAU,GAChE;EAAE,MAAM;EAAoB,GAAG;EAAQ;AAC1C,KAAI,CAAC,MAAO,QAAO;CACnB,MAAM,MAAM,QAAQ,MAAM;AAC1B,QACC,oBAAC,OAAD;EAAK,kBAAA;EAAe,WAAU;EAAmB;YAC/C,eAAe,KAAK,WAAW;EAC3B,CAAA;;;;AChBR,SAAgB,eAAe,EAC9B,QAAQ,YACR,YACA,SACuB;CACvB,MAAM,EAAE,QAAQ,kBAAkB,WAAW,kBAAkB;CAC/D,MAAM,SAAS,cAAc,iBAAiB,KAAA;AAC9C,KAAI,CAAC,OAAQ,QAAO;CACpB,MAAM,QAAQ,mBAAmB,OAAO,GACrC,uBAAuB,OAAO,CAAC,MAAM,MAAM,EAAE,SAAS,QAAQ,GAC9D;EAAE,MAAM;EAAkB,GAAG;EAAQ;AACxC,KAAI,CAAC,MAAO,QAAO;CACnB,MAAM,MAAM,QAAQ,MAAM;AAC1B,QACC,oBAAC,OAAD;EAAK,kBAAA;EAAe,WAAU;EAAmB;YAC/C,eAAe,KAAK,WAAW;EAC3B,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../core/dist/index.js","../src/hooks/useShouldShowCookieBanner.ts","../src/styles.ts","../src/context.tsx","../src/hooks/useCookies.ts","../src/components/ConsentGate.tsx","../src/components/defaults.tsx","../src/render.tsx","../src/components/CookiePolicy.tsx","../src/components/PrivacyPolicy.tsx","../src/components/TermsOfService.tsx"],"sourcesContent":["//#region src/consent.ts\nfunction acceptAll(config) {\n\tconst consent = { essential: true };\n\tfor (const [key, value] of Object.entries(config.cookies)) {\n\t\tif (key === \"essential\") continue;\n\t\tconsent[key] = Boolean(value);\n\t}\n\treturn consent;\n}\nfunction rejectAll(config) {\n\tconst consent = { essential: true };\n\tif (config) for (const key of Object.keys(config.cookies)) {\n\t\tif (key === \"essential\") continue;\n\t\tconsent[key] = false;\n\t}\n\treturn consent;\n}\n//#endregion\n//#region src/documents/helpers.ts\nconst heading = (value, levelOrContext, context) => {\n\tconst level = typeof levelOrContext === \"number\" ? levelOrContext : void 0;\n\tconst ctx = typeof levelOrContext === \"object\" ? levelOrContext : context;\n\treturn {\n\t\ttype: \"heading\",\n\t\t...level !== void 0 && { level },\n\t\tvalue,\n\t\t...ctx && { context: ctx }\n\t};\n};\nconst text = (value, context) => ({\n\ttype: \"text\",\n\tvalue,\n\t...context && { context }\n});\nconst bold = (value, context) => ({\n\ttype: \"bold\",\n\tvalue,\n\t...context && { context }\n});\nconst italic = (value, context) => ({\n\ttype: \"italic\",\n\tvalue,\n\t...context && { context }\n});\nconst link = (href, value, context) => ({\n\ttype: \"link\",\n\thref,\n\tvalue,\n\t...context && { context }\n});\nconst p = (children, context) => ({\n\ttype: \"paragraph\",\n\tchildren: children.map((c) => typeof c === \"string\" ? text(c) : c),\n\t...context && { context }\n});\nconst li = (children, context) => ({\n\ttype: \"listItem\",\n\tchildren: children.map((c) => typeof c === \"string\" ? text(c) : c),\n\t...context && { context }\n});\nconst ul = (items, context) => ({\n\ttype: \"list\",\n\titems,\n\t...context && { context }\n});\nconst ol = (items, context) => ({\n\ttype: \"list\",\n\tordered: true,\n\titems,\n\t...context && { context }\n});\nconst section = (id, content, context) => ({\n\ttype: \"section\",\n\tid,\n\tcontent,\n\t...context && { context }\n});\n//#endregion\n//#region src/documents/cookie.ts\nfunction buildIntroduction$2(config) {\n\treturn section(\"cookie-introduction\", [heading(\"Cookie Policy\"), p([`This Cookie Policy explains how ${config.company.name} (\"we\", \"us\", or \"our\") uses cookies and similar tracking technologies on our services. Effective Date: ${config.effectiveDate}.`])]);\n}\nfunction buildWhatAreCookies() {\n\treturn section(\"cookie-what-are-cookies\", [\n\t\theading(\"What Are Cookies?\"),\n\t\tp([\"Cookies are small text files placed on your device by websites you visit. They are widely used to make websites work more efficiently and to provide information to site owners.\"]),\n\t\tp([\"Cookies can be \\\"session cookies\\\" (deleted when you close your browser) or \\\"persistent cookies\\\" (remain on your device until they expire or you delete them).\"])\n\t]);\n}\nfunction buildTypes(config) {\n\tconst types = [];\n\tif (config.cookies.essential) types.push({\n\t\tlabel: \"Essential Cookies\",\n\t\tdescription: \"Required for the basic functioning of our services. These cannot be disabled.\"\n\t});\n\tif (config.cookies.analytics) types.push({\n\t\tlabel: \"Analytics Cookies\",\n\t\tdescription: \"Help us understand how visitors interact with our services so we can improve them.\"\n\t});\n\tif (config.cookies.functional) types.push({\n\t\tlabel: \"Functional Cookies\",\n\t\tdescription: \"Enable enhanced functionality and personalisation, such as remembering your preferences.\"\n\t});\n\tif (config.cookies.marketing) types.push({\n\t\tlabel: \"Marketing Cookies\",\n\t\tdescription: \"Used to deliver advertisements more relevant to you and your interests.\"\n\t});\n\tif (types.length === 0) return section(\"cookie-types\", [heading(\"Types of Cookies We Use\"), p([\"We do not currently use any cookies.\"])]);\n\treturn section(\"cookie-types\", [heading(\"Types of Cookies We Use\"), ul(types.map((t) => li([\n\t\tbold(t.label),\n\t\t\" — \",\n\t\tt.description\n\t])))]);\n}\nfunction buildTrackingTechnologies(config) {\n\tif (!config.trackingTechnologies || config.trackingTechnologies.length === 0) return null;\n\treturn section(\"cookie-tracking-technologies\", [\n\t\theading(\"Other Tracking Technologies\"),\n\t\tp([\"In addition to cookies, we may use the following tracking technologies:\"]),\n\t\tul(config.trackingTechnologies.map((t) => li([t])))\n\t]);\n}\nfunction buildThirdParties$1(config) {\n\tif (!config.thirdParties || config.thirdParties.length === 0) return null;\n\treturn section(\"cookie-third-parties\", [\n\t\theading(\"Third-Party Cookies\"),\n\t\tp([\"The following third parties may set cookies through our services:\"]),\n\t\tul(config.thirdParties.map((t) => li([\n\t\t\tbold(t.name),\n\t\t\t\" — \",\n\t\t\tt.purpose,\n\t\t\t...t.policyUrl ? [\n\t\t\t\t\" (\",\n\t\t\t\tlink(t.policyUrl, \"Privacy Policy\"),\n\t\t\t\t\")\"\n\t\t\t] : []\n\t\t])))\n\t]);\n}\nfunction buildConsent(config) {\n\tif (!config.consentMechanism) return null;\n\tconst { hasBanner, hasPreferencePanel, canWithdraw } = config.consentMechanism;\n\tconst items = [];\n\tif (hasBanner) items.push(\"We display a cookie consent banner when you first visit our services.\");\n\tif (hasPreferencePanel) items.push(\"You can manage your cookie preferences at any time via our preference panel.\");\n\tif (canWithdraw) items.push(\"You may withdraw your consent at any time; however, this will not affect the lawfulness of processing based on consent before its withdrawal.\");\n\tif (items.length === 0) return null;\n\treturn section(\"cookie-consent\", [heading(\"Your Consent\"), ul(items.map((i) => li([i])))]);\n}\nfunction buildManaging() {\n\treturn section(\"cookie-managing\", [\n\t\theading(\"Managing Cookies\"),\n\t\tp([\"Most web browsers allow you to control cookies through their settings. You can:\"]),\n\t\tul([\n\t\t\tli([\"Delete cookies already stored on your device\"]),\n\t\t\tli([\"Block cookies from being set on your device\"]),\n\t\t\tli([\"Set your browser to notify you when a cookie is being set\"])\n\t\t]),\n\t\tp([\"Please note that restricting cookies may impact the functionality of our services. Consult your browser's help documentation for instructions on managing cookies.\"])\n\t]);\n}\nfunction buildJurisdictionEu(config) {\n\tif (!config.jurisdictions.includes(\"eu\")) return null;\n\treturn section(\"cookie-jurisdiction-eu\", [\n\t\theading(\"European Users (GDPR)\", { reason: \"Required under ePrivacy Directive and GDPR\" }),\n\t\tp([\"If you are located in the European Economic Area, we rely on your consent as our legal basis for setting non-essential cookies. You have the right to withdraw consent at any time.\"]),\n\t\tp([\"Essential cookies are set on the basis of our legitimate interests to provide you with a functioning service.\"])\n\t]);\n}\nfunction buildContact$2(config) {\n\treturn section(\"cookie-contact\", [\n\t\theading(\"Contact Us\"),\n\t\tp([\"If you have questions about this Cookie Policy, please contact us:\"]),\n\t\tul([\n\t\t\tli([bold(\"Legal Name: \"), config.company.legalName]),\n\t\t\tli([bold(\"Address: \"), config.company.address]),\n\t\t\tli([bold(\"Email: \"), config.company.contact])\n\t\t])\n\t]);\n}\nconst SECTION_BUILDERS$2 = [\n\tbuildIntroduction$2,\n\t() => buildWhatAreCookies(),\n\tbuildTypes,\n\tbuildTrackingTechnologies,\n\tbuildThirdParties$1,\n\tbuildConsent,\n\t() => buildManaging(),\n\tbuildJurisdictionEu,\n\tbuildContact$2\n];\nfunction compileCookieDocument(config) {\n\treturn SECTION_BUILDERS$2.map((builder) => builder(config)).filter((s) => s !== null);\n}\n//#endregion\n//#region src/documents/privacy.ts\nconst LEGAL_BASIS_LABELS = {\n\tconsent: \"Consent (Article 6(1)(a))\",\n\tcontract: \"Performance of a contract (Article 6(1)(b))\",\n\tlegal_obligation: \"Compliance with a legal obligation (Article 6(1)(c))\",\n\tvital_interests: \"Protection of vital interests (Article 6(1)(d))\",\n\tpublic_task: \"Performance of a public task (Article 6(1)(e))\",\n\tlegitimate_interests: \"Legitimate interests (Article 6(1)(f))\"\n};\nconst RIGHTS_LABELS = {\n\taccess: \"Right to access your personal data\",\n\trectification: \"Right to correct inaccurate data\",\n\terasure: \"Right to request deletion of your data\",\n\tportability: \"Right to receive your data in a portable format\",\n\trestriction: \"Right to restrict how we process your data\",\n\tobjection: \"Right to object to processing\",\n\topt_out_sale: \"Right to opt out of the sale of your personal information\",\n\tnon_discrimination: \"Right to non-discriminatory treatment for exercising your rights\"\n};\nfunction buildIntroduction$1(config) {\n\treturn section(\"introduction\", [\n\t\theading(\"Introduction\"),\n\t\tp([`This Privacy Policy describes how ${config.company.name} (\"we\", \"us\", or \"our\") collects, uses, and shares information about you when you use our services. Effective Date: ${config.effectiveDate}.`]),\n\t\tp([`If you have questions about this policy, please contact us at ${config.company.contact}.`])\n\t]);\n}\nfunction buildChildrenPrivacy(config) {\n\tif (!config.children) return null;\n\tconst { underAge, noticeUrl } = config.children;\n\treturn section(\"children-privacy\", [\n\t\theading(\"Children's Privacy\", { reason: \"Required by COPPA\" }),\n\t\tp([`Our services are not directed to children under the age of ${underAge}. We do not knowingly collect personal information from children under ${underAge}. If you believe we have collected information from a child, please contact us immediately.`]),\n\t\t...noticeUrl ? [p([\n\t\t\t\"For more information, see our \",\n\t\t\tlink(noticeUrl, \"Children's Privacy Notice\"),\n\t\t\t\".\"\n\t\t])] : []\n\t]);\n}\nfunction buildDataCollected(config) {\n\tconst items = Object.entries(config.dataCollected).map(([category, fields]) => li([bold(category), ul(fields.map((f) => li([f])))]));\n\treturn section(\"data-collected\", [\n\t\theading(\"Information We Collect\"),\n\t\tp([\"We collect the following categories of information:\"]),\n\t\tul(items)\n\t]);\n}\nfunction buildLegalBasis(config) {\n\tif (!config.jurisdictions.includes(\"eu\")) return null;\n\tconst labelled = (Array.isArray(config.legalBasis) ? config.legalBasis : [config.legalBasis]).map((b) => LEGAL_BASIS_LABELS[b] ?? b);\n\treturn section(\"legal-basis\", [heading(\"Legal Basis for Processing\", { reason: \"Required by GDPR Article 13\" }), p([labelled.join(\" and \")])]);\n}\nfunction buildDataRetention(config) {\n\tconst items = Object.entries(config.retention).map(([category, period]) => li([\n\t\tbold(category),\n\t\t\": \",\n\t\tperiod\n\t]));\n\treturn section(\"data-retention\", [\n\t\theading(\"Data Retention\"),\n\t\tp([\"We retain your data for the following periods:\"]),\n\t\tul(items)\n\t]);\n}\nfunction buildCookies(config) {\n\tconst enabled = [];\n\tif (config.cookies.essential) enabled.push(\"Essential cookies — required for the service to function\");\n\tif (config.cookies.analytics) enabled.push(\"Analytics cookies — help us understand how the service is used\");\n\tif (config.cookies.marketing) enabled.push(\"Marketing cookies — used to deliver relevant advertisements\");\n\tif (enabled.length === 0) return section(\"cookies\", [heading(\"Cookies and Tracking\"), p([\"We do not use cookies or similar tracking technologies.\"])]);\n\treturn section(\"cookies\", [\n\t\theading(\"Cookies and Tracking\"),\n\t\tp([\"We use the following types of cookies and tracking technologies:\"]),\n\t\tul(enabled.map((e) => li([e])))\n\t]);\n}\nfunction buildThirdParties(config) {\n\tif (config.thirdParties.length === 0) return section(\"third-parties\", [heading(\"Third-Party Services\"), p([\"We do not share your personal information with third parties except as required by law.\"])]);\n\treturn section(\"third-parties\", [\n\t\theading(\"Third-Party Services\"),\n\t\tp([\"We share data with the following third-party services:\"]),\n\t\tul(config.thirdParties.map((t) => li([\n\t\t\tt.policyUrl ? link(t.policyUrl, t.name) : bold(t.name),\n\t\t\t\" — \",\n\t\t\tt.purpose\n\t\t])))\n\t]);\n}\nfunction buildUserRights(config) {\n\tconst items = config.userRights.map((right) => {\n\t\treturn li([RIGHTS_LABELS[right] ?? right]);\n\t});\n\treturn section(\"user-rights\", [\n\t\theading(\"Your Rights\"),\n\t\tp([\"You have the following rights regarding your personal data:\"]),\n\t\tul(items)\n\t]);\n}\nfunction buildGdprSupplement(config) {\n\tif (!config.jurisdictions.includes(\"eu\")) return null;\n\treturn section(\"gdpr-supplement\", [\n\t\theading(\"GDPR Supplemental Disclosures\", { reason: \"Required by GDPR Article 13\" }),\n\t\tp([\"This section applies to individuals in the European Economic Area (EEA) under the General Data Protection Regulation (GDPR).\"]),\n\t\tp([\n\t\t\t\"Data Controller: \",\n\t\t\tbold(config.company.legalName),\n\t\t\t`, ${config.company.address}`\n\t\t]),\n\t\tp([\"In addition to the rights listed above, you have the right to lodge a complaint with your local data protection authority if you believe we have not handled your data in accordance with applicable law.\"]),\n\t\tp([\"If we transfer your personal data outside the EEA, we ensure adequate safeguards are in place in accordance with GDPR requirements.\"])\n\t]);\n}\nfunction buildCcpaSupplement(config) {\n\tif (!config.jurisdictions.includes(\"ca\")) return null;\n\treturn section(\"ccpa-supplement\", [\n\t\theading(\"California Privacy Rights (CCPA)\", { reason: \"Required by CCPA\" }),\n\t\tp([\"If you are a California resident, you have the following additional rights:\"]),\n\t\tul([\n\t\t\tli([\"Right to Know — You may request disclosure of the personal information we collect, use, and share about you.\"]),\n\t\t\tli([\"Right to Delete — You may request deletion of personal information we have collected about you.\"]),\n\t\t\tli([\"Right to Opt-Out — You may opt out of the sale of your personal information.\"]),\n\t\t\tli([\"Right to Non-Discrimination — We will not discriminate against you for exercising your CCPA rights.\"])\n\t\t])\n\t]);\n}\nfunction buildContact$1(config) {\n\treturn section(\"contact\", [\n\t\theading(\"Contact Us\"),\n\t\tp([\"Contact us:\"]),\n\t\tul([\n\t\t\tli([\n\t\t\t\tbold(\"Legal Name:\"),\n\t\t\t\t\" \",\n\t\t\t\tconfig.company.legalName\n\t\t\t]),\n\t\t\tli([\n\t\t\t\tbold(\"Address:\"),\n\t\t\t\t\" \",\n\t\t\t\tconfig.company.address\n\t\t\t]),\n\t\t\tli([\n\t\t\t\tbold(\"Email:\"),\n\t\t\t\t\" \",\n\t\t\t\tconfig.company.contact\n\t\t\t])\n\t\t])\n\t]);\n}\nconst SECTION_BUILDERS$1 = [\n\tbuildIntroduction$1,\n\tbuildChildrenPrivacy,\n\tbuildDataCollected,\n\tbuildLegalBasis,\n\tbuildDataRetention,\n\tbuildCookies,\n\tbuildThirdParties,\n\tbuildUserRights,\n\tbuildGdprSupplement,\n\tbuildCcpaSupplement,\n\tbuildContact$1\n];\nfunction compilePrivacyDocument(config) {\n\treturn SECTION_BUILDERS$1.map((builder) => builder(config)).filter((s) => s !== null);\n}\n//#endregion\n//#region src/documents/terms.ts\nfunction buildIntroduction(config) {\n\treturn section(\"tos-introduction\", [heading(\"Terms of Service\"), p([`These Terms of Service (\"Terms\") govern your use of services provided by ${config.company.name} (\"we\", \"us\", or \"our\"). By using our services, you agree to these Terms. Effective Date: ${config.effectiveDate}.`])]);\n}\nfunction buildAcceptance(config) {\n\treturn section(\"tos-acceptance\", [\n\t\theading(\"Acceptance of Terms\"),\n\t\tp([\"You accept these Terms by:\"]),\n\t\tul(config.acceptance.methods.map((m) => li([m])))\n\t]);\n}\nfunction buildEligibility(config) {\n\tif (!config.eligibility) return null;\n\tconst { minimumAge, jurisdictionRestrictions } = config.eligibility;\n\treturn section(\"tos-eligibility\", [\n\t\theading(\"Eligibility\"),\n\t\tp([`You must be at least ${minimumAge} years old to use our services. By using the services, you represent that you meet this age requirement.`]),\n\t\t...jurisdictionRestrictions && jurisdictionRestrictions.length > 0 ? [p([\"Our services are not available in the following jurisdictions:\"]), ul(jurisdictionRestrictions.map((j) => li([j])))] : []\n\t]);\n}\nfunction buildAccounts(config) {\n\tif (!config.accounts) return null;\n\tconst { registrationRequired, userResponsibleForCredentials, companyCanTerminate } = config.accounts;\n\tconst items = [];\n\tif (registrationRequired) items.push(\"Registration is required to access certain features of our services.\");\n\tif (userResponsibleForCredentials) items.push(\"You are responsible for maintaining the confidentiality of your account credentials and for all activity under your account.\");\n\tif (companyCanTerminate) items.push(\"We reserve the right to terminate or suspend accounts at our discretion.\");\n\treturn section(\"tos-accounts\", [heading(\"Accounts\"), ul(items.map((i) => li([i])))]);\n}\nfunction buildProhibitedUses(config) {\n\tif (!config.prohibitedUses || config.prohibitedUses.length === 0) return null;\n\treturn section(\"tos-prohibited-uses\", [\n\t\theading(\"Prohibited Uses\"),\n\t\tp([\"You may not use our services for the following purposes:\"]),\n\t\tul(config.prohibitedUses.map((u) => li([u])))\n\t]);\n}\nfunction buildUserContent(config) {\n\tif (!config.userContent) return null;\n\tconst { usersOwnContent, licenseGrantedToCompany, licenseDescription, companyCanRemoveContent } = config.userContent;\n\tconst items = [];\n\tif (usersOwnContent) items.push(\"You retain ownership of content you submit to our services.\");\n\tif (licenseGrantedToCompany) items.push(licenseDescription ?? \"By submitting content, you grant us a license to use, reproduce, and display that content in connection with our services.\");\n\tif (companyCanRemoveContent) items.push(\"We reserve the right to remove content that violates these Terms or that we find objectionable.\");\n\treturn section(\"tos-user-content\", [heading(\"User Content\"), ul(items.map((i) => li([i])))]);\n}\nfunction buildIntellectualProperty(config) {\n\tif (!config.intellectualProperty) return null;\n\tconst { companyOwnsService, usersMayNotCopy } = config.intellectualProperty;\n\tconst items = [];\n\tif (companyOwnsService) items.push(`All content, features, and functionality of our services are owned by ${config.company.name} and are protected by intellectual property laws.`);\n\tif (usersMayNotCopy) items.push(\"You may not copy, modify, distribute, sell, or lease any part of our services without our express written permission.\");\n\treturn section(\"tos-intellectual-property\", [heading(\"Intellectual Property\"), ul(items.map((i) => li([i])))]);\n}\nfunction buildPayments(config) {\n\tif (!config.payments) return null;\n\tconst { hasPaidFeatures, refundPolicy, priceChangesNotice } = config.payments;\n\tconst items = [];\n\tif (hasPaidFeatures) items.push(\"Some features of our services require payment.\");\n\tif (refundPolicy) items.push(refundPolicy);\n\tif (priceChangesNotice) items.push(priceChangesNotice);\n\tif (items.length === 0) return null;\n\treturn section(\"tos-payments\", [heading(\"Payments\"), ul(items.map((i) => li([i])))]);\n}\nfunction buildAvailability(config) {\n\tif (!config.availability) return null;\n\tconst { noUptimeGuarantee, maintenanceWindows } = config.availability;\n\tconst items = [];\n\tif (noUptimeGuarantee) items.push(\"We do not guarantee uninterrupted or error-free access to our services.\");\n\tif (maintenanceWindows) items.push(maintenanceWindows);\n\treturn section(\"tos-availability\", [heading(\"Service Availability\"), ul(items.map((i) => li([i])))]);\n}\nfunction buildTermination(config) {\n\tif (!config.termination) return null;\n\tconst { companyCanTerminate, userCanTerminate, effectOfTermination } = config.termination;\n\tconst items = [];\n\tif (companyCanTerminate) items.push(\"We may terminate or suspend your access to our services at any time, with or without cause or notice.\");\n\tif (userCanTerminate) items.push(\"You may terminate your use of our services at any time.\");\n\tif (effectOfTermination) items.push(effectOfTermination);\n\treturn section(\"tos-termination\", [heading(\"Termination\"), ul(items.map((i) => li([i])))]);\n}\nfunction buildDisclaimers(config) {\n\tif (!config.disclaimers) return null;\n\tconst { serviceProvidedAsIs, noWarranties } = config.disclaimers;\n\tconst items = [];\n\tif (serviceProvidedAsIs) items.push(\"Our services are provided on an \\\"as is\\\" and \\\"as available\\\" basis.\");\n\tif (noWarranties) items.push(\"We make no warranties, express or implied, regarding the reliability, accuracy, or fitness for a particular purpose of our services.\");\n\treturn section(\"tos-disclaimers\", [heading(\"Disclaimers\"), ul(items.map((i) => li([i])))]);\n}\nfunction buildLimitationOfLiability(config) {\n\tif (!config.limitationOfLiability) return null;\n\tconst { excludesIndirectDamages, liabilityCap } = config.limitationOfLiability;\n\tconst items = [];\n\tif (excludesIndirectDamages) items.push(\"To the fullest extent permitted by law, we shall not be liable for any indirect, incidental, special, or consequential damages.\");\n\tif (liabilityCap) items.push(liabilityCap);\n\treturn section(\"tos-limitation-of-liability\", [heading(\"Limitation of Liability\"), ul(items.map((i) => li([i])))]);\n}\nfunction buildIndemnification(config) {\n\tif (!config.indemnification) return null;\n\tconst { userIndemnifiesCompany, scope } = config.indemnification;\n\tif (!userIndemnifiesCompany) return null;\n\treturn section(\"tos-indemnification\", [heading(\"Indemnification\"), p([scope ?? `You agree to indemnify and hold harmless ${config.company.name} and its officers, directors, employees, and agents from any claims arising out of your use of the services or violation of these Terms.`])]);\n}\nfunction buildThirdPartyServices(config) {\n\tif (!config.thirdPartyServices || config.thirdPartyServices.length === 0) return null;\n\treturn section(\"tos-third-party-services\", [\n\t\theading(\"Third-Party Services\"),\n\t\tp([\"Our services may integrate with or link to third-party services:\"]),\n\t\tul(config.thirdPartyServices.map((t) => li([\n\t\t\tbold(t.name),\n\t\t\t\" — \",\n\t\t\tt.purpose\n\t\t])))\n\t]);\n}\nfunction buildDisputeResolution(config) {\n\tif (!config.disputeResolution) return null;\n\tconst { method, venue, classActionWaiver } = config.disputeResolution;\n\tconst items = [];\n\tconst methodLabel = method === \"arbitration\" ? \"binding arbitration\" : method === \"mediation\" ? \"mediation\" : \"litigation\";\n\titems.push(`Any disputes arising from these Terms or your use of our services shall be resolved through ${methodLabel}.`);\n\tif (venue) items.push(`Venue: ${venue}.`);\n\tif (classActionWaiver) items.push(\"You waive any right to participate in class action lawsuits or class-wide arbitration.\");\n\treturn section(\"tos-dispute-resolution\", [heading(\"Dispute Resolution\"), ul(items.map((i) => li([i])))]);\n}\nfunction buildGoverningLaw(config) {\n\treturn section(\"tos-governing-law\", [heading(\"Governing Law\"), p([`These Terms are governed by the laws of ${config.governingLaw.jurisdiction}, without regard to conflict of law principles.`])]);\n}\nfunction buildChanges(config) {\n\tif (!config.changesPolicy) return null;\n\tconst { noticeMethod, noticePeriodDays } = config.changesPolicy;\n\tconst notice = noticePeriodDays ? `at least ${noticePeriodDays} days' notice via ${noticeMethod}` : `notice via ${noticeMethod}`;\n\treturn section(\"tos-changes\", [heading(\"Changes to These Terms\"), p([`We may update these Terms from time to time. We will provide ${notice} before changes take effect. Continued use of our services after changes constitutes acceptance of the revised Terms.`])]);\n}\nfunction buildContact(config) {\n\treturn section(\"tos-contact\", [\n\t\theading(\"Contact Us\"),\n\t\tp([\"If you have questions about these Terms, please contact us:\"]),\n\t\tul([\n\t\t\tli([\n\t\t\t\tbold(\"Legal Name:\"),\n\t\t\t\t\" \",\n\t\t\t\tconfig.company.legalName\n\t\t\t]),\n\t\t\tli([\n\t\t\t\tbold(\"Address:\"),\n\t\t\t\t\" \",\n\t\t\t\tconfig.company.address\n\t\t\t]),\n\t\t\tli([\n\t\t\t\tbold(\"Email:\"),\n\t\t\t\t\" \",\n\t\t\t\tconfig.company.contact\n\t\t\t])\n\t\t])\n\t]);\n}\nconst SECTION_BUILDERS = [\n\tbuildIntroduction,\n\tbuildAcceptance,\n\tbuildEligibility,\n\tbuildAccounts,\n\tbuildProhibitedUses,\n\tbuildUserContent,\n\tbuildIntellectualProperty,\n\tbuildPayments,\n\tbuildAvailability,\n\tbuildTermination,\n\tbuildDisclaimers,\n\tbuildLimitationOfLiability,\n\tbuildIndemnification,\n\tbuildThirdPartyServices,\n\tbuildDisputeResolution,\n\tbuildGoverningLaw,\n\tbuildChanges,\n\tbuildContact\n];\nfunction compileTermsDocument(config) {\n\treturn SECTION_BUILDERS.map((builder) => builder(config)).filter((s) => s !== null);\n}\n//#endregion\n//#region src/documents/index.ts\nfunction compile(input) {\n\tif (input.type === \"privacy\") {\n\t\tconst { type: _, ...config } = input;\n\t\treturn {\n\t\t\ttype: \"document\",\n\t\t\tpolicyType: \"privacy\",\n\t\t\tsections: compilePrivacyDocument(config)\n\t\t};\n\t}\n\tif (input.type === \"terms\") {\n\t\tconst { type: _, ...config } = input;\n\t\treturn {\n\t\t\ttype: \"document\",\n\t\t\tpolicyType: \"terms\",\n\t\t\tsections: compileTermsDocument(config)\n\t\t};\n\t}\n\tconst { type: _, ...config } = input;\n\treturn {\n\t\ttype: \"document\",\n\t\tpolicyType: \"cookie\",\n\t\tsections: compileCookieDocument(config)\n\t};\n}\n//#endregion\n//#region src/types.ts\nfunction isOpenPolicyConfig(value) {\n\tif (value === null || typeof value !== \"object\") return false;\n\tconst obj = value;\n\treturn \"company\" in obj && !(\"effectiveDate\" in obj) && (\"privacy\" in obj || \"terms\" in obj || \"cookie\" in obj);\n}\n//#endregion\n//#region src/validate.ts\nfunction validatePrivacyPolicy(config) {\n\tconst issues = [];\n\tif (!config.effectiveDate) issues.push({\n\t\tlevel: \"error\",\n\t\tmessage: \"effectiveDate is required\"\n\t});\n\tif (!config.company.name) issues.push({\n\t\tlevel: \"error\",\n\t\tmessage: \"company.name is required\"\n\t});\n\tif (!config.company.legalName) issues.push({\n\t\tlevel: \"error\",\n\t\tmessage: \"company.legalName is required\"\n\t});\n\tif (!config.company.address) issues.push({\n\t\tlevel: \"error\",\n\t\tmessage: \"company.address is required\"\n\t});\n\tif (!config.company.contact) issues.push({\n\t\tlevel: \"error\",\n\t\tmessage: \"company.contact is required\"\n\t});\n\tif (Object.keys(config.dataCollected).length === 0) issues.push({\n\t\tlevel: \"error\",\n\t\tmessage: \"dataCollected must have at least one entry\"\n\t});\n\tif (config.userRights.length === 0) issues.push({\n\t\tlevel: \"warning\",\n\t\tmessage: \"userRights is empty — consider listing applicable rights\"\n\t});\n\tif (config.jurisdictions.includes(\"eu\")) {\n\t\tconst basisArray = Array.isArray(config.legalBasis) ? config.legalBasis : [config.legalBasis];\n\t\tif (basisArray.length === 0 || basisArray.length === 1 && !basisArray[0]) issues.push({\n\t\t\tlevel: \"error\",\n\t\t\tmessage: \"GDPR requires a legalBasis\"\n\t\t});\n\t\tfor (const right of [\n\t\t\t\"access\",\n\t\t\t\"rectification\",\n\t\t\t\"erasure\",\n\t\t\t\"portability\",\n\t\t\t\"restriction\",\n\t\t\t\"objection\"\n\t\t]) if (!config.userRights.includes(right)) issues.push({\n\t\t\tlevel: \"warning\",\n\t\t\tmessage: `GDPR recommends including the \"${right}\" right`\n\t\t});\n\t}\n\tif (config.jurisdictions.includes(\"ca\")) {\n\t\tfor (const right of [\n\t\t\t\"access\",\n\t\t\t\"erasure\",\n\t\t\t\"opt_out_sale\",\n\t\t\t\"non_discrimination\"\n\t\t]) if (!config.userRights.includes(right)) issues.push({\n\t\t\tlevel: \"warning\",\n\t\t\tmessage: `CCPA recommends including the \"${right}\" right`\n\t\t});\n\t}\n\tif (config.children) {\n\t\tif (config.children.underAge <= 0) issues.push({\n\t\t\tlevel: \"error\",\n\t\t\tmessage: \"children.underAge must be a positive number\"\n\t\t});\n\t}\n\treturn issues;\n}\n//#endregion\n//#region src/validate-cookie.ts\nfunction validateCookiePolicy(config) {\n\tconst issues = [];\n\tif (!config.effectiveDate) issues.push({\n\t\tlevel: \"error\",\n\t\tmessage: \"effectiveDate is required\"\n\t});\n\tif (!config.company.name) issues.push({\n\t\tlevel: \"error\",\n\t\tmessage: \"company.name is required\"\n\t});\n\tif (!config.company.legalName) issues.push({\n\t\tlevel: \"error\",\n\t\tmessage: \"company.legalName is required\"\n\t});\n\tif (!config.company.address) issues.push({\n\t\tlevel: \"error\",\n\t\tmessage: \"company.address is required\"\n\t});\n\tif (!config.company.contact) issues.push({\n\t\tlevel: \"error\",\n\t\tmessage: \"company.contact is required\"\n\t});\n\tconst { essential, analytics, functional, marketing } = config.cookies;\n\tif (!essential && !analytics && !functional && !marketing) issues.push({\n\t\tlevel: \"error\",\n\t\tmessage: \"At least one cookie type must be enabled (essential, analytics, functional, or marketing)\"\n\t});\n\tif (!config.consentMechanism) issues.push({\n\t\tlevel: \"warning\",\n\t\tmessage: \"consentMechanism is not provided — consider describing how users can manage cookie consent\"\n\t});\n\tif (config.jurisdictions.includes(\"eu\") && config.consentMechanism && !config.consentMechanism.canWithdraw) issues.push({\n\t\tlevel: \"warning\",\n\t\tmessage: \"GDPR requires that users can withdraw cookie consent — consider setting consentMechanism.canWithdraw to true\"\n\t});\n\treturn issues;\n}\n//#endregion\n//#region src/validate-terms.ts\nfunction validateTermsOfService(config) {\n\tconst issues = [];\n\tif (!config.effectiveDate) issues.push({\n\t\tlevel: \"error\",\n\t\tmessage: \"effectiveDate is required\"\n\t});\n\tif (!config.company.name) issues.push({\n\t\tlevel: \"error\",\n\t\tmessage: \"company.name is required\"\n\t});\n\tif (!config.company.legalName) issues.push({\n\t\tlevel: \"error\",\n\t\tmessage: \"company.legalName is required\"\n\t});\n\tif (!config.company.address) issues.push({\n\t\tlevel: \"error\",\n\t\tmessage: \"company.address is required\"\n\t});\n\tif (!config.company.contact) issues.push({\n\t\tlevel: \"error\",\n\t\tmessage: \"company.contact is required\"\n\t});\n\tif (!config.governingLaw.jurisdiction) issues.push({\n\t\tlevel: \"error\",\n\t\tmessage: \"governingLaw.jurisdiction is required\"\n\t});\n\tif (!config.disclaimers) issues.push({\n\t\tlevel: \"warning\",\n\t\tmessage: \"disclaimers is missing — consider adding a disclaimer of warranties\"\n\t});\n\tif (!config.limitationOfLiability) issues.push({\n\t\tlevel: \"warning\",\n\t\tmessage: \"limitationOfLiability is missing — consider adding a limitation of liability clause\"\n\t});\n\tif (config.acceptance.methods.length === 0) issues.push({\n\t\tlevel: \"warning\",\n\t\tmessage: \"acceptance.methods is empty — consider listing how users accept these Terms\"\n\t});\n\treturn issues;\n}\n//#endregion\n//#region src/index.ts\nfunction expandOpenPolicyConfig(config) {\n\tconst inputs = [];\n\tif (config.privacy) inputs.push({\n\t\ttype: \"privacy\",\n\t\tcompany: config.company,\n\t\t...config.privacy\n\t});\n\tif (config.terms) inputs.push({\n\t\ttype: \"terms\",\n\t\tcompany: config.company,\n\t\t...config.terms\n\t});\n\tif (config.cookie) inputs.push({\n\t\ttype: \"cookie\",\n\t\tcompany: config.company,\n\t\t...config.cookie\n\t});\n\treturn inputs;\n}\n//#endregion\nexport { acceptAll, bold, compile, expandOpenPolicyConfig, heading, isOpenPolicyConfig, italic, li, link, ol, p, rejectAll, section, text, ul, validateCookiePolicy, validatePrivacyPolicy, validateTermsOfService };\n\n//# sourceMappingURL=index.js.map","import type { CookieConsentStatus } from \"@openpolicy/core\";\nimport { useEffect, useRef, useState } from \"react\";\n\nexport function useShouldShowCookieBanner(\n\tstatus: CookieConsentStatus,\n\tshouldShow?: () => Promise<boolean>,\n): boolean {\n\tconst [visible, setVisible] = useState(false);\n\tconst shouldShowRef = useRef(shouldShow);\n\n\tuseEffect(() => {\n\t\tif (status !== \"undecided\") {\n\t\t\tsetVisible(false);\n\t\t\treturn;\n\t\t}\n\t\tlet cancelled = false;\n\t\tconst check = shouldShowRef.current ?? (() => Promise.resolve(true));\n\t\tcheck().then((show) => {\n\t\t\tif (!cancelled) setVisible(show);\n\t\t});\n\t\treturn () => {\n\t\t\tcancelled = true;\n\t\t};\n\t}, [status]);\n\n\treturn visible;\n}\n","export const defaultStyles = `\n.op-policy {\n --op-font-family: system-ui, -apple-system, BlinkMacSystemFont, \"Segoe UI\", sans-serif;\n --op-font-size-body: 1rem;\n --op-font-size-heading: 1.125rem;\n --op-font-weight-heading: 600;\n --op-line-height: 1.7;\n --op-body-color: #374151;\n --op-heading-color: #111827;\n --op-link-color: #2563eb;\n --op-link-color-hover: #1d4ed8;\n --op-section-gap: 2rem;\n --op-border-color: #e5e7eb;\n --op-border-radius: 0.375rem;\n\n font-family: var(--op-font-family);\n font-size: var(--op-font-size-body);\n color: var(--op-body-color);\n line-height: var(--op-line-height);\n max-width: 65ch;\n}\n\n.op-section {\n margin-bottom: var(--op-section-gap);\n padding-bottom: var(--op-section-gap);\n border-bottom: 1px solid var(--op-border-color);\n}\n.op-section:last-child {\n border-bottom: none;\n margin-bottom: 0;\n padding-bottom: 0;\n}\n\n.op-heading {\n font-size: var(--op-font-size-heading);\n font-weight: var(--op-font-weight-heading);\n color: var(--op-heading-color);\n line-height: 1.3;\n margin: 0 0 0.75rem;\n}\n\n.op-paragraph {\n margin: 0 0 0.75rem;\n}\n.op-paragraph:last-child { margin-bottom: 0; }\n\n.op-list {\n margin: 0 0 0.75rem;\n padding-left: 1.5rem;\n list-style-type: disc;\n}\n.op-list:last-child { margin-bottom: 0; }\n.op-list .op-list {\n margin-top: 0.375rem;\n margin-bottom: 0;\n list-style-type: circle;\n}\n\n.op-list-item {\n margin-bottom: 0.375rem;\n}\n.op-list-item:last-child { margin-bottom: 0; }\n\n.op-bold {\n font-weight: 600;\n color: var(--op-heading-color);\n}\n\n.op-link {\n color: var(--op-link-color);\n text-decoration: underline;\n text-underline-offset: 2px;\n transition: color 0.15s ease;\n}\n.op-link:hover { color: var(--op-link-color-hover); }\n`;\n","import {\n\tacceptAll,\n\ttype CookieConsent,\n\ttype CookieConsentStatus,\n\ttype CookiePolicyConfig,\n\tisOpenPolicyConfig,\n\ttype OpenPolicyConfig,\n\trejectAll,\n} from \"@openpolicy/core\";\nimport {\n\tcreateContext,\n\ttype ReactNode,\n\tuseCallback,\n\tuseContext,\n\tuseEffect,\n\tuseMemo,\n\tuseState,\n\tuseSyncExternalStore,\n} from \"react\";\nimport { useShouldShowCookieBanner } from \"./hooks/useShouldShowCookieBanner\";\nimport { defaultStyles } from \"./styles\";\n\n// ─── Types ────────────────────────────────────────────────────────────────────\n\nexport type CookieRoute = \"cookie\" | \"preferences\" | \"closed\";\n\nexport type CookieCategory = {\n\tkey: string;\n\tlabel: string;\n\tenabled: boolean;\n\tlocked: boolean;\n};\n\nexport type HasExpression =\n\t| string\n\t| { and: HasExpression[] }\n\t| { or: HasExpression[] }\n\t| { not: HasExpression };\n\n// ─── localStorage helpers ─────────────────────────────────────────────────────\n\nconst LS_KEY = \"op_consent\";\n\nfunction getConsentFromStorage(): CookieConsent | null {\n\ttry {\n\t\tconst raw = localStorage.getItem(LS_KEY);\n\t\tif (!raw) return null;\n\t\treturn JSON.parse(raw) as CookieConsent;\n\t} catch {\n\t\treturn null;\n\t}\n}\n\nfunction setConsentToStorage(consent: CookieConsent): void {\n\tconst value: CookieConsent = { ...consent, essential: true };\n\tlocalStorage.setItem(LS_KEY, JSON.stringify(value));\n}\n\nfunction clearConsentFromStorage(): void {\n\tlocalStorage.removeItem(LS_KEY);\n}\n\n// ─── Config resolution ────────────────────────────────────────────────────────\n\nexport function resolveCookieConfig(\n\traw: OpenPolicyConfig | CookiePolicyConfig | null | undefined,\n): CookiePolicyConfig | undefined {\n\tif (!raw) return undefined;\n\tif (isOpenPolicyConfig(raw) && raw.cookie)\n\t\treturn { ...raw.cookie, company: raw.company } as CookiePolicyConfig;\n\tif (!isOpenPolicyConfig(raw)) return raw as CookiePolicyConfig;\n\treturn undefined;\n}\n\nconst CATEGORY_LABELS: Record<string, string> = {\n\tessential: \"Essential\",\n\tanalytics: \"Analytics\",\n\tfunctional: \"Functional\",\n\tmarketing: \"Marketing\",\n};\n\n// ─── Pure helpers (exported for tests) ───────────────────────────────────────\n\nexport function acceptAllForConfig(config: CookiePolicyConfig): CookieConsent {\n\tconst consent = acceptAll(config);\n\tsetConsentToStorage(consent);\n\treturn consent;\n}\n\nexport function rejectAllForConfig(config?: CookiePolicyConfig): CookieConsent {\n\tconst consent = rejectAll(config);\n\tsetConsentToStorage(consent);\n\treturn consent;\n}\n\nexport function updateConsent(partial: Partial<CookieConsent>): CookieConsent {\n\tconst current = getConsentFromStorage() ?? { essential: true };\n\tconst next: CookieConsent = { ...current, ...partial, essential: true };\n\tsetConsentToStorage(next);\n\treturn next;\n}\n\nexport function evalHas(\n\tconsent: CookieConsent | null,\n\texpr: HasExpression,\n): boolean {\n\tif (!consent) return false;\n\tif (typeof expr === \"string\") return Boolean(consent[expr]);\n\tif (\"and\" in expr) return expr.and.every((child) => evalHas(consent, child));\n\tif (\"or\" in expr) return expr.or.some((child) => evalHas(consent, child));\n\tif (\"not\" in expr) return !evalHas(consent, expr.not);\n\treturn false;\n}\n\n// ─── Cookie store ─────────────────────────────────────────────────────────────\n\ntype Listener = () => void;\nconst listeners = new Set<Listener>();\n\nfunction subscribe(listener: Listener): () => void {\n\tlisteners.add(listener);\n\treturn () => listeners.delete(listener);\n}\n\nfunction notifyListeners(): void {\n\tfor (const l of listeners) l();\n}\n\nlet cachedRaw = \"\";\nlet cachedValue: CookieConsent | null = null;\n\nexport function getSnapshotCached(): CookieConsent | null {\n\tconst rawStr = localStorage.getItem(LS_KEY) ?? \"\";\n\tif (rawStr === cachedRaw) return cachedValue;\n\tcachedRaw = rawStr;\n\tcachedValue = getConsentFromStorage();\n\treturn cachedValue;\n}\n\nfunction getServerSnapshot(): CookieConsent | null {\n\treturn null;\n}\n\n// ─── Context ──────────────────────────────────────────────────────────────────\n\ntype OpenPolicyContextValue = {\n\tconfig: OpenPolicyConfig | null;\n\tcookieConfig: CookiePolicyConfig | null;\n\troute: CookieRoute;\n\tsetRoute: (route: CookieRoute) => void;\n\tstatus: CookieConsentStatus;\n\tconsent: CookieConsent | null;\n\taccept: () => void;\n\treject: () => void;\n\tupdate: (partial: Partial<CookieConsent>) => void;\n\treset: () => void;\n\thas: (expr: HasExpression) => boolean;\n\tcategories: CookieCategory[];\n\ttoggle: (key: string) => void;\n\tsave: (onSave?: (consent: CookieConsent) => void) => void;\n\trejectAll: () => void;\n};\n\nexport const OpenPolicyContext = createContext<OpenPolicyContextValue>({\n\tconfig: null,\n\tcookieConfig: null,\n\troute: \"closed\",\n\tsetRoute: () => {},\n\tstatus: \"undecided\",\n\tconsent: null,\n\taccept: () => {},\n\treject: () => {},\n\tupdate: () => {},\n\treset: () => {},\n\thas: () => false,\n\tcategories: [],\n\ttoggle: () => {},\n\tsave: () => {},\n\trejectAll: () => {},\n});\n\n// ─── Provider ─────────────────────────────────────────────────────────────────\n\ntype OpenPolicyProviderProps = {\n\tconfig: OpenPolicyConfig;\n\tshouldShow?: () => Promise<boolean>;\n\tchildren?: ReactNode;\n};\n\nexport function OpenPolicyProvider({\n\tconfig,\n\tshouldShow,\n\tchildren,\n}: OpenPolicyProviderProps) {\n\tconst cookieConfig = useMemo(\n\t\t() => resolveCookieConfig(config) ?? null,\n\t\t[config],\n\t);\n\n\tconst consent = useSyncExternalStore(\n\t\tsubscribe,\n\t\tgetSnapshotCached,\n\t\tgetServerSnapshot,\n\t);\n\n\tconst status: CookieConsentStatus = consent ? \"completed\" : \"undecided\";\n\n\t// Sync data attributes on document.body for CSS hooks\n\tuseEffect(() => {\n\t\tconst body = document.body;\n\t\tif (status) body.dataset.status = status;\n\t\tif (cookieConfig) {\n\t\t\tfor (const key of Object.keys(cookieConfig.cookies)) {\n\t\t\t\tconst value = consent ? (consent[key] ?? false) : false;\n\t\t\t\tbody.setAttribute(`data-consent-${key}`, String(Boolean(value)));\n\t\t\t}\n\t\t}\n\t\treturn () => {\n\t\t\tif (body.dataset.status === status) delete body.dataset.status;\n\t\t\tif (cookieConfig) {\n\t\t\t\tfor (const key of Object.keys(cookieConfig.cookies)) {\n\t\t\t\t\tbody.removeAttribute(`data-consent-${key}`);\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t}, [consent, cookieConfig, status]);\n\n\tconst has = useCallback(\n\t\t(expr: HasExpression) => evalHas(consent, expr),\n\t\t[consent],\n\t);\n\n\tconst visible = useShouldShowCookieBanner(status, shouldShow);\n\n\tconst [route, setRoute] = useState<CookieRoute>(\"closed\");\n\tconst [draft, setDraft] = useState<Partial<CookieConsent>>({});\n\n\tuseEffect(() => {\n\t\tif (visible) {\n\t\t\tsetRoute((prev) => (prev === \"closed\" ? \"cookie\" : prev));\n\t\t} else {\n\t\t\tsetRoute(\"closed\");\n\t\t}\n\t}, [visible]);\n\n\tconst rawAccept = useCallback(() => {\n\t\tif (!cookieConfig) return;\n\t\tacceptAllForConfig(cookieConfig);\n\t\tnotifyListeners();\n\t}, [cookieConfig]);\n\n\tconst rawReject = useCallback(() => {\n\t\trejectAllForConfig(cookieConfig ?? undefined);\n\t\tnotifyListeners();\n\t}, [cookieConfig]);\n\n\tconst update = useCallback((partial: Partial<CookieConsent>) => {\n\t\tupdateConsent(partial);\n\t\tnotifyListeners();\n\t}, []);\n\n\tconst reset = useCallback(() => {\n\t\tclearConsentFromStorage();\n\t\tnotifyListeners();\n\t}, []);\n\n\tconst accept = () => {\n\t\trawAccept();\n\t\tsetRoute(\"closed\");\n\t};\n\n\tconst reject = () => {\n\t\trawReject();\n\t\tsetRoute(\"closed\");\n\t};\n\n\tconst categories: CookieCategory[] = cookieConfig\n\t\t? Object.keys(cookieConfig.cookies)\n\t\t\t\t.filter(\n\t\t\t\t\t(key) =>\n\t\t\t\t\t\tcookieConfig.cookies[key as keyof typeof cookieConfig.cookies],\n\t\t\t\t)\n\t\t\t\t.map((key) => ({\n\t\t\t\t\tkey,\n\t\t\t\t\tlabel: CATEGORY_LABELS[String(key)] ?? String(key),\n\t\t\t\t\tenabled:\n\t\t\t\t\t\tkey === \"essential\"\n\t\t\t\t\t\t\t? true\n\t\t\t\t\t\t\t: (draft[key as keyof CookieConsent] ??\n\t\t\t\t\t\t\t\tconsent?.[key as keyof CookieConsent] ??\n\t\t\t\t\t\t\t\tfalse),\n\t\t\t\t\tlocked: key === \"essential\",\n\t\t\t\t}))\n\t\t: [];\n\n\tconst toggle = (key: string) => {\n\t\tif (key === \"essential\") return;\n\t\tsetDraft((prev) => ({\n\t\t\t...prev,\n\t\t\t[key]: !(\n\t\t\t\tprev[key as keyof CookieConsent] ??\n\t\t\t\tconsent?.[key as keyof CookieConsent] ??\n\t\t\t\tfalse\n\t\t\t),\n\t\t}));\n\t};\n\n\tconst save = (onSave?: (consent: CookieConsent) => void) => {\n\t\tconst next = {\n\t\t\t...(consent ?? {}),\n\t\t\t...draft,\n\t\t\tessential: true,\n\t\t} as CookieConsent;\n\t\tupdate(next);\n\t\tsetDraft({});\n\t\tonSave?.(next);\n\t\tsetRoute(\"closed\");\n\t};\n\n\tconst rejectAllCategories = () => {\n\t\tif (!cookieConfig) return;\n\t\tconst next: CookieConsent = { essential: true };\n\t\tfor (const key of Object.keys(cookieConfig.cookies)) {\n\t\t\tif (key !== \"essential\") (next as Record<string, boolean>)[key] = false;\n\t\t}\n\t\tupdate(next);\n\t\tsetDraft({});\n\t\tsetRoute(\"closed\");\n\t};\n\n\treturn (\n\t\t<>\n\t\t\t<style href=\"@openpolicy/react\" precedence=\"default\">\n\t\t\t\t{defaultStyles}\n\t\t\t</style>\n\t\t\t<OpenPolicyContext.Provider\n\t\t\t\tvalue={{\n\t\t\t\t\tconfig,\n\t\t\t\t\tcookieConfig,\n\t\t\t\t\troute,\n\t\t\t\t\tsetRoute,\n\t\t\t\t\tstatus,\n\t\t\t\t\tconsent,\n\t\t\t\t\taccept,\n\t\t\t\t\treject,\n\t\t\t\t\tupdate,\n\t\t\t\t\treset,\n\t\t\t\t\thas,\n\t\t\t\t\tcategories,\n\t\t\t\t\ttoggle,\n\t\t\t\t\tsave,\n\t\t\t\t\trejectAll: rejectAllCategories,\n\t\t\t\t}}\n\t\t\t>\n\t\t\t\t{children}\n\t\t\t</OpenPolicyContext.Provider>\n\t\t</>\n\t);\n}\n","import { useContext } from \"react\";\nimport type { CookieCategory, CookieRoute } from \"../context\";\nimport { OpenPolicyContext } from \"../context\";\n\nexport type { CookieCategory, CookieRoute };\n\nexport function useCookies() {\n\tconst {\n\t\troute,\n\t\tsetRoute,\n\t\tstatus,\n\t\tconsent,\n\t\taccept,\n\t\trejectAll,\n\t\tcategories,\n\t\ttoggle,\n\t\tsave,\n\t\treset,\n\t\thas,\n\t} = useContext(OpenPolicyContext);\n\n\treturn {\n\t\tstatus,\n\t\tconsent,\n\t\tcategories,\n\t\troute,\n\t\thas,\n\t\tacceptAll: accept,\n\t\tacceptNecessary: rejectAll,\n\t\ttoggle,\n\t\tsave,\n\t\treset,\n\t\tsetRoute,\n\t} as const;\n}\n","import type { ReactNode } from \"react\";\nimport type { HasExpression } from \"../context\";\nimport { useCookies } from \"../hooks/useCookies\";\n\ninterface ConsentGateProps {\n\trequires: HasExpression;\n\tfallback?: ReactNode;\n\tchildren: ReactNode;\n}\n\nexport function ConsentGate({\n\trequires,\n\tfallback = null,\n\tchildren,\n}: ConsentGateProps) {\n\tconst { has } = useCookies();\n\treturn has(requires) ? children : fallback;\n}\n","import type {\n\tBoldNode,\n\tDocumentSection,\n\tHeadingNode,\n\tItalicNode,\n\tLinkNode,\n\tNode,\n\tTextNode,\n} from \"@openpolicy/core\";\nimport type { ReactNode } from \"react\";\nimport type { PolicyComponents } from \"../types\";\n\nexport function DefaultHeading({ node }: { node: HeadingNode }) {\n\tconst level = node.level ?? 2;\n\tconst Tag = `h${level}` as \"h1\" | \"h2\" | \"h3\" | \"h4\" | \"h5\" | \"h6\";\n\treturn (\n\t\t<Tag data-op-heading className=\"op-heading\">\n\t\t\t{node.value}\n\t\t</Tag>\n\t);\n}\n\nexport function DefaultText({ node }: { node: TextNode }) {\n\treturn <>{node.value}</>;\n}\n\nexport function DefaultBold({ node }: { node: BoldNode }) {\n\treturn <strong className=\"op-bold\">{node.value}</strong>;\n}\n\nfunction DefaultItalic({ node }: { node: ItalicNode }) {\n\treturn <em className=\"op-italic\">{node.value}</em>;\n}\n\nexport function DefaultLink({ node }: { node: LinkNode }) {\n\treturn (\n\t\t<a href={node.href} className=\"op-link\">\n\t\t\t{node.value}\n\t\t</a>\n\t);\n}\n\nexport function DefaultSection({\n\tsection,\n\tchildren,\n}: {\n\tsection: DocumentSection;\n\tchildren: ReactNode;\n}) {\n\treturn (\n\t\t<section\n\t\t\tdata-op-section\n\t\t\tclassName=\"op-section\"\n\t\t\tid={section.id}\n\t\t\t{...(section.context?.reason && {\n\t\t\t\t\"data-op-reason\": section.context.reason,\n\t\t\t})}\n\t\t>\n\t\t\t{children}\n\t\t</section>\n\t);\n}\n\nexport function DefaultParagraph({\n\tnode: _node,\n\tchildren,\n}: {\n\tnode: import(\"@openpolicy/core\").ParagraphNode;\n\tchildren: ReactNode;\n}) {\n\treturn (\n\t\t<p data-op-paragraph className=\"op-paragraph\">\n\t\t\t{children}\n\t\t</p>\n\t);\n}\n\nexport function DefaultList({\n\tnode,\n\tchildren,\n}: {\n\tnode: import(\"@openpolicy/core\").ListNode;\n\tchildren: ReactNode;\n}) {\n\tconst Tag = node.ordered ? \"ol\" : \"ul\";\n\treturn (\n\t\t<Tag data-op-list className=\"op-list\">\n\t\t\t{children}\n\t\t</Tag>\n\t);\n}\n\nexport function renderNode(\n\tnode: Node,\n\tcomponents: PolicyComponents,\n\tkey?: number,\n): ReactNode {\n\tswitch (node.type) {\n\t\tcase \"document\":\n\t\t\treturn <>{node.sections.map((s, i) => renderNode(s, components, i))}</>;\n\n\t\tcase \"section\": {\n\t\t\tconst SectionComp = components.Section ?? DefaultSection;\n\t\t\treturn (\n\t\t\t\t<SectionComp key={key} section={node}>\n\t\t\t\t\t{node.content.map((n, i) => renderNode(n, components, i))}\n\t\t\t\t</SectionComp>\n\t\t\t);\n\t\t}\n\n\t\tcase \"heading\": {\n\t\t\tconst HeadingComp = components.Heading ?? DefaultHeading;\n\t\t\treturn <HeadingComp key={key} node={node} />;\n\t\t}\n\n\t\tcase \"paragraph\": {\n\t\t\tconst children = node.children.map((n, i) =>\n\t\t\t\trenderNode(n, components, i),\n\t\t\t);\n\t\t\tif (components.Paragraph)\n\t\t\t\treturn (\n\t\t\t\t\t<components.Paragraph key={key} node={node}>\n\t\t\t\t\t\t{children}\n\t\t\t\t\t</components.Paragraph>\n\t\t\t\t);\n\t\t\treturn (\n\t\t\t\t<p key={key} data-op-paragraph className=\"op-paragraph\">\n\t\t\t\t\t{children}\n\t\t\t\t</p>\n\t\t\t);\n\t\t}\n\n\t\tcase \"list\": {\n\t\t\tconst children = node.items.map((item, i) =>\n\t\t\t\trenderNode(item, components, i),\n\t\t\t);\n\t\t\tif (components.List)\n\t\t\t\treturn (\n\t\t\t\t\t<components.List key={key} node={node}>\n\t\t\t\t\t\t{children}\n\t\t\t\t\t</components.List>\n\t\t\t\t);\n\t\t\tconst ListTag = node.ordered ? \"ol\" : \"ul\";\n\t\t\treturn (\n\t\t\t\t<ListTag key={key} data-op-list className=\"op-list\">\n\t\t\t\t\t{children}\n\t\t\t\t</ListTag>\n\t\t\t);\n\t\t}\n\n\t\tcase \"listItem\":\n\t\t\treturn (\n\t\t\t\t<li key={key} data-op-list-item className=\"op-list-item\">\n\t\t\t\t\t{node.children.map((n, i) => renderNode(n, components, i))}\n\t\t\t\t</li>\n\t\t\t);\n\n\t\tcase \"text\": {\n\t\t\tconst Comp = components.Text ?? DefaultText;\n\t\t\treturn <Comp key={key} node={node} />;\n\t\t}\n\t\tcase \"bold\": {\n\t\t\tconst Comp = components.Bold ?? DefaultBold;\n\t\t\treturn <Comp key={key} node={node} />;\n\t\t}\n\t\tcase \"italic\": {\n\t\t\tconst Comp = components.Italic ?? DefaultItalic;\n\t\t\treturn <Comp key={key} node={node} />;\n\t\t}\n\t\tcase \"link\": {\n\t\t\tconst Comp = components.Link ?? DefaultLink;\n\t\t\treturn <Comp key={key} node={node} />;\n\t\t}\n\t}\n}\n","import type { Document } from \"@openpolicy/core\";\nimport type { ReactNode } from \"react\";\nimport { renderNode } from \"./components/defaults\";\nimport type { PolicyComponents } from \"./types\";\n\nexport function renderDocument(\n\tdoc: Document,\n\tcomponents: PolicyComponents = {},\n): ReactNode {\n\treturn renderNode(doc, components);\n}\n","import {\n\ttype CookiePolicyConfig,\n\tcompile,\n\texpandOpenPolicyConfig,\n\tisOpenPolicyConfig,\n\ttype OpenPolicyConfig,\n} from \"@openpolicy/core\";\nimport { type CSSProperties, useContext } from \"react\";\nimport { OpenPolicyContext } from \"../context\";\nimport { renderDocument } from \"../render\";\nimport type { PolicyComponents } from \"../types\";\n\ninterface CookiePolicyProps {\n\tconfig?: OpenPolicyConfig | CookiePolicyConfig;\n\tcomponents?: PolicyComponents;\n\tstyle?: CSSProperties;\n}\n\nexport function CookiePolicy({\n\tconfig: configProp,\n\tcomponents,\n\tstyle,\n}: CookiePolicyProps) {\n\tconst { config: contextConfig } = useContext(OpenPolicyContext);\n\tconst config = configProp ?? contextConfig ?? undefined;\n\tif (!config) return null;\n\tconst input = isOpenPolicyConfig(config)\n\t\t? expandOpenPolicyConfig(config).find((i) => i.type === \"cookie\")\n\t\t: { type: \"cookie\" as const, ...config };\n\tif (!input) return null;\n\tconst doc = compile(input);\n\treturn (\n\t\t<div data-op-policy className=\"op-policy\" style={style}>\n\t\t\t{renderDocument(doc, components)}\n\t\t</div>\n\t);\n}\n","import {\n\tcompile,\n\texpandOpenPolicyConfig,\n\tisOpenPolicyConfig,\n\ttype OpenPolicyConfig,\n\ttype PrivacyPolicyConfig,\n} from \"@openpolicy/core\";\nimport { type CSSProperties, useContext } from \"react\";\nimport { OpenPolicyContext } from \"../context\";\nimport { renderDocument } from \"../render\";\nimport type { PolicyComponents } from \"../types\";\n\ninterface PrivacyPolicyProps {\n\tconfig?: OpenPolicyConfig | PrivacyPolicyConfig;\n\tcomponents?: PolicyComponents;\n\tstyle?: CSSProperties;\n}\n\nexport function PrivacyPolicy({\n\tconfig: configProp,\n\tcomponents,\n\tstyle,\n}: PrivacyPolicyProps) {\n\tconst { config: contextConfig } = useContext(OpenPolicyContext);\n\tconst config = configProp ?? contextConfig ?? undefined;\n\tif (!config) return null;\n\tconst input = isOpenPolicyConfig(config)\n\t\t? expandOpenPolicyConfig(config).find((i) => i.type === \"privacy\")\n\t\t: { type: \"privacy\" as const, ...config };\n\tif (!input) return null;\n\tconst doc = compile(input);\n\treturn (\n\t\t<div data-op-policy className=\"op-policy\" style={style}>\n\t\t\t{renderDocument(doc, components)}\n\t\t</div>\n\t);\n}\n","import {\n\tcompile,\n\texpandOpenPolicyConfig,\n\tisOpenPolicyConfig,\n\ttype OpenPolicyConfig,\n\ttype TermsOfServiceConfig,\n} from \"@openpolicy/core\";\nimport { type CSSProperties, useContext } from \"react\";\nimport { OpenPolicyContext } from \"../context\";\nimport { renderDocument } from \"../render\";\nimport type { PolicyComponents } from \"../types\";\n\ninterface TermsOfServiceProps {\n\tconfig?: OpenPolicyConfig | TermsOfServiceConfig;\n\tcomponents?: PolicyComponents;\n\tstyle?: CSSProperties;\n}\n\nexport function TermsOfService({\n\tconfig: configProp,\n\tcomponents,\n\tstyle,\n}: TermsOfServiceProps) {\n\tconst { config: contextConfig } = useContext(OpenPolicyContext);\n\tconst config = configProp ?? contextConfig ?? undefined;\n\tif (!config) return null;\n\tconst input = isOpenPolicyConfig(config)\n\t\t? expandOpenPolicyConfig(config).find((i) => i.type === \"terms\")\n\t\t: { type: \"terms\" as const, ...config };\n\tif (!input) return null;\n\tconst doc = compile(input);\n\treturn (\n\t\t<div data-op-policy className=\"op-policy\" style={style}>\n\t\t\t{renderDocument(doc, components)}\n\t\t</div>\n\t);\n}\n"],"mappings":";;;AACA,SAAS,UAAU,QAAQ;CAC1B,MAAM,UAAU,EAAE,WAAW,MAAM;AACnC,MAAK,MAAM,CAAC,KAAK,UAAU,OAAO,QAAQ,OAAO,QAAQ,EAAE;AAC1D,MAAI,QAAQ,YAAa;AACzB,UAAQ,OAAO,QAAQ,MAAM;;AAE9B,QAAO;;AAER,SAAS,UAAU,QAAQ;CAC1B,MAAM,UAAU,EAAE,WAAW,MAAM;AACnC,KAAI,OAAQ,MAAK,MAAM,OAAO,OAAO,KAAK,OAAO,QAAQ,EAAE;AAC1D,MAAI,QAAQ,YAAa;AACzB,UAAQ,OAAO;;AAEhB,QAAO;;AAIR,MAAM,WAAW,OAAO,gBAAgB,YAAY;CACnD,MAAM,QAAQ,OAAO,m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AG;EAAQ;AAC1C,KAAI,CAAC,MAAO,QAAO;CACnB,MAAM,MAAM,QAAQ,MAAM;AAC1B,QACC,oBAAC,OAAD;EAAK,kBAAA;EAAe,WAAU;EAAmB;YAC/C,eAAe,KAAK,WAAW;EAC3B,CAAA;;;;AChBR,SAAgB,eAAe,EAC9B,QAAQ,YACR,YACA,SACuB;CACvB,MAAM,EAAE,QAAQ,kBAAkB,WAAW,kBAAkB;CAC/D,MAAM,SAAS,cAAc,iBAAiB,KAAA;AAC9C,KAAI,CAAC,OAAQ,QAAO;CACpB,MAAM,QAAQ,mBAAmB,OAAO,GACrC,uBAAuB,OAAO,CAAC,MAAM,MAAM,EAAE,SAAS,QAAQ,GAC9D;EAAE,MAAM;EAAkB,GAAG;EAAQ;AACxC,KAAI,CAAC,MAAO,QAAO;CACnB,MAAM,MAAM,QAAQ,MAAM;AAC1B,QACC,oBAAC,OAAD;EAAK,kBAAA;EAAe,WAAU;EAAmB;YAC/C,eAAe,KAAK,WAAW;EAC3B,CAAA"}
|
package/package.json
CHANGED
package/styles.css
CHANGED
|
@@ -1,30 +1,30 @@
|
|
|
1
1
|
/* @openpolicy/react/styles.css — opt-in default styles */
|
|
2
2
|
:root {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
3
|
+
--op-font-family: system-ui, sans-serif;
|
|
4
|
+
--op-font-size-body: 1rem;
|
|
5
|
+
--op-font-size-heading: 1.25rem;
|
|
6
|
+
--op-heading-color: #111;
|
|
7
|
+
--op-body-color: #444;
|
|
8
|
+
--op-section-gap: 2rem;
|
|
9
|
+
--op-border-color: #e5e5e5;
|
|
10
|
+
--op-border-radius: 0.25rem;
|
|
11
|
+
--op-line-height: 1.6;
|
|
12
12
|
}
|
|
13
13
|
|
|
14
14
|
[data-op-policy] {
|
|
15
|
-
|
|
16
|
-
|
|
15
|
+
font-family: var(--op-font-family);
|
|
16
|
+
color: var(--op-body-color);
|
|
17
17
|
}
|
|
18
18
|
|
|
19
19
|
[data-op-section] {
|
|
20
|
-
|
|
20
|
+
margin-bottom: var(--op-section-gap);
|
|
21
21
|
}
|
|
22
22
|
|
|
23
23
|
[data-op-heading] {
|
|
24
|
-
|
|
25
|
-
|
|
24
|
+
color: var(--op-heading-color);
|
|
25
|
+
font-size: var(--op-font-size-heading);
|
|
26
26
|
}
|
|
27
27
|
|
|
28
28
|
[data-op-body] {
|
|
29
|
-
|
|
29
|
+
line-height: var(--op-line-height);
|
|
30
30
|
}
|