@tokenoftrust/storefront-runner 2.2.114 → 2.2.115

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.
@@ -95,16 +95,14 @@ const HOST_STYLE_FLOOR = {
95
95
  opacity: "1",
96
96
  "pointer-events": "none",
97
97
  } as const;
98
+ const HOST_STYLE_ATTRIBUTE = Object.entries(HOST_STYLE_FLOOR)
99
+ .map(([property, value]) => `${property}: ${value} !important;`)
100
+ .join(" ");
98
101
 
99
102
  /** Inline-important floor: tenant selectors cannot hide or cover the compliance host. */
100
103
  export function hardenComplianceHost(host: HTMLElement): void {
101
- for (const [property, value] of Object.entries(HOST_STYLE_FLOOR)) {
102
- if (
103
- host.style.getPropertyValue(property) !== value ||
104
- host.style.getPropertyPriority(property) !== "important"
105
- ) {
106
- host.style.setProperty(property, value, "important");
107
- }
104
+ if (host.getAttribute("style") !== HOST_STYLE_ATTRIBUTE) {
105
+ host.setAttribute("style", HOST_STYLE_ATTRIBUTE);
108
106
  }
109
107
  }
110
108
 
@@ -165,6 +163,7 @@ export function mountIsolatedAgeGate({ minAge, brand, tenantId, presentation }:
165
163
 
166
164
  const mount = document.createElement("div");
167
165
  shadow.appendChild(mount);
166
+ document.body.appendChild(host);
168
167
  render(
169
168
  <AgeGate
170
169
  minAge={minAge}
@@ -183,7 +182,6 @@ export function mountIsolatedAgeGate({ minAge, brand, tenantId, presentation }:
183
182
  />,
184
183
  mount,
185
184
  );
186
- document.body.appendChild(host);
187
185
 
188
186
  // Re-assert: restore the host if tenant code detaches or hides it.
189
187
  const ensure = () => {
@@ -627,13 +627,9 @@ export const CHROME_BEHAVIOR_JS = `(function () {
627
627
 
628
628
  var host = document.createElement('div');
629
629
  host.setAttribute('data-tot-compliance', '');
630
+ var gstyle = 'all: initial !important; display: block !important; position: fixed !important; inset: 0 !important; z-index: 2147483647 !important; visibility: visible !important; opacity: 1 !important; pointer-events: none !important;';
630
631
  var gharden = function () {
631
- var floor = { all: 'initial', display: 'block', position: 'fixed', inset: '0', 'z-index': '2147483647', visibility: 'visible', opacity: '1', 'pointer-events': 'none' };
632
- Object.keys(floor).forEach(function (property) {
633
- if (host.style.getPropertyValue(property) !== floor[property] || host.style.getPropertyPriority(property) !== 'important') {
634
- host.style.setProperty(property, floor[property], 'important');
635
- }
636
- });
632
+ if (host.getAttribute('style') !== gstyle) host.setAttribute('style', gstyle);
637
633
  };
638
634
  gharden();
639
635
  var shadow = host.attachShadow({ mode: 'closed' });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tokenoftrust/storefront-runner",
3
- "version": "2.2.114",
3
+ "version": "2.2.115",
4
4
  "license": "SEE LICENSE IN LICENSE",
5
5
  "description": "World-shareable storefront runner: multi-tenant renderer on Astro/Cloudflare. No control plane.",
6
6
  "packageManager": "pnpm@11.9.0",