tangled
alpha
login
or
join now
flo-bit.dev
/
blento
your personal website on atproto - mirror
blento.app
20
fork
atom
overview
issues
pulls
pipelines
linting
jycouet
2 weeks ago
7bb9914a
e79ad47b
+26
-11
9 changed files
expand all
collapse all
unified
split
eslint.config.js
src
lib
atproto
auth.svelte.ts
cards
BaseCard
BaseEditingCard.svelte
FluidTextCard
FluidTextCard.svelte
GameCards
DinoGameCard
DinoGameCard.svelte
TetrisCard
TetrisCard.svelte
MapCard
Map.svelte
helper.ts
types.ts
+10
eslint.config.js
···
32
32
}
33
33
},
34
34
{
35
35
+
files: ['**/*.svelte.ts'],
36
36
+
37
37
+
languageOptions: {
38
38
+
parser: ts.parser
39
39
+
}
40
40
+
},
41
41
+
{
35
42
rules: {
43
43
+
//
44
44
+
'svelte/no-navigation-without-resolve': 'off',
36
45
'svelte/no-at-html-tags': 'off',
46
46
+
//
37
47
'@typescript-eslint/no-explicit-any': 'off',
38
48
'no-unused-vars': 'off',
39
49
'@typescript-eslint/no-unused-vars': [
+3
-2
src/lib/atproto/auth.svelte.ts
···
7
7
deleteStoredSession
8
8
} from '@atcute/oauth-browser-client';
9
9
import { AppBskyActorDefs } from '@atcute/bluesky';
10
10
-
import type { ActorIdentifier, Did } from '@atcute/lexicons';
11
10
import {
12
11
CompositeDidDocumentResolver,
13
12
CompositeHandleResolver,
···
18
17
WellKnownHandleResolver
19
18
} from '@atcute/identity-resolver';
20
19
import { Client } from '@atcute/client';
20
20
+
import type { ActorIdentifier, Did } from '@atcute/lexicons';
21
21
22
22
import { dev } from '$app/environment';
23
23
import { replaceState } from '$app/navigation';
···
25
25
import { metadata } from './metadata';
26
26
import { getDetailedProfile } from './methods';
27
27
import { signUpPDS } from './settings';
28
28
+
import { SvelteURLSearchParams } from 'svelte/reactivity';
28
29
29
30
export const user = $state({
30
31
agent: null as OAuthUserAgent | null,
···
67
68
})
68
69
});
69
70
70
70
-
const params = new URLSearchParams(location.hash.slice(1));
71
71
+
const params = new SvelteURLSearchParams(location.hash.slice(1));
71
72
72
73
const did = (localStorage.getItem('current-login') as Did) ?? undefined;
73
74
+1
-3
src/lib/cards/BaseCard/BaseEditingCard.svelte
···
229
229
230
230
<div class="flex min-w-36 flex-col gap-1">
231
231
<Label class="mb-2">Card type</Label>
232
232
-
{#each changeOptions as changeDef}
232
232
+
{#each changeOptions as changeDef, i (i)}
233
233
<Button
234
234
class="justify-start"
235
235
variant={changeDef.type === item.cardType ? 'primary' : 'ghost'}
···
405
405
406
406
{#if cardDef.canResize !== false}
407
407
<!-- Resize handle at bottom right corner -->
408
408
-
<!-- svelte-ignore a11y_no_static_element_interactions -->
409
409
-
410
408
<div
411
409
onpointerdown={handleResizeStart}
412
410
class="bg-base-300/70 dark:bg-base-900/70 pointer-events-auto absolute right-0.5 bottom-0.5 hidden cursor-se-resize rounded-md rounded-br-3xl p-1 group-hover/card:block"
+8
src/lib/cards/FluidTextCard/FluidTextCard.svelte
···
187
187
// Redraw overlay when text settings change (only after initialization)
188
188
$effect(() => {
189
189
// Access all reactive values to track them
190
190
+
// eslint-disable-next-line @typescript-eslint/no-unused-expressions
190
191
text;
192
192
+
// eslint-disable-next-line @typescript-eslint/no-unused-expressions
191
193
fontSize;
192
194
// Only redraw if already initialized
193
195
if (isInitialized) {
···
1253
1255
1254
1256
switch (i % 6) {
1255
1257
case 0:
1258
1258
+
// eslint-disable-next-line @typescript-eslint/no-unused-expressions
1256
1259
((r = v), (g = t), (b = p));
1257
1260
break;
1258
1261
case 1:
1262
1262
+
// eslint-disable-next-line @typescript-eslint/no-unused-expressions
1259
1263
((r = q), (g = v), (b = p));
1260
1264
break;
1261
1265
case 2:
1266
1266
+
// eslint-disable-next-line @typescript-eslint/no-unused-expressions
1262
1267
((r = p), (g = v), (b = t));
1263
1268
break;
1264
1269
case 3:
1270
1270
+
// eslint-disable-next-line @typescript-eslint/no-unused-expressions
1265
1271
((r = p), (g = q), (b = v));
1266
1272
break;
1267
1273
case 4:
1274
1274
+
// eslint-disable-next-line @typescript-eslint/no-unused-expressions
1268
1275
((r = t), (g = p), (b = v));
1269
1276
break;
1270
1277
case 5:
1278
1278
+
// eslint-disable-next-line @typescript-eslint/no-unused-expressions
1271
1279
((r = v), (g = p), (b = q));
1272
1280
break;
1273
1281
}
+1
-1
src/lib/cards/GameCards/DinoGameCard/DinoGameCard.svelte
···
525
525
});
526
526
</script>
527
527
528
528
-
<!-- svelte-ignore a11y_no_noninteractive_tabindex a11y_no_noninteractive_element_interactions -->
528
528
+
<!-- svelte-ignore a11y_no_noninteractive_tabindex -->
529
529
<!-- svelte-ignore a11y_no_noninteractive_element_interactions -->
530
530
<div
531
531
bind:this={container}
+2
-1
src/lib/cards/GameCards/TetrisCard/TetrisCard.svelte
···
227
227
}
228
228
}
229
229
230
230
+
type OscillatorType = 'sine' | 'square' | 'sawtooth' | 'triangle';
230
231
function playTone(
231
232
frequency: number,
232
233
duration: number,
···
1003
1004
});
1004
1005
</script>
1005
1006
1006
1006
-
<!-- svelte-ignore a11y_no_noninteractive_tabindex a11y_no_noninteractive_element_interactions -->
1007
1007
<!-- svelte-ignore a11y_no_noninteractive_element_interactions -->
1008
1008
+
<!-- svelte-ignore a11y_no_noninteractive_tabindex -->
1008
1009
<div
1009
1010
bind:this={container}
1010
1011
class="relative h-full w-full overflow-hidden outline-none"
+1
-1
src/lib/cards/MapCard/Map.svelte
···
8
8
9
9
let { item = $bindable() }: { item: Item } = $props();
10
10
11
11
-
$inspect(item);
11
11
+
// $inspect(item);
12
12
13
13
let mapContainer: HTMLElement | undefined = $state();
14
14
let map: mapboxgl.Map | undefined = $state();
-2
src/lib/helper.ts
···
323
323
new URL(link);
324
324
325
325
return link;
326
326
-
327
326
} catch (e) {
328
327
if (!tryAdding) return;
329
328
···
332
331
new URL(link);
333
332
334
333
return link;
335
335
-
336
334
} catch (e) {
337
335
return;
338
336
}
-1
src/lib/types.ts
···
18
18
19
19
color?: string;
20
20
21
21
-
22
21
cardData: any;
23
22
24
23
updatedAt?: string;