@ioris/core
Version:
This package provides the core functionality for the [@ioris](https://www.npmjs.com/search?q=%40ioris) ecosystem for managing music lyrics with time synchronization.
31 lines (30 loc) • 1.02 kB
TypeScript
/**
* Editing API - Merge functions
* Merge multiple Word/Line into one
*/
import type { ValidationResult } from "../../schemas/result";
import type { Lyric } from "../../types";
/**
* Merge multiple Words into one
*
* @param lyric - Target Lyric
* @param wordIDs - Array of Word IDs to merge (2 or more, within the same Line)
* @returns Lyric after merging
*
* @example
* // "さ", "く", "ら" → "さくら"(Japanese hiragana merge)
* const result = mergeWords(lyric, ["word-1", "word-2", "word-3"]);
*/
export declare function mergeWords(lyric: Lyric, wordIDs: string[]): ValidationResult<Lyric>;
/**
* Merge multiple Lines into one
*
* @param lyric - Target Lyric
* @param lineIDs - Array of Line IDs to merge (2 or more, within the same Paragraph)
* @returns Lyric after merging
*
* @example
* // Line1 + Line2 → merged into one Line
* const result = mergeLines(lyric, ["line-1", "line-2"]);
*/
export declare function mergeLines(lyric: Lyric, lineIDs: string[]): ValidationResult<Lyric>;