import { P as PixiVNJsonIfElse, c as PixiVNJsonValueGet, d as PixiVNJsonArithmeticOperations, e as PixiVNJsonConditions, m as PixiVNJsonFunction, f as PixiVNJsonConditionalStatements, l as PixiVNJsonConditionalResultToCombine, b as PixiVNJsonOnlyStorageSet, a as PixiVNJsonValueSet } from './PixiVNJsonIfElse-CgOnelja.js'; import { P as PixiVNJsonOperation, a as PixiVNJsonOperationString, o as PixiVNJsonCanvasAnimate, l as PixiVNJsonUnknownEdit, e as PixiVNJsonCanvasRemove, p as PixiVNJsonCanvasClear, n as PixiVNJsonCanvasEffect, h as PixiVNJsonCanvasImageContainerShow, i as PixiVNJsonImageContainerEdit, c as PixiVNJsonCanvasImageVideoShow, d as PixiVNJsonImageEdit, j as PixiVNJsonCanvasTextShow, k as PixiVNJsonTextEdit, f as PixiVNJsonVideoEdit, g as PixiVNJsonVideoPauseResume, m as PixiVNJsonNarration, b as PixiVNJsonSound, q as PixiVNJsonLabelStep } from './PixiVNJsonLabelStep-Bce6KGwp.js'; import { ImageSpriteMemory, VideoSpriteMemory, ContainerMemory, ContainerChild, CanvasBaseInterface } from '@drincs/pixi-vn/canvas'; import { StepLabelPropsType } from '@drincs/pixi-vn/narration'; import { StorageElementType } from '@drincs/pixi-vn/storage'; export { V as VariableGetter, a as VariableGetterHandler } from './VariableGetter-ZDA6kdah.js'; import '@drincs/pixi-vn'; import '@drincs/pixi-vn/motion'; import 'pixi.js'; /** * Loads or lazily-loads asset bundles/aliases described by a JSON operation. * Supports both individual asset aliases (`type: "assets"`) and named bundles * (`type: "bundle"`), each with `"load"` (blocking) or `"lazyload"` (background) variants. * * @param origin - The operation or conditional expression that describes what to load. */ declare function loadAssets(origin: PixiVNJsonOperation | PixiVNJsonIfElse | PixiVNJsonOperationString): Promise; /** * Handles show, edit, and remove operations for {@link ImageSprite} canvas elements. * * @param operation - The image operation descriptor. */ declare function imageOperation(operation: PixiVNJsonCanvasImageVideoShow | PixiVNJsonImageEdit | PixiVNJsonCanvasRemove): Promise; /** * Handles show, edit, remove, pause, and resume operations for {@link VideoSprite} canvas elements. * * @param operation - The video operation descriptor. */ declare function videoOperation(operation: PixiVNJsonCanvasRemove | PixiVNJsonCanvasImageVideoShow | PixiVNJsonVideoEdit | PixiVNJsonVideoPauseResume): Promise; /** * Handles show, edit, and remove operations for {@link ImageContainer} canvas elements. * * @param operation - The image-container operation descriptor. */ declare function imageContainerOperation(operation: PixiVNJsonCanvasRemove | PixiVNJsonCanvasImageContainerShow | PixiVNJsonImageContainerEdit): Promise; /** * Handles show, edit, and remove operations for {@link Text} canvas elements. * On show, the text content is run through the active {@link translator} before display. * * @param operation - The text operation descriptor. */ declare function textOperation(operation: PixiVNJsonCanvasRemove | PixiVNJsonCanvasTextShow | PixiVNJsonTextEdit): Promise; /** * Handles edit and remove operations for any canvas element whose specific type is unknown. * Useful as a generic fallback when the element type is not determined at the call site. * * @param operation - The generic canvas-element operation descriptor. */ declare function canvasElementOperation(operation: PixiVNJsonUnknownEdit> | PixiVNJsonCanvasRemove): Promise; /** * Handles generic canvas-wide operations (e.g. clearing every element). * * @param operation - The canvas operation descriptor. */ declare function canvasOperation(operation: PixiVNJsonCanvasClear): void; /** * Applies a visual effect (e.g. shake) to a canvas element. * * @param operation - The canvas effect descriptor. */ declare function effectOperation(operation: PixiVNJsonCanvasEffect): Promise; /** * Starts a keyframe animation or animation sequence on a canvas element. * * @param operation - The animate operation descriptor. */ declare function animateOperation(operation: PixiVNJsonCanvasAnimate): void; /** * GENERATED FILE — do not edit by hand. * Produced by `scripts/generate-container-memory-schema.mjs` from `@drincs/pixi-vn`'s own * `ContainerMemory` type. Re-run that script (see its header comment) to refresh this file after * that type changes. */ /** * JSON Schema (usable as `@drincs/pixi-vn-ink`'s `HashtagHandlerOptions.keySchemas` values, or * with any other JSON Schema validator) for `ContainerMemory`, excluding its own `elements` (the * container's child canvas elements — a self-referential list, not a flat property). */ declare const containerMemorySchema: object; /** * GENERATED FILE — do not edit by hand. * Produced by `scripts/generate-entrance-transition-schemas.mjs` from * `@drincs/pixi-vn`'s own transition prop types. Re-run that script (see its header comment) to * refresh this file after those types change. */ /** * JSON Schemas (usable as `@drincs/pixi-vn-ink`'s `HashtagHandlerOptions.keySchemas` values, or * with any other JSON Schema validator) for each entrance transition's own props, keyed by * transition name. */ declare const entranceTransitionKeySchemas: Record; /** * The transition types used to bring a canvas element **in** (as opposed to * `moveout`/`zoomout`/`pushout`, used only to remove one). `dissolve`/`fade` have no direction — * they're shared with removal — but are still "entrance" transitions in the sense that * {@link entranceTransitionKeySchemas} validates them the same way for a `show`-style command. */ declare const ENTRANCE_TRANSITION_TYPES: readonly ["dissolve", "fade", "movein", "zoomin", "pushin"]; /** * One of {@link ENTRANCE_TRANSITION_TYPES}. */ type EntranceTransitionType = (typeof ENTRANCE_TRANSITION_TYPES)[number]; /** * Runs an entrance transition on a canvas element — the same dispatch this package's own * interpreter uses internally (see `@/actions/canvas`) for the built-in * `image`/`video`/`text`/`imagecontainer` `show` operations (`showWithDissolve`, `showWithFade`, * `moveIn`, `zoomIn`, `pushIn`), exposed here so a third-party canvas-component library (e.g. * `pixi-vn-spine`) can reuse it for its own custom operation/command instead of re-implementing * the type → function mapping. * * @param alias The unique alias the element is (or will be) registered under on the canvas. * @param component The canvas element to show (e.g. a `Spine` instance already built by the * caller). Matches the `component` parameter of `@drincs/pixi-vn`'s own `showWithDissolve`/ * `moveIn`/etc. * @param transitionType Which entrance transition to run (e.g. `"dissolve"`). * @param props The transition's own props (e.g. `{ duration: 2 }`), typically validated against * {@link entranceTransitionKeySchemas} beforehand. * @returns The ids of the tickers used by the transition, once it starts. */ declare function executeEntranceTransition(alias: string, component: CanvasBaseInterface | undefined, transitionType: EntranceTransitionType, props?: object): Promise; /** * Handles narration-related operations such as requesting player input or * clearing the current dialogue line. * * @param operation - The narration operation descriptor. */ declare function narrationOperation(operation: PixiVNJsonNarration): void; /** * Handles all sound operations: play, stop, pause, resume, and property editing. * Supports targeting individual sounds, channels, or all sounds at once. * * @param operation - The sound operation descriptor. */ declare function soundOperation(operation: PixiVNJsonSound): void; /** * Sets a value in the appropriate storage layer (flag storage, persistent storage, * temporary storage, or label parameters) as described by the operation. * * @param value - The storage-set operation descriptor. * @param props - The current step label props (used to resolve dynamic values). */ declare function setStorageValue(value: PixiVNJsonValueSet, props?: StepLabelPropsType): void; /** * Sets a default (initial) value in persistent or temporary storage. * Unlike {@link setStorageValue}, this only applies to `"storage"` and `"tempstorage"` types * and writes to `storage.default` so the value is used as a fallback. * * @param value - The initial storage-set operation descriptor. * @param props - The current step label props (used to resolve dynamic values). */ declare function setInitialStorageValue(value: PixiVNJsonOnlyStorageSet, props?: StepLabelPropsType): void; /** * Resolves a JSON logic value (storage get, arithmetic, condition, function, conditional statement) * down to a plain TypeScript value of type `T`. * * This is the main evaluation entry-point: conditional statements are unwrapped first, * then the remaining expression type is dispatched to the appropriate handler. * * @param value - The value or expression to resolve. * @param props - The current step label props passed down through the call chain. * @returns The resolved value, or `undefined` if the expression cannot be evaluated. */ declare function getLogichValue(value: T | PixiVNJsonValueGet | PixiVNJsonArithmeticOperations | PixiVNJsonConditions | PixiVNJsonFunction | PixiVNJsonConditionalStatements, props?: StepLabelPropsType): T | undefined; /** * Get the value from the conditional statements. * @param statement is the conditional statements object * @returns the value from the conditional statements */ declare function getValueFromConditionalStatements(statement: PixiVNJsonConditionalResultToCombine | PixiVNJsonConditionalStatements | T | undefined, props?: StepLabelPropsType): T | undefined; /** * Resolves the `conditionalStep` field of a label step and merges the result back * into the step, recursively, until no more conditional overrides remain. * * Undefined properties on the resolved conditional step are deleted so they do not * overwrite existing values on the base step. * * @param originalStep - The label step that may contain a `conditionalStep` expression. * @param props - The current step label props used to evaluate the condition. * @returns The fully resolved label step. */ declare function getConditionalStep(originalStep: PixiVNJsonLabelStep, props?: StepLabelPropsType): PixiVNJsonLabelStep; export { ENTRANCE_TRANSITION_TYPES, type EntranceTransitionType, animateOperation, canvasElementOperation, canvasOperation, containerMemorySchema, effectOperation, entranceTransitionKeySchemas, executeEntranceTransition, getConditionalStep, getLogichValue, getValueFromConditionalStatements, imageContainerOperation, imageOperation, loadAssets, narrationOperation, setInitialStorageValue, setStorageValue, soundOperation, textOperation, videoOperation };