Skip to content

Commit

Permalink
Reorganize src/lib
Browse files Browse the repository at this point in the history
  • Loading branch information
JosiahFu committed May 28, 2024
1 parent a69f9eb commit dbb2c36
Show file tree
Hide file tree
Showing 19 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion src/App.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import { theme } from './lib/theme';
import Sidebar from './Sidebar.svelte';
import InviteButton from './InviteButton.svelte';
import { localBoolean } from './lib/localStore';
import { localBoolean } from './lib/stores/localStore';
const joinId = new URLSearchParams(window.location.search).get('join')
Expand Down
4 changes: 2 additions & 2 deletions src/Game.svelte
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<script lang="ts">
import { readonly, writable } from 'svelte/store';
import { defaultState, winnerOf, type Mark, type Nine, type Result, type SubGrid as SubGridData } from './lib/data';
import SubGrid from './lib/SubGrid.svelte';
import SubGrid from './lib/ttt/SubGrid.svelte';
import { setContext } from 'svelte';
import CellGrid from './lib/CellGrid.svelte';
import CellGrid from './lib/ttt/CellGrid.svelte';
export let gameState = defaultState()
Expand Down
2 changes: 1 addition & 1 deletion src/InviteButton.svelte
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<script lang="ts">
import QRCode from '@castlenine/svelte-qrcode';
import DialogButton from './lib/DialogButton.svelte';
import DialogButton from './lib/ui/DialogButton.svelte';
import { debouncedDelay } from './lib/debouncedDelay';
import { ClipboardCheckIcon, ClipboardIcon, InviteIcon } from './lib/icons/icons';
Expand Down
2 changes: 1 addition & 1 deletion src/NetworkGame.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import Game from './Game.svelte';
import { defaultState } from './lib/data';
import { debouncedDelay } from './lib/debouncedDelay';
import { peerClient, peerHost } from './lib/peer';
import { peerClient, peerHost } from './lib/stores/peer';
export let host: boolean = false;
export let id: string
Expand Down
2 changes: 1 addition & 1 deletion src/Sidebar.svelte
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<script lang="ts">
import { createEventDispatcher } from 'svelte';
import ThemeButton from './ThemeButton.svelte';
import TooltipButton from './lib/TooltipButton.svelte';
import TooltipButton from './lib/ui/TooltipButton.svelte';
import { ExitIcon } from './lib/icons/icons';
import type { ThemeSetting } from './lib/theme';
Expand Down
4 changes: 2 additions & 2 deletions src/ThemeButton.svelte
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<script lang="ts">
import DialogButton from "./lib/DialogButton.svelte";
import MultiButton from './lib/MultiButton.svelte';
import DialogButton from "./lib/ui/DialogButton.svelte";
import MultiButton from './lib/ui/MultiButton.svelte';
import { ContrastIcon, DarkModeIcon, LightModeIcon, MonitorIcon, NoContrastIcon, ThemeIcon } from './lib/icons/icons';
import type { ThemeSetting } from './lib/theme';
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion src/lib/theme.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { onDestroy } from 'svelte';
import { readonly, writable, type Readable, type Writable } from 'svelte/store';
import { localString } from './localStore';
import { localString } from './stores/localStore';

export type ThemeSetting = 'light' | 'dark' | 'system';

Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion src/lib/Mark.svelte → src/lib/ttt/Mark.svelte
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<script lang="ts">
import { createEventDispatcher, getContext } from 'svelte';
import type { Mark } from './data';
import type { Mark } from '../data';
import OMark from './OMark.svelte';
import XMark from './XMark.svelte';
import type { Readable } from 'svelte/store';
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion src/lib/SubGrid.svelte → src/lib/ttt/SubGrid.svelte
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<script lang="ts">
import { createEventDispatcher } from 'svelte';
import Mark from './Mark.svelte';
import { winnerOf, type MarkEventData, type SubGrid, type Mark as MarkData } from './data';
import { winnerOf, type SubGrid, type Mark as MarkData } from '../data';
import OMark from './OMark.svelte';
import XMark from './XMark.svelte';
import CellGrid from './CellGrid.svelte';
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion src/lib/Dialog.svelte → src/lib/ui/Dialog.svelte
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<script lang="ts">
import { scale } from 'svelte/transition';
import { CloseIcon } from './icons/icons';
import { CloseIcon } from '../icons/icons';
export let open = false;
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit dbb2c36

Please sign in to comment.