mulmocast 2.9.2 → 2.10.0

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.
Files changed (161) hide show
  1. package/lib/cli/bin.js +0 -0
  2. package/lib/index.browser.d.ts +7 -0
  3. package/lib/index.browser.js +6 -0
  4. package/lib/types/const.d.ts +7 -0
  5. package/lib/types/const.js +7 -0
  6. package/lib/types/schema.js +6 -2
  7. package/lib/utils/beat_html/chart.d.ts +15 -0
  8. package/lib/utils/beat_html/chart.js +21 -0
  9. package/lib/utils/beat_html/html_tailwind.d.ts +19 -0
  10. package/lib/utils/beat_html/html_tailwind.js +20 -0
  11. package/lib/utils/beat_html/index.d.ts +33 -0
  12. package/lib/utils/beat_html/index.js +65 -0
  13. package/lib/utils/beat_html/markdown.d.ts +20 -0
  14. package/lib/utils/beat_html/markdown.js +25 -0
  15. package/lib/utils/beat_html/media.d.ts +14 -0
  16. package/lib/utils/beat_html/media.js +19 -0
  17. package/lib/utils/beat_html/mermaid.d.ts +14 -0
  18. package/lib/utils/beat_html/mermaid.js +22 -0
  19. package/lib/utils/beat_html/slide.d.ts +21 -0
  20. package/lib/utils/beat_html/slide.js +33 -0
  21. package/lib/utils/beat_html/text_slide.d.ts +17 -0
  22. package/lib/utils/beat_html/text_slide.js +24 -0
  23. package/lib/utils/beat_html/type.d.ts +73 -0
  24. package/lib/utils/element_id.d.ts +26 -0
  25. package/lib/utils/element_id.js +31 -0
  26. package/lib/utils/html_escape.d.ts +14 -0
  27. package/lib/utils/html_escape.js +30 -0
  28. package/lib/utils/image_plugins/bg_image_util.js +2 -1
  29. package/lib/utils/image_plugins/chart.js +6 -30
  30. package/lib/utils/image_plugins/chart_html.d.ts +24 -0
  31. package/lib/utils/image_plugins/chart_html.js +81 -0
  32. package/lib/utils/image_plugins/html_tailwind.js +2 -5
  33. package/lib/utils/image_plugins/html_tailwind_markup.d.ts +21 -0
  34. package/lib/utils/image_plugins/html_tailwind_markup.js +8 -0
  35. package/lib/utils/image_plugins/markdown.js +41 -30
  36. package/lib/utils/image_plugins/markdown_layout.d.ts +46 -4
  37. package/lib/utils/image_plugins/markdown_layout.js +96 -83
  38. package/lib/utils/image_plugins/media_html.d.ts +16 -0
  39. package/lib/utils/image_plugins/media_html.js +39 -0
  40. package/lib/utils/image_plugins/mermaid.d.ts +1 -0
  41. package/lib/utils/image_plugins/mermaid.js +4 -16
  42. package/lib/utils/image_plugins/mermaid_html.d.ts +22 -0
  43. package/lib/utils/image_plugins/mermaid_html.js +36 -0
  44. package/lib/utils/image_plugins/movie.js +2 -15
  45. package/lib/utils/sdk_timeout.d.ts +3 -0
  46. package/lib/utils/sdk_timeout.js +7 -0
  47. package/lib/utils/swipe_to_html.d.ts +18 -0
  48. package/lib/utils/swipe_to_html.js +26 -2
  49. package/package.json +11 -10
  50. package/scripts/test/test_captions_2.json~ +278 -0
  51. package/scripts/test/test_en_portrait.json~ +31 -0
  52. package/scripts/test/test_slide_image_ref_gemini_en.json~ +289 -0
  53. package/scripts/test/test_vertexai.json~ +21 -0
  54. package/lib/agents/image_google_agent.d.ts +0 -5
  55. package/lib/agents/image_google_agent.js +0 -86
  56. package/lib/agents/movie_google_agent.d.ts +0 -9
  57. package/lib/agents/movie_google_agent.js +0 -122
  58. package/lib/agents/mulmo_prompts_agent.d.ts +0 -7
  59. package/lib/agents/mulmo_prompts_agent.js +0 -37
  60. package/lib/agents/prompts_data.d.ts +0 -15
  61. package/lib/agents/prompts_data.js +0 -16
  62. package/lib/agents/tts_nijivoice_agent.d.ts +0 -5
  63. package/lib/agents/tts_nijivoice_agent.js +0 -69
  64. package/lib/agents/validate_mulmo_script_agent.d.ts +0 -17
  65. package/lib/agents/validate_mulmo_script_agent.js +0 -34
  66. package/lib/cli/args.d.ts +0 -15
  67. package/lib/cli/args.js +0 -62
  68. package/lib/cli/cli.d.ts +0 -17
  69. package/lib/cli/cli.js +0 -117
  70. package/lib/cli/run.d.ts +0 -2
  71. package/lib/cli/run.js +0 -3
  72. package/lib/cli/tool-args.d.ts +0 -16
  73. package/lib/cli/tool-args.js +0 -64
  74. package/lib/cli/tool-cli.d.ts +0 -2
  75. package/lib/cli/tool-cli.js +0 -32
  76. package/lib/cli/tool_commands/prompt/builder.d.ts +0 -4
  77. package/lib/cli/tool_commands/prompt/builder.js +0 -11
  78. package/lib/cli/tool_commands/prompt/handler.d.ts +0 -4
  79. package/lib/cli/tool_commands/prompt/handler.js +0 -14
  80. package/lib/cli/tool_commands/prompt/index.d.ts +0 -4
  81. package/lib/cli/tool_commands/prompt/index.js +0 -4
  82. package/lib/cli/tool_commands/schema/builder.d.ts +0 -2
  83. package/lib/cli/tool_commands/schema/builder.js +0 -3
  84. package/lib/cli/tool_commands/schema/handler.d.ts +0 -2
  85. package/lib/cli/tool_commands/schema/handler.js +0 -12
  86. package/lib/cli/tool_commands/schema/index.d.ts +0 -4
  87. package/lib/cli/tool_commands/schema/index.js +0 -4
  88. package/lib/cli/tool_commands/scripting/builder.d.ts +0 -20
  89. package/lib/cli/tool_commands/scripting/builder.js +0 -63
  90. package/lib/cli/tool_commands/scripting/handler.d.ts +0 -12
  91. package/lib/cli/tool_commands/scripting/handler.js +0 -36
  92. package/lib/cli/tool_commands/scripting/index.d.ts +0 -4
  93. package/lib/cli/tool_commands/scripting/index.js +0 -4
  94. package/lib/index.d.ts +0 -8
  95. package/lib/index.js +0 -8
  96. package/lib/methods/mulmo_script_template.d.ts +0 -4
  97. package/lib/methods/mulmo_script_template.js +0 -6
  98. package/lib/methods/mulmo_studio.d.ts +0 -8
  99. package/lib/methods/mulmo_studio.js +0 -25
  100. package/lib/slide/blocks.d.ts +0 -13
  101. package/lib/slide/blocks.js +0 -251
  102. package/lib/slide/index.d.ts +0 -6
  103. package/lib/slide/index.js +0 -7
  104. package/lib/slide/layouts/big_quote.d.ts +0 -2
  105. package/lib/slide/layouts/big_quote.js +0 -19
  106. package/lib/slide/layouts/columns.d.ts +0 -2
  107. package/lib/slide/layouts/columns.js +0 -53
  108. package/lib/slide/layouts/comparison.d.ts +0 -2
  109. package/lib/slide/layouts/comparison.js +0 -25
  110. package/lib/slide/layouts/funnel.d.ts +0 -2
  111. package/lib/slide/layouts/funnel.js +0 -25
  112. package/lib/slide/layouts/grid.d.ts +0 -2
  113. package/lib/slide/layouts/grid.js +0 -38
  114. package/lib/slide/layouts/index.d.ts +0 -3
  115. package/lib/slide/layouts/index.js +0 -46
  116. package/lib/slide/layouts/matrix.d.ts +0 -2
  117. package/lib/slide/layouts/matrix.js +0 -53
  118. package/lib/slide/layouts/split.d.ts +0 -2
  119. package/lib/slide/layouts/split.js +0 -51
  120. package/lib/slide/layouts/stats.d.ts +0 -2
  121. package/lib/slide/layouts/stats.js +0 -23
  122. package/lib/slide/layouts/table.d.ts +0 -2
  123. package/lib/slide/layouts/table.js +0 -10
  124. package/lib/slide/layouts/timeline.d.ts +0 -2
  125. package/lib/slide/layouts/timeline.js +0 -27
  126. package/lib/slide/layouts/title.d.ts +0 -2
  127. package/lib/slide/layouts/title.js +0 -19
  128. package/lib/slide/layouts/waterfall.d.ts +0 -2
  129. package/lib/slide/layouts/waterfall.js +0 -63
  130. package/lib/slide/render.d.ts +0 -17
  131. package/lib/slide/render.js +0 -101
  132. package/lib/slide/schema.d.ts +0 -9309
  133. package/lib/slide/schema.js +0 -434
  134. package/lib/slide/utils.d.ts +0 -76
  135. package/lib/slide/utils.js +0 -243
  136. package/lib/tools/prompt.js +0 -18
  137. package/lib/tools/seed.d.ts +0 -3
  138. package/lib/tools/seed.js +0 -211
  139. package/lib/tools/seed_from_url.d.ts +0 -3
  140. package/lib/tools/seed_from_url.js +0 -188
  141. package/lib/types/slide.d.ts +0 -9309
  142. package/lib/types/slide.js +0 -434
  143. package/lib/utils/assets.d.ts +0 -18
  144. package/lib/utils/assets.js +0 -101
  145. package/lib/utils/cli.d.ts +0 -1
  146. package/lib/utils/cli.js +0 -15
  147. package/lib/utils/const.d.ts +0 -12
  148. package/lib/utils/const.js +0 -12
  149. package/lib/utils/image_preprocess.d.ts +0 -14
  150. package/lib/utils/image_preprocess.js +0 -52
  151. package/lib/utils/markdown.d.ts +0 -3
  152. package/lib/utils/markdown.js +0 -42
  153. package/lib/utils/pdf.d.ts +0 -9
  154. package/lib/utils/pdf.js +0 -77
  155. package/lib/utils/preprocess.d.ts +0 -343
  156. package/lib/utils/preprocess.js +0 -58
  157. package/lib/utils/provider2agent.d.ts +0 -141
  158. package/lib/utils/provider2agent.js +0 -267
  159. package/lib/utils/text_hash.d.ts +0 -1
  160. package/lib/utils/text_hash.js +0 -4
  161. /package/lib/{tools/prompt.d.ts → utils/beat_html/type.js} +0 -0
@@ -1,267 +0,0 @@
1
- // node & browser
2
- export const provider2TTSAgent = {
3
- nijivoice: {
4
- agentName: "ttsNijivoiceAgent",
5
- hasLimitedConcurrency: true,
6
- },
7
- openai: {
8
- agentName: "ttsOpenaiAgent",
9
- hasLimitedConcurrency: false,
10
- defaultModel: "gpt-4o-mini-tts",
11
- defaultVoice: "shimmer",
12
- },
13
- google: {
14
- agentName: "ttsGoogleAgent",
15
- hasLimitedConcurrency: false,
16
- },
17
- elevenlabs: {
18
- agentName: "ttsElevenlabsAgent",
19
- hasLimitedConcurrency: true,
20
- defaultModel: "eleven_multilingual_v2",
21
- // Models | ElevenLabs Documentation
22
- // https://elevenlabs.io/docs/models
23
- models: ["eleven_multilingual_v2", "eleven_turbo_v2_5", "eleven_turbo_v2", "eleven_flash_v2_5", "eleven_flash_v2"],
24
- },
25
- mock: {
26
- agentName: "mediaMockAgent",
27
- hasLimitedConcurrency: true,
28
- defaultModel: "mock-model",
29
- models: ["mock-model"],
30
- },
31
- };
32
- export const provider2ImageAgent = {
33
- openai: {
34
- agentName: "imageOpenaiAgent",
35
- defaultModel: "gpt-image-1",
36
- models: ["dall-e-3", "gpt-image-1"],
37
- },
38
- google: {
39
- agentName: "imageGenAIAgent",
40
- defaultModel: "gemini-2.5-flash-image-preview",
41
- models: ["imagen-3.0-generate-002", "imagen-4.0-generate-preview-06-06", "imagen-4.0-ultra-generate-preview-06-06", "gemini-2.5-flash-image-preview"],
42
- },
43
- replicate: {
44
- agentName: "imageReplicateAgent",
45
- defaultModel: "bytedance/seedream-4",
46
- models: ["bytedance/seedream-4", "qwen/qwen-image"],
47
- },
48
- mock: {
49
- agentName: "mediaMockAgent",
50
- defaultModel: "mock-model",
51
- models: ["mock-model"],
52
- },
53
- };
54
- export const provider2MovieAgent = {
55
- replicate: {
56
- agentName: "movieReplicateAgent",
57
- defaultModel: "bytedance/seedance-1-lite",
58
- models: [
59
- "bytedance/seedance-1-lite",
60
- "bytedance/seedance-1-pro",
61
- "kwaivgi/kling-v1.6-pro",
62
- "kwaivgi/kling-v2.1",
63
- "kwaivgi/kling-v2.1-master",
64
- "google/veo-2",
65
- "google/veo-3",
66
- "google/veo-3-fast",
67
- "minimax/video-01",
68
- "minimax/hailuo-02",
69
- "minimax/hailuo-02-fast",
70
- "pixverse/pixverse-v4.5",
71
- "wan-video/wan-2.2-i2v-480p-fast",
72
- "wan-video/wan-2.2-t2v-480p-fast",
73
- ],
74
- modelParams: {
75
- "bytedance/seedance-1-lite": {
76
- durations: [5, 10],
77
- start_image: "image",
78
- last_image: "last_frame_image",
79
- price_per_sec: 0.036, // in USD
80
- },
81
- "bytedance/seedance-1-pro": {
82
- durations: [5, 10],
83
- start_image: "image",
84
- last_image: "last_frame_image",
85
- price_per_sec: 0.15,
86
- },
87
- "kwaivgi/kling-v1.6-pro": {
88
- durations: [5, 10],
89
- start_image: "start_image",
90
- price_per_sec: 0.095,
91
- },
92
- "kwaivgi/kling-v2.1": {
93
- durations: [5, 10],
94
- start_image: "start_image",
95
- price_per_sec: 0.05,
96
- },
97
- "kwaivgi/kling-v2.1-master": {
98
- durations: [5, 10],
99
- start_image: "start_image",
100
- price_per_sec: 0.28,
101
- },
102
- "google/veo-2": {
103
- durations: [5, 6, 7, 8],
104
- start_image: "image",
105
- price_per_sec: 0.5,
106
- },
107
- "google/veo-3": {
108
- durations: [8],
109
- start_image: "image",
110
- price_per_sec: 0.75,
111
- },
112
- "google/veo-3-fast": {
113
- durations: [8],
114
- start_image: "image",
115
- price_per_sec: 0.4,
116
- },
117
- "minimax/video-01": {
118
- durations: [6],
119
- start_image: "first_frame_image",
120
- price_per_sec: 0.5,
121
- },
122
- "minimax/hailuo-02": {
123
- durations: [6], // NOTE: 10 for only 720p
124
- start_image: "first_frame_image",
125
- price_per_sec: 0.08,
126
- },
127
- "minimax/hailuo-02-fast": {
128
- durations: [6, 10], // NOTE: 512P
129
- start_image: "first_frame_image",
130
- price_per_sec: 0.0166,
131
- },
132
- "pixverse/pixverse-v4.5": {
133
- durations: [5, 8],
134
- start_image: "image",
135
- last_image: "last_frame_image",
136
- price_per_sec: 0.12,
137
- },
138
- "wan-video/wan-2.2-i2v-480p-fast": {
139
- durations: [5],
140
- start_image: "image",
141
- price_per_sec: 0.012,
142
- },
143
- "wan-video/wan-2.2-t2v-480p-fast": {
144
- durations: [5],
145
- start_image: undefined,
146
- price_per_sec: 0.012,
147
- },
148
- },
149
- },
150
- google: {
151
- agentName: "movieGenAIAgent",
152
- defaultModel: "veo-2.0-generate-001",
153
- models: ["veo-2.0-generate-001", "veo-3.0-generate-preview"],
154
- },
155
- mock: {
156
- agentName: "mediaMockAgent",
157
- defaultModel: "mock-model",
158
- models: ["mock-model"],
159
- },
160
- };
161
- export const provider2SoundEffectAgent = {
162
- replicate: {
163
- agentName: "soundEffectReplicateAgent",
164
- defaultModel: "zsxkib/mmaudio",
165
- models: ["zsxkib/mmaudio"],
166
- modelParams: {
167
- "zsxkib/mmaudio": {
168
- identifier: "zsxkib/mmaudio:62871fb59889b2d7c13777f08deb3b36bdff88f7e1d53a50ad7694548a41b484",
169
- },
170
- },
171
- },
172
- };
173
- export const provider2LipSyncAgent = {
174
- replicate: {
175
- agentName: "lipSyncReplicateAgent",
176
- defaultModel: "bytedance/omni-human",
177
- models: ["bytedance/latentsync", "tmappdev/lipsync", "bytedance/omni-human"],
178
- modelParams: {
179
- "bytedance/latentsync": {
180
- identifier: "bytedance/latentsync:637ce1919f807ca20da3a448ddc2743535d2853649574cd52a933120e9b9e293",
181
- video: "video",
182
- audio: "audio",
183
- },
184
- "tmappdev/lipsync": {
185
- identifier: "tmappdev/lipsync:c54ce2fe673ea59b857b91250b3d71a2cd304a78f2370687632805c8405fbf4c",
186
- video: "video_input",
187
- audio: "audio_input",
188
- },
189
- "bytedance/omni-human": {
190
- identifier: "bytedance/omni-human",
191
- image: "image",
192
- audio: "audio",
193
- price_per_sec: 0.14,
194
- },
195
- /* NOTE: This model does not work with large base64 urls.
196
- "sync/lipsync-2": {
197
- video: "video",
198
- audio: "audio",
199
- },
200
- */
201
- /* NOTE: This model does not work well for some unknown reason.
202
- "kwaivgi/kling-lip-sync": {
203
- video: "video_url",
204
- audio: "audio_file",
205
- },
206
- */
207
- },
208
- },
209
- };
210
- // : Record<LLM, { agent: string; defaultModel: string; max_tokens: number }>
211
- export const provider2LLMAgent = {
212
- openai: {
213
- agentName: "openAIAgent",
214
- defaultModel: "gpt-5",
215
- max_tokens: 8192,
216
- models: [
217
- "gpt-5",
218
- "gpt-5-nano",
219
- "gpt-5-mini",
220
- "gpt-4.1",
221
- "gpt-4.1-mini",
222
- "gpt-4.1-nano",
223
- "o3",
224
- "o3-mini",
225
- "o3-pro",
226
- "o1",
227
- "o1-pro",
228
- "gpt-4o",
229
- "gpt-4o-mini",
230
- ],
231
- },
232
- anthropic: {
233
- agentName: "anthropicAgent",
234
- defaultModel: "claude-3-7-sonnet-20250219",
235
- max_tokens: 8192,
236
- models: ["claude-opus-4-1-20250805", "claude-opus-4-20250514", "claude-sonnet-4-20250514", "claude-3-7-sonnet-20250219", "claude-3-haiku-20240307"],
237
- },
238
- gemini: {
239
- agentName: "geminiAgent",
240
- defaultModel: "gemini-2.5-flash",
241
- max_tokens: 8192,
242
- models: ["gemini-2.5-pro", "gemini-2.5-flash", "gemini-2.5-flash-lite", "gemini-2.0-flash"],
243
- },
244
- groq: {
245
- agentName: "groqAgent",
246
- defaultModel: "llama-3.1-8b-instant",
247
- max_tokens: 4096,
248
- models: ["llama-3.1-8b-instant", "llama-3.3-70b-versatile", "deepseek-r1-distill-llama-70b", "openai/gpt-oss-120b", "openai/gpt-oss-20b"],
249
- },
250
- mock: {
251
- agentName: "mediaMockAgent",
252
- defaultModel: "mock",
253
- max_tokens: 4096,
254
- models: ["mock"],
255
- },
256
- };
257
- export const defaultProviders = {
258
- tts: "openai",
259
- text2image: "openai",
260
- text2movie: "replicate",
261
- text2Html: "openai",
262
- llm: "openai",
263
- soundEffect: "replicate",
264
- lipSync: "replicate",
265
- };
266
- export const llm = Object.keys(provider2LLMAgent);
267
- export const htmlLLMProvider = ["openai", "anthropic", "mock"];
@@ -1 +0,0 @@
1
- export declare const text2hash: (input: string) => string;
@@ -1,4 +0,0 @@
1
- import * as crypto from "crypto";
2
- export const text2hash = (input) => {
3
- return crypto.createHash("sha256").update(input).digest("hex");
4
- };