@tamagui/font-inter
Advanced tools
Comparing version 1.0.0-beta.230 to 1.0.0-canary.204
var __defProp = Object.defineProperty; | ||
var __defProps = Object.defineProperties; | ||
var __getOwnPropDesc = Object.getOwnPropertyDescriptor; | ||
var __getOwnPropDescs = Object.getOwnPropertyDescriptors; | ||
var __getOwnPropNames = Object.getOwnPropertyNames; | ||
@@ -19,2 +21,3 @@ var __getOwnPropSymbols = Object.getOwnPropertySymbols; | ||
}; | ||
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b)); | ||
var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); | ||
@@ -41,60 +44,42 @@ var __export = (target, all) => { | ||
var import_react_native = require("react-native"); | ||
const createInterFont = /* @__PURE__ */ __name((font = {}) => { | ||
return (0, import_core.createFont)(__spreadValues({ | ||
const createInterFont = /* @__PURE__ */ __name((font = {}, { | ||
sizeLineHeight = /* @__PURE__ */ __name((size) => size + 10, "sizeLineHeight"), | ||
sizeSize = /* @__PURE__ */ __name((size) => size * 1, "sizeSize") | ||
} = {}) => { | ||
const size = Object.fromEntries(Object.entries(__spreadValues(__spreadValues({}, defaultSizes), font.size)).map(([k, v]) => [k, sizeSize(v)])); | ||
return (0, import_core.createFont)(__spreadProps(__spreadValues({ | ||
family: import_react_native.Platform.OS == "web" ? 'Inter, -apple-system, system-ui, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif' : "Inter", | ||
size: { | ||
1: 10, | ||
2: 12, | ||
3: 14, | ||
4: 15, | ||
5: 16, | ||
6: 17, | ||
7: 21, | ||
8: 25, | ||
9: 30, | ||
10: 45, | ||
11: 58, | ||
12: 68, | ||
13: 82, | ||
14: 102, | ||
15: 124, | ||
16: 144 | ||
}, | ||
lineHeight: { | ||
1: 15, | ||
2: 20, | ||
3: 25, | ||
4: 27, | ||
5: 29, | ||
6: 31, | ||
7: 34, | ||
8: 38, | ||
9: 42, | ||
10: 54, | ||
11: 72, | ||
12: 80, | ||
13: 100, | ||
14: 120, | ||
15: 150, | ||
16: 170 | ||
}, | ||
lineHeight: Object.fromEntries(Object.entries(size).map(([k, v]) => [k, sizeLineHeight((0, import_core.getVariableValue)(v))])), | ||
weight: { | ||
4: "300", | ||
7: "600", | ||
8: "700" | ||
4: "300" | ||
}, | ||
letterSpacing: { | ||
4: 0, | ||
7: 0, | ||
8: -1, | ||
9: -2, | ||
10: -3, | ||
11: -4, | ||
12: -5, | ||
13: -6, | ||
14: -7, | ||
15: -8 | ||
4: 0 | ||
} | ||
}, font)); | ||
}, font), { | ||
size | ||
})); | ||
}, "createInterFont"); | ||
const defaultSizes = { | ||
1: 11, | ||
2: 12, | ||
3: 13, | ||
4: 14, | ||
5: 17, | ||
6: 18, | ||
7: 20, | ||
8: 23, | ||
9: 30, | ||
10: 45, | ||
11: 58, | ||
12: 64, | ||
13: 72, | ||
14: 92, | ||
15: 114, | ||
16: 134 | ||
}; | ||
// Annotate the CommonJS export names for ESM import in node: | ||
0 && (module.exports = { | ||
createInterFont | ||
}); | ||
//# sourceMappingURL=index.js.map |
var __defProp = Object.defineProperty; | ||
var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); | ||
import { createFont } from "@tamagui/core"; | ||
import { createFont, getVariableValue } from "@tamagui/core"; | ||
import { Platform } from "react-native"; | ||
const createInterFont = /* @__PURE__ */ __name((font = {}) => { | ||
const createInterFont = /* @__PURE__ */ __name((font = {}, { | ||
sizeLineHeight = /* @__PURE__ */ __name((size) => size + 10, "sizeLineHeight"), | ||
sizeSize = /* @__PURE__ */ __name((size) => size * 1, "sizeSize") | ||
} = {}) => { | ||
const size = Object.fromEntries(Object.entries({ | ||
...defaultSizes, | ||
...font.size | ||
}).map(([k, v]) => [k, sizeSize(v)])); | ||
return createFont({ | ||
family: Platform.OS == "web" ? 'Inter, -apple-system, system-ui, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif' : "Inter", | ||
size: { | ||
1: 10, | ||
2: 12, | ||
3: 14, | ||
4: 15, | ||
5: 16, | ||
6: 17, | ||
7: 21, | ||
8: 25, | ||
9: 30, | ||
10: 45, | ||
11: 58, | ||
12: 68, | ||
13: 82, | ||
14: 102, | ||
15: 124, | ||
16: 144 | ||
}, | ||
lineHeight: { | ||
1: 15, | ||
2: 20, | ||
3: 25, | ||
4: 27, | ||
5: 29, | ||
6: 31, | ||
7: 34, | ||
8: 38, | ||
9: 42, | ||
10: 54, | ||
11: 72, | ||
12: 80, | ||
13: 100, | ||
14: 120, | ||
15: 150, | ||
16: 170 | ||
}, | ||
lineHeight: Object.fromEntries(Object.entries(size).map(([k, v]) => [k, sizeLineHeight(getVariableValue(v))])), | ||
weight: { | ||
4: "300", | ||
7: "600", | ||
8: "700" | ||
4: "300" | ||
}, | ||
letterSpacing: { | ||
4: 0, | ||
7: 0, | ||
8: -1, | ||
9: -2, | ||
10: -3, | ||
11: -4, | ||
12: -5, | ||
13: -6, | ||
14: -7, | ||
15: -8 | ||
4: 0 | ||
}, | ||
...font | ||
...font, | ||
size | ||
}); | ||
}, "createInterFont"); | ||
const defaultSizes = { | ||
1: 11, | ||
2: 12, | ||
3: 13, | ||
4: 14, | ||
5: 17, | ||
6: 18, | ||
7: 20, | ||
8: 23, | ||
9: 30, | ||
10: 45, | ||
11: 58, | ||
12: 64, | ||
13: 72, | ||
14: 92, | ||
15: 114, | ||
16: 134 | ||
}; | ||
export { | ||
@@ -65,0 +45,0 @@ createInterFont |
var __defProp = Object.defineProperty; | ||
var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); | ||
import { createFont } from "@tamagui/core"; | ||
import { createFont, getVariableValue } from "@tamagui/core"; | ||
import { Platform } from "react-native"; | ||
const createInterFont = /* @__PURE__ */ __name((font = {}) => { | ||
const createInterFont = /* @__PURE__ */ __name((font = {}, { | ||
sizeLineHeight = /* @__PURE__ */ __name((size) => size + 10, "sizeLineHeight"), | ||
sizeSize = /* @__PURE__ */ __name((size) => size * 1, "sizeSize") | ||
} = {}) => { | ||
const size = Object.fromEntries(Object.entries({ | ||
...defaultSizes, | ||
...font.size | ||
}).map(([k, v]) => [k, sizeSize(v)])); | ||
return createFont({ | ||
family: Platform.OS == "web" ? 'Inter, -apple-system, system-ui, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif' : "Inter", | ||
size: { | ||
1: 10, | ||
2: 12, | ||
3: 14, | ||
4: 15, | ||
5: 16, | ||
6: 17, | ||
7: 21, | ||
8: 25, | ||
9: 30, | ||
10: 45, | ||
11: 58, | ||
12: 68, | ||
13: 82, | ||
14: 102, | ||
15: 124, | ||
16: 144 | ||
}, | ||
lineHeight: { | ||
1: 15, | ||
2: 20, | ||
3: 25, | ||
4: 27, | ||
5: 29, | ||
6: 31, | ||
7: 34, | ||
8: 38, | ||
9: 42, | ||
10: 54, | ||
11: 72, | ||
12: 80, | ||
13: 100, | ||
14: 120, | ||
15: 150, | ||
16: 170 | ||
}, | ||
lineHeight: Object.fromEntries(Object.entries(size).map(([k, v]) => [k, sizeLineHeight(getVariableValue(v))])), | ||
weight: { | ||
4: "300", | ||
7: "600", | ||
8: "700" | ||
4: "300" | ||
}, | ||
letterSpacing: { | ||
4: 0, | ||
7: 0, | ||
8: -1, | ||
9: -2, | ||
10: -3, | ||
11: -4, | ||
12: -5, | ||
13: -6, | ||
14: -7, | ||
15: -8 | ||
4: 0 | ||
}, | ||
...font | ||
...font, | ||
size | ||
}); | ||
}, "createInterFont"); | ||
const defaultSizes = { | ||
1: 11, | ||
2: 12, | ||
3: 13, | ||
4: 14, | ||
5: 17, | ||
6: 18, | ||
7: 20, | ||
8: 23, | ||
9: 30, | ||
10: 45, | ||
11: 58, | ||
12: 64, | ||
13: 72, | ||
14: 92, | ||
15: 114, | ||
16: 134 | ||
}; | ||
export { | ||
createInterFont | ||
}; |
{ | ||
"name": "@tamagui/font-inter", | ||
"version": "1.0.0-beta.230+fab00413", | ||
"version": "1.0.0-canary.204+d95a5880", | ||
"typings": "types", | ||
@@ -10,3 +10,5 @@ "main": "dist/cjs", | ||
"types", | ||
"dist" | ||
"dist", | ||
"css", | ||
"ttf" | ||
], | ||
@@ -20,4 +22,4 @@ "scripts": { | ||
"devDependencies": { | ||
"@tamagui/build": "^1.0.0-beta.230+fab00413", | ||
"@tamagui/colors": "^1.0.0-beta.230+fab00413" | ||
"@tamagui/build": "^1.0.0-canary.204+d95a5880", | ||
"@tamagui/colors": "^1.0.0-canary.204+d95a5880" | ||
}, | ||
@@ -27,3 +29,3 @@ "publishConfig": { | ||
}, | ||
"gitHead": "fab0041356da84bd32620811a57a156d11514d2b" | ||
"gitHead": "d95a58804c0fc2d3530cba0a357b735a2ca02188" | ||
} |
import { GenericFont } from '@tamagui/core'; | ||
export declare const createInterFont: <A extends GenericFont>(font?: Partial<A>) => A; | ||
export declare const createInterFont: <A extends GenericFont<11 | 12 | 13 | 14 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 15 | 16>>(font?: { [Key in keyof Partial<A>]?: Partial<A[Key]> | undefined; }, { sizeLineHeight, sizeSize, }?: { | ||
sizeLineHeight?: ((fontSize: number) => number) | undefined; | ||
sizeSize?: ((size: number) => number) | undefined; | ||
}) => GenericFont<keyof typeof defaultSizes>; | ||
declare const defaultSizes: { | ||
readonly 1: 11; | ||
readonly 2: 12; | ||
readonly 3: 13; | ||
readonly 4: 14; | ||
readonly 5: 17; | ||
readonly 6: 18; | ||
readonly 7: 20; | ||
readonly 8: 23; | ||
readonly 9: 30; | ||
readonly 10: 45; | ||
readonly 11: 58; | ||
readonly 12: 64; | ||
readonly 13: 72; | ||
readonly 14: 92; | ||
readonly 15: 114; | ||
readonly 16: 134; | ||
}; | ||
export {}; | ||
//# sourceMappingURL=index.d.ts.map |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Manifest confusion
Supply chain riskThis package has inconsistent metadata. This could be malicious or caused by an error when publishing the package.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Manifest confusion
Supply chain riskThis package has inconsistent metadata. This could be malicious or caused by an error when publishing the package.
Found 1 instance in 1 package
1197167
12
1689
2