This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "mix": [ | |
| { | |
| "thumbnails": [ | |
| { | |
| "url": "https://i.ytimg.com/vi/TpAVV9-CnMw/sddefault.jpg?sqp=-oaymwEWCJADEOEBIAQqCghqEJQEGHgg6AJIWg&rs=AMzJL3kSqWebw-HEkw_iRxwZ_4upN1pGCQ", | |
| "width": 400, | |
| "height": 225 | |
| }, | |
| { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| export function draggable(node: HTMLElement): SvelteActionReturnType { | |
| let dy = 0; | |
| let parentTop = 0; | |
| const pos: { y?: number; } = {}; | |
| const initialNodeRect: { height?: number, top?: number; } = {}; | |
| // const lastPointerPos: { y?: number; } = {}; | |
| const dispatch = <T>(type: "dragstart" | "dragend" | "drag", detail: T) => node.dispatchEvent(new CustomEvent(type, { detail })); | |
| /// get the rects for the nodes |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @use "./mixins"; | |
| @include mixins.keyframe(fade-in-slide) { | |
| 0% { | |
| transform: translate(0, -100%); | |
| opacity: 0; | |
| } | |
| 100% { | |
| transform: translate(0, 0); | |
| // transform-origin: left top; | |
| opacity: 1; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { browser } from "$app/env"; | |
| import type { FileEntry, FolderEntry } from "$lib/types/core"; | |
| import { forEach } from "$lib/utils/array"; | |
| export class IDBStore { | |
| private $$: Promise<IDBDatabase> | undefined; | |
| /** | |
| * Creates an instance of IDBStore. | |
| * @param {string} DB_NAME - Name of the database to be used as a VFS | |
| * @param {string} DB_STORE_NAME - Name of the `objectStore` used by IndexedDB |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import type { Config } from "./types/config"; | |
| import type { $File, FileEntry, FolderEntry } from "./types/core"; | |
| import { BaseAdapter } from "./adapters"; | |
| import type { FSMethods } from "./types/structs"; | |
| import type { Maybe } from "./types/util"; | |
| export class FS implements FSMethods { | |
| private _adapter: BaseAdapter; | |
| constructor(private config: Config) { | |
| this._adapter = new BaseAdapter(config); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const list = { | |
| "mix": [ | |
| { | |
| "thumbnails": [ | |
| { | |
| "url": "https://lh3.googleusercontent.com/YoQ-A-GOpgeE8tgdF3Rcf5z9V8NIIKjLH6_7X3QphIQUwVHioLu7Ik2wQzU0oCkyNm1TeLDLDYvomJ8=w60-h60-l90-rj", | |
| "width": 60, | |
| "height": 60 | |
| }, | |
| { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { sortObj } from "./collections/objects"; | |
| import { Encoder } from "./strings"; | |
| const ChunkSizes = { | |
| 8: 8150, | |
| 16: 16300, | |
| 32: 32600, | |
| } as const; | |
| function normalizeObject<T = Record<string, unknown>>(data: T) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <picture> | |
| {#each headerThumbnail as thumbnail, i} | |
| {#if i === 0} | |
| <source media={`(max-width: ${thumbnail?.width}px)`} srcset={thumbnail.url} /> | |
| {:else} | |
| <source | |
| media={`(min-width: ${headerThumbnail[i - 1].width + 1}px) and (max-width: ${thumbnail?.width}px)`} | |
| srcset={thumbnail.url} | |
| /> | |
| {/if} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // ____________________________________________________________________________ | |
| // | |
| // Unit Conversion v.2.1.1 | |
| // ____________________________________________________________________________ | |
| // | |
| // Function Input units | |
| // | |
| // Absolute length | |
| // px(input); px, pt, pc, in, mm, cm, em, rem, number | |
| // pt(input); px, pt, pc, in, mm, cm, em, rem, number |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { parseNextItem } from '$lib/parsers'; | |
| import type { Item, Song } from '$lib/types'; | |
| import { splice } from '$lib/utils/collections'; | |
| import { addToQueue, getSrc, notify, queryParams, type ResponseBody } from '$lib/utils/utils'; | |
| import { writable, get, type Writable } from 'svelte/store'; | |
| import { currentTitle, filterAutoPlay, key as mixListIndex, playerLoading } from './stores'; | |
| import { groupSession } from './_sessions'; | |
| export interface ISessionListProvider { |