naive-upload
Version:
<p align="left"> <a href="https://www.npmjs.org/package/naive-upload"> <img src="https://img.shields.io/npm/v/naive-upload.svg"> </a> <a href="https://bundlephobia.com/package/naive-upload@latest"> <img src="https://img.shields.io/bundl
49 lines (48 loc) • 2.16 kB
JavaScript
var s = Object.defineProperty;
var i = (n, o, u) => o in n ? s(n, o, { enumerable: !0, configurable: !0, writable: !0, value: u }) : n[o] = u;
var e = (n, o, u) => (i(n, typeof o != "symbol" ? o + "" : o, u), u);
import { RunMode as l } from "./RunMode.js";
import { Layout as d } from "./Layout.js";
import r from "./RGBAColor.js";
const a = class {
constructor() {
e(this, "build", (o) => (o(this), this));
e(this, "setup", (o) => (o(this), this));
e(this, "configCode", "default");
e(this, "concurrentFile", 3);
e(this, "concurrentChunkFile", 3);
e(this, "tip", "\u5355\u51FB\u6216\u62D6\u52A8\u6587\u4EF6\u5230\u6B64\u533A\u57DF\u5373\u53EF\u4E0A\u4F20");
e(this, "layout", d.\u5361\u7247);
e(this, "runMode", l.\u5168\u81EA\u52A8);
e(this, "enableChunk", !0);
e(this, "chunkSize", 2097152);
e(this, "retry", 3);
e(this, "enableWorker", !0);
e(this, "readonly", !1);
e(this, "debug", !1);
e(this, "alertErrorInfo", !1);
e(this, "enableDrag", !0);
e(this, "statusCheckingColor", new r(255, 235, 59, 0.5));
e(this, "statusUploadingColor", new r(144, 206, 255, 0.5));
e(this, "statusPausedColor", new r(158, 158, 158, 0.5));
e(this, "statusPausedSubColor", new r(244, 154, 3, 0.5));
e(this, "statusDoneColor", new r(76, 175, 80, 0.1));
e(this, "statusDoneSubColor", new r(3, 169, 244, 0.5));
e(this, "statusErrorColor", new r(255, 0, 30, 0.35));
e(this, "statusErrorSubColor", new r(232, 31, 31, 0.5));
e(this, "dragReadyColor", new r(255, 152, 0, 0.8));
e(this, "dragMovingColor", new r(255, 152, 0, 0.5));
e(this, "dragOverColor", new r(255, 87, 34, 0.8));
e(this, "dragPreparationTime", 800);
e(this, "dragChangePositionTime", 1e3);
e(this, "isMobile", /(phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone)/i.test(
navigator.userAgent
));
}
};
let t = a;
e(t, "default", () => new a()), e(t, "defaultWithConfigCode", (o) => new a().setup((u) => u.configCode = o));
export {
t as default
};
//# sourceMappingURL=Settings.js.map