upgrade deps

This commit is contained in:
wryk 2021-11-07 00:11:15 +01:00
parent cbe47ba8c5
commit 40b719e613
33 changed files with 4399 additions and 14607 deletions

View File

@ -1,17 +0,0 @@
{
"presets": [
[
"@babel/preset-env",
{
"useBuiltIns": "usage",
"exclude": [
"@babel/plugin-transform-classes"
],
"corejs": {
"version": 3,
"proposals": true
}
}
]
]
}

View File

@ -1,7 +0,0 @@
last 2 chrome versions
last 2 and_chr versions
last 2 edge versions
last 2 ff versions
last 2 and_ff versions
last 2 safari versions
last 2 ios_saf versions

4
.gitignore vendored
View File

@ -1,5 +1,5 @@
node_modules
public
.cache
dist
.parcel-cache
.env
.vercel

10
.parcelrc Normal file
View File

@ -0,0 +1,10 @@
{
"extends": [
"@parcel/config-default"
],
"transformers": {
"*.svelte": [
"parcel-transformer-svelte"
]
}
}

18682
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -2,43 +2,43 @@
"name": "eldritch-cafe-radio",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"build": "parcel build src/index.html -d public",
"build": "parcel build src/index.html",
"dev": "parcel src/index.html",
"test": "echo \"Error: no test specified\" && exit 1"
},
"repository": {
"type": "git",
"url": "https://github.com/EldritchCafe/radio.git"
},
"keywords": [],
"author": "",
"license": "ISC",
"devDependencies": {
"@babel/core": "^7.8.4",
"@babel/preset-env": "^7.8.3",
"autoprefixer": "^9.7.4",
"parcel": "^1.12.4",
"parcel-plugin-static-files-copy": "^2.3.1",
"parcel-plugin-svelte": "^4.0.5",
"postcss-input-range": "^4.0.0",
"posthtml-expressions": "^1.9.0",
"sass": "^1.25.0",
"svelte": "^3.18.2",
"typescript": "^3.8.2"
},
"browserslist": "> 0.25%, not dead",
"dependencies": {
"@popperjs/core": "^2.0.6",
"@popperjs/core": "^2.10.2",
"@swc/helpers": "^0.2.13",
"copy-to-clipboard": "^3.2.1",
"core-js": "^3.6.4",
"date-fns": "^2.9.0",
"core-js-pure": "^3.19.1",
"date-fns": "^2.25.0",
"get-urls": "^9.2.0",
"iter-tools": "^7.0.0-rc.0",
"regenerator-runtime": "^0.13.3",
"iter-tools": "^7.1.4",
"regenerator-runtime": "^0.13.9",
"route-parser": "0.0.5",
"svelte": "^3.44.1",
"svelte-pipeable-store": "^1.0.3",
"svelte-portal": "^0.1.0",
"svelte-routing": "^1.4.0"
"svelte-routing": "^1.6.0",
"typescript": "^4.4.4"
},
"staticFiles": {
"staticPath": "public",
"watcherGlob": "**"
"devDependencies": {
"@parcel/packager-raw-url": "^2.0.0",
"@parcel/transformer-sass": "^2.0.0",
"@parcel/transformer-webmanifest": "^2.0.0",
"autoprefixer": "^10.4.0",
"parcel": "^2.0.0",
"parcel-transformer-svelte": "^1.2.3",
"postcss": "^8.3.11",
"postcss-input-range": "^4.0.0"
}
}

View File

@ -1,9 +0,0 @@
module.exports = {
plugins: {
"posthtml-expressions": {
locals: {
INSTANCE: process.env.INSTANCE || 'eldritch.cafe'
}
}
}
};

View File

@ -1,14 +1,15 @@
// --------------------------------------------------------------
// == mixins */
// --------------------------------------------------------------
@use 'sass:math';
@mixin flow($font-size, $bf: $base-font, $lh: $line-height) {
$lh-value: $base-font * $lh;
$coeff: ceil($font-size / $lh-value);
$new-lh: ($lh-value / $font-size) * $coeff;
$margin-bottom: $new-lh / $coeff;
$coeff: ceil(math.div($font-size, $lh-value));
$new-lh: math.div($lh-value, $font-size) * $coeff;
$margin-bottom: math.div($new-lh, $coeff);
margin-bottom: $margin-bottom + em;
font-size: $font-size / 10 + rem;
font-size: math.div($font-size, 10) + rem;
line-height: $new-lh;
}

View File

@ -1,6 +1,7 @@
/* ----------------------------------------------------------- */
/* == typography */
/* ----------------------------------------------------------- */
@use 'sass:math';
html {
font-size: 62.5%;
@ -9,7 +10,7 @@ html {
}
body {
font-size: $base-font / 10 + em;
font-size: math.div($base-font, 10) + em;
line-height: $line-height;
}

View File

@ -1,4 +1,5 @@
// important: nth-child(n) is used to keep same specificity between grid (equal and unequal)
@use 'sass:math';
.grid {
display: flex;
@ -79,20 +80,20 @@
// with gutter
@else {
$g : $gutter / 2;
$g : math.div($gutter, 2);
&>* {
margin-bottom: $mb;
}
& > *:nth-child(odd) {
$size : ($column1 * 100%) / ($column1 + $column2);
$size : math.div($column1 * 100%, $column1 + $column2);
width: calc(#{$size} - #{$g} - .01px); // .01px = $bugfix IE
}
& > *:nth-child(even) {
$size : ($column2 * 100%) / ($column1 + $column2);
$size : math.div($column2 * 100%, $column1 + $column2);
margin-left: $gutter;
width: calc(#{$size} - #{$g} - .01px); // .01px = $bugfix IE

View File

@ -7,7 +7,7 @@
font-weight: normal;
font-style: normal;
font-family: "Roboto";
src: local("Roboto Regular"), local("Roboto"), url("/assets/fonts/roboto-regular.woff2") format("woff2"),
src: local("Roboto Regular"), local("Roboto"), url("/src/assets/fonts/roboto-regular.woff2") format("woff2"),
;
}
@ -16,12 +16,12 @@
font-weight: 600;
font-style: normal;
font-family: "Roboto";
src: local("Roboto Medium"), local("Roboto"), url("/assets/fonts/roboto-medium.woff2") format("woff2");
src: local("Roboto Medium"), local("Roboto"), url("/src/assets/fonts/roboto-medium.woff2") format("woff2");
}
@font-face {
font-display: swap;
font-weight: bold;
font-style: normal;
font-family: "Roboto";
src: local("Roboto Bold"), local("Roboto"), url("/assets/fonts/roboto-bold.woff2") format("woff2");
src: local("Roboto Bold"), local("Roboto"), url("/src/assets/fonts/roboto-bold.woff2") format("woff2");
}

View File

@ -30,14 +30,14 @@
left: -2.1rem;
width: 1rem;
height: 1rem;
background: no-repeat url("/assets/img/playbar.svg");
background: no-repeat url("/src/assets/img/playbar.svg");
background-position: left center;
background-size: 1rem 1rem;
content: "";
}
.track--playing::before {
background-image: url("/assets/img/playbar-animate.svg");
background-image: url("/src/assets/img/playbar-animate.svg");
}
.track__main {

View File

@ -100,7 +100,7 @@
left: calc(50% - 1.5rem);
width: 3rem;
height: 2.7rem;
background: $color-bg no-repeat url("/assets/img/separator-tentacle.svg");
background: $color-bg no-repeat url("/src/assets/img/separator-tentacle.svg");
background-size: 100% 100%;
content: "";
}

View File

@ -18,7 +18,7 @@
<script>
import Portal from 'svelte-portal'
import ContextPage from '/components/ContextPage'
import ContextPage from '/src/components/ContextPage'
let open = false

View File

@ -6,9 +6,9 @@
<script>
import { Router, Route } from 'svelte-routing'
import { home, share } from '/routes.js'
import Home from '/routes/Home.svelte'
import Share from '/routes/Share.svelte'
import { home, share } from '/src/routes.js'
import Home from '/src/routes/Home.svelte'
import Share from '/src/routes/Share.svelte'
const pair = (duplex, component) => ({ duplex, component })

View File

@ -17,7 +17,7 @@
<script>
import { createEventDispatcher } from 'svelte'
import Close from '/components/icons/context/close'
import Close from '/src/components/icons/context/close'
const dispatch = createEventDispatcher();

View File

@ -43,13 +43,13 @@
<script>
import { getContext } from 'svelte'
import Volume from '/components/Volume'
import PlayPause from '/components/icons/controls/PlayPause'
import Prev from '/components/icons/controls/Prev'
import Next from '/components/icons/controls/Next'
import IconMenu from '/components/icons/Menu'
import Popper from '/components/PopperMenu'
import ContextMenu from '/components/ContextMenu'
import Volume from '/src/components/Volume'
import PlayPause from '/src/components/icons/controls/PlayPause'
import Prev from '/src/components/icons/controls/Prev'
import Next from '/src/components/icons/controls/Next'
import IconMenu from '/src/components/icons/Menu'
import Popper from '/src/components/PopperMenu'
import ContextMenu from '/src/components/ContextMenu'
const current = getContext('current')
const paused = getContext('paused')

View File

@ -61,10 +61,10 @@
<script>
import { getContext } from 'svelte'
import DistanceDate from '/components/DistanceDate'
import IconMenu from '/components/icons/Menu'
import Popper from '/components/PopperMenu'
import ContextMenu from '/components/ContextMenu'
import DistanceDate from '/src/components/DistanceDate'
import IconMenu from '/src/components/icons/Menu'
import Popper from '/src/components/PopperMenu'
import ContextMenu from '/src/components/ContextMenu'
const current = getContext('current')
const enqueueing = getContext('enqueueing')

View File

@ -19,13 +19,13 @@
<script>
import { setContext, onMount } from 'svelte'
import Header from '/components/layout/Header.svelte'
import Footer from '/components/layout/Footer.svelte'
import Queue from '/components/Queue.svelte'
import Viewer from '/components/Viewer.svelte'
import { get, writable, writableStorage, derived, scan, wait, startWith } from '/services/store.js'
import { radioIterator, radioShareIterator } from '/services/radio.js'
import DeepSet from '/services/deep-set.js'
import Header from '/src/components/layout/Header.svelte'
import Footer from '/src/components/layout/Footer.svelte'
import Queue from '/src/components/Queue.svelte'
import Viewer from '/src/components/Viewer.svelte'
import { get, writable, writableStorage, derived, scan, wait, startWith } from '/src/services/store.js'
import { radioIterator, radioShareIterator } from '/src/services/radio.js'
import DeepSet from '/src/services/deep-set.js'
export let share
export let large
@ -34,7 +34,7 @@
const cache = new DeepSet()
const domain = writableStorage(localStorage, 'domain', window.instance)
const domain = writableStorage(localStorage, 'domain', process.env.INSTANCE)
const hashtags = writableStorage(localStorage, 'hashtags', [
'np',

View File

@ -66,8 +66,8 @@
import { getContext } from 'svelte'
import { writable, derived } from 'svelte/store'
import Portal from 'svelte-portal'
import ContextPage from '/components/ContextPage'
import TagInput from '/components/TagInput'
import ContextPage from '/src/components/ContextPage'
import TagInput from '/src/components/TagInput'
const domain = getContext('domain')
const hashtags = getContext('hashtags')

View File

@ -96,12 +96,12 @@
<script>
import { getContext } from 'svelte'
import Controls from '/components/Controls.svelte'
import IconReduce from '/components/icons/player/Reduce.svelte'
import IconExpand from '/components/icons/player/Expand.svelte'
import IconHeart from '/components/icons/Heart.svelte'
import YoutubePlayer from '/components/YoutubePlayer'
import Progress from '/components/player/Progress'
import Controls from '/src/components/Controls.svelte'
import IconReduce from '/src/components/icons/player/Reduce.svelte'
import IconExpand from '/src/components/icons/player/Expand.svelte'
import IconHeart from '/src/components/icons/Heart.svelte'
import YoutubePlayer from '/src/components/YoutubePlayer'
import Progress from '/src/components/player/Progress'
export let large
export let sticky

View File

@ -2,8 +2,8 @@
<script>
import { createEventDispatcher, onMount, onDestroy } from 'svelte'
import { loadIframeApi, STATE } from '/services/youtube.js'
import { queue } from '/services/misc.js'
import { loadIframeApi, STATE } from '/src/services/youtube.js'
import { queue } from '/src/services/misc.js'
// input props
export let id

View File

@ -4,5 +4,5 @@
</footer>
<script>
import eldritchSky from '/assets/img/eldritch-sky.svg'
import eldritchSky from '/src/assets/img/eldritch-sky.svg'
</script>

View File

@ -11,7 +11,7 @@
</header>
<script>
import logo from '/assets/img/logo.svg'
import About from '/components/About'
import Settings from '/components/Settings'
import logo from '/src/assets/img/logo.svg'
import About from '/src/components/About'
import Settings from '/src/components/Settings'
</script>

View File

@ -19,7 +19,7 @@
</div>
</div>
<script>
import { secondsToElapsedTime } from '/services/misc.js'
import { secondsToElapsedTime } from '/src/services/misc.js'
export let ready
export let currentTime

View File

@ -5,21 +5,18 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Eldritch Radio</title>
<link rel="stylesheet" href="/assets/scss/style.scss">
<link rel="stylesheet" href="assets/scss/style.scss">
<link rel="icon" href="/assets/favicon/favicon.svg" type="image/svg+xml">
<link rel="apple-touch-icon" sizes="180x180" href="/assets/favicon/apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="32x32" href="/assets/favicon/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="/assets/favicon/favicon-16x16.png">
<link rel="manifest" href="/assets/favicon/manifest.webmanifest">
<link rel="mask-icon" href="/assets/favicon/safari-pinned-tab.svg" color="#635776">
<link rel="manifest" href="manifest.json">
<link rel="icon" href="assets/favicon/favicon.svg" type="image/svg+xml">
<link rel="apple-touch-icon" sizes="180x180" href="assets/favicon/apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="32x32" href="assets/favicon/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="assets/favicon/favicon-16x16.png">
<link rel="mask-icon" href="assets/favicon/safari-pinned-tab.svg" color="#635776">
<meta name="msapplication-TileColor" content="#635776">
<meta name="theme-color" content="#635776">
</head>
<body>
<script>
window.instance = '{{ INSTANCE }}';
</script>
<script src="main.js"></script>
<script type="module" src="main.js"></script>
</body>
</html>

View File

@ -1,11 +1,5 @@
import 'core-js/stable'
import 'core-js/proposals'
import 'regenerator-runtime/runtime'
import App from '/src/components/App.svelte'
import App from '/components/App.svelte'
const app = new App({
new App({
target: document.body
})
export default app

View File

@ -3,12 +3,12 @@
"short_name": "Eldritch Radio",
"icons": [
{
"src": "/assets/favicon/android-chrome-192x192.png",
"src": "assets/favicon/android-chrome-192x192.png",
"sizes": "192x192",
"type": "image/png"
},
{
"src": "/assets/favicon/android-chrome-512x512.png",
"src": "assets/favicon/android-chrome-512x512.png",
"sizes": "512x512",
"type": "image/png"
}

View File

@ -1,5 +1,5 @@
<Radio share={null} large={false} />
<script>
import Radio from '/components/Radio.svelte'
import Radio from '/src/components/Radio.svelte'
</script>

View File

@ -1,7 +1,7 @@
<Radio share={refererCredentials} large={large} />
<script>
import Radio from '/components/Radio.svelte'
import Radio from '/src/components/Radio.svelte'
export let domain
export let id

View File

@ -1,6 +1,7 @@
import Observable from 'core-js-pure/features/observable'
import getUrls from 'get-urls'
import { asyncMap, execPipe, map, findOr } from 'iter-tools'
import { mapNullable } from '/services/misc.js'
import { mapNullable } from '/src/services/misc.js'
const LINK_RE = /<(.+?)>; rel="(\w+)"/gi

View File

@ -1,5 +1,5 @@
import { execPipe, asyncFilter, asyncMap } from 'iter-tools'
import { share } from '/routes.js'
import { share } from '/src/routes.js'
const intersection = (xs, ys) => xs.filter(x => ys.includes(x))
const difference = (xs, ys) => xs.filter(x => !ys.includes(x))

View File

@ -1,6 +1,6 @@
import { asyncConcat } from 'iter-tools'
import { hashtagsIterator, statusIterator } from '/services/mastodon.js'
import { tracksIterator } from '/services/misc.js'
import { hashtagsIterator, statusIterator } from '/src/services/mastodon.js'
import { tracksIterator } from '/src/services/misc.js'
export const radioIterator = (domain, hashtags, cache) =>
tracksIterator(hashtagsIterator(domain, hashtags), cache)