chore(themes): move theme libs into /theme
This commit is contained in:
1 parent
cfb6ec8cce
commit
83b007818d
57 files changed
+117
-103
No files matched your search
@@ -1,6 +1,6 @@
|
||||
<script lang="ts">
|
||||
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';
|
||||
|
||||
@@ -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';
|
||||
|
||||
|
||||
@@ -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';
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<script lang="ts">
|
||||
import { compileThemeSvelte } from '$lib/themeSvelte';
|
||||
import { themeAssetUrl, type ThemeV2ScriptValue } from '$lib/themeV2';
|
||||
import { compileThemeSvelte } from '$lib/theme/themeSvelte';
|
||||
import { themeAssetUrl, type ThemeV2ScriptValue } from '$lib/theme/themeV2';
|
||||
import { TriangleAlert } from '@lucide/svelte';
|
||||
import { mount, unmount } from 'svelte';
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<script lang="ts">
|
||||
import Logo from '$assets/logo.png';
|
||||
import { fetchCommunityThemeDetails, publishThemeToWorkshop } from '$lib/communityThemes';
|
||||
import { fetchCommunityThemeDetails, publishThemeToWorkshop } from '$lib/theme/communityThemes';
|
||||
import FontPreview from '$lib/components/theme/FontPreview.svelte';
|
||||
import ThemeBehaviorInspector from '$lib/components/theme/ThemeBehaviorInspector.svelte';
|
||||
import ThemeElementInspector from '$lib/components/theme/ThemeElementInspector.svelte';
|
||||
@@ -44,31 +44,31 @@
|
||||
THEME_CLOCK_VARIABLE_NAMES,
|
||||
isThemeClockVariable,
|
||||
themeClockValues,
|
||||
} from '$lib/themeClock';
|
||||
} from '$lib/theme/themeClock';
|
||||
import {
|
||||
BUNDLED_THEME_FONTS,
|
||||
bundledThemeFontFamily,
|
||||
fontStack,
|
||||
type ThemeFontChoice,
|
||||
} from '$lib/themeFonts';
|
||||
import { THEME_ICON_PREVIEW_NAMES, THEME_ICON_SETS } from '$lib/themeIcons';
|
||||
} from '$lib/theme/themeFonts';
|
||||
import { THEME_ICON_PREVIEW_NAMES, THEME_ICON_SETS } from '$lib/theme/themeIcons';
|
||||
import {
|
||||
themeBehaviorSummary,
|
||||
themeBehaviorTargetLabel,
|
||||
themeElementLabel,
|
||||
themeGroupContainsElement,
|
||||
themeGroupInteractiveCount,
|
||||
} from '$lib/themeLogic';
|
||||
import { themeParallax } from '$lib/themeParallax';
|
||||
import { renderThemePreview } from '$lib/themePreview';
|
||||
import { themeScriptInitialVariables, themeScriptVariableNames } from '$lib/themeScript';
|
||||
} from '$lib/theme/themeLogic';
|
||||
import { themeParallax } from '$lib/theme/themeParallax';
|
||||
import { renderThemePreview } from '$lib/theme/themePreview';
|
||||
import { themeScriptInitialVariables, themeScriptVariableNames } from '$lib/theme/themeScript';
|
||||
import {
|
||||
formatThemeScriptError,
|
||||
parseThemeScript,
|
||||
themeScriptProgramCanLeaveLauncher,
|
||||
themeScriptProgramReferences,
|
||||
} from '$lib/themeScriptLang';
|
||||
import { analyzeThemeSvelteSource } from '$lib/themeSvelte';
|
||||
} from '$lib/theme/themeScriptLang';
|
||||
import { analyzeThemeSvelteSource } from '$lib/theme/themeSvelte';
|
||||
import {
|
||||
createDefaultThemeV2,
|
||||
createThemeV2Behavior,
|
||||
@@ -96,7 +96,7 @@
|
||||
type ThemeV2VideoElement,
|
||||
type ThemeV2WidgetElement,
|
||||
type ThemeV2WidgetKind,
|
||||
} from '$lib/themeV2';
|
||||
} from '$lib/theme/themeV2';
|
||||
import {
|
||||
exportThemeFolder,
|
||||
markThemeSynced,
|
||||
@@ -105,7 +105,7 @@
|
||||
themesDirectory,
|
||||
toSafeName,
|
||||
updateInstalledThemeWorkshopId,
|
||||
} from '$lib/themes';
|
||||
} from '$lib/theme/themes';
|
||||
import type { EZPPUser, EZPPUserInfo } from '$lib/types';
|
||||
import { currentUser } from '$lib/userAuthentication';
|
||||
import { osuInstallationPath } from '$lib/userSettings';
|
||||
|
||||
@@ -15,9 +15,9 @@
|
||||
import * as Select from '$lib/components/ui/select';
|
||||
import Slider from '$lib/components/ui/slider/slider.svelte';
|
||||
import Textarea from '$lib/components/ui/textarea/textarea.svelte';
|
||||
import { getThemeDataSampleValue, resolveThemeDataValue, themeGlobalData } from '$lib/themeData';
|
||||
import type { ThemeFontChoice } from '$lib/themeFonts';
|
||||
import { DEFAULT_THEME_ICON_SET, type ThemeIconSet } from '$lib/themeIcons';
|
||||
import { getThemeDataSampleValue, resolveThemeDataValue, themeGlobalData } from '$lib/theme/themeData';
|
||||
import type { ThemeFontChoice } from '$lib/theme/themeFonts';
|
||||
import { DEFAULT_THEME_ICON_SET, type ThemeIconSet } from '$lib/theme/themeIcons';
|
||||
import {
|
||||
THEME_DATA_FIELDS,
|
||||
THEME_PARTICLE_PRESETS,
|
||||
@@ -29,7 +29,7 @@
|
||||
type ThemeV2MaskShape,
|
||||
type ThemeV2WidgetKind,
|
||||
type ThemeV2WidgetVariant,
|
||||
} from '$lib/themeV2';
|
||||
} from '$lib/theme/themeV2';
|
||||
import { openURL } from '$lib/utils';
|
||||
import {
|
||||
CircleUser,
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
import ThemeSection from '$lib/components/theme/ThemeSection.svelte';
|
||||
import Button from '$lib/components/ui/button/button.svelte';
|
||||
import Slider from '$lib/components/ui/slider/slider.svelte';
|
||||
import type { ThemeV2Filters } from '$lib/themeV2';
|
||||
import type { ThemeV2Filters } from '$lib/theme/themeV2';
|
||||
import { SlidersHorizontal } from '@lucide/svelte';
|
||||
|
||||
let {
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
type ThemeV2Element,
|
||||
type ThemeV2Group,
|
||||
type ThemeV2MaskShape,
|
||||
} from '$lib/themeV2';
|
||||
} from '$lib/theme/themeV2';
|
||||
import { Boxes, Layers, RefreshCw, Scan, Ungroup } from '@lucide/svelte';
|
||||
|
||||
let {
|
||||
|
||||
@@ -1,6 +1,10 @@
|
||||
<script lang="ts">
|
||||
import { getThemeIconBody } from '$lib/themeIconCatalog';
|
||||
import { DEFAULT_THEME_ICON_SET, type ThemeIconName, type ThemeIconSet } from '$lib/themeIcons';
|
||||
import { getThemeIconBody } from '$lib/theme/themeIconCatalog';
|
||||
import {
|
||||
DEFAULT_THEME_ICON_SET,
|
||||
type ThemeIconName,
|
||||
type ThemeIconSet,
|
||||
} from '$lib/theme/themeIcons';
|
||||
|
||||
let {
|
||||
name,
|
||||
|
||||
@@ -6,8 +6,8 @@
|
||||
getFullIconCatalog,
|
||||
type IconPackKey,
|
||||
type ThemeIconCatalogItem,
|
||||
} from '$lib/themeIconCatalog';
|
||||
import { DEFAULT_THEME_ICON_SET, type ThemeIconSet } from '$lib/themeIcons';
|
||||
} from '$lib/theme/themeIconCatalog';
|
||||
import { DEFAULT_THEME_ICON_SET, type ThemeIconSet } from '$lib/theme/themeIcons';
|
||||
import ThemeIcon from './ThemeIcon.svelte';
|
||||
import { Check, ChevronsUpDown, LayoutGrid, List, Search, X } from '@lucide/svelte';
|
||||
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
<script lang="ts">
|
||||
import ThemeBehaviorInspector from '$lib/components/theme/ThemeBehaviorInspector.svelte';
|
||||
import Button from '$lib/components/ui/button/button.svelte';
|
||||
import { themeEditorSectionOpen } from '$lib/themeEditorUiState';
|
||||
import { themeBehaviorSummary, themeGroupInteractiveCount } from '$lib/themeLogic';
|
||||
import { themeEditorSectionOpen } from '$lib/theme/themeEditorUiState';
|
||||
import { themeBehaviorSummary, themeGroupInteractiveCount } from '$lib/theme/themeLogic';
|
||||
import type {
|
||||
ThemeV2Behavior,
|
||||
ThemeV2BehaviorTarget,
|
||||
ThemeV2Element,
|
||||
ThemeV2Group,
|
||||
} from '$lib/themeV2';
|
||||
} from '$lib/theme/themeV2';
|
||||
import { AlertTriangle, ChevronDown, Plus, Zap } from '@lucide/svelte';
|
||||
|
||||
let {
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
<script lang="ts">
|
||||
import {
|
||||
reportCommunityTheme,
|
||||
type CommunityTheme,
|
||||
type ThemeReportCategory,
|
||||
} from '$lib/communityThemes';
|
||||
import { Button } from '$lib/components/ui/button';
|
||||
import * as Dialog from '$lib/components/ui/dialog';
|
||||
import { Label } from '$lib/components/ui/label';
|
||||
import * as Select from '$lib/components/ui/select';
|
||||
import Textarea from '$lib/components/ui/textarea/textarea.svelte';
|
||||
import {
|
||||
reportCommunityTheme,
|
||||
type CommunityTheme,
|
||||
type ThemeReportCategory,
|
||||
} from '$lib/theme/communityThemes';
|
||||
import { Flag, LoaderCircle, X } from '@lucide/svelte';
|
||||
import { sileo } from 'sileo';
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<script lang="ts">
|
||||
import { isThemeClockVariable, THEME_CLOCK_VARIABLE_NAMES } from '$lib/themeClock';
|
||||
import { parseThemeScript } from '$lib/themeScriptLang';
|
||||
import type { ThemeV2Element, ThemeV2Group, ThemeV2ScriptScreen } from '$lib/themeV2';
|
||||
import { isThemeClockVariable, THEME_CLOCK_VARIABLE_NAMES } from '$lib/theme/themeClock';
|
||||
import { parseThemeScript } from '$lib/theme/themeScriptLang';
|
||||
import type { ThemeV2Element, ThemeV2Group, ThemeV2ScriptScreen } from '$lib/theme/themeV2';
|
||||
import { Braces, CircleAlert, Maximize2, Minimize2, X } from '@lucide/svelte';
|
||||
import type * as Monaco from 'monaco-editor';
|
||||
import { onMount } from 'svelte';
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<script lang="ts">
|
||||
import { themeEditorSectionOpen } from '$lib/themeEditorUiState';
|
||||
import { themeEditorSectionOpen } from '$lib/theme/themeEditorUiState';
|
||||
import { ChevronDown } from '@lucide/svelte';
|
||||
import { untrack } from 'svelte';
|
||||
import type { Component, Snippet } from 'svelte';
|
||||
|
||||
@@ -5,9 +5,9 @@
|
||||
import ThemeV2Elements from '$lib/components/theme/ThemeV2Elements.svelte';
|
||||
import * as Avatar from '$lib/components/ui/avatar';
|
||||
import { currentUserInfo } from '$lib/data';
|
||||
import { scopeThemeCss } from '$lib/themeCssScope';
|
||||
import { fontStack, monoFontStack } from '$lib/themeFonts';
|
||||
import { DEFAULT_THEME_ICON_SET } from '$lib/themeIcons';
|
||||
import { scopeThemeCss } from '$lib/theme/themeCssScope';
|
||||
import { fontStack, monoFontStack } from '$lib/theme/themeFonts';
|
||||
import { DEFAULT_THEME_ICON_SET } from '$lib/theme/themeIcons';
|
||||
import {
|
||||
normalizeChrome,
|
||||
readableTextColor,
|
||||
@@ -18,7 +18,7 @@
|
||||
type ThemeV2Group,
|
||||
type ThemeV2ScriptValue,
|
||||
type ThemeV2WidgetKind,
|
||||
} from '$lib/themeV2';
|
||||
} from '$lib/theme/themeV2';
|
||||
import { currentUser } from '$lib/userAuthentication';
|
||||
import { countryCodeToEmoji } from '$lib/utils';
|
||||
import { Clock, Trophy } from '@lucide/svelte';
|
||||
|
||||
@@ -4,7 +4,11 @@
|
||||
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 type { ThemeV2TextDecoration, ThemeV2TextStyle, ThemeV2TextTransform } from '$lib/themeV2';
|
||||
import type {
|
||||
ThemeV2TextDecoration,
|
||||
ThemeV2TextStyle,
|
||||
ThemeV2TextTransform,
|
||||
} from '$lib/theme/themeV2';
|
||||
import { Bold, Italic, RotateCcw, Strikethrough, Type, Underline } from '@lucide/svelte';
|
||||
|
||||
let {
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
import Input from '$lib/components/ui/input/input.svelte';
|
||||
import Label from '$lib/components/ui/label/label.svelte';
|
||||
import Slider from '$lib/components/ui/slider/slider.svelte';
|
||||
import type { ThemeV2Transform } from '$lib/themeV2';
|
||||
import type { ThemeV2Transform } from '$lib/theme/themeV2';
|
||||
import { FlipHorizontal2, FlipVertical2, RotateCcw, RotateCw } from '@lucide/svelte';
|
||||
|
||||
type TransformTarget = ThemeV2Transform & { offsetX?: number; offsetY?: number };
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
<script lang="ts">
|
||||
import { custom_theme_volume } from '$lib/global';
|
||||
import { playThemeMedia, themeMediaSource, themeVideoLifecycle } from '$lib/themeMedia';
|
||||
import { themeParallax } from '$lib/themeParallax';
|
||||
import type { ThemeV2Definition } from '$lib/themeV2';
|
||||
import { themeAssetUrl } from '$lib/themeV2';
|
||||
import { playThemeMedia, themeMediaSource, themeVideoLifecycle } from '$lib/theme/themeMedia';
|
||||
import { themeParallax } from '$lib/theme/themeParallax';
|
||||
import type { ThemeV2Definition } from '$lib/theme/themeV2';
|
||||
import { themeAssetUrl } from '$lib/theme/themeV2';
|
||||
import { reduceAnimations } from '$lib/userSettings';
|
||||
import { trackMediaContainer } from '$lib/utils';
|
||||
import { onDestroy } from 'svelte';
|
||||
|
||||
@@ -6,9 +6,9 @@
|
||||
import DownloadButton from '$lib/components/ui/download-button/DownloadButton.svelte';
|
||||
import { currentUserInfo } from '$lib/data';
|
||||
import { launching as launchingStore } from '$lib/global';
|
||||
import { getThemeDataSampleValue, resolveThemeDataValue, themeGlobalData } from '$lib/themeData';
|
||||
import { fontStack } from '$lib/themeFonts';
|
||||
import { DEFAULT_THEME_ICON_SET, type ThemeIconSet } from '$lib/themeIcons';
|
||||
import { getThemeDataSampleValue, resolveThemeDataValue, themeGlobalData } from '$lib/theme/themeData';
|
||||
import { fontStack } from '$lib/theme/themeFonts';
|
||||
import { DEFAULT_THEME_ICON_SET, type ThemeIconSet } from '$lib/theme/themeIcons';
|
||||
import {
|
||||
themeArcGeometry,
|
||||
themeClockDate,
|
||||
@@ -16,9 +16,9 @@
|
||||
themeCountdownText,
|
||||
themeParticleSeeds,
|
||||
themeSvgGradientVector,
|
||||
} from '$lib/themeLayers';
|
||||
import { themeMediaSource, themeVideoLifecycle } from '$lib/themeMedia';
|
||||
import { interpolateThemeText } from '$lib/themeTextVariables';
|
||||
} from '$lib/theme/themeLayers';
|
||||
import { themeMediaSource, themeVideoLifecycle } from '$lib/theme/themeMedia';
|
||||
import { interpolateThemeText } from '$lib/theme/themeTextVariables';
|
||||
import {
|
||||
themeAssetUrl,
|
||||
themeClassNames,
|
||||
@@ -42,7 +42,7 @@
|
||||
type ThemeV2Group,
|
||||
type ThemeV2Point,
|
||||
type ThemeV2ScriptValue,
|
||||
} from '$lib/themeV2';
|
||||
} from '$lib/theme/themeV2';
|
||||
import { currentUser } from '$lib/userAuthentication';
|
||||
import { countryCodeToEmoji, formatRelativeTime, openURL } from '$lib/utils';
|
||||
import { Boxes, ChevronRight, Clock, Move, RotateCw, Trophy } from '@lucide/svelte';
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
import ThemeSection from '$lib/components/theme/ThemeSection.svelte';
|
||||
import Button from '$lib/components/ui/button/button.svelte';
|
||||
import Input from '$lib/components/ui/input/input.svelte';
|
||||
import type { ThemeV2ScriptValue } from '$lib/themeV2';
|
||||
import type { ThemeV2ScriptValue } from '$lib/theme/themeV2';
|
||||
import { Braces, RotateCcw } from '@lucide/svelte';
|
||||
|
||||
let {
|
||||
|
||||
Reference in new issue
Block a user