@datagrok/helm 3.0.0 → 3.0.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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,23 @@
1
1
  # Helm changelog
2
2
 
3
+ ## v.next
4
+
5
+ * Moved the Helm Playwright E2E suite into the package (playwright/); helpers from @datagrok-libraries/test/src/playwright
6
+
7
+ ## 3.0.1 (2026-06-20)
8
+
9
+ ### Features
10
+
11
+ * Migration to Datagrok Helm Web Editor
12
+ * Support for new Helm Service, editor, parsing and rendering
13
+ * Helm editor panes including molecular structure, composition and conversion
14
+ * Monomer highlighting in HELM grid cells: cells respond to macromolecule highlight events, drawing a translucent overlay around the highlighted monomers
15
+ * Improved RNA splitting: support for complex RNA and complex triplets, and more inclusive matching
16
+
17
+ ### Bug Fixes
18
+
19
+ * Fixed async renderer invalidation
20
+
3
21
  ## 2.13.4 (2026-03-31)
4
22
 
5
23
  ### Features
package/CLAUDE.md CHANGED
@@ -2,111 +2,102 @@
2
2
 
3
3
  ## Overview
4
4
 
5
- **Helm** (`@datagrok/helm`) is a Datagrok plugin providing full support for **HELM notation** (Hierarchical Editing Language for Macromolecules) — importing, detecting, rendering, editing, and conversion. It wraps the Pistoia HELM Web Editor and Scilligence JSDraw2 libraries, integrating them into the Datagrok platform with custom cell renderers, input widgets, and monomer library management.
5
+ **Helm** (`@datagrok/helm`) is a Datagrok plugin providing full support for **HELM notation** (Hierarchical Editing Language for Macromolecules) — importing, detecting, rendering, editing, and conversion. It is built on the **standalone Datagrok HELM Web Editor** (`@datagrok-libraries/hwe`), integrating it into the platform with a custom grid cell renderer, an input widget, a property panel, and HELM↔other-notation conversion.
6
+
7
+ The legacy forked Pistoia HELM Web Editor + Scilligence JSDraw2 + Dojo toolkit stack has been **fully removed** (HWE migration, package v3.0). There are no more bundled `vendor/dojo-1.10.10/` or `helm/JSDraw/` sources and no `org.helm.webeditor` / `JSDraw2` / `scil` / `dojo` globals.
6
8
 
7
9
  Category: **Bioinformatics**.
8
10
 
11
+ ## The hwe library — `@datagrok-libraries/hwe`
12
+
13
+ Every editor / parse / render / calculation path routes through the self-contained `@datagrok-libraries/hwe` package. It is an **external npm dependency** (not under this repo's `libraries/`) and injects no global scripts. The package consumes from it:
14
+
15
+ | Export | Purpose |
16
+ |---|---|
17
+ | `HelmService` | Parses HELM, renders **synchronously** to a canvas (`renderToCanvas`), and computes molfiles / molecular properties. Reads monomers through `bridgeMonomerLib(...)` |
18
+ | `HelmHelperAdapter` | Wraps a `HelmService` to expose Datagrok's `IHelmHelper` plus a legacy-compatible Pistoia `App` shape (`createWebEditorApp`), so existing dialog consumers swap in unchanged |
19
+ | `bridgeMonomerLib(lib)` | Adapts Bio's `IMonomerLib` so the editor resolves exactly the same monomers as the rest of the platform |
20
+ | `buildHelmMolView(mol)` | Builds a legacy-shaped (`atoms[].p` in model space) laid-out molecule used for hover hit-testing and the highlight overlay |
21
+ | `PolymerTypes`; types `IMonomerLibBaseLike`, `MonomersFuncsLike`, `CanvasBounds` | Constants / type shims for the adapter and renderer |
22
+ | `@datagrok-libraries/hwe/styles.css` | The editor's `.hw-*` stylesheet. **Must be imported** (hwe ships CSS as a bundler import only — no runtime injection) or the editor renders unstyled. Imported once in `src/package.ts` |
23
+
9
24
  ## Architecture
10
25
 
11
26
  ### Entry Point — `src/package.ts`
12
27
 
13
- `PackageFunctions` class registers all platform-visible functions via `@grok.decorators`:
14
- - `initHelm` — `@init`: loads RdKit, SeqHelper, MonomerLibHelper, initializes HELMWebEditor, creates `HelmHelper` singleton, patches Pistoia monomer system
15
- - `getHelmService` — `@func`: returns `HelmServiceBase` singleton for off-screen HELM rendering
28
+ Imports `@datagrok-libraries/hwe/styles.css`. `PackageFunctions` class registers all platform-visible functions via `@grok.decorators`:
29
+ - `initHelm` — `@init`: loads the RDKit module, `SeqHelper`, `MonomerLibHelper`; creates the `HelmHelper` singleton (passing `seqHelper`, logger, `rdKitModule`); then `_package.completeInit(helmHelper, libHelper)`. No Dojo/editor bootstrapping or Pistoia monomer patching.
16
30
  - `helmCellRenderer` — `@func` (role: `cellRenderer`): returns `HelmGridCellRenderer` for columns with `quality=Macromolecule, units=helm`
17
- - `editMoleculeCell` — `@func` (role: `cellEditor`): opens full-screen HELM Web Editor dialog for cell editing
18
- - `openEditor` (`Edit Helm...`) — `@func` (action): context-menu editor for Macromolecule columns, converts non-HELM notations to HELM before editing
19
- - `propertiesWidget` (`Properties`) — `@panel`: shows molecular formula, weight, extinction coefficient for Macromolecule values
20
- - `getMolfiles` — `@func`: converts a Macromolecule column to molfile strings
21
- - `helmInput` — `@func` (role: `valueEditor`): creates `HelmInput` widget for Macromolecule/HELM semtype
22
- - `getHelmHelper` — `@func`: returns `IHelmHelper` singleton
23
- - `measureCellRenderer` — `@func`: performance measurement utility for cell rendering
24
- - `highlightMonomers` — `@func`: test app that loads peptide data and calls `Bio:toAtomicLevel` with highlight
31
+ - `editMoleculeCell` — `@func` (role: `cellEditor`): opens the full-screen HELM editor app dialog for cell editing (`openWebEditor`)
32
+ - `openEditor` (`Edit Helm...`) — `@func` (action): context-menu editor for Macromolecule columns; converts non-HELM notations to HELM first, then writes the edited value back in the column's original notation
33
+ - `propertiesWidget` (`Properties`) — `@panel`: molecular formula, weight, extinction coefficient for a Macromolecule value
34
+ - `getMolfiles` — `@func`: converts a Macromolecule column to molfile strings via `helmHelper.getMolfiles()`
35
+ - `helmInput` — `@func` (role: `valueEditor`): creates the `HelmInput` widget for Macromolecule/HELM semType
36
+ - `getHelmHelper` — `@func`: returns the `IHelmHelper` singleton
37
+ - `measureCellRenderer` — `@func`: cell-render performance benchmark
38
+ - `highlightMonomers` (`Highlight Monomers`) — `@func`: test app that loads peptide data and calls `Bio:toAtomicLevel` with `highlight: true`
39
+
40
+ > The legacy `getHelmService` function is **gone** — the off-screen render service now lives inside hwe and is owned by the helper's adapter.
25
41
 
26
42
  **Exports**: `_package` (instance of `HelmPackage`), auto-generated function wrappers from `package.g.ts`
27
43
 
28
44
  ### Detector — `detectors.js`
29
45
 
30
46
  `HelmPackageDetectors` class:
31
- - `autostart` — registers `ui.input.helmAsync` polyfill so other packages can create HELM inputs before this package fully loads
47
+ - `autostart` (meta.role: autostart) Helm bootstrap; registers the `ui.input.helmAsync` polyfill (delegates to `Helm:helmInput`) so other packages can create HELM inputs before this package fully loads. No semantic-type detector — HELM detection lives in Bio's `detectMacromolecule`.
32
48
 
33
- ### Package Utilities — `src/package-utils.ts`
49
+ ### Package Singleton — `src/package-utils.ts`
34
50
 
35
51
  `HelmPackage` class (extends `DG.Package`) — the package singleton managing:
36
- - `helmHelper` / `seqHelper` — accessors for initialized helpers
37
- - `_libHelper` — monomer library helper
38
- - `monomerLib` — accessor for current `IMonomerLib`
39
- - `initHELMWebEditor()` — loads Dojo toolkit (bundled), JSDraw2 + HELM Web Editor, patches `dojox.gfx.svg.Text.getTextWidth` for hang prevention
40
- - `initHelmPatchScilAlert()` — suppresses Scilligence alert popups for missing monomers
41
- - `initHelmPatchPistoia()` — overrides `org.helm.webeditor.Monomers.getMonomer` to use Datagrok's monomer library instead of built-in dictionaries
42
- - `completeInit()` — ties helmHelper + libHelper together, rewrites Pistoia monomer dictionaries, subscribes to monomer lib changes
43
- - `monomerLibOnChangedHandler()` — resyncs Pistoia dictionaries when monomer library updates
44
-
45
- `initHelmLoadAndPatchDojo()` — complex initialization:
46
- 1. Configures and loads bundled Dojo 1.10.10 with custom `loaderPatch.injectUrl`
47
- 2. Requires Dojo modules (dojo/window, dojox/gfx, dijit/*, etc.)
48
- 3. Waits for all modules to be ready
49
- 4. Patches `dojox.gfx.svg.Text.prototype.getTextWidth` to prevent infinite loops
52
+ - `helmHelper` / `seqHelper` — accessors for the initialized helpers
53
+ - `_libHelper` — monomer library helper; `monomerLib` — accessor for the current `IMonomerLib`
54
+ - `completeInit(helmHelper, libHelper)` — stores the helpers and subscribes to `monomerLib.onChanged`
55
+ - `monomerLibOnChangedHandler()` — logs the new library summary and shows a "Monomer lib updated" info toast
50
56
 
51
- ### HELM Helper `src/helm-helper.ts`
57
+ The legacy Dojo/JSDraw2 loader (`initHELMWebEditor`, `initHelmLoadAndPatchDojo`) and the `org.helm.webeditor.Monomers` patching (`initHelmPatchScilAlert`, `initHelmPatchPistoia`) are **gone** — hwe is self-contained and reads Bio's monomer library directly via `bridgeMonomerLib`.
52
58
 
53
- `HelmHelper` (implements `IHelmHelper`)singleton providing:
54
- - `createHelmInput()` — creates `HelmInput` widget
55
- - `createHelmWebEditor()` — creates `HelmWebEditor` viewer instance
56
- - `createWebEditorApp()` — creates full HELM Web Editor app (with monomer explorer, tabs, sequence/notation views) for dialog-based editing. Includes custom "Placeholders" tab
57
- - `overrideMonomersFuncs()` / `revertOriginalMonomersFuncs()` — swap Pistoia's `getMonomer`/`getMonomerSet` with custom implementations
58
- - `buildMonomersFuncsFromLib()` — builds `getMonomer` function that reads from Datagrok's `IMonomerLib`
59
- - `getMolfiles()` — batch converts HELM strings to molfile format using a cached off-screen JSDraw2 editor
60
- - `parse()` — parses HELM string into `HelmMol` object model
61
- - `removeGaps()` — removes gap monomers from HELM, re-links bonds, returns mapping of old→new monomer positions
62
- - `getHoveredAtom()` — hit-tests a point against a `HelmMol` to find the nearest atom
59
+ ### HELM Helper`src/helm-helper.ts`
63
60
 
64
- ### HELM Web Editor Wrapper `src/helm-web-editor.ts`
61
+ `HelmHelper` (implements `IHelmHelper`) singleton. Every editor / parse / calculation path runs through hwe via a lazily-built `HelmHelperAdapter` over a `HelmService` (the `editorAdapter` getter). The service is constructed with `bridgeMonomerLib(monomerLib)`, the RDKit module (for monomer-structure rendering), and an `extraPanes` map providing the editor's package-contributed tabs:
65
62
 
66
- `HelmWebEditor` (implements `IHelmWebEditor`) lightweight wrapper around `JSDraw2.Editor`:
67
- - Creates a viewonly editor in a host div
68
- - Handles resize events to keep editor synced with container size
69
- - Exposes `editor` (the JSDraw2 `HelmEditor` instance) and `host` div
63
+ | Pane | Source |
64
+ |---|---|
65
+ | **FASTA** / **BILN** | Read-only converted text via the seq handler's notation converters (BILN only for peptide chains; FASTA only for a single linear chain) |
66
+ | **Molecular Structure** | `Bio:toAtomicLevelPanel` widget |
67
+ | **Composition Analysis** | `Bio:compositionAnalysisWidget` widget |
68
+
69
+ Methods:
70
+ - `createHelmInput()` — creates the `HelmInput` widget
71
+ - `createHelmWebEditor(host, options)` — view-only editor instance (`IHelmWebEditor`) from the adapter
72
+ - `createWebEditorApp(host, helm)` — full editor app (palette + toolbar + canvas + built-in tabs + the extra panes above), wrapped in hwe's `LegacyAppWrapper` so it presents the legacy Pistoia `App` shape (`canvas.getHelm(true)`, `canvas.helm.jsd.m.atoms[i].selected`, …) — existing dialog consumers work unchanged
73
+ - `getMolfiles()`, `parse(helm, origin)`, `removeGaps(srcHelm)` — delegate to the adapter
74
+ - `getHoveredAtom(x, y, mol, height)` — delegates to `getHoveredMonomerFromEditorMol`
75
+ - `originalMonomersFuncs` / `revertOriginalMonomersFuncs()` / `overrideMonomersFuncs()` / `buildMonomersFuncsFromLib()` — thin pass-throughs to the adapter, kept only for the `IHelmHelper` contract (hwe reads `bridgeMonomerLib(...)` directly, so there is no global monomer registry to patch)
76
+ - private `_getSingleHelmDf()` / `_getSingleHelmDfSh()` — build a cached single-row HELM dataframe (tagged Macromolecule/helm; sets `.toAtomicWidgetWidth` to ~60% of window width) used by the Molecular-Structure / Composition / FASTA / BILN pane providers
70
77
 
71
78
  ## Utilities (`src/utils/`)
72
79
 
73
80
  | File | Purpose |
74
81
  |---|---|
75
- | `helm-grid-cell-renderer.ts` | `HelmGridCellRenderer` + `HelmGridCellRendererBack`: async cell renderer using SVG→image pipeline. Renders HELM structures in grid cells with LRU caching, handles mouse hover for monomer tooltips and hover links |
76
- | `helm-service.ts` | `HelmService` (extends `HelmServiceBase`): off-screen rendering service. Uses hidden JSDraw2 editors (LRU-cached per monomer lib) to render HELM→SVG→ImageData. Handles scaling/fitting within cell bounds |
77
- | `get-monomer.ts` | `rewriteLibraries()`: syncs Datagrok monomer library Pistoia `org.helm.webeditor.Monomers` dictionary. `getMonomerOverrideAndLogAlert()`: temporary getMonomer override with alert suppression |
78
- | `get-hovered.ts` | `getHoveredMonomerFromEditorMol()`: nearest-atom hit testing in editor molecule coordinates. `getSeqMonomerFromHelmAtom()`: converts `HelmAtom` to `ISeqMonomer` with canonical symbol |
79
- | `index.ts` | HELM string parsing utilities: `parseHelm()` (extracts monomer symbols), `removeGapsFromHelm()` (regex gap removal), `findMonomers()` (finds missing monomers), `split()` / `detachAnnotation()` (HELM section tokenizer) |
80
- | `err-info.ts` | `defaultErrorHandler()`: logs errors via package logger + `grok.shell.error` |
82
+ | `helm-grid-cell-renderer.ts` | `HelmGridCellRenderer` + `HelmGridCellRendererBack`: **synchronous** grid cell renderer painting straight into the grid canvas via hwe `HelmService.renderToCanvas` (no async SVG→image / ImageData round-trip). Keeps one hwe service per monomer-library source (`serviceByLib`) and per-cell-value layout bookkeeping (`auxList`) for hover + highlight. Subscribes to monomer-lib changes (invalidate all) and to `MACROMOLECULE_HIGHLIGHT_EVENT_ID`; `drawHighlightOverlay` paints translucent rings around highlighted monomers. `onMouseMove` hit-tests the laid-out mol and shows the monomer tooltip + hover links |
83
+ | `get-hovered.ts` | `getHoveredMonomerFromEditorMol()`: nearest-atom hit testing (model coordinates) against a `HelmMol`. `getSeqMonomerFromHelmAtom()`: converts a `HelmAtom` to `ISeqMonomer` with canonical symbol (DNA/RNA sugar + phosphate aware) |
84
+ | `index.ts` | HELM string utilities: `parseHelm()` (extracts monomer symbols, bracket/paren aware), `removeGapsFromHelm()` (regex gap removal), `findMonomers()` (resolves via `monomerLib.getMonomer`), `getParts()`, and the `split()` / `detachAnnotation()` HELM section tokenizer |
85
+ | `err-info.ts` | `defaultErrorHandler()`: logs via the package logger + `grok.shell.error` |
81
86
 
82
87
  ## Widgets (`src/widgets/`)
83
88
 
84
89
  | File | Purpose |
85
90
  |---|---|
86
- | `helm-input.ts` | `HelmInput` (extends `HelmInputBase`): interactive HELM sequence input widget. Embeds a viewonly `HelmWebEditor`, shows monomer tooltips on hover, "Click to edit" hint opens full editor dialog. Supports `SeqValueBase` get/set, string get/set, `molValue` access. Handles mouse events for hover/click/tooltip |
87
- | `properties-widget.ts` | `getPropertiesWidget()`: property panel showing molecular formula, weight, and extinction coefficient. Uses off-screen JSDraw2 editor to compute properties. Limits to sequences <1000 chars |
91
+ | `helm-input.ts` | `HelmInput` (extends `HelmInputBase`): interactive HELM input widget embedding a **view-only hwe editor** (`IHelmWebEditor`). Defaults to a compact 250×250 box; shows monomer tooltips on hover; "Click to edit" opens the full hwe editor app in a full-screen dialog and reads back the edited HELM + monomer selection (via the legacy `App` canvas shape). Re-fits the canvas on resize (`ui.onSizeChanged`). Supports `SeqValueBase`/string get/set and `molValue` |
92
+ | `properties-widget.ts` | `getPropertiesWidget()` / `getPropertiesDict()`: **async** property panel molecular formula, weight, extinction coefficient computed from an off-screen hwe editor (obtained via the async `getHelmHelper()` factory, replacing the old off-screen JSDraw2 editor). Limited to sequences <1000 chars |
88
93
 
89
94
  ## Constants — `src/constants.ts`
90
95
 
91
96
  - `jsonSdfMonomerLibDict` — mapping between SDF monomer fields and internal property names
92
- - `SMILES`, `RGROUPS`, `MONOMER_SYMBOL`, `RGROUP_*` — field name constants for monomer data
93
- - `SDF_MONOMER_NAME` — SDF field name
97
+ - `SMILES`, `RGROUPS`, `MONOMER_SYMBOL`, `RGROUP_*`, `SDF_MONOMER_NAME` — field-name constants for monomer data
94
98
  - `TAGS.cellRendererRenderError` — tag for tracking render errors
95
99
 
96
- ## Types `src/types/index.ts`
97
-
98
- Re-exports from `@datagrok-libraries/bio/src/helm/types`:
99
- - `ScilModule` — Scilligence utility module (`scil.*`)
100
- - `JSDraw2Module` — JSDraw2 editor module (`JSDraw2.*`)
101
- - `OrgHelmModule` — Pistoia HELM module (`org.helm.*`)
102
-
103
- ## Vendor Libraries
104
-
105
- ### `vendor/dojo-1.10.10/`
106
- Bundled Dojo Toolkit (dijit, dojo, dojox) required by JSDraw2 and HELM Web Editor. Loaded via custom `dojoConfig.loaderPatch.injectUrl` to work within webpack bundle.
107
-
108
- ### `helm/JSDraw/`
109
- Legacy uncompressed sources of Scilligence JSDraw2 Lite and Pistoia HELM Web Editor. Currently replaced by `@datagrok-libraries/helm-web-editor` npm package.
100
+ > HELM types (`HelmType`, `HelmMol`, `HelmAtom`, `App`, `Point`, `MonomersFuncs`, `IHelmWebEditor`, …) are imported directly from `@datagrok-libraries/bio/src/helm/types`. The old `src/types/` re-export module (`ScilModule` / `JSDraw2Module` / `OrgHelmModule`) was removed in the migration.
110
101
 
111
102
  ## Tests (`src/tests/`)
112
103
 
@@ -115,38 +106,34 @@ Test entry point: `src/package-test.ts` — imports all test files, exports `tes
115
106
  | File | What it tests |
116
107
  |---|---|
117
108
  | `_first-tests.ts` | Package import sanity check |
118
- | `helm-tests.ts` | HELM parsing, parseHelm utility |
109
+ | `helm-tests.ts` | HELM parsing, `parseHelm` utility |
119
110
  | `findMonomers-tests.ts` | Missing monomer detection |
120
- | `helm-service-tests.ts` | HelmService rendering |
121
111
  | `renderers-tests.ts` | Cell renderer behavior |
122
112
  | `get-molfiles-tests.ts` | HELM → molfile conversion |
123
113
  | `properties-widget-tests.ts` | Properties panel (formula, MW, ext. coeff.) |
124
- | `get-monomer-tests.ts` | Monomer lookup and library integration |
125
114
  | `parse-helm-tests.ts` | HELM string parsing edge cases |
126
- | `helm-web-editor-tests.ts` | Web editor widget creation |
127
- | `helm-input-tests.ts` | HelmInput widget behavior |
128
- | `helm-helper-tests.ts` | HelmHelper methods (parse, removeGaps, getMolfiles) |
115
+ | `helm-web-editor-tests.ts` | hwe editor / web-editor widget creation |
116
+ | `helm-input-tests.ts` | `HelmInput` widget behavior |
117
+ | `helm-helper-tests.ts` | `HelmHelper` methods (parse, removeGaps, getMolfiles) |
129
118
  | `helm-substructure-filter.ts` | Substructure filtering for HELM |
130
119
  | `helm-activity-cliffs.ts` | Activity cliffs computation for HELM |
131
120
  | `to-atomic-level-ui-non-linear.ts` | Non-linear HELM → atomic level conversion |
121
+ | `utils.ts` | Shared test helpers (not a `test()` suite) |
132
122
 
133
123
  ## Initialization Flow
134
124
 
135
- 1. `detectors.js` `autostart` runs first — registers `ui.input.helmAsync` polyfill
136
- 2. `initHelm()` called on package init → loads RdKit, SeqHelper, MonomerLibHelper
137
- 3. `initHELMWebEditor()` → loads bundled Dojo, waits for all Dojo modules, patches SVG text width
138
- 4. Loads `@datagrok-libraries/helm-web-editor` bundle, waits for `helmWebEditor$.initPromise`
139
- 5. Creates `HelmHelper` singleton
140
- 6. `completeInit()` → rewrites Pistoia monomer dictionaries from Datagrok lib, patches `getMonomer`, subscribes to lib changes
125
+ 1. `detectors.js` `autostart` runs first — registers the `ui.input.helmAsync` polyfill
126
+ 2. `initHelm()` on package init → loads the RDKit module, `SeqHelper`, `MonomerLibHelper`; creates `HelmHelper(seqHelper, logger, rdKitModule)`
127
+ 3. `completeInit(helmHelper, libHelper)` → wires the helpers and subscribes to monomer-library changes
128
+ 4. The hwe `HelmHelperAdapter` / `HelmService` is built **lazily** on first editor / parse / calculation use (after the library is available), reading Bio's monomer library via `bridgeMonomerLib`
141
129
 
142
130
  ## Key Dependencies
143
131
 
144
- - `@datagrok-libraries/bio` — macromolecule types, HELM types (`HelmType`, `HelmAtom`, `HelmMol`, `IHelmHelper`, `ISeqHelper`, `IMonomerLib`), cell renderer base classes, monomer hover links
145
- - `@datagrok-libraries/helm-web-editor` — bundled JSDraw2 + Pistoia HELM Web Editor
146
- - `@datagrok-libraries/chem-meta` — chemistry metadata
147
- - `@datagrok-libraries/utils` — SVG utilities (`svgToImage`), console helpers
132
+ - `@datagrok-libraries/hwe` — the standalone Datagrok HELM Web Editor: HELM parsing, synchronous canvas rendering, molfile / property calculators, and the editor app (`HelmService`, `HelmHelperAdapter`, `bridgeMonomerLib`, `buildHelmMolView`, `PolymerTypes`, `styles.css`)
133
+ - `@datagrok-libraries/bio` — macromolecule + HELM types (`HelmType`, `HelmAtom`, `HelmMol`, `IHelmHelper`, `ISeqHelper`, `IMonomerLib`), cell-renderer base classes, monomer hover links, macromolecule-highlight events/consts
134
+ - `@datagrok-libraries/chem-meta` — RDKit API types (`RDModule`)
135
+ - `@datagrok-libraries/utils` — error / console helpers
148
136
  - `cash-dom` — jQuery-like DOM manipulation
149
- - `lru-cache` — LRU caching for editors and rendered images
150
137
  - `wu` — lazy iteration
151
138
  - `rxjs` — reactive subscriptions
152
139
 
@@ -155,18 +142,17 @@ Test entry point: `src/package-test.ts` — imports all test files, exports `tes
155
142
  | Looking for... | Check first |
156
143
  |---|---|
157
144
  | Function/panel/renderer registration | `src/package.ts` |
158
- | Package singleton, Dojo/HWE loading | `src/package-utils.ts` (`HelmPackage`) |
159
- | HELM helper (parse, convert, getMolfiles) | `src/helm-helper.ts` |
160
- | Web editor wrapper | `src/helm-web-editor.ts` |
161
- | Grid cell renderer (async SVG→image) | `src/utils/helm-grid-cell-renderer.ts` |
162
- | Off-screen render service | `src/utils/helm-service.ts` |
163
- | Monomer library sync with Pistoia | `src/utils/get-monomer.ts` |
145
+ | Package singleton, init wiring | `src/package-utils.ts` (`HelmPackage`) |
146
+ | HELM helper + hwe adapter (parse, convert, getMolfiles, editor app, panes) | `src/helm-helper.ts` (`HelmHelper.editorAdapter`) |
147
+ | The hwe editor / service / adapter | `@datagrok-libraries/hwe` (external) |
148
+ | Grid cell renderer (synchronous canvas) | `src/utils/helm-grid-cell-renderer.ts` |
149
+ | Monomer highlight overlay (event-driven) | `src/utils/helm-grid-cell-renderer.ts` (`handleHighlightEvent` / `drawHighlightOverlay`) |
164
150
  | Mouse hover / hit testing | `src/utils/get-hovered.ts` |
165
151
  | HELM string parsing | `src/utils/index.ts` |
166
152
  | HELM input widget | `src/widgets/helm-input.ts` |
167
153
  | Properties panel (MW, formula) | `src/widgets/properties-widget.ts` |
168
154
  | Constants (field names, tags) | `src/constants.ts` |
169
- | Type re-exports (Scil, JSDraw2, Org) | `src/types/index.ts` |
155
+ | HELM types (`HelmMol`, `HelmAtom`, `App`, …) | `@datagrok-libraries/bio/src/helm/types` |
170
156
  | Auto-generated function wrappers | `src/package.g.ts` / `src/package-api.ts` |
171
157
  | Autostart / input polyfill | `detectors.js` |
172
158
  | Test entry point | `src/package-test.ts` |
package/css/helm.css CHANGED
@@ -1,3 +1,43 @@
1
1
  .d4-g-cell[semType="Macromolecule"] * {
2
2
  pointer-events: none !important;
3
3
  }
4
+
5
+ .hw-pane--extra>div[data-testid="extra-pane-content-molecular-structure"]>div.d4-accordion {
6
+ display: flex;
7
+ flex-direction: row;
8
+ gap: 24px;
9
+ }
10
+
11
+ .hw-pane--extra>div[data-testid="extra-pane-content-molecular-structure"]>div.d4-accordion>div.d4-accordion-pane[d4-title="Explore"] {
12
+ flex-grow: 1;
13
+ max-height: 280px;
14
+ overflow-y: scroll;
15
+ overflow-x: hidden;
16
+ max-width: calc(100% - 400px);
17
+ }
18
+
19
+ .hw-pane--extra>div[data-testid="extra-pane-content-molecular-structure"] {
20
+ height: 280px;
21
+ overflow: hidden;
22
+ }
23
+
24
+ .hw-pane--extra>div[data-testid="extra-pane-content-molecular-structure"]>div.d4-accordion>div.d4-accordion-pane[d4-title="Explore"] .d4-accordion-pane-header {
25
+ height: 30px;
26
+ }
27
+
28
+ .hw-pane--extra>div[data-testid="extra-pane-content-molecular-structure"]>div.d4-accordion>div.d4-accordion-pane[d4-title="Explore"] .d4-accordion {
29
+ width: 100%;
30
+ }
31
+
32
+ .hw-pane__extra>.macromolecule-cell-comp-analysis-host>table {
33
+ margin: 0;
34
+ }
35
+
36
+ .hw-pane__extra>.macromolecule-cell-comp-analysis-host>table>tbody {
37
+ width: 100%;
38
+ display: flex;
39
+ flex-direction: column;
40
+ flex-wrap: wrap;
41
+ max-height: 260px;
42
+ column-gap: 24px;
43
+ }