@redacto.io/consent-sdk-react 11.0.0-beta.2 → 11.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.mts CHANGED
@@ -1,6 +1,6 @@
1
1
  import * as React from 'react';
2
2
  import React__default from 'react';
3
- import { A as AppearanceStyle, N as NoticeControlStyle, a as NoticeMobileLayout, b as NoticeDesktopPosition, c as NoticeBackdrop, d as NoticePhoneFooter, e as NoticeTextScale, f as NoticeAppearance } from './types-Bwtzvz4W.mjs';
3
+ import { A as AppearanceStyle, N as NoticeControlStyle, a as NoticeMobileLayout, b as NoticeDesktopPosition, c as NoticeBackdrop, d as NoticePhoneFooter, e as NoticeTextScale, f as NoticeAppearance } from './types-B8qroG0j.mjs';
4
4
  import { f as NoticeFontOptions } from './types-xaCyZUfo.mjs';
5
5
 
6
6
  /**
package/dist/index.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import * as React from 'react';
2
2
  import React__default from 'react';
3
- import { A as AppearanceStyle, N as NoticeControlStyle, a as NoticeMobileLayout, b as NoticeDesktopPosition, c as NoticeBackdrop, d as NoticePhoneFooter, e as NoticeTextScale, f as NoticeAppearance } from './types-Bwtzvz4W.js';
3
+ import { A as AppearanceStyle, N as NoticeControlStyle, a as NoticeMobileLayout, b as NoticeDesktopPosition, c as NoticeBackdrop, d as NoticePhoneFooter, e as NoticeTextScale, f as NoticeAppearance } from './types-B8qroG0j.js';
4
4
  import { f as NoticeFontOptions } from './types-xaCyZUfo.js';
5
5
 
6
6
  /**
package/dist/index.js CHANGED
@@ -6526,6 +6526,7 @@ var NoticeConsentView = ({
6526
6526
  setCachedAppearance(readCachedAppearance(noticeId));
6527
6527
  }, [noticeId]);
6528
6528
  const servedAppearance = content ? content.appearance : cachedAppearance;
6529
+ const showsProductSection = (servedAppearance == null ? void 0 : servedAppearance.show_product_section) !== false;
6529
6530
  const noticeAppearance = useNoticeAppearance(
6530
6531
  servedAppearance,
6531
6532
  settings,
@@ -7525,6 +7526,9 @@ var NoticeConsentView = ({
7525
7526
  if (!products || products.length !== 1) {
7526
7527
  return rows;
7527
7528
  }
7529
+ if (!showsProductSection) {
7530
+ return rows;
7531
+ }
7528
7532
  const product = products[0];
7529
7533
  const purposes = (_a2 = content == null ? void 0 : content.purposes) != null ? _a2 : [];
7530
7534
  const boxPurposes = productBoxPurposes(purposes);
package/dist/index.mjs CHANGED
@@ -5537,6 +5537,7 @@ var NoticeConsentView = ({
5537
5537
  setCachedAppearance(readCachedAppearance(noticeId));
5538
5538
  }, [noticeId]);
5539
5539
  const servedAppearance = content ? content.appearance : cachedAppearance;
5540
+ const showsProductSection = (servedAppearance == null ? void 0 : servedAppearance.show_product_section) !== false;
5540
5541
  const noticeAppearance = useNoticeAppearance(
5541
5542
  servedAppearance,
5542
5543
  settings,
@@ -6536,6 +6537,9 @@ var NoticeConsentView = ({
6536
6537
  if (!products || products.length !== 1) {
6537
6538
  return rows;
6538
6539
  }
6540
+ if (!showsProductSection) {
6541
+ return rows;
6542
+ }
6539
6543
  const product = products[0];
6540
6544
  const purposes = (_a2 = content == null ? void 0 : content.purposes) != null ? _a2 : [];
6541
6545
  const boxPurposes = productBoxPurposes(purposes);
@@ -1,6 +1,6 @@
1
1
  import * as React from 'react';
2
2
  import { ReactNode } from 'react';
3
- import { P as PrivacyCenterTheme } from './types-Bwtzvz4W.mjs';
3
+ import { P as PrivacyCenterTheme } from './types-B8qroG0j.mjs';
4
4
  import * as _tanstack_react_query from '@tanstack/react-query';
5
5
 
6
6
  /**
@@ -250,12 +250,15 @@ type PrivacyCenterFooterLink = Readonly<{
250
250
  label: string;
251
251
  url: string;
252
252
  }>;
253
+ type PrivacyCenterLogoAlign = 'auto' | 'left' | 'center' | 'right';
253
254
  type PrivacyCenterBrandingSettings = Readonly<{
254
255
  inherit_identity: boolean;
255
256
  display_name: string | null;
256
257
  logo_url: string | null;
257
258
  /** 28–96 px; `null` keeps the built-in size. */
258
259
  logo_height: number | null;
260
+ /** `"auto"` keeps the logo on the leading edge of the top bar. */
261
+ logo_align: PrivacyCenterLogoAlign;
259
262
  inherit_colors: boolean;
260
263
  primary_color: string | null;
261
264
  accent_color: string | null;
@@ -1,6 +1,6 @@
1
1
  import * as React from 'react';
2
2
  import { ReactNode } from 'react';
3
- import { P as PrivacyCenterTheme } from './types-Bwtzvz4W.js';
3
+ import { P as PrivacyCenterTheme } from './types-B8qroG0j.js';
4
4
  import * as _tanstack_react_query from '@tanstack/react-query';
5
5
 
6
6
  /**
@@ -250,12 +250,15 @@ type PrivacyCenterFooterLink = Readonly<{
250
250
  label: string;
251
251
  url: string;
252
252
  }>;
253
+ type PrivacyCenterLogoAlign = 'auto' | 'left' | 'center' | 'right';
253
254
  type PrivacyCenterBrandingSettings = Readonly<{
254
255
  inherit_identity: boolean;
255
256
  display_name: string | null;
256
257
  logo_url: string | null;
257
258
  /** 28–96 px; `null` keeps the built-in size. */
258
259
  logo_height: number | null;
260
+ /** `"auto"` keeps the logo on the leading edge of the top bar. */
261
+ logo_align: PrivacyCenterLogoAlign;
259
262
  inherit_colors: boolean;
260
263
  primary_color: string | null;
261
264
  accent_color: string | null;
@@ -14859,6 +14859,7 @@ var LANGUAGE_CODES = [
14859
14859
  ];
14860
14860
  var RTL_LANGUAGES = /* @__PURE__ */ new Set(["ur", "sd", "ks"]);
14861
14861
  var COUNTRY_CODES = ["+91", "+971", "+65", "+44", "+1"];
14862
+ var LOGO_ALIGNMENTS = ["auto", "left", "center", "right"];
14862
14863
  var FONT_FAMILIES = [
14863
14864
  "Inter",
14864
14865
  "Montserrat",
@@ -14911,6 +14912,7 @@ var DEFAULT_PRIVACY_CENTER_SETTINGS = {
14911
14912
  display_name: null,
14912
14913
  logo_url: null,
14913
14914
  logo_height: null,
14915
+ logo_align: "auto",
14914
14916
  inherit_colors: true,
14915
14917
  primary_color: null,
14916
14918
  accent_color: null,
@@ -16417,6 +16419,17 @@ function CompactLanguageMenu({ locale, options, onChange }) {
16417
16419
 
16418
16420
  // src/RedactoPrivacyCenter/components/AppShell/TopAppBar.tsx
16419
16421
  var import_jsx_runtime37 = require("react/jsx-runtime");
16422
+ var LOGO_GROUP_PLACEMENT = {
16423
+ // `left`, not `insetInlineStart`: the translation is physical, so a logical
16424
+ // offset would measure from the right under RTL and land off centre.
16425
+ center: {
16426
+ position: "absolute",
16427
+ left: "50%",
16428
+ transform: "translateX(-50%)"
16429
+ },
16430
+ right: { order: 1 }
16431
+ };
16432
+ var hamburgerLeadsHeader = (logoAlign) => logoAlign === "center" || logoAlign === "right";
16420
16433
  var TOP_BAR_LOGO_HEIGHT = 32;
16421
16434
  var TOP_BAR_LOGO_MAX_HEIGHT = 40;
16422
16435
  var TopAppBar = (0, import_react37.forwardRef)(function TopAppBar2({ onOpenMobileNav, showHamburger, locale, onLocaleChange, onBack, showNotifications = true }, hamburgerRef) {
@@ -16479,6 +16492,22 @@ var TopAppBar = (0, import_react37.forwardRef)(function TopAppBar2({ onOpenMobil
16479
16492
  fontFamily: "inherit",
16480
16493
  flexShrink: 0
16481
16494
  };
16495
+ const logoAlign = brandingSettings.logo_align;
16496
+ const hamburgerIsOwnItem = hamburgerLeadsHeader(logoAlign);
16497
+ const logoGroupStyle = {
16498
+ display: "flex",
16499
+ alignItems: "center",
16500
+ gap: 8,
16501
+ minWidth: 0,
16502
+ ...LOGO_GROUP_PLACEMENT[logoAlign]
16503
+ };
16504
+ const actionsStyle = {
16505
+ display: "flex",
16506
+ alignItems: "center",
16507
+ gap: 8,
16508
+ flexShrink: 0,
16509
+ ...logoAlign === "right" ? { order: 0 } : null
16510
+ };
16482
16511
  return /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(import_jsx_runtime37.Fragment, { children: [
16483
16512
  /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(
16484
16513
  "header",
@@ -16488,8 +16517,16 @@ var TopAppBar = (0, import_react37.forwardRef)(function TopAppBar2({ onOpenMobil
16488
16517
  style: headerStyle,
16489
16518
  ...partAttribute("topbar"),
16490
16519
  children: [
16491
- /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("div", { style: { display: "flex", alignItems: "center", gap: 8, minWidth: 0 }, children: [
16492
- showHamburger && /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
16520
+ showHamburger && hamburgerIsOwnItem && /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
16521
+ HamburgerButton,
16522
+ {
16523
+ ref: hamburgerRef,
16524
+ onClick: onOpenMobileNav,
16525
+ label: t("openSidebarMenu")
16526
+ }
16527
+ ),
16528
+ /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("div", { style: logoGroupStyle, children: [
16529
+ showHamburger && !hamburgerIsOwnItem && /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
16493
16530
  HamburgerButton,
16494
16531
  {
16495
16532
  ref: hamburgerRef,
@@ -16539,48 +16576,36 @@ var TopAppBar = (0, import_react37.forwardRef)(function TopAppBar2({ onOpenMobil
16539
16576
  }
16540
16577
  )
16541
16578
  ] }),
16542
- /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(
16543
- "div",
16544
- {
16545
- style: {
16546
- display: "flex",
16547
- alignItems: "center",
16548
- gap: 8,
16549
- flexShrink: 0
16550
- },
16551
- className: "pc-shell-topbar-actions",
16552
- children: [
16553
- !showSwitcher ? null : showHamburger ? /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
16554
- CompactLanguageMenu,
16555
- {
16556
- locale,
16557
- options: languageOptions2,
16558
- onChange: changeLanguage
16559
- }
16560
- ) : /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
16561
- PCSelect,
16562
- {
16563
- size: "sm",
16564
- searchable: true,
16565
- prefix: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(import_lucide_react8.Globe2, { size: 12, strokeWidth: 1.8 }),
16566
- searchPlaceholder: t("searchPlaceholder"),
16567
- noOptionsMessage: t("noOptionsFound"),
16568
- style: {
16569
- width: "auto",
16570
- minWidth: 120,
16571
- maxWidth: "min(60vw, 280px)",
16572
- flexShrink: 0
16573
- },
16574
- options: [...languageOptions2],
16575
- value: languageOptions2.find((opt) => opt.value === locale) || null,
16576
- onChange: handleLanguageChange
16577
- }
16578
- ),
16579
- showNotifications && isSectionEnabled("notifications") && /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(NotificationBell, {}),
16580
- /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(UserMenu, { onBack })
16581
- ]
16582
- }
16583
- )
16579
+ /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)("div", { style: actionsStyle, className: "pc-shell-topbar-actions", children: [
16580
+ !showSwitcher ? null : showHamburger ? /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
16581
+ CompactLanguageMenu,
16582
+ {
16583
+ locale,
16584
+ options: languageOptions2,
16585
+ onChange: changeLanguage
16586
+ }
16587
+ ) : /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
16588
+ PCSelect,
16589
+ {
16590
+ size: "sm",
16591
+ searchable: true,
16592
+ prefix: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(import_lucide_react8.Globe2, { size: 12, strokeWidth: 1.8 }),
16593
+ searchPlaceholder: t("searchPlaceholder"),
16594
+ noOptionsMessage: t("noOptionsFound"),
16595
+ style: {
16596
+ width: "auto",
16597
+ minWidth: 120,
16598
+ maxWidth: "min(60vw, 280px)",
16599
+ flexShrink: 0
16600
+ },
16601
+ options: [...languageOptions2],
16602
+ value: languageOptions2.find((opt) => opt.value === locale) || null,
16603
+ onChange: handleLanguageChange
16604
+ }
16605
+ ),
16606
+ showNotifications && isSectionEnabled("notifications") && /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(NotificationBell, {}),
16607
+ /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(UserMenu, { onBack })
16608
+ ] })
16584
16609
  ]
16585
16610
  }
16586
16611
  ),
@@ -28806,7 +28831,7 @@ var orderedToggles = (raw, keys, defaults) => {
28806
28831
  };
28807
28832
  var stringList = (raw, max) => Array.isArray(raw) ? raw.filter((item) => typeof item === "string").map((item) => item.trim()).filter(Boolean).slice(0, max) : [];
28808
28833
  var resolveBranding = (raw) => {
28809
- var _a;
28834
+ var _a, _b;
28810
28835
  const base = DEFAULT_PRIVACY_CENTER_SETTINGS.branding;
28811
28836
  const font = raw.font_family;
28812
28837
  return {
@@ -28814,11 +28839,12 @@ var resolveBranding = (raw) => {
28814
28839
  display_name: nullableText(raw.display_name, base.display_name),
28815
28840
  logo_url: nullableUrl(raw.logo_url, base.logo_url),
28816
28841
  logo_height: clampedInt(raw.logo_height, LOGO_HEIGHT_MIN, LOGO_HEIGHT_MAX, base.logo_height),
28842
+ logo_align: (_a = LOGO_ALIGNMENTS.find((value) => value === raw.logo_align)) != null ? _a : base.logo_align,
28817
28843
  inherit_colors: bool(raw.inherit_colors, base.inherit_colors),
28818
28844
  primary_color: hex(raw.primary_color, base.primary_color),
28819
28845
  accent_color: hex(raw.accent_color, base.accent_color),
28820
28846
  inherit_font: bool(raw.inherit_font, base.inherit_font),
28821
- font_family: font === null ? null : (_a = FONT_FAMILIES.find((family) => family === font)) != null ? _a : base.font_family,
28847
+ font_family: font === null ? null : (_b = FONT_FAMILIES.find((family) => family === font)) != null ? _b : base.font_family,
28822
28848
  style: raw.style === void 0 ? base.style : resolveAppearance(raw.style) === "glass" ? "glass" : "classic",
28823
28849
  corner_radius: clampedInt(raw.corner_radius, CORNER_RADIUS_MIN, CORNER_RADIUS_MAX, base.corner_radius)
28824
28850
  };
@@ -14132,6 +14132,7 @@ var LANGUAGE_CODES = [
14132
14132
  ];
14133
14133
  var RTL_LANGUAGES = /* @__PURE__ */ new Set(["ur", "sd", "ks"]);
14134
14134
  var COUNTRY_CODES = ["+91", "+971", "+65", "+44", "+1"];
14135
+ var LOGO_ALIGNMENTS = ["auto", "left", "center", "right"];
14135
14136
  var FONT_FAMILIES = [
14136
14137
  "Inter",
14137
14138
  "Montserrat",
@@ -14184,6 +14185,7 @@ var DEFAULT_PRIVACY_CENTER_SETTINGS = {
14184
14185
  display_name: null,
14185
14186
  logo_url: null,
14186
14187
  logo_height: null,
14188
+ logo_align: "auto",
14187
14189
  inherit_colors: true,
14188
14190
  primary_color: null,
14189
14191
  accent_color: null,
@@ -15666,6 +15668,17 @@ function CompactLanguageMenu({ locale, options, onChange }) {
15666
15668
 
15667
15669
  // src/RedactoPrivacyCenter/components/AppShell/TopAppBar.tsx
15668
15670
  import { Fragment as Fragment3, jsx as jsx37, jsxs as jsxs16 } from "react/jsx-runtime";
15671
+ var LOGO_GROUP_PLACEMENT = {
15672
+ // `left`, not `insetInlineStart`: the translation is physical, so a logical
15673
+ // offset would measure from the right under RTL and land off centre.
15674
+ center: {
15675
+ position: "absolute",
15676
+ left: "50%",
15677
+ transform: "translateX(-50%)"
15678
+ },
15679
+ right: { order: 1 }
15680
+ };
15681
+ var hamburgerLeadsHeader = (logoAlign) => logoAlign === "center" || logoAlign === "right";
15669
15682
  var TOP_BAR_LOGO_HEIGHT = 32;
15670
15683
  var TOP_BAR_LOGO_MAX_HEIGHT = 40;
15671
15684
  var TopAppBar = forwardRef2(function TopAppBar2({ onOpenMobileNav, showHamburger, locale, onLocaleChange, onBack, showNotifications = true }, hamburgerRef) {
@@ -15728,6 +15741,22 @@ var TopAppBar = forwardRef2(function TopAppBar2({ onOpenMobileNav, showHamburger
15728
15741
  fontFamily: "inherit",
15729
15742
  flexShrink: 0
15730
15743
  };
15744
+ const logoAlign = brandingSettings.logo_align;
15745
+ const hamburgerIsOwnItem = hamburgerLeadsHeader(logoAlign);
15746
+ const logoGroupStyle = {
15747
+ display: "flex",
15748
+ alignItems: "center",
15749
+ gap: 8,
15750
+ minWidth: 0,
15751
+ ...LOGO_GROUP_PLACEMENT[logoAlign]
15752
+ };
15753
+ const actionsStyle = {
15754
+ display: "flex",
15755
+ alignItems: "center",
15756
+ gap: 8,
15757
+ flexShrink: 0,
15758
+ ...logoAlign === "right" ? { order: 0 } : null
15759
+ };
15731
15760
  return /* @__PURE__ */ jsxs16(Fragment3, { children: [
15732
15761
  /* @__PURE__ */ jsxs16(
15733
15762
  "header",
@@ -15737,8 +15766,16 @@ var TopAppBar = forwardRef2(function TopAppBar2({ onOpenMobileNav, showHamburger
15737
15766
  style: headerStyle,
15738
15767
  ...partAttribute("topbar"),
15739
15768
  children: [
15740
- /* @__PURE__ */ jsxs16("div", { style: { display: "flex", alignItems: "center", gap: 8, minWidth: 0 }, children: [
15741
- showHamburger && /* @__PURE__ */ jsx37(
15769
+ showHamburger && hamburgerIsOwnItem && /* @__PURE__ */ jsx37(
15770
+ HamburgerButton,
15771
+ {
15772
+ ref: hamburgerRef,
15773
+ onClick: onOpenMobileNav,
15774
+ label: t("openSidebarMenu")
15775
+ }
15776
+ ),
15777
+ /* @__PURE__ */ jsxs16("div", { style: logoGroupStyle, children: [
15778
+ showHamburger && !hamburgerIsOwnItem && /* @__PURE__ */ jsx37(
15742
15779
  HamburgerButton,
15743
15780
  {
15744
15781
  ref: hamburgerRef,
@@ -15788,48 +15825,36 @@ var TopAppBar = forwardRef2(function TopAppBar2({ onOpenMobileNav, showHamburger
15788
15825
  }
15789
15826
  )
15790
15827
  ] }),
15791
- /* @__PURE__ */ jsxs16(
15792
- "div",
15793
- {
15794
- style: {
15795
- display: "flex",
15796
- alignItems: "center",
15797
- gap: 8,
15798
- flexShrink: 0
15799
- },
15800
- className: "pc-shell-topbar-actions",
15801
- children: [
15802
- !showSwitcher ? null : showHamburger ? /* @__PURE__ */ jsx37(
15803
- CompactLanguageMenu,
15804
- {
15805
- locale,
15806
- options: languageOptions2,
15807
- onChange: changeLanguage
15808
- }
15809
- ) : /* @__PURE__ */ jsx37(
15810
- PCSelect,
15811
- {
15812
- size: "sm",
15813
- searchable: true,
15814
- prefix: /* @__PURE__ */ jsx37(Globe2, { size: 12, strokeWidth: 1.8 }),
15815
- searchPlaceholder: t("searchPlaceholder"),
15816
- noOptionsMessage: t("noOptionsFound"),
15817
- style: {
15818
- width: "auto",
15819
- minWidth: 120,
15820
- maxWidth: "min(60vw, 280px)",
15821
- flexShrink: 0
15822
- },
15823
- options: [...languageOptions2],
15824
- value: languageOptions2.find((opt) => opt.value === locale) || null,
15825
- onChange: handleLanguageChange
15826
- }
15827
- ),
15828
- showNotifications && isSectionEnabled("notifications") && /* @__PURE__ */ jsx37(NotificationBell, {}),
15829
- /* @__PURE__ */ jsx37(UserMenu, { onBack })
15830
- ]
15831
- }
15832
- )
15828
+ /* @__PURE__ */ jsxs16("div", { style: actionsStyle, className: "pc-shell-topbar-actions", children: [
15829
+ !showSwitcher ? null : showHamburger ? /* @__PURE__ */ jsx37(
15830
+ CompactLanguageMenu,
15831
+ {
15832
+ locale,
15833
+ options: languageOptions2,
15834
+ onChange: changeLanguage
15835
+ }
15836
+ ) : /* @__PURE__ */ jsx37(
15837
+ PCSelect,
15838
+ {
15839
+ size: "sm",
15840
+ searchable: true,
15841
+ prefix: /* @__PURE__ */ jsx37(Globe2, { size: 12, strokeWidth: 1.8 }),
15842
+ searchPlaceholder: t("searchPlaceholder"),
15843
+ noOptionsMessage: t("noOptionsFound"),
15844
+ style: {
15845
+ width: "auto",
15846
+ minWidth: 120,
15847
+ maxWidth: "min(60vw, 280px)",
15848
+ flexShrink: 0
15849
+ },
15850
+ options: [...languageOptions2],
15851
+ value: languageOptions2.find((opt) => opt.value === locale) || null,
15852
+ onChange: handleLanguageChange
15853
+ }
15854
+ ),
15855
+ showNotifications && isSectionEnabled("notifications") && /* @__PURE__ */ jsx37(NotificationBell, {}),
15856
+ /* @__PURE__ */ jsx37(UserMenu, { onBack })
15857
+ ] })
15833
15858
  ]
15834
15859
  }
15835
15860
  ),
@@ -28026,7 +28051,7 @@ var orderedToggles = (raw, keys, defaults) => {
28026
28051
  };
28027
28052
  var stringList = (raw, max) => Array.isArray(raw) ? raw.filter((item) => typeof item === "string").map((item) => item.trim()).filter(Boolean).slice(0, max) : [];
28028
28053
  var resolveBranding = (raw) => {
28029
- var _a;
28054
+ var _a, _b;
28030
28055
  const base = DEFAULT_PRIVACY_CENTER_SETTINGS.branding;
28031
28056
  const font = raw.font_family;
28032
28057
  return {
@@ -28034,11 +28059,12 @@ var resolveBranding = (raw) => {
28034
28059
  display_name: nullableText(raw.display_name, base.display_name),
28035
28060
  logo_url: nullableUrl(raw.logo_url, base.logo_url),
28036
28061
  logo_height: clampedInt(raw.logo_height, LOGO_HEIGHT_MIN, LOGO_HEIGHT_MAX, base.logo_height),
28062
+ logo_align: (_a = LOGO_ALIGNMENTS.find((value) => value === raw.logo_align)) != null ? _a : base.logo_align,
28037
28063
  inherit_colors: bool(raw.inherit_colors, base.inherit_colors),
28038
28064
  primary_color: hex(raw.primary_color, base.primary_color),
28039
28065
  accent_color: hex(raw.accent_color, base.accent_color),
28040
28066
  inherit_font: bool(raw.inherit_font, base.inherit_font),
28041
- font_family: font === null ? null : (_a = FONT_FAMILIES.find((family) => family === font)) != null ? _a : base.font_family,
28067
+ font_family: font === null ? null : (_b = FONT_FAMILIES.find((family) => family === font)) != null ? _b : base.font_family,
28042
28068
  style: raw.style === void 0 ? base.style : resolveAppearance(raw.style) === "glass" ? "glass" : "classic",
28043
28069
  corner_radius: clampedInt(raw.corner_radius, CORNER_RADIUS_MIN, CORNER_RADIUS_MAX, base.corner_radius)
28044
28070
  };
@@ -53,6 +53,8 @@ type NoticeAppearance = Readonly<{
53
53
  desktop_position?: string;
54
54
  backdrop?: string;
55
55
  collapsible_sections?: boolean;
56
+ /** Only read when the notice covers one product. */
57
+ show_product_section?: boolean;
56
58
  phone_footer?: string;
57
59
  auto_dark?: boolean;
58
60
  dark_colors?: NoticeAppearanceColors;
@@ -53,6 +53,8 @@ type NoticeAppearance = Readonly<{
53
53
  desktop_position?: string;
54
54
  backdrop?: string;
55
55
  collapsible_sections?: boolean;
56
+ /** Only read when the notice covers one product. */
57
+ show_product_section?: boolean;
56
58
  phone_footer?: string;
57
59
  auto_dark?: boolean;
58
60
  dark_colors?: NoticeAppearanceColors;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@redacto.io/consent-sdk-react",
3
- "version": "11.0.0-beta.2",
3
+ "version": "11.0.0",
4
4
  "main": "dist/index.cjs",
5
5
  "module": "dist/index.mjs",
6
6
  "types": "dist/index.d.ts",