Merge branch 'main' of github.com:Bubobubobubobubo/Topos
This commit is contained in:
@ -36,6 +36,22 @@ if (!self.define) {
|
||||
}
|
||||
})
|
||||
|
||||
.then(() => {
|
||||
return registry[uri] || (
|
||||
|
||||
new Promise(resolve => {
|
||||
if ("document" in self) {
|
||||
const script = document.createElement("script");
|
||||
script.src = uri;
|
||||
script.onload = resolve;
|
||||
document.head.appendChild(script);
|
||||
} else {
|
||||
nextDefineUri = uri;
|
||||
importScripts(uri);
|
||||
resolve();
|
||||
}
|
||||
})
|
||||
|
||||
.then(() => {
|
||||
let promise = registry[uri];
|
||||
if (!promise) {
|
||||
@ -54,11 +70,15 @@ if (!self.define) {
|
||||
}
|
||||
let exports = {};
|
||||
const require = depUri => singleRequire(depUri, uri);
|
||||
const require = depUri => singleRequire(depUri, uri);
|
||||
const specialDeps = {
|
||||
module: { uri },
|
||||
exports,
|
||||
require
|
||||
};
|
||||
registry[uri] = Promise.all(depsNames.map(
|
||||
depName => specialDeps[depName] || require(depName)
|
||||
)).then(deps => {
|
||||
registry[uri] = Promise.all(depsNames.map(
|
||||
depName => specialDeps[depName] || require(depName)
|
||||
)).then(deps => {
|
||||
@ -67,6 +87,7 @@ if (!self.define) {
|
||||
});
|
||||
};
|
||||
}
|
||||
define(['./workbox-b7fccfec'], (function (workbox) { 'use strict';
|
||||
define(['./workbox-b7fccfec'], (function (workbox) { 'use strict';
|
||||
|
||||
self.skipWaiting();
|
||||
@ -100,5 +121,21 @@ define(['./workbox-b7fccfec'], (function (workbox) { 'use strict';
|
||||
})]
|
||||
}), 'GET');
|
||||
|
||||
}));
|
||||
workbox.registerRoute(new workbox.NavigationRoute(workbox.createHandlerBoundToURL("index.html"), {
|
||||
allowlist: [/^\/$/]
|
||||
}));
|
||||
workbox.registerRoute(({
|
||||
url
|
||||
}) => [/^https:\/\/raw\.githubusercontent\.com\/.*/i, /^https:\/\/shabda\.ndre\.gr\/.*/i].some(regex => regex.test(url)), new workbox.CacheFirst({
|
||||
"cacheName": "external-samples",
|
||||
plugins: [new workbox.ExpirationPlugin({
|
||||
maxEntries: 5000,
|
||||
maxAgeSeconds: 2592000
|
||||
}), new workbox.CacheableResponsePlugin({
|
||||
statuses: [0, 200]
|
||||
})]
|
||||
}), 'GET');
|
||||
|
||||
}));
|
||||
//# sourceMappingURL=sw.js.map
|
||||
|
||||
@ -42,7 +42,7 @@
|
||||
"tone": "^14.8.49",
|
||||
"unique-names-generator": "^4.7.1",
|
||||
"vite-plugin-markdown": "^2.1.0",
|
||||
"zifferjs": "^0.0.35",
|
||||
"zifferjs": "^0.0.36",
|
||||
"zzfx": "^1.2.0"
|
||||
}
|
||||
}
|
||||
|
||||
@ -6,6 +6,7 @@ import { SoundEvent, SoundParams } from "./SoundEvent";
|
||||
import { MidiEvent, MidiParams } from "./MidiEvent";
|
||||
import { RestEvent } from "./RestEvent";
|
||||
import { arrayOfObjectsToObjectWithArrays } from "../Utils/Generic";
|
||||
import { TonnetzSpaces } from "zifferjs/src/tonnetz";
|
||||
|
||||
export type InputOptions = { [key: string]: string | number };
|
||||
|
||||
@ -244,8 +245,28 @@ export class Player extends Event {
|
||||
return this;
|
||||
}
|
||||
|
||||
tonnetz(transform: string) {
|
||||
if (this.atTheBeginning()) this.ziffers.tonnetzTransformation(transform);
|
||||
triadTonnetz(transform: string, tonnetz: TonnetzSpaces = [3, 4, 5]) {
|
||||
if (this.atTheBeginning()) this.ziffers.triadTonnetz(transform, tonnetz);
|
||||
return this;
|
||||
}
|
||||
|
||||
tetraTonnetz(transform: string, tonnetz: TonnetzSpaces = [3, 4, 5]) {
|
||||
if (this.atTheBeginning()) this.ziffers.tetraTonnetz(transform, tonnetz);
|
||||
return this;
|
||||
}
|
||||
|
||||
octaCycle(tonnetz: TonnetzSpaces = [3, 4, 5]) {
|
||||
if (this.atTheBeginning()) this.ziffers.octaCycle(tonnetz);
|
||||
return this;
|
||||
}
|
||||
|
||||
hexaCycle(tonnetz: TonnetzSpaces = [3, 4, 5]) {
|
||||
if (this.atTheBeginning()) this.ziffers.hexaCycle(tonnetz);
|
||||
return this;
|
||||
}
|
||||
|
||||
enneaCycle(tonnetz: TonnetzSpaces = [3, 4, 5]) {
|
||||
if (this.atTheBeginning()) this.ziffers.enneaCycle(tonnetz);
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
18
yarn.lock
18
yarn.lock
@ -2595,11 +2595,6 @@ iterate-object@^1.3.2:
|
||||
resolved "https://registry.yarnpkg.com/iterate-object/-/iterate-object-1.3.4.tgz#fa50b1d9e58e340a7dd6b4c98c8a5e182e790096"
|
||||
integrity sha512-4dG1D1x/7g8PwHS9aK6QV5V94+ZvyP4+d19qDv43EzImmrndysIl4prmJ1hWWIGCqrZHyaHBm6BSEWHOLnpoNw==
|
||||
|
||||
jisg@^0.9.7:
|
||||
version "0.9.7"
|
||||
resolved "https://registry.yarnpkg.com/jisg/-/jisg-0.9.7.tgz#d080655808d1f30ec22eb2be070e8a10d8ee097f"
|
||||
integrity sha512-JWoGHGgU3xxJnPCNm6FpgMl0791xYFZq2PsejV8guCbhNJGsMvImAENx9pMhp7HbqhJgkM4ZV5lRbh5zbmF9xw==
|
||||
|
||||
jake@^10.8.5:
|
||||
version "10.8.7"
|
||||
resolved "https://registry.yarnpkg.com/jake/-/jake-10.8.7.tgz#63a32821177940c33f356e0ba44ff9d34e1c7d8f"
|
||||
@ -2619,6 +2614,11 @@ jest-worker@^26.2.1:
|
||||
merge-stream "^2.0.0"
|
||||
supports-color "^7.0.0"
|
||||
|
||||
jisg@^0.9.7:
|
||||
version "0.9.7"
|
||||
resolved "https://registry.yarnpkg.com/jisg/-/jisg-0.9.7.tgz#d080655808d1f30ec22eb2be070e8a10d8ee097f"
|
||||
integrity sha512-JWoGHGgU3xxJnPCNm6FpgMl0791xYFZq2PsejV8guCbhNJGsMvImAENx9pMhp7HbqhJgkM4ZV5lRbh5zbmF9xw==
|
||||
|
||||
jiti@^1.18.2:
|
||||
version "1.19.3"
|
||||
resolved "https://registry.yarnpkg.com/jiti/-/jiti-1.19.3.tgz#ef554f76465b3c2b222dc077834a71f0d4a37569"
|
||||
@ -3882,10 +3882,10 @@ yaml@^2.1.1:
|
||||
resolved "https://registry.yarnpkg.com/yaml/-/yaml-2.3.1.tgz#02fe0975d23cd441242aa7204e09fc28ac2ac33b"
|
||||
integrity sha512-2eHWfjaoXgTBC2jNM1LRef62VQa0umtvRiDSk6HSzW7RvS5YtkabJrwYLLEKWBc8a5U2PTSCs+dJjUTJdlHsWQ==
|
||||
|
||||
zifferjs@^0.0.35:
|
||||
version "0.0.35"
|
||||
resolved "https://registry.yarnpkg.com/zifferjs/-/zifferjs-0.0.35.tgz#0518a84d031d2ef19417bc1084c21b08666df067"
|
||||
integrity sha512-vtvyEO/hIPRboGinkb1IhqJu4iU5DdbkzrQX8Xg7n096fDi/PU72b5Nwxt0xt29D37CfOI99sjaLbtYPab1NoA==
|
||||
zifferjs@^0.0.36:
|
||||
version "0.0.36"
|
||||
resolved "https://registry.yarnpkg.com/zifferjs/-/zifferjs-0.0.36.tgz#a7f0139c56cae38a5c68a0182363bab4ffeaad79"
|
||||
integrity sha512-zpzN2obiNYrmCxFdzqv3jzOHYPhgAkzW6ZeHxSoHtybLHf/HlDXWs3KtB1u8HOJt2ZPIogegNEDX+mMCQtxbMQ==
|
||||
|
||||
zzfx@^1.2.0:
|
||||
version "1.2.0"
|
||||
|
||||
Reference in New Issue
Block a user