restructure $lib

This commit is contained in:
Ollie Taylor
2023-02-24 13:15:34 +00:00
parent 55c7448248
commit 29ee8f1763
12 changed files with 13 additions and 20 deletions
@@ -4,9 +4,9 @@
__internal_audio_element,
__internal_audio_metadata,
__internal_audio_src,
} from '$lib/components/audio/store';
import type { PlayerElement } from '$lib/components/audio/types';
import { isBoolean, isNumber } from '$lib/helper/check';
} from '$lib/context/audio';
import { isBoolean, isNumber } from '$lib/types/type-guards';
import type { PlayerElement } from '$lib/types/types';
let element: PlayerElement;
let currentTime = 0;
@@ -72,5 +72,4 @@
__internal_audio_metadata.update((m) => ({ ...m, duration }));
}}
/>
<!-- <AudioA11yProgress {currentTime} {paused} {duration} /> -->
{/key}
-2
View File
@@ -1,2 +0,0 @@
export { default as AudioManager } from './audio.svelte';
export { audio } from './store';
@@ -1,6 +1,6 @@
import { dev } from '$app/environment';
import type { PlayerElement, PlayerMetadata } from '$lib/components/audio/types';
import { secondsToTimestamp } from '$lib/helper/seconds-to-timestamp';
import type { PlayerElement, PlayerMetadata } from '$lib/types/types';
import { secondsToTimestamp } from '$lib/utility/seconds-to-timestamp';
import clamp from 'just-clamp';
import { derived, writable } from 'svelte/store';
+2 -2
View File
@@ -1,2 +1,2 @@
// Reexport your entry components here
export * from '$lib/components/audio';
export { default as AudioLoader } from '$lib/components/audio-loader.svelte';
export { audio } from '$lib/context/audio';
+2 -2
View File
@@ -1,7 +1,7 @@
<script lang="ts">
import { AudioManager } from '$lib/components/audio';
import { AudioLoader } from '$lib';
</script>
<AudioManager />
<AudioLoader />
<slot />
+1 -1
View File
@@ -1,5 +1,5 @@
<script lang="ts">
import { audio } from '$lib/components/audio';
import { audio } from '$lib';
const sources = {
syntax: '/example-syntax.mp3',
+1 -6
View File
@@ -1,10 +1,5 @@
<script lang="ts">
import { audio } from '$lib/components/audio';
const sources = {
syntax: '/example-syntax.mp3',
knomii: '/example-knomii.mp3',
} as const;
import { audio } from '$lib';
let current_time = 0;
$: current_time = $audio.current_time;