@moises.ai/extension 1.0.2 → 1.0.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.d.ts +71 -20
- package/dist/index.js +102 -104
- package/package.json +1 -1
- package/src/client.d.ts +71 -20
- package/src/index.d.ts +71 -20
package/dist/index.d.ts
CHANGED
@@ -1,4 +1,51 @@
|
|
1
1
|
|
2
|
+
/** Link API for managing extension links */
|
3
|
+
export interface LinkApi {
|
4
|
+
|
5
|
+
/** Creates a context menu item for tracks */
|
6
|
+
trackContextMenu: (config: {
|
7
|
+
|
8
|
+
/** Display label for the menu item */
|
9
|
+
label: string;
|
10
|
+
}, onClick: {
|
11
|
+
|
12
|
+
/** Parameters passed to the onClick handler */
|
13
|
+
params: any;
|
14
|
+
}) => void;
|
15
|
+
|
16
|
+
/** Creates a context menu item for single track selections */
|
17
|
+
singleTrackSelectionContextMenu: (config: {
|
18
|
+
|
19
|
+
/** Display label for the menu item */
|
20
|
+
label: string;
|
21
|
+
}, onClick: {
|
22
|
+
|
23
|
+
/** Parameters passed to the onClick handler */
|
24
|
+
params: any;
|
25
|
+
}) => void;
|
26
|
+
|
27
|
+
/** Creates a button in the toolbar */
|
28
|
+
toolbarButton: (config: {
|
29
|
+
|
30
|
+
/** Display label for the button */
|
31
|
+
label: string;
|
32
|
+
|
33
|
+
/** Icon identifier for the button */
|
34
|
+
icon: string;
|
35
|
+
}, onClick: Function) => void;
|
36
|
+
|
37
|
+
/** Creates a button in the footer */
|
38
|
+
footerButton: (config: {
|
39
|
+
|
40
|
+
/** Display label for the button */
|
41
|
+
label: string;
|
42
|
+
|
43
|
+
/** Icon identifier for the button */
|
44
|
+
icon: string;
|
45
|
+
}, onClick: Function) => void;
|
46
|
+
}
|
47
|
+
|
48
|
+
|
2
49
|
/** Controlling common UI elements */
|
3
50
|
export interface UiApi {
|
4
51
|
|
@@ -285,10 +332,10 @@ export interface ComputeApi {
|
|
285
332
|
|
286
333
|
/** The target for the session player */
|
287
334
|
inpaintingTarget: any[];
|
288
|
-
}) => Promise<
|
335
|
+
}) => Promise<any>;
|
289
336
|
|
290
337
|
/** Gets the list of session player presets */
|
291
|
-
sessionPlayerPresets: () =>
|
338
|
+
sessionPlayerPresets: () => void;
|
292
339
|
|
293
340
|
/** Inpaints an audio file */
|
294
341
|
sessionPlayerInpaint: (params: {
|
@@ -298,7 +345,7 @@ export interface ComputeApi {
|
|
298
345
|
|
299
346
|
/** The mask for the inpainting */
|
300
347
|
mask: any;
|
301
|
-
}) => Promise<
|
348
|
+
}) => Promise<any>;
|
302
349
|
|
303
350
|
/** Runs a workflow */
|
304
351
|
workflow: (params: {
|
@@ -306,26 +353,36 @@ export interface ComputeApi {
|
|
306
353
|
/** The ID of the workflow to run */
|
307
354
|
workflowId: string;
|
308
355
|
|
309
|
-
/** The parameters for the workflow
|
356
|
+
/** The parameters for the workflow */
|
310
357
|
params: any;
|
311
|
-
}) => Promise<
|
358
|
+
}) => Promise<any>;
|
312
359
|
|
313
360
|
/** Runs an automix job */
|
314
361
|
automix: (params: {
|
315
362
|
|
316
|
-
/** The ID of the workflow to run
|
363
|
+
/** The ID of the workflow to run */
|
317
364
|
workflowId: string;
|
318
365
|
|
319
|
-
/** The parameters for the workflow
|
366
|
+
/** The parameters for the workflow */
|
320
367
|
params: any;
|
321
|
-
}) => Promise<
|
368
|
+
}) => Promise<any>;
|
369
|
+
|
370
|
+
/** Extracts stems from an audio file */
|
371
|
+
stems: (params: {
|
372
|
+
|
373
|
+
/** The input audio data */
|
374
|
+
input: string;
|
375
|
+
|
376
|
+
/** The stems to extract */
|
377
|
+
stemsToExtract: any[];
|
378
|
+
}) => Promise<any>;
|
322
379
|
|
323
380
|
/** Detects instruments in an audio file */
|
324
381
|
instruments: (params: {
|
325
382
|
|
326
383
|
/** The input audio data */
|
327
|
-
|
328
|
-
}) => Promise<
|
384
|
+
inputUrl: string;
|
385
|
+
}) => Promise<any>;
|
329
386
|
|
330
387
|
/** Detects chords in an audio file */
|
331
388
|
chords: (params: {
|
@@ -354,16 +411,6 @@ export interface ComputeApi {
|
|
354
411
|
/** The input audio data */
|
355
412
|
input: string;
|
356
413
|
}) => Promise<void>;
|
357
|
-
|
358
|
-
/** Extracts stems from an audio file */
|
359
|
-
stems: (params: {
|
360
|
-
|
361
|
-
/** The input audio data */
|
362
|
-
input: string;
|
363
|
-
|
364
|
-
/** The stems to extract */
|
365
|
-
stemsToExtract: any[];
|
366
|
-
}) => void;
|
367
414
|
}
|
368
415
|
|
369
416
|
|
@@ -379,6 +426,8 @@ export interface RegisterApi {
|
|
379
426
|
|
380
427
|
|
381
428
|
export interface MoisesAPI {
|
429
|
+
/** Link API for managing extension links */
|
430
|
+
link: LinkApi;
|
382
431
|
/** Controlling common UI elements */
|
383
432
|
ui: UiApi;
|
384
433
|
/** Session API for managing audio sessions, tracks, and playback controls */
|
@@ -422,6 +471,8 @@ export interface MoisesHook {
|
|
422
471
|
isConnected: boolean;
|
423
472
|
/** Modal layout component for plugin UI */
|
424
473
|
ModalLayout: (props: { children: any; width?: number; height?: number; }) => any;
|
474
|
+
/** Modal layout component for plugin UI */
|
475
|
+
SidebarLayout: (props: { children: any; width?: number; title?: string; }) => any;
|
425
476
|
}
|
426
477
|
|
427
478
|
export interface ExtensionOptions {
|
package/dist/index.js
CHANGED
@@ -1,134 +1,132 @@
|
|
1
|
-
import {
|
2
|
-
import {
|
3
|
-
import { M as
|
4
|
-
import { Box as m, HeaderPanel as
|
5
|
-
import { Cross1Icon as
|
6
|
-
function P(
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
1
|
+
import { jsxs as b, jsx as a } from "react/jsx-runtime";
|
2
|
+
import { useEffect as g, useState as k } from "react";
|
3
|
+
import { M as C, R as S } from "./client-BuA0RRm3.js";
|
4
|
+
import { Box as m, HeaderPanel as p } from "@moises.ai/design-system";
|
5
|
+
import { Cross1Icon as M } from "@moises.ai/design-system/icons";
|
6
|
+
function P({ state: r }) {
|
7
|
+
const { moises: n } = r;
|
8
|
+
function i({ children: s, title: c = "Sidebar Menu", width: u = "300" }) {
|
9
|
+
return g(() => {
|
10
|
+
n && n.ui.setPluginSize({ width: u, height: 0 });
|
11
|
+
}, [u, n]), /* @__PURE__ */ b(
|
12
|
+
m,
|
13
|
+
{
|
14
|
+
height: "100vh",
|
15
|
+
style: {
|
16
|
+
height: "100vh",
|
17
|
+
backgroundColor: "var(--gray-1)",
|
18
|
+
display: "flex",
|
19
|
+
flexDirection: "column",
|
20
|
+
overflow: "hidden"
|
21
|
+
},
|
22
|
+
children: [
|
23
|
+
/* @__PURE__ */ a(
|
24
|
+
m,
|
25
|
+
{
|
26
|
+
p: "4",
|
27
|
+
style: {
|
28
|
+
position: "sticky",
|
29
|
+
top: 0,
|
30
|
+
zIndex: 10,
|
31
|
+
backgroundColor: "var(--neutral-2)"
|
32
|
+
},
|
33
|
+
children: /* @__PURE__ */ a(p, { title: c, children: /* @__PURE__ */ a(
|
34
|
+
p.Button,
|
35
|
+
{
|
36
|
+
onClick: () => {
|
37
|
+
n.ui.close();
|
38
|
+
},
|
39
|
+
children: /* @__PURE__ */ a(M, {})
|
40
|
+
}
|
41
|
+
) })
|
42
|
+
}
|
43
|
+
),
|
44
|
+
/* @__PURE__ */ a(
|
45
|
+
m,
|
46
|
+
{
|
47
|
+
px: "4",
|
48
|
+
style: {
|
49
|
+
flex: 1,
|
50
|
+
overflowY: "auto",
|
51
|
+
backgroundColor: "var(--neutral-2)"
|
52
|
+
},
|
53
|
+
children: s
|
54
|
+
}
|
55
|
+
)
|
56
|
+
]
|
57
|
+
}
|
58
|
+
);
|
59
|
+
}
|
60
|
+
return i;
|
61
|
+
}
|
62
|
+
function z(r) {
|
63
|
+
r.id;
|
64
|
+
let n = null, i = !1;
|
65
|
+
function s() {
|
66
|
+
const [c, u] = k({
|
11
67
|
plugin: null,
|
12
|
-
isConnected:
|
68
|
+
isConnected: i,
|
13
69
|
moises: null
|
14
70
|
});
|
15
71
|
g(() => {
|
16
|
-
|
17
|
-
...
|
18
|
-
plugin:
|
19
|
-
moises:
|
72
|
+
n || (n = C(r), u((l) => ({
|
73
|
+
...l,
|
74
|
+
plugin: n.plugin,
|
75
|
+
moises: n
|
20
76
|
// The entire pluginInstance IS the moises API
|
21
77
|
})));
|
22
|
-
}, [
|
23
|
-
|
24
|
-
|
25
|
-
...
|
78
|
+
}, [r]), g(() => {
|
79
|
+
n && !i && n.connect().then(() => {
|
80
|
+
i = !0, u((l) => ({
|
81
|
+
...l,
|
26
82
|
isConnected: !0
|
27
83
|
}));
|
28
84
|
});
|
29
85
|
}, []);
|
30
|
-
|
31
|
-
|
86
|
+
const h = P({ state: c });
|
87
|
+
function o({ children: l, width: d, height: e }) {
|
88
|
+
const { moises: t } = c;
|
32
89
|
return g(() => {
|
33
|
-
|
34
|
-
}, [
|
90
|
+
t && t.ui.setPluginSize({ width: d, height: e });
|
91
|
+
}, [d, e, t]), /* @__PURE__ */ a("div", { height: "100vh", style: { height: "100vh", backgroundColor: "var(--gray-1)" }, children: /* @__PURE__ */ a("div", { p: "4", children: l }) });
|
35
92
|
}
|
36
93
|
return {
|
37
94
|
...c,
|
38
|
-
ModalLayout:
|
95
|
+
ModalLayout: o,
|
96
|
+
SidebarLayout: h
|
39
97
|
};
|
40
98
|
}
|
41
|
-
return
|
99
|
+
return s;
|
42
100
|
}
|
43
|
-
function I({ id:
|
44
|
-
const
|
45
|
-
id:
|
46
|
-
url:
|
101
|
+
function I({ id: r, url: n, exposedAPI: i, iframeRef: s, onRegisterMetadata: c, onRegisterLink: u }) {
|
102
|
+
const h = {
|
103
|
+
id: r,
|
104
|
+
url: n
|
47
105
|
};
|
48
|
-
|
49
|
-
const
|
50
|
-
target:
|
106
|
+
s.current && (s.current.src = n);
|
107
|
+
const o = new S({
|
108
|
+
target: s.current.contentWindow
|
51
109
|
});
|
52
|
-
|
110
|
+
o.on("register.extension", async (e) => {
|
53
111
|
c(e);
|
54
|
-
}),
|
55
|
-
const f = `link:${e}:${
|
56
|
-
return
|
112
|
+
}), o.on("register.link", async ({ category: e, options: t }) => {
|
113
|
+
const f = `link:${e}:${t.label}`;
|
114
|
+
return u({ id: f, category: e, options: t }), { id: f };
|
57
115
|
});
|
58
|
-
for (const [e,
|
59
|
-
for (const [f,
|
116
|
+
for (const [e, t] of Object.entries(i))
|
117
|
+
for (const [f, y] of Object.entries(t)) {
|
60
118
|
const v = `${e}.${f}`;
|
61
|
-
|
119
|
+
o.on(v, async (x) => await y(x));
|
62
120
|
}
|
63
|
-
function
|
64
|
-
return
|
121
|
+
function l(e, t) {
|
122
|
+
return o.call(e, t);
|
65
123
|
}
|
66
124
|
function d() {
|
67
|
-
|
125
|
+
o.disconnect();
|
68
126
|
}
|
69
|
-
return { plugin:
|
70
|
-
}
|
71
|
-
function B({
|
72
|
-
children: i,
|
73
|
-
init: t = {},
|
74
|
-
title: s = "Sidebar Menu",
|
75
|
-
width: r = "300px",
|
76
|
-
height: c = "600px"
|
77
|
-
}) {
|
78
|
-
const { moises: o } = P(t);
|
79
|
-
return g(() => {
|
80
|
-
o && o.ui.setPluginSize({ width: r, height: c });
|
81
|
-
}, [r, c, o]), /* @__PURE__ */ b(
|
82
|
-
m,
|
83
|
-
{
|
84
|
-
height: "100vh",
|
85
|
-
style: {
|
86
|
-
height: "100vh",
|
87
|
-
backgroundColor: "var(--gray-1)",
|
88
|
-
display: "flex",
|
89
|
-
flexDirection: "column",
|
90
|
-
overflow: "hidden"
|
91
|
-
},
|
92
|
-
children: [
|
93
|
-
/* @__PURE__ */ l(
|
94
|
-
m,
|
95
|
-
{
|
96
|
-
p: "4",
|
97
|
-
style: {
|
98
|
-
position: "sticky",
|
99
|
-
top: 0,
|
100
|
-
zIndex: 10,
|
101
|
-
backgroundColor: "var(--neutral-2)"
|
102
|
-
},
|
103
|
-
children: /* @__PURE__ */ l(h, { title: s, children: /* @__PURE__ */ l(
|
104
|
-
h.Button,
|
105
|
-
{
|
106
|
-
onClick: () => {
|
107
|
-
o.ui.close();
|
108
|
-
},
|
109
|
-
children: /* @__PURE__ */ l(S, {})
|
110
|
-
}
|
111
|
-
) })
|
112
|
-
}
|
113
|
-
),
|
114
|
-
/* @__PURE__ */ l(
|
115
|
-
m,
|
116
|
-
{
|
117
|
-
px: "4",
|
118
|
-
style: {
|
119
|
-
flex: 1,
|
120
|
-
overflowY: "auto",
|
121
|
-
backgroundColor: "var(--neutral-2)"
|
122
|
-
},
|
123
|
-
children: i
|
124
|
-
}
|
125
|
-
)
|
126
|
-
]
|
127
|
-
}
|
128
|
-
);
|
127
|
+
return { plugin: h, rpc: o, call: l, disconnect: d };
|
129
128
|
}
|
130
129
|
export {
|
131
130
|
I as MoisesExtensionHost,
|
132
|
-
|
133
|
-
P as initMoisesExtension
|
131
|
+
z as initMoisesExtension
|
134
132
|
};
|
package/package.json
CHANGED
package/src/client.d.ts
CHANGED
@@ -1,4 +1,51 @@
|
|
1
1
|
|
2
|
+
/** Link API for managing extension links */
|
3
|
+
export interface LinkApi {
|
4
|
+
|
5
|
+
/** Creates a context menu item for tracks */
|
6
|
+
trackContextMenu: (config: {
|
7
|
+
|
8
|
+
/** Display label for the menu item */
|
9
|
+
label: string;
|
10
|
+
}, onClick: {
|
11
|
+
|
12
|
+
/** Parameters passed to the onClick handler */
|
13
|
+
params: any;
|
14
|
+
}) => void;
|
15
|
+
|
16
|
+
/** Creates a context menu item for single track selections */
|
17
|
+
singleTrackSelectionContextMenu: (config: {
|
18
|
+
|
19
|
+
/** Display label for the menu item */
|
20
|
+
label: string;
|
21
|
+
}, onClick: {
|
22
|
+
|
23
|
+
/** Parameters passed to the onClick handler */
|
24
|
+
params: any;
|
25
|
+
}) => void;
|
26
|
+
|
27
|
+
/** Creates a button in the toolbar */
|
28
|
+
toolbarButton: (config: {
|
29
|
+
|
30
|
+
/** Display label for the button */
|
31
|
+
label: string;
|
32
|
+
|
33
|
+
/** Icon identifier for the button */
|
34
|
+
icon: string;
|
35
|
+
}, onClick: Function) => void;
|
36
|
+
|
37
|
+
/** Creates a button in the footer */
|
38
|
+
footerButton: (config: {
|
39
|
+
|
40
|
+
/** Display label for the button */
|
41
|
+
label: string;
|
42
|
+
|
43
|
+
/** Icon identifier for the button */
|
44
|
+
icon: string;
|
45
|
+
}, onClick: Function) => void;
|
46
|
+
}
|
47
|
+
|
48
|
+
|
2
49
|
/** Controlling common UI elements */
|
3
50
|
export interface UiApi {
|
4
51
|
|
@@ -285,10 +332,10 @@ export interface ComputeApi {
|
|
285
332
|
|
286
333
|
/** The target for the session player */
|
287
334
|
inpaintingTarget: any[];
|
288
|
-
}) => Promise<
|
335
|
+
}) => Promise<any>;
|
289
336
|
|
290
337
|
/** Gets the list of session player presets */
|
291
|
-
sessionPlayerPresets: () =>
|
338
|
+
sessionPlayerPresets: () => void;
|
292
339
|
|
293
340
|
/** Inpaints an audio file */
|
294
341
|
sessionPlayerInpaint: (params: {
|
@@ -298,7 +345,7 @@ export interface ComputeApi {
|
|
298
345
|
|
299
346
|
/** The mask for the inpainting */
|
300
347
|
mask: any;
|
301
|
-
}) => Promise<
|
348
|
+
}) => Promise<any>;
|
302
349
|
|
303
350
|
/** Runs a workflow */
|
304
351
|
workflow: (params: {
|
@@ -306,26 +353,36 @@ export interface ComputeApi {
|
|
306
353
|
/** The ID of the workflow to run */
|
307
354
|
workflowId: string;
|
308
355
|
|
309
|
-
/** The parameters for the workflow
|
356
|
+
/** The parameters for the workflow */
|
310
357
|
params: any;
|
311
|
-
}) => Promise<
|
358
|
+
}) => Promise<any>;
|
312
359
|
|
313
360
|
/** Runs an automix job */
|
314
361
|
automix: (params: {
|
315
362
|
|
316
|
-
/** The ID of the workflow to run
|
363
|
+
/** The ID of the workflow to run */
|
317
364
|
workflowId: string;
|
318
365
|
|
319
|
-
/** The parameters for the workflow
|
366
|
+
/** The parameters for the workflow */
|
320
367
|
params: any;
|
321
|
-
}) => Promise<
|
368
|
+
}) => Promise<any>;
|
369
|
+
|
370
|
+
/** Extracts stems from an audio file */
|
371
|
+
stems: (params: {
|
372
|
+
|
373
|
+
/** The input audio data */
|
374
|
+
input: string;
|
375
|
+
|
376
|
+
/** The stems to extract */
|
377
|
+
stemsToExtract: any[];
|
378
|
+
}) => Promise<any>;
|
322
379
|
|
323
380
|
/** Detects instruments in an audio file */
|
324
381
|
instruments: (params: {
|
325
382
|
|
326
383
|
/** The input audio data */
|
327
|
-
|
328
|
-
}) => Promise<
|
384
|
+
inputUrl: string;
|
385
|
+
}) => Promise<any>;
|
329
386
|
|
330
387
|
/** Detects chords in an audio file */
|
331
388
|
chords: (params: {
|
@@ -354,16 +411,6 @@ export interface ComputeApi {
|
|
354
411
|
/** The input audio data */
|
355
412
|
input: string;
|
356
413
|
}) => Promise<void>;
|
357
|
-
|
358
|
-
/** Extracts stems from an audio file */
|
359
|
-
stems: (params: {
|
360
|
-
|
361
|
-
/** The input audio data */
|
362
|
-
input: string;
|
363
|
-
|
364
|
-
/** The stems to extract */
|
365
|
-
stemsToExtract: any[];
|
366
|
-
}) => void;
|
367
414
|
}
|
368
415
|
|
369
416
|
|
@@ -379,6 +426,8 @@ export interface RegisterApi {
|
|
379
426
|
|
380
427
|
|
381
428
|
export interface MoisesAPI {
|
429
|
+
/** Link API for managing extension links */
|
430
|
+
link: LinkApi;
|
382
431
|
/** Controlling common UI elements */
|
383
432
|
ui: UiApi;
|
384
433
|
/** Session API for managing audio sessions, tracks, and playback controls */
|
@@ -422,6 +471,8 @@ export interface MoisesHook {
|
|
422
471
|
isConnected: boolean;
|
423
472
|
/** Modal layout component for plugin UI */
|
424
473
|
ModalLayout: (props: { children: any; width?: number; height?: number; }) => any;
|
474
|
+
/** Modal layout component for plugin UI */
|
475
|
+
SidebarLayout: (props: { children: any; width?: number; title?: string; }) => any;
|
425
476
|
}
|
426
477
|
|
427
478
|
export interface ExtensionOptions {
|
package/src/index.d.ts
CHANGED
@@ -1,4 +1,51 @@
|
|
1
1
|
|
2
|
+
/** Link API for managing extension links */
|
3
|
+
export interface LinkApi {
|
4
|
+
|
5
|
+
/** Creates a context menu item for tracks */
|
6
|
+
trackContextMenu: (config: {
|
7
|
+
|
8
|
+
/** Display label for the menu item */
|
9
|
+
label: string;
|
10
|
+
}, onClick: {
|
11
|
+
|
12
|
+
/** Parameters passed to the onClick handler */
|
13
|
+
params: any;
|
14
|
+
}) => void;
|
15
|
+
|
16
|
+
/** Creates a context menu item for single track selections */
|
17
|
+
singleTrackSelectionContextMenu: (config: {
|
18
|
+
|
19
|
+
/** Display label for the menu item */
|
20
|
+
label: string;
|
21
|
+
}, onClick: {
|
22
|
+
|
23
|
+
/** Parameters passed to the onClick handler */
|
24
|
+
params: any;
|
25
|
+
}) => void;
|
26
|
+
|
27
|
+
/** Creates a button in the toolbar */
|
28
|
+
toolbarButton: (config: {
|
29
|
+
|
30
|
+
/** Display label for the button */
|
31
|
+
label: string;
|
32
|
+
|
33
|
+
/** Icon identifier for the button */
|
34
|
+
icon: string;
|
35
|
+
}, onClick: Function) => void;
|
36
|
+
|
37
|
+
/** Creates a button in the footer */
|
38
|
+
footerButton: (config: {
|
39
|
+
|
40
|
+
/** Display label for the button */
|
41
|
+
label: string;
|
42
|
+
|
43
|
+
/** Icon identifier for the button */
|
44
|
+
icon: string;
|
45
|
+
}, onClick: Function) => void;
|
46
|
+
}
|
47
|
+
|
48
|
+
|
2
49
|
/** Controlling common UI elements */
|
3
50
|
export interface UiApi {
|
4
51
|
|
@@ -285,10 +332,10 @@ export interface ComputeApi {
|
|
285
332
|
|
286
333
|
/** The target for the session player */
|
287
334
|
inpaintingTarget: any[];
|
288
|
-
}) => Promise<
|
335
|
+
}) => Promise<any>;
|
289
336
|
|
290
337
|
/** Gets the list of session player presets */
|
291
|
-
sessionPlayerPresets: () =>
|
338
|
+
sessionPlayerPresets: () => void;
|
292
339
|
|
293
340
|
/** Inpaints an audio file */
|
294
341
|
sessionPlayerInpaint: (params: {
|
@@ -298,7 +345,7 @@ export interface ComputeApi {
|
|
298
345
|
|
299
346
|
/** The mask for the inpainting */
|
300
347
|
mask: any;
|
301
|
-
}) => Promise<
|
348
|
+
}) => Promise<any>;
|
302
349
|
|
303
350
|
/** Runs a workflow */
|
304
351
|
workflow: (params: {
|
@@ -306,26 +353,36 @@ export interface ComputeApi {
|
|
306
353
|
/** The ID of the workflow to run */
|
307
354
|
workflowId: string;
|
308
355
|
|
309
|
-
/** The parameters for the workflow
|
356
|
+
/** The parameters for the workflow */
|
310
357
|
params: any;
|
311
|
-
}) => Promise<
|
358
|
+
}) => Promise<any>;
|
312
359
|
|
313
360
|
/** Runs an automix job */
|
314
361
|
automix: (params: {
|
315
362
|
|
316
|
-
/** The ID of the workflow to run
|
363
|
+
/** The ID of the workflow to run */
|
317
364
|
workflowId: string;
|
318
365
|
|
319
|
-
/** The parameters for the workflow
|
366
|
+
/** The parameters for the workflow */
|
320
367
|
params: any;
|
321
|
-
}) => Promise<
|
368
|
+
}) => Promise<any>;
|
369
|
+
|
370
|
+
/** Extracts stems from an audio file */
|
371
|
+
stems: (params: {
|
372
|
+
|
373
|
+
/** The input audio data */
|
374
|
+
input: string;
|
375
|
+
|
376
|
+
/** The stems to extract */
|
377
|
+
stemsToExtract: any[];
|
378
|
+
}) => Promise<any>;
|
322
379
|
|
323
380
|
/** Detects instruments in an audio file */
|
324
381
|
instruments: (params: {
|
325
382
|
|
326
383
|
/** The input audio data */
|
327
|
-
|
328
|
-
}) => Promise<
|
384
|
+
inputUrl: string;
|
385
|
+
}) => Promise<any>;
|
329
386
|
|
330
387
|
/** Detects chords in an audio file */
|
331
388
|
chords: (params: {
|
@@ -354,16 +411,6 @@ export interface ComputeApi {
|
|
354
411
|
/** The input audio data */
|
355
412
|
input: string;
|
356
413
|
}) => Promise<void>;
|
357
|
-
|
358
|
-
/** Extracts stems from an audio file */
|
359
|
-
stems: (params: {
|
360
|
-
|
361
|
-
/** The input audio data */
|
362
|
-
input: string;
|
363
|
-
|
364
|
-
/** The stems to extract */
|
365
|
-
stemsToExtract: any[];
|
366
|
-
}) => void;
|
367
414
|
}
|
368
415
|
|
369
416
|
|
@@ -379,6 +426,8 @@ export interface RegisterApi {
|
|
379
426
|
|
380
427
|
|
381
428
|
export interface MoisesAPI {
|
429
|
+
/** Link API for managing extension links */
|
430
|
+
link: LinkApi;
|
382
431
|
/** Controlling common UI elements */
|
383
432
|
ui: UiApi;
|
384
433
|
/** Session API for managing audio sessions, tracks, and playback controls */
|
@@ -422,6 +471,8 @@ export interface MoisesHook {
|
|
422
471
|
isConnected: boolean;
|
423
472
|
/** Modal layout component for plugin UI */
|
424
473
|
ModalLayout: (props: { children: any; width?: number; height?: number; }) => any;
|
474
|
+
/** Modal layout component for plugin UI */
|
475
|
+
SidebarLayout: (props: { children: any; width?: number; title?: string; }) => any;
|
425
476
|
}
|
426
477
|
|
427
478
|
export interface ExtensionOptions {
|