react-fontpicker-ts 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
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
@@ -0,0 +1,41 @@
1
+ /// <reference types="react" />
2
+ import '../../font-preview/font-previews.css';
3
+ import './FontPicker.css';
4
+ export interface FontPickerProps {
5
+ defaultValue?: string;
6
+ noMatches?: string;
7
+ autoLoad?: boolean;
8
+ loaderOnly?: boolean;
9
+ loadAllVariants?: boolean;
10
+ loadFonts?: string[] | FontToVariant[] | string;
11
+ googleFonts?: string[] | Font[] | string;
12
+ fontCategories?: string[] | string;
13
+ localFonts?: Font[] | undefined;
14
+ fontVariants?: (fontVariants: FontToVariant) => void;
15
+ value?: (value: string) => void;
16
+ }
17
+ export interface Font {
18
+ category: string;
19
+ name: string;
20
+ sane: string;
21
+ cased: string;
22
+ variants: Variant[];
23
+ }
24
+ export interface FourFonts {
25
+ regular?: number;
26
+ bold?: number;
27
+ italic?: number;
28
+ boldItalic?: number;
29
+ }
30
+ export type Variant = FontVariant | string;
31
+ export interface FontVariant {
32
+ italic: boolean;
33
+ weight: number;
34
+ }
35
+ export interface FontToVariant {
36
+ fontName: string;
37
+ variants: Variant[];
38
+ }
39
+ export declare function toString(v: Variant): string;
40
+ export default function FontPicker({ defaultValue, noMatches, autoLoad, loaderOnly, loadAllVariants, loadFonts, googleFonts, fontCategories, localFonts, fontVariants, value, }: FontPickerProps): JSX.Element;
41
+ //# sourceMappingURL=FontPicker.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FontPicker.d.ts","sourceRoot":"","sources":["../../../src/components/FontPicker.tsx"],"names":[],"mappings":";AAEA,OAAO,sCAAsC,CAAA;AAC7C,OAAO,kBAAkB,CAAA;AAEzB,MAAM,WAAW,eAAe;IA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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,GACN,EAAE,eAAe,eAucjB"}
package/package.json ADDED
@@ -0,0 +1,89 @@
1
+ {
2
+ "name": "react-fontpicker-ts",
3
+ "version": "0.0.1",
4
+ "private": false,
5
+ "description": "A Google font picker component for React.js",
6
+ "keywords": [
7
+ "fontpicker",
8
+ "font",
9
+ "picker",
10
+ "react",
11
+ "google",
12
+ "font",
13
+ "fonts",
14
+ "selector",
15
+ "component"
16
+ ],
17
+ "homepage": "https://ae9is.github.io/react-fontpicker",
18
+ "bugs": {
19
+ "url": "https://github.com/ae9is/react-fontpicker/issues"
20
+ },
21
+ "repository": {
22
+ "type": "git",
23
+ "url": "https://github.com/ae9is/react-fontpicker.git"
24
+ },
25
+ "author": {
26
+ "name": "ae9is",
27
+ "email": "react.fontpicker@gmail.com"
28
+ },
29
+ "license": "MIT",
30
+ "main": "dist/index.js",
31
+ "module": "dist/index.mjs",
32
+ "types": "dist/index.d.ts",
33
+ "files": [
34
+ "dist"
35
+ ],
36
+ "sideEffects": [
37
+ "*.css",
38
+ "*.png"
39
+ ],
40
+ "scripts": {
41
+ "build": "run-s build:*",
42
+ "build:clean": "rm -rf dist .tsbuildinfo && rm -rf docs",
43
+ "build:tsup": "tsup",
44
+ "build:types": "tsc -p tsconfig.types.json",
45
+ "build:vite": "vite build",
46
+ "dev": "run-s dev:*",
47
+ "dev:vite": "vite --port 3000",
48
+ "format": "prettier --write src",
49
+ "lint": "eslint src",
50
+ "build-font-previews": "php ./build-font-previews.php",
51
+ "preview": "vite preview --outDir docs"
52
+ },
53
+ "tsup": {
54
+ "entry": ["index.ts"],
55
+ "clean": true,
56
+ "splitting": false,
57
+ "dts": false,
58
+ "minify": false,
59
+ "sourcemap": true,
60
+ "target": "ES2015",
61
+ "format": [
62
+ "cjs",
63
+ "esm"
64
+ ]
65
+ },
66
+ "peerDependencies": {
67
+ "react": ">=16"
68
+ },
69
+ "devDependencies": {
70
+ "@types/node": "^18.11.18",
71
+ "@types/react": "^18.0.26",
72
+ "@types/react-dom": "^18.0.10",
73
+ "@typescript-eslint/eslint-plugin": "^5.48.1",
74
+ "@typescript-eslint/parser": "^5.48.1",
75
+ "@vitejs/plugin-react-swc": "^3.0.0",
76
+ "eslint": "^8.32.0",
77
+ "eslint-config-prettier": "^8.6.0",
78
+ "eslint-plugin-prettier": "^4.2.1",
79
+ "eslint-plugin-react": "^7.32.1",
80
+ "eslint-plugin-react-hooks": "^4.6.0",
81
+ "npm-run-all": "^4.1.5",
82
+ "prettier": "^2.8.3",
83
+ "react": "^18.2.0",
84
+ "react-dom": "^18.2.0",
85
+ "tsup": "^6.6.3",
86
+ "typescript": "^4.9.4",
87
+ "vite": "^4.0.0"
88
+ }
89
+ }