@moku-labs/native 0.3.9 → 0.3.10
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 +1 -1
- package/dist/index.cjs +8 -4
- package/dist/index.mjs +8 -4
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -108,7 +108,7 @@ Each `build.run({ target })` walks the phase pipeline `scaffold → codegen →
|
|
|
108
108
|
|---|---|
|
|
109
109
|
| `display.setFrameRate(fps \| null)` / `display.maxHz` | Picks the slowest display mode at or above `fps` at the current resolution (`null` restores the default); `maxHz` is the panel's top rate. |
|
|
110
110
|
| `thermal.read()` | Thermal status and ADPF headroom; a `moku-native:thermal` event on `window` on every status change. |
|
|
111
|
-
| `insets.current` | Safe-area insets in CSS px, mirrored to `--moku-safe-top/right/bottom/left` on `<html
|
|
111
|
+
| `insets.current` | Safe-area insets in CSS px, mirrored to `--moku-device-safe-top/right/bottom/left` on `<html>` (a page's own `--moku-safe-*` wins over them), with a `moku-native:insets` event on `window`. |
|
|
112
112
|
| `device`, `ready` | Model, manufacturer and SDK level, filled in once `ready` resolves (it never rejects). |
|
|
113
113
|
| `build` | `{ profile: "release" \| "debug", id }` — baked in at generate time. |
|
|
114
114
|
| `share(file)` | Debug builds only: writes the bytes to the app cache and opens the share sheet. |
|
package/dist/index.cjs
CHANGED
|
@@ -1765,13 +1765,17 @@ const CONTRACT_BODY = String.raw` var MAX_SHARE_BYTES = 32 * 1024 * 1024;
|
|
|
1765
1765
|
g.dispatchEvent(new g.CustomEvent(type, { detail: detail }));
|
|
1766
1766
|
}
|
|
1767
1767
|
|
|
1768
|
+
// The system insets go in --moku-device-safe-*, never in --moku-safe-*: an inline property on
|
|
1769
|
+
// the root beats every stylesheet rule, so a page that sets --moku-safe-* from the insets (a gap
|
|
1770
|
+
// added to them) would lose its rule. A page reads them as
|
|
1771
|
+
// var(--moku-safe-top, var(--moku-device-safe-top, env(safe-area-inset-top))).
|
|
1768
1772
|
function paintInsets() {
|
|
1769
1773
|
var root = g.document && g.document.documentElement;
|
|
1770
1774
|
if (!root) return false;
|
|
1771
|
-
root.style.setProperty("--moku-safe-top", state.insets.top + "px");
|
|
1772
|
-
root.style.setProperty("--moku-safe-right", state.insets.right + "px");
|
|
1773
|
-
root.style.setProperty("--moku-safe-bottom", state.insets.bottom + "px");
|
|
1774
|
-
root.style.setProperty("--moku-safe-left", state.insets.left + "px");
|
|
1775
|
+
root.style.setProperty("--moku-device-safe-top", state.insets.top + "px");
|
|
1776
|
+
root.style.setProperty("--moku-device-safe-right", state.insets.right + "px");
|
|
1777
|
+
root.style.setProperty("--moku-device-safe-bottom", state.insets.bottom + "px");
|
|
1778
|
+
root.style.setProperty("--moku-device-safe-left", state.insets.left + "px");
|
|
1775
1779
|
return true;
|
|
1776
1780
|
}
|
|
1777
1781
|
|
package/dist/index.mjs
CHANGED
|
@@ -1738,13 +1738,17 @@ const CONTRACT_BODY = String.raw` var MAX_SHARE_BYTES = 32 * 1024 * 1024;
|
|
|
1738
1738
|
g.dispatchEvent(new g.CustomEvent(type, { detail: detail }));
|
|
1739
1739
|
}
|
|
1740
1740
|
|
|
1741
|
+
// The system insets go in --moku-device-safe-*, never in --moku-safe-*: an inline property on
|
|
1742
|
+
// the root beats every stylesheet rule, so a page that sets --moku-safe-* from the insets (a gap
|
|
1743
|
+
// added to them) would lose its rule. A page reads them as
|
|
1744
|
+
// var(--moku-safe-top, var(--moku-device-safe-top, env(safe-area-inset-top))).
|
|
1741
1745
|
function paintInsets() {
|
|
1742
1746
|
var root = g.document && g.document.documentElement;
|
|
1743
1747
|
if (!root) return false;
|
|
1744
|
-
root.style.setProperty("--moku-safe-top", state.insets.top + "px");
|
|
1745
|
-
root.style.setProperty("--moku-safe-right", state.insets.right + "px");
|
|
1746
|
-
root.style.setProperty("--moku-safe-bottom", state.insets.bottom + "px");
|
|
1747
|
-
root.style.setProperty("--moku-safe-left", state.insets.left + "px");
|
|
1748
|
+
root.style.setProperty("--moku-device-safe-top", state.insets.top + "px");
|
|
1749
|
+
root.style.setProperty("--moku-device-safe-right", state.insets.right + "px");
|
|
1750
|
+
root.style.setProperty("--moku-device-safe-bottom", state.insets.bottom + "px");
|
|
1751
|
+
root.style.setProperty("--moku-device-safe-left", state.insets.left + "px");
|
|
1748
1752
|
return true;
|
|
1749
1753
|
}
|
|
1750
1754
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@moku-labs/native",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.10",
|
|
4
4
|
"description": "Node-only native packager framework for Moku — generates a gitignored Tauri project, codegens capabilities/Info.plist/AndroidManifest from composed system plugins, and runs tauri build.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|