@waveform-playlist/browser 17.0.0-next.1 → 17.0.0-next.3
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 +22 -7
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +22 -7
- package/dist/index.mjs.map +1 -1
- package/dist/tone.d.mts +0 -6
- package/dist/tone.d.ts +0 -6
- package/dist/tone.js +16 -1
- package/dist/tone.js.map +1 -1
- package/dist/tone.mjs +16 -1
- package/dist/tone.mjs.map +1 -1
- package/package.json +7 -5
package/dist/index.mjs
CHANGED
|
@@ -50,6 +50,9 @@ var __async = (__this, __arguments, generator) => {
|
|
|
50
50
|
});
|
|
51
51
|
};
|
|
52
52
|
|
|
53
|
+
// <define:__INSTALL_SPECS__>
|
|
54
|
+
var define_INSTALL_SPECS_default = { "@dawcore/wam": "@dawcore/wam@^0.0.5-next.0", "@dnd-kit/abstract": "@dnd-kit/abstract@^0.5.0", "@dnd-kit/dom": "@dnd-kit/dom@^0.5.0", "@dnd-kit/react": "@dnd-kit/react@^0.5.0", "@waveform-playlist/annotations": "@waveform-playlist/annotations@^14.0.0-next.2", "@waveform-playlist/media-element-playout": "@waveform-playlist/media-element-playout@^12.4.0-next.1", "@waveform-playlist/playout": "@waveform-playlist/playout@^13.0.0-next.1", "@waveform-playlist/recording": "@waveform-playlist/recording@^14.0.0-next.2", react: "react@^19.0.0", "react-dom": "react-dom@^19.0.0", "styled-components": "styled-components@^6.0.0", tone: "tone@^15.0.0", "@waveform-playlist/spectrogram": "@waveform-playlist/spectrogram@^15.0.0-next.1" };
|
|
55
|
+
|
|
53
56
|
// src/WaveformPlaylistContext.tsx
|
|
54
57
|
import {
|
|
55
58
|
useState as useState15,
|
|
@@ -2241,8 +2244,20 @@ import {
|
|
|
2241
2244
|
PlaylistEngine
|
|
2242
2245
|
} from "@waveform-playlist/engine";
|
|
2243
2246
|
|
|
2247
|
+
// src/utils/installCommand.ts
|
|
2248
|
+
var BUILT_SPECS = typeof define_INSTALL_SPECS_default === "undefined" ? {} : define_INSTALL_SPECS_default;
|
|
2249
|
+
function formatInstallCommand(specs, names) {
|
|
2250
|
+
return "npm install " + names.map((name) => {
|
|
2251
|
+
var _a;
|
|
2252
|
+
return `"${(_a = specs[name]) != null ? _a : name}"`;
|
|
2253
|
+
}).join(" ");
|
|
2254
|
+
}
|
|
2255
|
+
function installCommand(...names) {
|
|
2256
|
+
return formatInstallCommand(BUILT_SPECS, names);
|
|
2257
|
+
}
|
|
2258
|
+
|
|
2244
2259
|
// src/playout/resolvePlayoutAdapter.ts
|
|
2245
|
-
var
|
|
2260
|
+
var installHint = () => "@waveform-playlist/playout (and its peer `tone`) is required for the default WebAudio engine. Install with: " + installCommand("@waveform-playlist/playout", "tone") + " \u2014 or pass a custom `createAdapter`.";
|
|
2246
2261
|
function resolvePlayoutAdapter(opts) {
|
|
2247
2262
|
return __async(this, null, function* () {
|
|
2248
2263
|
if (opts.createAdapter) {
|
|
@@ -2255,7 +2270,7 @@ function resolvePlayoutAdapter(opts) {
|
|
|
2255
2270
|
console.warn(
|
|
2256
2271
|
"[waveform-playlist] @waveform-playlist/playout dynamic import failed: " + String(originalErr)
|
|
2257
2272
|
);
|
|
2258
|
-
throw new Error(
|
|
2273
|
+
throw new Error(installHint());
|
|
2259
2274
|
}
|
|
2260
2275
|
if (opts.sampleRate !== void 0) {
|
|
2261
2276
|
try {
|
|
@@ -3741,7 +3756,7 @@ import {
|
|
|
3741
3756
|
import { ThemeProvider as ThemeProvider2 } from "styled-components";
|
|
3742
3757
|
|
|
3743
3758
|
// src/playout/resolveMediaElementPlayout.ts
|
|
3744
|
-
var
|
|
3759
|
+
var installHint2 = () => "@waveform-playlist/media-element-playout is required for the default MediaElement engine. Install with: " + installCommand("@waveform-playlist/media-element-playout") + " \u2014 or pass a custom `createPlayout`.";
|
|
3745
3760
|
function resolveMediaElementPlayout(opts) {
|
|
3746
3761
|
return __async(this, null, function* () {
|
|
3747
3762
|
if (opts.createPlayout) {
|
|
@@ -3754,7 +3769,7 @@ function resolveMediaElementPlayout(opts) {
|
|
|
3754
3769
|
console.warn(
|
|
3755
3770
|
"[waveform-playlist] @waveform-playlist/media-element-playout dynamic import failed: " + String(originalErr)
|
|
3756
3771
|
);
|
|
3757
|
-
throw new Error(
|
|
3772
|
+
throw new Error(installHint2());
|
|
3758
3773
|
}
|
|
3759
3774
|
return new mod.MediaElementPlayout({
|
|
3760
3775
|
playbackRate: opts.playbackRate,
|
|
@@ -4703,7 +4718,7 @@ function useSpectrogramIntegration() {
|
|
|
4703
4718
|
const context = use2(SpectrogramIntegrationContext);
|
|
4704
4719
|
if (!context) {
|
|
4705
4720
|
throw new Error(
|
|
4706
|
-
"useSpectrogramIntegration must be used within <SpectrogramProvider>. Install @waveform-playlist/spectrogram and wrap your app with <SpectrogramProvider>."
|
|
4721
|
+
"useSpectrogramIntegration must be used within <SpectrogramProvider>. Install @waveform-playlist/spectrogram (" + installCommand("@waveform-playlist/spectrogram") + ") and wrap your app with <SpectrogramProvider>."
|
|
4707
4722
|
);
|
|
4708
4723
|
}
|
|
4709
4724
|
return context;
|
|
@@ -6758,7 +6773,7 @@ function useAnnotationIntegration() {
|
|
|
6758
6773
|
const context = use14(AnnotationIntegrationContext);
|
|
6759
6774
|
if (!context) {
|
|
6760
6775
|
throw new Error(
|
|
6761
|
-
"useAnnotationIntegration must be used within <AnnotationProvider>. Install @waveform-playlist/annotations and wrap your app with <AnnotationProvider>. See: https://naomiaro.github.io/waveform-playlist/docs/react/guides/annotations"
|
|
6776
|
+
"useAnnotationIntegration must be used within <AnnotationProvider>. Install @waveform-playlist/annotations (" + installCommand("@waveform-playlist/annotations") + ") and wrap your app with <AnnotationProvider>. See: https://naomiaro.github.io/waveform-playlist/docs/react/guides/annotations"
|
|
6762
6777
|
);
|
|
6763
6778
|
}
|
|
6764
6779
|
return context;
|
|
@@ -6907,7 +6922,7 @@ var AnnotationList = ({
|
|
|
6907
6922
|
if (annotations.length === 0) return null;
|
|
6908
6923
|
if (!integration) {
|
|
6909
6924
|
warnOnce(
|
|
6910
|
-
"<AnnotationList> draws nothing without the annotation components: install @waveform-playlist/annotations and render <AnnotationProvider> above it. See: https://naomiaro.github.io/waveform-playlist/docs/react/guides/annotations"
|
|
6925
|
+
"<AnnotationList> draws nothing without the annotation components: install @waveform-playlist/annotations (" + installCommand("@waveform-playlist/annotations") + ") and render <AnnotationProvider> above it. See: https://naomiaro.github.io/waveform-playlist/docs/react/guides/annotations"
|
|
6911
6926
|
);
|
|
6912
6927
|
return null;
|
|
6913
6928
|
}
|