restructure $lib
This commit is contained in:
+2
-1
@@ -3,6 +3,7 @@ node_modules
|
||||
/build
|
||||
/.svelte-kit
|
||||
/package
|
||||
/dist
|
||||
.env
|
||||
.env.*
|
||||
!.env.example
|
||||
@@ -10,4 +11,4 @@ node_modules
|
||||
# Ignore files for PNPM, NPM and YARN
|
||||
pnpm-lock.yaml
|
||||
package-lock.json
|
||||
yarn.lock
|
||||
yarn.lock
|
||||
@@ -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}
|
||||
@@ -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
@@ -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';
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<script lang="ts">
|
||||
import { AudioManager } from '$lib/components/audio';
|
||||
import { AudioLoader } from '$lib';
|
||||
</script>
|
||||
|
||||
<AudioManager />
|
||||
<AudioLoader />
|
||||
|
||||
<slot />
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<script lang="ts">
|
||||
import { audio } from '$lib/components/audio';
|
||||
import { audio } from '$lib';
|
||||
|
||||
const sources = {
|
||||
syntax: '/example-syntax.mp3',
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user