@pinnacle0/web-ui 0.6.29 → 0.6.30

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pinnacle0/web-ui",
3
- "version": "0.6.29",
3
+ "version": "0.6.30",
4
4
  "author": "Pinnacle",
5
5
  "license": "MIT",
6
6
  "sideEffects": [
@@ -3,9 +3,9 @@
3
3
  *
4
4
  * Uses the matchMedia API with orientation media queries, which provides
5
5
  * reliable cross-platform support including iOS 26+ where the legacy
6
- * window.orientation API has been removed.
6
+ * window.orientation API has been removed since iOS 26+ PWA is not supported.
7
7
  *
8
- * @see https://developer.mozilla.org/en-US/docs/Web/CSS/Media_Queries/Using_media_queries
8
+ * @see https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_media_queries/Testing_media_queries
9
9
  */
10
10
  export type OrientationType = "portrait" | "landscape";
11
11
  export type Subscriber = (orientation: OrientationType) => void;
@@ -3,9 +3,9 @@
3
3
  *
4
4
  * Uses the matchMedia API with orientation media queries, which provides
5
5
  * reliable cross-platform support including iOS 26+ where the legacy
6
- * window.orientation API has been removed.
6
+ * window.orientation API has been removed since iOS 26+ PWA is not supported.
7
7
  *
8
- * @see https://developer.mozilla.org/en-US/docs/Web/CSS/Media_Queries/Using_media_queries
8
+ * @see https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_media_queries/Testing_media_queries
9
9
  */
10
10
  function subscribe(subscriber) {
11
11
  const handler = () => subscriber(current());
@@ -30,8 +30,8 @@ function current() {
30
30
  return isPortrait ? "portrait" : "landscape";
31
31
  }
32
32
  catch {
33
- // Final fallback: compare dimensions
34
- return window.innerHeight >= window.innerWidth ? "portrait" : "landscape";
33
+ // Do not use window.innerHeight/window.innerWidth comparison, because it is incorrect if keyboard is popped up
34
+ return "portrait";
35
35
  }
36
36
  }
37
37
  export const OrientationUtil = Object.freeze({
@@ -1 +1 @@
1
- {"version":3,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