react-cheminfo 0.4.0 → 0.6.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.
- package/README.md +182 -34
- package/lib/ecosystem/core/index.d.ts +1 -1
- package/lib/ecosystem/core/index.d.ts.map +1 -1
- package/lib/ecosystem/core/index.js +1 -1
- package/lib/ecosystem/core/index.js.map +1 -1
- package/lib/ecosystem/core/lookup.d.ts +11 -0
- package/lib/ecosystem/core/lookup.d.ts.map +1 -1
- package/lib/ecosystem/core/lookup.js +15 -0
- package/lib/ecosystem/core/lookup.js.map +1 -1
- package/lib/ecosystem/core/sites.d.ts +1 -1
- package/lib/ecosystem/core/sites.d.ts.map +1 -1
- package/lib/ecosystem/core/sites.js +14 -4
- package/lib/ecosystem/core/sites.js.map +1 -1
- package/lib/ecosystem/ui/glyphs.d.ts.map +1 -1
- package/lib/ecosystem/ui/glyphs.js +4 -1
- package/lib/ecosystem/ui/glyphs.js.map +1 -1
- package/lib/orbital/ui/AtomicOrbitalCanvas.d.ts +5 -0
- package/lib/orbital/ui/AtomicOrbitalCanvas.d.ts.map +1 -1
- package/lib/orbital/ui/AtomicOrbitalCanvas.js +4 -3
- package/lib/orbital/ui/AtomicOrbitalCanvas.js.map +1 -1
- package/lib/orbital/ui/AtomicOrbitalViewer.d.ts +5 -0
- package/lib/orbital/ui/AtomicOrbitalViewer.d.ts.map +1 -1
- package/lib/orbital/ui/AtomicOrbitalViewer.js.map +1 -1
- package/lib/orbital/ui/axesGeometry.d.ts +27 -0
- package/lib/orbital/ui/axesGeometry.d.ts.map +1 -0
- package/lib/orbital/ui/axesGeometry.js +74 -0
- package/lib/orbital/ui/axesGeometry.js.map +1 -0
- package/lib/orbital/ui/camera.d.ts +7 -0
- package/lib/orbital/ui/camera.d.ts.map +1 -1
- package/lib/orbital/ui/camera.js +8 -1
- package/lib/orbital/ui/camera.js.map +1 -1
- package/lib/orbital/ui/renderAxes.d.ts +53 -0
- package/lib/orbital/ui/renderAxes.d.ts.map +1 -0
- package/lib/orbital/ui/renderAxes.js +110 -0
- package/lib/orbital/ui/renderAxes.js.map +1 -0
- package/lib/orbital/ui/viewer.d.ts +16 -0
- package/lib/orbital/ui/viewer.d.ts.map +1 -1
- package/lib/orbital/ui/viewer.js +24 -2
- package/lib/orbital/ui/viewer.js.map +1 -1
- package/lib/seo/core/documentMeta.d.ts +2 -2
- package/lib/seo/core/documentMeta.js +4 -3
- package/lib/seo/core/documentMeta.js.map +1 -1
- package/lib/seo/core/index.d.ts +15 -0
- package/lib/seo/core/index.d.ts.map +1 -1
- package/lib/seo/core/index.js +8 -0
- package/lib/seo/core/index.js.map +1 -1
- package/lib/seo/core/noscript.d.ts +97 -0
- package/lib/seo/core/noscript.d.ts.map +1 -0
- package/lib/seo/core/noscript.js +93 -0
- package/lib/seo/core/noscript.js.map +1 -0
- package/lib/seo/core/pageMeta.d.ts +76 -0
- package/lib/seo/core/pageMeta.d.ts.map +1 -0
- package/lib/seo/core/pageMeta.js +88 -0
- package/lib/seo/core/pageMeta.js.map +1 -0
- package/lib/seo/core/robots.d.ts +55 -0
- package/lib/seo/core/robots.d.ts.map +1 -0
- package/lib/seo/core/robots.js +70 -0
- package/lib/seo/core/robots.js.map +1 -0
- package/lib/seo/core/routes.d.ts +120 -0
- package/lib/seo/core/routes.d.ts.map +1 -0
- package/lib/seo/core/routes.js +188 -0
- package/lib/seo/core/routes.js.map +1 -0
- package/lib/seo/core/siteFiles.d.ts +69 -0
- package/lib/seo/core/siteFiles.d.ts.map +1 -0
- package/lib/seo/core/siteFiles.js +84 -0
- package/lib/seo/core/siteFiles.js.map +1 -0
- package/lib/seo/core/startDocumentMeta.d.ts +44 -0
- package/lib/seo/core/startDocumentMeta.d.ts.map +1 -0
- package/lib/seo/core/startDocumentMeta.js +47 -0
- package/lib/seo/core/startDocumentMeta.js.map +1 -0
- package/lib/seo/core/structuredData.d.ts +48 -0
- package/lib/seo/core/structuredData.d.ts.map +1 -0
- package/lib/seo/core/structuredData.js +41 -0
- package/lib/seo/core/structuredData.js.map +1 -0
- package/lib/seo/core/template.d.ts +48 -0
- package/lib/seo/core/template.d.ts.map +1 -0
- package/lib/seo/core/template.js +53 -0
- package/lib/seo/core/template.js.map +1 -0
- package/lib/seo/vite/index.d.ts +5 -0
- package/lib/seo/vite/index.d.ts.map +1 -0
- package/lib/seo/vite/index.js +3 -0
- package/lib/seo/vite/index.js.map +1 -0
- package/lib/seo/vite/ogCard.d.ts +41 -0
- package/lib/seo/vite/ogCard.d.ts.map +1 -0
- package/lib/seo/vite/ogCard.js +82 -0
- package/lib/seo/vite/ogCard.js.map +1 -0
- package/lib/seo/vite/prerender.d.ts +89 -0
- package/lib/seo/vite/prerender.d.ts.map +1 -0
- package/lib/seo/vite/prerender.js +114 -0
- package/lib/seo/vite/prerender.js.map +1 -0
- package/lib/vite.d.ts +2 -0
- package/lib/vite.d.ts.map +1 -0
- package/lib/vite.js +2 -0
- package/lib/vite.js.map +1 -0
- package/package.json +7 -2
- package/src/ecosystem/core/index.ts +1 -1
- package/src/ecosystem/core/lookup.ts +16 -0
- package/src/ecosystem/core/sites.ts +16 -5
- package/src/ecosystem/ui/glyphs.tsx +20 -1
- package/src/orbital/ui/AtomicOrbitalCanvas.tsx +9 -2
- package/src/orbital/ui/AtomicOrbitalViewer.tsx +5 -0
- package/src/orbital/ui/axesGeometry.ts +91 -0
- package/src/orbital/ui/camera.ts +9 -1
- package/src/orbital/ui/renderAxes.ts +190 -0
- package/src/orbital/ui/viewer.ts +32 -2
- package/src/seo/core/documentMeta.ts +5 -5
- package/src/seo/core/index.ts +27 -0
- package/src/seo/core/noscript.ts +195 -0
- package/src/seo/core/pageMeta.ts +128 -0
- package/src/seo/core/robots.ts +114 -0
- package/src/seo/core/routes.ts +246 -0
- package/src/seo/core/siteFiles.ts +112 -0
- package/src/seo/core/startDocumentMeta.ts +77 -0
- package/src/seo/core/structuredData.ts +80 -0
- package/src/seo/core/template.ts +54 -0
- package/src/seo/vite/index.ts +4 -0
- package/src/seo/vite/ogCard.ts +102 -0
- package/src/seo/vite/prerender.ts +203 -0
- package/src/vite.ts +1 -0
package/README.md
CHANGED
|
@@ -30,43 +30,50 @@ would mean two Blueprint style trees in one page.
|
|
|
30
30
|
Subpaths are **bundle boundaries, not taxonomy**: a feature gets its own door
|
|
31
31
|
only when it drags a heavy dependency behind it.
|
|
32
32
|
|
|
33
|
-
| Import | Holds
|
|
34
|
-
| ---------------------------------- |
|
|
35
|
-
| `react-cheminfo/core` | every framework-free helper —
|
|
36
|
-
| `react-cheminfo/ui` | every React component and hook —
|
|
37
|
-
| `react-cheminfo/
|
|
38
|
-
| `react-cheminfo/
|
|
39
|
-
| `react-cheminfo/
|
|
33
|
+
| Import | Holds | Costs |
|
|
34
|
+
| ---------------------------------- | ------------------------------------------------- | -------------------------- |
|
|
35
|
+
| `react-cheminfo/core` | every framework-free helper — 140 value exports | nothing |
|
|
36
|
+
| `react-cheminfo/ui` | every React component and hook — 60 value exports | React |
|
|
37
|
+
| `react-cheminfo/vite` | the prerender plugin and the OG card | nothing; React on the card |
|
|
38
|
+
| `react-cheminfo/orbital` | the 3D atomic-orbital viewer | React, molstar |
|
|
39
|
+
| `react-cheminfo/structure` | the structure editor and renderer | React, react-ocl, OCL |
|
|
40
|
+
| `react-cheminfo/styles/chrome.css` | the shared tokens and site-header stylesheet | nothing |
|
|
40
41
|
|
|
41
42
|
A backend serving an RIS endpoint, a prerender script writing a sitemap, and
|
|
42
43
|
every unit test of that logic therefore load no React at all — and a worker
|
|
43
|
-
sampling an orbital loads neither React nor molstar.
|
|
44
|
-
|
|
45
|
-
|
|
44
|
+
sampling an orbital loads neither React nor molstar. **Every peer is optional**,
|
|
45
|
+
so a site that only wants the Tools menu downloads none of them, and a project
|
|
46
|
+
that only prerenders installs neither React nor Vite.
|
|
47
|
+
|
|
48
|
+
`react-cheminfo/vite` is the one door with a split bill: `cheminfoPrerender`
|
|
49
|
+
needs nothing beyond Vite's own plugin type, while `ogCardHtml` renders a mark
|
|
50
|
+
and therefore loads React — but on the call, not on the import, so the plugin
|
|
51
|
+
stays reachable from a checkout that has neither.
|
|
46
52
|
|
|
47
53
|
The stylesheet ships from `styles/`, which `tsc` leaves alone, and is reached
|
|
48
54
|
through a wildcard subpath exactly as `react-science` serves its own.
|
|
49
55
|
|
|
50
56
|
## What is in it
|
|
51
57
|
|
|
52
|
-
| Area | `…/core`
|
|
53
|
-
| ----------------------- |
|
|
54
|
-
| **Site identity** | `siteById`, `findSiteByHost`, `siteTokensCss`, `siteThemeColor`, `renderEcosystemLinksHtml`
|
|
55
|
-
| **Chrome** | —
|
|
56
|
-
| **Citation** | `formatCitation`, `formatCitations`, `citationSegments`, `downloadCitation`, `citedReferences`, `doiUrl`
|
|
57
|
-
| **Share & embed** | `parseShareConfig`, `applyShareConfig`, `buildShareUrl`, `buildEmbedCode`, `isHidden`, the param codecs
|
|
58
|
-
| **Routing & head** | `createTabRouter`, `createPageAddresses`, `adoptLegacyHashAddress`, `writeDocumentMeta`, `canonicalLink`
|
|
59
|
-
| **
|
|
60
|
-
| **
|
|
61
|
-
| **
|
|
62
|
-
| **
|
|
63
|
-
| **
|
|
64
|
-
| **
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
58
|
+
| Area | `…/core` | `…/ui` |
|
|
59
|
+
| ----------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
60
|
+
| **Site identity** | `siteById`, `findSiteByHost`, `siteTokensCss`, `siteThemeColor`, `renderEcosystemLinksHtml` | `SiteMark`, `Wordmark`, `SiteTheme`, `SiteTile`, `EcosystemButton`, `EcosystemLinks` |
|
|
61
|
+
| **Chrome** | — | `SiteHeader`, `SiteFooter`, `NavLink`, `NavMenuButton`, `MenuButton`, `useCompactHeader` |
|
|
62
|
+
| **Citation** | `formatCitation`, `formatCitations`, `citationSegments`, `downloadCitation`, `citedReferences`, `doiUrl` | `CiteButton`, `CitationMenu`, `CitationPreview` |
|
|
63
|
+
| **Share & embed** | `parseShareConfig`, `applyShareConfig`, `buildShareUrl`, `buildEmbedCode`, `isHidden`, the param codecs | `ShareDialog`, `ShareButton`, `HiddenPartsProvider`, `PagePart`, `useIsHidden` |
|
|
64
|
+
| **Routing & head** | `createTabRouter`, `createPageAddresses`, `adoptLegacyHashAddress`, `writeDocumentMeta`, `canonicalLink` | — |
|
|
65
|
+
| **Indexing** | `injectPageMeta`, `pageHeadTags`, `pageDocumentMeta`, `fill`, `PAGE_HEAD_MARKER`, `PAGE_BODY_MARKER`, `robotsTxt`, `sitemapXml`, `noscriptIndex`, `structuredDataScript`, `assertRoutes`, `routeFor`, `homeRoute` | `cheminfoPrerender`, `ogCardHtml`, `OG_WIDTH`, `OG_HEIGHT` (all `/vite`) |
|
|
66
|
+
| **Pedagogy** | `parseGlossaryMarkers`, `localStorageProgressStore`, `progressSummary`, `finishValidation` | `GlossaryText`, `SyntaxTooltip`, `HintLadder`, `ExerciseActions`, `ExerciseProgressHeader`, `TutorialStepStrip`, `ReferenceGrid`, `TestCaseList` |
|
|
67
|
+
| **Clipboard & files** | `writeToClipboard`, `downloadBlob`, `downloadText`, `sanitizeFileName`, `toDelimited`, `readDelimited` | `CopyButton`, `CodeBlock`, `DelimitedTextDialog` |
|
|
68
|
+
| **Formatting & colour** | `formatInteger`, `formatDecimal`, `formatBytes`, `pluralize`, `readableInk`, `contrastRatio` | `ColorScaleLegend` |
|
|
69
|
+
| **Widgets** | `CREDITS`, `credits` | `ErrorBoundary`, `CollapsibleSection`, `CapsuleFilter`, `HelpTooltip`, `CreditsList` |
|
|
70
|
+
| **Hooks & state** | `createWorkerChannel` | `persistBucket`, `useDebouncedValue`, `useContainerSize`, `useListKeyboardNavigation`, `useDisclosure` |
|
|
71
|
+
| **Chemistry** | `atomicOrbitalsOf`, `configurationOf`, `classifyMolfile`, `readStructure` | `AtomicOrbitalViewer` (`/orbital`), `StructureEditor`, `Structure` (`/structure`) |
|
|
72
|
+
|
|
73
|
+
Everything in that table is exported from `./core`, `./ui`, `./vite` or
|
|
74
|
+
`./structure` and nothing else is: the sub-components a component is built
|
|
75
|
+
from, the parsers a helper calls and the internals of a hook stay inside the
|
|
76
|
+
package, reachable only by their own path. If it is exported, it is supported.
|
|
70
77
|
|
|
71
78
|
The rule for a new site is short: **`react-cheminfo` first, `react-science`
|
|
72
79
|
second, your own code last.** The full import table and the checklist live in
|
|
@@ -85,11 +92,13 @@ The **Brand** toolbar at the top retunes `--brand` / `--brand-alt`, so any story
|
|
|
85
92
|
can be read as it would look on any site of the family.
|
|
86
93
|
|
|
87
94
|
The sources are organised the other way round — one folder per feature
|
|
88
|
-
(`src/citation`, `src/ecosystem`, `src/share`, `src/pedagogy`, …),
|
|
89
|
-
`core/` and a `ui/` half — and `src/core.ts
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
95
|
+
(`src/citation`, `src/ecosystem`, `src/share`, `src/seo`, `src/pedagogy`, …),
|
|
96
|
+
each holding a `core/` and a `ui/` half — and `src/core.ts`, `src/ui.ts`,
|
|
97
|
+
`src/vite.ts`, `src/structure.ts` and `src/orbital.ts` are the barrels the entry
|
|
98
|
+
points point at. ESLint forbids a `core/` folder from importing `react`,
|
|
99
|
+
`react-dom` or anything under a `ui/`, which is what keeps the framework-free
|
|
100
|
+
entry points honest; `src/seo/vite` is the one half named for its consumer
|
|
101
|
+
rather than for a framework, because a build plugin is neither.
|
|
93
102
|
`src/shared` holds what more than one of them is built on: `MenuButton`, the
|
|
94
103
|
shape every button of a site header takes, which is why `CiteButton` and
|
|
95
104
|
`EcosystemButton` differ only in their glyph and their menu, and why both accept
|
|
@@ -235,6 +244,138 @@ The colours a name is set in are the site's own and are not retuned to reach the
|
|
|
235
244
|
4.5:1 of body text: ChemCalc's teal and NMRium's orange both land just under it,
|
|
236
245
|
which is why a name is set bold, where 3:1 is the threshold.
|
|
237
246
|
|
|
247
|
+
## Prerendering a site
|
|
248
|
+
|
|
249
|
+
A static site has no server to rewrite a head per request, so a crawler gets
|
|
250
|
+
whatever came off the wire. `cheminfoPrerender` writes **one real HTML file per
|
|
251
|
+
routed address** at build time, each with its own title, description and
|
|
252
|
+
canonical, plus `sitemap.xml`, `robots.txt`, the JSON-LD block and the
|
|
253
|
+
`noscript` crawl path. Without it every address carries the same head and a
|
|
254
|
+
search engine folds the whole site into one result.
|
|
255
|
+
|
|
256
|
+
### The template says where the head goes
|
|
257
|
+
|
|
258
|
+
`index.html` is the **template**, and it carries no title and no description of
|
|
259
|
+
its own: it declares where they go, with two comments.
|
|
260
|
+
|
|
261
|
+
```html
|
|
262
|
+
<head>
|
|
263
|
+
<meta charset="utf-8" />
|
|
264
|
+
<link rel="icon" href="%BASE_URL%favicon.svg" />
|
|
265
|
+
<!--cheminfo:head-->
|
|
266
|
+
</head>
|
|
267
|
+
<body>
|
|
268
|
+
<div id="root"></div>
|
|
269
|
+
<!--cheminfo:body-->
|
|
270
|
+
</body>
|
|
271
|
+
```
|
|
272
|
+
|
|
273
|
+
That is the whole contract, and it is what makes the rest of this small: the
|
|
274
|
+
head is _written_, never found and operated on. Nothing is parsed and nothing is
|
|
275
|
+
searched for but the marker, so a byte order mark, an implicit head, a `</head>`
|
|
276
|
+
the page's own prose displays or a bundled script quotes in a string, and a
|
|
277
|
+
`<title>` inside an `<svg>` all leave the result exactly as it is — and no
|
|
278
|
+
duplicate title or description is possible, because the template carries none. A
|
|
279
|
+
page missing `<!--cheminfo:head-->` throws rather than shipping headless.
|
|
280
|
+
|
|
281
|
+
`<!--cheminfo:body-->` is where the `noscript` crawl path goes, and a site
|
|
282
|
+
running with `noscript: false` needs no such marker.
|
|
283
|
+
|
|
284
|
+
It is a Vite plugin, and the whole of a live caller — `3d.cheminfo.org` — is:
|
|
285
|
+
|
|
286
|
+
```ts
|
|
287
|
+
// vite.config.ts
|
|
288
|
+
import react from '@vitejs/plugin-react';
|
|
289
|
+
import { cheminfoPrerender } from 'react-cheminfo/vite';
|
|
290
|
+
import { defineConfig } from 'vite';
|
|
291
|
+
|
|
292
|
+
import { PAGE_ROUTES } from './src/seo/routes.ts';
|
|
293
|
+
|
|
294
|
+
export default defineConfig({
|
|
295
|
+
plugins: [
|
|
296
|
+
react(),
|
|
297
|
+
cheminfoPrerender({
|
|
298
|
+
site: '3d',
|
|
299
|
+
routes: PAGE_ROUTES,
|
|
300
|
+
operatingSystem: 'Any browser with WebGL2',
|
|
301
|
+
}),
|
|
302
|
+
],
|
|
303
|
+
});
|
|
304
|
+
```
|
|
305
|
+
|
|
306
|
+
`routes` is one `RouteMeta[]` the site owns and three things read: this plugin,
|
|
307
|
+
`injectPageMeta` on a server that has one, and `writeDocumentMeta` in the
|
|
308
|
+
running app after an in-app move. A page missing from it is a page a search
|
|
309
|
+
engine only ever sees as the home page.
|
|
310
|
+
|
|
311
|
+
`npm run dev` fills the same two markers from the home route, so a developer
|
|
312
|
+
never opens a page showing its markers and dev reads like production.
|
|
313
|
+
|
|
314
|
+
### The mount lives in `origin`, and nothing else
|
|
315
|
+
|
|
316
|
+
**`origin` is where the site is served, mount path included** — one value
|
|
317
|
+
carrying both, because that is exactly what a canonical link, an `og:url` and a
|
|
318
|
+
sitemap entry need. Everything else is read back off it: `robots.txt` writes its
|
|
319
|
+
`Allow` and `Disallow` under the mount, the `noscript` index links under the
|
|
320
|
+
mount, and every absolute address is built on it. There is no second option to
|
|
321
|
+
keep in step.
|
|
322
|
+
|
|
323
|
+
```ts
|
|
324
|
+
cheminfoPrerender({ site: 'surge', routes: PAGE_ROUTES });
|
|
325
|
+
// origin defaults to https://surge.cheminfo.org — the site owns its host,
|
|
326
|
+
// the mount is '', and /exercises is written at dist/exercises/index.html.
|
|
327
|
+
|
|
328
|
+
cheminfoPrerender({
|
|
329
|
+
site: 'surge',
|
|
330
|
+
routes: PAGE_ROUTES,
|
|
331
|
+
origin: 'https://learn.cheminfo.org/surge',
|
|
332
|
+
});
|
|
333
|
+
// the same build, mounted under /surge: canonicals and the sitemap read
|
|
334
|
+
// https://learn.cheminfo.org/surge/exercises, and robots.txt allows /surge/.
|
|
335
|
+
```
|
|
336
|
+
|
|
337
|
+
The **files on disk are laid out from the build's own root either way** —
|
|
338
|
+
`dist/exercises/index.html`, never `dist/surge/exercises/index.html`. It is the
|
|
339
|
+
server that puts them under the mount. An origin must be an absolute `http` or
|
|
340
|
+
`https` address or it is refused: one written `localhost:3000` parses with
|
|
341
|
+
`localhost:` as its scheme, which would read the mount back as `/3000`.
|
|
342
|
+
|
|
343
|
+
`robots: false` skips `robots.txt` for a site shipping its own,
|
|
344
|
+
`category: false` skips the JSON-LD block, and `noscript: false` leaves the site
|
|
345
|
+
without its only crawl path — so leave it on.
|
|
346
|
+
|
|
347
|
+
### The card a link unfurls into
|
|
348
|
+
|
|
349
|
+
`ogCardHtml` draws `public/og.png` from the site's own record — its mark, its
|
|
350
|
+
two colours, its name — so the card never drifts from the mark the site shows.
|
|
351
|
+
It returns a page for a headless browser to screenshot, and it is the one export
|
|
352
|
+
of this entry point that loads React, on the call rather than on the import:
|
|
353
|
+
|
|
354
|
+
```ts
|
|
355
|
+
// scripts/generateOgImage.ts, run with `npm run og-image`
|
|
356
|
+
import { chromium } from '@playwright/test';
|
|
357
|
+
import { OG_HEIGHT, OG_WIDTH, ogCardHtml } from 'react-cheminfo/vite';
|
|
358
|
+
|
|
359
|
+
const browser = await chromium.launch();
|
|
360
|
+
const page = await browser.newPage({
|
|
361
|
+
viewport: { width: OG_WIDTH, height: OG_HEIGHT },
|
|
362
|
+
});
|
|
363
|
+
await page.setContent(await ogCardHtml({ site: '3d' }), { waitUntil: 'load' });
|
|
364
|
+
const png = await page.screenshot({ type: 'png' });
|
|
365
|
+
await browser.close();
|
|
366
|
+
```
|
|
367
|
+
|
|
368
|
+
### On a site that does have a server
|
|
369
|
+
|
|
370
|
+
The same head is written per request instead:
|
|
371
|
+
`injectPageMeta(index, { site, routes, origin, url })`, next to the
|
|
372
|
+
tracking-script injection, on `/`, `/index.html` and the SPA fallback alike — the
|
|
373
|
+
served page is the same template, with the same two markers. `robotsTxt` and
|
|
374
|
+
`sitemapXml` are the same two calls, answered as routes rather than written to
|
|
375
|
+
disk. A server writing more into the same place composes it itself, with
|
|
376
|
+
`pageHeadTags` and `fill(page, PAGE_BODY_MARKER, noscriptIndex(…))`. All of that
|
|
377
|
+
is `react-cheminfo/core`, so a backend loads no React and no Vite.
|
|
378
|
+
|
|
238
379
|
## Styling
|
|
239
380
|
|
|
240
381
|
**No stylesheet, nothing for a consumer to import.** Every rule is a
|
|
@@ -312,13 +453,20 @@ Then, from a throwaway app — or from the site you are about to adopt it in:
|
|
|
312
453
|
npm i ../react-cheminfo/react-cheminfo-0.0.0.tgz
|
|
313
454
|
```
|
|
314
455
|
|
|
315
|
-
Import from
|
|
456
|
+
Import from every entry point, so the check covers the framework-free halves
|
|
457
|
+
too:
|
|
316
458
|
|
|
317
459
|
```tsx
|
|
318
460
|
import { CITATION_STYLES, formatCitation } from 'react-cheminfo/core';
|
|
319
461
|
import { CiteButton, EcosystemButton } from 'react-cheminfo/ui';
|
|
462
|
+
import { cheminfoPrerender } from 'react-cheminfo/vite';
|
|
320
463
|
```
|
|
321
464
|
|
|
465
|
+
Install the tarball on its own once — **with no other dependency** — and import
|
|
466
|
+
`react-cheminfo/core` and `react-cheminfo/vite` from it. Every peer is optional,
|
|
467
|
+
so npm installs none of them, and either import failing means a module that
|
|
468
|
+
should be framework-free is loading one at module scope.
|
|
469
|
+
|
|
322
470
|
Reinstall the tarball after every `npm pack` — npm caches it by name and
|
|
323
471
|
version, and this package stays at `0.0.0` until release-please cuts the first
|
|
324
472
|
one.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { renderEcosystemLinksHtml } from './links.ts';
|
|
2
|
-
export { findSiteByHost, siteById } from './lookup.ts';
|
|
2
|
+
export { findSiteByHost, siteById, siteDisplayName } from './lookup.ts';
|
|
3
3
|
export type { EcosystemSite, SiteId, SiteMarkColors, SiteName, } from './sites.ts';
|
|
4
4
|
export { ECOSYSTEM_SITES, siteUrl } from './sites.ts';
|
|
5
5
|
export { siteThemeColor, siteTokensCss } from './tokens.ts';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/ecosystem/core/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,MAAM,YAAY,CAAC;AACtD,OAAO,EAAE,cAAc,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/ecosystem/core/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,MAAM,YAAY,CAAC;AACtD,OAAO,EAAE,cAAc,EAAE,QAAQ,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AACxE,YAAY,EACV,aAAa,EACb,MAAM,EACN,cAAc,EACd,QAAQ,GACT,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,eAAe,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AACtD,OAAO,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { renderEcosystemLinksHtml } from "./links.js";
|
|
2
|
-
export { findSiteByHost, siteById } from "./lookup.js";
|
|
2
|
+
export { findSiteByHost, siteById, siteDisplayName } from "./lookup.js";
|
|
3
3
|
export { ECOSYSTEM_SITES, siteUrl } from "./sites.js";
|
|
4
4
|
export { siteThemeColor, siteTokensCss } from "./tokens.js";
|
|
5
5
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/ecosystem/core/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,MAAM,YAAY,CAAC;AACtD,OAAO,EAAE,cAAc,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/ecosystem/core/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,MAAM,YAAY,CAAC;AACtD,OAAO,EAAE,cAAc,EAAE,QAAQ,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAOxE,OAAO,EAAE,eAAe,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AACtD,OAAO,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC"}
|
|
@@ -6,6 +6,17 @@ import type { EcosystemSite, SiteId } from './sites.ts';
|
|
|
6
6
|
* @throws {Error} When no site of the family carries that identifier.
|
|
7
7
|
*/
|
|
8
8
|
export declare function siteById(id: SiteId): EcosystemSite;
|
|
9
|
+
/**
|
|
10
|
+
* The site's name as prose, for a page title, a card or a citation.
|
|
11
|
+
*
|
|
12
|
+
* An address-shaped name is written as the address it is — `3d` and `cheminfo`
|
|
13
|
+
* are two halves of `3d.cheminfo.org`, and joining them would read `3dcheminfo`
|
|
14
|
+
* — while a product-shaped one is its two halves run together, as its wordmark
|
|
15
|
+
* sets them.
|
|
16
|
+
* @param site - The site being named.
|
|
17
|
+
* @returns What the site is called, in one string.
|
|
18
|
+
*/
|
|
19
|
+
export declare function siteDisplayName(site: EcosystemSite): string;
|
|
9
20
|
/**
|
|
10
21
|
* The site a page is being served from, so a header can mark itself as the
|
|
11
22
|
* current one without being told which site it belongs to.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lookup.d.ts","sourceRoot":"","sources":["../../../src/ecosystem/core/lookup.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,EAAE,MAAM,YAAY,CAAC;AAGxD;;;;;GAKG;AACH,wBAAgB,QAAQ,CAAC,EAAE,EAAE,MAAM,GAAG,aAAa,CAKlD;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,GAAG,aAAa,GAAG,SAAS,CAQtE"}
|
|
1
|
+
{"version":3,"file":"lookup.d.ts","sourceRoot":"","sources":["../../../src/ecosystem/core/lookup.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,EAAE,MAAM,YAAY,CAAC;AAGxD;;;;;GAKG;AACH,wBAAgB,QAAQ,CAAC,EAAE,EAAE,MAAM,GAAG,aAAa,CAKlD;AAED;;;;;;;;;GASG;AACH,wBAAgB,eAAe,CAAC,IAAI,EAAE,aAAa,GAAG,MAAM,CAI3D;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,GAAG,aAAa,GAAG,SAAS,CAQtE"}
|
|
@@ -12,6 +12,21 @@ export function siteById(id) {
|
|
|
12
12
|
}
|
|
13
13
|
throw new Error(`unknown ecosystem site: ${id}`);
|
|
14
14
|
}
|
|
15
|
+
/**
|
|
16
|
+
* The site's name as prose, for a page title, a card or a citation.
|
|
17
|
+
*
|
|
18
|
+
* An address-shaped name is written as the address it is — `3d` and `cheminfo`
|
|
19
|
+
* are two halves of `3d.cheminfo.org`, and joining them would read `3dcheminfo`
|
|
20
|
+
* — while a product-shaped one is its two halves run together, as its wordmark
|
|
21
|
+
* sets them.
|
|
22
|
+
* @param site - The site being named.
|
|
23
|
+
* @returns What the site is called, in one string.
|
|
24
|
+
*/
|
|
25
|
+
export function siteDisplayName(site) {
|
|
26
|
+
return site.name.dot === true
|
|
27
|
+
? site.host
|
|
28
|
+
: `${site.name.lead}${site.name.alt}`;
|
|
29
|
+
}
|
|
15
30
|
/**
|
|
16
31
|
* The site a page is being served from, so a header can mark itself as the
|
|
17
32
|
* current one without being told which site it belongs to.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lookup.js","sourceRoot":"","sources":["../../../src/ecosystem/core/lookup.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,MAAM,YAAY,CAA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AC;IACD,MAAM,IAAI,KAAK,CAAC,2BAA2B,EAAE,EAAE,CAAC,CAAC;AACnD,CAAC;AAED;;;;;;;;;GASG;AACH,MAAM,UAAU,eAAe,CAAC,IAAmB;IACjD,OAAO,IAAI,CAAC,IAAI,CAAC,GAAG,KAAK,IAAI;QAC3B,CAAC,CAAC,IAAI,CAAC,IAAI;QACX,CAAC,CAAC,GAAG,IAAI,CAAC,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC;AAC1C,CAAC;AAED;;;;;;;;;;GAUG;AACH,MAAM,UAAU,cAAc,CAAC,IAAY;IACzC,MAAM,MAAM,GAAG,aAAa,CAAC,IAAI,CAAC,CAAC;IACnC,IAAI,MAAM,KAAK,EAAE;QAAE,OAAO,SAAS,CAAC;IAEpC,KAAK,MAAM,IAAI,IAAI,eAAe,EAAE,CAAC;QACnC,IAAI,aAAa,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,MAAM;YAAE,OAAO,IAAI,CAAC;IACvD,CAAC;IACD,OAAO,SAAS,CAAC;AACnB,CAAC;AAED,SAAS,aAAa,CAAC,IAAY;IACjC,MAAM,WAAW,GAAG,IAAI,CAAC,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC,KAAK,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;IACrE,OAAO,WAAW,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,WAAW,CAAC;AAC7E,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/** The sites the menu links to, in the order they are listed. */
|
|
2
|
-
export type SiteId = 'inchi' | 'vcl' | 'smiles' | 'chemcalc' | 'nmrium' | 'surge' | 'tex' | 'lcao' | 'regexp' | 'pdb' | 'elucidation' | 'equilibrium' | 'polycarp' | '3d' | '
|
|
2
|
+
export type SiteId = 'inchi' | 'vcl' | 'smiles' | 'chemcalc' | 'nmrium' | 'derepflow' | 'surge' | 'tex' | 'lcao' | 'regexp' | 'pdb' | 'elucidation' | 'equilibrium' | 'polycarp' | '3d' | 'periodic-table';
|
|
3
3
|
export interface SiteName {
|
|
4
4
|
/** First half of the name, set in the site's leading colour. */
|
|
5
5
|
lead: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sites.d.ts","sourceRoot":"","sources":["../../../src/ecosystem/core/sites.ts"],"names":[],"mappings":"AAAA,iEAAiE;AACjE,MAAM,MAAM,MAAM,GACd,OAAO,GACP,KAAK,GACL,QAAQ,GACR,UAAU,GACV,QAAQ,GACR,OAAO,GACP,KAAK,GACL,MAAM,GACN,QAAQ,GACR,KAAK,GACL,aAAa,GACb,aAAa,GACb,UAAU,GACV,IAAI,GACJ,
|
|
1
|
+
{"version":3,"file":"sites.d.ts","sourceRoot":"","sources":["../../../src/ecosystem/core/sites.ts"],"names":[],"mappings":"AAAA,iEAAiE;AACjE,MAAM,MAAM,MAAM,GACd,OAAO,GACP,KAAK,GACL,QAAQ,GACR,UAAU,GACV,QAAQ,GACR,WAAW,GACX,OAAO,GACP,KAAK,GACL,MAAM,GACN,QAAQ,GACR,KAAK,GACL,aAAa,GACb,aAAa,GACb,UAAU,GACV,IAAI,GACJ,gBAAgB,CAAC;AAErB,MAAM,WAAW,QAAQ;IACvB,gEAAgE;IAChE,IAAI,EAAE,MAAM,CAAC;IACb,uDAAuD;IACvD,GAAG,EAAE,MAAM,CAAC;IACZ;;;;OAIG;IACH,GAAG,CAAC,EAAE,OAAO,CAAC;CACf;AAED,MAAM,WAAW,aAAa;IAC5B,EAAE,EAAE,MAAM,CAAC;IACX,iEAAiE;IACjE,IAAI,EAAE,QAAQ,CAAC;IACf,yDAAyD;IACzD,IAAI,EAAE,MAAM,CAAC;IACb,4DAA4D;IAC5D,UAAU,EAAE,MAAM,CAAC;IACnB,sCAAsC;IACtC,OAAO,EAAE,MAAM,CAAC;IAChB,uDAAuD;IACvD,KAAK,EAAE,MAAM,CAAC;IACd;;;;OAIG;IACH,QAAQ,EAAE,MAAM,CAAC;IACjB,8EAA8E;IAC9E,IAAI,EAAE,cAAc,CAAC;CACtB;AAED,MAAM,WAAW,cAAc;IAC7B,+CAA+C;IAC/C,KAAK,EAAE,MAAM,CAAC;IACd,wDAAwD;IACxD,MAAM,EAAE,MAAM,CAAC;IACf;;;;OAIG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED;;;GAGG;AACH,eAAO,MAAM,eAAe,EAAE,SAAS,aAAa,EAiKnD,CAAC;AAEF;;;;GAIG;AACH,wBAAgB,OAAO,CAAC,IAAI,EAAE,aAAa,GAAG,MAAM,CAEnD"}
|
|
@@ -53,6 +53,16 @@ export const ECOSYSTEM_SITES = [
|
|
|
53
53
|
brandAlt: '#2b143e',
|
|
54
54
|
mark: { plate: '#2b143e', accent: '#ea580c' },
|
|
55
55
|
},
|
|
56
|
+
{
|
|
57
|
+
id: 'derepflow',
|
|
58
|
+
name: { lead: 'Derep', alt: 'Flow' },
|
|
59
|
+
host: 'derepflow.cheminfo.org',
|
|
60
|
+
repository: 'https://github.com/cheminfo/derepflow',
|
|
61
|
+
tagline: 'Identify the constituents of a mixture from its ¹³C spectrum.',
|
|
62
|
+
brand: '#be185d',
|
|
63
|
+
brandAlt: '#0f766e',
|
|
64
|
+
mark: { plate: '#be185d', accent: '#0d9488' },
|
|
65
|
+
},
|
|
56
66
|
{
|
|
57
67
|
id: 'surge',
|
|
58
68
|
name: { lead: 'surge', alt: 'cheminfo', dot: true },
|
|
@@ -144,10 +154,10 @@ export const ECOSYSTEM_SITES = [
|
|
|
144
154
|
mark: { plate: '#155e75', accent: '#f97316' },
|
|
145
155
|
},
|
|
146
156
|
{
|
|
147
|
-
id: '
|
|
148
|
-
name: { lead: '
|
|
149
|
-
host: '
|
|
150
|
-
repository: 'https://github.com/cheminfo/
|
|
157
|
+
id: 'periodic-table',
|
|
158
|
+
name: { lead: 'Periodic', alt: 'Table' },
|
|
159
|
+
host: 'periodic-table.cheminfo.org',
|
|
160
|
+
repository: 'https://github.com/cheminfo/periodic-table.cheminfo.org',
|
|
151
161
|
tagline: 'The periodic table, coloured, plotted and taken apart.',
|
|
152
162
|
brand: '#15803d',
|
|
153
163
|
brandAlt: '#a16207',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sites.js","sourceRoot":"","sources":["../../../src/ecosystem/core/sites.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"sites.js","sourceRoot":"","sources":["../../../src/ecosystem/core/sites.ts"],"names":[],"mappings":"AAmEA;;;GAGG;AACH,MAAM,CAAC,MAAM,eAAe,GAA6B;IACvD;QACE,EAAE,EAAE,OAAO;QACX,IAAI,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,GAAG,EAAE,UAAU,EAAE,GAAG,EAAE,IAAI,EAAE;QACnD,IAAI,EAAE,oBAAoB;QAC1B,UAAU,EAAE,gDAAgD;QAC5D,OAAO,EAAE,sDAAsD;QAC/D,KAAK,EAAE,SAAS;QAChB,QAAQ,EAAE,SAAS;QACnB,IAAI,EAAE,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,EAAE,SAAS,EAAE;KAC9C;IACD;QACE,EAAE,EAAE,KAAK;QACT,IAAI,EAAE,EAAE,IAAI,EAAE,KAAK,EAAE,GAAG,EAAE,UAAU,EAAE,GAAG,EAAE,IAAI,EAAE;QACjD,IAAI,EAAE,kBAAkB;QACxB,UAAU,EAAE,8CAA8C;QAC1D,OAAO,EAAE,uDAAuD;QAChE,KAAK,EAAE,SAAS;QAChB,QAAQ,EAAE,SAAS;QACnB,IAAI,EAAE,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,EAAE,SAAS,EAAE;KAC9C;IACD;QACE,EAAE,EAAE,QAAQ;QACZ,IAAI,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,GAAG,EAAE,UAAU,EAAE,GAAG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1
|
+
{"version":3,"file":"glyphs.d.ts","sourceRoot":"","sources":["../../../src/ecosystem/ui/glyphs.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAE/C,4DAA4D;AAC5D,eAAO,MAAM,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,SAAS,CAuP7D,CAAC"}
|
|
@@ -9,6 +9,9 @@ export const GLYPHS = {
|
|
|
9
9
|
smiles: (alt) => (_jsxs(_Fragment, { children: [_jsx("path", { d: "M16 7.5 22.1 11.1 22.1 18.3 16 21.9 9.9 18.3 9.9 11.1Z", fill: "none", stroke: "#ffffff", strokeWidth: "2.2", strokeLinejoin: "round" }), _jsx("path", { d: "M5.5 25.5h21", fill: "none", stroke: alt, strokeWidth: "3", strokeLinecap: "round" })] })),
|
|
10
10
|
// An isotopic pattern: the answer this one is asked for most.
|
|
11
11
|
chemcalc: (alt) => (_jsxs("g", { strokeLinecap: "round", strokeWidth: "3.4", fill: "none", children: [_jsx("path", { d: "M9 24V15", stroke: "#ffffff" }), _jsx("path", { d: "M16 24V7", stroke: alt }), _jsx("path", { d: "M23 24V18", stroke: "#ffffff" })] })),
|
|
12
|
+
// Three peaks of a mixture over the funnel that narrows them to one compound,
|
|
13
|
+
// which is the dereplication this one does.
|
|
14
|
+
derepflow: (alt) => (_jsxs(_Fragment, { children: [_jsxs("g", { stroke: "#ffffff", strokeWidth: "4", strokeLinecap: "round", fill: "none", children: [_jsx("path", { d: "M7 15.6V9.4" }), _jsx("path", { d: "M16 15.6V4.6" }), _jsx("path", { d: "M25 15.6v-4.6" })] }), _jsx("path", { d: "M6.2 20.4 16 27 25.8 20.4", stroke: alt, strokeWidth: "4", strokeLinecap: "round", strokeLinejoin: "round", fill: "none" })] })),
|
|
12
15
|
// The official NMRium symbol, from `Logo.tsx` of the NMRium sources: the
|
|
13
16
|
// orange half is theirs, and the half their logo sets in plum is set in white
|
|
14
17
|
// here because the plate already is that plum.
|
|
@@ -33,7 +36,7 @@ export const GLYPHS = {
|
|
|
33
36
|
// The stepped corner of the table, with the one cell a visitor has picked
|
|
34
37
|
// carrying the accent — which is what every tool of that site is: the table,
|
|
35
38
|
// and one element read off it.
|
|
36
|
-
|
|
39
|
+
'periodic-table': (alt) => (_jsxs(_Fragment, { children: [_jsxs("g", { fill: "#ffffff", opacity: "0.55", children: [_jsx("rect", { x: "5", y: "6", width: "5", height: "5", rx: "1" }), _jsx("rect", { x: "22", y: "6", width: "5", height: "5", rx: "1" }), _jsx("rect", { x: "5", y: "12.5", width: "5", height: "5", rx: "1" }), _jsx("rect", { x: "11.75", y: "12.5", width: "5", height: "5", rx: "1" }), _jsx("rect", { x: "18.5", y: "12.5", width: "5", height: "5", rx: "1" }), _jsx("rect", { x: "5", y: "19", width: "5", height: "5", rx: "1" }), _jsx("rect", { x: "11.75", y: "19", width: "5", height: "5", rx: "1" })] }), _jsx("rect", { x: "18.5", y: "19", width: "8.5", height: "5", rx: "1", fill: alt })] })),
|
|
37
40
|
// A stereocentre: two bonds in the plane of the drawing and one wedged out
|
|
38
41
|
// of it, which is the whole of what this site does to a flat structure.
|
|
39
42
|
'3d': (alt) => (_jsxs(_Fragment, { children: [_jsx("path", { d: "M16 16 16 5.6M16 16 7.2 21.2", fill: "none", stroke: "#ffffff", strokeWidth: "2.4", strokeLinecap: "round" }), _jsx("path", { d: "M16 16 24.2 24 26.9 19.6Z", fill: alt }), _jsx("circle", { cx: "16", cy: "16", r: "2.9", fill: "#ffffff" })] })),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"glyphs.js","sourceRoot":"","sources":["../../../src/ecosystem/ui/glyphs.tsx"],"names":[],"mappings":";AAgBA,4DAA4D;AAC5D,MAAM,CAAC,MAAM,MAAM,GAA+C;IAChE,uEAAuE;IAC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AC,GAAG,GAAG,EACjD,eAAM,CAAC,EAAC,OAAO,EAAC,CAAC,EAAC,IAAI,EAAC,KAAK,EAAC,GAAG,EAAC,MAAM,EAAC,GAAG,EAAC,EAAE,EAAC,GAAG,GAAG,IACnD,EACJ,eAAM,CAAC,EAAC,MAAM,EAAC,CAAC,EAAC,IAAI,EAAC,KAAK,EAAC,KAAK,EAAC,MAAM,EAAC,GAAG,EAAC,EAAE,EAAC,GAAG,EAAC,IAAI,EAAE,GAAG,GAAI,IAChE,CACJ;IACD,2EAA2E;IAC3E,wEAAwE;IACxE,IAAI,EAAE,CAAC,GAAG,EAAE,EAAE,CAAC,CACb,8BACE,eACE,CAAC,EAAC,8BAA8B,EAChC,IAAI,EAAC,MAAM,EACX,MAAM,EAAC,SAAS,EAChB,WAAW,EAAC,KAAK,EACjB,aAAa,EAAC,OAAO,GACrB,EACF,eAAM,CAAC,EAAC,2BAA2B,EAAC,IAAI,EAAE,GAAG,GAAI,EACjD,iBAAQ,EAAE,EAAC,IAAI,EAAC,EAAE,EAAC,IAAI,EAAC,CAAC,EAAC,KAAK,EAAC,IAAI,EAAC,SAAS,GAAG,IAChD,CACJ;CACF,CAAC"}
|
|
@@ -35,6 +35,11 @@ export interface AtomicOrbitalCanvasProps {
|
|
|
35
35
|
* @default false
|
|
36
36
|
*/
|
|
37
37
|
spinning?: boolean;
|
|
38
|
+
/**
|
|
39
|
+
* How fast it turns, in molstar's own spin unit. Lower is slower.
|
|
40
|
+
* @default 0.3
|
|
41
|
+
*/
|
|
42
|
+
spinSpeed?: number;
|
|
38
43
|
/**
|
|
39
44
|
* How the field is produced. Supply a worker-backed sampler to keep the main
|
|
40
45
|
* thread free; the default runs in process.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AtomicOrbitalCanvas.d.ts","sourceRoot":"","sources":["../../../src/orbital/ui/AtomicOrbitalCanvas.tsx"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAiB,YA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@@ -2,6 +2,7 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
2
2
|
import { useEffect, useRef, useState } from 'react';
|
|
3
3
|
import { PHASE_PALETTES } from "../core/palette.js";
|
|
4
4
|
import { sampleInProcess } from "../core/sample.js";
|
|
5
|
+
import { DEFAULT_SPIN_SPEED } from "./camera.js";
|
|
5
6
|
import { createOrbitalViewer } from "./viewer.js";
|
|
6
7
|
/**
|
|
7
8
|
* Mount one molstar canvas and keep it showing the orbital named by the props.
|
|
@@ -9,7 +10,7 @@ import { createOrbitalViewer } from "./viewer.js";
|
|
|
9
10
|
* @returns The canvas, with a progress note while it samples.
|
|
10
11
|
*/
|
|
11
12
|
export function AtomicOrbitalCanvas(props) {
|
|
12
|
-
const { atomicNumber, orbitalId, palette = PHASE_PALETTES.textbook, resolution = DEFAULT_RESOLUTION, spinning = false, sample = sampleInProcess, onNodeRadii, onError, } = props;
|
|
13
|
+
const { atomicNumber, orbitalId, palette = PHASE_PALETTES.textbook, resolution = DEFAULT_RESOLUTION, spinning = false, spinSpeed = DEFAULT_SPIN_SPEED, sample = sampleInProcess, onNodeRadii, onError, } = props;
|
|
13
14
|
const containerRef = useRef(null);
|
|
14
15
|
const viewerRef = useRef(null);
|
|
15
16
|
const [drawn, setDrawn] = useState(null);
|
|
@@ -70,8 +71,8 @@ export function AtomicOrbitalCanvas(props) {
|
|
|
70
71
|
};
|
|
71
72
|
}, [atomicNumber, orbitalId, resolution, palette, sample, wanted]);
|
|
72
73
|
useEffect(() => {
|
|
73
|
-
void viewerRef.current?.setSpin(spinning);
|
|
74
|
-
}, [spinning]);
|
|
74
|
+
void viewerRef.current?.setSpin(spinning, spinSpeed);
|
|
75
|
+
}, [spinning, spinSpeed]);
|
|
75
76
|
return (_jsx("div", { ref: containerRef, style: CANVAS_STYLE, children: busy && _jsx("div", { style: BUSY_STYLE, children: "Sampling\u2026" }) }));
|
|
76
77
|
}
|
|
77
78
|
/** Samples per edge; 56 resolves the radial node of a 3s in about 25 ms. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AtomicOrbitalCanvas.js","sourceRoot":"","sources":["../../../src/orbital/ui/AtomicOrbitalCanvas.tsx"],"names":[],"mappings":";AASA,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAIpD,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAEpD,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"AtomicOrbitalCanvas.js","sourceRoot":"","sources":["../../../src/orbital/ui/AtomicOrbitalCanvas.tsx"],"names":[],"mappings":";AASA,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAIpD,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAEpD,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAEpD,OAAO,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAEjD,OAAO,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAoDlD;;;;GAIG;AACH,MAAM,UAAU,mBAAmB,CACjC,KAA+B;IAE/B,MAAM,EACJ,YAAY,EACZ,SAAS,EACT,OAAO,GAAG,cAAc,CAAC,QAAQ,EACjC,UAAU,GAAG,kBAAkB,EAC/B,QAAQ,GAAG,KAAK,EAChB,SAAS,GAAG,kBAAkB,EAC9B,MAAM,GAAG,eAAe,EACxB,WAAW,EACX,OAAO,GACR,GAAG,KAAK,CAAC;IAEV,MAAM,YAAY,GAAG,MAAM,CAAiB,IAAI,CAAC,CAAC;IAClD,MAAM,SAAS,GAAG,MAAM,CAAuB,IAAI,CAAC,CAAC;IACrD,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,QAAQ,CAAgB,IAAI,CAAC,CAAC;IAExD,yEAAyE;IACzE,8EAA8E;IAC9E,MAAM,MAAM,GAAG,G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EAA4E;AAC5E,MAAM,kBAAkB,GAAG,EAAE,CAAC;AAE9B;;;;GAIG;AACH,SAAS,aAAa,CAAC,UAAqC;IAC1D,OAAO,OAAO,UAAU,KAAK,QAAQ;QACnC,CAAC,CAAC,MAAM,CAAC,UAAU,CAAC;QACpB,CAAC,CAAC,GAAG,UAAU,CAAC,KAAK,IAAI,UAAU,CAAC,GAAG,EAAE,CAAC;AAC9C,CAAC;AAED;;;;GAIG;AACH,MAAM,YAAY,GAAkB;IAClC,QAAQ,EAAE,UAAU;IACpB,KAAK,EAAE,MAAM;IACb,QAAQ,EAAE,iBAAiB;IAC3B,WAAW,EAAE,OAAO;IACpB,MAAM,EAAE,QAAQ;IAChB,SAAS,EAAE,GAAG;IACd,YAAY,EAAE,CAAC;IACf,QAAQ,EAAE,QAAQ;CACnB,CAAC;AAEF,MAAM,UAAU,GAAkB;IAChC,QAAQ,EAAE,UAAU;IACpB,GAAG,EAAE,CAAC;IACN,IAAI,EAAE,CAAC;IACP,MAAM,EAAE,CAAC;IACT,OAAO,EAAE,SAAS;IAClB,YAAY,EAAE,CAAC;IACf,UAAU,EAAE,2BAA2B;IACvC,KAAK,EAAE,SAAS;IAChB,QAAQ,EAAE,EAAE;CACb,CAAC"}
|
|
@@ -43,6 +43,11 @@ export interface AtomicOrbitalViewerProps {
|
|
|
43
43
|
* @default false
|
|
44
44
|
*/
|
|
45
45
|
spinning?: boolean;
|
|
46
|
+
/**
|
|
47
|
+
* How fast it turns, in molstar's own spin unit. Lower is slower.
|
|
48
|
+
* @default 0.3
|
|
49
|
+
*/
|
|
50
|
+
spinSpeed?: number;
|
|
46
51
|
/**
|
|
47
52
|
* How the field is produced. Supply a worker-backed sampler to keep the main
|
|
48
53
|
* thread free; the default runs in process.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AtomicOrbitalViewer.d.ts","sourceRoot":"","sources":["../../../src/orbital/ui/AtomicOrbitalViewer.tsx"],"names":[],"mappings":"AAAA;;;;;;;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