import { Easing, EasingFunction } from "react-native-reanimated";
export const internalSymbolKey = Symbol.for("$");
export const timeStampSymbol = Symbol.for("time-stamp");
export const sortIndexSymbol = Symbol.for("sort-index");
export const internalSerializeKey = "$";
export const localMusicSheetId = "local-music-sheet";
export const musicHistorySheetId = "history-music-sheet";
export const localPluginPlatform = "本地";
export const localPluginHash = "local-plugin-hash";
export const internalFakeSoundKey = "fake-key";
const emptyFunction = () => {};
Object.freeze(emptyFunction);
export { emptyFunction };
export enum RequestStateCode {
IDLE = 0b00000000,
PENDING_FIRST_PAGE = 0b00000010,
LOADING = 0b00000010,
PENDING_REST_PAGE = 0b00000011,
PARTLY_DONE = 0b00000100,
FINISHED = 0b0001000,
ERROR = 0b10000000,
}
export const StorageKeys = {
MediaMetaKeys: "media-meta-keys",
PluginMetaKey: "plugin-meta",
MediaCache: "media-cache",
LocalMusicSheet: "local-music-sheet",
};
export const CacheControl = {
Cache: "cache",
NoCache: "no-cache",
NoStore: "no-store",
};
export const supportLocalMediaType = [
".mp3",
".flac",
".wma",
".wav",
".m4a",
".ogg",
".acc",
".aac",
".ape",
".opus",
];
const ANIMATION_EASING: EasingFunction = Easing.out(Easing.exp);
const ANIMATION_DURATION = 150;
const animationFast = {
duration: ANIMATION_DURATION,
easing: ANIMATION_EASING,
};
const animationNormal = {
duration: 250,
easing: ANIMATION_EASING,
};
const animationSlow = {
duration: 500,
easing: ANIMATION_EASING,
};
export const timingConfig = {
animationFast,
animationNormal,
animationSlow,
};
export const enum SortType {
None = "None",
Title = "title",
Artist = "artist",
Album = "album",
Newest = "time",
Oldest = "time-rev",
}
export const enum ResumeMode {
Append = "append",
Overwrite = "overwrite",
OverwriteDefault = "overwrite-default",
}