mulmocast 2.1.36 → 2.1.38
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/lib/actions/bundle.js +9 -1
- package/lib/methods/mulmo_studio_context.js +4 -6
- package/lib/types/index.d.ts +1 -0
- package/lib/types/index.js +1 -0
- package/lib/types/type.d.ts +0 -21
- package/lib/types/viewer.d.ts +39 -0
- package/lib/types/viewer.js +23 -0
- package/package.json +8 -8
package/lib/actions/bundle.js
CHANGED
|
@@ -71,7 +71,15 @@ export const mulmoViewerBundle = async (context, options = {}) => {
|
|
|
71
71
|
const sudioBeats = context.studio.beats[index];
|
|
72
72
|
const { duration, startAt } = sudioBeats;
|
|
73
73
|
// console.log(context.studio.beats[index]);
|
|
74
|
-
resultJson.push({
|
|
74
|
+
resultJson.push({
|
|
75
|
+
id: beat.id,
|
|
76
|
+
text: beat.text,
|
|
77
|
+
duration,
|
|
78
|
+
startTime: startAt,
|
|
79
|
+
endTime: (startAt ?? 0) + (duration ?? 0),
|
|
80
|
+
audioSources: {},
|
|
81
|
+
multiLinguals: {},
|
|
82
|
+
});
|
|
75
83
|
});
|
|
76
84
|
// audio
|
|
77
85
|
for (const lang of bundleTargetLang) {
|
|
@@ -60,19 +60,17 @@ export const MulmoStudioContextMethods = {
|
|
|
60
60
|
notifyStateChange(context, sessionType, result);
|
|
61
61
|
},
|
|
62
62
|
setBeatSessionState(context, sessionType, index, id, value) {
|
|
63
|
-
if (!sessionType) {
|
|
63
|
+
if (!sessionType || !Object.hasOwn(context.sessionState.inBeatSession, sessionType)) {
|
|
64
64
|
return;
|
|
65
65
|
}
|
|
66
66
|
const key = beatId(id, index);
|
|
67
|
+
const session = context.sessionState.inBeatSession[sessionType];
|
|
67
68
|
if (value) {
|
|
68
|
-
|
|
69
|
-
context.sessionState.inBeatSession[sessionType] = {};
|
|
70
|
-
}
|
|
71
|
-
context.sessionState.inBeatSession[sessionType][key] = true;
|
|
69
|
+
session[key] = true;
|
|
72
70
|
}
|
|
73
71
|
else {
|
|
74
72
|
// NOTE: Setting to false causes the parse error in rebuildStudio in preprocess.ts
|
|
75
|
-
delete
|
|
73
|
+
delete session[key];
|
|
76
74
|
}
|
|
77
75
|
notifyBeatStateChange(context, sessionType, key);
|
|
78
76
|
},
|
package/lib/types/index.d.ts
CHANGED
package/lib/types/index.js
CHANGED
package/lib/types/type.d.ts
CHANGED
|
@@ -143,24 +143,3 @@ export type PublicAPIArgs = {
|
|
|
143
143
|
callbacks?: CallbackFunction[];
|
|
144
144
|
};
|
|
145
145
|
export type ImageType = "image" | "movie";
|
|
146
|
-
export type MulmoViewerBeat = {
|
|
147
|
-
text?: string;
|
|
148
|
-
duration?: number;
|
|
149
|
-
startTime?: number;
|
|
150
|
-
endTime?: number;
|
|
151
|
-
importance?: number;
|
|
152
|
-
multiLinguals?: Record<string, string>;
|
|
153
|
-
audioSources?: Record<string, string | undefined>;
|
|
154
|
-
imageSource?: string;
|
|
155
|
-
videoSource?: string;
|
|
156
|
-
videoWithAudioSource?: string;
|
|
157
|
-
htmlImageSource?: string;
|
|
158
|
-
soundEffectSource?: string;
|
|
159
|
-
};
|
|
160
|
-
export type MulmoViewerData = {
|
|
161
|
-
beats: MulmoViewerBeat[];
|
|
162
|
-
bgmSource?: string;
|
|
163
|
-
bgmFile?: string;
|
|
164
|
-
title?: string;
|
|
165
|
-
lang?: string;
|
|
166
|
-
};
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const mulmoViewerBeatSchema: z.ZodObject<{
|
|
3
|
+
id: z.ZodOptional<z.ZodString>;
|
|
4
|
+
text: z.ZodOptional<z.ZodString>;
|
|
5
|
+
duration: z.ZodOptional<z.ZodNumber>;
|
|
6
|
+
startTime: z.ZodOptional<z.ZodNumber>;
|
|
7
|
+
endTime: z.ZodOptional<z.ZodNumber>;
|
|
8
|
+
importance: z.ZodOptional<z.ZodNumber>;
|
|
9
|
+
multiLinguals: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
10
|
+
audioSources: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodOptional<z.ZodString>>>;
|
|
11
|
+
imageSource: z.ZodOptional<z.ZodString>;
|
|
12
|
+
videoSource: z.ZodOptional<z.ZodString>;
|
|
13
|
+
videoWithAudioSource: z.ZodOptional<z.ZodString>;
|
|
14
|
+
htmlImageSource: z.ZodOptional<z.ZodString>;
|
|
15
|
+
soundEffectSource: z.ZodOptional<z.ZodString>;
|
|
16
|
+
}, z.core.$strip>;
|
|
17
|
+
export type MulmoViewerBeat = z.infer<typeof mulmoViewerBeatSchema>;
|
|
18
|
+
export declare const mulmoViewerDataSchema: z.ZodObject<{
|
|
19
|
+
beats: z.ZodArray<z.ZodObject<{
|
|
20
|
+
id: z.ZodOptional<z.ZodString>;
|
|
21
|
+
text: z.ZodOptional<z.ZodString>;
|
|
22
|
+
duration: z.ZodOptional<z.ZodNumber>;
|
|
23
|
+
startTime: z.ZodOptional<z.ZodNumber>;
|
|
24
|
+
endTime: z.ZodOptional<z.ZodNumber>;
|
|
25
|
+
importance: z.ZodOptional<z.ZodNumber>;
|
|
26
|
+
multiLinguals: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
27
|
+
audioSources: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodOptional<z.ZodString>>>;
|
|
28
|
+
imageSource: z.ZodOptional<z.ZodString>;
|
|
29
|
+
videoSource: z.ZodOptional<z.ZodString>;
|
|
30
|
+
videoWithAudioSource: z.ZodOptional<z.ZodString>;
|
|
31
|
+
htmlImageSource: z.ZodOptional<z.ZodString>;
|
|
32
|
+
soundEffectSource: z.ZodOptional<z.ZodString>;
|
|
33
|
+
}, z.core.$strip>>;
|
|
34
|
+
bgmSource: z.ZodOptional<z.ZodString>;
|
|
35
|
+
bgmFile: z.ZodOptional<z.ZodString>;
|
|
36
|
+
title: z.ZodOptional<z.ZodString>;
|
|
37
|
+
lang: z.ZodOptional<z.ZodString>;
|
|
38
|
+
}, z.core.$strip>;
|
|
39
|
+
export type MulmoViewerData = z.infer<typeof mulmoViewerDataSchema>;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export const mulmoViewerBeatSchema = z.object({
|
|
3
|
+
id: z.string().optional(),
|
|
4
|
+
text: z.string().optional(),
|
|
5
|
+
duration: z.number().optional(),
|
|
6
|
+
startTime: z.number().optional(),
|
|
7
|
+
endTime: z.number().optional(),
|
|
8
|
+
importance: z.number().optional(),
|
|
9
|
+
multiLinguals: z.record(z.string(), z.string()).optional(),
|
|
10
|
+
audioSources: z.record(z.string(), z.string().optional()).optional(),
|
|
11
|
+
imageSource: z.string().optional(),
|
|
12
|
+
videoSource: z.string().optional(),
|
|
13
|
+
videoWithAudioSource: z.string().optional(),
|
|
14
|
+
htmlImageSource: z.string().optional(),
|
|
15
|
+
soundEffectSource: z.string().optional(),
|
|
16
|
+
});
|
|
17
|
+
export const mulmoViewerDataSchema = z.object({
|
|
18
|
+
beats: z.array(mulmoViewerBeatSchema),
|
|
19
|
+
bgmSource: z.string().optional(),
|
|
20
|
+
bgmFile: z.string().optional(),
|
|
21
|
+
title: z.string().optional(),
|
|
22
|
+
lang: z.string().optional(),
|
|
23
|
+
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mulmocast",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.38",
|
|
4
4
|
"description": "",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "lib/index.node.js",
|
|
@@ -76,9 +76,9 @@
|
|
|
76
76
|
"homepage": "https://github.com/receptron/mulmocast-cli#readme",
|
|
77
77
|
"dependencies": {
|
|
78
78
|
"@google-cloud/text-to-speech": "^6.4.0",
|
|
79
|
-
"@google/genai": "^1.
|
|
79
|
+
"@google/genai": "^1.41.0",
|
|
80
80
|
"@graphai/anthropic_agent": "^2.0.12",
|
|
81
|
-
"@graphai/browserless_agent": "^2.0.
|
|
81
|
+
"@graphai/browserless_agent": "^2.0.2",
|
|
82
82
|
"@graphai/gemini_agent": "^2.0.5",
|
|
83
83
|
"@graphai/groq_agent": "^2.0.2",
|
|
84
84
|
"@graphai/input_agents": "^1.0.2",
|
|
@@ -92,12 +92,12 @@
|
|
|
92
92
|
"@mozilla/readability": "^0.6.0",
|
|
93
93
|
"@tavily/core": "^0.5.11",
|
|
94
94
|
"archiver": "^7.0.1",
|
|
95
|
-
"clipboardy": "^5.
|
|
96
|
-
"dotenv": "^17.
|
|
95
|
+
"clipboardy": "^5.3.0",
|
|
96
|
+
"dotenv": "^17.3.1",
|
|
97
97
|
"fluent-ffmpeg": "^2.1.3",
|
|
98
98
|
"graphai": "^2.0.16",
|
|
99
99
|
"jsdom": "^28.0.0",
|
|
100
|
-
"marked": "^17.0.
|
|
100
|
+
"marked": "^17.0.2",
|
|
101
101
|
"mulmocast-vision": "^1.0.8",
|
|
102
102
|
"ora": "^9.3.0",
|
|
103
103
|
"puppeteer": "^24.37.2",
|
|
@@ -117,12 +117,12 @@
|
|
|
117
117
|
"eslint": "^10.0.0",
|
|
118
118
|
"eslint-config-prettier": "^10.1.8",
|
|
119
119
|
"eslint-plugin-prettier": "^5.5.5",
|
|
120
|
-
"eslint-plugin-sonarjs": "^3.0.
|
|
120
|
+
"eslint-plugin-sonarjs": "^3.0.7",
|
|
121
121
|
"globals": "^17.3.0",
|
|
122
122
|
"prettier": "^3.8.1",
|
|
123
123
|
"tsx": "^4.21.0",
|
|
124
124
|
"typescript": "^5.9.3",
|
|
125
|
-
"typescript-eslint": "^8.
|
|
125
|
+
"typescript-eslint": "^8.55.0"
|
|
126
126
|
},
|
|
127
127
|
"engines": {
|
|
128
128
|
"node": ">=22.0.0"
|