react-fontpicker-ts 0.3.0 → 0.4.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/dist/index.css +2657 -1484
- package/dist/index.css.map +1 -1
- package/dist/index.js +2252 -124
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +2252 -124
- package/dist/index.mjs.map +1 -1
- package/dist/sprite.1.1.5x-JYY3A72T.png +0 -0
- package/dist/sprite.1.1x-FHJ7KIZS.png +0 -0
- package/dist/sprite.1.2x-YQPMANMY.png +0 -0
- package/dist/sprite.2.1.5x-CSFPDSWF.png +0 -0
- package/dist/sprite.2.1x-6SYZK4KS.png +0 -0
- package/dist/sprite.2.2x-A3HYTQ3K.png +0 -0
- package/dist/sprite.3.1.5x-WHMWNNIC.png +0 -0
- package/dist/sprite.3.1x-4VAQQ56E.png +0 -0
- package/dist/sprite.3.2x-5BHEJ44W.png +0 -0
- package/dist/sprite.4.1.5x-DB6SPGJ5.png +0 -0
- package/dist/sprite.4.1x-CUQVFA7A.png +0 -0
- package/dist/sprite.4.2x-TZYBNQUZ.png +0 -0
- package/dist/sprite.5.1.5x-YIVGBKFU.png +0 -0
- package/dist/sprite.5.1x-WPECUBJZ.png +0 -0
- package/dist/sprite.5.2x-4H3GITFG.png +0 -0
- package/dist/sprite.6.1.5x-LJAWT47D.png +0 -0
- package/dist/sprite.6.1x-AELE5GAG.png +0 -0
- package/dist/sprite.6.2x-B3YG6JLG.png +0 -0
- package/dist/sprite.7.1.5x-FW6U2ELW.png +0 -0
- package/dist/sprite.7.1x-34TZX23N.png +0 -0
- package/dist/sprite.7.2x-7BNUK3XH.png +0 -0
- package/dist/sprite.8.1.5x-BQQDIJFJ.png +0 -0
- package/dist/sprite.8.1x-WXQP5LRL.png +0 -0
- package/dist/sprite.8.2x-7XFEHGVM.png +0 -0
- package/dist/sprite.9.1.5x-C7KARLVQ.png +0 -0
- package/dist/sprite.9.1x-4MXLMOFI.png +0 -0
- package/dist/sprite.9.2x-KHIDGREE.png +0 -0
- package/dist/src/components/FontPicker.d.ts +3 -1
- package/dist/src/components/FontPicker.d.ts.map +1 -1
- package/dist/src/components/FontPreviews.d.ts +1 -1
- package/dist/src/components/FontPreviews.d.ts.map +1 -1
- package/dist/src/lib/fontChecker.d.ts +10 -0
- package/dist/src/lib/fontChecker.d.ts.map +1 -0
- package/package.json +21 -21
- package/dist/sprite.1.1.5x-IEN72JY6.png +0 -0
- package/dist/sprite.1.1x-TBCR3GHG.png +0 -0
- package/dist/sprite.1.2x-7DLPF4QI.png +0 -0
- package/dist/sprite.2.1.5x-BTV2IYQE.png +0 -0
- package/dist/sprite.2.1x-LMLU3WAY.png +0 -0
- package/dist/sprite.2.2x-GLHW3CGI.png +0 -0
- package/dist/sprite.3.1.5x-APCYMH2U.png +0 -0
- package/dist/sprite.3.1x-4P6LGCUY.png +0 -0
- package/dist/sprite.3.2x-TXTVEISQ.png +0 -0
- package/dist/sprite.4.1.5x-QHIEK3EL.png +0 -0
- package/dist/sprite.4.1x-CKFO5N5Y.png +0 -0
- package/dist/sprite.4.2x-M7QAUGJM.png +0 -0
- package/dist/sprite.5.1.5x-FGGQRINX.png +0 -0
- package/dist/sprite.5.1x-7BMSHF5E.png +0 -0
- package/dist/sprite.5.2x-6GGR2CKH.png +0 -0
- package/dist/sprite.6.1.5x-RDOEAOLD.png +0 -0
- package/dist/sprite.6.1x-GJO4G432.png +0 -0
- package/dist/sprite.6.2x-P5P3ZGLE.png +0 -0
- package/dist/sprite.7.1.5x-NOP4JY5I.png +0 -0
- package/dist/sprite.7.1x-27V2WF2K.png +0 -0
- package/dist/sprite.7.2x-ZHKWVQ4L.png +0 -0
- package/dist/sprite.8.1.5x-J3A7XQVH.png +0 -0
- package/dist/sprite.8.1x-ZTY27DI3.png +0 -0
- package/dist/sprite.8.2x-PK3I6JFC.png +0 -0
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -13,6 +13,8 @@ export interface FontPickerProps extends React.ComponentPropsWithoutRef<'div'> {
|
|
|
13
13
|
inputId?: string;
|
|
14
14
|
fontVariants?: (fontVariants: FontToVariant) => void;
|
|
15
15
|
value?: (value: string) => void;
|
|
16
|
+
fontsLoaded?: (fontsLoaded: boolean) => void;
|
|
17
|
+
fontsLoadedTimeout?: number;
|
|
16
18
|
loading?: React.ReactNode;
|
|
17
19
|
}
|
|
18
20
|
export interface Font {
|
|
@@ -38,5 +40,5 @@ export interface FontToVariant {
|
|
|
38
40
|
variants: Variant[];
|
|
39
41
|
}
|
|
40
42
|
export declare function toString(v: Variant): string;
|
|
41
|
-
export default function FontPicker({ defaultValue, noMatches, autoLoad, loaderOnly, loadAllVariants, loadFonts, googleFonts, fontCategories, localFonts, fontVariants, value, loading, inputId, ...rest }: FontPickerProps): JSX.Element;
|
|
43
|
+
export default function FontPicker({ defaultValue, noMatches, autoLoad, loaderOnly, loadAllVariants, loadFonts, googleFonts, fontCategories, localFonts, fontVariants, value, fontsLoaded, fontsLoadedTimeout, loading, inputId, ...rest }: FontPickerProps): import("react/jsx-runtime").JSX.Element;
|
|
42
44
|
//# sourceMappingURL=FontPicker.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FontPicker.d.ts","sourceRoot":"","sources":["../../../src/components/FontPicker.tsx"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"FontPicker.d.ts","sourceRoot":"","sources":["../../../src/components/FontPicker.tsx"],"names":[],"mappings":";AAIA,OAAO,kBAAkB,CAAA;AAEzB,MAAM,WAAW,eAAgB,SAAQ,KAAK,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,WAAW;IAC1B,MAAM,EAAE,OAAO,CAAA;IACf,MAAM,EAAE,MAAM,CAAA;CACf;AAED,MAAM,WAAW,aAAa;IAC5B,QAAQ,EAAE,MAAM,CAAA;IAChB,QAAQ,EAAE,OAAO,EAAE,CAAA;CACpB;AAED,wBAAgB,QAAQ,CAAC,CAAC,EAAE,OAAO,UAKlC;AAuBD,MAAM,CAAC,OAAO,UAAU,UAAU,CAAC,EACjC,YAA0B,EAC1B,SAAwB,EACxB,QAAgB,EAChB,UAAkB,EAClB,eAAuB,EACvB,SAAc,EACd,WAAmB,EACnB,cAAsB,EACtB,UAAe,EACf,YAAY,EACZ,KAAK,EACL,WAAW,EACX,kBAAkB,EAClB,OAA8C,EAC9C,OAAO,EACP,GAAG,IAAI,EACR,EAAE,eAAe,2CA2hBjB"}
|
|
@@ -2,6 +2,6 @@ import { ReactNode } from 'react';
|
|
|
2
2
|
import '../../font-preview/font-previews.css';
|
|
3
3
|
declare const FontPreviews: ({ children }: {
|
|
4
4
|
children?: ReactNode;
|
|
5
|
-
}) => JSX.Element;
|
|
5
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
6
6
|
export default FontPreviews;
|
|
7
7
|
//# sourceMappingURL=FontPreviews.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FontPreviews.d.ts","sourceRoot":"","sources":["../../../src/components/FontPreviews.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AACjC,OAAO,sCAAsC,CAAA;AAE7C,QAAA,MAAM,YAAY;
|
|
1
|
+
{"version":3,"file":"FontPreviews.d.ts","sourceRoot":"","sources":["../../../src/components/FontPreviews.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AACjC,OAAO,sCAAsC,CAAA;AAE7C,QAAA,MAAM,YAAY,iBAAkB;IAAE,QAAQ,CAAC,EAAE,SAAS,CAAA;CAAE,4CAAoB,CAAA;AAEhF,eAAe,YAAY,CAAA"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export type FontStyle = 'italic' | 'normal';
|
|
2
|
+
export type FontWeight = 100 | 200 | 300 | 400 | 500 | 600 | 700 | 800 | 900 | 1000;
|
|
3
|
+
export interface CheckLoadedOptions {
|
|
4
|
+
fontFamily: string;
|
|
5
|
+
fontStyle?: FontStyle;
|
|
6
|
+
fontWeight?: FontWeight;
|
|
7
|
+
timeout?: number;
|
|
8
|
+
}
|
|
9
|
+
export declare function checkLoaded({ fontFamily, fontStyle, fontWeight, timeout, }: CheckLoadedOptions): Promise<boolean>;
|
|
10
|
+
//# sourceMappingURL=fontChecker.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fontChecker.d.ts","sourceRoot":"","sources":["../../../src/lib/fontChecker.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,SAAS,GAAG,QAAQ,GAAG,QAAQ,CAAA;AAC3C,MAAM,MAAM,UAAU,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,IAAI,CAAA;AAEnF,MAAM,WAAW,kBAAkB;IACjC,UAAU,EAAE,MAAM,CAAA;IAClB,SAAS,CAAC,EAAE,SAAS,CAAA;IACrB,UAAU,CAAC,EAAE,UAAU,CAAA;IACvB,OAAO,CAAC,EAAE,MAAM,CAAA;CACjB;AAID,wBAAsB,WAAW,CAAC,EAChC,UAAU,EACV,SAAS,EACT,UAAU,EACV,OAAa,GACd,EAAE,kBAAkB,GAAG,OAAO,CAAC,OAAO,CAAC,CAmCvC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-fontpicker-ts",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.0",
|
|
4
4
|
"description": "A Google font picker component for React",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"fontpicker",
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
},
|
|
20
20
|
"repository": {
|
|
21
21
|
"type": "git",
|
|
22
|
-
"url": "https://github.com/ae9is/react-fontpicker.git"
|
|
22
|
+
"url": "git+https://github.com/ae9is/react-fontpicker.git"
|
|
23
23
|
},
|
|
24
24
|
"author": {
|
|
25
25
|
"name": "ae9is",
|
|
@@ -83,27 +83,27 @@
|
|
|
83
83
|
"react": ">=16.8"
|
|
84
84
|
},
|
|
85
85
|
"devDependencies": {
|
|
86
|
-
"@testing-library/dom": "^
|
|
87
|
-
"@testing-library/jest-dom": "^
|
|
88
|
-
"@testing-library/react": "^
|
|
89
|
-
"@testing-library/user-event": "^14.
|
|
90
|
-
"@types/node": "^
|
|
91
|
-
"@types/react": "^18.
|
|
92
|
-
"@types/react-dom": "^18.
|
|
93
|
-
"@vitejs/plugin-react-swc": "^3.
|
|
94
|
-
"cypress": "^
|
|
95
|
-
"jsdom": "^
|
|
96
|
-
"npm-check-updates": "^16.
|
|
86
|
+
"@testing-library/dom": "^10.0.0",
|
|
87
|
+
"@testing-library/jest-dom": "^6.4.2",
|
|
88
|
+
"@testing-library/react": "^15.0.5",
|
|
89
|
+
"@testing-library/user-event": "^14.5.2",
|
|
90
|
+
"@types/node": "^20.12.7",
|
|
91
|
+
"@types/react": "^18.3.1",
|
|
92
|
+
"@types/react-dom": "^18.3.0",
|
|
93
|
+
"@vitejs/plugin-react-swc": "^3.6.0",
|
|
94
|
+
"cypress": "^13.8.1",
|
|
95
|
+
"jsdom": "^24.0.0",
|
|
96
|
+
"npm-check-updates": "^16.14.20",
|
|
97
97
|
"npm-run-all": "^4.1.5",
|
|
98
98
|
"opentype.js": "^1.3.4",
|
|
99
|
-
"prettier": "^2.
|
|
100
|
-
"react": "^18.
|
|
101
|
-
"react-dom": "^18.
|
|
102
|
-
"start-server-and-test": "^2.0.
|
|
99
|
+
"prettier": "^3.2.5",
|
|
100
|
+
"react": "^18.3.1",
|
|
101
|
+
"react-dom": "^18.3.1",
|
|
102
|
+
"start-server-and-test": "^2.0.3",
|
|
103
103
|
"tsconfig": "file:*",
|
|
104
|
-
"tsup": "^
|
|
105
|
-
"typescript": "^5.
|
|
106
|
-
"vite": "^
|
|
107
|
-
"vitest": "^
|
|
104
|
+
"tsup": "^8.0.2",
|
|
105
|
+
"typescript": "^5.4.5",
|
|
106
|
+
"vite": "^5.2.10",
|
|
107
|
+
"vitest": "^1.5.2"
|
|
108
108
|
}
|
|
109
109
|
}
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|