Changeset 0.37.19 (#232)

Co-authored-by: gobha <jasafpro@gmail.com>
Co-committed-by: gobha <jasafpro@gmail.com>
This commit is contained in:
2026-03-25 00:26:44 +00:00
committed by xcaliber
parent 54ceeb4299
commit be67feaa8e
21 changed files with 173 additions and 88 deletions

View File

@@ -97,6 +97,19 @@ export async function boot() {
sw.confirm = confirm;
sw.prompt = prompt;
// Shell — layout utilities (decouples surface code from shell DOM)
sw.shell = Object.freeze({
/** CSS transform scale on #surfaceInner (appearance zoom). */
getScale() {
const el = document.getElementById('surfaceInner');
if (!el) return 1;
const t = getComputedStyle(el).transform;
if (!t || t === 'none') return 1;
const m = t.match(/matrix\(([^,]+)/);
return m ? parseFloat(m[1]) || 1 : 1;
},
});
// Toast — dynamic import to avoid module resolution issues
try {
const toastMod = await import('../primitives/toast.js');
@@ -139,7 +152,7 @@ export async function boot() {
};
// Marker for idempotency
sw._sdk = '0.37.14';
sw._sdk = '0.37.19';
// 8. Expose globally
window.sw = sw;