mol_dump_lib 0.0.848 → 0.0.850
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.d.ts +6 -12
- package/node.d.ts.map +1 -1
- package/node.deps.json +1 -1
- package/node.js +44 -33
- package/node.js.map +1 -1
- package/node.mjs +44 -33
- package/node.test.js +47 -33
- package/node.test.js.map +1 -1
- package/node.view.tree +6 -11
- package/package.json +1 -1
- package/web.d.ts +6 -12
- package/web.d.ts.map +1 -1
- package/web.deps.json +1 -1
- package/web.js +44 -33
- package/web.js.map +1 -1
- package/web.mjs +44 -33
- package/web.test.js +3 -0
- package/web.test.js.map +1 -1
- package/web.view.tree +6 -11
package/node.js
CHANGED
|
@@ -5774,51 +5774,60 @@ var $;
|
|
|
5774
5774
|
|
|
5775
5775
|
;
|
|
5776
5776
|
($.$mol_list) = class $mol_list extends ($.$mol_view) {
|
|
5777
|
-
rows(){
|
|
5778
|
-
return [];
|
|
5779
|
-
}
|
|
5780
5777
|
gap_before(){
|
|
5781
5778
|
return 0;
|
|
5782
5779
|
}
|
|
5783
|
-
|
|
5784
|
-
return 0;
|
|
5785
|
-
}
|
|
5786
|
-
render_visible_only(){
|
|
5787
|
-
return true;
|
|
5788
|
-
}
|
|
5789
|
-
render_over(){
|
|
5790
|
-
return 0;
|
|
5791
|
-
}
|
|
5792
|
-
sub(){
|
|
5793
|
-
return (this.rows());
|
|
5794
|
-
}
|
|
5795
|
-
Empty(){
|
|
5780
|
+
Gap_before(){
|
|
5796
5781
|
const obj = new this.$.$mol_view();
|
|
5782
|
+
(obj.style) = () => ({"paddingTop": (this.gap_before())});
|
|
5797
5783
|
return obj;
|
|
5798
5784
|
}
|
|
5799
|
-
|
|
5785
|
+
Empty(){
|
|
5800
5786
|
const obj = new this.$.$mol_view();
|
|
5801
|
-
(obj.style) = () => ({"paddingTop": (this.gap_before())});
|
|
5802
5787
|
return obj;
|
|
5803
5788
|
}
|
|
5789
|
+
gap_after(){
|
|
5790
|
+
return 0;
|
|
5791
|
+
}
|
|
5804
5792
|
Gap_after(){
|
|
5805
5793
|
const obj = new this.$.$mol_view();
|
|
5806
5794
|
(obj.style) = () => ({"paddingTop": (this.gap_after())});
|
|
5807
5795
|
return obj;
|
|
5808
5796
|
}
|
|
5797
|
+
rows(){
|
|
5798
|
+
return [
|
|
5799
|
+
(this.Gap_before()),
|
|
5800
|
+
(this.Empty()),
|
|
5801
|
+
(this.Gap_after())
|
|
5802
|
+
];
|
|
5803
|
+
}
|
|
5804
|
+
render_visible_only(){
|
|
5805
|
+
return true;
|
|
5806
|
+
}
|
|
5807
|
+
render_over(){
|
|
5808
|
+
return 0.1;
|
|
5809
|
+
}
|
|
5810
|
+
sub(){
|
|
5811
|
+
return (this.rows());
|
|
5812
|
+
}
|
|
5809
5813
|
item_height_min(id){
|
|
5810
5814
|
return 1;
|
|
5811
5815
|
}
|
|
5812
5816
|
item_width_min(id){
|
|
5813
5817
|
return 1;
|
|
5814
5818
|
}
|
|
5819
|
+
view_window_shift(next){
|
|
5820
|
+
if(next !== undefined) return next;
|
|
5821
|
+
return 0;
|
|
5822
|
+
}
|
|
5815
5823
|
view_window(){
|
|
5816
5824
|
return [0, 0];
|
|
5817
5825
|
}
|
|
5818
5826
|
};
|
|
5819
|
-
($mol_mem(($.$mol_list.prototype), "Empty"));
|
|
5820
5827
|
($mol_mem(($.$mol_list.prototype), "Gap_before"));
|
|
5828
|
+
($mol_mem(($.$mol_list.prototype), "Empty"));
|
|
5821
5829
|
($mol_mem(($.$mol_list.prototype), "Gap_after"));
|
|
5830
|
+
($mol_mem(($.$mol_list.prototype), "view_window_shift"));
|
|
5822
5831
|
|
|
5823
5832
|
|
|
5824
5833
|
;
|
|
@@ -5902,7 +5911,15 @@ var $;
|
|
|
5902
5911
|
class $mol_list extends $.$mol_list {
|
|
5903
5912
|
sub() {
|
|
5904
5913
|
const rows = this.rows();
|
|
5905
|
-
|
|
5914
|
+
const next = (rows.length === 0) ? [this.Empty()] : rows;
|
|
5915
|
+
const prev = $mol_mem_cached(() => this.sub());
|
|
5916
|
+
const [start, end] = $mol_mem_cached(() => this.view_window()) ?? [0, 0];
|
|
5917
|
+
if (prev && $mol_mem_cached(() => prev[start] !== next[start])) {
|
|
5918
|
+
const index = $mol_mem_cached(() => next.indexOf(prev[start])) ?? -1;
|
|
5919
|
+
if (index >= 0)
|
|
5920
|
+
this.view_window_shift(index - start);
|
|
5921
|
+
}
|
|
5922
|
+
return next;
|
|
5906
5923
|
}
|
|
5907
5924
|
render_visible_only() {
|
|
5908
5925
|
return this.$.$mol_support_css_overflow_anchor();
|
|
@@ -5917,6 +5934,9 @@ var $;
|
|
|
5917
5934
|
if (next)
|
|
5918
5935
|
return next;
|
|
5919
5936
|
let [min, max] = $mol_mem_cached(() => this.view_window()) ?? [0, 0];
|
|
5937
|
+
const shift = this.view_window_shift();
|
|
5938
|
+
min += shift;
|
|
5939
|
+
max += shift;
|
|
5920
5940
|
let max2 = max = Math.min(max, kids.length);
|
|
5921
5941
|
let min2 = min = Math.max(0, Math.min(min, max - 1));
|
|
5922
5942
|
const anchoring = this.render_visible_only();
|
|
@@ -6060,25 +6080,16 @@ var $;
|
|
|
6060
6080
|
"use strict";
|
|
6061
6081
|
var $;
|
|
6062
6082
|
(function ($) {
|
|
6063
|
-
$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}\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");
|
|
6083
|
+
$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");
|
|
6064
6084
|
})($ || ($ = {}));
|
|
6065
6085
|
|
|
6066
6086
|
;
|
|
6067
6087
|
($.$mol_speck) = class $mol_speck extends ($.$mol_view) {
|
|
6068
|
-
theme(){
|
|
6069
|
-
return "$mol_theme_accent";
|
|
6070
|
-
}
|
|
6071
6088
|
value(){
|
|
6072
6089
|
return null;
|
|
6073
6090
|
}
|
|
6074
|
-
|
|
6075
|
-
return
|
|
6076
|
-
}
|
|
6077
|
-
attr(){
|
|
6078
|
-
return {...(super.attr()), "mol_theme": (this.theme())};
|
|
6079
|
-
}
|
|
6080
|
-
style(){
|
|
6081
|
-
return {...(super.style()), "minHeight": "1em"};
|
|
6091
|
+
theme(){
|
|
6092
|
+
return "$mol_theme_accent";
|
|
6082
6093
|
}
|
|
6083
6094
|
sub(){
|
|
6084
6095
|
return [(this.value())];
|
|
@@ -6110,7 +6121,7 @@ var $;
|
|
|
6110
6121
|
"use strict";
|
|
6111
6122
|
var $;
|
|
6112
6123
|
(function ($) {
|
|
6113
|
-
$mol_style_attach("mol/speck/speck.view.css", "[mol_speck] {\n\tfont-size: .75rem;\n\tborder-radius: 1rem;\n\tmargin: -0.5rem -0.2rem;\n\talign-self: flex-start;\n\tmin-height: 1em;\n\tvertical-align: sub;\n\tpadding: 0 .2rem;\n\tposition: absolute;\n\tz-index: var(--mol_layer_speck);\n\ttext-align: center;\n\tline-height: .9;\n\tdisplay: inline-block;\n\twhite-space: nowrap;\n\ttext-overflow: ellipsis;\n\tuser-select: none;\n\tbox-shadow: 0 0 3px rgba(0,0,0,.5);\n}\n");
|
|
6124
|
+
$mol_style_attach("mol/speck/speck.view.css", "[mol_speck] {\n\tfont-size: .75rem;\n\tborder-radius: 1rem;\n\tmargin: -0.5rem -0.2rem;\n\talign-self: flex-start;\n\tmin-height: 1em;\n\tmin-width: .75rem;\n\tvertical-align: sub;\n\tpadding: 0 .2rem;\n\tposition: absolute;\n\tz-index: var(--mol_layer_speck);\n\ttext-align: center;\n\tline-height: .9;\n\tdisplay: inline-block;\n\twhite-space: nowrap;\n\ttext-overflow: ellipsis;\n\tuser-select: none;\n\tbox-shadow: 0 0 3px rgba(0,0,0,.5);\n}\n");
|
|
6114
6125
|
})($ || ($ = {}));
|
|
6115
6126
|
|
|
6116
6127
|
;
|