From 83b007818db24803c50a2bdf3fa19400970e1a48 Mon Sep 17 00:00:00 2001 From: HorizonCode Date: Wed, 4 Nov 2026 13:39:45 +0100 Subject: [PATCH] chore(themes): move theme libs into /theme --- package.json | 2 +- scripts/generate-theme-icons.ts | 8 +++++-- src-tauri/Cargo.lock | 2 +- src-tauri/Cargo.toml | 2 +- src-tauri/tauri.conf.json | 7 ++++-- .../theme/CommunityWorkshopView.svelte | 10 ++++---- .../theme/ThemeBehaviorInspector.svelte | 8 +++---- .../theme/ThemeComponentEditor.svelte | 4 ++-- .../components/theme/ThemeCssClasses.svelte | 2 +- .../components/theme/ThemeCustomLayer.svelte | 4 ++-- .../components/theme/ThemeEditorWindow.svelte | 24 +++++++++---------- .../theme/ThemeElementInspector.svelte | 8 +++---- .../theme/ThemeFilterControls.svelte | 2 +- .../theme/ThemeGroupInspector.svelte | 2 +- src/lib/components/theme/ThemeIcon.svelte | 8 +++++-- .../components/theme/ThemeIconPicker.svelte | 4 ++-- .../components/theme/ThemeLinkedLogic.svelte | 6 ++--- .../components/theme/ThemeReportDialog.svelte | 10 ++++---- .../components/theme/ThemeScriptEditor.svelte | 6 ++--- src/lib/components/theme/ThemeSection.svelte | 2 +- src/lib/components/theme/ThemeStage.svelte | 8 +++---- .../theme/ThemeTextStyleControls.svelte | 6 ++++- .../theme/ThemeTransformControls.svelte | 2 +- .../components/theme/ThemeV2Background.svelte | 8 +++---- .../components/theme/ThemeV2Elements.svelte | 14 +++++------ .../theme/ThemeVariableDefaults.svelte | 2 +- .../ui/download-button/DownloadButton.svelte | 2 +- .../components/ui/titlebar/titlebar.svelte | 2 +- src/lib/global.ts | 2 +- src/lib/notifications.ts | 2 +- .../{ => theme}/communityThemeDownloads.ts | 0 src/lib/{ => theme}/communityThemes.ts | 2 +- src/lib/{ => theme}/themeClock.ts | 0 src/lib/{ => theme}/themeCssScope.ts | 0 src/lib/{ => theme}/themeData.ts | 6 ++--- src/lib/{ => theme}/themeEditorUiState.ts | 0 src/lib/{ => theme}/themeFonts.ts | 0 src/lib/{ => theme}/themeIconCatalog.ts | 0 src/lib/{ => theme}/themeIconData.ts | 0 src/lib/{ => theme}/themeIcons.ts | 0 src/lib/{ => theme}/themeLayers.ts | 0 src/lib/{ => theme}/themeLogic.ts | 0 src/lib/{ => theme}/themeMedia.ts | 2 +- src/lib/{ => theme}/themeParallax.ts | 0 src/lib/{ => theme}/themePreview.ts | 0 src/lib/{ => theme}/themeScript.ts | 0 src/lib/{ => theme}/themeScriptLang.ts | 0 src/lib/{ => theme}/themeSvelte.ts | 0 src/lib/{ => theme}/themeSvelteDefaults.ts | 0 src/lib/{ => theme}/themeSvelteSnippets.ts | 0 src/lib/{ => theme}/themeTextVariables.ts | 0 src/lib/{ => theme}/themeTrust.ts | 2 +- src/lib/{ => theme}/themeV2.ts | 0 src/lib/{ => theme}/themes.ts | 4 ++-- src/lib/utils.ts | 2 +- src/routes/+layout.svelte | 9 ++++--- src/screens/Launch.svelte | 24 +++++++++---------- 57 files changed, 117 insertions(+), 103 deletions(-) rename src/lib/{ => theme}/communityThemeDownloads.ts (100%) rename src/lib/{ => theme}/communityThemes.ts (99%) rename src/lib/{ => theme}/themeClock.ts (100%) rename src/lib/{ => theme}/themeCssScope.ts (100%) rename src/lib/{ => theme}/themeData.ts (98%) rename src/lib/{ => theme}/themeEditorUiState.ts (100%) rename src/lib/{ => theme}/themeFonts.ts (100%) rename src/lib/{ => theme}/themeIconCatalog.ts (100%) rename src/lib/{ => theme}/themeIconData.ts (100%) rename src/lib/{ => theme}/themeIcons.ts (100%) rename src/lib/{ => theme}/themeLayers.ts (100%) rename src/lib/{ => theme}/themeLogic.ts (100%) rename src/lib/{ => theme}/themeMedia.ts (99%) rename src/lib/{ => theme}/themeParallax.ts (100%) rename src/lib/{ => theme}/themePreview.ts (100%) rename src/lib/{ => theme}/themeScript.ts (100%) rename src/lib/{ => theme}/themeScriptLang.ts (100%) rename src/lib/{ => theme}/themeSvelte.ts (100%) rename src/lib/{ => theme}/themeSvelteDefaults.ts (100%) rename src/lib/{ => theme}/themeSvelteSnippets.ts (100%) rename src/lib/{ => theme}/themeTextVariables.ts (100%) rename src/lib/{ => theme}/themeTrust.ts (97%) rename src/lib/{ => theme}/themeV2.ts (100%) rename src/lib/{ => theme}/themes.ts (99%) diff --git a/package.json b/package.json index b6c3749..ec40769 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "ezpplauncher", - "version": "3.2.7", + "version": "3.3.0", "description": "", "type": "module", "scripts": { diff --git a/scripts/generate-theme-icons.ts b/scripts/generate-theme-icons.ts index c1611f7..c9f22f4 100644 --- a/scripts/generate-theme-icons.ts +++ b/scripts/generate-theme-icons.ts @@ -1,4 +1,8 @@ -import { THEME_ICON_NAMES, type ThemeIconName, type ThemeIconSet } from '../src/lib/themeIcons'; +import { + THEME_ICON_NAMES, + type ThemeIconName, + type ThemeIconSet, +} from '../src/lib/theme/themeIcons'; import { readFileSync, writeFileSync } from 'node:fs'; import { fileURLToPath } from 'node:url'; @@ -135,7 +139,7 @@ export const THEME_ICON_BODIES: Record import DefaultThemePreview from '$assets/default_preview.png'; - import { activeThemeDownloads, themeDownloadProgress } from '$lib/communityThemeDownloads'; + import { activeThemeDownloads, themeDownloadProgress } from '$lib/theme/communityThemeDownloads'; import { fetchCommunityTags, fetchCommunityThemes, @@ -31,7 +31,7 @@ type ThemeReportCategory, type ThemeReportQuery, type ThemeReportStatus, - } from '$lib/communityThemes'; + } from '$lib/theme/communityThemes'; import * as AlertDialog from '$lib/components/ui/alert-dialog'; import Badge from '$lib/components/ui/badge/badge.svelte'; import { Button } from '$lib/components/ui/button'; @@ -47,9 +47,9 @@ import * as Tooltip from '$lib/components/ui/tooltip'; import { active_custom_theme, custom_themes } from '$lib/global'; import { sendSystemAnnouncement } from '$lib/notifications'; - import { isThemeTrusted } from '$lib/themeTrust'; - import { normalizeThemeTags } from '$lib/themeV2'; - import { reloadThemes, updateInstalledThemeTags, type Theme } from '$lib/themes'; + import { isThemeTrusted } from '$lib/theme/themeTrust'; + import { normalizeThemeTags } from '$lib/theme/themeV2'; + import { reloadThemes, updateInstalledThemeTags, type Theme } from '$lib/theme/themes'; import { currentUser } from '$lib/userAuthentication'; import { reduceAnimations } from '$lib/userSettings'; import WorkshopTooltip from './WorkshopTooltip.svelte'; diff --git a/src/lib/components/theme/ThemeBehaviorInspector.svelte b/src/lib/components/theme/ThemeBehaviorInspector.svelte index 0272395..c19c160 100644 --- a/src/lib/components/theme/ThemeBehaviorInspector.svelte +++ b/src/lib/components/theme/ThemeBehaviorInspector.svelte @@ -6,18 +6,18 @@ import Input from '$lib/components/ui/input/input.svelte'; import Label from '$lib/components/ui/label/label.svelte'; import * as Select from '$lib/components/ui/select'; - import { isThemeClockVariable, THEME_CLOCK_VARIABLE_NAMES } from '$lib/themeClock'; + import { isThemeClockVariable, THEME_CLOCK_VARIABLE_NAMES } from '$lib/theme/themeClock'; import { themeBehaviorTargetLabel, themeElementLabel, themeGroupInteractiveCount, themeGroupLabel, - } from '$lib/themeLogic'; + } from '$lib/theme/themeLogic'; import { formatThemeScriptError, parseThemeScript, themeScriptProgramCanLeaveLauncher, - } from '$lib/themeScriptLang'; + } from '$lib/theme/themeScriptLang'; import type { ThemeV2Behavior, ThemeV2BehaviorAction, @@ -29,7 +29,7 @@ ThemeV2Group, ThemeV2ScriptScreen, ThemeV2ScriptValue, - } from '$lib/themeV2'; + } from '$lib/theme/themeV2'; import { Link2, Plus, Trash2 } from '@lucide/svelte'; import { SvelteSet } from 'svelte/reactivity'; diff --git a/src/lib/components/theme/ThemeComponentEditor.svelte b/src/lib/components/theme/ThemeComponentEditor.svelte index 9ce61c6..9f489fe 100644 --- a/src/lib/components/theme/ThemeComponentEditor.svelte +++ b/src/lib/components/theme/ThemeComponentEditor.svelte @@ -3,11 +3,11 @@ analyzeThemeSvelteSource, type ThemeSvelteAnalysis, type ThemeSvelteDiagnostic, - } from '$lib/themeSvelte'; + } from '$lib/theme/themeSvelte'; import { THEME_SVELTE_COMPONENT_PLACEHOLDER, THEME_SVELTE_COMPONENT_SKELETON, - } from '$lib/themeSvelteSnippets'; + } from '$lib/theme/themeSvelteSnippets'; import { Component, CircleAlert, Maximize2, Minimize2, X } from '@lucide/svelte'; import type * as Monaco from 'monaco-editor'; import { onMount } from 'svelte'; diff --git a/src/lib/components/theme/ThemeCssClasses.svelte b/src/lib/components/theme/ThemeCssClasses.svelte index 7abd392..df639ac 100644 --- a/src/lib/components/theme/ThemeCssClasses.svelte +++ b/src/lib/components/theme/ThemeCssClasses.svelte @@ -3,7 +3,7 @@ import Button from '$lib/components/ui/button/button.svelte'; import Input from '$lib/components/ui/input/input.svelte'; import Label from '$lib/components/ui/label/label.svelte'; - import { themeClassTokens } from '$lib/themeV2'; + import { themeClassTokens } from '$lib/theme/themeV2'; import { Code2, RotateCcw } from '@lucide/svelte'; let { diff --git a/src/lib/components/theme/ThemeCustomLayer.svelte b/src/lib/components/theme/ThemeCustomLayer.svelte index 793a40c..0ff10f6 100644 --- a/src/lib/components/theme/ThemeCustomLayer.svelte +++ b/src/lib/components/theme/ThemeCustomLayer.svelte @@ -1,6 +1,6 @@