@legendapp/list 3.0.0-beta.0 → 3.0.0-beta.1
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/CHANGELOG.md +5 -0
- package/index.js +3 -2
- package/index.mjs +3 -2
- package/index.native.js +3 -2
- package/index.native.mjs +3 -2
- package/package.json +1 -1
- package/section-list.js +3 -2
- package/section-list.mjs +3 -2
- package/section-list.native.js +3 -2
- package/section-list.native.mjs +3 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
## 3.0.0 beta
|
|
2
|
+
|
|
3
|
+
- Feat: Web support
|
|
4
|
+
- Breaking: Some of the maintainVisibleContentPosition behavior for preventing jumping while scrolling is now core behavior, and the behavior for maintaining scroll position when adding data is controlled by the prop, which is now disabled by default.
|
|
5
|
+
|
|
1
6
|
## 2.0.14
|
|
2
7
|
- Feat: Add dataVersion prop to trigger re-render when mutating the data array in place
|
|
3
8
|
|
package/index.js
CHANGED
|
@@ -127,12 +127,13 @@ function set$(ctx, signalName, value) {
|
|
|
127
127
|
}
|
|
128
128
|
function getContentSize(ctx) {
|
|
129
129
|
var _a3, _b;
|
|
130
|
-
const { values } = ctx;
|
|
130
|
+
const { values, internalState } = ctx;
|
|
131
131
|
const stylePaddingTop = values.get("stylePaddingTop") || 0;
|
|
132
|
+
const stylePaddingBottom = (internalState == null ? void 0 : internalState.props.stylePaddingBottom) || 0;
|
|
132
133
|
const headerSize = values.get("headerSize") || 0;
|
|
133
134
|
const footerSize = values.get("footerSize") || 0;
|
|
134
135
|
const totalSize = (_b = (_a3 = ctx.internalState) == null ? void 0 : _a3.pendingTotalSize) != null ? _b : values.get("totalSize");
|
|
135
|
-
return headerSize + footerSize + totalSize + stylePaddingTop;
|
|
136
|
+
return headerSize + footerSize + totalSize + stylePaddingTop + stylePaddingBottom;
|
|
136
137
|
}
|
|
137
138
|
function useArr$(signalNames) {
|
|
138
139
|
const ctx = React3__namespace.useContext(ContextState);
|
package/index.mjs
CHANGED
|
@@ -106,12 +106,13 @@ function set$(ctx, signalName, value) {
|
|
|
106
106
|
}
|
|
107
107
|
function getContentSize(ctx) {
|
|
108
108
|
var _a3, _b;
|
|
109
|
-
const { values } = ctx;
|
|
109
|
+
const { values, internalState } = ctx;
|
|
110
110
|
const stylePaddingTop = values.get("stylePaddingTop") || 0;
|
|
111
|
+
const stylePaddingBottom = (internalState == null ? void 0 : internalState.props.stylePaddingBottom) || 0;
|
|
111
112
|
const headerSize = values.get("headerSize") || 0;
|
|
112
113
|
const footerSize = values.get("footerSize") || 0;
|
|
113
114
|
const totalSize = (_b = (_a3 = ctx.internalState) == null ? void 0 : _a3.pendingTotalSize) != null ? _b : values.get("totalSize");
|
|
114
|
-
return headerSize + footerSize + totalSize + stylePaddingTop;
|
|
115
|
+
return headerSize + footerSize + totalSize + stylePaddingTop + stylePaddingBottom;
|
|
115
116
|
}
|
|
116
117
|
function useArr$(signalNames) {
|
|
117
118
|
const ctx = React3.useContext(ContextState);
|
package/index.native.js
CHANGED
|
@@ -121,12 +121,13 @@ function set$(ctx, signalName, value) {
|
|
|
121
121
|
}
|
|
122
122
|
function getContentSize(ctx) {
|
|
123
123
|
var _a3, _b;
|
|
124
|
-
const { values } = ctx;
|
|
124
|
+
const { values, internalState } = ctx;
|
|
125
125
|
const stylePaddingTop = values.get("stylePaddingTop") || 0;
|
|
126
|
+
const stylePaddingBottom = (internalState == null ? void 0 : internalState.props.stylePaddingBottom) || 0;
|
|
126
127
|
const headerSize = values.get("headerSize") || 0;
|
|
127
128
|
const footerSize = values.get("footerSize") || 0;
|
|
128
129
|
const totalSize = (_b = (_a3 = ctx.internalState) == null ? void 0 : _a3.pendingTotalSize) != null ? _b : values.get("totalSize");
|
|
129
|
-
return headerSize + footerSize + totalSize + stylePaddingTop;
|
|
130
|
+
return headerSize + footerSize + totalSize + stylePaddingTop + stylePaddingBottom;
|
|
130
131
|
}
|
|
131
132
|
function useArr$(signalNames) {
|
|
132
133
|
const ctx = React2__namespace.useContext(ContextState);
|
package/index.native.mjs
CHANGED
|
@@ -100,12 +100,13 @@ function set$(ctx, signalName, value) {
|
|
|
100
100
|
}
|
|
101
101
|
function getContentSize(ctx) {
|
|
102
102
|
var _a3, _b;
|
|
103
|
-
const { values } = ctx;
|
|
103
|
+
const { values, internalState } = ctx;
|
|
104
104
|
const stylePaddingTop = values.get("stylePaddingTop") || 0;
|
|
105
|
+
const stylePaddingBottom = (internalState == null ? void 0 : internalState.props.stylePaddingBottom) || 0;
|
|
105
106
|
const headerSize = values.get("headerSize") || 0;
|
|
106
107
|
const footerSize = values.get("footerSize") || 0;
|
|
107
108
|
const totalSize = (_b = (_a3 = ctx.internalState) == null ? void 0 : _a3.pendingTotalSize) != null ? _b : values.get("totalSize");
|
|
108
|
-
return headerSize + footerSize + totalSize + stylePaddingTop;
|
|
109
|
+
return headerSize + footerSize + totalSize + stylePaddingTop + stylePaddingBottom;
|
|
109
110
|
}
|
|
110
111
|
function useArr$(signalNames) {
|
|
111
112
|
const ctx = React2.useContext(ContextState);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@legendapp/list",
|
|
3
|
-
"version": "3.0.0-beta.
|
|
3
|
+
"version": "3.0.0-beta.1",
|
|
4
4
|
"description": "Legend List is a drop-in replacement for FlatList with much better performance and supporting dynamically sized items.",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"private": false,
|
package/section-list.js
CHANGED
|
@@ -128,12 +128,13 @@ function set$(ctx, signalName, value) {
|
|
|
128
128
|
}
|
|
129
129
|
function getContentSize(ctx) {
|
|
130
130
|
var _a3, _b;
|
|
131
|
-
const { values } = ctx;
|
|
131
|
+
const { values, internalState } = ctx;
|
|
132
132
|
const stylePaddingTop = values.get("stylePaddingTop") || 0;
|
|
133
|
+
const stylePaddingBottom = (internalState == null ? void 0 : internalState.props.stylePaddingBottom) || 0;
|
|
133
134
|
const headerSize = values.get("headerSize") || 0;
|
|
134
135
|
const footerSize = values.get("footerSize") || 0;
|
|
135
136
|
const totalSize = (_b = (_a3 = ctx.internalState) == null ? void 0 : _a3.pendingTotalSize) != null ? _b : values.get("totalSize");
|
|
136
|
-
return headerSize + footerSize + totalSize + stylePaddingTop;
|
|
137
|
+
return headerSize + footerSize + totalSize + stylePaddingTop + stylePaddingBottom;
|
|
137
138
|
}
|
|
138
139
|
function useArr$(signalNames) {
|
|
139
140
|
const ctx = React3__namespace.useContext(ContextState);
|
package/section-list.mjs
CHANGED
|
@@ -107,12 +107,13 @@ function set$(ctx, signalName, value) {
|
|
|
107
107
|
}
|
|
108
108
|
function getContentSize(ctx) {
|
|
109
109
|
var _a3, _b;
|
|
110
|
-
const { values } = ctx;
|
|
110
|
+
const { values, internalState } = ctx;
|
|
111
111
|
const stylePaddingTop = values.get("stylePaddingTop") || 0;
|
|
112
|
+
const stylePaddingBottom = (internalState == null ? void 0 : internalState.props.stylePaddingBottom) || 0;
|
|
112
113
|
const headerSize = values.get("headerSize") || 0;
|
|
113
114
|
const footerSize = values.get("footerSize") || 0;
|
|
114
115
|
const totalSize = (_b = (_a3 = ctx.internalState) == null ? void 0 : _a3.pendingTotalSize) != null ? _b : values.get("totalSize");
|
|
115
|
-
return headerSize + footerSize + totalSize + stylePaddingTop;
|
|
116
|
+
return headerSize + footerSize + totalSize + stylePaddingTop + stylePaddingBottom;
|
|
116
117
|
}
|
|
117
118
|
function useArr$(signalNames) {
|
|
118
119
|
const ctx = React3.useContext(ContextState);
|
package/section-list.native.js
CHANGED
|
@@ -121,12 +121,13 @@ function set$(ctx, signalName, value) {
|
|
|
121
121
|
}
|
|
122
122
|
function getContentSize(ctx) {
|
|
123
123
|
var _a3, _b;
|
|
124
|
-
const { values } = ctx;
|
|
124
|
+
const { values, internalState } = ctx;
|
|
125
125
|
const stylePaddingTop = values.get("stylePaddingTop") || 0;
|
|
126
|
+
const stylePaddingBottom = (internalState == null ? void 0 : internalState.props.stylePaddingBottom) || 0;
|
|
126
127
|
const headerSize = values.get("headerSize") || 0;
|
|
127
128
|
const footerSize = values.get("footerSize") || 0;
|
|
128
129
|
const totalSize = (_b = (_a3 = ctx.internalState) == null ? void 0 : _a3.pendingTotalSize) != null ? _b : values.get("totalSize");
|
|
129
|
-
return headerSize + footerSize + totalSize + stylePaddingTop;
|
|
130
|
+
return headerSize + footerSize + totalSize + stylePaddingTop + stylePaddingBottom;
|
|
130
131
|
}
|
|
131
132
|
function useArr$(signalNames) {
|
|
132
133
|
const ctx = React2__namespace.useContext(ContextState);
|
package/section-list.native.mjs
CHANGED
|
@@ -100,12 +100,13 @@ function set$(ctx, signalName, value) {
|
|
|
100
100
|
}
|
|
101
101
|
function getContentSize(ctx) {
|
|
102
102
|
var _a3, _b;
|
|
103
|
-
const { values } = ctx;
|
|
103
|
+
const { values, internalState } = ctx;
|
|
104
104
|
const stylePaddingTop = values.get("stylePaddingTop") || 0;
|
|
105
|
+
const stylePaddingBottom = (internalState == null ? void 0 : internalState.props.stylePaddingBottom) || 0;
|
|
105
106
|
const headerSize = values.get("headerSize") || 0;
|
|
106
107
|
const footerSize = values.get("footerSize") || 0;
|
|
107
108
|
const totalSize = (_b = (_a3 = ctx.internalState) == null ? void 0 : _a3.pendingTotalSize) != null ? _b : values.get("totalSize");
|
|
108
|
-
return headerSize + footerSize + totalSize + stylePaddingTop;
|
|
109
|
+
return headerSize + footerSize + totalSize + stylePaddingTop + stylePaddingBottom;
|
|
109
110
|
}
|
|
110
111
|
function useArr$(signalNames) {
|
|
111
112
|
const ctx = React2.useContext(ContextState);
|