react-cheminfo 0.32.0 → 0.34.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 (140) hide show
  1. package/README.md +1 -1
  2. package/lib/axis/core/axisMarks.d.ts +54 -0
  3. package/lib/axis/core/axisMarks.d.ts.map +1 -0
  4. package/lib/axis/core/axisMarks.js +69 -0
  5. package/lib/axis/core/axisMarks.js.map +1 -0
  6. package/lib/axis/core/axisScale.d.ts +31 -0
  7. package/lib/axis/core/axisScale.d.ts.map +1 -0
  8. package/lib/axis/core/axisScale.js +31 -0
  9. package/lib/axis/core/axisScale.js.map +1 -0
  10. package/lib/axis/core/index.d.ts +16 -0
  11. package/lib/axis/core/index.d.ts.map +1 -0
  12. package/lib/axis/core/index.js +13 -0
  13. package/lib/axis/core/index.js.map +1 -0
  14. package/lib/axis/core/logAxisBounds.d.ts +78 -0
  15. package/lib/axis/core/logAxisBounds.d.ts.map +1 -0
  16. package/lib/axis/core/logAxisBounds.js +129 -0
  17. package/lib/axis/core/logAxisBounds.js.map +1 -0
  18. package/lib/axis/ui/AxisScaleControl.d.ts +66 -0
  19. package/lib/axis/ui/AxisScaleControl.d.ts.map +1 -0
  20. package/lib/axis/ui/AxisScaleControl.js +26 -0
  21. package/lib/axis/ui/AxisScaleControl.js.map +1 -0
  22. package/lib/axis/ui/index.d.ts +6 -0
  23. package/lib/axis/ui/index.d.ts.map +1 -0
  24. package/lib/axis/ui/index.js +5 -0
  25. package/lib/axis/ui/index.js.map +1 -0
  26. package/lib/core.d.ts +1 -0
  27. package/lib/core.d.ts.map +1 -1
  28. package/lib/core.js +1 -0
  29. package/lib/core.js.map +1 -1
  30. package/lib/delimited/core/index.d.ts +2 -0
  31. package/lib/delimited/core/index.d.ts.map +1 -1
  32. package/lib/delimited/core/index.js +1 -0
  33. package/lib/delimited/core/index.js.map +1 -1
  34. package/lib/delimited/core/tableRows.d.ts +49 -0
  35. package/lib/delimited/core/tableRows.d.ts.map +1 -0
  36. package/lib/delimited/core/tableRows.js +63 -0
  37. package/lib/delimited/core/tableRows.js.map +1 -0
  38. package/lib/delimited/ui/DelimitedTextPanel.d.ts +9 -0
  39. package/lib/delimited/ui/DelimitedTextPanel.d.ts.map +1 -1
  40. package/lib/delimited/ui/DelimitedTextPanel.js +3 -2
  41. package/lib/delimited/ui/DelimitedTextPanel.js.map +1 -1
  42. package/lib/delimited/ui/TableDataButton.d.ts +96 -0
  43. package/lib/delimited/ui/TableDataButton.d.ts.map +1 -0
  44. package/lib/delimited/ui/TableDataButton.js +39 -0
  45. package/lib/delimited/ui/TableDataButton.js.map +1 -0
  46. package/lib/delimited/ui/index.d.ts +2 -0
  47. package/lib/delimited/ui/index.d.ts.map +1 -1
  48. package/lib/delimited/ui/index.js +1 -0
  49. package/lib/delimited/ui/index.js.map +1 -1
  50. package/lib/i18n/core/chromeCatalog.d.ts +2 -2
  51. package/lib/i18n/core/chromeCatalog.d.ts.map +1 -1
  52. package/lib/i18n/core/chromeCatalog.js +10 -4
  53. package/lib/i18n/core/chromeCatalog.js.map +1 -1
  54. package/lib/i18n/core/index.d.ts +2 -0
  55. package/lib/i18n/core/index.d.ts.map +1 -1
  56. package/lib/i18n/core/index.js +1 -0
  57. package/lib/i18n/core/index.js.map +1 -1
  58. package/lib/i18n/core/languages.d.ts +4 -4
  59. package/lib/i18n/core/languages.d.ts.map +1 -1
  60. package/lib/i18n/core/languages.js +5 -4
  61. package/lib/i18n/core/languages.js.map +1 -1
  62. package/lib/i18n/core/prose.d.ts +32 -0
  63. package/lib/i18n/core/prose.d.ts.map +1 -0
  64. package/lib/i18n/core/prose.js +45 -0
  65. package/lib/i18n/core/prose.js.map +1 -0
  66. package/lib/i18n/ui/Prose.d.ts +28 -0
  67. package/lib/i18n/ui/Prose.d.ts.map +1 -0
  68. package/lib/i18n/ui/Prose.js +14 -0
  69. package/lib/i18n/ui/Prose.js.map +1 -0
  70. package/lib/i18n/ui/index.d.ts +2 -0
  71. package/lib/i18n/ui/index.d.ts.map +1 -1
  72. package/lib/i18n/ui/index.js +1 -0
  73. package/lib/i18n/ui/index.js.map +1 -1
  74. package/lib/locales/de.json +10 -0
  75. package/lib/locales/en.json +10 -0
  76. package/lib/locales/es.json +10 -0
  77. package/lib/locales/fr.json +10 -0
  78. package/lib/locales/it.json +465 -0
  79. package/lib/orbital/ui/AtomicOrbitalCanvas.d.ts +12 -2
  80. package/lib/orbital/ui/AtomicOrbitalCanvas.d.ts.map +1 -1
  81. package/lib/orbital/ui/AtomicOrbitalCanvas.js +17 -3
  82. package/lib/orbital/ui/AtomicOrbitalCanvas.js.map +1 -1
  83. package/lib/orbital/ui/AtomicOrbitalControls.d.ts +10 -5
  84. package/lib/orbital/ui/AtomicOrbitalControls.d.ts.map +1 -1
  85. package/lib/orbital/ui/AtomicOrbitalControls.js +12 -7
  86. package/lib/orbital/ui/AtomicOrbitalControls.js.map +1 -1
  87. package/lib/orbital/ui/AtomicOrbitalViewer.d.ts +8 -1
  88. package/lib/orbital/ui/AtomicOrbitalViewer.d.ts.map +1 -1
  89. package/lib/orbital/ui/AtomicOrbitalViewer.js.map +1 -1
  90. package/lib/periodic/core/index.d.ts +1 -1
  91. package/lib/periodic/core/index.d.ts.map +1 -1
  92. package/lib/periodic/core/index.js +1 -1
  93. package/lib/periodic/core/index.js.map +1 -1
  94. package/lib/periodic/core/layout.d.ts +18 -0
  95. package/lib/periodic/core/layout.d.ts.map +1 -1
  96. package/lib/periodic/core/layout.js +9 -0
  97. package/lib/periodic/core/layout.js.map +1 -1
  98. package/lib/periodic/ui/ElementCell.js +15 -3
  99. package/lib/periodic/ui/ElementCell.js.map +1 -1
  100. package/lib/periodic/ui/PeriodicTable.d.ts +12 -1
  101. package/lib/periodic/ui/PeriodicTable.d.ts.map +1 -1
  102. package/lib/periodic/ui/PeriodicTable.js +25 -3
  103. package/lib/periodic/ui/PeriodicTable.js.map +1 -1
  104. package/lib/ui.d.ts +1 -0
  105. package/lib/ui.d.ts.map +1 -1
  106. package/lib/ui.js +1 -0
  107. package/lib/ui.js.map +1 -1
  108. package/package.json +1 -1
  109. package/src/axis/core/axisMarks.ts +114 -0
  110. package/src/axis/core/axisScale.ts +41 -0
  111. package/src/axis/core/index.ts +20 -0
  112. package/src/axis/core/logAxisBounds.ts +198 -0
  113. package/src/axis/ui/AxisScaleControl.tsx +103 -0
  114. package/src/axis/ui/index.ts +9 -0
  115. package/src/core.ts +1 -0
  116. package/src/delimited/core/index.ts +2 -0
  117. package/src/delimited/core/tableRows.ts +93 -0
  118. package/src/delimited/ui/DelimitedTextPanel.tsx +25 -9
  119. package/src/delimited/ui/TableDataButton.tsx +162 -0
  120. package/src/delimited/ui/index.ts +2 -0
  121. package/src/i18n/core/chromeCatalog.ts +10 -4
  122. package/src/i18n/core/index.ts +2 -0
  123. package/src/i18n/core/languages.ts +5 -4
  124. package/src/i18n/core/prose.ts +53 -0
  125. package/src/i18n/ui/Prose.tsx +47 -0
  126. package/src/i18n/ui/index.ts +2 -0
  127. package/src/locales/de.json +10 -0
  128. package/src/locales/en.json +10 -0
  129. package/src/locales/es.json +10 -0
  130. package/src/locales/fr.json +10 -0
  131. package/src/locales/it.json +465 -0
  132. package/src/orbital/ui/AtomicOrbitalCanvas.tsx +32 -5
  133. package/src/orbital/ui/AtomicOrbitalControls.tsx +26 -6
  134. package/src/orbital/ui/AtomicOrbitalViewer.tsx +8 -1
  135. package/src/periodic/core/index.ts +1 -0
  136. package/src/periodic/core/layout.ts +19 -0
  137. package/src/periodic/ui/ElementCell.tsx +15 -3
  138. package/src/periodic/ui/PeriodicTable.tsx +45 -1
  139. package/src/ui.ts +1 -0
  140. package/styles/chrome.css +71 -0
@@ -4,4 +4,6 @@ export type { ReadDelimitedOptions } from './readDelimited.ts';
4
4
  export { detectDelimiter, readDelimited } from './readDelimited.ts';
5
5
  export type { ToDelimitedOptions } from './toDelimited.ts';
6
6
  export { escapeCell, toDelimited } from './toDelimited.ts';
7
+ export type { TableRecord, TableRows, TableRowsOptions } from './tableRows.ts';
8
+ export { columnsOf, tableRows } from './tableRows.ts';
7
9
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/delimited/core/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,eAAe,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AACpE,OAAO,EACL,iBAAiB,EACjB,iBAAiB,EACjB,eAAe,GAChB,MAAM,iBAAiB,CAAC;AACzB,YAAY,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAC/D,OAAO,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACpE,YAAY,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAC3D,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/delimited/core/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,eAAe,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AACpE,OAAO,EACL,iBAAiB,EACjB,iBAAiB,EACjB,eAAe,GAChB,MAAM,iBAAiB,CAAC;AACzB,YAAY,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAC/D,OAAO,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACpE,YAAY,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAC3D,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC3D,YAAY,EAAE,WAAW,EAAE,SAAS,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAC/E,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC"}
@@ -1,4 +1,5 @@
1
1
  export { DEFAULT_DELIMITER, DELIMITER_CHOICES, delimiterChoice, } from "./delimiters.js";
2
2
  export { detectDelimiter, readDelimited } from "./readDelimited.js";
3
3
  export { escapeCell, toDelimited } from "./toDelimited.js";
4
+ export { columnsOf, tableRows } from "./tableRows.js";
4
5
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/delimited/core/index.ts"],"names":[],"mappings":"AACA,OAAO,EACL,iBAAiB,EACjB,iBAAiB,EACjB,eAAe,GAChB,MAAM,iBAAiB,CAAC;AAEzB,OAAO,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAEpE,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/delimited/core/index.ts"],"names":[],"mappings":"AACA,OAAO,EACL,iBAAiB,EACjB,iBAAiB,EACjB,eAAe,GAChB,MAAM,iBAAiB,CAAC;AAEzB,OAAO,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAEpE,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAE3D,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC"}
@@ -0,0 +1,49 @@
1
+ /**
2
+ * Turning a list of records into the cells a table is handed over as.
3
+ *
4
+ * Most pages hold their data as one object per row — a query result, a list of
5
+ * peaks, a row of properties — while a delimited table is cells. Every site
6
+ * that exports such a list wrote the same two loops, so they are here once.
7
+ */
8
+ /** One record, as a page holds it before it becomes a row of cells. */
9
+ export type TableRecord = Record<string, unknown>;
10
+ /** How a record becomes cells. */
11
+ export interface TableRowsOptions {
12
+ /**
13
+ * The columns to write, in order. A column no record carries comes out
14
+ * empty, which is what lets one caller pin the order of a table whose first
15
+ * record happens to be missing a field.
16
+ * @default the keys of the first record, in the order it declares them
17
+ */
18
+ columns?: readonly string[];
19
+ /**
20
+ * How a value becomes a cell.
21
+ * @default `String(value)`, with `null` and `undefined` written as nothing
22
+ */
23
+ format?: (value: unknown, column: string) => string;
24
+ }
25
+ /** The columns, and the cells under them. */
26
+ export interface TableRows {
27
+ /** Column names, in the order the cells are written. */
28
+ header: string[];
29
+ /** One array of cells per record. */
30
+ rows: string[][];
31
+ }
32
+ /**
33
+ * The records as the header and cells of a table.
34
+ * @param records - The records, in the order they are shown.
35
+ * @param options - See {@link TableRowsOptions}.
36
+ * @returns See {@link TableRows}.
37
+ */
38
+ export declare function tableRows(records: readonly TableRecord[], options?: TableRowsOptions): TableRows;
39
+ /**
40
+ * Every column the records carry, each named once, in the order first seen.
41
+ *
42
+ * Every record is read rather than only the first, because a list whose later
43
+ * records carry a field the first one happens to lack would otherwise be
44
+ * handed over with that column silently missing.
45
+ * @param records - The records.
46
+ * @returns The column names.
47
+ */
48
+ export declare function columnsOf(records: readonly TableRecord[]): string[];
49
+ //# sourceMappingURL=tableRows.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tableRows.d.ts","sourceRoot":"","sources":["../../../src/delimited/core/tableRows.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,uEAAuE;AACvE,MAAM,MAAM,WAAW,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;AAElD,kCAAkC;AAClC,MAAM,WAAW,gBAAgB;IAC/B;;;;;OAKG;IACH,OAAO,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IAC5B;;;OAGG;IACH,MAAM,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,KAAK,MAAM,CAAC;CACrD;AAED,6CAA6C;AAC7C,MAAM,WAAW,SAAS;IACxB,wDAAwD;IACxD,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,qCAAqC;IACrC,IAAI,EAAE,MAAM,EAAE,EAAE,CAAC;CAClB;AAED;;;;;GAKG;AACH,wBAAgB,SAAS,CACvB,OAAO,EAAE,SAAS,WAAW,EAAE,EAC/B,OAAO,GAAE,gBAAqB,GAC7B,SAAS,CAUX;AAED;;;;;;;;GAQG;AACH,wBAAgB,SAAS,CAAC,OAAO,EAAE,SAAS,WAAW,EAAE,GAAG,MAAM,EAAE,CAWnE"}
@@ -0,0 +1,63 @@
1
+ /**
2
+ * Turning a list of records into the cells a table is handed over as.
3
+ *
4
+ * Most pages hold their data as one object per row — a query result, a list of
5
+ * peaks, a row of properties — while a delimited table is cells. Every site
6
+ * that exports such a list wrote the same two loops, so they are here once.
7
+ */
8
+ /**
9
+ * The records as the header and cells of a table.
10
+ * @param records - The records, in the order they are shown.
11
+ * @param options - See {@link TableRowsOptions}.
12
+ * @returns See {@link TableRows}.
13
+ */
14
+ export function tableRows(records, options = {}) {
15
+ const { columns, format = defaultCell } = options;
16
+ const header = [...(columns ?? columnsOf(records))];
17
+ const rows = [];
18
+ for (const record of records) {
19
+ const cells = [];
20
+ for (const column of header)
21
+ cells.push(format(record[column], column));
22
+ rows.push(cells);
23
+ }
24
+ return { header, rows };
25
+ }
26
+ /**
27
+ * Every column the records carry, each named once, in the order first seen.
28
+ *
29
+ * Every record is read rather than only the first, because a list whose later
30
+ * records carry a field the first one happens to lack would otherwise be
31
+ * handed over with that column silently missing.
32
+ * @param records - The records.
33
+ * @returns The column names.
34
+ */
35
+ export function columnsOf(records) {
36
+ const columns = [];
37
+ const seen = new Set();
38
+ for (const record of records) {
39
+ for (const column of Object.keys(record)) {
40
+ if (seen.has(column))
41
+ continue;
42
+ seen.add(column);
43
+ columns.push(column);
44
+ }
45
+ }
46
+ return columns;
47
+ }
48
+ function defaultCell(value) {
49
+ if (value === null || value === undefined)
50
+ return '';
51
+ if (typeof value === 'string')
52
+ return value;
53
+ if (typeof value === 'number' ||
54
+ typeof value === 'bigint' ||
55
+ typeof value === 'boolean') {
56
+ return String(value);
57
+ }
58
+ // Anything else left in a cell has no honest text form, and `[object Object]`
59
+ // is the one answer a spreadsheet can do nothing with. JSON at least says
60
+ // what was there; a caller who wants better passes `format`.
61
+ return JSON.stringify(value) ?? '';
62
+ }
63
+ //# sourceMappingURL=tableRows.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tableRows.js","sourceRoot":"","sources":["../../../src/delimited/core/tableRows.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AA6BH;;;;;GAKG;AACH,MAAM,UAAU,SAAS,CACvB,OAA+B,EAC/B,UAA4B,EAAE;IAE9B,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,WAAW,EAAE,GAAG,OAAO,CAAC;IAClD,MAAM,MAAM,GAAG,CAAC,GAAG,CAAC,OAAO,IAAI,SAAS,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;IACpD,MAAM,IAAI,GAAe,EAAE,CAAC;IAC5B,KAAK,MAAM,MAAM,IAAI,OAAO,EAAE,CAAC;QAC7B,MAAM,KAAK,GAAa,EAAE,CAAC;QAC3B,KAAK,MAAM,MAAM,IAAI,MAAM;YAAE,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC,CAAC,CAAC;QACxE,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IACnB,CAAC;IACD,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;AAC1B,CAAC;AAED;;;;;;;;GAQG;AACH,MAAM,UAAU,SAAS,CAAC,OAA+B;IACvD,MAAM,OAAO,GAAa,EAAE,CAAC;IAC7B,MAAM,IAAI,GAAG,IAAI,GAAG,EAAU,CAAC;IAC/B,KAAK,MAAM,MAAM,IAAI,OAAO,EAAE,CAAC;QAC7B,KAAK,MAAM,MAAM,IAAI,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,CAAC;YACzC,IAAI,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC;gBAAE,SAAS;YAC/B,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;YACjB,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;QACvB,CAAC;IACH,CAAC;IACD,OAAO,OAAO,CAAC;AACjB,CAAC;AAED,SAAS,WAAW,CAAC,KAAc;IACjC,IAAI,KAAK,KAAK,IAAI,IAAI,KAAK,KAAK,SAAS;QAAE,OAAO,EAAE,CAAC;IACrD,IAAI,OAAO,KAAK,KAAK,QAAQ;QAAE,OAAO,KAAK,CAAC;IAC5C,IACE,OAAO,KAAK,KAAK,QAAQ;QACzB,OAAO,KAAK,KAAK,QAAQ;QACzB,OAAO,KAAK,KAAK,SAAS,EAC1B,CAAC;QACD,OAAO,MAAM,CAAC,KAAK,CAAC,CAAC;IACvB,CAAC;IACD,8EAA8E;IAC9E,0EAA0E;IAC1E,6DAA6D;IAC7D,OAAO,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC;AACrC,CAAC"}
@@ -41,6 +41,15 @@ export interface DelimitedTextPanelProps {
41
41
  * @default 320
42
42
  */
43
43
  height?: number;
44
+ /**
45
+ * What is shown in place of the text area. A caller with more rows than a
46
+ * text area can hold — a spectrum of a hundred thousand points — passes its
47
+ * own virtualized table here; what is copied and what is saved stay the
48
+ * serialized text either way, so the preview can shorten a number the file
49
+ * keeps in full.
50
+ * @default undefined — the text itself, in a read-only text area
51
+ */
52
+ preview?: ReactNode;
44
53
  /**
45
54
  * Class names added to the root element, after the component's own.
46
55
  * @default undefined
@@ -1 +1 @@
1
- {"version":3,"file":"DelimitedTextPanel.d.ts","sourceRoot":"","sources":["../../../src/delimited/ui/DelimitedTextPanel.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAiB,YAAY,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAUpE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAIzD,8CAA8C;AAC9C,MAAM,WAAW,uBAAuB;IACtC,qCAAqC;IACrC,IAAI,EAAE,aAAa,CAAC,SAAS,MAAM,EAAE,CAAC,CAAC;IACvC;;;OAGG;IACH,MAAM,CAAC,EAAE,SAAS,MAAM,EAAE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ACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;;;;;;GASG;AACH,wBAAgB,kBAAkB,CAChC,KAAK,EAAE,uBAAuB,GAC7B,YAAY,CAiFd"}
@@ -21,7 +21,7 @@ import { toDelimited } from "../core/toDelimited.js";
21
21
  * @returns The panel.
22
22
  */
23
23
  export function DelimitedTextPanel(props) {
24
- const { className, rows, header, description, fileName = 'table', defaultDelimiter = 'tab', downloadable = true, label, height = 320, } = props;
24
+ const { className, rows, header, description, fileName = 'table', defaultDelimiter = 'tab', downloadable = true, label, height = 320, preview, } = props;
25
25
  const t = useChromeT();
26
26
  const [delimiterId, setDelimiterId] = useState(defaultDelimiter);
27
27
  const choice = delimiterChoice(delimiterId);
@@ -32,7 +32,7 @@ export function DelimitedTextPanel(props) {
32
32
  : 'delimited.descriptionMany', { count: formatInteger(rows.length) }) }), _jsxs("div", { style: CONTROLS_STYLE, children: [_jsx("span", { style: LABEL_STYLE, children: t('delimited.separator') }), _jsx(SegmentedControl, { size: "small", options: DELIMITER_CHOICES.map((option) => ({
33
33
  label: option.label,
34
34
  value: option.id,
35
- })), value: choice.id, onValueChange: setDelimiterId }), _jsx("span", { style: SPACER_STYLE }), downloadable ? (_jsx(Button, { icon: "download", text: t('delimited.save'), size: "small", onClick: () => downloadText(text, `${sanitizeFileName(fileName, 'table')}.${choice.extension}`, `${choice.mimeType};charset=utf-8`) })) : null, _jsx(CopyButton, { content: text, label: t('delimited.copy'), icon: "clipboard", small: true })] }), _jsx("textarea", { readOnly: true, value: text, spellCheck: false, "aria-label": label ?? t('delimited.tableAsText'), className: Classes.INPUT, style: { ...TEXT_STYLE, height }, onFocus: (event) => event.currentTarget.select() })] }));
35
+ })), value: choice.id, onValueChange: setDelimiterId }), _jsx("span", { style: SPACER_STYLE }), downloadable ? (_jsx(Button, { icon: "download", text: t('delimited.save'), size: "small", onClick: () => downloadText(text, `${sanitizeFileName(fileName, 'table')}.${choice.extension}`, `${choice.mimeType};charset=utf-8`) })) : null, _jsx(CopyButton, { content: text, label: t('delimited.copy'), icon: "clipboard", small: true })] }), preview === undefined ? (_jsx("textarea", { readOnly: true, value: text, spellCheck: false, "aria-label": label ?? t('delimited.tableAsText'), className: Classes.INPUT, style: { ...TEXT_STYLE, height }, onFocus: (event) => event.currentTarget.select() })) : (_jsx("div", { style: PREVIEW_STYLE, children: preview }))] }));
36
36
  }
37
37
  const CONTROLS_STYLE = {
38
38
  display: 'flex',
@@ -46,6 +46,7 @@ const LABEL_STYLE = {
46
46
  fontSize: 12,
47
47
  };
48
48
  const SPACER_STYLE = { flex: 1 };
49
+ const PREVIEW_STYLE = { marginTop: 12 };
49
50
  const TEXT_STYLE = {
50
51
  width: '100%',
51
52
  marginTop: 12,
@@ -1 +1 @@
1
- {"version":3,"file":"DelimitedTextPanel.js","sourceRoot":"","sources":["../../../src/delimited/ui/DelimitedTextPanel.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAE/E,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAE1C,OAAO,EAAE,UAAU,EAAE,MAAM,kCAAmC,CAAC;AAC/D,OAAO,EAAE,YAAY,EAAE,MAAM,qCAAqC,CAAC;AACnE,OAAO,EAAE,gBAAgB,EAAE,MAAM,yCAAyC,CAAC;AAC3E,OAAO,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;AAC7D,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACnD,OAAO,EAAE,cAAc,EAAE,MAAM,mCAAmC,CAAC;AACnE,OAAO,EAAE,KAAK,EAAE,MAAM,mCAAmC,CAAC;AAE1D,OAAO,EAAE,iBAAiB,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAC3E,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAkDrD;;;;;;;;;GASG;AACH,MAAM,UA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C,CAAC;AAEzE,MAAM,UAAU,GAAG;IACjB,KAAK,EAAE,MAAM;IACb,SAAS,EAAE,EAAE;IACb,SAAS,EAAE,YAAY;IACvB,UAAU,EAAE,gDAAgD;IAC5D,QAAQ,EAAE,EAAE;IACZ,SAAS,EAAE,MAAM;IACjB,YAAY,EAAE,QAAQ;IACtB,UAAU,EAAE,KAAK;CACe,CAAC"}
@@ -0,0 +1,96 @@
1
+ import type { IconName } from '@blueprintjs/core';
2
+ import type { ReactElement, ReactNode } from 'react';
3
+ import type { DelimitedTextDialogProps } from './DelimitedTextDialog.tsx';
4
+ /** The cells of a table, one array per line. */
5
+ type TableRows = ReadonlyArray<readonly string[]>;
6
+ /** What {@link TableDataButton} hands over, and how the button reads. */
7
+ export interface TableDataButtonProps extends Omit<DelimitedTextDialogProps, 'isOpen' | 'onClose' | 'rows'> {
8
+ /**
9
+ * The cells, one array per line. A function is called when the dialog opens
10
+ * and not before, which is what a table built out of a computation has to
11
+ * be: formatting a thousand points into strings on every render, for a
12
+ * button nobody may press, is a page that stutters while it is used.
13
+ */
14
+ rows: TableRows | (() => TableRows);
15
+ /**
16
+ * Text of the button. Left out for an icon-only button, which is what a
17
+ * dense toolbar over a table wants.
18
+ * @default undefined — the button is reduced to its icon
19
+ */
20
+ text?: string;
21
+ /**
22
+ * Glyph on the button.
23
+ * @default 'th'
24
+ */
25
+ icon?: IconName;
26
+ /**
27
+ * Whether the button drops its background, for a toolbar or a card header.
28
+ * @default true
29
+ */
30
+ minimal?: boolean;
31
+ /**
32
+ * Whether the button is the small size.
33
+ * @default false
34
+ */
35
+ small?: boolean;
36
+ /**
37
+ * What the pointer and a screen reader are told. The dialog's own `title`
38
+ * names the table — `Titration curve as a table` — while this names the
39
+ * affordance, and the two are deliberately not the same string: the heading
40
+ * is the site's to write, the button's name is the family's, so the control
41
+ * reads the same on every tool a visitor opens that week.
42
+ * @default the chrome's own line, in the language of the page
43
+ */
44
+ tooltip?: string;
45
+ /**
46
+ * Whether there is nothing to hand over. A table that has not been computed
47
+ * yet says so by being greyed rather than by opening an empty dialog.
48
+ * @default whether there are no rows — and `false` where `rows` is a
49
+ * function, which is not called to find out
50
+ */
51
+ disabled?: boolean;
52
+ /**
53
+ * Class the button carries, so a site can reach it from its stylesheet — a
54
+ * terminal whose green the chrome's muted grey is unreadable against, a
55
+ * toolbar with its own metrics.
56
+ * @default undefined
57
+ */
58
+ buttonClassName?: string;
59
+ /**
60
+ * Value of the `data-testid` attribute of the button.
61
+ * @default undefined
62
+ */
63
+ testId?: string;
64
+ /**
65
+ * The control in place of the Blueprint button, for a page whose chrome is
66
+ * not Blueprint's — a `react-science` toolbar, a site's own toolbar button.
67
+ * It is handed the function that opens the dialog.
68
+ *
69
+ * It exists so the dialog, the separator, the copy, the save and the wording
70
+ * are shared even where the button cannot be: a site that keeps its own
71
+ * trigger should not also be keeping its own dialog.
72
+ * @default a Blueprint button carrying the glyph and the text
73
+ */
74
+ trigger?: (open: () => void) => ReactNode;
75
+ }
76
+ /**
77
+ * The one control that takes a table off the page: copy it, or save it.
78
+ *
79
+ * It is a button and a dialog together rather than a dialog a site has to hold
80
+ * open itself, because the state behind it is the same three lines in every
81
+ * site and because the wording is not a site's to choose. An audit in
82
+ * September 2026 found the same affordance spelled `Export as TSV` on one
83
+ * site, `Copy as TSV` on another and `Copy or download data` on a third, which
84
+ * reads as three different features to anybody who uses two of our tools in a
85
+ * week.
86
+ *
87
+ * It is also deliberately not named after a separator. The dialog behind it
88
+ * writes tab-, comma- or semicolon-separated text, so a button that says TSV
89
+ * is wrong two times out of three — and a reader looking for CSV concludes the
90
+ * tool cannot give it to them.
91
+ * @param props - See {@link TableDataButtonProps}.
92
+ * @returns The button and its dialog.
93
+ */
94
+ export declare function TableDataButton(props: TableDataButtonProps): ReactElement;
95
+ export {};
96
+ //# sourceMappingURL=TableDataButton.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TableDataButton.d.ts","sourceRoot":"","sources":["../../../src/delimited/ui/TableDataButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAElD,OAAO,KAAK,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAKrD,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,2BAA2B,CAAC;AAG1E,gDAAgD;AAChD,KAAK,SAAS,GAAG,aAAa,CAAC,SAAS,MAAM,EAAE,CAAC,CAAC;AAKlD,yEAAyE;AACzE,MAAM,WAAW,oBAAqB,SAAQ,IAAI,CAChD,wBAAwB,EACxB,QAAQ,GAAG,SAAS,GAAG,MAAM,CAC9B;IACC;;;;;OAKG;IACH,IAAI,EAAE,SAAS,GAAG,CAAC,MAAM,SAAS,CAAC,CAAC;IACpC;;;;OAIG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;;OAGG;IACH,IAAI,CAAC,EAAE,QAAQ,CAAC;IAChB;;;OAGG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;;OAGG;IACH,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB;;;;;;;OAOG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB;;;;;OAKG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;;;OAKG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;;;;;;;;OASG;IACH,OAAO,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,IAAI,KAAK,SAAS,CAAC;CAC3C;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,oBAAoB,GAAG,YAAY,CAqDzE"}
@@ -0,0 +1,39 @@
1
+ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { Button } from '@blueprintjs/core';
3
+ import { useState } from 'react';
4
+ import { useChromeT } from "../../i18n/ui/useT.js";
5
+ import { DelimitedTextDialog } from "./DelimitedTextDialog.js";
6
+ /** What the shut dialog is handed, so it holds no copy of the last table. */
7
+ const EMPTY = [];
8
+ /**
9
+ * The one control that takes a table off the page: copy it, or save it.
10
+ *
11
+ * It is a button and a dialog together rather than a dialog a site has to hold
12
+ * open itself, because the state behind it is the same three lines in every
13
+ * site and because the wording is not a site's to choose. An audit in
14
+ * September 2026 found the same affordance spelled `Export as TSV` on one
15
+ * site, `Copy as TSV` on another and `Copy or download data` on a third, which
16
+ * reads as three different features to anybody who uses two of our tools in a
17
+ * week.
18
+ *
19
+ * It is also deliberately not named after a separator. The dialog behind it
20
+ * writes tab-, comma- or semicolon-separated text, so a button that says TSV
21
+ * is wrong two times out of three — and a reader looking for CSV concludes the
22
+ * tool cannot give it to them.
23
+ * @param props - See {@link TableDataButtonProps}.
24
+ * @returns The button and its dialog.
25
+ */
26
+ export function TableDataButton(props) {
27
+ const { rows, text, icon = 'th', minimal = true, small = false, tooltip, disabled, testId, trigger, buttonClassName, ...dialog } = props;
28
+ const t = useChromeT();
29
+ // The cells are held rather than read on every render, so a `rows` function
30
+ // is called once per opening and the closed button costs nothing at all.
31
+ const [shown, setShown] = useState(null);
32
+ const told = tooltip ?? t('delimited.copyOrDownload');
33
+ const nothing = disabled ?? (typeof rows === 'function' ? false : rows.length === 0);
34
+ function show() {
35
+ setShown(typeof rows === 'function' ? rows() : rows);
36
+ }
37
+ return (_jsxs(_Fragment, { children: [trigger ? (trigger(show)) : (_jsx(Button, { className: buttonClassName, icon: icon, text: text, variant: minimal ? 'minimal' : 'solid', size: small ? 'small' : 'medium', disabled: nothing, title: told, "aria-label": text ?? told, "data-testid": testId, onClick: show })), _jsx(DelimitedTextDialog, { ...dialog, rows: shown ?? EMPTY, isOpen: shown !== null, onClose: () => setShown(null) })] }));
38
+ }
39
+ //# sourceMappingURL=TableDataButton.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TableDataButton.js","sourceRoot":"","sources":["../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I,EAAE,IAAI,EACV,IAAI,EAAE,IAAI,EACV,OAAO,EAAE,OAAO,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,OAAO,EACtC,IAAI,EAAE,KAAK,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,QAAQ,EAChC,QAAQ,EAAE,OAAO,EACjB,KAAK,EAAE,IAAI,gBACC,IAAI,IAAI,IAAI,iBACX,MAAM,EACnB,OAAO,EAAE,IAAI,GACb,CACH,EACD,KAAC,mBAAmB,OACd,MAAM,EACV,IAAI,EAAE,KAAK,IAAI,KAAK,EACpB,MAAM,EAAE,KAAK,KAAK,IAAI,EACtB,OAAO,EAAE,GAAG,EAAE,CAAC,QAAQ,CAAC,IAAI,CAAC,GAC7B,IACD,CACJ,CAAC;AACJ,CAAC"}
@@ -2,4 +2,6 @@ export type { DelimitedTextDialogProps } from './DelimitedTextDialog.tsx';
2
2
  export { DelimitedTextDialog } from './DelimitedTextDialog.tsx';
3
3
  export type { DelimitedTextPanelProps } from './DelimitedTextPanel.tsx';
4
4
  export { DelimitedTextPanel } from './DelimitedTextPanel.tsx';
5
+ export type { TableDataButtonProps } from './TableDataButton.tsx';
6
+ export { TableDataButton } from './TableDataButton.tsx';
5
7
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/delimited/ui/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,wBAAwB,EAAE,MAAM,2BAA2B,CAAC;AAC1E,OAAO,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAChE,YAAY,EAAE,uBAAuB,EAAE,MAAM,0BAA0B,CAAC;AACxE,OAAO,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/delimited/ui/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,wBAAwB,EAAE,MAAM,2BAA2B,CAAC;AAC1E,OAAO,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAChE,YAAY,EAAE,uBAAuB,EAAE,MAAM,0BAA0B,CAAC;AACxE,OAAO,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAC9D,YAAY,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AAClE,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC"}
@@ -1,3 +1,4 @@
1
1
  export { DelimitedTextDialog } from "./DelimitedTextDialog.js";
2
2
  export { DelimitedTextPanel } from "./DelimitedTextPanel.js";
3
+ export { TableDataButton } from "./TableDataButton.js";
3
4
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/delimited/ui/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA2B,CAAC;AAEhE,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAA0B,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/delimited/ui/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA2B,CAAC;AAEhE,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAA0B,CAAC;AAE9D,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAuB,CAAC"}
@@ -14,8 +14,8 @@ export declare const CHROME_CATALOG_ID = "react-cheminfo";
14
14
  export type ChromeKey = keyof typeof en;
15
15
  /**
16
16
  * The chrome's messages. English is part of the page because it is what a
17
- * missing message falls back to; the other three arrive as a chunk of their
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" | "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.dialogTitle" | "share.lead" | "share.layout" | "share.embed" | "share.embedHint" | "share.showOnPage" | "share.custom" | "share.link" | "share.copyLink" | "share.openInNewTab" | "share.iframe" | "share.copyIframe" | "share.done" | "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.licenceAndSource" | "about.licence" | "about.foundAProblem" | "about.reportIt" | "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.colourScale" | "color.legendLabel" | "color.scaleBeingEdited" | "color.anchorColour" | "color.anchorPosition" | "color.removeAnchor" | "color.addColour" | "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.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" | "delimited.copyTable" | "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" | "periodic.table" | "periodic.group" | "periodic.period" | "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.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.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">;
20
+ export declare const CHROME_CATALOG: MessageCatalog<"language.label" | "chrome.pages" | "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.dialogTitle" | "share.lead" | "share.layout" | "share.embed" | "share.embedHint" | "share.showOnPage" | "share.custom" | "share.link" | "share.copyLink" | "share.openInNewTab" | "share.iframe" | "share.copyIframe" | "share.done" | "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.licenceAndSource" | "about.licence" | "about.foundAProblem" | "about.reportIt" | "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.colourScale" | "color.legendLabel" | "color.scaleBeingEdited" | "color.anchorColour" | "color.anchorPosition" | "color.removeAnchor" | "color.addColour" | "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.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" | "periodic.table" | "periodic.group" | "periodic.period" | "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.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">;
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,03ZAUzB,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,0jaAgBzB,CAAC"}
@@ -12,7 +12,7 @@ import { MessageCatalog } from "./messageCatalog.js";
12
12
  export const CHROME_CATALOG_ID = 'react-cheminfo';
13
13
  /**
14
14
  * The chrome's messages. English is part of the page because it is what a
15
- * missing message falls back to; the other three arrive as a chunk of their
15
+ * missing message falls back to; every other language arrives as a chunk of its
16
16
  * own, so a site read only in English downloads none of them.
17
17
  */
18
18
  export const CHROME_CATALOG = new MessageCatalog({
@@ -20,10 +20,16 @@ export const CHROME_CATALOG = new MessageCatalog({
20
20
  repository: 'cheminfo/react-cheminfo',
21
21
  directory: 'src/locales',
22
22
  source: en,
23
+ // No `with { type: 'json' }` on these: Vite turns a JSON file into a real
24
+ // JavaScript module, and the attribute makes the browser refuse the chunk it
25
+ // serves for being `text/javascript` — the chrome then stays in English with
26
+ // nothing failing at build or type-check time. The English import above is
27
+ // static, so the bundler resolves it before a browser ever sees it.
23
28
  translations: {
24
- fr: () => import('../../locales/fr.json', { with: { type: 'json' } }),
25
- de: () => import('../../locales/de.json', { with: { type: 'json' } }),
26
- es: () => import('../../locales/es.json', { with: { type: 'json' } }),
29
+ fr: () => import('../../locales/fr.json'),
30
+ de: () => import('../../locales/de.json'),
31
+ es: () => import('../../locales/es.json'),
32
+ it: () => import('../../locales/it.json'),
27
33
  },
28
34
  });
29
35
  //# sourceMappingURL=chromeCatalog.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"chromeCatalog.js","sourceRoot":"","sources":["../../../src/i18n/core/chromeCatalog.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,MAAM,uBAAuB,CAAC,OAAO,IAAI,EAAE,MAAM,EAAE,CAAC;AAE7D,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAErD,2DAA2D;AAC3D,MAAM,CAAC,MAAM,iBAAiB,GAAG,gBAAgB,C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,GAAG,EAAE,CAAC,MAAM,CAAC,uBAAuB,CAAC;QACzC,EAAE,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,uBAAuB,CAAC;QACzC,EAAE,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,uBAAuB,CAAC;KAC1C;CACF,CAAC,CAAC"}
@@ -5,6 +5,8 @@ export { DEFAULT_LANGUAGE, LANGUAGES, LANGUAGE_LABELS, isLanguage, } from './lan
5
5
  export type { LooseKey, MessageCatalogOptions, MessagesLoader, TranslateOptions, } from './messageCatalog.ts';
6
6
  export { MessageCatalog } from './messageCatalog.ts';
7
7
  export type { MessageValues } from './messageValues.ts';
8
+ export type { ProsePiece } from './prose.ts';
9
+ export { splitProse } from './prose.ts';
8
10
  export type { MessageSession } from './session.ts';
9
11
  export { messageSession, messagesVersion, setMessageSession, subscribeToMessages, } from './session.ts';
10
12
  export type { LoadedCatalogs } from './translateSetup.ts';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/i18n/core/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AACvE,YAAY,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAC/C,OAAO,EACL,gBAAgB,EAChB,SAAS,EACT,eAAe,EACf,UAAU,GACX,MAAM,gBAAgB,CAAC;AACxB,YAAY,EACV,QAAQ,EACR,qBAAqB,EACrB,cAAc,EACd,gBAAgB,GACjB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrD,YAAY,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACxD,YAAY,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AACnD,OAAO,EACL,cAAc,EACd,eAAe,EACf,iBAAiB,EACjB,mBAAmB,GACpB,MAAM,cAAc,CAAC;AACtB,YAAY,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAC1D,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/i18n/core/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AACvE,YAAY,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAC/C,OAAO,EACL,gBAAgB,EAChB,SAAS,EACT,eAAe,EACf,UAAU,GACX,MAAM,gBAAgB,CAAC;AACxB,YAAY,EACV,QAAQ,EACR,qBAAqB,EACrB,cAAc,EACd,gBAAgB,GACjB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrD,YAAY,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACxD,YAAY,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAC7C,OAAO,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AACxC,YAAY,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AACnD,OAAO,EACL,cAAc,EACd,eAAe,EACf,iBAAiB,EACjB,mBAAmB,GACpB,MAAM,cAAc,CAAC;AACtB,YAAY,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAC1D,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC"}
@@ -1,6 +1,7 @@
1
1
  export { CHROME_CATALOG, CHROME_CATALOG_ID } from "./chromeCatalog.js";
2
2
  export { DEFAULT_LANGUAGE, LANGUAGES, LANGUAGE_LABELS, isLanguage, } from "./languages.js";
3
3
  export { MessageCatalog } from "./messageCatalog.js";
4
+ export { splitProse } from "./prose.js";
4
5
  export { messageSession, messagesVersion, setMessageSession, subscribeToMessages, } from "./session.js";
5
6
  export { loadCatalogs } from "./translateSetup.js";
6
7
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/i18n/core/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAEvE,OAAO,EACL,gBAAgB,EAChB,SAAS,EACT,eAAe,EACf,UAAU,GACX,MAAM,gBAAgB,CAAC;AAOxB,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAGrD,OAAO,EACL,cAAc,EACd,eAAe,EACf,iBAAiB,EACjB,mBAAmB,GACpB,MAAM,cAAc,CAAC;AAEtB,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/i18n/core/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAEvE,OAAO,EACL,gBAAgB,EAChB,SAAS,EACT,eAAe,EACf,UAAU,GACX,MAAM,gBAAgB,CAAC;AAOxB,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAGrD,OAAO,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAExC,OAAO,EACL,cAAc,EACd,eAAe,EACf,iBAAiB,EACjB,mBAAmB,GACpB,MAAM,cAAc,CAAC;AAEtB,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC"}
@@ -1,12 +1,12 @@
1
1
  /**
2
2
  * The languages the family speaks.
3
3
  *
4
- * Four, decided together rather than site by site: a visitor who switches to
5
- * German on one tool and follows a link to the next must land in German there
6
- * too, and a list that differs between two sites makes that impossible.
4
+ * Decided together rather than site by site: a visitor who switches to German
5
+ * on one tool and follows a link to the next must land in German there too, and
6
+ * a list that differs between two sites makes that impossible.
7
7
  */
8
8
  /** Every language a site of the family is written in. */
9
- export declare const LANGUAGES: readonly ["en", "fr", "de", "es"];
9
+ export declare const LANGUAGES: readonly ["en", "fr", "de", "es", "it"];
10
10
  /** One of {@link LANGUAGES}. */
11
11
  export type Language = (typeof LANGUAGES)[number];
12
12
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"languages.d.ts","sourceRoot":"","sources":["../../../src/i18n/core/languages.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,yDAAyD;AACzD,eAAO,MAAM,SAAS,mCAAoC,CAAC;AAE3D,gCAAgC;AAChC,MAAM,MAAM,QAAQ,GAAG,CAAC,OAAO,SAAS,CAAC,CAAC,MAAM,CAAC,CAAC;AAElD;;;;GAIG;AACH,eAAO,MAAM,gBAAgB,EAAE,QAAe,CAAC;AAE/C;;;;;;GAMG;AACH,eAAO,MAAM,eAAe,EAAE,MAAM,CAAC,QAAQ,EAAE,MAAM,CAKpD,CAAC;AAEF;;;;GAIG;AACH,wBAAgB,UAAU,CAAC,KAAK,EAAE,MAAM,GAAG,KAAK,IAAI,QAAQ,CAK3D"}
1
+ {"version":3,"file":"languages.d.ts","sourceRoot":"","sources":["../../../src/i18n/core/languages.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,yDAAyD;AACzD,eAAO,MAAM,SAAS,yCAA0C,CAAC;AAEjE,gCAAgC;AAChC,MAAM,MAAM,QAAQ,GAAG,CAAC,OAAO,SAAS,CAAC,CAAC,MAAM,CAAC,CAAC;AAElD;;;;GAIG;AACH,eAAO,MAAM,gBAAgB,EAAE,QAAe,CAAC;AAE/C;;;;;;GAMG;AACH,eAAO,MAAM,eAAe,EAAE,MAAM,CAAC,QAAQ,EAAE,MAAM,CAMpD,CAAC;AAEF;;;;GAIG;AACH,wBAAgB,UAAU,CAAC,KAAK,EAAE,MAAM,GAAG,KAAK,IAAI,QAAQ,CAK3D"}
@@ -1,12 +1,12 @@
1
1
  /**
2
2
  * The languages the family speaks.
3
3
  *
4
- * Four, decided together rather than site by site: a visitor who switches to
5
- * German on one tool and follows a link to the next must land in German there
6
- * too, and a list that differs between two sites makes that impossible.
4
+ * Decided together rather than site by site: a visitor who switches to German
5
+ * on one tool and follows a link to the next must land in German there too, and
6
+ * a list that differs between two sites makes that impossible.
7
7
  */
8
8
  /** Every language a site of the family is written in. */
9
- export const LANGUAGES = ['en', 'fr', 'de', 'es'];
9
+ export const LANGUAGES = ['en', 'fr', 'de', 'es', 'it'];
10
10
  /**
11
11
  * The language the catalogs are written in first, and the one every site opens
12
12
  * in: an address naming it carries nothing, and a message a translation does
@@ -25,6 +25,7 @@ export const LANGUAGE_LABELS = {
25
25
  fr: 'Français',
26
26
  de: 'Deutsch',
27
27
  es: 'Español',
28
+ it: 'Italiano',
28
29
  };
29
30
  /**
30
31
  * Whether a string is one of the languages the family speaks.