@i-vresse/haddock3-ui 0.1.4 → 0.1.6

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 (81) hide show
  1. package/README.md +9 -2
  2. package/dist/{src/CopyToClipBoardIcon.d.ts → CopyToClipBoardIcon.d.ts} +1 -0
  3. package/dist/CopyToClipBoardIcon.d.ts.map +1 -0
  4. package/dist/CopyToClipBoardIcon.js +5 -0
  5. package/dist/CopyToClipBoardIcon.js.map +1 -0
  6. package/dist/Hetero.d.ts +17 -0
  7. package/dist/Hetero.d.ts.map +1 -0
  8. package/dist/Hetero.js +36 -0
  9. package/dist/Hetero.js.map +1 -0
  10. package/dist/HiddenFileInput.d.ts +5 -0
  11. package/dist/HiddenFileInput.d.ts.map +1 -0
  12. package/dist/HiddenFileInput.js +14 -0
  13. package/dist/HiddenFileInput.js.map +1 -0
  14. package/dist/LinkToFile.d.ts +7 -0
  15. package/dist/LinkToFile.d.ts.map +1 -0
  16. package/dist/LinkToFile.js +14 -0
  17. package/dist/LinkToFile.js.map +1 -0
  18. package/dist/cn.d.ts +12 -0
  19. package/dist/cn.d.ts.map +1 -0
  20. package/dist/cn.js +15 -0
  21. package/dist/cn.js.map +1 -0
  22. package/dist/getResName1.d.ts +21 -0
  23. package/dist/getResName1.d.ts.map +1 -0
  24. package/dist/getResName1.js +78 -0
  25. package/dist/getResName1.js.map +1 -0
  26. package/dist/index.d.ts +6 -0
  27. package/dist/index.d.ts.map +1 -0
  28. package/dist/index.js +9 -36
  29. package/dist/index.js.map +1 -1
  30. package/dist/{src/molviewer.d.ts → molviewer.d.ts} +74 -9
  31. package/dist/molviewer.d.ts.map +1 -0
  32. package/dist/molviewer.js +393 -0
  33. package/dist/molviewer.js.map +1 -0
  34. package/dist/{src/toggles → toggles}/ResidueHeader.d.ts +2 -2
  35. package/dist/toggles/ResidueHeader.d.ts.map +1 -0
  36. package/dist/toggles/ResidueHeader.js +10 -0
  37. package/dist/toggles/ResidueHeader.js.map +1 -0
  38. package/dist/toggles/variants.d.ts +6 -0
  39. package/dist/toggles/variants.d.ts.map +1 -0
  40. package/dist/toggles/variants.js +12 -0
  41. package/dist/toggles/variants.js.map +1 -0
  42. package/dist/{src/toggles.d.ts → toggles.d.ts} +33 -2
  43. package/dist/toggles.d.ts.map +1 -0
  44. package/dist/toggles.js +116 -0
  45. package/dist/toggles.js.map +1 -0
  46. package/dist/useChunked.d.ts +30 -0
  47. package/dist/useChunked.d.ts.map +1 -0
  48. package/dist/useChunked.js +44 -0
  49. package/dist/useChunked.js.map +1 -0
  50. package/package.json +88 -18
  51. package/src/CopyToClipBoardIcon.stories.tsx +5 -0
  52. package/src/CopyToClipBoardIcon.tsx +18 -0
  53. package/src/Hetero.tsx +46 -0
  54. package/src/HiddenFileInput.stories.tsx +26 -0
  55. package/src/HiddenFileInput.tsx +15 -0
  56. package/src/LinkToFile.stories.tsx +20 -0
  57. package/src/LinkToFile.tsx +33 -0
  58. package/src/ResiduesSelect.stories.tsx +320 -0
  59. package/src/cn.ts +15 -0
  60. package/src/getResName1.ts +81 -0
  61. package/src/index.tsx +15 -0
  62. package/src/molviewer.tsx +740 -0
  63. package/src/toggles/ResidueHeader.stories.tsx +15 -0
  64. package/src/toggles/ResidueHeader.tsx +34 -0
  65. package/src/toggles/variants.ts +13 -0
  66. package/src/toggles.tsx +372 -0
  67. package/src/useChunked.test.ts +33 -0
  68. package/src/useChunked.ts +48 -0
  69. package/dist/src/CopyToClipbBoardIcon.stories.d.ts +0 -3
  70. package/dist/src/MdxLayout.d.ts +0 -13
  71. package/dist/src/ResiduesSelect.stories.d.ts +0 -9
  72. package/dist/src/cn.d.ts +0 -3
  73. package/dist/src/index.d.ts +0 -6
  74. package/dist/src/molviewer--residues.stories.d.ts +0 -6
  75. package/dist/src/molviewer--simpleviewer.stories.d.ts +0 -3
  76. package/dist/src/molviewer--surface.stories.d.ts +0 -6
  77. package/dist/src/structure.d.ts +0 -1
  78. package/dist/src/toggles/ResidueHeader.stories.d.ts +0 -6
  79. package/dist/src/toggles/variants.d.ts +0 -2
  80. package/dist/src/useChunked.d.ts +0 -1
  81. package/dist/src/useChunked.stories.d.ts +0 -3
package/README.md CHANGED
@@ -1,13 +1,18 @@
1
1
  # React components for/from haddock3 webapp
2
2
 
3
3
  [![github repo badge](https://img.shields.io/badge/github-repo-000.svg?logo=github&labelColor=gray&color=blue)]([https://github.com/i-VRESSE/haddock3-ui](https://github.com/i-VRESSE/haddock3-ui))
4
- [![Lint](https://github.com/i-VRESSE/haddock3-ui/actions/workflows/lint.yml/badge.svg)](https://github.com/i-VRESSE/haddock3-ui/actions/workflows/lint.yml)
4
+ [![npmjs.com](https://img.shields.io/npm/v/@i-vresse/haddock3-ui.svg?style=flat)](https://www.npmjs.com/package/@i-vresse/haddock3-ui)
5
+ [![CI](https://github.com/i-VRESSE/haddock3-ui/actions/workflows/lint.yml/badge.svg)](https://github.com/i-VRESSE/haddock3-ui/actions/workflows/lint.yml)
5
6
  [![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.12820670.svg)](https://doi.org/10.5281/zenodo.12820670)
7
+ [![Research Software Directory Badge](https://img.shields.io/badge/rsd-00a3e3.svg)](https://research-software-directory.org/software/haddock3-ui)
8
+ [![fair-software.eu](https://img.shields.io/badge/fair--software.eu-%E2%97%8F%20%20%E2%97%8F%20%20%E2%97%8F%20%20%E2%97%8F%20%20%E2%97%8B-yellow)](https://fair-software.eu)
9
+ [![Checked with Biome](https://img.shields.io/badge/Checked_with-Biome-60a5fa?style=flat&logo=biome)](https://biomejs.dev)
6
10
 
7
11
  The [haddock3 web application](https://github.com/i-VRESSE/haddock3-webapp) had several components that could be used outside of the web application. This package contains those components.
8
12
 
9
13
  - Components to render a 3D molecular structure from [PDB file](https://www.wwpdb.org/) using [NGL](https://nglviewer.org/)
10
14
  - Components to select residues in a molecule either passive or active
15
+ - Components to handle files
11
16
 
12
17
  ## Installation
13
18
 
@@ -23,7 +28,7 @@ For your own webapp to pick up the classes in the components, you need to add th
23
28
  export default {
24
29
  content: [
25
30
  // Existing content goes here
26
- './node_modules/@i-vresse/haddock3-ui/dist/index.js',
31
+ './node_modules/@i-vresse/haddock3-ui/dist/**/*.js',
27
32
  ],
28
33
  // Rest of the config goes here
29
34
  }
@@ -38,3 +43,5 @@ Once component is selected
38
43
  - interact with component
39
44
  - use `</>` button in footer to see the code.
40
45
  - use sliders icon button in footer to change props when available
46
+
47
+ API documentation is available at [https://i-VRESSE.github.io/haddock3-ui/api/](https://i-VRESSE.github.io/haddock3-ui/api/)
@@ -1 +1,2 @@
1
1
  export declare function CopyToClipBoardIcon(): import("react/jsx-runtime").JSX.Element;
2
+ //# sourceMappingURL=CopyToClipBoardIcon.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CopyToClipBoardIcon.d.ts","sourceRoot":"","sources":["../src/CopyToClipBoardIcon.tsx"],"names":[],"mappings":"AAAA,wBAAgB,mBAAmB,4CAiBlC"}
@@ -0,0 +1,5 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ export function CopyToClipBoardIcon() {
3
+ return (_jsx("svg", { width: "14", height: "14", viewBox: "0 0 14 15", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: _jsx("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M11.746.07A.5.5 0 0011.5.003h-6a.5.5 0 00-.5.5v2.5H.5a.5.5 0 00-.5.5v10a.5.5 0 00.5.5h8a.5.5 0 00.5-.5v-2.5h4.5a.5.5 0 00.5-.5v-8a.498.498 0 00-.15-.357L11.857.154a.506.506 0 00-.11-.085zM9 10.003h4v-7h-1.5a.5.5 0 01-.5-.5v-1.5H6v2h.5a.5.5 0 01.357.15L8.85 5.147c.093.09.15.217.15.357v4.5zm-8-6v9h7v-7H6.5a.5.5 0 01-.5-.5v-1.5H1z", fill: "currentColor" }) }));
4
+ }
5
+ //# sourceMappingURL=CopyToClipBoardIcon.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CopyToClipBoardIcon.js","sourceRoot":"","sources":["../src/CopyToClipBoardIcon.tsx"],"names":[],"mappings":";AAAA,MAAM,UAAU,mBAAmB;IAClC,OAAO,CACN,cACC,KAAK,EAAC,IAAI,EACV,MAAM,EAAC,IAAI,EACX,OAAO,EAAC,WAAW,EACnB,IAAI,EAAC,MAAM,EACX,KAAK,EAAC,4BAA4B,YAElC,eACC,QAAQ,EAAC,SAAS,EAClB,QAAQ,EAAC,SAAS,EAClB,CAAC,EAAC,2UAA2U,EAC7U,IAAI,EAAC,cAAc,GACZ,GACH,CACN,CAAC;AACH,CAAC"}
@@ -0,0 +1,17 @@
1
+ export interface Hetero {
2
+ resno: number;
3
+ resname: string;
4
+ chain: string;
5
+ /**
6
+ * HETNAME record value from the PDB file.
7
+ */
8
+ description?: string;
9
+ }
10
+ /**
11
+ * Retrieve hetero residues from a PDB file.
12
+ *
13
+ * @param file PDB file to read from
14
+ * @returns
15
+ */
16
+ export declare function heterosFromFile(file: File): Promise<Hetero[]>;
17
+ //# sourceMappingURL=Hetero.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Hetero.d.ts","sourceRoot":"","sources":["../src/Hetero.tsx"],"names":[],"mappings":"AAEA,MAAM,WAAW,MAAM;IACtB,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;CACrB;AAED;;;;;GAKG;AACH,wBAAsB,eAAe,CAAC,IAAI,EAAE,IAAI,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,CA0BnE"}
package/dist/Hetero.js ADDED
@@ -0,0 +1,36 @@
1
+ import { autoLoad } from "ngl";
2
+ /**
3
+ * Retrieve hetero residues from a PDB file.
4
+ *
5
+ * @param file PDB file to read from
6
+ * @returns
7
+ */
8
+ export async function heterosFromFile(file) {
9
+ const structure = await autoLoad(file);
10
+ const heteros = [];
11
+ structure.eachResidue((r) => {
12
+ if (r.isHetero() && !r.isWater() && !r.isIon()) {
13
+ const hetero = {
14
+ resno: r.resno,
15
+ resname: r.resname,
16
+ chain: r.chain.chainname,
17
+ };
18
+ if (r.entity) {
19
+ hetero.description = r.entity.description;
20
+ }
21
+ heteros.push(hetero);
22
+ }
23
+ });
24
+ heteros.sort((a, b) => {
25
+ if (a.resname !== b.resname) {
26
+ return a.resname.localeCompare(b.resname);
27
+ }
28
+ if (a.chain !== b.chain) {
29
+ return a.chain.localeCompare(b.chain);
30
+ }
31
+ return a.resno - b.resno;
32
+ });
33
+ return heteros;
34
+ }
35
+ // TODO write e2e test. Unit test not possible because ngl does not work in nodejs.
36
+ //# sourceMappingURL=Hetero.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Hetero.js","sourceRoot":"","sources":["../src/Hetero.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAkB,QAAQ,EAAE,MAAM,KAAK,CAAC;AAY/C;;;;;GAKG;AACH,MAAM,CAAC,KAAK,UAAU,eAAe,CAAC,IAAU;IAC/C,MAAM,SAAS,GAAc,MAAM,QAAQ,CAAC,IAAI,CAAC,CAAC;IAClD,MAAM,OAAO,GAAa,EAAE,CAAC;IAC7B,SAAS,CAAC,WAAW,CAAC,CAAC,CAAC,EAAE,EAAE;QAC3B,IAAI,CAAC,CAAC,QAAQ,EAAE,IAAI,CAAC,CAAC,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC;YAChD,MAAM,MAAM,GAAW;gBACtB,KAAK,EAAE,CAAC,CAAC,KAAK;gBACd,OAAO,EAAE,CAAC,CAAC,OAAO;gBAClB,KAAK,EAAE,CAAC,CAAC,KAAK,CAAC,SAAS;aACxB,CAAC;YACF,IAAI,CAAC,CAAC,MAAM,EAAE,CAAC;gBACd,MAAM,CAAC,WAAW,GAAG,CAAC,CAAC,MAAM,CAAC,WAAW,CAAC;YAC3C,CAAC;YACD,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;QACtB,CAAC;IACF,CAAC,CAAC,CAAC;IACH,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE;QACrB,IAAI,CAAC,CAAC,OAAO,KAAK,CAAC,CAAC,OAAO,EAAE,CAAC;YAC7B,OAAO,CAAC,CAAC,OAAO,CAAC,aAAa,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC;QAC3C,CAAC;QACD,IAAI,CAAC,CAAC,KAAK,KAAK,CAAC,CAAC,KAAK,EAAE,CAAC;YACzB,OAAO,CAAC,CAAC,KAAK,CAAC,aAAa,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC;QACvC,CAAC;QACD,OAAO,CAAC,CAAC,KAAK,GAAG,CAAC,CAAC,KAAK,CAAC;IAC1B,CAAC,CAAC,CAAC;IACH,OAAO,OAAO,CAAC;AAChB,CAAC;AACD,mFAAmF"}
@@ -0,0 +1,5 @@
1
+ export declare function HiddenFileInput({ name, file }: {
2
+ name: string;
3
+ file: File;
4
+ }): import("react/jsx-runtime").JSX.Element;
5
+ //# sourceMappingURL=HiddenFileInput.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"HiddenFileInput.d.ts","sourceRoot":"","sources":["../src/HiddenFileInput.tsx"],"names":[],"mappings":"AAEA,wBAAgB,eAAe,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,EAAE;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,IAAI,CAAA;CAAE,2CAY3E"}
@@ -0,0 +1,14 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { useEffect, useRef } from "react";
3
+ export function HiddenFileInput({ name, file }) {
4
+ const ref = useRef(null);
5
+ useEffect(() => {
6
+ if (ref.current) {
7
+ const dataTransfer = new DataTransfer();
8
+ dataTransfer.items.add(file);
9
+ ref.current.files = dataTransfer.files;
10
+ }
11
+ }, [file]);
12
+ return _jsx("input", { ref: ref, type: "file", name: name, className: "hidden" });
13
+ }
14
+ //# sourceMappingURL=HiddenFileInput.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"HiddenFileInput.js","sourceRoot":"","sources":["../src/HiddenFileInput.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAE1C,MAAM,UAAU,eAAe,CAAC,EAAE,IAAI,EAAE,IAAI,EAAgC;IAC3E,MAAM,GAAG,GAAG,MAAM,CAAmB,IAAI,CAAC,CAAC;IAE3C,SAAS,CAAC,GAAG,EAAE;QACd,IAAI,GAAG,CAAC,OAAO,EAAE,CAAC;YACjB,MAAM,YAAY,GAAG,IAAI,YAAY,EAAE,CAAC;YACxC,YAAY,CAAC,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;YAC7B,GAAG,CAAC,OAAO,CAAC,KAAK,GAAG,YAAY,CAAC,KAAK,CAAC;QACxC,CAAC;IACF,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC,CAAC;IAEX,OAAO,gBAAO,GAAG,EAAE,GAAG,EAAE,IAAI,EAAC,MAAM,EAAC,IAAI,EAAE,IAAI,EAAE,SAAS,EAAC,QAAQ,GAAG,CAAC;AACvE,CAAC"}
@@ -0,0 +1,7 @@
1
+ import { type ReactNode } from "react";
2
+ export declare function LinkToFile({ file, children, className, }: {
3
+ file: File;
4
+ children: ReactNode;
5
+ className?: string;
6
+ }): import("react/jsx-runtime").JSX.Element;
7
+ //# sourceMappingURL=LinkToFile.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"LinkToFile.d.ts","sourceRoot":"","sources":["../src/LinkToFile.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,SAAS,EAAuB,MAAM,OAAO,CAAC;AAK5D,wBAAgB,UAAU,CAAC,EAC1B,IAAI,EACJ,QAAQ,EACR,SAAqB,GACrB,EAAE;IACF,IAAI,EAAE,IAAI,CAAC;IACX,QAAQ,EAAE,SAAS,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;CACnB,2CAmBA"}
@@ -0,0 +1,14 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { useEffect, useState } from "react";
3
+ import { cn } from "./cn.js";
4
+ // TODO allow other a tag attributes like title or target to be passed in
5
+ export function LinkToFile({ file, children, className = undefined, }) {
6
+ const [url, setUrl] = useState("#");
7
+ useEffect(() => {
8
+ const url = URL.createObjectURL(file);
9
+ setUrl(url);
10
+ return () => URL.revokeObjectURL(url);
11
+ }, [file]);
12
+ return (_jsx("a", { className: cn("underline", className), download: file.name, href: url, type: file.type, children: children }));
13
+ }
14
+ //# sourceMappingURL=LinkToFile.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"LinkToFile.js","sourceRoot":"","sources":["../src/LinkToFile.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAkB,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAC5D,OAAO,EAAE,EAAE,EAAE,MAAM,SAAS,CAAC;AAE7B,yEAAyE;AAEzE,MAAM,UAAU,UAAU,CAAC,EAC1B,IAAI,EACJ,QAAQ,EACR,SAAS,GAAG,SAAS,GAKrB;IACA,MAAM,CAAC,GAAG,EAAE,MAAM,CAAC,GAAG,QAAQ,CAAC,GAAG,CAAC,CAAC;IAEpC,SAAS,CAAC,GAAG,EAAE;QACd,MAAM,GAAG,GAAG,GAAG,CAAC,eAAe,CAAC,IAAI,CAAC,CAAC;QACtC,MAAM,CAAC,GAAG,CAAC,CAAC;QACZ,OAAO,GAAG,EAAE,CAAC,GAAG,CAAC,eAAe,CAAC,GAAG,CAAC,CAAC;IACvC,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC,CAAC;IAEX,OAAO,CACN,YACC,SAAS,EAAE,EAAE,CAAC,WAAW,EAAE,SAAS,CAAC,EACrC,QAAQ,EAAE,IAAI,CAAC,IAAI,EACnB,IAAI,EAAE,GAAG,EACT,IAAI,EAAE,IAAI,CAAC,IAAI,YAEd,QAAQ,GACN,CACJ,CAAC;AACH,CAAC"}
package/dist/cn.d.ts ADDED
@@ -0,0 +1,12 @@
1
+ import { type ClassValue } from "clsx";
2
+ /**
3
+ * Smartly combines multiple tailwind class names into a single string.
4
+ *
5
+ * @see https://github.com/lukeed/clsx
6
+ * @see https://github.com/dcastil/tailwind-merge
7
+ *
8
+ * @param inputs - The class names to be combined.
9
+ * @returns The combined class names as a string.
10
+ */
11
+ export declare function cn(...inputs: ClassValue[]): string;
12
+ //# sourceMappingURL=cn.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cn.d.ts","sourceRoot":"","sources":["../src/cn.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,UAAU,EAAQ,MAAM,MAAM,CAAC;AAG7C;;;;;;;;GAQG;AACH,wBAAgB,EAAE,CAAC,GAAG,MAAM,EAAE,UAAU,EAAE,GAAG,MAAM,CAElD"}
package/dist/cn.js ADDED
@@ -0,0 +1,15 @@
1
+ import { clsx } from "clsx";
2
+ import { twMerge } from "tailwind-merge";
3
+ /**
4
+ * Smartly combines multiple tailwind class names into a single string.
5
+ *
6
+ * @see https://github.com/lukeed/clsx
7
+ * @see https://github.com/dcastil/tailwind-merge
8
+ *
9
+ * @param inputs - The class names to be combined.
10
+ * @returns The combined class names as a string.
11
+ */
12
+ export function cn(...inputs) {
13
+ return twMerge(clsx(inputs));
14
+ }
15
+ //# sourceMappingURL=cn.js.map
package/dist/cn.js.map ADDED
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cn.js","sourceRoot":"","sources":["../src/cn.ts"],"names":[],"mappings":"AAAA,OAAO,EAAmB,IAAI,EAAE,MAAM,MAAM,CAAC;AAC7C,OAAO,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AAEzC;;;;;;;;GAQG;AACH,MAAM,UAAU,EAAE,CAAC,GAAG,MAAoB;IACzC,OAAO,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC;AAC9B,CAAC"}
@@ -0,0 +1,21 @@
1
+ /**
2
+ * Retrieves the character for a given residue name.
3
+ *
4
+ * Besides amino acids, this function also
5
+ * supports charm forcefield, amber forcefield,
6
+ * DNA nucleotides and RNA nucleotides.
7
+ *
8
+ * @param resname - The residue name to retrieve the abbreviated name for.
9
+ * @returns The abbreviated name for the given resource name, or "X" if no abbreviation is found.
10
+ *
11
+ * @example
12
+ * ```ts
13
+ * import { getResName1 } from "@i-vresse/haddock3-ui/getResName1";
14
+ * getResName1("ALA"); // "A"
15
+ * getResName1("DA"); // "A"
16
+ * getResName1("A"); // "A"
17
+ * getResName1("UNK"); // "X"
18
+ * ```
19
+ */
20
+ export declare function getResName1(resname: string): "H" | "R" | "K" | "I" | "F" | "L" | "W" | "A" | "M" | "P" | "C" | "N" | "V" | "G" | "S" | "Q" | "Y" | "D" | "E" | "T" | "U" | "O";
21
+ //# sourceMappingURL=getResName1.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getResName1.d.ts","sourceRoot":"","sources":["../src/getResName1.ts"],"names":[],"mappings":"AA2DA;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,WAAW,CAAC,OAAO,EAAE,MAAM,qIAE1C"}
@@ -0,0 +1,78 @@
1
+ /*
2
+ * NGL does not have single letter for DNA or RNA, but molstar does.
3
+ * Use molstar implementation from
4
+ * https://github.com/molstar/molstar/blob/5a2ee03b48e1822c8843d65eb18d578af0579b9f/src/mol-model/sequence/constants.ts#L18-L85
5
+ */
6
+ const Name2OneLetter = {
7
+ HIS: "H",
8
+ ARG: "R",
9
+ LYS: "K",
10
+ ILE: "I",
11
+ PHE: "F",
12
+ LEU: "L",
13
+ TRP: "W",
14
+ ALA: "A",
15
+ MET: "M",
16
+ PRO: "P",
17
+ CYS: "C",
18
+ ASN: "N",
19
+ VAL: "V",
20
+ GLY: "G",
21
+ SER: "S",
22
+ GLN: "Q",
23
+ TYR: "Y",
24
+ ASP: "D",
25
+ GLU: "E",
26
+ THR: "T",
27
+ SEC: "U", // as per IUPAC definition
28
+ PYL: "O", // as per IUPAC definition
29
+ // charmm ff
30
+ HSD: "H",
31
+ HSE: "H",
32
+ HSP: "H",
33
+ LSN: "K",
34
+ ASPP: "D",
35
+ GLUP: "E",
36
+ // amber ff
37
+ HID: "H",
38
+ HIE: "H",
39
+ HIP: "H",
40
+ LYN: "K",
41
+ ASH: "D",
42
+ GLH: "E",
43
+ // DNA
44
+ DA: "A",
45
+ DC: "C",
46
+ DG: "G",
47
+ DT: "T",
48
+ DU: "U",
49
+ // RNA
50
+ A: "A",
51
+ C: "C",
52
+ G: "G",
53
+ T: "T",
54
+ U: "U",
55
+ };
56
+ /**
57
+ * Retrieves the character for a given residue name.
58
+ *
59
+ * Besides amino acids, this function also
60
+ * supports charm forcefield, amber forcefield,
61
+ * DNA nucleotides and RNA nucleotides.
62
+ *
63
+ * @param resname - The residue name to retrieve the abbreviated name for.
64
+ * @returns The abbreviated name for the given resource name, or "X" if no abbreviation is found.
65
+ *
66
+ * @example
67
+ * ```ts
68
+ * import { getResName1 } from "@i-vresse/haddock3-ui/getResName1";
69
+ * getResName1("ALA"); // "A"
70
+ * getResName1("DA"); // "A"
71
+ * getResName1("A"); // "A"
72
+ * getResName1("UNK"); // "X"
73
+ * ```
74
+ */
75
+ export function getResName1(resname) {
76
+ return Name2OneLetter[resname] || "X";
77
+ }
78
+ //# sourceMappingURL=getResName1.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getResName1.js","sourceRoot":"","sources":["../src/getResName1.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,MAAM,cAAc,GAAG;IACtB,GAAG,EAAE,GAAG;IACR,GAAG,EAAE,GAAG;IACR,GAAG,EAAE,GAAG;IACR,GAAG,EAAE,GAAG;IACR,GAAG,EAAE,GAAG;IACR,GAAG,EAAE,GAAG;IACR,GAAG,EAAE,GAAG;IACR,GAAG,EAAE,GAAG;IACR,GAAG,EAAE,GAAG;IACR,GAAG,EAAE,GAAG;IACR,GAAG,EAAE,GAAG;IACR,GAAG,EAAE,GAAG;IACR,GAAG,EAAE,GAAG;IACR,GAAG,EAAE,GAAG;IACR,GAAG,EAAE,GAAG;IACR,GAAG,EAAE,GAAG;IACR,GAAG,EAAE,GAAG;IACR,GAAG,EAAE,GAAG;IACR,GAAG,EAAE,GAAG;IACR,GAAG,EAAE,GAAG;IAER,GAAG,EAAE,GAAG,EAAE,0BAA0B;IACpC,GAAG,EAAE,GAAG,EAAE,0BAA0B;IAEpC,YAAY;IACZ,GAAG,EAAE,GAAG;IACR,GAAG,EAAE,GAAG;IACR,GAAG,EAAE,GAAG;IACR,GAAG,EAAE,GAAG;IACR,IAAI,EAAE,GAAG;IACT,IAAI,EAAE,GAAG;IAET,WAAW;IACX,GAAG,EAAE,GAAG;IACR,GAAG,EAAE,GAAG;IACR,GAAG,EAAE,GAAG;IACR,GAAG,EAAE,GAAG;IACR,GAAG,EAAE,GAAG;IACR,GAAG,EAAE,GAAG;IACR,MAAM;IACN,EAAE,EAAE,GAAG;IACP,EAAE,EAAE,GAAG;IACP,EAAE,EAAE,GAAG;IACP,EAAE,EAAE,GAAG;IACP,EAAE,EAAE,GAAG;IACP,MAAM;IACN,CAAC,EAAE,GAAG;IACN,CAAC,EAAE,GAAG;IACN,CAAC,EAAE,GAAG;IACN,CAAC,EAAE,GAAG;IACN,CAAC,EAAE,GAAG;CACG,CAAC;AAEX;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,UAAU,WAAW,CAAC,OAAe;IAC1C,OAAO,cAAc,CAAC,OAAsC,CAAC,IAAI,GAAG,CAAC;AACtE,CAAC"}
@@ -0,0 +1,6 @@
1
+ export { NGLComponent, NGLResidues, NGLStage, SimpleViewer, LigandViewer, Viewer, } from "./molviewer.js";
2
+ export { PickIn3D, ResiduesSelect } from "./toggles.js";
3
+ export { CopyToClipBoardIcon } from "./CopyToClipBoardIcon.js";
4
+ export { LinkToFile } from "./LinkToFile.js";
5
+ export { HiddenFileInput } from "./HiddenFileInput.js";
6
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EACN,YAAY,EACZ,WAAW,EACX,QAAQ,EACR,YAAY,EACZ,YAAY,EACZ,MAAM,GACN,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,QAAQ,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AACxD,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAC/D,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC"}
package/dist/index.js CHANGED
@@ -1,36 +1,9 @@
1
- import { jsxs as n, jsx as r } from "react/jsx-runtime";
2
- import { clsx as a } from "clsx";
3
- import { twMerge as s } from "tailwind-merge";
4
- function c(...e) {
5
- return s(a(e));
6
- }
7
- const d = {
8
- act: "bg-green-100 dark:bg-green-700",
9
- pass: "bg-yellow-100 dark:bg-yellow-700",
10
- highlight: "bg-secondary dark:bg-secondary-foreground",
11
- "": "bg-inherit dark:bg-inherit"
12
- };
13
- function m({
14
- showActive: e,
15
- showPassive: i
16
- }) {
17
- return /* @__PURE__ */ n("div", { children: [
18
- /* @__PURE__ */ r("p", { className: "text-[0.5rem]", children: " " }),
19
- /* @__PURE__ */ n("div", { className: "inline-block text-start font-mono", children: [
20
- /* @__PURE__ */ r("div", { title: "Sequence", children: "       " }),
21
- e && /* @__PURE__ */ r(t, { variant: "act", label: "Active" }),
22
- i && /* @__PURE__ */ r(t, { variant: "pass", label: "Passive" })
23
- ] })
24
- ] });
25
- }
26
- function t({
27
- variant: e,
28
- label: i
29
- }) {
30
- return /* @__PURE__ */ r("div", { className: c("pr-1", d[e]), children: i });
31
- }
32
- export {
33
- m as ResiduesHeader,
34
- d as residueVariants
35
- };
36
- //# sourceMappingURL=index.js.map
1
+ export { NGLComponent, NGLResidues, NGLStage, SimpleViewer, LigandViewer, Viewer, } from "./molviewer.js";
2
+ export { PickIn3D, ResiduesSelect } from "./toggles.js";
3
+ export { CopyToClipBoardIcon } from "./CopyToClipBoardIcon.js";
4
+ export { LinkToFile } from "./LinkToFile.js";
5
+ export { HiddenFileInput } from "./HiddenFileInput.js";
6
+ // Other components and types can be imported using
7
+ // for example
8
+ // import { useChunked } from "@i-vresse/haddock3-ui/useChunked"
9
+ //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../src/cn.ts","../src/toggles/variants.ts","../src/toggles/ResidueHeader.tsx"],"sourcesContent":["import { clsx, type ClassValue } from \"clsx\";\nimport { twMerge } from \"tailwind-merge\";\n\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs));\n}\n","export type Variant = \"act\" | \"pass\" | \"highlight\" | \"\";\n\nexport const residueVariants: Record<Variant, string> = {\n act: \"bg-green-100 dark:bg-green-700\",\n pass: \"bg-yellow-100 dark:bg-yellow-700\",\n highlight: \"bg-secondary dark:bg-secondary-foreground\",\n \"\": \"bg-inherit dark:bg-inherit\",\n};","import { cn } from \"../cn\";\nimport { residueVariants, Variant } from \"./variants\";\n\nexport function ResiduesHeader({\n showActive,\n showPassive,\n }: {\n showActive: boolean;\n showPassive: boolean;\n }) {\n return (\n <div>\n <p className=\"text-[0.5rem]\">&nbsp;</p>\n <div className=\"inline-block text-start font-mono\">\n <div title=\"Sequence\">\n {/* use non breaking whitespace to prevent layout shifts */}\n &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\n </div>\n {showActive && <ResidueHeaderItem variant=\"act\" label=\"Active\" />}\n {showPassive && <ResidueHeaderItem variant=\"pass\" label=\"Passive\" />}\n </div>\n </div>\n );\n }\n \n export function ResidueHeaderItem({\n variant,\n label,\n }: {\n variant: Variant;\n label: string;\n }) {\n return <div className={cn(\"pr-1\", residueVariants[variant])}>{label}</div>;\n }\n "],"names":["cn","inputs","twMerge","clsx","residueVariants","ResiduesHeader","showActive","showPassive","jsx","jsxs","ResidueHeaderItem","variant","label"],"mappings":";;;AAGO,SAASA,KAAMC,GAAsB;AACnC,SAAAC,EAAQC,EAAKF,CAAM,CAAC;AAC7B;ACHO,MAAMG,IAA2C;AAAA,EACtD,KAAK;AAAA,EACL,MAAM;AAAA,EACN,WAAW;AAAA,EACX,IAAI;AACN;ACJO,SAASC,EAAe;AAAA,EAC3B,YAAAC;AAAA,EACA,aAAAC;AACF,GAGG;AACD,2BACG,OACC,EAAA,UAAA;AAAA,IAAC,gBAAAC,EAAA,KAAA,EAAE,WAAU,iBAAgB,UAAM,KAAA;AAAA,IACnC,gBAAAC,EAAC,OAAI,EAAA,WAAU,qCACb,UAAA;AAAA,MAAC,gBAAAD,EAAA,OAAA,EAAI,OAAM,YACmD,UAE9D,WAAA;AAAA,MACCF,KAAe,gBAAAE,EAAAE,GAAA,EAAkB,SAAQ,OAAM,OAAM,UAAS;AAAA,MAC9DH,KAAgB,gBAAAC,EAAAE,GAAA,EAAkB,SAAQ,QAAO,OAAM,WAAU;AAAA,IAAA,GACpE;AAAA,EACF,EAAA,CAAA;AAEJ;AAEO,SAASA,EAAkB;AAAA,EAChC,SAAAC;AAAA,EACA,OAAAC;AACF,GAGG;AACM,SAAA,gBAAAJ,EAAC,SAAI,WAAWR,EAAG,QAAQI,EAAgBO,CAAO,CAAC,GAAI,UAAMC,EAAA,CAAA;AACtE;"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EACN,YAAY,EACZ,WAAW,EACX,QAAQ,EACR,YAAY,EACZ,YAAY,EACZ,MAAM,GACN,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,QAAQ,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AACxD,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAC/D,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,mDAAmD;AACnD,cAAc;AACd,gEAAgE"}
@@ -1,6 +1,29 @@
1
- import { ReactNode, Component as ReactComponent, ErrorInfo } from 'react';
2
- import { StructureComponent, StructureRepresentationType } from 'ngl';
3
-
1
+ import { Stage, StructureComponent, type StructureRepresentationType } from "ngl";
2
+ import { type ErrorInfo, Component as ReactComponent, type ReactNode } from "react";
3
+ import type { Hetero } from "./Hetero.js";
4
+ /**
5
+ * Hook that provides the current NGL stage.
6
+ *
7
+ * @example
8
+ * Should be used in child components of NGLStage
9
+ * ```tsx
10
+ * import { useStage, NGLStage } from "@i-vresse/haddock3-ui/molviewer";
11
+ *
12
+ * function Child() {
13
+ * const stage = useStage();
14
+ * return <div>{stage.parameters}</div>;
15
+ * }
16
+ *
17
+ * function Parent() {
18
+ * return (
19
+ * <NGLStage>
20
+ * <ChildComponent />
21
+ * </NGLStage>
22
+ * );
23
+ * }
24
+ * ```
25
+ */
26
+ export declare function useStage(): Stage;
4
27
  export declare function NGLResidues({ residues, color, opacity, chain, representation, }: {
5
28
  residues: number[];
6
29
  color: string;
@@ -8,7 +31,38 @@ export declare function NGLResidues({ residues, color, opacity, chain, represent
8
31
  chain?: string;
9
32
  representation: StructureRepresentationType;
10
33
  }): null;
34
+ /**
35
+ * Hook that provides the current NGL structure component.
36
+ *
37
+ * @example
38
+ * Should be used in child components of NGLComponent
39
+ * ```tsx
40
+ * import { useComponent, NGLComponent, NGLStage } from "@i-vresse/haddock3-ui/molviewer";
41
+ *
42
+ * function Child() {
43
+ * const component = useComponent();
44
+ * return <div>{component.type}</div>;
45
+ * }
46
+ *
47
+ * async function Parent() {
48
+ * const structure = new File(...);
49
+ * return (
50
+ * <NGLStage>
51
+ * <NGLComponent structure={structure} chain="A">
52
+ * <ChildComponent />
53
+ * </NGLComponent>
54
+ * </NGLStage>
55
+ * );
56
+ * }
57
+ * ```
58
+ */
11
59
  export declare function useComponent(): StructureComponent;
60
+ /**
61
+ * Set of default representation names in NGL.
62
+ *
63
+ * List from https://github.com/nglviewer/ngl/blob/5d64dbe6769448e0f33080e9ac957a70a0973a13/src/component/structure-component.ts#L52-L79
64
+ */
65
+ export declare const defaultRepresentationNames: Set<string>;
12
66
  export declare function NGLComponent({ structure, chain, opacity, children, }: {
13
67
  structure: File;
14
68
  chain: string;
@@ -49,6 +103,9 @@ export declare function NGLSurface({ active, passive, neighbours, highlight, act
49
103
  highlightColor?: string;
50
104
  neighboursColor?: string;
51
105
  }): null;
106
+ /**
107
+ * Component to render PDB file with NGL using its default representations.
108
+ */
52
109
  export declare function SimpleViewer({ structure }: {
53
110
  structure: File;
54
111
  }): import("react/jsx-runtime").JSX.Element;
@@ -58,21 +115,28 @@ export declare function Viewer({ structure, chain, active, passive, renderSelect
58
115
  active: number[];
59
116
  passive: number[];
60
117
  surface: number[];
118
+ /**
119
+ * Representation type to render the selection as.
120
+ */
61
121
  renderSelectionAs?: StructureRepresentationType;
122
+ /**
123
+ * Computed neighbours of the active or passive residues.
124
+ * Rendered similar to passive residues.
125
+ */
62
126
  neighbours?: number[];
63
127
  higlightResidue?: number | undefined;
64
128
  onPick?: (chain: string, residue: number) => void;
65
129
  onHover?: (chain: string, residue: number) => void;
66
130
  onMouseLeave?: () => void;
131
+ /**
132
+ * Opacity of the active, passive and neighbours residues.
133
+ */
67
134
  selectionOpacity?: number;
68
135
  theme?: "light" | "dark";
69
136
  }): import("react/jsx-runtime").JSX.Element;
70
- export interface Hetero {
71
- resno: number;
72
- resname: string;
73
- chain: string;
74
- description?: string;
75
- }
137
+ /**
138
+ * Component that renders a ligand in PDB file.
139
+ */
76
140
  export declare function LigandViewer({ structure, selected, onPick, onHover, highlight, onMouseLeave, theme, }: {
77
141
  structure: File;
78
142
  selected: Hetero | undefined;
@@ -82,3 +146,4 @@ export declare function LigandViewer({ structure, selected, onPick, onHover, hig
82
146
  onMouseLeave?: () => void;
83
147
  theme?: "light" | "dark";
84
148
  }): import("react/jsx-runtime").JSX.Element;
149
+ //# sourceMappingURL=molviewer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"molviewer.d.ts","sourceRoot":"","sources":["../src/molviewer.tsx"],"names":[],"mappings":"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"}