import { q as PixiVNJsonLabelStep, P as PixiVNJsonOperation } from './PixiVNJsonLabelStep-GNKlmb4l.cjs'; import { LabelAbstract, LabelProps, StepLabelPropsType, StepLabelType } from '@drincs/pixi-vn/narration'; import { PixiVNJson } from './schema.cjs'; import './PixiVNJsonIfElse-CgOnelja.cjs'; import '@drincs/pixi-vn'; import '@drincs/pixi-vn/motion'; import 'pixi.js'; type LabelJsonOptions = { /** * Function that converts a string to a {@link PixiVNJsonOperation}. * If is a special operation you can return undefined and can run the operation. */ operationStringConvert?: (value: string, step: PixiVNJsonLabelStep, props: StepLabelPropsType | object) => Promise; /** * If true and a dialog is empty or has only spaces, {@link PixiVNJsonLabelStep.goNextStep} will be set to true. */ skipEmptyDialogs?: boolean; }; /** * A label whose steps are defined by a plain JSON structure ({@link PixiVNJsonLabelStep}[]). * * `LabelJson` bridges pixi-vn's label system and the JSON script format: each step is * lazily converted to a {@link StepLabelType} closure that resolves dialogues, choices, * operations, and conditional overrides at runtime via {@link JsonUnifier}. * * @template T - The type of the props object passed between steps. */ declare class LabelJson extends LabelAbstract, T> { /** * @param id is the id of the label * @param steps is the list of steps that the label will perform * @param props is the properties of the label */ constructor(id: string, steps: (PixiVNJsonLabelStep | (() => PixiVNJsonLabelStep))[], props?: LabelProps>, options?: LabelJsonOptions); private _steps; get steps(): StepLabelType[]; get stepCount(): number; getStepById(stepId: number): StepLabelType | undefined; private operationStringConvert?; private skipEmptyDialogs; /** * Returns the SHA-1 hash of the raw step at the given index. * Can be used to detect step changes across label reloads. * * @param index - Zero-based index of the step. * @returns The hex SHA-1 string, or `undefined` if the index is out of range. */ getStepSha(index: number): string | undefined; private getDialogueText; private getDialogue; private getChoices; private stepConverter; } /** * Import a Pixi'VN JSON to the system. * This feature was created to give other developers the ability to create tools that can generate Pixi'VN labels or that generate Pixi'VN after extracting information from a programming language designed for writing narratives. * @param values The Pixi'VN JSON to be imported * @returns */ declare function importPixiVNJson(values: PixiVNJson | string | (PixiVNJson | string)[], options?: LabelJsonOptions): Promise; export { LabelJson, importPixiVNJson };