@luxfi/ui 8.2.2 → 8.2.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/site/root-layout/index.cjs +2 -89
- package/dist/site/root-layout/index.d.ts +1 -0
- package/dist/site/root-layout/index.d.ts.map +1 -1
- package/dist/site/root-layout/index.js +2 -88
- package/package.json +1 -2
- package/src/site/root-layout/index.tsx +2 -3
- package/src/site/style/lux-fonts.css +1 -2
- package/dist/site/next/font/font-desc.cjs +0 -2
- package/dist/site/next/font/font-desc.d.ts +0 -19
- package/dist/site/next/font/font-desc.d.ts.map +0 -1
- package/dist/site/next/font/font-desc.js +0 -1
- package/dist/site/next/font/fonts.cjs +0 -42
- package/dist/site/next/font/fonts.d.ts +0 -4
- package/dist/site/next/font/fonts.d.ts.map +0 -1
- package/dist/site/next/font/fonts.js +0 -40
- package/dist/site/next/font/get-app-router-font-classes.cjs +0 -96
- package/dist/site/next/font/get-app-router-font-classes.d.ts +0 -15
- package/dist/site/next/font/get-app-router-font-classes.d.ts.map +0 -1
- package/dist/site/next/font/get-app-router-font-classes.js +0 -90
- package/dist/site/next/font/load-and-return-lux-next-fonts-on-import.cjs +0 -90
- package/dist/site/next/font/load-and-return-lux-next-fonts-on-import.d.ts +0 -8
- package/dist/site/next/font/load-and-return-lux-next-fonts-on-import.d.ts.map +0 -1
- package/dist/site/next/font/load-and-return-lux-next-fonts-on-import.js +0 -84
- package/dist/site/next/font/local/InterVariable-Italic.ttf +0 -0
- package/dist/site/next/font/local/InterVariable-Italic.woff2 +0 -0
- package/dist/site/next/font/local/InterVariable.ttf +0 -0
- package/dist/site/next/font/local/InterVariable.woff2 +0 -0
- package/dist/site/next/font/local/Zen-Variable.woff2 +0 -0
- package/dist/site/next/font/next-font-desc.cjs +0 -2
- package/dist/site/next/font/next-font-desc.d.ts +0 -20
- package/dist/site/next/font/next-font-desc.d.ts.map +0 -1
- package/dist/site/next/font/next-font-desc.js +0 -1
- package/dist/site/next/font/pages-router-font-vars.cjs +0 -100
- package/dist/site/next/font/pages-router-font-vars.d.ts +0 -3
- package/dist/site/next/font/pages-router-font-vars.d.ts.map +0 -1
- package/dist/site/next/font/pages-router-font-vars.js +0 -94
- package/src/site/next/font/font-desc.ts +0 -18
- package/src/site/next/font/fonts.ts +0 -40
- package/src/site/next/font/get-app-router-font-classes.ts +0 -19
- package/src/site/next/font/load-and-return-lux-next-fonts-on-import.ts +0 -60
- package/src/site/next/font/local/InterVariable-Italic.ttf +0 -0
- package/src/site/next/font/local/InterVariable-Italic.woff2 +0 -0
- package/src/site/next/font/local/InterVariable.ttf +0 -0
- package/src/site/next/font/local/InterVariable.woff2 +0 -0
- package/src/site/next/font/local/Zen-Variable.woff2 +0 -0
- package/src/site/next/font/next-font-desc.ts +0 -29
- package/src/site/next/font/pages-router-font-vars.tsx +0 -18
|
@@ -1,90 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var localFont = require('next/font/local');
|
|
4
|
-
|
|
5
|
-
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
6
|
-
|
|
7
|
-
var localFont__default = /*#__PURE__*/_interopDefault(localFont);
|
|
8
|
-
|
|
9
|
-
// src/site/next/font/load-and-return-lux-next-fonts-on-import.ts
|
|
10
|
-
|
|
11
|
-
// src/site/next/font/fonts.ts
|
|
12
|
-
var fonts_default = [
|
|
13
|
-
{
|
|
14
|
-
fontFamily: ["var(--font-inter)"],
|
|
15
|
-
// do not provide fall-backs due to next bug
|
|
16
|
-
cssVar: "--font-inter",
|
|
17
|
-
name: "sans"
|
|
18
|
-
},
|
|
19
|
-
{
|
|
20
|
-
fontFamily: ["var(--font-inter)"],
|
|
21
|
-
// do not provide fall-backs due to next bug
|
|
22
|
-
cssVar: "--font-inter",
|
|
23
|
-
name: "nav"
|
|
24
|
-
},
|
|
25
|
-
{
|
|
26
|
-
fontFamily: ["var(--font-zen-sans)"],
|
|
27
|
-
// do not provide fall-backs due to next bug
|
|
28
|
-
cssVar: "--font-zen-sans",
|
|
29
|
-
name: "heading"
|
|
30
|
-
},
|
|
31
|
-
{
|
|
32
|
-
name: "serif",
|
|
33
|
-
fontFamily: ["ui-serif", "Georgia", "Cambria", '"Times New Roman"', "Times"]
|
|
34
|
-
},
|
|
35
|
-
{
|
|
36
|
-
name: "mono",
|
|
37
|
-
fontFamily: [
|
|
38
|
-
"ui-monospace",
|
|
39
|
-
"SFMono-Regular",
|
|
40
|
-
"Menlo",
|
|
41
|
-
"Monaco",
|
|
42
|
-
"Consolas",
|
|
43
|
-
'"Liberation Mono"',
|
|
44
|
-
'"Courier New"',
|
|
45
|
-
"monospace"
|
|
46
|
-
]
|
|
47
|
-
}
|
|
48
|
-
];
|
|
49
|
-
|
|
50
|
-
// src/site/next/font/load-and-return-lux-next-fonts-on-import.ts
|
|
51
|
-
var zen = localFont__default.default({
|
|
52
|
-
src: "./local/Zen-Variable.woff2",
|
|
53
|
-
weight: "100 900",
|
|
54
|
-
display: "swap",
|
|
55
|
-
variable: "--font-zen-sans"
|
|
56
|
-
});
|
|
57
|
-
var inter = localFont__default.default({
|
|
58
|
-
src: "./local/InterVariable.ttf",
|
|
59
|
-
display: "swap",
|
|
60
|
-
variable: "--font-inter"
|
|
61
|
-
});
|
|
62
|
-
var load_and_return_lux_next_fonts_on_import_default = [
|
|
63
|
-
{
|
|
64
|
-
font: inter,
|
|
65
|
-
name: "sans"
|
|
66
|
-
},
|
|
67
|
-
{
|
|
68
|
-
font: inter,
|
|
69
|
-
name: "nav"
|
|
70
|
-
},
|
|
71
|
-
{
|
|
72
|
-
// Zen is one variable face over 100-900, so the display cut is weight and
|
|
73
|
-
// tracking in CSS rather than a second file: '.font-heading' in style/lux-global.css.
|
|
74
|
-
font: zen,
|
|
75
|
-
name: "heading"
|
|
76
|
-
}
|
|
77
|
-
].map(
|
|
78
|
-
(el) => {
|
|
79
|
-
const font = fonts_default.find((f) => el.name === f.name);
|
|
80
|
-
if (!font) {
|
|
81
|
-
throw new Error("lux-next-fonts: Next font is not paired to a TW font!");
|
|
82
|
-
}
|
|
83
|
-
return {
|
|
84
|
-
...font,
|
|
85
|
-
nextFont: el.font
|
|
86
|
-
};
|
|
87
|
-
}
|
|
88
|
-
);
|
|
89
|
-
|
|
90
|
-
module.exports = load_and_return_lux_next_fonts_on_import_default;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
declare const _default: {
|
|
2
|
-
name: string;
|
|
3
|
-
fontFamily: string[];
|
|
4
|
-
cssVar?: string;
|
|
5
|
-
nextFont: import("next/dist/compiled/@next/font/dist/types").NextFontWithVariable;
|
|
6
|
-
}[];
|
|
7
|
-
export default _default;
|
|
8
|
-
//# sourceMappingURL=load-and-return-lux-next-fonts-on-import.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"load-and-return-lux-next-fonts-on-import.d.ts","sourceRoot":"","sources":["../../../../src/site/next/font/load-and-return-lux-next-fonts-on-import.ts"],"names":[],"mappings":""}
|
|
@@ -1,84 +0,0 @@
|
|
|
1
|
-
import localFont from 'next/font/local';
|
|
2
|
-
|
|
3
|
-
// src/site/next/font/load-and-return-lux-next-fonts-on-import.ts
|
|
4
|
-
|
|
5
|
-
// src/site/next/font/fonts.ts
|
|
6
|
-
var fonts_default = [
|
|
7
|
-
{
|
|
8
|
-
fontFamily: ["var(--font-inter)"],
|
|
9
|
-
// do not provide fall-backs due to next bug
|
|
10
|
-
cssVar: "--font-inter",
|
|
11
|
-
name: "sans"
|
|
12
|
-
},
|
|
13
|
-
{
|
|
14
|
-
fontFamily: ["var(--font-inter)"],
|
|
15
|
-
// do not provide fall-backs due to next bug
|
|
16
|
-
cssVar: "--font-inter",
|
|
17
|
-
name: "nav"
|
|
18
|
-
},
|
|
19
|
-
{
|
|
20
|
-
fontFamily: ["var(--font-zen-sans)"],
|
|
21
|
-
// do not provide fall-backs due to next bug
|
|
22
|
-
cssVar: "--font-zen-sans",
|
|
23
|
-
name: "heading"
|
|
24
|
-
},
|
|
25
|
-
{
|
|
26
|
-
name: "serif",
|
|
27
|
-
fontFamily: ["ui-serif", "Georgia", "Cambria", '"Times New Roman"', "Times"]
|
|
28
|
-
},
|
|
29
|
-
{
|
|
30
|
-
name: "mono",
|
|
31
|
-
fontFamily: [
|
|
32
|
-
"ui-monospace",
|
|
33
|
-
"SFMono-Regular",
|
|
34
|
-
"Menlo",
|
|
35
|
-
"Monaco",
|
|
36
|
-
"Consolas",
|
|
37
|
-
'"Liberation Mono"',
|
|
38
|
-
'"Courier New"',
|
|
39
|
-
"monospace"
|
|
40
|
-
]
|
|
41
|
-
}
|
|
42
|
-
];
|
|
43
|
-
|
|
44
|
-
// src/site/next/font/load-and-return-lux-next-fonts-on-import.ts
|
|
45
|
-
var zen = localFont({
|
|
46
|
-
src: "./local/Zen-Variable.woff2",
|
|
47
|
-
weight: "100 900",
|
|
48
|
-
display: "swap",
|
|
49
|
-
variable: "--font-zen-sans"
|
|
50
|
-
});
|
|
51
|
-
var inter = localFont({
|
|
52
|
-
src: "./local/InterVariable.ttf",
|
|
53
|
-
display: "swap",
|
|
54
|
-
variable: "--font-inter"
|
|
55
|
-
});
|
|
56
|
-
var load_and_return_lux_next_fonts_on_import_default = [
|
|
57
|
-
{
|
|
58
|
-
font: inter,
|
|
59
|
-
name: "sans"
|
|
60
|
-
},
|
|
61
|
-
{
|
|
62
|
-
font: inter,
|
|
63
|
-
name: "nav"
|
|
64
|
-
},
|
|
65
|
-
{
|
|
66
|
-
// Zen is one variable face over 100-900, so the display cut is weight and
|
|
67
|
-
// tracking in CSS rather than a second file: '.font-heading' in style/lux-global.css.
|
|
68
|
-
font: zen,
|
|
69
|
-
name: "heading"
|
|
70
|
-
}
|
|
71
|
-
].map(
|
|
72
|
-
(el) => {
|
|
73
|
-
const font = fonts_default.find((f) => el.name === f.name);
|
|
74
|
-
if (!font) {
|
|
75
|
-
throw new Error("lux-next-fonts: Next font is not paired to a TW font!");
|
|
76
|
-
}
|
|
77
|
-
return {
|
|
78
|
-
...font,
|
|
79
|
-
nextFont: el.font
|
|
80
|
-
};
|
|
81
|
-
}
|
|
82
|
-
);
|
|
83
|
-
|
|
84
|
-
export { load_and_return_lux_next_fonts_on_import_default as default };
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import type localFont from 'next/font/local';
|
|
2
|
-
import type { FontDesc } from './font-desc';
|
|
3
|
-
/**
|
|
4
|
-
* What a next/font loader hands back, DERIVED from the loader.
|
|
5
|
-
*
|
|
6
|
-
* These were two hand-copied declarations marked "from next repo" — a copy of a
|
|
7
|
-
* type that keeps moving, which is how the OpenGraph types in ../head-metadata
|
|
8
|
-
* went stale and failed as "two different types with this name exist, but they
|
|
9
|
-
* are unrelated". `ReturnType` names the position and lets Next say what lives
|
|
10
|
-
* there. The loader answers with a union — a font is only given a variable
|
|
11
|
-
* when it was asked for one — so `Extract` picks the half that has it.
|
|
12
|
-
*/
|
|
13
|
-
export type NextFontWithVariable = Extract<ReturnType<typeof localFont>, {
|
|
14
|
-
variable: string;
|
|
15
|
-
}>;
|
|
16
|
-
interface NextFontDesc extends FontDesc {
|
|
17
|
-
nextFont: NextFontWithVariable;
|
|
18
|
-
}
|
|
19
|
-
export { type NextFontDesc as default, };
|
|
20
|
-
//# sourceMappingURL=next-font-desc.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"next-font-desc.d.ts","sourceRoot":"","sources":["../../../../src/site/next/font/next-font-desc.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,SAAS,MAAM,iBAAiB,CAAA;AAE5C,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAA;AAE3C;;;;;;;;;GASG;AACH,MAAM,MAAM,oBAAoB,GAAG,OAAO,CAAC,UAAU,CAAC,OAAO,SAAS,CAAC,EAAE;IAAE,QAAQ,EAAE,MAAM,CAAA;CAAE,CAAC,CAAA;AAQ9F,UAAU,YAAa,SAAQ,QAAQ;IACrC,QAAQ,EAAE,oBAAoB,CAAA;CAC/B;AAED,OAAO,EACL,KAAK,YAAY,IAAI,OAAO,GAC7B,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
|
|
@@ -1,100 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var localFont = require('next/font/local');
|
|
4
|
-
var jsxRuntime = require('react/jsx-runtime');
|
|
5
|
-
|
|
6
|
-
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
7
|
-
|
|
8
|
-
var localFont__default = /*#__PURE__*/_interopDefault(localFont);
|
|
9
|
-
|
|
10
|
-
// src/site/next/font/load-and-return-lux-next-fonts-on-import.ts
|
|
11
|
-
|
|
12
|
-
// src/site/next/font/fonts.ts
|
|
13
|
-
var fonts_default = [
|
|
14
|
-
{
|
|
15
|
-
fontFamily: ["var(--font-inter)"],
|
|
16
|
-
// do not provide fall-backs due to next bug
|
|
17
|
-
cssVar: "--font-inter",
|
|
18
|
-
name: "sans"
|
|
19
|
-
},
|
|
20
|
-
{
|
|
21
|
-
fontFamily: ["var(--font-inter)"],
|
|
22
|
-
// do not provide fall-backs due to next bug
|
|
23
|
-
cssVar: "--font-inter",
|
|
24
|
-
name: "nav"
|
|
25
|
-
},
|
|
26
|
-
{
|
|
27
|
-
fontFamily: ["var(--font-zen-sans)"],
|
|
28
|
-
// do not provide fall-backs due to next bug
|
|
29
|
-
cssVar: "--font-zen-sans",
|
|
30
|
-
name: "heading"
|
|
31
|
-
},
|
|
32
|
-
{
|
|
33
|
-
name: "serif",
|
|
34
|
-
fontFamily: ["ui-serif", "Georgia", "Cambria", '"Times New Roman"', "Times"]
|
|
35
|
-
},
|
|
36
|
-
{
|
|
37
|
-
name: "mono",
|
|
38
|
-
fontFamily: [
|
|
39
|
-
"ui-monospace",
|
|
40
|
-
"SFMono-Regular",
|
|
41
|
-
"Menlo",
|
|
42
|
-
"Monaco",
|
|
43
|
-
"Consolas",
|
|
44
|
-
'"Liberation Mono"',
|
|
45
|
-
'"Courier New"',
|
|
46
|
-
"monospace"
|
|
47
|
-
]
|
|
48
|
-
}
|
|
49
|
-
];
|
|
50
|
-
|
|
51
|
-
// src/site/next/font/load-and-return-lux-next-fonts-on-import.ts
|
|
52
|
-
var zen = localFont__default.default({
|
|
53
|
-
src: "./local/Zen-Variable.woff2",
|
|
54
|
-
weight: "100 900",
|
|
55
|
-
display: "swap",
|
|
56
|
-
variable: "--font-zen-sans"
|
|
57
|
-
});
|
|
58
|
-
var inter = localFont__default.default({
|
|
59
|
-
src: "./local/InterVariable.ttf",
|
|
60
|
-
display: "swap",
|
|
61
|
-
variable: "--font-inter"
|
|
62
|
-
});
|
|
63
|
-
var load_and_return_lux_next_fonts_on_import_default = [
|
|
64
|
-
{
|
|
65
|
-
font: inter,
|
|
66
|
-
name: "sans"
|
|
67
|
-
},
|
|
68
|
-
{
|
|
69
|
-
font: inter,
|
|
70
|
-
name: "nav"
|
|
71
|
-
},
|
|
72
|
-
{
|
|
73
|
-
// Zen is one variable face over 100-900, so the display cut is weight and
|
|
74
|
-
// tracking in CSS rather than a second file: '.font-heading' in style/lux-global.css.
|
|
75
|
-
font: zen,
|
|
76
|
-
name: "heading"
|
|
77
|
-
}
|
|
78
|
-
].map(
|
|
79
|
-
(el) => {
|
|
80
|
-
const font = fonts_default.find((f) => el.name === f.name);
|
|
81
|
-
if (!font) {
|
|
82
|
-
throw new Error("lux-next-fonts: Next font is not paired to a TW font!");
|
|
83
|
-
}
|
|
84
|
-
return {
|
|
85
|
-
...font,
|
|
86
|
-
nextFont: el.font
|
|
87
|
-
};
|
|
88
|
-
}
|
|
89
|
-
);
|
|
90
|
-
var PagesRouterFontVars = () => {
|
|
91
|
-
const fontVars = load_and_return_lux_next_fonts_on_import_default.map((fd) => `${fd.cssVar}: ${fd.nextFont.style.fontFamily};`).join("\n");
|
|
92
|
-
return /* @__PURE__ */ jsxRuntime.jsx("style", { jsx: true, global: true, children: `
|
|
93
|
-
html {
|
|
94
|
-
${fontVars}
|
|
95
|
-
}
|
|
96
|
-
` });
|
|
97
|
-
};
|
|
98
|
-
var pages_router_font_vars_default = PagesRouterFontVars;
|
|
99
|
-
|
|
100
|
-
module.exports = pages_router_font_vars_default;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"pages-router-font-vars.d.ts","sourceRoot":"","sources":["../../../../src/site/next/font/pages-router-font-vars.tsx"],"names":[],"mappings":"AAIA,QAAA,MAAM,mBAAmB,EAAE,KAAK,CAAC,EAWhC,CAAA;eAEc,mBAAmB"}
|
|
@@ -1,94 +0,0 @@
|
|
|
1
|
-
import localFont from 'next/font/local';
|
|
2
|
-
import { jsx } from 'react/jsx-runtime';
|
|
3
|
-
|
|
4
|
-
// src/site/next/font/load-and-return-lux-next-fonts-on-import.ts
|
|
5
|
-
|
|
6
|
-
// src/site/next/font/fonts.ts
|
|
7
|
-
var fonts_default = [
|
|
8
|
-
{
|
|
9
|
-
fontFamily: ["var(--font-inter)"],
|
|
10
|
-
// do not provide fall-backs due to next bug
|
|
11
|
-
cssVar: "--font-inter",
|
|
12
|
-
name: "sans"
|
|
13
|
-
},
|
|
14
|
-
{
|
|
15
|
-
fontFamily: ["var(--font-inter)"],
|
|
16
|
-
// do not provide fall-backs due to next bug
|
|
17
|
-
cssVar: "--font-inter",
|
|
18
|
-
name: "nav"
|
|
19
|
-
},
|
|
20
|
-
{
|
|
21
|
-
fontFamily: ["var(--font-zen-sans)"],
|
|
22
|
-
// do not provide fall-backs due to next bug
|
|
23
|
-
cssVar: "--font-zen-sans",
|
|
24
|
-
name: "heading"
|
|
25
|
-
},
|
|
26
|
-
{
|
|
27
|
-
name: "serif",
|
|
28
|
-
fontFamily: ["ui-serif", "Georgia", "Cambria", '"Times New Roman"', "Times"]
|
|
29
|
-
},
|
|
30
|
-
{
|
|
31
|
-
name: "mono",
|
|
32
|
-
fontFamily: [
|
|
33
|
-
"ui-monospace",
|
|
34
|
-
"SFMono-Regular",
|
|
35
|
-
"Menlo",
|
|
36
|
-
"Monaco",
|
|
37
|
-
"Consolas",
|
|
38
|
-
'"Liberation Mono"',
|
|
39
|
-
'"Courier New"',
|
|
40
|
-
"monospace"
|
|
41
|
-
]
|
|
42
|
-
}
|
|
43
|
-
];
|
|
44
|
-
|
|
45
|
-
// src/site/next/font/load-and-return-lux-next-fonts-on-import.ts
|
|
46
|
-
var zen = localFont({
|
|
47
|
-
src: "./local/Zen-Variable.woff2",
|
|
48
|
-
weight: "100 900",
|
|
49
|
-
display: "swap",
|
|
50
|
-
variable: "--font-zen-sans"
|
|
51
|
-
});
|
|
52
|
-
var inter = localFont({
|
|
53
|
-
src: "./local/InterVariable.ttf",
|
|
54
|
-
display: "swap",
|
|
55
|
-
variable: "--font-inter"
|
|
56
|
-
});
|
|
57
|
-
var load_and_return_lux_next_fonts_on_import_default = [
|
|
58
|
-
{
|
|
59
|
-
font: inter,
|
|
60
|
-
name: "sans"
|
|
61
|
-
},
|
|
62
|
-
{
|
|
63
|
-
font: inter,
|
|
64
|
-
name: "nav"
|
|
65
|
-
},
|
|
66
|
-
{
|
|
67
|
-
// Zen is one variable face over 100-900, so the display cut is weight and
|
|
68
|
-
// tracking in CSS rather than a second file: '.font-heading' in style/lux-global.css.
|
|
69
|
-
font: zen,
|
|
70
|
-
name: "heading"
|
|
71
|
-
}
|
|
72
|
-
].map(
|
|
73
|
-
(el) => {
|
|
74
|
-
const font = fonts_default.find((f) => el.name === f.name);
|
|
75
|
-
if (!font) {
|
|
76
|
-
throw new Error("lux-next-fonts: Next font is not paired to a TW font!");
|
|
77
|
-
}
|
|
78
|
-
return {
|
|
79
|
-
...font,
|
|
80
|
-
nextFont: el.font
|
|
81
|
-
};
|
|
82
|
-
}
|
|
83
|
-
);
|
|
84
|
-
var PagesRouterFontVars = () => {
|
|
85
|
-
const fontVars = load_and_return_lux_next_fonts_on_import_default.map((fd) => `${fd.cssVar}: ${fd.nextFont.style.fontFamily};`).join("\n");
|
|
86
|
-
return /* @__PURE__ */ jsx("style", { jsx: true, global: true, children: `
|
|
87
|
-
html {
|
|
88
|
-
${fontVars}
|
|
89
|
-
}
|
|
90
|
-
` });
|
|
91
|
-
};
|
|
92
|
-
var pages_router_font_vars_default = PagesRouterFontVars;
|
|
93
|
-
|
|
94
|
-
export { pages_router_font_vars_default as default };
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* A font in this site's vocabulary.
|
|
3
|
-
*
|
|
4
|
-
* `name` is the ROLE the font plays — `sans`, `nav`, `heading`, `serif`, `mono`
|
|
5
|
-
* — not a file and not a family. The stack is what the browser resolves, and
|
|
6
|
-
* `cssVar` is the custom property the next/font loader publishes the loaded
|
|
7
|
-
* face under, so the stack can point at it.
|
|
8
|
-
*
|
|
9
|
-
* It lived in a Tailwind preset and was called `TwFontDesc`, which named the
|
|
10
|
-
* engine that happened to read it rather than what it is. The engine is gone;
|
|
11
|
-
* the fonts are not.
|
|
12
|
-
*/
|
|
13
|
-
export type FontDesc = {
|
|
14
|
-
/** The role: `sans`, `nav`, `heading`, `serif`, `mono`. */
|
|
15
|
-
name: string
|
|
16
|
-
fontFamily: string[]
|
|
17
|
-
cssVar?: string
|
|
18
|
-
}
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import type { FontDesc } from './font-desc'
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
/* Read by ./load-and-return-lux-next-fonts-on-import.ts */
|
|
5
|
-
|
|
6
|
-
export default [
|
|
7
|
-
{
|
|
8
|
-
fontFamily: ['var(--font-inter)'], // do not provide fall-backs due to next bug
|
|
9
|
-
cssVar: '--font-inter',
|
|
10
|
-
name: 'sans'
|
|
11
|
-
},
|
|
12
|
-
{
|
|
13
|
-
fontFamily: ['var(--font-inter)'], // do not provide fall-backs due to next bug
|
|
14
|
-
cssVar: '--font-inter',
|
|
15
|
-
name: 'nav'
|
|
16
|
-
},
|
|
17
|
-
{
|
|
18
|
-
fontFamily: ['var(--font-zen-sans)'], // do not provide fall-backs due to next bug
|
|
19
|
-
cssVar: '--font-zen-sans',
|
|
20
|
-
name: 'heading'
|
|
21
|
-
},
|
|
22
|
-
{
|
|
23
|
-
name: 'serif',
|
|
24
|
-
fontFamily: ['ui-serif', 'Georgia', 'Cambria', '"Times New Roman"', 'Times']
|
|
25
|
-
},
|
|
26
|
-
{
|
|
27
|
-
name: 'mono',
|
|
28
|
-
fontFamily: [
|
|
29
|
-
'ui-monospace',
|
|
30
|
-
'SFMono-Regular',
|
|
31
|
-
'Menlo',
|
|
32
|
-
'Monaco',
|
|
33
|
-
'Consolas',
|
|
34
|
-
'"Liberation Mono"',
|
|
35
|
-
'"Courier New"',
|
|
36
|
-
'monospace',
|
|
37
|
-
]
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
] as FontDesc[]
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import nextFonts from './load-and-return-lux-next-fonts-on-import'
|
|
2
|
-
import type NextFontDesc from './next-font-desc'
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
* next/font's own generated class names, for <body> in an app-router app using
|
|
6
|
-
* our RootLayout.
|
|
7
|
-
*
|
|
8
|
-
* Each one DEFINES a custom property holding the face it loaded, so they have
|
|
9
|
-
* to land on an element before anything can name `var(--font-inter)`.
|
|
10
|
-
*
|
|
11
|
-
* It used to append `font-<role>` for the default face as well. That was a
|
|
12
|
-
* utility class, and with no engine generating it the body had a name no sheet
|
|
13
|
-
* served — the family is set on `body` in lux-global.css instead, where it can
|
|
14
|
-
* point at the property these classes define.
|
|
15
|
-
*/
|
|
16
|
-
export default () => {
|
|
17
|
-
const named = nextFonts.map((desc: NextFontDesc) => desc.nextFont!.variable)
|
|
18
|
-
return [...new Set(named)].join(' ')
|
|
19
|
-
}
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
// import { Inter } from 'next/font/google'
|
|
2
|
-
import localFont from 'next/font/local'
|
|
3
|
-
|
|
4
|
-
import type { FontDesc } from './font-desc'
|
|
5
|
-
import type NextFontDesc from './next-font-desc'
|
|
6
|
-
|
|
7
|
-
import fonts from './fonts'
|
|
8
|
-
|
|
9
|
-
/*
|
|
10
|
-
Creating NextFontDesc's and FontDesc's has to be seperated because they are needed
|
|
11
|
-
at different times during the next compile / build. Otherwise a nasty
|
|
12
|
-
race condition happens!
|
|
13
|
-
|
|
14
|
-
Also, requires that "Font loaders must be called and assigned to a const in the module scope"
|
|
15
|
-
|
|
16
|
-
*/
|
|
17
|
-
|
|
18
|
-
const zen = localFont({
|
|
19
|
-
src: './local/Zen-Variable.woff2',
|
|
20
|
-
weight: '100 900',
|
|
21
|
-
display: 'swap',
|
|
22
|
-
variable: '--font-zen-sans',
|
|
23
|
-
})
|
|
24
|
-
|
|
25
|
-
const inter = localFont({
|
|
26
|
-
src: './local/InterVariable.ttf',
|
|
27
|
-
display: 'swap',
|
|
28
|
-
variable: '--font-inter',
|
|
29
|
-
})
|
|
30
|
-
|
|
31
|
-
export default [
|
|
32
|
-
{
|
|
33
|
-
font: inter,
|
|
34
|
-
name: 'sans'
|
|
35
|
-
},
|
|
36
|
-
{
|
|
37
|
-
font: inter,
|
|
38
|
-
name: 'nav'
|
|
39
|
-
},
|
|
40
|
-
{
|
|
41
|
-
// Zen is one variable face over 100-900, so the display cut is weight and
|
|
42
|
-
// tracking in CSS rather than a second file: '.font-heading' in style/lux-global.css.
|
|
43
|
-
font: zen,
|
|
44
|
-
name: 'heading'
|
|
45
|
-
}
|
|
46
|
-
].map (
|
|
47
|
-
(el) => {
|
|
48
|
-
const font: FontDesc | undefined = fonts.find((f: FontDesc) => (el.name === f.name))
|
|
49
|
-
if (!font) {
|
|
50
|
-
throw new Error('lux-next-fonts: Next font is not paired to a TW font!')
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
return ({
|
|
54
|
-
...font,
|
|
55
|
-
nextFont: el.font,
|
|
56
|
-
})
|
|
57
|
-
}
|
|
58
|
-
) satisfies NextFontDesc[]
|
|
59
|
-
|
|
60
|
-
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import type localFont from 'next/font/local'
|
|
2
|
-
|
|
3
|
-
import type { FontDesc } from './font-desc'
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* What a next/font loader hands back, DERIVED from the loader.
|
|
7
|
-
*
|
|
8
|
-
* These were two hand-copied declarations marked "from next repo" — a copy of a
|
|
9
|
-
* type that keeps moving, which is how the OpenGraph types in ../head-metadata
|
|
10
|
-
* went stale and failed as "two different types with this name exist, but they
|
|
11
|
-
* are unrelated". `ReturnType` names the position and lets Next say what lives
|
|
12
|
-
* there. The loader answers with a union — a font is only given a variable
|
|
13
|
-
* when it was asked for one — so `Extract` picks the half that has it.
|
|
14
|
-
*/
|
|
15
|
-
export type NextFontWithVariable = Extract<ReturnType<typeof localFont>, { variable: string }>
|
|
16
|
-
|
|
17
|
-
/*
|
|
18
|
-
NextFontDesc and FontDesc have to be seperate because they are needed
|
|
19
|
-
at different times during the next compile / build. Otherwise a nasty
|
|
20
|
-
race condition happens! That's why they are in different files.
|
|
21
|
-
*/
|
|
22
|
-
|
|
23
|
-
interface NextFontDesc extends FontDesc {
|
|
24
|
-
nextFont: NextFontWithVariable
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
export {
|
|
28
|
-
type NextFontDesc as default,
|
|
29
|
-
}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
import nextFonts from './load-and-return-lux-next-fonts-on-import'
|
|
3
|
-
import type NextFontDesc from './next-font-desc'
|
|
4
|
-
|
|
5
|
-
const PagesRouterFontVars: React.FC = () => {
|
|
6
|
-
|
|
7
|
-
const fontVars = nextFonts.map((fd: NextFontDesc) => (
|
|
8
|
-
`${fd.cssVar}: ${fd.nextFont.style.fontFamily};`
|
|
9
|
-
)).join('\n')
|
|
10
|
-
|
|
11
|
-
return <style jsx global>{`
|
|
12
|
-
html {
|
|
13
|
-
${fontVars}
|
|
14
|
-
}
|
|
15
|
-
`}</style>
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
export default PagesRouterFontVars
|