diff --git a/package.json b/package.json
index fa7f88f2..d0c7e162 100644
--- a/package.json
+++ b/package.json
@@ -11,13 +11,14 @@
"eslint-config-google": "^0.11.0",
"eslint-plugin-svelte3": "^2.7.3",
"postcss-easy-import": "^3.0.0",
- "rollup": "^1.20.0",
- "rollup-plugin-livereload": "^1.0.0",
- "rollup-plugin-svelte": "^6.1.1",
- "rollup-plugin-terser": "^5.1.2",
+ "rollup": "^2.45.2",
+ "rollup-plugin-css-only": "^3.1.0",
+ "rollup-plugin-livereload": "^2.0.0",
+ "rollup-plugin-svelte": "^7.1.0",
+ "rollup-plugin-terser": "^7.0.2",
"sirv-cli": "^0.4.4",
"svelte": "^3.2.0",
- "svelte-check": "^0.1.0",
+ "svelte-check": "^1.4.0",
"svelte-preprocess": "^4.0.0",
"tslib": "^2.0.0",
"typescript": "^3.9.7"
diff --git a/public/public/bundle.css b/public/public/bundle.css
deleted file mode 100644
index 6df15051..00000000
--- a/public/public/bundle.css
+++ /dev/null
@@ -1,5 +0,0 @@
-.rr-controller.svelte-dxnc1j.svelte-dxnc1j{width:100%;height:80px;background:#fff;display:flex;flex-direction:column;justify-content:space-around;align-items:center;border-radius:0 0 5px 5px}.rr-timeline.svelte-dxnc1j.svelte-dxnc1j{width:80%;display:flex;align-items:center}.rr-timeline__time.svelte-dxnc1j.svelte-dxnc1j{display:inline-block;width:100px;text-align:center;color:#11103e}.rr-progress.svelte-dxnc1j.svelte-dxnc1j{flex:1;height:12px;background:#eee;position:relative;border-radius:3px;cursor:pointer;box-sizing:border-box;border-top:solid 4px #fff;border-bottom:solid 4px #fff}.rr-progress.disabled.svelte-dxnc1j.svelte-dxnc1j{cursor:not-allowed}.rr-progress__step.svelte-dxnc1j.svelte-dxnc1j{height:100%;position:absolute;left:0;top:0;background:#e0e1fe}.rr-progress__handler.svelte-dxnc1j.svelte-dxnc1j{width:20px;height:20px;border-radius:10px;position:absolute;top:2px;transform:translate(-50%, -50%);background:rgb(73, 80, 246)}.rr-controller__btns.svelte-dxnc1j.svelte-dxnc1j{display:flex;align-items:center;justify-content:center;font-size:13px}.rr-controller__btns.svelte-dxnc1j button.svelte-dxnc1j{width:32px;height:32px;display:flex;padding:0;align-items:center;justify-content:center;background:none;border:none;border-radius:50%;cursor:pointer}.rr-controller__btns.svelte-dxnc1j button.svelte-dxnc1j:active{background:#e0e1fe}.rr-controller__btns.svelte-dxnc1j button.active.svelte-dxnc1j{color:#fff;background:rgb(73, 80, 246)}.rr-controller__btns.svelte-dxnc1j button.svelte-dxnc1j:disabled{cursor:not-allowed}
-.replayer-wrapper{position:relative}.replayer-mouse{position:absolute;width:20px;height:20px;transition:.05s linear;background-size:contain;background-position:50%;background-repeat:no-repeat;background-image:url("data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9IjMwMCIgd2lkdGg9IjMwMCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiBkYXRhLW5hbWU9IkxheWVyIDEiIHZpZXdCb3g9IjAgMCA1MCA1MCI+PHBhdGggZD0iTTQ4LjcxIDQyLjkxTDM0LjA4IDI4LjI5IDQ0LjMzIDE4YTEgMSAwIDAwLS4zMy0xLjYxTDIuMzUgMS4wNmExIDEgMCAwMC0xLjI5IDEuMjlMMTYuMzkgNDRhMSAxIDAgMDAxLjY1LjM2bDEwLjI1LTEwLjI4IDE0LjYyIDE0LjYzYTEgMSAwIDAwMS40MSAwbDQuMzgtNC4zOGExIDEgMCAwMC4wMS0xLjQyem0tNS4wOSAzLjY3TDI5IDMyYTEgMSAwIDAwLTEuNDEgMGwtOS44NSA5Ljg1TDMuNjkgMy42OWwzOC4xMiAxNEwzMiAyNy41OEExIDEgMCAwMDMyIDI5bDE0LjU5IDE0LjYyeiIvPjwvc3ZnPg==")}.replayer-mouse:after{content:"";display:inline-block;width:20px;height:20px;border-radius:10px;background:#4950f6;transform:translate(-10px,-10px);opacity:.3}.replayer-mouse.active:after{animation:click .2s ease-in-out 1}.replayer-mouse-tail{position:absolute;pointer-events:none}@keyframes click{0%{opacity:.3;width:20px;height:20px;border-radius:10px;transform:translate(-10px,-10px)}50%{opacity:.5;width:10px;height:10px;border-radius:5px;transform:translate(-5px,-5px)}}.rr-player{position:relative;background:white;float:left;border-radius:5px;box-shadow:0 24px 48px rgba(17, 16, 62, 0.12)}.rr-player__frame{overflow:hidden}.replayer-wrapper{float:left;clear:both;transform-origin:top left;left:50%;top:50%}.replayer-wrapper>iframe{border:none}
-.switch.svelte-1mmdovf.svelte-1mmdovf{height:1em;display:flex;align-items:center}.switch.disabled.svelte-1mmdovf.svelte-1mmdovf{opacity:0.5}.label.svelte-1mmdovf.svelte-1mmdovf{margin:0 8px}.switch.svelte-1mmdovf input[type='checkbox'].svelte-1mmdovf{position:absolute;opacity:0}.switch.svelte-1mmdovf label.svelte-1mmdovf{width:2em;height:1em;position:relative;cursor:pointer;display:block}.switch.disabled.svelte-1mmdovf label.svelte-1mmdovf{cursor:not-allowed}.switch.svelte-1mmdovf label.svelte-1mmdovf:before{content:'';position:absolute;width:2em;height:1em;left:0.1em;transition:background 0.1s ease;background:rgba(73, 80, 246, 0.5);border-radius:50px}.switch.svelte-1mmdovf label.svelte-1mmdovf:after{content:'';position:absolute;width:1em;height:1em;border-radius:50px;left:0;transition:all 0.2s ease;box-shadow:0px 2px 5px 0px rgba(0, 0, 0, 0.3);background:#fcfff4;animation:switch-off 0.2s ease-out;z-index:2}.switch input[type='checkbox']:checked+label.svelte-1mmdovf.svelte-1mmdovf:before{background:rgb(73, 80, 246)}.switch input[type='checkbox']:checked+label.svelte-1mmdovf.svelte-1mmdovf:after{animation:switch-on 0.2s ease-out;left:1.1em}
-
-/*# sourceMappingURL=bundle.css.map */
\ No newline at end of file
diff --git a/public/public/bundle.css.map b/public/public/bundle.css.map
deleted file mode 100644
index 24c87a90..00000000
--- a/public/public/bundle.css.map
+++ /dev/null
@@ -1,16 +0,0 @@
-{
- "version": 3,
- "file": "bundle.css",
- "sources": [
- "../Controller.svelte",
- "../Player.svelte",
- "../Switch.svelte"
- ],
- "sourcesContent": [
- "\n\n\n\n{#if showController}\n
\n
\n
{formatTime(currentTime)}\n
handleProgressClick(event)}>\n
\n {#each customEvents as event}\n
\n {/each}\n\n
\n
\n
{formatTime(meta.totalTime)}\n
\n
\n
\n {#each speedOption as s}\n
\n {/each}\n
\n
\n
\n
\n{/if}\n",
- "\n\n\n\n\n
\n {#if replayer}\n
toggleFullscreen()} />\n {/if}\n \n",
- "\n\n\n\n\n \n \n {label}\n
\n"
- ],
- "names": [],
- "mappings": "AAiMA,cAAc,4BAAC,CAAC,AACd,KAAK,CAAE,IAAI,CACX,MAAM,CAAE,IAAI,CACZ,UAAU,CAAE,IAAI,CAChB,OAAO,CAAE,IAAI,CACb,cAAc,CAAE,MAAM,CACtB,eAAe,CAAE,YAAY,CAC7B,WAAW,CAAE,MAAM,CACnB,aAAa,CAAE,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,AAC5B,CAAC,AAED,YAAY,4BAAC,CAAC,AACZ,KAAK,CAAE,GAAG,CACV,OAAO,CAAE,IAAI,CACb,WAAW,CAAE,MAAM,AACrB,CAAC,AAED,kBAAkB,4BAAC,CAAC,AAClB,OAAO,CAAE,YAAY,CACrB,KAAK,CAAE,KAAK,CACZ,UAAU,CAAE,MAAM,CAClB,KAAK,CAAE,OAAO,AAChB,CAAC,AAED,YAAY,4BAAC,CAAC,AACZ,IAAI,CAAE,CAAC,CACP,MAAM,CAAE,IAAI,CACZ,UAAU,CAAE,IAAI,CAChB,QAAQ,CAAE,QAAQ,CAClB,aAAa,CAAE,GAAG,CAClB,MAAM,CAAE,OAAO,CACf,UAAU,CAAE,UAAU,CACtB,UAAU,CAAE,KAAK,CAAC,GAAG,CAAC,IAAI,CAC1B,aAAa,CAAE,KAAK,CAAC,GAAG,CAAC,IAAI,AAC/B,CAAC,AAED,YAAY,SAAS,4BAAC,CAAC,AACrB,MAAM,CAAE,WAAW,AACrB,CAAC,AAED,kBAAkB,4BAAC,CAAC,AACl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AAM,CAAE,GAAG,CACX,aAAa,CAAE,IAAI,CACnB,IAAI,CAAE,CAAC,CACP,UAAU,CAAE,GAAG,CAAC,IAAI,CAAC,IAAI,CACzB,UAAU,CAAE,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAC9C,UAAU,CAAE,OAAO,CACnB,SAAS,CAAE,UAAU,CAAC,IAAI,CAAC,QAAQ,CACnC,OAAO,CAAE,CAAC,AACZ,CAAC,AAED,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,UAAU,CAAC,QAAQ,CAAG,mCAAK,OAAO,AAAC,CAAC,AACrD,UAAU,CAAE,IAAI,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG,CAAC,AAC9B,CAAC,AAED,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,UAAU,CAAC,QAAQ,CAAG,mCAAK,MAAM,AAAC,CAAC,AACpD,SAAS,CAAE,SAAS,CAAC,IAAI,CAAC,QAAQ,CAClC,IAAI,CAAE,KAAK,AACb,CAAC"
-}
\ No newline at end of file
diff --git a/rollup.config.js b/rollup.config.js
index 84530b9a..313b8e11 100644
--- a/rollup.config.js
+++ b/rollup.config.js
@@ -6,6 +6,7 @@ import { terser } from 'rollup-plugin-terser';
import sveltePreprocess from 'svelte-preprocess';
import typescript from '@rollup/plugin-typescript';
import pkg from './package.json';
+import css from 'rollup-plugin-css-only';
// eslint-disable-next-line no-undef
const production = !process.env.ROLLUP_WATCH;
@@ -33,14 +34,19 @@ const entries = (production
export default entries.map((output) => ({
input: 'src/main.ts',
- output,
+ output: {
+ file: output.file,
+ format: output.format,
+ name: output.name,
+ sourcemap: true,
+ exports: 'auto',
+ },
plugins: [
svelte({
- // enable run-time checks when not in production
- dev: !production,
- // we'll extract any component CSS out into
- // a separate file — better for performance
- css: output.css && ((css) => css.write(output.css)),
+ compilerOptions: {
+ // enable run-time checks when not in production
+ dev: !production,
+ },
preprocess: sveltePreprocess({
postcss: {
// eslint-disable-next-line no-undef
@@ -60,7 +66,13 @@ export default entries.map((output) => ({
}),
commonjs(),
- typescript({ sourceMap: !production }),
+ typescript(),
+
+ css({
+ // we'll extract any component CSS out into
+ // a separate file — better for performance
+ output: output.css,
+ }),
// In dev mode, call `npm run start` once
// the bundle has been generated
diff --git a/src/Player.svelte b/src/Player.svelte
index 2801a53f..741d42a2 100644
--- a/src/Player.svelte
+++ b/src/Player.svelte
@@ -1,7 +1,7 @@