@czi-sds/data-viz 2.4.1 → 2.4.2

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.
@@ -1052,8 +1052,8 @@ const HOVER_THROTTLE_MS = 3 * 16.666;
1052
1052
  const COPIED_FEEDBACK_MS = 2e3;
1053
1053
  //#endregion
1054
1054
  //#region src/core/ProteinStructureViewer/components/SequenceView/style.ts
1055
- /** Height of the fade that masks residues scrolling under the panel header. */
1056
- const SCROLL_FADE_HEIGHT = 8;
1055
+ /** Height of the fades that mask residues scrolling past the panel's edges. */
1056
+ const SCROLL_FADE_HEIGHT = 10;
1057
1057
  const SequencePanel = (0, _emotion_styled.default)("div")`
1058
1058
  display: flex;
1059
1059
  flex-direction: column;
@@ -1167,8 +1167,9 @@ const ResidueCountValue = (0, _emotion_styled.default)("span")`
1167
1167
  `;
1168
1168
  /**
1169
1169
  * Scroll region for the residue grid. The `::before` fade masks residues as
1170
- * they scroll up under the header, so it has to start from whatever the panel
1171
- * is painted with or it leaves a mismatched strip.
1170
+ * they scroll up under the header and the `::after` fade masks them running off
1171
+ * the panel's bottom edge, so both have to start from whatever the panel is
1172
+ * painted with or they leave a mismatched strip.
1172
1173
  */
1173
1174
  const SequenceScroller = (0, _emotion_styled.default)("div")`
1174
1175
  position: relative;
@@ -1178,16 +1179,26 @@ const SequenceScroller = (0, _emotion_styled.default)("div")`
1178
1179
  ${(props) => {
1179
1180
  var _props$backgroundColo3, _semanticColors$base10;
1180
1181
  const semanticColors = (0, _czi_sds_components.getSemanticColors)(props);
1182
+ const surface = (_props$backgroundColo3 = props.backgroundColor) !== null && _props$backgroundColo3 !== void 0 ? _props$backgroundColo3 : semanticColors === null || semanticColors === void 0 || (_semanticColors$base10 = semanticColors.base) === null || _semanticColors$base10 === void 0 ? void 0 : _semanticColors$base10.surfacePrimary;
1181
1183
  return `
1182
- &::before {
1184
+ &::before,
1185
+ &::after {
1183
1186
  content: "";
1184
1187
  position: absolute;
1185
1188
  inset-inline: 0;
1186
- top: 0;
1187
1189
  z-index: 10;
1188
1190
  height: ${SCROLL_FADE_HEIGHT}px;
1189
1191
  pointer-events: none;
1190
- background: linear-gradient(to bottom, ${(_props$backgroundColo3 = props.backgroundColor) !== null && _props$backgroundColo3 !== void 0 ? _props$backgroundColo3 : semanticColors === null || semanticColors === void 0 || (_semanticColors$base10 = semanticColors.base) === null || _semanticColors$base10 === void 0 ? void 0 : _semanticColors$base10.surfacePrimary}, transparent);
1192
+ }
1193
+
1194
+ &::before {
1195
+ top: 0;
1196
+ background: linear-gradient(to bottom, ${surface}, transparent);
1197
+ }
1198
+
1199
+ &::after {
1200
+ bottom: 0;
1201
+ background: linear-gradient(to top, ${surface}, transparent);
1191
1202
  }
1192
1203
  `;
1193
1204
  }}
@@ -1051,8 +1051,8 @@ const HOVER_THROTTLE_MS = 3 * 16.666;
1051
1051
  const COPIED_FEEDBACK_MS = 2e3;
1052
1052
  //#endregion
1053
1053
  //#region src/core/ProteinStructureViewer/components/SequenceView/style.ts
1054
- /** Height of the fade that masks residues scrolling under the panel header. */
1055
- const SCROLL_FADE_HEIGHT = 8;
1054
+ /** Height of the fades that mask residues scrolling past the panel's edges. */
1055
+ const SCROLL_FADE_HEIGHT = 10;
1056
1056
  const SequencePanel = styled("div")`
1057
1057
  display: flex;
1058
1058
  flex-direction: column;
@@ -1166,8 +1166,9 @@ const ResidueCountValue = styled("span")`
1166
1166
  `;
1167
1167
  /**
1168
1168
  * Scroll region for the residue grid. The `::before` fade masks residues as
1169
- * they scroll up under the header, so it has to start from whatever the panel
1170
- * is painted with or it leaves a mismatched strip.
1169
+ * they scroll up under the header and the `::after` fade masks them running off
1170
+ * the panel's bottom edge, so both have to start from whatever the panel is
1171
+ * painted with or they leave a mismatched strip.
1171
1172
  */
1172
1173
  const SequenceScroller = styled("div")`
1173
1174
  position: relative;
@@ -1177,16 +1178,26 @@ const SequenceScroller = styled("div")`
1177
1178
  ${(props) => {
1178
1179
  var _props$backgroundColo3, _semanticColors$base10;
1179
1180
  const semanticColors = getSemanticColors(props);
1181
+ const surface = (_props$backgroundColo3 = props.backgroundColor) !== null && _props$backgroundColo3 !== void 0 ? _props$backgroundColo3 : semanticColors === null || semanticColors === void 0 || (_semanticColors$base10 = semanticColors.base) === null || _semanticColors$base10 === void 0 ? void 0 : _semanticColors$base10.surfacePrimary;
1180
1182
  return `
1181
- &::before {
1183
+ &::before,
1184
+ &::after {
1182
1185
  content: "";
1183
1186
  position: absolute;
1184
1187
  inset-inline: 0;
1185
- top: 0;
1186
1188
  z-index: 10;
1187
1189
  height: ${SCROLL_FADE_HEIGHT}px;
1188
1190
  pointer-events: none;
1189
- background: linear-gradient(to bottom, ${(_props$backgroundColo3 = props.backgroundColor) !== null && _props$backgroundColo3 !== void 0 ? _props$backgroundColo3 : semanticColors === null || semanticColors === void 0 || (_semanticColors$base10 = semanticColors.base) === null || _semanticColors$base10 === void 0 ? void 0 : _semanticColors$base10.surfacePrimary}, transparent);
1191
+ }
1192
+
1193
+ &::before {
1194
+ top: 0;
1195
+ background: linear-gradient(to bottom, ${surface}, transparent);
1196
+ }
1197
+
1198
+ &::after {
1199
+ bottom: 0;
1200
+ background: linear-gradient(to top, ${surface}, transparent);
1190
1201
  }
1191
1202
  `;
1192
1203
  }}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@czi-sds/data-viz",
3
- "version": "2.4.1",
3
+ "version": "2.4.2",
4
4
  "main": "dist/index.cjs.js",
5
5
  "types": "dist/index.cjs.d.ts",
6
6
  "module": "dist/index.esm.js",
@@ -147,5 +147,5 @@
147
147
  "echarts": "^6.0.0",
148
148
  "lodash": "^4.17.21"
149
149
  },
150
- "gitHead": "a4587a068a8e457bb068a1b170951c8f4f396bd5"
150
+ "gitHead": "4fb1150d51f5cde0b88503ca0146eba3b53f1ab1"
151
151
  }