@croco/utils-next-font-pretendard 0.0.1

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.
Binary file
package/package.json ADDED
@@ -0,0 +1,36 @@
1
+ {
2
+ "name": "@croco/utils-next-font-pretendard",
3
+ "version": "0.0.1",
4
+ "type": "commonjs",
5
+ "files": [
6
+ "src",
7
+ "PretendardVariable.woff2"
8
+ ],
9
+ "main": "./src/index.js",
10
+ "types": "./src/index.d.ts",
11
+ "import": "./src/index.mjs",
12
+ "module": "./src/index.mjs",
13
+ "exports": {
14
+ ".": {
15
+ "require": {
16
+ "types": "./src/index.d.ts",
17
+ "default": "./src/index.js"
18
+ },
19
+ "import": {
20
+ "types": "./src/index.d.mts",
21
+ "default": "./src/index.mjs"
22
+ }
23
+ }
24
+ },
25
+ "peerDependencies": {
26
+ "next": "^14.0.0"
27
+ },
28
+ "devDependencies": {
29
+ "@croco/eslint-config": "0.0.0",
30
+ "@croco/utils-tsconfig": "0.0.0"
31
+ },
32
+ "scripts": {
33
+ "typecheck": "tsc --noEmit",
34
+ "lint": "eslint **/*.ts*"
35
+ }
36
+ }
package/readme.md ADDED
@@ -0,0 +1,27 @@
1
+ # @croco/utils-next-font-pretendard
2
+
3
+ [Next.js Font Optimization](https://nextjs.org/docs/app/building-your-application/optimizing/fonts#local-fonts)을 사용하기 위한 Pretendard 폰트 패키지입니다.
4
+
5
+ ## 라이선스 및 출처
6
+
7
+ - [Pretendard](https://github.com/orioncactus/pretendard) - [SIL Open Font License 1.1](https://scripts.sil.org/cms/scripts/page.php?site_id=nrsi&id=OFL)
8
+ - `PretendardVariable.woff2` 파일은 [GitHub 저장소](https://github.com/orioncactus/pretendard/tree/main/packages/pretendard/dist/web/variable/woff2)에서 가져왔습니다.
9
+
10
+ ## 사용법
11
+
12
+ ```tsx
13
+ // app/layout.tsx
14
+ import { pretendardFont } from '@croco/utils-next-font-pretendard';
15
+
16
+ export default function RootLayout() {
17
+ return (
18
+ <html lang="ko">
19
+ ...
20
+ <body className={pretendardFont.className}>
21
+ ...
22
+ </body>
23
+ </html>
24
+ );
25
+ }
26
+
27
+ ```
@@ -0,0 +1,5 @@
1
+ import * as next_dist_compiled__next_font from 'next/dist/compiled/@next/font';
2
+
3
+ declare const pretendardFont: next_dist_compiled__next_font.NextFont;
4
+
5
+ export { pretendardFont };
package/src/index.d.ts ADDED
@@ -0,0 +1,5 @@
1
+ import * as next_dist_compiled__next_font from 'next/dist/compiled/@next/font';
2
+
3
+ declare const pretendardFont: next_dist_compiled__next_font.NextFont;
4
+
5
+ export { pretendardFont };
package/src/index.js ADDED
@@ -0,0 +1,13 @@
1
+ 'use strict';
2
+
3
+ var r = require('next/font/local');
4
+
5
+ function _interopDefault(e) {
6
+ return e && e.__esModule ? e : { default: e };
7
+ }
8
+
9
+ var r__default = /*#__PURE__*/ _interopDefault(r);
10
+
11
+ const a = r__default.default({ src: '../PretendardVariable.woff2', display: 'swap' });
12
+
13
+ exports.pretendardFont = a;
package/src/index.mjs ADDED
@@ -0,0 +1,5 @@
1
+ import r from 'next/font/local';
2
+
3
+ const a=r({src:"../PretendardVariable.woff2",display:"swap"});
4
+
5
+ export { a as pretendardFont };