@waveform-playlist/browser 9.4.0 → 9.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +97 -88
- package/dist/index.mjs.map +1 -1
- package/package.json +9 -9
package/dist/index.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as rh from "tone";
|
|
2
|
-
import { now as Ba, Context as oh, setContext as ah, Volume as Ko, getDestination as qo, getTransport as
|
|
3
|
-
import { jsx as k, jsxs as ye, Fragment as
|
|
2
|
+
import { now as Ba, Context as oh, setContext as ah, Volume as Ko, getDestination as qo, getTransport as Ht, start as sh, getContext as Pt, Panner as Ts, Gain as $s, PolySynth as oo, Synth as ih, MembraneSynth as ao, NoiseSynth as lh, MetalSynth as bl, Part as _c, Analyser as Sc, StereoWidener as ch, Gate as uh, Limiter as dh, Compressor as fh, Chebyshev as hh, BitCrusher as ph, Distortion as mh, EQ3 as gh, AutoWah as vh, AutoFilter as yh, AutoPanner as bh, Vibrato as wh, Tremolo as _h, Phaser as Sh, Chorus as kh, PingPongDelay as Ch, FeedbackDelay as xh, JCReverb as Eh, Freeverb as Ih, Reverb as Ah } from "tone";
|
|
3
|
+
import { jsx as k, jsxs as ye, Fragment as Wt } from "react/jsx-runtime";
|
|
4
4
|
import * as P from "react";
|
|
5
5
|
import ot, { useEffect as Q, useLayoutEffect as Or, useRef as T, useMemo as xe, useState as z, useCallback as D, useContext as Oe, createContext as We, memo as kc, forwardRef as Cc, startTransition as Ds, useImperativeHandle as xc, useSyncExternalStore as Mh, Fragment as Th, useInsertionEffect as $h } from "react";
|
|
6
6
|
import O, { ThemeContext as Dh, withTheme as Ec, useTheme as Rh, ThemeProvider as Ic } from "styled-components";
|
|
@@ -1454,7 +1454,7 @@ var zh = class {
|
|
|
1454
1454
|
fadeOut: e.track.fadeOut,
|
|
1455
1455
|
gain: 1
|
|
1456
1456
|
}
|
|
1457
|
-
] : []), r =
|
|
1457
|
+
] : []), r = Ht(), o = Pt().rawContext, a = this.volumeNode.input.input;
|
|
1458
1458
|
this.scheduledClips = n.map((s) => {
|
|
1459
1459
|
const i = o.createGain();
|
|
1460
1460
|
i.gain.value = s.gain, i.connect(a);
|
|
@@ -1632,7 +1632,7 @@ var zh = class {
|
|
|
1632
1632
|
this.track.soloed = e;
|
|
1633
1633
|
}
|
|
1634
1634
|
dispose() {
|
|
1635
|
-
const e =
|
|
1635
|
+
const e = Ht();
|
|
1636
1636
|
if (this.effectsCleanup)
|
|
1637
1637
|
try {
|
|
1638
1638
|
this.effectsCleanup();
|
|
@@ -2150,7 +2150,7 @@ var Gh = Pc, Uh = class {
|
|
|
2150
2150
|
clearCompletionEvent() {
|
|
2151
2151
|
if (this._completionEventId !== null) {
|
|
2152
2152
|
try {
|
|
2153
|
-
|
|
2153
|
+
Ht().clear(this._completionEventId);
|
|
2154
2154
|
} catch (e) {
|
|
2155
2155
|
console.warn("[waveform-playlist] Error clearing Transport completion event:", e);
|
|
2156
2156
|
}
|
|
@@ -2198,7 +2198,7 @@ var Gh = Pc, Uh = class {
|
|
|
2198
2198
|
play(e, t, n) {
|
|
2199
2199
|
if (!this.isInitialized)
|
|
2200
2200
|
throw new Error("[waveform-playlist] TonePlayout not initialized. Call init() first.");
|
|
2201
|
-
const r = e ?? Ba(), o =
|
|
2201
|
+
const r = e ?? Ba(), o = Ht();
|
|
2202
2202
|
this.clearCompletionEvent();
|
|
2203
2203
|
const a = t ?? 0;
|
|
2204
2204
|
this.tracks.forEach((s) => {
|
|
@@ -2223,7 +2223,7 @@ var Gh = Pc, Uh = class {
|
|
|
2223
2223
|
}
|
|
2224
2224
|
}
|
|
2225
2225
|
pause() {
|
|
2226
|
-
const e =
|
|
2226
|
+
const e = Ht();
|
|
2227
2227
|
try {
|
|
2228
2228
|
e.pause();
|
|
2229
2229
|
} catch (t) {
|
|
@@ -2232,7 +2232,7 @@ var Gh = Pc, Uh = class {
|
|
|
2232
2232
|
this.tracks.forEach((t) => t.stopAllSources()), this.tracks.forEach((t) => t.cancelFades()), this.clearCompletionEvent();
|
|
2233
2233
|
}
|
|
2234
2234
|
stop() {
|
|
2235
|
-
const e =
|
|
2235
|
+
const e = Ht();
|
|
2236
2236
|
try {
|
|
2237
2237
|
e.stop();
|
|
2238
2238
|
} catch (t) {
|
|
@@ -2246,7 +2246,19 @@ var Gh = Pc, Uh = class {
|
|
|
2246
2246
|
}
|
|
2247
2247
|
this._loopHandler = null;
|
|
2248
2248
|
}
|
|
2249
|
-
this.tracks.forEach((t) =>
|
|
2249
|
+
this.tracks.forEach((t) => {
|
|
2250
|
+
try {
|
|
2251
|
+
t.stopAllSources();
|
|
2252
|
+
} catch (n) {
|
|
2253
|
+
console.warn(`[waveform-playlist] Error stopping sources for track "${t.id}":`, n);
|
|
2254
|
+
}
|
|
2255
|
+
}), this.tracks.forEach((t) => {
|
|
2256
|
+
try {
|
|
2257
|
+
t.cancelFades();
|
|
2258
|
+
} catch (n) {
|
|
2259
|
+
console.warn(`[waveform-playlist] Error canceling fades for track "${t.id}":`, n);
|
|
2260
|
+
}
|
|
2261
|
+
}), this.clearCompletionEvent();
|
|
2250
2262
|
}
|
|
2251
2263
|
setMasterGain(e) {
|
|
2252
2264
|
this.masterVolume.volume.value = this.gainToDb(e);
|
|
@@ -2277,7 +2289,7 @@ var Gh = Pc, Uh = class {
|
|
|
2277
2289
|
}
|
|
2278
2290
|
setLoop(e, t, n) {
|
|
2279
2291
|
this._loopEnabled = e, this._loopStart = t, this._loopEnd = n;
|
|
2280
|
-
const r =
|
|
2292
|
+
const r = Ht();
|
|
2281
2293
|
try {
|
|
2282
2294
|
r.loopStart = t, r.loopEnd = n, r.loop = e;
|
|
2283
2295
|
} catch (o) {
|
|
@@ -2299,19 +2311,16 @@ var Gh = Pc, Uh = class {
|
|
|
2299
2311
|
}, r.on("loop", this._loopHandler)) : !e && this._loopHandler && (r.off("loop", this._loopHandler), this._loopHandler = null);
|
|
2300
2312
|
}
|
|
2301
2313
|
getCurrentTime() {
|
|
2302
|
-
return
|
|
2314
|
+
return Ht().seconds;
|
|
2303
2315
|
}
|
|
2304
2316
|
seekTo(e) {
|
|
2305
|
-
|
|
2317
|
+
Ht().seconds = e;
|
|
2306
2318
|
}
|
|
2307
2319
|
dispose() {
|
|
2308
|
-
|
|
2309
|
-
|
|
2310
|
-
|
|
2311
|
-
|
|
2312
|
-
console.warn("[waveform-playlist] Error removing Transport loop handler:", e);
|
|
2313
|
-
}
|
|
2314
|
-
this._loopHandler = null;
|
|
2320
|
+
try {
|
|
2321
|
+
this.stop();
|
|
2322
|
+
} catch (e) {
|
|
2323
|
+
console.warn("[waveform-playlist] Error stopping Transport during dispose:", e);
|
|
2315
2324
|
}
|
|
2316
2325
|
if (this.tracks.forEach((e) => {
|
|
2317
2326
|
try {
|
|
@@ -3283,7 +3292,7 @@ var yp = Object.create, Jc = Object.defineProperty, bp = Object.getOwnPropertyDe
|
|
|
3283
3292
|
for (var s, i, l, c, u = t & 7, f = !1, p = !1, d = 2, h = eu[u + 5], m = e[d] || (e[d] = []), g = (o = o.prototype, bp(o, n)), v = r.length - 1; v >= 0; v--)
|
|
3284
3293
|
l = Cp(u, n, i = {}, e[3], m), l.static = f, l.private = p, c = l.access = { has: (y) => n in y }, c.get = (y) => y[n], s = (0, r[v])(g[h], l), i._ = 1, tu(s) && (g[h] = s);
|
|
3285
3294
|
return g && Jc(o, n, g), o;
|
|
3286
|
-
}, ru = (e, t, n) => t.has(e) || ea("Cannot " + n), Ip = (e, t, n) => (ru(e, t, "read from private field"), t.get(e)), Ap = (e, t, n) => t.has(e) ? ea("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(e) : t.set(e, n), Mp = (e, t, n, r) => (ru(e, t, "write to private field"), t.set(e, n), n),
|
|
3295
|
+
}, ru = (e, t, n) => t.has(e) || ea("Cannot " + n), Ip = (e, t, n) => (ru(e, t, "read from private field"), t.get(e)), Ap = (e, t, n) => t.has(e) ? ea("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(e) : t.set(e, n), Mp = (e, t, n, r) => (ru(e, t, "write to private field"), t.set(e, n), n), Bt = class qa {
|
|
3287
3296
|
/**
|
|
3288
3297
|
* @param {number} Coordinate of the point on the horizontal axis
|
|
3289
3298
|
* @param {number} Coordinate of the point on the vertical axis
|
|
@@ -3344,7 +3353,7 @@ var yp = Object.create, Jc = Object.defineProperty, bp = Object.getOwnPropertyDe
|
|
|
3344
3353
|
}
|
|
3345
3354
|
get center() {
|
|
3346
3355
|
const { left: t, top: n, right: r, bottom: o } = this;
|
|
3347
|
-
return new
|
|
3356
|
+
return new Bt((t + r) / 2, (n + o) / 2);
|
|
3348
3357
|
}
|
|
3349
3358
|
get area() {
|
|
3350
3359
|
const { width: t, height: n } = this;
|
|
@@ -3395,7 +3404,7 @@ var yp = Object.create, Jc = Object.defineProperty, bp = Object.getOwnPropertyDe
|
|
|
3395
3404
|
const i = r[s], l = s === "x" ? a.left : a.top, c = s === "x" ? a.width : a.height;
|
|
3396
3405
|
return i == "start" ? l : i == "end" ? l + c : l + c / 2;
|
|
3397
3406
|
};
|
|
3398
|
-
return
|
|
3407
|
+
return Bt.delta(
|
|
3399
3408
|
{ x: o(t, "x"), y: o(t, "y") },
|
|
3400
3409
|
{ x: o(n, "x"), y: o(n, "y") }
|
|
3401
3410
|
);
|
|
@@ -3410,11 +3419,11 @@ function Tp(e, t) {
|
|
|
3410
3419
|
}
|
|
3411
3420
|
var ou, au, Ja, vo, Vr, ta = class extends (Ja = sn, au = [Fe], ou = [Fe], Ja) {
|
|
3412
3421
|
constructor(t) {
|
|
3413
|
-
const n =
|
|
3414
|
-
super(n, (r, o) =>
|
|
3422
|
+
const n = Bt.from(t);
|
|
3423
|
+
super(n, (r, o) => Bt.equals(r, o)), Ep(Vr, 5, this), Ap(this, vo, 0), this.velocity = { x: 0, y: 0 };
|
|
3415
3424
|
}
|
|
3416
3425
|
get delta() {
|
|
3417
|
-
return
|
|
3426
|
+
return Bt.delta(this.current, this.initial);
|
|
3418
3427
|
}
|
|
3419
3428
|
get direction() {
|
|
3420
3429
|
const { current: t, previous: n } = this;
|
|
@@ -3429,7 +3438,7 @@ var ou, au, Ja, vo, Vr, ta = class extends (Ja = sn, au = [Fe], ou = [Fe], Ja) {
|
|
|
3429
3438
|
return super.current;
|
|
3430
3439
|
}
|
|
3431
3440
|
set current(t) {
|
|
3432
|
-
const { current: n } = this, r =
|
|
3441
|
+
const { current: n } = this, r = Bt.from(t), o = {
|
|
3433
3442
|
x: r.x - n.x,
|
|
3434
3443
|
y: r.y - n.y
|
|
3435
3444
|
}, a = Date.now(), s = a - Ip(this, vo), i = (l) => Math.round(l / s * 100);
|
|
@@ -3441,7 +3450,7 @@ var ou, au, Ja, vo, Vr, ta = class extends (Ja = sn, au = [Fe], ou = [Fe], Ja) {
|
|
|
3441
3450
|
});
|
|
3442
3451
|
}
|
|
3443
3452
|
reset(t = this.defaultValue) {
|
|
3444
|
-
super.reset(
|
|
3453
|
+
super.reset(Bt.from(t)), this.velocity = { x: 0, y: 0 };
|
|
3445
3454
|
}
|
|
3446
3455
|
};
|
|
3447
3456
|
Vr = kp(Ja);
|
|
@@ -4208,7 +4217,7 @@ var Ll = class {
|
|
|
4208
4217
|
}
|
|
4209
4218
|
this.map.value = /* @__PURE__ */ new Map();
|
|
4210
4219
|
}
|
|
4211
|
-
}, Au, Mu, Tu, $u, Du, Ru, ts, ut, qs, Js, Qs,
|
|
4220
|
+
}, Au, Mu, Tu, $u, Du, Ru, ts, ut, qs, Js, Qs, Vt = class extends (ts = ln, Ru = [be], Du = [be], $u = [be], Tu = [Fe], Mu = [Fe], Au = [Fe], ts) {
|
|
4212
4221
|
constructor(t, n) {
|
|
4213
4222
|
var r = t, { modifiers: o, type: a, sensors: s } = r, i = hu(r, ["modifiers", "type", "sensors"]);
|
|
4214
4223
|
super(i, n), se(ut, 5, this), ke(this, qs, se(ut, 8, this)), se(ut, 11, this), ke(this, Js, se(ut, 12, this)), se(ut, 15, this), ke(this, Qs, se(ut, 16, this, this.isDragSource ? "dragging" : "idle")), se(ut, 19, this), this.type = a, this.sensors = s, this.modifiers = o, this.alignment = i.alignment;
|
|
@@ -4228,14 +4237,14 @@ ut = tr(ts);
|
|
|
4228
4237
|
qs = /* @__PURE__ */ new WeakMap();
|
|
4229
4238
|
Js = /* @__PURE__ */ new WeakMap();
|
|
4230
4239
|
Qs = /* @__PURE__ */ new WeakMap();
|
|
4231
|
-
me(ut, 4, "type", Ru,
|
|
4232
|
-
me(ut, 4, "modifiers", Du,
|
|
4233
|
-
me(ut, 4, "status", $u,
|
|
4234
|
-
me(ut, 2, "isDropping", Tu,
|
|
4235
|
-
me(ut, 2, "isDragging", Mu,
|
|
4236
|
-
me(ut, 2, "isDragSource", Au,
|
|
4237
|
-
xn(ut,
|
|
4238
|
-
var Pu, Fu, Ou, Lu, Bu, Wu, ns, Ue, ei, ti, ni, ri, oi,
|
|
4240
|
+
me(ut, 4, "type", Ru, Vt, qs);
|
|
4241
|
+
me(ut, 4, "modifiers", Du, Vt, Js);
|
|
4242
|
+
me(ut, 4, "status", $u, Vt, Qs);
|
|
4243
|
+
me(ut, 2, "isDropping", Tu, Vt);
|
|
4244
|
+
me(ut, 2, "isDragging", Mu, Vt);
|
|
4245
|
+
me(ut, 2, "isDragSource", Au, Vt);
|
|
4246
|
+
xn(ut, Vt);
|
|
4247
|
+
var Pu, Fu, Ou, Lu, Bu, Wu, ns, Ue, ei, ti, ni, ri, oi, Nt = class extends (ns = ln, Wu = [be], Bu = [be], Lu = [be], Ou = [be], Fu = [be], Pu = [Fe], ns) {
|
|
4239
4248
|
constructor(t, n) {
|
|
4240
4249
|
var r = t, { accept: o, collisionDetector: a, collisionPriority: s, type: i } = r, l = hu(r, ["accept", "collisionDetector", "collisionPriority", "type"]);
|
|
4241
4250
|
super(l, n), se(Ue, 5, this), ke(this, ei, se(Ue, 8, this)), se(Ue, 11, this), ke(this, ti, se(Ue, 12, this)), se(Ue, 15, this), ke(this, ni, se(Ue, 16, this)), se(Ue, 19, this), ke(this, ri, se(Ue, 20, this)), se(Ue, 23, this), ke(this, oi, se(Ue, 24, this)), se(Ue, 27, this), this.accept = o, this.collisionDetector = a, this.collisionPriority = s, this.type = i;
|
|
@@ -4261,13 +4270,13 @@ ti = /* @__PURE__ */ new WeakMap();
|
|
|
4261
4270
|
ni = /* @__PURE__ */ new WeakMap();
|
|
4262
4271
|
ri = /* @__PURE__ */ new WeakMap();
|
|
4263
4272
|
oi = /* @__PURE__ */ new WeakMap();
|
|
4264
|
-
me(Ue, 4, "accept", Wu,
|
|
4265
|
-
me(Ue, 4, "type", Bu,
|
|
4266
|
-
me(Ue, 4, "collisionDetector", Lu,
|
|
4267
|
-
me(Ue, 4, "collisionPriority", Ou,
|
|
4268
|
-
me(Ue, 4, "shape", Fu,
|
|
4269
|
-
me(Ue, 2, "isDropTarget", Pu,
|
|
4270
|
-
xn(Ue,
|
|
4273
|
+
me(Ue, 4, "accept", Wu, Nt, ei);
|
|
4274
|
+
me(Ue, 4, "type", Bu, Nt, ti);
|
|
4275
|
+
me(Ue, 4, "collisionDetector", Lu, Nt, ni);
|
|
4276
|
+
me(Ue, 4, "collisionPriority", Ou, Nt, ri);
|
|
4277
|
+
me(Ue, 4, "shape", Fu, Nt, oi);
|
|
4278
|
+
me(Ue, 2, "isDropTarget", Pu, Nt);
|
|
4279
|
+
xn(Ue, Nt);
|
|
4271
4280
|
var Hn = class extends mt {
|
|
4272
4281
|
/**
|
|
4273
4282
|
* Creates a new sensor instance.
|
|
@@ -4348,9 +4357,9 @@ var Gn = class extends mt {
|
|
|
4348
4357
|
this.draggables = new Ll(), this.droppables = new Ll(), this.plugins = new Aa(e), this.sensors = new Aa(e), this.modifiers = new Aa(e);
|
|
4349
4358
|
}
|
|
4350
4359
|
register(e, t) {
|
|
4351
|
-
if (e instanceof
|
|
4360
|
+
if (e instanceof Vt)
|
|
4352
4361
|
return this.draggables.register(e.id, e);
|
|
4353
|
-
if (e instanceof
|
|
4362
|
+
if (e instanceof Nt)
|
|
4354
4363
|
return this.droppables.register(e.id, e);
|
|
4355
4364
|
if (e.prototype instanceof Gn)
|
|
4356
4365
|
return this.modifiers.register(e, t);
|
|
@@ -4362,7 +4371,7 @@ var Gn = class extends mt {
|
|
|
4362
4371
|
}
|
|
4363
4372
|
unregister(e) {
|
|
4364
4373
|
if (e instanceof ln)
|
|
4365
|
-
return e instanceof
|
|
4374
|
+
return e instanceof Vt ? this.draggables.unregister(e.id, e) : e instanceof Nt ? this.droppables.unregister(e.id, e) : () => {
|
|
4366
4375
|
};
|
|
4367
4376
|
if (e.prototype instanceof Gn)
|
|
4368
4377
|
return this.modifiers.unregister(e);
|
|
@@ -5448,7 +5457,7 @@ var Bm = ({
|
|
|
5448
5457
|
if (!t.shape)
|
|
5449
5458
|
return null;
|
|
5450
5459
|
if (t.shape.containsPoint(n)) {
|
|
5451
|
-
const o =
|
|
5460
|
+
const o = Bt.distance(t.shape.center, n);
|
|
5452
5461
|
return {
|
|
5453
5462
|
id: r,
|
|
5454
5463
|
value: 1 / o,
|
|
@@ -5466,7 +5475,7 @@ var Bm = ({
|
|
|
5466
5475
|
return null;
|
|
5467
5476
|
const r = n.current.intersectionArea(t.shape);
|
|
5468
5477
|
if (r) {
|
|
5469
|
-
const { position: o } = e, a =
|
|
5478
|
+
const { position: o } = e, a = Bt.distance(t.shape.center, o.current), i = r / (n.current.area + t.shape.area - r) / a;
|
|
5470
5479
|
return {
|
|
5471
5480
|
id: t.id,
|
|
5472
5481
|
value: i,
|
|
@@ -5767,14 +5776,14 @@ Ct(Yt, 2, "sourceRoot", vd, Mn);
|
|
|
5767
5776
|
Ct(Yt, 2, "targetRoot", gd, Mn);
|
|
5768
5777
|
Ct(Yt, 2, "roots", md, Mn);
|
|
5769
5778
|
An(Yt, Mn);
|
|
5770
|
-
var Zr = "data-dnd-", us = `${Zr}dropping`, rt = "--dnd-",
|
|
5771
|
-
|
|
5779
|
+
var Zr = "data-dnd-", us = `${Zr}dropping`, rt = "--dnd-", Lt = `${Zr}dragging`, No = `${Zr}placeholder`, og = [
|
|
5780
|
+
Lt,
|
|
5772
5781
|
No,
|
|
5773
5782
|
"popover",
|
|
5774
5783
|
"aria-pressed",
|
|
5775
5784
|
"aria-grabbing"
|
|
5776
5785
|
], ag = ["view-transition-name"], sg = `
|
|
5777
|
-
:is(:root,:host) [${
|
|
5786
|
+
:is(:root,:host) [${Lt}] {
|
|
5778
5787
|
position: fixed !important;
|
|
5779
5788
|
pointer-events: none !important;
|
|
5780
5789
|
touch-action: none;
|
|
@@ -5799,21 +5808,21 @@ var Zr = "data-dnd-", us = `${Zr}dropping`, rt = "--dnd-", Bt = `${Zr}dragging`,
|
|
|
5799
5808
|
visibility: hidden;
|
|
5800
5809
|
}
|
|
5801
5810
|
|
|
5802
|
-
[${
|
|
5811
|
+
[${Lt}] * {
|
|
5803
5812
|
pointer-events: none !important;
|
|
5804
5813
|
}
|
|
5805
5814
|
|
|
5806
|
-
[${
|
|
5815
|
+
[${Lt}]:not([${us}]) {
|
|
5807
5816
|
translate: var(${rt}translate) !important;
|
|
5808
5817
|
}
|
|
5809
5818
|
|
|
5810
|
-
[${
|
|
5819
|
+
[${Lt}][style*='${rt}scale'] {
|
|
5811
5820
|
scale: var(${rt}scale) !important;
|
|
5812
5821
|
transform-origin: var(${rt}transform-origin) !important;
|
|
5813
5822
|
}
|
|
5814
5823
|
|
|
5815
5824
|
@layer dnd-kit {
|
|
5816
|
-
:where([${
|
|
5825
|
+
:where([${Lt}][popover]) {
|
|
5817
5826
|
overflow: visible;
|
|
5818
5827
|
background: unset;
|
|
5819
5828
|
border: unset;
|
|
@@ -5827,7 +5836,7 @@ var Zr = "data-dnd-", us = `${Zr}dropping`, rt = "--dnd-", Bt = `${Zr}dragging`,
|
|
|
5827
5836
|
}
|
|
5828
5837
|
}
|
|
5829
5838
|
}
|
|
5830
|
-
[${
|
|
5839
|
+
[${Lt}]::backdrop, [${Zr}overlay]:not([${Lt}]) {
|
|
5831
5840
|
display: none;
|
|
5832
5841
|
visibility: hidden;
|
|
5833
5842
|
}
|
|
@@ -6123,7 +6132,7 @@ Ed = function() {
|
|
|
6123
6132
|
left: S + Me.x,
|
|
6124
6133
|
top: _ + Me.y
|
|
6125
6134
|
};
|
|
6126
|
-
d.setAttribute(
|
|
6135
|
+
d.setAttribute(Lt, "true");
|
|
6127
6136
|
const Ee = Ce(() => s.transform), B = (t = p.translate) != null ? t : { x: 0, y: 0 }, Y = Ee.x * h.scaleX + B.x, at = Ee.y * h.scaleY + B.y, Pe = ed();
|
|
6128
6137
|
C.set(
|
|
6129
6138
|
{
|
|
@@ -6183,7 +6192,7 @@ Ed = function() {
|
|
|
6183
6192
|
if (de?.disconnect(), qe?.disconnect(), st.disconnect(), ze.removeEventListener("resize", Ye), as(d) && (d.removeEventListener(
|
|
6184
6193
|
"beforetoggle",
|
|
6185
6194
|
Ul
|
|
6186
|
-
), d.removeAttribute("popover")), d.removeAttribute(
|
|
6195
|
+
), d.removeAttribute("popover")), d.removeAttribute(Lt), C.reset(), Xe && ds(u)) {
|
|
6187
6196
|
const je = Array.from(u.cells);
|
|
6188
6197
|
for (const [N, H] of je.entries())
|
|
6189
6198
|
H.style.width = (le = Xe[N]) != null ? le : "";
|
|
@@ -6211,7 +6220,7 @@ Ed = function() {
|
|
|
6211
6220
|
},
|
|
6212
6221
|
rt
|
|
6213
6222
|
), de?.takeRecords(), ve && ve !== Ge && te && !ae.length) {
|
|
6214
|
-
const ee =
|
|
6223
|
+
const ee = Bt.delta(H, te);
|
|
6215
6224
|
s.shape = Wr.from(
|
|
6216
6225
|
ve.boundingRectangle
|
|
6217
6226
|
).translate(
|
|
@@ -6900,7 +6909,7 @@ var zn = {
|
|
|
6900
6909
|
modifiers: r
|
|
6901
6910
|
}));
|
|
6902
6911
|
}
|
|
6903
|
-
}, Rd, Pd, Fd, ys, Rt, Ai, Mi, Ti, Hr = class extends (ys =
|
|
6912
|
+
}, Rd, Pd, Fd, ys, Rt, Ai, Mi, Ti, Hr = class extends (ys = Vt, Fd = [be], Pd = [be], Rd = [be], ys) {
|
|
6904
6913
|
constructor(e, t) {
|
|
6905
6914
|
var n = e, {
|
|
6906
6915
|
element: r,
|
|
@@ -6945,7 +6954,7 @@ Ct(Rt, 4, "handle", Fd, Hr, Ai);
|
|
|
6945
6954
|
Ct(Rt, 4, "element", Pd, Hr, Mi);
|
|
6946
6955
|
Ct(Rt, 4, "feedback", Rd, Hr, Ti);
|
|
6947
6956
|
An(Rt, Hr);
|
|
6948
|
-
var Od, Ld, bs, nn, $i, $a, Bd, Wd, Er, Di, Vd = class extends (bs =
|
|
6957
|
+
var Od, Ld, bs, nn, $i, $a, Bd, Wd, Er, Di, Vd = class extends (bs = Nt, Ld = [be], Od = [be], bs) {
|
|
6949
6958
|
constructor(e, t) {
|
|
6950
6959
|
var n = e, { element: r, effects: o = () => [] } = n, a = hd(n, ["element", "effects"]);
|
|
6951
6960
|
const { collisionDetector: s = Vm } = a, i = (c) => {
|
|
@@ -8326,7 +8335,7 @@ var rc = ({
|
|
|
8326
8335
|
}
|
|
8327
8336
|
)
|
|
8328
8337
|
] }) }),
|
|
8329
|
-
c && !u && !f && /* @__PURE__ */ ye(
|
|
8338
|
+
c && !u && !f && /* @__PURE__ */ ye(Wt, { children: [
|
|
8330
8339
|
/* @__PURE__ */ k(
|
|
8331
8340
|
nc,
|
|
8332
8341
|
{
|
|
@@ -8778,7 +8787,7 @@ var oc = O.div.attrs((e) => ({
|
|
|
8778
8787
|
},
|
|
8779
8788
|
[e, t, i, l, s]
|
|
8780
8789
|
);
|
|
8781
|
-
return h <= 0 ? null : /* @__PURE__ */ ye(
|
|
8790
|
+
return h <= 0 ? null : /* @__PURE__ */ ye(Wt, { children: [
|
|
8782
8791
|
/* @__PURE__ */ k(
|
|
8783
8792
|
Q0,
|
|
8784
8793
|
{
|
|
@@ -8927,7 +8936,7 @@ var ac = ({
|
|
|
8927
8936
|
return Q(() => {
|
|
8928
8937
|
const p = Zn(n, r);
|
|
8929
8938
|
l(p);
|
|
8930
|
-
}, [n, r, e]), /* @__PURE__ */ ye(
|
|
8939
|
+
}, [n, r, e]), /* @__PURE__ */ ye(Wt, { children: [
|
|
8931
8940
|
/* @__PURE__ */ k(h0, { as: "label", htmlFor: e, children: t }),
|
|
8932
8941
|
/* @__PURE__ */ k(
|
|
8933
8942
|
ef,
|
|
@@ -9276,7 +9285,7 @@ var pv = hv(), sc = ({
|
|
|
9276
9285
|
);
|
|
9277
9286
|
if (n === "both" && R) {
|
|
9278
9287
|
const A = Math.floor(v / 2);
|
|
9279
|
-
return /* @__PURE__ */ ye(
|
|
9288
|
+
return /* @__PURE__ */ ye(Wt, { children: [
|
|
9280
9289
|
/* @__PURE__ */ k(
|
|
9281
9290
|
sc,
|
|
9282
9291
|
{
|
|
@@ -12936,7 +12945,7 @@ const kf = We(null), Cf = We(null), xf = We(null), Ef = We(null), r1 = ({
|
|
|
12936
12945
|
masterVolumeRef: He,
|
|
12937
12946
|
onEngineState: Dt
|
|
12938
12947
|
} = ee, {
|
|
12939
|
-
selectionStart:
|
|
12948
|
+
selectionStart: zt,
|
|
12940
12949
|
selectionEnd: cn,
|
|
12941
12950
|
setSelection: un,
|
|
12942
12951
|
selectionStartRef: Ot,
|
|
@@ -12963,7 +12972,7 @@ const kf = We(null), Cf = We(null), xf = We(null), Ef = We(null), r1 = ({
|
|
|
12963
12972
|
[S]
|
|
12964
12973
|
), { cache: nl } = Ry(e, jf), rl = D((V) => {
|
|
12965
12974
|
Et.current = V, he(V);
|
|
12966
|
-
}, []),
|
|
12975
|
+
}, []), Zt = D((V) => {
|
|
12967
12976
|
J.current = V, M(V);
|
|
12968
12977
|
}, []), ol = D(() => {
|
|
12969
12978
|
const V = Ot.current ?? 0, G = dn.current ?? 0;
|
|
@@ -13172,7 +13181,7 @@ const kf = We(null), Cf = We(null), xf = We(null), Ef = We(null), r1 = ({
|
|
|
13172
13181
|
(Ie) => G >= Ie.start && G < Ie.end
|
|
13173
13182
|
);
|
|
13174
13183
|
if (Et.current)
|
|
13175
|
-
W && W.id !== J.current ?
|
|
13184
|
+
W && W.id !== J.current ? Zt(W.id) : !W && J.current !== null && Zt(null);
|
|
13176
13185
|
else if (J.current) {
|
|
13177
13186
|
const Ie = we.find(
|
|
13178
13187
|
($e) => $e.id === J.current
|
|
@@ -13182,7 +13191,7 @@ const kf = We(null), Cf = We(null), xf = We(null), Ef = We(null), r1 = ({
|
|
|
13182
13191
|
return;
|
|
13183
13192
|
}
|
|
13184
13193
|
} else
|
|
13185
|
-
W &&
|
|
13194
|
+
W && Zt(W.id);
|
|
13186
13195
|
}
|
|
13187
13196
|
if (bt.current && et.current && F > 0) {
|
|
13188
13197
|
const W = et.current, Ie = je.current, $e = G * Ie / Se.current, Te = W.clientWidth, no = Math.max(0, $e - Te / 2);
|
|
@@ -13193,13 +13202,13 @@ const kf = We(null), Cf = We(null), xf = We(null), Ef = We(null), r1 = ({
|
|
|
13193
13202
|
return;
|
|
13194
13203
|
}
|
|
13195
13204
|
if (G >= F) {
|
|
13196
|
-
B.current && B.current.stop(), A(!1), de.current = Pe.current, $(Pe.current),
|
|
13205
|
+
B.current && B.current.stop(), A(!1), de.current = Pe.current, $(Pe.current), Zt(null);
|
|
13197
13206
|
return;
|
|
13198
13207
|
}
|
|
13199
13208
|
ma(V);
|
|
13200
13209
|
};
|
|
13201
13210
|
ma(V);
|
|
13202
|
-
}, [F,
|
|
13211
|
+
}, [F, Zt, ma, $n]), wt = Qr;
|
|
13203
13212
|
Q(() => {
|
|
13204
13213
|
(async () => {
|
|
13205
13214
|
if (R && tl.current && B.current)
|
|
@@ -13247,8 +13256,8 @@ const kf = We(null), Cf = We(null), xf = We(null), Ef = We(null), r1 = ({
|
|
|
13247
13256
|
const V = $n();
|
|
13248
13257
|
B.current.pause(), A(!1), wt(), de.current = V, $(V);
|
|
13249
13258
|
}, [wt, $n]), il = D(() => {
|
|
13250
|
-
B.current && (B.current.stop(), A(!1), wt(), de.current = Pe.current, $(Pe.current),
|
|
13251
|
-
}, [wt,
|
|
13259
|
+
B.current && (B.current.stop(), A(!1), wt(), de.current = Pe.current, $(Pe.current), Zt(null));
|
|
13260
|
+
}, [wt, Zt]), ll = D(
|
|
13252
13261
|
(V) => {
|
|
13253
13262
|
const G = Math.max(0, Math.min(V, F));
|
|
13254
13263
|
de.current = G, $(G), R && B.current && to(G);
|
|
@@ -13335,7 +13344,7 @@ const kf = We(null), Cf = We(null), xf = We(null), Ef = We(null), r1 = ({
|
|
|
13335
13344
|
isLoopEnabled: qr,
|
|
13336
13345
|
annotations: C,
|
|
13337
13346
|
activeAnnotationId: E,
|
|
13338
|
-
selectionStart:
|
|
13347
|
+
selectionStart: zt,
|
|
13339
13348
|
selectionEnd: cn,
|
|
13340
13349
|
selectedTrackId: qi,
|
|
13341
13350
|
loopStart: Zi,
|
|
@@ -13349,7 +13358,7 @@ const kf = We(null), Cf = We(null), xf = We(null), Ef = We(null), r1 = ({
|
|
|
13349
13358
|
qr,
|
|
13350
13359
|
C,
|
|
13351
13360
|
E,
|
|
13352
|
-
|
|
13361
|
+
zt,
|
|
13353
13362
|
cn,
|
|
13354
13363
|
qi,
|
|
13355
13364
|
Zi,
|
|
@@ -13395,7 +13404,7 @@ const kf = We(null), Cf = We(null), xf = We(null), Ef = We(null), r1 = ({
|
|
|
13395
13404
|
setLinkEndpoints: Z,
|
|
13396
13405
|
setAnnotationsEditable: Me,
|
|
13397
13406
|
setAnnotations: ml,
|
|
13398
|
-
setActiveAnnotationId:
|
|
13407
|
+
setActiveAnnotationId: Zt,
|
|
13399
13408
|
// Loop controls
|
|
13400
13409
|
setLoopEnabled: Gi,
|
|
13401
13410
|
setLoopRegion: Jr,
|
|
@@ -13426,7 +13435,7 @@ const kf = We(null), Cf = We(null), xf = We(null), Ef = We(null), r1 = ({
|
|
|
13426
13435
|
Z,
|
|
13427
13436
|
Me,
|
|
13428
13437
|
ml,
|
|
13429
|
-
|
|
13438
|
+
Zt,
|
|
13430
13439
|
Gi,
|
|
13431
13440
|
Jr,
|
|
13432
13441
|
ol,
|
|
@@ -14328,7 +14337,7 @@ const Vy = O.div.attrs((e) => ({
|
|
|
14328
14337
|
v === "inverted" ? y = a.isSelected && l ? l.selectedWaveFillColor : l?.waveFillColor || "white" : y = a.isSelected && l ? l.selectedWaveOutlineColor : l?.waveOutlineColor || "grey";
|
|
14329
14338
|
const b = a.renderMode === "spectrogram" || a.renderMode === "both", w = a.renderMode === "piano-roll", _ = a.renderMode === "both", S = b ? "#000" : w ? l?.pianoRollBackgroundColor || "#1a1a2e" : an(y), C = Math.floor(c / 2), x = c, E = a.index * c, M = an(y);
|
|
14330
14339
|
return /* @__PURE__ */ ye(zy, { children: [
|
|
14331
|
-
_ ? /* @__PURE__ */ ye(
|
|
14340
|
+
_ ? /* @__PURE__ */ ye(Wt, { children: [
|
|
14332
14341
|
/* @__PURE__ */ k(
|
|
14333
14342
|
Fa,
|
|
14334
14343
|
{
|
|
@@ -14685,7 +14694,7 @@ const Gy = 60, Uy = O.div.attrs((e) => ({
|
|
|
14685
14694
|
"data-playlist-state": B ? "ready" : "loading",
|
|
14686
14695
|
trackControlsSlots: je,
|
|
14687
14696
|
timescaleGapHeight: ie > 0 ? ie + 1 : 0,
|
|
14688
|
-
timescale: ie > 0 ? /* @__PURE__ */ ye(
|
|
14697
|
+
timescale: ie > 0 ? /* @__PURE__ */ ye(Wt, { children: [
|
|
14689
14698
|
/* @__PURE__ */ k(gf, { renderTick: t }),
|
|
14690
14699
|
x && /* @__PURE__ */ k(
|
|
14691
14700
|
nv,
|
|
@@ -14703,7 +14712,7 @@ const Gy = 60, Uy = O.div.attrs((e) => ({
|
|
|
14703
14712
|
}
|
|
14704
14713
|
)
|
|
14705
14714
|
] }) : void 0,
|
|
14706
|
-
children: /* @__PURE__ */ ye(
|
|
14715
|
+
children: /* @__PURE__ */ ye(Wt, { children: [
|
|
14707
14716
|
q.map((N, H) => {
|
|
14708
14717
|
const te = re[H];
|
|
14709
14718
|
if (!te) return null;
|
|
@@ -14762,12 +14771,12 @@ const Gy = 60, Uy = O.div.attrs((e) => ({
|
|
|
14762
14771
|
'[role="button"][aria-roledescription="draggable"]'
|
|
14763
14772
|
) || ge(H);
|
|
14764
14773
|
},
|
|
14765
|
-
children: lt.data.map((Dt,
|
|
14766
|
-
const cn = Y?.spectrogramDataMap.get(ee.clipId), un = cn?.[
|
|
14774
|
+
children: lt.data.map((Dt, zt) => {
|
|
14775
|
+
const cn = Y?.spectrogramDataMap.get(ee.clipId), un = cn?.[zt] ?? cn?.[0], Ot = at.get(te.id), dn = Ot?.config;
|
|
14767
14776
|
return /* @__PURE__ */ k(
|
|
14768
14777
|
mc,
|
|
14769
14778
|
{
|
|
14770
|
-
index:
|
|
14779
|
+
index: zt,
|
|
14771
14780
|
data: Dt,
|
|
14772
14781
|
bits: lt.bits,
|
|
14773
14782
|
length: He,
|
|
@@ -14789,13 +14798,13 @@ const Gy = 60, Uy = O.div.attrs((e) => ({
|
|
|
14789
14798
|
spectrogramOnCanvasesReady: Y ? (Kr, qr) => {
|
|
14790
14799
|
Y.registerSpectrogramCanvases(
|
|
14791
14800
|
ee.clipId,
|
|
14792
|
-
|
|
14801
|
+
zt,
|
|
14793
14802
|
Kr,
|
|
14794
14803
|
qr
|
|
14795
14804
|
);
|
|
14796
14805
|
} : void 0
|
|
14797
14806
|
},
|
|
14798
|
-
`${ee.clipId}-${
|
|
14807
|
+
`${ee.clipId}-${zt}`
|
|
14799
14808
|
);
|
|
14800
14809
|
})
|
|
14801
14810
|
},
|
|
@@ -14945,7 +14954,7 @@ const Gy = 60, Uy = O.div.attrs((e) => ({
|
|
|
14945
14954
|
recordingState: v
|
|
14946
14955
|
}) => {
|
|
14947
14956
|
const { annotations: y } = vt(), b = Wy();
|
|
14948
|
-
return /* @__PURE__ */ ye(
|
|
14957
|
+
return /* @__PURE__ */ ye(Wt, { children: [
|
|
14949
14958
|
/* @__PURE__ */ k(
|
|
14950
14959
|
Yy,
|
|
14951
14960
|
{
|
|
@@ -15504,7 +15513,7 @@ const Yf = (e) => {
|
|
|
15504
15513
|
scrollContainerRef: U,
|
|
15505
15514
|
isSelecting: $,
|
|
15506
15515
|
timescale: w > 0 ? /* @__PURE__ */ k(gf, {}) : void 0,
|
|
15507
|
-
children: /* @__PURE__ */ ye(
|
|
15516
|
+
children: /* @__PURE__ */ ye(Wt, { children: [
|
|
15508
15517
|
v.map((Z, ie) => {
|
|
15509
15518
|
const Me = Z.length > 0 ? Math.max(...Z.map((fe) => fe.peaks.data.length)) : 1;
|
|
15510
15519
|
return /* @__PURE__ */ k(
|
|
@@ -15648,7 +15657,7 @@ const Yf = (e) => {
|
|
|
15648
15657
|
className: c
|
|
15649
15658
|
}) => {
|
|
15650
15659
|
const { annotations: u } = Wi();
|
|
15651
|
-
return /* @__PURE__ */ ye(
|
|
15660
|
+
return /* @__PURE__ */ ye(Wt, { children: [
|
|
15652
15661
|
/* @__PURE__ */ k(
|
|
15653
15662
|
Ib,
|
|
15654
15663
|
{
|