Skip to content

Commit

Permalink
Merge pull request #9 from vercel/update-types-2
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnPhamous authored Oct 27, 2023
2 parents 6bf6eda + ee39a33 commit c39e67e
Show file tree
Hide file tree
Showing 4 changed files with 44 additions and 35 deletions.
1 change: 1 addition & 0 deletions packages/next/.npmignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
*
!dist/**/*
!font.d.ts
35 changes: 1 addition & 34 deletions packages/next/dist/font.d.ts
Original file line number Diff line number Diff line change
@@ -1,34 +1 @@
import { NextFontWithVariable } from "@next/font";

declare module "geist/font" {
/**
* Geist Sans font, with `className` and `variable` properties,
* meant to be attached to DOM elements via `className`
*
* Included weights: 100, 200, 300, 400, 500, 600, 700, 800, 900
*
* * {@link https://www.npmjs.com/package/geist?activeTab=readme#app-router View App Router Example}
*
* * {@link https://www.npmjs.com/package/geist?activeTab=readme#with-tailwind-css View Tailwind Example}
*
* * {@link https://www.npmjs.com/package/geist?activeTab=readme#pages-router View Pages Router Example}
*
* * {@link https://github.com/vercel/geist-font/releases Download Font Files}
*/
export const GeistSans: NextFontWithVariable;
/**
* Geist Mono font, with `className` and `variable` properties,
* meant to be attached to DOM elements via `className`
*
* Included weights: 100, 200, 300, 400, 500, 600, 700, 800, 900
*
* * {@link https://www.npmjs.com/package/geist?activeTab=readme#app-router View App Router Example}
*
* * {@link https://www.npmjs.com/package/geist?activeTab=readme#with-tailwind-css View Tailwind Example}
*
* * {@link https://www.npmjs.com/package/geist?activeTab=readme#pages-router View Pages Router Example}
*
* * {@link https://github.com/vercel/geist-font/releases Download Font Files}
*/
export const GeistMono: NextFontWithVariable;
}
export * from "../font";
34 changes: 34 additions & 0 deletions packages/next/font.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
import { NextFontWithVariable } from "@next/font";

declare module "geist/font" {
/**
* Geist Sans font, with `className` and `variable` properties,
* meant to be attached to DOM elements via `className`
*
* Included weights: 100, 200, 300, 400, 500, 600, 700, 800, 900
*
* * {@link https://www.npmjs.com/package/geist?activeTab=readme#app-router View App Router Example}
*
* * {@link https://www.npmjs.com/package/geist?activeTab=readme#with-tailwind-css View Tailwind Example}
*
* * {@link https://www.npmjs.com/package/geist?activeTab=readme#pages-router View Pages Router Example}
*
* * {@link https://github.com/vercel/geist-font/releases Download Font Files}
*/
export const GeistSans: NextFontWithVariable;
/**
* Geist Mono font, with `className` and `variable` properties,
* meant to be attached to DOM elements via `className`
*
* Included weights: 100, 200, 300, 400, 500, 600, 700, 800, 900
*
* * {@link https://www.npmjs.com/package/geist?activeTab=readme#app-router View App Router Example}
*
* * {@link https://www.npmjs.com/package/geist?activeTab=readme#with-tailwind-css View Tailwind Example}
*
* * {@link https://www.npmjs.com/package/geist?activeTab=readme#pages-router View Pages Router Example}
*
* * {@link https://github.com/vercel/geist-font/releases Download Font Files}
*/
export const GeistMono: NextFontWithVariable;
}
9 changes: 8 additions & 1 deletion packages/next/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
"version": "1.0.0",
"description": "Geist is a new font family for Vercel, created by Vercel in collaboration with Basement Studio.",
"main": "./dist/font.js",
"module": "./dist/font.js",
"typings": "font.d.ts",
"types": "font.d.ts",
"scripts": {
"prepare": "cp ../../LICENSE.TXT ."
},
Expand All @@ -22,7 +25,11 @@
"vercel font"
],
"exports": {
"./font": "./dist/font.js"
"./font": {
"import": "./dist/font.js",
"require": "./dist/font.js",
"default": "./dist/index.d.ts"
}
},
"license": "SIL OPEN FONT LICENSE",
"dependencies": {
Expand Down

0 comments on commit c39e67e

Please sign in to comment.