Skip to content

Commit

Permalink
Deploying to gh-pages from @ a383171 🚀
Browse files Browse the repository at this point in the history
  • Loading branch information
nin-jin committed Nov 17, 2023
1 parent c7466d7 commit 4da1c37
Show file tree
Hide file tree
Showing 13 changed files with 202 additions and 66 deletions.
2 changes: 1 addition & 1 deletion node.deps.json

Large diffs are not rendered by default.

4 changes: 4 additions & 0 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.

4 changes: 4 additions & 0 deletions node.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -1603,11 +1603,15 @@ var $;
(function ($) {
$.$mol_key_store = new WeakMap();
function $mol_key(value) {
if (typeof value === 'bigint')
return value.toString() + 'n';
if (!value)
return JSON.stringify(value);
if (typeof value !== 'object' && typeof value !== 'function')
return JSON.stringify(value);
return JSON.stringify(value, (field, value) => {
if (typeof value === 'bigint')
return value.toString() + 'n';
if (!value)
return value;
if (typeof value !== 'object' && typeof value !== 'function')
Expand Down
5 changes: 5 additions & 0 deletions node.test.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.test.js.map

Large diffs are not rendered by default.

31 changes: 30 additions & 1 deletion web.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1019,10 +1019,39 @@ declare namespace $ {
let $mol_mem_persist: typeof $mol_wire_solid;
}

declare namespace $ {
let $mol_mem_cached: typeof $mol_wire_probe;
}

declare namespace $ {
type $mol_log3_event<Fields> = {
[key in string]: unknown;
} & {
time?: string;
place: unknown;
message: string;
} & Fields;
type $mol_log3_logger<Fields, Res = void> = (this: $, event: $mol_log3_event<Fields>) => Res;
let $mol_log3_come: $mol_log3_logger<{}>;
let $mol_log3_done: $mol_log3_logger<{}>;
let $mol_log3_fail: $mol_log3_logger<{}>;
let $mol_log3_warn: $mol_log3_logger<{
hint: string;
}>;
let $mol_log3_rise: $mol_log3_logger<{}>;
let $mol_log3_area: $mol_log3_logger<{}, () => void>;
function $mol_log3_area_lazy(this: $, event: $mol_log3_event<{}>): () => void;
let $mol_log3_stack: (() => void)[];
}

declare namespace $ {
function $mol_log3_web_make(level: $mol_type_keys_extract<Console, Function>, color: string): (this: $, event: $mol_log3_event<{}>) => () => void;
}

declare namespace $ {
class $mol_storage extends $mol_object2 {
static native(): StorageManager;
static persisted(next?: boolean): boolean;
static persisted(next?: boolean, cache?: 'cache'): 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.

79 changes: 76 additions & 3 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.

79 changes: 76 additions & 3 deletions web.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -1038,11 +1038,15 @@ var $;
(function ($) {
$.$mol_key_store = new WeakMap();
function $mol_key(value) {
if (typeof value === 'bigint')
return value.toString() + 'n';
if (!value)
return JSON.stringify(value);
if (typeof value !== 'object' && typeof value !== 'function')
return JSON.stringify(value);
return JSON.stringify(value, (field, value) => {
if (typeof value === 'bigint')
return value.toString() + 'n';
if (!value)
return value;
if (typeof value !== 'object' && typeof value !== 'function')
Expand Down Expand Up @@ -3433,16 +3437,85 @@ var $;
;
"use strict";
var $;
(function ($) {
$.$mol_mem_cached = $mol_wire_probe;
})($ || ($ = {}));
//mol/mem/cached/cached.ts
;
"use strict";
var $;
(function ($) {
function $mol_log3_area_lazy(event) {
const self = this;
const stack = self.$mol_log3_stack;
const deep = stack.length;
let logged = false;
stack.push(() => {
logged = true;
self.$mol_log3_area.call(self, event);
});
return () => {
if (logged)
self.console.groupEnd();
if (stack.length > deep)
stack.length = deep;
};
}
$.$mol_log3_area_lazy = $mol_log3_area_lazy;
$.$mol_log3_stack = [];
})($ || ($ = {}));
//mol/log3/log3.ts
;
"use strict";
var $;
(function ($) {
function $mol_log3_web_make(level, color) {
return function $mol_log3_logger(event) {
const pending = this.$mol_log3_stack.pop();
if (pending)
pending();
let tpl = '%c';
const chunks = Object.values(event);
for (let i = 0; i < chunks.length; ++i) {
tpl += (typeof chunks[i] === 'string') ? ' ⦙ %s' : ' ⦙ %o';
}
const style = `color:${color};font-weight:bolder`;
this.console[level](tpl, style, ...chunks);
const self = this;
return () => self.console.groupEnd();
};
}
$.$mol_log3_web_make = $mol_log3_web_make;
$.$mol_log3_come = $mol_log3_web_make('info', 'royalblue');
$.$mol_log3_done = $mol_log3_web_make('info', 'forestgreen');
$.$mol_log3_fail = $mol_log3_web_make('error', 'orangered');
$.$mol_log3_warn = $mol_log3_web_make('warn', 'goldenrod');
$.$mol_log3_rise = $mol_log3_web_make('log', 'magenta');
$.$mol_log3_area = $mol_log3_web_make('group', 'cyan');
})($ || ($ = {}));
//mol/log3/log3.web.ts
;
"use strict";
var $;
(function ($) {
class $mol_storage extends $mol_object2 {
static native() {
return this.$.$mol_dom_context.navigator.storage;
}
static persisted(next) {
static persisted(next, cache) {
$mol_mem_persist();
if (cache)
return Boolean(next);
const native = this.native();
if (next)
native.persist();
if (next && !$mol_mem_cached(() => this.persisted())) {
native.persist().then(actual => {
setTimeout(() => this.persisted(actual, 'cache'), 5000);
if (actual)
this.$.$mol_log3_rise({ place: this, message: `Persist` });
else
this.$.$mol_log3_fail({ place: this, message: `Non persist` });
});
}
return next ?? $mol_wire_sync(native).persisted();
}
static estimate() {
Expand Down
54 changes: 1 addition & 53 deletions web.test.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.test.js.map

Large diffs are not rendered by default.

0 comments on commit 4da1c37

Please sign in to comment.