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