@kids-reporter/routing-ui 0.1.0-alpha.4 → 0.1.0-alpha.6
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/package.json +6 -4
- package/.prettierignore +0 -17
- package/babel.config.cjs +0 -31
- package/eslint.config.mjs +0 -56
- package/prettier.config.mjs +0 -13
- package/scripts/build.sh +0 -18
- package/src/components/button.tsx +0 -108
- package/src/components/index.tsx +0 -2
- package/src/components/input.tsx +0 -171
- package/src/constants/default-values.tsx +0 -153
- package/src/footer.tsx +0 -149
- package/src/header/desktop-header.tsx +0 -128
- package/src/header/header-context.tsx +0 -56
- package/src/header/index.tsx +0 -96
- package/src/header/menu/header-menu-item-group.tsx +0 -37
- package/src/header/menu/header-menu-item.tsx +0 -132
- package/src/header/menu/index.tsx +0 -205
- package/src/header/mobile-header.tsx +0 -61
- package/src/header/post-title-setter.tsx +0 -22
- package/src/header/shared-components.tsx +0 -325
- package/src/hooks/index.ts +0 -3
- package/src/hooks/use-is-at-top.ts +0 -23
- package/src/hooks/use-media-query.ts +0 -57
- package/src/hooks/use-scroll-level.ts +0 -52
- package/src/icons/index.tsx +0 -358
- package/src/index.ts +0 -9
- package/src/styles.css +0 -360
- package/src/types/index.ts +0 -10
- package/src/utils/cn.ts +0 -41
- package/src/utils/generate-social-media-config.ts +0 -75
- package/src/utils/index.ts +0 -2
- package/tsconfig.json +0 -33
package/src/styles.css
DELETED
|
@@ -1,360 +0,0 @@
|
|
|
1
|
-
/* Tailwind v4 Theme Configuration */
|
|
2
|
-
@theme {
|
|
3
|
-
/* Colors - Neutral */
|
|
4
|
-
--color-neutral-white: #ffffff;
|
|
5
|
-
--color-neutral-100: #f8f8f8;
|
|
6
|
-
--color-neutral-200: #eaeaea;
|
|
7
|
-
--color-neutral-300: #d9d9d9;
|
|
8
|
-
--color-neutral-400: #c6c6c6;
|
|
9
|
-
--color-neutral-500: #a3a3a3;
|
|
10
|
-
--color-neutral-600: #8e8e8e;
|
|
11
|
-
--color-neutral-700: #575757;
|
|
12
|
-
--color-neutral-800: #3b3b3b;
|
|
13
|
-
--color-neutral-900: #232323;
|
|
14
|
-
--color-neutral-black: #000000;
|
|
15
|
-
--color-neutral-border: #00000026;
|
|
16
|
-
|
|
17
|
-
/* Colors - Brand Red */
|
|
18
|
-
--color-red-100: #fff0f2;
|
|
19
|
-
--color-red-200: #ffc4ca;
|
|
20
|
-
--color-red-300: #ff98a2;
|
|
21
|
-
--color-red-400: #f76977;
|
|
22
|
-
--color-red-500: #bd4450;
|
|
23
|
-
--color-red-600: #a0343e;
|
|
24
|
-
--color-red-700: #82262f;
|
|
25
|
-
--color-red-800: #651a22;
|
|
26
|
-
|
|
27
|
-
/* Colors - Brand Blue */
|
|
28
|
-
--color-blue-100: #e9f8ff;
|
|
29
|
-
--color-blue-200: #b9e8ff;
|
|
30
|
-
--color-blue-300: #89d9ff;
|
|
31
|
-
--color-blue-400: #27b3f5;
|
|
32
|
-
--color-blue-500: #1696d3;
|
|
33
|
-
--color-blue-600: #087bb1;
|
|
34
|
-
--color-blue-700: #00618f;
|
|
35
|
-
--color-blue-800: #004a6d;
|
|
36
|
-
|
|
37
|
-
/* Colors - Brand Yellow */
|
|
38
|
-
--color-yellow-100: #fff9ec;
|
|
39
|
-
--color-yellow-200: #ffedc2;
|
|
40
|
-
--color-yellow-300: #ffe197;
|
|
41
|
-
--color-yellow-400: #f8c341;
|
|
42
|
-
--color-yellow-500: #d6a52d;
|
|
43
|
-
--color-yellow-600: #b4881d;
|
|
44
|
-
--color-yellow-700: #926c10;
|
|
45
|
-
--color-yellow-800: #705207;
|
|
46
|
-
|
|
47
|
-
/* Typography - Font Families */
|
|
48
|
-
--font-family-noto: 'Noto Sans TC', sans-serif;
|
|
49
|
-
--font-family-swei: 'SweiMarkerSansCJKtc-Regular', sans-serif;
|
|
50
|
-
|
|
51
|
-
/* Typography - Font Sizes */
|
|
52
|
-
--font-size-h1-large: 48px;
|
|
53
|
-
--font-size-h2-large: 40px;
|
|
54
|
-
--font-size-h3-large: 32px;
|
|
55
|
-
--font-size-h4-large: 28px;
|
|
56
|
-
--font-size-h5-large: 22px;
|
|
57
|
-
--font-size-h6-large: 18px;
|
|
58
|
-
|
|
59
|
-
--font-size-h1-small: 32px;
|
|
60
|
-
--font-size-h2-small: 28px;
|
|
61
|
-
--font-size-h3-small: 24px;
|
|
62
|
-
--font-size-h4-small: 22px;
|
|
63
|
-
--font-size-h5-small: 20px;
|
|
64
|
-
--font-size-h6-small: 18px;
|
|
65
|
-
|
|
66
|
-
--font-size-p1: 16px;
|
|
67
|
-
--font-size-p2: 14px;
|
|
68
|
-
--font-size-p3: 12px;
|
|
69
|
-
--font-size-p4: 10px;
|
|
70
|
-
|
|
71
|
-
/* Typography - Line Heights */
|
|
72
|
-
--line-height-tight: 1.25;
|
|
73
|
-
--line-height-normal: 1.6;
|
|
74
|
-
--line-height-relaxed: 1.75;
|
|
75
|
-
|
|
76
|
-
/* Typography - Letter Spacing */
|
|
77
|
-
--letter-spacing-wide: 0.05em;
|
|
78
|
-
|
|
79
|
-
/* Spacing - Grid System */
|
|
80
|
-
--spacing-grid-xs: 4px;
|
|
81
|
-
--spacing-grid-sm: 8px;
|
|
82
|
-
--spacing-grid-md: 16px;
|
|
83
|
-
--spacing-grid-lg: 24px;
|
|
84
|
-
--spacing-grid-xl: 32px;
|
|
85
|
-
--spacing-grid-2xl: 48px;
|
|
86
|
-
--spacing-grid-3xl: 64px;
|
|
87
|
-
--spacing-grid-4xl: 96px;
|
|
88
|
-
--spacing-grid-5xl: 128px;
|
|
89
|
-
|
|
90
|
-
/* Container Widths */
|
|
91
|
-
--container-mobile: 375px;
|
|
92
|
-
--container-tablet: 768px;
|
|
93
|
-
--container-desktop: 1024px;
|
|
94
|
-
--container-hd: 1440px;
|
|
95
|
-
|
|
96
|
-
/* Grid Gutters */
|
|
97
|
-
--gutter-mobile: 16px;
|
|
98
|
-
--gutter-tablet: 24px;
|
|
99
|
-
--gutter-desktop: 32px;
|
|
100
|
-
--gutter-hd: 32px;
|
|
101
|
-
|
|
102
|
-
/* Margins */
|
|
103
|
-
--margin-mobile: 24px;
|
|
104
|
-
--margin-tablet: 32px;
|
|
105
|
-
--margin-desktop: 48px;
|
|
106
|
-
--margin-hd: 120px;
|
|
107
|
-
|
|
108
|
-
/* Responsive Breakpoints */
|
|
109
|
-
--breakpoint-mobile: 375px;
|
|
110
|
-
--breakpoint-tablet: 768px;
|
|
111
|
-
--breakpoint-desktop: 1024px;
|
|
112
|
-
--breakpoint-hd: 1440px;
|
|
113
|
-
|
|
114
|
-
/* Header */
|
|
115
|
-
--mobile-header-height: 64px;
|
|
116
|
-
|
|
117
|
-
/* Legacy variables for backward compatibility */
|
|
118
|
-
--fontFamily: var(--font-family-noto);
|
|
119
|
-
--max-width: 1100px;
|
|
120
|
-
--border-radius: 12px;
|
|
121
|
-
|
|
122
|
-
/* Updated color palette using design system */
|
|
123
|
-
--paletteColor1: var(--color-blue-400);
|
|
124
|
-
--paletteColor2: var(--color-blue-600);
|
|
125
|
-
--paletteColor3: var(--color-neutral-700);
|
|
126
|
-
--paletteColor4: var(--color-neutral-900);
|
|
127
|
-
--paletteColor5: var(--color-red-400);
|
|
128
|
-
--paletteColor6: var(--color-yellow-400);
|
|
129
|
-
--paletteColor7: var(--color-neutral-200);
|
|
130
|
-
--paletteColor8: var(--color-neutral-white);
|
|
131
|
-
--color: var(--paletteColor3);
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
/* Design System CSS Variables for compatibility */
|
|
135
|
-
@layer base {
|
|
136
|
-
:root {
|
|
137
|
-
/* Legacy variables for backward compatibility */
|
|
138
|
-
--fontFamily: var(--font-family-noto);
|
|
139
|
-
--max-width: 1100px;
|
|
140
|
-
--border-radius: 12px;
|
|
141
|
-
|
|
142
|
-
/* Updated color palette using design system */
|
|
143
|
-
--paletteColor1: var(--color-blue-400);
|
|
144
|
-
--paletteColor2: var(--color-blue-600);
|
|
145
|
-
--paletteColor3: var(--color-neutral-700);
|
|
146
|
-
--paletteColor4: var(--color-neutral-900);
|
|
147
|
-
--paletteColor5: var(--color-red-400);
|
|
148
|
-
--paletteColor6: var(--color-yellow-400);
|
|
149
|
-
--paletteColor7: var(--color-neutral-200);
|
|
150
|
-
--paletteColor8: var(--color-neutral-white);
|
|
151
|
-
--color: var(--paletteColor3);
|
|
152
|
-
}
|
|
153
|
-
}
|
|
154
|
-
|
|
155
|
-
@layer utilities {
|
|
156
|
-
body.no-scroll {
|
|
157
|
-
overflow: hidden;
|
|
158
|
-
}
|
|
159
|
-
}
|
|
160
|
-
|
|
161
|
-
/* Typography Utilities - Headlines Large */
|
|
162
|
-
@utility prose-h1-large {
|
|
163
|
-
font-family: var(--font-family-noto);
|
|
164
|
-
font-size: var(--font-size-h1-large);
|
|
165
|
-
font-weight: 700;
|
|
166
|
-
line-height: var(--line-height-normal);
|
|
167
|
-
letter-spacing: 2.4px;
|
|
168
|
-
}
|
|
169
|
-
|
|
170
|
-
@utility prose-h2-large {
|
|
171
|
-
font-family: var(--font-family-noto);
|
|
172
|
-
font-size: var(--font-size-h2-large);
|
|
173
|
-
font-weight: 700;
|
|
174
|
-
line-height: var(--line-height-normal);
|
|
175
|
-
letter-spacing: 2px;
|
|
176
|
-
}
|
|
177
|
-
|
|
178
|
-
@utility prose-h3-large {
|
|
179
|
-
font-family: var(--font-family-noto);
|
|
180
|
-
font-size: var(--font-size-h3-large);
|
|
181
|
-
font-weight: 700;
|
|
182
|
-
line-height: var(--line-height-normal);
|
|
183
|
-
letter-spacing: 1.6px;
|
|
184
|
-
}
|
|
185
|
-
|
|
186
|
-
@utility prose-h4-large {
|
|
187
|
-
font-family: var(--font-family-noto);
|
|
188
|
-
font-size: var(--font-size-h4-large);
|
|
189
|
-
font-weight: 700;
|
|
190
|
-
line-height: var(--line-height-normal);
|
|
191
|
-
letter-spacing: 1.4px;
|
|
192
|
-
}
|
|
193
|
-
|
|
194
|
-
@utility prose-h5-large {
|
|
195
|
-
font-family: var(--font-family-noto);
|
|
196
|
-
font-size: var(--font-size-h5-large);
|
|
197
|
-
font-weight: 700;
|
|
198
|
-
line-height: var(--line-height-normal);
|
|
199
|
-
letter-spacing: 1.1px;
|
|
200
|
-
}
|
|
201
|
-
|
|
202
|
-
@utility prose-h6-large {
|
|
203
|
-
font-family: var(--font-family-noto);
|
|
204
|
-
font-size: var(--font-size-h6-large);
|
|
205
|
-
font-weight: 700;
|
|
206
|
-
line-height: var(--line-height-normal);
|
|
207
|
-
letter-spacing: 0.9px;
|
|
208
|
-
}
|
|
209
|
-
|
|
210
|
-
/* Typography Utilities - Headlines Small */
|
|
211
|
-
@utility prose-h1-small {
|
|
212
|
-
font-family: var(--font-family-noto);
|
|
213
|
-
font-size: var(--font-size-h1-small);
|
|
214
|
-
font-weight: 700;
|
|
215
|
-
line-height: var(--line-height-normal);
|
|
216
|
-
letter-spacing: 1.6px;
|
|
217
|
-
}
|
|
218
|
-
|
|
219
|
-
@utility prose-h2-small {
|
|
220
|
-
font-family: var(--font-family-noto);
|
|
221
|
-
font-size: var(--font-size-h2-small);
|
|
222
|
-
font-weight: 700;
|
|
223
|
-
line-height: var(--line-height-normal);
|
|
224
|
-
letter-spacing: 1.4px;
|
|
225
|
-
}
|
|
226
|
-
|
|
227
|
-
@utility prose-h3-small {
|
|
228
|
-
font-family: var(--font-family-noto);
|
|
229
|
-
font-size: var(--font-size-h3-small);
|
|
230
|
-
font-weight: 700;
|
|
231
|
-
line-height: var(--line-height-normal);
|
|
232
|
-
letter-spacing: 1.2px;
|
|
233
|
-
}
|
|
234
|
-
|
|
235
|
-
@utility prose-h4-small {
|
|
236
|
-
font-family: var(--font-family-noto);
|
|
237
|
-
font-size: var(--font-size-h4-small);
|
|
238
|
-
font-weight: 700;
|
|
239
|
-
line-height: var(--line-height-normal);
|
|
240
|
-
letter-spacing: 1.1px;
|
|
241
|
-
}
|
|
242
|
-
|
|
243
|
-
@utility prose-h5-small {
|
|
244
|
-
font-family: var(--font-family-noto);
|
|
245
|
-
font-size: var(--font-size-h5-small);
|
|
246
|
-
font-weight: 700;
|
|
247
|
-
line-height: var(--line-height-normal);
|
|
248
|
-
letter-spacing: 1px;
|
|
249
|
-
}
|
|
250
|
-
|
|
251
|
-
@utility prose-h6-small {
|
|
252
|
-
font-family: var(--font-family-noto);
|
|
253
|
-
font-size: var(--font-size-h6-small);
|
|
254
|
-
font-weight: 700;
|
|
255
|
-
line-height: var(--line-height-normal);
|
|
256
|
-
letter-spacing: 0.9px;
|
|
257
|
-
}
|
|
258
|
-
|
|
259
|
-
/* Typography Utilities - Paragraphs */
|
|
260
|
-
@utility prose-p1 {
|
|
261
|
-
font-family: var(--font-family-noto);
|
|
262
|
-
font-size: var(--font-size-p1);
|
|
263
|
-
font-weight: 500;
|
|
264
|
-
line-height: var(--line-height-normal);
|
|
265
|
-
letter-spacing: 0.8px;
|
|
266
|
-
}
|
|
267
|
-
|
|
268
|
-
@utility prose-p1-bold {
|
|
269
|
-
font-family: var(--font-family-noto);
|
|
270
|
-
font-size: var(--font-size-p1);
|
|
271
|
-
font-weight: 700;
|
|
272
|
-
line-height: var(--line-height-normal);
|
|
273
|
-
letter-spacing: 0.8px;
|
|
274
|
-
}
|
|
275
|
-
|
|
276
|
-
@utility prose-p2 {
|
|
277
|
-
font-family: var(--font-family-noto);
|
|
278
|
-
font-size: var(--font-size-p2);
|
|
279
|
-
font-weight: 500;
|
|
280
|
-
line-height: var(--line-height-normal);
|
|
281
|
-
letter-spacing: 0.7px;
|
|
282
|
-
}
|
|
283
|
-
|
|
284
|
-
@utility prose-p2-bold {
|
|
285
|
-
font-family: var(--font-family-noto);
|
|
286
|
-
font-size: var(--font-size-p2);
|
|
287
|
-
font-weight: 700;
|
|
288
|
-
line-height: var(--line-height-normal);
|
|
289
|
-
letter-spacing: 0.7px;
|
|
290
|
-
}
|
|
291
|
-
|
|
292
|
-
@utility prose-p3 {
|
|
293
|
-
font-family: var(--font-family-noto);
|
|
294
|
-
font-size: var(--font-size-p3);
|
|
295
|
-
font-weight: 500;
|
|
296
|
-
line-height: var(--line-height-normal);
|
|
297
|
-
letter-spacing: 0.6px;
|
|
298
|
-
}
|
|
299
|
-
|
|
300
|
-
@utility prose-p3-bold {
|
|
301
|
-
font-family: var(--font-family-noto);
|
|
302
|
-
font-size: var(--font-size-p3);
|
|
303
|
-
font-weight: 700;
|
|
304
|
-
line-height: var(--line-height-normal);
|
|
305
|
-
letter-spacing: 0.6px;
|
|
306
|
-
}
|
|
307
|
-
|
|
308
|
-
@utility prose-p4 {
|
|
309
|
-
font-family: var(--font-family-noto);
|
|
310
|
-
font-size: var(--font-size-p4);
|
|
311
|
-
font-weight: 500;
|
|
312
|
-
line-height: var(--line-height-normal);
|
|
313
|
-
letter-spacing: 0.5px;
|
|
314
|
-
}
|
|
315
|
-
|
|
316
|
-
@utility prose-p4-bold {
|
|
317
|
-
font-family: var(--font-family-noto);
|
|
318
|
-
font-size: var(--font-size-p4);
|
|
319
|
-
font-weight: 700;
|
|
320
|
-
line-height: var(--line-height-normal);
|
|
321
|
-
letter-spacing: 0.5px;
|
|
322
|
-
}
|
|
323
|
-
|
|
324
|
-
/* Swei Marker Sans Font Variants */
|
|
325
|
-
@utility font-swei {
|
|
326
|
-
font-family: var(--font-family-swei);
|
|
327
|
-
}
|
|
328
|
-
|
|
329
|
-
@utility scrollbar-thin {
|
|
330
|
-
scrollbar-width: thin;
|
|
331
|
-
scrollbar-color: var(--color-neutral-300) transparent;
|
|
332
|
-
|
|
333
|
-
&::-webkit-scrollbar {
|
|
334
|
-
width: 6px;
|
|
335
|
-
}
|
|
336
|
-
|
|
337
|
-
&::-webkit-scrollbar-track {
|
|
338
|
-
background: transparent;
|
|
339
|
-
}
|
|
340
|
-
|
|
341
|
-
&::-webkit-scrollbar-thumb {
|
|
342
|
-
background: transparent;
|
|
343
|
-
border-radius: 3px;
|
|
344
|
-
}
|
|
345
|
-
|
|
346
|
-
&::-webkit-scrollbar-thumb:hover {
|
|
347
|
-
background: transparent;
|
|
348
|
-
}
|
|
349
|
-
}
|
|
350
|
-
|
|
351
|
-
/* Theme Color Utilities */
|
|
352
|
-
@utility theme-red {
|
|
353
|
-
--theme-color: var(--color-red-400);
|
|
354
|
-
}
|
|
355
|
-
@utility theme-yellow {
|
|
356
|
-
--theme-color: var(--color-yellow-400);
|
|
357
|
-
}
|
|
358
|
-
@utility theme-blue {
|
|
359
|
-
--theme-color: var(--color-blue-400);
|
|
360
|
-
}
|
package/src/types/index.ts
DELETED
package/src/utils/cn.ts
DELETED
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
import { ClassValue, clsx } from 'clsx'
|
|
2
|
-
import { extendTailwindMerge } from 'tailwind-merge'
|
|
3
|
-
|
|
4
|
-
const twMerge = extendTailwindMerge({
|
|
5
|
-
extend: {
|
|
6
|
-
classGroups: {
|
|
7
|
-
// Add custom prose classes in font-size group since we follow the design system
|
|
8
|
-
'font-size': [
|
|
9
|
-
'prose-p1',
|
|
10
|
-
'prose-p1-bold',
|
|
11
|
-
'prose-p2',
|
|
12
|
-
'prose-p2-bold',
|
|
13
|
-
'prose-p3',
|
|
14
|
-
'prose-p3-bold',
|
|
15
|
-
'prose-p4',
|
|
16
|
-
'prose-p4-bold',
|
|
17
|
-
'prose-h1-large',
|
|
18
|
-
'prose-h2-large',
|
|
19
|
-
'prose-h3-large',
|
|
20
|
-
'prose-h4-large',
|
|
21
|
-
'prose-h5-large',
|
|
22
|
-
'prose-h6-large',
|
|
23
|
-
'prose-h1-small',
|
|
24
|
-
'prose-h2-small',
|
|
25
|
-
'prose-h3-small',
|
|
26
|
-
'prose-h4-small',
|
|
27
|
-
'prose-h5-small',
|
|
28
|
-
'prose-h6-small',
|
|
29
|
-
],
|
|
30
|
-
},
|
|
31
|
-
},
|
|
32
|
-
})
|
|
33
|
-
|
|
34
|
-
/**
|
|
35
|
-
* Combines clsx and tailwind-merge for optimal class merging.
|
|
36
|
-
* @param inputs - Class names or conditional class values.
|
|
37
|
-
* @returns A single string with merged class names.
|
|
38
|
-
*/
|
|
39
|
-
export const cn = (...inputs: ClassValue[]): string => {
|
|
40
|
-
return twMerge(clsx(inputs))
|
|
41
|
-
}
|
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
import { JSX } from 'react'
|
|
2
|
-
|
|
3
|
-
import {
|
|
4
|
-
FBIcon,
|
|
5
|
-
IGIcon,
|
|
6
|
-
MediumIcon,
|
|
7
|
-
RSSIcon,
|
|
8
|
-
ThreadsIcon,
|
|
9
|
-
YouTubeIcon,
|
|
10
|
-
} from '../icons'
|
|
11
|
-
import { SocialMediaHrefs } from '../types'
|
|
12
|
-
|
|
13
|
-
export type SocialMediaConfig = {
|
|
14
|
-
label: string
|
|
15
|
-
href: string
|
|
16
|
-
icon: (() => JSX.Element) | null
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
export function generateSocialMediaConfig(
|
|
20
|
-
socialMediaHrefs: SocialMediaHrefs
|
|
21
|
-
): SocialMediaConfig[] {
|
|
22
|
-
return socialMediaHrefs.map((href) => {
|
|
23
|
-
// Extract domain from URL to determine the social media platform
|
|
24
|
-
let label = 'Unknown'
|
|
25
|
-
let icon = null
|
|
26
|
-
try {
|
|
27
|
-
const url = new URL(href)
|
|
28
|
-
const hostname = url.hostname.toLowerCase()
|
|
29
|
-
|
|
30
|
-
// Check for specific patterns
|
|
31
|
-
if (hostname.includes('facebook.com')) {
|
|
32
|
-
label = 'Facebook'
|
|
33
|
-
icon = FBIcon
|
|
34
|
-
} else if (hostname.includes('instagram.com')) {
|
|
35
|
-
label = 'Instagram'
|
|
36
|
-
icon = IGIcon
|
|
37
|
-
} else if (
|
|
38
|
-
hostname.includes('youtube.com') ||
|
|
39
|
-
hostname.includes('youtu.be')
|
|
40
|
-
) {
|
|
41
|
-
label = 'YouTube'
|
|
42
|
-
icon = YouTubeIcon
|
|
43
|
-
} else if (
|
|
44
|
-
hostname.includes('threads.net') ||
|
|
45
|
-
hostname.includes('threads.com')
|
|
46
|
-
) {
|
|
47
|
-
label = 'Threads'
|
|
48
|
-
icon = ThreadsIcon
|
|
49
|
-
} else if (hostname.includes('medium.com')) {
|
|
50
|
-
label = 'Medium'
|
|
51
|
-
icon = MediumIcon
|
|
52
|
-
} else if (href.includes('rss.xml') || href.includes('rss')) {
|
|
53
|
-
label = 'RSS'
|
|
54
|
-
icon = RSSIcon
|
|
55
|
-
}
|
|
56
|
-
} catch {
|
|
57
|
-
console.warn(`Invalid URL provided: ${href}`)
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
if (!icon) {
|
|
61
|
-
console.warn(`No icon found for social media platform: ${label}`)
|
|
62
|
-
return {
|
|
63
|
-
label,
|
|
64
|
-
href,
|
|
65
|
-
icon: null, // or a default icon component
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
return {
|
|
70
|
-
label,
|
|
71
|
-
href,
|
|
72
|
-
icon,
|
|
73
|
-
}
|
|
74
|
-
})
|
|
75
|
-
}
|
package/src/utils/index.ts
DELETED
package/tsconfig.json
DELETED
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"compilerOptions": {
|
|
3
|
-
"target": "ES2022",
|
|
4
|
-
"lib": ["DOM", "DOM.Iterable", "ES6"],
|
|
5
|
-
"allowJs": true,
|
|
6
|
-
"skipLibCheck": true,
|
|
7
|
-
"strict": true,
|
|
8
|
-
"noEmit": false,
|
|
9
|
-
"esModuleInterop": true,
|
|
10
|
-
"module": "esnext",
|
|
11
|
-
"moduleResolution": "bundler",
|
|
12
|
-
"resolveJsonModule": true,
|
|
13
|
-
"isolatedModules": true,
|
|
14
|
-
"jsx": "react-jsx",
|
|
15
|
-
"plugins": [
|
|
16
|
-
{
|
|
17
|
-
"name": "next"
|
|
18
|
-
}
|
|
19
|
-
],
|
|
20
|
-
"baseUrl": ".",
|
|
21
|
-
"paths": {
|
|
22
|
-
"@/*": ["./src/*"]
|
|
23
|
-
},
|
|
24
|
-
"outDir": "./dist",
|
|
25
|
-
"rootDir": "./src",
|
|
26
|
-
"declaration": true,
|
|
27
|
-
"declarationMap": true,
|
|
28
|
-
"sourceMap": true,
|
|
29
|
-
"emitDeclarationOnly": true
|
|
30
|
-
},
|
|
31
|
-
"include": ["src/**/*"],
|
|
32
|
-
"exclude": ["node_modules", "dist"]
|
|
33
|
-
}
|