@klodd/ds 3.14.1 → 3.14.2

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.
Files changed (2) hide show
  1. package/js/pwa-register.js +13 -6
  2. package/package.json +1 -1
@@ -64,10 +64,14 @@
64
64
  /*------------------------------------------------------------
65
65
  Safe-area cold-start-fix (iOS PWA + Safari)
66
66
  iOS Safari beraknar env(safe-area-inset-bottom) felaktigt vid
67
- forsta render - .bottom-nav landar pa fel position. Att lasa
68
- computed style pa .bottom-nav tvingar WebKit att resolva
69
- env-varden i layout-passet, vilket retroaktivt korrigerar
70
- pilen-positionen.
67
+ forsta render - .bottom-nav landar pa fel position. Att appenda
68
+ ett fixed-positionerat probe-element och lasa dess
69
+ boundingClientRect tvingar WebKit att resolva env-varden i
70
+ layout-passet, vilket retroaktivt korrigerar pillen-positionen.
71
+
72
+ Probe + remove ar mer palitlig an att lasa computed style pa
73
+ .bottom-nav direkt - en frasch fixed-element pa varje event
74
+ tvingar layout regardless av cache-state.
71
75
 
72
76
  Trippel-event-binding tacker alla cold-start-cases:
73
77
  - DOMContentLoaded: tidigt efter document parsing
@@ -75,8 +79,11 @@
75
79
  - pageshow: iOS bfcache-restore (back/forward, switch tabs)
76
80
  ------------------------------------------------------------*/
77
81
  function forceSafeAreaOnNav() {
78
- const nav = doc.querySelector('.bottom-nav');
79
- if (nav) void getComputedStyle(nav).bottom;
82
+ const probe = doc.createElement('div');
83
+ probe.style.cssText = 'position:fixed;bottom:0;left:0;width:1px;height:1px;opacity:0;pointer-events:none;';
84
+ doc.body.appendChild(probe);
85
+ void probe.getBoundingClientRect();
86
+ probe.remove();
80
87
  }
81
88
 
82
89
  /*------------------------------------------------------------
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@klodd/ds",
3
- "version": "3.14.1",
3
+ "version": "3.14.2",
4
4
  "description": "Klodd shared design system - tokens, components, JS",
5
5
  "main": "css/index.css",
6
6
  "bin": {