@geekapps/silo-elements-nextjs 0.3.4 → 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.
@@ -395,50 +395,50 @@ var VIDEO_CODECS = [
395
395
  {
396
396
  value: "h264",
397
397
  label: "H.264",
398
- description: "Compatibilidade universal \u2014 funciona em todos os players, browsers e Smart TVs."
398
+ sublabel: "Compat\xEDvel com tudo",
399
+ 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."
399
400
  },
400
401
  {
401
402
  value: "h265",
402
403
  label: "H.265",
403
- description: "50% menor que H.264 com a mesma qualidade. Requer player moderno."
404
+ sublabel: "Menor tamanho",
405
+ 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."
404
406
  },
405
407
  {
406
408
  value: "av1",
407
409
  label: "AV1",
408
- description: "M\xE1xima efici\xEAncia \u2014 at\xE9 50% menor que H.265. Chrome 70+, Firefox 67+, Safari 17+.",
409
- warning: "N\xE3o suportado em iPhones antigos (iOS < 16) e Smart TVs antigas."
410
+ sublabel: "M\xE1x. efici\xEAncia",
411
+ 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+).",
412
+ 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."
410
413
  }
411
414
  ];
412
415
  var AUDIO_SIMPLE = [
413
416
  {
414
417
  value: "passthrough",
415
- label: "Preservar original",
418
+ label: "Manter original",
416
419
  badge: "Recomendado",
417
- description: "Copia o \xE1udio sem reencodar quando compat\xEDvel com HLS (AAC, AC3, E-AC3). Converte para AAC est\xE9reo como fallback."
420
+ 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."
418
421
  },
419
422
  {
420
423
  value: "aac",
421
424
  label: "AAC",
422
- description: "Compatibilidade m\xE1xima. Funciona em todos os players e dispositivos."
425
+ description: "Formato mais compat\xEDvel do mercado \u2014 funciona em absolutamente todos os players, celulares e Smart TVs."
423
426
  },
424
427
  {
425
428
  value: "opus",
426
429
  label: "Opus",
427
- description: "Melhor efici\xEAncia que AAC. Suportado em Chrome, Firefox e Android. N\xE3o suportado em Safari/iOS."
430
+ description: "Melhor qualidade que AAC no mesmo tamanho. Funciona em Chrome, Firefox e Android. N\xE3o suportado no Safari/iPhone."
428
431
  }
429
432
  ];
430
433
  var AUDIO_ADVANCED_CODEC = [
431
- { value: "passthrough", label: "Original", description: "Passthrough quando HLS-compat\xEDvel, AAC como fallback." },
432
- { value: "aac", label: "AAC", description: "Compatibilidade m\xE1xima." },
433
- { value: "opus", label: "Opus", description: "Melhor efici\xEAncia que AAC. Chrome/Firefox/Android." },
434
- { value: "ac3", label: "AC3", description: "Dolby Digital. Compat\xEDvel com HLS e home theaters." },
435
- { value: "eac3", label: "E-AC3", description: "Dolby Digital Plus. Suporta Atmos. Netflix, Disney+, Apple TV+." }
434
+ { value: "passthrough", label: "Original", description: "Copia sem reprocessar quando compat\xEDvel (mant\xE9m AC3, E-AC3, Dolby Atmos). AAC est\xE9reo como fallback." },
435
+ { value: "aac", label: "AAC", description: "Compatibilidade m\xE1xima com todos os dispositivos." },
436
+ { value: "opus", label: "Opus", description: "Qualidade superior ao AAC. Chrome/Firefox/Android." }
436
437
  ];
437
438
  var AUDIO_CHANNELS = [
438
439
  { value: "original", label: "Original", description: "Mant\xE9m os canais do arquivo fonte." },
439
- { value: "stereo", label: "Est\xE9reo", description: "2.0 \u2014 compat\xEDvel com todos os dispositivos." },
440
- { value: "5.1", label: "5.1", description: "Surround 5.1." },
441
- { value: "7.1", label: "7.1", description: "Surround 7.1." }
440
+ { value: "stereo", label: "Est\xE9reo (2.0)", description: "Dois canais \u2014 compat\xEDvel com fones e qualquer dispositivo." },
441
+ { value: "5.1", label: "Surround 5.1", description: "Seis canais. Ideal para home theaters." }
442
442
  ];
443
443
  var RESOLUTIONS = ["144", "240", "360", "480", "720", "1080", "1440", "2160"];
444
444
  var RESOLUTION_LABELS = {
@@ -446,35 +446,61 @@ var RESOLUTION_LABELS = {
446
446
  "240": "240p",
447
447
  "360": "360p",
448
448
  "480": "480p",
449
- "720": "720p",
450
- "1080": "1080p",
451
- "1440": "1440p",
452
- "2160": "4K"
449
+ "720": "720p HD",
450
+ "1080": "1080p Full HD",
451
+ "1440": "1440p 2K",
452
+ "2160": "4K UHD"
453
453
  };
454
- function optBtnStyle(active) {
455
- 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" };
454
+ function btn(active, disabled = false) {
455
+ if (disabled) return {
456
+ border: "1px solid rgba(255,255,255,0.08)",
457
+ background: "rgba(255,255,255,0.03)",
458
+ color: "rgba(255,255,255,0.2)",
459
+ padding: "4px 10px",
460
+ borderRadius: 6,
461
+ fontSize: 12,
462
+ fontWeight: 600,
463
+ cursor: "not-allowed"
464
+ };
465
+ 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" };
456
466
  }
457
- function SectionLabel({ children }) {
458
- return /* @__PURE__ */ jsx("div", { style: { fontSize: 11, fontWeight: 700, textTransform: "uppercase", letterSpacing: "0.05em", marginBottom: 6, color: "rgba(255,255,255,0.35)" }, children });
467
+ function Label({ children }) {
468
+ return /* @__PURE__ */ jsx("div", { style: { fontSize: 11, fontWeight: 700, textTransform: "uppercase", letterSpacing: "0.05em", marginBottom: 7, color: "rgba(255,255,255,0.28)" }, children });
459
469
  }
460
470
  function Hint({ children }) {
461
- return /* @__PURE__ */ jsx("p", { style: { marginTop: 5, fontSize: 11, color: "rgba(255,255,255,0.4)", lineHeight: 1.5 }, children });
471
+ return /* @__PURE__ */ jsx("p", { style: { marginTop: 5, fontSize: 11, color: "rgba(255,255,255,0.38)", lineHeight: 1.55 }, children });
462
472
  }
463
- function Warning({ children }) {
464
- 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: [
465
- "\u26A0 ",
466
- children
467
- ] }) });
473
+ function Warn({ children }) {
474
+ 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: [
475
+ /* @__PURE__ */ jsx("span", { style: { fontSize: 12, flexShrink: 0 }, children: "\u26A0" }),
476
+ /* @__PURE__ */ jsx("span", { style: { fontSize: 11, color: "#fbbf24", lineHeight: 1.55 }, children })
477
+ ] });
468
478
  }
469
- function Toggle({ checked, onToggle, label, hint }) {
470
- return /* @__PURE__ */ jsxs("div", { style: { display: "flex", alignItems: "flex-start", gap: 8, cursor: "pointer", userSelect: "none" }, onClick: onToggle, children: [
471
- /* @__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" } }) }),
472
- /* @__PURE__ */ jsxs("div", { children: [
473
- /* @__PURE__ */ jsx("span", { style: { fontSize: 12, fontWeight: 500, color: "rgba(255,255,255,0.85)" }, children: label }),
474
- hint && /* @__PURE__ */ jsx("p", { style: { fontSize: 11, color: "rgba(255,255,255,0.4)", marginTop: 1, lineHeight: 1.4 }, children: hint })
475
- ] })
479
+ function Note({ children }) {
480
+ 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: [
481
+ /* @__PURE__ */ jsx("span", { style: { fontSize: 12, flexShrink: 0 }, children: "\u2139" }),
482
+ /* @__PURE__ */ jsx("span", { style: { fontSize: 11, color: "rgba(165,180,252,0.9)", lineHeight: 1.55 }, children })
476
483
  ] });
477
484
  }
485
+ function Toggle({ checked, onToggle, label, hint, disabled }) {
486
+ return /* @__PURE__ */ jsxs(
487
+ "div",
488
+ {
489
+ style: { display: "flex", alignItems: "flex-start", gap: 8, cursor: disabled ? "not-allowed" : "pointer", userSelect: "none", opacity: disabled ? 0.4 : 1 },
490
+ onClick: () => !disabled && onToggle(),
491
+ children: [
492
+ /* @__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" } }) }),
493
+ /* @__PURE__ */ jsxs("div", { children: [
494
+ /* @__PURE__ */ jsx("span", { style: { fontSize: 12, fontWeight: 500, color: disabled ? "rgba(255,255,255,0.4)" : "rgba(255,255,255,0.85)" }, children: label }),
495
+ hint && /* @__PURE__ */ jsx("p", { style: { fontSize: 11, color: "rgba(255,255,255,0.35)", marginTop: 2, lineHeight: 1.5 }, children: hint })
496
+ ] })
497
+ ]
498
+ }
499
+ );
500
+ }
501
+ function Divider() {
502
+ return /* @__PURE__ */ jsx("div", { style: { height: 1, background: "rgba(255,255,255,0.06)", margin: "2px 0" } });
503
+ }
478
504
  function VideoOptions({ value, onChange, style }) {
479
505
  const [advanced, setAdvanced] = useState(false);
480
506
  const codec = value.codec ?? "h264";
@@ -485,7 +511,10 @@ function VideoOptions({ value, onChange, style }) {
485
511
  const audioChannels = value.audioChannels ?? "original";
486
512
  const preserveAtmos = value.preserveAtmos ?? true;
487
513
  const hdrMode = value.hdr ?? "preserve";
488
- const selectedVideoCodec = VIDEO_CODECS.find((c) => c.value === codec);
514
+ const hdrSupported = codec === "h265" || codec === "av1";
515
+ const showAtmosOpt = audioCodec === "passthrough";
516
+ const showAtmosWarn = audioCodec === "aac" || audioCodec === "opus";
517
+ const selectedCodec = VIDEO_CODECS.find((c) => c.value === codec);
489
518
  function toggleRes(r) {
490
519
  if (isAuto) {
491
520
  onChange({ ...value, transcoding: [r] });
@@ -494,130 +523,172 @@ function VideoOptions({ value, onChange, style }) {
494
523
  const next = selectedRes.includes(r) ? selectedRes.filter((x) => x !== r) : [...selectedRes, r];
495
524
  onChange({ ...value, transcoding: next.length === 0 ? "auto" : next });
496
525
  }
497
- const showAtmosOption = audioCodec === "eac3" || audioCodec === "passthrough";
498
- const showAtmosWarning = audioCodec === "aac" || audioCodec === "opus" || audioCodec === "ac3";
499
- return /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-4", style, children: [
500
- /* @__PURE__ */ jsxs("div", { children: [
501
- /* @__PURE__ */ jsx(SectionLabel, { children: "Codec de v\xEDdeo" }),
502
- /* @__PURE__ */ jsx("div", { className: "flex gap-1.5 flex-wrap", children: VIDEO_CODECS.map((c) => /* @__PURE__ */ jsx(
503
- "button",
504
- {
505
- type: "button",
506
- onClick: () => onChange({ ...value, codec: c.value }),
507
- style: optBtnStyle(codec === c.value),
508
- children: c.label
509
- },
510
- c.value
511
- )) }),
512
- selectedVideoCodec && /* @__PURE__ */ jsx(Hint, { children: selectedVideoCodec.description }),
513
- selectedVideoCodec?.warning && /* @__PURE__ */ jsx(Warning, { children: selectedVideoCodec.warning })
514
- ] }),
526
+ return /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-5", style, children: [
515
527
  /* @__PURE__ */ jsxs("div", { children: [
516
- /* @__PURE__ */ jsx(SectionLabel, { children: "Resolu\xE7\xF5es" }),
517
- /* @__PURE__ */ jsxs("div", { className: "flex gap-1.5 flex-wrap", children: [
518
- /* @__PURE__ */ jsx("button", { type: "button", onClick: () => onChange({ ...value, transcoding: "auto" }), style: optBtnStyle(isAuto), children: "Auto" }),
519
- RESOLUTIONS.map((r) => /* @__PURE__ */ jsx("button", { type: "button", onClick: () => toggleRes(r), style: optBtnStyle(!isAuto && selectedRes.includes(r)), children: RESOLUTION_LABELS[r] }, r))
520
- ] }),
521
- isAuto && /* @__PURE__ */ jsx(Hint, { children: "Gera todas as resolu\xE7\xF5es at\xE9 a resolu\xE7\xE3o original do v\xEDdeo." })
522
- ] }),
523
- !advanced && /* @__PURE__ */ jsxs(Fragment, { children: [
524
- /* @__PURE__ */ jsxs("div", { children: [
525
- /* @__PURE__ */ jsx(SectionLabel, { children: "\xC1udio" }),
526
- /* @__PURE__ */ jsx("div", { className: "flex gap-1.5 flex-wrap", children: AUDIO_SIMPLE.map((a) => /* @__PURE__ */ jsxs(
528
+ /* @__PURE__ */ jsx(Label, { children: "Formato de v\xEDdeo" }),
529
+ /* @__PURE__ */ jsxs("div", { className: "mb-4", children: [
530
+ /* @__PURE__ */ jsx("div", { className: "flex gap-1.5 flex-wrap mb-1", children: VIDEO_CODECS.map((c) => /* @__PURE__ */ jsx(
527
531
  "button",
528
532
  {
529
533
  type: "button",
530
- onClick: () => onChange({ ...value, audioCodec: a.value }),
531
- style: optBtnStyle(audioCodec === a.value),
532
- children: [
533
- a.label,
534
- "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
535
- ]
534
+ onClick: () => onChange({ ...value, codec: c.value }),
535
+ style: btn(codec === c.value),
536
+ children: c.label
536
537
  },
537
- a.value
538
+ c.value
538
539
  )) }),
539
- /* @__PURE__ */ jsx(Hint, { children: AUDIO_SIMPLE.find((a) => a.value === audioCodec)?.description })
540
+ selectedCodec && /* @__PURE__ */ jsxs(Hint, { children: [
541
+ /* @__PURE__ */ jsxs("strong", { style: { color: "rgba(255,255,255,0.55)" }, children: [
542
+ selectedCodec.sublabel,
543
+ "."
544
+ ] }),
545
+ " ",
546
+ selectedCodec.description
547
+ ] }),
548
+ "warning" in (selectedCodec ?? {}) && selectedCodec.warning && /* @__PURE__ */ jsx(Warn, { children: selectedCodec.warning })
540
549
  ] }),
541
- /* @__PURE__ */ jsxs("div", { children: [
542
- /* @__PURE__ */ jsx(SectionLabel, { children: "HDR" }),
543
- /* @__PURE__ */ jsx("div", { className: "flex flex-col gap-2", children: /* @__PURE__ */ jsx(
544
- Toggle,
545
- {
546
- checked: hdrMode === "preserve",
547
- onToggle: () => onChange({ ...value, hdr: hdrMode === "preserve" ? "sdr" : "preserve" }),
548
- label: "Preservar HDR",
549
- hint: "Mant\xE9m HDR10, HDR10+, HLG e Dolby Vision quando o codec de sa\xEDda suporta (H.265 e AV1). Ignorado para H.264."
550
- }
551
- ) })
550
+ /* @__PURE__ */ jsxs("div", { className: "mb-4", children: [
551
+ /* @__PURE__ */ jsx(Label, { children: "Vers\xF5es de qualidade (resolu\xE7\xF5es)" }),
552
+ /* @__PURE__ */ jsxs("div", { className: "flex gap-1.5 flex-wrap mb-1", children: [
553
+ /* @__PURE__ */ jsx("button", { type: "button", onClick: () => onChange({ ...value, transcoding: "auto" }), style: btn(isAuto), children: "Autom\xE1tico" }),
554
+ RESOLUTIONS.map((r) => /* @__PURE__ */ jsx("button", { type: "button", onClick: () => toggleRes(r), style: btn(!isAuto && selectedRes.includes(r)), children: RESOLUTION_LABELS[r] }, r))
555
+ ] }),
556
+ /* @__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." })
557
+ ] }),
558
+ /* @__PURE__ */ jsxs("div", { style: { opacity: hdrSupported ? 1 : 0.45 }, children: [
559
+ /* @__PURE__ */ jsx(Label, { children: "Imagem HDR (alto contraste e cores vibrantes)" }),
560
+ !advanced ? /* @__PURE__ */ jsxs(Fragment, { children: [
561
+ /* @__PURE__ */ jsx(
562
+ Toggle,
563
+ {
564
+ checked: hdrMode === "preserve",
565
+ onToggle: () => onChange({ ...value, hdr: hdrMode === "preserve" ? "sdr" : "preserve" }),
566
+ label: "Manter imagem HDR do v\xEDdeo original",
567
+ hint: "Preserva HDR10, HDR10+, HLG e Dolby Vision. S\xF3 funciona com H.265 ou AV1.",
568
+ disabled: !hdrSupported
569
+ }
570
+ ),
571
+ !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." })
572
+ ] }) : /* @__PURE__ */ jsxs(Fragment, { children: [
573
+ /* @__PURE__ */ jsxs("div", { className: "flex gap-1.5 flex-wrap mb-1", children: [
574
+ /* @__PURE__ */ jsx("button", { type: "button", onClick: () => hdrSupported && onChange({ ...value, hdr: "preserve" }), style: btn(hdrMode === "preserve" && hdrSupported, !hdrSupported), children: "Manter HDR" }),
575
+ /* @__PURE__ */ jsx("button", { type: "button", onClick: () => onChange({ ...value, hdr: "sdr" }), style: btn(hdrMode === "sdr" || !hdrSupported), children: "Converter para SDR" })
576
+ ] }),
577
+ !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." })
578
+ ] })
552
579
  ] })
553
580
  ] }),
554
- advanced && /* @__PURE__ */ jsxs(Fragment, { children: [
555
- /* @__PURE__ */ jsxs("div", { children: [
556
- /* @__PURE__ */ jsx(SectionLabel, { children: "Codec de \xE1udio" }),
557
- /* @__PURE__ */ jsx("div", { className: "flex gap-1.5 flex-wrap", children: AUDIO_ADVANCED_CODEC.map((a) => /* @__PURE__ */ jsx(
581
+ /* @__PURE__ */ jsx(Divider, {}),
582
+ /* @__PURE__ */ jsxs("div", { children: [
583
+ /* @__PURE__ */ jsx(Label, { children: "\xC1udio" }),
584
+ !advanced ? /* @__PURE__ */ jsxs("div", { className: "mb-4", children: [
585
+ /* @__PURE__ */ jsx("div", { className: "flex gap-1.5 flex-wrap mb-1", children: AUDIO_SIMPLE.map((a) => /* @__PURE__ */ jsxs(
558
586
  "button",
559
587
  {
560
588
  type: "button",
561
589
  onClick: () => onChange({ ...value, audioCodec: a.value }),
562
- style: optBtnStyle(audioCodec === a.value),
563
- children: a.label
590
+ style: btn(audioCodec === a.value),
591
+ children: [
592
+ a.label,
593
+ "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
594
+ ]
564
595
  },
565
596
  a.value
566
597
  )) }),
567
- /* @__PURE__ */ jsx(Hint, { children: AUDIO_ADVANCED_CODEC.find((a) => a.value === audioCodec)?.description }),
568
- showAtmosWarning && /* @__PURE__ */ jsx(Warning, { children: "Este codec n\xE3o preserva Dolby Atmos. Use E-AC3 ou Original para manter Atmos." })
569
- ] }),
570
- /* @__PURE__ */ jsxs("div", { children: [
571
- /* @__PURE__ */ jsx(SectionLabel, { children: "Canais" }),
572
- /* @__PURE__ */ jsx("div", { className: "flex gap-1.5 flex-wrap", children: AUDIO_CHANNELS.map((c) => /* @__PURE__ */ jsx(
573
- "button",
574
- {
575
- type: "button",
576
- onClick: () => onChange({ ...value, audioChannels: c.value }),
577
- style: optBtnStyle(audioChannels === c.value),
578
- children: c.label
579
- },
580
- c.value
581
- )) }),
582
- /* @__PURE__ */ jsx(Hint, { children: AUDIO_CHANNELS.find((c) => c.value === audioChannels)?.description })
583
- ] }),
584
- showAtmosOption && /* @__PURE__ */ jsxs("div", { children: [
585
- /* @__PURE__ */ jsx(SectionLabel, { children: "Atmos" }),
586
- /* @__PURE__ */ jsx(
587
- Toggle,
588
- {
589
- checked: preserveAtmos,
590
- onToggle: () => onChange({ ...value, preserveAtmos: !preserveAtmos }),
591
- label: "Preservar Dolby Atmos quando dispon\xEDvel",
592
- hint: "Mant\xE9m os metadados Atmos no E-AC3 de sa\xEDda. Efetivo somente com codec E-AC3 ou Original."
593
- }
594
- )
595
- ] }),
596
- /* @__PURE__ */ jsxs("div", { children: [
597
- /* @__PURE__ */ jsx(SectionLabel, { children: "HDR" }),
598
- /* @__PURE__ */ jsxs("div", { className: "flex gap-1.5 flex-wrap", children: [
599
- /* @__PURE__ */ jsx("button", { type: "button", onClick: () => onChange({ ...value, hdr: "preserve" }), style: optBtnStyle(hdrMode === "preserve"), children: "Preservar HDR" }),
600
- /* @__PURE__ */ jsx("button", { type: "button", onClick: () => onChange({ ...value, hdr: "sdr" }), style: optBtnStyle(hdrMode === "sdr"), children: "Converter para SDR" })
598
+ /* @__PURE__ */ jsx(Hint, { children: AUDIO_SIMPLE.find((a) => a.value === audioCodec)?.description })
599
+ ] }) : /* @__PURE__ */ jsxs(Fragment, { children: [
600
+ /* @__PURE__ */ jsxs("div", { className: "mb-4", children: [
601
+ /* @__PURE__ */ jsx(Label, { children: "Formato de \xE1udio (codec)" }),
602
+ /* @__PURE__ */ jsx("div", { className: "flex gap-1.5 flex-wrap mb-1", children: AUDIO_ADVANCED_CODEC.map((a) => /* @__PURE__ */ jsx(
603
+ "button",
604
+ {
605
+ type: "button",
606
+ onClick: () => onChange({ ...value, audioCodec: a.value }),
607
+ style: btn(audioCodec === a.value),
608
+ children: a.label
609
+ },
610
+ a.value
611
+ )) }),
612
+ /* @__PURE__ */ jsx(Hint, { children: AUDIO_ADVANCED_CODEC.find((a) => a.value === audioCodec)?.description }),
613
+ showAtmosWarn && /* @__PURE__ */ jsxs(Warn, { children: [
614
+ "Este formato n\xE3o suporta Dolby Atmos. Use ",
615
+ /* @__PURE__ */ jsx("strong", { children: "Dolby Digital Plus (E-AC3)" }),
616
+ " ou ",
617
+ /* @__PURE__ */ jsx("strong", { children: "Original" }),
618
+ " para manter o som espacial 3D."
619
+ ] })
601
620
  ] }),
602
- /* @__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." })
603
- ] })
621
+ /* @__PURE__ */ jsxs("div", { className: "mb-4", children: [
622
+ /* @__PURE__ */ jsx(Label, { children: "Canais de \xE1udio" }),
623
+ /* @__PURE__ */ jsx("div", { className: "flex gap-1.5 flex-wrap mb-1", children: AUDIO_CHANNELS.map((c) => /* @__PURE__ */ jsx(
624
+ "button",
625
+ {
626
+ type: "button",
627
+ onClick: () => onChange({ ...value, audioChannels: c.value }),
628
+ style: btn(audioChannels === c.value),
629
+ children: c.label
630
+ },
631
+ c.value
632
+ )) }),
633
+ /* @__PURE__ */ jsx(Hint, { children: AUDIO_CHANNELS.find((c) => c.value === audioChannels)?.description })
634
+ ] }),
635
+ showAtmosOpt && /* @__PURE__ */ jsxs("div", { className: "mb-4", children: [
636
+ /* @__PURE__ */ jsx(Label, { children: "Dolby Atmos (som espacial 3D)" }),
637
+ /* @__PURE__ */ jsx(
638
+ Toggle,
639
+ {
640
+ checked: preserveAtmos,
641
+ onToggle: () => onChange({ ...value, preserveAtmos: !preserveAtmos }),
642
+ label: "Manter Dolby Atmos quando dispon\xEDvel no arquivo",
643
+ hint: "Funciona somente com Dolby Digital Plus (E-AC3) ou Original."
644
+ }
645
+ ),
646
+ !preserveAtmos && /* @__PURE__ */ jsx(Note, { children: "Com Atmos desativado, o \xE1udio ser\xE1 mixado em surround convencional sem informa\xE7\xE3o espacial." })
647
+ ] })
648
+ ] }),
649
+ /* @__PURE__ */ jsx(
650
+ Toggle,
651
+ {
652
+ checked: value.separateAudio ?? false,
653
+ onToggle: () => onChange({ ...value, separateAudio: !value.separateAudio }),
654
+ label: "Exportar faixa de \xE1udio separada",
655
+ hint: "Gera tamb\xE9m um arquivo de \xE1udio independente do v\xEDdeo."
656
+ }
657
+ )
604
658
  ] }),
659
+ /* @__PURE__ */ jsx(Divider, {}),
605
660
  /* @__PURE__ */ jsxs("div", { children: [
606
- /* @__PURE__ */ jsx(SectionLabel, { children: "Recursos" }),
607
- /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-2.5", children: [
608
- /* @__PURE__ */ jsx(Toggle, { checked: value.thumbnails ?? true, onToggle: () => onChange({ ...value, thumbnails: !(value.thumbnails ?? true) }), label: "Gerar thumbnails" }),
609
- /* @__PURE__ */ jsx(Toggle, { checked: value.storyboard ?? false, onToggle: () => onChange({ ...value, storyboard: !value.storyboard }), label: "Gerar storyboard" }),
610
- /* @__PURE__ */ jsx(Toggle, { checked: value.autoCaptions ?? false, onToggle: () => onChange({ ...value, autoCaptions: !value.autoCaptions }), label: "Legendas autom\xE1ticas (IA)" }),
611
- /* @__PURE__ */ jsx(Toggle, { checked: value.separateAudio ?? false, onToggle: () => onChange({ ...value, separateAudio: !value.separateAudio }), label: "Separar faixa de \xE1udio" })
612
- ] })
661
+ /* @__PURE__ */ jsx(Label, { children: "Miniaturas (thumbnails)" }),
662
+ /* @__PURE__ */ jsx(
663
+ Toggle,
664
+ {
665
+ checked: value.thumbnails ?? true,
666
+ onToggle: () => onChange({ ...value, thumbnails: !(value.thumbnails ?? true) }),
667
+ label: "Gerar miniaturas automaticamente",
668
+ hint: "Imagens de pr\xE9via usadas em players, listas e compartilhamentos. Recomendado manter ativo."
669
+ }
670
+ )
671
+ ] }),
672
+ /* @__PURE__ */ jsx(Divider, {}),
673
+ /* @__PURE__ */ jsxs("div", { children: [
674
+ /* @__PURE__ */ jsx(Label, { children: "Storyboard" }),
675
+ /* @__PURE__ */ jsx(
676
+ Toggle,
677
+ {
678
+ checked: value.storyboard ?? false,
679
+ onToggle: () => onChange({ ...value, storyboard: !value.storyboard }),
680
+ label: "Gerar storyboard para pr\xE9-visualiza\xE7\xE3o",
681
+ hint: "Mostra frames do v\xEDdeo ao passar o mouse na barra de progresso do player. Aumenta levemente o tempo de processamento."
682
+ }
683
+ )
613
684
  ] }),
614
685
  /* @__PURE__ */ jsx(
615
686
  "button",
616
687
  {
617
688
  type: "button",
618
689
  onClick: () => setAdvanced((v) => !v),
619
- 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 },
620
- children: advanced ? "\u2190 Modo simples" : "Op\xE7\xF5es avan\xE7adas \u2192"
690
+ 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 },
691
+ children: advanced ? "\u2190 Voltar ao modo simples" : "Configura\xE7\xF5es avan\xE7adas de \xE1udio e HDR \u2192"
621
692
  }
622
693
  )
623
694
  ] });