mulmocast 0.0.23 → 0.0.24

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.
@@ -19,6 +19,7 @@
19
19
  }
20
20
  .caption {
21
21
  /* Text positioned at the bottom */
22
+ width: 80%;
22
23
  position: absolute;
23
24
  bottom: 0px;
24
25
  /* Enable text wrapping */
@@ -34,6 +35,7 @@
34
35
  padding-right: 10%;
35
36
  padding-top: 4px;
36
37
  background: rgba(0, 0, 0, 0.4);
38
+ ${styles}
37
39
  }
38
40
  </style>
39
41
  </head>
@@ -3,5 +3,5 @@ import type { CallbackFunction } from "graphai";
3
3
  import { MulmoStudioContext, MulmoBeat } from "../types/index.js";
4
4
  export declare const getBeatAudioPath: (text: string, context: MulmoStudioContext, beat: MulmoBeat, lang?: string) => string | undefined;
5
5
  export declare const audioFilePath: (context: MulmoStudioContext) => string;
6
- export declare const generateBeatAudio: (index: number, context: MulmoStudioContext, callbacks?: CallbackFunction[]) => Promise<void>;
7
- export declare const audio: (context: MulmoStudioContext, callbacks?: CallbackFunction[]) => Promise<MulmoStudioContext>;
6
+ export declare const generateBeatAudio: (index: number, context: MulmoStudioContext, settings?: Record<string, string>, callbacks?: CallbackFunction[]) => Promise<void>;
7
+ export declare const audio: (context: MulmoStudioContext, settings?: Record<string, string>, callbacks?: CallbackFunction[]) => Promise<MulmoStudioContext>;
@@ -1,6 +1,5 @@
1
1
  import "dotenv/config";
2
- import { GraphAI } from "graphai";
3
- import { TaskManager } from "graphai/lib/task_manager.js";
2
+ import { GraphAI, TaskManager } from "graphai";
4
3
  import * as agents from "@graphai/vanilla";
5
4
  import ttsNijivoiceAgent from "../agents/tts_nijivoice_agent.js";
6
5
  import addBGMAgent from "../agents/add_bgm_agent.js";
@@ -12,7 +11,7 @@ import { fileWriteAgent } from "@graphai/vanilla_node_agents";
12
11
  import { MulmoPresentationStyleMethods } from "../methods/index.js";
13
12
  import { fileCacheAgentFilter } from "../utils/filters.js";
14
13
  import { getAudioArtifactFilePath, getAudioFilePath, getOutputStudioFilePath, resolveDirPath, defaultBGMPath, mkdir, writingMessage } from "../utils/file.js";
15
- import { text2hash, localizedText } from "../utils/utils.js";
14
+ import { text2hash, localizedText, settings2GraphAIConfig } from "../utils/utils.js";
16
15
  import { MulmoStudioContextMethods } from "../methods/mulmo_studio_context.js";
17
16
  import { MulmoMediaSourceMethods } from "../methods/mulmo_media_source.js";
18
17
  const vanillaAgents = agents.default ?? agents;
@@ -200,7 +199,7 @@ const audioAgents = {
200
199
  addBGMAgent,
201
200
  combineAudioFilesAgent,
202
201
  };
203
- export const generateBeatAudio = async (index, context, callbacks) => {
202
+ export const generateBeatAudio = async (index, context, settings, callbacks) => {
204
203
  try {
205
204
  MulmoStudioContextMethods.setSessionState(context, "audio", true);
206
205
  const fileName = MulmoStudioContextMethods.getFileName(context);
@@ -209,8 +208,9 @@ export const generateBeatAudio = async (index, context, callbacks) => {
209
208
  const audioSegmentDirPath = resolveDirPath(audioDirPath, fileName);
210
209
  mkdir(outDirPath);
211
210
  mkdir(audioSegmentDirPath);
211
+ const config = settings2GraphAIConfig(settings);
212
212
  const taskManager = new TaskManager(getConcurrency(context));
213
- const graph = new GraphAI(graph_tts, audioAgents, { agentFilters, taskManager });
213
+ const graph = new GraphAI(graph_tts, audioAgents, { agentFilters, taskManager, config });
214
214
  graph.injectValue("__mapIndex", index);
215
215
  graph.injectValue("beat", context.studio.script.beats[index]);
216
216
  graph.injectValue("studioBeat", context.studio.beats[index]);
@@ -227,7 +227,7 @@ export const generateBeatAudio = async (index, context, callbacks) => {
227
227
  MulmoStudioContextMethods.setSessionState(context, "audio", false);
228
228
  }
229
229
  };
230
- export const audio = async (context, callbacks) => {
230
+ export const audio = async (context, settings, callbacks) => {
231
231
  try {
232
232
  MulmoStudioContextMethods.setSessionState(context, "audio", true);
233
233
  const fileName = MulmoStudioContextMethods.getFileName(context);
@@ -239,8 +239,9 @@ export const audio = async (context, callbacks) => {
239
239
  const outputStudioFilePath = getOutputStudioFilePath(outDirPath, fileName);
240
240
  mkdir(outDirPath);
241
241
  mkdir(audioSegmentDirPath);
242
+ const config = settings2GraphAIConfig(settings);
242
243
  const taskManager = new TaskManager(getConcurrency(context));
243
- const graph = new GraphAI(graph_data, audioAgents, { agentFilters, taskManager });
244
+ const graph = new GraphAI(graph_data, audioAgents, { agentFilters, taskManager, config });
244
245
  graph.injectValue("context", context);
245
246
  graph.injectValue("audioArtifactFilePath", audioArtifactFilePath);
246
247
  graph.injectValue("audioCombinedFilePath", audioCombinedFilePath);
@@ -1,3 +1,4 @@
1
+ import { mulmoCaptionParamsSchema } from "../types/index.js";
1
2
  import { GraphAI, GraphAILogger } from "graphai";
2
3
  import * as agents from "@graphai/vanilla";
3
4
  import { getHTMLFile, getCaptionImagePath } from "../utils/file.js";
@@ -23,22 +24,23 @@ const graph_data = {
23
24
  const { beat, context, index } = namedInputs;
24
25
  try {
25
26
  MulmoStudioContextMethods.setBeatSessionState(context, "caption", index, true);
26
- const caption = MulmoStudioContextMethods.getCaption(context);
27
+ const captionParams = mulmoCaptionParamsSchema.parse({ ...context.studio.script.captionParams, ...beat.captionParams });
27
28
  const canvasSize = MulmoPresentationStyleMethods.getCanvasSize(context.presentationStyle);
28
29
  const imagePath = getCaptionImagePath(context, index);
29
30
  const template = getHTMLFile("caption");
30
31
  const text = (() => {
31
32
  const multiLingual = context.multiLingual;
32
- if (caption && multiLingual) {
33
- return multiLingual[index].multiLingualTexts[caption].text;
33
+ if (captionParams.lang && multiLingual) {
34
+ return multiLingual[index].multiLingualTexts[captionParams.lang].text;
34
35
  }
35
- GraphAILogger.warn(`No multiLingual caption found for beat ${index}, lang: ${caption}`);
36
+ GraphAILogger.warn(`No multiLingual caption found for beat ${index}, lang: ${captionParams.lang}`);
36
37
  return beat.text;
37
38
  })();
38
39
  const htmlData = interpolate(template, {
39
40
  caption: text,
40
41
  width: `${canvasSize.width}`,
41
42
  height: `${canvasSize.height}`,
43
+ styles: captionParams.styles.join(";\n"),
42
44
  });
43
45
  await renderHTMLToImage(htmlData, imagePath, canvasSize.width, canvasSize.height, false, true);
44
46
  context.studio.beats[index].captionFile = imagePath;
@@ -32,11 +32,11 @@ export declare const imagePreprocessAgent: (namedInputs: {
32
32
  imagePath: string | undefined;
33
33
  referenceImage: string | undefined;
34
34
  htmlPrompt?: undefined;
35
- htmlSystemPrompt?: undefined;
35
+ htmlImageSystemPrompt?: undefined;
36
36
  } | {
37
37
  imagePath: string;
38
38
  htmlPrompt: string;
39
- htmlSystemPrompt: string[];
39
+ htmlImageSystemPrompt: string[];
40
40
  } | {
41
41
  imagePath: string;
42
42
  images: string[];
@@ -64,7 +64,7 @@ export declare const imagePreprocessAgent: (namedInputs: {
64
64
  };
65
65
  movieFile: string | undefined;
66
66
  htmlPrompt?: undefined;
67
- htmlSystemPrompt?: undefined;
67
+ htmlImageSystemPrompt?: undefined;
68
68
  } | {
69
69
  images: string[];
70
70
  imageParams: {
@@ -93,7 +93,7 @@ export declare const imagePreprocessAgent: (namedInputs: {
93
93
  referenceImage: string;
94
94
  prompt: string;
95
95
  htmlPrompt?: undefined;
96
- htmlSystemPrompt?: undefined;
96
+ htmlImageSystemPrompt?: undefined;
97
97
  }>;
98
98
  export declare const imagePluginAgent: (namedInputs: {
99
99
  context: MulmoStudioContext;
@@ -101,5 +101,5 @@ export declare const imagePluginAgent: (namedInputs: {
101
101
  index: number;
102
102
  }) => Promise<void>;
103
103
  export declare const getImageRefs: (context: MulmoStudioContext) => Promise<Record<string, string>>;
104
- export declare const images: (context: MulmoStudioContext, callbacks?: CallbackFunction[]) => Promise<MulmoStudioContext>;
105
- export declare const generateBeatImage: (index: number, context: MulmoStudioContext, callbacks?: CallbackFunction[]) => Promise<void>;
104
+ export declare const images: (context: MulmoStudioContext, settings?: Record<string, string>, callbacks?: CallbackFunction[]) => Promise<MulmoStudioContext>;
105
+ export declare const generateBeatImage: (index: number, context: MulmoStudioContext, settings?: Record<string, string>, callbacks?: CallbackFunction[]) => Promise<void>;
@@ -1,7 +1,6 @@
1
1
  import dotenv from "dotenv";
2
2
  import fs from "fs";
3
- import { GraphAI, GraphAILogger } from "graphai";
4
- import { TaskManager } from "graphai/lib/task_manager.js";
3
+ import { GraphAI, GraphAILogger, TaskManager } from "graphai";
5
4
  import * as agents from "@graphai/vanilla";
6
5
  import { openAIAgent } from "@graphai/openai_agent";
7
6
  import { anthropicAgent } from "@graphai/anthropic_agent";
@@ -11,7 +10,8 @@ import { fileCacheAgentFilter } from "../utils/filters.js";
11
10
  import { imageGoogleAgent, imageOpenaiAgent, movieGoogleAgent, movieReplicateAgent, mediaMockAgent } from "../agents/index.js";
12
11
  import { MulmoPresentationStyleMethods, MulmoStudioContextMethods } from "../methods/index.js";
13
12
  import { findImagePlugin } from "../utils/image_plugins/index.js";
14
- import { imagePrompt } from "../utils/prompt.js";
13
+ import { userAssert, settings2GraphAIConfig } from "../utils/utils.js";
14
+ import { imagePrompt, htmlImageSystemPrompt } from "../utils/prompt.js";
15
15
  import { defaultOpenAIImageModel } from "../utils/const.js";
16
16
  import { renderHTMLToImage } from "../utils/markdown.js";
17
17
  const vanillaAgents = agents.default ?? agents;
@@ -43,15 +43,7 @@ export const imagePreprocessAgent = async (namedInputs) => {
43
43
  }
44
44
  if (beat.htmlPrompt) {
45
45
  const htmlPrompt = beat.htmlPrompt.prompt + (beat.htmlPrompt.data ? "\n\n data\n" + JSON.stringify(beat.htmlPrompt.data, null, 2) : "");
46
- const htmlSystemPrompt = [
47
- "Based on the provided information, create a single slide HTML page using Tailwind CSS.",
48
- `The view port size is ${context.presentationStyle.canvasSize.width}x${context.presentationStyle.canvasSize.height}. Make sure the HTML fits within the view port.`,
49
- "If charts are needed, use Chart.js to present them in a clean and visually appealing way.",
50
- "Include a balanced mix of comments, graphs, and illustrations to enhance visual impact.",
51
- "Output only the HTML code. Do not include any comments, explanations, or additional information outside the HTML.",
52
- "If data is provided, use it effectively to populate the slide.",
53
- ];
54
- return { imagePath, htmlPrompt, htmlSystemPrompt };
46
+ return { imagePath, htmlPrompt, htmlImageSystemPrompt: htmlImageSystemPrompt(context.presentationStyle.canvasSize) };
55
47
  }
56
48
  // images for "edit_image"
57
49
  const images = (() => {
@@ -128,7 +120,7 @@ const beat_graph_data = {
128
120
  },
129
121
  inputs: {
130
122
  prompt: ":preprocessor.htmlPrompt",
131
- system: ":preprocessor.htmlSystemPrompt",
123
+ system: ":preprocessor.htmlImageSystemPrompt",
132
124
  },
133
125
  },
134
126
  htmlImageGenerator: {
@@ -297,7 +289,7 @@ const googleAuth = async () => {
297
289
  throw error;
298
290
  }
299
291
  };
300
- const graphOption = async (context) => {
292
+ const graphOption = async (context, settings) => {
301
293
  const agentFilters = [
302
294
  {
303
295
  name: "fileCacheAgentFilter",
@@ -311,21 +303,22 @@ const graphOption = async (context) => {
311
303
  taskManager,
312
304
  };
313
305
  const imageAgentInfo = MulmoPresentationStyleMethods.getImageAgentInfo(context.presentationStyle);
306
+ const config = settings2GraphAIConfig(settings);
314
307
  // We need to get google's auth token only if the google is the text2image provider.
315
308
  if (imageAgentInfo.provider === "google" || context.presentationStyle.movieParams?.provider === "google") {
309
+ userAssert(!!process.env.GOOGLE_PROJECT_ID, "GOOGLE_PROJECT_ID is not set");
316
310
  GraphAILogger.log("google was specified as text2image engine");
317
311
  const token = await googleAuth();
318
- options.config = {
319
- imageGoogleAgent: {
320
- projectId: process.env.GOOGLE_PROJECT_ID,
321
- token,
322
- },
323
- movieGoogleAgent: {
324
- projectId: process.env.GOOGLE_PROJECT_ID,
325
- token,
326
- },
312
+ config["imageGoogleAgent"] = {
313
+ projectId: process.env.GOOGLE_PROJECT_ID,
314
+ token,
315
+ };
316
+ config["movieGoogleAgent"] = {
317
+ projectId: process.env.GOOGLE_PROJECT_ID,
318
+ token,
327
319
  };
328
320
  }
321
+ options.config = config;
329
322
  return options;
330
323
  };
331
324
  // TODO: unit test
@@ -417,8 +410,8 @@ const getConcurrency = (context) => {
417
410
  }
418
411
  return 4;
419
412
  };
420
- const generateImages = async (context, callbacks) => {
421
- const options = await graphOption(context);
413
+ const generateImages = async (context, settings, callbacks) => {
414
+ const options = await graphOption(context, settings);
422
415
  const injections = await prepareGenerateImages(context);
423
416
  const graph = new GraphAI(graph_data, {
424
417
  ...vanillaAgents,
@@ -442,10 +435,10 @@ const generateImages = async (context, callbacks) => {
442
435
  const res = await graph.run();
443
436
  return res.mergeResult;
444
437
  };
445
- export const images = async (context, callbacks) => {
438
+ export const images = async (context, settings, callbacks) => {
446
439
  try {
447
440
  MulmoStudioContextMethods.setSessionState(context, "image", true);
448
- const newContext = await generateImages(context, callbacks);
441
+ const newContext = await generateImages(context, settings, callbacks);
449
442
  MulmoStudioContextMethods.setSessionState(context, "image", false);
450
443
  return newContext;
451
444
  }
@@ -454,8 +447,8 @@ export const images = async (context, callbacks) => {
454
447
  throw error;
455
448
  }
456
449
  };
457
- export const generateBeatImage = async (index, context, callbacks) => {
458
- const options = await graphOption(context);
450
+ export const generateBeatImage = async (index, context, settings, callbacks) => {
451
+ const options = await graphOption(context, settings);
459
452
  const injections = await prepareGenerateImages(context);
460
453
  const graph = new GraphAI(beat_graph_data, {
461
454
  ...vanillaAgents,
@@ -69,7 +69,8 @@ const getOutputOption = (audioId, videoId) => {
69
69
  "-b:a 128k", // Audio bitrate
70
70
  ];
71
71
  };
72
- const createVideo = async (audioArtifactFilePath, outputVideoPath, context, caption) => {
72
+ const createVideo = async (audioArtifactFilePath, outputVideoPath, context) => {
73
+ const caption = MulmoStudioContextMethods.getCaption(context);
73
74
  const start = performance.now();
74
75
  const ffmpegContext = FfmpegContextInit();
75
76
  const missingIndex = context.studio.beats.findIndex((beat) => !beat.imageFile && !beat.movieFile);
@@ -208,12 +209,11 @@ export const movieFilePath = (context) => {
208
209
  export const movie = async (context) => {
209
210
  MulmoStudioContextMethods.setSessionState(context, "video", true);
210
211
  try {
211
- const caption = MulmoStudioContextMethods.getCaption(context);
212
212
  const fileName = MulmoStudioContextMethods.getFileName(context);
213
213
  const outDirPath = MulmoStudioContextMethods.getOutDirPath(context);
214
214
  const audioArtifactFilePath = getAudioArtifactFilePath(outDirPath, fileName);
215
215
  const outputVideoPath = movieFilePath(context);
216
- if (await createVideo(audioArtifactFilePath, outputVideoPath, context, caption)) {
216
+ if (await createVideo(audioArtifactFilePath, outputVideoPath, context)) {
217
217
  writingMessage(outputVideoPath);
218
218
  }
219
219
  }
@@ -13,6 +13,8 @@ export declare const imageOpenaiAgent: AgentFunction<{
13
13
  }, {
14
14
  prompt: string;
15
15
  images: string[] | null | undefined;
16
+ }, {
17
+ apiKey?: string;
16
18
  }>;
17
19
  declare const imageOpenaiAgentInfo: AgentFunctionInfo;
18
20
  export default imageOpenaiAgentInfo;
@@ -4,9 +4,10 @@ import { GraphAILogger } from "graphai";
4
4
  import OpenAI, { toFile } from "openai";
5
5
  import { defaultOpenAIImageModel } from "../utils/const.js";
6
6
  // https://platform.openai.com/docs/guides/image-generation
7
- export const imageOpenaiAgent = async ({ namedInputs, params }) => {
7
+ export const imageOpenaiAgent = async ({ namedInputs, params, config }) => {
8
8
  const { prompt, images } = namedInputs;
9
- const { apiKey, moderation, canvasSize } = params;
9
+ const { moderation, canvasSize } = params;
10
+ const { apiKey } = { ...config };
10
11
  const model = params.model ?? defaultOpenAIImageModel;
11
12
  const openai = new OpenAI({ apiKey });
12
13
  const size = (() => {
@@ -1,8 +1,8 @@
1
1
  import { GraphAILogger } from "graphai";
2
- export const ttsElevenlabsAgent = async ({ namedInputs, params }) => {
2
+ export const ttsElevenlabsAgent = async ({ namedInputs, params, config }) => {
3
3
  const { text } = namedInputs;
4
4
  const { voice, model, stability, similarityBoost, suppressError } = params;
5
- const apiKey = process.env.ELEVENLABS_API_KEY;
5
+ const apiKey = config?.apiKey ?? process.env.ELEVENLABS_API_KEY;
6
6
  if (!apiKey) {
7
7
  throw new Error("ELEVENLABS_API_KEY environment variable is required");
8
8
  }
@@ -6,8 +6,9 @@ const errorMessage = [
6
6
  "1. Obtain an API key from Niji Voice (https://platform.nijivoice.com/) and set it as the NIJIVOICE_API_KEY environment variable.",
7
7
  '2. Use OpenAI\'s TTS instead of Niji Voice by changing speechParams.provider from "nijivoice" to "openai".',
8
8
  ].join("\n");
9
- export const ttsNijivoiceAgent = async ({ params, namedInputs }) => {
10
- const { apiKey, suppressError, voice, speed, speed_global } = params;
9
+ export const ttsNijivoiceAgent = async ({ params, namedInputs, config }) => {
10
+ const { suppressError, voice, speed, speed_global } = params;
11
+ const { apiKey } = config ?? {};
11
12
  const { text } = namedInputs;
12
13
  assert(apiKey ?? nijovoiceApiKey, errorMessage);
13
14
  const url = `https://api.nijivoice.com/api/platform/v1/voice-actors/${voice}/generate-voice`;
@@ -1,8 +1,9 @@
1
1
  import { GraphAILogger } from "graphai";
2
2
  import OpenAI from "openai";
3
- export const ttsOpenaiAgent = async ({ namedInputs, params }) => {
3
+ export const ttsOpenaiAgent = async ({ namedInputs, params, config }) => {
4
4
  const { text } = namedInputs;
5
- const { apiKey, model, voice, suppressError, instructions } = params;
5
+ const { model, voice, suppressError, instructions } = params;
6
+ const { apiKey } = config ?? {};
6
7
  const openai = new OpenAI({ apiKey });
7
8
  try {
8
9
  const tts_options = {
@@ -260,31 +260,13 @@ export declare const mulmoTextSlideMediaSchema: z.ZodObject<{
260
260
  }>;
261
261
  export declare const mulmoCaptionParamsSchema: z.ZodObject<{
262
262
  lang: z.ZodOptional<z.ZodString>;
263
- textColor: z.ZodDefault<z.ZodString>;
264
- backgroundColor: z.ZodDefault<z.ZodString>;
265
- fontSize: z.ZodDefault<z.ZodNumber>;
266
- fontFamily: z.ZodDefault<z.ZodString>;
267
- fontWeight: z.ZodDefault<z.ZodString>;
268
- textAlign: z.ZodDefault<z.ZodString>;
269
- textDecoration: z.ZodDefault<z.ZodString>;
263
+ styles: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
270
264
  }, "strict", z.ZodTypeAny, {
271
- textColor: string;
272
- backgroundColor: string;
273
- fontSize: number;
274
- fontFamily: string;
275
- fontWeight: string;
276
- textAlign: string;
277
- textDecoration: string;
265
+ styles: string[];
278
266
  lang?: string | undefined;
279
267
  }, {
280
268
  lang?: string | undefined;
281
- textColor?: string | undefined;
282
- backgroundColor?: string | undefined;
283
- fontSize?: number | undefined;
284
- fontFamily?: string | undefined;
285
- fontWeight?: string | undefined;
286
- textAlign?: string | undefined;
287
- textDecoration?: string | undefined;
269
+ styles?: string[] | undefined;
288
270
  }>;
289
271
  export declare const mulmoChartMediaSchema: z.ZodObject<{
290
272
  type: z.ZodLiteral<"chart">;
@@ -1904,31 +1886,13 @@ export declare const mulmoBeatSchema: z.ZodObject<{
1904
1886
  }>>;
1905
1887
  captionParams: z.ZodOptional<z.ZodObject<{
1906
1888
  lang: z.ZodOptional<z.ZodString>;
1907
- textColor: z.ZodDefault<z.ZodString>;
1908
- backgroundColor: z.ZodDefault<z.ZodString>;
1909
- fontSize: z.ZodDefault<z.ZodNumber>;
1910
- fontFamily: z.ZodDefault<z.ZodString>;
1911
- fontWeight: z.ZodDefault<z.ZodString>;
1912
- textAlign: z.ZodDefault<z.ZodString>;
1913
- textDecoration: z.ZodDefault<z.ZodString>;
1889
+ styles: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
1914
1890
  }, "strict", z.ZodTypeAny, {
1915
- textColor: string;
1916
- backgroundColor: string;
1917
- fontSize: number;
1918
- fontFamily: string;
1919
- fontWeight: string;
1920
- textAlign: string;
1921
- textDecoration: string;
1891
+ styles: string[];
1922
1892
  lang?: string | undefined;
1923
1893
  }, {
1924
1894
  lang?: string | undefined;
1925
- textColor?: string | undefined;
1926
- backgroundColor?: string | undefined;
1927
- fontSize?: number | undefined;
1928
- fontFamily?: string | undefined;
1929
- fontWeight?: string | undefined;
1930
- textAlign?: string | undefined;
1931
- textDecoration?: string | undefined;
1895
+ styles?: string[] | undefined;
1932
1896
  }>>;
1933
1897
  imageNames: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1934
1898
  imagePrompt: z.ZodOptional<z.ZodString>;
@@ -2116,13 +2080,7 @@ export declare const mulmoBeatSchema: z.ZodObject<{
2116
2080
  cssStyles: string | string[];
2117
2081
  } | undefined;
2118
2082
  captionParams?: {
2119
- textColor: string;
2120
- backgroundColor: string;
2121
- fontSize: number;
2122
- fontFamily: string;
2123
- fontWeight: string;
2124
- textAlign: string;
2125
- textDecoration: string;
2083
+ styles: string[];
2126
2084
  lang?: string | undefined;
2127
2085
  } | undefined;
2128
2086
  imageNames?: string[] | undefined;
@@ -2302,13 +2260,7 @@ export declare const mulmoBeatSchema: z.ZodObject<{
2302
2260
  } | undefined;
2303
2261
  captionParams?: {
2304
2262
  lang?: string | undefined;
2305
- textColor?: string | undefined;
2306
- backgroundColor?: string | undefined;
2307
- fontSize?: number | undefined;
2308
- fontFamily?: string | undefined;
2309
- fontWeight?: string | undefined;
2310
- textAlign?: string | undefined;
2311
- textDecoration?: string | undefined;
2263
+ styles?: string[] | undefined;
2312
2264
  } | undefined;
2313
2265
  imageNames?: string[] | undefined;
2314
2266
  imagePrompt?: string | undefined;
@@ -2707,31 +2659,13 @@ export declare const mulmoPresentationStyleSchema: z.ZodObject<{
2707
2659
  }>>;
2708
2660
  captionParams: z.ZodOptional<z.ZodObject<{
2709
2661
  lang: z.ZodOptional<z.ZodString>;
2710
- textColor: z.ZodDefault<z.ZodString>;
2711
- backgroundColor: z.ZodDefault<z.ZodString>;
2712
- fontSize: z.ZodDefault<z.ZodNumber>;
2713
- fontFamily: z.ZodDefault<z.ZodString>;
2714
- fontWeight: z.ZodDefault<z.ZodString>;
2715
- textAlign: z.ZodDefault<z.ZodString>;
2716
- textDecoration: z.ZodDefault<z.ZodString>;
2662
+ styles: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
2717
2663
  }, "strict", z.ZodTypeAny, {
2718
- textColor: string;
2719
- backgroundColor: string;
2720
- fontSize: number;
2721
- fontFamily: string;
2722
- fontWeight: string;
2723
- textAlign: string;
2724
- textDecoration: string;
2664
+ styles: string[];
2725
2665
  lang?: string | undefined;
2726
2666
  }, {
2727
2667
  lang?: string | undefined;
2728
- textColor?: string | undefined;
2729
- backgroundColor?: string | undefined;
2730
- fontSize?: number | undefined;
2731
- fontFamily?: string | undefined;
2732
- fontWeight?: string | undefined;
2733
- textAlign?: string | undefined;
2734
- textDecoration?: string | undefined;
2668
+ styles?: string[] | undefined;
2735
2669
  }>>;
2736
2670
  audioParams: z.ZodDefault<z.ZodObject<{
2737
2671
  padding: z.ZodDefault<z.ZodNumber>;
@@ -2901,13 +2835,7 @@ export declare const mulmoPresentationStyleSchema: z.ZodObject<{
2901
2835
  cssStyles: string | string[];
2902
2836
  } | undefined;
2903
2837
  captionParams?: {
2904
- textColor: string;
2905
- backgroundColor: string;
2906
- fontSize: number;
2907
- fontFamily: string;
2908
- fontWeight: string;
2909
- textAlign: string;
2910
- textDecoration: string;
2838
+ styles: string[];
2911
2839
  lang?: string | undefined;
2912
2840
  } | undefined;
2913
2841
  }, {
@@ -2978,13 +2906,7 @@ export declare const mulmoPresentationStyleSchema: z.ZodObject<{
2978
2906
  } | undefined;
2979
2907
  captionParams?: {
2980
2908
  lang?: string | undefined;
2981
- textColor?: string | undefined;
2982
- backgroundColor?: string | undefined;
2983
- fontSize?: number | undefined;
2984
- fontFamily?: string | undefined;
2985
- fontWeight?: string | undefined;
2986
- textAlign?: string | undefined;
2987
- textDecoration?: string | undefined;
2909
+ styles?: string[] | undefined;
2988
2910
  } | undefined;
2989
2911
  canvasSize?: {
2990
2912
  width: number;
@@ -3276,31 +3198,13 @@ export declare const mulmoScriptSchema: z.ZodObject<{
3276
3198
  }>>;
3277
3199
  captionParams: z.ZodOptional<z.ZodObject<{
3278
3200
  lang: z.ZodOptional<z.ZodString>;
3279
- textColor: z.ZodDefault<z.ZodString>;
3280
- backgroundColor: z.ZodDefault<z.ZodString>;
3281
- fontSize: z.ZodDefault<z.ZodNumber>;
3282
- fontFamily: z.ZodDefault<z.ZodString>;
3283
- fontWeight: z.ZodDefault<z.ZodString>;
3284
- textAlign: z.ZodDefault<z.ZodString>;
3285
- textDecoration: z.ZodDefault<z.ZodString>;
3201
+ styles: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
3286
3202
  }, "strict", z.ZodTypeAny, {
3287
- textColor: string;
3288
- backgroundColor: string;
3289
- fontSize: number;
3290
- fontFamily: string;
3291
- fontWeight: string;
3292
- textAlign: string;
3293
- textDecoration: string;
3203
+ styles: string[];
3294
3204
  lang?: string | undefined;
3295
3205
  }, {
3296
3206
  lang?: string | undefined;
3297
- textColor?: string | undefined;
3298
- backgroundColor?: string | undefined;
3299
- fontSize?: number | undefined;
3300
- fontFamily?: string | undefined;
3301
- fontWeight?: string | undefined;
3302
- textAlign?: string | undefined;
3303
- textDecoration?: string | undefined;
3207
+ styles?: string[] | undefined;
3304
3208
  }>>;
3305
3209
  audioParams: z.ZodDefault<z.ZodObject<{
3306
3210
  padding: z.ZodDefault<z.ZodNumber>;
@@ -4090,31 +3994,13 @@ export declare const mulmoScriptSchema: z.ZodObject<{
4090
3994
  }>>;
4091
3995
  captionParams: z.ZodOptional<z.ZodObject<{
4092
3996
  lang: z.ZodOptional<z.ZodString>;
4093
- textColor: z.ZodDefault<z.ZodString>;
4094
- backgroundColor: z.ZodDefault<z.ZodString>;
4095
- fontSize: z.ZodDefault<z.ZodNumber>;
4096
- fontFamily: z.ZodDefault<z.ZodString>;
4097
- fontWeight: z.ZodDefault<z.ZodString>;
4098
- textAlign: z.ZodDefault<z.ZodString>;
4099
- textDecoration: z.ZodDefault<z.ZodString>;
3997
+ styles: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
4100
3998
  }, "strict", z.ZodTypeAny, {
4101
- textColor: string;
4102
- backgroundColor: string;
4103
- fontSize: number;
4104
- fontFamily: string;
4105
- fontWeight: string;
4106
- textAlign: string;
4107
- textDecoration: string;
3999
+ styles: string[];
4108
4000
  lang?: string | undefined;
4109
4001
  }, {
4110
4002
  lang?: string | undefined;
4111
- textColor?: string | undefined;
4112
- backgroundColor?: string | undefined;
4113
- fontSize?: number | undefined;
4114
- fontFamily?: string | undefined;
4115
- fontWeight?: string | undefined;
4116
- textAlign?: string | undefined;
4117
- textDecoration?: string | undefined;
4003
+ styles?: string[] | undefined;
4118
4004
  }>>;
4119
4005
  imageNames: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
4120
4006
  imagePrompt: z.ZodOptional<z.ZodString>;
@@ -4302,13 +4188,7 @@ export declare const mulmoScriptSchema: z.ZodObject<{
4302
4188
  cssStyles: string | string[];
4303
4189
  } | undefined;
4304
4190
  captionParams?: {
4305
- textColor: string;
4306
- backgroundColor: string;
4307
- fontSize: number;
4308
- fontFamily: string;
4309
- fontWeight: string;
4310
- textAlign: string;
4311
- textDecoration: string;
4191
+ styles: string[];
4312
4192
  lang?: string | undefined;
4313
4193
  } | undefined;
4314
4194
  imageNames?: string[] | undefined;
@@ -4488,13 +4368,7 @@ export declare const mulmoScriptSchema: z.ZodObject<{
4488
4368
  } | undefined;
4489
4369
  captionParams?: {
4490
4370
  lang?: string | undefined;
4491
- textColor?: string | undefined;
4492
- backgroundColor?: string | undefined;
4493
- fontSize?: number | undefined;
4494
- fontFamily?: string | undefined;
4495
- fontWeight?: string | undefined;
4496
- textAlign?: string | undefined;
4497
- textDecoration?: string | undefined;
4371
+ styles?: string[] | undefined;
4498
4372
  } | undefined;
4499
4373
  imageNames?: string[] | undefined;
4500
4374
  imagePrompt?: string | undefined;
@@ -4717,13 +4591,7 @@ export declare const mulmoScriptSchema: z.ZodObject<{
4717
4591
  cssStyles: string | string[];
4718
4592
  } | undefined;
4719
4593
  captionParams?: {
4720
- textColor: string;
4721
- backgroundColor: string;
4722
- fontSize: number;
4723
- fontFamily: string;
4724
- fontWeight: string;
4725
- textAlign: string;
4726
- textDecoration: string;
4594
+ styles: string[];
4727
4595
  lang?: string | undefined;
4728
4596
  } | undefined;
4729
4597
  imageNames?: string[] | undefined;
@@ -4780,13 +4648,7 @@ export declare const mulmoScriptSchema: z.ZodObject<{
4780
4648
  cssStyles: string | string[];
4781
4649
  } | undefined;
4782
4650
  captionParams?: {
4783
- textColor: string;
4784
- backgroundColor: string;
4785
- fontSize: number;
4786
- fontFamily: string;
4787
- fontWeight: string;
4788
- textAlign: string;
4789
- textDecoration: string;
4651
+ styles: string[];
4790
4652
  lang?: string | undefined;
4791
4653
  } | undefined;
4792
4654
  references?: {
@@ -4970,13 +4832,7 @@ export declare const mulmoScriptSchema: z.ZodObject<{
4970
4832
  } | undefined;
4971
4833
  captionParams?: {
4972
4834
  lang?: string | undefined;
4973
- textColor?: string | undefined;
4974
- backgroundColor?: string | undefined;
4975
- fontSize?: number | undefined;
4976
- fontFamily?: string | undefined;
4977
- fontWeight?: string | undefined;
4978
- textAlign?: string | undefined;
4979
- textDecoration?: string | undefined;
4835
+ styles?: string[] | undefined;
4980
4836
  } | undefined;
4981
4837
  imageNames?: string[] | undefined;
4982
4838
  imagePrompt?: string | undefined;
@@ -5054,13 +4910,7 @@ export declare const mulmoScriptSchema: z.ZodObject<{
5054
4910
  } | undefined;
5055
4911
  captionParams?: {
5056
4912
  lang?: string | undefined;
5057
- textColor?: string | undefined;
5058
- backgroundColor?: string | undefined;
5059
- fontSize?: number | undefined;
5060
- fontFamily?: string | undefined;
5061
- fontWeight?: string | undefined;
5062
- textAlign?: string | undefined;
5063
- textDecoration?: string | undefined;
4913
+ styles?: string[] | undefined;
5064
4914
  } | undefined;
5065
4915
  canvasSize?: {
5066
4916
  width: number;
@@ -5516,31 +5366,13 @@ export declare const mulmoStudioSchema: z.ZodObject<{
5516
5366
  }>>;
5517
5367
  captionParams: z.ZodOptional<z.ZodObject<{
5518
5368
  lang: z.ZodOptional<z.ZodString>;
5519
- textColor: z.ZodDefault<z.ZodString>;
5520
- backgroundColor: z.ZodDefault<z.ZodString>;
5521
- fontSize: z.ZodDefault<z.ZodNumber>;
5522
- fontFamily: z.ZodDefault<z.ZodString>;
5523
- fontWeight: z.ZodDefault<z.ZodString>;
5524
- textAlign: z.ZodDefault<z.ZodString>;
5525
- textDecoration: z.ZodDefault<z.ZodString>;
5369
+ styles: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
5526
5370
  }, "strict", z.ZodTypeAny, {
5527
- textColor: string;
5528
- backgroundColor: string;
5529
- fontSize: number;
5530
- fontFamily: string;
5531
- fontWeight: string;
5532
- textAlign: string;
5533
- textDecoration: string;
5371
+ styles: string[];
5534
5372
  lang?: string | undefined;
5535
5373
  }, {
5536
5374
  lang?: string | undefined;
5537
- textColor?: string | undefined;
5538
- backgroundColor?: string | undefined;
5539
- fontSize?: number | undefined;
5540
- fontFamily?: string | undefined;
5541
- fontWeight?: string | undefined;
5542
- textAlign?: string | undefined;
5543
- textDecoration?: string | undefined;
5375
+ styles?: string[] | undefined;
5544
5376
  }>>;
5545
5377
  audioParams: z.ZodDefault<z.ZodObject<{
5546
5378
  padding: z.ZodDefault<z.ZodNumber>;
@@ -6330,31 +6162,13 @@ export declare const mulmoStudioSchema: z.ZodObject<{
6330
6162
  }>>;
6331
6163
  captionParams: z.ZodOptional<z.ZodObject<{
6332
6164
  lang: z.ZodOptional<z.ZodString>;
6333
- textColor: z.ZodDefault<z.ZodString>;
6334
- backgroundColor: z.ZodDefault<z.ZodString>;
6335
- fontSize: z.ZodDefault<z.ZodNumber>;
6336
- fontFamily: z.ZodDefault<z.ZodString>;
6337
- fontWeight: z.ZodDefault<z.ZodString>;
6338
- textAlign: z.ZodDefault<z.ZodString>;
6339
- textDecoration: z.ZodDefault<z.ZodString>;
6165
+ styles: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
6340
6166
  }, "strict", z.ZodTypeAny, {
6341
- textColor: string;
6342
- backgroundColor: string;
6343
- fontSize: number;
6344
- fontFamily: string;
6345
- fontWeight: string;
6346
- textAlign: string;
6347
- textDecoration: string;
6167
+ styles: string[];
6348
6168
  lang?: string | undefined;
6349
6169
  }, {
6350
6170
  lang?: string | undefined;
6351
- textColor?: string | undefined;
6352
- backgroundColor?: string | undefined;
6353
- fontSize?: number | undefined;
6354
- fontFamily?: string | undefined;
6355
- fontWeight?: string | undefined;
6356
- textAlign?: string | undefined;
6357
- textDecoration?: string | undefined;
6171
+ styles?: string[] | undefined;
6358
6172
  }>>;
6359
6173
  imageNames: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
6360
6174
  imagePrompt: z.ZodOptional<z.ZodString>;
@@ -6542,13 +6356,7 @@ export declare const mulmoStudioSchema: z.ZodObject<{
6542
6356
  cssStyles: string | string[];
6543
6357
  } | undefined;
6544
6358
  captionParams?: {
6545
- textColor: string;
6546
- backgroundColor: string;
6547
- fontSize: number;
6548
- fontFamily: string;
6549
- fontWeight: string;
6550
- textAlign: string;
6551
- textDecoration: string;
6359
+ styles: string[];
6552
6360
  lang?: string | undefined;
6553
6361
  } | undefined;
6554
6362
  imageNames?: string[] | undefined;
@@ -6728,13 +6536,7 @@ export declare const mulmoStudioSchema: z.ZodObject<{
6728
6536
  } | undefined;
6729
6537
  captionParams?: {
6730
6538
  lang?: string | undefined;
6731
- textColor?: string | undefined;
6732
- backgroundColor?: string | undefined;
6733
- fontSize?: number | undefined;
6734
- fontFamily?: string | undefined;
6735
- fontWeight?: string | undefined;
6736
- textAlign?: string | undefined;
6737
- textDecoration?: string | undefined;
6539
+ styles?: string[] | undefined;
6738
6540
  } | undefined;
6739
6541
  imageNames?: string[] | undefined;
6740
6542
  imagePrompt?: string | undefined;
@@ -6957,13 +6759,7 @@ export declare const mulmoStudioSchema: z.ZodObject<{
6957
6759
  cssStyles: string | string[];
6958
6760
  } | undefined;
6959
6761
  captionParams?: {
6960
- textColor: string;
6961
- backgroundColor: string;
6962
- fontSize: number;
6963
- fontFamily: string;
6964
- fontWeight: string;
6965
- textAlign: string;
6966
- textDecoration: string;
6762
+ styles: string[];
6967
6763
  lang?: string | undefined;
6968
6764
  } | undefined;
6969
6765
  imageNames?: string[] | undefined;
@@ -7020,13 +6816,7 @@ export declare const mulmoStudioSchema: z.ZodObject<{
7020
6816
  cssStyles: string | string[];
7021
6817
  } | undefined;
7022
6818
  captionParams?: {
7023
- textColor: string;
7024
- backgroundColor: string;
7025
- fontSize: number;
7026
- fontFamily: string;
7027
- fontWeight: string;
7028
- textAlign: string;
7029
- textDecoration: string;
6819
+ styles: string[];
7030
6820
  lang?: string | undefined;
7031
6821
  } | undefined;
7032
6822
  references?: {
@@ -7210,13 +7000,7 @@ export declare const mulmoStudioSchema: z.ZodObject<{
7210
7000
  } | undefined;
7211
7001
  captionParams?: {
7212
7002
  lang?: string | undefined;
7213
- textColor?: string | undefined;
7214
- backgroundColor?: string | undefined;
7215
- fontSize?: number | undefined;
7216
- fontFamily?: string | undefined;
7217
- fontWeight?: string | undefined;
7218
- textAlign?: string | undefined;
7219
- textDecoration?: string | undefined;
7003
+ styles?: string[] | undefined;
7220
7004
  } | undefined;
7221
7005
  imageNames?: string[] | undefined;
7222
7006
  imagePrompt?: string | undefined;
@@ -7294,13 +7078,7 @@ export declare const mulmoStudioSchema: z.ZodObject<{
7294
7078
  } | undefined;
7295
7079
  captionParams?: {
7296
7080
  lang?: string | undefined;
7297
- textColor?: string | undefined;
7298
- backgroundColor?: string | undefined;
7299
- fontSize?: number | undefined;
7300
- fontFamily?: string | undefined;
7301
- fontWeight?: string | undefined;
7302
- textAlign?: string | undefined;
7303
- textDecoration?: string | undefined;
7081
+ styles?: string[] | undefined;
7304
7082
  } | undefined;
7305
7083
  canvasSize?: {
7306
7084
  width: number;
@@ -7568,13 +7346,7 @@ export declare const mulmoStudioSchema: z.ZodObject<{
7568
7346
  cssStyles: string | string[];
7569
7347
  } | undefined;
7570
7348
  captionParams?: {
7571
- textColor: string;
7572
- backgroundColor: string;
7573
- fontSize: number;
7574
- fontFamily: string;
7575
- fontWeight: string;
7576
- textAlign: string;
7577
- textDecoration: string;
7349
+ styles: string[];
7578
7350
  lang?: string | undefined;
7579
7351
  } | undefined;
7580
7352
  imageNames?: string[] | undefined;
@@ -7631,13 +7403,7 @@ export declare const mulmoStudioSchema: z.ZodObject<{
7631
7403
  cssStyles: string | string[];
7632
7404
  } | undefined;
7633
7405
  captionParams?: {
7634
- textColor: string;
7635
- backgroundColor: string;
7636
- fontSize: number;
7637
- fontFamily: string;
7638
- fontWeight: string;
7639
- textAlign: string;
7640
- textDecoration: string;
7406
+ styles: string[];
7641
7407
  lang?: string | undefined;
7642
7408
  } | undefined;
7643
7409
  references?: {
@@ -7832,13 +7598,7 @@ export declare const mulmoStudioSchema: z.ZodObject<{
7832
7598
  } | undefined;
7833
7599
  captionParams?: {
7834
7600
  lang?: string | undefined;
7835
- textColor?: string | undefined;
7836
- backgroundColor?: string | undefined;
7837
- fontSize?: number | undefined;
7838
- fontFamily?: string | undefined;
7839
- fontWeight?: string | undefined;
7840
- textAlign?: string | undefined;
7841
- textDecoration?: string | undefined;
7601
+ styles?: string[] | undefined;
7842
7602
  } | undefined;
7843
7603
  imageNames?: string[] | undefined;
7844
7604
  imagePrompt?: string | undefined;
@@ -7916,13 +7676,7 @@ export declare const mulmoStudioSchema: z.ZodObject<{
7916
7676
  } | undefined;
7917
7677
  captionParams?: {
7918
7678
  lang?: string | undefined;
7919
- textColor?: string | undefined;
7920
- backgroundColor?: string | undefined;
7921
- fontSize?: number | undefined;
7922
- fontFamily?: string | undefined;
7923
- fontWeight?: string | undefined;
7924
- textAlign?: string | undefined;
7925
- textDecoration?: string | undefined;
7679
+ styles?: string[] | undefined;
7926
7680
  } | undefined;
7927
7681
  canvasSize?: {
7928
7682
  width: number;
@@ -8213,31 +7967,13 @@ export declare const mulmoScriptTemplateSchema: z.ZodObject<{
8213
7967
  }>>;
8214
7968
  captionParams: z.ZodOptional<z.ZodObject<{
8215
7969
  lang: z.ZodOptional<z.ZodString>;
8216
- textColor: z.ZodDefault<z.ZodString>;
8217
- backgroundColor: z.ZodDefault<z.ZodString>;
8218
- fontSize: z.ZodDefault<z.ZodNumber>;
8219
- fontFamily: z.ZodDefault<z.ZodString>;
8220
- fontWeight: z.ZodDefault<z.ZodString>;
8221
- textAlign: z.ZodDefault<z.ZodString>;
8222
- textDecoration: z.ZodDefault<z.ZodString>;
7970
+ styles: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
8223
7971
  }, "strict", z.ZodTypeAny, {
8224
- textColor: string;
8225
- backgroundColor: string;
8226
- fontSize: number;
8227
- fontFamily: string;
8228
- fontWeight: string;
8229
- textAlign: string;
8230
- textDecoration: string;
7972
+ styles: string[];
8231
7973
  lang?: string | undefined;
8232
7974
  }, {
8233
7975
  lang?: string | undefined;
8234
- textColor?: string | undefined;
8235
- backgroundColor?: string | undefined;
8236
- fontSize?: number | undefined;
8237
- fontFamily?: string | undefined;
8238
- fontWeight?: string | undefined;
8239
- textAlign?: string | undefined;
8240
- textDecoration?: string | undefined;
7976
+ styles?: string[] | undefined;
8241
7977
  }>>;
8242
7978
  audioParams: z.ZodDefault<z.ZodObject<{
8243
7979
  padding: z.ZodDefault<z.ZodNumber>;
@@ -8407,13 +8143,7 @@ export declare const mulmoScriptTemplateSchema: z.ZodObject<{
8407
8143
  cssStyles: string | string[];
8408
8144
  } | undefined;
8409
8145
  captionParams?: {
8410
- textColor: string;
8411
- backgroundColor: string;
8412
- fontSize: number;
8413
- fontFamily: string;
8414
- fontWeight: string;
8415
- textAlign: string;
8416
- textDecoration: string;
8146
+ styles: string[];
8417
8147
  lang?: string | undefined;
8418
8148
  } | undefined;
8419
8149
  }, {
@@ -8484,13 +8214,7 @@ export declare const mulmoScriptTemplateSchema: z.ZodObject<{
8484
8214
  } | undefined;
8485
8215
  captionParams?: {
8486
8216
  lang?: string | undefined;
8487
- textColor?: string | undefined;
8488
- backgroundColor?: string | undefined;
8489
- fontSize?: number | undefined;
8490
- fontFamily?: string | undefined;
8491
- fontWeight?: string | undefined;
8492
- textAlign?: string | undefined;
8493
- textDecoration?: string | undefined;
8217
+ styles?: string[] | undefined;
8494
8218
  } | undefined;
8495
8219
  canvasSize?: {
8496
8220
  width: number;
@@ -8597,13 +8321,7 @@ export declare const mulmoScriptTemplateSchema: z.ZodObject<{
8597
8321
  cssStyles: string | string[];
8598
8322
  } | undefined;
8599
8323
  captionParams?: {
8600
- textColor: string;
8601
- backgroundColor: string;
8602
- fontSize: number;
8603
- fontFamily: string;
8604
- fontWeight: string;
8605
- textAlign: string;
8606
- textDecoration: string;
8324
+ styles: string[];
8607
8325
  lang?: string | undefined;
8608
8326
  } | undefined;
8609
8327
  } | undefined;
@@ -8680,13 +8398,7 @@ export declare const mulmoScriptTemplateSchema: z.ZodObject<{
8680
8398
  } | undefined;
8681
8399
  captionParams?: {
8682
8400
  lang?: string | undefined;
8683
- textColor?: string | undefined;
8684
- backgroundColor?: string | undefined;
8685
- fontSize?: number | undefined;
8686
- fontFamily?: string | undefined;
8687
- fontWeight?: string | undefined;
8688
- textAlign?: string | undefined;
8689
- textDecoration?: string | undefined;
8401
+ styles?: string[] | undefined;
8690
8402
  } | undefined;
8691
8403
  canvasSize?: {
8692
8404
  width: number;
@@ -8968,31 +8680,13 @@ export declare const mulmoScriptTemplateFileSchema: z.ZodObject<{
8968
8680
  }>>;
8969
8681
  captionParams: z.ZodOptional<z.ZodObject<{
8970
8682
  lang: z.ZodOptional<z.ZodString>;
8971
- textColor: z.ZodDefault<z.ZodString>;
8972
- backgroundColor: z.ZodDefault<z.ZodString>;
8973
- fontSize: z.ZodDefault<z.ZodNumber>;
8974
- fontFamily: z.ZodDefault<z.ZodString>;
8975
- fontWeight: z.ZodDefault<z.ZodString>;
8976
- textAlign: z.ZodDefault<z.ZodString>;
8977
- textDecoration: z.ZodDefault<z.ZodString>;
8683
+ styles: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
8978
8684
  }, "strict", z.ZodTypeAny, {
8979
- textColor: string;
8980
- backgroundColor: string;
8981
- fontSize: number;
8982
- fontFamily: string;
8983
- fontWeight: string;
8984
- textAlign: string;
8985
- textDecoration: string;
8685
+ styles: string[];
8986
8686
  lang?: string | undefined;
8987
8687
  }, {
8988
8688
  lang?: string | undefined;
8989
- textColor?: string | undefined;
8990
- backgroundColor?: string | undefined;
8991
- fontSize?: number | undefined;
8992
- fontFamily?: string | undefined;
8993
- fontWeight?: string | undefined;
8994
- textAlign?: string | undefined;
8995
- textDecoration?: string | undefined;
8689
+ styles?: string[] | undefined;
8996
8690
  }>>;
8997
8691
  audioParams: z.ZodDefault<z.ZodObject<{
8998
8692
  padding: z.ZodDefault<z.ZodNumber>;
@@ -9162,13 +8856,7 @@ export declare const mulmoScriptTemplateFileSchema: z.ZodObject<{
9162
8856
  cssStyles: string | string[];
9163
8857
  } | undefined;
9164
8858
  captionParams?: {
9165
- textColor: string;
9166
- backgroundColor: string;
9167
- fontSize: number;
9168
- fontFamily: string;
9169
- fontWeight: string;
9170
- textAlign: string;
9171
- textDecoration: string;
8859
+ styles: string[];
9172
8860
  lang?: string | undefined;
9173
8861
  } | undefined;
9174
8862
  }, {
@@ -9239,13 +8927,7 @@ export declare const mulmoScriptTemplateFileSchema: z.ZodObject<{
9239
8927
  } | undefined;
9240
8928
  captionParams?: {
9241
8929
  lang?: string | undefined;
9242
- textColor?: string | undefined;
9243
- backgroundColor?: string | undefined;
9244
- fontSize?: number | undefined;
9245
- fontFamily?: string | undefined;
9246
- fontWeight?: string | undefined;
9247
- textAlign?: string | undefined;
9248
- textDecoration?: string | undefined;
8930
+ styles?: string[] | undefined;
9249
8931
  } | undefined;
9250
8932
  canvasSize?: {
9251
8933
  width: number;
@@ -9355,13 +9037,7 @@ export declare const mulmoScriptTemplateFileSchema: z.ZodObject<{
9355
9037
  cssStyles: string | string[];
9356
9038
  } | undefined;
9357
9039
  captionParams?: {
9358
- textColor: string;
9359
- backgroundColor: string;
9360
- fontSize: number;
9361
- fontFamily: string;
9362
- fontWeight: string;
9363
- textAlign: string;
9364
- textDecoration: string;
9040
+ styles: string[];
9365
9041
  lang?: string | undefined;
9366
9042
  } | undefined;
9367
9043
  } | undefined;
@@ -9439,13 +9115,7 @@ export declare const mulmoScriptTemplateFileSchema: z.ZodObject<{
9439
9115
  } | undefined;
9440
9116
  captionParams?: {
9441
9117
  lang?: string | undefined;
9442
- textColor?: string | undefined;
9443
- backgroundColor?: string | undefined;
9444
- fontSize?: number | undefined;
9445
- fontFamily?: string | undefined;
9446
- fontWeight?: string | undefined;
9447
- textAlign?: string | undefined;
9448
- textDecoration?: string | undefined;
9118
+ styles?: string[] | undefined;
9449
9119
  } | undefined;
9450
9120
  canvasSize?: {
9451
9121
  width: number;
@@ -87,13 +87,7 @@ export const mulmoTextSlideMediaSchema = z
87
87
  export const mulmoCaptionParamsSchema = z
88
88
  .object({
89
89
  lang: langSchema.optional(),
90
- textColor: z.string().default("#FFFFFF"),
91
- backgroundColor: z.string().default("#000000"),
92
- fontSize: z.number().default(16),
93
- fontFamily: z.string().default("Arial"),
94
- fontWeight: z.string().default("normal"),
95
- textAlign: z.string().default("left"),
96
- textDecoration: z.string().default("none"),
90
+ styles: z.array(z.string()).default([]), // css styles
97
91
  })
98
92
  .strict();
99
93
  export const mulmoChartMediaSchema = z
@@ -217,13 +217,7 @@ export declare const createOrUpdateStudioData: (_mulmoScript: MulmoScript, curre
217
217
  cssStyles: string | string[];
218
218
  } | undefined;
219
219
  captionParams?: {
220
- textColor: string;
221
- backgroundColor: string;
222
- fontSize: number;
223
- fontFamily: string;
224
- fontWeight: string;
225
- textAlign: string;
226
- textDecoration: string;
220
+ styles: string[];
227
221
  lang?: string | undefined;
228
222
  } | undefined;
229
223
  imageNames?: string[] | undefined;
@@ -280,13 +274,7 @@ export declare const createOrUpdateStudioData: (_mulmoScript: MulmoScript, curre
280
274
  cssStyles: string | string[];
281
275
  } | undefined;
282
276
  captionParams?: {
283
- textColor: string;
284
- backgroundColor: string;
285
- fontSize: number;
286
- fontFamily: string;
287
- fontWeight: string;
288
- textAlign: string;
289
- textDecoration: string;
277
+ styles: string[];
290
278
  lang?: string | undefined;
291
279
  } | undefined;
292
280
  references?: {
@@ -1,4 +1,4 @@
1
- import { MulmoBeat, MulmoScript, MulmoScriptTemplate, MulmoStoryboard } from "../types/index.js";
1
+ import { MulmoBeat, MulmoScript, MulmoScriptTemplate, MulmoStoryboard, MulmoCanvasDimension } from "../types/index.js";
2
2
  export declare const imagePrompt: (beat: MulmoBeat, style?: string) => string;
3
3
  export declare const graphDataScriptFromUrlPrompt: (sourceTextInput: string) => string;
4
4
  export declare const graphDataScriptGeneratePrompt: (scene: string) => string;
@@ -17,3 +17,4 @@ export declare const storyToScriptPrompt: (script: MulmoScript, beatsPerScene: n
17
17
  export declare const searchQueryPrompt: (inquiry: string, followUpQueries: string) => string;
18
18
  export declare const reflectionPrompt: (researchTopic: string, searchResults: string) => string;
19
19
  export declare const finalAnswerPrompt: (userInput: string, searchResults: string, researchTopic: string) => string;
20
+ export declare const htmlImageSystemPrompt: (canvasSize: MulmoCanvasDimension) => string[];
@@ -124,3 +124,13 @@ export const finalAnswerPrompt = (userInput, searchResults, researchTopic) => {
124
124
  Current Date: ${currentDate}
125
125
  `;
126
126
  };
127
+ export const htmlImageSystemPrompt = (canvasSize) => {
128
+ return [
129
+ "Based on the provided information, create a single slide HTML page using Tailwind CSS.",
130
+ `The view port size is ${canvasSize.width}x${canvasSize.height}. Make sure the HTML fits within the view port.`,
131
+ "If charts are needed, use Chart.js to present them in a clean and visually appealing way.",
132
+ "Include a balanced mix of comments, graphs, and illustrations to enhance visual impact.",
133
+ "Output only the HTML code. Do not include any comments, explanations, or additional information outside the HTML.",
134
+ "If data is provided, use it effectively to populate the slide.",
135
+ ];
136
+ };
@@ -1,4 +1,5 @@
1
1
  import { MulmoBeat, MulmoStudioMultiLingualData } from "../types/index.js";
2
+ import type { ConfigDataDictionary, DefaultConfigData } from "graphai";
2
3
  export declare const llm: readonly ["openAI", "anthropic", "gemini", "groq"];
3
4
  export type LLM = (typeof llm)[number];
4
5
  export declare const llmConfig: Record<LLM, {
@@ -17,3 +18,4 @@ export declare const text2hash: (input: string) => string;
17
18
  export declare const localizedText: (beat: MulmoBeat, multiLingualData?: MulmoStudioMultiLingualData, lang?: string) => string;
18
19
  export declare const sleep: (milliseconds: number) => Promise<unknown>;
19
20
  export declare function userAssert(condition: boolean, message: string): asserts condition;
21
+ export declare const settings2GraphAIConfig: (settings?: Record<string, string>) => ConfigDataDictionary<DefaultConfigData>;
@@ -60,3 +60,45 @@ export function userAssert(condition, message) {
60
60
  throw new Error(message);
61
61
  }
62
62
  }
63
+ export const settings2GraphAIConfig = (settings) => {
64
+ const config = {};
65
+ if (settings) {
66
+ if (settings.OPENAI_API_KEY) {
67
+ config.openAIAgent = {
68
+ apiKey: settings.OPENAI_API_KEY,
69
+ };
70
+ config.ttsOpenaiAgent = {
71
+ apiKey: settings.OPENAI_API_KEY,
72
+ };
73
+ config.imageOpenaiAgent = {
74
+ apiKey: settings.OPENAI_API_KEY,
75
+ };
76
+ }
77
+ if (settings.ANTHROPIC_API_TOKEN) {
78
+ config.anthropicAgent = {
79
+ apiKey: settings.ANTHROPIC_API_TOKEN,
80
+ };
81
+ }
82
+ if (settings.REPLICATE_API_TOKEN) {
83
+ config.movieReplicateAgent = {
84
+ apiKey: settings.REPLICATE_API_TOKEN,
85
+ };
86
+ }
87
+ if (settings.NIJIVOICE_API_KEY) {
88
+ config.ttsNijivoiceAgent = {
89
+ apiKey: settings.NIJIVOICE_API_KEY,
90
+ };
91
+ }
92
+ if (settings.ELEVENLABS_API_KEY) {
93
+ config.ttsElevenlabsAgent = {
94
+ apiKey: settings.ELEVENLABS_API_KEY,
95
+ };
96
+ }
97
+ // TODO
98
+ // browserlessAgent
99
+ // ttsGoogleAgent
100
+ // geminiAgent, groqAgent for tool
101
+ // TAVILY_API_KEY ( for deep research)
102
+ }
103
+ return config;
104
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mulmocast",
3
- "version": "0.0.23",
3
+ "version": "0.0.24",
4
4
  "description": "",
5
5
  "type": "module",
6
6
  "main": "lib/index.js",