featurely-site-manager 1.1.19 → 1.1.20

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.js CHANGED
@@ -383,9 +383,16 @@ var _SiteManager = class _SiteManager {
383
383
  const isGlobalDebug = newConfig.debugMode === true;
384
384
  const hostname = typeof window !== "undefined" ? window.location.hostname : "";
385
385
  const envs = newConfig.environments;
386
- const matchedEnv = hostname ? envs == null ? void 0 : envs.find(
387
- (e) => typeof e.url === "string" && e.url !== "" && e.url === hostname
388
- ) : void 0;
386
+ const matchedEnv = hostname ? envs == null ? void 0 : envs.find((e) => {
387
+ if (typeof e.url !== "string" || e.url === "") return false;
388
+ let storedHost;
389
+ try {
390
+ storedHost = e.url.includes("://") ? new URL(e.url).hostname : e.url;
391
+ } catch {
392
+ storedHost = e.url;
393
+ }
394
+ return storedHost === hostname;
395
+ }) : void 0;
389
396
  const isEnvDebug = (matchedEnv == null ? void 0 : matchedEnv.debugEnabled) === true;
390
397
  const shouldDebug = isGlobalDebug || isEnvDebug;
391
398
  if (shouldDebug && !this.debugOverlayEl) {
@@ -1587,7 +1594,8 @@ var _SiteManager = class _SiteManager {
1587
1594
 
1588
1595
  .featurely-message-body {
1589
1596
  font-size: 14px;
1590
- opacity: 0.9;
1597
+ /* opacity < 1 reduces effective contrast; inherit full color from parent */
1598
+ opacity: 1;
1591
1599
  }
1592
1600
 
1593
1601
  .featurely-message-cta {
@@ -1638,16 +1646,17 @@ var _SiteManager = class _SiteManager {
1638
1646
 
1639
1647
  .featurely-message-warning {
1640
1648
  background: #fff3e0;
1641
- color: #f57c00;
1649
+ /* #803600 on #fff3e0 \u2248 7.8:1 contrast \u2014 WCAG AA compliant */
1650
+ color: #803600;
1642
1651
  }
1643
1652
 
1644
1653
  .featurely-message-warning .featurely-message-cta {
1645
- background: #f57c00;
1654
+ background: #803600;
1646
1655
  color: white;
1647
1656
  }
1648
1657
 
1649
1658
  .featurely-message-warning .featurely-message-cta:hover {
1650
- background: #ef6c00;
1659
+ background: #6b2d00;
1651
1660
  }
1652
1661
 
1653
1662
  .featurely-message-error {
package/dist/index.mjs CHANGED
@@ -348,9 +348,16 @@ var _SiteManager = class _SiteManager {
348
348
  const isGlobalDebug = newConfig.debugMode === true;
349
349
  const hostname = typeof window !== "undefined" ? window.location.hostname : "";
350
350
  const envs = newConfig.environments;
351
- const matchedEnv = hostname ? envs == null ? void 0 : envs.find(
352
- (e) => typeof e.url === "string" && e.url !== "" && e.url === hostname
353
- ) : void 0;
351
+ const matchedEnv = hostname ? envs == null ? void 0 : envs.find((e) => {
352
+ if (typeof e.url !== "string" || e.url === "") return false;
353
+ let storedHost;
354
+ try {
355
+ storedHost = e.url.includes("://") ? new URL(e.url).hostname : e.url;
356
+ } catch {
357
+ storedHost = e.url;
358
+ }
359
+ return storedHost === hostname;
360
+ }) : void 0;
354
361
  const isEnvDebug = (matchedEnv == null ? void 0 : matchedEnv.debugEnabled) === true;
355
362
  const shouldDebug = isGlobalDebug || isEnvDebug;
356
363
  if (shouldDebug && !this.debugOverlayEl) {
@@ -1552,7 +1559,8 @@ var _SiteManager = class _SiteManager {
1552
1559
 
1553
1560
  .featurely-message-body {
1554
1561
  font-size: 14px;
1555
- opacity: 0.9;
1562
+ /* opacity < 1 reduces effective contrast; inherit full color from parent */
1563
+ opacity: 1;
1556
1564
  }
1557
1565
 
1558
1566
  .featurely-message-cta {
@@ -1603,16 +1611,17 @@ var _SiteManager = class _SiteManager {
1603
1611
 
1604
1612
  .featurely-message-warning {
1605
1613
  background: #fff3e0;
1606
- color: #f57c00;
1614
+ /* #803600 on #fff3e0 \u2248 7.8:1 contrast \u2014 WCAG AA compliant */
1615
+ color: #803600;
1607
1616
  }
1608
1617
 
1609
1618
  .featurely-message-warning .featurely-message-cta {
1610
- background: #f57c00;
1619
+ background: #803600;
1611
1620
  color: white;
1612
1621
  }
1613
1622
 
1614
1623
  .featurely-message-warning .featurely-message-cta:hover {
1615
- background: #ef6c00;
1624
+ background: #6b2d00;
1616
1625
  }
1617
1626
 
1618
1627
  .featurely-message-error {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "featurely-site-manager",
3
- "version": "1.1.19",
3
+ "version": "1.1.20",
4
4
  "description": "Complete site management SDK for maintenance mode, status messages, feature flags, version checking, and analytics",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",