@kinetune/cli 0.1.2 → 0.2.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 (2) hide show
  1. package/dist/kinetune.mjs +363 -16
  2. package/package.json +1 -1
package/dist/kinetune.mjs CHANGED
@@ -29,7 +29,12 @@ var CATEGORY_IDS = [
29
29
  "abstract",
30
30
  "minimal",
31
31
  "neon",
32
- "pop-art"
32
+ "pop-art",
33
+ "lo-fi",
34
+ "grunge",
35
+ "cosmic",
36
+ "cyber",
37
+ "dreamy"
33
38
  ];
34
39
  var CATEGORIES = {
35
40
  release: { label: "Release", description: "Bold announcement looks for a new single.", background: "image" },
@@ -47,7 +52,12 @@ var CATEGORIES = {
47
52
  abstract: { label: "Abstract", description: "Flowing color fields and gradients.", background: "gradient" },
48
53
  minimal: { label: "Minimal", description: "Quiet color and clean type.", background: "gradient" },
49
54
  neon: { label: "Neon", description: "Glowing color in the dark.", background: "gradient" },
50
- "pop-art": { label: "Pop art", description: "Loud patterns and graphic color.", background: "pattern" }
55
+ "pop-art": { label: "Pop art", description: "Loud patterns and graphic color.", background: "pattern" },
56
+ "lo-fi": { label: "Lo-fi", description: "Cozy illustrated rooms, rainy windows and soft grain.", background: "image" },
57
+ grunge: { label: "Grunge", description: "Torn paper, concrete and raw black-and-white grit.", background: "image" },
58
+ cosmic: { label: "Cosmic", description: "Nebulae, planets and deep-space light.", background: "image" },
59
+ cyber: { label: "Cyber", description: "Cyberpunk streets, screens and digital glitches.", background: "image" },
60
+ dreamy: { label: "Dreamy", description: "Clouds, soft skies and hazy golden light.", background: "image" }
51
61
  };
52
62
  var categoryUsesImages = (id2) => CATEGORIES[id2].background === "image";
53
63
 
@@ -19762,7 +19772,7 @@ var FONTS = {
19762
19772
  "space-mono": { family: "Space Mono", kind: "mono", weights: [400, 700] }
19763
19773
  };
19764
19774
  var FONT_IDS = Object.keys(FONTS);
19765
- var LYRIC_FONT_IDS = FONT_IDS.filter((id2) => ["sans", "condensed", "serif"].includes(FONTS[id2].kind) && !["abril-fatface", "bebas-neue", "anton"].includes(id2));
19775
+ var LYRIC_FONT_IDS = FONT_IDS.filter((id2) => ["sans", "condensed", "serif", "mono"].includes(FONTS[id2].kind) && id2 !== "abril-fatface");
19766
19776
 
19767
19777
  // ../composition/src/song.ts
19768
19778
  var SPECTRUM_BANDS = 32;
@@ -19784,8 +19794,307 @@ var VIZZ_ENGINE_IDS = [
19784
19794
  "classic-spectrum"
19785
19795
  ];
19786
19796
 
19797
+ // ../composition/src/lyric-styles.ts
19798
+ var LYRIC_STAGES = ["showcase", "kinetic"];
19799
+ var LYRIC_LAYOUTS = ["line", "stack", "word", "scatter", "typewriter", "cascade", "subtitle", "chat"];
19800
+ var LYRIC_REVEALS = ["fade", "rise", "pop", "blur", "slide", "drop", "flip", "glitch", "wipe", "type"];
19801
+ var LYRIC_EXITS = ["fade", "blur", "rise", "scale", "glitch", "cut"];
19802
+ var LYRIC_EFFECTS = ["fill", "glow", "scale", "lift", "color", "none"];
19803
+ var LYRIC_EMPHASES = ["none", "accent", "box", "underline", "size", "font"];
19804
+ var LYRIC_MATERIALS = ["solid", "glow", "outline", "shadow", "extrude", "chrome", "gradient", "grunge"];
19805
+ var LYRIC_POSITIONS = ["center", "upper", "lower"];
19806
+ var SPECTRUM_STYLES = ["none", "bars", "mirror", "line", "wave", "dots", "circle"];
19807
+ var SPECTRUM_PLACEMENTS = ["bottom", "center", "top"];
19808
+ var PLAYER_STYLES = ["none", "bar", "card", "minimal"];
19809
+ var HERO_KINDS = ["none", "vinyl", "album", "tv", "cube"];
19810
+ var amount = external_exports.number().min(0).max(1);
19811
+ var LyricsSchema = external_exports.object({
19812
+ stage: external_exports.enum(LYRIC_STAGES),
19813
+ layout: external_exports.enum(LYRIC_LAYOUTS),
19814
+ reveal: external_exports.enum(LYRIC_REVEALS),
19815
+ exit: external_exports.enum(LYRIC_EXITS),
19816
+ effect: external_exports.enum(LYRIC_EFFECTS),
19817
+ emphasis: external_exports.enum(LYRIC_EMPHASES),
19818
+ material: external_exports.enum(LYRIC_MATERIALS),
19819
+ panel: external_exports.enum(["none", "soft", "solid"]),
19820
+ size: external_exports.number().min(0.7).max(1.5),
19821
+ // × the layout's own size
19822
+ position: external_exports.enum(LYRIC_POSITIONS)
19823
+ }).strict();
19824
+ var FxSchema = external_exports.object({
19825
+ shake: amount,
19826
+ // the frame jolts on hits
19827
+ zoom: amount,
19828
+ // the frame punches in on hits
19829
+ flash: amount,
19830
+ // an exposure flash on the strongest hits
19831
+ rgb: amount,
19832
+ // the lyrics split into red and cyan on hits
19833
+ glitch: amount
19834
+ // the lyrics slice and jump on the strongest hits
19835
+ }).strict();
19836
+ var SpectrumSchema = external_exports.object({
19837
+ style: external_exports.enum(SPECTRUM_STYLES),
19838
+ placement: external_exports.enum(SPECTRUM_PLACEMENTS),
19839
+ // circle is always centred
19840
+ size: external_exports.number().min(0.5).max(1.5),
19841
+ opacity: external_exports.number().min(0.2).max(1)
19842
+ }).strict();
19843
+ var FinishSchema = external_exports.object({
19844
+ grain: amount,
19845
+ vignette: amount,
19846
+ leak: amount,
19847
+ // drifting warm light leaks
19848
+ dust: amount,
19849
+ // specks and scratches
19850
+ scanlines: external_exports.boolean(),
19851
+ // CRT lines and a faint flicker
19852
+ letterbox: external_exports.boolean()
19853
+ // cinema bars
19854
+ }).strict();
19855
+ var L = (lyrics) => ({
19856
+ stage: "kinetic",
19857
+ layout: "line",
19858
+ reveal: "rise",
19859
+ exit: "fade",
19860
+ effect: "none",
19861
+ emphasis: "none",
19862
+ material: "solid",
19863
+ panel: "none",
19864
+ size: 1,
19865
+ position: "center",
19866
+ ...lyrics
19867
+ });
19868
+ var FX = (fx = {}) => ({ shake: 0, zoom: 0, flash: 0, rgb: 0, glitch: 0, ...fx });
19869
+ var SP = (style = "none", spectrum = {}) => ({ style, placement: "bottom", size: 1, opacity: 0.8, ...spectrum });
19870
+ var FIN = (finish = {}) => ({ grain: 0, vignette: 0.3, leak: 0, dust: 0, scanlines: false, letterbox: false, ...finish });
19871
+ var CONDENSED = ["bebas-neue", "anton", "oswald", "barlow-condensed", "big-shoulders-display", "archivo-black", "league-spartan"];
19872
+ var LYRIC_STYLES = {
19873
+ showcase: {
19874
+ label: "Showcase",
19875
+ description: "The release is the hero: cover, title and artist, with a karaoke line under them.",
19876
+ lyrics: L({ stage: "showcase", effect: "fill" }),
19877
+ fx: FX(),
19878
+ spectrum: SP(),
19879
+ finish: FIN({ vignette: 0 }),
19880
+ player: "none"
19881
+ },
19882
+ "block-stack": {
19883
+ label: "Block stack",
19884
+ description: "Words build into a bold justified block; short words grow huge.",
19885
+ lyrics: L({ layout: "stack", reveal: "pop", exit: "blur", effect: "none", emphasis: "accent", size: 1 }),
19886
+ fx: FX({ zoom: 0.35, shake: 0.15 }),
19887
+ spectrum: SP(),
19888
+ finish: FIN({ grain: 0.25, vignette: 0.45 }),
19889
+ player: "none",
19890
+ fonts: CONDENSED
19891
+ },
19892
+ punch: {
19893
+ label: "Punch",
19894
+ description: "One huge word at a time, hitting on the beat, with the line underneath.",
19895
+ lyrics: L({ layout: "word", reveal: "pop", exit: "cut", emphasis: "box", size: 1.1 }),
19896
+ fx: FX({ shake: 0.45, zoom: 0.5, flash: 0.2 }),
19897
+ spectrum: SP(),
19898
+ finish: FIN({ grain: 0.3, vignette: 0.5 }),
19899
+ player: "none",
19900
+ fonts: CONDENSED
19901
+ },
19902
+ "depth-scatter": {
19903
+ label: "Depth scatter",
19904
+ description: "Words float in at different depths and sharpen into focus.",
19905
+ lyrics: L({ layout: "scatter", reveal: "blur", exit: "blur", emphasis: "size", material: "glow" }),
19906
+ fx: FX({ zoom: 0.25, rgb: 0.25 }),
19907
+ spectrum: SP(),
19908
+ finish: FIN({ grain: 0.2, vignette: 0.5, dust: 0.2 }),
19909
+ player: "none"
19910
+ },
19911
+ neon: {
19912
+ label: "Neon",
19913
+ description: "Glowing tube-light lyrics with a spectrum glowing below.",
19914
+ lyrics: L({ layout: "line", reveal: "fade", exit: "fade", effect: "glow", material: "glow" }),
19915
+ fx: FX({ zoom: 0.2, flash: 0.15 }),
19916
+ spectrum: SP("mirror", { opacity: 0.7 }),
19917
+ finish: FIN({ vignette: 0.5 }),
19918
+ player: "none"
19919
+ },
19920
+ terminal: {
19921
+ label: "Terminal",
19922
+ description: "Lyrics typed out line by line on a glowing screen, with a cursor.",
19923
+ lyrics: L({ layout: "typewriter", reveal: "type", exit: "cut", effect: "color", material: "glow" }),
19924
+ fx: FX({ rgb: 0.2, glitch: 0.15 }),
19925
+ spectrum: SP("bars", { size: 0.8, opacity: 0.75 }),
19926
+ finish: FIN({ scanlines: true, grain: 0.15, vignette: 0.55 }),
19927
+ player: "minimal",
19928
+ fonts: ["space-mono"]
19929
+ },
19930
+ cinematic: {
19931
+ label: "Cinematic",
19932
+ description: "Elegant titles that breathe in and out of focus between cinema bars.",
19933
+ lyrics: L({ layout: "line", reveal: "blur", exit: "blur", effect: "none", emphasis: "font", size: 0.95 }),
19934
+ fx: FX(),
19935
+ spectrum: SP(),
19936
+ finish: FIN({ letterbox: true, grain: 0.3, vignette: 0.55, leak: 0.35 }),
19937
+ player: "none"
19938
+ },
19939
+ player: {
19940
+ label: "Player",
19941
+ description: "A music-app lyric sheet that scrolls with the song, with cover and progress bar.",
19942
+ lyrics: L({ layout: "cascade", reveal: "fade", exit: "fade", effect: "fill", size: 0.95 }),
19943
+ fx: FX(),
19944
+ spectrum: SP(),
19945
+ finish: FIN({ vignette: 0.25 }),
19946
+ player: "card"
19947
+ },
19948
+ "lo-fi": {
19949
+ label: "Lo-fi",
19950
+ description: "Soft words drifting up over grain and dust, with a quiet progress bar.",
19951
+ lyrics: L({ layout: "line", reveal: "rise", exit: "rise", effect: "color", size: 0.95 }),
19952
+ fx: FX({ zoom: 0.1 }),
19953
+ spectrum: SP(),
19954
+ finish: FIN({ grain: 0.45, dust: 0.35, vignette: 0.4, leak: 0.2 }),
19955
+ player: "bar"
19956
+ },
19957
+ zine: {
19958
+ label: "Zine",
19959
+ description: "Raw stacked type with grit, RGB hits and scratches.",
19960
+ lyrics: L({ layout: "stack", reveal: "slide", exit: "glitch", emphasis: "box", material: "grunge" }),
19961
+ fx: FX({ shake: 0.35, rgb: 0.5, glitch: 0.35, zoom: 0.25 }),
19962
+ spectrum: SP(),
19963
+ finish: FIN({ grain: 0.5, dust: 0.5, vignette: 0.45 }),
19964
+ player: "none",
19965
+ fonts: CONDENSED
19966
+ },
19967
+ glitch: {
19968
+ label: "Glitch",
19969
+ description: "Digital lyrics that tear, split and flicker with the beat.",
19970
+ lyrics: L({ layout: "line", reveal: "glitch", exit: "glitch", effect: "color", material: "solid" }),
19971
+ fx: FX({ rgb: 0.75, glitch: 0.7, shake: 0.25, flash: 0.15 }),
19972
+ spectrum: SP("line", { opacity: 0.6 }),
19973
+ finish: FIN({ scanlines: true, grain: 0.25, vignette: 0.4 }),
19974
+ player: "none"
19975
+ },
19976
+ "pop-art": {
19977
+ label: "Pop art",
19978
+ description: "Chunky words that bounce in with hard shadows and highlighter boxes.",
19979
+ lyrics: L({ layout: "stack", reveal: "drop", exit: "scale", emphasis: "box", material: "shadow" }),
19980
+ fx: FX({ zoom: 0.3, shake: 0.1 }),
19981
+ spectrum: SP(),
19982
+ finish: FIN({ vignette: 0.1 }),
19983
+ player: "none"
19984
+ },
19985
+ dreamy: {
19986
+ label: "Dreamy",
19987
+ description: "A soft lyric sheet that drifts through haze and light leaks.",
19988
+ lyrics: L({ layout: "cascade", reveal: "blur", exit: "blur", effect: "glow", material: "glow", size: 1.05 }),
19989
+ fx: FX({ zoom: 0.1 }),
19990
+ spectrum: SP(),
19991
+ finish: FIN({ leak: 0.5, grain: 0.2, vignette: 0.35 }),
19992
+ player: "none"
19993
+ },
19994
+ chrome: {
19995
+ label: "Chrome",
19996
+ description: "Polished metal lyrics that flip into place.",
19997
+ lyrics: L({ layout: "stack", reveal: "flip", exit: "scale", emphasis: "size", material: "chrome", size: 1.05 }),
19998
+ fx: FX({ zoom: 0.3, flash: 0.25 }),
19999
+ spectrum: SP(),
20000
+ finish: FIN({ vignette: 0.5, grain: 0.15 }),
20001
+ player: "none",
20002
+ fonts: CONDENSED
20003
+ },
20004
+ visualizer: {
20005
+ label: "Visualizer",
20006
+ description: "The cover inside a circular spectrum, lyrics beneath it.",
20007
+ lyrics: L({ layout: "subtitle", reveal: "rise", exit: "fade", effect: "fill", position: "lower", size: 0.9 }),
20008
+ fx: FX({ zoom: 0.3, shake: 0.1 }),
20009
+ spectrum: SP("circle", { opacity: 0.9 }),
20010
+ finish: FIN({ vignette: 0.45, grain: 0.1 }),
20011
+ player: "none"
20012
+ },
20013
+ minimal: {
20014
+ label: "Minimal",
20015
+ description: "Clean centred lines; the sung word lights up.",
20016
+ lyrics: L({ layout: "line", reveal: "rise", exit: "fade", effect: "color" }),
20017
+ fx: FX(),
20018
+ spectrum: SP(),
20019
+ finish: FIN({ vignette: 0.2 }),
20020
+ player: "none"
20021
+ },
20022
+ outline: {
20023
+ label: "Outline",
20024
+ description: "Hollow letters that fill in as each word is sung.",
20025
+ lyrics: L({ layout: "line", reveal: "wipe", exit: "fade", effect: "fill", material: "outline", size: 1.1 }),
20026
+ fx: FX({ zoom: 0.2 }),
20027
+ spectrum: SP("wave", { opacity: 0.5 }),
20028
+ finish: FIN({ vignette: 0.35, grain: 0.15 }),
20029
+ player: "none",
20030
+ fonts: CONDENSED
20031
+ },
20032
+ messages: {
20033
+ label: "Messages",
20034
+ description: "Each line arrives as a chat message, typed as it is sung.",
20035
+ lyrics: L({ layout: "chat", reveal: "pop", exit: "fade", effect: "none", position: "lower", size: 0.9 }),
20036
+ fx: FX(),
20037
+ spectrum: SP(),
20038
+ finish: FIN({ vignette: 0.25 }),
20039
+ player: "none"
20040
+ },
20041
+ vinyl: {
20042
+ label: "Vinyl",
20043
+ description: "Your cover spinning on a 3D turntable, the lyrics beside it.",
20044
+ lyrics: L({ layout: "line", reveal: "rise", exit: "fade", effect: "fill", size: 0.9 }),
20045
+ fx: FX({ zoom: 0.1 }),
20046
+ spectrum: SP(),
20047
+ finish: FIN({ grain: 0.25, vignette: 0.45, leak: 0.25 }),
20048
+ player: "none",
20049
+ hero: "vinyl"
20050
+ },
20051
+ album: {
20052
+ label: "Album",
20053
+ description: "Your cover floating in 3D over its reflection, lyrics beneath.",
20054
+ lyrics: L({ layout: "subtitle", reveal: "blur", exit: "blur", effect: "color", size: 0.95 }),
20055
+ fx: FX({ zoom: 0.15 }),
20056
+ spectrum: SP("line", { opacity: 0.55 }),
20057
+ finish: FIN({ vignette: 0.45, grain: 0.12 }),
20058
+ player: "none",
20059
+ hero: "album"
20060
+ },
20061
+ tv: {
20062
+ label: "Retro TV",
20063
+ description: "A 3D CRT television typing your lyrics on its glowing screen.",
20064
+ lyrics: L({ layout: "typewriter", reveal: "type", exit: "cut", effect: "color", material: "glow" }),
20065
+ fx: FX({ rgb: 0.15 }),
20066
+ spectrum: SP(),
20067
+ finish: FIN({ grain: 0.3, vignette: 0.5, dust: 0.2 }),
20068
+ player: "none",
20069
+ hero: "tv",
20070
+ fonts: ["space-mono"]
20071
+ },
20072
+ cube: {
20073
+ label: "Cube",
20074
+ description: "Each line printed on a face of a 3D cube that turns with the song.",
20075
+ lyrics: L({ layout: "line", reveal: "fade", exit: "cut", effect: "color", emphasis: "accent" }),
20076
+ fx: FX({ zoom: 0.2, shake: 0.1 }),
20077
+ spectrum: SP(),
20078
+ finish: FIN({ grain: 0.2, vignette: 0.5 }),
20079
+ player: "none",
20080
+ hero: "cube",
20081
+ fonts: CONDENSED
20082
+ },
20083
+ "big-type": {
20084
+ label: "Big type",
20085
+ description: "Giant gradient words stacking up, with a spectrum along the floor.",
20086
+ lyrics: L({ layout: "stack", reveal: "rise", exit: "rise", emphasis: "underline", material: "gradient" }),
20087
+ fx: FX({ zoom: 0.35, flash: 0.1 }),
20088
+ spectrum: SP("bars", { opacity: 0.6 }),
20089
+ finish: FIN({ vignette: 0.4 }),
20090
+ player: "none",
20091
+ fonts: CONDENSED
20092
+ }
20093
+ };
20094
+ var LYRIC_STYLE_IDS = Object.keys(LYRIC_STYLES);
20095
+
19787
20096
  // ../composition/src/look.ts
19788
- var LOOK_VERSION = 2;
20097
+ var LOOK_VERSION = 3;
19789
20098
  var ASPECT_RATIOS = ["9:16", "16:9", "1:1"];
19790
20099
  var AspectRatioSchema = external_exports.enum(ASPECT_RATIOS);
19791
20100
  var hex3 = external_exports.string().regex(/^#[0-9a-fA-F]{6}$/, "6-digit hex color");
@@ -19818,7 +20127,7 @@ var OVERLAYS = ["none", "snow", "leaves", "petals", "embers", "sparkles", "rain"
19818
20127
  var PATTERNS = ["stripes", "dots", "grid", "waves", "checker", "sunburst", "halftone", "zigzag"];
19819
20128
  var BACKGROUND_MOTIONS = ["still", "zoom-in", "zoom-out", "ken-burns", "tilt"];
19820
20129
  var MOTION_DIRECTIONS = ["center", "up", "down", "left", "right", "up-left", "up-right", "down-left", "down-right"];
19821
- var BACKGROUND_SOURCES = ["generated", "stock"];
20130
+ var BACKGROUND_SOURCES = ["generated", "stock", "upload"];
19822
20131
  var backgroundMedia = {
19823
20132
  source: external_exports.enum(BACKGROUND_SOURCES),
19824
20133
  prompt: external_exports.string().min(10).max(2e3),
@@ -19878,10 +20187,14 @@ var LookSpecSchema = external_exports.object({
19878
20187
  }).strict(),
19879
20188
  headline: external_exports.object({ style: external_exports.enum(["pill", "plain", "underline", "outline", "ribbon"]), default: external_exports.enum(HEADLINES) }).strict(),
19880
20189
  badges: external_exports.object({ style: external_exports.enum(["light", "dark", "glass", "outline"]) }).strict(),
19881
- lyrics: external_exports.object({
19882
- effect: external_exports.enum(["fill", "glow", "scale", "lift"]),
19883
- panel: external_exports.enum(["none", "soft", "solid"])
19884
- }).strict(),
20190
+ // The lyric style the motion below came from (see lyric-styles.ts) and its expanded settings.
20191
+ style: external_exports.enum(LYRIC_STYLE_IDS),
20192
+ lyrics: LyricsSchema,
20193
+ fx: FxSchema,
20194
+ spectrum: SpectrumSchema,
20195
+ finish: FinishSchema,
20196
+ player: external_exports.enum(PLAYER_STYLES),
20197
+ hero: external_exports.enum(HERO_KINDS),
19885
20198
  background: BackgroundSchema,
19886
20199
  overlay: external_exports.object({ kind: external_exports.enum(OVERLAYS), density: external_exports.number().min(0).max(1) }).strict(),
19887
20200
  visualizer: external_exports.object({
@@ -19934,19 +20247,28 @@ var TrimSchema = external_exports.object({
19934
20247
  start_seconds: external_exports.number().min(0),
19935
20248
  end_seconds: external_exports.number().positive()
19936
20249
  }).strict().refine((v) => v.end_seconds > v.start_seconds, { message: "end_seconds must be greater than start_seconds" }).refine((v) => v.end_seconds - v.start_seconds >= MIN_TRIM_SECONDS - 1e-6, { message: `The trimmed section must be at least ${MIN_TRIM_SECONDS} seconds` });
19937
- var BACKGROUND_SOURCE_IDS = ["ai-image", "ai-video", "stock-photo", "stock-video", "designed"];
19938
- var MEDIA_BACKGROUND_SOURCES = ["ai-image", "ai-video", "stock-photo", "stock-video"];
20250
+ var BACKGROUND_SOURCE_IDS = ["ai-image", "ai-video", "stock-photo", "stock-video", "upload-photo", "upload-video", "designed"];
20251
+ var MEDIA_BACKGROUND_SOURCES = ["ai-image", "ai-video", "stock-photo", "stock-video", "upload-photo", "upload-video"];
19939
20252
  var BACKGROUND_SOURCES2 = {
19940
20253
  "ai-image": { label: "AI image", description: "An image made for this Look, moving slowly across the song.", kind: "image", source: "generated" },
19941
20254
  "ai-video": { label: "AI video loop", description: "An AI image brought to life as a seamless loop.", kind: "video", source: "generated" },
19942
20255
  "stock-photo": { label: "Stock photo", description: "A photo picked from Pexels for this Look.", kind: "image", source: "stock" },
19943
20256
  "stock-video": { label: "Stock video", description: "A Pexels clip made into a seamless loop.", kind: "video", source: "stock" },
20257
+ "upload-photo": { label: "Your photo", description: "A photo you upload, moving slowly across the song.", kind: "image", source: "upload" },
20258
+ "upload-video": { label: "Your video", description: "A clip you upload, made into a seamless loop.", kind: "video", source: "upload" },
19944
20259
  designed: { label: "Designed", description: "A drawn gradient or pattern.", kind: null, source: null }
19945
20260
  };
19946
20261
  var BackgroundRequestSchema = external_exports.object({
19947
20262
  source: external_exports.enum(BACKGROUND_SOURCE_IDS).optional(),
19948
- quality: external_exports.enum(BACKGROUND_TIERS).default("high")
20263
+ quality: external_exports.enum(BACKGROUND_TIERS).default("high"),
20264
+ /** The uploaded photo or video (POST /backgrounds) for the upload-photo and upload-video sources. */
20265
+ upload_id: external_exports.string().min(1).max(120).optional()
19949
20266
  }).strict();
20267
+ var BACKGROUND_UPLOAD_LIMITS = {
20268
+ image: { maxBytes: 25 * 1024 * 1024, minShortSide: 720, types: ["image/jpeg", "image/png", "image/webp"] },
20269
+ video: { maxBytes: 300 * 1024 * 1024, minShortSide: 720, minSeconds: 4, maxSeconds: 180, types: ["video/mp4", "video/quicktime", "video/webm"] }
20270
+ };
20271
+ var isUploadSource = (source) => BACKGROUND_SOURCES2[source].source === "upload";
19950
20272
  var backgroundSourcesFor = (category) => categoryUsesImages(category) ? MEDIA_BACKGROUND_SOURCES : ["designed"];
19951
20273
  var backgroundSourceFor = (category, background) => background.source ?? backgroundSourcesFor(category)[0];
19952
20274
  var FEATURE_ARTIST_MODES = ["auto", "always", "never"];
@@ -19958,9 +20280,10 @@ var LookRequestSchema = external_exports.discriminatedUnion("mode", [
19958
20280
  background: BackgroundRequestSchema.default({ quality: "high" }),
19959
20281
  visibility: external_exports.enum(["private", "public"]).default("private"),
19960
20282
  direction: external_exports.string().trim().max(2e3).optional(),
19961
- feature_artist: featureArtist
20283
+ feature_artist: featureArtist,
20284
+ lyric_style: external_exports.enum(LYRIC_STYLE_IDS).optional()
19962
20285
  }).strict(),
19963
- external_exports.object({ mode: external_exports.literal("existing"), id: external_exports.string().min(1).max(120) }).strict()
20286
+ external_exports.object({ mode: external_exports.literal("existing"), id: external_exports.string().min(1).max(120), lyric_style: external_exports.enum(LYRIC_STYLE_IDS).optional() }).strict()
19964
20287
  ]);
19965
20288
  var common = {
19966
20289
  song_id: external_exports.string().min(1).max(120),
@@ -19986,6 +20309,12 @@ var LyricVideoRequestSchema = external_exports.object({
19986
20309
  message: `The ${value.look.category} category takes ${allowed.map((s) => `"${s}"`).join(", ")}`
19987
20310
  });
19988
20311
  }
20312
+ if (value.look.mode === "new") {
20313
+ const upload = value.look.background.source ? isUploadSource(value.look.background.source) : false;
20314
+ if (upload && !value.look.background.upload_id) ctx.addIssue({ code: "custom", path: ["look", "background", "upload_id"], message: "Upload the photo or video first (POST /backgrounds) and pass its id" });
20315
+ if (!upload && value.look.background.upload_id) ctx.addIssue({ code: "custom", path: ["look", "background", "upload_id"], message: "upload_id goes with the upload-photo and upload-video sources" });
20316
+ if (upload && value.look.visibility === "public") ctx.addIssue({ code: "custom", path: ["look", "visibility"], message: "A Look with your own background stays private" });
20317
+ }
19989
20318
  if (value.look.mode === "new" && value.look.feature_artist === "always") {
19990
20319
  if (BACKGROUND_SOURCES2[backgroundSourceFor(value.look.category, value.look.background)].source !== "generated")
19991
20320
  ctx.addIssue({ code: "custom", path: ["look", "feature_artist"], message: "Only an AI image or AI video background can show the artist" });
@@ -20051,7 +20380,7 @@ var lyricInput = external_exports.object({
20051
20380
  song_id: songId,
20052
20381
  callback_url: CALLBACK,
20053
20382
  metadata: METADATA,
20054
- look: lyricShape.look.describe('{"mode":"existing","id":"look_\u2026"} to reuse a saved Look, or {"mode":"new","category":"\u2026","background":{"source":"ai-image","quality":"high"},"visibility":"private","direction":"\u2026","feature_artist":"auto"} to have one designed'),
20383
+ look: lyricShape.look.describe('{"mode":"existing","id":"look_\u2026"} to reuse a saved Look (add "lyric_style" to render it in another lyric style, at no extra cost), or {"mode":"new","category":"\u2026","lyric_style":"\u2026","background":{"source":"ai-image","quality":"high"},"visibility":"private","direction":"\u2026","feature_artist":"auto"} to have one designed (background.source "upload-photo"/"upload-video" with background.upload_id from upload_background designs it around your own media; such a Look stays private). lyric_style (optional, from get_options) sets how the lyrics are presented and animated: block-stack, punch, player, neon, terminal, cinematic\u2026 Omit it and the director picks one'),
20055
20384
  aspect_ratios: lyricShape.aspect_ratios.describe('Formats to render, each its own file: "9:16" (vertical), "16:9" (wide), "1:1" (square)'),
20056
20385
  display: lyricShape.display.describe("Which elements show (title, artist, cover, lyrics, badges, headline) and their sizes"),
20057
20386
  trim: lyricShape.trim.describe("Render only this section of the song (at least 8 seconds)"),
@@ -20404,6 +20733,7 @@ var OPERATIONS = [
20404
20733
  input: external_exports.object({
20405
20734
  scope: external_exports.enum(["all", "official", "community", "mine"]).optional().describe("Which library; default all"),
20406
20735
  category: external_exports.string().max(40).optional().describe("A category id from get_options"),
20736
+ lyric_style: external_exports.string().max(40).optional().describe("A lyric style id from get_options (how the lyrics move)"),
20407
20737
  q: external_exports.string().max(100).optional().describe("Search words"),
20408
20738
  sort: external_exports.enum(["newest", "popular"]).optional(),
20409
20739
  limit: external_exports.number().int().min(1).max(100).optional(),
@@ -20479,6 +20809,23 @@ var OPERATIONS = [
20479
20809
  cli: ["looks", "visibility"],
20480
20810
  mcp: "set_look_visibility"
20481
20811
  },
20812
+ {
20813
+ id: "backgrounds.upload",
20814
+ group: "looks",
20815
+ title: "Upload a background",
20816
+ summary: "Upload your own photo or video to design a New Look around",
20817
+ description: 'Photo: JPEG, PNG or WebP, at least 720 px on the short side, up to 25 MB. Video: MP4, MOV or WebM, 4\u2013180 seconds, at least 720 px on the short side, up to 300 MB; it becomes a seamless loop of up to 20 s. Only with the rights to use it. Then quote a lyric video with look {"mode":"new","category":"\u2026","background":{"source":"upload-photo" or "upload-video","upload_id":"\u2026"},"visibility":"private"}.',
20818
+ method: "POST",
20819
+ path: "/api/v1/backgrounds",
20820
+ scopes: ["library:write", "videos:write"],
20821
+ input: external_exports.object({ file_url: httpsUrl("the photo or video").optional(), rights_confirmed: external_exports.literal(true).describe("You have the rights to use this photo or video") }),
20822
+ files: [{ field: "file", urlField: "file_url", accept: ["image/jpeg", "image/png", "image/webp", "video/mp4", "video/quicktime", "video/webm"], description: "Your photo or video" }],
20823
+ readOnly: false,
20824
+ destructive: false,
20825
+ idempotent: false,
20826
+ cli: ["backgrounds", "upload"],
20827
+ mcp: "upload_background"
20828
+ },
20482
20829
  /* Quotes and videos */
20483
20830
  {
20484
20831
  id: "quotes.lyric_video",
@@ -24250,7 +24597,7 @@ async function revoke(config2) {
24250
24597
  // package.json
24251
24598
  var package_default = {
24252
24599
  name: "@kinetune/cli",
24253
- version: "0.1.2",
24600
+ version: "0.2.0",
24254
24601
  description: "Command line for Kinetune: lyric videos and Spotify Canvas loops from your songs, for people and AI agents.",
24255
24602
  license: "MIT",
24256
24603
  homepage: "https://kinetune.com/developers#cli",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kinetune/cli",
3
- "version": "0.1.2",
3
+ "version": "0.2.0",
4
4
  "description": "Command line for Kinetune: lyric videos and Spotify Canvas loops from your songs, for people and AI agents.",
5
5
  "license": "MIT",
6
6
  "homepage": "https://kinetune.com/developers#cli",