@waveform-playlist/browser 17.0.0-next.2 → 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 +6 -6
package/dist/index.js
CHANGED
|
@@ -181,6 +181,9 @@ __export(index_exports, {
|
|
|
181
181
|
});
|
|
182
182
|
module.exports = __toCommonJS(index_exports);
|
|
183
183
|
|
|
184
|
+
// <define:__INSTALL_SPECS__>
|
|
185
|
+
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" };
|
|
186
|
+
|
|
184
187
|
// src/WaveformPlaylistContext.tsx
|
|
185
188
|
var import_react33 = require("react");
|
|
186
189
|
var import_styled_components = require("styled-components");
|
|
@@ -2357,8 +2360,20 @@ function useTrimPreview(inputs) {
|
|
|
2357
2360
|
var import_react28 = require("react");
|
|
2358
2361
|
var import_engine4 = require("@waveform-playlist/engine");
|
|
2359
2362
|
|
|
2363
|
+
// src/utils/installCommand.ts
|
|
2364
|
+
var BUILT_SPECS = typeof define_INSTALL_SPECS_default === "undefined" ? {} : define_INSTALL_SPECS_default;
|
|
2365
|
+
function formatInstallCommand(specs, names) {
|
|
2366
|
+
return "npm install " + names.map((name) => {
|
|
2367
|
+
var _a;
|
|
2368
|
+
return `"${(_a = specs[name]) != null ? _a : name}"`;
|
|
2369
|
+
}).join(" ");
|
|
2370
|
+
}
|
|
2371
|
+
function installCommand(...names) {
|
|
2372
|
+
return formatInstallCommand(BUILT_SPECS, names);
|
|
2373
|
+
}
|
|
2374
|
+
|
|
2360
2375
|
// src/playout/resolvePlayoutAdapter.ts
|
|
2361
|
-
var
|
|
2376
|
+
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`.";
|
|
2362
2377
|
function resolvePlayoutAdapter(opts) {
|
|
2363
2378
|
return __async(this, null, function* () {
|
|
2364
2379
|
if (opts.createAdapter) {
|
|
@@ -2371,7 +2386,7 @@ function resolvePlayoutAdapter(opts) {
|
|
|
2371
2386
|
console.warn(
|
|
2372
2387
|
"[waveform-playlist] @waveform-playlist/playout dynamic import failed: " + String(originalErr)
|
|
2373
2388
|
);
|
|
2374
|
-
throw new Error(
|
|
2389
|
+
throw new Error(installHint());
|
|
2375
2390
|
}
|
|
2376
2391
|
if (opts.sampleRate !== void 0) {
|
|
2377
2392
|
try {
|
|
@@ -3850,7 +3865,7 @@ var import_react34 = require("react");
|
|
|
3850
3865
|
var import_styled_components2 = require("styled-components");
|
|
3851
3866
|
|
|
3852
3867
|
// src/playout/resolveMediaElementPlayout.ts
|
|
3853
|
-
var
|
|
3868
|
+
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`.";
|
|
3854
3869
|
function resolveMediaElementPlayout(opts) {
|
|
3855
3870
|
return __async(this, null, function* () {
|
|
3856
3871
|
if (opts.createPlayout) {
|
|
@@ -3863,7 +3878,7 @@ function resolveMediaElementPlayout(opts) {
|
|
|
3863
3878
|
console.warn(
|
|
3864
3879
|
"[waveform-playlist] @waveform-playlist/media-element-playout dynamic import failed: " + String(originalErr)
|
|
3865
3880
|
);
|
|
3866
|
-
throw new Error(
|
|
3881
|
+
throw new Error(installHint2());
|
|
3867
3882
|
}
|
|
3868
3883
|
return new mod.MediaElementPlayout({
|
|
3869
3884
|
playbackRate: opts.playbackRate,
|
|
@@ -4798,7 +4813,7 @@ function useSpectrogramIntegration() {
|
|
|
4798
4813
|
const context = (0, import_react40.use)(SpectrogramIntegrationContext);
|
|
4799
4814
|
if (!context) {
|
|
4800
4815
|
throw new Error(
|
|
4801
|
-
"useSpectrogramIntegration must be used within <SpectrogramProvider>. Install @waveform-playlist/spectrogram and wrap your app with <SpectrogramProvider>."
|
|
4816
|
+
"useSpectrogramIntegration must be used within <SpectrogramProvider>. Install @waveform-playlist/spectrogram (" + installCommand("@waveform-playlist/spectrogram") + ") and wrap your app with <SpectrogramProvider>."
|
|
4802
4817
|
);
|
|
4803
4818
|
}
|
|
4804
4819
|
return context;
|
|
@@ -6803,7 +6818,7 @@ function useAnnotationIntegration() {
|
|
|
6803
6818
|
const context = (0, import_react59.use)(AnnotationIntegrationContext);
|
|
6804
6819
|
if (!context) {
|
|
6805
6820
|
throw new Error(
|
|
6806
|
-
"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"
|
|
6821
|
+
"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"
|
|
6807
6822
|
);
|
|
6808
6823
|
}
|
|
6809
6824
|
return context;
|
|
@@ -6952,7 +6967,7 @@ var AnnotationList = ({
|
|
|
6952
6967
|
if (annotations.length === 0) return null;
|
|
6953
6968
|
if (!integration) {
|
|
6954
6969
|
warnOnce(
|
|
6955
|
-
"<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"
|
|
6970
|
+
"<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"
|
|
6956
6971
|
);
|
|
6957
6972
|
return null;
|
|
6958
6973
|
}
|