@sjcrh/proteinpaint-types 2.88.0 → 2.89.0

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/dataset.ts +18 -3
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sjcrh/proteinpaint-types",
3
- "version": "2.88.0",
3
+ "version": "2.89.0",
4
4
  "type": "module",
5
5
  "description": "Shared type definitions between ProteinPaint server and client code",
6
6
  "main": "src/index.ts",
package/src/dataset.ts CHANGED
@@ -1214,26 +1214,41 @@ type MassNav = {
1214
1214
  title?: Title
1215
1215
  /** Customization for the tabs*/
1216
1216
  tabs?: {
1217
- /** about, charts, groups, and fitler */
1217
+ /** supported keys: about, charts, groups, filter
1218
+ invalid key is ignored
1219
+ when dslabel is too long to show in about tab middl row or to define alternative label, do .tabs:{about:{mid:'alt label'}}
1220
+ */
1218
1221
  [index: string]: {
1219
1222
  /** show in a specific order of tabs */
1220
1223
  order?: number
1221
1224
  /** label appearing in the top row in upper case */
1222
1225
  top?: string
1223
- /** biggest label appearing in the middle row in upper case */
1226
+ /** biggest label appearing in the middle row */
1224
1227
  mid?: string
1225
1228
  /** label appearing in the bottom row*/
1226
1229
  btm?: string
1227
1230
  /** if true, does not show the tab */
1228
1231
  hide?: boolean
1229
- /** html code, specifically for the about tab
1232
+ /** static html contents to show specifically in "about" tab subheader
1230
1233
  * maybe used for other tabs as well.
1231
1234
  */
1232
1235
  html?: string
1236
+ /** "active" items, shown as clickable buttons in about tab. click an item to launch a plot */
1237
+ activeItems?: {
1238
+ items: ActiveItem[]
1239
+ // can add holderStyle to customize
1240
+ }
1233
1241
  }
1234
1242
  }
1235
1243
  }
1236
1244
 
1245
+ type ActiveItem = {
1246
+ /** string or html to show inside the button for the item, potentially allow to include <image> as logo */
1247
+ title: string
1248
+ /** plot object describing the plot to be launched */
1249
+ plot: object
1250
+ }
1251
+
1237
1252
  type Title = {
1238
1253
  text: string
1239
1254
  link?: string