import { a as PixiVNJsonValueSet, m as PixiVNJsonFunction, P as PixiVNJsonIfElse, c as PixiVNJsonValueGet, f as PixiVNJsonConditionalStatements } from './PixiVNJsonIfElse-CgOnelja.js'; import { CanvasBaseInterface, ImageSprite, ShakeEffectProps, ShowWithDissolveTransitionProps, ShowWithFadeTransitionProps, MoveInOutProps, ZoomInOutProps, PushInOutProps, ContainerOptions, ImageContainerOptions, ImageSpriteOptions, TextOptions, ImageSpriteMemory, VideoSpriteMemory, ImageContainerMemory, TextMemory, ContainerMemory, SoundPlayOptionsWithChannel, MediaInterface, LabelRunModeType, StorageObjectType, StepLabelPropsType } from '@drincs/pixi-vn'; import { KeyframesType, AnimationOptions, ObjectSegment, ObjectSegmentWithTransition, SequenceOptions } from '@drincs/pixi-vn/motion'; import { UPDATE_PRIORITY } from 'pixi.js'; /** * Additional options controlling the animation (duration, easing, repeat, etc.). */ interface PixiVNJsonAnimateBaseOptions extends AnimationOptions { } /** * Animates one or more canvas elements simultaneously using keyframe-based animation. */ type PixiVNJsonAnimateBase> = { type: "animate"; /** * Alias (or list of aliases) of the canvas elements to animate. */ alias: string | string[]; /** * The keyframes that define the animation values over time. */ keyframes: KeyframesType; /** * Additional options controlling the animation (duration, easing, repeat, etc.). */ options?: PixiVNJsonAnimateBaseOptions; /** * Pixi.js update priority for this animation ticker callback. */ priority?: UPDATE_PRIORITY; }; /** * Additional options controlling the sequence playback. */ interface PixiVNJsonAnimateSequenceOptions extends SequenceOptions { } /** * Animates a canvas element using a sequence of segments (timeline-based animation). */ type PixiVNJsonAnimateSequence> = { type: "animate-sequence"; /** * Alias of the canvas element to animate. */ alias: string; /** * Ordered list of animation segments, each optionally including a transition. */ sequence: (ObjectSegment | ObjectSegmentWithTransition)[]; /** * Additional options controlling the sequence playback. */ options?: PixiVNJsonAnimateSequenceOptions; /** * Pixi.js update priority for this animation ticker callback. */ priority?: UPDATE_PRIORITY; }; /** * Union of all canvas animation operations — keyframe-based or sequence-based. */ type PixiVNJsonCanvasAnimate = ImageSprite> = PixiVNJsonAnimateBase | PixiVNJsonAnimateSequence; /** * Applies a shake effect to a canvas element. */ type PixiVNJsonEffectShake = { type: "shake"; /** * Alias of the canvas element to apply the shake effect to. */ alias: string; /** * Configuration properties for the shake effect (amplitude, duration, etc.). */ props: ShakeEffectProps; /** * Pixi.js update priority for the effect ticker callback. */ priority?: UPDATE_PRIORITY; }; /** * Union of all canvas visual effects. */ type PixiVNJsonCanvasEffect = PixiVNJsonEffectShake; /** * Configuration options for the dissolve transition. */ interface DissolveTransitionProps extends ShowWithDissolveTransitionProps { } /** * Cross-dissolve transition — blends the element in or out by gradually changing its opacity. */ type DissolveTransition = { type: "dissolve"; /** * Configuration options for the dissolve transition. */ props?: DissolveTransitionProps; /** * Pixi.js update priority for the transition ticker callback. */ priority?: UPDATE_PRIORITY; }; /** * Configuration options for the fade transition. */ interface FadeTransitionProps extends ShowWithFadeTransitionProps { } /** * Fade transition — fades the element in or out by animating its alpha value. */ type FadeTransition = { type: "fade"; /** * Configuration options for the fade transition. */ props?: FadeTransitionProps; /** * Pixi.js update priority for the transition ticker callback. */ priority?: UPDATE_PRIORITY; }; /** * Configuration options for the move transition (direction, duration, easing, etc.). */ interface MoveInOutTransitionProps extends MoveInOutProps { } /** * Move-in / Move-out transition — slides the element into or out of the viewport. */ type MoveInOutTransition = { type: "movein" | "moveout"; /** * Configuration options for the move transition (direction, duration, easing, etc.). */ props?: MoveInOutTransitionProps; /** * Pixi.js update priority for the transition ticker callback. */ priority?: UPDATE_PRIORITY; }; /** * Configuration options for the zoom transition (scale, duration, easing, etc.). */ interface ZoomInOutTransitionProps extends ZoomInOutProps { } /** * Zoom-in / Zoom-out transition — scales the element into or out of view. */ type ZoomInOutTransition = { type: "zoomin" | "zoomout"; /** * Configuration options for the zoom transition (scale, duration, easing, etc.). */ props?: ZoomInOutTransitionProps; /** * Pixi.js update priority for the transition ticker callback. */ priority?: UPDATE_PRIORITY; }; /** * Configuration options for the push transition (direction, duration, easing, etc.). */ interface PushInOutTransitionProps extends PushInOutProps { } /** * Push-in / Push-out transition — pushes the element onto or off the viewport, displacing the current content. */ type PushInOutTransition = { type: "pushin" | "pushout"; /** * Configuration options for the push transition (direction, duration, easing, etc.). */ props?: PushInOutTransitionProps; /** * Pixi.js update priority for the transition ticker callback. */ priority?: UPDATE_PRIORITY; }; /** * Union of all supported canvas media transitions. */ type PixiVNJsonMediaTransiotions = DissolveTransition | FadeTransition | MoveInOutTransition | ZoomInOutTransition | PushInOutTransition; /** * Display options (position, scale, alpha, etc.) for an image or video sprite. */ interface PixiVNJsonCanvasImageVideoShowProps extends ImageSpriteOptions { } /** * Shows an image or video asset on the canvas. */ type PixiVNJsonCanvasImageVideoShow = { type: "image" | "video"; operationType: "show"; /** * Unique identifier (alias) used to reference this element on the canvas. */ alias: string; /** * The url of the image or video. * If the url is not provided, the url will be set to the alias. */ url?: string; /** * Display options (position, scale, alpha, etc.) for the image or video sprite. */ props?: PixiVNJsonCanvasImageVideoShowProps; /** * Optional transition effect applied when the element appears on screen. */ transition?: PixiVNJsonMediaTransiotions; }; /** * Display options for an image container. */ interface PixiVNJsonCanvasImageContainerShowProps extends ImageContainerOptions { } /** * Shows an image container (a group of layered images) on the canvas. */ type PixiVNJsonCanvasImageContainerShow = { type: "imagecontainer"; operationType: "show"; /** * Unique identifier (alias) used to reference this element on the canvas. */ alias: string; /** * The ordered list of image URLs that compose the container layers. */ urls: string[]; /** * Display options for the image container. */ props?: PixiVNJsonCanvasImageContainerShowProps; /** * Optional transition effect applied when the element appears on screen. */ transition?: PixiVNJsonMediaTransiotions; }; /** * Display options (font, style, position, etc.) for a text element. */ interface PixiVNJsonCanvasTextShowProps extends TextOptions { } /** * Shows a text element on the canvas. */ type PixiVNJsonCanvasTextShow = { type: "text"; operationType: "show"; /** * Unique identifier (alias) used to reference this element on the canvas. */ alias: string; /** * The string content to display. */ text: string; /** * Display options (font, style, position, etc.) for the text element. */ props?: PixiVNJsonCanvasTextShowProps; /** * Optional transition effect applied when the element appears on screen. */ transition?: PixiVNJsonMediaTransiotions; }; /** * Edits the properties of an existing image sprite on the canvas. */ type PixiVNJsonImageEdit = { type: "image"; operationType: "edit"; /** * Alias of the canvas element to edit. */ alias: string; /** * Partial memory/state properties to update on the image sprite. */ props?: Partial; }; /** * Edits the properties of an existing video sprite on the canvas. */ type PixiVNJsonVideoEdit = { type: "video"; operationType: "edit"; /** * Alias of the canvas element to edit. */ alias: string; /** * Partial memory/state properties to update on the video sprite. */ props?: Partial; }; /** * Edits the properties of an existing image container on the canvas. */ type PixiVNJsonImageContainerEdit = { type: "imagecontainer"; operationType: "edit"; /** * Alias of the canvas element to edit. */ alias: string; /** * Partial memory/state properties to update on the image container. */ props?: Partial; }; /** * Edits the properties of an existing text element on the canvas. */ type PixiVNJsonTextEdit = { type: "text"; operationType: "edit"; /** * Alias of the canvas element to edit. */ alias: string; /** * Partial memory/state properties to update on the text element. */ props?: Partial; }; /** * Edits the properties of an unknown/generic canvas element. * Use this when the specific element type is not one of the built-in kinds. */ type PixiVNJsonUnknownEdit> = { type: "canvaselement"; operationType: "edit"; /** * Alias of the canvas element to edit. */ alias: string; /** * Partial options/properties to update on the canvas element. */ props?: Partial; }; /** * Removes a canvas element from the stage, optionally with a transition. */ type PixiVNJsonCanvasRemove = { type: "image" | "video" | "imagecontainer" | "canvaselement" | "text"; operationType: "remove"; /** * Alias of the canvas element to remove. */ alias: string; /** * Optional transition effect applied while the element disappears. */ transition?: PixiVNJsonMediaTransiotions; }; /** * Removes every element currently on the canvas. */ type PixiVNJsonCanvasClear = { type: "canvas"; operationType: "clear"; }; /** * Pauses or resumes playback of a video sprite on the canvas. */ type PixiVNJsonVideoPauseResume = { type: "video"; operationType: "pause" | "resume"; /** * Alias of the video element to pause or resume. */ alias: string; }; /** * Loads or lazy-loads asset bundles or individual assets into memory. */ type PixiVNJsonAssetsLoad = { type: "assets" | "bundle"; operationType: "load" | "lazyload"; /** * List of asset aliases (or bundle names) to load. */ aliases: string[]; }; type PixiVNJsonCanvasShow = PixiVNJsonCanvasImageContainerShow | PixiVNJsonCanvasImageVideoShow | PixiVNJsonCanvasTextShow; /** * Union of all canvas-element edit operations. */ type PixiVNJsonCanvasEdit = PixiVNJsonImageEdit | PixiVNJsonVideoEdit | PixiVNJsonImageContainerEdit | PixiVNJsonTextEdit | PixiVNJsonUnknownEdit; /** * Union of all canvas operations — show, edit, remove, clear, animate, apply effects, and asset * loading. */ type PixiVNJsonCanvas = PixiVNJsonCanvasShow | PixiVNJsonCanvasEdit | PixiVNJsonCanvasRemove | PixiVNJsonCanvasClear | PixiVNJsonVideoPauseResume | PixiVNJsonAssetsLoad | PixiVNJsonCanvasAnimate | PixiVNJsonCanvasEffect; /** * Requests user input during the narrative. * When this operation is encountered, the engine pauses and waits for the player to provide a value. */ type PixiVNJsonInputRequest = { type: "input"; operationType: "request"; /** * The expected value type for the input (e.g. `"string"`, `"number"`, `"boolean"`). * Used by the engine to validate or cast the player's answer. */ valueType?: string; /** * A default value that will be used if the player does not provide any input. */ defaultValue?: any; }; /** * Clears (resets) the current dialogue state. * This is typically used to wipe any displayed text before showing new content. */ type PixiVNJsonDialogue = { type: "dialogue"; operationType: "clean"; }; /** * Narration operation — either a dialogue clear or a user-input request. */ type PixiVNJsonNarration = PixiVNJsonDialogue | PixiVNJsonInputRequest; /** * Playback options such as volume, loop, channel, and start offset. */ interface PixiVNJsonSoundPlayProps extends SoundPlayOptionsWithChannel { } /** * Starts playback of a sound asset. */ type PixiVNJsonSoundPlay = { type: "sound"; operationType: "play"; /** * Unique identifier (alias) used to reference this sound. */ alias: string; /** * URL of the sound file. If omitted, the alias is used as the URL. */ url?: string; /** * Playback options such as volume, loop, channel, and start offset. */ props?: PixiVNJsonSoundPlayProps; }; /** * Stops a playing sound and removes it from the audio context. */ type PixiVNJsonSoundRemove = { type: "sound"; operationType: "stop"; /** * Alias of the sound to stop. */ alias: string; }; /** * Pauses or resumes a sound, a channel, or all audio. */ type PixiVNJsonSoundPauseResume = { type: "sound" | "channel"; operationType: "pause" | "resume"; /** * Alias of the sound or channel to pause/resume. */ alias: string; } | { type: "all"; operationType: "pause" | "resume" | "stop"; }; /** * Partial set of sound properties that can be applied when editing a currently playing sound. */ interface PixiVNJsonSoundEditProps extends Partial>, Partial> { } /** * Edits the properties of a currently playing sound (volume, speed, muted, loop, etc.). */ type PixiVNJsonSoundEdit = { type: "sound"; operationType: "edit"; /** * Alias of the sound to edit. */ alias: string; /** * Partial set of properties to apply to the sound. */ props: PixiVNJsonSoundEditProps; }; /** * Union of all sound operations — play, stop, pause/resume, and edit. */ type PixiVNJsonSound = PixiVNJsonSoundPlay | PixiVNJsonSoundRemove | PixiVNJsonSoundPauseResume | PixiVNJsonSoundEdit; /** * An operation string that holds a list of string/value fragments to be concatenated at runtime. * Used internally to represent string interpolation expressions before they are fully resolved. */ type PixiVNJsonOperationString = { type: "operationtoconvert"; /** * The ordered list of string fragments and/or value-get expressions to concatenate. */ values: (string | PixiVNJsonValueGet | PixiVNJsonConditionalStatements)[]; }; /** * A single resolved operation — a value set, canvas operation, sound operation, * narration operation, or function call — optionally annotated with an origin string. */ type PixiVNJsonOperation = (PixiVNJsonValueSet | PixiVNJsonCanvas | PixiVNJsonSound | PixiVNJsonNarration | PixiVNJsonFunction) & { /** * This value is used by the system to know where this operation is from, for example, if is generated from a string operation. */ $origin?: string; }; /** * A conditional operation — either a plain operation, an if-else that resolves to one, * or an operation-string (string interpolation expression). */ type PixiVNJsonConditionalOperation = PixiVNJsonOperation | PixiVNJsonIfElse | PixiVNJsonOperationString; /** * A player-presentable choice in a menu. */ type PixiVNJsonChoice = { /** * The text to be displayed. */ text: PixiVNJsonDialogText; /** * The label id to be opened. */ label: string; /** * Label opening mode */ type: LabelRunModeType; /** * The properties to be passed to the label. */ props: StorageObjectType; /** * If this is true, the choice can only be made once. */ oneTime?: boolean; /** * If this is true, the choice can see only if there are no other choices. For example, all choices are one-time choices and they are already selected. */ onlyHaveNoChoice?: boolean; /** * If this is true and if is the only choice, it will be automatically selected, and call/jump to the label. */ autoSelect?: boolean; }; /** * A list of choices (possibly conditional) that are shown to the player as a menu. */ type PixiVNJsonChoices = (PixiVNJsonChoice | PixiVNJsonConditionalStatements)[]; /** * The text content of a dialogue line. * Can be a plain string, a dynamic value-get, a conditional expression, or an array of any of these * (which will be concatenated into a single string at runtime). */ type PixiVNJsonDialogText = string | PixiVNJsonValueGet | PixiVNJsonConditionalStatements | (string | PixiVNJsonValueGet | PixiVNJsonConditionalStatements)[]; /** * A dialogue line, optionally attributed to a character. * When a plain `Text` value is used, no character attribution is included. */ type PixiVNJsonDialog = { /** * The character id that will speak. */ character: string; /** * The text to be displayed. */ text: Text; } | Text; /** * Describes a label that should be opened (called or jumped to) during a step. */ type PixiVNJsonLabelToOpen = { /** * The id of the label to open. */ label: string | PixiVNJsonValueGet; /** * Label opening mode */ type: LabelRunModeType; /** * The properties to be passed to the label. if you don't want to pass a object, but a list of parameters, you can use the {@link PixiVNJsonLabelToOpen.params} attribute. */ props?: StepLabelPropsType; /** * **It is not recommended to use it, use it only if necessary**. The parameters to be passed to the label. If you want to pass an object, use the {@link PixiVNJsonLabelToOpen.props} attribute. * "params" attribute will be stored in the temp storage with the key: {@link PIXIVNJSON_PARAM_ID} + ({@link narration.labels.opened.length} - 1). */ params?: unknown[]; }; /** * Steps of a label. * Order of operations: * 1. run all {@link PixiVNJsonLabelStep.operations} * 2. set {@link PixiVNJsonLabelStep.choices}, {@link PixiVNJsonLabelStep.dialogue}, {@link PixiVNJsonLabelStep.glueEnabled} * 3. open {@link PixiVNJsonLabelStep.labelToOpen} * 4. go to next step if {@link PixiVNJsonLabelStep.goNextStep} is true * 5. end the label if {@link PixiVNJsonLabelStep.end} is "label_end" */ type PixiVNJsonLabelStep = { /** * Operations to execute at the start of this step (storage writes, canvas updates, sound, etc.). */ operations?: PixiVNJsonConditionalOperation[]; /** * Variable used to display a choice menu. */ choices?: PixiVNJsonChoices | PixiVNJsonConditionalStatements; /** * Variable used to display a dialog. */ dialogue?: PixiVNJsonDialog | PixiVNJsonConditionalStatements>; /** * This variable is used to add the next dialog text into the current dialog memory. * This value was added to introduce Ink Glue functionality https://github.com/inkle/ink/blob/master/Documentation/WritingWithInk.md#glue */ glueEnabled?: boolean | PixiVNJsonConditionalStatements; /** * Variable used to open a label. */ labelToOpen?: PixiVNJsonLabelToOpen | PixiVNJsonConditionalStatements | (PixiVNJsonLabelToOpen | PixiVNJsonConditionalStatements)[]; /** * If is true, the next step will be executed automatically. */ goNextStep?: boolean | PixiVNJsonConditionalStatements; /** * Variable used to end some elements of the narrative. * - game_end: ends the game * - label_end: ends the label */ end?: "game_end" | "label_end" | PixiVNJsonConditionalStatements<"game_end" | "label_end">; /** * If set, this step is replaced by the result of evaluating the given conditional statement. * Allows an entire step to be chosen at runtime based on a condition or step-switch strategy. */ conditionalStep?: PixiVNJsonConditionalStatements; }; export type { PixiVNJsonCanvasImageContainerShowProps as A, PixiVNJsonCanvasImageVideoShowProps as B, PixiVNJsonCanvasShow as C, DissolveTransition as D, PixiVNJsonCanvasTextShowProps as E, FadeTransition as F, PixiVNJsonChoice as G, PixiVNJsonChoices as H, PixiVNJsonConditionalOperation as I, PixiVNJsonDialog as J, PixiVNJsonDialogText as K, PixiVNJsonDialogue as L, MoveInOutTransition as M, PixiVNJsonInputRequest as N, PixiVNJsonLabelToOpen as O, PixiVNJsonOperation as P, PixiVNJsonMediaTransiotions as Q, PixiVNJsonSoundEdit as R, PixiVNJsonSoundEditProps as S, PixiVNJsonSoundPauseResume as T, PixiVNJsonSoundPlay as U, PixiVNJsonSoundPlayProps as V, PixiVNJsonSoundRemove as W, PushInOutTransition as X, PushInOutTransitionProps as Y, ZoomInOutTransition as Z, ZoomInOutTransitionProps as _, PixiVNJsonOperationString as a, PixiVNJsonSound as b, PixiVNJsonCanvasImageVideoShow as c, PixiVNJsonImageEdit as d, PixiVNJsonCanvasRemove as e, PixiVNJsonVideoEdit as f, PixiVNJsonVideoPauseResume as g, PixiVNJsonCanvasImageContainerShow as h, PixiVNJsonImageContainerEdit as i, PixiVNJsonCanvasTextShow as j, PixiVNJsonTextEdit as k, PixiVNJsonUnknownEdit as l, PixiVNJsonNarration as m, PixiVNJsonCanvasEffect as n, PixiVNJsonCanvasAnimate as o, PixiVNJsonCanvasClear as p, PixiVNJsonLabelStep as q, DissolveTransitionProps as r, FadeTransitionProps as s, MoveInOutTransitionProps as t, PixiVNJsonAnimateBase as u, PixiVNJsonAnimateBaseOptions as v, PixiVNJsonAnimateSequence as w, PixiVNJsonAnimateSequenceOptions as x, PixiVNJsonCanvas as y, PixiVNJsonCanvasEdit as z };