react-cheminfo 0.1.0 → 0.2.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 (38) hide show
  1. package/README.md +3 -3
  2. package/lib/citation/core/formats.js +2 -3
  3. package/lib/citation/core/formats.js.map +1 -1
  4. package/lib/citation/core/segments.d.ts +8 -0
  5. package/lib/citation/core/segments.d.ts.map +1 -1
  6. package/lib/citation/core/segments.js +12 -3
  7. package/lib/citation/core/segments.js.map +1 -1
  8. package/lib/ecosystem/core/sites.d.ts +1 -1
  9. package/lib/ecosystem/core/sites.d.ts.map +1 -1
  10. package/lib/ecosystem/core/sites.js +27 -0
  11. package/lib/ecosystem/core/sites.js.map +1 -1
  12. package/lib/ecosystem/ui/EcosystemLinks.d.ts +33 -0
  13. package/lib/ecosystem/ui/EcosystemLinks.d.ts.map +1 -0
  14. package/lib/ecosystem/ui/EcosystemLinks.js +55 -0
  15. package/lib/ecosystem/ui/EcosystemLinks.js.map +1 -0
  16. package/lib/ecosystem/ui/EcosystemMenu.d.ts +3 -1
  17. package/lib/ecosystem/ui/EcosystemMenu.d.ts.map +1 -1
  18. package/lib/ecosystem/ui/EcosystemMenu.js +7 -84
  19. package/lib/ecosystem/ui/EcosystemMenu.js.map +1 -1
  20. package/lib/ecosystem/ui/SiteTile.d.ts +34 -0
  21. package/lib/ecosystem/ui/SiteTile.d.ts.map +1 -0
  22. package/lib/ecosystem/ui/SiteTile.js +78 -0
  23. package/lib/ecosystem/ui/SiteTile.js.map +1 -0
  24. package/lib/ecosystem/ui/index.d.ts +4 -0
  25. package/lib/ecosystem/ui/index.d.ts.map +1 -1
  26. package/lib/ecosystem/ui/index.js +2 -0
  27. package/lib/ecosystem/ui/index.js.map +1 -1
  28. package/lib/ecosystem/ui/marks.js +7 -1
  29. package/lib/ecosystem/ui/marks.js.map +1 -1
  30. package/package.json +4 -4
  31. package/src/citation/core/formats.ts +2 -3
  32. package/src/citation/core/segments.ts +11 -3
  33. package/src/ecosystem/core/sites.ts +31 -1
  34. package/src/ecosystem/ui/EcosystemLinks.tsx +114 -0
  35. package/src/ecosystem/ui/EcosystemMenu.tsx +8 -135
  36. package/src/ecosystem/ui/SiteTile.tsx +148 -0
  37. package/src/ecosystem/ui/index.ts +4 -0
  38. package/src/ecosystem/ui/marks.tsx +44 -1
package/README.md CHANGED
@@ -84,15 +84,15 @@ import { EcosystemButton } from 'react-cheminfo/ui';
84
84
  ```
85
85
 
86
86
  - `currentSiteId` is the one thing that differs per site: that tile is shown
87
- with a _you are here_ label and is not a link. Passing nothing links all ten.
87
+ with a _you are here_ label and is not a link. Passing nothing links them all.
88
88
  - `compact` drops the text and the caret, leaving the icon alone to open the
89
89
  menu, for a header that has run out of room. The label stays what the pointer
90
90
  and a screen reader are told.
91
91
  - A tile **lights up in the colour of the site it opens**, so running the
92
- pointer down the grid is what makes the ten pairs of colours read.
92
+ pointer down the grid is what makes the pairs of colours read.
93
93
 
94
94
  Each mark keeps the geometry of that site's own logo where it has one, redrawn
95
- on a plate of the site's own colour so ten marks from ten sites still read as
95
+ on a plate of the site's own colour so every mark of the family still reads as
96
96
  one row, and carrying the site's answering colour on exactly one element —
97
97
  which is what stops it collapsing into a flat shape at 16 px.
98
98
 
@@ -1,6 +1,6 @@
1
1
  import { doiUrl } from "./reference.js";
2
2
  import { renderHtml, renderMarkdown, renderText } from "./render.js";
3
- import { citationSegments } from "./segments.js";
3
+ import { citationSegments, pageRange } from "./segments.js";
4
4
  /**
5
5
  * Every format offered, in the order the menu lists them. Plain text is not
6
6
  * one of them: an HTML copy carries it as its second flavour, so a paste into
@@ -71,7 +71,6 @@ export function formatCitation(reference, format, style = DEFAULT_CITATION_STYLE
71
71
  }
72
72
  function formatBibTeX(reference) {
73
73
  const { title, journal, year, volume, issue, publisher, doi } = reference;
74
- const { firstPage, lastPage } = reference;
75
74
  const fields = [
76
75
  ['author', authorList(reference, ' and ')],
77
76
  ['title', title],
@@ -79,7 +78,7 @@ function formatBibTeX(reference) {
79
78
  ['year', String(year)],
80
79
  ['volume', volume],
81
80
  ['number', issue],
82
- ['pages', `${firstPage}--${lastPage}`],
81
+ ['pages', pageRange(reference, '--')],
83
82
  ['publisher', publisher],
84
83
  ['doi', doi],
85
84
  ['url', doiUrl(reference)],
@@ -1 +1 @@
1
- {"version":3,"file":"formats.js","sourceRoot":"","sources":["../../../src/citation/core/formats.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AACxC,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAErE,OAAO,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAoBjD;;;;GAIG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG;IAC9B,EAAE,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,mBAAmB,EAAE,MAAM,EAAE,IAAI,EAAE;IACtE,EAAE,EAAE,EAAE,UAAU,EAAE,KAAK,EAAE,UAAU,EAAE,IAAI,EAAE,eAAe,EAAE,MAAM,EAAE,IAAI,EAAE;IAC1E,EAAE,EAAE,EAAE,QAAQ,EAAE,KAAK,EAAE,QAAQ,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE;IAC/D,EAAE,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,iBAAiB,EAAE,MAAM,EAAE,KAAK,EAAE;IACnE,EAAE,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,UAAU,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE;CAChB,CAAC;AAE/C,8EAA8E;AAC9E,MAAM,CAAC,MAAM,sBAAsB,GAAoB,KAAK,CAAC;AAW7D;;;GAGG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG;IAChC;QACE,MAAM,EAAE,KAAK;QACb,KAAK,EAAE,UAAU;QAC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B,CAAC,IAAI,EAAE,GAAG,CAAC;QACX,CAAC,IAAI,EAAE,MAAM,CAAC,SAAS,CAAC,CAAC;QACzB,CAAC,IAAI,EAAE,EAAE,CAAC;KACX,CAAC;IACF,OAAO,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,EAAE,KAAK,CAAC,EAAE,EAAE,CAAC,GAAG,GAAG,OAAO,KAAK,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AACtE,CAAC;AAED,SAAS,UAAU,CAAC,SAAoB,EAAE,SAAiB;IACzD,OAAO,SAAS,CAAC,OAAO;SACrB,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,GAAG,MAAM,CAAC,MAAM,KAAK,MAAM,CAAC,KAAK,EAAE,CAAC;SACpD,IAAI,CAAC,SAAS,CAAC,CAAC;AACrB,CAAC;AAED,SAAS,SAAS,CAAC,SAAoB;IACrC,MAAM,KAAK,GAAG,SAAS,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;IACnC,MAAM,MAAM,GAAG,KAAK,KAAK,SAAS,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,KAAK,CAAC,MAAM,CAAC;IAChE,OAAO,GAAG,MAAM,CAAC,UAAU,CAAC,YAAY,EAAE,EAAE,CAAC,GAAG,SAAS,CAAC,IAAI,EAAE,CAAC;AACnE,CAAC"}
@@ -44,4 +44,12 @@ export declare const CITATION_STYLES: readonly [{
44
44
  * @returns The segments of the citation, in reading order.
45
45
  */
46
46
  export declare function citationSegments(reference: Reference, style: CitationStyleId): CitationSegment[];
47
+ /**
48
+ * The pages of a work, as its styles write them.
49
+ * @param reference - The work being written.
50
+ * @param dash - What joins the two ends, an en dash in every style but BibTeX.
51
+ * @returns One number for a journal that paginates by article number, the
52
+ * range otherwise.
53
+ */
54
+ export declare function pageRange(reference: Reference, dash?: string): string;
47
55
  //# sourceMappingURL=segments.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"segments.d.ts","sourceRoot":"","sources":["../../../src/citation/core/segments.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAGhD,8EAA8E;AAC9E,MAAM,MAAM,eAAe,GACvB;IAAE,IAAI,EAAE,MAAM,GAAG,QAAQ,GAAG,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,GAClD;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,CAAC;AAEjD,0DAA0D;AAC1D,MAAM,MAAM,eAAe,GAAG,KAAK,GAAG,QAAQ,GAAG,KAAK,GAAG,OAAO,CAAC;AAEjE,sCAAsC;AACtC,MAAM,WAAW,aAAa;IAC5B,EAAE,EAAE,eAAe,CAAC;IACpB,yBAAyB;IACzB,KAAK,EAAE,MAAM,CAAC;IACd,iEAAiE;IACjE,IAAI,EAAE,MAAM,CAAC;CACd;AAED,6DAA6D;AAC7D,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;EAKiB,CAAC;AAE9C;;;;;;GAMG;AACH,wBAAgB,gBAAgB,CAC9B,SAAS,EAAE,SAAS,EACpB,KAAK,EAAE,eAAe,GACrB,eAAe,EAAE,CAanB"}
1
+ {"version":3,"file":"segments.d.ts","sourceRoot":"","sources":["../../../src/citation/core/segments.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAGhD,8EAA8E;AAC9E,MAAM,MAAM,eAAe,GACvB;IAAE,IAAI,EAAE,MAAM,GAAG,QAAQ,GAAG,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,GAClD;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,CAAC;AAEjD,0DAA0D;AAC1D,MAAM,MAAM,eAAe,GAAG,KAAK,GAAG,QAAQ,GAAG,KAAK,GAAG,OAAO,CAAC;AAEjE,sCAAsC;AACtC,MAAM,WAAW,aAAa;IAC5B,EAAE,EAAE,eAAe,CAAC;IACpB,yBAAyB;IACzB,KAAK,EAAE,MAAM,CAAC;IACd,iEAAiE;IACjE,IAAI,EAAE,MAAM,CAAC;CACd;AAED,6DAA6D;AAC7D,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;EAKiB,CAAC;AAE9C;;;;;;GAMG;AACH,wBAAgB,gBAAgB,CAC9B,SAAS,EAAE,SAAS,EACpB,KAAK,EAAE,eAAe,GACrB,eAAe,EAAE,CAanB;AAmHD;;;;;;GAMG;AACH,wBAAgB,SAAS,CAAC,SAAS,EAAE,SAAS,EAAE,IAAI,SAAM,GAAG,MAAM,CAIlE"}
@@ -127,8 +127,17 @@ function initialsFirst(reference, lastSeparator) {
127
127
  return names.join(', ');
128
128
  return `${names.slice(0, -1).join(', ')}${lastSeparator}${last}`;
129
129
  }
130
- function pageRange(reference) {
131
- // En dash: what every style asks for in a page range.
132
- return `${reference.firstPage}–${reference.lastPage}`;
130
+ /**
131
+ * The pages of a work, as its styles write them.
132
+ * @param reference - The work being written.
133
+ * @param dash - What joins the two ends, an en dash in every style but BibTeX.
134
+ * @returns One number for a journal that paginates by article number, the
135
+ * range otherwise.
136
+ */
137
+ export function pageRange(reference, dash = '–') {
138
+ const { firstPage, lastPage } = reference;
139
+ if (firstPage === lastPage)
140
+ return firstPage;
141
+ return `${firstPage}${dash}${lastPage}`;
133
142
  }
134
143
  //# sourceMappingURL=segments.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"segments.js","sourceRoot":"","sources":["../../../src/citation/core/segments.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAmBxC,6DAA6D;AAC7D,MAAM,CAAC,MAAM,eAAe,GAAG;IAC7B,EAAE,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,IAAI,E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AAC;AACtD,CAAC;AAED;;;;;GAKG;AACH,SAAS,aAAa,CAAC,SAAoB,EAAE,aAAqB;IAChE,MAAM,KAAK,GAAG,SAAS,CAAC,OAAO,CAAC,GAAG,CACjC,CAAC,MAAM,EAAE,EAAE,CAAC,GAAG,MAAM,CAAC,KAAK,IAAI,MAAM,CAAC,MAAM,EAAE,CAC/C,CAAC;IACF,MAAM,IAAI,GAAG,KAAK,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;IAC1B,IAAI,KAAK,CAAC,MAAM,GAAG,CAAC,IAAI,IAAI,KAAK,SAAS;QAAE,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACpE,OAAO,GAAG,KAAK,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,aAAa,GAAG,IAAI,EAAE,CAAC;AACnE,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,SAAS,CAAC,SAAoB,EAAE,IAAI,GAAG,GAAG;IACxD,MAAM,EAAE,SAAS,EAAE,QAAQ,EAAE,GAAG,SAAS,CAAC;IAC1C,IAAI,SAAS,KAAK,QAAQ;QAAE,OAAO,SAAS,CAAC;IAC7C,OAAO,GAAG,SAAS,GAAG,IAAI,GAAG,QAAQ,EAAE,CAAC;AAC1C,CAAC"}
@@ -1,5 +1,5 @@
1
1
  /** The sites the menu links to, in the order they are listed. */
2
- export type SiteId = 'inchi' | 'vcl' | 'smiles' | 'chemcalc' | 'nmrium' | 'surge' | 'tex' | 'lcao' | 'regexp' | 'pdb';
2
+ export type SiteId = 'inchi' | 'vcl' | 'smiles' | 'chemcalc' | 'nmrium' | 'surge' | 'tex' | 'lcao' | 'regexp' | 'pdb' | 'elucidation' | 'equilibrium' | 'polycarp';
3
3
  export interface SiteName {
4
4
  /** First half of the name, set in the site's leading colour. */
5
5
  lead: string;
@@ -1 +1 @@
1
- {"version":3,"file":"sites.d.ts","sourceRoot":"","sources":["../../../src/ecosystem/core/sites.ts"],"names":[],"mappings":"AAAA,iEAAiE;AACjE,MAAM,MAAM,MAAM,GACd,OAAO,GACP,KAAK,GACL,QAAQ,GACR,UAAU,GACV,QAAQ,GACR,OAAO,GACP,KAAK,GACL,MAAM,GACN,QAAQ,GACR,KAAK,CAAC;AAEV,MAAM,WAAW,QAAQ;IACvB,gEAAgE;IAChE,IAAI,EAAE,MAAM,CAAC;IACb,uDAAuD;IACvD,GAAG,EAAE,MAAM,CAAC;IACZ;;;;OAIG;IACH,GAAG,CAAC,EAAE,OAAO,CAAC;CACf;AAED,MAAM,WAAW,aAAa;IAC5B,EAAE,EAAE,MAAM,CAAC;IACX,iEAAiE;IACjE,IAAI,EAAE,QAAQ,CAAC;IACf,yDAAyD;IACzD,IAAI,EAAE,MAAM,CAAC;IACb,sCAAsC;IACtC,OAAO,EAAE,MAAM,CAAC;IAChB,uDAAuD;IACvD,KAAK,EAAE,MAAM,CAAC;IACd;;;;OAIG;IACH,QAAQ,EAAE,MAAM,CAAC;IACjB,8EAA8E;IAC9E,IAAI,EAAE,cAAc,CAAC;CACtB;AAED,MAAM,WAAW,cAAc;IAC7B,+CAA+C;IAC/C,KAAK,EAAE,MAAM,CAAC;IACd,wDAAwD;IACxD,MAAM,EAAE,MAAM,CAAC;IACf;;;;OAIG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED;;;GAGG;AACH,eAAO,MAAM,eAAe,EAAE,SAAS,aAAa,EA2FnD,CAAC;AAEF;;;;GAIG;AACH,wBAAgB,OAAO,CAAC,IAAI,EAAE,aAAa,GAAG,MAAM,CAEnD"}
1
+ {"version":3,"file":"sites.d.ts","sourceRoot":"","sources":["../../../src/ecosystem/core/sites.ts"],"names":[],"mappings":"AAAA,iEAAiE;AACjE,MAAM,MAAM,MAAM,GACd,OAAO,GACP,KAAK,GACL,QAAQ,GACR,UAAU,GACV,QAAQ,GACR,OAAO,GACP,KAAK,GACL,MAAM,GACN,QAAQ,GACR,KAAK,GACL,aAAa,GACb,aAAa,GACb,UAAU,CAAC;AAEf,MAAM,WAAW,QAAQ;IACvB,gEAAgE;IAChE,IAAI,EAAE,MAAM,CAAC;IACb,uDAAuD;IACvD,GAAG,EAAE,MAAM,CAAC;IACZ;;;;OAIG;IACH,GAAG,CAAC,EAAE,OAAO,CAAC;CACf;AAED,MAAM,WAAW,aAAa;IAC5B,EAAE,EAAE,MAAM,CAAC;IACX,iEAAiE;IACjE,IAAI,EAAE,QAAQ,CAAC;IACf,yDAAyD;IACzD,IAAI,EAAE,MAAM,CAAC;IACb,sCAAsC;IACtC,OAAO,EAAE,MAAM,CAAC;IAChB,uDAAuD;IACvD,KAAK,EAAE,MAAM,CAAC;IACd;;;;OAIG;IACH,QAAQ,EAAE,MAAM,CAAC;IACjB,8EAA8E;IAC9E,IAAI,EAAE,cAAc,CAAC;CACtB;AAED,MAAM,WAAW,cAAc;IAC7B,+CAA+C;IAC/C,KAAK,EAAE,MAAM,CAAC;IACd,wDAAwD;IACxD,MAAM,EAAE,MAAM,CAAC;IACf;;;;OAIG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED;;;GAGG;AACH,eAAO,MAAM,eAAe,EAAE,SAAS,aAAa,EAsHnD,CAAC;AAEF;;;;GAIG;AACH,wBAAgB,OAAO,CAAC,IAAI,EAAE,aAAa,GAAG,MAAM,CAEnD"}
@@ -93,6 +93,33 @@ export const ECOSYSTEM_SITES = [
93
93
  brandAlt: '#b45309',
94
94
  mark: { plate: '#2563eb', accent: '#fbbf24' },
95
95
  },
96
+ {
97
+ id: 'elucidation',
98
+ name: { lead: 'elucidation', alt: 'cheminfo', dot: true },
99
+ host: 'elucidation.cheminfo.org',
100
+ tagline: 'A structure from a 1H NMR spectrum and a formula.',
101
+ brand: '#7e22ce',
102
+ brandAlt: '#b45309',
103
+ mark: { plate: '#7e22ce', accent: '#f59e0b' },
104
+ },
105
+ {
106
+ id: 'equilibrium',
107
+ name: { lead: 'Equi', alt: 'Librium' },
108
+ host: 'equilibrium.cheminfo.org',
109
+ tagline: 'Chemical equilibria: pH, speciation and titration curves.',
110
+ brand: '#0b5754',
111
+ brandAlt: '#a56600',
112
+ mark: { plate: '#0b5754', accent: '#f2a71b' },
113
+ },
114
+ {
115
+ id: 'polycarp',
116
+ name: { lead: 'Poly', alt: 'Carp' },
117
+ host: 'polycarp.cheminfo.org',
118
+ tagline: 'Predict the microstructure of a radical copolymerisation.',
119
+ brand: '#0d1d37',
120
+ brandAlt: '#0c9ba3',
121
+ mark: { plate: '#0d1d37', accent: '#0c9ba3' },
122
+ },
96
123
  ];
97
124
  /**
98
125
  * The address of a site, which is its host over https.
@@ -1 +1 @@
1
- {"version":3,"file":"sites.js","sourceRoot":"","sources":["../../../src/ecosystem/core/sites.ts"],"names":[],"mappings":"AA2DA;;;GAGG;AACH,MAAM,CAAC,MAAM,eAAe,GAA6B;IACvD;QACE,EAAE,EAAE,OAAO;QACX,IAAI,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,GAAG,EAAE,UAAU,EAAE,GAAG,EAAE,IAAI,EAAE;QACnD,IAAI,EAAE,oBAAoB;QAC1B,OAAO,EAAE,sDAAsD;QAC/D,KAAK,EAAE,SAAS;QAChB,QAAQ,EAAE,SAAS;QACnB,IAAI,EAAE,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,EAAE,SAAS,EAAE;KAC9C;IACD;QACE,EAAE,EAAE,KAAK;QACT,IAAI,EAAE,EAAE,IAAI,EAAE,KAAK,EAAE,GAAG,EAAE,UAAU,EAAE,GAAG,EAAE,IAAI,EAAE;QACjD,IAAI,EAAE,kBAAkB;QACxB,OAAO,EAAE,uDAAuD;QAChE,KAAK,EAAE,SAAS;QAChB,QAAQ,EAAE,SAAS;QACnB,IAAI,EAAE,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,EAAE,SAAS,EAAE;KAC9C;IACD;QACE,EAAE,EAAE,QAAQ;QACZ,IAAI,EAAE,EAAE,IAAI,EAA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,SAAS;QACnB,IAAI,EAAE,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,EAAE,SAAS,EAAE;KAC9C;IACD;QACE,EAAE,EAAE,UAAU;QACd,IAAI,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE;QACnC,IAAI,EAAE,uBAAuB;QAC7B,OAAO,EAAE,2DAA2D;QACpE,KAAK,EAAE,SAAS;QAChB,QAAQ,EAAE,SAAS;QACnB,IAAI,EAAE,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,EAAE,SAAS,EAAE;KAC9C;CACF,CAAC;AAEF;;;;GAIG;AACH,MAAM,UAAU,OAAO,CAAC,IAAmB;IACzC,OAAO,WAAW,IAAI,CAAC,IAAI,GAAG,CAAC;AACjC,CAAC"}
@@ -0,0 +1,33 @@
1
+ import type { ReactElement } from 'react';
2
+ import type { SiteId } from '../core/sites.ts';
3
+ export interface EcosystemLinksProps {
4
+ /**
5
+ * The site the visitor is already on, which is written but never linked.
6
+ * @default undefined
7
+ */
8
+ currentSiteId?: SiteId;
9
+ /**
10
+ * What introduces the section.
11
+ * @default 'Our other tools'
12
+ */
13
+ heading?: string;
14
+ /**
15
+ * How much of each site is written. `grid` gives every site its mark, its
16
+ * name and the line saying what it does — which is what a crawler reads to
17
+ * know what it is following, so it is the default. `row` writes the names
18
+ * only, for a footer with no room.
19
+ * @default 'grid'
20
+ */
21
+ layout?: 'grid' | 'row';
22
+ }
23
+ /**
24
+ * Every site of the family as a plain link, for the footer of a site. It is
25
+ * what lets a crawler — and a visitor with no patience for menus — walk from
26
+ * one of our tools to the next, so it is rendered on every page rather than
27
+ * behind a button.
28
+ * @param props - The site it sits on, what introduces the section, and how much
29
+ * of each site is written.
30
+ * @returns The section of links.
31
+ */
32
+ export declare function EcosystemLinks(props: EcosystemLinksProps): ReactElement;
33
+ //# sourceMappingURL=EcosystemLinks.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"EcosystemLinks.d.ts","sourceRoot":"","sources":["../../../src/ecosystem/ui/EcosystemLinks.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAiB,YAAY,EAAE,MAAM,OAAO,CAAC;AAEzD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AA4C/C,MAAM,WAAW,mBAAmB;IAClC;;;OAGG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB;;;;;;OAMG;IACH,MAAM,CAAC,EAAE,MAAM,GAAG,KAAK,CAAC;CACzB;AAED;;;;;;;;GAQG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,mBAAmB,GAAG,YAAY,CAqCvE"}
@@ -0,0 +1,55 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { ECOSYSTEM_SITES, siteUrl } from "../core/sites.js";
3
+ import { SiteTile } from "./SiteTile.js";
4
+ // The menu of `EcosystemMenu` lives inside a popover, so its links only enter
5
+ // the document once somebody clicks. A crawler never clicks, so these are the
6
+ // links that carry the family: always rendered, in the page, followed — and
7
+ // each one carrying the name and the one line that says what it opens, as real
8
+ // text rather than a `title` a crawler ignores.
9
+ const SECTION_STYLE = {
10
+ display: 'flex',
11
+ flexDirection: 'column',
12
+ gap: 8,
13
+ };
14
+ const HEADING_STYLE = {
15
+ margin: 0,
16
+ color: '#5b6875',
17
+ fontSize: '0.75rem',
18
+ fontWeight: 600,
19
+ };
20
+ const GRID_STYLE = {
21
+ display: 'grid',
22
+ gridTemplateColumns: 'repeat(auto-fit, minmax(15rem, 1fr))',
23
+ gap: 2,
24
+ };
25
+ const ROW_STYLE = {
26
+ display: 'flex',
27
+ flexWrap: 'wrap',
28
+ alignItems: 'baseline',
29
+ gap: '0.35rem 0.9rem',
30
+ };
31
+ const LINK_STYLE = {
32
+ fontSize: '0.8125rem',
33
+ fontWeight: 600,
34
+ textDecoration: 'none',
35
+ whiteSpace: 'nowrap',
36
+ };
37
+ const CURRENT_STYLE = {
38
+ ...LINK_STYLE,
39
+ color: '#8a96a3',
40
+ cursor: 'default',
41
+ };
42
+ /**
43
+ * Every site of the family as a plain link, for the footer of a site. It is
44
+ * what lets a crawler — and a visitor with no patience for menus — walk from
45
+ * one of our tools to the next, so it is rendered on every page rather than
46
+ * behind a button.
47
+ * @param props - The site it sits on, what introduces the section, and how much
48
+ * of each site is written.
49
+ * @returns The section of links.
50
+ */
51
+ export function EcosystemLinks(props) {
52
+ const { currentSiteId, heading = 'Our other tools', layout = 'grid' } = props;
53
+ return (_jsxs("nav", { className: "ecosystem-links", style: SECTION_STYLE, "aria-label": heading, children: [_jsx("h2", { style: HEADING_STYLE, children: heading }), layout === 'grid' ? (_jsx("div", { style: GRID_STYLE, children: ECOSYSTEM_SITES.map((site) => (_jsx(SiteTile, { site: site, isCurrent: site.id === currentSiteId }, site.id))) })) : (_jsx("div", { style: ROW_STYLE, children: ECOSYSTEM_SITES.map((site) => site.id === currentSiteId ? (_jsx("span", { style: CURRENT_STYLE, children: site.host }, site.id)) : (_jsx("a", { style: { ...LINK_STYLE, color: site.brand }, href: siteUrl(site), children: site.host }, site.id))) }))] }));
54
+ }
55
+ //# sourceMappingURL=EcosystemLinks.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"EcosystemLinks.js","sourceRoot":"","sources":["../../../src/ecosystem/ui/EcosystemLinks.tsx"],"names":[],"mappings":";AAGA,OAAO,EAAE,eAAe,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAE5D,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAgB,CAAC;AAE1C,8EAA8E;AAC9E,8EAA8E;AAC9E,4EAA4E;AAC5E,+EAA+E;AAC/E,gDAAgD;AAChD,MAAM,aAAa,GAAkB;IACnC,OAAO,EAAE,MAAM;IACf,aAAa,EAAE,QAAQ;IACvB,GAAG,EAAE,CAAC;CACP,CAAC;AACF,MAAM,aAAa,GAAkB;IACnC,MAAM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EAAE,EAAE,CAC5B,IAAI,CAAC,EAAE,KAAK,aAAa,CAAC,CAAC,CAAC,CAC1B,eAAoB,KAAK,EAAE,aAAa,YACrC,IAAI,CAAC,IAAI,IADD,IAAI,CAAC,EAAE,CAEX,CACR,CAAC,CAAC,CAAC,CACF,YAEE,KAAK,EAAE,EAAE,GAAG,UAAU,EAAE,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE,EAC3C,IAAI,EAAE,OAAO,CAAC,IAAI,CAAC,YAElB,IAAI,CAAC,IAAI,IAJL,IAAI,CAAC,EAAE,CAKV,CACL,CACF,GACG,CACP,IACG,CACP,CAAC;AACJ,CAAC"}
@@ -9,7 +9,9 @@ export interface EcosystemMenuProps {
9
9
  }
10
10
  /**
11
11
  * What the ecosystem button opens: every site of the family, each behind its
12
- * own little logo and the two colours it owns.
12
+ * own little logo and the two colours it owns. It lives in a popover, so a
13
+ * crawler never reaches it — `EcosystemLinks` is what carries the family
14
+ * through the page itself.
13
15
  * @param props - The site the visitor is already on.
14
16
  * @returns The grid of sites.
15
17
  */
@@ -1 +1 @@
1
- {"version":3,"file":"EcosystemMenu.d.ts","sourceRoot":"","sources":["../../../src/ecosystem/ui/EcosystemMenu.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAiB,YAAY,EAAE,MAAM,OAAO,CAAC;AAGzD,OAAO,KAAK,EAAiB,MAAM,EAAE,MAAM,kBAAkB,CAAC;AA0D9D,MAAM,WAAW,kBAAkB;IACjC;;;OAGG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED;;;;;GAKG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,kBAAkB,GAAG,YAAY,CAoBrE"}
1
+ {"version":3,"file":"EcosystemMenu.d.ts","sourceRoot":"","sources":["../../../src/ecosystem/ui/EcosystemMenu.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAiB,YAAY,EAAE,MAAM,OAAO,CAAC;AAGzD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAuB/C,MAAM,WAAW,kBAAkB;IACjC;;;OAGG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED;;;;;;;GAOG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,kBAAkB,GAAG,YAAY,CAqBrE"}
@@ -1,7 +1,7 @@
1
- import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { useState } from 'react';
3
- import { ECOSYSTEM_SITES, siteUrl } from "../core/sites.js";
4
- import { SiteMark } from "./marks.js";
3
+ import { ECOSYSTEM_SITES } from "../core/sites.js";
4
+ import { SiteTile } from "./SiteTile.js";
5
5
  const PANEL_STYLE = {
6
6
  display: 'flex',
7
7
  width: 'min(34rem, 90vw)',
@@ -19,94 +19,17 @@ const GRID_STYLE = {
19
19
  gridTemplateColumns: 'repeat(auto-fit, minmax(15rem, 1fr))',
20
20
  gap: 2,
21
21
  };
22
- const TILE_STYLE = {
23
- display: 'flex',
24
- alignItems: 'center',
25
- padding: '7px 8px',
26
- border: '1px solid transparent',
27
- borderRadius: 10,
28
- color: '#16202c',
29
- gap: 10,
30
- textDecoration: 'none',
31
- transition: 'background 120ms, border-color 120ms, transform 120ms',
32
- };
33
- const MARK_HOLDER_STYLE = {
34
- display: 'flex',
35
- transition: 'transform 160ms',
36
- };
37
- const TEXT_STYLE = { minWidth: 0 };
38
- const NAME_STYLE = {
39
- display: 'flex',
40
- alignItems: 'baseline',
41
- fontSize: '0.9375rem',
42
- fontWeight: 700,
43
- letterSpacing: '-0.01em',
44
- gap: 6,
45
- whiteSpace: 'nowrap',
46
- };
47
- const HERE_STYLE = {
48
- fontSize: '0.625rem',
49
- fontWeight: 700,
50
- letterSpacing: '0.04em',
51
- textTransform: 'uppercase',
52
- };
53
- const TAGLINE_STYLE = {
54
- color: '#5b6875',
55
- fontSize: '0.75rem',
56
- lineHeight: 1.35,
57
- };
58
22
  /**
59
23
  * What the ecosystem button opens: every site of the family, each behind its
60
- * own little logo and the two colours it owns.
24
+ * own little logo and the two colours it owns. It lives in a popover, so a
25
+ * crawler never reaches it — `EcosystemLinks` is what carries the family
26
+ * through the page itself.
61
27
  * @param props - The site the visitor is already on.
62
28
  * @returns The grid of sites.
63
29
  */
64
30
  export function EcosystemMenu(props) {
65
31
  const { currentSiteId } = props;
66
32
  const [hovered, setHovered] = useState(null);
67
- return (_jsxs("div", { className: "ecosystem-menu", style: PANEL_STYLE, children: [_jsx("div", { style: HEADING_STYLE, children: "Our other tools, all in the browser" }), _jsx("div", { style: GRID_STYLE, children: ECOSYSTEM_SITES.map((site) => (_jsx(SiteTile, { site: site, isCurrent: site.id === currentSiteId, isHovered: hovered === site.id, onHover: setHovered }, site.id))) })] }));
68
- }
69
- /**
70
- * One site: its mark, its name in its own colours, and what it does.
71
- * @param props - The site, and whether it is the current or the hovered one.
72
- * @returns The tile.
73
- */
74
- function SiteTile(props) {
75
- const { site, isCurrent, isHovered, onHover } = props;
76
- const lit = isHovered && !isCurrent;
77
- const body = (_jsxs(_Fragment, { children: [_jsx("div", { style: {
78
- ...MARK_HOLDER_STYLE,
79
- transform: lit ? 'scale(1.08) rotate(-6deg)' : 'none',
80
- }, children: _jsx(SiteMark, { site: site }) }), _jsxs("div", { style: TEXT_STYLE, children: [_jsxs("div", { style: NAME_STYLE, children: [_jsxs("span", { children: [_jsx("span", { style: { color: site.brand }, children: site.name.lead }), site.name.dot ? _jsx("span", { style: { color: '#8a96a3' }, children: "." }) : null, _jsx("span", { style: { color: site.brandAlt }, children: site.name.alt })] }), isCurrent ? (_jsx("span", { style: { ...HERE_STYLE, color: site.brandAlt }, children: "you are here" })) : null] }), _jsx("div", { style: TAGLINE_STYLE, children: site.tagline })] })] }));
81
- const style = {
82
- ...TILE_STYLE,
83
- background: tint(site, isCurrent, lit),
84
- borderColor: borderOf(site, isCurrent, lit),
85
- transform: lit ? 'translateY(-1px)' : 'none',
86
- cursor: isCurrent ? 'default' : 'pointer',
87
- };
88
- if (isCurrent)
89
- return _jsx("div", { style: style, children: body });
90
- return (_jsx("a", { style: style, href: siteUrl(site), title: site.host, target: "_blank", rel: "noreferrer", onMouseEnter: () => {
91
- onHover(site.id);
92
- }, onMouseLeave: () => {
93
- onHover(null);
94
- }, onFocus: () => {
95
- onHover(site.id);
96
- }, onBlur: () => {
97
- onHover(null);
98
- }, children: body }));
99
- }
100
- // A tile lights up in the colour of the site it opens, never in ours: the
101
- // pointer moving down the grid is what makes the ten pairs of colours read.
102
- function tint(site, isCurrent, lit) {
103
- if (isCurrent)
104
- return '#f5f7fa';
105
- return lit ? `color-mix(in oklab, ${site.brand} 9%, white)` : 'transparent';
106
- }
107
- function borderOf(site, isCurrent, lit) {
108
- if (isCurrent)
109
- return '#dfe3e8';
110
- return lit ? `color-mix(in oklab, ${site.brand} 32%, white)` : 'transparent';
33
+ return (_jsxs("div", { className: "ecosystem-menu", style: PANEL_STYLE, children: [_jsx("div", { style: HEADING_STYLE, children: "Our other tools, all in the browser" }), _jsx("div", { style: GRID_STYLE, children: ECOSYSTEM_SITES.map((site) => (_jsx(SiteTile, { site: site, isCurrent: site.id === currentSiteId, isHovered: hovered === site.id, onHover: setHovered, newTab: true }, site.id))) })] }));
111
34
  }
112
35
  //# sourceMappingURL=EcosystemMenu.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"EcosystemMenu.js","sourceRoot":"","sources":["../../../src/ecosystem/ui/EcosystemMenu.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAGjC,OAAO,EAAE,eAAe,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAE5D,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAa,CAAC;AAEvC,MAAM,WAAW,GAAkB;IACjC,OAAO,EAAE,MAAM;IACf,KAAK,EAAE,kBAAkB;IACzB,aAAa,EAAE,QAAQ;IACvB,OAAO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KAAK,CAAC;IAChC,MAAM,CAAC,OAAO,EAAE,UAAU,CAAC,GAAG,QAAQ,CAAgB,IAAI,CAAC,CAAC;IAE5D,OAAO,CACL,eAAK,SAAS,EAAC,gBAAgB,EAAC,KAAK,EAAE,WAAW,aAChD,cAAK,KAAK,EAAE,aAAa,oDAA2C,EACpE,cAAK,KAAK,EAAE,UAAU,YACnB,eAAe,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAC7B,KAAC,QAAQ,IAEP,IAAI,EAAE,IAAI,EACV,SAAS,EAAE,IAAI,CAAC,EAAE,KAAK,aAAa,EACpC,SAAS,EAAE,OAAO,KAAK,IAAI,CAAC,EAAE,EAC9B,OAAO,EAAE,UAAU,EACnB,MAAM,UALD,IAAI,CAAC,EAAE,CAMZ,CACH,CAAC,GACE,IACF,CACP,CAAC;AACJ,CAAC"}
@@ -0,0 +1,34 @@
1
+ import type { ReactElement } from 'react';
2
+ import type { EcosystemSite, SiteId } from '../core/sites.ts';
3
+ export interface SiteTileProps {
4
+ /** The site the tile opens. */
5
+ site: EcosystemSite;
6
+ /** Whether this is the site the visitor is already on. */
7
+ isCurrent: boolean;
8
+ /**
9
+ * Whether the pointer is on it, which lights it in its own colour.
10
+ * @default false
11
+ */
12
+ isHovered?: boolean;
13
+ /**
14
+ * Told which site the pointer moved onto, or null when it left.
15
+ * @default undefined
16
+ */
17
+ onHover?: (id: SiteId | null) => void;
18
+ /**
19
+ * Whether the link opens a tab of its own. A menu the visitor opened on
20
+ * purpose does; a footer does not.
21
+ * @default false
22
+ */
23
+ newTab?: boolean;
24
+ }
25
+ /**
26
+ * One site: its mark, its name in its own colours, and what it does. The name
27
+ * and the tagline are real text — that is what a crawler reads to know what it
28
+ * is following, so neither is ever a `title` attribute.
29
+ * @param props - The site, whether it is the current or the hovered one, and
30
+ * how the link opens.
31
+ * @returns The tile.
32
+ */
33
+ export declare function SiteTile(props: SiteTileProps): ReactElement;
34
+ //# sourceMappingURL=SiteTile.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SiteTile.d.ts","sourceRoot":"","sources":["../../../src/ecosystem/ui/SiteTile.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAiB,YAAY,EAAE,MAAM,OAAO,CAAC;AAEzD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AA0C9D,MAAM,WAAW,aAAa;IAC5B,+BAA+B;IAC/B,IAAI,EAAE,aAAa,CAAC;IACpB,0DAA0D;IAC1D,SAAS,EAAE,OAAO,CAAC;IACnB;;;OAGG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB;;;OAGG;IACH,OAAO,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI,CAAC;IACtC;;;;OAIG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB;AAED;;;;;;;GAOG;AACH,wBAAgB,QAAQ,CAAC,KAAK,EAAE,aAAa,GAAG,YAAY,CAwD3D"}
@@ -0,0 +1,78 @@
1
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
+ import { siteUrl } from "../core/sites.js";
3
+ import { SiteMark } from "./marks.js";
4
+ const TILE_STYLE = {
5
+ display: 'flex',
6
+ alignItems: 'center',
7
+ padding: '7px 8px',
8
+ border: '1px solid transparent',
9
+ borderRadius: 10,
10
+ color: '#16202c',
11
+ gap: 10,
12
+ textDecoration: 'none',
13
+ transition: 'background 120ms, border-color 120ms, transform 120ms',
14
+ };
15
+ const MARK_HOLDER_STYLE = {
16
+ display: 'flex',
17
+ transition: 'transform 160ms',
18
+ };
19
+ const TEXT_STYLE = { minWidth: 0 };
20
+ const NAME_STYLE = {
21
+ display: 'flex',
22
+ alignItems: 'baseline',
23
+ fontSize: '0.9375rem',
24
+ fontWeight: 700,
25
+ letterSpacing: '-0.01em',
26
+ gap: 6,
27
+ whiteSpace: 'nowrap',
28
+ };
29
+ const HERE_STYLE = {
30
+ fontSize: '0.625rem',
31
+ fontWeight: 700,
32
+ letterSpacing: '0.04em',
33
+ textTransform: 'uppercase',
34
+ };
35
+ const TAGLINE_STYLE = {
36
+ color: '#5b6875',
37
+ fontSize: '0.75rem',
38
+ lineHeight: 1.35,
39
+ };
40
+ /**
41
+ * One site: its mark, its name in its own colours, and what it does. The name
42
+ * and the tagline are real text — that is what a crawler reads to know what it
43
+ * is following, so neither is ever a `title` attribute.
44
+ * @param props - The site, whether it is the current or the hovered one, and
45
+ * how the link opens.
46
+ * @returns The tile.
47
+ */
48
+ export function SiteTile(props) {
49
+ const { site, isCurrent, isHovered = false, onHover, newTab = false } = props;
50
+ const lit = isHovered && !isCurrent;
51
+ const body = (_jsxs(_Fragment, { children: [_jsx("div", { style: {
52
+ ...MARK_HOLDER_STYLE,
53
+ transform: lit ? 'scale(1.08) rotate(-6deg)' : 'none',
54
+ }, children: _jsx(SiteMark, { site: site }) }), _jsxs("div", { style: TEXT_STYLE, children: [_jsxs("div", { style: NAME_STYLE, children: [_jsxs("span", { children: [_jsx("span", { style: { color: site.brand }, children: site.name.lead }), site.name.dot ? _jsx("span", { style: { color: '#8a96a3' }, children: "." }) : null, _jsx("span", { style: { color: site.brandAlt }, children: site.name.alt })] }), isCurrent ? (_jsx("span", { style: { ...HERE_STYLE, color: site.brandAlt }, children: "you are here" })) : null] }), _jsx("div", { style: TAGLINE_STYLE, children: site.tagline })] })] }));
55
+ const style = {
56
+ ...TILE_STYLE,
57
+ background: tint(site, isCurrent, lit),
58
+ borderColor: borderOf(site, isCurrent, lit),
59
+ transform: lit ? 'translateY(-1px)' : 'none',
60
+ cursor: isCurrent ? 'default' : 'pointer',
61
+ };
62
+ if (isCurrent)
63
+ return _jsx("div", { style: style, children: body });
64
+ return (_jsx("a", { style: style, href: siteUrl(site), target: newTab ? '_blank' : undefined, rel: newTab ? 'noreferrer' : undefined, onMouseEnter: () => onHover?.(site.id), onMouseLeave: () => onHover?.(null), onFocus: () => onHover?.(site.id), onBlur: () => onHover?.(null), children: body }));
65
+ }
66
+ // A tile lights up in the colour of the site it opens, never in ours: the
67
+ // pointer moving down the grid is what makes the pairs of colours read.
68
+ function tint(site, isCurrent, lit) {
69
+ if (isCurrent)
70
+ return '#f5f7fa';
71
+ return lit ? `color-mix(in oklab, ${site.brand} 9%, white)` : 'transparent';
72
+ }
73
+ function borderOf(site, isCurrent, lit) {
74
+ if (isCurrent)
75
+ return '#dfe3e8';
76
+ return lit ? `color-mix(in oklab, ${site.brand} 32%, white)` : 'transparent';
77
+ }
78
+ //# sourceMappingURL=SiteTile.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SiteTile.js","sourceRoot":"","sources":["../../../src/ecosystem/ui/SiteTile.tsx"],"names":[],"mappings":";AAGA,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAE3C,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAa,CAAC;AAEvC,MAAM,UAAU,GAAkB;IAChC,OAAO,EAAE,MAAM;IACf,UAAU,EAAE,QAAQ;IACpB,OAAO,EAAE,SAAS;IAClB,MAAM,EAAE,uBAAuB;IAC/B,YAAY,EAAE,EAAE;IAChB,KAAK,EAAE,SAAS;IAChB,GAAG,EAAE,EAAE;IACP,cAAc,EAAE,MAAM;IACtB,UAAU,EAAE,uDAAuD;CACpE,CAAC;AACF,MAAM,iBAAiB,GAAkB;IACvC,OAAO,EAAE,MAAM;IACf,UAAU,EAAE,iBAAiB;CAC9B,CAAC;AACF,MAAM,UAAU,GAAkB,EAAE,QAAQ,EAAE,CAAC,EAAE,CAAC;AAClD,MAAM,UAAU,GAAkB;IAChC,OAAO,EAAE,MAAM;IACf,UAAU,EAAE,UAAU;IACtB,QAAQ,EAAE,WAAW;IACrB,UAAU,EAAE,GAAG;IACf,aAAa,EAAE,SAAS;IACxB,GAAG,EAAE,CAAC;IACN,UAAU,EAAE,QAAQ;CACrB,CAAC;AACF,MAAM,UAAU,GAAkB;IAChC,QAA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AuB,IAAI,CAAC,KAAK,aAAa,CAAC,CAAC,CAAC,aAAa,CAAC;AAC9E,CAAC;AAED,SAAS,QAAQ,CACf,IAAmB,EACnB,SAAkB,EAClB,GAAY;IAEZ,IAAI,SAAS;QAAE,OAAO,SAAS,CAAC;IAChC,OAAO,GAAG,CAAC,CAAC,CAAC,uBAAuB,IAAI,CAAC,KAAK,cAAc,CAAC,CAAC,CAAC,aAAa,CAAC;AAC/E,CAAC"}
@@ -1,7 +1,11 @@
1
1
  export type { EcosystemButtonProps } from './EcosystemButton.tsx';
2
2
  export { EcosystemButton } from './EcosystemButton.tsx';
3
+ export type { EcosystemLinksProps } from './EcosystemLinks.tsx';
4
+ export { EcosystemLinks } from './EcosystemLinks.tsx';
3
5
  export type { EcosystemMenuProps } from './EcosystemMenu.tsx';
4
6
  export { EcosystemMenu } from './EcosystemMenu.tsx';
5
7
  export type { SiteMarkProps } from './marks.tsx';
6
8
  export { SiteMark } from './marks.tsx';
9
+ export type { SiteTileProps } from './SiteTile.tsx';
10
+ export { SiteTile } from './SiteTile.tsx';
7
11
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/ecosystem/ui/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AAClE,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AACxD,YAAY,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AAC9D,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,YAAY,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AACjD,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/ecosystem/ui/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AAClE,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AACxD,YAAY,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAChE,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACtD,YAAY,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AAC9D,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,YAAY,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AACjD,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,YAAY,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AACpD,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC"}
@@ -1,4 +1,6 @@
1
1
  export { EcosystemButton } from "./EcosystemButton.js";
2
+ export { EcosystemLinks } from "./EcosystemLinks.js";
2
3
  export { EcosystemMenu } from "./EcosystemMenu.js";
3
4
  export { SiteMark } from "./marks.js";
5
+ export { SiteTile } from "./SiteTile.js";
4
6
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/ecosystem/ui/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAuB,CAAC;AAExD,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAqB,CAAC;AAEpD,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAa,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/ecosystem/ui/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAuB,CAAC;AAExD,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAsB,CAAC;AAEtD,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAqB,CAAC;AAEpD,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAa,CAAC;AAEvC,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAgB,CAAC"}