Skip to content

Commit

Permalink
Deployed using Blazing fast GitHub Pages deploy
Browse files Browse the repository at this point in the history
  • Loading branch information
nin-jin committed Nov 13, 2023
1 parent 004493d commit 6ead678
Show file tree
Hide file tree
Showing 11 changed files with 39 additions and 71 deletions.
2 changes: 1 addition & 1 deletion node.deps.json

Large diffs are not rendered by default.

7 changes: 1 addition & 6 deletions node.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion node.js.map

Large diffs are not rendered by default.

7 changes: 1 addition & 6 deletions node.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -4264,12 +4264,7 @@ var $;
}
else {
this.native().setItem(key, JSON.stringify(next));
try {
this.$.$mol_storage.persisted(true);
}
catch (error) {
$mol_fail_log(error);
}
this.$.$mol_storage.persisted(true);
}
return next;
}
Expand Down
7 changes: 1 addition & 6 deletions node.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -4256,12 +4256,7 @@ var $;
}
else {
this.native().setItem(key, JSON.stringify(next));
try {
this.$.$mol_storage.persisted(true);
}
catch (error) {
$mol_fail_log(error);
}
this.$.$mol_storage.persisted(true);
}
return next;
}
Expand Down
2 changes: 1 addition & 1 deletion node.test.js.map

Large diffs are not rendered by default.

15 changes: 5 additions & 10 deletions web.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1124,6 +1124,10 @@ declare namespace $ {
};
}

declare namespace $ {
let $mol_mem_persist: typeof $mol_wire_solid;
}

declare namespace $ {
export function $mol_wire_sync<Host extends object>(obj: Host): ObjectOrFunctionResultAwaited<Host>;
type FunctionResultAwaited<Some> = Some extends (...args: infer Args) => infer Res ? (...args: Args) => Awaited<Res> : Some;
Expand All @@ -1134,18 +1138,9 @@ declare namespace $ {
export {};
}

declare namespace $ {
let $mol_mem_persist: typeof $mol_wire_solid;
}

declare namespace $ {
class $mol_storage extends $mol_object2 {
static native(): {
estimate: () => StorageEstimate;
getDirectory: () => FileSystemDirectoryHandle;
persist: () => boolean;
persisted: () => boolean;
};
static native(): StorageManager;
static persisted(next?: boolean): boolean;
static estimate(): StorageEstimate;
static dir(): FileSystemDirectoryHandle;
Expand Down
2 changes: 1 addition & 1 deletion web.deps.json

Large diffs are not rendered by default.

32 changes: 13 additions & 19 deletions web.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion web.js.map

Large diffs are not rendered by default.

32 changes: 13 additions & 19 deletions web.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -3638,6 +3638,13 @@ var $;
;
"use strict";
var $;
(function ($) {
$.$mol_mem_persist = $mol_wire_solid;
})($ || ($ = {}));
//mol/mem/persist/persist.ts
;
"use strict";
var $;
(function ($) {
function $mol_wire_sync(obj) {
return new Proxy(obj, {
Expand All @@ -3664,31 +3671,23 @@ var $;
;
"use strict";
var $;
(function ($) {
$.$mol_mem_persist = $mol_wire_solid;
})($ || ($ = {}));
//mol/mem/persist/persist.ts
;
"use strict";
var $;
(function ($) {
class $mol_storage extends $mol_object2 {
static native() {
return $mol_wire_sync(this.$.$mol_dom_context.navigator.storage);
return this.$.$mol_dom_context.navigator.storage;
}
static persisted(next) {
$mol_mem_persist();
const native = this.native();
const prev = $mol_mem_cached(() => this.persisted()) ?? native.persisted();
if (next && !prev)
if (next)
native.persist();
return next ?? prev;
return next ?? $mol_wire_sync(native).persisted();
}
static estimate() {
return this.native().estimate();
return $mol_wire_sync(this.native()).estimate();
}
static dir() {
return this.native().getDirectory();
return $mol_wire_sync(this.native()).getDirectory();
}
}
__decorate([
Expand Down Expand Up @@ -3742,12 +3741,7 @@ var $;
}
else {
this.native().setItem(key, JSON.stringify(next));
try {
this.$.$mol_storage.persisted(true);
}
catch (error) {
$mol_fail_log(error);
}
this.$.$mol_storage.persisted(true);
}
return next;
}
Expand Down

0 comments on commit 6ead678

Please sign in to comment.