@hanzo/studio 0.1.19 → 0.1.20

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.
@@ -10,29 +10,13 @@
10
10
  * its PDF) by those bytes: `face()` finds the host's @font-face rules for it and
11
11
  * hands them back with the woff2 as a data: URL an SVG can embed.
12
12
  */
13
- const OFL = (dir) => `https://github.com/google/fonts/blob/main/ofl/${dir}/OFL.txt`;
14
- const P = (slug) => `https://cdn.jsdelivr.net/npm/@hanzo/font/dist/open/${slug}.css`;
13
+ import { OPEN } from '@hanzo/font/open';
14
+ const ZEN = 'https://www.npmjs.com/package/@hanzo/font (LICENSE.txt, SIL OFL 1.1)';
15
+ const ALL = [100, 200, 300, 400, 500, 600, 700, 800, 900];
15
16
  export const FONTS = [
16
- { family: 'Zen', role: 'sans', weights: [100, 200, 300, 400, 500, 600, 700, 800, 900], italic: true, shared: '', licence: 'https://www.npmjs.com/package/@hanzo/font (LICENSE.txt, SIL OFL 1.1)' },
17
- { family: 'Zen Mono', role: 'mono', weights: [100, 200, 300, 400, 500, 600, 700, 800, 900], italic: false, shared: '', licence: 'https://www.npmjs.com/package/@hanzo/font (LICENSE.txt, SIL OFL 1.1)' },
18
- { family: 'Inter', role: 'sans', weights: [400, 500, 600, 700, 800], italic: true, shared: P('inter'), licence: OFL('inter') },
19
- { family: 'Manrope', role: 'sans', weights: [400, 500, 600, 700, 800], italic: false, shared: P('manrope'), licence: OFL('manrope') },
20
- { family: 'DM Sans', role: 'sans', weights: [400, 500, 600, 700], italic: true, shared: P('dm-sans'), licence: OFL('dmsans') },
21
- { family: 'Work Sans', role: 'sans', weights: [400, 500, 600, 700], italic: true, shared: P('work-sans'), licence: OFL('worksans') },
22
- { family: 'IBM Plex Sans', role: 'sans', weights: [400, 500, 600, 700], italic: true, shared: P('ibm-plex-sans'), licence: OFL('ibmplexsans') },
23
- { family: 'Space Grotesk', role: 'display', weights: [400, 500, 600, 700], italic: false, shared: P('space-grotesk'), licence: OFL('spacegrotesk') },
24
- { family: 'Archivo', role: 'display', weights: [400, 500, 600, 700, 800, 900], italic: true, shared: P('archivo'), licence: OFL('archivo') },
25
- { family: 'Bricolage Grotesque', role: 'display', weights: [400, 500, 600, 700, 800], italic: false, shared: P('bricolage-grotesque'), licence: OFL('bricolagegrotesque') },
26
- { family: 'Syne', role: 'display', weights: [400, 500, 600, 700, 800], italic: false, shared: P('syne'), licence: OFL('syne') },
27
- { family: 'Fraunces', role: 'serif', weights: [400, 500, 600, 700, 800, 900], italic: true, shared: P('fraunces'), licence: OFL('fraunces') },
28
- { family: 'Playfair Display', role: 'serif', weights: [400, 500, 600, 700, 800, 900], italic: true, shared: P('playfair-display'), licence: OFL('playfairdisplay') },
29
- { family: 'DM Serif Display', role: 'serif', weights: [400], italic: true, shared: P('dm-serif-display'), licence: OFL('dmserifdisplay') },
30
- { family: 'Instrument Serif', role: 'serif', weights: [400], italic: true, shared: P('instrument-serif'), licence: OFL('instrumentserif') },
31
- { family: 'Cormorant Garamond', role: 'serif', weights: [400, 500, 600, 700], italic: true, shared: P('cormorant-garamond'), licence: OFL('cormorantgaramond') },
32
- { family: 'EB Garamond', role: 'serif', weights: [400, 500, 600, 700, 800], italic: true, shared: P('eb-garamond'), licence: OFL('ebgaramond') },
33
- { family: 'Source Serif 4', role: 'serif', weights: [400, 500, 600, 700], italic: true, shared: P('source-serif-4'), licence: OFL('sourceserif4') },
34
- { family: 'IBM Plex Mono', role: 'mono', weights: [400, 500, 600], italic: true, shared: P('ibm-plex-mono'), licence: OFL('ibmplexmono') },
35
- { family: 'JetBrains Mono', role: 'mono', weights: [400, 500, 600, 700], italic: true, shared: P('jetbrains-mono'), licence: OFL('jetbrainsmono') },
17
+ { family: 'Zen', role: 'sans', weights: ALL, italic: true, shared: '', licence: ZEN },
18
+ { family: 'Zen Mono', role: 'mono', weights: ALL, italic: false, shared: '', licence: ZEN },
19
+ ...OPEN.map((o) => ({ ...o, shared: `https://cdn.jsdelivr.net/npm/@hanzo/font/dist/open/${o.slug}.css` })),
36
20
  ];
37
21
  export const FAMILIES = FONTS.map((f) => f.family);
38
22
  export const font = (family) => FONTS.find((f) => f.family === family) ?? FONTS[0];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hanzo/studio",
3
- "version": "0.1.19",
3
+ "version": "0.1.20",
4
4
  "type": "module",
5
5
  "license": "BSD-3-Clause",
6
6
  "description": "Hanzo Studio: a chat that makes images, posters, documents, slides, type systems, 3D, video and sound, with every result open in a tab beside it. Mounted by the Hanzo app at hanzo.ai/studio and served whole at studio.hanzo.ai.",
@@ -15,7 +15,7 @@
15
15
  "@axe-core/playwright": "4.14.0",
16
16
  "@hanzo/build": "0.2.85",
17
17
  "@hanzo/composer": "0.2.0",
18
- "@hanzo/font": "1.10.0",
18
+ "@hanzo/font": "1.11.0",
19
19
  "@hanzo/gui": "8.3.5",
20
20
  "@hanzo/i18n": "0.5.3",
21
21
  "@hanzo/ui": "8.29.24",