tidyf 1.0.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,195 @@
1
+ /**
2
+ * File type icons for terminal display
3
+ */
4
+
5
+ const FILE_ICONS: Record<string, string> = {
6
+ // Documents
7
+ pdf: "๐Ÿ“„",
8
+ doc: "๐Ÿ“",
9
+ docx: "๐Ÿ“",
10
+ txt: "๐Ÿ“ƒ",
11
+ rtf: "๐Ÿ“ƒ",
12
+ odt: "๐Ÿ“",
13
+ md: "๐Ÿ“ƒ",
14
+
15
+ // Spreadsheets
16
+ xls: "๐Ÿ“Š",
17
+ xlsx: "๐Ÿ“Š",
18
+ csv: "๐Ÿ“Š",
19
+ ods: "๐Ÿ“Š",
20
+
21
+ // Presentations
22
+ ppt: "๐Ÿ“ฝ๏ธ",
23
+ pptx: "๐Ÿ“ฝ๏ธ",
24
+ key: "๐Ÿ“ฝ๏ธ",
25
+
26
+ // Images
27
+ jpg: "๐Ÿ–ผ๏ธ",
28
+ jpeg: "๐Ÿ–ผ๏ธ",
29
+ png: "๐Ÿ–ผ๏ธ",
30
+ gif: "๐Ÿ–ผ๏ธ",
31
+ svg: "๐ŸŽจ",
32
+ webp: "๐Ÿ–ผ๏ธ",
33
+ heic: "๐Ÿ–ผ๏ธ",
34
+ ico: "๐Ÿ–ผ๏ธ",
35
+ bmp: "๐Ÿ–ผ๏ธ",
36
+ tiff: "๐Ÿ–ผ๏ธ",
37
+ psd: "๐ŸŽจ",
38
+ ai: "๐ŸŽจ",
39
+ sketch: "๐ŸŽจ",
40
+ fig: "๐ŸŽจ",
41
+
42
+ // Videos
43
+ mp4: "๐ŸŽฌ",
44
+ mov: "๐ŸŽฌ",
45
+ avi: "๐ŸŽฌ",
46
+ mkv: "๐ŸŽฌ",
47
+ webm: "๐ŸŽฌ",
48
+ wmv: "๐ŸŽฌ",
49
+ flv: "๐ŸŽฌ",
50
+
51
+ // Audio
52
+ mp3: "๐ŸŽต",
53
+ wav: "๐ŸŽต",
54
+ flac: "๐ŸŽต",
55
+ aac: "๐ŸŽต",
56
+ ogg: "๐ŸŽต",
57
+ m4a: "๐ŸŽต",
58
+ wma: "๐ŸŽต",
59
+
60
+ // Archives
61
+ zip: "๐Ÿ“ฆ",
62
+ rar: "๐Ÿ“ฆ",
63
+ "7z": "๐Ÿ“ฆ",
64
+ tar: "๐Ÿ“ฆ",
65
+ gz: "๐Ÿ“ฆ",
66
+ bz2: "๐Ÿ“ฆ",
67
+ xz: "๐Ÿ“ฆ",
68
+
69
+ // Code
70
+ ts: "๐Ÿ“œ",
71
+ tsx: "๐Ÿ“œ",
72
+ js: "๐Ÿ“œ",
73
+ jsx: "๐Ÿ“œ",
74
+ py: "๐Ÿ",
75
+ rb: "๐Ÿ’Ž",
76
+ go: "๐Ÿ”ต",
77
+ rs: "๐Ÿฆ€",
78
+ java: "โ˜•",
79
+ c: "๐Ÿ“œ",
80
+ cpp: "๐Ÿ“œ",
81
+ h: "๐Ÿ“œ",
82
+ hpp: "๐Ÿ“œ",
83
+ cs: "๐Ÿ“œ",
84
+ swift: "๐ŸŽ",
85
+ kt: "๐Ÿ“œ",
86
+ php: "๐Ÿ˜",
87
+ html: "๐ŸŒ",
88
+ css: "๐ŸŽจ",
89
+ scss: "๐ŸŽจ",
90
+ less: "๐ŸŽจ",
91
+ json: "๐Ÿ“‹",
92
+ xml: "๐Ÿ“‹",
93
+ yaml: "๐Ÿ“‹",
94
+ yml: "๐Ÿ“‹",
95
+ toml: "๐Ÿ“‹",
96
+
97
+ // Applications/Installers
98
+ dmg: "๐Ÿ’ฟ",
99
+ pkg: "๐Ÿ“ฆ",
100
+ exe: "โš™๏ธ",
101
+ msi: "โš™๏ธ",
102
+ app: "๐Ÿ“ฑ",
103
+ apk: "๐Ÿ“ฑ",
104
+ ipa: "๐Ÿ“ฑ",
105
+ deb: "๐Ÿ“ฆ",
106
+ rpm: "๐Ÿ“ฆ",
107
+
108
+ // Data
109
+ sql: "๐Ÿ—ƒ๏ธ",
110
+ db: "๐Ÿ—ƒ๏ธ",
111
+ sqlite: "๐Ÿ—ƒ๏ธ",
112
+
113
+ // Ebooks
114
+ epub: "๐Ÿ“š",
115
+ mobi: "๐Ÿ“š",
116
+ azw: "๐Ÿ“š",
117
+ azw3: "๐Ÿ“š",
118
+
119
+ // Fonts
120
+ ttf: "๐Ÿ”ค",
121
+ otf: "๐Ÿ”ค",
122
+ woff: "๐Ÿ”ค",
123
+ woff2: "๐Ÿ”ค",
124
+
125
+ // Default
126
+ default: "๐Ÿ“„",
127
+ };
128
+
129
+ const CATEGORY_ICONS: Record<string, string> = {
130
+ Documents: "๐Ÿ“„",
131
+ Images: "๐Ÿ–ผ๏ธ",
132
+ Videos: "๐ŸŽฌ",
133
+ Audio: "๐ŸŽต",
134
+ Archives: "๐Ÿ“ฆ",
135
+ Code: "๐Ÿ“œ",
136
+ Applications: "๐Ÿ’ฟ",
137
+ Spreadsheets: "๐Ÿ“Š",
138
+ Presentations: "๐Ÿ“ฝ๏ธ",
139
+ Ebooks: "๐Ÿ“š",
140
+ Fonts: "๐Ÿ”ค",
141
+ Data: "๐Ÿ—ƒ๏ธ",
142
+ Other: "๐Ÿ“",
143
+ Unknown: "โ“",
144
+ };
145
+
146
+ const STATUS_ICONS: Record<string, string> = {
147
+ pending: "โณ",
148
+ moving: "๐Ÿ”„",
149
+ completed: "โœ…",
150
+ failed: "โŒ",
151
+ skipped: "โญ๏ธ",
152
+ conflict: "โš ๏ธ",
153
+ };
154
+
155
+ /**
156
+ * Get the icon for a file based on its extension
157
+ */
158
+ export function getFileIcon(filename: string): string {
159
+ const ext = filename.split(".").pop()?.toLowerCase() || "";
160
+ return FILE_ICONS[ext] || FILE_ICONS.default;
161
+ }
162
+
163
+ /**
164
+ * Get the icon for a category
165
+ */
166
+ export function getCategoryIcon(category: string): string {
167
+ return CATEGORY_ICONS[category] || CATEGORY_ICONS.Other;
168
+ }
169
+
170
+ /**
171
+ * Get the icon for a move status
172
+ */
173
+ export function getStatusIcon(status: string): string {
174
+ return STATUS_ICONS[status] || STATUS_ICONS.pending;
175
+ }
176
+
177
+ /**
178
+ * Get a colored status indicator
179
+ */
180
+ export function getStatusIndicator(status: string): string {
181
+ switch (status) {
182
+ case "completed":
183
+ return "โœ“";
184
+ case "failed":
185
+ return "โœ—";
186
+ case "skipped":
187
+ return "โ—‹";
188
+ case "conflict":
189
+ return "!";
190
+ case "moving":
191
+ return "โ†’";
192
+ default:
193
+ return "ยท";
194
+ }
195
+ }