mol_dump_lib 0.0.1041 → 0.0.1043

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/node.meta.tree CHANGED
@@ -15,8 +15,9 @@
15
15
  pack rise git \https://github.com/stan-donarise/mam_rise.git
16
16
  pack yuf git \https://github.com/zerkalica/yuf.git
17
17
  pack apxu git \https://github.com/ApxuTechTop/apxu
18
- pack bog git \https://github.com/best-online-games/bog.git
18
+ pack bog git \https://github.com/b-on-g/bog.git
19
19
  pack mws git \https://github.com/reatailret/milkywaystd_mol.git
20
+ pack raggu git \https://github.com/RaguTeam/raggu.git
20
21
  \/mol
21
22
  pack icon git \https://github.com/nin-jin/mol_icon.git
22
23
  \/mol/view
package/node.mjs CHANGED
@@ -782,7 +782,7 @@ var $;
782
782
  'color': 'gray',
783
783
  });
784
784
  $.$mol_dev_format_indent = $.$mol_dev_format_div.bind(null, {
785
- 'margin-left': '13px'
785
+ 'margin-inline-start': '13px'
786
786
  });
787
787
  class Stack extends Array {
788
788
  // [ Symbol.toPrimitive ]() {
@@ -2087,14 +2087,14 @@ var $;
2087
2087
  reuse: if (existen) {
2088
2088
  if (!existen.temp)
2089
2089
  break reuse;
2090
- if (existen.task !== task) {
2091
- cause = 'task';
2092
- break reuse;
2093
- }
2094
2090
  if (existen.host !== host) {
2095
2091
  cause = 'host';
2096
2092
  break reuse;
2097
2093
  }
2094
+ if (existen.task !== task) {
2095
+ cause = 'task';
2096
+ break reuse;
2097
+ }
2098
2098
  if (!$mol_compare_deep(existen.args, args)) {
2099
2099
  cause = 'args';
2100
2100
  break reuse;
@@ -2347,7 +2347,7 @@ var $;
2347
2347
  "use strict";
2348
2348
  var $;
2349
2349
  (function ($) {
2350
- $.$mol_dom_context = new $node.jsdom.JSDOM('', { url: 'https://localhost/' }).window;
2350
+ $.$mol_dom_context = new $node.jsdom.JSDOM('', { url: `http://${process.env.DOMAIN || 'localhost'}/` }).window;
2351
2351
  })($ || ($ = {}));
2352
2352
 
2353
2353
  ;
@@ -3553,7 +3553,7 @@ var $;
3553
3553
  "use strict";
3554
3554
  var $;
3555
3555
  (function ($) {
3556
- $mol_style_attach("mol/view/view/view.css", "@view-transition {\n\tnavigation: auto;\n}\n\n[mol_view] {\n\ttransition-property: height, width, min-height, min-width, max-width, max-height, transform, scale, translate, rotate;\n\ttransition-duration: .2s;\n\ttransition-timing-function: ease-out;\n\t-webkit-appearance: none;\n\tbox-sizing: border-box;\n\tdisplay: flex;\n\tflex-shrink: 0;\n\tcontain: style;\n\tscrollbar-color: var(--mol_theme_line) transparent;\n\tscrollbar-width: thin;\n}\t\n\n[mol_view]::selection {\n\tbackground: var(--mol_theme_line);\n}\t\n\n[mol_view]::-webkit-scrollbar {\n\twidth: .25rem;\n\theight: .25rem;\n}\n\n[mol_view]::-webkit-scrollbar-corner {\n\tbackground-color: var(--mol_theme_line);\n}\n\n[mol_view]::-webkit-scrollbar-track {\n\tbackground-color: transparent;\n}\n\n[mol_view]::-webkit-scrollbar-thumb {\n\tbackground-color: var(--mol_theme_line);\n\tborder-radius: var(--mol_gap_round);\n}\n\n[mol_view] > * {\n\tword-break: inherit;\n}\n\n[mol_view_root] {\n\tmargin: 0;\n\tpadding: 0;\n\twidth: 100%;\n\theight: 100%;\n\tbox-sizing: border-box;\n\tfont-family: system-ui, 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;\n\tfont-size: 1rem;\n\tline-height: 1.5rem;\n\t/* background: var(--mol_theme_back);\n\tcolor: var(--mol_theme_text); */\n\tcontain: unset; /** Fixes bg ignoring when applied to body on Chrome */\n\ttab-size: 4;\n\t/*overscroll-behavior: contain; /** Disable navigation gestures **/\n}\n\n@media print {\n\t[mol_view_root] {\n\t\theight: auto;\n\t}\n}\n[mol_view][mol_view_error]:not([mol_view_error=\"Promise\"], [mol_view_error=\"$mol_promise_blocker\"]) {\n\tbackground-image: repeating-linear-gradient(\n\t\t-45deg,\n\t\t#f92323,\n\t\t#f92323 .5rem,\n\t\t#ff3d3d .5rem,\n\t\t#ff3d3d 1.5rem\n\t);\n\tcolor: black;\n\talign-items: center;\n\tjustify-content: center;\n}\n\n@keyframes mol_view_wait {\n\tfrom {\n\t\topacity: .25;\n\t}\n\t20% {\n\t\topacity: .75;\n\t}\n\tto {\n\t\topacity: .25;\n\t}\n}\n\n:where([mol_view][mol_view_error=\"$mol_promise_blocker\"]),\n:where([mol_view][mol_view_error=\"Promise\"]) {\n\tbackground: var(--mol_theme_hover);\n}\n\n[mol_view][mol_view_error=\"Promise\"] {\n\tanimation: mol_view_wait 1s steps(20,end) infinite;\n}\n");
3556
+ $mol_style_attach("mol/view/view/view.css", "@view-transition {\n\tnavigation: auto;\n}\n\n[mol_view] {\n\ttransition-property: height, width, min-height, min-width, max-width, max-height, transform, scale, translate, rotate;\n\ttransition-duration: .2s;\n\ttransition-timing-function: ease-out;\n\t-webkit-appearance: none;\n\tbox-sizing: border-box;\n\tdisplay: flex;\n\tflex-shrink: 0;\n\tcontain: style;\n\tscrollbar-color: var(--mol_theme_line) transparent;\n\tscrollbar-width: thin;\n\t/* text-wrap-style: pretty; dont work in textarea */\n\tunicode-bidi: plaintext\n}\n\n[mol_view]::selection {\n\tbackground: var(--mol_theme_line);\n}\t\n\n[mol_view]::-webkit-scrollbar {\n\twidth: .25rem;\n\theight: .25rem;\n}\n\n[mol_view]::-webkit-scrollbar-corner {\n\tbackground-color: var(--mol_theme_line);\n}\n\n[mol_view]::-webkit-scrollbar-track {\n\tbackground-color: transparent;\n}\n\n[mol_view]::-webkit-scrollbar-thumb {\n\tbackground-color: var(--mol_theme_line);\n\tborder-radius: var(--mol_gap_round);\n}\n\n[mol_view] > * {\n\tword-break: inherit;\n}\n\n[mol_view_root] {\n\tmargin: 0;\n\tpadding: 0;\n\twidth: 100%;\n\theight: 100%;\n\tbox-sizing: border-box;\n\tfont-family: system-ui, 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;\n\tfont-size: 1rem;\n\tline-height: 1.5rem;\n\t/* background: var(--mol_theme_back);\n\tcolor: var(--mol_theme_text); */\n\tcontain: unset; /** Fixes bg ignoring when applied to body on Chrome */\n\ttab-size: 4;\n\t/*overscroll-behavior: contain; /** Disable navigation gestures **/\n}\n\n@media print {\n\t[mol_view_root] {\n\t\theight: auto;\n\t}\n}\n[mol_view][mol_view_error]:not([mol_view_error=\"Promise\"], [mol_view_error=\"$mol_promise_blocker\"]) {\n\tbackground-image: repeating-linear-gradient(\n\t\t-45deg,\n\t\t#f92323,\n\t\t#f92323 .5rem,\n\t\t#ff3d3d .5rem,\n\t\t#ff3d3d 1.5rem\n\t);\n\tcolor: black;\n\talign-items: center;\n\tjustify-content: center;\n}\n\n@keyframes mol_view_wait {\n\tfrom {\n\t\topacity: .25;\n\t}\n\t20% {\n\t\topacity: .75;\n\t}\n\tto {\n\t\topacity: .25;\n\t}\n}\n\n:where([mol_view][mol_view_error=\"$mol_promise_blocker\"]),\n:where([mol_view][mol_view_error=\"Promise\"]) {\n\tbackground: var(--mol_theme_hover);\n}\n\n[mol_view][mol_view_error=\"Promise\"] {\n\tanimation: mol_view_wait 1s steps(20,end) infinite;\n}\n");
3557
3557
  })($ || ($ = {}));
3558
3558
 
3559
3559
  ;
@@ -4959,7 +4959,7 @@ var $;
4959
4959
  'spoiler': /^((?:(?:[\?] )(?:[^]*?)$(\r?\n?))+)([\n\r]*)/,
4960
4960
  'header': /^([#=]+)(\s+)(.*?)$([\n\r]*)/,
4961
4961
  'list': /^((?:(?: ?([*+-])|(?:\d+[\.\)])+) +(?:[^]*?)$(?:\r?\n?)(?: (?:[^]*?)$(?:\r?\n?))*)+)((?:\r?\n)*)/,
4962
- 'code': /^(```\s*)([\w.-]*)[\r\n]+([^]*?)^(```)$([\n\r]*)/,
4962
+ 'code': /^(```)([\w.-]*)[\r\n]+([^]*?)^(```)$([\n\r]*)/,
4963
4963
  'code-indent': /^((?:(?: |\t)(?:[^]*?)$\r?\n?)+)([\n\r]*)/,
4964
4964
  'table': /((?:^\|.+?$\r?\n?)+)([\n\r]*)/,
4965
4965
  'grid': /((?:^ *! .*?$\r?\n?)+)([\n\r]*)/,
@@ -4987,7 +4987,7 @@ var $;
4987
4987
  'code-link': /(?:\w+:\/\/|#)\S+?(?=\s|\\\\|""|$)/,
4988
4988
  'code-comment-inline': /\/\/.*?(?:$|\/\/)|- \\(?!\\).*|(?<=^| )#!? .*/,
4989
4989
  'code-string': /(?:".*?"|'.*?'|`.*?`| ?\\\\.+?\\\\|\/.+?\/[dygimsu]*(?!\p{Letter})|[ \t]*\\[^\n]*)/u,
4990
- 'code-number': /[+-]?(?:\d*\.)?\d+\w*/,
4990
+ 'code-number': /[+-]?(?:\d*\.)?\d+(\uFE0F.|\w*)/,
4991
4991
  'code-call': /\.?\w+(?=\()/,
4992
4992
  'code-sexpr': /\((\w+ )/,
4993
4993
  'code-field': /(?:(?<=\.|::|->)[a-z][\w-]*|(?<=[, \t] |\t)[\w-]+\??:(?!\/\/|:))/,
@@ -5134,11 +5134,11 @@ var $;
5134
5134
  family: 'monospace',
5135
5135
  },
5136
5136
  Numb: {
5137
- textAlign: 'right',
5137
+ textAlign: 'end',
5138
5138
  color: $mol_theme.shade,
5139
5139
  width: rem(3),
5140
5140
  margin: {
5141
- left: rem(-4),
5141
+ inlineStart: '-4rem',
5142
5142
  },
5143
5143
  display: 'inline-block',
5144
5144
  whiteSpace: 'nowrap',
@@ -5478,7 +5478,7 @@ var $;
5478
5478
  "use strict";
5479
5479
  var $;
5480
5480
  (function ($) {
5481
- $mol_style_attach("mol/list/list.view.css", "[mol_list] {\n\twill-change: contents;\n\tdisplay: flex;\n\tflex-direction: column;\n\tflex-shrink: 0;\n\tmax-width: 100%;\n\t/* display: flex;\n\talign-items: stretch;\n\talign-content: stretch; */\n\ttransition: none;\n\tmin-height: 1.5rem;\n\t/* will-change: contents; */\n}\n\n[mol_list_gap_before] ,\n[mol_list_gap_after] {\n\tdisplay: block !important;\n\tflex: none;\n\ttransition: none;\n\toverflow-anchor: none;\n}\n");
5481
+ $mol_style_attach("mol/list/list.view.css", "[mol_list] {\n\twill-change: contents;\n\tdisplay: flex;\n\tflex-direction: column;\n\tflex-shrink: 0;\n\tmax-width: 100%;\n\t/* display: flex;\n\talign-items: stretch;\n\talign-content: stretch; */\n\ttransition: none;\n\t/* will-change: contents; */\n}\n\n[mol_list]:where([mol_view_error]) {\n\tmin-height: 1.5rem;\n}\n\n[mol_list_gap_before] ,\n[mol_list_gap_after] {\n\tdisplay: block !important;\n\tflex: none;\n\ttransition: none;\n\toverflow-anchor: none;\n}\n");
5482
5482
  })($ || ($ = {}));
5483
5483
 
5484
5484
  ;
@@ -6151,71 +6151,80 @@ var $;
6151
6151
  "use strict";
6152
6152
  var $;
6153
6153
  (function ($) {
6154
- $.$mol_mem_persist = $mol_wire_solid;
6155
- })($ || ($ = {}));
6156
-
6157
- ;
6158
- "use strict";
6159
- var $;
6160
- (function ($) {
6161
- function $mol_wait_user_async() {
6162
- return new Promise(done => $mol_dom.addEventListener('click', function onclick() {
6163
- $mol_dom.removeEventListener('click', onclick);
6164
- done(null);
6165
- }));
6166
- }
6167
- $.$mol_wait_user_async = $mol_wait_user_async;
6168
- function $mol_wait_user() {
6169
- return this.$mol_wire_sync(this).$mol_wait_user_async();
6154
+ class $mol_storage extends $mol_object2 {
6155
+ /** Is storage a long term. */
6156
+ static persisted(next) {
6157
+ return false;
6158
+ }
6159
+ /** Total storage quota in bytes. */
6160
+ static total() {
6161
+ return 0;
6162
+ }
6163
+ /** Total storage usage in bytes. */
6164
+ static used() {
6165
+ return 0;
6166
+ }
6167
+ /** Minimum available free space in bytes. */
6168
+ static free() {
6169
+ return this.total() - this.used();
6170
+ }
6171
+ /** Fulfillness of storage. */
6172
+ static portion() {
6173
+ const total = this.total();
6174
+ if (!total)
6175
+ return 1;
6176
+ return this.used() / total;
6177
+ }
6178
+ /**
6179
+ * Fulfillness logarithmic level.
6180
+ * `0` - empty
6181
+ * `1` - half free
6182
+ * `2` - quart free
6183
+ * `Infinity` - fulfilled
6184
+ */
6185
+ static level() {
6186
+ return Math.floor(-Math.log2(1 - this.portion()));
6187
+ }
6170
6188
  }
6171
- $.$mol_wait_user = $mol_wait_user;
6189
+ $.$mol_storage = $mol_storage;
6172
6190
  })($ || ($ = {}));
6173
6191
 
6174
6192
  ;
6175
6193
  "use strict";
6176
6194
  var $;
6177
6195
  (function ($) {
6178
- class $mol_storage extends $mol_object2 {
6179
- static native() {
6180
- return this.$.$mol_dom_context.navigator.storage ?? {
6181
- persisted: async () => false,
6182
- persist: async () => false,
6183
- estimate: async () => ({}),
6184
- getDirectory: async () => null,
6185
- };
6196
+ class $mol_storage_node extends $mol_storage {
6197
+ static persisted() {
6198
+ return true;
6186
6199
  }
6187
- static persisted(next, cache) {
6188
- $mol_mem_persist();
6189
- if (cache)
6190
- return Boolean(next);
6191
- const native = this.native();
6192
- if (next && !$mol_mem_cached(() => this.persisted())) {
6193
- this.$.$mol_wait_user_async()
6194
- .then(() => native.persist())
6195
- .then(actual => {
6196
- setTimeout(() => this.persisted(actual, 'cache'), 5000);
6197
- if (actual)
6198
- this.$.$mol_log3_done({ place: `$mol_storage`, message: `Persist: Yes` });
6199
- else
6200
- this.$.$mol_log3_fail({ place: `$mol_storage`, message: `Persist: No` });
6201
- });
6202
- }
6203
- return next ?? $mol_wire_sync(native).persisted();
6200
+ static stats() {
6201
+ $mol_state_time.now(1000);
6202
+ return $node.fs.statfsSync('.');
6204
6203
  }
6205
- static estimate() {
6206
- return $mol_wire_sync(this.native() ?? {}).estimate();
6204
+ static total() {
6205
+ const { blocks, bsize } = this.stats();
6206
+ return blocks * bsize;
6207
6207
  }
6208
- static dir() {
6209
- return $mol_wire_sync(this.native()).getDirectory();
6208
+ static used() {
6209
+ const { blocks, bfree, bsize } = this.stats();
6210
+ return (blocks - bfree) * bsize;
6211
+ }
6212
+ static free() {
6213
+ const { bfree, bsize } = this.stats();
6214
+ return bfree * bsize;
6215
+ }
6216
+ static portion() {
6217
+ const { blocks, bfree } = this.stats();
6218
+ if (!blocks)
6219
+ return 1;
6220
+ return (blocks - bfree) / blocks;
6210
6221
  }
6211
6222
  }
6212
6223
  __decorate([
6213
6224
  $mol_mem
6214
- ], $mol_storage, "native", null);
6215
- __decorate([
6216
- $mol_mem
6217
- ], $mol_storage, "persisted", null);
6218
- $.$mol_storage = $mol_storage;
6225
+ ], $mol_storage_node, "stats", null);
6226
+ $.$mol_storage_node = $mol_storage_node;
6227
+ $.$mol_storage = $.$mol_storage_node;
6219
6228
  })($ || ($ = {}));
6220
6229
 
6221
6230
  ;
@@ -7175,6 +7184,19 @@ var $;
7175
7184
  static lang(next) {
7176
7185
  return this.$.$mol_state_local.value('locale', next) || $mol_dom_context.navigator.language.replace(/-.*/, '') || this.lang_default();
7177
7186
  }
7187
+ static langs_rtl() {
7188
+ return ['ar', 'he', 'fa', 'ur', 'yi', 'ps', 'ug', 'sd'];
7189
+ }
7190
+ static direction() {
7191
+ const lang = this.lang();
7192
+ try {
7193
+ return new Intl.Locale(lang).getTextInfo().direction ?? 'ltr';
7194
+ }
7195
+ catch (e) {
7196
+ $mol_fail_log(e);
7197
+ return this.langs_rtl().includes(lang) ? 'rtl' : 'ltr';
7198
+ }
7199
+ }
7178
7200
  static source(lang) {
7179
7201
  return JSON.parse(this.$.$mol_file.relative(`web.locale=${lang}.json`).text().toString());
7180
7202
  }
@@ -7215,6 +7237,9 @@ var $;
7215
7237
  __decorate([
7216
7238
  $mol_mem
7217
7239
  ], $mol_locale, "lang", null);
7240
+ __decorate([
7241
+ $mol_mem
7242
+ ], $mol_locale, "direction", null);
7218
7243
  __decorate([
7219
7244
  $mol_mem_key
7220
7245
  ], $mol_locale, "source", null);
@@ -7436,7 +7461,7 @@ var $;
7436
7461
  true: {
7437
7462
  $mol_text_code_line: {
7438
7463
  margin: {
7439
- left: rem(1.75),
7464
+ inlineStart: '1.75rem',
7440
7465
  },
7441
7466
  },
7442
7467
  },
@@ -7520,7 +7545,7 @@ var $;
7520
7545
  "use strict";
7521
7546
  var $;
7522
7547
  (function ($) {
7523
- $mol_style_attach("mol/check/check.css", "[mol_check] {\n\tflex: 0 0 auto;\n\tjustify-content: flex-start;\n\talign-content: center;\n\t/* align-items: flex-start; */\n\tborder: none;\n\tfont-weight: inherit;\n\tbox-shadow: none;\n\ttext-align: left;\n\tdisplay: inline-flex;\n\tflex-wrap: nowrap;\n}\n\n[mol_check_title] {\n\tflex-shrink: 1;\n}\n");
7548
+ $mol_style_attach("mol/check/check.css", "[mol_check] {\n\tflex: 0 0 auto;\n\tjustify-content: flex-start;\n\talign-content: center;\n\t/* align-items: flex-start; */\n\tborder: none;\n\tfont-weight: inherit;\n\tbox-shadow: none;\n\ttext-align: start;\n\tdisplay: inline-flex;\n\tflex-wrap: nowrap;\n}\n\n[mol_check_title] {\n\tflex-shrink: 1;\n}\n");
7524
7549
  })($ || ($ = {}));
7525
7550
 
7526
7551
  ;
@@ -7637,7 +7662,7 @@ var $;
7637
7662
  "use strict";
7638
7663
  var $;
7639
7664
  (function ($) {
7640
- $mol_style_attach("mol/check/expand/expand.view.css", "[mol_check_expand] {\n\tmin-width: 20px;\n}\n\n:where([mol_check_expand][disabled]) [mol_check_expand_icon] {\n\tvisibility: hidden;\n}\n\n[mol_check_expand_icon] {\n\tbox-shadow: none;\n\tmargin-left: -0.375rem;\n}\n[mol_check_expand_icon] {\n\ttransform: rotateZ(0deg);\n}\n\n:where([mol_check_checked]) [mol_check_expand_icon] {\n\ttransform: rotateZ(90deg);\n}\n\n[mol_check_expand_icon] {\n\tvertical-align: text-top;\n}\n\n[mol_check_expand_label] {\n\tmargin-left: 0;\n}\n");
7665
+ $mol_style_attach("mol/check/expand/expand.view.css", "[mol_check_expand] {\n\tmin-width: 20px;\n}\n\n:where([mol_check_expand][disabled]) [mol_check_expand_icon] {\n\tvisibility: hidden;\n}\n\n[mol_check_expand_icon] {\n\tbox-shadow: none;\n\tmargin-inline-start: -0.375rem;\n}\n[mol_check_expand_icon] {\n\ttransform: rotateZ(0deg);\n}\n\n:where([mol_check_checked]) [mol_check_expand_icon] {\n\ttransform: rotateZ(90deg);\n}\n\n[mol_check_expand_icon] {\n\tvertical-align: text-top;\n}\n\n[mol_check_expand_label] {\n\tmargin-inline-start: 0;\n}\n");
7641
7666
  })($ || ($ = {}));
7642
7667
 
7643
7668
  ;
@@ -8080,7 +8105,7 @@ var $;
8080
8105
  "use strict";
8081
8106
  var $;
8082
8107
  (function ($) {
8083
- $mol_style_attach("mol/dump/value/value.view.css", "[mol_dump_value] {\n\tmin-height: 1.5rem;\n}\n\n[mol_dump_value_simple] {\n\tpadding: 0;\n}\n\n[mol_dump_value_expand_head] {\n\tmin-height: 1.5rem;\n}\n\n[mol_dump_value_expand_content] {\n\tpadding-left: 1.5rem;\n\talign-items: flex-start;\n}\n\n[mol_dump_value_expand_title_rows],\n[mol_dump_value_simple_rows],\n[mol_dump_value_expand_head] {\n\tpadding: 0;\n\tgap: 0;\n}\n");
8108
+ $mol_style_attach("mol/dump/value/value.view.css", "[mol_dump_value] {\n\tmin-height: 1.5rem;\n}\n\n[mol_dump_value_simple] {\n\tpadding: 0;\n}\n\n[mol_dump_value_expand_head] {\n\tmin-height: 1.5rem;\n}\n\n[mol_dump_value_expand_content] {\n\tpadding-inline-start: 1.5rem;\n\talign-items: flex-start;\n}\n\n[mol_dump_value_expand_title_rows],\n[mol_dump_value_simple_rows],\n[mol_dump_value_expand_head] {\n\tpadding: 0;\n\tgap: 0;\n}\n");
8084
8109
  })($ || ($ = {}));
8085
8110
 
8086
8111
 
package/node.test.js CHANGED
@@ -773,7 +773,7 @@ var $;
773
773
  'color': 'gray',
774
774
  });
775
775
  $.$mol_dev_format_indent = $.$mol_dev_format_div.bind(null, {
776
- 'margin-left': '13px'
776
+ 'margin-inline-start': '13px'
777
777
  });
778
778
  class Stack extends Array {
779
779
  // [ Symbol.toPrimitive ]() {
@@ -2078,14 +2078,14 @@ var $;
2078
2078
  reuse: if (existen) {
2079
2079
  if (!existen.temp)
2080
2080
  break reuse;
2081
- if (existen.task !== task) {
2082
- cause = 'task';
2083
- break reuse;
2084
- }
2085
2081
  if (existen.host !== host) {
2086
2082
  cause = 'host';
2087
2083
  break reuse;
2088
2084
  }
2085
+ if (existen.task !== task) {
2086
+ cause = 'task';
2087
+ break reuse;
2088
+ }
2089
2089
  if (!$mol_compare_deep(existen.args, args)) {
2090
2090
  cause = 'args';
2091
2091
  break reuse;
@@ -2338,7 +2338,7 @@ var $;
2338
2338
  "use strict";
2339
2339
  var $;
2340
2340
  (function ($) {
2341
- $.$mol_dom_context = new $node.jsdom.JSDOM('', { url: 'https://localhost/' }).window;
2341
+ $.$mol_dom_context = new $node.jsdom.JSDOM('', { url: `http://${process.env.DOMAIN || 'localhost'}/` }).window;
2342
2342
  })($ || ($ = {}));
2343
2343
 
2344
2344
  ;
@@ -3544,7 +3544,7 @@ var $;
3544
3544
  "use strict";
3545
3545
  var $;
3546
3546
  (function ($) {
3547
- $mol_style_attach("mol/view/view/view.css", "@view-transition {\n\tnavigation: auto;\n}\n\n[mol_view] {\n\ttransition-property: height, width, min-height, min-width, max-width, max-height, transform, scale, translate, rotate;\n\ttransition-duration: .2s;\n\ttransition-timing-function: ease-out;\n\t-webkit-appearance: none;\n\tbox-sizing: border-box;\n\tdisplay: flex;\n\tflex-shrink: 0;\n\tcontain: style;\n\tscrollbar-color: var(--mol_theme_line) transparent;\n\tscrollbar-width: thin;\n}\t\n\n[mol_view]::selection {\n\tbackground: var(--mol_theme_line);\n}\t\n\n[mol_view]::-webkit-scrollbar {\n\twidth: .25rem;\n\theight: .25rem;\n}\n\n[mol_view]::-webkit-scrollbar-corner {\n\tbackground-color: var(--mol_theme_line);\n}\n\n[mol_view]::-webkit-scrollbar-track {\n\tbackground-color: transparent;\n}\n\n[mol_view]::-webkit-scrollbar-thumb {\n\tbackground-color: var(--mol_theme_line);\n\tborder-radius: var(--mol_gap_round);\n}\n\n[mol_view] > * {\n\tword-break: inherit;\n}\n\n[mol_view_root] {\n\tmargin: 0;\n\tpadding: 0;\n\twidth: 100%;\n\theight: 100%;\n\tbox-sizing: border-box;\n\tfont-family: system-ui, 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;\n\tfont-size: 1rem;\n\tline-height: 1.5rem;\n\t/* background: var(--mol_theme_back);\n\tcolor: var(--mol_theme_text); */\n\tcontain: unset; /** Fixes bg ignoring when applied to body on Chrome */\n\ttab-size: 4;\n\t/*overscroll-behavior: contain; /** Disable navigation gestures **/\n}\n\n@media print {\n\t[mol_view_root] {\n\t\theight: auto;\n\t}\n}\n[mol_view][mol_view_error]:not([mol_view_error=\"Promise\"], [mol_view_error=\"$mol_promise_blocker\"]) {\n\tbackground-image: repeating-linear-gradient(\n\t\t-45deg,\n\t\t#f92323,\n\t\t#f92323 .5rem,\n\t\t#ff3d3d .5rem,\n\t\t#ff3d3d 1.5rem\n\t);\n\tcolor: black;\n\talign-items: center;\n\tjustify-content: center;\n}\n\n@keyframes mol_view_wait {\n\tfrom {\n\t\topacity: .25;\n\t}\n\t20% {\n\t\topacity: .75;\n\t}\n\tto {\n\t\topacity: .25;\n\t}\n}\n\n:where([mol_view][mol_view_error=\"$mol_promise_blocker\"]),\n:where([mol_view][mol_view_error=\"Promise\"]) {\n\tbackground: var(--mol_theme_hover);\n}\n\n[mol_view][mol_view_error=\"Promise\"] {\n\tanimation: mol_view_wait 1s steps(20,end) infinite;\n}\n");
3547
+ $mol_style_attach("mol/view/view/view.css", "@view-transition {\n\tnavigation: auto;\n}\n\n[mol_view] {\n\ttransition-property: height, width, min-height, min-width, max-width, max-height, transform, scale, translate, rotate;\n\ttransition-duration: .2s;\n\ttransition-timing-function: ease-out;\n\t-webkit-appearance: none;\n\tbox-sizing: border-box;\n\tdisplay: flex;\n\tflex-shrink: 0;\n\tcontain: style;\n\tscrollbar-color: var(--mol_theme_line) transparent;\n\tscrollbar-width: thin;\n\t/* text-wrap-style: pretty; dont work in textarea */\n\tunicode-bidi: plaintext\n}\n\n[mol_view]::selection {\n\tbackground: var(--mol_theme_line);\n}\t\n\n[mol_view]::-webkit-scrollbar {\n\twidth: .25rem;\n\theight: .25rem;\n}\n\n[mol_view]::-webkit-scrollbar-corner {\n\tbackground-color: var(--mol_theme_line);\n}\n\n[mol_view]::-webkit-scrollbar-track {\n\tbackground-color: transparent;\n}\n\n[mol_view]::-webkit-scrollbar-thumb {\n\tbackground-color: var(--mol_theme_line);\n\tborder-radius: var(--mol_gap_round);\n}\n\n[mol_view] > * {\n\tword-break: inherit;\n}\n\n[mol_view_root] {\n\tmargin: 0;\n\tpadding: 0;\n\twidth: 100%;\n\theight: 100%;\n\tbox-sizing: border-box;\n\tfont-family: system-ui, 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;\n\tfont-size: 1rem;\n\tline-height: 1.5rem;\n\t/* background: var(--mol_theme_back);\n\tcolor: var(--mol_theme_text); */\n\tcontain: unset; /** Fixes bg ignoring when applied to body on Chrome */\n\ttab-size: 4;\n\t/*overscroll-behavior: contain; /** Disable navigation gestures **/\n}\n\n@media print {\n\t[mol_view_root] {\n\t\theight: auto;\n\t}\n}\n[mol_view][mol_view_error]:not([mol_view_error=\"Promise\"], [mol_view_error=\"$mol_promise_blocker\"]) {\n\tbackground-image: repeating-linear-gradient(\n\t\t-45deg,\n\t\t#f92323,\n\t\t#f92323 .5rem,\n\t\t#ff3d3d .5rem,\n\t\t#ff3d3d 1.5rem\n\t);\n\tcolor: black;\n\talign-items: center;\n\tjustify-content: center;\n}\n\n@keyframes mol_view_wait {\n\tfrom {\n\t\topacity: .25;\n\t}\n\t20% {\n\t\topacity: .75;\n\t}\n\tto {\n\t\topacity: .25;\n\t}\n}\n\n:where([mol_view][mol_view_error=\"$mol_promise_blocker\"]),\n:where([mol_view][mol_view_error=\"Promise\"]) {\n\tbackground: var(--mol_theme_hover);\n}\n\n[mol_view][mol_view_error=\"Promise\"] {\n\tanimation: mol_view_wait 1s steps(20,end) infinite;\n}\n");
3548
3548
  })($ || ($ = {}));
3549
3549
 
3550
3550
  ;
@@ -4950,7 +4950,7 @@ var $;
4950
4950
  'spoiler': /^((?:(?:[\?] )(?:[^]*?)$(\r?\n?))+)([\n\r]*)/,
4951
4951
  'header': /^([#=]+)(\s+)(.*?)$([\n\r]*)/,
4952
4952
  'list': /^((?:(?: ?([*+-])|(?:\d+[\.\)])+) +(?:[^]*?)$(?:\r?\n?)(?: (?:[^]*?)$(?:\r?\n?))*)+)((?:\r?\n)*)/,
4953
- 'code': /^(```\s*)([\w.-]*)[\r\n]+([^]*?)^(```)$([\n\r]*)/,
4953
+ 'code': /^(```)([\w.-]*)[\r\n]+([^]*?)^(```)$([\n\r]*)/,
4954
4954
  'code-indent': /^((?:(?: |\t)(?:[^]*?)$\r?\n?)+)([\n\r]*)/,
4955
4955
  'table': /((?:^\|.+?$\r?\n?)+)([\n\r]*)/,
4956
4956
  'grid': /((?:^ *! .*?$\r?\n?)+)([\n\r]*)/,
@@ -4978,7 +4978,7 @@ var $;
4978
4978
  'code-link': /(?:\w+:\/\/|#)\S+?(?=\s|\\\\|""|$)/,
4979
4979
  'code-comment-inline': /\/\/.*?(?:$|\/\/)|- \\(?!\\).*|(?<=^| )#!? .*/,
4980
4980
  'code-string': /(?:".*?"|'.*?'|`.*?`| ?\\\\.+?\\\\|\/.+?\/[dygimsu]*(?!\p{Letter})|[ \t]*\\[^\n]*)/u,
4981
- 'code-number': /[+-]?(?:\d*\.)?\d+\w*/,
4981
+ 'code-number': /[+-]?(?:\d*\.)?\d+(\uFE0F.|\w*)/,
4982
4982
  'code-call': /\.?\w+(?=\()/,
4983
4983
  'code-sexpr': /\((\w+ )/,
4984
4984
  'code-field': /(?:(?<=\.|::|->)[a-z][\w-]*|(?<=[, \t] |\t)[\w-]+\??:(?!\/\/|:))/,
@@ -5125,11 +5125,11 @@ var $;
5125
5125
  family: 'monospace',
5126
5126
  },
5127
5127
  Numb: {
5128
- textAlign: 'right',
5128
+ textAlign: 'end',
5129
5129
  color: $mol_theme.shade,
5130
5130
  width: rem(3),
5131
5131
  margin: {
5132
- left: rem(-4),
5132
+ inlineStart: '-4rem',
5133
5133
  },
5134
5134
  display: 'inline-block',
5135
5135
  whiteSpace: 'nowrap',
@@ -5469,7 +5469,7 @@ var $;
5469
5469
  "use strict";
5470
5470
  var $;
5471
5471
  (function ($) {
5472
- $mol_style_attach("mol/list/list.view.css", "[mol_list] {\n\twill-change: contents;\n\tdisplay: flex;\n\tflex-direction: column;\n\tflex-shrink: 0;\n\tmax-width: 100%;\n\t/* display: flex;\n\talign-items: stretch;\n\talign-content: stretch; */\n\ttransition: none;\n\tmin-height: 1.5rem;\n\t/* will-change: contents; */\n}\n\n[mol_list_gap_before] ,\n[mol_list_gap_after] {\n\tdisplay: block !important;\n\tflex: none;\n\ttransition: none;\n\toverflow-anchor: none;\n}\n");
5472
+ $mol_style_attach("mol/list/list.view.css", "[mol_list] {\n\twill-change: contents;\n\tdisplay: flex;\n\tflex-direction: column;\n\tflex-shrink: 0;\n\tmax-width: 100%;\n\t/* display: flex;\n\talign-items: stretch;\n\talign-content: stretch; */\n\ttransition: none;\n\t/* will-change: contents; */\n}\n\n[mol_list]:where([mol_view_error]) {\n\tmin-height: 1.5rem;\n}\n\n[mol_list_gap_before] ,\n[mol_list_gap_after] {\n\tdisplay: block !important;\n\tflex: none;\n\ttransition: none;\n\toverflow-anchor: none;\n}\n");
5473
5473
  })($ || ($ = {}));
5474
5474
 
5475
5475
  ;
@@ -6142,71 +6142,80 @@ var $;
6142
6142
  "use strict";
6143
6143
  var $;
6144
6144
  (function ($) {
6145
- $.$mol_mem_persist = $mol_wire_solid;
6146
- })($ || ($ = {}));
6147
-
6148
- ;
6149
- "use strict";
6150
- var $;
6151
- (function ($) {
6152
- function $mol_wait_user_async() {
6153
- return new Promise(done => $mol_dom.addEventListener('click', function onclick() {
6154
- $mol_dom.removeEventListener('click', onclick);
6155
- done(null);
6156
- }));
6157
- }
6158
- $.$mol_wait_user_async = $mol_wait_user_async;
6159
- function $mol_wait_user() {
6160
- return this.$mol_wire_sync(this).$mol_wait_user_async();
6145
+ class $mol_storage extends $mol_object2 {
6146
+ /** Is storage a long term. */
6147
+ static persisted(next) {
6148
+ return false;
6149
+ }
6150
+ /** Total storage quota in bytes. */
6151
+ static total() {
6152
+ return 0;
6153
+ }
6154
+ /** Total storage usage in bytes. */
6155
+ static used() {
6156
+ return 0;
6157
+ }
6158
+ /** Minimum available free space in bytes. */
6159
+ static free() {
6160
+ return this.total() - this.used();
6161
+ }
6162
+ /** Fulfillness of storage. */
6163
+ static portion() {
6164
+ const total = this.total();
6165
+ if (!total)
6166
+ return 1;
6167
+ return this.used() / total;
6168
+ }
6169
+ /**
6170
+ * Fulfillness logarithmic level.
6171
+ * `0` - empty
6172
+ * `1` - half free
6173
+ * `2` - quart free
6174
+ * `Infinity` - fulfilled
6175
+ */
6176
+ static level() {
6177
+ return Math.floor(-Math.log2(1 - this.portion()));
6178
+ }
6161
6179
  }
6162
- $.$mol_wait_user = $mol_wait_user;
6180
+ $.$mol_storage = $mol_storage;
6163
6181
  })($ || ($ = {}));
6164
6182
 
6165
6183
  ;
6166
6184
  "use strict";
6167
6185
  var $;
6168
6186
  (function ($) {
6169
- class $mol_storage extends $mol_object2 {
6170
- static native() {
6171
- return this.$.$mol_dom_context.navigator.storage ?? {
6172
- persisted: async () => false,
6173
- persist: async () => false,
6174
- estimate: async () => ({}),
6175
- getDirectory: async () => null,
6176
- };
6187
+ class $mol_storage_node extends $mol_storage {
6188
+ static persisted() {
6189
+ return true;
6177
6190
  }
6178
- static persisted(next, cache) {
6179
- $mol_mem_persist();
6180
- if (cache)
6181
- return Boolean(next);
6182
- const native = this.native();
6183
- if (next && !$mol_mem_cached(() => this.persisted())) {
6184
- this.$.$mol_wait_user_async()
6185
- .then(() => native.persist())
6186
- .then(actual => {
6187
- setTimeout(() => this.persisted(actual, 'cache'), 5000);
6188
- if (actual)
6189
- this.$.$mol_log3_done({ place: `$mol_storage`, message: `Persist: Yes` });
6190
- else
6191
- this.$.$mol_log3_fail({ place: `$mol_storage`, message: `Persist: No` });
6192
- });
6193
- }
6194
- return next ?? $mol_wire_sync(native).persisted();
6191
+ static stats() {
6192
+ $mol_state_time.now(1000);
6193
+ return $node.fs.statfsSync('.');
6195
6194
  }
6196
- static estimate() {
6197
- return $mol_wire_sync(this.native() ?? {}).estimate();
6195
+ static total() {
6196
+ const { blocks, bsize } = this.stats();
6197
+ return blocks * bsize;
6198
6198
  }
6199
- static dir() {
6200
- return $mol_wire_sync(this.native()).getDirectory();
6199
+ static used() {
6200
+ const { blocks, bfree, bsize } = this.stats();
6201
+ return (blocks - bfree) * bsize;
6202
+ }
6203
+ static free() {
6204
+ const { bfree, bsize } = this.stats();
6205
+ return bfree * bsize;
6206
+ }
6207
+ static portion() {
6208
+ const { blocks, bfree } = this.stats();
6209
+ if (!blocks)
6210
+ return 1;
6211
+ return (blocks - bfree) / blocks;
6201
6212
  }
6202
6213
  }
6203
6214
  __decorate([
6204
6215
  $mol_mem
6205
- ], $mol_storage, "native", null);
6206
- __decorate([
6207
- $mol_mem
6208
- ], $mol_storage, "persisted", null);
6209
- $.$mol_storage = $mol_storage;
6216
+ ], $mol_storage_node, "stats", null);
6217
+ $.$mol_storage_node = $mol_storage_node;
6218
+ $.$mol_storage = $.$mol_storage_node;
6210
6219
  })($ || ($ = {}));
6211
6220
 
6212
6221
  ;
@@ -7166,6 +7175,19 @@ var $;
7166
7175
  static lang(next) {
7167
7176
  return this.$.$mol_state_local.value('locale', next) || $mol_dom_context.navigator.language.replace(/-.*/, '') || this.lang_default();
7168
7177
  }
7178
+ static langs_rtl() {
7179
+ return ['ar', 'he', 'fa', 'ur', 'yi', 'ps', 'ug', 'sd'];
7180
+ }
7181
+ static direction() {
7182
+ const lang = this.lang();
7183
+ try {
7184
+ return new Intl.Locale(lang).getTextInfo().direction ?? 'ltr';
7185
+ }
7186
+ catch (e) {
7187
+ $mol_fail_log(e);
7188
+ return this.langs_rtl().includes(lang) ? 'rtl' : 'ltr';
7189
+ }
7190
+ }
7169
7191
  static source(lang) {
7170
7192
  return JSON.parse(this.$.$mol_file.relative(`web.locale=${lang}.json`).text().toString());
7171
7193
  }
@@ -7206,6 +7228,9 @@ var $;
7206
7228
  __decorate([
7207
7229
  $mol_mem
7208
7230
  ], $mol_locale, "lang", null);
7231
+ __decorate([
7232
+ $mol_mem
7233
+ ], $mol_locale, "direction", null);
7209
7234
  __decorate([
7210
7235
  $mol_mem_key
7211
7236
  ], $mol_locale, "source", null);
@@ -7427,7 +7452,7 @@ var $;
7427
7452
  true: {
7428
7453
  $mol_text_code_line: {
7429
7454
  margin: {
7430
- left: rem(1.75),
7455
+ inlineStart: '1.75rem',
7431
7456
  },
7432
7457
  },
7433
7458
  },
@@ -7511,7 +7536,7 @@ var $;
7511
7536
  "use strict";
7512
7537
  var $;
7513
7538
  (function ($) {
7514
- $mol_style_attach("mol/check/check.css", "[mol_check] {\n\tflex: 0 0 auto;\n\tjustify-content: flex-start;\n\talign-content: center;\n\t/* align-items: flex-start; */\n\tborder: none;\n\tfont-weight: inherit;\n\tbox-shadow: none;\n\ttext-align: left;\n\tdisplay: inline-flex;\n\tflex-wrap: nowrap;\n}\n\n[mol_check_title] {\n\tflex-shrink: 1;\n}\n");
7539
+ $mol_style_attach("mol/check/check.css", "[mol_check] {\n\tflex: 0 0 auto;\n\tjustify-content: flex-start;\n\talign-content: center;\n\t/* align-items: flex-start; */\n\tborder: none;\n\tfont-weight: inherit;\n\tbox-shadow: none;\n\ttext-align: start;\n\tdisplay: inline-flex;\n\tflex-wrap: nowrap;\n}\n\n[mol_check_title] {\n\tflex-shrink: 1;\n}\n");
7515
7540
  })($ || ($ = {}));
7516
7541
 
7517
7542
  ;
@@ -7628,7 +7653,7 @@ var $;
7628
7653
  "use strict";
7629
7654
  var $;
7630
7655
  (function ($) {
7631
- $mol_style_attach("mol/check/expand/expand.view.css", "[mol_check_expand] {\n\tmin-width: 20px;\n}\n\n:where([mol_check_expand][disabled]) [mol_check_expand_icon] {\n\tvisibility: hidden;\n}\n\n[mol_check_expand_icon] {\n\tbox-shadow: none;\n\tmargin-left: -0.375rem;\n}\n[mol_check_expand_icon] {\n\ttransform: rotateZ(0deg);\n}\n\n:where([mol_check_checked]) [mol_check_expand_icon] {\n\ttransform: rotateZ(90deg);\n}\n\n[mol_check_expand_icon] {\n\tvertical-align: text-top;\n}\n\n[mol_check_expand_label] {\n\tmargin-left: 0;\n}\n");
7656
+ $mol_style_attach("mol/check/expand/expand.view.css", "[mol_check_expand] {\n\tmin-width: 20px;\n}\n\n:where([mol_check_expand][disabled]) [mol_check_expand_icon] {\n\tvisibility: hidden;\n}\n\n[mol_check_expand_icon] {\n\tbox-shadow: none;\n\tmargin-inline-start: -0.375rem;\n}\n[mol_check_expand_icon] {\n\ttransform: rotateZ(0deg);\n}\n\n:where([mol_check_checked]) [mol_check_expand_icon] {\n\ttransform: rotateZ(90deg);\n}\n\n[mol_check_expand_icon] {\n\tvertical-align: text-top;\n}\n\n[mol_check_expand_label] {\n\tmargin-inline-start: 0;\n}\n");
7632
7657
  })($ || ($ = {}));
7633
7658
 
7634
7659
  ;
@@ -8071,7 +8096,7 @@ var $;
8071
8096
  "use strict";
8072
8097
  var $;
8073
8098
  (function ($) {
8074
- $mol_style_attach("mol/dump/value/value.view.css", "[mol_dump_value] {\n\tmin-height: 1.5rem;\n}\n\n[mol_dump_value_simple] {\n\tpadding: 0;\n}\n\n[mol_dump_value_expand_head] {\n\tmin-height: 1.5rem;\n}\n\n[mol_dump_value_expand_content] {\n\tpadding-left: 1.5rem;\n\talign-items: flex-start;\n}\n\n[mol_dump_value_expand_title_rows],\n[mol_dump_value_simple_rows],\n[mol_dump_value_expand_head] {\n\tpadding: 0;\n\tgap: 0;\n}\n");
8099
+ $mol_style_attach("mol/dump/value/value.view.css", "[mol_dump_value] {\n\tmin-height: 1.5rem;\n}\n\n[mol_dump_value_simple] {\n\tpadding: 0;\n}\n\n[mol_dump_value_expand_head] {\n\tmin-height: 1.5rem;\n}\n\n[mol_dump_value_expand_content] {\n\tpadding-inline-start: 1.5rem;\n\talign-items: flex-start;\n}\n\n[mol_dump_value_expand_title_rows],\n[mol_dump_value_simple_rows],\n[mol_dump_value_expand_head] {\n\tpadding: 0;\n\tgap: 0;\n}\n");
8075
8100
  })($ || ($ = {}));
8076
8101
 
8077
8102
  ;