react-cheminfo 0.51.0 → 0.53.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 +135 -46
- package/lib/host/core/connectHost.d.ts +75 -0
- package/lib/host/core/connectHost.d.ts.map +1 -0
- package/lib/host/core/connectHost.js +171 -0
- package/lib/host/core/connectHost.js.map +1 -0
- package/lib/host/core/hostStructure.d.ts +52 -0
- package/lib/host/core/hostStructure.d.ts.map +1 -0
- package/lib/host/core/hostStructure.js +106 -0
- package/lib/host/core/hostStructure.js.map +1 -0
- package/lib/host/core/index.d.ts +9 -0
- package/lib/host/core/index.d.ts.map +1 -0
- package/lib/host/core/index.js +5 -0
- package/lib/host/core/index.js.map +1 -0
- package/lib/host/core/kinds.d.ts +73 -0
- package/lib/host/core/kinds.d.ts.map +1 -0
- package/lib/host/core/kinds.js +88 -0
- package/lib/host/core/kinds.js.map +1 -0
- package/lib/host/core/protocol.d.ts +134 -0
- package/lib/host/core/protocol.d.ts.map +1 -0
- package/lib/host/core/protocol.js +92 -0
- package/lib/host/core/protocol.js.map +1 -0
- package/lib/host/testing/sciPeaks.d.ts +21 -0
- package/lib/host/testing/sciPeaks.d.ts.map +1 -0
- package/lib/host/testing/sciPeaks.js +62 -0
- package/lib/host/testing/sciPeaks.js.map +1 -0
- package/lib/host/testing/standInHost.d.ts +47 -0
- package/lib/host/testing/standInHost.d.ts.map +1 -0
- package/lib/host/testing/standInHost.js +85 -0
- package/lib/host/testing/standInHost.js.map +1 -0
- package/lib/host/ui/index.d.ts +3 -0
- package/lib/host/ui/index.d.ts.map +1 -0
- package/lib/host/ui/index.js +2 -0
- package/lib/host/ui/index.js.map +1 -0
- package/lib/host/ui/useHostConnection.d.ts +36 -0
- package/lib/host/ui/useHostConnection.d.ts.map +1 -0
- package/lib/host/ui/useHostConnection.js +62 -0
- package/lib/host/ui/useHostConnection.js.map +1 -0
- package/lib/host-testing.d.ts +8 -0
- package/lib/host-testing.d.ts.map +1 -0
- package/lib/host-testing.js +7 -0
- package/lib/host-testing.js.map +1 -0
- package/lib/host.d.ts +11 -0
- package/lib/host.d.ts.map +1 -0
- package/lib/host.js +11 -0
- package/lib/host.js.map +1 -0
- package/lib/i18n/core/chromeCatalog.d.ts +1 -1
- package/lib/i18n/core/chromeCatalog.d.ts.map +1 -1
- 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/package.json +4 -1
- package/src/host/core/connectHost.ts +240 -0
- package/src/host/core/hostStructure.ts +129 -0
- package/src/host/core/index.ts +46 -0
- package/src/host/core/kinds.ts +128 -0
- package/src/host/core/protocol.ts +197 -0
- package/src/host/testing/sciPeaks.ts +66 -0
- package/src/host/testing/standInHost.ts +116 -0
- package/src/host/ui/index.ts +2 -0
- package/src/host/ui/useHostConnection.ts +85 -0
- package/src/host-testing.ts +18 -0
- package/src/host.ts +11 -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
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A whole host, for a tool's end-to-end tests: a page on another origin that
|
|
3
|
+
* frames the tool, answers its `hello` with a private port, sends it requests,
|
|
4
|
+
* and records what comes back.
|
|
5
|
+
*
|
|
6
|
+
* It is written the way an electronic lab notebook would write one: it checks
|
|
7
|
+
* that `hello` came from its frame and from the tool's origin, and connects
|
|
8
|
+
* only then. A real server serves it on `127.0.0.1` while the tool runs on
|
|
9
|
+
* `localhost`, so every message crosses a real origin boundary — and it has to
|
|
10
|
+
* be a real server: Chrome takes a page that Playwright answers itself for a
|
|
11
|
+
* public one, and a public page may not frame a local site.
|
|
12
|
+
*/
|
|
13
|
+
import type { HelloMessage } from '../core/protocol.ts';
|
|
14
|
+
/** A running stand-in host. */
|
|
15
|
+
export interface StandInHost {
|
|
16
|
+
/** Where the host page is served, e.g. `http://127.0.0.1:53211`. */
|
|
17
|
+
origin: string;
|
|
18
|
+
/**
|
|
19
|
+
* The address of a host page that frames `toolUrl` in `#tool` and, once the
|
|
20
|
+
* tool has said `hello`, sends `requests` through the port it hands over.
|
|
21
|
+
* @param toolUrl - The tool's address, `?embed=1` included.
|
|
22
|
+
* @param requests - What to send on the port, in order.
|
|
23
|
+
* @returns The address to open.
|
|
24
|
+
*/
|
|
25
|
+
pageUrl: (toolUrl: string, requests: readonly unknown[]) => string;
|
|
26
|
+
/** Stop serving. */
|
|
27
|
+
close: () => Promise<void>;
|
|
28
|
+
}
|
|
29
|
+
/** What the host page recorded, read with {@link readStandInHostLog}. */
|
|
30
|
+
export interface StandInHostLog {
|
|
31
|
+
/** The tool's `hello`, or `null` before it came. */
|
|
32
|
+
hello: HelloMessage | null;
|
|
33
|
+
/** Every message the tool sent on the port, in order. */
|
|
34
|
+
results: unknown[];
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Serve the host page on a free port of `127.0.0.1`.
|
|
38
|
+
* @returns The host; close it when the tests are done.
|
|
39
|
+
*/
|
|
40
|
+
export declare function startStandInHost(): Promise<StandInHost>;
|
|
41
|
+
/**
|
|
42
|
+
* Read what the host page recorded. Runs in the page: hand it to Playwright's
|
|
43
|
+
* `page.evaluate`, as `page.evaluate(readStandInHostLog)`.
|
|
44
|
+
* @returns The log.
|
|
45
|
+
*/
|
|
46
|
+
export declare function readStandInHostLog(): StandInHostLog;
|
|
47
|
+
//# sourceMappingURL=standInHost.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"standInHost.d.ts","sourceRoot":"","sources":["../../../src/host/testing/standInHost.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAMH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAExD,+BAA+B;AAC/B,MAAM,WAAW,WAAW;IAC1B,oEAAoE;IACpE,MAAM,EAAE,MAAM,CAAC;IACf;;;;;;OAMG;IACH,OAAO,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,SAAS,OAAO,EAAE,KAAK,MAAM,CAAC;IACnE,oBAAoB;IACpB,KAAK,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;CAC5B;AAED,yEAAyE;AACzE,MAAM,WAAW,cAAc;IAC7B,oDAAoD;IACpD,KAAK,EAAE,YAAY,GAAG,IAAI,CAAC;IAC3B,yDAAyD;IACzD,OAAO,EAAE,OAAO,EAAE,CAAC;CACpB;AAED;;;GAGG;AACH,wBAAsB,gBAAgB,IAAI,OAAO,CAAC,WAAW,CAAC,CAyB7D;AAED;;;;GAIG;AACH,wBAAgB,kBAAkB,IAAI,cAAc,CAEnD"}
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A whole host, for a tool's end-to-end tests: a page on another origin that
|
|
3
|
+
* frames the tool, answers its `hello` with a private port, sends it requests,
|
|
4
|
+
* and records what comes back.
|
|
5
|
+
*
|
|
6
|
+
* It is written the way an electronic lab notebook would write one: it checks
|
|
7
|
+
* that `hello` came from its frame and from the tool's origin, and connects
|
|
8
|
+
* only then. A real server serves it on `127.0.0.1` while the tool runs on
|
|
9
|
+
* `localhost`, so every message crosses a real origin boundary — and it has to
|
|
10
|
+
* be a real server: Chrome takes a page that Playwright answers itself for a
|
|
11
|
+
* public one, and a public page may not frame a local site.
|
|
12
|
+
*/
|
|
13
|
+
import { createServer } from 'node:http';
|
|
14
|
+
/**
|
|
15
|
+
* Serve the host page on a free port of `127.0.0.1`.
|
|
16
|
+
* @returns The host; close it when the tests are done.
|
|
17
|
+
*/
|
|
18
|
+
export async function startStandInHost() {
|
|
19
|
+
const server = createServer((_request, response) => {
|
|
20
|
+
response.writeHead(200, { 'content-type': 'text/html; charset=utf-8' });
|
|
21
|
+
response.end(HOST_PAGE);
|
|
22
|
+
});
|
|
23
|
+
await new Promise((resolve) => {
|
|
24
|
+
server.listen(0, '127.0.0.1', resolve);
|
|
25
|
+
});
|
|
26
|
+
const { port } = server.address();
|
|
27
|
+
const origin = `http://127.0.0.1:${port}`;
|
|
28
|
+
return {
|
|
29
|
+
origin,
|
|
30
|
+
pageUrl: (toolUrl, requests) => {
|
|
31
|
+
const setup = encodeURIComponent(JSON.stringify({ toolUrl, requests }));
|
|
32
|
+
return `${origin}/?setup=${setup}`;
|
|
33
|
+
},
|
|
34
|
+
close: () => new Promise((resolve, reject) => {
|
|
35
|
+
server.close((error) => {
|
|
36
|
+
if (error)
|
|
37
|
+
reject(error);
|
|
38
|
+
else
|
|
39
|
+
resolve();
|
|
40
|
+
});
|
|
41
|
+
}),
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Read what the host page recorded. Runs in the page: hand it to Playwright's
|
|
46
|
+
* `page.evaluate`, as `page.evaluate(readStandInHostLog)`.
|
|
47
|
+
* @returns The log.
|
|
48
|
+
*/
|
|
49
|
+
export function readStandInHostLog() {
|
|
50
|
+
return globalThis.hostLog;
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* The page. Its setup is its own `?setup=`, so one page serves every test, and
|
|
54
|
+
* it listens before it frames, so the tool's `hello` cannot be missed.
|
|
55
|
+
*/
|
|
56
|
+
const HOST_PAGE = `<!doctype html>
|
|
57
|
+
<html lang="en">
|
|
58
|
+
<head><meta charset="utf-8"><title>Stand-in host</title></head>
|
|
59
|
+
<body>
|
|
60
|
+
<iframe id="tool" title="The framed tool" style="width: 1280px; height: 800px"></iframe>
|
|
61
|
+
<script>
|
|
62
|
+
const { toolUrl, requests } = JSON.parse(new URLSearchParams(location.search).get('setup'));
|
|
63
|
+
const toolOrigin = new URL(toolUrl).origin;
|
|
64
|
+
const frame = document.querySelector('#tool');
|
|
65
|
+
globalThis.hostLog = { hello: null, results: [] };
|
|
66
|
+
globalThis.addEventListener('message', (event) => {
|
|
67
|
+
if (event.source !== frame.contentWindow || event.origin !== toolOrigin) return;
|
|
68
|
+
if (event.data?.type !== 'cheminfo:hello') return;
|
|
69
|
+
globalThis.hostLog.hello = event.data;
|
|
70
|
+
const channel = new MessageChannel();
|
|
71
|
+
channel.port1.onmessage = (answer) => {
|
|
72
|
+
globalThis.hostLog.results.push(answer.data);
|
|
73
|
+
};
|
|
74
|
+
frame.contentWindow.postMessage(
|
|
75
|
+
{ type: 'cheminfo:connect', version: 1, host: { name: 'Stand-in host' } },
|
|
76
|
+
toolOrigin,
|
|
77
|
+
[channel.port2],
|
|
78
|
+
);
|
|
79
|
+
for (const request of requests) channel.port1.postMessage(request);
|
|
80
|
+
});
|
|
81
|
+
frame.src = toolUrl;
|
|
82
|
+
</script>
|
|
83
|
+
</body>
|
|
84
|
+
</html>`;
|
|
85
|
+
//# sourceMappingURL=standInHost.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"standInHost.js","sourceRoot":"","sources":["../../../src/host/testing/standInHost.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAGH,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AA6BzC;;;GAGG;AACH,MAAM,CAAC,KAAK,UAAU,gBAAgB;IACpC,MAAM,MAAM,GAAW,YAAY,CAAC,CAAC,QAAQ,EAAE,QAAQ,EAAE,EAAE;QACzD,QAAQ,CAAC,SAAS,CAAC,GAAG,EAAE,EAAE,cAAc,EAAE,0BAA0B,EAAE,CAAC,CAAC;QACxE,QAAQ,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;IAC1B,CAAC,CAAC,CAAC;IACH,MAAM,IAAI,OAAO,CAAO,CAAC,OAAO,EAAE,EAAE;QAClC,MAAM,CAAC,MAAM,CAAC,CAAC,EAAE,WAAW,EAAE,OAAO,CAAC,CAAC;IACzC,CAAC,CAAC,CAAC;IACH,MAAM,EAAE,IAAI,EAAE,GAAG,MAAM,CAAC,OAAO,EAAiB,CAAC;IACjD,MAAM,MAAM,GAAG,oBAAoB,IAAI,EAAE,CAAC;IAE1C,OAAO;QACL,MAAM;QACN,OAAO,EAAE,CAAC,OAAO,EAAE,QAAQ,EAAE,EAAE;YAC7B,MAAM,KAAK,GAAG,kBAAkB,CAAC,IAAI,CAAC,SAAS,CAAC,EAAE,OAAO,EAAE,QAAQ,EAAE,CAAC,CAAC,CAAC;YACxE,OAAO,GAAG,MAAM,WAAW,KAAK,EAAE,CAAC;QACrC,CAAC;QACD,KAAK,EAAE,GAAG,EAAE,CACV,IAAI,OAAO,CAAO,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;YACpC,MAAM,CAAC,KAAK,CAAC,CAAC,KAAK,EAAE,EAAE;gBACrB,IAAI,KAAK;oBAAE,MAAM,CAAC,KAAK,CAAC,CAAC;;oBACpB,OAAO,EAAE,CAAC;YACjB,CAAC,CAAC,CAAC;QACL,CAAC,CAAC;KACL,CAAC;AACJ,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,kBAAkB;IAChC,OAAQ,UAAqD,CAAC,OAAO,CAAC;AACxE,CAAC;AAED;;;GAGG;AACH,MAAM,SAAS,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;QA4BV,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/host/ui/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/host/ui/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Connect a tool to the page that frames it, when there is one.
|
|
3
|
+
*
|
|
4
|
+
* The protocol and its schemas are fetched only then, so a visitor on the site
|
|
5
|
+
* itself never downloads them.
|
|
6
|
+
*/
|
|
7
|
+
import type { LoadedInput } from '../core/connectHost.ts';
|
|
8
|
+
import type { ToolInterface } from '../core/protocol.ts';
|
|
9
|
+
/** What a tool does with what its host sends, and what it says about itself. */
|
|
10
|
+
export interface HostHandlers {
|
|
11
|
+
/**
|
|
12
|
+
* Show the inputs of a new document. Throwing means they could not be read:
|
|
13
|
+
* the error's message goes back to the host, and nothing should have changed
|
|
14
|
+
* on screen.
|
|
15
|
+
*/
|
|
16
|
+
load: (inputs: readonly LoadedInput[]) => void;
|
|
17
|
+
/**
|
|
18
|
+
* The build that is running — `BUILD_INFO` from `react-cheminfo/build-info`
|
|
19
|
+
* — so a host can record which version produced what it stores.
|
|
20
|
+
* @default null
|
|
21
|
+
*/
|
|
22
|
+
build?: unknown;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Introduce the tool to its parent frame, or to the window that opened it, and
|
|
26
|
+
* serve that host for the life of the page.
|
|
27
|
+
*
|
|
28
|
+
* Call it after the hook that applies the address: effects run in order, so
|
|
29
|
+
* the address has been applied by the time the host is greeted, and a host's
|
|
30
|
+
* structure replaces the one the frame's link named rather than the reverse.
|
|
31
|
+
* The latest `load` is always the one called, so it may close over state.
|
|
32
|
+
* @param tool - What the tool takes and gives.
|
|
33
|
+
* @param handlers - See {@link HostHandlers}.
|
|
34
|
+
*/
|
|
35
|
+
export declare function useHostConnection(tool: ToolInterface, handlers: HostHandlers): void;
|
|
36
|
+
//# sourceMappingURL=useHostConnection.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useHostConnection.d.ts","sourceRoot":"","sources":["../../../src/host/ui/useHostConnection.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAC1D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAEzD,gFAAgF;AAChF,MAAM,WAAW,YAAY;IAC3B;;;;OAIG;IACH,IAAI,EAAE,CAAC,MAAM,EAAE,SAAS,WAAW,EAAE,KAAK,IAAI,CAAC;IAC/C;;;;OAIG;IACH,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB;AAKD;;;;;;;;;;GAUG;AACH,wBAAgB,iBAAiB,CAC/B,IAAI,EAAE,aAAa,EACnB,QAAQ,EAAE,YAAY,GACrB,IAAI,CAiCN"}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Connect a tool to the page that frames it, when there is one.
|
|
3
|
+
*
|
|
4
|
+
* The protocol and its schemas are fetched only then, so a visitor on the site
|
|
5
|
+
* itself never downloads them.
|
|
6
|
+
*/
|
|
7
|
+
import { useEffect, useRef } from 'react';
|
|
8
|
+
/** Once per page: React may mount the caller twice, the host is greeted once. */
|
|
9
|
+
let started = false;
|
|
10
|
+
/**
|
|
11
|
+
* Introduce the tool to its parent frame, or to the window that opened it, and
|
|
12
|
+
* serve that host for the life of the page.
|
|
13
|
+
*
|
|
14
|
+
* Call it after the hook that applies the address: effects run in order, so
|
|
15
|
+
* the address has been applied by the time the host is greeted, and a host's
|
|
16
|
+
* structure replaces the one the frame's link named rather than the reverse.
|
|
17
|
+
* The latest `load` is always the one called, so it may close over state.
|
|
18
|
+
* @param tool - What the tool takes and gives.
|
|
19
|
+
* @param handlers - See {@link HostHandlers}.
|
|
20
|
+
*/
|
|
21
|
+
export function useHostConnection(tool, handlers) {
|
|
22
|
+
const latest = useRef(handlers);
|
|
23
|
+
useEffect(() => {
|
|
24
|
+
latest.current = handlers;
|
|
25
|
+
});
|
|
26
|
+
useEffect(() => {
|
|
27
|
+
if (started)
|
|
28
|
+
return;
|
|
29
|
+
const host = hostWindow();
|
|
30
|
+
if (host === null)
|
|
31
|
+
return;
|
|
32
|
+
started = true;
|
|
33
|
+
import("../core/connectHost.js")
|
|
34
|
+
.then(({ connectHost }) => {
|
|
35
|
+
connectHost({
|
|
36
|
+
host,
|
|
37
|
+
listen: (listener) => {
|
|
38
|
+
globalThis.addEventListener('message', listener);
|
|
39
|
+
return () => {
|
|
40
|
+
globalThis.removeEventListener('message', listener);
|
|
41
|
+
};
|
|
42
|
+
},
|
|
43
|
+
tool,
|
|
44
|
+
origin: globalThis.location.origin,
|
|
45
|
+
build: latest.current.build ?? null,
|
|
46
|
+
load: (inputs) => {
|
|
47
|
+
latest.current.load(inputs);
|
|
48
|
+
},
|
|
49
|
+
});
|
|
50
|
+
})
|
|
51
|
+
.catch(() => {
|
|
52
|
+
started = false;
|
|
53
|
+
});
|
|
54
|
+
}, [tool]);
|
|
55
|
+
}
|
|
56
|
+
function hostWindow() {
|
|
57
|
+
const { parent, opener } = globalThis.window;
|
|
58
|
+
if (parent !== globalThis.window)
|
|
59
|
+
return parent;
|
|
60
|
+
return opener ?? null;
|
|
61
|
+
}
|
|
62
|
+
//# sourceMappingURL=useHostConnection.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useHostConnection.js","sourceRoot":"","sources":["../../../src/host/ui/useHostConnection.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAqB1C,iFAAiF;AACjF,IAAI,OAAO,GAAG,KAAK,CAAC;AAEpB;;;;;;;;;;GAUG;AACH,MAAM,UAAU,iBAAiB,CAC/B,IAAmB,EACnB,QAAsB;IAEtB,MAAM,MAAM,GAAG,MAAM,CAAC,QAAQ,CAAC,CAAC;IAChC,SAAS,CAAC,GAAG,EAAE;QACb,MAAM,CAAC,OAAO,GAAG,QAAQ,CAAC;IAC5B,CAAC,CAAC,CAAC;IAEH,SAAS,CAAC,GAAG,EAAE;QACb,IAAI,OAAO;YAAE,OAAO;QACpB,MAAM,IAAI,GAAG,UAAU,EAAE,CAAC;QAC1B,IAAI,IAAI,KAAK,IAAI;YAAE,OAAO;QAC1B,OAAO,GAAG,IAAI,CAAC;QACf,MAAM,CAAC,wBAAwB,CAAC;aAC7B,IAAI,CAAC,CAAC,EAAE,WAAW,EAAE,EAAE,EAAE;YACxB,WAAW,CAAC;gBACV,IAAI;gBACJ,MAAM,EAAE,CAAC,QAAQ,EAAE,EAAE;oBACnB,UAAU,CAAC,gBAAgB,CAAC,SAAS,EAAE,QAAQ,CAAC,CAAC;oBACjD,OAAO,GAAG,EAAE;wBACV,UAAU,CAAC,mBAAmB,CAAC,SAAS,EAAE,QAAQ,CAAC,CAAC;oBACtD,CAAC,CAAC;gBACJ,CAAC;gBACD,IAAI;gBACJ,MAAM,EAAE,UAAU,CAAC,QAAQ,CAAC,MAAM;gBAClC,KAAK,EAAE,MAAM,CAAC,OAAO,CAAC,KAAK,IAAI,IAAI;gBACnC,IAAI,EAAE,CAAC,MAAM,EAAE,EAAE;oBACf,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;gBAC9B,CAAC;aACF,CAAC,CAAC;QACL,CAAC,CAAC;aACD,KAAK,CAAC,GAAG,EAAE;YACV,OAAO,GAAG,KAAK,CAAC;QAClB,CAAC,CAAC,CAAC;IACP,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC,CAAC;AACb,CAAC;AAED,SAAS,UAAU;IACjB,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,UAAU,CAAC,MAAM,CAAC;IAC7C,IAAI,MAAM,KAAK,UAAU,CAAC,MAAM;QAAE,OAAO,MAAM,CAAC;IAChD,OAAQ,MAAwB,IAAI,IAAI,CAAC;AAC3C,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A stand-in host for a tool's end-to-end tests, and the messages SciPeaks
|
|
3
|
+
* sends. Node only: it serves a page.
|
|
4
|
+
*/
|
|
5
|
+
export type { StandInHost, StandInHostLog, } from './host/testing/standInHost.ts';
|
|
6
|
+
export { readStandInHostLog, startStandInHost, } from './host/testing/standInHost.ts';
|
|
7
|
+
export { SCIPEAKS_ETHYLBENZENE_LOAD, SCIPEAKS_ETHYLBENZENE_MOLFILE, SCIPEAKS_HOST_NAME, } from './host/testing/sciPeaks.ts';
|
|
8
|
+
//# sourceMappingURL=host-testing.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"host-testing.d.ts","sourceRoot":"","sources":["../src/host-testing.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,YAAY,EACV,WAAW,EACX,cAAc,GACf,MAAM,+BAA+B,CAAC;AACvC,OAAO,EACL,kBAAkB,EAClB,gBAAgB,GACjB,MAAM,+BAA+B,CAAC;AACvC,OAAO,EACL,0BAA0B,EAC1B,6BAA6B,EAC7B,kBAAkB,GACnB,MAAM,4BAA4B,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A stand-in host for a tool's end-to-end tests, and the messages SciPeaks
|
|
3
|
+
* sends. Node only: it serves a page.
|
|
4
|
+
*/
|
|
5
|
+
export { readStandInHostLog, startStandInHost, } from "./host/testing/standInHost.js";
|
|
6
|
+
export { SCIPEAKS_ETHYLBENZENE_LOAD, SCIPEAKS_ETHYLBENZENE_MOLFILE, SCIPEAKS_HOST_NAME, } from "./host/testing/sciPeaks.js";
|
|
7
|
+
//# sourceMappingURL=host-testing.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"host-testing.js","sourceRoot":"","sources":["../src/host-testing.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAMH,OAAO,EACL,kBAAkB,EAClB,gBAAgB,GACjB,MAAM,+BAA+B,CAAC;AACvC,OAAO,EACL,0BAA0B,EAC1B,6BAA6B,EAC7B,kBAAkB,GACnB,MAAM,4BAA4B,CAAC"}
|
package/lib/host.d.ts
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The host protocol: a page that frames a tool — an electronic lab notebook, a
|
|
3
|
+
* course — hands it typed data, checked against pipeline.cheminfo.org's kinds.
|
|
4
|
+
*
|
|
5
|
+
* Its own door because the schemas are checked with ajv. `useHostConnection`
|
|
6
|
+
* fetches ajv and the connection only when the page is framed, so a site that
|
|
7
|
+
* calls it ships nothing extra to a visitor who opened it directly.
|
|
8
|
+
*/
|
|
9
|
+
export * from './host/core/index.ts';
|
|
10
|
+
export * from './host/ui/index.ts';
|
|
11
|
+
//# sourceMappingURL=host.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"host.d.ts","sourceRoot":"","sources":["../src/host.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,cAAc,sBAAsB,CAAC;AACrC,cAAc,oBAAoB,CAAC"}
|
package/lib/host.js
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The host protocol: a page that frames a tool — an electronic lab notebook, a
|
|
3
|
+
* course — hands it typed data, checked against pipeline.cheminfo.org's kinds.
|
|
4
|
+
*
|
|
5
|
+
* Its own door because the schemas are checked with ajv. `useHostConnection`
|
|
6
|
+
* fetches ajv and the connection only when the page is framed, so a site that
|
|
7
|
+
* calls it ships nothing extra to a visitor who opened it directly.
|
|
8
|
+
*/
|
|
9
|
+
export * from "./host/core/index.js";
|
|
10
|
+
export * from "./host/ui/index.js";
|
|
11
|
+
//# sourceMappingURL=host.js.map
|
package/lib/host.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"host.js","sourceRoot":"","sources":["../src/host.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,cAAc,sBAAsB,CAAC;AACrC,cAAc,oBAAoB,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.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"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"siteLanguageContext.d.ts","sourceRoot":"","sources":["../../../src/language/ui/siteLanguageContext.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"siteLanguageContext.d.ts","sourceRoot":"","sources":["../../../src/language/ui/siteLanguageContext.ts"],"names":[],"mappings":"AAKA,sDAAsD;AACtD,eAAO,MAAM,mBAAmB,6CAA+C,CAAC;AAEhF;;;;;;;GAOG;AACH,wBAAgB,eAAe,IAAI,MAAM,GAAG,SAAS,CAIpD"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { createContext, use } from 'react';
|
|
2
|
+
import { pageLocation } from "../../router/core/pageAddress.js";
|
|
2
3
|
import { readLanguageParam } from "../core/languageParam.js";
|
|
3
4
|
/** What a site declares the page is being read in. */
|
|
4
5
|
export const SiteLanguageContext = createContext(undefined);
|
|
@@ -14,6 +15,6 @@ export function useSiteLanguage() {
|
|
|
14
15
|
const declared = use(SiteLanguageContext);
|
|
15
16
|
if (declared !== undefined)
|
|
16
17
|
return declared;
|
|
17
|
-
return readLanguageParam(
|
|
18
|
+
return readLanguageParam(pageLocation()?.search ?? '');
|
|
18
19
|
}
|
|
19
20
|
//# sourceMappingURL=siteLanguageContext.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"siteLanguageContext.js","sourceRoot":"","sources":["../../../src/language/ui/siteLanguageContext.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAE3C,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAE7D,sDAAsD;AACtD,MAAM,CAAC,MAAM,mBAAmB,GAAG,aAAa,CAAqB,SAAS,CAAC,CAAC;AAEhF;;;;;;;GAOG;AACH,MAAM,UAAU,eAAe;IAC7B,MAAM,QAAQ,GAAG,GAAG,CAAC,mBAAmB,CAAC,CAAC;IAC1C,IAAI,QAAQ,KAAK,SAAS;QAAE,OAAO,QAAQ,CAAC;IAC5C,OAAO,iBAAiB,CAAC,
|
|
1
|
+
{"version":3,"file":"siteLanguageContext.js","sourceRoot":"","sources":["../../../src/language/ui/siteLanguageContext.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAE3C,OAAO,EAAE,YAAY,EAAE,MAAM,kCAAkC,CAAC;AAChE,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAE7D,sDAAsD;AACtD,MAAM,CAAC,MAAM,mBAAmB,GAAG,aAAa,CAAqB,SAAS,CAAC,CAAC;AAEhF;;;;;;;GAOG;AACH,MAAM,UAAU,eAAe;IAC7B,MAAM,QAAQ,GAAG,GAAG,CAAC,mBAAmB,CAAC,CAAC;IAC1C,IAAI,QAAQ,KAAK,SAAS;QAAE,OAAO,QAAQ,CAAC;IAC5C,OAAO,iBAAiB,CAAC,YAAY,EAAE,EAAE,MAAM,IAAI,EAAE,CAAC,CAAC;AACzD,CAAC"}
|
package/lib/locales/de.json
CHANGED
|
@@ -54,6 +54,8 @@
|
|
|
54
54
|
"share.layout": "Darstellung",
|
|
55
55
|
"share.embed": "In eine andere Seite einbetten",
|
|
56
56
|
"share.embedHint": "Lässt Kopfzeile und Navigation der Website weg, damit die Seite in einer Seite von Ihnen sitzt.",
|
|
57
|
+
"share.protect": "Diesen Link schützen",
|
|
58
|
+
"share.protectHint": "Die Klasse kann weder lesen noch ändern, was der Link einstellt, und die Adresse der Seite bleibt fest. Die Seite wird eingebettet.",
|
|
57
59
|
"share.on": "Ein",
|
|
58
60
|
"share.off": "Aus",
|
|
59
61
|
"share.showOnPage": "Auf der Seite zeigen",
|
|
@@ -76,6 +78,9 @@
|
|
|
76
78
|
"share.copyIframe": "Iframe kopieren",
|
|
77
79
|
"share.copyIframeHelpTitle": "Die Seite in Ihre einbauen",
|
|
78
80
|
"share.copyIframeHelp": "Ein HTML-Schnipsel, das dort eingefügt wird, wo das HTML Ihrer Seite bearbeitet wird: das Werkzeug läuft dann darin.",
|
|
81
|
+
"seal.refusedTitle": "Dieser Link lässt sich nicht öffnen",
|
|
82
|
+
"seal.refusedBody": "Er wurde nach dem Erstellen verändert oder ist unvollständig, daher wurde nichts geöffnet. Bitten Sie erneut um den Link.",
|
|
83
|
+
"seal.openWithout": "Das Werkzeug ohne den Link öffnen",
|
|
79
84
|
"cite.button": "Zitieren",
|
|
80
85
|
"cite.copyReferenceAs": "Literaturangabe kopieren als",
|
|
81
86
|
"cite.pleaseCiteBoth": "Bitte zitieren Sie beide Arbeiten",
|
package/lib/locales/en.json
CHANGED
|
@@ -54,6 +54,8 @@
|
|
|
54
54
|
"share.layout": "Layout",
|
|
55
55
|
"share.embed": "Embed in another page",
|
|
56
56
|
"share.embedHint": "Drops the site header and its navigation, so the page sits inside a page of your own.",
|
|
57
|
+
"share.protect": "Protect this link",
|
|
58
|
+
"share.protectHint": "The class can neither read nor change what the link sets up, and the page's address stays fixed. The page is embedded.",
|
|
57
59
|
"share.on": "On",
|
|
58
60
|
"share.off": "Off",
|
|
59
61
|
"share.showOnPage": "Show on the page",
|
|
@@ -76,6 +78,9 @@
|
|
|
76
78
|
"share.copyIframe": "Copy the iframe",
|
|
77
79
|
"share.copyIframeHelpTitle": "Put the page inside yours",
|
|
78
80
|
"share.copyIframeHelp": "A snippet of HTML to paste where your own page's HTML is edited: the tool then runs inside it.",
|
|
81
|
+
"seal.refusedTitle": "This link cannot be opened",
|
|
82
|
+
"seal.refusedBody": "It was changed after it was made, or it is incomplete, so nothing was opened. Ask for the link again.",
|
|
83
|
+
"seal.openWithout": "Open the tool without it",
|
|
79
84
|
"cite.button": "Cite",
|
|
80
85
|
"cite.copyReferenceAs": "Copy the reference as",
|
|
81
86
|
"cite.pleaseCiteBoth": "Please cite both works",
|
package/lib/locales/es.json
CHANGED
|
@@ -54,6 +54,8 @@
|
|
|
54
54
|
"share.layout": "Disposición",
|
|
55
55
|
"share.embed": "Incrustar en otra página",
|
|
56
56
|
"share.embedHint": "Quita la cabecera del sitio y su navegación, para que la página quede dentro de una página suya.",
|
|
57
|
+
"share.protect": "Proteger este enlace",
|
|
58
|
+
"share.protectHint": "La clase no puede leer ni cambiar lo que configura el enlace, y la dirección de la página queda fija. La página se integra.",
|
|
57
59
|
"share.on": "Sí",
|
|
58
60
|
"share.off": "No",
|
|
59
61
|
"share.showOnPage": "Mostrar en la página",
|
|
@@ -76,6 +78,9 @@
|
|
|
76
78
|
"share.copyIframe": "Copiar el iframe",
|
|
77
79
|
"share.copyIframeHelpTitle": "Poner la página dentro de la tuya",
|
|
78
80
|
"share.copyIframeHelp": "Un fragmento de HTML para pegar donde se edita el HTML de tu página: la herramienta funciona dentro de él.",
|
|
81
|
+
"seal.refusedTitle": "Este enlace no se puede abrir",
|
|
82
|
+
"seal.refusedBody": "Se modificó después de crearse, o está incompleto, así que no se abrió nada. Pide el enlace de nuevo.",
|
|
83
|
+
"seal.openWithout": "Abrir la herramienta sin el enlace",
|
|
79
84
|
"cite.button": "Citar",
|
|
80
85
|
"cite.copyReferenceAs": "Copiar la referencia como",
|
|
81
86
|
"cite.pleaseCiteBoth": "Por favor, cite ambos trabajos",
|
package/lib/locales/fr.json
CHANGED
|
@@ -54,6 +54,8 @@
|
|
|
54
54
|
"share.layout": "Disposition",
|
|
55
55
|
"share.embed": "Intégrer dans une autre page",
|
|
56
56
|
"share.embedHint": "Retire l'en-tête du site et sa navigation, pour que la page prenne place dans une page à vous.",
|
|
57
|
+
"share.protect": "Protéger ce lien",
|
|
58
|
+
"share.protectHint": "La classe ne peut ni lire ni modifier ce que le lien règle, et l'adresse de la page reste fixe. La page est intégrée.",
|
|
57
59
|
"share.on": "Oui",
|
|
58
60
|
"share.off": "Non",
|
|
59
61
|
"share.showOnPage": "Afficher sur la page",
|
|
@@ -76,6 +78,9 @@
|
|
|
76
78
|
"share.copyIframe": "Copier l'iframe",
|
|
77
79
|
"share.copyIframeHelpTitle": "Mettre la page dans la vôtre",
|
|
78
80
|
"share.copyIframeHelp": "Un extrait de HTML à coller là où le HTML de votre page s'édite : l'outil s'exécute alors à l'intérieur.",
|
|
81
|
+
"seal.refusedTitle": "Ce lien ne peut pas être ouvert",
|
|
82
|
+
"seal.refusedBody": "Il a été modifié après sa création, ou il est incomplet : rien n'a été ouvert. Demandez à nouveau le lien.",
|
|
83
|
+
"seal.openWithout": "Ouvrir l'outil sans ce lien",
|
|
79
84
|
"cite.button": "Citer",
|
|
80
85
|
"cite.copyReferenceAs": "Copier la référence en",
|
|
81
86
|
"cite.pleaseCiteBoth": "Merci de citer les deux travaux",
|
package/lib/locales/it.json
CHANGED
|
@@ -54,6 +54,8 @@
|
|
|
54
54
|
"share.layout": "Disposizione",
|
|
55
55
|
"share.embed": "Incorporare in un'altra pagina",
|
|
56
56
|
"share.embedHint": "Toglie l'intestazione del sito e la sua navigazione, così la pagina sta dentro una pagina propria.",
|
|
57
|
+
"share.protect": "Proteggi questo link",
|
|
58
|
+
"share.protectHint": "La classe non può né leggere né modificare ciò che il link imposta, e l'indirizzo della pagina resta fisso. La pagina viene incorporata.",
|
|
57
59
|
"share.on": "Sì",
|
|
58
60
|
"share.off": "No",
|
|
59
61
|
"share.showOnPage": "Mostra nella pagina",
|
|
@@ -76,6 +78,9 @@
|
|
|
76
78
|
"share.copyIframe": "Copia l'iframe",
|
|
77
79
|
"share.copyIframeHelpTitle": "Mettere la pagina dentro la tua",
|
|
78
80
|
"share.copyIframeHelp": "Un frammento di HTML da incollare dove si modifica l'HTML della tua pagina: lo strumento funziona al suo interno.",
|
|
81
|
+
"seal.refusedTitle": "Questo link non può essere aperto",
|
|
82
|
+
"seal.refusedBody": "È stato modificato dopo la creazione, o è incompleto, quindi non si è aperto nulla. Chiedi di nuovo il link.",
|
|
83
|
+
"seal.openWithout": "Apri lo strumento senza il link",
|
|
79
84
|
"cite.button": "Cita",
|
|
80
85
|
"cite.copyReferenceAs": "Copia il riferimento come",
|
|
81
86
|
"cite.pleaseCiteBoth": "Si prega di citare entrambi i lavori",
|
|
@@ -2,9 +2,10 @@
|
|
|
2
2
|
* The tab router bound to the browser: read the address on screen, write a new
|
|
3
3
|
* one through the History API, and hear every move.
|
|
4
4
|
*
|
|
5
|
-
* The router itself stays pure. Everything here reads
|
|
6
|
-
*
|
|
7
|
-
*
|
|
5
|
+
* The router itself stays pure. Everything here reads and writes the address
|
|
6
|
+
* through `pageLocation` and `pageHistory` — the browser's, or the one a sealed
|
|
7
|
+
* link holds in memory — and does nothing where neither exists, so a prerender
|
|
8
|
+
* script can import a module that uses it.
|
|
8
9
|
*/
|
|
9
10
|
import type { TabRoute, TabRouteInput, TabRouter } from './tabRouter.ts';
|
|
10
11
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"history.d.ts","sourceRoot":"","sources":["../../../src/router/core/history.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"history.d.ts","sourceRoot":"","sources":["../../../src/router/core/history.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAOH,OAAO,KAAK,EAAE,QAAQ,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAEzE;;;GAGG;AACH,eAAO,MAAM,kBAAkB,yBAAyB,CAAC;AAEzD;;;;;;;;GAQG;AACH,wBAAgB,SAAS,CAAC,GAAG,SAAS,MAAM,EAC1C,MAAM,EAAE,SAAS,CAAC,GAAG,CAAC,GACrB,QAAQ,CAAC,GAAG,CAAC,CAQf;AAED,6CAA6C;AAC7C,MAAM,WAAW,iBAAiB;IAChC;;;;;OAKG;IACH,OAAO,CAAC,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM,CAAC;IACtC;;;;;OAKG;IACH,IAAI,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;CAC1B;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,UAAU,CAAC,GAAG,SAAS,MAAM,EAC3C,MAAM,EAAE,SAAS,CAAC,GAAG,CAAC,EACtB,KAAK,EAAE,aAAa,CAAC,GAAG,CAAC,EACzB,OAAO,GAAE,iBAAsB,GAC9B,MAAM,CAsBR;AAED;;;;;;GAMG;AACH,wBAAgB,gBAAgB,CAAC,GAAG,SAAS,MAAM,EACjD,MAAM,EAAE,SAAS,CAAC,GAAG,CAAC,EACtB,QAAQ,EAAE,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,CAAC,KAAK,IAAI,GACvC,MAAM,IAAI,CAUZ;AAED;;;GAGG;AACH,wBAAgB,cAAc,IAAI,MAAM,CAIvC"}
|