@nodaro/shared 3.57.0 → 3.59.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.
- package/dist/{chunk-3SH5ZUNJ.js → chunk-2S7YYCRT.js} +4 -4
- package/dist/{chunk-3SH5ZUNJ.js.map → chunk-2S7YYCRT.js.map} +1 -1
- package/dist/{chunk-IQS3WQXQ.js → chunk-2VQHPILW.js} +55 -24
- package/dist/chunk-2VQHPILW.js.map +1 -0
- package/dist/{chunk-D56ALOLY.js → chunk-3R2KVYXN.js} +3 -3
- package/dist/{chunk-D56ALOLY.js.map → chunk-3R2KVYXN.js.map} +1 -1
- package/dist/{chunk-OWNPYQSH.cjs → chunk-4GGLKRYI.cjs} +16 -3
- package/dist/chunk-4GGLKRYI.cjs.map +1 -0
- package/dist/{chunk-ALVO5Q36.cjs → chunk-62RC6K62.cjs} +4 -4
- package/dist/{chunk-ALVO5Q36.cjs.map → chunk-62RC6K62.cjs.map} +1 -1
- package/dist/chunk-6VXDW2U3.cjs +27 -0
- package/dist/{chunk-RKTWLAJO.cjs.map → chunk-6VXDW2U3.cjs.map} +1 -1
- package/dist/{chunk-S7FCFQ6X.js → chunk-CF4S4N5X.js} +16 -4
- package/dist/chunk-CF4S4N5X.js.map +1 -0
- package/dist/{chunk-NJTLBZIP.cjs → chunk-D574HZ35.cjs} +43 -43
- package/dist/{chunk-NJTLBZIP.cjs.map → chunk-D574HZ35.cjs.map} +1 -1
- package/dist/{chunk-P5KH7GAI.cjs → chunk-DKZGLIFW.cjs} +4 -4
- package/dist/{chunk-P5KH7GAI.cjs.map → chunk-DKZGLIFW.cjs.map} +1 -1
- package/dist/{chunk-6NZWWMVY.js → chunk-EO4W4MA3.js} +4 -4
- package/dist/{chunk-6NZWWMVY.js.map → chunk-EO4W4MA3.js.map} +1 -1
- package/dist/{chunk-INGQNLY4.js → chunk-FHCMYGBV.js} +3 -3
- package/dist/{chunk-INGQNLY4.js.map → chunk-FHCMYGBV.js.map} +1 -1
- package/dist/{chunk-QTTVIQJP.js → chunk-FJCRWDU5.js} +4 -4
- package/dist/{chunk-QTTVIQJP.js.map → chunk-FJCRWDU5.js.map} +1 -1
- package/dist/{chunk-FVKCNAEQ.js → chunk-HP3YIWNJ.js} +9 -4
- package/dist/chunk-HP3YIWNJ.js.map +1 -0
- package/dist/{chunk-UJJUX6NW.cjs → chunk-HW6TLOK4.cjs} +9 -3
- package/dist/chunk-HW6TLOK4.cjs.map +1 -0
- package/dist/{chunk-ZPPFPQPO.js → chunk-IP7QOHWQ.js} +5 -5
- package/dist/{chunk-ZPPFPQPO.js.map → chunk-IP7QOHWQ.js.map} +1 -1
- package/dist/{chunk-2LWHRJPB.cjs → chunk-K4L4G76I.cjs} +21 -21
- package/dist/{chunk-2LWHRJPB.cjs.map → chunk-K4L4G76I.cjs.map} +1 -1
- package/dist/{chunk-C3E6UZS4.js → chunk-MTXVODG3.js} +3 -3
- package/dist/{chunk-C3E6UZS4.js.map → chunk-MTXVODG3.js.map} +1 -1
- package/dist/{chunk-5SXI7IYW.cjs → chunk-NHZWVKGV.cjs} +8 -8
- package/dist/{chunk-5SXI7IYW.cjs.map → chunk-NHZWVKGV.cjs.map} +1 -1
- package/dist/{chunk-D5J332XS.cjs → chunk-NSZTHJZJ.cjs} +39 -39
- package/dist/{chunk-D5J332XS.cjs.map → chunk-NSZTHJZJ.cjs.map} +1 -1
- package/dist/{chunk-BH2IDJVO.cjs → chunk-OFL4UH6L.cjs} +46 -46
- package/dist/{chunk-BH2IDJVO.cjs.map → chunk-OFL4UH6L.cjs.map} +1 -1
- package/dist/{chunk-UFB36LWU.js → chunk-ORJ5HQAB.js} +4 -4
- package/dist/{chunk-UFB36LWU.js.map → chunk-ORJ5HQAB.js.map} +1 -1
- package/dist/{chunk-ASSJKIZO.cjs → chunk-P7KSB5T6.cjs} +5 -5
- package/dist/{chunk-ASSJKIZO.cjs.map → chunk-P7KSB5T6.cjs.map} +1 -1
- package/dist/{chunk-R3OIZ2BM.cjs → chunk-PEATSEAD.cjs} +6 -6
- package/dist/{chunk-R3OIZ2BM.cjs.map → chunk-PEATSEAD.cjs.map} +1 -1
- package/dist/{chunk-QMP3W5GA.js → chunk-PIEMWFSJ.js} +3 -3
- package/dist/{chunk-QMP3W5GA.js.map → chunk-PIEMWFSJ.js.map} +1 -1
- package/dist/{chunk-MBKJ7IBS.js → chunk-PIX4OCCQ.js} +5 -5
- package/dist/{chunk-MBKJ7IBS.js.map → chunk-PIX4OCCQ.js.map} +1 -1
- package/dist/{chunk-O33WVAYQ.cjs → chunk-QE7W4YIK.cjs} +6 -6
- package/dist/{chunk-O33WVAYQ.cjs.map → chunk-QE7W4YIK.cjs.map} +1 -1
- package/dist/{chunk-FFW2HTR2.cjs → chunk-QLLR7GUY.cjs} +5 -5
- package/dist/{chunk-FFW2HTR2.cjs.map → chunk-QLLR7GUY.cjs.map} +1 -1
- package/dist/{chunk-2LRBQOKA.js → chunk-RGBNOCIO.js} +8 -8
- package/dist/{chunk-2LRBQOKA.js.map → chunk-RGBNOCIO.js.map} +1 -1
- package/dist/{chunk-OHQBQOGH.cjs → chunk-RSXQOFM7.cjs} +8 -8
- package/dist/{chunk-OHQBQOGH.cjs.map → chunk-RSXQOFM7.cjs.map} +1 -1
- package/dist/{chunk-SWPTF7QJ.js → chunk-TA7ODVYJ.js} +4 -4
- package/dist/{chunk-SWPTF7QJ.js.map → chunk-TA7ODVYJ.js.map} +1 -1
- package/dist/{chunk-ZSTL4JEJ.cjs → chunk-UPD7W2KJ.cjs} +12 -12
- package/dist/{chunk-ZSTL4JEJ.cjs.map → chunk-UPD7W2KJ.cjs.map} +1 -1
- package/dist/{chunk-JYNW4QK7.cjs → chunk-V3NONYLA.cjs} +56 -23
- package/dist/chunk-V3NONYLA.cjs.map +1 -0
- package/dist/{chunk-4KKFO6YR.cjs → chunk-VLQW4CVW.cjs} +25 -21
- package/dist/chunk-VLQW4CVW.cjs.map +1 -0
- package/dist/{chunk-EXCZD5ZY.js → chunk-VOZI5F7V.js} +3 -3
- package/dist/{chunk-EXCZD5ZY.js.map → chunk-VOZI5F7V.js.map} +1 -1
- package/dist/{chunk-ZLSPGMES.cjs → chunk-YE4EDT57.cjs} +11 -11
- package/dist/{chunk-ZLSPGMES.cjs.map → chunk-YE4EDT57.cjs.map} +1 -1
- package/dist/{chunk-BBMK5XNO.js → chunk-YSEJOJNQ.js} +3 -3
- package/dist/{chunk-BBMK5XNO.js.map → chunk-YSEJOJNQ.js.map} +1 -1
- package/dist/{chunk-R5GOPHYB.js → chunk-ZU56AMFK.js} +6 -4
- package/dist/chunk-ZU56AMFK.js.map +1 -0
- package/dist/{chunk-KZTXGMVH.js → chunk-ZVUVSD5X.js} +3 -3
- package/dist/{chunk-KZTXGMVH.js.map → chunk-ZVUVSD5X.js.map} +1 -1
- package/dist/entries/apps.cjs +42 -42
- package/dist/entries/apps.js +7 -7
- package/dist/entries/credits.cjs +150 -150
- package/dist/entries/credits.d.cts +1 -1
- package/dist/entries/credits.d.ts +1 -1
- package/dist/entries/credits.js +7 -7
- package/dist/entries/edl.cjs +63 -59
- package/dist/entries/edl.d.cts +15 -1
- package/dist/entries/edl.d.ts +15 -1
- package/dist/entries/edl.js +1 -1
- package/dist/entries/llm-models.d.cts +1 -1
- package/dist/entries/llm-models.d.ts +1 -1
- package/dist/entries/model-catalog.cjs +76 -68
- package/dist/entries/model-catalog.d.cts +2 -2
- package/dist/entries/model-catalog.d.ts +2 -2
- package/dist/entries/model-catalog.js +4 -4
- package/dist/entries/models.cjs +295 -287
- package/dist/entries/models.d.cts +3 -3
- package/dist/entries/models.d.ts +3 -3
- package/dist/entries/models.js +4 -4
- package/dist/entries/nodes.cjs +206 -206
- package/dist/entries/nodes.d.cts +1 -1
- package/dist/entries/nodes.d.ts +1 -1
- package/dist/entries/nodes.js +8 -8
- package/dist/entries/pipeline.cjs +152 -152
- package/dist/entries/pipeline.d.cts +1 -1
- package/dist/entries/pipeline.d.ts +1 -1
- package/dist/entries/pipeline.js +3 -3
- package/dist/entries/runtime-config.cjs +32 -28
- package/dist/entries/runtime-config.d.cts +24 -2
- package/dist/entries/runtime-config.d.ts +24 -2
- package/dist/entries/runtime-config.js +1 -1
- package/dist/entries/ugc.cjs +71 -71
- package/dist/entries/ugc.js +4 -4
- package/dist/entries/video.cjs +117 -117
- package/dist/entries/video.js +4 -4
- package/dist/index.cjs +1180 -1156
- package/dist/index.d.cts +4 -4
- package/dist/index.d.ts +4 -4
- package/dist/index.js +19 -19
- package/dist/{model-catalog-CwkG9xi-.d.cts → model-catalog-QJ_AO9l0.d.cts} +54 -12
- package/dist/{model-catalog-CwkG9xi-.d.ts → model-catalog-QJ_AO9l0.d.ts} +54 -12
- package/dist/{model-constants-BbsZSVTA.d.cts → model-constants-BwBdh6Rn.d.cts} +20 -2
- package/dist/{model-constants-BbsZSVTA.d.ts → model-constants-BwBdh6Rn.d.ts} +20 -2
- package/package.json +1 -1
- package/src/__tests__/auto-aspect-source.test.ts +93 -0
- package/src/__tests__/camera-switch-contract.test.ts +12 -3
- package/src/__tests__/credit-identifiers.test.ts +18 -9
- package/src/__tests__/gpt-image-2-size-rules.test.ts +80 -0
- package/src/__tests__/normalize-model-input.test.ts +65 -11
- package/src/__tests__/resolutions-by-aspect-ratio.test.ts +134 -0
- package/src/__tests__/runtime-config.test.ts +28 -0
- package/src/__tests__/video-frame-slot.test.ts +5 -0
- package/src/camera-switch-contract.ts +13 -1
- package/src/entries/model-catalog.ts +2 -0
- package/src/entries/models.ts +2 -0
- package/src/entries/runtime-config.ts +1 -0
- package/src/model-catalog.ts +131 -39
- package/src/model-constants.ts +21 -1
- package/src/runtime-config/contract.ts +34 -0
- package/dist/chunk-4KKFO6YR.cjs.map +0 -1
- package/dist/chunk-FVKCNAEQ.js.map +0 -1
- package/dist/chunk-IQS3WQXQ.js.map +0 -1
- package/dist/chunk-JYNW4QK7.cjs.map +0 -1
- package/dist/chunk-OWNPYQSH.cjs.map +0 -1
- package/dist/chunk-R5GOPHYB.js.map +0 -1
- package/dist/chunk-RKTWLAJO.cjs +0 -27
- package/dist/chunk-S7FCFQ6X.js.map +0 -1
- package/dist/chunk-UJJUX6NW.cjs.map +0 -1
|
@@ -104,6 +104,12 @@ var GPT_IMAGE_2_5_RATIOS = [
|
|
|
104
104
|
"9:8",
|
|
105
105
|
"8:9"
|
|
106
106
|
];
|
|
107
|
+
var GPT_IMAGE_2_5_RESOLUTIONS_BY_RATIO = {
|
|
108
|
+
"27:16": ["1K"],
|
|
109
|
+
"16:27": ["1K"],
|
|
110
|
+
"9:8": ["1K"],
|
|
111
|
+
"8:9": ["1K"]
|
|
112
|
+
};
|
|
107
113
|
var GPT_IMAGE_2_6_RATIOS = [
|
|
108
114
|
"auto",
|
|
109
115
|
"1:1",
|
|
@@ -542,6 +548,7 @@ var IMAGE_MODELS = {
|
|
|
542
548
|
features: ["reference-image"],
|
|
543
549
|
aspectRatios: GPT_IMAGE_2_5_RATIOS,
|
|
544
550
|
resolutions: ["1K", "2K", "4K"],
|
|
551
|
+
resolutionsByAspectRatio: GPT_IMAGE_2_5_RESOLUTIONS_BY_RATIO,
|
|
545
552
|
backgrounds: GPT_IMAGE_BACKGROUNDS,
|
|
546
553
|
transparentResolution: "1K",
|
|
547
554
|
backgroundOnlyAtTransparentResolution: true,
|
|
@@ -573,6 +580,7 @@ var IMAGE_MODELS = {
|
|
|
573
580
|
features: ["reference-image"],
|
|
574
581
|
aspectRatios: GPT_IMAGE_2_5_RATIOS,
|
|
575
582
|
resolutions: ["1K", "2K", "4K"],
|
|
583
|
+
resolutionsByAspectRatio: GPT_IMAGE_2_5_RESOLUTIONS_BY_RATIO,
|
|
576
584
|
backgrounds: GPT_IMAGE_BACKGROUNDS,
|
|
577
585
|
transparentResolution: "1K",
|
|
578
586
|
backgroundOnlyAtTransparentResolution: true,
|
|
@@ -604,6 +612,7 @@ var IMAGE_MODELS = {
|
|
|
604
612
|
features: ["reference-image"],
|
|
605
613
|
aspectRatios: GPT_IMAGE_2_5_RATIOS,
|
|
606
614
|
resolutions: ["1K", "2K", "4K"],
|
|
615
|
+
resolutionsByAspectRatio: GPT_IMAGE_2_5_RESOLUTIONS_BY_RATIO,
|
|
607
616
|
backgrounds: GPT_IMAGE_BACKGROUNDS,
|
|
608
617
|
transparentResolution: "1K",
|
|
609
618
|
backgroundOnlyAtTransparentResolution: true,
|
|
@@ -635,6 +644,7 @@ var IMAGE_MODELS = {
|
|
|
635
644
|
features: ["reference-image"],
|
|
636
645
|
aspectRatios: GPT_IMAGE_2_5_RATIOS,
|
|
637
646
|
resolutions: ["1K", "2K", "4K"],
|
|
647
|
+
resolutionsByAspectRatio: GPT_IMAGE_2_5_RESOLUTIONS_BY_RATIO,
|
|
638
648
|
backgrounds: GPT_IMAGE_BACKGROUNDS,
|
|
639
649
|
transparentResolution: "1K",
|
|
640
650
|
backgroundOnlyAtTransparentResolution: true,
|
|
@@ -665,6 +675,7 @@ var IMAGE_MODELS = {
|
|
|
665
675
|
useCases: ["typography", "high-res", "general", "draft"],
|
|
666
676
|
features: ["reference-image"],
|
|
667
677
|
aspectRatios: GPT_IMAGE_2_6_RATIOS,
|
|
678
|
+
autoAspectFromSourceImage: true,
|
|
668
679
|
resolutions: ["1K", "2K", "4K"],
|
|
669
680
|
qualities: ["auto", "low", "medium", "high", "xhigh", "max"],
|
|
670
681
|
defaultQuality: "medium",
|
|
@@ -706,6 +717,7 @@ var IMAGE_MODELS = {
|
|
|
706
717
|
useCases: ["edit", "high-res"],
|
|
707
718
|
features: ["reference-image"],
|
|
708
719
|
aspectRatios: GPT_IMAGE_2_6_RATIOS,
|
|
720
|
+
autoAspectFromSourceImage: true,
|
|
709
721
|
resolutions: ["1K", "2K", "4K"],
|
|
710
722
|
qualities: ["auto", "low", "medium", "high", "xhigh", "max"],
|
|
711
723
|
defaultQuality: "medium",
|
|
@@ -734,6 +746,7 @@ var IMAGE_MODELS = {
|
|
|
734
746
|
useCases: ["typography", "high-res", "general"],
|
|
735
747
|
features: ["reference-image"],
|
|
736
748
|
aspectRatios: GPT_IMAGE_2_6_RATIOS,
|
|
749
|
+
autoAspectFromSourceImage: true,
|
|
737
750
|
resolutions: ["1K", "2K", "4K"],
|
|
738
751
|
qualities: ["auto", "low", "medium", "high", "xhigh", "max"],
|
|
739
752
|
defaultQuality: "medium",
|
|
@@ -775,6 +788,7 @@ var IMAGE_MODELS = {
|
|
|
775
788
|
useCases: ["edit", "high-res"],
|
|
776
789
|
features: ["reference-image"],
|
|
777
790
|
aspectRatios: GPT_IMAGE_2_6_RATIOS,
|
|
791
|
+
autoAspectFromSourceImage: true,
|
|
778
792
|
resolutions: ["1K", "2K", "4K"],
|
|
779
793
|
qualities: ["auto", "low", "medium", "high", "xhigh", "max"],
|
|
780
794
|
defaultQuality: "medium",
|
|
@@ -809,6 +823,7 @@ var IMAGE_MODELS = {
|
|
|
809
823
|
useCases: ["general", "draft"],
|
|
810
824
|
features: ["reference-image"],
|
|
811
825
|
aspectRatios: GPT_IMAGE_2_6_ECONOMY_RATIOS,
|
|
826
|
+
autoAspectFromSourceImage: true,
|
|
812
827
|
backgrounds: GPT_IMAGE_BACKGROUNDS,
|
|
813
828
|
pricing: [{ identifier: "gpt-image-2-6-economy", credits: 13, note: "1K flat" }],
|
|
814
829
|
valueLabels: GPT_IMAGE_2_6_VALUE_LABELS,
|
|
@@ -827,6 +842,7 @@ var IMAGE_MODELS = {
|
|
|
827
842
|
useCases: ["edit", "draft"],
|
|
828
843
|
features: ["reference-image"],
|
|
829
844
|
aspectRatios: GPT_IMAGE_2_6_ECONOMY_RATIOS,
|
|
845
|
+
autoAspectFromSourceImage: true,
|
|
830
846
|
backgrounds: GPT_IMAGE_BACKGROUNDS,
|
|
831
847
|
pricing: [{ identifier: "gpt-image-2-6-economy-i2i", credits: 13, note: "1K flat" }],
|
|
832
848
|
valueLabels: GPT_IMAGE_2_6_VALUE_LABELS,
|
|
@@ -1555,6 +1571,7 @@ var VIDEO_MODELS = {
|
|
|
1555
1571
|
description: "Google Gemini Omni Flash 1.2 \u2014 3\u201315s video with native sound, from 360p to 4K: from text, up to 6 reference images, exact first and last frames, or a video edit. Priced per second.",
|
|
1556
1572
|
useCases: ["cinematic", "fast"],
|
|
1557
1573
|
features: ["audio", "reference-image", "reference-to-video", "end-frame"],
|
|
1574
|
+
referenceSyntax: "image N",
|
|
1558
1575
|
aspectRatios: ["16:9", "9:16", "auto"],
|
|
1559
1576
|
resolutions: ["360p", "720p", "1080p", "4k"],
|
|
1560
1577
|
defaultResolution: "720p",
|
|
@@ -3527,8 +3544,29 @@ function nearestCatalogAspectRatio(sourceWidth, sourceHeight, ratios) {
|
|
|
3527
3544
|
}
|
|
3528
3545
|
function autoAspectNeedsSourceImage(modelId, aspectRatio) {
|
|
3529
3546
|
if (!modelId || !isAutoAspectToken(aspectRatio)) return false;
|
|
3530
|
-
const
|
|
3531
|
-
|
|
3547
|
+
const entry = MODEL_CATALOG[modelId];
|
|
3548
|
+
const ratios = entry?.aspectRatios;
|
|
3549
|
+
if (ratios === void 0 || ratios.length === 0) return false;
|
|
3550
|
+
return entry?.autoAspectFromSourceImage === true || !ratios.some(isAutoAspectToken);
|
|
3551
|
+
}
|
|
3552
|
+
function resolutionsAtAspectRatio(modelId, aspectRatio) {
|
|
3553
|
+
const m = MODEL_CATALOG[modelId];
|
|
3554
|
+
const all = m?.resolutions;
|
|
3555
|
+
if (!all || all.length === 0) return void 0;
|
|
3556
|
+
const byRatio = m.resolutionsByAspectRatio;
|
|
3557
|
+
const ratio = typeof aspectRatio === "string" ? aspectRatio.trim() : void 0;
|
|
3558
|
+
const only = byRatio && ratio !== void 0 && Object.prototype.hasOwnProperty.call(byRatio, ratio) ? byRatio[ratio] : void 0;
|
|
3559
|
+
return only ? all.filter((r) => only.includes(r)) : all;
|
|
3560
|
+
}
|
|
3561
|
+
function resolutionAtAspectRatio(modelId, aspectRatio, resolution) {
|
|
3562
|
+
if (resolution === void 0) return void 0;
|
|
3563
|
+
const all = MODEL_CATALOG[modelId]?.resolutions;
|
|
3564
|
+
const offered = resolutionsAtAspectRatio(modelId, aspectRatio);
|
|
3565
|
+
if (!all || !offered || offered.length === 0 || offered.includes(resolution)) return resolution;
|
|
3566
|
+
const at = all.indexOf(resolution);
|
|
3567
|
+
if (at < 0) return resolution;
|
|
3568
|
+
const atOrBelow = offered.filter((r) => all.indexOf(r) <= at);
|
|
3569
|
+
return atOrBelow.length > 0 ? atOrBelow[atOrBelow.length - 1] : offered[0];
|
|
3532
3570
|
}
|
|
3533
3571
|
function normalizeModelInput(modelId, input, context = {}) {
|
|
3534
3572
|
const m = MODEL_CATALOG[modelId];
|
|
@@ -3561,11 +3599,12 @@ function normalizeModelInput(modelId, input, context = {}) {
|
|
|
3561
3599
|
const sourceRatio = autoAspectNeedsSourceImage(modelId, input.aspectRatio) && usableSize(context.sourceImage) ? nearestCatalogAspectRatio(context.sourceImage.width, context.sourceImage.height, m.aspectRatios ?? []) : void 0;
|
|
3562
3600
|
if (sourceRatio !== void 0 && input.aspectRatio !== void 0) {
|
|
3563
3601
|
const { width, height } = context.sourceImage;
|
|
3602
|
+
const why = m.autoAspectFromSourceImage === true ? `${m.label}'s own "auto" does not keep the photo's shape` : `${m.label} has no "auto" aspect ratio`;
|
|
3564
3603
|
adjustments.push({
|
|
3565
3604
|
field: "aspectRatio",
|
|
3566
3605
|
from: input.aspectRatio,
|
|
3567
3606
|
to: sourceRatio,
|
|
3568
|
-
reason: `${
|
|
3607
|
+
reason: `${why} \u2014 using "${sourceRatio}", the supported ratio closest to the source image's shape (${width}x${height}).`
|
|
3569
3608
|
});
|
|
3570
3609
|
out.aspectRatio = sourceRatio;
|
|
3571
3610
|
} else {
|
|
@@ -3580,24 +3619,16 @@ function normalizeModelInput(modelId, input, context = {}) {
|
|
|
3580
3619
|
out.quality = snap("quality", input.quality, m.qualities, m.defaultQuality);
|
|
3581
3620
|
out.background = snap("background", input.background, m.backgrounds);
|
|
3582
3621
|
out.duration = m.autoDuration === true && isAutoVideoDuration(input.duration) ? input.duration : snap("duration", input.duration, m.durations);
|
|
3583
|
-
|
|
3584
|
-
|
|
3585
|
-
|
|
3586
|
-
|
|
3587
|
-
|
|
3588
|
-
|
|
3589
|
-
|
|
3590
|
-
})
|
|
3591
|
-
|
|
3592
|
-
|
|
3593
|
-
adjustments.push({
|
|
3594
|
-
field: "resolution",
|
|
3595
|
-
from: "4K",
|
|
3596
|
-
to: "2K",
|
|
3597
|
-
reason: `${m.label} cannot render 4K at a 1:1 aspect ratio.`
|
|
3598
|
-
});
|
|
3599
|
-
out.resolution = "2K";
|
|
3600
|
-
}
|
|
3622
|
+
const sized = resolutionAtAspectRatio(modelId, out.aspectRatio, out.resolution);
|
|
3623
|
+
if (out.resolution !== void 0 && sized !== void 0 && sized !== out.resolution) {
|
|
3624
|
+
const offered = resolutionsAtAspectRatio(modelId, out.aspectRatio) ?? [sized];
|
|
3625
|
+
adjustments.push({
|
|
3626
|
+
field: "resolution",
|
|
3627
|
+
from: out.resolution,
|
|
3628
|
+
to: sized,
|
|
3629
|
+
reason: `${m.label} only renders ${offered.join(" or ")} at the "${out.aspectRatio}" aspect ratio.`
|
|
3630
|
+
});
|
|
3631
|
+
out.resolution = sized;
|
|
3601
3632
|
}
|
|
3602
3633
|
if (out.background === "transparent" && m.transparentResolution !== void 0 && out.resolution !== void 0 && out.resolution !== m.transparentResolution) {
|
|
3603
3634
|
adjustments.push({
|
|
@@ -3887,6 +3918,6 @@ function modelIdsByKindMode(kind, modes, opts = {}) {
|
|
|
3887
3918
|
return ids;
|
|
3888
3919
|
}
|
|
3889
3920
|
|
|
3890
|
-
export { FLUX2_RES_MP, MODEL_CATALOG, MODEL_KINDS, MODEL_MAKERS, MODEL_RECOMMENDATIONS, SEEDANCE_DRAFT_FINALIZE_MAX_SEC, SEEDANCE_DRAFT_FINALIZE_MIN_SEC, SEEDANCE_DRAFT_FINALIZE_PROVIDER, SEEDANCE_DRAFT_FINALIZE_RESOLUTION, SEEDANCE_DRAFT_MODELS, SEEDANCE_DRAFT_RESOLUTION, SPEECH_UNIT_PRICE_NOTE, VIDEO_DURATION_AUTO, aspectRatioOptionsByKind, autoAspectNeedsSourceImage, backgroundOptionsByKind, buildModelMenu, creditRangesAll, defaultResolutionFor, durationsByMode, fitAspectRatioToModel, getAspectRatioOptions, getCreditRange, getDurationsForModel, getModel, getQualityOptions, getResolutionOptions, groupByFamily, groupByKindAndFamily, hasFeature, isAutoAspectToken, isAutoVideoDuration, isFlux2Model, isModelMakerId, isSeedanceDraftCapable, listModels, modelIdsByKindMode, modelMakerOf, modelTakesSeed, modelsWithFeature, nearestCatalogAspectRatio, normalizeModelInput, normalizeVideoRequestParams, qualityOptionsByKind, resolutionOptionsByKind, seedanceDraftFinalizeBillableSec, seedanceDraftFinalizeCreditId, validateModelInput };
|
|
3891
|
-
//# sourceMappingURL=chunk-
|
|
3892
|
-
//# sourceMappingURL=chunk-
|
|
3921
|
+
export { FLUX2_RES_MP, MODEL_CATALOG, MODEL_KINDS, MODEL_MAKERS, MODEL_RECOMMENDATIONS, SEEDANCE_DRAFT_FINALIZE_MAX_SEC, SEEDANCE_DRAFT_FINALIZE_MIN_SEC, SEEDANCE_DRAFT_FINALIZE_PROVIDER, SEEDANCE_DRAFT_FINALIZE_RESOLUTION, SEEDANCE_DRAFT_MODELS, SEEDANCE_DRAFT_RESOLUTION, SPEECH_UNIT_PRICE_NOTE, VIDEO_DURATION_AUTO, aspectRatioOptionsByKind, autoAspectNeedsSourceImage, backgroundOptionsByKind, buildModelMenu, creditRangesAll, defaultResolutionFor, durationsByMode, fitAspectRatioToModel, getAspectRatioOptions, getCreditRange, getDurationsForModel, getModel, getQualityOptions, getResolutionOptions, groupByFamily, groupByKindAndFamily, hasFeature, isAutoAspectToken, isAutoVideoDuration, isFlux2Model, isModelMakerId, isSeedanceDraftCapable, listModels, modelIdsByKindMode, modelMakerOf, modelTakesSeed, modelsWithFeature, nearestCatalogAspectRatio, normalizeModelInput, normalizeVideoRequestParams, qualityOptionsByKind, resolutionAtAspectRatio, resolutionOptionsByKind, resolutionsAtAspectRatio, seedanceDraftFinalizeBillableSec, seedanceDraftFinalizeCreditId, validateModelInput };
|
|
3922
|
+
//# sourceMappingURL=chunk-2VQHPILW.js.map
|
|
3923
|
+
//# sourceMappingURL=chunk-2VQHPILW.js.map
|