@swift-rust/font 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.
- package/README.md +30 -0
- package/dist/google.d.ts +2076 -0
- package/dist/google.d.ts.map +1 -0
- package/dist/google.js +4163 -0
- package/dist/google.js.map +1 -0
- package/dist/index.d.ts +24 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +9 -0
- package/dist/index.js.map +1 -0
- package/dist/local.d.ts +106 -0
- package/dist/local.d.ts.map +1 -0
- package/dist/local.js +194 -0
- package/dist/local.js.map +1 -0
- package/dist/smoke.test.d.ts +2 -0
- package/dist/smoke.test.d.ts.map +1 -0
- package/dist/smoke.test.js +6 -0
- package/dist/smoke.test.js.map +1 -0
- package/package.json +50 -0
package/dist/local.js
ADDED
|
@@ -0,0 +1,194 @@
|
|
|
1
|
+
import { normalizeClassName } from "./index.js";
|
|
2
|
+
function toSource(input) {
|
|
3
|
+
if (typeof input === "string") {
|
|
4
|
+
const format = inferFormat(input);
|
|
5
|
+
return { path: input, format, weight: 400, style: "normal" };
|
|
6
|
+
}
|
|
7
|
+
return { format: "woff2", weight: 400, style: "normal", ...input };
|
|
8
|
+
}
|
|
9
|
+
function inferFormat(path) {
|
|
10
|
+
const ext = path.split(".").pop()?.toLowerCase();
|
|
11
|
+
if (ext === "woff2")
|
|
12
|
+
return "woff2";
|
|
13
|
+
if (ext === "woff")
|
|
14
|
+
return "woff";
|
|
15
|
+
if (ext === "ttf")
|
|
16
|
+
return "truetype";
|
|
17
|
+
if (ext === "otf")
|
|
18
|
+
return "opentype";
|
|
19
|
+
if (ext === "eot")
|
|
20
|
+
return "embedded-opentype";
|
|
21
|
+
return "woff2";
|
|
22
|
+
}
|
|
23
|
+
function _buildFaceDecl(source) {
|
|
24
|
+
const format = source.format ?? inferFormat(source.path);
|
|
25
|
+
return `url("${source.path}") format("${format}")`;
|
|
26
|
+
}
|
|
27
|
+
export function localFont(options) {
|
|
28
|
+
const sources = Array.isArray(options.src) ? options.src : [options.src];
|
|
29
|
+
const parsed = sources.map(toSource);
|
|
30
|
+
const first = parsed[0];
|
|
31
|
+
if (!first)
|
|
32
|
+
throw new Error("localFont: at least one src is required");
|
|
33
|
+
const family = options.family ??
|
|
34
|
+
first.path
|
|
35
|
+
.split("/")
|
|
36
|
+
.pop()
|
|
37
|
+
?.replace(/\.[^.]+$/, "")
|
|
38
|
+
?.replace(/[-_]+/g, " ")
|
|
39
|
+
.replace(/\b\w/g, (c) => c.toUpperCase()) ??
|
|
40
|
+
"LocalFont";
|
|
41
|
+
const className = options.variable
|
|
42
|
+
? `${normalizeClassName(family)} __swift_rust_local_${family.toLowerCase().replace(/\s+/g, "_")}`
|
|
43
|
+
: normalizeClassName(family);
|
|
44
|
+
return {
|
|
45
|
+
className,
|
|
46
|
+
style: { fontFamily: `'${family}'` },
|
|
47
|
+
variable: options.variable ? `--font-${family.toLowerCase().replace(/\s+/g, "-")}` : undefined,
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
export const LAUSANNE_PATHS = {
|
|
51
|
+
regular: "/_swift-rust/fonts/Lausanne.otf",
|
|
52
|
+
};
|
|
53
|
+
export const DX_SLIGHT_PATHS = {
|
|
54
|
+
mediumultra: "/_swift-rust/fonts/dx-slight-font/dxslight-mediumultra-free-personal-use.otf",
|
|
55
|
+
extbdultraslant: "/_swift-rust/fonts/dx-slight-font/dxslight-extbdultraslant-free-personal-use.otf",
|
|
56
|
+
};
|
|
57
|
+
export const VARENT_PATHS = {
|
|
58
|
+
bold: "/_swift-rust/fonts/varent-font-family/VarentGrotesk-Bold.otf",
|
|
59
|
+
extLtIta: "/_swift-rust/fonts/varent-font-family/VarentGrotesk-ExtLtIta.otf",
|
|
60
|
+
};
|
|
61
|
+
export const ZIMULA_PATHS = {
|
|
62
|
+
"100": "/_swift-rust/fonts/zimula-font-family/ZimulaTrial-TrialThin-BF668e04625c90d.otf",
|
|
63
|
+
"200": "/_swift-rust/fonts/zimula-font-family/ZimulaTrial-TrialExtraLight-BF668e045fcee5d.otf",
|
|
64
|
+
"300": "/_swift-rust/fonts/zimula-font-family/ZimulaTrial-TrialLight-BF668e04604745c.otf",
|
|
65
|
+
"400": "/_swift-rust/fonts/zimula-font-family/ZimulaTrial-TrialRegular-BF668e0461647e9.otf",
|
|
66
|
+
"500": "/_swift-rust/fonts/zimula-font-family/ZimulaTrial-TrialMedium-BF668e0461113f6.otf",
|
|
67
|
+
"600": "/_swift-rust/fonts/zimula-font-family/ZimulaTrial-TrialSemBdInkTrap-BF668e04622d6c8.otf",
|
|
68
|
+
"700": "/_swift-rust/fonts/zimula-font-family/ZimulaTrial-TrialBold-BF668e045c58270.otf",
|
|
69
|
+
"800": "/_swift-rust/fonts/zimula-font-family/ZimulaTrial-TrialExtraBold-BF668e045eba841.otf",
|
|
70
|
+
"900": "/_swift-rust/fonts/zimula-font-family/ZimulaTrial-TrialBlack-BF668e045b2a9b6.otf",
|
|
71
|
+
"100-ink-trap": "/_swift-rust/fonts/zimula-font-family/ZimulaTrial-TrialThinInkTrap-BF668e046255f82.otf",
|
|
72
|
+
"200-ink-trap": "/_swift-rust/fonts/zimula-font-family/ZimulaTrial-TrialExtLtInkTrap-BF668e04600d505.otf",
|
|
73
|
+
"300-ink-trap": "/_swift-rust/fonts/zimula-font-family/ZimulaTrial-TrialLightInkTrap-BF668e046080861.otf",
|
|
74
|
+
"400-ink-trap": "/_swift-rust/fonts/zimula-font-family/ZimulaTrial-TrialRegInkTrap-BF668e0461cc57b.otf",
|
|
75
|
+
"500-ink-trap": "/_swift-rust/fonts/zimula-font-family/ZimulaTrial-TrialMedInkTrap-BF668e04616fa54.otf",
|
|
76
|
+
"600-ink-trap": "/_swift-rust/fonts/zimula-font-family/ZimulaTrial-TrialSemBdInkTrap-BF668e04622d6c8.otf",
|
|
77
|
+
"700-ink-trap": "/_swift-rust/fonts/zimula-font-family/ZimulaTrial-TrialBoldInkTrap-BF668e045d3b87d.otf",
|
|
78
|
+
"800-ink-trap": "/_swift-rust/fonts/zimula-font-family/ZimulaTrial-TrialExtBdInkTrap-BF668e045f586a1.otf",
|
|
79
|
+
"900-ink-trap": "/_swift-rust/fonts/zimula-font-family/ZimulaTrial-TrialBlackInkTrap-BF668e045be0cd8.otf",
|
|
80
|
+
"100-ink-spot": "/_swift-rust/fonts/zimula-font-family/ZimulaTrial-TrialThinInkSpot-BF668e046255f82.otf",
|
|
81
|
+
"300-ink-spot": "/_swift-rust/fonts/zimula-font-family/ZimulaTrial-TrialLightInkSpot-BF668e046080861.otf",
|
|
82
|
+
"400-ink-spot": "/_swift-rust/fonts/zimula-font-family/ZimulaTrial-TrialRegInkSpot-BF668e0461db401.otf",
|
|
83
|
+
"600-ink-spot": "/_swift-rust/fonts/zimula-font-family/ZimulaTrial-TrialSemBdInkSpot-BF668e0462392d9.otf",
|
|
84
|
+
"700-ink-spot": "/_swift-rust/fonts/zimula-font-family/ZimulaTrial-TrialBoldInkSpot-BF668e045cb42cf.otf",
|
|
85
|
+
"800-ink-spot": "/_swift-rust/fonts/zimula-font-family/ZimulaTrial-TrialExtBdInkSpot-BF668e045ec2d36.otf",
|
|
86
|
+
"900-ink-spot": "/_swift-rust/fonts/zimula-font-family/ZimulaTrial-TrialBlackInkSpot-BF668e045bb7998.otf",
|
|
87
|
+
};
|
|
88
|
+
function buildLocalFamily(family, _sources, variable) {
|
|
89
|
+
const fallback = ["system-ui", "sans-serif"];
|
|
90
|
+
const className = variable
|
|
91
|
+
? `${normalizeClassName(family)} __swift_rust_local_${family.toLowerCase().replace(/\s+/g, "_")}`
|
|
92
|
+
: normalizeClassName(family);
|
|
93
|
+
return {
|
|
94
|
+
className,
|
|
95
|
+
style: { fontFamily: `'${family}', ${fallback.join(", ")}` },
|
|
96
|
+
variable: variable ? `--font-${family.toLowerCase().replace(/\s+/g, "-")}` : undefined,
|
|
97
|
+
};
|
|
98
|
+
}
|
|
99
|
+
export const Lausanne = (options = {}) => buildLocalFamily("Lausanne", [{ path: LAUSANNE_PATHS.regular, weight: 400, style: "normal" }], options.variable ?? false);
|
|
100
|
+
export const DxSlight = (options = {}) => buildLocalFamily("DxSlight", [
|
|
101
|
+
{ path: DX_SLIGHT_PATHS.mediumultra, weight: 500, style: "normal" },
|
|
102
|
+
{ path: DX_SLIGHT_PATHS.extbdultraslant, weight: 800, style: "italic" },
|
|
103
|
+
], options.variable ?? false);
|
|
104
|
+
export const DxSlightMediumUltra = (options = {}) => buildLocalFamily("DxSlight Medium Ultra", [{ path: DX_SLIGHT_PATHS.mediumultra, weight: 500, style: "normal" }], options.variable ?? false);
|
|
105
|
+
export const DxSlightExtBdUltraSlant = (options = {}) => buildLocalFamily("DxSlight ExtBd UltraSlant", [{ path: DX_SLIGHT_PATHS.extbdultraslant, weight: 800, style: "italic" }], options.variable ?? false);
|
|
106
|
+
export const VarentGrotesk = (options = {}) => buildLocalFamily("Varent Grotesk", [
|
|
107
|
+
{ path: VARENT_PATHS.bold, weight: 700, style: "normal" },
|
|
108
|
+
{ path: VARENT_PATHS.extLtIta, weight: 200, style: "italic" },
|
|
109
|
+
], options.variable ?? false);
|
|
110
|
+
export const VarentGroteskBold = (options = {}) => buildLocalFamily("Varent Grotesk Bold", [{ path: VARENT_PATHS.bold, weight: 700, style: "normal" }], options.variable ?? false);
|
|
111
|
+
export const VarentGroteskExtLtIta = (options = {}) => buildLocalFamily("Varent Grotesk ExtLtIta", [{ path: VARENT_PATHS.extLtIta, weight: 200, style: "italic" }], options.variable ?? false);
|
|
112
|
+
export const Zimula = (options = {}) => buildLocalFamily("Zimula", Object.entries(ZIMULA_PATHS).map(([key, path]) => {
|
|
113
|
+
const match = key.match(/^(\d+)(-(ink-trap|ink-spot))?$/);
|
|
114
|
+
const weight = match?.[1] ? Number.parseInt(match[1], 10) : 400;
|
|
115
|
+
const style = "normal";
|
|
116
|
+
void style;
|
|
117
|
+
return { path, weight, style };
|
|
118
|
+
}), options.variable ?? false);
|
|
119
|
+
export const ALL_LOCAL_FONTS = {
|
|
120
|
+
Lausanne,
|
|
121
|
+
DxSlight,
|
|
122
|
+
DxSlightMediumUltra,
|
|
123
|
+
DxSlightExtBdUltraSlant,
|
|
124
|
+
VarentGrotesk,
|
|
125
|
+
VarentGroteskBold,
|
|
126
|
+
VarentGroteskExtLtIta,
|
|
127
|
+
Zimula,
|
|
128
|
+
};
|
|
129
|
+
export const ALL_LOCAL_FONT_PATHS = {
|
|
130
|
+
...LAUSANNE_PATHS,
|
|
131
|
+
...DX_SLIGHT_PATHS,
|
|
132
|
+
...VARENT_PATHS,
|
|
133
|
+
...ZIMULA_PATHS,
|
|
134
|
+
};
|
|
135
|
+
export function localFontCss() {
|
|
136
|
+
const decls = [];
|
|
137
|
+
decls.push(`
|
|
138
|
+
@font-face {
|
|
139
|
+
font-family: "Lausanne";
|
|
140
|
+
src: url("${LAUSANNE_PATHS.regular}") format("opentype");
|
|
141
|
+
font-weight: 400;
|
|
142
|
+
font-style: normal;
|
|
143
|
+
font-display: swap;
|
|
144
|
+
}`);
|
|
145
|
+
decls.push(`
|
|
146
|
+
@font-face {
|
|
147
|
+
font-family: "DxSlight";
|
|
148
|
+
src: url("${DX_SLIGHT_PATHS.mediumultra}") format("opentype");
|
|
149
|
+
font-weight: 500;
|
|
150
|
+
font-style: normal;
|
|
151
|
+
font-display: swap;
|
|
152
|
+
}
|
|
153
|
+
@font-face {
|
|
154
|
+
font-family: "DxSlight";
|
|
155
|
+
src: url("${DX_SLIGHT_PATHS.extbdultraslant}") format("opentype");
|
|
156
|
+
font-weight: 800;
|
|
157
|
+
font-style: italic;
|
|
158
|
+
font-display: swap;
|
|
159
|
+
}`);
|
|
160
|
+
decls.push(`
|
|
161
|
+
@font-face {
|
|
162
|
+
font-family: "Varent Grotesk";
|
|
163
|
+
src: url("${VARENT_PATHS.bold}") format("opentype");
|
|
164
|
+
font-weight: 700;
|
|
165
|
+
font-style: normal;
|
|
166
|
+
font-display: swap;
|
|
167
|
+
}
|
|
168
|
+
@font-face {
|
|
169
|
+
font-family: "Varent Grotesk";
|
|
170
|
+
src: url("${VARENT_PATHS.extLtIta}") format("opentype");
|
|
171
|
+
font-weight: 200;
|
|
172
|
+
font-style: italic;
|
|
173
|
+
font-display: swap;
|
|
174
|
+
}`);
|
|
175
|
+
const zimulaDecls = Object.entries(ZIMULA_PATHS)
|
|
176
|
+
.map(([key, path]) => {
|
|
177
|
+
const match = key.match(/^(\d+)(-(ink-(trap|spot)))?$/);
|
|
178
|
+
const weight = match?.[1] ? match[1] : "400";
|
|
179
|
+
const variant = match?.[3] ?? null;
|
|
180
|
+
const variantLabel = variant === "trap" ? " Ink Trap" : variant === "spot" ? " Ink Spot" : "";
|
|
181
|
+
return `
|
|
182
|
+
@font-face {
|
|
183
|
+
font-family: "Zimula${variantLabel.replace(/\s/g, "")}";
|
|
184
|
+
src: url("${path}") format("opentype");
|
|
185
|
+
font-weight: ${weight};
|
|
186
|
+
font-style: normal;
|
|
187
|
+
font-display: swap;
|
|
188
|
+
}`;
|
|
189
|
+
})
|
|
190
|
+
.join("\n");
|
|
191
|
+
decls.push(zimulaDecls);
|
|
192
|
+
return decls.join("\n\n");
|
|
193
|
+
}
|
|
194
|
+
//# sourceMappingURL=local.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"local.js","sourceRoot":"","sources":["../src/local.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAehD,SAAS,QAAQ,CAAC,KAA+B;IAC/C,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;QAC9B,MAAM,MAAM,GAAG,WAAW,CAAC,KAAK,CAAC,CAAC;QAClC,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,KAAK,EAAE,QAAQ,EAAE,CAAC;IAC/D,CAAC;IACD,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,GAAG,EAAE,KAAK,EAAE,QAAQ,EA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C,KAAK,EAAE,EAAE,CAAC;cACzC,IAAI;iBACD,MAAM;;;EAGrB,CAAC;IACC,CAAC,CAAC;SACD,IAAI,CAAC,IAAI,CAAC,CAAC;IACd,KAAK,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;IAExB,OAAO,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;AAC5B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"smoke.test.d.ts","sourceRoot":"","sources":["../src/smoke.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"smoke.test.js","sourceRoot":"","sources":["../src/smoke.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,UAAU,CAAC;AACxC,OAAO,KAAK,GAAG,MAAM,SAAS,CAAC;AAE/B,IAAI,CAAC,2CAA2C,EAAE,GAAG,EAAE;IACrD,MAAM,CAAC,GAAG,CAAC,CAAC,WAAW,EAAE,CAAC;AAC5B,CAAC,CAAC,CAAC"}
|
package/package.json
ADDED
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@swift-rust/font",
|
|
3
|
+
"version": "0.2.0",
|
|
4
|
+
"description": "Font component for swift-rust.",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"homepage": "https://swift-rust.dev",
|
|
7
|
+
"repository": {
|
|
8
|
+
"type": "git",
|
|
9
|
+
"url": "https://github.com/swift-rust/swift-rust.git",
|
|
10
|
+
"directory": "packages/font"
|
|
11
|
+
},
|
|
12
|
+
"type": "module",
|
|
13
|
+
"main": "./dist/index.js",
|
|
14
|
+
"module": "./dist/index.js",
|
|
15
|
+
"types": "./dist/index.d.ts",
|
|
16
|
+
"exports": {
|
|
17
|
+
".": {
|
|
18
|
+
"types": "./dist/index.d.ts",
|
|
19
|
+
"import": "./dist/index.js"
|
|
20
|
+
},
|
|
21
|
+
"./google": {
|
|
22
|
+
"types": "./dist/google.d.ts",
|
|
23
|
+
"import": "./dist/google.js"
|
|
24
|
+
},
|
|
25
|
+
"./local": {
|
|
26
|
+
"types": "./dist/local.d.ts",
|
|
27
|
+
"import": "./dist/local.js"
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
"files": [
|
|
31
|
+
"dist"
|
|
32
|
+
],
|
|
33
|
+
"scripts": {
|
|
34
|
+
"build": "tsc -p tsconfig.json",
|
|
35
|
+
"dev": "tsc -p tsconfig.json --watch",
|
|
36
|
+
"lint": "biome check --no-errors-on-unmatched $(pwd)/src",
|
|
37
|
+
"test": "bun test",
|
|
38
|
+
"typecheck": "tsc --noEmit",
|
|
39
|
+
"clean": "rm -rf dist .turbo"
|
|
40
|
+
},
|
|
41
|
+
"devDependencies": {
|
|
42
|
+
"typescript": "^6.0.0"
|
|
43
|
+
},
|
|
44
|
+
"publishConfig": {
|
|
45
|
+
"access": "public"
|
|
46
|
+
},
|
|
47
|
+
"bugs": {
|
|
48
|
+
"url": "https://github.com/swift-rust/swift-rust/issues"
|
|
49
|
+
}
|
|
50
|
+
}
|