mol_dump_lib 0.0.847 → 0.0.849
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 +5 -4
- package/node.d.ts.map +1 -1
- package/node.deps.json +1 -1
- package/node.js +41 -21
- package/node.js.map +1 -1
- package/node.mjs +41 -21
- package/node.test.js +44 -21
- package/node.test.js.map +1 -1
- package/node.view.tree +5 -4
- package/package.json +1 -1
- package/web.d.ts +5 -4
- package/web.d.ts.map +1 -1
- package/web.deps.json +1 -1
- package/web.js +41 -21
- package/web.js.map +1 -1
- package/web.mjs +41 -21
- package/web.test.js +3 -0
- package/web.test.js.map +1 -1
- package/web.view.tree +5 -4
package/node.mjs
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,7 +6080,7 @@ 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
|
;
|
package/node.test.js
CHANGED
|
@@ -5765,51 +5765,60 @@ var $;
|
|
|
5765
5765
|
|
|
5766
5766
|
;
|
|
5767
5767
|
($.$mol_list) = class $mol_list extends ($.$mol_view) {
|
|
5768
|
-
rows(){
|
|
5769
|
-
return [];
|
|
5770
|
-
}
|
|
5771
5768
|
gap_before(){
|
|
5772
5769
|
return 0;
|
|
5773
5770
|
}
|
|
5774
|
-
|
|
5775
|
-
return 0;
|
|
5776
|
-
}
|
|
5777
|
-
render_visible_only(){
|
|
5778
|
-
return true;
|
|
5779
|
-
}
|
|
5780
|
-
render_over(){
|
|
5781
|
-
return 0;
|
|
5782
|
-
}
|
|
5783
|
-
sub(){
|
|
5784
|
-
return (this.rows());
|
|
5785
|
-
}
|
|
5786
|
-
Empty(){
|
|
5771
|
+
Gap_before(){
|
|
5787
5772
|
const obj = new this.$.$mol_view();
|
|
5773
|
+
(obj.style) = () => ({"paddingTop": (this.gap_before())});
|
|
5788
5774
|
return obj;
|
|
5789
5775
|
}
|
|
5790
|
-
|
|
5776
|
+
Empty(){
|
|
5791
5777
|
const obj = new this.$.$mol_view();
|
|
5792
|
-
(obj.style) = () => ({"paddingTop": (this.gap_before())});
|
|
5793
5778
|
return obj;
|
|
5794
5779
|
}
|
|
5780
|
+
gap_after(){
|
|
5781
|
+
return 0;
|
|
5782
|
+
}
|
|
5795
5783
|
Gap_after(){
|
|
5796
5784
|
const obj = new this.$.$mol_view();
|
|
5797
5785
|
(obj.style) = () => ({"paddingTop": (this.gap_after())});
|
|
5798
5786
|
return obj;
|
|
5799
5787
|
}
|
|
5788
|
+
rows(){
|
|
5789
|
+
return [
|
|
5790
|
+
(this.Gap_before()),
|
|
5791
|
+
(this.Empty()),
|
|
5792
|
+
(this.Gap_after())
|
|
5793
|
+
];
|
|
5794
|
+
}
|
|
5795
|
+
render_visible_only(){
|
|
5796
|
+
return true;
|
|
5797
|
+
}
|
|
5798
|
+
render_over(){
|
|
5799
|
+
return 0.1;
|
|
5800
|
+
}
|
|
5801
|
+
sub(){
|
|
5802
|
+
return (this.rows());
|
|
5803
|
+
}
|
|
5800
5804
|
item_height_min(id){
|
|
5801
5805
|
return 1;
|
|
5802
5806
|
}
|
|
5803
5807
|
item_width_min(id){
|
|
5804
5808
|
return 1;
|
|
5805
5809
|
}
|
|
5810
|
+
view_window_shift(next){
|
|
5811
|
+
if(next !== undefined) return next;
|
|
5812
|
+
return 0;
|
|
5813
|
+
}
|
|
5806
5814
|
view_window(){
|
|
5807
5815
|
return [0, 0];
|
|
5808
5816
|
}
|
|
5809
5817
|
};
|
|
5810
|
-
($mol_mem(($.$mol_list.prototype), "Empty"));
|
|
5811
5818
|
($mol_mem(($.$mol_list.prototype), "Gap_before"));
|
|
5819
|
+
($mol_mem(($.$mol_list.prototype), "Empty"));
|
|
5812
5820
|
($mol_mem(($.$mol_list.prototype), "Gap_after"));
|
|
5821
|
+
($mol_mem(($.$mol_list.prototype), "view_window_shift"));
|
|
5813
5822
|
|
|
5814
5823
|
|
|
5815
5824
|
;
|
|
@@ -5893,7 +5902,15 @@ var $;
|
|
|
5893
5902
|
class $mol_list extends $.$mol_list {
|
|
5894
5903
|
sub() {
|
|
5895
5904
|
const rows = this.rows();
|
|
5896
|
-
|
|
5905
|
+
const next = (rows.length === 0) ? [this.Empty()] : rows;
|
|
5906
|
+
const prev = $mol_mem_cached(() => this.sub());
|
|
5907
|
+
const [start, end] = $mol_mem_cached(() => this.view_window()) ?? [0, 0];
|
|
5908
|
+
if (prev && $mol_mem_cached(() => prev[start] !== next[start])) {
|
|
5909
|
+
const index = $mol_mem_cached(() => next.indexOf(prev[start])) ?? -1;
|
|
5910
|
+
if (index >= 0)
|
|
5911
|
+
this.view_window_shift(index - start);
|
|
5912
|
+
}
|
|
5913
|
+
return next;
|
|
5897
5914
|
}
|
|
5898
5915
|
render_visible_only() {
|
|
5899
5916
|
return this.$.$mol_support_css_overflow_anchor();
|
|
@@ -5908,6 +5925,9 @@ var $;
|
|
|
5908
5925
|
if (next)
|
|
5909
5926
|
return next;
|
|
5910
5927
|
let [min, max] = $mol_mem_cached(() => this.view_window()) ?? [0, 0];
|
|
5928
|
+
const shift = this.view_window_shift();
|
|
5929
|
+
min += shift;
|
|
5930
|
+
max += shift;
|
|
5911
5931
|
let max2 = max = Math.min(max, kids.length);
|
|
5912
5932
|
let min2 = min = Math.max(0, Math.min(min, max - 1));
|
|
5913
5933
|
const anchoring = this.render_visible_only();
|
|
@@ -6051,7 +6071,7 @@ var $;
|
|
|
6051
6071
|
"use strict";
|
|
6052
6072
|
var $;
|
|
6053
6073
|
(function ($) {
|
|
6054
|
-
$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");
|
|
6074
|
+
$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");
|
|
6055
6075
|
})($ || ($ = {}));
|
|
6056
6076
|
|
|
6057
6077
|
;
|
|
@@ -8856,6 +8876,9 @@ var $;
|
|
|
8856
8876
|
sort() {
|
|
8857
8877
|
return $mol_fail(new TypeError(`Mutable sort is forbidden. Use toSorted instead.`));
|
|
8858
8878
|
}
|
|
8879
|
+
indexOf(needle) {
|
|
8880
|
+
return this.findIndex(item => item === needle);
|
|
8881
|
+
}
|
|
8859
8882
|
[Symbol.toPrimitive]() {
|
|
8860
8883
|
return $mol_guid();
|
|
8861
8884
|
}
|