react-cheminfo 0.54.0 → 0.55.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.
Files changed (50) hide show
  1. package/README.md +14 -0
  2. package/lib/chrome/ui/SiteHeader.d.ts +17 -1
  3. package/lib/chrome/ui/SiteHeader.d.ts.map +1 -1
  4. package/lib/chrome/ui/SiteHeader.js +9 -2
  5. package/lib/chrome/ui/SiteHeader.js.map +1 -1
  6. package/lib/contact/core/contactUrl.d.ts +35 -0
  7. package/lib/contact/core/contactUrl.d.ts.map +1 -0
  8. package/lib/contact/core/contactUrl.js +33 -0
  9. package/lib/contact/core/contactUrl.js.map +1 -0
  10. package/lib/contact/core/index.d.ts +3 -0
  11. package/lib/contact/core/index.d.ts.map +1 -0
  12. package/lib/contact/core/index.js +2 -0
  13. package/lib/contact/core/index.js.map +1 -0
  14. package/lib/contact/ui/ContactButton.d.ts +41 -0
  15. package/lib/contact/ui/ContactButton.d.ts.map +1 -0
  16. package/lib/contact/ui/ContactButton.js +29 -0
  17. package/lib/contact/ui/ContactButton.js.map +1 -0
  18. package/lib/contact/ui/index.d.ts +3 -0
  19. package/lib/contact/ui/index.d.ts.map +1 -0
  20. package/lib/contact/ui/index.js +2 -0
  21. package/lib/contact/ui/index.js.map +1 -0
  22. package/lib/core.d.ts +1 -0
  23. package/lib/core.d.ts.map +1 -1
  24. package/lib/core.js +1 -0
  25. package/lib/core.js.map +1 -1
  26. package/lib/i18n/core/chromeCatalog.d.ts +1 -1
  27. package/lib/i18n/core/chromeCatalog.d.ts.map +1 -1
  28. package/lib/locales/de.json +2 -0
  29. package/lib/locales/en.json +2 -0
  30. package/lib/locales/es.json +2 -0
  31. package/lib/locales/fr.json +2 -0
  32. package/lib/locales/it.json +2 -0
  33. package/lib/ui.d.ts +1 -0
  34. package/lib/ui.d.ts.map +1 -1
  35. package/lib/ui.js +1 -0
  36. package/lib/ui.js.map +1 -1
  37. package/package.json +1 -1
  38. package/src/chrome/ui/SiteHeader.tsx +35 -3
  39. package/src/contact/core/contactUrl.ts +53 -0
  40. package/src/contact/core/index.ts +2 -0
  41. package/src/contact/ui/ContactButton.tsx +74 -0
  42. package/src/contact/ui/index.ts +2 -0
  43. package/src/core.ts +1 -0
  44. package/src/locales/de.json +2 -0
  45. package/src/locales/en.json +2 -0
  46. package/src/locales/es.json +2 -0
  47. package/src/locales/fr.json +2 -0
  48. package/src/locales/it.json +2 -0
  49. package/src/ui.ts +1 -0
  50. package/styles/chrome.css +21 -0
package/README.md CHANGED
@@ -94,6 +94,7 @@ through a wildcard subpath exactly as `react-science` serves its own.
94
94
  | **Chrome** | — | `SiteHeader`, `SiteFooter`, `NavLink`, `NavMenuButton`, `MenuButton`, `AccountButton`, `useCompactHeader` |
95
95
  | **Languages** | `LANGUAGES`, `DEFAULT_LANGUAGE`, `LANGUAGE_LABELS`, `isLanguage`, `MessageCatalog`, `CHROME_CATALOG`, `setMessageSession`, `loadCatalogs`, `LANGUAGE_PARAM`, `withLanguageParam` | `useT`, `useChromeT`, `useLanguage`, `LanguageSelect`, `SiteLanguage` |
96
96
  | **Citation** | `formatCitation`, `formatCitations`, `citationSegments`, `downloadCitation`, `citedReferences`, `doiUrl` | `CiteButton`, `CitationMenu`, `CitationPreview` |
97
+ | **Contact** | `CONTACT_FORM_URLS`, `contactFormUrl`, `contactUrl` | `ContactButton` |
97
98
  | **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
99
  | **Routing & head** | `createTabRouter`, `readRoute`, `writeRoute`, `subscribeToRoute`, `adoptLegacyHashAddress`, `writeDocumentMeta`, `pageLocation`, `pageHistory` | `useTabRoute` |
99
100
  | **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`) |
@@ -227,6 +228,19 @@ import { PLATFORM_WORK, TEACHING_WORK } from 'react-cheminfo/core';
227
228
  <CiteButton works={[OWN_WORK, TEACHING_WORK, PLATFORM_WORK]} />;
228
229
  ```
229
230
 
231
+ ### `ContactButton`
232
+
233
+ The Contact entry of a site header. `SiteHeader` draws it after the site's
234
+ utilities and just before Share, which a site passes in its own `share` prop so
235
+ that it always comes last; a site gets the entry by updating the package: it opens the
236
+ family's contact form in a new tab, in the language of the page (English when the
237
+ form is not written in it), with the site and the page already filled in. The form
238
+ is opened, never embedded, so nothing is loaded from it before the click.
239
+
240
+ The forms are set once, in `CONTACT_FORM_URLS`, as addresses holding `{site}` and
241
+ `{page}`; while it is empty no entry is drawn. A site passes `contact={false}` to
242
+ `SiteHeader` to leave the entry out, or its own address to open another form.
243
+
230
244
  ### `EcosystemButton`
231
245
 
232
246
  The Tools entry of a site header: one button opening every other site of the
@@ -28,12 +28,28 @@ export interface SiteHeaderProps {
28
28
  */
29
29
  activeId?: string;
30
30
  /**
31
- * The utilities pushed to the right edge — Cite, Tools, Share, sign in. They
31
+ * The utilities pushed to the right edge — About, Cite, Tools, the language,
32
+ * sign in; Share has a prop of its own, so it always comes last. They
32
33
  * arrive dressed as bar items, so a plain `nav-link` and a `CiteButton` read
33
34
  * alike beside each other.
34
35
  * @default undefined
35
36
  */
36
37
  actions?: ReactNode;
38
+ /**
39
+ * The Share entry, which closes the utilities on every site, after the
40
+ * Contact entry. A site passes its own when it wraps the shared `ShareButton`
41
+ * in a dialog of its own.
42
+ * @default undefined
43
+ */
44
+ share?: ReactNode;
45
+ /**
46
+ * The contact form the Contact entry opens, drawn after the site's utilities
47
+ * and just before Share, with
48
+ * `{site}` and `{page}` where the site and the page are written; `false`
49
+ * leaves the entry out. No entry is drawn while there is no form.
50
+ * @default the family's form in the language of the page (`CONTACT_FORM_URLS`)
51
+ */
52
+ contact?: string | false;
37
53
  /**
38
54
  * Draws one page the site's own way, for a bar whose entries need a tooltip
39
55
  * or a wrapper of their own.
@@ -1 +1 @@
1
- {"version":3,"file":"SiteHeader.d.ts","sourceRoot":"","sources":["../../../src/chrome/ui/SiteHeader.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAIrD,OAAO,KAAK,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAOxE,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAG5C,MAAM,WAAW,eAAe;IAC9B;;;;OAIG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;;;OAIG;IACH,IAAI,CAAC,EAAE,UAAU,CAAC;IAClB;;;;OAIG;IACH,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,kDAAkD;IAClD,GAAG,EAAE,SAAS,OAAO,EAAE,CAAC;IACxB;;;OAGG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;;;;OAKG;IACH,OAAO,CAAC,EAAE,SAAS,CAAC;IACpB;;;;OAIG;IACH,aAAa,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,EAAE,QAAQ,EAAE,OAAO,KAAK,SAAS,CAAC;IAChE;;;;OAIG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;OAGG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;;;OAIG;IACH,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB;;;OAGG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;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G;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;;;;;;;;OASG;IACH,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACxB;;;;OAIG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,UAAU,CAAC,KAAK,EAAE,eAAe,GAAG,YAAY,GAAG,IAAI,CAmFtE"}
@@ -1,8 +1,11 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { Fragment } from 'react';
3
+ import { contactFormUrl } from "../../contact/core/contactUrl.js";
4
+ import { ContactButton } from "../../contact/ui/ContactButton.js";
3
5
  import { siteById } from "../../ecosystem/core/lookup.js";
4
6
  import { Wordmark } from "../../ecosystem/ui/Wordmark.js";
5
7
  import { SiteMark } from "../../ecosystem/ui/marks.js";
8
+ import { useLanguage } from "../../i18n/ui/useLanguage.js";
6
9
  import { useChromeT } from "../../i18n/ui/useT.js";
7
10
  import { NavLink } from "./NavLink.js";
8
11
  import { NavMenuButton } from "./NavMenuButton.js";
@@ -21,20 +24,24 @@ import { isModifiedClick } from "./navItem.js";
21
24
  * @throws {Error} When neither `site` nor `siteId` is given.
22
25
  */
23
26
  export function SiteHeader(props) {
24
- const { siteId, site: record, mark, nav, activeId, actions, renderNavItem, embedded = false, homeHref = '/', onHome, markSize = 28, width = 'page', pagesLabel, } = props;
27
+ const { siteId, site: record, mark, nav, activeId, actions, share, contact, renderNavItem, embedded = false, homeHref = '/', onHome, markSize = 28, width = 'page', pagesLabel, } = props;
25
28
  const t = useChromeT();
29
+ const language = useLanguage();
26
30
  if (embedded)
27
31
  return null;
28
32
  const site = record ?? (siteId === undefined ? undefined : siteById(siteId));
29
33
  if (site === undefined) {
30
34
  throw new Error('SiteHeader needs one of its `site` and `siteId` props');
31
35
  }
36
+ const contactForm = contact === false ? '' : (contact ?? contactFormUrl(language));
32
37
  return (_jsx("header", { className: "app-header no-print", children: _jsxs("div", { className: INNER_CLASS[width], children: [_jsxs("a", { className: "brand", href: homeHref, title: site.host, onClick: (event) => {
33
38
  if (onHome === undefined || isModifiedClick(event))
34
39
  return;
35
40
  event.preventDefault();
36
41
  onHome();
37
- }, children: [mark ?? _jsx(SiteMark, { site: site, size: markSize }), _jsx(Wordmark, { site: site })] }), _jsx("nav", { className: "app-header-nav", children: nav.map((item) => (_jsx(Fragment, { children: renderNavItem === undefined ? (_jsx(NavEntry, { item: item, activeId: activeId })) : (renderNavItem(item, item.id === activeId)) }, item.id))) }), nav.length > 1 ? (_jsx("div", { className: "app-header-nav-menu", children: _jsx(NavMenuButton, { label: pagesLabel ?? t('chrome.pages'), icon: "menu", compact: true, items: nav, activeId: activeId }) })) : null, _jsx("span", { className: "spacer" }), actions === undefined ? null : (_jsx("div", { className: "app-header-actions", children: actions }))] }) }));
42
+ }, children: [mark ?? _jsx(SiteMark, { site: site, size: markSize }), _jsx(Wordmark, { site: site })] }), _jsx("nav", { className: "app-header-nav", children: nav.map((item) => (_jsx(Fragment, { children: renderNavItem === undefined ? (_jsx(NavEntry, { item: item, activeId: activeId })) : (renderNavItem(item, item.id === activeId)) }, item.id))) }), nav.length > 1 ? (_jsx("div", { className: "app-header-nav-menu", children: _jsx(NavMenuButton, { label: pagesLabel ?? t('chrome.pages'), icon: "menu", compact: true, items: nav, activeId: activeId }) })) : null, _jsx("span", { className: "spacer" }), actions === undefined &&
43
+ share === undefined &&
44
+ contactForm === '' ? null : (_jsxs("div", { className: "app-header-actions", children: [actions, contactForm === '' ? null : (_jsx(ContactButton, { siteId: site.id, formUrl: contactForm })), share] }))] }) }));
38
45
  }
39
46
  /**
40
47
  * One page of the bar: a link, or the menu it opens when the entry folds pages
@@ -1 +1 @@
1
- {"version":3,"file":"SiteHeader.js","sourceRoot":"","sources":["../../../src/chrome/ui/SiteHeader.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEjC,OAAO,EAAE,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AC,CAAC,IAAI,CAAC,CAAC,CAAC,CAC3B,KAAC,aAAa,IAAC,MAAM,EAAE,IAAI,CAAC,EAAE,EAAE,OAAO,EAAE,WAAW,GAAI,CACzD,EACA,KAAK,IACF,CACP,IACG,GACC,CACV,CAAC;AACJ,CAAC;AAED;;;;;;;;GAQG;AACH,SAAS,QAAQ,CAAC,KAGjB;IACC,MAAM,EAAE,IAAI,EAAE,QAAQ,EAAE,GAAG,KAAK,CAAC;IACjC,IAAI,IAAI,CAAC,KAAK,KAAK,SAAS,EAAE,CAAC;QAC7B,OAAO,KAAC,OAAO,IAAC,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,KAAK,QAAQ,GAAI,CAAC;IAC/D,CAAC;IAED,OAAO,CACL,KAAC,aAAa,IACZ,KAAK,EAAE,SAAS,CAAC,IAAI,CAAC,EACtB,IAAI,EAAE,OAAO,IAAI,CAAC,IAAI,KAAK,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS,EAC3D,KAAK,EAAE,IAAI,CAAC,KAAK,EACjB,QAAQ,EAAE,QAAQ,EAClB,SAAS,EAAC,cAAc,GACxB,CACH,CAAC;AACJ,CAAC;AAED,4EAA4E;AAC5E,yEAAyE;AACzE,SAAS,SAAS,CAAC,IAAa;IAC9B,IAAI,OAAO,IAAI,CAAC,KAAK,KAAK,QAAQ;QAAE,OAAO,IAAI,CAAC,KAAK,CAAC;IACtD,OAAO,IAAI,CAAC,KAAK,IAAI,IAAI,CAAC,EAAE,CAAC;AAC/B,CAAC;AAED,8EAA8E;AAC9E,MAAM,WAAW,GAAG;IAClB,IAAI,EAAE,mBAAmB;IACzB,IAAI,EAAE,2CAA2C;CACzC,CAAC"}
@@ -0,0 +1,35 @@
1
+ import type { Language } from '../../i18n/core/languages.ts';
2
+ /**
3
+ * Address of the contact form every site of the family opens, one per language the form
4
+ * is written in, with `{site}` and `{page}` where the site and the page are written. A
5
+ * language without a form of its own opens the English one; with no form at all, no
6
+ * Contact entry is drawn.
7
+ */
8
+ export declare const CONTACT_FORM_URLS: Readonly<Partial<Record<Language, string>>>;
9
+ /** What a contact address is filled with. */
10
+ export interface ContactUrlOptions {
11
+ /** The site the message is about, written as its id. */
12
+ site: string;
13
+ /**
14
+ * The address of the page the reader was on.
15
+ * @default ''
16
+ */
17
+ page?: string;
18
+ }
19
+ /**
20
+ * The contact form in the language of the page, or the English one when the form is not
21
+ * written in that language.
22
+ * @param language - The language of the page.
23
+ * @param urls - The forms, by language.
24
+ * @returns The address of the form, or an empty string when there is none.
25
+ */
26
+ export declare function contactFormUrl(language: Language, urls?: Readonly<Partial<Record<Language, string>>>): string;
27
+ /**
28
+ * Fill the address of a contact form with the site and the page, both encoded, so the
29
+ * form opens knowing what the message is about.
30
+ * @param template - Address holding `{site}` and `{page}`.
31
+ * @param options - The site and the page.
32
+ * @returns The address to open.
33
+ */
34
+ export declare function contactUrl(template: string, options: ContactUrlOptions): string;
35
+ //# sourceMappingURL=contactUrl.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"contactUrl.d.ts","sourceRoot":"","sources":["../../../src/contact/core/contactUrl.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,8BAA8B,CAAC;AAE7D;;;;;GAKG;AACH,eAAO,MAAM,iBAAiB,EAAE,QAAQ,CAAC,OAAO,CAAC,MAAM,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC,CAEzE,CAAC;AAEF,6CAA6C;AAC7C,MAAM,WAAW,iBAAiB;IAChC,wDAAwD;IACxD,IAAI,EAAE,MAAM,CAAC;IACb;;;OAGG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED;;;;;;GAMG;AACH,wBAAgB,cAAc,CAC5B,QAAQ,EAAE,QAAQ,EAClB,IAAI,GAAE,QAAQ,CAAC,OAAO,CAAC,MAAM,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC,CAAqB,GACpE,MAAM,CAER;AAED;;;;;;GAMG;AACH,wBAAgB,UAAU,CACxB,QAAQ,EAAE,MAAM,EAChB,OAAO,EAAE,iBAAiB,GACzB,MAAM,CAKR"}
@@ -0,0 +1,33 @@
1
+ /**
2
+ * Address of the contact form every site of the family opens, one per language the form
3
+ * is written in, with `{site}` and `{page}` where the site and the page are written. A
4
+ * language without a form of its own opens the English one; with no form at all, no
5
+ * Contact entry is drawn.
6
+ */
7
+ export const CONTACT_FORM_URLS = {
8
+ en: 'https://docs.google.com/forms/d/e/1FAIpQLSd_1G3tUOEJh_qapmLn_xrybWa9Nu7B57bpYm76o4nwPKPWsg/viewform?usp=pp_url&entry.569380734={site}&entry.2103045774={page}',
9
+ };
10
+ /**
11
+ * The contact form in the language of the page, or the English one when the form is not
12
+ * written in that language.
13
+ * @param language - The language of the page.
14
+ * @param urls - The forms, by language.
15
+ * @returns The address of the form, or an empty string when there is none.
16
+ */
17
+ export function contactFormUrl(language, urls = CONTACT_FORM_URLS) {
18
+ return urls[language] ?? urls.en ?? '';
19
+ }
20
+ /**
21
+ * Fill the address of a contact form with the site and the page, both encoded, so the
22
+ * form opens knowing what the message is about.
23
+ * @param template - Address holding `{site}` and `{page}`.
24
+ * @param options - The site and the page.
25
+ * @returns The address to open.
26
+ */
27
+ export function contactUrl(template, options) {
28
+ const { site, page = '' } = options;
29
+ return template
30
+ .replaceAll('{site}', encodeURIComponent(site))
31
+ .replaceAll('{page}', encodeURIComponent(page));
32
+ }
33
+ //# sourceMappingURL=contactUrl.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"contactUrl.js","sourceRoot":"","sources":["../../../src/contact/core/contactUrl.ts"],"names":[],"mappings":"AAEA;;;;;GAKG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAgD;IAC5E,EAAE,EAAE,+JAA+J;CACpK,CAAC;AAaF;;;;;;GAMG;AACH,MAAM,UAAU,cAAc,CAC5B,QAAkB,EAClB,OAAoD,iBAAiB;IAErE,OAAO,IAAI,CAAC,QAAQ,CAAC,IAAI,IAAI,CAAC,EAAE,IAAI,EAAE,CAAC;AACzC,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,UAAU,CACxB,QAAgB,EAChB,OAA0B;IAE1B,MAAM,EAAE,IAAI,EAAE,IAAI,GAAG,EAAE,EAAE,GAAG,OAAO,CAAC;IACpC,OAAO,QAAQ;SACZ,UAAU,CAAC,QAAQ,EAAE,kBAAkB,CAAC,IAAI,CAAC,CAAC;SAC9C,UAAU,CAAC,QAAQ,EAAE,kBAAkB,CAAC,IAAI,CAAC,CAAC,CAAC;AACpD,CAAC"}
@@ -0,0 +1,3 @@
1
+ export type { ContactUrlOptions } from './contactUrl.ts';
2
+ export { CONTACT_FORM_URLS, contactFormUrl, contactUrl } from './contactUrl.ts';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/contact/core/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AACzD,OAAO,EAAE,iBAAiB,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC"}
@@ -0,0 +1,2 @@
1
+ export { CONTACT_FORM_URLS, contactFormUrl, contactUrl } from "./contactUrl.js";
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/contact/core/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC"}
@@ -0,0 +1,41 @@
1
+ import type { ReactElement } from 'react';
2
+ /** What the Contact entry of a header needs. */
3
+ export interface ContactButtonProps {
4
+ /** The site the reader writes about, written into the form. */
5
+ siteId: string;
6
+ /**
7
+ * Address of the form, with `{site}` and `{page}` where they are written.
8
+ * @default the family's form in the language of the page (`CONTACT_FORM_URLS`)
9
+ */
10
+ formUrl?: string;
11
+ /**
12
+ * The page the reader is on, written into the form.
13
+ * @default the address of the current page
14
+ */
15
+ page?: string;
16
+ /**
17
+ * What the entry reads. In a compact bar it is not written, but it stays what
18
+ * the pointer and a screen reader are told.
19
+ * @default the chrome's own word for it, in the language of the page
20
+ */
21
+ label?: string;
22
+ /**
23
+ * What the pointer is told.
24
+ * @default the chrome's own sentence, in the language of the page
25
+ */
26
+ title?: string;
27
+ /**
28
+ * Class names added after the component's own.
29
+ * @default undefined
30
+ */
31
+ className?: string;
32
+ }
33
+ /**
34
+ * The Contact entry of a site header: it opens the family's contact form in a new tab,
35
+ * with the site and the page already filled in, so the reader only writes the message.
36
+ * The form is opened, never embedded, so nothing is loaded from it before the click.
37
+ * @param props - The site, and the form it opens.
38
+ * @returns The entry, or nothing while no form address is set.
39
+ */
40
+ export declare function ContactButton(props: ContactButtonProps): ReactElement | null;
41
+ //# sourceMappingURL=ContactButton.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ContactButton.d.ts","sourceRoot":"","sources":["../../../src/contact/ui/ContactButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAO1C,gDAAgD;AAChD,MAAM,WAAW,kBAAkB;IACjC,+DAA+D;IAC/D,MAAM,EAAE,MAAM,CAAC;IACf;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB;;;OAGG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;;;OAIG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;;;GAMG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,kBAAkB,GAAG,YAAY,GAAG,IAAI,CA2B5E"}
@@ -0,0 +1,29 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { NavLink } from "../../chrome/ui/NavLink.js";
3
+ import { useLanguage } from "../../i18n/ui/useLanguage.js";
4
+ import { useChromeT } from "../../i18n/ui/useT.js";
5
+ import { contactFormUrl, contactUrl } from "../core/contactUrl.js";
6
+ /**
7
+ * The Contact entry of a site header: it opens the family's contact form in a new tab,
8
+ * with the site and the page already filled in, so the reader only writes the message.
9
+ * The form is opened, never embedded, so nothing is loaded from it before the click.
10
+ * @param props - The site, and the form it opens.
11
+ * @returns The entry, or nothing while no form address is set.
12
+ */
13
+ export function ContactButton(props) {
14
+ const { siteId, page = globalThis.location?.href ?? '', label, title, className, } = props;
15
+ const t = useChromeT();
16
+ const language = useLanguage();
17
+ const formUrl = props.formUrl ?? contactFormUrl(language);
18
+ if (formUrl === '')
19
+ return null;
20
+ return (_jsx(NavLink, { item: {
21
+ id: 'contact',
22
+ label: label ?? t('chrome.contact'),
23
+ icon: 'chat',
24
+ href: contactUrl(formUrl, { site: siteId, page }),
25
+ external: true,
26
+ title: title ?? t('chrome.contactTitle'),
27
+ }, className: className }));
28
+ }
29
+ //# sourceMappingURL=ContactButton.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ContactButton.js","sourceRoot":"","sources":["../../../src/contact/ui/ContactButton.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAE,OAAO,EAAE,MAAM,4BAA6B,CAAC;AACtD,OAAO,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAC3D,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACnD,OAAO,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAkCnE;;;;;;GAMG;AACH,MAAM,UAAU,aAAa,CAAC,KAAyB;IACrD,MAAM,EACJ,MAAM,EACN,IAAI,GAAG,UAAU,CAAC,QAAQ,EAAE,IAAI,IAAI,EAAE,EACtC,KAAK,EACL,KAAK,EACL,SAAS,GACV,GAAG,KAAK,CAAC;IACV,MAAM,CAAC,GAAG,UAAU,EAAE,CAAC;IACvB,MAAM,QAAQ,GAAG,WAAW,EAAE,CAAC;IAC/B,MAAM,OAAO,GAAG,KAAK,CAAC,OAAO,IAAI,cAAc,CAAC,QAAQ,CAAC,CAAC;IAE1D,IAAI,OAAO,KAAK,EAAE;QAAE,OAAO,IAAI,CAAC;IAEhC,OAAO,CACL,KAAC,OAAO,IACN,IAAI,EAAE;YACJ,EAAE,EAAE,SAAS;YACb,KAAK,EAAE,KAAK,IAAI,CAAC,CAAC,gBAAgB,CAAC;YACnC,IAAI,EAAE,MAAM;YACZ,IAAI,EAAE,UAAU,CAAC,OAAO,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;YACjD,QAAQ,EAAE,IAAI;YACd,KAAK,EAAE,KAAK,IAAI,CAAC,CAAC,qBAAqB,CAAC;SACzC,EACD,SAAS,EAAE,SAAS,GACpB,CACH,CAAC;AACJ,CAAC"}
@@ -0,0 +1,3 @@
1
+ export type { ContactButtonProps } from './ContactButton.tsx';
2
+ export { ContactButton } from './ContactButton.tsx';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/contact/ui/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AAC9D,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC"}
@@ -0,0 +1,2 @@
1
+ export { ContactButton } from "./ContactButton.js";
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/contact/ui/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAqB,CAAC"}
package/lib/core.d.ts CHANGED
@@ -5,6 +5,7 @@ export * from './chart/core/index.ts';
5
5
  export * from './citation/core/index.ts';
6
6
  export * from './clipboard/core/index.ts';
7
7
  export * from './color/core/index.ts';
8
+ export * from './contact/core/index.ts';
8
9
  export * from './credits/core/index.ts';
9
10
  export * from './delimited/core/index.ts';
10
11
  export * from './download/core/index.ts';
package/lib/core.d.ts.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"core.d.ts","sourceRoot":"","sources":["../src/core.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAC;AACtC,cAAc,sBAAsB,CAAC;AACrC,cAAc,uBAAuB,CAAC;AACtC,cAAc,uBAAuB,CAAC;AACtC,cAAc,0BAA0B,CAAC;AACzC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,uBAAuB,CAAC;AACtC,cAAc,yBAAyB,CAAC;AACxC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,0BAA0B,CAAC;AACzC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,uBAAuB,CAAC;AACtC,cAAc,wBAAwB,CAAC;AACvC,cAAc,sBAAsB,CAAC;AACrC,cAAc,0BAA0B,CAAC;AACzC,cAAc,wBAAwB,CAAC;AACvC,cAAc,yBAAyB,CAAC;AACxC,cAAc,yBAAyB,CAAC;AACxC,cAAc,uBAAuB,CAAC;AACtC,cAAc,0BAA0B,CAAC;AACzC,cAAc,0BAA0B,CAAC;AACzC,cAAc,0BAA0B,CAAC;AACzC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,uBAAuB,CAAC;AACtC,cAAc,wBAAwB,CAAC;AACvC,cAAc,yBAAyB,CAAC;AACxC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,qBAAqB,CAAC;AACpC,cAAc,uBAAuB,CAAC;AAGtC,cAAc,wBAAwB,CAAC;AACvC,cAAc,uBAAuB,CAAC;AACtC,cAAc,uBAAuB,CAAC;AAGtC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,0BAA0B,CAAC;AACzC,cAAc,wBAAwB,CAAC;AACvC,cAAc,wBAAwB,CAAC"}
1
+ {"version":3,"file":"core.d.ts","sourceRoot":"","sources":["../src/core.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAC;AACtC,cAAc,sBAAsB,CAAC;AACrC,cAAc,uBAAuB,CAAC;AACtC,cAAc,uBAAuB,CAAC;AACtC,cAAc,0BAA0B,CAAC;AACzC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,uBAAuB,CAAC;AACtC,cAAc,yBAAyB,CAAC;AACxC,cAAc,yBAAyB,CAAC;AACxC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,0BAA0B,CAAC;AACzC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,uBAAuB,CAAC;AACtC,cAAc,wBAAwB,CAAC;AACvC,cAAc,sBAAsB,CAAC;AACrC,cAAc,0BAA0B,CAAC;AACzC,cAAc,wBAAwB,CAAC;AACvC,cAAc,yBAAyB,CAAC;AACxC,cAAc,yBAAyB,CAAC;AACxC,cAAc,uBAAuB,CAAC;AACtC,cAAc,0BAA0B,CAAC;AACzC,cAAc,0BAA0B,CAAC;AACzC,cAAc,0BAA0B,CAAC;AACzC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,uBAAuB,CAAC;AACtC,cAAc,wBAAwB,CAAC;AACvC,cAAc,yBAAyB,CAAC;AACxC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,qBAAqB,CAAC;AACpC,cAAc,uBAAuB,CAAC;AAGtC,cAAc,wBAAwB,CAAC;AACvC,cAAc,uBAAuB,CAAC;AACtC,cAAc,uBAAuB,CAAC;AAGtC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,0BAA0B,CAAC;AACzC,cAAc,wBAAwB,CAAC;AACvC,cAAc,wBAAwB,CAAC"}
package/lib/core.js CHANGED
@@ -5,6 +5,7 @@ export * from "./chart/core/index.js";
5
5
  export * from "./citation/core/index.js";
6
6
  export * from "./clipboard/core/index.js";
7
7
  export * from "./color/core/index.js";
8
+ export * from "./contact/core/index.js";
8
9
  export * from "./credits/core/index.js";
9
10
  export * from "./delimited/core/index.js";
10
11
  export * from "./download/core/index.js";
package/lib/core.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"core.js","sourceRoot":"","sources":["../src/core.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAC;AACtC,cAAc,sBAAsB,CAAC;AACrC,cAAc,uBAAuB,CAAC;AACtC,cAAc,uBAAuB,CAAC;AACtC,cAAc,0BAA0B,CAAC;AACzC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,uBAAuB,CAAC;AACtC,cAAc,yBAAyB,CAAC;AACxC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,0BAA0B,CAAC;AACzC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,uBAAuB,CAAC;AACtC,cAAc,wBAAwB,CAAC;AACvC,cAAc,sBAAsB,CAAC;AACrC,cAAc,0BAA0B,CAAC;AACzC,cAAc,wBAAwB,CAAC;AACvC,cAAc,yBAAyB,CAAC;AACxC,cAAc,yBAAyB,CAAC;AACxC,cAAc,uBAAuB,CAAC;AACtC,cAAc,0BAA0B,CAAC;AACzC,cAAc,0BAA0B,CAAC;AACzC,cAAc,0BAA0B,CAAC;AACzC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,uBAAuB,CAAC;AACtC,cAAc,wBAAwB,CAAC;AACvC,cAAc,yBAAyB,CAAC;AACxC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,qBAAqB,CAAC;AACpC,cAAc,uBAAuB,CAAC;AACtC,+EAA+E;AAC/E,2EAA2E;AAC3E,cAAc,wBAAwB,CAAC;AACvC,cAAc,uBAAuB,CAAC;AACtC,cAAc,uBAAuB,CAAC;AACtC,0EAA0E;AAC1E,8EAA8E;AAC9E,cAAc,2BAA2B,CAAC;AAC1C,cAAc,0BAA0B,CAAC;AACzC,cAAc,wBAAwB,CAAC;AACvC,cAAc,wBAAwB,CAAC"}
1
+ {"version":3,"file":"core.js","sourceRoot":"","sources":["../src/core.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAC;AACtC,cAAc,sBAAsB,CAAC;AACrC,cAAc,uBAAuB,CAAC;AACtC,cAAc,uBAAuB,CAAC;AACtC,cAAc,0BAA0B,CAAC;AACzC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,uBAAuB,CAAC;AACtC,cAAc,yBAAyB,CAAC;AACxC,cAAc,yBAAyB,CAAC;AACxC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,0BAA0B,CAAC;AACzC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,uBAAuB,CAAC;AACtC,cAAc,wBAAwB,CAAC;AACvC,cAAc,sBAAsB,CAAC;AACrC,cAAc,0BAA0B,CAAC;AACzC,cAAc,wBAAwB,CAAC;AACvC,cAAc,yBAAyB,CAAC;AACxC,cAAc,yBAAyB,CAAC;AACxC,cAAc,uBAAuB,CAAC;AACtC,cAAc,0BAA0B,CAAC;AACzC,cAAc,0BAA0B,CAAC;AACzC,cAAc,0BAA0B,CAAC;AACzC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,uBAAuB,CAAC;AACtC,cAAc,wBAAwB,CAAC;AACvC,cAAc,yBAAyB,CAAC;AACxC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,qBAAqB,CAAC;AACpC,cAAc,uBAAuB,CAAC;AACtC,+EAA+E;AAC/E,2EAA2E;AAC3E,cAAc,wBAAwB,CAAC;AACvC,cAAc,uBAAuB,CAAC;AACtC,cAAc,uBAAuB,CAAC;AACtC,0EAA0E;AAC1E,8EAA8E;AAC9E,cAAc,2BAA2B,CAAC;AAC1C,cAAc,0BAA0B,CAAC;AACzC,cAAc,wBAAwB,CAAC;AACvC,cAAc,wBAAwB,CAAC"}
@@ -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.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">;
20
+ export declare const CHROME_CATALOG: MessageCatalog<"language.label" | "chrome.pages" | "chrome.about" | "chrome.aboutTitle" | "chrome.contact" | "chrome.contactTitle" | "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,66gBAgBzB,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,w9gBAgBzB,CAAC"}
@@ -3,6 +3,8 @@
3
3
  "chrome.pages": "Seiten",
4
4
  "chrome.about": "Über",
5
5
  "chrome.aboutTitle": "Was diese Seite ist, worauf sie aufbaut und wie man sie zitiert",
6
+ "chrome.contact": "Kontakt",
7
+ "chrome.contactTitle": "Eine Frage, ein Problem, eine Idee? Schreiben Sie uns",
6
8
  "account.signIn": "Anmelden",
7
9
  "account.signOut": "Abmelden",
8
10
  "account.signedInAs": "Angemeldet als {name}",
@@ -3,6 +3,8 @@
3
3
  "chrome.pages": "Pages",
4
4
  "chrome.about": "About",
5
5
  "chrome.aboutTitle": "What this site is, what it is built on, and how to cite it",
6
+ "chrome.contact": "Contact",
7
+ "chrome.contactTitle": "A question, a problem or an idea? Write to us",
6
8
  "account.signIn": "Sign in",
7
9
  "account.signOut": "Sign out",
8
10
  "account.signedInAs": "Signed in as {name}",
@@ -3,6 +3,8 @@
3
3
  "chrome.pages": "Páginas",
4
4
  "chrome.about": "Acerca de",
5
5
  "chrome.aboutTitle": "Qué es este sitio, en qué se basa y cómo citarlo",
6
+ "chrome.contact": "Contacto",
7
+ "chrome.contactTitle": "¿Una pregunta, un problema, una idea? Escríbanos",
6
8
  "account.signIn": "Iniciar sesión",
7
9
  "account.signOut": "Cerrar sesión",
8
10
  "account.signedInAs": "Sesión iniciada como {name}",
@@ -3,6 +3,8 @@
3
3
  "chrome.pages": "Pages",
4
4
  "chrome.about": "À propos",
5
5
  "chrome.aboutTitle": "Ce qu'est ce site, sur quoi il est bâti et comment le citer",
6
+ "chrome.contact": "Contact",
7
+ "chrome.contactTitle": "Une question, un problème, une idée ? Écrivez-nous",
6
8
  "account.signIn": "Se connecter",
7
9
  "account.signOut": "Se déconnecter",
8
10
  "account.signedInAs": "Connecté comme {name}",
@@ -3,6 +3,8 @@
3
3
  "chrome.pages": "Pagine",
4
4
  "chrome.about": "Informazioni",
5
5
  "chrome.aboutTitle": "Cosa è questo sito, su cosa si basa e come citarlo",
6
+ "chrome.contact": "Contatto",
7
+ "chrome.contactTitle": "Una domanda, un problema, un'idea? Scriveteci",
6
8
  "account.signIn": "Accedi",
7
9
  "account.signOut": "Esci",
8
10
  "account.signedInAs": "Accesso effettuato come {name}",
package/lib/ui.d.ts CHANGED
@@ -4,6 +4,7 @@ export * from './capsule/ui/index.ts';
4
4
  export * from './chart/ui/index.ts';
5
5
  export * from './chrome/ui/index.ts';
6
6
  export * from './citation/ui/index.ts';
7
+ export * from './contact/ui/index.ts';
7
8
  export * from './clipboard/ui/index.ts';
8
9
  export * from './color/ui/index.ts';
9
10
  export * from './confirm/ui/index.ts';
package/lib/ui.d.ts.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"ui.d.ts","sourceRoot":"","sources":["../src/ui.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC;AACpC,cAAc,oBAAoB,CAAC;AACnC,cAAc,uBAAuB,CAAC;AACtC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Ac,sBAAsB,CAAC;AACrC,cAAc,wBAAwB,CAAC;AACvC,cAAc,uBAAuB,CAAC;AACtC,cAAc,yBAAyB,CAAC;AACxC,cAAc,qBAAqB,CAAC;AACpC,cAAc,uBAAuB,CAAC;AACtC,cAAc,uBAAuB,CAAC;AACtC,cAAc,yBAAyB,CAAC;AACxC,cAAc,0BAA0B,CAAC;AACzC,cAAc,wBAAwB,CAAC;AACvC,cAAc,yBAAyB,CAAC;AACxC,cAAc,qBAAqB,CAAC;AACpC,cAAc,oBAAoB,CAAC;AACnC,cAAc,qBAAqB,CAAC;AACpC,cAAc,oBAAoB,CAAC;AACnC,cAAc,wBAAwB,CAAC;AACvC,cAAc,sBAAsB,CAAC;AACrC,cAAc,uBAAuB,CAAC;AACtC,cAAc,qBAAqB,CAAC;AACpC,cAAc,wBAAwB,CAAC;AACvC,cAAc,wBAAwB,CAAC;AACvC,cAAc,wBAAwB,CAAC;AACvC,cAAc,0BAA0B,CAAC;AACzC,cAAc,qBAAqB,CAAC;AACpC,cAAc,sBAAsB,CAAC;AACrC,cAAc,uBAAuB,CAAC;AACtC,cAAc,yBAAyB,CAAC;AACxC,cAAc,qBAAqB,CAAC;AACpC,cAAc,sBAAsB,CAAC;AACrC,cAAc,qBAAqB,CAAC;AACpC,cAAc,wBAAwB,CAAC;AAKvC,YAAY,EAAE,mBAAmB,EAAE,MAAM,mCAAmC,CAAC;AAC7E,OAAO,EAAE,cAAc,EAAE,MAAM,mCAAmC,CAAC;AACnE,YAAY,EAAE,eAAe,EAAE,MAAM,oCAAoC,CAAC;AAC1E,OAAO,EACL,uBAAuB,EACvB,cAAc,EACd,eAAe,GAChB,MAAM,oCAAoC,CAAC"}
package/lib/ui.js CHANGED
@@ -4,6 +4,7 @@ export * from "./capsule/ui/index.js";
4
4
  export * from "./chart/ui/index.js";
5
5
  export * from "./chrome/ui/index.js";
6
6
  export * from "./citation/ui/index.js";
7
+ export * from "./contact/ui/index.js";
7
8
  export * from "./clipboard/ui/index.js";
8
9
  export * from "./color/ui/index.js";
9
10
  export * from "./confirm/ui/index.js";
package/lib/ui.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"ui.js","sourceRoot":"","sources":["../src/ui.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC;AACpC,cAAc,oBAAoB,CAAC;AACnC,cAAc,uBAAuB,CAAC;AACtC,cAAc,qBAAqB,CAAC;AACpC,cAAc,sBAAsB,CAAC;AACrC,cAAc,wBAAwB,CAAC;AACvC,cAAc,yBAAyB,CAAC;AACxC,cAAc,qBAAqB,CAAC;AACpC,cAAc,uBAAuB,CAAC;AACtC,cAAc,uBAAuB,CAAC;AACtC,cAAc,yBAAyB,CAAC;AACxC,cAAc,0BAA0B,CAAC;AACzC,cAAc,wBAAwB,CAAC;AACvC,cAAc,yBAAyB,CAAC;AACxC,cAAc,qBAAqB,CAAC;AACpC,cAAc,oBAAoB,CAAC;AACnC,cAAc,qBAAqB,CAAC;AACpC,cAAc,oBAAoB,CAAC;AACnC,cAAc,wBAAwB,CAAC;AACvC,cAAc,sBAAsB,CAAC;AACrC,cAAc,uBAAuB,CAAC;AACtC,cAAc,qBAAqB,CAAC;AACpC,cAAc,wBAAwB,CAAC;AACvC,cAAc,wBAAwB,CAAC;AACvC,cAAc,wBAAwB,CAAC;AACvC,cAAc,0BAA0B,CAAC;AACzC,cAAc,qBAAqB,CAAC;AACpC,cAAc,sBAAsB,CAAC;AACrC,cAAc,uBAAuB,CAAC;AACtC,cAAc,yBAAyB,CAAC;AACxC,cAAc,qBAAqB,CAAC;AACpC,cAAc,sBAAsB,CAAC;AACrC,cAAc,qBAAqB,CAAC;AACpC,cAAc,wBAAwB,CAAC;AAMvC,OAAO,EAAE,cAAc,EAAE,MAAM,kCAAmC,CAAC;AAEnE,OAAO,EACL,uBAAuB,EACvB,cAAc,EACd,eAAe,GAChB,MAAM,oCAAoC,CAAC"}
1
+ {"version":3,"file":"ui.js","sourceRoot":"","sources":["../src/ui.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC;AACpC,cAAc,oBAAoB,CAAC;AACnC,cAAc,uBAAuB,CAAC;AACtC,cAAc,qBAAqB,CAAC;AACpC,cAAc,sBAAsB,CAAC;AACrC,cAAc,wBAAwB,CAAC;AACvC,cAAc,uBAAuB,CAAC;AACtC,cAAc,yBAAyB,CAAC;AACxC,cAAc,qBAAqB,CAAC;AACpC,cAAc,uBAAuB,CAAC;AACtC,cAAc,uBAAuB,CAAC;AACtC,cAAc,yBAAyB,CAAC;AACxC,cAAc,0BAA0B,CAAC;AACzC,cAAc,wBAAwB,CAAC;AACvC,cAAc,yBAAyB,CAAC;AACxC,cAAc,qBAAqB,CAAC;AACpC,cAAc,oBAAoB,CAAC;AACnC,cAAc,qBAAqB,CAAC;AACpC,cAAc,oBAAoB,CAAC;AACnC,cAAc,wBAAwB,CAAC;AACvC,cAAc,sBAAsB,CAAC;AACrC,cAAc,uBAAuB,CAAC;AACtC,cAAc,qBAAqB,CAAC;AACpC,cAAc,wBAAwB,CAAC;AACvC,cAAc,wBAAwB,CAAC;AACvC,cAAc,wBAAwB,CAAC;AACvC,cAAc,0BAA0B,CAAC;AACzC,cAAc,qBAAqB,CAAC;AACpC,cAAc,sBAAsB,CAAC;AACrC,cAAc,uBAAuB,CAAC;AACtC,cAAc,yBAAyB,CAAC;AACxC,cAAc,qBAAqB,CAAC;AACpC,cAAc,sBAAsB,CAAC;AACrC,cAAc,qBAAqB,CAAC;AACpC,cAAc,wBAAwB,CAAC;AAMvC,OAAO,EAAE,cAAc,EAAE,MAAM,kCAAmC,CAAC;AAEnE,OAAO,EACL,uBAAuB,EACvB,cAAc,EACd,eAAe,GAChB,MAAM,oCAAoC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-cheminfo",
3
- "version": "0.54.0",
3
+ "version": "0.55.0",
4
4
  "license": "MIT",
5
5
  "description": "React components, hooks and framework-free helpers shared by the cheminfo sites: site chrome, citations, sharing, routing, pedagogy, charts, and the structure, orbital and 3D molecule viewers",
6
6
  "author": "Luc Patiny",
@@ -1,10 +1,13 @@
1
1
  import type { ReactElement, ReactNode } from 'react';
2
2
  import { Fragment } from 'react';
3
3
 
4
+ import { contactFormUrl } from '../../contact/core/contactUrl.ts';
5
+ import { ContactButton } from '../../contact/ui/ContactButton.tsx';
4
6
  import { siteById } from '../../ecosystem/core/lookup.ts';
5
7
  import type { SiteId, SiteRecord } from '../../ecosystem/core/sites.ts';
6
8
  import { Wordmark } from '../../ecosystem/ui/Wordmark.tsx';
7
9
  import { SiteMark } from '../../ecosystem/ui/marks.tsx';
10
+ import { useLanguage } from '../../i18n/ui/useLanguage.ts';
8
11
  import { useChromeT } from '../../i18n/ui/useT.ts';
9
12
 
10
13
  import { NavLink } from './NavLink.tsx';
@@ -39,12 +42,28 @@ export interface SiteHeaderProps {
39
42
  */
40
43
  activeId?: string;
41
44
  /**
42
- * The utilities pushed to the right edge — Cite, Tools, Share, sign in. They
45
+ * The utilities pushed to the right edge — About, Cite, Tools, the language,
46
+ * sign in; Share has a prop of its own, so it always comes last. They
43
47
  * arrive dressed as bar items, so a plain `nav-link` and a `CiteButton` read
44
48
  * alike beside each other.
45
49
  * @default undefined
46
50
  */
47
51
  actions?: ReactNode;
52
+ /**
53
+ * The Share entry, which closes the utilities on every site, after the
54
+ * Contact entry. A site passes its own when it wraps the shared `ShareButton`
55
+ * in a dialog of its own.
56
+ * @default undefined
57
+ */
58
+ share?: ReactNode;
59
+ /**
60
+ * The contact form the Contact entry opens, drawn after the site's utilities
61
+ * and just before Share, with
62
+ * `{site}` and `{page}` where the site and the page are written; `false`
63
+ * leaves the entry out. No entry is drawn while there is no form.
64
+ * @default the family's form in the language of the page (`CONTACT_FORM_URLS`)
65
+ */
66
+ contact?: string | false;
48
67
  /**
49
68
  * Draws one page the site's own way, for a bar whose entries need a tooltip
50
69
  * or a wrapper of their own.
@@ -113,6 +132,8 @@ export function SiteHeader(props: SiteHeaderProps): ReactElement | null {
113
132
  nav,
114
133
  activeId,
115
134
  actions,
135
+ share,
136
+ contact,
116
137
  renderNavItem,
117
138
  embedded = false,
118
139
  homeHref = '/',
@@ -122,6 +143,7 @@ export function SiteHeader(props: SiteHeaderProps): ReactElement | null {
122
143
  pagesLabel,
123
144
  } = props;
124
145
  const t = useChromeT();
146
+ const language = useLanguage();
125
147
 
126
148
  if (embedded) return null;
127
149
 
@@ -129,6 +151,8 @@ export function SiteHeader(props: SiteHeaderProps): ReactElement | null {
129
151
  if (site === undefined) {
130
152
  throw new Error('SiteHeader needs one of its `site` and `siteId` props');
131
153
  }
154
+ const contactForm =
155
+ contact === false ? '' : (contact ?? contactFormUrl(language));
132
156
 
133
157
  return (
134
158
  <header className="app-header no-print">
@@ -169,8 +193,16 @@ export function SiteHeader(props: SiteHeaderProps): ReactElement | null {
169
193
  </div>
170
194
  ) : null}
171
195
  <span className="spacer" />
172
- {actions === undefined ? null : (
173
- <div className="app-header-actions">{actions}</div>
196
+ {actions === undefined &&
197
+ share === undefined &&
198
+ contactForm === '' ? null : (
199
+ <div className="app-header-actions">
200
+ {actions}
201
+ {contactForm === '' ? null : (
202
+ <ContactButton siteId={site.id} formUrl={contactForm} />
203
+ )}
204
+ {share}
205
+ </div>
174
206
  )}
175
207
  </div>
176
208
  </header>
@@ -0,0 +1,53 @@
1
+ import type { Language } from '../../i18n/core/languages.ts';
2
+
3
+ /**
4
+ * Address of the contact form every site of the family opens, one per language the form
5
+ * is written in, with `{site}` and `{page}` where the site and the page are written. A
6
+ * language without a form of its own opens the English one; with no form at all, no
7
+ * Contact entry is drawn.
8
+ */
9
+ export const CONTACT_FORM_URLS: Readonly<Partial<Record<Language, string>>> = {
10
+ en: 'https://docs.google.com/forms/d/e/1FAIpQLSd_1G3tUOEJh_qapmLn_xrybWa9Nu7B57bpYm76o4nwPKPWsg/viewform?usp=pp_url&entry.569380734={site}&entry.2103045774={page}',
11
+ };
12
+
13
+ /** What a contact address is filled with. */
14
+ export interface ContactUrlOptions {
15
+ /** The site the message is about, written as its id. */
16
+ site: string;
17
+ /**
18
+ * The address of the page the reader was on.
19
+ * @default ''
20
+ */
21
+ page?: string;
22
+ }
23
+
24
+ /**
25
+ * The contact form in the language of the page, or the English one when the form is not
26
+ * written in that language.
27
+ * @param language - The language of the page.
28
+ * @param urls - The forms, by language.
29
+ * @returns The address of the form, or an empty string when there is none.
30
+ */
31
+ export function contactFormUrl(
32
+ language: Language,
33
+ urls: Readonly<Partial<Record<Language, string>>> = CONTACT_FORM_URLS,
34
+ ): string {
35
+ return urls[language] ?? urls.en ?? '';
36
+ }
37
+
38
+ /**
39
+ * Fill the address of a contact form with the site and the page, both encoded, so the
40
+ * form opens knowing what the message is about.
41
+ * @param template - Address holding `{site}` and `{page}`.
42
+ * @param options - The site and the page.
43
+ * @returns The address to open.
44
+ */
45
+ export function contactUrl(
46
+ template: string,
47
+ options: ContactUrlOptions,
48
+ ): string {
49
+ const { site, page = '' } = options;
50
+ return template
51
+ .replaceAll('{site}', encodeURIComponent(site))
52
+ .replaceAll('{page}', encodeURIComponent(page));
53
+ }
@@ -0,0 +1,2 @@
1
+ export type { ContactUrlOptions } from './contactUrl.ts';
2
+ export { CONTACT_FORM_URLS, contactFormUrl, contactUrl } from './contactUrl.ts';
@@ -0,0 +1,74 @@
1
+ import type { ReactElement } from 'react';
2
+
3
+ import { NavLink } from '../../chrome/ui/NavLink.tsx';
4
+ import { useLanguage } from '../../i18n/ui/useLanguage.ts';
5
+ import { useChromeT } from '../../i18n/ui/useT.ts';
6
+ import { contactFormUrl, contactUrl } from '../core/contactUrl.ts';
7
+
8
+ /** What the Contact entry of a header needs. */
9
+ export interface ContactButtonProps {
10
+ /** The site the reader writes about, written into the form. */
11
+ siteId: string;
12
+ /**
13
+ * Address of the form, with `{site}` and `{page}` where they are written.
14
+ * @default the family's form in the language of the page (`CONTACT_FORM_URLS`)
15
+ */
16
+ formUrl?: string;
17
+ /**
18
+ * The page the reader is on, written into the form.
19
+ * @default the address of the current page
20
+ */
21
+ page?: string;
22
+ /**
23
+ * What the entry reads. In a compact bar it is not written, but it stays what
24
+ * the pointer and a screen reader are told.
25
+ * @default the chrome's own word for it, in the language of the page
26
+ */
27
+ label?: string;
28
+ /**
29
+ * What the pointer is told.
30
+ * @default the chrome's own sentence, in the language of the page
31
+ */
32
+ title?: string;
33
+ /**
34
+ * Class names added after the component's own.
35
+ * @default undefined
36
+ */
37
+ className?: string;
38
+ }
39
+
40
+ /**
41
+ * The Contact entry of a site header: it opens the family's contact form in a new tab,
42
+ * with the site and the page already filled in, so the reader only writes the message.
43
+ * The form is opened, never embedded, so nothing is loaded from it before the click.
44
+ * @param props - The site, and the form it opens.
45
+ * @returns The entry, or nothing while no form address is set.
46
+ */
47
+ export function ContactButton(props: ContactButtonProps): ReactElement | null {
48
+ const {
49
+ siteId,
50
+ page = globalThis.location?.href ?? '',
51
+ label,
52
+ title,
53
+ className,
54
+ } = props;
55
+ const t = useChromeT();
56
+ const language = useLanguage();
57
+ const formUrl = props.formUrl ?? contactFormUrl(language);
58
+
59
+ if (formUrl === '') return null;
60
+
61
+ return (
62
+ <NavLink
63
+ item={{
64
+ id: 'contact',
65
+ label: label ?? t('chrome.contact'),
66
+ icon: 'chat',
67
+ href: contactUrl(formUrl, { site: siteId, page }),
68
+ external: true,
69
+ title: title ?? t('chrome.contactTitle'),
70
+ }}
71
+ className={className}
72
+ />
73
+ );
74
+ }
@@ -0,0 +1,2 @@
1
+ export type { ContactButtonProps } from './ContactButton.tsx';
2
+ export { ContactButton } from './ContactButton.tsx';
package/src/core.ts CHANGED
@@ -5,6 +5,7 @@ export * from './chart/core/index.ts';
5
5
  export * from './citation/core/index.ts';
6
6
  export * from './clipboard/core/index.ts';
7
7
  export * from './color/core/index.ts';
8
+ export * from './contact/core/index.ts';
8
9
  export * from './credits/core/index.ts';
9
10
  export * from './delimited/core/index.ts';
10
11
  export * from './download/core/index.ts';
@@ -3,6 +3,8 @@
3
3
  "chrome.pages": "Seiten",
4
4
  "chrome.about": "Über",
5
5
  "chrome.aboutTitle": "Was diese Seite ist, worauf sie aufbaut und wie man sie zitiert",
6
+ "chrome.contact": "Kontakt",
7
+ "chrome.contactTitle": "Eine Frage, ein Problem, eine Idee? Schreiben Sie uns",
6
8
  "account.signIn": "Anmelden",
7
9
  "account.signOut": "Abmelden",
8
10
  "account.signedInAs": "Angemeldet als {name}",
@@ -3,6 +3,8 @@
3
3
  "chrome.pages": "Pages",
4
4
  "chrome.about": "About",
5
5
  "chrome.aboutTitle": "What this site is, what it is built on, and how to cite it",
6
+ "chrome.contact": "Contact",
7
+ "chrome.contactTitle": "A question, a problem or an idea? Write to us",
6
8
  "account.signIn": "Sign in",
7
9
  "account.signOut": "Sign out",
8
10
  "account.signedInAs": "Signed in as {name}",
@@ -3,6 +3,8 @@
3
3
  "chrome.pages": "Páginas",
4
4
  "chrome.about": "Acerca de",
5
5
  "chrome.aboutTitle": "Qué es este sitio, en qué se basa y cómo citarlo",
6
+ "chrome.contact": "Contacto",
7
+ "chrome.contactTitle": "¿Una pregunta, un problema, una idea? Escríbanos",
6
8
  "account.signIn": "Iniciar sesión",
7
9
  "account.signOut": "Cerrar sesión",
8
10
  "account.signedInAs": "Sesión iniciada como {name}",
@@ -3,6 +3,8 @@
3
3
  "chrome.pages": "Pages",
4
4
  "chrome.about": "À propos",
5
5
  "chrome.aboutTitle": "Ce qu'est ce site, sur quoi il est bâti et comment le citer",
6
+ "chrome.contact": "Contact",
7
+ "chrome.contactTitle": "Une question, un problème, une idée ? Écrivez-nous",
6
8
  "account.signIn": "Se connecter",
7
9
  "account.signOut": "Se déconnecter",
8
10
  "account.signedInAs": "Connecté comme {name}",
@@ -3,6 +3,8 @@
3
3
  "chrome.pages": "Pagine",
4
4
  "chrome.about": "Informazioni",
5
5
  "chrome.aboutTitle": "Cosa è questo sito, su cosa si basa e come citarlo",
6
+ "chrome.contact": "Contatto",
7
+ "chrome.contactTitle": "Una domanda, un problema, un'idea? Scriveteci",
6
8
  "account.signIn": "Accedi",
7
9
  "account.signOut": "Esci",
8
10
  "account.signedInAs": "Accesso effettuato come {name}",
package/src/ui.ts CHANGED
@@ -4,6 +4,7 @@ export * from './capsule/ui/index.ts';
4
4
  export * from './chart/ui/index.ts';
5
5
  export * from './chrome/ui/index.ts';
6
6
  export * from './citation/ui/index.ts';
7
+ export * from './contact/ui/index.ts';
7
8
  export * from './clipboard/ui/index.ts';
8
9
  export * from './color/ui/index.ts';
9
10
  export * from './confirm/ui/index.ts';
package/styles/chrome.css CHANGED
@@ -192,6 +192,27 @@ button {
192
192
  padding: 0.3rem 0.5rem;
193
193
  }
194
194
 
195
+ /* Every utility of the bar takes the same box, whatever it is built on — a link,
196
+ or a Blueprint button opening a menu — so the marks stand evenly spaced: the
197
+ same padding, no minimum width, no room kept beside the glyph for the hidden
198
+ label, and one glyph size. */
199
+ .app-header-actions .bp6-button:has(> .bp6-icon:not(.bp6-icon-caret-down)) {
200
+ min-width: 0;
201
+ padding: 0.3rem 0.5rem;
202
+ }
203
+
204
+ .app-header-actions
205
+ .bp6-button:has(> .bp6-icon:not(.bp6-icon-caret-down))
206
+ > .bp6-icon {
207
+ margin: 0;
208
+ }
209
+
210
+ .app-header-actions .nav-link--icon > .bp6-icon > svg,
211
+ .app-header-actions .bp6-button > .bp6-icon > svg {
212
+ width: 16px;
213
+ height: 16px;
214
+ }
215
+
195
216
  /* A setting the bar shows as its own values — the language, the scale a
196
217
  temperature is read on — the one in force pressed. The values carry no
197
218
  glyph, which is what keeps them written where a utility is only its mark. */