@nodaro/shared 3.38.0 → 3.40.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.
Files changed (134) hide show
  1. package/dist/{chunk-AQA6YXY5.cjs → chunk-25PAKSMK.cjs} +50 -38
  2. package/dist/chunk-25PAKSMK.cjs.map +1 -0
  3. package/dist/{chunk-5OED47LE.js → chunk-2BJADMEX.js} +3 -3
  4. package/dist/{chunk-5OED47LE.js.map → chunk-2BJADMEX.js.map} +1 -1
  5. package/dist/{chunk-YNJ44IAL.cjs → chunk-4IWVZR44.cjs} +5 -5
  6. package/dist/{chunk-YNJ44IAL.cjs.map → chunk-4IWVZR44.cjs.map} +1 -1
  7. package/dist/{chunk-33QG2DOW.cjs → chunk-4LKEOIOT.cjs} +6 -6
  8. package/dist/{chunk-33QG2DOW.cjs.map → chunk-4LKEOIOT.cjs.map} +1 -1
  9. package/dist/{chunk-ZG4XSEZV.js → chunk-5CKTBGB6.js} +71 -2
  10. package/dist/chunk-5CKTBGB6.js.map +1 -0
  11. package/dist/{chunk-BDSFMY4X.js → chunk-5J5L26IZ.js} +5 -5
  12. package/dist/{chunk-BDSFMY4X.js.map → chunk-5J5L26IZ.js.map} +1 -1
  13. package/dist/{chunk-VRLRPGO7.js → chunk-A4NDZBSJ.js} +93 -11
  14. package/dist/chunk-A4NDZBSJ.js.map +1 -0
  15. package/dist/{chunk-KOP7UTQR.cjs → chunk-ADYPAGQF.cjs} +71 -2
  16. package/dist/chunk-ADYPAGQF.cjs.map +1 -0
  17. package/dist/{chunk-HABDAHZR.cjs → chunk-BOUEGYGI.cjs} +118 -28
  18. package/dist/chunk-BOUEGYGI.cjs.map +1 -0
  19. package/dist/{chunk-JLKZEKQ3.cjs → chunk-BWQRAQUD.cjs} +43 -43
  20. package/dist/{chunk-JLKZEKQ3.cjs.map → chunk-BWQRAQUD.cjs.map} +1 -1
  21. package/dist/{chunk-MSIIC6MY.cjs → chunk-DJIRIBKX.cjs} +4 -4
  22. package/dist/{chunk-MSIIC6MY.cjs.map → chunk-DJIRIBKX.cjs.map} +1 -1
  23. package/dist/{chunk-XA53RUSD.js → chunk-E4MLBJKG.js} +8 -8
  24. package/dist/{chunk-XA53RUSD.js.map → chunk-E4MLBJKG.js.map} +1 -1
  25. package/dist/chunk-FVZMFDRO.js +23 -0
  26. package/dist/chunk-FVZMFDRO.js.map +1 -0
  27. package/dist/{chunk-DKTRVOU5.js → chunk-GNY2S63W.js} +4 -4
  28. package/dist/{chunk-DKTRVOU5.js.map → chunk-GNY2S63W.js.map} +1 -1
  29. package/dist/{chunk-YHCG3HOR.js → chunk-GXTWKAJF.js} +3 -3
  30. package/dist/{chunk-YHCG3HOR.js.map → chunk-GXTWKAJF.js.map} +1 -1
  31. package/dist/{chunk-DE3PEIIP.cjs → chunk-IKCFSNNH.cjs} +21 -21
  32. package/dist/{chunk-DE3PEIIP.cjs.map → chunk-IKCFSNNH.cjs.map} +1 -1
  33. package/dist/{chunk-BYP62B7F.cjs → chunk-JN3V33AN.cjs} +6 -6
  34. package/dist/{chunk-BYP62B7F.cjs.map → chunk-JN3V33AN.cjs.map} +1 -1
  35. package/dist/{chunk-QXTCIJP5.js → chunk-LOTL72UI.js} +3 -3
  36. package/dist/{chunk-QXTCIJP5.js.map → chunk-LOTL72UI.js.map} +1 -1
  37. package/dist/{chunk-7QITUDRT.js → chunk-MLB6YNLS.js} +4 -4
  38. package/dist/{chunk-7QITUDRT.js.map → chunk-MLB6YNLS.js.map} +1 -1
  39. package/dist/{chunk-JABZNRXL.cjs → chunk-N2KG5AMQ.cjs} +4 -4
  40. package/dist/{chunk-JABZNRXL.cjs.map → chunk-N2KG5AMQ.cjs.map} +1 -1
  41. package/dist/{chunk-THGNDVVH.js → chunk-NRSYWQKM.js} +16 -4
  42. package/dist/chunk-NRSYWQKM.js.map +1 -0
  43. package/dist/{chunk-IIGKJYWL.js → chunk-PYDZ7ZGH.js} +3 -3
  44. package/dist/{chunk-IIGKJYWL.js.map → chunk-PYDZ7ZGH.js.map} +1 -1
  45. package/dist/{chunk-ENFBA33M.cjs → chunk-RLVZ3RLE.cjs} +8 -8
  46. package/dist/{chunk-ENFBA33M.cjs.map → chunk-RLVZ3RLE.cjs.map} +1 -1
  47. package/dist/{chunk-JMUHMLJP.js → chunk-SYUY7GNT.js} +7 -5
  48. package/dist/chunk-SYUY7GNT.js.map +1 -0
  49. package/dist/{chunk-VRUN5TG2.cjs → chunk-TUUEQ2WR.cjs} +8 -8
  50. package/dist/{chunk-VRUN5TG2.cjs.map → chunk-TUUEQ2WR.cjs.map} +1 -1
  51. package/dist/{chunk-HZ46RDLD.cjs → chunk-VNC5DNIQ.cjs} +11 -11
  52. package/dist/{chunk-HZ46RDLD.cjs.map → chunk-VNC5DNIQ.cjs.map} +1 -1
  53. package/dist/{chunk-MSDECC3A.cjs → chunk-VSDJCJKP.cjs} +44 -42
  54. package/dist/chunk-VSDJCJKP.cjs.map +1 -0
  55. package/dist/{chunk-GW54ANCH.js → chunk-X7IRSO4L.js} +3 -3
  56. package/dist/{chunk-GW54ANCH.js.map → chunk-X7IRSO4L.js.map} +1 -1
  57. package/dist/chunk-XOZIHGR5.cjs +27 -0
  58. package/dist/chunk-XOZIHGR5.cjs.map +1 -0
  59. package/dist/{chunk-YSEM7JDE.cjs → chunk-YEET2QGF.cjs} +4 -4
  60. package/dist/{chunk-YSEM7JDE.cjs.map → chunk-YEET2QGF.cjs.map} +1 -1
  61. package/dist/{chunk-CMH2ACOX.js → chunk-YEZ2YUKK.js} +3 -3
  62. package/dist/{chunk-CMH2ACOX.js.map → chunk-YEZ2YUKK.js.map} +1 -1
  63. package/dist/{chunk-SPP6HQMM.js → chunk-YX5FW7ON.js} +39 -5
  64. package/dist/chunk-YX5FW7ON.js.map +1 -0
  65. package/dist/{chunk-75ZMA34U.cjs → chunk-ZAOBNW6Y.cjs} +47 -11
  66. package/dist/chunk-ZAOBNW6Y.cjs.map +1 -0
  67. package/dist/{chunk-AZBIXGM5.js → chunk-ZXIP5T5V.js} +3 -3
  68. package/dist/{chunk-AZBIXGM5.js.map → chunk-ZXIP5T5V.js.map} +1 -1
  69. package/dist/entries/apps.cjs +42 -42
  70. package/dist/entries/apps.js +7 -7
  71. package/dist/entries/credits.cjs +150 -150
  72. package/dist/entries/credits.d.cts +1 -1
  73. package/dist/entries/credits.d.ts +1 -1
  74. package/dist/entries/credits.js +7 -7
  75. package/dist/entries/llm-models.d.cts +1 -1
  76. package/dist/entries/llm-models.d.ts +1 -1
  77. package/dist/entries/model-catalog.cjs +66 -66
  78. package/dist/entries/model-catalog.d.cts +2 -2
  79. package/dist/entries/model-catalog.d.ts +2 -2
  80. package/dist/entries/model-catalog.js +4 -4
  81. package/dist/entries/models.cjs +261 -229
  82. package/dist/entries/models.d.cts +17 -3
  83. package/dist/entries/models.d.ts +17 -3
  84. package/dist/entries/models.js +4 -4
  85. package/dist/entries/nodes.cjs +206 -206
  86. package/dist/entries/nodes.d.cts +1 -1
  87. package/dist/entries/nodes.d.ts +1 -1
  88. package/dist/entries/nodes.js +8 -8
  89. package/dist/entries/pipeline.cjs +149 -149
  90. package/dist/entries/pipeline.d.cts +1 -1
  91. package/dist/entries/pipeline.d.ts +1 -1
  92. package/dist/entries/pipeline.js +3 -3
  93. package/dist/entries/ugc.cjs +71 -71
  94. package/dist/entries/ugc.js +4 -4
  95. package/dist/entries/video.cjs +123 -115
  96. package/dist/entries/video.d.cts +26 -1
  97. package/dist/entries/video.d.ts +26 -1
  98. package/dist/entries/video.js +4 -4
  99. package/dist/index.cjs +1044 -1004
  100. package/dist/index.d.cts +3 -3
  101. package/dist/index.d.ts +3 -3
  102. package/dist/index.js +17 -17
  103. package/dist/{model-catalog-I48SvalA.d.ts → model-catalog-dQPdLltX.d.cts} +11 -0
  104. package/dist/{model-catalog-I48SvalA.d.cts → model-catalog-dQPdLltX.d.ts} +11 -0
  105. package/dist/{model-constants-C43YS07I.d.ts → model-constants-B5ka4TQr.d.cts} +61 -6
  106. package/dist/{model-constants-C43YS07I.d.cts → model-constants-B5ka4TQr.d.ts} +61 -6
  107. package/package.json +1 -1
  108. package/src/__tests__/cast-swap-limits.test.ts +9 -0
  109. package/src/__tests__/gvp-supported-providers.test.ts +8 -1
  110. package/src/__tests__/kling4-catalog.test.ts +129 -0
  111. package/src/__tests__/video-character-refs.test.ts +3 -2
  112. package/src/cast-swap-limits.ts +9 -0
  113. package/src/credit-identifiers.ts +6 -0
  114. package/src/entries/models.ts +8 -0
  115. package/src/entries/video.ts +2 -0
  116. package/src/model-catalog.ts +82 -0
  117. package/src/model-constants.ts +151 -3
  118. package/src/node-default-mappings.ts +3 -0
  119. package/src/video-character-refs.ts +67 -0
  120. package/src/video-ui-defaults.ts +8 -5
  121. package/dist/chunk-75ZMA34U.cjs.map +0 -1
  122. package/dist/chunk-AQA6YXY5.cjs.map +0 -1
  123. package/dist/chunk-HABDAHZR.cjs.map +0 -1
  124. package/dist/chunk-JMUHMLJP.js.map +0 -1
  125. package/dist/chunk-KOP7UTQR.cjs.map +0 -1
  126. package/dist/chunk-MSDECC3A.cjs.map +0 -1
  127. package/dist/chunk-SPP6HQMM.js.map +0 -1
  128. package/dist/chunk-THGNDVVH.js.map +0 -1
  129. package/dist/chunk-VRLRPGO7.js.map +0 -1
  130. package/dist/chunk-W4GABGRD.js +0 -21
  131. package/dist/chunk-W4GABGRD.js.map +0 -1
  132. package/dist/chunk-XJ3HJSO5.cjs +0 -25
  133. package/dist/chunk-XJ3HJSO5.cjs.map +0 -1
  134. package/dist/chunk-ZG4XSEZV.js.map +0 -1
@@ -116,6 +116,7 @@ var VIDEO_RATIOS_SEEDANCE_2 = ["16:9", "9:16", "1:1", "4:3", "3:4", "21:9", "ada
116
116
  var VIDEO_RATIOS_HAPPYHORSE_11 = ["16:9", "9:16", "1:1", "4:3", "3:4", "4:5", "5:4", "21:9", "9:21"];
117
117
  var VIDEO_RATIOS_WAN_3 = ["adaptive", "16:9", "4:3", "1:1", "3:4", "9:16"];
118
118
  var VIDEO_RATIOS_VIDU_Q4 = ["16:9", "9:16", "1:1", "4:3", "3:4"];
119
+ var VIDEO_RATIOS_KLING_4 = ["auto", "16:9", "9:16", "1:1", "21:9"];
119
120
  var IMAGE_MODELS = {
120
121
  // ── Google Nano Banana ──
121
122
  "nano-banana": {
@@ -1429,6 +1430,74 @@ var VIDEO_MODELS = {
1429
1430
  { identifier: "kling-3-omni:15s", credits: 750 }
1430
1431
  ]
1431
1432
  },
1433
+ // Kling 4.0 — two KIE endpoints, two ids (one per entry in the model list).
1434
+ // Reference: docs.kie.ai/market/kling/v4-reference-to-video — text plus up to
1435
+ // 10 reference images, 5 reference videos (2-30s each), 7 subjects and 3
1436
+ // voices (15 materials in all); with none it is plain text-to-video. A wired
1437
+ // start frame joins the reference images. Keyframes:
1438
+ // docs.kie.ai/market/kling/v4-keyframe-to-video — start frame, up to 8
1439
+ // in-between frames (the node's Image References, in order) and an end
1440
+ // frame; with no frame it is text-to-video. Both: 3-30s, 720p/1080p, native
1441
+ // audio always on, no seed. Per-second billing; a reference-video run bills
1442
+ // its input seconds too (ee/billing/ref-video-billing.ts).
1443
+ "kling-4": {
1444
+ id: "kling-4",
1445
+ kind: "video",
1446
+ modes: ["i2v", "t2v"],
1447
+ family: "Kuaishou",
1448
+ maker: "kuaishou",
1449
+ label: "Kling 4.0",
1450
+ series: "Kling",
1451
+ description: "Kling 4.0 \u2014 up to 30s with native audio and lip-sync; reference images, videos, characters and voices, or plain text.",
1452
+ useCases: ["premium", "narrative", "cinematic", "reference"],
1453
+ // Reference VIDEOS are taken (VIDEO_REF_LIMITS_BY_PROVIDER `videos: 5`) but
1454
+ // `video-reference` is NOT declared: like wan-3, the generate-video-pro
1455
+ // extend chain (a continuation tail sent as a reference video) is unwired
1456
+ // for it, so the pro node offers it in keyframes mode only.
1457
+ features: ["audio", "reference-image", "reference-to-video", "character-subjects"],
1458
+ aspectRatios: VIDEO_RATIOS_KLING_4,
1459
+ durations: [3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30],
1460
+ defaultDuration: 5,
1461
+ resolutions: ["720p", "1080p"],
1462
+ unlistedResolutionRendersAs: "720p",
1463
+ noSeed: true,
1464
+ // neither Kling 4.0 schema has a `seed` (additionalProperties: false)
1465
+ pricing: [
1466
+ { identifier: "kling-4", credits: 360, note: "default 5s 720p \u2014 see :Ns:res variants for exact" },
1467
+ { identifier: "kling-4:5s:720p", credits: 360, note: "5s 720p (the default tier)" },
1468
+ { identifier: "kling-4:5s:1080p", credits: 540, note: "5s 1080p" },
1469
+ { identifier: "kling-4:3s:720p", credits: 220, note: "3s 720p (min)" },
1470
+ { identifier: "kling-4:30s:1080p", credits: 3190, note: "30s 1080p (max)" },
1471
+ { identifier: "kling-4:8s:720p-ref", credits: 340, note: "per-second anchor with a reference video: billed \xD7 (output + max(output, input seconds)) \xF7 8" }
1472
+ ]
1473
+ },
1474
+ "kling-4-keyframes": {
1475
+ id: "kling-4-keyframes",
1476
+ kind: "video",
1477
+ modes: ["i2v", "t2v"],
1478
+ family: "Kuaishou",
1479
+ maker: "kuaishou",
1480
+ label: "Kling 4.0 Keyframes",
1481
+ series: "Kling",
1482
+ description: "Kling 4.0 Keyframes \u2014 start frame, up to 8 in-between frames and an end frame; up to 30s with native audio.",
1483
+ useCases: ["premium", "narrative", "keyframes"],
1484
+ // `reference-to-video`: in-between frames alone (no start frame) run —
1485
+ // KIE takes `keyframe_urls` without `first_frame_url`.
1486
+ features: ["end-frame", "audio", "reference-image", "reference-to-video", "keyframes"],
1487
+ aspectRatios: VIDEO_RATIOS_KLING_4,
1488
+ durations: [3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30],
1489
+ defaultDuration: 5,
1490
+ resolutions: ["720p", "1080p"],
1491
+ unlistedResolutionRendersAs: "720p",
1492
+ noSeed: true,
1493
+ pricing: [
1494
+ { identifier: "kling-4-keyframes", credits: 360, note: "default 5s 720p \u2014 see :Ns:res variants for exact" },
1495
+ { identifier: "kling-4-keyframes:5s:720p", credits: 360, note: "5s 720p (the default tier)" },
1496
+ { identifier: "kling-4-keyframes:5s:1080p", credits: 540, note: "5s 1080p" },
1497
+ { identifier: "kling-4-keyframes:3s:720p", credits: 220, note: "3s 720p (min)" },
1498
+ { identifier: "kling-4-keyframes:30s:1080p", credits: 3190, note: "30s 1080p (max)" }
1499
+ ]
1500
+ },
1432
1501
  // ── xAI Grok video ──
1433
1502
  "grok-i2v": {
1434
1503
  id: "grok-i2v",
@@ -3550,5 +3619,5 @@ function modelIdsByKindMode(kind, modes, opts = {}) {
3550
3619
  }
3551
3620
 
3552
3621
  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, 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 };
3553
- //# sourceMappingURL=chunk-ZG4XSEZV.js.map
3554
- //# sourceMappingURL=chunk-ZG4XSEZV.js.map
3622
+ //# sourceMappingURL=chunk-5CKTBGB6.js.map
3623
+ //# sourceMappingURL=chunk-5CKTBGB6.js.map