@momoyu-ink/kit 0.10.1 → 0.11.1
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/AGENTS.md +3 -2
- package/dist/{jsx-dev-runtime-x1NET2hA.d.mts → jsx-dev-runtime-BasPxDFu.d.mts} +116 -2
- package/dist/{jsx-dev-runtime-x1NET2hA.d.ts → jsx-dev-runtime-BasPxDFu.d.ts} +116 -2
- package/dist/jsx-dev-runtime.d.mts +1 -1
- package/dist/jsx-dev-runtime.d.ts +1 -1
- package/dist/jsx-runtime.d.mts +1 -1
- package/dist/jsx-runtime.d.ts +1 -1
- package/dist/lib.cjs +534 -83
- package/dist/lib.d.mts +78 -8
- package/dist/lib.d.ts +78 -8
- package/dist/lib.mjs +544 -82
- package/package.json +2 -1
package/AGENTS.md
CHANGED
|
@@ -193,7 +193,7 @@ Stage 是剧情驱动 UI 的核心抽象:命令调度、流程控制、skip /
|
|
|
193
193
|
|
|
194
194
|
| 方法 | 作用 |
|
|
195
195
|
|------|------|
|
|
196
|
-
| `control.hold()` |
|
|
196
|
+
| `control.hold(until?, skippable?)` | 无参数时保持无限暂停;传入 Promise-like 时等待其 settle,`skippable` 为 true 时允许 interrupt / skip 提前完成 |
|
|
197
197
|
| `control.setWaiting(ms, skippable)` | 定时等待;在 auto 模式下会打开 `wait` barrier |
|
|
198
198
|
| `control.nextLine()` | 立即推进 |
|
|
199
199
|
| `control.unskippable()` | 将本次 dispatch 标记为不可跳过 |
|
|
@@ -202,7 +202,8 @@ Stage 是剧情驱动 UI 的核心抽象:命令调度、流程控制、skip /
|
|
|
202
202
|
**实现要点:**
|
|
203
203
|
|
|
204
204
|
- Stage 当前只封装 `scenariocommandline` 和 `scenariotext` 两类事件;`ResolvedSystemCallLine` 虽然从 `events.ts` 导出,但若要处理 system call,需要自己显式监听对应事件。
|
|
205
|
-
- auto
|
|
205
|
+
- auto 模式下,无参数 `hold()` / `setWaiting()` 不会直接把控制权交给普通等待逻辑,而是打开一个 barrier。只有当 barrier 的 ticket 全部 `done()` / `cancel()`,并且各自 `tailMs` 都结算完成后,Stage 才会恢复 `nextLine()`。
|
|
206
|
+
- `hold(until, skippable)` 使用 Stage 当前 dispatch 的唯一 active wait,不进入 auto barrier。Promise resolve 或 reject 后请求一次推进;reject 会记录错误。`skippable` 默认为 false;为 true 时,interrupt / skip 会先调用等待对象可选的 `finish()`,再解除等待。Promise、interrupt、skip、reset 和新 dispatch 竞争同一个一次性完成状态。
|
|
206
207
|
- `useAutoTicket()` 允许 actor 参与 auto barrier 协调。若 ticket 在 barrier 打开前的短暂采集窗口内创建,Stage 会先把它放入 pending 集合,再在下一个 barrier 打开时收编,解决语音等副作用早于文本 barrier 注册的问题。
|
|
207
208
|
- skip / auto blocker 用于表达“当前流程禁止模式继续”的业务条件,适合选项菜单、模态交互等必须等待用户操作的场景。
|
|
208
209
|
|
|
@@ -109,6 +109,19 @@ type AudioCommand = {
|
|
|
109
109
|
panning: number;
|
|
110
110
|
};
|
|
111
111
|
|
|
112
|
+
type EditableCommand = {
|
|
113
|
+
subCommand: 'getState';
|
|
114
|
+
} | {
|
|
115
|
+
subCommand: 'setValue';
|
|
116
|
+
value: string;
|
|
117
|
+
} | {
|
|
118
|
+
subCommand: 'setCaretRect';
|
|
119
|
+
x: number;
|
|
120
|
+
y: number;
|
|
121
|
+
width: number;
|
|
122
|
+
height: number;
|
|
123
|
+
};
|
|
124
|
+
|
|
112
125
|
type EffectParams = {
|
|
113
126
|
duration: number;
|
|
114
127
|
startDelay: number;
|
|
@@ -448,6 +461,9 @@ type SystemCommand = {
|
|
|
448
461
|
format?: ReadFormat;
|
|
449
462
|
} | {
|
|
450
463
|
subCommand: 'getParams';
|
|
464
|
+
} | {
|
|
465
|
+
subCommand: 'openUrl';
|
|
466
|
+
url: string;
|
|
451
467
|
} | {
|
|
452
468
|
subCommand: 'quit';
|
|
453
469
|
};
|
|
@@ -462,6 +478,28 @@ type TextCommand = {
|
|
|
462
478
|
subCommand: 'getCursorPosition';
|
|
463
479
|
};
|
|
464
480
|
|
|
481
|
+
type VideoCommand = {
|
|
482
|
+
subCommand: 'play';
|
|
483
|
+
} | {
|
|
484
|
+
subCommand: 'pause';
|
|
485
|
+
} | {
|
|
486
|
+
subCommand: 'resume';
|
|
487
|
+
} | {
|
|
488
|
+
subCommand: 'stop';
|
|
489
|
+
} | {
|
|
490
|
+
subCommand: 'seek';
|
|
491
|
+
time: number;
|
|
492
|
+
} | {
|
|
493
|
+
subCommand: 'setVolume';
|
|
494
|
+
volume: number;
|
|
495
|
+
} | {
|
|
496
|
+
subCommand: 'setMuted';
|
|
497
|
+
muted: boolean;
|
|
498
|
+
} | {
|
|
499
|
+
subCommand: 'setLoop';
|
|
500
|
+
enabled: boolean;
|
|
501
|
+
};
|
|
502
|
+
|
|
465
503
|
interface MoyuEvent<T extends Record<string, unknown> = Record<string, unknown>> {
|
|
466
504
|
name: string;
|
|
467
505
|
body: T;
|
|
@@ -570,6 +608,13 @@ type LayoutEvent = {
|
|
|
570
608
|
height: number;
|
|
571
609
|
};
|
|
572
610
|
|
|
611
|
+
type TextLayoutEvent = {
|
|
612
|
+
text: string;
|
|
613
|
+
width: number;
|
|
614
|
+
height: number;
|
|
615
|
+
endCursorPosition: [number, number];
|
|
616
|
+
};
|
|
617
|
+
|
|
573
618
|
type WheelEventDeltaMode = 'pixel' | 'line' | 'page';
|
|
574
619
|
|
|
575
620
|
interface WheelEvent extends Omit<MouseEvent, 'kind'> {
|
|
@@ -601,6 +646,7 @@ type NodeProps = {
|
|
|
601
646
|
interactive?: boolean;
|
|
602
647
|
cursor?: MoyuCursor;
|
|
603
648
|
zIndex?: number;
|
|
649
|
+
excludeFromLayout?: boolean;
|
|
604
650
|
};
|
|
605
651
|
|
|
606
652
|
type AlignItems = 'start' | 'center' | 'end';
|
|
@@ -634,6 +680,44 @@ type ClipProps = {
|
|
|
634
680
|
height?: number;
|
|
635
681
|
};
|
|
636
682
|
|
|
683
|
+
type EditableChangeSource = 'insertText' | 'insertCompositionText' | 'deleteBackward';
|
|
684
|
+
|
|
685
|
+
type EditableState = {
|
|
686
|
+
value: string;
|
|
687
|
+
isComposing: boolean;
|
|
688
|
+
compositionText: string;
|
|
689
|
+
};
|
|
690
|
+
|
|
691
|
+
type EditableEvent = {
|
|
692
|
+
type: 'focus';
|
|
693
|
+
state: EditableState;
|
|
694
|
+
} | {
|
|
695
|
+
type: 'blur';
|
|
696
|
+
state: EditableState;
|
|
697
|
+
} | {
|
|
698
|
+
type: 'input';
|
|
699
|
+
state: EditableState;
|
|
700
|
+
} | {
|
|
701
|
+
type: 'change';
|
|
702
|
+
state: EditableState;
|
|
703
|
+
source: EditableChangeSource;
|
|
704
|
+
} | {
|
|
705
|
+
type: 'compositionStart';
|
|
706
|
+
state: EditableState;
|
|
707
|
+
} | {
|
|
708
|
+
type: 'compositionUpdate';
|
|
709
|
+
state: EditableState;
|
|
710
|
+
} | {
|
|
711
|
+
type: 'compositionEnd';
|
|
712
|
+
state: EditableState;
|
|
713
|
+
};
|
|
714
|
+
|
|
715
|
+
type EditableProps = {
|
|
716
|
+
value?: string;
|
|
717
|
+
disabled?: boolean;
|
|
718
|
+
readOnly?: boolean;
|
|
719
|
+
};
|
|
720
|
+
|
|
637
721
|
/**
|
|
638
722
|
* 滤镜配置(可序列化,用于 JS 互操作)
|
|
639
723
|
*/
|
|
@@ -707,6 +791,7 @@ type TextProps = {
|
|
|
707
791
|
text?: string;
|
|
708
792
|
printMode?: TextPrintMode;
|
|
709
793
|
printSpeed?: number;
|
|
794
|
+
parseMarkup?: boolean;
|
|
710
795
|
/**
|
|
711
796
|
* the writing direction of the text in the box,
|
|
712
797
|
* only `Horizontal` (right-to-left) or `Vertical` (top-to-bottom) is valid.
|
|
@@ -785,6 +870,10 @@ type ShaderSource = ({
|
|
|
785
870
|
type: 'raw';
|
|
786
871
|
content: string;
|
|
787
872
|
params?: Array<ShaderParam>;
|
|
873
|
+
} | {
|
|
874
|
+
type: 'file';
|
|
875
|
+
src: string;
|
|
876
|
+
params?: Array<ShaderParam>;
|
|
788
877
|
};
|
|
789
878
|
|
|
790
879
|
type ShaderTimeControl = 'auto' | 'manual' | 'transition';
|
|
@@ -856,6 +945,29 @@ type MoyuHBoxAttributes = HBoxProps & MoyuNodeAttributes & {
|
|
|
856
945
|
onLayout?: (event: LayoutEvent) => void;
|
|
857
946
|
};
|
|
858
947
|
type MoyuClipAttributes = ClipProps & MoyuNodeAttributes;
|
|
948
|
+
type MoyuEditableAttributes = EditableProps & MoyuNodeAttributes & {
|
|
949
|
+
onFocus?: (event: Extract<EditableEvent, {
|
|
950
|
+
type: 'focus';
|
|
951
|
+
}>) => void;
|
|
952
|
+
onBlur?: (event: Extract<EditableEvent, {
|
|
953
|
+
type: 'blur';
|
|
954
|
+
}>) => void;
|
|
955
|
+
onInput?: (event: Extract<EditableEvent, {
|
|
956
|
+
type: 'input';
|
|
957
|
+
}>) => void;
|
|
958
|
+
onChange?: (event: Extract<EditableEvent, {
|
|
959
|
+
type: 'change';
|
|
960
|
+
}>) => void;
|
|
961
|
+
onCompositionStart?: (event: Extract<EditableEvent, {
|
|
962
|
+
type: 'compositionStart';
|
|
963
|
+
}>) => void;
|
|
964
|
+
onCompositionUpdate?: (event: Extract<EditableEvent, {
|
|
965
|
+
type: 'compositionUpdate';
|
|
966
|
+
}>) => void;
|
|
967
|
+
onCompositionEnd?: (event: Extract<EditableEvent, {
|
|
968
|
+
type: 'compositionEnd';
|
|
969
|
+
}>) => void;
|
|
970
|
+
};
|
|
859
971
|
type MoyuFilterAttributes = FilterProps & MoyuNodeAttributes;
|
|
860
972
|
type MoyuBackdropAttributes = BackdropProps & MoyuNodeAttributes;
|
|
861
973
|
type MoyuAnimationAttributes = AnimationProps & MoyuNodeAttributes;
|
|
@@ -873,6 +985,7 @@ type MoyuTextAttributes = TextProps & MoyuNodeAttributes & {
|
|
|
873
985
|
onStart?: () => void;
|
|
874
986
|
onFinish?: () => void;
|
|
875
987
|
onProgress?: (progress: number) => void;
|
|
988
|
+
onTextLayout?: (event: TextLayoutEvent) => void;
|
|
876
989
|
};
|
|
877
990
|
declare namespace JSX {
|
|
878
991
|
type ElementType = string | React.JSXElementConstructor<any>;
|
|
@@ -898,6 +1011,7 @@ declare namespace JSX {
|
|
|
898
1011
|
sprite: DetailedMoyuProps<MoyuSpriteAttributes>;
|
|
899
1012
|
text: DetailedMoyuProps<MoyuTextAttributes>;
|
|
900
1013
|
clip: DetailedMoyuProps<MoyuClipAttributes>;
|
|
1014
|
+
editable: DetailedMoyuProps<MoyuEditableAttributes>;
|
|
901
1015
|
filter: DetailedMoyuProps<MoyuFilterAttributes>;
|
|
902
1016
|
backdrop: DetailedMoyuProps<MoyuBackdropAttributes>;
|
|
903
1017
|
animation: DetailedMoyuProps<MoyuAnimationAttributes>;
|
|
@@ -919,8 +1033,8 @@ type MakeNullOptional<T> = T extends unknown ? {
|
|
|
919
1033
|
} : never;
|
|
920
1034
|
declare function mergeEvent<T extends BubbleEvent, K extends BubbleEvent>(handlers: MoyuEventHandler<T> | readonly MoyuEventHandler<T>[] | undefined, defaultHandler?: MoyuEventHandler<K>): (event: T | K) => void;
|
|
921
1035
|
|
|
922
|
-
type _Command = AudioCommand | TextCommand | GamepadCommand | ScenarioCommand | ShaderCommand | SteamCommand | SystemCommand;
|
|
1036
|
+
type _Command = AudioCommand | EditableCommand | TextCommand | GamepadCommand | ScenarioCommand | ShaderCommand | SteamCommand | SystemCommand | VideoCommand;
|
|
923
1037
|
type Command = MakeNullOptional<_Command>;
|
|
924
1038
|
type MaybePromise = any;
|
|
925
1039
|
|
|
926
|
-
export { type
|
|
1040
|
+
export { type SteamCommand as $, type AudioCommand as A, type BubbleEvent as B, type Command as C, type DetailedMoyuProps as D, type EditableState as E, type MoyuShaderAttributes as F, type GamepadCommand as G, type MoyuShaderSlotAttributes as H, type MoyuVideoAttributes as I, JSX as J, type KeyboardEvent as K, type LayoutEvent as L, type MoyuEvent as M, Node as N, type OverlayDialog as O, type OverlayNotificationPosition as P, type OverlayStoreFlag as Q, type RetainMode as R, type ShaderDirection as S, type TouchEvent as T, type ScenarioCommand as U, type ShaderCommand as V, type WheelEvent as W, type ShaderParam as X, type ShaderParamType as Y, type ShaderSource as Z, type ShaderTimeControl as _, type MaybePromise as a, type SystemCommand as a0, type TextCommand as a1, type TextLayoutEvent as a2, type TimelinePossibleClip as a3, type TouchEventKind as a4, type Tuple2 as a5, type Tuple3 as a6, type Tuple4 as a7, type VideoCommand as a8, type WheelEventDeltaMode as a9, type WindowState as aa, createBubbleEvent as ab, getStageSize as ac, mergeEvent as ad, type MoyuClipAttributes as b, type MoyuVBoxAttributes as c, type MoyuSpriteAttributes as d, type TextProps as e, type MoyuNodeAttributes as f, type MouseEvent as g, type MoyuTextAttributes as h, type EditableChangeSource as i, type SpriteProps as j, type JsonValue as k, type AudioSettings as l, type EditableCommand as m, type EditableEvent as n, type EffectParams as o, type KeyboardEventKind as p, type MakeNullOptional as q, type MouseEventKind as r, type MoyuAnimationAttributes as s, type MoyuBackdropAttributes as t, type MoyuContainerAttributes as u, type MoyuEditableAttributes as v, type MoyuEventHandler as w, type MoyuFilterAttributes as x, type MoyuHBoxAttributes as y, type MoyuListenerAttributes as z };
|
|
@@ -109,6 +109,19 @@ type AudioCommand = {
|
|
|
109
109
|
panning: number;
|
|
110
110
|
};
|
|
111
111
|
|
|
112
|
+
type EditableCommand = {
|
|
113
|
+
subCommand: 'getState';
|
|
114
|
+
} | {
|
|
115
|
+
subCommand: 'setValue';
|
|
116
|
+
value: string;
|
|
117
|
+
} | {
|
|
118
|
+
subCommand: 'setCaretRect';
|
|
119
|
+
x: number;
|
|
120
|
+
y: number;
|
|
121
|
+
width: number;
|
|
122
|
+
height: number;
|
|
123
|
+
};
|
|
124
|
+
|
|
112
125
|
type EffectParams = {
|
|
113
126
|
duration: number;
|
|
114
127
|
startDelay: number;
|
|
@@ -448,6 +461,9 @@ type SystemCommand = {
|
|
|
448
461
|
format?: ReadFormat;
|
|
449
462
|
} | {
|
|
450
463
|
subCommand: 'getParams';
|
|
464
|
+
} | {
|
|
465
|
+
subCommand: 'openUrl';
|
|
466
|
+
url: string;
|
|
451
467
|
} | {
|
|
452
468
|
subCommand: 'quit';
|
|
453
469
|
};
|
|
@@ -462,6 +478,28 @@ type TextCommand = {
|
|
|
462
478
|
subCommand: 'getCursorPosition';
|
|
463
479
|
};
|
|
464
480
|
|
|
481
|
+
type VideoCommand = {
|
|
482
|
+
subCommand: 'play';
|
|
483
|
+
} | {
|
|
484
|
+
subCommand: 'pause';
|
|
485
|
+
} | {
|
|
486
|
+
subCommand: 'resume';
|
|
487
|
+
} | {
|
|
488
|
+
subCommand: 'stop';
|
|
489
|
+
} | {
|
|
490
|
+
subCommand: 'seek';
|
|
491
|
+
time: number;
|
|
492
|
+
} | {
|
|
493
|
+
subCommand: 'setVolume';
|
|
494
|
+
volume: number;
|
|
495
|
+
} | {
|
|
496
|
+
subCommand: 'setMuted';
|
|
497
|
+
muted: boolean;
|
|
498
|
+
} | {
|
|
499
|
+
subCommand: 'setLoop';
|
|
500
|
+
enabled: boolean;
|
|
501
|
+
};
|
|
502
|
+
|
|
465
503
|
interface MoyuEvent<T extends Record<string, unknown> = Record<string, unknown>> {
|
|
466
504
|
name: string;
|
|
467
505
|
body: T;
|
|
@@ -570,6 +608,13 @@ type LayoutEvent = {
|
|
|
570
608
|
height: number;
|
|
571
609
|
};
|
|
572
610
|
|
|
611
|
+
type TextLayoutEvent = {
|
|
612
|
+
text: string;
|
|
613
|
+
width: number;
|
|
614
|
+
height: number;
|
|
615
|
+
endCursorPosition: [number, number];
|
|
616
|
+
};
|
|
617
|
+
|
|
573
618
|
type WheelEventDeltaMode = 'pixel' | 'line' | 'page';
|
|
574
619
|
|
|
575
620
|
interface WheelEvent extends Omit<MouseEvent, 'kind'> {
|
|
@@ -601,6 +646,7 @@ type NodeProps = {
|
|
|
601
646
|
interactive?: boolean;
|
|
602
647
|
cursor?: MoyuCursor;
|
|
603
648
|
zIndex?: number;
|
|
649
|
+
excludeFromLayout?: boolean;
|
|
604
650
|
};
|
|
605
651
|
|
|
606
652
|
type AlignItems = 'start' | 'center' | 'end';
|
|
@@ -634,6 +680,44 @@ type ClipProps = {
|
|
|
634
680
|
height?: number;
|
|
635
681
|
};
|
|
636
682
|
|
|
683
|
+
type EditableChangeSource = 'insertText' | 'insertCompositionText' | 'deleteBackward';
|
|
684
|
+
|
|
685
|
+
type EditableState = {
|
|
686
|
+
value: string;
|
|
687
|
+
isComposing: boolean;
|
|
688
|
+
compositionText: string;
|
|
689
|
+
};
|
|
690
|
+
|
|
691
|
+
type EditableEvent = {
|
|
692
|
+
type: 'focus';
|
|
693
|
+
state: EditableState;
|
|
694
|
+
} | {
|
|
695
|
+
type: 'blur';
|
|
696
|
+
state: EditableState;
|
|
697
|
+
} | {
|
|
698
|
+
type: 'input';
|
|
699
|
+
state: EditableState;
|
|
700
|
+
} | {
|
|
701
|
+
type: 'change';
|
|
702
|
+
state: EditableState;
|
|
703
|
+
source: EditableChangeSource;
|
|
704
|
+
} | {
|
|
705
|
+
type: 'compositionStart';
|
|
706
|
+
state: EditableState;
|
|
707
|
+
} | {
|
|
708
|
+
type: 'compositionUpdate';
|
|
709
|
+
state: EditableState;
|
|
710
|
+
} | {
|
|
711
|
+
type: 'compositionEnd';
|
|
712
|
+
state: EditableState;
|
|
713
|
+
};
|
|
714
|
+
|
|
715
|
+
type EditableProps = {
|
|
716
|
+
value?: string;
|
|
717
|
+
disabled?: boolean;
|
|
718
|
+
readOnly?: boolean;
|
|
719
|
+
};
|
|
720
|
+
|
|
637
721
|
/**
|
|
638
722
|
* 滤镜配置(可序列化,用于 JS 互操作)
|
|
639
723
|
*/
|
|
@@ -707,6 +791,7 @@ type TextProps = {
|
|
|
707
791
|
text?: string;
|
|
708
792
|
printMode?: TextPrintMode;
|
|
709
793
|
printSpeed?: number;
|
|
794
|
+
parseMarkup?: boolean;
|
|
710
795
|
/**
|
|
711
796
|
* the writing direction of the text in the box,
|
|
712
797
|
* only `Horizontal` (right-to-left) or `Vertical` (top-to-bottom) is valid.
|
|
@@ -785,6 +870,10 @@ type ShaderSource = ({
|
|
|
785
870
|
type: 'raw';
|
|
786
871
|
content: string;
|
|
787
872
|
params?: Array<ShaderParam>;
|
|
873
|
+
} | {
|
|
874
|
+
type: 'file';
|
|
875
|
+
src: string;
|
|
876
|
+
params?: Array<ShaderParam>;
|
|
788
877
|
};
|
|
789
878
|
|
|
790
879
|
type ShaderTimeControl = 'auto' | 'manual' | 'transition';
|
|
@@ -856,6 +945,29 @@ type MoyuHBoxAttributes = HBoxProps & MoyuNodeAttributes & {
|
|
|
856
945
|
onLayout?: (event: LayoutEvent) => void;
|
|
857
946
|
};
|
|
858
947
|
type MoyuClipAttributes = ClipProps & MoyuNodeAttributes;
|
|
948
|
+
type MoyuEditableAttributes = EditableProps & MoyuNodeAttributes & {
|
|
949
|
+
onFocus?: (event: Extract<EditableEvent, {
|
|
950
|
+
type: 'focus';
|
|
951
|
+
}>) => void;
|
|
952
|
+
onBlur?: (event: Extract<EditableEvent, {
|
|
953
|
+
type: 'blur';
|
|
954
|
+
}>) => void;
|
|
955
|
+
onInput?: (event: Extract<EditableEvent, {
|
|
956
|
+
type: 'input';
|
|
957
|
+
}>) => void;
|
|
958
|
+
onChange?: (event: Extract<EditableEvent, {
|
|
959
|
+
type: 'change';
|
|
960
|
+
}>) => void;
|
|
961
|
+
onCompositionStart?: (event: Extract<EditableEvent, {
|
|
962
|
+
type: 'compositionStart';
|
|
963
|
+
}>) => void;
|
|
964
|
+
onCompositionUpdate?: (event: Extract<EditableEvent, {
|
|
965
|
+
type: 'compositionUpdate';
|
|
966
|
+
}>) => void;
|
|
967
|
+
onCompositionEnd?: (event: Extract<EditableEvent, {
|
|
968
|
+
type: 'compositionEnd';
|
|
969
|
+
}>) => void;
|
|
970
|
+
};
|
|
859
971
|
type MoyuFilterAttributes = FilterProps & MoyuNodeAttributes;
|
|
860
972
|
type MoyuBackdropAttributes = BackdropProps & MoyuNodeAttributes;
|
|
861
973
|
type MoyuAnimationAttributes = AnimationProps & MoyuNodeAttributes;
|
|
@@ -873,6 +985,7 @@ type MoyuTextAttributes = TextProps & MoyuNodeAttributes & {
|
|
|
873
985
|
onStart?: () => void;
|
|
874
986
|
onFinish?: () => void;
|
|
875
987
|
onProgress?: (progress: number) => void;
|
|
988
|
+
onTextLayout?: (event: TextLayoutEvent) => void;
|
|
876
989
|
};
|
|
877
990
|
declare namespace JSX {
|
|
878
991
|
type ElementType = string | React.JSXElementConstructor<any>;
|
|
@@ -898,6 +1011,7 @@ declare namespace JSX {
|
|
|
898
1011
|
sprite: DetailedMoyuProps<MoyuSpriteAttributes>;
|
|
899
1012
|
text: DetailedMoyuProps<MoyuTextAttributes>;
|
|
900
1013
|
clip: DetailedMoyuProps<MoyuClipAttributes>;
|
|
1014
|
+
editable: DetailedMoyuProps<MoyuEditableAttributes>;
|
|
901
1015
|
filter: DetailedMoyuProps<MoyuFilterAttributes>;
|
|
902
1016
|
backdrop: DetailedMoyuProps<MoyuBackdropAttributes>;
|
|
903
1017
|
animation: DetailedMoyuProps<MoyuAnimationAttributes>;
|
|
@@ -919,8 +1033,8 @@ type MakeNullOptional<T> = T extends unknown ? {
|
|
|
919
1033
|
} : never;
|
|
920
1034
|
declare function mergeEvent<T extends BubbleEvent, K extends BubbleEvent>(handlers: MoyuEventHandler<T> | readonly MoyuEventHandler<T>[] | undefined, defaultHandler?: MoyuEventHandler<K>): (event: T | K) => void;
|
|
921
1035
|
|
|
922
|
-
type _Command = AudioCommand | TextCommand | GamepadCommand | ScenarioCommand | ShaderCommand | SteamCommand | SystemCommand;
|
|
1036
|
+
type _Command = AudioCommand | EditableCommand | TextCommand | GamepadCommand | ScenarioCommand | ShaderCommand | SteamCommand | SystemCommand | VideoCommand;
|
|
923
1037
|
type Command = MakeNullOptional<_Command>;
|
|
924
1038
|
type MaybePromise = any;
|
|
925
1039
|
|
|
926
|
-
export { type
|
|
1040
|
+
export { type SteamCommand as $, type AudioCommand as A, type BubbleEvent as B, type Command as C, type DetailedMoyuProps as D, type EditableState as E, type MoyuShaderAttributes as F, type GamepadCommand as G, type MoyuShaderSlotAttributes as H, type MoyuVideoAttributes as I, JSX as J, type KeyboardEvent as K, type LayoutEvent as L, type MoyuEvent as M, Node as N, type OverlayDialog as O, type OverlayNotificationPosition as P, type OverlayStoreFlag as Q, type RetainMode as R, type ShaderDirection as S, type TouchEvent as T, type ScenarioCommand as U, type ShaderCommand as V, type WheelEvent as W, type ShaderParam as X, type ShaderParamType as Y, type ShaderSource as Z, type ShaderTimeControl as _, type MaybePromise as a, type SystemCommand as a0, type TextCommand as a1, type TextLayoutEvent as a2, type TimelinePossibleClip as a3, type TouchEventKind as a4, type Tuple2 as a5, type Tuple3 as a6, type Tuple4 as a7, type VideoCommand as a8, type WheelEventDeltaMode as a9, type WindowState as aa, createBubbleEvent as ab, getStageSize as ac, mergeEvent as ad, type MoyuClipAttributes as b, type MoyuVBoxAttributes as c, type MoyuSpriteAttributes as d, type TextProps as e, type MoyuNodeAttributes as f, type MouseEvent as g, type MoyuTextAttributes as h, type EditableChangeSource as i, type SpriteProps as j, type JsonValue as k, type AudioSettings as l, type EditableCommand as m, type EditableEvent as n, type EffectParams as o, type KeyboardEventKind as p, type MakeNullOptional as q, type MouseEventKind as r, type MoyuAnimationAttributes as s, type MoyuBackdropAttributes as t, type MoyuContainerAttributes as u, type MoyuEditableAttributes as v, type MoyuEventHandler as w, type MoyuFilterAttributes as x, type MoyuHBoxAttributes as y, type MoyuListenerAttributes as z };
|
package/dist/jsx-runtime.d.mts
CHANGED
package/dist/jsx-runtime.d.ts
CHANGED