@nodaro/shared 3.7.0 → 3.9.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/index.cjs CHANGED
@@ -61,7 +61,7 @@ var MODEL_RECOMMENDATIONS = [
61
61
  { intent: "best cinematic video", modelIds: ["veo3", "kling-3.0", "seedance-2"], note: "VEO 3.1 Quality for premium narrative; Kling 3.0 for music-synced motion; Seedance 2 for reference-driven consistency." },
62
62
  { intent: "cheap batch video clips", modelIds: ["veo3.1", "wan-turbo", "bytedance-lite"], note: "VEO 3.1 Fast is the best price/quality balance with native audio." },
63
63
  { intent: "video with start + end frame", modelIds: ["veo3", "veo3.1", "kling-turbo", "minimax", "hailuo-standard", "seedance-2"], note: "All listed support an end frame; VEO uses imageUrls[start, end]." },
64
- { intent: "music / song generation", modelIds: ["suno-v5", "suno"], note: "Suno v5 has better vocal quality at the same price." },
64
+ { intent: "music / song generation", modelIds: ["suno-v6", "suno-v6_wild", "suno-v6_mini", "suno-v5_5"], note: "V6 is the default flagship; V6 Wild for bolder, less predictable results; V6 Mini when speed matters; v5.5 / v5 / v4 keep their own character. Same price." },
65
65
  { intent: "voice over / narration", modelIds: ["elevenlabs-v3", "elevenlabs-turbo"], note: "v3 supports [audio tags] for emotion; Turbo is cheaper for plain narration." },
66
66
  { intent: "lip-sync a portrait to audio", modelIds: ["kling-avatar-pro", "kling-avatar", "infinitalk"], note: "Pro for best mouth shape; InfiniTalk for resolution control." },
67
67
  { intent: "transcription / captions", modelIds: ["elevenlabs-stt"], note: "Word-level timestamps available." },
@@ -74,6 +74,21 @@ var KONTEXT_RATIOS = ["1:1", "16:9", "9:16", "4:3", "3:4", "21:9"];
74
74
  var GROK_RATIOS = ["1:1", "16:9", "9:16", "3:2", "2:3"];
75
75
  var GPT_IMAGE_RATIOS = ["1:1", "3:2", "2:3"];
76
76
  var GPT_IMAGE_2_RATIOS = ["auto", "1:1", "16:9", "9:16", "4:3", "3:4"];
77
+ var GPT_IMAGE_2_5_RATIOS = [
78
+ "auto",
79
+ "1:1",
80
+ "3:2",
81
+ "2:3",
82
+ "4:3",
83
+ "3:4",
84
+ "16:9",
85
+ "9:16",
86
+ "21:9",
87
+ "27:16",
88
+ "16:27",
89
+ "9:8",
90
+ "8:9"
91
+ ];
77
92
  var IMAGEN4_RATIOS = ["1:1", "16:9", "9:16", "4:3", "3:4"];
78
93
  var IDEOGRAM_RATIOS = ["1:1", "16:9", "9:16", "4:3", "3:4"];
79
94
  var SEEDREAM_RATIOS = ["1:1", "16:9", "9:16", "4:3", "3:4", "3:2", "2:3", "21:9"];
@@ -420,6 +435,114 @@ var IMAGE_MODELS = {
420
435
  { identifier: "gpt-image-2-i2i:4K", credits: 60, note: "4K" }
421
436
  ]
422
437
  },
438
+ "gpt-image-2-5-flare": {
439
+ id: "gpt-image-2-5-flare",
440
+ kind: "image",
441
+ modes: ["t2i"],
442
+ family: "OpenAI",
443
+ label: "GPT Image 2.5 Flare",
444
+ series: "GPT Image",
445
+ description: "Fast everyday GPT Image 2.5 - higher quality than GPT Image 2 at about half the latency. The default of the pair: social and creator content, campaign variants, thumbnails, rapid iteration, high-volume work.",
446
+ useCases: ["typography", "high-res", "general", "draft"],
447
+ features: ["reference-image"],
448
+ aspectRatios: GPT_IMAGE_2_5_RATIOS,
449
+ resolutions: ["1K", "2K", "4K"],
450
+ pricing: [
451
+ { identifier: "gpt-image-2-5-flare", credits: 15, note: "1K default" },
452
+ { identifier: "gpt-image-2-5-flare:2K", credits: 25, note: "2K" },
453
+ { identifier: "gpt-image-2-5-flare:4K", credits: 40, note: "4K" }
454
+ ],
455
+ valueLabels: {
456
+ "3:2": "3:2 (Landscape)",
457
+ "2:3": "2:3 (Portrait)",
458
+ "27:16": "27:16 (Ultra-wide)",
459
+ "16:27": "16:27 (Ultra-tall)",
460
+ "9:8": "9:8 (Near-square)",
461
+ "8:9": "8:9 (Near-square)"
462
+ },
463
+ safetyFilter: { stochastic: true, fallback: "nano-banana-pro" }
464
+ },
465
+ "gpt-image-2-5-flare-i2i": {
466
+ id: "gpt-image-2-5-flare-i2i",
467
+ kind: "image",
468
+ modes: ["i2i"],
469
+ family: "OpenAI",
470
+ label: "GPT Image 2.5 Flare (I2I)",
471
+ series: "GPT Image",
472
+ description: "Fast GPT Image 2.5 edits (up to 16 source images) - the default when you are iterating rather than finishing.",
473
+ useCases: ["edit", "high-res"],
474
+ features: ["reference-image"],
475
+ aspectRatios: GPT_IMAGE_2_5_RATIOS,
476
+ resolutions: ["1K", "2K", "4K"],
477
+ pricing: [
478
+ { identifier: "gpt-image-2-5-flare-i2i", credits: 15, note: "1K default" },
479
+ { identifier: "gpt-image-2-5-flare-i2i:2K", credits: 25, note: "2K" },
480
+ { identifier: "gpt-image-2-5-flare-i2i:4K", credits: 40, note: "4K" }
481
+ ],
482
+ valueLabels: {
483
+ "3:2": "3:2 (Landscape)",
484
+ "2:3": "2:3 (Portrait)",
485
+ "27:16": "27:16 (Ultra-wide)",
486
+ "16:27": "16:27 (Ultra-tall)",
487
+ "9:8": "9:8 (Near-square)",
488
+ "8:9": "8:9 (Near-square)"
489
+ },
490
+ safetyFilter: { stochastic: true, fallback: "nano-banana-pro" }
491
+ },
492
+ "gpt-image-2-5-sunburst": {
493
+ id: "gpt-image-2-5-sunburst",
494
+ kind: "image",
495
+ modes: ["t2i"],
496
+ family: "OpenAI",
497
+ label: "GPT Image 2.5 Sunburst",
498
+ series: "GPT Image",
499
+ description: "Precision GPT Image 2.5 - trades generation time for tighter control and detail fidelity. Pick it for brand-sensitive and production work: packaging, diagrams, ecommerce retouching, polished campaign creative.",
500
+ useCases: ["typography", "high-res", "general"],
501
+ features: ["reference-image"],
502
+ aspectRatios: GPT_IMAGE_2_5_RATIOS,
503
+ resolutions: ["1K", "2K", "4K"],
504
+ pricing: [
505
+ { identifier: "gpt-image-2-5-sunburst", credits: 15, note: "1K default" },
506
+ { identifier: "gpt-image-2-5-sunburst:2K", credits: 25, note: "2K" },
507
+ { identifier: "gpt-image-2-5-sunburst:4K", credits: 40, note: "4K" }
508
+ ],
509
+ valueLabels: {
510
+ "3:2": "3:2 (Landscape)",
511
+ "2:3": "2:3 (Portrait)",
512
+ "27:16": "27:16 (Ultra-wide)",
513
+ "16:27": "16:27 (Ultra-tall)",
514
+ "9:8": "9:8 (Near-square)",
515
+ "8:9": "8:9 (Near-square)"
516
+ },
517
+ safetyFilter: { stochastic: true, fallback: "nano-banana-pro" }
518
+ },
519
+ "gpt-image-2-5-sunburst-i2i": {
520
+ id: "gpt-image-2-5-sunburst-i2i",
521
+ kind: "image",
522
+ modes: ["i2i"],
523
+ family: "OpenAI",
524
+ label: "GPT Image 2.5 Sunburst (I2I)",
525
+ series: "GPT Image",
526
+ description: "Precision GPT Image 2.5 edits (up to 16 source images) - the most controlled edit in the GPT family, at the cost of a longer run.",
527
+ useCases: ["edit", "high-res"],
528
+ features: ["reference-image"],
529
+ aspectRatios: GPT_IMAGE_2_5_RATIOS,
530
+ resolutions: ["1K", "2K", "4K"],
531
+ pricing: [
532
+ { identifier: "gpt-image-2-5-sunburst-i2i", credits: 15, note: "1K default" },
533
+ { identifier: "gpt-image-2-5-sunburst-i2i:2K", credits: 25, note: "2K" },
534
+ { identifier: "gpt-image-2-5-sunburst-i2i:4K", credits: 40, note: "4K" }
535
+ ],
536
+ valueLabels: {
537
+ "3:2": "3:2 (Landscape)",
538
+ "2:3": "2:3 (Portrait)",
539
+ "27:16": "27:16 (Ultra-wide)",
540
+ "16:27": "16:27 (Ultra-tall)",
541
+ "9:8": "9:8 (Near-square)",
542
+ "8:9": "8:9 (Near-square)"
543
+ },
544
+ safetyFilter: { stochastic: true, fallback: "nano-banana-pro" }
545
+ },
423
546
  // ── Ideogram ──
424
547
  // Ideogram models use a `rendering_speed` (TURBO / BALANCED / QUALITY)
425
548
  // dimension that's distinct from the `quality` lever — frontend exposes
@@ -2274,7 +2397,7 @@ var AUDIO_MODELS = {
2274
2397
  label: "Suno v5",
2275
2398
  series: "Suno",
2276
2399
  dataValue: "V5",
2277
- description: "Newer Suno v5 \u2014 better vocal quality, more genres. Same price as v4.",
2400
+ description: "Suno v5 \u2014 better vocal quality than v4, more genres. Same price.",
2278
2401
  useCases: ["music", "song", "vocals", "premium"],
2279
2402
  pricing: [{ identifier: "suno-v5", credits: 30, note: "per generation" }]
2280
2403
  },
@@ -2286,10 +2409,46 @@ var AUDIO_MODELS = {
2286
2409
  label: "Suno v5.5",
2287
2410
  series: "Suno",
2288
2411
  dataValue: "V5_5",
2289
- description: "Suno v5.5 \u2014 latest model with improved audio quality and expressiveness.",
2412
+ description: "Suno v5.5 \u2014 improved audio quality and expressiveness over v5.",
2290
2413
  useCases: ["music", "song", "vocals", "premium"],
2291
- pricing: [{ identifier: "suno-v5_5", credits: 30, note: "per generation" }],
2414
+ pricing: [{ identifier: "suno-v5_5", credits: 30, note: "per generation" }]
2415
+ },
2416
+ "suno-v6": {
2417
+ id: "suno-v6",
2418
+ kind: "audio",
2419
+ modes: ["music"],
2420
+ family: "Suno",
2421
+ label: "Suno V6",
2422
+ series: "Suno",
2423
+ dataValue: "V6",
2424
+ description: "Suno V6 \u2014 greater musical expression with more natural vocals and richer details. The flagship and the default.",
2425
+ useCases: ["music", "song", "vocals", "premium"],
2426
+ pricing: [{ identifier: "suno-v6", credits: 30, note: "per generation" }],
2292
2427
  featured: true
2428
+ },
2429
+ "suno-v6_wild": {
2430
+ id: "suno-v6_wild",
2431
+ kind: "audio",
2432
+ modes: ["music"],
2433
+ family: "Suno",
2434
+ label: "Suno V6 Wild",
2435
+ series: "Suno",
2436
+ dataValue: "V6_WILD",
2437
+ description: "Suno V6 Wild \u2014 pushes creative boundaries for bolder, more distinctive musical expression; more varied, less predictable results.",
2438
+ useCases: ["music", "song", "vocals", "experimental"],
2439
+ pricing: [{ identifier: "suno-v6_wild", credits: 30, note: "per generation" }]
2440
+ },
2441
+ "suno-v6_mini": {
2442
+ id: "suno-v6_mini",
2443
+ kind: "audio",
2444
+ modes: ["music"],
2445
+ family: "Suno",
2446
+ label: "Suno V6 Mini",
2447
+ series: "Suno",
2448
+ dataValue: "V6_MINI",
2449
+ description: "Suno V6 Mini \u2014 lightweight and fast, balancing quality and speed for effortless creation.",
2450
+ useCases: ["music", "song", "vocals", "fast"],
2451
+ pricing: [{ identifier: "suno-v6_mini", credits: 30, note: "per generation" }]
2293
2452
  }
2294
2453
  };
2295
2454
  var MODEL_CATALOG = {
@@ -2718,7 +2877,13 @@ var IMAGE_ASPECT_RATIO_VALUES = [
2718
2877
  "4:1",
2719
2878
  "1:4",
2720
2879
  "8:1",
2721
- "1:8"
2880
+ "1:8",
2881
+ // GPT Image 2.5 (Flare + Sunburst) additions: near-square and ultra-wide/tall
2882
+ // cinema ratios (docs.kie.ai/market/gpt/gpt-image-2-5-*).
2883
+ "27:16",
2884
+ "16:27",
2885
+ "9:8",
2886
+ "8:9"
2722
2887
  ];
2723
2888
  var MAX_IMAGE_PROMPT_CHARS_BY_PROVIDER = {
2724
2889
  // ── higher than the 5000 default ──
@@ -2730,6 +2895,15 @@ var MAX_IMAGE_PROMPT_CHARS_BY_PROVIDER = {
2730
2895
  // docs.kie.ai/market/google/pro-image-to-image
2731
2896
  "gpt-image-2-i2i": 2e4,
2732
2897
  // docs.kie.ai/market/gpt/gpt-image-2-image-to-image
2898
+ // GPT Image 2.5 — all four lanes document a 20000-char prompt ceiling.
2899
+ "gpt-image-2-5-flare": 2e4,
2900
+ // docs.kie.ai/market/gpt/gpt-image-2-5-flare-text-to-image
2901
+ "gpt-image-2-5-flare-i2i": 2e4,
2902
+ // docs.kie.ai/market/gpt/gpt-image-2-5-flare-image-to-image
2903
+ "gpt-image-2-5-sunburst": 2e4,
2904
+ // docs.kie.ai/market/gpt/gpt-image-2-5-sunburst-text-to-image
2905
+ "gpt-image-2-5-sunburst-i2i": 2e4,
2906
+ // docs.kie.ai/market/gpt/gpt-image-2-5-sunburst-image-to-image
2733
2907
  // ── lower than the 5000 default (over-send risk if left at default) ──
2734
2908
  "seedream": 3e3,
2735
2909
  // docs.kie.ai/market/seedream/4-5-text-to-image
@@ -2921,6 +3095,8 @@ var MODELS_WITH_REFERENCE_IMAGE_SUPPORT = /* @__PURE__ */ new Set([
2921
3095
  // T2I providers that auto-route to their i2i sibling when refs are attached
2922
3096
  "gpt-image",
2923
3097
  "gpt-image-2",
3098
+ "gpt-image-2-5-flare",
3099
+ "gpt-image-2-5-sunburst",
2924
3100
  "grok",
2925
3101
  "grok-2",
2926
3102
  "qwen",
@@ -2933,6 +3109,8 @@ var MODELS_WITH_REFERENCE_IMAGE_SUPPORT = /* @__PURE__ */ new Set([
2933
3109
  "nano-banana-edit",
2934
3110
  "gpt-image-i2i",
2935
3111
  "gpt-image-2-i2i",
3112
+ "gpt-image-2-5-flare-i2i",
3113
+ "gpt-image-2-5-sunburst-i2i",
2936
3114
  "grok-2-i2i",
2937
3115
  "flux-i2i",
2938
3116
  "flux-pro-i2i",
@@ -2962,6 +3140,8 @@ var MODELS_WITH_REFERENCE_IMAGE_SUPPORT = /* @__PURE__ */ new Set([
2962
3140
  var T2I_TO_I2I_VARIANT = {
2963
3141
  "gpt-image": "gpt-image-i2i",
2964
3142
  "gpt-image-2": "gpt-image-2-i2i",
3143
+ "gpt-image-2-5-flare": "gpt-image-2-5-flare-i2i",
3144
+ "gpt-image-2-5-sunburst": "gpt-image-2-5-sunburst-i2i",
2965
3145
  "grok": "grok-i2i",
2966
3146
  // grok-2's t2i takes NO image input; its "i2i" is the segment-map(image_url)
2967
3147
  // → image-edit(task_id) chain in the KIE provider (single reference).
@@ -2987,6 +3167,8 @@ var REF_IMAGE_MAX_LIMITS = {
2987
3167
  "nano-banana-edit": 8,
2988
3168
  "gpt-image-i2i": 16,
2989
3169
  "gpt-image-2-i2i": 16,
3170
+ "gpt-image-2-5-flare-i2i": 16,
3171
+ "gpt-image-2-5-sunburst-i2i": 16,
2990
3172
  "flux-i2i": 4,
2991
3173
  "flux-pro-i2i": 4,
2992
3174
  "seedream-edit": 16,
@@ -3023,6 +3205,10 @@ var VARIABLE_PRICING_MODELS = {
3023
3205
  "gpt-image-i2i": "quality",
3024
3206
  "gpt-image-2": "resolution",
3025
3207
  "gpt-image-2-i2i": "resolution",
3208
+ "gpt-image-2-5-flare": "resolution",
3209
+ "gpt-image-2-5-flare-i2i": "resolution",
3210
+ "gpt-image-2-5-sunburst": "resolution",
3211
+ "gpt-image-2-5-sunburst-i2i": "resolution",
3026
3212
  "nano-banana-pro": "resolution",
3027
3213
  "nano-banana-2": "resolution",
3028
3214
  "flux": "resolution",
@@ -3049,6 +3235,10 @@ var RESOLUTION_2K_4K_TIERED_PROVIDERS = /* @__PURE__ */ new Set([
3049
3235
  "nano-banana-2",
3050
3236
  "gpt-image-2",
3051
3237
  "gpt-image-2-i2i",
3238
+ "gpt-image-2-5-flare",
3239
+ "gpt-image-2-5-flare-i2i",
3240
+ "gpt-image-2-5-sunburst",
3241
+ "gpt-image-2-5-sunburst-i2i",
3052
3242
  "wan-2.7",
3053
3243
  "wan-2.7-pro"
3054
3244
  ]);
@@ -3063,6 +3253,8 @@ var IMAGE_GEN_PROVIDERS = [
3063
3253
  "grok-2",
3064
3254
  "gpt-image",
3065
3255
  "gpt-image-2",
3256
+ "gpt-image-2-5-flare",
3257
+ "gpt-image-2-5-sunburst",
3066
3258
  "imagen4",
3067
3259
  "imagen4-fast",
3068
3260
  "imagen4-ultra",
@@ -3092,6 +3284,8 @@ var IMAGE_I2I_PROVIDERS = [
3092
3284
  "flux-pro-i2i",
3093
3285
  "gpt-image-i2i",
3094
3286
  "gpt-image-2-i2i",
3287
+ "gpt-image-2-5-flare-i2i",
3288
+ "gpt-image-2-5-sunburst-i2i",
3095
3289
  "grok-2-i2i",
3096
3290
  "ideogram-edit",
3097
3291
  "ideogram-remix",
@@ -3428,15 +3622,25 @@ var QA_CHECK_PROVIDERS = [
3428
3622
  "claude",
3429
3623
  "gpt"
3430
3624
  ];
3431
- var SUNO_MODELS = [
3432
- "V4",
3433
- "V4_5",
3625
+ var SUNO_ACTIVE_MODELS = ["V6", "V6_WILD", "V6_MINI"];
3626
+ var SUNO_LEGACY_MODELS = [
3627
+ "V5_5",
3628
+ "V5",
3434
3629
  "V4_5PLUS",
3435
3630
  "V4_5ALL",
3436
- "V5",
3437
- "V5_5"
3631
+ "V4_5",
3632
+ "V4"
3438
3633
  ];
3439
- var SUNO_ADD_TRACK_MODELS = ["V4_5PLUS", "V5", "V5_5"];
3634
+ var SUNO_MODELS = [...SUNO_ACTIVE_MODELS, ...SUNO_LEGACY_MODELS];
3635
+ var DEFAULT_SUNO_MODEL = "V6";
3636
+ function isLegacySunoModel(model) {
3637
+ return SUNO_LEGACY_MODELS.includes(model ?? "");
3638
+ }
3639
+ var SUNO_DURATION_MODELS = new Set(SUNO_ACTIVE_MODELS);
3640
+ function sunoModelHonoursDuration(model) {
3641
+ return SUNO_DURATION_MODELS.has(model ?? "");
3642
+ }
3643
+ var SUNO_ADD_TRACK_MODELS = [...SUNO_ACTIVE_MODELS, "V4_5PLUS", "V5", "V5_5"];
3440
3644
  var VOICE_DESIGN_MODELS = [
3441
3645
  "eleven_ttv_v3",
3442
3646
  "eleven_multilingual_ttv_v2"
@@ -3450,6 +3654,8 @@ var IMAGE_MASK_MODE = {
3450
3654
  "nano-banana-2-lite": "prompt",
3451
3655
  "gpt-image": "prompt",
3452
3656
  "gpt-image-2": "prompt",
3657
+ "gpt-image-2-5-flare": "prompt",
3658
+ "gpt-image-2-5-sunburst": "prompt",
3453
3659
  "seedream": "prompt",
3454
3660
  "seedream-5-lite": "prompt",
3455
3661
  "seedream-5-pro": "prompt",
@@ -4868,10 +5074,15 @@ function sunoCreditType(model, operation) {
4868
5074
  if (!SUNO_VERSION_PRICED_OPERATIONS.includes(operation)) {
4869
5075
  return operation;
4870
5076
  }
4871
- if (model === "V5_5") return "suno-v5_5";
4872
- if (model === "V5") return "suno-v5";
4873
- return operation;
5077
+ return model && SUNO_VERSION_CREDIT_KEYS[model] || operation;
4874
5078
  }
5079
+ var SUNO_VERSION_CREDIT_KEYS = {
5080
+ V6: "suno-v6",
5081
+ V6_WILD: "suno-v6_wild",
5082
+ V6_MINI: "suno-v6_mini",
5083
+ V5_5: "suno-v5_5",
5084
+ V5: "suno-v5"
5085
+ };
4875
5086
 
4876
5087
  // src/credit-estimators/video-utils.ts
4877
5088
  var VIDEO_UTIL_PRICING = {
@@ -8881,6 +9092,10 @@ var QUALITY_MAP = {
8881
9092
  "flux-pro-i2i": { field: "resolution", values: { low: "1K", mid: "2K", high: "2K" } },
8882
9093
  "gpt-image-2": { field: "resolution", values: { low: "1K", mid: "2K", high: "4K" } },
8883
9094
  "gpt-image-2-i2i": { field: "resolution", values: { low: "1K", mid: "2K", high: "4K" } },
9095
+ "gpt-image-2-5-flare": { field: "resolution", values: { low: "1K", mid: "2K", high: "4K" } },
9096
+ "gpt-image-2-5-flare-i2i": { field: "resolution", values: { low: "1K", mid: "2K", high: "4K" } },
9097
+ "gpt-image-2-5-sunburst": { field: "resolution", values: { low: "1K", mid: "2K", high: "4K" } },
9098
+ "gpt-image-2-5-sunburst-i2i": { field: "resolution", values: { low: "1K", mid: "2K", high: "4K" } },
8884
9099
  // Image gen — quality-style (medium/high or basic/high)
8885
9100
  "gpt-image": { field: "quality", values: { low: "medium", mid: "medium", high: "high" } },
8886
9101
  "gpt-image-i2i": { field: "quality", values: { low: "medium", mid: "medium", high: "high" } },
@@ -11531,7 +11746,9 @@ var PIPELINE_PINNABLE_IMAGE_MODELS = [
11531
11746
  "nano-banana-2",
11532
11747
  "flux",
11533
11748
  "gpt-image",
11534
- "gpt-image-2"
11749
+ "gpt-image-2",
11750
+ "gpt-image-2-5-flare",
11751
+ "gpt-image-2-5-sunburst"
11535
11752
  ];
11536
11753
  var PIPELINE_PINNABLE_VIDEO_MODELS = [
11537
11754
  "kling-turbo",
@@ -13789,7 +14006,12 @@ function estimateSheetCost(entityKind, sections, flavour, buckets, name, perPane
13789
14006
  }
13790
14007
 
13791
14008
  // src/reference-board-templates.ts
13792
- var REFERENCE_BOARD_PROVIDERS = ["nano-banana-pro", "gpt-image-2"];
14009
+ var REFERENCE_BOARD_PROVIDERS = [
14010
+ "nano-banana-pro",
14011
+ "gpt-image-2",
14012
+ "gpt-image-2-5-flare",
14013
+ "gpt-image-2-5-sunburst"
14014
+ ];
13793
14015
  var ANTI_RIGID = "Editorial reference-board layout, dark near-black background, thin yellow neon accent light, faint film-grain overlay, production-grade design UI. Organized but not rigidly locked: panels may shift position from generation to generation while staying readable, balanced and premium. Works cleanly in different aspect ratios without depending on a fixed left-column structure. All on-image labels in ENGLISH.";
13794
14016
  var PALETTE = "A COLOR PALETTE panel: 6 swatches with HEX codes derived from the dominant tones.";
13795
14017
  var CAPTION = (kind) => `Bottom caption: "Use this ${kind} board as a visual reference for consistent depiction across all generations." Bottom-right tags: STYLE \xB7 Modern \xB7 Realistic \xB7 Cinematic. Style: photorealistic, no illustration. 8K, fine grain, cinematic color grading.`;
@@ -14961,7 +15183,16 @@ var SCENE3D_DEFAULT_FPS = 24;
14961
15183
  var SCENE3D_DEFAULT_DURATION_SECONDS = 4;
14962
15184
  var SCENE3D_LIMITS = {
14963
15185
  minDimensionPx: 100,
14964
- maxDimensionPx: 1920,
15186
+ /** Applies to BOTH axes, so the worst admissible frame is SQUARE, not merely
15187
+ * wider — 2560x2560 is 3.2x the pixels of 1920x1080, and that is the frame
15188
+ * this bound was measured at. Raised from 1920 once that cost was measured
15189
+ * rather than assumed: on the software GL path a container actually uses,
15190
+ * an animated 2560x2560 frame costs ~154 ms/frame against ~65 ms at
15191
+ * 1920x1080, so even `maxDurationInFrames` (3600) lands near 9 min against
15192
+ * the render worker's 25-minute budget. Peak memory is the real price —
15193
+ * ~3.1 GB across the browser process tree versus ~1.6 GB — and is the number
15194
+ * to re-measure before widening this again. */
15195
+ maxDimensionPx: 2560,
14965
15196
  minFps: 15,
14966
15197
  maxFps: 60,
14967
15198
  minDurationInFrames: 1,
@@ -15454,7 +15685,9 @@ var SCENE3D_V2_LIMITS = {
15454
15685
  defaultFps: 24,
15455
15686
  /** Even integers only — an odd axis breaks H.264 chroma subsampling. */
15456
15687
  minDimensionPx: 100,
15457
- maxDimensionPx: 1920,
15688
+ /** Deliberately kept equal to v1's `SCENE3D_LIMITS.maxDimensionPx`: one
15689
+ * renderer draws both versions, so one measured ceiling bounds both. */
15690
+ maxDimensionPx: SCENE3D_LIMITS.maxDimensionPx,
15458
15691
  minEntities: 1,
15459
15692
  /** SEMANTIC entities, not exported mesh nodes. */
15460
15693
  maxEntities: 100,
@@ -16674,11 +16907,18 @@ var pro3DRenderQuoteSchema = zod.z.object({
16674
16907
  function isPro3DRenderQuote(value) {
16675
16908
  return pro3DRenderQuoteSchema.safeParse(value).success;
16676
16909
  }
16910
+ var pro3DRenderShotStillSchema = zod.z.object({
16911
+ shotIndex: zod.z.number().int().min(0),
16912
+ frame: zod.z.number().int().min(0),
16913
+ assetId: zod.z.string().min(1),
16914
+ url: zod.z.string().min(1)
16915
+ }).passthrough();
16677
16916
  var pro3DRenderJobOutputSchema = zod.z.object({
16678
16917
  videoUrl: zod.z.string().min(1),
16679
16918
  scenePlan: scene3DAnyPlanSchema,
16680
16919
  sceneRevisionId: zod.z.string().min(1),
16681
16920
  posterAssetId: zod.z.string().min(1),
16921
+ shotStills: zod.z.array(pro3DRenderShotStillSchema).optional(),
16682
16922
  sourceArtifactId: zod.z.string().min(1).optional(),
16683
16923
  validation: zod.z.object({
16684
16924
  status: zod.z.literal("passed"),
@@ -16704,6 +16944,20 @@ var pro3DRenderJobOutputSchema = zod.z.object({
16704
16944
  function isPro3DRenderJobOutput(value) {
16705
16945
  return pro3DRenderJobOutputSchema.safeParse(value).success;
16706
16946
  }
16947
+ function pro3DRenderShotStills(output) {
16948
+ const list = output?.shotStills;
16949
+ if (!Array.isArray(list)) return [];
16950
+ const parsed = list.flatMap((entry) => {
16951
+ const result = pro3DRenderShotStillSchema.safeParse(entry);
16952
+ return result.success ? [{
16953
+ shotIndex: result.data.shotIndex,
16954
+ frame: result.data.frame,
16955
+ assetId: result.data.assetId,
16956
+ url: result.data.url
16957
+ }] : [];
16958
+ });
16959
+ return parsed.sort((a, b) => a.shotIndex - b.shotIndex);
16960
+ }
16707
16961
  var pro3DRenderCoreOutputSchema = zod.z.object({
16708
16962
  videoUrl: zod.z.string().min(1),
16709
16963
  scenePlan: scene3DAnyPlanSchema
@@ -16747,6 +17001,40 @@ function pro3DRenderTimingOverrides(input) {
16747
17001
  return out;
16748
17002
  }
16749
17003
 
17004
+ // src/scene3d-render-pricing.ts
17005
+ var SCENE3D_RENDER_TIERS = ["base", "large", "xlarge"];
17006
+ var SCENE3D_RENDER_BASE_MAX_PX = 1920;
17007
+ var SCENE3D_RENDER_XLARGE_MIN_AREA_PX = 512e4;
17008
+ var SCENE3D_RENDER_TIER_MULTIPLIERS = {
17009
+ base: 1,
17010
+ large: 1.5,
17011
+ xlarge: 2.5
17012
+ };
17013
+ function scene3DRenderTier(width, height) {
17014
+ const w = typeof width === "number" && Number.isFinite(width) && width > 0 ? width : 0;
17015
+ const h = typeof height === "number" && Number.isFinite(height) && height > 0 ? height : 0;
17016
+ if (w === 0 || h === 0) return "base";
17017
+ if (Math.max(w, h) <= SCENE3D_RENDER_BASE_MAX_PX) return "base";
17018
+ return w * h > SCENE3D_RENDER_XLARGE_MIN_AREA_PX ? "xlarge" : "large";
17019
+ }
17020
+ function scene3DRenderTierCredits(baseCredits, tier) {
17021
+ return Math.ceil(baseCredits * SCENE3D_RENDER_TIER_MULTIPLIERS[tier]);
17022
+ }
17023
+ var RENDER_VIDEO_CREDIT_ID = "render-video";
17024
+ function renderVideoCreditId(input) {
17025
+ if (!input || typeof input !== "object") return RENDER_VIDEO_CREDIT_ID;
17026
+ const body = input;
17027
+ if (body.planType !== SCENE3D_PLAN_TYPE) return RENDER_VIDEO_CREDIT_ID;
17028
+ if (!body.plan || typeof body.plan !== "object") return RENDER_VIDEO_CREDIT_ID;
17029
+ const plan = body.plan;
17030
+ const tier = scene3DRenderTier(plan.width, plan.height);
17031
+ return tier === "base" ? RENDER_VIDEO_CREDIT_ID : `${RENDER_VIDEO_CREDIT_ID}:3d-${tier}`;
17032
+ }
17033
+ function pro3DRenderFrameUnit(quality, tier = "base") {
17034
+ const unit = `${PRO3D_RENDER_CREDIT_ID}:render-frame:${quality}`;
17035
+ return tier === "base" ? unit : `${unit}:${tier}`;
17036
+ }
17037
+
16750
17038
  // src/studio-transient.ts
16751
17039
  var STUDIO_TRANSIENT_KEYS = [
16752
17040
  "trash",
@@ -17122,6 +17410,7 @@ exports.DEFAULT_OVERLAY_TEXT = DEFAULT_OVERLAY_TEXT;
17122
17410
  exports.DEFAULT_PANEL_COUNT = DEFAULT_PANEL_COUNT;
17123
17411
  exports.DEFAULT_REF_IMAGE_MAX = DEFAULT_REF_IMAGE_MAX;
17124
17412
  exports.DEFAULT_SECTIONS = DEFAULT_SECTIONS;
17413
+ exports.DEFAULT_SUNO_MODEL = DEFAULT_SUNO_MODEL;
17125
17414
  exports.DEFAULT_USAGE_MODE = DEFAULT_USAGE_MODE;
17126
17415
  exports.DEFAULT_VIDEO_ANALYSIS_MODEL = DEFAULT_VIDEO_ANALYSIS_MODEL;
17127
17416
  exports.DEFAULT_VIDEO_ANALYSIS_TIER = DEFAULT_VIDEO_ANALYSIS_TIER;
@@ -17382,6 +17671,7 @@ exports.REF_HANDLE_CATEGORY = REF_HANDLE_CATEGORY;
17382
17671
  exports.REF_IMAGE_MAX_LIMITS = REF_IMAGE_MAX_LIMITS;
17383
17672
  exports.REF_TOKEN_NAMESPACE_PREFIXES = REF_TOKEN_NAMESPACE_PREFIXES;
17384
17673
  exports.RENDERING_SPEED_SUPPORT = RENDERING_SPEED_SUPPORT;
17674
+ exports.RENDER_VIDEO_CREDIT_ID = RENDER_VIDEO_CREDIT_ID;
17385
17675
  exports.REPEATABLE_NODE_TYPES = REPEATABLE_NODE_TYPES;
17386
17676
  exports.REPEAT_PLACEHOLDER = REPEAT_PLACEHOLDER;
17387
17677
  exports.REPLICATE_LIP_SYNC_PROVIDERS = REPLICATE_LIP_SYNC_PROVIDERS;
@@ -17414,6 +17704,10 @@ exports.SCENE3D_PLAN_TYPE = SCENE3D_PLAN_TYPE;
17414
17704
  exports.SCENE3D_PRIMITIVES = SCENE3D_PRIMITIVES;
17415
17705
  exports.SCENE3D_PRIMITIVE_MATERIAL_ROLE = SCENE3D_PRIMITIVE_MATERIAL_ROLE;
17416
17706
  exports.SCENE3D_RENDERER_ASSET_KINDS = SCENE3D_RENDERER_ASSET_KINDS;
17707
+ exports.SCENE3D_RENDER_BASE_MAX_PX = SCENE3D_RENDER_BASE_MAX_PX;
17708
+ exports.SCENE3D_RENDER_TIERS = SCENE3D_RENDER_TIERS;
17709
+ exports.SCENE3D_RENDER_TIER_MULTIPLIERS = SCENE3D_RENDER_TIER_MULTIPLIERS;
17710
+ exports.SCENE3D_RENDER_XLARGE_MIN_AREA_PX = SCENE3D_RENDER_XLARGE_MIN_AREA_PX;
17417
17711
  exports.SCENE3D_SCHEMA_VERSION = SCENE3D_SCHEMA_VERSION;
17418
17712
  exports.SCENE3D_SCHEMA_VERSION_V2 = SCENE3D_SCHEMA_VERSION_V2;
17419
17713
  exports.SCENE3D_SUPPORTED_SCHEMA_VERSIONS = SCENE3D_SUPPORTED_SCHEMA_VERSIONS;
@@ -17462,14 +17756,18 @@ exports.STUDIO_DEPENDENT_FRAMES_CAPABILITY = STUDIO_DEPENDENT_FRAMES_CAPABILITY;
17462
17756
  exports.STUDIO_SHOT_TRANSIENT_KEYS = STUDIO_SHOT_TRANSIENT_KEYS;
17463
17757
  exports.STUDIO_TRANSIENT_KEYS = STUDIO_TRANSIENT_KEYS;
17464
17758
  exports.SUBMISSION_STATUSES = SUBMISSION_STATUSES;
17759
+ exports.SUNO_ACTIVE_MODELS = SUNO_ACTIVE_MODELS;
17465
17760
  exports.SUNO_ADD_TRACK_MODELS = SUNO_ADD_TRACK_MODELS;
17761
+ exports.SUNO_DURATION_MODELS = SUNO_DURATION_MODELS;
17466
17762
  exports.SUNO_FIELD_HANDLE_FIELDS = SUNO_FIELD_HANDLE_FIELDS;
17467
17763
  exports.SUNO_HARD_CEILING = SUNO_HARD_CEILING;
17764
+ exports.SUNO_LEGACY_MODELS = SUNO_LEGACY_MODELS;
17468
17765
  exports.SUNO_MODELS = SUNO_MODELS;
17469
17766
  exports.SUNO_SELECT_OPERATIONS = SUNO_SELECT_OPERATIONS;
17470
17767
  exports.SUNO_TEXT_MAX = SUNO_TEXT_MAX;
17471
17768
  exports.SUNO_TITLE_MAX = SUNO_TITLE_MAX;
17472
17769
  exports.SUNO_TRACK_SOURCE_TYPES = SUNO_TRACK_SOURCE_TYPES;
17770
+ exports.SUNO_VERSION_CREDIT_KEYS = SUNO_VERSION_CREDIT_KEYS;
17473
17771
  exports.SUNO_VERSION_PRICED_OPERATIONS = SUNO_VERSION_PRICED_OPERATIONS;
17474
17772
  exports.SUPPORTED_FONT_NAMES = SUPPORTED_FONT_NAMES;
17475
17773
  exports.SURROUND_DIRECTIONS = SURROUND_DIRECTIONS;
@@ -17768,6 +18066,7 @@ exports.isGvpSupportedProvider = isGvpSupportedProvider;
17768
18066
  exports.isHandleInputWired = isHandleInputWired;
17769
18067
  exports.isKineticCaptionStyle = isKineticCaptionStyle;
17770
18068
  exports.isKnownScene3DEngine = isKnownScene3DEngine;
18069
+ exports.isLegacySunoModel = isLegacySunoModel;
17771
18070
  exports.isLocationUsageMode = isLocationUsageMode;
17772
18071
  exports.isMinimaxH3Provider = isMinimaxH3Provider;
17773
18072
  exports.isObjectAspectRatio = isObjectAspectRatio;
@@ -17865,9 +18164,12 @@ exports.presetDataMatches = presetDataMatches;
17865
18164
  exports.presetEntries = presetEntries;
17866
18165
  exports.pricedVideoSelection = pricedVideoSelection;
17867
18166
  exports.pro3DRenderCoreOutputSchema = pro3DRenderCoreOutputSchema;
18167
+ exports.pro3DRenderFrameUnit = pro3DRenderFrameUnit;
17868
18168
  exports.pro3DRenderJobOutputSchema = pro3DRenderJobOutputSchema;
17869
18169
  exports.pro3DRenderProducedSchemaVersion = pro3DRenderProducedSchemaVersion;
17870
18170
  exports.pro3DRenderQuoteSchema = pro3DRenderQuoteSchema;
18171
+ exports.pro3DRenderShotStillSchema = pro3DRenderShotStillSchema;
18172
+ exports.pro3DRenderShotStills = pro3DRenderShotStills;
17871
18173
  exports.pro3DRenderTimingOverrides = pro3DRenderTimingOverrides;
17872
18174
  exports.qualityOptionsByKind = qualityOptionsByKind;
17873
18175
  exports.readPromptAffixes = readPromptAffixes;
@@ -17877,6 +18179,7 @@ exports.referenceSheetCreditId = referenceSheetCreditId;
17877
18179
  exports.registerCatalogSidecars = registerCatalogSidecars;
17878
18180
  exports.registerSidecarLoaders = registerSidecarLoaders;
17879
18181
  exports.renderAnalyzedScene = renderAnalyzedScene;
18182
+ exports.renderVideoCreditId = renderVideoCreditId;
17880
18183
  exports.requiresSequenceExecution = requiresSequenceExecution;
17881
18184
  exports.resetCatalogSidecars = resetCatalogSidecars;
17882
18185
  exports.resolutionOptionsByKind = resolutionOptionsByKind;
@@ -17985,6 +18288,8 @@ exports.scene3DPrimitiveSchema = scene3DPrimitiveSchema;
17985
18288
  exports.scene3DProjectionIssues = scene3DProjectionIssues;
17986
18289
  exports.scene3DProvenanceSchema = scene3DProvenanceSchema;
17987
18290
  exports.scene3DReferenceSchema = scene3DReferenceSchema;
18291
+ exports.scene3DRenderTier = scene3DRenderTier;
18292
+ exports.scene3DRenderTierCredits = scene3DRenderTierCredits;
17988
18293
  exports.scene3DSampleForFrame = scene3DSampleForFrame;
17989
18294
  exports.scene3DSha256Schema = scene3DSha256Schema;
17990
18295
  exports.scene3DShotForFrame = scene3DShotForFrame;
@@ -18027,6 +18332,7 @@ exports.stripStudioTransientSettings = stripStudioTransientSettings;
18027
18332
  exports.stripTransientRuntimeData = stripTransientRuntimeData;
18028
18333
  exports.summarizeScene3DOperations = summarizeScene3DOperations;
18029
18334
  exports.sunoCreditType = sunoCreditType;
18335
+ exports.sunoModelHonoursDuration = sunoModelHonoursDuration;
18030
18336
  exports.supportedDefaultDimensions = supportedDefaultDimensions;
18031
18337
  exports.supportsAdvancedMode = supportsAdvancedMode;
18032
18338
  exports.supportsEndAnchor = supportsEndAnchor;