@datagrok-libraries/bio 5.42.1 → 5.42.3

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 CHANGED
@@ -1,5 +1,16 @@
1
1
  # bio changelog
2
2
 
3
+ ## 5.42.3 (2024-06-26)
4
+
5
+ ### Bug fixes
6
+
7
+ * GROK-15996: Fix cell renderer for long mode
8
+ * Fix package-lock.json
9
+
10
+ ## 5.42.2 (2024-06-25)
11
+
12
+ Bump dependencies versions JSDraw.Lite and HELMWebEditor
13
+
3
14
  ## 5.42.1 (2024-06-24)
4
15
 
5
16
  Fix for JSDraw types
package/package.json CHANGED
@@ -8,7 +8,7 @@
8
8
  "access": "public"
9
9
  },
10
10
  "friendlyName": "Datagrok bio library",
11
- "version": "5.42.1",
11
+ "version": "5.42.3",
12
12
  "description": "Bio utilities, types supporting Macromolecule, Molecule3D data",
13
13
  "dependencies": {
14
14
  "@datagrok-libraries/gridext": "^1.3.71",
@@ -26,8 +26,8 @@
26
26
  "wu": "latest"
27
27
  },
28
28
  "devDependencies": {
29
- "@datagrok-libraries/helm-web-editor": "^1.1.4",
30
- "@datagrok-libraries/js-draw-lite": "^0.0.2",
29
+ "@datagrok-libraries/helm-web-editor": "^1.1.5",
30
+ "@datagrok-libraries/js-draw-lite": "^0.0.3",
31
31
  "@types/signals": "1.0.1",
32
32
  "@types/three": "^0.159.0",
33
33
  "@types/uuid": "^9.0.1",
@@ -1,8 +1,7 @@
1
1
  import type { App } from '@datagrok-libraries/helm-web-editor/helm/App';
2
- import { Atom, HelmType, IHelmWebEditor, IWebEditorMonomer } from './types';
2
+ import { IHelmWebEditor } from './types';
3
3
  import { IMonomerLib } from '../types/index';
4
- export type GetMonomerResType = IWebEditorMonomer | null;
5
- export type GetMonomerFunc = (a: Atom<HelmType> | HelmType, name?: string) => GetMonomerResType;
4
+ import { GetMonomerFunc } from '../helm/types';
6
5
  export interface IHelmHelper {
7
6
  createHelmWebEditor(): IHelmWebEditor;
8
7
  createWebEditorApp(host: HTMLDivElement, helm?: string): App;
@@ -1 +1 @@
1
- {"version":3,"file":"helm-helper.d.ts","sourceRoot":"","sources":["helm-helper.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAC,GAAG,EAAC,MAAM,8CAA8C,CAAC;AACtE,OAAO,EAAC,IAAI,EAAE,QAAQ,EAAE,cAAc,EAAE,iBAAiB,EAAC,MAAM,SAAS,CAAC;AAC1E,OAAO,EAAC,WAAW,EAAC,MAAM,gBAAgB,CAAC;AAE3C,MAAM,MAAM,iBAAiB,GAAG,iBAAiB,GAAG,IAAI,CAAC;AACzD,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,EAAE,IAAI,CAAC,QAAQ,CAAC,GAAG,QAAQ,EAAE,IAAI,CAAC,EAAE,MAAM,KAAK,iBAAiB,CAAC;AAEhG,MAAM,WAAW,WAAW;IAC1B,mBAAmB,IAAI,cAAc,CAAC;IAEtC,kBAAkB,CAAC,IAAI,EAAE,cAAc,EAAE,IAAI,CAAC,EAAE,MAAM,GAAG,GAAG,CAAC;IAE7D,IAAI,kBAAkB,IAAI,cAAc,GAAG,IAAI,CAAC;IAEhD,sBAAsB,CAAC,UAAU,EAAE,WAAW,GAAG,cAAc,CAAC;IAChE,kBAAkB,CAAC,cAAc,EAAE,cAAc,GAAG,cAAc,CAAC;IACnE,wBAAwB,IAAI,cAAc,CAAC;CAC5C;AAED,wBAAsB,aAAa,IAAI,OAAO,CAAC,WAAW,CAAC,CAO1D"}
1
+ {"version":3,"file":"helm-helper.d.ts","sourceRoot":"","sources":["helm-helper.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAC,GAAG,EAAC,MAAM,8CAA8C,CAAC;AACtE,OAAO,EAAiB,cAAc,EAAoB,MAAM,SAAS,CAAC;AAC1E,OAAO,EAAC,WAAW,EAAC,MAAM,gBAAgB,CAAC;AAC3C,OAAO,EAAC,cAAc,EAAC,MAAM,eAAe,CAAC;AAG7C,MAAM,WAAW,WAAW;IAC1B,mBAAmB,IAAI,cAAc,CAAC;IAEtC,kBAAkB,CAAC,IAAI,EAAE,cAAc,EAAE,IAAI,CAAC,EAAE,MAAM,GAAG,GAAG,CAAC;IAE7D,IAAI,kBAAkB,IAAI,cAAc,GAAG,IAAI,CAAC;IAEhD,sBAAsB,CAAC,UAAU,EAAE,WAAW,GAAG,cAAc,CAAC;IAChE,kBAAkB,CAAC,cAAc,EAAE,cAAc,GAAG,cAAc,CAAC;IACnE,wBAAwB,IAAI,cAAc,CAAC;CAC5C;AAED,wBAAsB,aAAa,IAAI,OAAO,CAAC,WAAW,CAAC,CAO1D"}
@@ -1 +1 @@
1
- {"version":3,"file":"helm-helper.js","sourceRoot":"","sources":["helm-helper.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,iBAAiB,CAAC;AAsBtC,MAAM,CAAC,KAAK,UAAU,aAAa;IACjC,MAAM,WAAW,GAAG,MAAM,CAAC;IAC3B,MAAM,QAAQ,GAAG,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,EAAC,OAAO,EAAE,WAAW,EAAE,IAAI,EAAE,eAAe,EAAC,CAAC,CAAC;IAC7E,IAAI,QAAQ,CAAC,MAAM,KAAK,CAAC;QACvB,MAAM,IAAI,KAAK,CAAC,YAAY,WAAW,qCAAqC,CAAC,CAAC;IAChF,MAAM,GAAG,GAAG,CAAC,MAAM,QAAQ,CAAC,CAAC,CAAC,CAAC,OAAO,EAAE,CAAC,IAAI,EAAE,CAAC,CAAC,mBAAmB,EAAiB,CAAC;IACtF,OAAO,GAAG,CAAC;AACb,CAAC"}
1
+ {"version":3,"file":"helm-helper.js","sourceRoot":"","sources":["helm-helper.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,iBAAiB,CAAC;AAqBtC,MAAM,CAAC,KAAK,UAAU,aAAa;IACjC,MAAM,WAAW,GAAG,MAAM,CAAC;IAC3B,MAAM,QAAQ,GAAG,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,EAAC,OAAO,EAAE,WAAW,EAAE,IAAI,EAAE,eAAe,EAAC,CAAC,CAAC;IAC7E,IAAI,QAAQ,CAAC,MAAM,KAAK,CAAC;QACvB,MAAM,IAAI,KAAK,CAAC,YAAY,WAAW,qCAAqC,CAAC,CAAC;IAChF,MAAM,GAAG,GAAG,CAAC,MAAM,QAAQ,CAAC,CAAC,CAAC,CAAC,OAAO,EAAE,CAAC,IAAI,EAAE,CAAC,CAAC,mBAAmB,EAAiB,CAAC;IACtF,OAAO,GAAG,CAAC;AACb,CAAC"}
@@ -5,7 +5,7 @@ import type { Bond } from '@datagrok-libraries/js-draw-lite/src/Bond';
5
5
  import type { Mol } from '@datagrok-libraries/js-draw-lite/src/Mol';
6
6
  import type { Editor } from '@datagrok-libraries/js-draw-lite/src/JSDraw.Editor';
7
7
  import type { App } from '@datagrok-libraries/helm-web-editor/helm/App';
8
- import type { IOrgHelmWebEditor, IOrgHelmMonomers } from '@datagrok-libraries/helm-web-editor/src/types/org-helm';
8
+ import type { IOrgHelmWebEditor, IOrgHelmMonomers, GetMonomerFunc, GetMonomerResType } from '@datagrok-libraries/helm-web-editor/src/types/org-helm';
9
9
  import type { HweWindow } from '@datagrok-libraries/helm-web-editor/src/types';
10
10
  import type { JSDraw2ModuleType, ScilModuleType } from '@datagrok-libraries/js-draw-lite/src/types';
11
11
  import type { OrgType } from '@datagrok-libraries/helm-web-editor/src/types/org-helm';
@@ -13,7 +13,7 @@ import type { Monomers } from '@datagrok-libraries/helm-web-editor/helm/Monomers
13
13
  import type { DojoType, DojoxType } from '@datagrok-libraries/js-draw-lite/src/types/dojo';
14
14
  export { HelmType, PolymerType, MonomerType, WebEditorRGroups };
15
15
  export { Atom, IJsAtom, Bond, Mol, Editor };
16
- export { IWebEditorMonomer, IMonomerColors, IOrgHelmWebEditor, IOrgHelmMonomers, App, Monomers };
16
+ export { IWebEditorMonomer, IMonomerColors, IOrgHelmWebEditor, IOrgHelmMonomers, App, Monomers, GetMonomerFunc, GetMonomerResType };
17
17
  export { DojoType, DojoxType };
18
18
  export { HweWindow, ScilModuleType, JSDraw2ModuleType, OrgType };
19
19
  export interface IHelmWebEditor {
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["types.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EACV,QAAQ,EAAE,WAAW,EAAE,WAAW,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,cAAc,EACxF,MAAM,gDAAgD,CAAC;AAExD,OAAO,KAAK,EAAC,IAAI,EAAC,MAAM,2CAA2C,CAAC;AACpE,OAAO,KAAK,EAAC,OAAO,EAAC,MAAM,oDAAoD,CAAC;AAChF,OAAO,KAAK,EAAC,IAAI,EAAC,MAAM,2CAA2C,CAAC;AACpE,OAAO,KAAK,EAAC,GAAG,EAAC,MAAM,0CAA0C,CAAC;AAClE,OAAO,KAAK,EAAC,MAAM,EAAC,MAAM,oDAAoD,CAAC;AAE/E,OAAO,KAAK,EAAC,GAAG,EAAC,MAAM,8CAA8C,CAAC;AACtE,OAAO,KAAK,EAAC,iBAAiB,EAAE,gBAAgB,EAAC,MAAM,wDAAwD,CAAC;AAChH,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,+CAA+C,CAAC;AAE7E,OAAO,KAAK,EAAC,iBAAiB,EAAE,cAAc,EAAC,MAAM,4CAA4C,CAAC;AAClG,OAAO,KAAK,EAAC,OAAO,EAAC,MAAM,wDAAwD,CAAC;AACpF,OAAO,KAAK,EAAC,QAAQ,EAAC,MAAM,mDAAmD,CAAC;AAChF,OAAO,KAAK,EAAC,QAAQ,EAAE,SAAS,EAAC,MAAM,iDAAiD,CAAC;AAEzF,OAAO,EAAC,QAAQ,EAAE,WAAW,EAAE,WAAW,EAAE,gBAAgB,EAAC,CAAC;AAC9D,OAAO,EAAC,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,GAAG,EAAE,MAAM,EAAC,CAAC;AAE1C,OAAO,EAAC,iB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AAO,KAAK,EAAC,QAAQ,EAAC,MAAM,mDAAmD,CAAC;AAChF,OAAO,KAAK,EAAC,QAAQ,EAAE,SAAS,EAAC,MAAM,iDAAiD,CAAC;AAEzF,OAAO,EAAC,QAAQ,EAAE,WAAW,EAAE,WAAW,EAAE,gBAAgB,EAAC,CAAC;AAC9D,OAAO,EAAC,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,GAAG,EAAE,MAAM,EAAC,CAAC;AAE1C,OAAO,EACL,iBAAiB,EAAE,cAAc,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,GAAG,EAC3E,QAAQ,EAAE,cAAc,EAAE,iBAAiB,EAC5C,CAAC;AAEF,OAAO,EAAC,QAAQ,EAAE,SAAS,EAAC,CAAC;AAC7B,OAAO,EAAC,SAAS,EAAE,cAAc,EAAE,iBAAiB,EAAE,OAAO,EAAC,CAAC;AAG/D,MAAM,WAAW,cAAc;IAC7B,IAAI,MAAM,IAAI,MAAM,CAAC,QAAQ,CAAC,CAAC;IAC/B,IAAI,IAAI,IAAI,cAAc,CAAC;IAE3B,YAAY,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;CACnD"}
@@ -8,10 +8,10 @@ type MonomerPlacerProps = {
8
8
  monomerCharWidth: number;
9
9
  separatorWidth: number;
10
10
  monomerToShort: MonomerToShortFunc;
11
- monomerLengthLimit: number;
12
11
  };
13
12
  export declare function hitBounds(bounds: number[], x: number): number | null;
14
13
  export declare class MonomerPlacer extends CellRendererBackBase<string> {
14
+ monomerLengthLimit: number;
15
15
  private readonly propsProvider;
16
16
  private colWidth;
17
17
  private _monomerLengthList;
@@ -19,8 +19,6 @@ export declare class MonomerPlacer extends CellRendererBackBase<string> {
19
19
  props: MonomerPlacerProps;
20
20
  private _processedRows;
21
21
  private _processedMaxVisibleSeqLength;
22
- private _updated;
23
- get updated(): boolean;
24
22
  _monomerLengthMap: {
25
23
  [key: string]: TextMetrics;
26
24
  };
@@ -28,7 +26,7 @@ export declare class MonomerPlacer extends CellRendererBackBase<string> {
28
26
  [key: string]: HTMLElement;
29
27
  };
30
28
  /** View is required to subscribe and handle for data frame changes */
31
- constructor(gridCol: DG.GridColumn | null, tableCol: DG.Column<string>, logger: ILogger, propsProvider: () => MonomerPlacerProps);
29
+ constructor(gridCol: DG.GridColumn | null, tableCol: DG.Column<string>, logger: ILogger, monomerLengthLimit: number, propsProvider: () => MonomerPlacerProps);
32
30
  protected reset(): void;
33
31
  /** Returns monomers lengths of the {@link rowIdx} and cumulative sums for borders, monomer places */
34
32
  getCellMonomerLengths(rowIdx: number, newWidth: number): [number[], number[]];
@@ -1 +1 @@
1
- {"version":3,"file":"cell-renderer-monomer-placer.d.ts","sourceRoot":"","sources":["cell-renderer-monomer-placer.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,MAAM,iBAAiB,CAAC;AAItC,OAAO,EAAC,UAAU,EAAC,MAAM,eAAe,CAAC;AACzC,OAAO,EAAC,kBAAkB,EAAC,MAAM,iBAAiB,CAAC;AAEnD,OAAO,EAAC,oBAAoB,EAAC,MAAM,2BAA2B,CAAC;AAC/D,OAAO,EAAC,OAAO,EAAC,MAAM,UAAU,CAAC;AAGjC,KAAK,kBAAkB,GAAG;IACxB,UAAU,EAAE,UAAU,CAAC;IACvB,gBAAgB,EAAE,MAAM,CAAC;IAAC,cAAc,EAAE,MAAM,CAAC;IACjD,cAAc,EAAE,kBAAkB,CAAC;IAAC,kBAAkB,EAAE,MAAM,CAAC;CAChE,CAAC;AAEF,wBAAgB,SAAS,CAAC,MAAM,EAAE,MAAM,EAAE,EAAE,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAoBpE;AAED,qBAAa,aAAc,SAAQ,oBAAoB,CAAC,MAAM,CAAC;IAqB3D,OAAO,CAAC,QAAQ,CAAC,aAAa;IApBhC,OAAO,CAAC,QAAQ,CAAa;IAC7B,OAAO,CAAC,kBAAkB,CAA2B;IAGrD,OAAO,CA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A2B;IA+BnC,OAAO,CAAC,8BAA8B;IAmDtC,yCAAyC;IAClC,WAAW,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI;IASpE,qBAAqB,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI;IAK1C,iBAAiB,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI;IAKtC,KAAK,IAAI,OAAO;CAGxB"}
@@ -24,17 +24,16 @@ export function hitBounds(bounds, x) {
24
24
  return null;
25
25
  }
26
26
  export class MonomerPlacer extends CellRendererBackBase {
27
- get updated() { return this._updated; }
28
27
  /** View is required to subscribe and handle for data frame changes */
29
- constructor(gridCol, tableCol, logger, propsProvider) {
28
+ constructor(gridCol, tableCol, logger, monomerLengthLimit, propsProvider) {
30
29
  super(gridCol, tableCol, logger);
30
+ this.monomerLengthLimit = monomerLengthLimit;
31
31
  this.propsProvider = propsProvider;
32
32
  this.colWidth = 0;
33
33
  this._monomerLengthList = null;
34
34
  // width of separator symbol
35
35
  this.separatorWidth = 5;
36
36
  this._processedMaxVisibleSeqLength = 0;
37
- this._updated = false;
38
37
  this._monomerLengthMap = {}; // caches the lengths to save time on g.measureText
39
38
  this._monomerStructureMap = {}; // caches the atomic structures of monomers
40
39
  this.props = this.propsProvider();
@@ -77,9 +76,10 @@ export class MonomerPlacer extends CellRendererBackBase {
77
76
  return [res, resSum];
78
77
  }
79
78
  getCellMonomerLengthsForSeq(rowIdx) {
79
+ const logPrefix = `${this.toLog()}.getCellMonomerLengthsForSeqMsa()`;
80
+ // this.logger.debug(`${logPrefix}, start`);
80
81
  if (this._monomerLengthList === null) {
81
82
  this._monomerLengthList = new Array(this.tableCol.length).fill(null);
82
- this._updated = true;
83
83
  }
84
84
  const minMonWidth = this.props.separatorWidth + 1 * this.props.monomerCharWidth;
85
85
  const maxVisibleSeqLength = Math.ceil(this.colWidth / minMonWidth);
@@ -91,7 +91,7 @@ export class MonomerPlacer extends CellRendererBackBase {
91
91
  let seqWidth = 0;
92
92
  for (let seqMonI = 0; seqMonI < visibleSeqLength; ++seqMonI) {
93
93
  const seqMonLabel = seqMonList[seqMonI];
94
- const shortMon = this.props.monomerToShort(seqMonLabel, this.props.monomerLengthLimit);
94
+ const shortMon = this.props.monomerToShort(seqMonLabel, this.monomerLengthLimit);
95
95
  const separatorWidth = this.props.seqHandler.isSeparator() ? this.separatorWidth : this.props.separatorWidth;
96
96
  const seqMonWidth = separatorWidth + shortMon.length * this.props.monomerCharWidth;
97
97
  res[seqMonI] = seqMonWidth;
@@ -99,15 +99,15 @@ export class MonomerPlacer extends CellRendererBackBase {
99
99
  if (seqWidth > this.colWidth)
100
100
  break;
101
101
  }
102
- this._updated = true;
103
102
  }
104
103
  return res;
105
104
  }
106
105
  getCellMonomerLengthsForSeqMsa() {
107
106
  var _a;
107
+ const logPrefix = `${this.toLog()}.getCellMonomerLengthsForSeqMsa()`;
108
+ // this.logger.debug(`${logPrefix}, start`);
108
109
  if (this._monomerLengthList === null) {
109
110
  this._monomerLengthList = new Array(1).fill(null);
110
- this._updated = true;
111
111
  }
112
112
  (_a = this._monomerLengthList)[0] ?? (_a[0] = new Array(0));
113
113
  const res = this._monomerLengthList[0];
@@ -142,14 +142,13 @@ export class MonomerPlacer extends CellRendererBackBase {
142
142
  let seqWidth = 0;
143
143
  for (let seqMonI = 0; seqMonI < visibleSeqLength; ++seqMonI) {
144
144
  const seqMonLabel = seqMonList[seqMonI];
145
- const shortMon = this.props.monomerToShort(seqMonLabel, this.props.monomerLengthLimit);
145
+ const shortMon = this.props.monomerToShort(seqMonLabel, this.monomerLengthLimit);
146
146
  const seqMonWidth = this.props.separatorWidth + shortMon.length * this.props.monomerCharWidth;
147
147
  res[seqMonI] = Math.max(res[seqMonI] ?? 0, seqMonWidth);
148
148
  seqWidth += seqMonWidth;
149
149
  if (seqWidth >= this.colWidth)
150
150
  break;
151
151
  }
152
- this._updated = true;
153
152
  this._processedMaxVisibleSeqLength = Math.max(this._processedMaxVisibleSeqLength, maxVisibleSeqLength);
154
153
  }
155
154
  return res; // first (and single) row of data
@@ -164,12 +163,12 @@ export class MonomerPlacer extends CellRendererBackBase {
164
163
  return hitBounds(monomerMaxLengthSumList, x);
165
164
  }
166
165
  setMonomerLengthLimit(limit) {
167
- this.props.monomerLengthLimit = limit;
168
- this._updated = true;
166
+ this.monomerLengthLimit = limit;
167
+ this.reset();
169
168
  }
170
169
  setSeparatorWidth(width) {
171
170
  this.props.separatorWidth = width;
172
- this._updated = true;
171
+ this.reset();
173
172
  }
174
173
  isMsa() {
175
174
  return this.props.seqHandler.isMsa();
@@ -1 +1 @@
1
- {"version":3,"file":"cell-renderer-monomer-placer.js","sourceRoot":"","sources":["cell-renderer-monomer-placer.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,MAAM,iBAAiB,CAAC;AAEtC,OAAO,EAAE,MAAM,IAAI,CAAC;AAEpB,OAAO,EAAC,UAAU,EAAC,MAAM,eAAe,CAAC;AAGzC,OAAO,EAAC,oBAAoB,EAAC,MAAM,2BAA2B,CAAC;AAE/D,OAAO,EAAC,mBAAmB,EAAC,MAAM,gCAAgC,CAAC;AAQnE,MAAM,UAAU,SAAS,CAAC,MAAgB,EAAE,CAAS;IACnD,IAAI,cAAc,GAAW,GAAG,CAAC;IACjC,IAAI,KAAK,GAAW,CAAC,CAAC;IACtB,IAAI,MAAM,GAAG,MAAM,CAAC,MAAM,GAAG,CAAC,CAAC;IAC/B,IAAI,IAAI,CAAC;IACT,OAAO,KAAK,IAAI,MAAM,EAAE;QACtB,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,MAAM,GAAG,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC;QACxC,IAAI,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,MAAM,CAAC,IAAI,GAAG,CAAC,CAAC;YAC3C,OAAO,IAAI,CAAC;aACT,IAAI,CAAC,GAAG,MAA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AAC,WAAW,CAAC,MAAM,CAAC,CAAC,SAAS,CAAC,CAAC,OAAO,EAAE,CAAC;QAC5E,IAAI,UAAU,CAAC,MAAM,KAAK,CAAC;YAAE,OAAO,IAAI,CAAC;QACzC,OAAO,SAAS,CAAC,uBAAuB,EAAE,CAAC,CAAC,CAAC;IAC/C,CAAC;IAEM,qBAAqB,CAAC,KAAa;QACxC,IAAI,CAAC,kBAAkB,GAAG,KAAK,CAAC;QAChC,IAAI,CAAC,KAAK,EAAE,CAAC;IACf,CAAC;IAEM,iBAAiB,CAAC,KAAa;QACpC,IAAI,CAAC,KAAK,CAAC,cAAc,GAAG,KAAK,CAAC;QAClC,IAAI,CAAC,KAAK,EAAE,CAAC;IACf,CAAC;IAEM,KAAK;QACV,OAAO,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,KAAK,EAAE,CAAC;IACvC,CAAC;CACF"}
@@ -1,4 +1,5 @@
1
1
  import * as DG from 'datagrok-api/dg';
2
+ import { ILogger } from './logger';
2
3
  export declare enum TAGS {
3
4
  maxMonomerLength = ".mm.cellRenderer.maxMonomerLength"
4
5
  }
@@ -6,28 +7,33 @@ export declare enum DrawStyle {
6
7
  MSA = "MSA",
7
8
  classic = "classic"
8
9
  }
10
+ export declare const PrintOptionsDefaults: {
11
+ /** Color of text to print */ color: string;
12
+ /** */ pivot: number;
13
+ /** Is left aligned */ left: boolean;
14
+ /** Transparency rate where 1.0 is fully transparent */ transparencyRate: number;
15
+ /** Monomer's separator, if specified */ separator: string;
16
+ /** Is checker if element last or not */ last: boolean;
17
+ /** MSA - for aligned, classic - for other seq */ drawStyle: DrawStyle;
18
+ /** Max word lengths per position (index of list) */ maxWord: number[];
19
+ /** Word index we currently draw */ wordIdx: number;
20
+ /** */ gridCell: DG.GridCell | null;
21
+ /** Reference sequence for diff mode */ referenceSequence: string[] | null;
22
+ /** Max length of a monomer */ maxLengthOfMonomer: number | null;
23
+ /** Map of monomers' text sizes */ monomerTextSizeMap: {
24
+ [key: string]: TextMetrics;
25
+ };
26
+ /** */ logger?: ILogger | undefined;
27
+ };
28
+ export type PrintOptions = typeof PrintOptionsDefaults;
9
29
  /** A function that prints a string aligned to left or centered.
10
- * @param {number}x x coordinate.
11
- * @param {number}y y coordinate.
12
- * @param {number}w Width.
13
- * @param {number}h Height.
14
- * @param {CanvasRenderingContext2D}g Canvas rendering context.
15
- * @param {string}s String to print.
16
- * @param {string}color String color.
17
- * @param {number}pivot Pirvot.
18
- * @param {boolean}left Is left aligned.
19
- * @param {number}transparencyRate Transparency rate where 1.0 is fully transparent
20
- * @param {string}separator Is separator for sequence.
21
- * @param {boolean}last Is checker if element last or not.
22
- * @param {DrawStyle}drawStyle Is draw style. MSA - for multicharSeq, classic - for other seq.
23
- * @param {number[]}maxWord {{[pos: number]: number}} Max word lengths per position.
24
- * @param {number}wordIdx Is index of word we currently draw.
25
- * @param {DG.GridCell}gridCell Is grid cell.
26
- * @param {string[]}referenceSequence Is reference sequence for diff mode.
27
- * @param {number}maxLengthOfMonomer Is max length of monomer.
28
- * @param {{[key: string]: TextMetrics}}monomerTextSizeMap Is map of monomer text sizes.
30
+ * @param {CanvasRenderingContext2D} g Canvas rendering context
31
+ * @param {string} s Text to print
32
+ * @param {number} x x coordinate
33
+ * @param {number} y y coordinate
34
+ * @param {number} w Width
35
+ * @param {number} h Height
36
+ * @param {PrintOptions} options
29
37
  * @return {number} x coordinate to start printing at.*/
30
- export declare function printLeftOrCentered(x: number, y: number, w: number, h: number, g: CanvasRenderingContext2D, s: string, color?: string, pivot?: number, left?: boolean, transparencyRate?: number, separator?: string, last?: boolean, drawStyle?: DrawStyle, maxWord?: number[], wordIdx?: number, gridCell?: DG.GridCell | null, referenceSequence?: string[] | null, maxLengthOfMonomer?: number | null, monomerTextSizeMap?: {
31
- [key: string]: TextMetrics;
32
- }): number;
38
+ export declare function printLeftOrCentered(g: CanvasRenderingContext2D, s: string, x: number, y: number, w: number, h: number, options: Partial<PrintOptions>): number;
33
39
  //# sourceMappingURL=cell-renderer.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"cell-renderer.d.ts","sourceRoot":"","sources":["cell-renderer.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,MAAM,iBAAiB,CAAC;AAUtC,oBAAY,IAAI;IACd,gBAAgB,sCAAsC;CACvD;AAED,oBAAY,SAAS;IACnB,GAAG,QAAQ;IACX,OAAO,YAAY;CACpB;AAED;;;;;;;;;;;;;;;;;;;;wDAoBwD;AACxD,wBAAgB,mBAAmB,CACjC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,EAC1C,CAAC,EAAE,wBAAwB,EAAE,CAAC,EAAE,MAAM,EAAE,KAAK,GAAE,MAAuB,EACtE,KAAK,GAAE,MAAU,EAAE,IAAI,GAAE,OAAe,EAAE,gBAAgB,GAAE,MAAY,EACxE,SAAS,GAAE,MAAW,EAAE,IAAI,GAAE,OAAe,EAAE,SAAS,GAAE,SAA6B,EACvF,OAAO,GAAE,MAAM,EAAO,EAAE,OAAO,GAAE,MAAU,EAAE,QAAQ,GAAE,EAAE,CAAC,QAAQ,GAAG,IAAW,EAChF,iBAAiB,GAAE,MAAM,EAAE,GAAG,IAAW,EAAE,kBAAkB,GAAE,MAAM,GAAG,IAAW,EACnF,kBAAkB,GAAE;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,WAAW,CAAA;CAAO,GACtD,MAAM,CA8DR"}
1
+ {"version":3,"file":"cell-renderer.d.ts","sourceRoot":"","sources":["cell-renderer.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,MAAM,iBAAiB,CAAC;AAGtC,OAAO,EAAC,OAAO,EAAC,MAAM,UAAU,CAAC;AAOjC,oBAAY,IAAI;IACd,gBAAgB,sCAAsC;CACvD;AAED,oBAAY,SAAS;IACnB,GAAG,QAAQ;IACX,OAAO,YAAY;CACpB;AAED,eAAO,MAAM,oBAAoB;IAC/B,6BAA6B,QAAQ,MAAM;IAC3C,MAAM,QAAQ,MAAM;IACpB,sBAAsB,OAAO,OAAO;IACpC,uDAAuD,mBAAmB,MAAM;IAChF,wCAAwC,YAAY,MAAM;IAC1D,wCAAwC,OAAO,OAAO;IACtD,iDAAiD,YAAY,SAAS;IACtE,oDAAoD,UAAU,MAAM,EAAE;IACtE,mCAAmC,UAAU,MAAM;IACnD,OAAO,WAAW,GAAG,QAAQ,GAAG,IAAI;IACpC,uCAAuC,oBAAoB,MAAM,EAAE,GAAG,IAAI;IAC1E,8BAA8B,qBAAqB,MAAM,GAAG,IAAI;IAChE,kCAAkC;;;IAClC,MAAM;CACL,CAAC;AAEJ,MAAM,MAAM,YAAY,GAAG,OAAO,oBAAoB,CAAC;AAEvD;;;;;;;;wDAQwD;AACxD,wBAAgB,mBAAmB,CAAC,CAAC,EAAE,wBAAwB,EAC7D,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,CAAC,YAAY,CAAC,GACpF,MAAM,CAkER"}
@@ -12,78 +12,88 @@ export var DrawStyle;
12
12
  DrawStyle["MSA"] = "MSA";
13
13
  DrawStyle["classic"] = "classic";
14
14
  })(DrawStyle || (DrawStyle = {}));
15
+ export const PrintOptionsDefaults = new class {
16
+ constructor() {
17
+ /** Color of text to print */ this.color = undefinedColor;
18
+ /** */ this.pivot = 0;
19
+ /** Is left aligned */ this.left = false;
20
+ /** Transparency rate where 1.0 is fully transparent */ this.transparencyRate = 1.0;
21
+ /** Monomer's separator, if specified */ this.separator = '';
22
+ /** Is checker if element last or not */ this.last = false;
23
+ /** MSA - for aligned, classic - for other seq */ this.drawStyle = DrawStyle.classic;
24
+ /** Max word lengths per position (index of list) */ this.maxWord = [];
25
+ /** Word index we currently draw */ this.wordIdx = 0;
26
+ /** */ this.gridCell = null;
27
+ /** Reference sequence for diff mode */ this.referenceSequence = null;
28
+ /** Max length of a monomer */ this.maxLengthOfMonomer = null;
29
+ /** Map of monomers' text sizes */ this.monomerTextSizeMap = {};
30
+ /** */ this.logger = undefined;
31
+ }
32
+ }();
15
33
  /** A function that prints a string aligned to left or centered.
16
- * @param {number}x x coordinate.
17
- * @param {number}y y coordinate.
18
- * @param {number}w Width.
19
- * @param {number}h Height.
20
- * @param {CanvasRenderingContext2D}g Canvas rendering context.
21
- * @param {string}s String to print.
22
- * @param {string}color String color.
23
- * @param {number}pivot Pirvot.
24
- * @param {boolean}left Is left aligned.
25
- * @param {number}transparencyRate Transparency rate where 1.0 is fully transparent
26
- * @param {string}separator Is separator for sequence.
27
- * @param {boolean}last Is checker if element last or not.
28
- * @param {DrawStyle}drawStyle Is draw style. MSA - for multicharSeq, classic - for other seq.
29
- * @param {number[]}maxWord {{[pos: number]: number}} Max word lengths per position.
30
- * @param {number}wordIdx Is index of word we currently draw.
31
- * @param {DG.GridCell}gridCell Is grid cell.
32
- * @param {string[]}referenceSequence Is reference sequence for diff mode.
33
- * @param {number}maxLengthOfMonomer Is max length of monomer.
34
- * @param {{[key: string]: TextMetrics}}monomerTextSizeMap Is map of monomer text sizes.
34
+ * @param {CanvasRenderingContext2D} g Canvas rendering context
35
+ * @param {string} s Text to print
36
+ * @param {number} x x coordinate
37
+ * @param {number} y y coordinate
38
+ * @param {number} w Width
39
+ * @param {number} h Height
40
+ * @param {PrintOptions} options
35
41
  * @return {number} x coordinate to start printing at.*/
36
- export function printLeftOrCentered(x, y, w, h, g, s, color = undefinedColor, pivot = 0, left = false, transparencyRate = 1.0, separator = '', last = false, drawStyle = DrawStyle.classic, maxWord = [], wordIdx = 0, gridCell = null, referenceSequence = null, maxLengthOfMonomer = null, monomerTextSizeMap = {}) {
42
+ export function printLeftOrCentered(g, s, x, y, w, h, options) {
43
+ var _a, _b, _c;
44
+ const opts = Object.assign(Object.assign({}, PrintOptionsDefaults), options);
45
+ const logPrefix = `Bio: printLeftOrCentered()`;
46
+ options.logger?.debug(`${logPrefix}, start`);
37
47
  g.textAlign = 'start';
38
48
  let colorPart = s.substring(0);
39
- let grayPart = last ? '' : separator;
40
- if (drawStyle === DrawStyle.MSA)
49
+ let grayPart = opts.last ? '' : opts.separator;
50
+ if (opts.drawStyle === DrawStyle.MSA)
41
51
  grayPart = '';
42
52
  let colorCode = true;
43
53
  let compareWithCurrent = true;
44
54
  let highlightDifference = 'difference';
45
- if ((gridCell != null) && (gridCell.cell.column != null)) {
46
- colorCode = gridCell.cell.column.temp['color-code'] ?? true;
47
- compareWithCurrent = gridCell.cell.column.temp['compare-with-current'] ?? true;
48
- highlightDifference = gridCell.cell.column.temp['highlight-difference'] ?? 'difference';
55
+ if ((opts.gridCell != null) && (opts.gridCell.cell.column != null)) {
56
+ colorCode = opts.gridCell.cell.column.temp['color-code'] ?? true;
57
+ compareWithCurrent = opts.gridCell.cell.column.temp['compare-with-current'] ?? true;
58
+ highlightDifference = opts.gridCell.cell.column.temp['highlight-difference'] ?? 'difference';
49
59
  }
50
- if (referenceSequence) {
51
- const currentMonomerCanonical = referenceSequence[wordIdx];
52
- if (compareWithCurrent && (referenceSequence.length > 0) && (highlightDifference === 'difference'))
53
- transparencyRate = (colorPart == currentMonomerCanonical) ? 0.3 : transparencyRate;
54
- if (compareWithCurrent && (referenceSequence.length > 0) && (highlightDifference === 'equal'))
55
- transparencyRate = (colorPart != currentMonomerCanonical) ? 0.3 : transparencyRate;
60
+ if (opts.referenceSequence) {
61
+ const currentMonomerCanonical = opts.referenceSequence[opts.wordIdx];
62
+ if (compareWithCurrent && (opts.referenceSequence.length > 0) && (highlightDifference === 'difference'))
63
+ opts.transparencyRate = (colorPart == currentMonomerCanonical) ? 0.3 : opts.transparencyRate;
64
+ if (compareWithCurrent && (opts.referenceSequence.length > 0) && (highlightDifference === 'equal'))
65
+ opts.transparencyRate = (colorPart != currentMonomerCanonical) ? 0.3 : opts.transparencyRate;
56
66
  }
57
- if (maxLengthOfMonomer != null)
58
- colorPart = monomerToShortFunction(colorPart, maxLengthOfMonomer);
67
+ if (opts.maxLengthOfMonomer != null)
68
+ colorPart = monomerToShortFunction(colorPart, opts.maxLengthOfMonomer);
59
69
  const fullText = colorPart + grayPart;
60
- monomerTextSizeMap[fullText] ?? (monomerTextSizeMap[fullText] = g.measureText(fullText));
61
- let textSize = monomerTextSizeMap[fullText];
62
- monomerTextSizeMap[colorPart] ?? (monomerTextSizeMap[colorPart] = g.measureText(colorPart));
63
- let maxColorTextSize = monomerTextSizeMap[colorPart].width;
64
- monomerTextSizeMap[grayPart] ?? (monomerTextSizeMap[grayPart] = g.measureText(grayPart));
65
- const grayPartSize = monomerTextSizeMap[grayPart].width;
70
+ (_a = opts.monomerTextSizeMap)[fullText] ?? (_a[fullText] = g.measureText(fullText));
71
+ let textSize = opts.monomerTextSizeMap[fullText];
72
+ (_b = opts.monomerTextSizeMap)[colorPart] ?? (_b[colorPart] = g.measureText(colorPart));
73
+ let maxColorTextSize = opts.monomerTextSizeMap[colorPart].width;
66
74
  const dy = h / 2 - (textSize.fontBoundingBoxAscent + textSize.fontBoundingBoxDescent) / 2 + 1;
75
+ (_c = opts.monomerTextSizeMap)[grayPart] ?? (_c[grayPart] = g.measureText(grayPart));
76
+ const grayPartSize = opts.monomerTextSizeMap[grayPart].width;
67
77
  textSize = textSize.width;
68
- if (drawStyle === DrawStyle.MSA) {
69
- maxColorTextSize = maxWord[wordIdx];
70
- textSize = maxWord[wordIdx];
78
+ if (opts.drawStyle === DrawStyle.MSA) {
79
+ maxColorTextSize = opts.maxWord[opts.wordIdx];
80
+ textSize = opts.maxWord[opts.wordIdx];
71
81
  }
72
82
  /** Draw color part at {@link dx1}, and gray part at {@link dx2}. */
73
83
  function draw(dx1, dx2) {
74
- const drawColor = colorCode ? color : blackColor;
84
+ const drawColor = colorCode ? opts.color : blackColor;
75
85
  g.fillStyle = drawColor;
76
- g.globalAlpha = transparencyRate;
77
- if (drawStyle === DrawStyle.classic) {
86
+ g.globalAlpha = opts.transparencyRate;
87
+ if (opts.drawStyle === DrawStyle.classic) {
78
88
  g.fillText(colorPart, x + dx1, y + dy);
79
89
  g.fillStyle = grayColor;
80
90
  g.fillText(grayPart, x + dx2, y + dy);
81
91
  }
82
- if (drawStyle === DrawStyle.MSA)
92
+ if (opts.drawStyle === DrawStyle.MSA)
83
93
  g.fillText(colorPart, x + dx1, y + dy);
84
94
  }
85
- const placeX = (maxWord[wordIdx] ?? 0) - (maxWord[0] ?? 0);
86
- if (left || textSize > w) {
95
+ const placeX = (opts.maxWord[opts.wordIdx] ?? 0) - (opts.maxWord[0] ?? 0);
96
+ if (opts.left || textSize > w) {
87
97
  draw(placeX, placeX + maxColorTextSize);
88
98
  return x + placeX + maxColorTextSize + grayPartSize;
89
99
  }
@@ -1 +1 @@
1
- {"version":3,"file":"cell-renderer.js","sourceRoot":"","sources":["cell-renderer.ts"],"names":[],"mappings":"AAIA,OAAO,EAAC,cAAc,EAAC,MAAM,uBAAuB,CAAC;AAGrD,MAAM,cAAc,GAAG,kBAAkB,CAAC;AAC1C,MAAM,SAAS,GAAG,SAAS,CAAC;AAC5B,MAAM,UAAU,GAAG,YAAY,CAAC;AAChC,MAAM,sBAAsB,GAA0D,cAAc,CAAC;AAErG,MAAM,CAAN,IAAY,IAEX;AAFD,WAAY,IAAI;IACd,8DAAsD,CAAA;AACxD,CAAC,EAFW,IAAI,KAAJ,IAAI,QAEf;AAED,MAAM,CAAN,IAAY,SAGX;AAHD,WAAY,SAAS;IACnB,wBAAW,CAAA;IACX,gCAAmB,CAAA;AACrB,CAAC,EAHW,SAAS,KAAT,SAAS,QAGpB;AAED;;;;;;;;;;;;;;;;;;;;wDAoBwD;AACxD,MAAM,UAAU,mBAAmB,CACjC,CAAS,EAAE,CAAS,EAAE,CAAS,EAAE,CAAS,EAC1C,CAA2B,EAAE,CAAS,EAAE,QAAgB,cAAc,EACtE,QAAgB,CAAC,EAAE,OAAgB,KAAK,EAAE,mBAA2B,GAAG,EACxE,YA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,CAAC,GAAG;YAClC,CAAC,CAAC,QAAQ,CAAC,SAAS,EAAE,CAAC,GAAG,GAAG,EAAE,CAAC,GAAG,EAAE,CAAC,CAAC;IAC3C,CAAC;IAED,MAAM,MAAM,GAAW,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC;IAClF,IAAI,IAAI,CAAC,IAAI,IAAI,QAAQ,GAAG,CAAC,EAAE;QAC7B,IAAI,CAAC,MAAM,EAAE,MAAM,GAAG,gBAAgB,CAAC,CAAC;QACxC,OAAO,CAAC,GAAG,MAAM,GAAG,gBAAgB,GAAG,YAAY,CAAC;KACrD;SAAM;QACL,MAAM,EAAE,GAAG,CAAC,CAAC,GAAG,QAAQ,CAAC,GAAG,CAAC,CAAC;QAC9B,IAAI,CAAC,EAAE,EAAE,EAAE,GAAG,gBAAgB,CAAC,CAAC;QAChC,OAAO,CAAC,GAAG,MAAM,GAAG,EAAE,GAAG,gBAAgB,CAAC;KAC3C;AACH,CAAC"}
package/src/package.d.ts DELETED
@@ -1 +0,0 @@
1
- //# sourceMappingURL=package.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"package.d.ts","sourceRoot":"","sources":["package.ts"],"names":[],"mappings":""}
package/src/package.js DELETED
@@ -1,2 +0,0 @@
1
- "use strict";
2
- //# sourceMappingURL=package.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"package.js","sourceRoot":"","sources":["package.ts"],"names":[],"mappings":""}