Persist home stepper state to localStorage via freeze scope
Some checks failed
Build and Deploy / build-and-deploy (push) Has been cancelled
Some checks failed
Build and Deploy / build-and-deploy (push) Has been cancelled
- freeze-scope "home-stepper" captures step-idx signal - Each step/back saves to localStorage via freeze-to-sx - On mount, restores from localStorage via thaw-from-sx - Invalid state resets to default (step 9) - Clear preview lake before replay to prevent duplicates - Register local-storage-get/set/remove as primitives - Arrows 3x bigger Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -14,7 +14,7 @@
|
||||
// =========================================================================
|
||||
|
||||
var NIL = Object.freeze({ _nil: true, toString: function() { return "nil"; } });
|
||||
var SX_VERSION = "2026-03-14T22:48:39Z";
|
||||
var SX_VERSION = "2026-03-14T23:27:46Z";
|
||||
|
||||
function isNil(x) { return x === NIL || x === null || x === undefined; }
|
||||
function isSxTruthy(x) { return x !== false && !isNil(x); }
|
||||
@@ -7019,6 +7019,9 @@ PRIMITIVES["resource"] = resource;
|
||||
function localStorageRemove(key) {
|
||||
try { localStorage.removeItem(key); } catch (e) {}
|
||||
}
|
||||
PRIMITIVES["local-storage-get"] = localStorageGet;
|
||||
PRIMITIVES["local-storage-set"] = localStorageSet;
|
||||
PRIMITIVES["local-storage-remove"] = localStorageRemove;
|
||||
|
||||
// --- Cookies ---
|
||||
|
||||
|
||||
Reference in New Issue
Block a user