@momoyu-ink/kit 0.10.0 → 0.11.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.
package/dist/lib.d.mts CHANGED
@@ -1,8 +1,8 @@
1
1
  import * as react from 'react';
2
2
  import { ReactElement, Component, ForwardRefExoticComponent, CSSProperties, FC, ReactNode, ComponentType } from 'react';
3
- import { S as ShaderDirection, M as MoyuEvent, C as Command, a as MaybePromise, J as JSX, L as LayoutEvent, W as WheelEvent, T as TouchEvent, b as MoyuClipAttributes, c as MoyuVBoxAttributes, d as MoyuSpriteAttributes, e as TextProps, f as MoyuNodeAttributes, g as MouseEvent, h as SpriteProps, i as JsonValue } from './jsx-dev-runtime-gGlb6FbX.mjs';
4
- export { A as AudioCommand, j as AudioSettings, B as BubbleEvent, D as DetailedMoyuProps, E as EffectParams, G as GamepadCommand, K as KeyboardEvent, k as KeyboardEventKind, l as MakeNullOptional, m as MouseEventKind, n as MoyuAnimationAttributes, o as MoyuBackdropAttributes, p as MoyuContainerAttributes, q as MoyuEventHandler, r as MoyuFilterAttributes, s as MoyuHBoxAttributes, t as MoyuListenerAttributes, u as MoyuShaderAttributes, v as MoyuShaderSlotAttributes, w as MoyuTextAttributes, x as MoyuVideoAttributes, N as Node, R as RetainMode, y as ScenarioCommand, z as ShaderCommand, F as ShaderParam, H as ShaderParamType, I as ShaderSource, O as ShaderTimeControl, P as SystemCommand, Q as TextCommand, U as TouchEventKind, V as Tuple2, X as Tuple3, Y as Tuple4, Z as WheelEventDeltaMode, _ as WindowState, $ as createBubbleEvent, a0 as getStageSize, a1 as mergeEvent } from './jsx-dev-runtime-gGlb6FbX.mjs';
5
- import { FluidValue } from '@react-spring/shared';
3
+ import { S as ShaderDirection, M as MoyuEvent, C as Command, a as MaybePromise, J as JSX, L as LayoutEvent, W as WheelEvent, T as TouchEvent, b as MoyuClipAttributes, c as MoyuVBoxAttributes, d as MoyuSpriteAttributes, e as TextProps, f as MoyuNodeAttributes, g as MouseEvent, h as MoyuTextAttributes, E as EditableState, i as EditableChangeSource, j as SpriteProps, k as JsonValue } from './jsx-dev-runtime-BasPxDFu.mjs';
4
+ export { A as AudioCommand, l as AudioSettings, B as BubbleEvent, D as DetailedMoyuProps, m as EditableCommand, n as EditableEvent, o as EffectParams, G as GamepadCommand, K as KeyboardEvent, p as KeyboardEventKind, q as MakeNullOptional, r as MouseEventKind, s as MoyuAnimationAttributes, t as MoyuBackdropAttributes, u as MoyuContainerAttributes, v as MoyuEditableAttributes, w as MoyuEventHandler, x as MoyuFilterAttributes, y as MoyuHBoxAttributes, z as MoyuListenerAttributes, F as MoyuShaderAttributes, H as MoyuShaderSlotAttributes, I as MoyuVideoAttributes, N as Node, O as OverlayDialog, P as OverlayNotificationPosition, Q as OverlayStoreFlag, R as RetainMode, U as ScenarioCommand, V as ShaderCommand, X as ShaderParam, Y as ShaderParamType, Z as ShaderSource, _ as ShaderTimeControl, $ as SteamCommand, a0 as SystemCommand, a1 as TextCommand, a2 as TextLayoutEvent, a3 as TimelinePossibleClip, a4 as TouchEventKind, a5 as Tuple2, a6 as Tuple3, a7 as Tuple4, a8 as VideoCommand, a9 as WheelEventDeltaMode, aa as WindowState, ab as createBubbleEvent, ac as getStageSize, ad as mergeEvent } from './jsx-dev-runtime-BasPxDFu.mjs';
5
+ import { FluidValue, addFluidObserver as addFluidObserver$1, removeFluidObserver as removeFluidObserver$1 } from '@react-spring/shared';
6
6
  import { ElementType, AssignableKeys, ComponentPropsWithRef } from '@react-spring/types';
7
7
  import { Snapshot } from 'valtio';
8
8
  import { SpringValue, SpringValues, SpringRef } from '@react-spring/core';
@@ -33,7 +33,7 @@ interface RootOptions {
33
33
  declare function createRoot(options?: RootOptions): RootHandle;
34
34
 
35
35
  declare const globalEventListeners: Record<string, ((event: unknown) => void)[]>;
36
- declare const globalRequestAnimationFrameListeners: FrameRequestCallback[];
36
+ declare const globalRequestAnimationFrameListeners: Map<number, FrameRequestCallback>;
37
37
 
38
38
  declare function addEventListener(name: string, callback: (...args: any[]) => void): () => void;
39
39
 
@@ -247,13 +247,17 @@ type ShaderBuiltin = {
247
247
  steps: number;
248
248
  } | {
249
249
  name: 'mask';
250
- rule: string;
251
250
  softness: number;
252
251
  reverse: boolean;
253
252
  };
254
253
 
255
254
  type ShaderBuiltinName = 'crossfade' | 'wipe' | 'fade' | 'push' | 'slideaway' | 'zoom' | 'pixellate' | 'mask';
256
255
 
256
+ type DlcProgress = {
257
+ downloadedBytes: string;
258
+ totalBytes: string;
259
+ };
260
+
257
261
  declare global {
258
262
  interface Window {
259
263
  moyu: any;
@@ -269,21 +273,25 @@ declare function insertChildBefore(nodeId: number, beforeChildNodeId: number, ch
269
273
  declare function removeChildAt(nodeId: number, index: number): void;
270
274
  declare function removeChild(nodeId: number, childNodeId: number): void;
271
275
  declare function updateProps(nodeId: number, props: Record<string, any>): void;
276
+ declare function focusEditable(nodeId: number): void;
277
+ declare function blurEditable(nodeId: number): void;
272
278
  declare function executeNodeCommand(nodeId: number, payload: Command): MaybePromise;
273
279
  declare function executePluginCommand(pluginName: string, payload: Command): MaybePromise;
274
280
 
275
281
  declare const moyu_addChild: typeof addChild;
282
+ declare const moyu_blurEditable: typeof blurEditable;
276
283
  declare const moyu_createInstance: typeof createInstance;
277
284
  declare const moyu_destroyInstance: typeof destroyInstance;
278
285
  declare const moyu_executeNodeCommand: typeof executeNodeCommand;
279
286
  declare const moyu_executePluginCommand: typeof executePluginCommand;
287
+ declare const moyu_focusEditable: typeof focusEditable;
280
288
  declare const moyu_insertChild: typeof insertChild;
281
289
  declare const moyu_insertChildBefore: typeof insertChildBefore;
282
290
  declare const moyu_removeChild: typeof removeChild;
283
291
  declare const moyu_removeChildAt: typeof removeChildAt;
284
292
  declare const moyu_updateProps: typeof updateProps;
285
293
  declare namespace moyu {
286
- export { moyu_addChild as addChild, moyu_createInstance as createInstance, moyu_destroyInstance as destroyInstance, moyu_executeNodeCommand as executeNodeCommand, moyu_executePluginCommand as executePluginCommand, moyu_insertChild as insertChild, moyu_insertChildBefore as insertChildBefore, moyu_removeChild as removeChild, moyu_removeChildAt as removeChildAt, moyu_updateProps as updateProps };
294
+ export { moyu_addChild as addChild, moyu_blurEditable as blurEditable, moyu_createInstance as createInstance, moyu_destroyInstance as destroyInstance, moyu_executeNodeCommand as executeNodeCommand, moyu_executePluginCommand as executePluginCommand, moyu_focusEditable as focusEditable, moyu_insertChild as insertChild, moyu_insertChildBefore as insertChildBefore, moyu_removeChild as removeChild, moyu_removeChildAt as removeChildAt, moyu_updateProps as updateProps };
287
295
  }
288
296
 
289
297
  type Primitives = keyof JSX.IntrinsicElements;
@@ -312,6 +320,9 @@ type AnimatedLeaf<T> = Exclude<T, object | undefined> | Extract<T, ReadonlyArray
312
320
 
313
321
  declare const animated: WithAnimated;
314
322
 
323
+ declare const addFluidObserver: typeof addFluidObserver$1;
324
+ declare const removeFluidObserver: typeof removeFluidObserver$1;
325
+
315
326
  type GameStateStore<TState extends object> = TState;
316
327
  interface GameStateSourceProps<TState extends object> {
317
328
  store: GameStateStore<TState>;
@@ -613,7 +624,7 @@ interface ButtonProps extends Omit<MoyuNodeAttributes, 'onClick'> {
613
624
  textOffsetY?: number;
614
625
  textAlign?: 'left' | 'center' | 'right';
615
626
  }
616
- declare function Button({ sprite, disabled, lockOn, onPress, text, textStyle, textOffsetX, textOffsetY, textAlign, anchor, pivot, interactive, onMouseEnter, onMouseLeave, onMouseDown, onMouseUp, onTouchStart, onTouchEnd, onTouchCancel, ...containerProps }: ButtonProps): JSX.Element;
627
+ declare function Button({ sprite, disabled, lockOn, onPress, text, textStyle, textOffsetX, textOffsetY, textAlign, children, anchor, pivot, interactive, onMouseEnter, onMouseLeave, onMouseDown, onMouseUp, onTouchStart, onTouchEnd, onTouchCancel, ...containerProps }: ButtonProps): JSX.Element;
617
628
 
618
629
  interface CheckboxProps extends Omit<ButtonProps, 'lockOn' | 'sprite'> {
619
630
  checked?: boolean;
@@ -624,6 +635,65 @@ interface CheckboxProps extends Omit<ButtonProps, 'lockOn' | 'sprite'> {
624
635
  }
625
636
  declare function Checkbox({ checked, defaultChecked, onCheckedChange, uncheckedSprite, checkedSprite, onPress, ...buttonProps }: CheckboxProps): JSX.Element;
626
637
 
638
+ interface InputCaretStyle extends Omit<MoyuSpriteAttributes, 'bounds' | 'children' | 'interactive' | 'mode' | 'nineSliceMode' | 'targetWidth' | 'targetHeight' | 'x' | 'y' | 'visible'> {
639
+ width: number;
640
+ height?: number;
641
+ blinkInterval?: number;
642
+ }
643
+ interface InputBackgroundStyle extends Omit<MoyuSpriteAttributes, 'children' | 'interactive' | 'targetWidth' | 'targetHeight'> {
644
+ }
645
+ interface InputBackgroundStates {
646
+ idle: InputBackgroundStyle;
647
+ hover?: InputBackgroundStyle;
648
+ press?: InputBackgroundStyle;
649
+ focused?: InputBackgroundStyle;
650
+ readOnly?: InputBackgroundStyle;
651
+ disabled?: InputBackgroundStyle;
652
+ }
653
+ type InputBackground = InputBackgroundStyle | InputBackgroundStates;
654
+ interface InputProps extends Omit<MoyuNodeAttributes, 'children' | 'onFocus' | 'onBlur' | 'onInput' | 'onChange'> {
655
+ value?: string;
656
+ defaultValue?: string;
657
+ placeholder?: string;
658
+ disabled?: boolean;
659
+ readOnly?: boolean;
660
+ autoFocus?: boolean;
661
+ width: number;
662
+ height: number;
663
+ paddingX?: number;
664
+ textStyle: Omit<MoyuTextAttributes, 'children' | 'interactive' | 'text'>;
665
+ placeholderStyle?: Omit<MoyuTextAttributes, 'children' | 'interactive' | 'text'>;
666
+ caret: InputCaretStyle;
667
+ background?: InputBackground;
668
+ onInput?: (state: EditableState) => void;
669
+ onChange?: (state: EditableState, source: EditableChangeSource) => void;
670
+ onFocus?: (state: EditableState) => void;
671
+ onBlur?: (state: EditableState) => void;
672
+ onCompositionStart?: (state: EditableState) => void;
673
+ onCompositionUpdate?: (state: EditableState) => void;
674
+ onCompositionEnd?: (state: EditableState) => void;
675
+ }
676
+ interface InputHandle {
677
+ focus(): void;
678
+ blur(): void;
679
+ getState(): EditableState;
680
+ }
681
+ declare const Input: react.ForwardRefExoticComponent<InputProps & react.RefAttributes<InputHandle>>;
682
+
683
+ interface RadioGroupProps extends MoyuNodeAttributes {
684
+ value?: string;
685
+ defaultValue?: string;
686
+ onValueChange?: (value: string) => void;
687
+ children?: ReactNode;
688
+ }
689
+ declare function RadioGroup({ value, defaultValue, onValueChange, children, ...containerProps }: RadioGroupProps): JSX.Element;
690
+ interface RadioProps extends Omit<ButtonProps, 'lockOn' | 'sprite'> {
691
+ value: string;
692
+ uncheckedSprite: ControlSpriteProps;
693
+ checkedSprite: ControlSpriteProps;
694
+ }
695
+ declare function Radio({ value, uncheckedSprite, checkedSprite, onPress, ...buttonProps }: RadioProps): JSX.Element;
696
+
627
697
  interface SelectOption {
628
698
  text: string;
629
699
  value: string;
@@ -656,24 +726,23 @@ interface SelectProps extends Omit<MoyuNodeAttributes, 'onClick'> {
656
726
  }
657
727
  declare function Select({ value, defaultValue, onValueChange, onPress, disabled, options, trigger, list, option, textStyle, textOffsetX, textOffsetY, textAlign, anchor, pivot, ...containerProps }: SelectProps): JSX.Element;
658
728
 
659
- interface SliderTrackProps extends Omit<SpriteProps, 'src' | 'targetWidth'> {
660
- src: ControlStateValue<string>;
729
+ interface SliderTrackProps extends Omit<ControlSpriteProps, 'targetWidth'> {
661
730
  targetWidth: number;
662
731
  }
663
- interface SliderThumbProps extends Omit<SpriteProps, 'src' | 'targetWidth'> {
664
- src: ControlStateValue<string>;
732
+ interface SliderThumbProps extends Omit<ControlSpriteProps, 'targetWidth'> {
665
733
  targetWidth: number;
666
734
  }
667
735
  interface SliderProps extends Omit<MoyuNodeAttributes, 'onClick'> {
668
736
  value?: number;
669
737
  defaultValue?: number;
670
738
  onValueChange?: (value: number) => void;
739
+ onValueCommit?: (value: number) => void;
671
740
  onPress?: (event: PressEvent) => void;
672
741
  disabled?: boolean;
673
742
  track: SliderTrackProps;
674
743
  thumb: SliderThumbProps;
675
744
  }
676
- declare function Slider({ value, defaultValue, onValueChange, onPress, disabled, track, thumb, anchor, pivot, interactive, onMouseEnter, onMouseLeave, onMouseDown, onMouseUp, onMouseMove, onTouchStart, onTouchMove, onTouchEnd, onTouchCancel, ...containerProps }: SliderProps): JSX.Element;
745
+ declare function Slider({ value, defaultValue, onValueChange, onValueCommit, onPress, disabled, track, thumb, anchor, pivot, interactive, onMouseEnter, onMouseLeave, onMouseDown, onMouseUp, onMouseMove, onTouchStart, onTouchMove, onTouchEnd, onTouchCancel, ...containerProps }: SliderProps): JSX.Element;
677
746
 
678
747
  type ExecutionCursor = {
679
748
  story: string;
@@ -713,8 +782,8 @@ type StoryReplaceOutcome = {
713
782
  interface GameControl {
714
783
  /** Timed wait — blocks auto-advance. Engine fires scenariowaitingcancelled on timeout or skip. */
715
784
  setWaiting(time: number, skippable: boolean): void;
716
- /** Indefinite hold — blocks auto-advance until user action. */
717
- hold(): void;
785
+ /** Hold indefinitely, or until a Promise-like object settles. */
786
+ hold(until?: PromiseLike<void>, skippable?: boolean): void;
718
787
  /** Manually advance (rarely needed, e.g. `!` tailing). */
719
788
  nextLine(): void;
720
789
  /** Mark this dispatch cycle as unskippable. If skipping, hold() will stop skip instead of advancing. */
@@ -787,9 +856,11 @@ declare function createStage(): {
787
856
  startAuto: () => void;
788
857
  stopAuto: () => void;
789
858
  isAutoing: () => boolean;
859
+ setDefaultAutoTailMs: typeof setDefaultAutoTailMs;
790
860
  startFastForward: (options?: FastForwardOptions) => void;
791
861
  stopFastForward: () => void;
792
862
  isFastForwarding: () => boolean;
863
+ getSeekingType: typeof getSeekingType;
793
864
  resetRuntimeState: () => void;
794
865
  bindEvents: () => () => void;
795
866
  };
@@ -816,9 +887,11 @@ declare function StageContextProvider({ stage, children }: {
816
887
  startAuto: () => void;
817
888
  stopAuto: () => void;
818
889
  isAutoing: () => boolean;
890
+ setDefaultAutoTailMs: typeof setDefaultAutoTailMs;
819
891
  startFastForward: (options?: FastForwardOptions) => void;
820
892
  stopFastForward: () => void;
821
893
  isFastForwarding: () => boolean;
894
+ getSeekingType: typeof getSeekingType;
822
895
  resetRuntimeState: () => void;
823
896
  bindEvents: () => () => void;
824
897
  } | null>>;
@@ -1013,4 +1086,4 @@ declare module 'zod' {
1013
1086
  }
1014
1087
  }
1015
1088
 
1016
- export { type AnimatedComponent, type AnimatedProps, type AnimationFrameCallbackEvent, type AppStateAdapter, type AutoTicketHandle, type AutoTicketOptions, type BeforeUnloadEvent, Button, type ButtonProps, Checkbox, type CheckboxProps, type CombinedCheckpoint, Command, type CommandHandler, type ControlSpriteProps, type ControlState, type ControlStateValue, type ControlTextStyle, type CustomEvent, DEBUG_EMPTY_PAGE, type DebugSessionConfig, type DebugSessionController, type DebugWarpBoundary, type DebugWarpOptions, type DefaultOverlayName, type DefaultPageName, type FastForwardOptions, type FocusEvent, type FocusEventKind, type FullScreenEvent, type FullscreenEventKind, type GameControl, type GameEvent, type GameStateSourceProps, type GameStateStore, type Gamepad, type GamepadButton, type GamepadEvent, type GamepadHapticActuator, JSX, type KeyboardLocation, LayoutEvent, type Literal, MaybePromise, MouseEvent, MoyuClipAttributes, MoyuEvent, MoyuNodeAttributes, MoyuSpriteAttributes, MoyuVBoxAttributes, type NavigationState, type Navigator, type NodeEvent, type OverlayConfig, type OverlayDescriptor, type OverlayInfo, OverlayParamsContext, type PageConfig, type PageDescriptor, PageParamsContext, type PressEvent, type RegisterNavigator, type ResizeEvent, type ResolvedArgument, type ResolvedCommandLine, type ResolvedSystemCallLine, type RootErrorInfo, type RootHandle, type RootNavigatorList, type RootOptions, type RootUiDataMap, type RootUncaughtErrorInfo, type ScenarioCommandBaseType, type ScenarioEvent, ScrollView, type ScrollViewController, type ScrollViewProps, Select, type SelectListProps, type SelectOption, type SelectOptionSpriteProps, type SelectProps, type ShaderBuiltin, type ShaderBuiltinName, type ShaderEvent, Slider, type SliderProps, type SliderThumbProps, type SliderTrackProps, type StackNavigatorOptions, StageContextProvider, type StageInstance, type TextLine, type TextLineHandler, TouchEvent, type UseScrollViewOptions, WheelEvent, type WithAnimated, animated as a, addEventListener, animated, autoState, createGameStateContext, createRoot, createStackNavigator, createStage, createStaticNavigation, ensureArchiveVariableDefaults, executeNodeCommand, executePluginCommand, fastForwardState, getAppStateAdapter, getNavigator, getSeekingType, getUiData, globalEventListeners, globalRequestAnimationFrameListeners, initGlobalVariableDefaults, initUiData, loadVariablesDocument, moyu, nextLine, registerAppStateAdapter, replaceUiData, setDefaultAutoTailMs, setWaiting, skipState, startDebugSession, startRuntimeDebugSession, stopDebugSession, stopRuntimeDebugSession, useAutoBlocker, useAutoTicket, useBeforeHandleCommandCallback, useDebugSession, useFadeIn, useFadeInOut, useFadeOut, useInterruptCallback, useIsAutoing, useIsSeeking, useIsSkipping, useNavigation, useNavigationParams, useNavigationState, useScenario, useScrollView, useSkipBlocker, useSkipCallback, useSoundEffect, useStageContext, useUiData, warpState };
1089
+ export { type AnimatedComponent, type AnimatedProps, type AnimationFrameCallbackEvent, type AppStateAdapter, type AutoTicketHandle, type AutoTicketOptions, type BeforeUnloadEvent, Button, type ButtonProps, Checkbox, type CheckboxProps, type CombinedCheckpoint, Command, type CommandHandler, type ControlSpriteProps, type ControlState, type ControlStateValue, type ControlTextStyle, type CustomEvent, DEBUG_EMPTY_PAGE, type DebugSessionConfig, type DebugSessionController, type DebugWarpBoundary, type DebugWarpOptions, type DefaultOverlayName, type DefaultPageName, type DlcProgress, EditableChangeSource, EditableState, type FastForwardOptions, type FocusEvent, type FocusEventKind, type FullScreenEvent, type FullscreenEventKind, type GameControl, type GameEvent, type GameStateSourceProps, type GameStateStore, type Gamepad, type GamepadButton, type GamepadEvent, type GamepadHapticActuator, Input, type InputBackground, type InputBackgroundStates, type InputBackgroundStyle, type InputCaretStyle, type InputHandle, type InputProps, JSX, type KeyboardLocation, LayoutEvent, type Literal, MaybePromise, MouseEvent, MoyuClipAttributes, MoyuEvent, MoyuNodeAttributes, MoyuSpriteAttributes, MoyuTextAttributes, MoyuVBoxAttributes, type NavigationState, type Navigator, type NodeEvent, type OverlayConfig, type OverlayDescriptor, type OverlayInfo, OverlayParamsContext, type PageConfig, type PageDescriptor, PageParamsContext, type PressEvent, Radio, RadioGroup, type RadioGroupProps, type RadioProps, type RegisterNavigator, type ResizeEvent, type ResolvedArgument, type ResolvedCommandLine, type ResolvedSystemCallLine, type RootErrorInfo, type RootHandle, type RootNavigatorList, type RootOptions, type RootUiDataMap, type RootUncaughtErrorInfo, type ScenarioCommandBaseType, type ScenarioEvent, ScrollView, type ScrollViewController, type ScrollViewProps, Select, type SelectListProps, type SelectOption, type SelectOptionSpriteProps, type SelectProps, type ShaderBuiltin, type ShaderBuiltinName, type ShaderEvent, Slider, type SliderProps, type SliderThumbProps, type SliderTrackProps, type StackNavigatorOptions, StageContextProvider, type StageInstance, type TextLine, type TextLineHandler, TouchEvent, type UseScrollViewOptions, WheelEvent, type WithAnimated, animated as a, addEventListener, addFluidObserver, animated, autoState, createGameStateContext, createRoot, createStackNavigator, createStage, createStaticNavigation, ensureArchiveVariableDefaults, executeNodeCommand, executePluginCommand, fastForwardState, getAppStateAdapter, getNavigator, getSeekingType, getUiData, globalEventListeners, globalRequestAnimationFrameListeners, initGlobalVariableDefaults, initUiData, loadVariablesDocument, moyu, nextLine, registerAppStateAdapter, removeFluidObserver, replaceUiData, setDefaultAutoTailMs, setWaiting, skipState, startDebugSession, startRuntimeDebugSession, stopDebugSession, stopRuntimeDebugSession, useAutoBlocker, useAutoTicket, useBeforeHandleCommandCallback, useDebugSession, useFadeIn, useFadeInOut, useFadeOut, useInterruptCallback, useIsAutoing, useIsSeeking, useIsSkipping, useNavigation, useNavigationParams, useNavigationState, useScenario, useScrollView, useSkipBlocker, useSkipCallback, useSoundEffect, useStageContext, useUiData, warpState };
package/dist/lib.d.ts CHANGED
@@ -1,8 +1,8 @@
1
1
  import * as react from 'react';
2
2
  import { ReactElement, Component, ForwardRefExoticComponent, CSSProperties, FC, ReactNode, ComponentType } from 'react';
3
- import { S as ShaderDirection, M as MoyuEvent, C as Command, a as MaybePromise, J as JSX, L as LayoutEvent, W as WheelEvent, T as TouchEvent, b as MoyuClipAttributes, c as MoyuVBoxAttributes, d as MoyuSpriteAttributes, e as TextProps, f as MoyuNodeAttributes, g as MouseEvent, h as SpriteProps, i as JsonValue } from './jsx-dev-runtime-gGlb6FbX.js';
4
- export { A as AudioCommand, j as AudioSettings, B as BubbleEvent, D as DetailedMoyuProps, E as EffectParams, G as GamepadCommand, K as KeyboardEvent, k as KeyboardEventKind, l as MakeNullOptional, m as MouseEventKind, n as MoyuAnimationAttributes, o as MoyuBackdropAttributes, p as MoyuContainerAttributes, q as MoyuEventHandler, r as MoyuFilterAttributes, s as MoyuHBoxAttributes, t as MoyuListenerAttributes, u as MoyuShaderAttributes, v as MoyuShaderSlotAttributes, w as MoyuTextAttributes, x as MoyuVideoAttributes, N as Node, R as RetainMode, y as ScenarioCommand, z as ShaderCommand, F as ShaderParam, H as ShaderParamType, I as ShaderSource, O as ShaderTimeControl, P as SystemCommand, Q as TextCommand, U as TouchEventKind, V as Tuple2, X as Tuple3, Y as Tuple4, Z as WheelEventDeltaMode, _ as WindowState, $ as createBubbleEvent, a0 as getStageSize, a1 as mergeEvent } from './jsx-dev-runtime-gGlb6FbX.js';
5
- import { FluidValue } from '@react-spring/shared';
3
+ import { S as ShaderDirection, M as MoyuEvent, C as Command, a as MaybePromise, J as JSX, L as LayoutEvent, W as WheelEvent, T as TouchEvent, b as MoyuClipAttributes, c as MoyuVBoxAttributes, d as MoyuSpriteAttributes, e as TextProps, f as MoyuNodeAttributes, g as MouseEvent, h as MoyuTextAttributes, E as EditableState, i as EditableChangeSource, j as SpriteProps, k as JsonValue } from './jsx-dev-runtime-BasPxDFu.js';
4
+ export { A as AudioCommand, l as AudioSettings, B as BubbleEvent, D as DetailedMoyuProps, m as EditableCommand, n as EditableEvent, o as EffectParams, G as GamepadCommand, K as KeyboardEvent, p as KeyboardEventKind, q as MakeNullOptional, r as MouseEventKind, s as MoyuAnimationAttributes, t as MoyuBackdropAttributes, u as MoyuContainerAttributes, v as MoyuEditableAttributes, w as MoyuEventHandler, x as MoyuFilterAttributes, y as MoyuHBoxAttributes, z as MoyuListenerAttributes, F as MoyuShaderAttributes, H as MoyuShaderSlotAttributes, I as MoyuVideoAttributes, N as Node, O as OverlayDialog, P as OverlayNotificationPosition, Q as OverlayStoreFlag, R as RetainMode, U as ScenarioCommand, V as ShaderCommand, X as ShaderParam, Y as ShaderParamType, Z as ShaderSource, _ as ShaderTimeControl, $ as SteamCommand, a0 as SystemCommand, a1 as TextCommand, a2 as TextLayoutEvent, a3 as TimelinePossibleClip, a4 as TouchEventKind, a5 as Tuple2, a6 as Tuple3, a7 as Tuple4, a8 as VideoCommand, a9 as WheelEventDeltaMode, aa as WindowState, ab as createBubbleEvent, ac as getStageSize, ad as mergeEvent } from './jsx-dev-runtime-BasPxDFu.js';
5
+ import { FluidValue, addFluidObserver as addFluidObserver$1, removeFluidObserver as removeFluidObserver$1 } from '@react-spring/shared';
6
6
  import { ElementType, AssignableKeys, ComponentPropsWithRef } from '@react-spring/types';
7
7
  import { Snapshot } from 'valtio';
8
8
  import { SpringValue, SpringValues, SpringRef } from '@react-spring/core';
@@ -33,7 +33,7 @@ interface RootOptions {
33
33
  declare function createRoot(options?: RootOptions): RootHandle;
34
34
 
35
35
  declare const globalEventListeners: Record<string, ((event: unknown) => void)[]>;
36
- declare const globalRequestAnimationFrameListeners: FrameRequestCallback[];
36
+ declare const globalRequestAnimationFrameListeners: Map<number, FrameRequestCallback>;
37
37
 
38
38
  declare function addEventListener(name: string, callback: (...args: any[]) => void): () => void;
39
39
 
@@ -247,13 +247,17 @@ type ShaderBuiltin = {
247
247
  steps: number;
248
248
  } | {
249
249
  name: 'mask';
250
- rule: string;
251
250
  softness: number;
252
251
  reverse: boolean;
253
252
  };
254
253
 
255
254
  type ShaderBuiltinName = 'crossfade' | 'wipe' | 'fade' | 'push' | 'slideaway' | 'zoom' | 'pixellate' | 'mask';
256
255
 
256
+ type DlcProgress = {
257
+ downloadedBytes: string;
258
+ totalBytes: string;
259
+ };
260
+
257
261
  declare global {
258
262
  interface Window {
259
263
  moyu: any;
@@ -269,21 +273,25 @@ declare function insertChildBefore(nodeId: number, beforeChildNodeId: number, ch
269
273
  declare function removeChildAt(nodeId: number, index: number): void;
270
274
  declare function removeChild(nodeId: number, childNodeId: number): void;
271
275
  declare function updateProps(nodeId: number, props: Record<string, any>): void;
276
+ declare function focusEditable(nodeId: number): void;
277
+ declare function blurEditable(nodeId: number): void;
272
278
  declare function executeNodeCommand(nodeId: number, payload: Command): MaybePromise;
273
279
  declare function executePluginCommand(pluginName: string, payload: Command): MaybePromise;
274
280
 
275
281
  declare const moyu_addChild: typeof addChild;
282
+ declare const moyu_blurEditable: typeof blurEditable;
276
283
  declare const moyu_createInstance: typeof createInstance;
277
284
  declare const moyu_destroyInstance: typeof destroyInstance;
278
285
  declare const moyu_executeNodeCommand: typeof executeNodeCommand;
279
286
  declare const moyu_executePluginCommand: typeof executePluginCommand;
287
+ declare const moyu_focusEditable: typeof focusEditable;
280
288
  declare const moyu_insertChild: typeof insertChild;
281
289
  declare const moyu_insertChildBefore: typeof insertChildBefore;
282
290
  declare const moyu_removeChild: typeof removeChild;
283
291
  declare const moyu_removeChildAt: typeof removeChildAt;
284
292
  declare const moyu_updateProps: typeof updateProps;
285
293
  declare namespace moyu {
286
- export { moyu_addChild as addChild, moyu_createInstance as createInstance, moyu_destroyInstance as destroyInstance, moyu_executeNodeCommand as executeNodeCommand, moyu_executePluginCommand as executePluginCommand, moyu_insertChild as insertChild, moyu_insertChildBefore as insertChildBefore, moyu_removeChild as removeChild, moyu_removeChildAt as removeChildAt, moyu_updateProps as updateProps };
294
+ export { moyu_addChild as addChild, moyu_blurEditable as blurEditable, moyu_createInstance as createInstance, moyu_destroyInstance as destroyInstance, moyu_executeNodeCommand as executeNodeCommand, moyu_executePluginCommand as executePluginCommand, moyu_focusEditable as focusEditable, moyu_insertChild as insertChild, moyu_insertChildBefore as insertChildBefore, moyu_removeChild as removeChild, moyu_removeChildAt as removeChildAt, moyu_updateProps as updateProps };
287
295
  }
288
296
 
289
297
  type Primitives = keyof JSX.IntrinsicElements;
@@ -312,6 +320,9 @@ type AnimatedLeaf<T> = Exclude<T, object | undefined> | Extract<T, ReadonlyArray
312
320
 
313
321
  declare const animated: WithAnimated;
314
322
 
323
+ declare const addFluidObserver: typeof addFluidObserver$1;
324
+ declare const removeFluidObserver: typeof removeFluidObserver$1;
325
+
315
326
  type GameStateStore<TState extends object> = TState;
316
327
  interface GameStateSourceProps<TState extends object> {
317
328
  store: GameStateStore<TState>;
@@ -613,7 +624,7 @@ interface ButtonProps extends Omit<MoyuNodeAttributes, 'onClick'> {
613
624
  textOffsetY?: number;
614
625
  textAlign?: 'left' | 'center' | 'right';
615
626
  }
616
- declare function Button({ sprite, disabled, lockOn, onPress, text, textStyle, textOffsetX, textOffsetY, textAlign, anchor, pivot, interactive, onMouseEnter, onMouseLeave, onMouseDown, onMouseUp, onTouchStart, onTouchEnd, onTouchCancel, ...containerProps }: ButtonProps): JSX.Element;
627
+ declare function Button({ sprite, disabled, lockOn, onPress, text, textStyle, textOffsetX, textOffsetY, textAlign, children, anchor, pivot, interactive, onMouseEnter, onMouseLeave, onMouseDown, onMouseUp, onTouchStart, onTouchEnd, onTouchCancel, ...containerProps }: ButtonProps): JSX.Element;
617
628
 
618
629
  interface CheckboxProps extends Omit<ButtonProps, 'lockOn' | 'sprite'> {
619
630
  checked?: boolean;
@@ -624,6 +635,65 @@ interface CheckboxProps extends Omit<ButtonProps, 'lockOn' | 'sprite'> {
624
635
  }
625
636
  declare function Checkbox({ checked, defaultChecked, onCheckedChange, uncheckedSprite, checkedSprite, onPress, ...buttonProps }: CheckboxProps): JSX.Element;
626
637
 
638
+ interface InputCaretStyle extends Omit<MoyuSpriteAttributes, 'bounds' | 'children' | 'interactive' | 'mode' | 'nineSliceMode' | 'targetWidth' | 'targetHeight' | 'x' | 'y' | 'visible'> {
639
+ width: number;
640
+ height?: number;
641
+ blinkInterval?: number;
642
+ }
643
+ interface InputBackgroundStyle extends Omit<MoyuSpriteAttributes, 'children' | 'interactive' | 'targetWidth' | 'targetHeight'> {
644
+ }
645
+ interface InputBackgroundStates {
646
+ idle: InputBackgroundStyle;
647
+ hover?: InputBackgroundStyle;
648
+ press?: InputBackgroundStyle;
649
+ focused?: InputBackgroundStyle;
650
+ readOnly?: InputBackgroundStyle;
651
+ disabled?: InputBackgroundStyle;
652
+ }
653
+ type InputBackground = InputBackgroundStyle | InputBackgroundStates;
654
+ interface InputProps extends Omit<MoyuNodeAttributes, 'children' | 'onFocus' | 'onBlur' | 'onInput' | 'onChange'> {
655
+ value?: string;
656
+ defaultValue?: string;
657
+ placeholder?: string;
658
+ disabled?: boolean;
659
+ readOnly?: boolean;
660
+ autoFocus?: boolean;
661
+ width: number;
662
+ height: number;
663
+ paddingX?: number;
664
+ textStyle: Omit<MoyuTextAttributes, 'children' | 'interactive' | 'text'>;
665
+ placeholderStyle?: Omit<MoyuTextAttributes, 'children' | 'interactive' | 'text'>;
666
+ caret: InputCaretStyle;
667
+ background?: InputBackground;
668
+ onInput?: (state: EditableState) => void;
669
+ onChange?: (state: EditableState, source: EditableChangeSource) => void;
670
+ onFocus?: (state: EditableState) => void;
671
+ onBlur?: (state: EditableState) => void;
672
+ onCompositionStart?: (state: EditableState) => void;
673
+ onCompositionUpdate?: (state: EditableState) => void;
674
+ onCompositionEnd?: (state: EditableState) => void;
675
+ }
676
+ interface InputHandle {
677
+ focus(): void;
678
+ blur(): void;
679
+ getState(): EditableState;
680
+ }
681
+ declare const Input: react.ForwardRefExoticComponent<InputProps & react.RefAttributes<InputHandle>>;
682
+
683
+ interface RadioGroupProps extends MoyuNodeAttributes {
684
+ value?: string;
685
+ defaultValue?: string;
686
+ onValueChange?: (value: string) => void;
687
+ children?: ReactNode;
688
+ }
689
+ declare function RadioGroup({ value, defaultValue, onValueChange, children, ...containerProps }: RadioGroupProps): JSX.Element;
690
+ interface RadioProps extends Omit<ButtonProps, 'lockOn' | 'sprite'> {
691
+ value: string;
692
+ uncheckedSprite: ControlSpriteProps;
693
+ checkedSprite: ControlSpriteProps;
694
+ }
695
+ declare function Radio({ value, uncheckedSprite, checkedSprite, onPress, ...buttonProps }: RadioProps): JSX.Element;
696
+
627
697
  interface SelectOption {
628
698
  text: string;
629
699
  value: string;
@@ -656,24 +726,23 @@ interface SelectProps extends Omit<MoyuNodeAttributes, 'onClick'> {
656
726
  }
657
727
  declare function Select({ value, defaultValue, onValueChange, onPress, disabled, options, trigger, list, option, textStyle, textOffsetX, textOffsetY, textAlign, anchor, pivot, ...containerProps }: SelectProps): JSX.Element;
658
728
 
659
- interface SliderTrackProps extends Omit<SpriteProps, 'src' | 'targetWidth'> {
660
- src: ControlStateValue<string>;
729
+ interface SliderTrackProps extends Omit<ControlSpriteProps, 'targetWidth'> {
661
730
  targetWidth: number;
662
731
  }
663
- interface SliderThumbProps extends Omit<SpriteProps, 'src' | 'targetWidth'> {
664
- src: ControlStateValue<string>;
732
+ interface SliderThumbProps extends Omit<ControlSpriteProps, 'targetWidth'> {
665
733
  targetWidth: number;
666
734
  }
667
735
  interface SliderProps extends Omit<MoyuNodeAttributes, 'onClick'> {
668
736
  value?: number;
669
737
  defaultValue?: number;
670
738
  onValueChange?: (value: number) => void;
739
+ onValueCommit?: (value: number) => void;
671
740
  onPress?: (event: PressEvent) => void;
672
741
  disabled?: boolean;
673
742
  track: SliderTrackProps;
674
743
  thumb: SliderThumbProps;
675
744
  }
676
- declare function Slider({ value, defaultValue, onValueChange, onPress, disabled, track, thumb, anchor, pivot, interactive, onMouseEnter, onMouseLeave, onMouseDown, onMouseUp, onMouseMove, onTouchStart, onTouchMove, onTouchEnd, onTouchCancel, ...containerProps }: SliderProps): JSX.Element;
745
+ declare function Slider({ value, defaultValue, onValueChange, onValueCommit, onPress, disabled, track, thumb, anchor, pivot, interactive, onMouseEnter, onMouseLeave, onMouseDown, onMouseUp, onMouseMove, onTouchStart, onTouchMove, onTouchEnd, onTouchCancel, ...containerProps }: SliderProps): JSX.Element;
677
746
 
678
747
  type ExecutionCursor = {
679
748
  story: string;
@@ -713,8 +782,8 @@ type StoryReplaceOutcome = {
713
782
  interface GameControl {
714
783
  /** Timed wait — blocks auto-advance. Engine fires scenariowaitingcancelled on timeout or skip. */
715
784
  setWaiting(time: number, skippable: boolean): void;
716
- /** Indefinite hold — blocks auto-advance until user action. */
717
- hold(): void;
785
+ /** Hold indefinitely, or until a Promise-like object settles. */
786
+ hold(until?: PromiseLike<void>, skippable?: boolean): void;
718
787
  /** Manually advance (rarely needed, e.g. `!` tailing). */
719
788
  nextLine(): void;
720
789
  /** Mark this dispatch cycle as unskippable. If skipping, hold() will stop skip instead of advancing. */
@@ -787,9 +856,11 @@ declare function createStage(): {
787
856
  startAuto: () => void;
788
857
  stopAuto: () => void;
789
858
  isAutoing: () => boolean;
859
+ setDefaultAutoTailMs: typeof setDefaultAutoTailMs;
790
860
  startFastForward: (options?: FastForwardOptions) => void;
791
861
  stopFastForward: () => void;
792
862
  isFastForwarding: () => boolean;
863
+ getSeekingType: typeof getSeekingType;
793
864
  resetRuntimeState: () => void;
794
865
  bindEvents: () => () => void;
795
866
  };
@@ -816,9 +887,11 @@ declare function StageContextProvider({ stage, children }: {
816
887
  startAuto: () => void;
817
888
  stopAuto: () => void;
818
889
  isAutoing: () => boolean;
890
+ setDefaultAutoTailMs: typeof setDefaultAutoTailMs;
819
891
  startFastForward: (options?: FastForwardOptions) => void;
820
892
  stopFastForward: () => void;
821
893
  isFastForwarding: () => boolean;
894
+ getSeekingType: typeof getSeekingType;
822
895
  resetRuntimeState: () => void;
823
896
  bindEvents: () => () => void;
824
897
  } | null>>;
@@ -1013,4 +1086,4 @@ declare module 'zod' {
1013
1086
  }
1014
1087
  }
1015
1088
 
1016
- export { type AnimatedComponent, type AnimatedProps, type AnimationFrameCallbackEvent, type AppStateAdapter, type AutoTicketHandle, type AutoTicketOptions, type BeforeUnloadEvent, Button, type ButtonProps, Checkbox, type CheckboxProps, type CombinedCheckpoint, Command, type CommandHandler, type ControlSpriteProps, type ControlState, type ControlStateValue, type ControlTextStyle, type CustomEvent, DEBUG_EMPTY_PAGE, type DebugSessionConfig, type DebugSessionController, type DebugWarpBoundary, type DebugWarpOptions, type DefaultOverlayName, type DefaultPageName, type FastForwardOptions, type FocusEvent, type FocusEventKind, type FullScreenEvent, type FullscreenEventKind, type GameControl, type GameEvent, type GameStateSourceProps, type GameStateStore, type Gamepad, type GamepadButton, type GamepadEvent, type GamepadHapticActuator, JSX, type KeyboardLocation, LayoutEvent, type Literal, MaybePromise, MouseEvent, MoyuClipAttributes, MoyuEvent, MoyuNodeAttributes, MoyuSpriteAttributes, MoyuVBoxAttributes, type NavigationState, type Navigator, type NodeEvent, type OverlayConfig, type OverlayDescriptor, type OverlayInfo, OverlayParamsContext, type PageConfig, type PageDescriptor, PageParamsContext, type PressEvent, type RegisterNavigator, type ResizeEvent, type ResolvedArgument, type ResolvedCommandLine, type ResolvedSystemCallLine, type RootErrorInfo, type RootHandle, type RootNavigatorList, type RootOptions, type RootUiDataMap, type RootUncaughtErrorInfo, type ScenarioCommandBaseType, type ScenarioEvent, ScrollView, type ScrollViewController, type ScrollViewProps, Select, type SelectListProps, type SelectOption, type SelectOptionSpriteProps, type SelectProps, type ShaderBuiltin, type ShaderBuiltinName, type ShaderEvent, Slider, type SliderProps, type SliderThumbProps, type SliderTrackProps, type StackNavigatorOptions, StageContextProvider, type StageInstance, type TextLine, type TextLineHandler, TouchEvent, type UseScrollViewOptions, WheelEvent, type WithAnimated, animated as a, addEventListener, animated, autoState, createGameStateContext, createRoot, createStackNavigator, createStage, createStaticNavigation, ensureArchiveVariableDefaults, executeNodeCommand, executePluginCommand, fastForwardState, getAppStateAdapter, getNavigator, getSeekingType, getUiData, globalEventListeners, globalRequestAnimationFrameListeners, initGlobalVariableDefaults, initUiData, loadVariablesDocument, moyu, nextLine, registerAppStateAdapter, replaceUiData, setDefaultAutoTailMs, setWaiting, skipState, startDebugSession, startRuntimeDebugSession, stopDebugSession, stopRuntimeDebugSession, useAutoBlocker, useAutoTicket, useBeforeHandleCommandCallback, useDebugSession, useFadeIn, useFadeInOut, useFadeOut, useInterruptCallback, useIsAutoing, useIsSeeking, useIsSkipping, useNavigation, useNavigationParams, useNavigationState, useScenario, useScrollView, useSkipBlocker, useSkipCallback, useSoundEffect, useStageContext, useUiData, warpState };
1089
+ export { type AnimatedComponent, type AnimatedProps, type AnimationFrameCallbackEvent, type AppStateAdapter, type AutoTicketHandle, type AutoTicketOptions, type BeforeUnloadEvent, Button, type ButtonProps, Checkbox, type CheckboxProps, type CombinedCheckpoint, Command, type CommandHandler, type ControlSpriteProps, type ControlState, type ControlStateValue, type ControlTextStyle, type CustomEvent, DEBUG_EMPTY_PAGE, type DebugSessionConfig, type DebugSessionController, type DebugWarpBoundary, type DebugWarpOptions, type DefaultOverlayName, type DefaultPageName, type DlcProgress, EditableChangeSource, EditableState, type FastForwardOptions, type FocusEvent, type FocusEventKind, type FullScreenEvent, type FullscreenEventKind, type GameControl, type GameEvent, type GameStateSourceProps, type GameStateStore, type Gamepad, type GamepadButton, type GamepadEvent, type GamepadHapticActuator, Input, type InputBackground, type InputBackgroundStates, type InputBackgroundStyle, type InputCaretStyle, type InputHandle, type InputProps, JSX, type KeyboardLocation, LayoutEvent, type Literal, MaybePromise, MouseEvent, MoyuClipAttributes, MoyuEvent, MoyuNodeAttributes, MoyuSpriteAttributes, MoyuTextAttributes, MoyuVBoxAttributes, type NavigationState, type Navigator, type NodeEvent, type OverlayConfig, type OverlayDescriptor, type OverlayInfo, OverlayParamsContext, type PageConfig, type PageDescriptor, PageParamsContext, type PressEvent, Radio, RadioGroup, type RadioGroupProps, type RadioProps, type RegisterNavigator, type ResizeEvent, type ResolvedArgument, type ResolvedCommandLine, type ResolvedSystemCallLine, type RootErrorInfo, type RootHandle, type RootNavigatorList, type RootOptions, type RootUiDataMap, type RootUncaughtErrorInfo, type ScenarioCommandBaseType, type ScenarioEvent, ScrollView, type ScrollViewController, type ScrollViewProps, Select, type SelectListProps, type SelectOption, type SelectOptionSpriteProps, type SelectProps, type ShaderBuiltin, type ShaderBuiltinName, type ShaderEvent, Slider, type SliderProps, type SliderThumbProps, type SliderTrackProps, type StackNavigatorOptions, StageContextProvider, type StageInstance, type TextLine, type TextLineHandler, TouchEvent, type UseScrollViewOptions, WheelEvent, type WithAnimated, animated as a, addEventListener, addFluidObserver, animated, autoState, createGameStateContext, createRoot, createStackNavigator, createStage, createStaticNavigation, ensureArchiveVariableDefaults, executeNodeCommand, executePluginCommand, fastForwardState, getAppStateAdapter, getNavigator, getSeekingType, getUiData, globalEventListeners, globalRequestAnimationFrameListeners, initGlobalVariableDefaults, initUiData, loadVariablesDocument, moyu, nextLine, registerAppStateAdapter, removeFluidObserver, replaceUiData, setDefaultAutoTailMs, setWaiting, skipState, startDebugSession, startRuntimeDebugSession, stopDebugSession, stopRuntimeDebugSession, useAutoBlocker, useAutoTicket, useBeforeHandleCommandCallback, useDebugSession, useFadeIn, useFadeInOut, useFadeOut, useInterruptCallback, useIsAutoing, useIsSeeking, useIsSkipping, useNavigation, useNavigationParams, useNavigationState, useScenario, useScrollView, useSkipBlocker, useSkipCallback, useSoundEffect, useStageContext, useUiData, warpState };