@geekapps/silo-elements-nextjs 0.3.3 → 0.3.5

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.
@@ -186,50 +186,50 @@ var VIDEO_CODECS = [
186
186
  {
187
187
  value: "h264",
188
188
  label: "H.264",
189
- description: "Compatibilidade universal \u2014 funciona em todos os players, browsers e Smart TVs."
189
+ sublabel: "Compat\xEDvel com tudo",
190
+ description: "Funciona em qualquer dispositivo \u2014 celulares, Smart TVs, navegadores antigos e novos. A escolha mais segura se voc\xEA n\xE3o sabe onde o v\xEDdeo ser\xE1 assistido."
190
191
  },
191
192
  {
192
193
  value: "h265",
193
194
  label: "H.265",
194
- description: "50% menor que H.264 com a mesma qualidade. Requer player moderno."
195
+ sublabel: "Menor tamanho",
196
+ description: "Arquivo at\xE9 50% menor que H.264 com a mesma qualidade de imagem. Requer dispositivo moderno (2016+). Ideal para v\xEDdeos longos ou em alta resolu\xE7\xE3o."
195
197
  },
196
198
  {
197
199
  value: "av1",
198
200
  label: "AV1",
199
- description: "M\xE1xima efici\xEAncia \u2014 at\xE9 50% menor que H.265. Chrome 70+, Firefox 67+, Safari 17+.",
200
- warning: "N\xE3o suportado em iPhones antigos (iOS < 16) e Smart TVs antigas."
201
+ sublabel: "M\xE1x. efici\xEAncia",
202
+ description: "O codec mais eficiente dispon\xEDvel \u2014 arquivo at\xE9 50% menor que H.265. Exige navegador recente (Chrome 70+, Firefox 67+, Safari 17+).",
203
+ warning: "N\xE3o funciona em iPhones com iOS abaixo de 16 nem em Smart TVs mais antigas. Use H.264 se precisar de compatibilidade ampla."
201
204
  }
202
205
  ];
203
206
  var AUDIO_SIMPLE = [
204
207
  {
205
208
  value: "passthrough",
206
- label: "Preservar original",
209
+ label: "Manter original",
207
210
  badge: "Recomendado",
208
- description: "Copia o \xE1udio sem reencodar quando compat\xEDvel com HLS (AAC, AC3, E-AC3). Converte para AAC est\xE9reo como fallback."
211
+ description: "Mant\xE9m o \xE1udio exatamente como est\xE1 no arquivo original, sem perdas. Se o formato n\xE3o for compat\xEDvel com streaming, converte automaticamente para AAC est\xE9reo."
209
212
  },
210
213
  {
211
214
  value: "aac",
212
215
  label: "AAC",
213
- description: "Compatibilidade m\xE1xima. Funciona em todos os players e dispositivos."
216
+ description: "Formato mais compat\xEDvel do mercado \u2014 funciona em absolutamente todos os players, celulares e Smart TVs."
214
217
  },
215
218
  {
216
219
  value: "opus",
217
220
  label: "Opus",
218
- description: "Melhor efici\xEAncia que AAC. Suportado em Chrome, Firefox e Android. N\xE3o suportado em Safari/iOS."
221
+ description: "Melhor qualidade que AAC no mesmo tamanho. Funciona em Chrome, Firefox e Android. N\xE3o suportado no Safari/iPhone."
219
222
  }
220
223
  ];
221
224
  var AUDIO_ADVANCED_CODEC = [
222
- { value: "passthrough", label: "Original", description: "Passthrough quando HLS-compat\xEDvel, AAC como fallback." },
223
- { value: "aac", label: "AAC", description: "Compatibilidade m\xE1xima." },
224
- { value: "opus", label: "Opus", description: "Melhor efici\xEAncia que AAC. Chrome/Firefox/Android." },
225
- { value: "ac3", label: "AC3", description: "Dolby Digital. Compat\xEDvel com HLS e home theaters." },
226
- { value: "eac3", label: "E-AC3", description: "Dolby Digital Plus. Suporta Atmos. Netflix, Disney+, Apple TV+." }
225
+ { value: "passthrough", label: "Original", description: "Copia sem reprocessar quando compat\xEDvel (mant\xE9m AC3, E-AC3, Dolby Atmos). AAC est\xE9reo como fallback." },
226
+ { value: "aac", label: "AAC", description: "Compatibilidade m\xE1xima com todos os dispositivos." },
227
+ { value: "opus", label: "Opus", description: "Qualidade superior ao AAC. Chrome/Firefox/Android." }
227
228
  ];
228
229
  var AUDIO_CHANNELS = [
229
230
  { value: "original", label: "Original", description: "Mant\xE9m os canais do arquivo fonte." },
230
- { value: "stereo", label: "Est\xE9reo", description: "2.0 \u2014 compat\xEDvel com todos os dispositivos." },
231
- { value: "5.1", label: "5.1", description: "Surround 5.1." },
232
- { value: "7.1", label: "7.1", description: "Surround 7.1." }
231
+ { value: "stereo", label: "Est\xE9reo (2.0)", description: "Dois canais \u2014 compat\xEDvel com fones e qualquer dispositivo." },
232
+ { value: "5.1", label: "Surround 5.1", description: "Seis canais. Ideal para home theaters." }
233
233
  ];
234
234
  var RESOLUTIONS = ["144", "240", "360", "480", "720", "1080", "1440", "2160"];
235
235
  var RESOLUTION_LABELS = {
@@ -237,35 +237,61 @@ var RESOLUTION_LABELS = {
237
237
  "240": "240p",
238
238
  "360": "360p",
239
239
  "480": "480p",
240
- "720": "720p",
241
- "1080": "1080p",
242
- "1440": "1440p",
243
- "2160": "4K"
240
+ "720": "720p HD",
241
+ "1080": "1080p Full HD",
242
+ "1440": "1440p 2K",
243
+ "2160": "4K UHD"
244
244
  };
245
- function optBtnStyle(active) {
246
- return active ? { border: "1px solid #6366f1", background: "#6366f1", color: "#fff", padding: "4px 10px", borderRadius: 6, fontSize: 12, fontWeight: 600, cursor: "pointer" } : { border: "1px solid rgba(255,255,255,0.2)", background: "rgba(255,255,255,0.06)", color: "rgba(255,255,255,0.8)", padding: "4px 10px", borderRadius: 6, fontSize: 12, fontWeight: 600, cursor: "pointer" };
245
+ function btn(active, disabled = false) {
246
+ if (disabled) return {
247
+ border: "1px solid rgba(255,255,255,0.08)",
248
+ background: "rgba(255,255,255,0.03)",
249
+ color: "rgba(255,255,255,0.2)",
250
+ padding: "4px 10px",
251
+ borderRadius: 6,
252
+ fontSize: 12,
253
+ fontWeight: 600,
254
+ cursor: "not-allowed"
255
+ };
256
+ return active ? { border: "1px solid #6366f1", background: "#6366f1", color: "#fff", padding: "4px 10px", borderRadius: 6, fontSize: 12, fontWeight: 600, cursor: "pointer" } : { border: "1px solid rgba(255,255,255,0.15)", background: "rgba(255,255,255,0.05)", color: "rgba(255,255,255,0.7)", padding: "4px 10px", borderRadius: 6, fontSize: 12, fontWeight: 600, cursor: "pointer" };
247
257
  }
248
- function SectionLabel({ children }) {
249
- return /* @__PURE__ */ jsx("div", { style: { fontSize: 11, fontWeight: 700, textTransform: "uppercase", letterSpacing: "0.05em", marginBottom: 6, color: "rgba(255,255,255,0.35)" }, children });
258
+ function Label({ children }) {
259
+ return /* @__PURE__ */ jsx("div", { style: { fontSize: 11, fontWeight: 700, textTransform: "uppercase", letterSpacing: "0.05em", marginBottom: 7, color: "rgba(255,255,255,0.28)" }, children });
250
260
  }
251
261
  function Hint({ children }) {
252
- return /* @__PURE__ */ jsx("p", { style: { marginTop: 5, fontSize: 11, color: "rgba(255,255,255,0.4)", lineHeight: 1.5 }, children });
262
+ return /* @__PURE__ */ jsx("p", { style: { marginTop: 5, fontSize: 11, color: "rgba(255,255,255,0.38)", lineHeight: 1.55 }, children });
253
263
  }
254
- function Warning({ children }) {
255
- return /* @__PURE__ */ jsx("div", { style: { marginTop: 5, display: "flex", gap: 5, background: "rgba(251,191,36,0.08)", border: "1px solid rgba(251,191,36,0.2)", borderRadius: 6, padding: "5px 8px" }, children: /* @__PURE__ */ jsxs("span", { style: { fontSize: 11, color: "#fbbf24", lineHeight: 1.5 }, children: [
256
- "\u26A0 ",
257
- children
258
- ] }) });
264
+ function Warn({ children }) {
265
+ return /* @__PURE__ */ jsxs("div", { style: { marginTop: 6, display: "flex", gap: 6, background: "rgba(251,191,36,0.07)", border: "1px solid rgba(251,191,36,0.18)", borderRadius: 7, padding: "6px 10px" }, children: [
266
+ /* @__PURE__ */ jsx("span", { style: { fontSize: 12, flexShrink: 0 }, children: "\u26A0" }),
267
+ /* @__PURE__ */ jsx("span", { style: { fontSize: 11, color: "#fbbf24", lineHeight: 1.55 }, children })
268
+ ] });
259
269
  }
260
- function Toggle({ checked, onToggle, label, hint }) {
261
- return /* @__PURE__ */ jsxs("div", { style: { display: "flex", alignItems: "flex-start", gap: 8, cursor: "pointer", userSelect: "none" }, onClick: onToggle, children: [
262
- /* @__PURE__ */ jsx("span", { style: { position: "relative", display: "inline-block", width: 32, height: 18, borderRadius: 9, flexShrink: 0, marginTop: 1, background: checked ? "#6366f1" : "rgba(255,255,255,0.15)", transition: "background 150ms" }, children: /* @__PURE__ */ jsx("span", { style: { position: "absolute", top: 2, left: checked ? 16 : 2, width: 14, height: 14, borderRadius: "50%", background: "#fff", boxShadow: "0 1px 3px rgba(0,0,0,.3)", transition: "left 150ms" } }) }),
263
- /* @__PURE__ */ jsxs("div", { children: [
264
- /* @__PURE__ */ jsx("span", { style: { fontSize: 12, fontWeight: 500, color: "rgba(255,255,255,0.85)" }, children: label }),
265
- hint && /* @__PURE__ */ jsx("p", { style: { fontSize: 11, color: "rgba(255,255,255,0.4)", marginTop: 1, lineHeight: 1.4 }, children: hint })
266
- ] })
270
+ function Note({ children }) {
271
+ return /* @__PURE__ */ jsxs("div", { style: { marginTop: 6, display: "flex", gap: 6, background: "rgba(99,102,241,0.07)", border: "1px solid rgba(99,102,241,0.18)", borderRadius: 7, padding: "6px 10px" }, children: [
272
+ /* @__PURE__ */ jsx("span", { style: { fontSize: 12, flexShrink: 0 }, children: "\u2139" }),
273
+ /* @__PURE__ */ jsx("span", { style: { fontSize: 11, color: "rgba(165,180,252,0.9)", lineHeight: 1.55 }, children })
267
274
  ] });
268
275
  }
276
+ function Toggle({ checked, onToggle, label, hint, disabled }) {
277
+ return /* @__PURE__ */ jsxs(
278
+ "div",
279
+ {
280
+ style: { display: "flex", alignItems: "flex-start", gap: 8, cursor: disabled ? "not-allowed" : "pointer", userSelect: "none", opacity: disabled ? 0.4 : 1 },
281
+ onClick: () => !disabled && onToggle(),
282
+ children: [
283
+ /* @__PURE__ */ jsx("span", { style: { position: "relative", display: "inline-block", width: 32, height: 18, borderRadius: 9, flexShrink: 0, marginTop: 1, background: checked && !disabled ? "#6366f1" : "rgba(255,255,255,0.12)", transition: "background 150ms" }, children: /* @__PURE__ */ jsx("span", { style: { position: "absolute", top: 2, left: checked && !disabled ? 16 : 2, width: 14, height: 14, borderRadius: "50%", background: "#fff", boxShadow: "0 1px 3px rgba(0,0,0,.3)", transition: "left 150ms" } }) }),
284
+ /* @__PURE__ */ jsxs("div", { children: [
285
+ /* @__PURE__ */ jsx("span", { style: { fontSize: 12, fontWeight: 500, color: disabled ? "rgba(255,255,255,0.4)" : "rgba(255,255,255,0.85)" }, children: label }),
286
+ hint && /* @__PURE__ */ jsx("p", { style: { fontSize: 11, color: "rgba(255,255,255,0.35)", marginTop: 2, lineHeight: 1.5 }, children: hint })
287
+ ] })
288
+ ]
289
+ }
290
+ );
291
+ }
292
+ function Divider() {
293
+ return /* @__PURE__ */ jsx("div", { style: { height: 1, background: "rgba(255,255,255,0.06)", margin: "2px 0" } });
294
+ }
269
295
  function VideoOptions({ value, onChange, style }) {
270
296
  const [advanced, setAdvanced] = useState(false);
271
297
  const codec = value.codec ?? "h264";
@@ -276,7 +302,10 @@ function VideoOptions({ value, onChange, style }) {
276
302
  const audioChannels = value.audioChannels ?? "original";
277
303
  const preserveAtmos = value.preserveAtmos ?? true;
278
304
  const hdrMode = value.hdr ?? "preserve";
279
- const selectedVideoCodec = VIDEO_CODECS.find((c) => c.value === codec);
305
+ const hdrSupported = codec === "h265" || codec === "av1";
306
+ const showAtmosOpt = audioCodec === "passthrough";
307
+ const showAtmosWarn = audioCodec === "aac" || audioCodec === "opus";
308
+ const selectedCodec = VIDEO_CODECS.find((c) => c.value === codec);
280
309
  function toggleRes(r) {
281
310
  if (isAuto) {
282
311
  onChange({ ...value, transcoding: [r] });
@@ -285,130 +314,172 @@ function VideoOptions({ value, onChange, style }) {
285
314
  const next = selectedRes.includes(r) ? selectedRes.filter((x) => x !== r) : [...selectedRes, r];
286
315
  onChange({ ...value, transcoding: next.length === 0 ? "auto" : next });
287
316
  }
288
- const showAtmosOption = audioCodec === "eac3" || audioCodec === "passthrough";
289
- const showAtmosWarning = audioCodec === "aac" || audioCodec === "opus" || audioCodec === "ac3";
290
- return /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-4", style, children: [
317
+ return /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-5", style, children: [
291
318
  /* @__PURE__ */ jsxs("div", { children: [
292
- /* @__PURE__ */ jsx(SectionLabel, { children: "Codec de v\xEDdeo" }),
293
- /* @__PURE__ */ jsx("div", { className: "flex gap-1.5 flex-wrap", children: VIDEO_CODECS.map((c) => /* @__PURE__ */ jsx(
294
- "button",
295
- {
296
- type: "button",
297
- onClick: () => onChange({ ...value, codec: c.value }),
298
- style: optBtnStyle(codec === c.value),
299
- children: c.label
300
- },
301
- c.value
302
- )) }),
303
- selectedVideoCodec && /* @__PURE__ */ jsx(Hint, { children: selectedVideoCodec.description }),
304
- selectedVideoCodec?.warning && /* @__PURE__ */ jsx(Warning, { children: selectedVideoCodec.warning })
305
- ] }),
306
- /* @__PURE__ */ jsxs("div", { children: [
307
- /* @__PURE__ */ jsx(SectionLabel, { children: "Resolu\xE7\xF5es" }),
308
- /* @__PURE__ */ jsxs("div", { className: "flex gap-1.5 flex-wrap", children: [
309
- /* @__PURE__ */ jsx("button", { type: "button", onClick: () => onChange({ ...value, transcoding: "auto" }), style: optBtnStyle(isAuto), children: "Auto" }),
310
- RESOLUTIONS.map((r) => /* @__PURE__ */ jsx("button", { type: "button", onClick: () => toggleRes(r), style: optBtnStyle(!isAuto && selectedRes.includes(r)), children: RESOLUTION_LABELS[r] }, r))
311
- ] }),
312
- isAuto && /* @__PURE__ */ jsx(Hint, { children: "Gera todas as resolu\xE7\xF5es at\xE9 a resolu\xE7\xE3o original do v\xEDdeo." })
313
- ] }),
314
- !advanced && /* @__PURE__ */ jsxs(Fragment, { children: [
315
- /* @__PURE__ */ jsxs("div", { children: [
316
- /* @__PURE__ */ jsx(SectionLabel, { children: "\xC1udio" }),
317
- /* @__PURE__ */ jsx("div", { className: "flex gap-1.5 flex-wrap", children: AUDIO_SIMPLE.map((a) => /* @__PURE__ */ jsxs(
319
+ /* @__PURE__ */ jsx(Label, { children: "Formato de v\xEDdeo" }),
320
+ /* @__PURE__ */ jsxs("div", { className: "mb-4", children: [
321
+ /* @__PURE__ */ jsx("div", { className: "flex gap-1.5 flex-wrap mb-1", children: VIDEO_CODECS.map((c) => /* @__PURE__ */ jsx(
318
322
  "button",
319
323
  {
320
324
  type: "button",
321
- onClick: () => onChange({ ...value, audioCodec: a.value }),
322
- style: optBtnStyle(audioCodec === a.value),
323
- children: [
324
- a.label,
325
- "badge" in a && a.badge ? /* @__PURE__ */ jsx("span", { style: { marginLeft: 5, fontSize: 9, fontWeight: 700, background: "rgba(255,255,255,0.15)", borderRadius: 4, padding: "1px 4px", verticalAlign: "middle" }, children: a.badge }) : null
326
- ]
325
+ onClick: () => onChange({ ...value, codec: c.value }),
326
+ style: btn(codec === c.value),
327
+ children: c.label
327
328
  },
328
- a.value
329
+ c.value
329
330
  )) }),
330
- /* @__PURE__ */ jsx(Hint, { children: AUDIO_SIMPLE.find((a) => a.value === audioCodec)?.description })
331
+ selectedCodec && /* @__PURE__ */ jsxs(Hint, { children: [
332
+ /* @__PURE__ */ jsxs("strong", { style: { color: "rgba(255,255,255,0.55)" }, children: [
333
+ selectedCodec.sublabel,
334
+ "."
335
+ ] }),
336
+ " ",
337
+ selectedCodec.description
338
+ ] }),
339
+ "warning" in (selectedCodec ?? {}) && selectedCodec.warning && /* @__PURE__ */ jsx(Warn, { children: selectedCodec.warning })
331
340
  ] }),
332
- /* @__PURE__ */ jsxs("div", { children: [
333
- /* @__PURE__ */ jsx(SectionLabel, { children: "HDR" }),
334
- /* @__PURE__ */ jsx("div", { className: "flex flex-col gap-2", children: /* @__PURE__ */ jsx(
335
- Toggle,
336
- {
337
- checked: hdrMode === "preserve",
338
- onToggle: () => onChange({ ...value, hdr: hdrMode === "preserve" ? "sdr" : "preserve" }),
339
- label: "Preservar HDR",
340
- hint: "Mant\xE9m HDR10, HDR10+, HLG e Dolby Vision quando o codec de sa\xEDda suporta (H.265 e AV1). Ignorado para H.264."
341
- }
342
- ) })
341
+ /* @__PURE__ */ jsxs("div", { className: "mb-4", children: [
342
+ /* @__PURE__ */ jsx(Label, { children: "Vers\xF5es de qualidade (resolu\xE7\xF5es)" }),
343
+ /* @__PURE__ */ jsxs("div", { className: "flex gap-1.5 flex-wrap mb-1", children: [
344
+ /* @__PURE__ */ jsx("button", { type: "button", onClick: () => onChange({ ...value, transcoding: "auto" }), style: btn(isAuto), children: "Autom\xE1tico" }),
345
+ RESOLUTIONS.map((r) => /* @__PURE__ */ jsx("button", { type: "button", onClick: () => toggleRes(r), style: btn(!isAuto && selectedRes.includes(r)), children: RESOLUTION_LABELS[r] }, r))
346
+ ] }),
347
+ /* @__PURE__ */ jsx(Hint, { children: isAuto ? "Gera automaticamente todas as vers\xF5es at\xE9 a qualidade original do v\xEDdeo." : "Somente as vers\xF5es selecionadas ser\xE3o geradas." })
348
+ ] }),
349
+ /* @__PURE__ */ jsxs("div", { style: { opacity: hdrSupported ? 1 : 0.45 }, children: [
350
+ /* @__PURE__ */ jsx(Label, { children: "Imagem HDR (alto contraste e cores vibrantes)" }),
351
+ !advanced ? /* @__PURE__ */ jsxs(Fragment, { children: [
352
+ /* @__PURE__ */ jsx(
353
+ Toggle,
354
+ {
355
+ checked: hdrMode === "preserve",
356
+ onToggle: () => onChange({ ...value, hdr: hdrMode === "preserve" ? "sdr" : "preserve" }),
357
+ label: "Manter imagem HDR do v\xEDdeo original",
358
+ hint: "Preserva HDR10, HDR10+, HLG e Dolby Vision. S\xF3 funciona com H.265 ou AV1.",
359
+ disabled: !hdrSupported
360
+ }
361
+ ),
362
+ !hdrSupported && /* @__PURE__ */ jsx(Warn, { children: "O H.264 n\xE3o suporta HDR. Se o v\xEDdeo for HDR, a imagem ser\xE1 convertida automaticamente para SDR. Para manter o HDR, escolha H.265 ou AV1." })
363
+ ] }) : /* @__PURE__ */ jsxs(Fragment, { children: [
364
+ /* @__PURE__ */ jsxs("div", { className: "flex gap-1.5 flex-wrap mb-1", children: [
365
+ /* @__PURE__ */ jsx("button", { type: "button", onClick: () => hdrSupported && onChange({ ...value, hdr: "preserve" }), style: btn(hdrMode === "preserve" && hdrSupported, !hdrSupported), children: "Manter HDR" }),
366
+ /* @__PURE__ */ jsx("button", { type: "button", onClick: () => onChange({ ...value, hdr: "sdr" }), style: btn(hdrMode === "sdr" || !hdrSupported), children: "Converter para SDR" })
367
+ ] }),
368
+ !hdrSupported ? /* @__PURE__ */ jsx(Warn, { children: "O H.264 n\xE3o suporta HDR. O v\xEDdeo ser\xE1 convertido para SDR automaticamente. Escolha H.265 ou AV1 para manter o HDR." }) : /* @__PURE__ */ jsx(Hint, { children: hdrMode === "preserve" ? "HDR10, HDR10+, HLG e Dolby Vision preservados. Em telas sem HDR o v\xEDdeo funciona normalmente." : "Convertido para SDR padr\xE3o \u2014 compat\xEDvel com qualquer tela." })
369
+ ] })
343
370
  ] })
344
371
  ] }),
345
- advanced && /* @__PURE__ */ jsxs(Fragment, { children: [
346
- /* @__PURE__ */ jsxs("div", { children: [
347
- /* @__PURE__ */ jsx(SectionLabel, { children: "Codec de \xE1udio" }),
348
- /* @__PURE__ */ jsx("div", { className: "flex gap-1.5 flex-wrap", children: AUDIO_ADVANCED_CODEC.map((a) => /* @__PURE__ */ jsx(
372
+ /* @__PURE__ */ jsx(Divider, {}),
373
+ /* @__PURE__ */ jsxs("div", { children: [
374
+ /* @__PURE__ */ jsx(Label, { children: "\xC1udio" }),
375
+ !advanced ? /* @__PURE__ */ jsxs("div", { className: "mb-4", children: [
376
+ /* @__PURE__ */ jsx("div", { className: "flex gap-1.5 flex-wrap mb-1", children: AUDIO_SIMPLE.map((a) => /* @__PURE__ */ jsxs(
349
377
  "button",
350
378
  {
351
379
  type: "button",
352
380
  onClick: () => onChange({ ...value, audioCodec: a.value }),
353
- style: optBtnStyle(audioCodec === a.value),
354
- children: a.label
381
+ style: btn(audioCodec === a.value),
382
+ children: [
383
+ a.label,
384
+ "badge" in a && a.badge ? /* @__PURE__ */ jsx("span", { style: { marginLeft: 5, fontSize: 9, fontWeight: 700, background: "rgba(255,255,255,0.15)", borderRadius: 4, padding: "1px 4px", verticalAlign: "middle" }, children: a.badge }) : null
385
+ ]
355
386
  },
356
387
  a.value
357
388
  )) }),
358
- /* @__PURE__ */ jsx(Hint, { children: AUDIO_ADVANCED_CODEC.find((a) => a.value === audioCodec)?.description }),
359
- showAtmosWarning && /* @__PURE__ */ jsx(Warning, { children: "Este codec n\xE3o preserva Dolby Atmos. Use E-AC3 ou Original para manter Atmos." })
360
- ] }),
361
- /* @__PURE__ */ jsxs("div", { children: [
362
- /* @__PURE__ */ jsx(SectionLabel, { children: "Canais" }),
363
- /* @__PURE__ */ jsx("div", { className: "flex gap-1.5 flex-wrap", children: AUDIO_CHANNELS.map((c) => /* @__PURE__ */ jsx(
364
- "button",
365
- {
366
- type: "button",
367
- onClick: () => onChange({ ...value, audioChannels: c.value }),
368
- style: optBtnStyle(audioChannels === c.value),
369
- children: c.label
370
- },
371
- c.value
372
- )) }),
373
- /* @__PURE__ */ jsx(Hint, { children: AUDIO_CHANNELS.find((c) => c.value === audioChannels)?.description })
374
- ] }),
375
- showAtmosOption && /* @__PURE__ */ jsxs("div", { children: [
376
- /* @__PURE__ */ jsx(SectionLabel, { children: "Atmos" }),
377
- /* @__PURE__ */ jsx(
378
- Toggle,
379
- {
380
- checked: preserveAtmos,
381
- onToggle: () => onChange({ ...value, preserveAtmos: !preserveAtmos }),
382
- label: "Preservar Dolby Atmos quando dispon\xEDvel",
383
- hint: "Mant\xE9m os metadados Atmos no E-AC3 de sa\xEDda. Efetivo somente com codec E-AC3 ou Original."
384
- }
385
- )
386
- ] }),
387
- /* @__PURE__ */ jsxs("div", { children: [
388
- /* @__PURE__ */ jsx(SectionLabel, { children: "HDR" }),
389
- /* @__PURE__ */ jsxs("div", { className: "flex gap-1.5 flex-wrap", children: [
390
- /* @__PURE__ */ jsx("button", { type: "button", onClick: () => onChange({ ...value, hdr: "preserve" }), style: optBtnStyle(hdrMode === "preserve"), children: "Preservar HDR" }),
391
- /* @__PURE__ */ jsx("button", { type: "button", onClick: () => onChange({ ...value, hdr: "sdr" }), style: optBtnStyle(hdrMode === "sdr"), children: "Converter para SDR" })
389
+ /* @__PURE__ */ jsx(Hint, { children: AUDIO_SIMPLE.find((a) => a.value === audioCodec)?.description })
390
+ ] }) : /* @__PURE__ */ jsxs(Fragment, { children: [
391
+ /* @__PURE__ */ jsxs("div", { className: "mb-4", children: [
392
+ /* @__PURE__ */ jsx(Label, { children: "Formato de \xE1udio (codec)" }),
393
+ /* @__PURE__ */ jsx("div", { className: "flex gap-1.5 flex-wrap mb-1", children: AUDIO_ADVANCED_CODEC.map((a) => /* @__PURE__ */ jsx(
394
+ "button",
395
+ {
396
+ type: "button",
397
+ onClick: () => onChange({ ...value, audioCodec: a.value }),
398
+ style: btn(audioCodec === a.value),
399
+ children: a.label
400
+ },
401
+ a.value
402
+ )) }),
403
+ /* @__PURE__ */ jsx(Hint, { children: AUDIO_ADVANCED_CODEC.find((a) => a.value === audioCodec)?.description }),
404
+ showAtmosWarn && /* @__PURE__ */ jsxs(Warn, { children: [
405
+ "Este formato n\xE3o suporta Dolby Atmos. Use ",
406
+ /* @__PURE__ */ jsx("strong", { children: "Dolby Digital Plus (E-AC3)" }),
407
+ " ou ",
408
+ /* @__PURE__ */ jsx("strong", { children: "Original" }),
409
+ " para manter o som espacial 3D."
410
+ ] })
392
411
  ] }),
393
- /* @__PURE__ */ jsx(Hint, { children: hdrMode === "preserve" ? "HDR10, HDR10+, HLG e Dolby Vision s\xE3o preservados com H.265 e AV1. H.264 ignora HDR." : "Tonemapping para SDR \u2014 compat\xEDvel com todos os displays." })
394
- ] })
412
+ /* @__PURE__ */ jsxs("div", { className: "mb-4", children: [
413
+ /* @__PURE__ */ jsx(Label, { children: "Canais de \xE1udio" }),
414
+ /* @__PURE__ */ jsx("div", { className: "flex gap-1.5 flex-wrap mb-1", children: AUDIO_CHANNELS.map((c) => /* @__PURE__ */ jsx(
415
+ "button",
416
+ {
417
+ type: "button",
418
+ onClick: () => onChange({ ...value, audioChannels: c.value }),
419
+ style: btn(audioChannels === c.value),
420
+ children: c.label
421
+ },
422
+ c.value
423
+ )) }),
424
+ /* @__PURE__ */ jsx(Hint, { children: AUDIO_CHANNELS.find((c) => c.value === audioChannels)?.description })
425
+ ] }),
426
+ showAtmosOpt && /* @__PURE__ */ jsxs("div", { className: "mb-4", children: [
427
+ /* @__PURE__ */ jsx(Label, { children: "Dolby Atmos (som espacial 3D)" }),
428
+ /* @__PURE__ */ jsx(
429
+ Toggle,
430
+ {
431
+ checked: preserveAtmos,
432
+ onToggle: () => onChange({ ...value, preserveAtmos: !preserveAtmos }),
433
+ label: "Manter Dolby Atmos quando dispon\xEDvel no arquivo",
434
+ hint: "Funciona somente com Dolby Digital Plus (E-AC3) ou Original."
435
+ }
436
+ ),
437
+ !preserveAtmos && /* @__PURE__ */ jsx(Note, { children: "Com Atmos desativado, o \xE1udio ser\xE1 mixado em surround convencional sem informa\xE7\xE3o espacial." })
438
+ ] })
439
+ ] }),
440
+ /* @__PURE__ */ jsx(
441
+ Toggle,
442
+ {
443
+ checked: value.separateAudio ?? false,
444
+ onToggle: () => onChange({ ...value, separateAudio: !value.separateAudio }),
445
+ label: "Exportar faixa de \xE1udio separada",
446
+ hint: "Gera tamb\xE9m um arquivo de \xE1udio independente do v\xEDdeo."
447
+ }
448
+ )
395
449
  ] }),
450
+ /* @__PURE__ */ jsx(Divider, {}),
396
451
  /* @__PURE__ */ jsxs("div", { children: [
397
- /* @__PURE__ */ jsx(SectionLabel, { children: "Recursos" }),
398
- /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-2.5", children: [
399
- /* @__PURE__ */ jsx(Toggle, { checked: value.thumbnails ?? true, onToggle: () => onChange({ ...value, thumbnails: !(value.thumbnails ?? true) }), label: "Gerar thumbnails" }),
400
- /* @__PURE__ */ jsx(Toggle, { checked: value.storyboard ?? false, onToggle: () => onChange({ ...value, storyboard: !value.storyboard }), label: "Gerar storyboard" }),
401
- /* @__PURE__ */ jsx(Toggle, { checked: value.autoCaptions ?? false, onToggle: () => onChange({ ...value, autoCaptions: !value.autoCaptions }), label: "Legendas autom\xE1ticas (IA)" }),
402
- /* @__PURE__ */ jsx(Toggle, { checked: value.separateAudio ?? false, onToggle: () => onChange({ ...value, separateAudio: !value.separateAudio }), label: "Separar faixa de \xE1udio" })
403
- ] })
452
+ /* @__PURE__ */ jsx(Label, { children: "Miniaturas (thumbnails)" }),
453
+ /* @__PURE__ */ jsx(
454
+ Toggle,
455
+ {
456
+ checked: value.thumbnails ?? true,
457
+ onToggle: () => onChange({ ...value, thumbnails: !(value.thumbnails ?? true) }),
458
+ label: "Gerar miniaturas automaticamente",
459
+ hint: "Imagens de pr\xE9via usadas em players, listas e compartilhamentos. Recomendado manter ativo."
460
+ }
461
+ )
462
+ ] }),
463
+ /* @__PURE__ */ jsx(Divider, {}),
464
+ /* @__PURE__ */ jsxs("div", { children: [
465
+ /* @__PURE__ */ jsx(Label, { children: "Storyboard" }),
466
+ /* @__PURE__ */ jsx(
467
+ Toggle,
468
+ {
469
+ checked: value.storyboard ?? false,
470
+ onToggle: () => onChange({ ...value, storyboard: !value.storyboard }),
471
+ label: "Gerar storyboard para pr\xE9-visualiza\xE7\xE3o",
472
+ hint: "Mostra frames do v\xEDdeo ao passar o mouse na barra de progresso do player. Aumenta levemente o tempo de processamento."
473
+ }
474
+ )
404
475
  ] }),
405
476
  /* @__PURE__ */ jsx(
406
477
  "button",
407
478
  {
408
479
  type: "button",
409
480
  onClick: () => setAdvanced((v) => !v),
410
- style: { alignSelf: "flex-start", fontSize: 11, color: "rgba(255,255,255,0.35)", background: "none", border: "none", cursor: "pointer", padding: 0, textDecoration: "underline", textUnderlineOffset: 3 },
411
- children: advanced ? "\u2190 Modo simples" : "Op\xE7\xF5es avan\xE7adas \u2192"
481
+ style: { alignSelf: "flex-start", fontSize: 11, color: "rgba(255,255,255,0.3)", background: "none", border: "none", cursor: "pointer", padding: 0, textDecoration: "underline", textUnderlineOffset: 3 },
482
+ children: advanced ? "\u2190 Voltar ao modo simples" : "Configura\xE7\xF5es avan\xE7adas de \xE1udio e HDR \u2192"
412
483
  }
413
484
  )
414
485
  ] });