@momoyu-ink/kit 0.11.0 → 0.11.2

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.
@@ -450,6 +450,8 @@ type SystemCommand = {
450
450
  subCommand: 'getWindowInnerSize';
451
451
  } | {
452
452
  subCommand: 'getStageSize';
453
+ } | {
454
+ subCommand: 'getPlatform';
453
455
  } | {
454
456
  subCommand: 'takeSnapshot';
455
457
  width?: number;
@@ -500,6 +502,18 @@ type VideoCommand = {
500
502
  enabled: boolean;
501
503
  };
502
504
 
505
+ type PlatformInfo = {
506
+ isLinux: boolean;
507
+ isMacOS: boolean;
508
+ isAndroid: boolean;
509
+ isIOS: boolean;
510
+ isWasm: boolean;
511
+ isNative: boolean;
512
+ isDesktop: boolean;
513
+ isMobile: boolean;
514
+ isWeb: boolean;
515
+ };
516
+
503
517
  interface MoyuEvent<T extends Record<string, unknown> = Record<string, unknown>> {
504
518
  name: string;
505
519
  body: T;
@@ -1026,6 +1040,7 @@ declare function getStageSize(): {
1026
1040
  height: number;
1027
1041
  scaleFactor: number;
1028
1042
  };
1043
+ declare function getPlatform(): PlatformInfo;
1029
1044
  type MakeNullOptional<T> = T extends unknown ? {
1030
1045
  [K in keyof T as null extends T[K] ? never : K]: T[K];
1031
1046
  } & {
@@ -1037,4 +1052,4 @@ type _Command = AudioCommand | EditableCommand | TextCommand | GamepadCommand |
1037
1052
  type Command = MakeNullOptional<_Command>;
1038
1053
  type MaybePromise = any;
1039
1054
 
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 };
1055
+ export { type ShaderTimeControl 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 PlatformInfo as R, type ShaderDirection as S, type TouchEvent as T, type RetainMode as U, type ScenarioCommand as V, type WheelEvent as W, type ShaderCommand as X, type ShaderParam as Y, type ShaderParamType as Z, type ShaderSource as _, type MaybePromise as a, type SteamCommand as a0, type SystemCommand as a1, type TextCommand as a2, type TextLayoutEvent as a3, type TimelinePossibleClip as a4, type TouchEventKind as a5, type Tuple2 as a6, type Tuple3 as a7, type Tuple4 as a8, type VideoCommand as a9, type WheelEventDeltaMode as aa, type WindowState as ab, createBubbleEvent as ac, getPlatform as ad, getStageSize as ae, mergeEvent as af, 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 };
@@ -450,6 +450,8 @@ type SystemCommand = {
450
450
  subCommand: 'getWindowInnerSize';
451
451
  } | {
452
452
  subCommand: 'getStageSize';
453
+ } | {
454
+ subCommand: 'getPlatform';
453
455
  } | {
454
456
  subCommand: 'takeSnapshot';
455
457
  width?: number;
@@ -500,6 +502,18 @@ type VideoCommand = {
500
502
  enabled: boolean;
501
503
  };
502
504
 
505
+ type PlatformInfo = {
506
+ isLinux: boolean;
507
+ isMacOS: boolean;
508
+ isAndroid: boolean;
509
+ isIOS: boolean;
510
+ isWasm: boolean;
511
+ isNative: boolean;
512
+ isDesktop: boolean;
513
+ isMobile: boolean;
514
+ isWeb: boolean;
515
+ };
516
+
503
517
  interface MoyuEvent<T extends Record<string, unknown> = Record<string, unknown>> {
504
518
  name: string;
505
519
  body: T;
@@ -1026,6 +1040,7 @@ declare function getStageSize(): {
1026
1040
  height: number;
1027
1041
  scaleFactor: number;
1028
1042
  };
1043
+ declare function getPlatform(): PlatformInfo;
1029
1044
  type MakeNullOptional<T> = T extends unknown ? {
1030
1045
  [K in keyof T as null extends T[K] ? never : K]: T[K];
1031
1046
  } & {
@@ -1037,4 +1052,4 @@ type _Command = AudioCommand | EditableCommand | TextCommand | GamepadCommand |
1037
1052
  type Command = MakeNullOptional<_Command>;
1038
1053
  type MaybePromise = any;
1039
1054
 
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 };
1055
+ export { type ShaderTimeControl 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 PlatformInfo as R, type ShaderDirection as S, type TouchEvent as T, type RetainMode as U, type ScenarioCommand as V, type WheelEvent as W, type ShaderCommand as X, type ShaderParam as Y, type ShaderParamType as Z, type ShaderSource as _, type MaybePromise as a, type SteamCommand as a0, type SystemCommand as a1, type TextCommand as a2, type TextLayoutEvent as a3, type TimelinePossibleClip as a4, type TouchEventKind as a5, type Tuple2 as a6, type Tuple3 as a7, type Tuple4 as a8, type VideoCommand as a9, type WheelEventDeltaMode as aa, type WindowState as ab, createBubbleEvent as ac, getPlatform as ad, getStageSize as ae, mergeEvent as af, 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 };
@@ -1,4 +1,4 @@
1
1
  export { Fragment, jsxDEV } from 'react/jsx-dev-runtime';
2
- export { J as JSX } from './jsx-dev-runtime-BasPxDFu.mjs';
2
+ export { J as JSX } from './jsx-dev-runtime-WLUT_h4x.mjs';
3
3
  import 'react/jsx-runtime';
4
4
  import 'react';
@@ -1,4 +1,4 @@
1
1
  export { Fragment, jsxDEV } from 'react/jsx-dev-runtime';
2
- export { J as JSX } from './jsx-dev-runtime-BasPxDFu.js';
2
+ export { J as JSX } from './jsx-dev-runtime-WLUT_h4x.js';
3
3
  import 'react/jsx-runtime';
4
4
  import 'react';
@@ -1,4 +1,4 @@
1
1
  export { Fragment, jsx, jsxs } from 'react/jsx-runtime';
2
- export { J as JSX } from './jsx-dev-runtime-BasPxDFu.mjs';
2
+ export { J as JSX } from './jsx-dev-runtime-WLUT_h4x.mjs';
3
3
  import 'react/jsx-dev-runtime';
4
4
  import 'react';
@@ -1,4 +1,4 @@
1
1
  export { Fragment, jsx, jsxs } from 'react/jsx-runtime';
2
- export { J as JSX } from './jsx-dev-runtime-BasPxDFu.js';
2
+ export { J as JSX } from './jsx-dev-runtime-WLUT_h4x.js';
3
3
  import 'react/jsx-dev-runtime';
4
4
  import 'react';
package/dist/lib.cjs CHANGED
@@ -60,6 +60,7 @@ __export(lib_exports, {
60
60
  fastForwardState: () => fastForwardState,
61
61
  getAppStateAdapter: () => getAppStateAdapter,
62
62
  getNavigator: () => getNavigator,
63
+ getPlatform: () => getPlatform,
63
64
  getSeekingType: () => getSeekingType,
64
65
  getStageSize: () => getStageSize,
65
66
  getUiData: () => getUiData,
@@ -983,6 +984,11 @@ function getStageSize() {
983
984
  });
984
985
  return stageSize;
985
986
  }
987
+ function getPlatform() {
988
+ return executePluginCommand("system", {
989
+ subCommand: "getPlatform"
990
+ });
991
+ }
986
992
  function mergeEvent(handlers, defaultHandler) {
987
993
  return (event) => {
988
994
  if (handlers) {
@@ -1203,20 +1209,28 @@ function createStackNavigator(options) {
1203
1209
  }
1204
1210
  function createStaticNavigation(navigator) {
1205
1211
  return () => {
1206
- const navState = (0, import_valtio2.useSnapshot)(navigator._state);
1207
- const { pages, overlays } = navigator._descriptors;
1208
- const pageDescriptor = pages[navState.currentPage];
1209
- const Page = pageDescriptor?.component || (() => null);
1210
1212
  return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
1211
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(PageParamsContext.Provider, { value: navState.pageParams[navState.currentPage], children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Page, {}) }),
1212
- navState.overlayStack.map((overlay) => {
1213
- const overlayDescriptor = overlays[overlay.type];
1214
- const OverlayComponent = overlayDescriptor?.component || (() => null);
1215
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(OverlayParamsContext.Provider, { value: navState.overlayParams[overlay.id], children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(OverlayComponent, {}) }, overlay.id);
1216
- })
1213
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(CurrentPage, { navigator }),
1214
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(OverlayStack, { navigator })
1217
1215
  ] });
1218
1216
  };
1219
1217
  }
1218
+ function CurrentPage({ navigator }) {
1219
+ const navState = (0, import_valtio2.useSnapshot)(navigator._state);
1220
+ const { currentPage, pageParams } = navState;
1221
+ const pageDescriptor = navigator._descriptors.pages[currentPage];
1222
+ const Page = pageDescriptor?.component || (() => null);
1223
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(PageParamsContext.Provider, { value: pageParams[currentPage], children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Page, {}) });
1224
+ }
1225
+ function OverlayStack({ navigator }) {
1226
+ const navState = (0, import_valtio2.useSnapshot)(navigator._state);
1227
+ const { overlays } = navigator._descriptors;
1228
+ return navState.overlayStack.map((overlay) => {
1229
+ const overlayDescriptor = overlays[overlay.type];
1230
+ const OverlayComponent = overlayDescriptor?.component || (() => null);
1231
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(OverlayParamsContext.Provider, { value: navState.overlayParams[overlay.id], children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(OverlayComponent, {}) }, overlay.id);
1232
+ });
1233
+ }
1220
1234
  function getNavigator() {
1221
1235
  if (!globalNavigator) {
1222
1236
  throw new Error("Navigator not initialized. Call createStackNavigator first.");
package/dist/lib.d.mts CHANGED
@@ -1,7 +1,7 @@
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 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';
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-WLUT_h4x.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 PlatformInfo, U as RetainMode, V as ScenarioCommand, X as ShaderCommand, Y as ShaderParam, Z as ShaderParamType, _ as ShaderSource, $ as ShaderTimeControl, a0 as SteamCommand, a1 as SystemCommand, a2 as TextCommand, a3 as TextLayoutEvent, a4 as TimelinePossibleClip, a5 as TouchEventKind, a6 as Tuple2, a7 as Tuple3, a8 as Tuple4, a9 as VideoCommand, aa as WheelEventDeltaMode, ab as WindowState, ac as createBubbleEvent, ad as getPlatform, ae as getStageSize, af as mergeEvent } from './jsx-dev-runtime-WLUT_h4x.mjs';
5
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';
package/dist/lib.d.ts CHANGED
@@ -1,7 +1,7 @@
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 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';
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-WLUT_h4x.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 PlatformInfo, U as RetainMode, V as ScenarioCommand, X as ShaderCommand, Y as ShaderParam, Z as ShaderParamType, _ as ShaderSource, $ as ShaderTimeControl, a0 as SteamCommand, a1 as SystemCommand, a2 as TextCommand, a3 as TextLayoutEvent, a4 as TimelinePossibleClip, a5 as TouchEventKind, a6 as Tuple2, a7 as Tuple3, a8 as Tuple4, a9 as VideoCommand, aa as WheelEventDeltaMode, ab as WindowState, ac as createBubbleEvent, ad as getPlatform, ae as getStageSize, af as mergeEvent } from './jsx-dev-runtime-WLUT_h4x.js';
5
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';
package/dist/lib.mjs CHANGED
@@ -48,6 +48,7 @@ __export(lib_exports, {
48
48
  fastForwardState: () => fastForwardState,
49
49
  getAppStateAdapter: () => getAppStateAdapter,
50
50
  getNavigator: () => getNavigator,
51
+ getPlatform: () => getPlatform,
51
52
  getSeekingType: () => getSeekingType,
52
53
  getStageSize: () => getStageSize,
53
54
  getUiData: () => getUiData,
@@ -977,6 +978,11 @@ function getStageSize() {
977
978
  });
978
979
  return stageSize;
979
980
  }
981
+ function getPlatform() {
982
+ return executePluginCommand("system", {
983
+ subCommand: "getPlatform"
984
+ });
985
+ }
980
986
  function mergeEvent(handlers, defaultHandler) {
981
987
  return (event) => {
982
988
  if (handlers) {
@@ -1197,20 +1203,28 @@ function createStackNavigator(options) {
1197
1203
  }
1198
1204
  function createStaticNavigation(navigator) {
1199
1205
  return () => {
1200
- const navState = useSnapshot2(navigator._state);
1201
- const { pages, overlays } = navigator._descriptors;
1202
- const pageDescriptor = pages[navState.currentPage];
1203
- const Page = pageDescriptor?.component || (() => null);
1204
1206
  return /* @__PURE__ */ jsxs(Fragment, { children: [
1205
- /* @__PURE__ */ jsx(PageParamsContext.Provider, { value: navState.pageParams[navState.currentPage], children: /* @__PURE__ */ jsx(Page, {}) }),
1206
- navState.overlayStack.map((overlay) => {
1207
- const overlayDescriptor = overlays[overlay.type];
1208
- const OverlayComponent = overlayDescriptor?.component || (() => null);
1209
- return /* @__PURE__ */ jsx(OverlayParamsContext.Provider, { value: navState.overlayParams[overlay.id], children: /* @__PURE__ */ jsx(OverlayComponent, {}) }, overlay.id);
1210
- })
1207
+ /* @__PURE__ */ jsx(CurrentPage, { navigator }),
1208
+ /* @__PURE__ */ jsx(OverlayStack, { navigator })
1211
1209
  ] });
1212
1210
  };
1213
1211
  }
1212
+ function CurrentPage({ navigator }) {
1213
+ const navState = useSnapshot2(navigator._state);
1214
+ const { currentPage, pageParams } = navState;
1215
+ const pageDescriptor = navigator._descriptors.pages[currentPage];
1216
+ const Page = pageDescriptor?.component || (() => null);
1217
+ return /* @__PURE__ */ jsx(PageParamsContext.Provider, { value: pageParams[currentPage], children: /* @__PURE__ */ jsx(Page, {}) });
1218
+ }
1219
+ function OverlayStack({ navigator }) {
1220
+ const navState = useSnapshot2(navigator._state);
1221
+ const { overlays } = navigator._descriptors;
1222
+ return navState.overlayStack.map((overlay) => {
1223
+ const overlayDescriptor = overlays[overlay.type];
1224
+ const OverlayComponent = overlayDescriptor?.component || (() => null);
1225
+ return /* @__PURE__ */ jsx(OverlayParamsContext.Provider, { value: navState.overlayParams[overlay.id], children: /* @__PURE__ */ jsx(OverlayComponent, {}) }, overlay.id);
1226
+ });
1227
+ }
1214
1228
  function getNavigator() {
1215
1229
  if (!globalNavigator) {
1216
1230
  throw new Error("Navigator not initialized. Call createStackNavigator first.");
@@ -4109,6 +4123,7 @@ export {
4109
4123
  fastForwardState,
4110
4124
  getAppStateAdapter,
4111
4125
  getNavigator,
4126
+ getPlatform,
4112
4127
  getSeekingType,
4113
4128
  getStageSize,
4114
4129
  getUiData,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@momoyu-ink/kit",
3
- "version": "0.11.0",
3
+ "version": "0.11.2",
4
4
  "description": "Software Development Kit of Moyu Visual Novel Engine",
5
5
  "main": "dist/lib.cjs",
6
6
  "module": "dist/lib.mjs",