react-beauty-link 1.1.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.
@@ -0,0 +1,7 @@
1
+ interface FileTypeIcon {
2
+ icon: string;
3
+ color: string;
4
+ }
5
+ export declare const FILE_TYPE_ICONS: Record<string, FileTypeIcon>;
6
+ export {};
7
+ //# sourceMappingURL=fileIcons.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fileIcons.d.ts","sourceRoot":"","sources":["../../src/utils/fileIcons.ts"],"names":[],"mappings":"AAAA,UAAU,YAAY;IAClB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;CACf;AAEH,eAAO,MAAM,eAAe,EAAE,MAAM,CAAC,MAAM,EAAE,YAAY,CA2DtD,CAAC"}
@@ -0,0 +1,56 @@
1
+ export const FILE_TYPE_ICONS = {
2
+ // Documents
3
+ 'pdf': { icon: '󰈦', color: '#e74856' },
4
+ 'doc': { icon: '󰈬', color: '#2b579a' },
5
+ 'docx': { icon: '󰈬', color: '#2b579a' },
6
+ 'xls': { icon: '󰈛', color: '#207245' },
7
+ 'xlsx': { icon: '󰈛', color: '#207245' },
8
+ 'ppt': { icon: '󰈧', color: '#d24726' },
9
+ 'pptx': { icon: '󰈧', color: '#d24726' },
10
+ 'txt': { icon: '󰈙', color: '#6c757d' },
11
+ // Archives
12
+ 'zip': { icon: '󰗄', color: '#e89f1c' },
13
+ 'rar': { icon: '󰗄', color: '#e89f1c' },
14
+ '7z': { icon: '󰗄', color: '#e89f1c' },
15
+ 'tar': { icon: '󰗄', color: '#e89f1c' },
16
+ 'gz': { icon: '󰗄', color: '#e89f1c' },
17
+ // Images
18
+ 'jpg': { icon: '󰈟', color: '#a855f7' },
19
+ 'jpeg': { icon: '󰈟', color: '#a855f7' },
20
+ 'png': { icon: '󰈟', color: '#a855f7' },
21
+ 'gif': { icon: '󰈟', color: '#a855f7' },
22
+ 'svg': { icon: '󰜡', color: '#f97316' },
23
+ 'webp': { icon: '󰈟', color: '#a855f7' },
24
+ // Videos
25
+ 'mp4': { icon: '󰕧', color: '#ec4899' },
26
+ 'avi': { icon: '󰕧', color: '#ec4899' },
27
+ 'mov': { icon: '󰕧', color: '#ec4899' },
28
+ 'mkv': { icon: '󰕧', color: '#ec4899' },
29
+ 'webm': { icon: '󰕧', color: '#ec4899' },
30
+ // Audio
31
+ 'mp3': { icon: '󰈣', color: '#10b981' },
32
+ 'wav': { icon: '󰈣', color: '#10b981' },
33
+ 'flac': { icon: '󰈣', color: '#10b981' },
34
+ 'ogg': { icon: '󰈣', color: '#10b981' },
35
+ // Code
36
+ 'js': { icon: '󰌞', color: '#f0db4f' },
37
+ 'ts': { icon: '󰛦', color: '#3178c6' },
38
+ 'jsx': { icon: '󰜈', color: '#61dafb' },
39
+ 'tsx': { icon: '󰜈', color: '#61dafb' },
40
+ 'py': { icon: '󰌠', color: '#3776ab' },
41
+ 'java': { icon: '󰬷', color: '#007396' },
42
+ 'php': { icon: '󰌟', color: '#777bb4' },
43
+ 'rb': { icon: '󰴭', color: '#cc342d' },
44
+ 'go': { icon: '󰟓', color: '#00add8' },
45
+ 'rs': { icon: '󱘗', color: '#dea584' },
46
+ 'html': { icon: '󰌝', color: '#e34c26' },
47
+ 'css': { icon: '󰌜', color: '#264de4' },
48
+ 'json': { icon: '󰘦', color: '#f7df1e' },
49
+ 'xml': { icon: '󰗀', color: '#ff6600' },
50
+ 'yaml': { icon: '󰈙', color: '#cb171e' },
51
+ 'yml': { icon: '󰈙', color: '#cb171e' },
52
+ 'md': { icon: '󰍔', color: '#083fa1' },
53
+ 'sql': { icon: '󰆼', color: '#00758f' },
54
+ 'sh': { icon: '󰆍', color: '#89e051' },
55
+ };
56
+ //# sourceMappingURL=fileIcons.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fileIcons.js","sourceRoot":"","sources":["../../src/utils/fileIcons.ts"],"names":[],"mappings":"AAKA,MAAM,CAAC,MAAM,eA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IACtC,MAAM,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,SAAS,EAAE;IACxC,KAAK,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,SAAS,EAAE;IACvC,IAAI,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,SAAS,EAAE;IACtC,IAAI,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,SAAS,EAAE;IACtC,IAAI,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,SAAS,EAAE;IACtC,MAAM,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,SAAS,EAAE;IACxC,KAAK,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,SAAS,EAAE;IACvC,MAAM,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,SAAS,EAAE;IACxC,KAAK,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,SAAS,EAAE;IACvC,MAAM,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,SAAS,EAAE;IACxC,KAAK,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,SAAS,EAAE;IACvC,IAAI,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,SAAS,EAAE;IACtC,KAAK,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,SAAS,EAAE;IACvC,IAAI,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,SAAS,EAAE;CACvC,CAAC"}
package/dist/vite.svg ADDED
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" class="iconify iconify--logos" width="31.88" height="32" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 257"><defs><linearGradient id="IconifyId1813088fe1fbc01fb466" x1="-.828%" x2="57.636%" y1="7.652%" y2="78.411%"><stop offset="0%" stop-color="#41D1FF"></stop><stop offset="100%" stop-color="#BD34FE"></stop></linearGradient><linearGradient id="IconifyId1813088fe1fbc01fb467" x1="43.376%" x2="50.316%" y1="2.242%" y2="89.03%"><stop offset="0%" stop-color="#FFEA83"></stop><stop offset="8.333%" stop-color="#FFDD35"></stop><stop offset="100%" stop-color="#FFA800"></stop></linearGradient></defs><path fill="url(#IconifyId1813088fe1fbc01fb466)" d="M255.153 37.938L134.897 252.976c-2.483 4.44-8.862 4.466-11.382.048L.875 37.958c-2.746-4.814 1.371-10.646 6.827-9.67l120.385 21.517a6.537 6.537 0 0 0 2.322-.004l117.867-21.483c5.438-.991 9.574 4.796 6.877 9.62Z"></path><path fill="url(#IconifyId1813088fe1fbc01fb467)" d="M185.432.063L96.44 17.501a3.268 3.268 0 0 0-2.634 3.014l-5.474 92.456a3.268 3.268 0 0 0 3.997 3.378l24.777-5.718c2.318-.535 4.413 1.507 3.936 3.838l-7.361 36.047c-.495 2.426 1.782 4.5 4.151 3.78l15.304-4.649c2.372-.72 4.652 1.36 4.15 3.788l-11.698 56.621c-.732 3.542 3.979 5.473 5.943 2.437l1.313-2.028l72.516-144.72c1.215-2.423-.88-5.186-3.54-4.672l-25.505 4.922c-2.396.462-4.435-1.77-3.759-4.114l16.646-57.705c.677-2.35-1.37-4.583-3.769-4.113Z"></path></svg>
package/package.json ADDED
@@ -0,0 +1,75 @@
1
+ {
2
+ "name": "react-beauty-link",
3
+ "version": "1.1.0",
4
+ "description": "A React hook that converts URLs in text to beautiful clickable links with page titles and favicons",
5
+ "type": "module",
6
+ "main": "./dist/index.cjs",
7
+ "module": "./dist/index.js",
8
+ "types": "./dist/index.d.ts",
9
+ "exports": {
10
+ ".": {
11
+ "types": "./dist/index.d.ts",
12
+ "import": "./dist/index.js",
13
+ "require": "./dist/index.cjs"
14
+ }
15
+ },
16
+ "files": [
17
+ "dist"
18
+ ],
19
+ "keywords": [
20
+ "react",
21
+ "hook",
22
+ "linkify",
23
+ "url",
24
+ "link",
25
+ "favicon",
26
+ "metadata",
27
+ "beautify",
28
+ "typescript"
29
+ ],
30
+ "author": "Andre Desbiens <desbiensa1@gmail.com>",
31
+ "license": "MIT",
32
+ "repository": {
33
+ "type": "git",
34
+ "url": "https://github.com/D3vMob/beautyLink.git"
35
+ },
36
+ "bugs": {
37
+ "url": "https://github.com/D3vMob/beautyLink/issues"
38
+ },
39
+ "homepage": "https://github.com/D3vMob/beautyLink#readme",
40
+ "scripts": {
41
+ "dev": "vite",
42
+ "build": "tsc -b && vite build",
43
+ "build:lib": "tsc -p tsconfig.lib.json && vite build --config vite.config.lib.ts",
44
+ "lint": "eslint .",
45
+ "preview": "vite preview",
46
+ "test": "vitest run",
47
+ "test:watch": "vitest",
48
+ "test:ui": "vitest --ui",
49
+ "test:coverage": "vitest run --coverage",
50
+ "prepublishOnly": "npm run build:lib"
51
+ },
52
+ "peerDependencies": {
53
+ "react": "^18.0.0 || ^19.0.0"
54
+ },
55
+ "devDependencies": {
56
+ "@eslint/js": "^9.39.1",
57
+ "@testing-library/react": "^16.1.0",
58
+ "@types/node": "^24.10.1",
59
+ "@types/react": "^19.2.5",
60
+ "@types/react-dom": "^19.2.3",
61
+ "@vitejs/plugin-react": "^5.1.1",
62
+ "@vitest/ui": "^2.1.8",
63
+ "eslint": "^9.39.1",
64
+ "eslint-plugin-react-hooks": "^7.0.1",
65
+ "eslint-plugin-react-refresh": "^0.4.24",
66
+ "globals": "^16.5.0",
67
+ "happy-dom": "^15.11.7",
68
+ "react": "^19.2.0",
69
+ "react-dom": "^19.2.0",
70
+ "typescript": "~5.9.3",
71
+ "typescript-eslint": "^8.46.4",
72
+ "vite": "^7.2.4",
73
+ "vitest": "^2.1.8"
74
+ }
75
+ }