Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
361 changes: 166 additions & 195 deletions bun.lock

Large diffs are not rendered by default.

43 changes: 22 additions & 21 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,36 +19,37 @@
"lint": "prettier --check . && eslint ."
},
"devDependencies": {
"@eslint/compat": "2.0.0",
"@eslint/js": "9.39.1",
"@eslint/compat": "2.1.0",
"@eslint/js": "10.0.1",
"@faker-js/faker": "^10.4.0",
"@lucide/svelte": "0.559.0",
"@iconify/svelte": "^5.2.2",
"@lucide/svelte": "1.18.0",
"@ramo-libre/ui-themes": "^1.0.0",
"@sveltejs/adapter-static": "^3.0.10",
"@sveltejs/kit": "2.49.2",
"@sveltejs/vite-plugin-svelte": "6.2.1",
"@tailwindcss/vite": "4.1.17",
"@types/node": "24.10.2",
"@sveltejs/kit": "2.65.1",
"@sveltejs/vite-plugin-svelte": "7.1.2",
"@tailwindcss/vite": "4.3.1",
"@types/node": "25.9.3",
"@vite-pwa/sveltekit": "^1.1.0",
"eslint": "9.39.1",
"eslint": "10.5.0",
"eslint-config-prettier": "10.1.8",
"eslint-plugin-svelte": "3.13.1",
"globals": "16.5.0",
"prettier": "3.7.4",
"prettier-plugin-svelte": "3.4.0",
"prettier-plugin-tailwindcss": "0.7.2",
"eslint-plugin-svelte": "3.19.0",
"globals": "17.6.0",
"prettier": "3.8.4",
"prettier-plugin-svelte": "4.1.1",
"prettier-plugin-tailwindcss": "0.8.0",
"rollup-plugin-visualizer": "^7.0.1",
"svelte": "5.45.8",
"svelte-check": "4.3.4",
"tailwindcss": "4.1.17",
"svelte": "5.56.3",
"svelte-check": "4.6.0",
"tailwindcss": "4.3.1",
"tw-animate-css": "1.4.0",
"typescript": "5.9.3",
"typescript-eslint": "8.49.0",
"vite": "7.2.7",
"workbox-window": "^7.4.0"
"typescript": "6.0.3",
"typescript-eslint": "8.61.1",
"vite": "8.0.16",
"workbox-window": "^7.4.1"
},
"dependencies": {
"@madmti/gradesolver": "^1.0.0",
"@supabase/supabase-js": "^2.103.0"
"@supabase/supabase-js": "^2.108.2"
}
}
27 changes: 1 addition & 26 deletions src/lib/dev-tools/gen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,32 +6,7 @@ import type { RamosSerial } from '$lib/state/ramos.svelte';
import type { SemestresSerial } from '$lib/state/semestres.svelte';
import { generateUUID } from '$lib/utils/crypto';
import { ColorUtils } from '$lib/utils/colors';

export interface MockDataInput {
// Semestres a generar
semestres: number;
// Ramos por semestre
ramos: number;
// Eventos por semestre
eventos: number;
// Horarios por semestre
horarios: number;
// Notas por semestre
notas: number;
}

export type MockDataOutput = {
semestres: SemestresSerial;
semestres_data: Record<
string,
{
ramos: RamosSerial;
notas: NotasSerial;
eventos: EventsSerial;
horarios: HorariosSerial;
}
>;
};
import type { MockDataInput, MockDataOutput } from './types';

class MockDataGenerator {
public static generate(input: MockDataInput): MockDataOutput {
Expand Down
26 changes: 26 additions & 0 deletions src/lib/dev-tools/types.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
import type { EventsSerial } from '$lib/state/events.svelte';
import type { HorariosSerial } from '$lib/state/horarios.svelte';
import type { NotasSerial } from '$lib/state/notas.svelte';
import type { RamosSerial } from '$lib/state/ramos.svelte';
import type { SemestresSerial } from '$lib/state/semestres.svelte';

export interface MockDataInput {
semestres: number;
ramos: number;
eventos: number;
horarios: number;
notas: number;
}

export type MockDataOutput = {
semestres: SemestresSerial;
semestres_data: Record<
string,
{
ramos: RamosSerial;
notas: NotasSerial;
eventos: EventsSerial;
horarios: HorariosSerial;
}
>;
};
2 changes: 1 addition & 1 deletion src/lib/state/index.svelte.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { EvaluacionEventsManager } from './evaluacion-events.svelte';
import { HorariosManager } from './horarios.svelte';
import { DevManager } from './dev.svelte';
import { PUBLIC_SHOW_DEV_TOOLS } from '$env/static/public';
import type { MockDataOutput } from '$lib/dev-tools/gen';
import type { MockDataOutput } from '$lib/dev-tools/types';
import { untrack } from 'svelte';

export const RAMOLIBE_KEY_PREFIX = 'RAMOLIBRE_';
Expand Down
2 changes: 1 addition & 1 deletion src/routes/(app)/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
function handleStart() {
if (!semesterName) return;
db.semestres.add(semesterName);
goto(resolve('/configuracion#semesters' as '/configuracion'));
goto(resolve('/configuracion/#semesters'));
}
</script>

Expand Down
5 changes: 3 additions & 2 deletions src/routes/(app)/_components/Github.svelte
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<script lang="ts">
import { Github, Heart } from '@lucide/svelte';
import Icon from '@iconify/svelte';
import { Heart } from '@lucide/svelte';
</script>

<div
Expand All @@ -18,7 +19,7 @@
rel="noopener noreferrer"
class="bg-white/20 hover:bg-white/30 px-6 py-3 rounded-lg transition-all duration-200 flex items-center gap-3 font-semibold"
>
<Github size={24} />
<Icon icon="mdi:github" width={24} />
Contribuir en GitHub
</a>
</div>
Expand Down
4 changes: 2 additions & 2 deletions src/routes/(app)/_components/GradeSolver.svelte
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<script lang="ts">
import { Github } from '@lucide/svelte';
import Icon from '@iconify/svelte';
</script>

<div
Expand Down Expand Up @@ -27,7 +27,7 @@
rel="noopener noreferrer"
class="bg-white/20 hover:bg-white/30 px-4 py-2 rounded-lg transition-colors font-medium flex items-center gap-2"
>
<Github size={28} />
<Icon icon="mdi:github" width={28} />
Ver código fuente
</a>
</div>
Expand Down
2 changes: 1 addition & 1 deletion src/routes/(app)/_components/NextClass.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@
});

const countdownStr = $derived.by(() => {
let remainingMins = 0;
let remainingMins;
if (currentClass) {
remainingMins = currentClass.endMin - currentMin - 1;
} else if (nextClass) {
Expand Down
2 changes: 1 addition & 1 deletion src/routes/(app)/_components/SemestreProgress.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@
{#each ramos as ramo (ramo.id)}
{@const StatusIcon = getStatusIcon(ramo.estado)}
<a
href={resolve(`/notas#${ramo.id}` as '/notas')}
href={resolve('/notas/') + '#' + ramo.id}
class="flex items-center gap-2 px-2 py-1.5 rounded-lg {getBadgeStyle(
ramo.estado
)} hover:scale-105 hover:shadow-md transition-all duration-200 cursor-pointer"
Expand Down
2 changes: 1 addition & 1 deletion src/routes/(app)/_components/UpcomingEvents.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import { getNow } from '$lib/utils/date';

const todayKey = getNow().toISOString().slice(0, 10);
const calendarPath = resolve('/calendario' as const);
const calendarPath = resolve('/calendario/');

function keyToDate(key: string): Date {
const [y, m, d] = key.split('-').map(Number);
Expand Down
9 changes: 5 additions & 4 deletions src/routes/(app)/_components/WelcomeBar.svelte
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
<script lang="ts">
import { goto } from '$app/navigation';
import { resolve } from '$app/paths';
import { CircleUser, GithubIcon, RefreshCw } from '@lucide/svelte';
import Icon from '@iconify/svelte';
import { CircleUser, RefreshCw } from '@lucide/svelte';
import { cloud } from '$lib/state/cloud.svelte';

let user = $derived(cloud.user);
Expand All @@ -20,7 +21,7 @@
};

function handleAccountNavigation() {
goto(resolve('/configuracion#sync' as '/configuracion'));
goto(resolve('/configuracion/#sync'));
}
</script>

Expand Down Expand Up @@ -68,7 +69,7 @@
currentProvider
] || providerColors.github} gap-1 capitalize shadow-sm"
>
{#if currentProvider === 'github'}<GithubIcon size={10} />
{#if currentProvider === 'github'}<Icon icon="mdi:github" width={10} />
{:else if currentProvider === 'google'}<svg class="w-2.5 h-2.5" viewBox="0 0 512 512"
><path
d="M501.8 261.8c0-18.2-1.6-35.6-4.7-52.4H256v99.1h137.8c-6.1 31.9-24.2 58.9-51.4 77V450h83.1c48.3-44.6 76.3-110.2 76.3-188.2"
Expand Down Expand Up @@ -127,7 +128,7 @@
onclick={() => cloud.loginWith('github')}
class="cursor-pointer inline-flex items-center gap-2 px-4 py-2 bg-base-100 border border-base-400 text-content rounded-lg text-xs font-semibold hover:bg-base-200 transition-all active:scale-95 shadow-sm"
>
<GithubIcon size={16} /> GitHub
<Icon icon="mdi:github" width={16} /> GitHub
</button>
<button
onclick={() => cloud.loginWith('google')}
Expand Down
7 changes: 4 additions & 3 deletions src/routes/(app)/configuracion/_components/About.svelte
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<script lang="ts">
import { VERSION } from '$lib/utils/version';
import { Github, Globe, Heart, Code2, GraduationCap } from '@lucide/svelte';
import Icon from '@iconify/svelte';
import { Globe, Heart, Code2, GraduationCap } from '@lucide/svelte';
import { SuiteFavicons } from '@ramo-libre/ui-themes';
</script>

Expand Down Expand Up @@ -80,7 +81,7 @@
class="p-2.5 rounded-lg text-content/40 hover:text-content hover:bg-base-300 transition-all active:scale-90 cursor-pointer"
title="Ver perfil de GitHub"
>
<Github size={18} />
<Icon icon="mdi:github" width={18} />
</a>
</div>

Expand All @@ -90,7 +91,7 @@
target="_blank"
class="flex items-center justify-center gap-2 py-2.5 bg-base-100 text-content border border-base-400 rounded-xl text-xs font-bold hover:bg-base-200 transition-colors"
>
<Github size={14} />
<Icon icon="mdi:github" width={14} />
Source Code
</a>
<a
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<script lang="ts">
import { cloud } from '$lib/state/cloud.svelte';
import Icon from '@iconify/svelte';
import {
Cloud,
CloudOff,
LogOut,
RefreshCw,
CheckCircle2,
GithubIcon,
AlertCircle,
CircleUser
} from '@lucide/svelte';
Expand Down Expand Up @@ -208,7 +208,7 @@
onclick={() => cloud.loginWith('github')}
class="cursor-pointer w-full inline-flex items-center justify-center gap-2 px-4 py-3 bg-base-200 border border-base-400 text-content rounded-lg text-sm font-semibold hover:bg-base-300 transition-all shadow-sm"
>
<GithubIcon size={18} /> Continuar con GitHub
<Icon icon="mdi:github" width={18} /> Continuar con GitHub
</button>

<button
Expand Down
8 changes: 8 additions & 0 deletions src/routes/(app)/dev-tools/+page.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import { PUBLIC_SHOW_DEV_TOOLS } from '$env/static/public';
import { redirect } from '@sveltejs/kit';

export function load() {
if (PUBLIC_SHOW_DEV_TOOLS !== 'true') {
redirect(307, '/');
}
}
5 changes: 3 additions & 2 deletions src/routes/(app)/dev-tools/_components/DataGenerator.svelte
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<script lang="ts">
import MockDataGenerator, { type MockDataOutput } from '$lib/dev-tools/gen';
import type { MockDataOutput } from '$lib/dev-tools/types';
import {
Database,
Check,
Expand Down Expand Up @@ -27,7 +27,8 @@
let isCopied = $state(false);
let isApplied = $state(false); // Estado para el feedback de inyección

function handleGenerate() {
async function handleGenerate() {
const { default: MockDataGenerator } = await import('$lib/dev-tools/gen');
generatedData = MockDataGenerator.generate({ ...params });
jsonString = JSON.stringify(generatedData, null, 2);
isValidJson = true;
Expand Down
2 changes: 1 addition & 1 deletion src/routes/(app)/horarios/_components/views/Clock.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@
});

const countdownStr = $derived.by(() => {
let remainingMins = 0;
let remainingMins;
let remainingSecs = 59 - currentSec;

if (currentClass) {
Expand Down
2 changes: 1 addition & 1 deletion src/routes/(app)/notas/_components/Grades.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@
<div class="flex items-center gap-2">
{#if eventId}
<a
href={resolve(`/calendario#${eventId}` as '/calendario')}
href={resolve('/calendario/') + '#' + eventId}
class="inline-flex items-center gap-1 rounded-md border border-calendar-300 bg-calendar-400 px-2 py-1 text-[11px] font-semibold text-calendar-100 hover:bg-calendar-300 transition-colors cursor-pointer"
>
<CalendarCheck class="w-3.5 h-3.5" />
Expand Down
Loading
Loading