@inglorious/web 6.5.1 → 6.6.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/README.md CHANGED
@@ -1851,6 +1851,7 @@ Check out these demos to see `@inglorious/web` in action:
1851
1851
 
1852
1852
  - [**@inglorious/ssx**](https://www.npmjs.com/package/@inglorious/ssx) - Static site generation with pre-rendering and client hydration
1853
1853
  - [**@inglorious/store**](https://www.npmjs.com/package/@inglorious/store) - Entity-based state management (used by @inglorious/web)
1854
+ - [**@inglorious/i18n**](https://www.npmjs.com/package/@inglorious/i18n) - Internationalization: translations, plurals and formatting driven by a store entity
1854
1855
  - [**@inglorious/engine**](https://www.npmjs.com/package/@inglorious/engine) - Game engine with the same entity architecture
1855
1856
  - [**@inglorious/create-app**](https://www.npmjs.com/package/@inglorious/create-app) - Scaffolding tool for quick project setup
1856
1857
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@inglorious/web",
3
- "version": "6.5.1",
3
+ "version": "6.6.0",
4
4
  "description": "A new web framework that leverages the power of the Inglorious Store combined with the performance and simplicity of lit-html.",
5
5
  "author": "Matteo Antony Mistretta <antony.mistretta@gmail.com> (https://ingloriouscoderz.it)",
6
6
  "contributors": [
@@ -104,12 +104,12 @@
104
104
  },
105
105
  "sideEffects": false,
106
106
  "dependencies": {
107
- "@inglorious/utils": "4.0.0",
107
+ "@inglorious/utils": "5.0.0",
108
108
  "@lit-labs/ssr-client": "^1.1.8",
109
109
  "lit-html": "^3.3.3"
110
110
  },
111
111
  "peerDependencies": {
112
- "@inglorious/store": "11.0.2"
112
+ "@inglorious/store": "11.0.3"
113
113
  },
114
114
  "devDependencies": {
115
115
  "@inglorious/eslint-config": "1.1.2",
package/src/mount.js CHANGED
@@ -5,6 +5,8 @@
5
5
 
6
6
  import { html, render } from "lit-html"
7
7
 
8
+ import { isNative } from "./mobile/index.js"
9
+
8
10
  /**
9
11
  * Mounts a lit-html template to the DOM and subscribes to a store for re-rendering.
10
12
  * @param {Store} store - The application state store.
@@ -24,6 +26,10 @@ export async function mount(store, renderFn, element, options = {}) {
24
26
  hydrate: allowHydrate = true,
25
27
  } = options
26
28
 
29
+ // Tells CSS the native app from a browser tab, which env() cannot: the
30
+ // safe-area tokens of @inglorious/ui key off it.
31
+ document.documentElement.classList.toggle("iw-native", isNative())
32
+
27
33
  const api = { ...store._api }
28
34
  api.render = createRender(api)
29
35