react-cheminfo 0.52.0 → 0.54.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 +65 -31
- package/lib/i18n/core/chromeCatalog.d.ts +1 -1
- package/lib/i18n/core/chromeCatalog.d.ts.map +1 -1
- package/lib/i18n/core/index.d.ts +2 -0
- package/lib/i18n/core/index.d.ts.map +1 -1
- package/lib/i18n/core/index.js +1 -0
- package/lib/i18n/core/index.js.map +1 -1
- package/lib/i18n/core/messageCatalog.d.ts +10 -0
- package/lib/i18n/core/messageCatalog.d.ts.map +1 -1
- package/lib/i18n/core/messageCatalog.js +12 -0
- package/lib/i18n/core/messageCatalog.js.map +1 -1
- package/lib/i18n/core/translate.d.ts +35 -0
- package/lib/i18n/core/translate.d.ts.map +1 -0
- package/lib/i18n/core/translate.js +27 -0
- package/lib/i18n/core/translate.js.map +1 -0
- package/lib/i18n/ui/useT.d.ts +2 -12
- package/lib/i18n/ui/useT.d.ts.map +1 -1
- package/lib/i18n/ui/useT.js +2 -8
- package/lib/i18n/ui/useT.js.map +1 -1
- package/lib/i18n/vite/index.d.ts +3 -0
- package/lib/i18n/vite/index.d.ts.map +1 -0
- package/lib/i18n/vite/index.js +2 -0
- package/lib/i18n/vite/index.js.map +1 -0
- package/lib/i18n/vite/localeCatalog.d.ts +70 -0
- package/lib/i18n/vite/localeCatalog.d.ts.map +1 -0
- package/lib/i18n/vite/localeCatalog.js +80 -0
- package/lib/i18n/vite/localeCatalog.js.map +1 -0
- package/lib/language/ui/siteLanguageContext.d.ts.map +1 -1
- package/lib/language/ui/siteLanguageContext.js +2 -1
- package/lib/language/ui/siteLanguageContext.js.map +1 -1
- package/lib/locales/de.json +5 -0
- package/lib/locales/en.json +5 -0
- package/lib/locales/es.json +5 -0
- package/lib/locales/fr.json +5 -0
- package/lib/locales/it.json +5 -0
- package/lib/router/core/history.d.ts +4 -3
- package/lib/router/core/history.d.ts.map +1 -1
- package/lib/router/core/history.js +9 -13
- package/lib/router/core/history.js.map +1 -1
- package/lib/router/core/index.d.ts +2 -0
- package/lib/router/core/index.d.ts.map +1 -1
- package/lib/router/core/index.js +1 -0
- package/lib/router/core/index.js.map +1 -1
- package/lib/router/core/pageAddress.d.ts +61 -0
- package/lib/router/core/pageAddress.d.ts.map +1 -0
- package/lib/router/core/pageAddress.js +69 -0
- package/lib/router/core/pageAddress.js.map +1 -0
- package/lib/share/core/index.d.ts +4 -0
- package/lib/share/core/index.d.ts.map +1 -1
- package/lib/share/core/index.js +2 -0
- package/lib/share/core/index.js.map +1 -1
- package/lib/share/core/preferences.d.ts +2 -2
- package/lib/share/core/preferences.d.ts.map +1 -1
- package/lib/share/core/preferences.js +8 -3
- package/lib/share/core/preferences.js.map +1 -1
- package/lib/share/core/seal.d.ts +42 -0
- package/lib/share/core/seal.d.ts.map +1 -0
- package/lib/share/core/seal.js +185 -0
- package/lib/share/core/seal.js.map +1 -0
- package/lib/share/core/sealedAddress.d.ts +31 -0
- package/lib/share/core/sealedAddress.d.ts.map +1 -0
- package/lib/share/core/sealedAddress.js +38 -0
- package/lib/share/core/sealedAddress.js.map +1 -0
- package/lib/share/ui/SealedLinkRefused.d.ts +17 -0
- package/lib/share/ui/SealedLinkRefused.d.ts.map +1 -0
- package/lib/share/ui/SealedLinkRefused.js +23 -0
- package/lib/share/ui/SealedLinkRefused.js.map +1 -0
- package/lib/share/ui/ShareConfigOptions.d.ts +12 -1
- package/lib/share/ui/ShareConfigOptions.d.ts.map +1 -1
- package/lib/share/ui/ShareConfigOptions.js +4 -3
- package/lib/share/ui/ShareConfigOptions.js.map +1 -1
- package/lib/share/ui/ShareDialogContent.d.ts.map +1 -1
- package/lib/share/ui/ShareDialogContent.js +20 -6
- package/lib/share/ui/ShareDialogContent.js.map +1 -1
- package/lib/share/ui/ShareLinkBar.d.ts +5 -0
- package/lib/share/ui/ShareLinkBar.d.ts.map +1 -1
- package/lib/share/ui/ShareLinkBar.js +4 -4
- package/lib/share/ui/ShareLinkBar.js.map +1 -1
- package/lib/share/ui/index.d.ts +2 -0
- package/lib/share/ui/index.d.ts.map +1 -1
- package/lib/share/ui/index.js +1 -0
- package/lib/share/ui/index.js.map +1 -1
- package/lib/share/ui/useSealedUrl.d.ts +17 -0
- package/lib/share/ui/useSealedUrl.d.ts.map +1 -0
- package/lib/share/ui/useSealedUrl.js +31 -0
- package/lib/share/ui/useSealedUrl.js.map +1 -0
- package/lib/vite.d.ts +1 -0
- package/lib/vite.d.ts.map +1 -1
- package/lib/vite.js +1 -0
- package/lib/vite.js.map +1 -1
- package/package.json +1 -1
- package/src/i18n/core/index.ts +2 -0
- package/src/i18n/core/messageCatalog.ts +13 -0
- package/src/i18n/core/translate.ts +51 -0
- package/src/i18n/ui/useT.ts +6 -29
- package/src/i18n/vite/index.ts +5 -0
- package/src/i18n/vite/localeCatalog.ts +121 -0
- package/src/language/ui/siteLanguageContext.ts +2 -1
- package/src/locales/de.json +5 -0
- package/src/locales/en.json +5 -0
- package/src/locales/es.json +5 -0
- package/src/locales/fr.json +5 -0
- package/src/locales/it.json +5 -0
- package/src/router/core/history.ts +9 -15
- package/src/router/core/index.ts +8 -0
- package/src/router/core/pageAddress.ts +110 -0
- package/src/share/core/index.ts +10 -0
- package/src/share/core/preferences.ts +10 -10
- package/src/share/core/seal.ts +233 -0
- package/src/share/core/sealedAddress.ts +48 -0
- package/src/share/ui/SealedLinkRefused.tsx +43 -0
- package/src/share/ui/ShareConfigOptions.tsx +23 -1
- package/src/share/ui/ShareDialogContent.tsx +37 -6
- package/src/share/ui/ShareLinkBar.tsx +9 -1
- package/src/share/ui/index.ts +2 -0
- package/src/share/ui/useSealedUrl.ts +40 -0
- package/src/vite.ts +1 -0
package/README.md
CHANGED
|
@@ -88,37 +88,37 @@ through a wildcard subpath exactly as `react-science` serves its own.
|
|
|
88
88
|
|
|
89
89
|
## What is in it
|
|
90
90
|
|
|
91
|
-
| Area | `…/core`
|
|
92
|
-
| -------------------------- |
|
|
93
|
-
| **Site identity** | `siteById`, `findSiteByHost`, `siteTokensCss`
|
|
94
|
-
| **Chrome** | —
|
|
95
|
-
| **Languages** | `LANGUAGES`, `DEFAULT_LANGUAGE`, `LANGUAGE_LABELS`, `isLanguage`, `MessageCatalog`, `CHROME_CATALOG`, `setMessageSession`, `loadCatalogs`, `LANGUAGE_PARAM`, `withLanguageParam`
|
|
96
|
-
| **Citation** | `formatCitation`, `formatCitations`, `citationSegments`, `downloadCitation`, `citedReferences`, `doiUrl`
|
|
97
|
-
| **Share & embed** | `parseShareConfig`, `applyShareConfig`, `buildShareUrl`, `buildEmbedCode`, `isHidden`, `visibleShareParts`, `applySharePreset`, `findSharePreset`, the param codecs, `syncPreferencesWithUrl`, `applyPreferencesFromSearch`, `writePreferencesToSearch`
|
|
98
|
-
| **Routing & head** | `createTabRouter`, `readRoute`, `writeRoute`, `subscribeToRoute`, `adoptLegacyHashAddress`, `writeDocumentMeta`
|
|
99
|
-
| **Indexing** | `injectPageMeta`, `pageHeadTags`, `pageDocumentMeta`, `fill`, `PAGE_HEAD_MARKER`, `PAGE_BODY_MARKER`, `robotsTxt`, `sitemapXml`, `noscriptIndex`, `structuredDataScript`, `assertRoutes`, `routeFor`, `homeRoute`
|
|
100
|
-
| **Pedagogy** | `parseGlossaryMarkers`, `localStorageProgressStore`, `progressSummary`, `finishValidation`
|
|
101
|
-
| **Clipboard & files** | `writeToClipboard`, `downloadBlob`, `downloadText`, `sanitizeFileName`, `toDelimited`, `readDelimited`, `downloadFigure`, `figureSvg`, `figurePng`, `figureSize`
|
|
102
|
-
| **Formatting & colour** | `formatInteger`, `formatDecimal`, `formatBytes`, `pluralize`, `readableInk`, `contrastRatio`, `COLOR_SCALES`, `resolveColorScale`, `formatColorScale`, `colorAt`, `swatchAt`, `sampleScale`, `colorScaleGradient`, `rgbToHsv`
|
|
103
|
-
| **Number entry** | `readNumber`, `numberText`, `isPartialNumber`, `stepNumber`, `snapToStep`
|
|
104
|
-
| **Range filter** | `isRangeBounded`, `isRangeDomain`, `rangeHandles`, `movedRange`, `settleHandles`, `sameRange`, `rangeHistogramPath`, `OPEN_RANGE`
|
|
105
|
-
| **Widgets** | `CREDITS`, `credits`
|
|
106
|
-
| **Hooks & state** | `createWorkerChannel`, `persistBucket`, `persistSignalBucket`
|
|
107
|
-
| **Chemistry** | `atomicOrbitalsOf`, `configurationOf`, `classifyMolfile`, `readStructure`, `toMolfileExport`
|
|
108
|
-
| **Conformers** | `generateConformers`, `continueConformers`, `refineConformers`, `conformerShape`, `isSameMinimum`, `rankByEnergy`, `minimiseConformer`, `DEFAULT_CONFORMER_OPTIONS`, `CONFORMER_STRATEGIES` (all `/conformers`); `GeometryRelaxer`, `readRelaxableGeometry`, `centredRmsd`
|
|
109
|
-
| **Spectrum charts** | `chartScale`, `chartAxisScale`, `plotRect`, `zoomDomain`, `zoomSelection`, `labelStackBaselines`, `layoutAnnotationBoxes`, `profilePath`, `stickPath`, `guidePlacement`, `readoutPlacement`, `stackCapacity`, `nextSpectrumColor`, `panelStyles`, `statusBar`
|
|
110
|
-
| **Infrared** | `loadIrSpectra`, `toIrSpectrum`, `pickBands`, `assignBands`, `BAND_ASSIGNMENTS`, `irSpectrumToJcamp`, `IR_MODE_RULES`, `nearestBandAt`, `planBandLabels`, `irReducer` (all `/ir`)
|
|
111
|
-
| **Spectra** | `FILTER_CATALOG`, `filterMenu`, `settingsProblems`, `normalizationFilters`, `addFilter`, `moveFilter`, `setFilterOption`, `principalComponentChoices`, `clampPrincipalComponents`, `EMPTY_SETTINGS` (all `/spectra`)
|
|
112
|
-
| **About** | `resolveAbout`, `aboutProblems`
|
|
113
|
-
| **Which build is running** | `formatBuiltAt`, `shortCommit`, `BuildInfo`
|
|
114
|
-
| **Slideshows** | `parseTalk`, `splitDemoLinks`, `slideActionForKey`, `parseTalkOrigin`, `buildTalkManifest` (all `/slides`)
|
|
115
|
-
| **Token guard** | `findTokenViolations`
|
|
116
|
-
| **Figures** | `chartScale`, `chartAxisScale`, `chartAxisTitle`, `chartShare`, `chartColumnExtent`, `chartBinCounts`, `chartSeriesColor`, `rowMatrix`, `stackedMatrix`, `emptiestCorner`, `placeOverlayCard`, `overlayMetrics`
|
|
117
|
-
| **Projections** | `pcaResult`, `embeddingResult`, `projectionTabs`, `loadingProfiles`, `explainedShares`, `confidenceEllipse`, `projectEllipse`, `pointsInPolygon`, `resolveProjectionGroups`, `resolveProjectionShapes`, `PROJECTION_COPY`
|
|
118
|
-
| **Parallel coordinates** | `parallelAxisOf`, `parallelAxisLayouts`, `parallelIncludedMask`, `parallelKeptCount`, `parallelNearestRow`, `parallelSegmentAt`, `parallelBandAt`, `parallelRangeOf`, `parallelPalette`, `parallelColorSteps`, `paintParallelLines`
|
|
119
|
-
| **Periodic table** | `PERIODIC_ELEMENTS`, `elementBySymbol`, `elementByAtomicNumber`, `cellOf`, `placedElements`, `elementByArrowKey`, `EMPTY_BLOCK`, `categorySwatch`, `CATEGORY_LABELS`
|
|
120
|
-
| **Taxonomy** | `TAXON_RANKS`, `PRINCIPAL_RANKS`, `rankOrder`, `isPrincipalRank`, `isGenusOrBelow`, `isAboveGenus`, `principalLineage`, `lineageFromNodes`, `lineageFromRanks`, `genusOrBelow`, `ncbiTaxonomyUrl`, `splitOrganismName`
|
|
121
|
-
| **Framed by a host** | `hostStructureLoader`, `readHostMolecule`, `STRUCTURE_KINDS`, `connectHost`, `selectInputs`, `checkValue`, `kindAccepts`, `parseRequest` (all `/host`); `startStandInHost`, `SCIPEAKS_ETHYLBENZENE_LOAD` (`/host-testing`)
|
|
91
|
+
| Area | `…/core` | `…/ui` |
|
|
92
|
+
| -------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
93
|
+
| **Site identity** | `siteById`, `findSiteByHost`, `siteTokensCss` | `SiteMark`, `Wordmark`, `SiteTheme`, `SiteTile`, `EcosystemButton`, `EcosystemLinks` |
|
|
94
|
+
| **Chrome** | — | `SiteHeader`, `SiteFooter`, `NavLink`, `NavMenuButton`, `MenuButton`, `AccountButton`, `useCompactHeader` |
|
|
95
|
+
| **Languages** | `LANGUAGES`, `DEFAULT_LANGUAGE`, `LANGUAGE_LABELS`, `isLanguage`, `MessageCatalog`, `CHROME_CATALOG`, `setMessageSession`, `loadCatalogs`, `LANGUAGE_PARAM`, `withLanguageParam` | `useT`, `useChromeT`, `useLanguage`, `LanguageSelect`, `SiteLanguage` |
|
|
96
|
+
| **Citation** | `formatCitation`, `formatCitations`, `citationSegments`, `downloadCitation`, `citedReferences`, `doiUrl` | `CiteButton`, `CitationMenu`, `CitationPreview` |
|
|
97
|
+
| **Share & embed** | `parseShareConfig`, `applyShareConfig`, `buildShareUrl`, `buildEmbedCode`, `isHidden`, `visibleShareParts`, `applySharePreset`, `findSharePreset`, the param codecs, `syncPreferencesWithUrl`, `applyPreferencesFromSearch`, `writePreferencesToSearch`, sealed links: `openSealedAddress`, `sealShareUrl`, `sealQuery`, `unsealQuery` | `ShareDialog`, `ShareButton`, `HiddenPartsProvider`, `PagePart`, `useIsHidden`, `SealedLinkRefused` |
|
|
98
|
+
| **Routing & head** | `createTabRouter`, `readRoute`, `writeRoute`, `subscribeToRoute`, `adoptLegacyHashAddress`, `writeDocumentMeta`, `pageLocation`, `pageHistory` | `useTabRoute` |
|
|
99
|
+
| **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`) |
|
|
100
|
+
| **Pedagogy** | `parseGlossaryMarkers`, `localStorageProgressStore`, `progressSummary`, `finishValidation` | `GlossaryText`, `SyntaxTooltip`, `HintLadder`, `ExerciseActions`, `ExerciseProgressHeader`, `TutorialStepStrip`, `ReferenceGrid`, `TestCaseList` |
|
|
101
|
+
| **Clipboard & files** | `writeToClipboard`, `downloadBlob`, `downloadText`, `sanitizeFileName`, `toDelimited`, `readDelimited`, `downloadFigure`, `figureSvg`, `figurePng`, `figureSize` | `ClickToCopy`, `CopyButton`, `CopyableValue`, `CodeBlock`, `DelimitedTextDialog`, `FigureDownload` |
|
|
102
|
+
| **Formatting & colour** | `formatInteger`, `formatDecimal`, `formatBytes`, `pluralize`, `readableInk`, `contrastRatio`, `COLOR_SCALES`, `resolveColorScale`, `formatColorScale`, `colorAt`, `swatchAt`, `sampleScale`, `colorScaleGradient`, `rgbToHsv` | `ColorScaleLegend`, `ColorScaleSelect`, `ColorScaleEditor`, `ColorScaleBar` |
|
|
103
|
+
| **Number entry** | `readNumber`, `numberText`, `isPartialNumber`, `stepNumber`, `snapToStep` | `NumberInput` |
|
|
104
|
+
| **Range filter** | `isRangeBounded`, `isRangeDomain`, `rangeHandles`, `movedRange`, `settleHandles`, `sameRange`, `rangeHistogramPath`, `OPEN_RANGE` | `RangeSlider` |
|
|
105
|
+
| **Widgets** | `CREDITS`, `credits` | `ErrorBoundary`, `CollapsibleSection`, `CapsuleFilter`, `HelpTooltip`, `CreditsList` |
|
|
106
|
+
| **Hooks & state** | `createWorkerChannel`, `persistBucket`, `persistSignalBucket` | `useDebouncedValue`, `useContainerSize`, `useListKeyboardNavigation`, `useDisclosure` |
|
|
107
|
+
| **Chemistry** | `atomicOrbitalsOf`, `configurationOf`, `classifyMolfile`, `readStructure`, `toMolfileExport` | `AtomicOrbitalViewer` (`/orbital`), `StructureEditor`, `Structure` (`/structure`) |
|
|
108
|
+
| **Conformers** | `generateConformers`, `continueConformers`, `refineConformers`, `conformerShape`, `isSameMinimum`, `rankByEnergy`, `minimiseConformer`, `DEFAULT_CONFORMER_OPTIONS`, `CONFORMER_STRATEGIES` (all `/conformers`); `GeometryRelaxer`, `readRelaxableGeometry`, `centredRmsd` | — |
|
|
109
|
+
| **Spectrum charts** | `chartScale`, `chartAxisScale`, `plotRect`, `zoomDomain`, `zoomSelection`, `labelStackBaselines`, `layoutAnnotationBoxes`, `profilePath`, `stickPath`, `guidePlacement`, `readoutPlacement`, `stackCapacity`, `nextSpectrumColor`, `panelStyles`, `statusBar` | `Axes`, `AxisGuide`, `ChartTracker`, `ChartStack`, `SelectionRect`, `TraceLegend`, `PlotCaption`, `useChartZoom`, `useChartPointer`, `useChartSize`, `SidePanelStack`, `PanelRail`, `Section`, `FilterInput`, `AboutDialogFrame`, `DocumentationDialogFrame`, `FigureDownload`, `useFigureDownload` |
|
|
110
|
+
| **Infrared** | `loadIrSpectra`, `toIrSpectrum`, `pickBands`, `assignBands`, `BAND_ASSIGNMENTS`, `irSpectrumToJcamp`, `IR_MODE_RULES`, `nearestBandAt`, `planBandLabels`, `irReducer` (all `/ir`) | `IrEditor`, `IrChart`, `BandsPanel`, `SpectraPanel`, `MetadataPanel`, `useIrEditor` (all `/ir`) |
|
|
111
|
+
| **Spectra** | `FILTER_CATALOG`, `filterMenu`, `settingsProblems`, `normalizationFilters`, `addFilter`, `moveFilter`, `setFilterOption`, `principalComponentChoices`, `clampPrincipalComponents`, `EMPTY_SETTINGS` (all `/spectra`) | `SpectraSettingsEditor`, `FilterChainEditor`, `PrincipalComponentSelect` (all `/spectra`) |
|
|
112
|
+
| **About** | `resolveAbout`, `aboutProblems` | `AboutPage` |
|
|
113
|
+
| **Which build is running** | `formatBuiltAt`, `shortCommit`, `BuildInfo` | `AboutBuild`, `cheminfoBuildInfo` (`/vite`) |
|
|
114
|
+
| **Slideshows** | `parseTalk`, `splitDemoLinks`, `slideActionForKey`, `parseTalkOrigin`, `buildTalkManifest` (all `/slides`) | `Slideshow`, `SlideView`, `TalkList`, `BackToSlides` (all `/slides`), `cheminfoTalks` (`/vite`) |
|
|
115
|
+
| **Token guard** | `findTokenViolations` | `cheminfo-check-tokens`, `cheminfo-check-messages`, `cheminfo-check-deploy` (the bins) |
|
|
116
|
+
| **Figures** | `chartScale`, `chartAxisScale`, `chartAxisTitle`, `chartShare`, `chartColumnExtent`, `chartBinCounts`, `chartSeriesColor`, `rowMatrix`, `stackedMatrix`, `emptiestCorner`, `placeOverlayCard`, `overlayMetrics` | `ChartFrame`, `ChartAxis`, `TrackedLineChart`, `OverlayBar`, `OverlaySelect`, `OverlaySegmented`, `OverlayToggle`, `OverlayNumber`, `OverlayLegend`, `OverlayCaption`, `OverlayReadout` |
|
|
117
|
+
| **Projections** | `pcaResult`, `embeddingResult`, `projectionTabs`, `loadingProfiles`, `explainedShares`, `confidenceEllipse`, `projectEllipse`, `pointsInPolygon`, `resolveProjectionGroups`, `resolveProjectionShapes`, `PROJECTION_COPY` | `PcaViewer`, `ProjectionViewer`, `ScatterPlot`, `ScatterMatrix` |
|
|
118
|
+
| **Parallel coordinates** | `parallelAxisOf`, `parallelAxisLayouts`, `parallelIncludedMask`, `parallelKeptCount`, `parallelNearestRow`, `parallelSegmentAt`, `parallelBandAt`, `parallelRangeOf`, `parallelPalette`, `parallelColorSteps`, `paintParallelLines` | `ParallelCoordinates` |
|
|
119
|
+
| **Periodic table** | `PERIODIC_ELEMENTS`, `elementBySymbol`, `elementByAtomicNumber`, `cellOf`, `placedElements`, `elementByArrowKey`, `EMPTY_BLOCK`, `categorySwatch`, `CATEGORY_LABELS` | `PeriodicTable`, `ElementCell`, `CategoryLegend` |
|
|
120
|
+
| **Taxonomy** | `TAXON_RANKS`, `PRINCIPAL_RANKS`, `rankOrder`, `isPrincipalRank`, `isGenusOrBelow`, `isAboveGenus`, `principalLineage`, `lineageFromNodes`, `lineageFromRanks`, `genusOrBelow`, `ncbiTaxonomyUrl`, `splitOrganismName` | `TaxonLineage`, `OrganismName`, `useRankLabel` |
|
|
121
|
+
| **Framed by a host** | `hostStructureLoader`, `readHostMolecule`, `STRUCTURE_KINDS`, `connectHost`, `selectInputs`, `checkValue`, `kindAccepts`, `parseRequest` (all `/host`); `startStandInHost`, `SCIPEAKS_ETHYLBENZENE_LOAD` (`/host-testing`) | `useHostConnection` (`/host`) |
|
|
122
122
|
|
|
123
123
|
Everything in that table is exported from `./core`, `./ui`, `./slides`,
|
|
124
124
|
`./vite` or `./structure` and nothing else is: the sub-components a component is built
|
|
@@ -891,6 +891,40 @@ await page.goto(
|
|
|
891
891
|
const { results } = await page.evaluate(readStandInHostLog);
|
|
892
892
|
```
|
|
893
893
|
|
|
894
|
+
## Protecting a link
|
|
895
|
+
|
|
896
|
+
The share dialog can hand out a **sealed link**: the whole query string moved
|
|
897
|
+
into one `s` token, so a class can neither read nor edit what the link sets
|
|
898
|
+
up, and the page's address stays fixed while it is used.
|
|
899
|
+
|
|
900
|
+
```
|
|
901
|
+
https://surge.cheminfo.org/exercises?s=e1.x9dasYuwqR9SZzw…
|
|
902
|
+
```
|
|
903
|
+
|
|
904
|
+
A site offers it by opening its address before anything reads it. Everything
|
|
905
|
+
that reads the address at load moves to a second module:
|
|
906
|
+
|
|
907
|
+
```ts
|
|
908
|
+
// src/main.tsx
|
|
909
|
+
import { openSealedAddress } from 'react-cheminfo/core';
|
|
910
|
+
|
|
911
|
+
const opened = await openSealedAddress();
|
|
912
|
+
const { start } = await import('./start.tsx');
|
|
913
|
+
start(opened); // renders <SealedLinkRefused /> when opened.status is 'refused'
|
|
914
|
+
```
|
|
915
|
+
|
|
916
|
+
Calling `openSealedAddress` is what makes `ShareDialog` offer _Protect this
|
|
917
|
+
link_; a site that never calls it never hands out a link it cannot open. A
|
|
918
|
+
sealed page is always embedded. Its address is held in memory, so site code
|
|
919
|
+
reads the address through `pageLocation()` and writes it through
|
|
920
|
+
`pageHistory()`, never through `location` and `history` directly.
|
|
921
|
+
|
|
922
|
+
The token is deflated, then encrypted under an 8-byte HMAC tag that is also
|
|
923
|
+
the AES-CTR counter, so the same query always gives the same link, and an
|
|
924
|
+
edited one is refused. **The key ships in every bundle**: this stops a class,
|
|
925
|
+
not someone who digs the key out of the code. A token, once handed out, must
|
|
926
|
+
open for ever: a new key or format ships under a new version prefix (`e2`).
|
|
927
|
+
|
|
894
928
|
## Speaking four languages
|
|
895
929
|
|
|
896
930
|
Every word this library puts on a page — the header, the Tools menu, the Cite
|
|
@@ -17,5 +17,5 @@ export type ChromeKey = keyof typeof en;
|
|
|
17
17
|
* missing message falls back to; every other language arrives as a chunk of its
|
|
18
18
|
* own, so a site read only in English downloads none of them.
|
|
19
19
|
*/
|
|
20
|
-
export declare const CHROME_CATALOG: MessageCatalog<"language.label" | "chrome.pages" | "chrome.about" | "chrome.aboutTitle" | "account.signIn" | "account.signOut" | "account.signedInAs" | "ecosystem.tools" | "ecosystem.menuHeading" | "ecosystem.otherTools" | "ecosystem.youAreHere" | "ecosystem.group.basics.label" | "ecosystem.group.basics.blurb" | "ecosystem.group.practice.label" | "ecosystem.group.practice.blurb" | "ecosystem.group.structures.label" | "ecosystem.group.structures.blurb" | "ecosystem.group.spectra.label" | "ecosystem.group.spectra.blurb" | "ecosystem.group.research.label" | "ecosystem.group.research.blurb" | "ecosystem.group.computing.label" | "ecosystem.group.computing.blurb" | "site.learn.tagline" | "site.inchi.tagline" | "site.vcl.tagline" | "site.smiles.tagline" | "site.openbabel.tagline" | "site.chemcalc.tagline" | "site.dbe.tagline" | "site.nmrium.tagline" | "site.metabo.tagline" | "site.derepflow.tagline" | "site.surge.tagline" | "site.tex.tagline" | "site.lcao.tagline" | "site.regexp.tagline" | "site.pdb.tagline" | "site.elucidation.tagline" | "site.equilibrium.tagline" | "site.polycarp.tagline" | "site.3d.tagline" | "site.periodic-table.tagline" | "site.database.tagline" | "site.symmetry.tagline" | "site.osiris.tagline" | "site.atoms.tagline" | "site.moles.tagline" | "site.inorganic.tagline" | "share.button" | "share.buttonTitle" | "share.dialogTitleFor" | "share.layout" | "share.embed" | "share.embedHint" | "share.on" | "share.off" | "share.showOnPage" | "share.custom" | "share.options" | "share.preview" | "share.device.window" | "share.device.mobile" | "share.device.laptop" | "share.device.hd" | "share.deviceSize" | "share.previewWhat" | "share.previewLive" | "share.copyLink" | "share.copyLinkHelpTitle" | "share.copyLinkHelp" | "share.openInNewTab" | "share.openInNewTabHelpTitle" | "share.openInNewTabHelp" | "share.copyIframe" | "share.copyIframeHelpTitle" | "share.copyIframeHelp" | "cite.button" | "cite.copyReferenceAs" | "cite.pleaseCiteBoth" | "cite.pleaseCiteEvery" | "cite.copyBothAs" | "cite.copyEveryAs" | "cite.importIntoManager" | "cite.openArticle" | "cite.copyThisAs" | "cite.importThis" | "cite.copied" | "cite.copyFailed" | "cite.format.doi" | "cite.download.ris" | "cite.download.bibtex" | "clipboard.copied" | "clipboard.failed" | "clipboard.copy" | "clipboard.copyThe" | "clipboard.copyValue" | "clipboard.copyToClipboard" | "about.providedBy" | "about.whatYouCanDo" | "about.builtOn" | "about.howToCite" | "about.citeWork" | "about.built" | "about.builtFromCommit" | "about.nameList" | "credits.openbabel.description" | "credits.openchemlib.description" | "credits.openchemlib-utils.description" | "credits.osiris-property-explorer.description" | "credits.react-ocl.description" | "credits.react-mf.description" | "credits.mass-tools.description" | "credits.chem-equilibrium.description" | "credits.ml-matrix.description" | "credits.ml-xsadd.description" | "credits.cif-to-json.description" | "credits.ml-spectra-processing.description" | "credits.occ.description" | "credits.xtb-wasm.description" | "credits.molstar.description" | "credits.blueprint.description" | "credits.react-science.description" | "credits.react-cheminfo.description" | "credits.cheminfo-font.description" | "credits.nivo.description" | "credits.mathjax.description" | "credits.lexical.description" | "credits.katex.description" | "credits.dnd-kit.description" | "credits.react-roi.description" | "credits.file-collection.description" | "credits.zip-js.description" | "credits.preact-signals.description" | "credits.fastify.description" | "credits.sqlite.description" | "credits.sqlite-wasm.description" | "credits.pouchdb.description" | "credits.chemexper.description" | "credits.react.description" | "credits.vite.description" | "help.label" | "help.learnMore" | "help.on" | "confirm.delete" | "confirm.cancel" | "error.title" | "error.tryAgain" | "error.noMessage" | "capsule.filter" | "color.scales" | "color.done" | "color.custom" | "color.customEllipsis" | "color.inUse" | "color.uniform" | "color.uniformDescription" | "color.uniformColour" | "color.colourScale" | "color.legendLabel" | "color.scaleBeingEdited" | "color.anchorColour" | "color.anchorPosition" | "color.removeAnchor" | "color.editorHint" | "color.saturation" | "color.brightness" | "color.toneHelp" | "color.path" | "color.interpolation.rgb" | "color.interpolation.hsv" | "color.interpolation.hsv-long" | "color.kind.sequential" | "color.kind.diverging" | "color.kind.cyclic" | "color.scale.viridis.label" | "color.scale.viridis.description" | "color.scale.plasma.label" | "color.scale.plasma.description" | "color.scale.magma.label" | "color.scale.magma.description" | "color.scale.inferno.label" | "color.scale.inferno.description" | "color.scale.cividis.label" | "color.scale.cividis.description" | "color.scale.turbo.label" | "color.scale.turbo.description" | "color.scale.greys.label" | "color.scale.greys.description" | "color.scale.cool-warm.label" | "color.scale.cool-warm.description" | "color.scale.blue-red.label" | "color.scale.blue-red.description" | "color.scale.rainbow.label" | "color.scale.rainbow.description" | "download.save" | "download.saveFigure" | "download.saveThisFigure" | "download.format" | "download.formatHelp" | "download.resolution" | "download.resolutionHelp" | "download.resolutionExample" | "download.noFigure" | "download.hintRasterSvg" | "download.hintSvg" | "download.hintPng" | "download.hintCopied" | "download.copyUnsupported" | "download.size" | "download.sizeHelp" | "download.sizeScreen" | "download.sizeColumn" | "download.sizeCustom" | "download.customSize" | "download.width" | "download.height" | "pedagogy.check" | "pedagogy.revealHint" | "pedagogy.revealHintCount" | "pedagogy.revealHintLadder" | "pedagogy.hideSolution" | "pedagogy.revealSolution" | "pedagogy.reset" | "pedagogy.hints" | "pedagogy.solvedCount" | "pedagogy.clearAll" | "pedagogy.keepAnswers" | "pedagogy.clearEverything" | "pedagogy.clearWarning" | "pedagogy.filterTerms" | "pedagogy.noTermDefined" | "pedagogy.noTermMatches" | "pedagogy.example" | "pedagogy.input" | "pedagogy.previous" | "pedagogy.next" | "pedagogy.stepOf" | "slides.exit" | "slides.previousSlide" | "slides.nextSlide" | "slides.toggleFullscreen" | "slides.backToSlides" | "slides.backToSlide" | "slides.noAddress" | "slides.liveDemos" | "slides.noTalkYet" | "overlay.options" | "overlay.whatAmILookingAt" | "overlay.reset" | "overlay.hoverAName" | "overlay.dismiss" | "axis.scale" | "axis.xScale" | "axis.yScale" | "axis.linear" | "axis.logarithmic" | "axis.scaleHelp" | "delimited.copyTable" | "delimited.copyOrDownload" | "delimited.close" | "delimited.separator" | "delimited.save" | "delimited.copy" | "delimited.tableAsText" | "chart.measurement" | "chart.measurements" | "delimited.descriptionOne" | "delimited.descriptionMany" | "structure.guide.atom.title" | "structure.guide.atom.element" | "structure.guide.atom.group" | "structure.guide.atom.applyOrForget" | "structure.guide.atom.chain" | "structure.guide.atom.charge" | "structure.guide.atom.radical" | "structure.guide.atom.spin" | "structure.guide.atom.attachment" | "structure.guide.atom.query" | "structure.guide.atom.halogen" | "structure.guide.atom.delete" | "structure.guide.atom.note" | "structure.guide.bond.title" | "structure.guide.bond.order" | "structure.guide.bond.zeroOrder" | "structure.guide.bond.stereo" | "structure.guide.bond.unknownGeometry" | "structure.guide.bond.threeRing" | "structure.guide.bond.ring" | "structure.guide.bond.benzene" | "structure.guide.bond.query" | "structure.guide.bond.delete" | "structure.guide.anywhere.title" | "structure.guide.anywhere.undo" | "structure.guide.anywhere.copy" | "structure.guide.anywhere.paste" | "structure.guide.anywhere.deleteSelection" | "structure.guide.anywhere.flip" | "structure.guide.anywhere.help" | "structure.guide.anywhere.note" | "structure.guide.selecting.title" | "structure.guide.selecting.lasso" | "structure.guide.selecting.rectangle" | "structure.guide.selecting.add" | "structure.guide.selecting.move" | "structure.guide.selecting.duplicate" | "structure.guide.selecting.queryFeatures" | "structure.guide.selecting.note" | "structure.guide.stereochemistry.title" | "structure.guide.stereochemistry.note" | "structure.input.type" | "structure.input.or" | "structure.input.drag" | "structure.input.plusDrag" | "structure.input.dragSelection" | "structure.input.plusDragSelection" | "structure.input.doubleClick" | "structure.docs.toolsAndKeys" | "structure.docs.atomProperties" | "structure.docs.stereochemistry" | "structure.help.hoverToolbar" | "structure.help.learnMore" | "structure.mouseAndKeyboard" | "structure.tool.clear.name" | "structure.tool.clear.description" | "structure.tool.cleanUp.name" | "structure.tool.cleanUp.description" | "structure.tool.select.name" | "structure.tool.select.description" | "structure.tool.unknownConfiguration.name" | "structure.tool.unknownConfiguration.description" | "structure.tool.delete.name" | "structure.tool.delete.description" | "structure.tool.singleBond.name" | "structure.tool.singleBond.description" | "structure.tool.upBond.name" | "structure.tool.upBond.description" | "structure.tool.positiveCharge.name" | "structure.tool.positiveCharge.description" | "structure.tool.undo.name" | "structure.tool.undo.description" | "structure.tool.zoomAndRotate.name" | "structure.tool.zoomAndRotate.description" | "structure.tool.atomMapping.name" | "structure.tool.atomMapping.description" | "structure.tool.enhancedStereo.name" | "structure.tool.enhancedStereo.description" | "structure.tool.text.name" | "structure.tool.text.description" | "structure.tool.chain.name" | "structure.tool.chain.description" | "structure.tool.downBond.name" | "structure.tool.downBond.description" | "structure.tool.negativeCharge.name" | "structure.tool.negativeCharge.description" | "structure.tool.anyAtom.name" | "structure.tool.anyAtom.description" | "structure.tool.ring3.name" | "structure.tool.ring3.description" | "structure.tool.ring5.name" | "structure.tool.ring5.description" | "structure.tool.ring7.name" | "structure.tool.ring7.description" | "structure.tool.ring4.name" | "structure.tool.ring4.description" | "structure.tool.ring6.name" | "structure.tool.ring6.description" | "structure.tool.benzene.name" | "structure.tool.benzene.description" | "structure.tool.carbon.name" | "structure.tool.carbon.description" | "structure.tool.nitrogen.name" | "structure.tool.nitrogen.description" | "structure.tool.oxygen.name" | "structure.tool.oxygen.description" | "structure.tool.fluorine.name" | "structure.tool.fluorine.description" | "structure.tool.bromine.name" | "structure.tool.bromine.description" | "structure.tool.hydrogen.name" | "structure.tool.hydrogen.description" | "structure.tool.silicon.name" | "structure.tool.silicon.description" | "structure.tool.phosphorus.name" | "structure.tool.phosphorus.description" | "structure.tool.sulfur.name" | "structure.tool.sulfur.description" | "structure.tool.chlorine.name" | "structure.tool.chlorine.description" | "structure.tool.iodine.name" | "structure.tool.iodine.description" | "structure.tool.reactionOnly" | "structure.tool.unavailable" | "structure.loadingEditor" | "structure.export.open" | "structure.export.title" | "structure.export.loading" | "structure.export.nothing" | "structure.export.picture" | "structure.export.identifiers" | "structure.export.saveSvg" | "structure.export.savePng" | "structure.export.copyPng" | "structure.export.smiles" | "structure.export.smilesHelp" | "structure.export.molfileV3000" | "structure.export.molfileV3000Help" | "structure.export.molfileV2000" | "structure.export.molfileV2000Help" | "structure.export.idCode" | "structure.export.idCodeHelp" | "structure.export.noStereoIdCode" | "structure.export.noStereoIdCodeHelp" | "structure.export.noStereoTautomerIdCode" | "structure.export.noStereoTautomerIdCodeHelp" | "periodic.table" | "periodic.group" | "periodic.period" | "periodic.block" | "periodic.allElements" | "periodic.help.title" | "periodic.help.click" | "periodic.help.modClick" | "periodic.help.element" | "periodic.help.elementClick" | "periodic.help.elementMod" | "periodic.help.number" | "periodic.help.numberClick" | "periodic.help.runMod" | "periodic.help.block" | "periodic.help.blockClick" | "periodic.help.corner" | "periodic.help.cornerClick" | "periodic.help.arrowsClick" | "periodic.help.note" | "periodic.help.ctrl" | "periodic.cellLabel" | "periodic.category.alkali-metal" | "periodic.category.alkaline-earth-metal" | "periodic.category.transition-metal" | "periodic.category.post-transition-metal" | "periodic.category.metalloid" | "periodic.category.nonmetal" | "periodic.category.halogen" | "periodic.category.noble-gas" | "periodic.category.lanthanoid" | "periodic.category.actinoid" | "molecule3d.view" | "molecule3d.resetView" | "molecule3d.spin" | "molecule3d.surface" | "molecule3d.molecularSurface" | "molecule3d.displayOptions" | "molecule3d.exportImage" | "molecule3d.measure" | "molecule3d.clearMeasurements" | "molecule3d.measurement.distance" | "molecule3d.measurement.angle" | "molecule3d.measurement.dihedral" | "molecule3d.measurementTooltip" | "molecule3d.representation.ball-and-stick" | "molecule3d.representation.spacefill" | "molecule3d.representation.stick" | "molecule3d.size" | "molecule3d.surfaceOpacity" | "molecule3d.solventProbe" | "molecule3d.solventProbeHelp" | "molecule3d.surfaceColour" | "molecule3d.colour" | "molecule3d.resetSettings" | "molecule3d.atDefaults" | "molecule3d.surfaceOff" | "molecule3d.showSurface" | "molecule3d.coloring.uniform" | "molecule3d.coloring.element" | "molecule3d.coloring.polarity" | "molecule3d.neutral" | "molecule3d.tpsaHelp" | "molecule3d.loadingViewer" | "molecule3d.couldNotDraw" | "molecule3d.gesture.rotate" | "molecule3d.gesture.rollDrag" | "molecule3d.gesture.rollKeys" | "molecule3d.gesture.moveDrag" | "molecule3d.gesture.moveCtrl" | "molecule3d.gesture.zoom" | "molecule3d.gesture.clip" | "molecule3d.gesture.centreAtom" | "molecule3d.gesture.centreMolecule" | "molecule3d.input.drag" | "molecule3d.input.plus" | "molecule3d.input.plusDrag" | "molecule3d.input.plusScroll" | "molecule3d.input.or" | "molecule3d.input.rightDrag" | "molecule3d.input.scroll" | "molecule3d.input.clickAtom" | "molecule3d.input.clickBackground" | "molecule3d.helpNote" | "orbital.couldNotDraw" | "orbital.sampling" | "orbital.showAxes" | "orbital.axesTitle" | "orbital.axesBody" | "orbital.axesExample" | "orbital.spin" | "orbital.spinTitle" | "orbital.spinBody" | "orbital.resetTitle" | "orbital.resetBody" | "viewer.capability.noWindow" | "viewer.capability.noContext" | "viewer.capability.noFloatTextures" | "viewer.capability.ready" | "conformers.strategy.adaptive-random" | "conformers.strategy.likely-random" | "conformers.strategy.pure-random" | "conformers.strategy.likely-systematic" | "conformers.strategyDetail.adaptive-random" | "conformers.strategyDetail.likely-random" | "conformers.strategyDetail.pure-random" | "conformers.strategyDetail.likely-systematic" | "conformers.minimisation.none" | "number.increment" | "number.decrement" | "range.lowest" | "range.highest" | "range.lowestIs" | "range.highestIs" | "range.noLowerBound" | "range.noUpperBound" | "range.typeValue" | "range.clear" | "taxonomy.lineage" | "taxonomy.rankNote" | "taxonomy.ncbi" | "taxonomy.ncbiTitle" | "taxonomy.rank.realm" | "taxonomy.rank.domain" | "taxonomy.rank.superkingdom" | "taxonomy.rank.kingdom" | "taxonomy.rank.subkingdom" | "taxonomy.rank.superphylum" | "taxonomy.rank.phylum" | "taxonomy.rank.subphylum" | "taxonomy.rank.superclass" | "taxonomy.rank.class" | "taxonomy.rank.subclass" | "taxonomy.rank.infraclass" | "taxonomy.rank.cohort" | "taxonomy.rank.subcohort" | "taxonomy.rank.superorder" | "taxonomy.rank.order" | "taxonomy.rank.suborder" | "taxonomy.rank.infraorder" | "taxonomy.rank.parvorder" | "taxonomy.rank.superfamily" | "taxonomy.rank.family" | "taxonomy.rank.subfamily" | "taxonomy.rank.tribe" | "taxonomy.rank.subtribe" | "taxonomy.rank.genus" | "taxonomy.rank.subgenus" | "taxonomy.rank.section" | "taxonomy.rank.subsection" | "taxonomy.rank.series" | "taxonomy.rank.subseries" | "taxonomy.rank.speciesGroup" | "taxonomy.rank.speciesSubgroup" | "taxonomy.rank.species" | "taxonomy.rank.formaSpecialis" | "taxonomy.rank.subspecies" | "taxonomy.rank.varietas" | "taxonomy.rank.subvariety" | "taxonomy.rank.forma" | "taxonomy.rank.pathogroup" | "taxonomy.rank.serogroup" | "taxonomy.rank.serotype" | "taxonomy.rank.biotype" | "taxonomy.rank.genotype" | "taxonomy.rank.morph" | "taxonomy.rank.strain" | "taxonomy.rank.isolate" | "taxonomy.rank.noRank" | "taxonomy.rank.clade" | "taxonomy.rank.cellularRoot" | "taxonomy.rank.acellularRoot">;
|
|
20
|
+
export declare const CHROME_CATALOG: MessageCatalog<"language.label" | "chrome.pages" | "chrome.about" | "chrome.aboutTitle" | "account.signIn" | "account.signOut" | "account.signedInAs" | "ecosystem.tools" | "ecosystem.menuHeading" | "ecosystem.otherTools" | "ecosystem.youAreHere" | "ecosystem.group.basics.label" | "ecosystem.group.basics.blurb" | "ecosystem.group.practice.label" | "ecosystem.group.practice.blurb" | "ecosystem.group.structures.label" | "ecosystem.group.structures.blurb" | "ecosystem.group.spectra.label" | "ecosystem.group.spectra.blurb" | "ecosystem.group.research.label" | "ecosystem.group.research.blurb" | "ecosystem.group.computing.label" | "ecosystem.group.computing.blurb" | "site.learn.tagline" | "site.inchi.tagline" | "site.vcl.tagline" | "site.smiles.tagline" | "site.openbabel.tagline" | "site.chemcalc.tagline" | "site.dbe.tagline" | "site.nmrium.tagline" | "site.metabo.tagline" | "site.derepflow.tagline" | "site.surge.tagline" | "site.tex.tagline" | "site.lcao.tagline" | "site.regexp.tagline" | "site.pdb.tagline" | "site.elucidation.tagline" | "site.equilibrium.tagline" | "site.polycarp.tagline" | "site.3d.tagline" | "site.periodic-table.tagline" | "site.database.tagline" | "site.symmetry.tagline" | "site.osiris.tagline" | "site.atoms.tagline" | "site.moles.tagline" | "site.inorganic.tagline" | "share.button" | "share.buttonTitle" | "share.dialogTitleFor" | "share.layout" | "share.embed" | "share.embedHint" | "share.protect" | "share.protectHint" | "share.on" | "share.off" | "share.showOnPage" | "share.custom" | "share.options" | "share.preview" | "share.device.window" | "share.device.mobile" | "share.device.laptop" | "share.device.hd" | "share.deviceSize" | "share.previewWhat" | "share.previewLive" | "share.copyLink" | "share.copyLinkHelpTitle" | "share.copyLinkHelp" | "share.openInNewTab" | "share.openInNewTabHelpTitle" | "share.openInNewTabHelp" | "share.copyIframe" | "share.copyIframeHelpTitle" | "share.copyIframeHelp" | "seal.refusedTitle" | "seal.refusedBody" | "seal.openWithout" | "cite.button" | "cite.copyReferenceAs" | "cite.pleaseCiteBoth" | "cite.pleaseCiteEvery" | "cite.copyBothAs" | "cite.copyEveryAs" | "cite.importIntoManager" | "cite.openArticle" | "cite.copyThisAs" | "cite.importThis" | "cite.copied" | "cite.copyFailed" | "cite.format.doi" | "cite.download.ris" | "cite.download.bibtex" | "clipboard.copied" | "clipboard.failed" | "clipboard.copy" | "clipboard.copyThe" | "clipboard.copyValue" | "clipboard.copyToClipboard" | "about.providedBy" | "about.whatYouCanDo" | "about.builtOn" | "about.howToCite" | "about.citeWork" | "about.built" | "about.builtFromCommit" | "about.nameList" | "credits.openbabel.description" | "credits.openchemlib.description" | "credits.openchemlib-utils.description" | "credits.osiris-property-explorer.description" | "credits.react-ocl.description" | "credits.react-mf.description" | "credits.mass-tools.description" | "credits.chem-equilibrium.description" | "credits.ml-matrix.description" | "credits.ml-xsadd.description" | "credits.cif-to-json.description" | "credits.ml-spectra-processing.description" | "credits.occ.description" | "credits.xtb-wasm.description" | "credits.molstar.description" | "credits.blueprint.description" | "credits.react-science.description" | "credits.react-cheminfo.description" | "credits.cheminfo-font.description" | "credits.nivo.description" | "credits.mathjax.description" | "credits.lexical.description" | "credits.katex.description" | "credits.dnd-kit.description" | "credits.react-roi.description" | "credits.file-collection.description" | "credits.zip-js.description" | "credits.preact-signals.description" | "credits.fastify.description" | "credits.sqlite.description" | "credits.sqlite-wasm.description" | "credits.pouchdb.description" | "credits.chemexper.description" | "credits.react.description" | "credits.vite.description" | "help.label" | "help.learnMore" | "help.on" | "confirm.delete" | "confirm.cancel" | "error.title" | "error.tryAgain" | "error.noMessage" | "capsule.filter" | "color.scales" | "color.done" | "color.custom" | "color.customEllipsis" | "color.inUse" | "color.uniform" | "color.uniformDescription" | "color.uniformColour" | "color.colourScale" | "color.legendLabel" | "color.scaleBeingEdited" | "color.anchorColour" | "color.anchorPosition" | "color.removeAnchor" | "color.editorHint" | "color.saturation" | "color.brightness" | "color.toneHelp" | "color.path" | "color.interpolation.rgb" | "color.interpolation.hsv" | "color.interpolation.hsv-long" | "color.kind.sequential" | "color.kind.diverging" | "color.kind.cyclic" | "color.scale.viridis.label" | "color.scale.viridis.description" | "color.scale.plasma.label" | "color.scale.plasma.description" | "color.scale.magma.label" | "color.scale.magma.description" | "color.scale.inferno.label" | "color.scale.inferno.description" | "color.scale.cividis.label" | "color.scale.cividis.description" | "color.scale.turbo.label" | "color.scale.turbo.description" | "color.scale.greys.label" | "color.scale.greys.description" | "color.scale.cool-warm.label" | "color.scale.cool-warm.description" | "color.scale.blue-red.label" | "color.scale.blue-red.description" | "color.scale.rainbow.label" | "color.scale.rainbow.description" | "download.save" | "download.saveFigure" | "download.saveThisFigure" | "download.format" | "download.formatHelp" | "download.resolution" | "download.resolutionHelp" | "download.resolutionExample" | "download.noFigure" | "download.hintRasterSvg" | "download.hintSvg" | "download.hintPng" | "download.hintCopied" | "download.copyUnsupported" | "download.size" | "download.sizeHelp" | "download.sizeScreen" | "download.sizeColumn" | "download.sizeCustom" | "download.customSize" | "download.width" | "download.height" | "pedagogy.check" | "pedagogy.revealHint" | "pedagogy.revealHintCount" | "pedagogy.revealHintLadder" | "pedagogy.hideSolution" | "pedagogy.revealSolution" | "pedagogy.reset" | "pedagogy.hints" | "pedagogy.solvedCount" | "pedagogy.clearAll" | "pedagogy.keepAnswers" | "pedagogy.clearEverything" | "pedagogy.clearWarning" | "pedagogy.filterTerms" | "pedagogy.noTermDefined" | "pedagogy.noTermMatches" | "pedagogy.example" | "pedagogy.input" | "pedagogy.previous" | "pedagogy.next" | "pedagogy.stepOf" | "slides.exit" | "slides.previousSlide" | "slides.nextSlide" | "slides.toggleFullscreen" | "slides.backToSlides" | "slides.backToSlide" | "slides.noAddress" | "slides.liveDemos" | "slides.noTalkYet" | "overlay.options" | "overlay.whatAmILookingAt" | "overlay.reset" | "overlay.hoverAName" | "overlay.dismiss" | "axis.scale" | "axis.xScale" | "axis.yScale" | "axis.linear" | "axis.logarithmic" | "axis.scaleHelp" | "delimited.copyTable" | "delimited.copyOrDownload" | "delimited.close" | "delimited.separator" | "delimited.save" | "delimited.copy" | "delimited.tableAsText" | "chart.measurement" | "chart.measurements" | "delimited.descriptionOne" | "delimited.descriptionMany" | "structure.guide.atom.title" | "structure.guide.atom.element" | "structure.guide.atom.group" | "structure.guide.atom.applyOrForget" | "structure.guide.atom.chain" | "structure.guide.atom.charge" | "structure.guide.atom.radical" | "structure.guide.atom.spin" | "structure.guide.atom.attachment" | "structure.guide.atom.query" | "structure.guide.atom.halogen" | "structure.guide.atom.delete" | "structure.guide.atom.note" | "structure.guide.bond.title" | "structure.guide.bond.order" | "structure.guide.bond.zeroOrder" | "structure.guide.bond.stereo" | "structure.guide.bond.unknownGeometry" | "structure.guide.bond.threeRing" | "structure.guide.bond.ring" | "structure.guide.bond.benzene" | "structure.guide.bond.query" | "structure.guide.bond.delete" | "structure.guide.anywhere.title" | "structure.guide.anywhere.undo" | "structure.guide.anywhere.copy" | "structure.guide.anywhere.paste" | "structure.guide.anywhere.deleteSelection" | "structure.guide.anywhere.flip" | "structure.guide.anywhere.help" | "structure.guide.anywhere.note" | "structure.guide.selecting.title" | "structure.guide.selecting.lasso" | "structure.guide.selecting.rectangle" | "structure.guide.selecting.add" | "structure.guide.selecting.move" | "structure.guide.selecting.duplicate" | "structure.guide.selecting.queryFeatures" | "structure.guide.selecting.note" | "structure.guide.stereochemistry.title" | "structure.guide.stereochemistry.note" | "structure.input.type" | "structure.input.or" | "structure.input.drag" | "structure.input.plusDrag" | "structure.input.dragSelection" | "structure.input.plusDragSelection" | "structure.input.doubleClick" | "structure.docs.toolsAndKeys" | "structure.docs.atomProperties" | "structure.docs.stereochemistry" | "structure.help.hoverToolbar" | "structure.help.learnMore" | "structure.mouseAndKeyboard" | "structure.tool.clear.name" | "structure.tool.clear.description" | "structure.tool.cleanUp.name" | "structure.tool.cleanUp.description" | "structure.tool.select.name" | "structure.tool.select.description" | "structure.tool.unknownConfiguration.name" | "structure.tool.unknownConfiguration.description" | "structure.tool.delete.name" | "structure.tool.delete.description" | "structure.tool.singleBond.name" | "structure.tool.singleBond.description" | "structure.tool.upBond.name" | "structure.tool.upBond.description" | "structure.tool.positiveCharge.name" | "structure.tool.positiveCharge.description" | "structure.tool.undo.name" | "structure.tool.undo.description" | "structure.tool.zoomAndRotate.name" | "structure.tool.zoomAndRotate.description" | "structure.tool.atomMapping.name" | "structure.tool.atomMapping.description" | "structure.tool.enhancedStereo.name" | "structure.tool.enhancedStereo.description" | "structure.tool.text.name" | "structure.tool.text.description" | "structure.tool.chain.name" | "structure.tool.chain.description" | "structure.tool.downBond.name" | "structure.tool.downBond.description" | "structure.tool.negativeCharge.name" | "structure.tool.negativeCharge.description" | "structure.tool.anyAtom.name" | "structure.tool.anyAtom.description" | "structure.tool.ring3.name" | "structure.tool.ring3.description" | "structure.tool.ring5.name" | "structure.tool.ring5.description" | "structure.tool.ring7.name" | "structure.tool.ring7.description" | "structure.tool.ring4.name" | "structure.tool.ring4.description" | "structure.tool.ring6.name" | "structure.tool.ring6.description" | "structure.tool.benzene.name" | "structure.tool.benzene.description" | "structure.tool.carbon.name" | "structure.tool.carbon.description" | "structure.tool.nitrogen.name" | "structure.tool.nitrogen.description" | "structure.tool.oxygen.name" | "structure.tool.oxygen.description" | "structure.tool.fluorine.name" | "structure.tool.fluorine.description" | "structure.tool.bromine.name" | "structure.tool.bromine.description" | "structure.tool.hydrogen.name" | "structure.tool.hydrogen.description" | "structure.tool.silicon.name" | "structure.tool.silicon.description" | "structure.tool.phosphorus.name" | "structure.tool.phosphorus.description" | "structure.tool.sulfur.name" | "structure.tool.sulfur.description" | "structure.tool.chlorine.name" | "structure.tool.chlorine.description" | "structure.tool.iodine.name" | "structure.tool.iodine.description" | "structure.tool.reactionOnly" | "structure.tool.unavailable" | "structure.loadingEditor" | "structure.export.open" | "structure.export.title" | "structure.export.loading" | "structure.export.nothing" | "structure.export.picture" | "structure.export.identifiers" | "structure.export.saveSvg" | "structure.export.savePng" | "structure.export.copyPng" | "structure.export.smiles" | "structure.export.smilesHelp" | "structure.export.molfileV3000" | "structure.export.molfileV3000Help" | "structure.export.molfileV2000" | "structure.export.molfileV2000Help" | "structure.export.idCode" | "structure.export.idCodeHelp" | "structure.export.noStereoIdCode" | "structure.export.noStereoIdCodeHelp" | "structure.export.noStereoTautomerIdCode" | "structure.export.noStereoTautomerIdCodeHelp" | "periodic.table" | "periodic.group" | "periodic.period" | "periodic.block" | "periodic.allElements" | "periodic.help.title" | "periodic.help.click" | "periodic.help.modClick" | "periodic.help.element" | "periodic.help.elementClick" | "periodic.help.elementMod" | "periodic.help.number" | "periodic.help.numberClick" | "periodic.help.runMod" | "periodic.help.block" | "periodic.help.blockClick" | "periodic.help.corner" | "periodic.help.cornerClick" | "periodic.help.arrowsClick" | "periodic.help.note" | "periodic.help.ctrl" | "periodic.cellLabel" | "periodic.category.alkali-metal" | "periodic.category.alkaline-earth-metal" | "periodic.category.transition-metal" | "periodic.category.post-transition-metal" | "periodic.category.metalloid" | "periodic.category.nonmetal" | "periodic.category.halogen" | "periodic.category.noble-gas" | "periodic.category.lanthanoid" | "periodic.category.actinoid" | "molecule3d.view" | "molecule3d.resetView" | "molecule3d.spin" | "molecule3d.surface" | "molecule3d.molecularSurface" | "molecule3d.displayOptions" | "molecule3d.exportImage" | "molecule3d.measure" | "molecule3d.clearMeasurements" | "molecule3d.measurement.distance" | "molecule3d.measurement.angle" | "molecule3d.measurement.dihedral" | "molecule3d.measurementTooltip" | "molecule3d.representation.ball-and-stick" | "molecule3d.representation.spacefill" | "molecule3d.representation.stick" | "molecule3d.size" | "molecule3d.surfaceOpacity" | "molecule3d.solventProbe" | "molecule3d.solventProbeHelp" | "molecule3d.surfaceColour" | "molecule3d.colour" | "molecule3d.resetSettings" | "molecule3d.atDefaults" | "molecule3d.surfaceOff" | "molecule3d.showSurface" | "molecule3d.coloring.uniform" | "molecule3d.coloring.element" | "molecule3d.coloring.polarity" | "molecule3d.neutral" | "molecule3d.tpsaHelp" | "molecule3d.loadingViewer" | "molecule3d.couldNotDraw" | "molecule3d.gesture.rotate" | "molecule3d.gesture.rollDrag" | "molecule3d.gesture.rollKeys" | "molecule3d.gesture.moveDrag" | "molecule3d.gesture.moveCtrl" | "molecule3d.gesture.zoom" | "molecule3d.gesture.clip" | "molecule3d.gesture.centreAtom" | "molecule3d.gesture.centreMolecule" | "molecule3d.input.drag" | "molecule3d.input.plus" | "molecule3d.input.plusDrag" | "molecule3d.input.plusScroll" | "molecule3d.input.or" | "molecule3d.input.rightDrag" | "molecule3d.input.scroll" | "molecule3d.input.clickAtom" | "molecule3d.input.clickBackground" | "molecule3d.helpNote" | "orbital.couldNotDraw" | "orbital.sampling" | "orbital.showAxes" | "orbital.axesTitle" | "orbital.axesBody" | "orbital.axesExample" | "orbital.spin" | "orbital.spinTitle" | "orbital.spinBody" | "orbital.resetTitle" | "orbital.resetBody" | "viewer.capability.noWindow" | "viewer.capability.noContext" | "viewer.capability.noFloatTextures" | "viewer.capability.ready" | "conformers.strategy.adaptive-random" | "conformers.strategy.likely-random" | "conformers.strategy.pure-random" | "conformers.strategy.likely-systematic" | "conformers.strategyDetail.adaptive-random" | "conformers.strategyDetail.likely-random" | "conformers.strategyDetail.pure-random" | "conformers.strategyDetail.likely-systematic" | "conformers.minimisation.none" | "number.increment" | "number.decrement" | "range.lowest" | "range.highest" | "range.lowestIs" | "range.highestIs" | "range.noLowerBound" | "range.noUpperBound" | "range.typeValue" | "range.clear" | "taxonomy.lineage" | "taxonomy.rankNote" | "taxonomy.ncbi" | "taxonomy.ncbiTitle" | "taxonomy.rank.realm" | "taxonomy.rank.domain" | "taxonomy.rank.superkingdom" | "taxonomy.rank.kingdom" | "taxonomy.rank.subkingdom" | "taxonomy.rank.superphylum" | "taxonomy.rank.phylum" | "taxonomy.rank.subphylum" | "taxonomy.rank.superclass" | "taxonomy.rank.class" | "taxonomy.rank.subclass" | "taxonomy.rank.infraclass" | "taxonomy.rank.cohort" | "taxonomy.rank.subcohort" | "taxonomy.rank.superorder" | "taxonomy.rank.order" | "taxonomy.rank.suborder" | "taxonomy.rank.infraorder" | "taxonomy.rank.parvorder" | "taxonomy.rank.superfamily" | "taxonomy.rank.family" | "taxonomy.rank.subfamily" | "taxonomy.rank.tribe" | "taxonomy.rank.subtribe" | "taxonomy.rank.genus" | "taxonomy.rank.subgenus" | "taxonomy.rank.section" | "taxonomy.rank.subsection" | "taxonomy.rank.series" | "taxonomy.rank.subseries" | "taxonomy.rank.speciesGroup" | "taxonomy.rank.speciesSubgroup" | "taxonomy.rank.species" | "taxonomy.rank.formaSpecialis" | "taxonomy.rank.subspecies" | "taxonomy.rank.varietas" | "taxonomy.rank.subvariety" | "taxonomy.rank.forma" | "taxonomy.rank.pathogroup" | "taxonomy.rank.serogroup" | "taxonomy.rank.serotype" | "taxonomy.rank.biotype" | "taxonomy.rank.genotype" | "taxonomy.rank.morph" | "taxonomy.rank.strain" | "taxonomy.rank.isolate" | "taxonomy.rank.noRank" | "taxonomy.rank.clade" | "taxonomy.rank.cellularRoot" | "taxonomy.rank.acellularRoot">;
|
|
21
21
|
//# sourceMappingURL=chromeCatalog.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chromeCatalog.d.ts","sourceRoot":"","sources":["../../../src/i18n/core/chromeCatalog.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,MAAM,uBAAuB,CAAuB;AAE7D,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAErD,2DAA2D;AAC3D,eAAO,MAAM,iBAAiB,mBAAmB,CAAC;AAElD,qCAAqC;AACrC,MAAM,MAAM,SAAS,GAAG,MAAM,OAAO,EAAE,CAAC;AAExC;;;;GAIG;AACH,eAAO,MAAM,cAAc,
|
|
1
|
+
{"version":3,"file":"chromeCatalog.d.ts","sourceRoot":"","sources":["../../../src/i18n/core/chromeCatalog.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,MAAM,uBAAuB,CAAuB;AAE7D,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAErD,2DAA2D;AAC3D,eAAO,MAAM,iBAAiB,mBAAmB,CAAC;AAElD,qCAAqC;AACrC,MAAM,MAAM,SAAS,GAAG,MAAM,OAAO,EAAE,CAAC;AAExC;;;;GAIG;AACH,eAAO,MAAM,cAAc,66gBAgBzB,CAAC"}
|
package/lib/i18n/core/index.d.ts
CHANGED
|
@@ -5,6 +5,8 @@ export { DEFAULT_LANGUAGE, LANGUAGES, LANGUAGE_LABELS, isLanguage, } from './lan
|
|
|
5
5
|
export type { LooseKey, MessageCatalogOptions, MessagesLoader, TranslateOptions, } from './messageCatalog.ts';
|
|
6
6
|
export { MessageCatalog } from './messageCatalog.ts';
|
|
7
7
|
export type { MessageValues } from './messageValues.ts';
|
|
8
|
+
export type { Translate } from './translate.ts';
|
|
9
|
+
export { catalogTranslate } from './translate.ts';
|
|
8
10
|
export type { ProsePiece } from './prose.ts';
|
|
9
11
|
export { splitProse } from './prose.ts';
|
|
10
12
|
export type { MessageSession } from './session.ts';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/i18n/core/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AACvE,YAAY,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAC/C,OAAO,EACL,gBAAgB,EAChB,SAAS,EACT,eAAe,EACf,UAAU,GACX,MAAM,gBAAgB,CAAC;AACxB,YAAY,EACV,QAAQ,EACR,qBAAqB,EACrB,cAAc,EACd,gBAAgB,GACjB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrD,YAAY,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACxD,YAAY,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAC7C,OAAO,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AACxC,YAAY,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AACnD,OAAO,EACL,cAAc,EACd,eAAe,EACf,iBAAiB,EACjB,mBAAmB,GACpB,MAAM,cAAc,CAAC;AACtB,YAAY,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAC1D,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/i18n/core/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AACvE,YAAY,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAC/C,OAAO,EACL,gBAAgB,EAChB,SAAS,EACT,eAAe,EACf,UAAU,GACX,MAAM,gBAAgB,CAAC;AACxB,YAAY,EACV,QAAQ,EACR,qBAAqB,EACrB,cAAc,EACd,gBAAgB,GACjB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrD,YAAY,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACxD,YAAY,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAChD,OAAO,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAClD,YAAY,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAC7C,OAAO,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AACxC,YAAY,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AACnD,OAAO,EACL,cAAc,EACd,eAAe,EACf,iBAAiB,EACjB,mBAAmB,GACpB,MAAM,cAAc,CAAC;AACtB,YAAY,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAC1D,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC"}
|
package/lib/i18n/core/index.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export { CHROME_CATALOG, CHROME_CATALOG_ID } from "./chromeCatalog.js";
|
|
2
2
|
export { DEFAULT_LANGUAGE, LANGUAGES, LANGUAGE_LABELS, isLanguage, } from "./languages.js";
|
|
3
3
|
export { MessageCatalog } from "./messageCatalog.js";
|
|
4
|
+
export { catalogTranslate } from "./translate.js";
|
|
4
5
|
export { splitProse } from "./prose.js";
|
|
5
6
|
export { messageSession, messagesVersion, setMessageSession, subscribeToMessages, } from "./session.js";
|
|
6
7
|
export { loadCatalogs } from "./translateSetup.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/i18n/core/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAEvE,OAAO,EACL,gBAAgB,EAChB,SAAS,EACT,eAAe,EACf,UAAU,GACX,MAAM,gBAAgB,CAAC;AAOxB,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAGrD,OAAO,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAExC,OAAO,EACL,cAAc,EACd,eAAe,EACf,iBAAiB,EACjB,mBAAmB,GACpB,MAAM,cAAc,CAAC;AAEtB,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/i18n/core/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAEvE,OAAO,EACL,gBAAgB,EAChB,SAAS,EACT,eAAe,EACf,UAAU,GACX,MAAM,gBAAgB,CAAC;AAOxB,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAGrD,OAAO,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAElD,OAAO,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAExC,OAAO,EACL,cAAc,EACd,eAAe,EACf,iBAAiB,EACjB,mBAAmB,GACpB,MAAM,cAAc,CAAC;AAEtB,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC"}
|
|
@@ -90,6 +90,16 @@ export declare class MessageCatalog<TKey extends string = string> {
|
|
|
90
90
|
* @returns The text.
|
|
91
91
|
*/
|
|
92
92
|
translate(key: LooseKey<TKey>, language: Language, options?: TranslateOptions): string;
|
|
93
|
+
/**
|
|
94
|
+
* Whether the catalog declares a key at all.
|
|
95
|
+
*
|
|
96
|
+
* English is the list of keys, so this is what a loop walking a numbered
|
|
97
|
+
* family of messages — `how.limits.p1`, `p2`, … — stops on, and what tells a
|
|
98
|
+
* page a section was never written from one left untranslated.
|
|
99
|
+
* @param key - Key to look for.
|
|
100
|
+
* @returns True when English carries it.
|
|
101
|
+
*/
|
|
102
|
+
declares(key: string): boolean;
|
|
93
103
|
/**
|
|
94
104
|
* The messages of a language, once they are in memory.
|
|
95
105
|
* @param language - Language asked for.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"messageCatalog.d.ts","sourceRoot":"","sources":["../../../src/i18n/core/messageCatalog.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,iCAAiC,CAAC;AAG/E,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAE/C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAGxD,iFAAiF;AACjF,MAAM,MAAM,cAAc,GAAG,MAAM,OAAO,CAAC;IAAE,OAAO,EAAE,QAAQ,CAAA;CAAE,CAAC,CAAC;AAElE;;;;;;GAMG;AACH,MAAM,MAAM,QAAQ,CAAC,IAAI,SAAS,MAAM,IACtC,IAAI,GAAG,CAAC,MAAM,GAAG,MAAM,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC;AAEzC,uEAAuE;AACvE,MAAM,WAAW,gBAAgB;IAC/B;;;OAGG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;;OAGG;IACH,MAAM,CAAC,EAAE,aAAa,CAAC;CACxB;AAED,iCAAiC;AACjC,MAAM,WAAW,qBAAqB,CAAC,IAAI,SAAS,MAAM;IACxD;;;OAGG;IACH,EAAE,EAAE,MAAM,CAAC;IACX,qEAAqE;IACrE,UAAU,EAAE,MAAM,CAAC;IACnB;;;OAGG;IACH,SAAS,EAAE,MAAM,CAAC;IAClB,qEAAqE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IG;IACI,QAAQ,CAAC,QAAQ,EAAE,QAAQ,GAAG,QAAQ;IAI7C;;;;OAIG;IACU,IAAI,CAAC,QAAQ,EAAE,QAAQ,GAAG,OAAO,CAAC,QAAQ,CAAC;IAyBxD;;;;;OAKG;IACI,QAAQ,CAAC,QAAQ,EAAE,QAAQ,GAAG,IAAI;CAI1C"}
|
|
@@ -77,6 +77,18 @@ export class MessageCatalog {
|
|
|
77
77
|
fallback;
|
|
78
78
|
return fill(message, values);
|
|
79
79
|
}
|
|
80
|
+
/**
|
|
81
|
+
* Whether the catalog declares a key at all.
|
|
82
|
+
*
|
|
83
|
+
* English is the list of keys, so this is what a loop walking a numbered
|
|
84
|
+
* family of messages — `how.limits.p1`, `p2`, … — stops on, and what tells a
|
|
85
|
+
* page a section was never written from one left untranslated.
|
|
86
|
+
* @param key - Key to look for.
|
|
87
|
+
* @returns True when English carries it.
|
|
88
|
+
*/
|
|
89
|
+
declares(key) {
|
|
90
|
+
return ownMessage(this.source.messages, key) !== undefined;
|
|
91
|
+
}
|
|
80
92
|
/**
|
|
81
93
|
* The messages of a language, once they are in memory.
|
|
82
94
|
* @param language - Language asked for.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"messageCatalog.js","sourceRoot":"","sources":["../../../src/i18n/core/messageCatalog.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAGH,OAAO,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAC;AAG7D,OAAO,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAElD,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAqD9D;;;GAGG;AACH,MAAM,OAAO,cAAc;IACzB,+CAA+C;IAC/B,EAAE,CAAS;IAC3B,yEAAyE;IACzD,MAAM,CAAgB;IAE7B,OAAO,GAAG,IAAI,GAAG,EAAsB,CAAC;IACxC,QAAQ,GAAG,IAAI,GAAG,EAA4B,CAAC;IAC/C,QAAQ,GA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IACI,QAAQ,CAAC,QAAkB;QAChC,IAAI,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,IAAI,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,QAAQ,CAAC;YAAE,OAAO;QACtE,KAAK,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;IAC3B,CAAC;CACF;AAED,MAAM,WAAW,GAAG,mBAAmB,CAAC;AAExC,SAAS,IAAI,CAAC,OAAe,EAAE,MAAiC;IAC9D,IAAI,MAAM,KAAK,SAAS;QAAE,OAAO,OAAO,CAAC;IACzC,OAAO,OAAO,CAAC,UAAU,CAAC,WAAW,EAAE,CAAC,KAAK,EAAE,IAAY,EAAE,EAAE,CAC7D,MAAM,CAAC,MAAM,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,CAC3D,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The formatter a catalog's text is read through, outside React.
|
|
3
|
+
*
|
|
4
|
+
* `useT` is this function with the page's language and a redraw wired to it;
|
|
5
|
+
* the build and a site's own tests need the same shape without either, so it
|
|
6
|
+
* lives here rather than in the hook. A site never writes its own: four of
|
|
7
|
+
* them had, each with a slightly different fallback.
|
|
8
|
+
*/
|
|
9
|
+
import type { Language } from './languages.ts';
|
|
10
|
+
import type { LooseKey, MessageCatalog } from './messageCatalog.ts';
|
|
11
|
+
import type { MessageValues } from './messageValues.ts';
|
|
12
|
+
/**
|
|
13
|
+
* What text is read with.
|
|
14
|
+
*
|
|
15
|
+
* `t(key)` is a key the catalog declares, checked at compile time.
|
|
16
|
+
* `t.or(key, fallback)` is a key built from the data — a site's id, an
|
|
17
|
+
* element's symbol — which the catalog may not have caught up with yet; it
|
|
18
|
+
* reads as the fallback rather than as a raw key.
|
|
19
|
+
*/
|
|
20
|
+
export type Translate<TKey extends string> = ((key: LooseKey<TKey>, values?: MessageValues) => string) & {
|
|
21
|
+
or: (key: string, fallback: string, values?: MessageValues) => string;
|
|
22
|
+
};
|
|
23
|
+
/**
|
|
24
|
+
* A catalog's formatter, in one language.
|
|
25
|
+
*
|
|
26
|
+
* In a component this is `useT`, which also redraws when the language or a
|
|
27
|
+
* translator's edit changes it. Here it is for the places a hook cannot go:
|
|
28
|
+
* the build writing a head per address per language, a test asserting on the
|
|
29
|
+
* text a page shows, a label computed in a module helper.
|
|
30
|
+
* @param catalog - The catalog to read, typed by its English keys.
|
|
31
|
+
* @param language - The language to read it in.
|
|
32
|
+
* @returns See {@link Translate}.
|
|
33
|
+
*/
|
|
34
|
+
export declare function catalogTranslate<TKey extends string>(catalog: MessageCatalog<TKey>, language: Language): Translate<TKey>;
|
|
35
|
+
//# sourceMappingURL=translate.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"translate.d.ts","sourceRoot":"","sources":["../../../src/i18n/core/translate.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAC/C,OAAO,KAAK,EAAE,QAAQ,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACpE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAExD;;;;;;;GAOG;AACH,MAAM,MAAM,SAAS,CAAC,IAAI,SAAS,MAAM,IAAI,CAAC,CAC5C,GAAG,EAAE,QAAQ,CAAC,IAAI,CAAC,EACnB,MAAM,CAAC,EAAE,aAAa,KACnB,MAAM,CAAC,GAAG;IACb,EAAE,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,aAAa,KAAK,MAAM,CAAC;CACvE,CAAC;AAEF;;;;;;;;;;GAUG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,SAAS,MAAM,EAClD,OAAO,EAAE,cAAc,CAAC,IAAI,CAAC,EAC7B,QAAQ,EAAE,QAAQ,GACjB,SAAS,CAAC,IAAI,CAAC,CAQjB"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The formatter a catalog's text is read through, outside React.
|
|
3
|
+
*
|
|
4
|
+
* `useT` is this function with the page's language and a redraw wired to it;
|
|
5
|
+
* the build and a site's own tests need the same shape without either, so it
|
|
6
|
+
* lives here rather than in the hook. A site never writes its own: four of
|
|
7
|
+
* them had, each with a slightly different fallback.
|
|
8
|
+
*/
|
|
9
|
+
/**
|
|
10
|
+
* A catalog's formatter, in one language.
|
|
11
|
+
*
|
|
12
|
+
* In a component this is `useT`, which also redraws when the language or a
|
|
13
|
+
* translator's edit changes it. Here it is for the places a hook cannot go:
|
|
14
|
+
* the build writing a head per address per language, a test asserting on the
|
|
15
|
+
* text a page shows, a label computed in a module helper.
|
|
16
|
+
* @param catalog - The catalog to read, typed by its English keys.
|
|
17
|
+
* @param language - The language to read it in.
|
|
18
|
+
* @returns See {@link Translate}.
|
|
19
|
+
*/
|
|
20
|
+
export function catalogTranslate(catalog, language) {
|
|
21
|
+
// `or` is a property of the function itself, so the two are built together
|
|
22
|
+
// rather than assigned onto a value a render may already have read.
|
|
23
|
+
const translate = (key, values) => catalog.translate(key, language, { values });
|
|
24
|
+
translate.or = (key, fallback, values) => catalog.translate(key, language, { fallback, values });
|
|
25
|
+
return translate;
|
|
26
|
+
}
|
|
27
|
+
//# sourceMappingURL=translate.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"translate.js","sourceRoot":"","sources":["../../../src/i18n/core/translate.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAqBH;;;;;;;;;;GAUG;AACH,MAAM,UAAU,gBAAgB,CAC9B,OAA6B,EAC7B,QAAkB;IAElB,2EAA2E;IAC3E,oEAAoE;IACpE,MAAM,SAAS,GAAG,CAAC,GAAmB,EAAE,MAAsB,EAAE,EAAE,CAChE,OAAO,CAAC,SAAS,CAAC,GAAG,EAAE,QAAQ,EAAE,EAAE,MAAM,EAAE,CAAC,CAAC;IAC/C,SAAS,CAAC,EAAE,GAAG,CAAC,GAAW,EAAE,QAAgB,EAAE,MAAsB,EAAE,EAAE,CACvE,OAAO,CAAC,SAAS,CAAC,GAAG,EAAE,QAAQ,EAAE,EAAE,QAAQ,EAAE,MAAM,EAAE,CAAC,CAAC;IACzD,OAAO,SAAS,CAAC;AACnB,CAAC"}
|
package/lib/i18n/ui/useT.d.ts
CHANGED
|
@@ -1,17 +1,7 @@
|
|
|
1
1
|
import type { ChromeKey } from '../core/chromeCatalog.ts';
|
|
2
|
-
import type { Language, LooseKey,
|
|
2
|
+
import type { Language, LooseKey, Translate, TranslateOptions } from '../core/index.ts';
|
|
3
3
|
import type { MessageCatalog } from '../core/messageCatalog.ts';
|
|
4
|
-
|
|
5
|
-
* What a component reads its text with.
|
|
6
|
-
*
|
|
7
|
-
* `t(key)` is a key the catalog declares, checked at compile time.
|
|
8
|
-
* `t.or(key, fallback)` is a key built from the data — a site's id, an
|
|
9
|
-
* element's symbol — which the catalog may not have caught up with yet; it
|
|
10
|
-
* reads as the fallback rather than as a raw key.
|
|
11
|
-
*/
|
|
12
|
-
export type Translate<TKey extends string> = ((key: LooseKey<TKey>, values?: MessageValues) => string) & {
|
|
13
|
-
or: (key: string, fallback: string, values?: MessageValues) => string;
|
|
14
|
-
};
|
|
4
|
+
export type { Translate } from '../core/index.ts';
|
|
15
5
|
/**
|
|
16
6
|
* The formatter of a catalog's text, in the language the page is written in.
|
|
17
7
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useT.d.ts","sourceRoot":"","sources":["../../../src/i18n/ui/useT.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AAE1D,OAAO,KAAK,EACV,QAAQ,EACR,QAAQ,EACR,
|
|
1
|
+
{"version":3,"file":"useT.d.ts","sourceRoot":"","sources":["../../../src/i18n/ui/useT.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AAE1D,OAAO,KAAK,EACV,QAAQ,EACR,QAAQ,EACR,SAAS,EACT,gBAAgB,EACjB,MAAM,kBAAkB,CAAC;AAE1B,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAMhE,YAAY,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAElD;;;;;;;;GAQG;AACH,wBAAgB,IAAI,CAAC,IAAI,SAAS,MAAM,EACtC,OAAO,EAAE,cAAc,CAAC,IAAI,CAAC,GAC5B,SAAS,CAAC,IAAI,CAAC,CAKjB;AAED;;;;;;;GAOG;AACH,wBAAgB,UAAU,IAAI,SAAS,CAAC,SAAS,CAAC,CAEjD;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,SAAS,MAAM,EAClD,OAAO,EAAE,cAAc,CAAC,IAAI,CAAC,EAC7B,GAAG,EAAE,QAAQ,CAAC,IAAI,CAAC,EACnB,QAAQ,EAAE,QAAQ,EAClB,OAAO,CAAC,EAAE,gBAAgB,GACzB,MAAM,CAER"}
|
package/lib/i18n/ui/useT.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { CHROME_CATALOG } from "../core/chromeCatalog.js";
|
|
2
|
+
import { catalogTranslate } from "../core/index.js";
|
|
2
3
|
import { useLanguage, useMessagesVersion } from "./useLanguage.js";
|
|
3
4
|
/**
|
|
4
5
|
* The formatter of a catalog's text, in the language the page is written in.
|
|
@@ -13,14 +14,7 @@ export function useT(catalog) {
|
|
|
13
14
|
const language = useLanguage();
|
|
14
15
|
useMessagesVersion();
|
|
15
16
|
catalog.prefetch(language);
|
|
16
|
-
return
|
|
17
|
-
}
|
|
18
|
-
// Built outside the hook, because the `or` form is a property of the function
|
|
19
|
-
// itself and a render may not write to a value it has just read.
|
|
20
|
-
function translator(catalog, language) {
|
|
21
|
-
const translate = (key, values) => catalog.translate(key, language, { values });
|
|
22
|
-
translate.or = (key, fallback, values) => catalog.translate(key, language, { fallback, values });
|
|
23
|
-
return translate;
|
|
17
|
+
return catalogTranslate(catalog, language);
|
|
24
18
|
}
|
|
25
19
|
/**
|
|
26
20
|
* The formatter of this library's own text — the header, the Tools menu, the
|
package/lib/i18n/ui/useT.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useT.js","sourceRoot":"","sources":["../../../src/i18n/ui/useT.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;
|
|
1
|
+
{"version":3,"file":"useT.js","sourceRoot":"","sources":["../../../src/i18n/ui/useT.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAO1D,OAAO,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AAGpD,OAAO,EAAE,WAAW,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAMnE;;;;;;;;GAQG;AACH,MAAM,UAAU,IAAI,CAClB,OAA6B;IAE7B,MAAM,QAAQ,GAAG,WAAW,EAAE,CAAC;IAC/B,kBAAkB,EAAE,CAAC;IACrB,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;IAC3B,OAAO,gBAAgB,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAC;AAC7C,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,UAAU,UAAU;IACxB,OAAO,IAAI,CAAC,cAAc,CAAC,CAAC;AAC9B,CAAC;AAED;;;;;;;;;;;GAWG;AACH,MAAM,UAAU,gBAAgB,CAC9B,OAA6B,EAC7B,GAAmB,EACnB,QAAkB,EAClB,OAA0B;IAE1B,OAAO,OAAO,CAAC,SAAS,CAAC,GAAG,EAAE,QAAQ,EAAE,OAAO,CAAC,CAAC;AACnD,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/i18n/vite/index.ts"],"names":[],"mappings":"AAAA,YAAY,EACV,oBAAoB,EACpB,mBAAmB,GACpB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/i18n/vite/index.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC"}
|