mirror of
https://github.com/motajs/template.git
synced 2026-11-01 06:04:30 +08:00
refactor: 将 system-action 与 system-ui 合并至 system
This commit is contained in:
1 parent
744a21e042
commit
03cf6a8917
64 files changed
+82
-174
No files matched your search
@@ -1,5 +1,5 @@
|
||||
import { KeyCode } from '@motajs/client-base';
|
||||
import { gameKey, HotkeyJSON } from '@motajs/system-action';
|
||||
import { gameKey, HotkeyJSON } from '@motajs/system';
|
||||
import { GameStorage } from '@motajs/legacy-system';
|
||||
|
||||
export const mainScope = Symbol.for('@key_main');
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { KeyCode } from '@motajs/client-base';
|
||||
import { Hotkey, HotkeyData } from '@motajs/system-action';
|
||||
import { Hotkey, HotkeyData } from '@motajs/system';
|
||||
import { HeroMover, IMoveController } from '@user/data-state';
|
||||
import { Ticker } from 'mutate-animate';
|
||||
import { mainScope } from './hotkey';
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { gameKey } from '@motajs/system-action';
|
||||
import { gameKey } from '@motajs/system';
|
||||
import { POP_BOX_WIDTH, CENTER_LOC, FULL_LOC } from './shared';
|
||||
import {
|
||||
saveSave,
|
||||
|
||||
@@ -4,7 +4,7 @@ import { Background, Selection } from './misc';
|
||||
import { TextContent, TextContentProps } from './textbox';
|
||||
import { TextAlign } from './textboxTyper';
|
||||
import { Page, PageExpose } from './page';
|
||||
import { GameUI, IUIMountable, SetupComponentOptions } from '@motajs/system-ui';
|
||||
import { GameUI, IUIMountable, SetupComponentOptions } from '@motajs/system';
|
||||
import { useKey } from '../use';
|
||||
import { sleep } from 'mutate-animate';
|
||||
import { DefaultProps } from '@motajs/render-vue';
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { DefaultProps } from '@motajs/render-vue';
|
||||
import { SetupComponentOptions } from '@motajs/system-ui';
|
||||
import { SetupComponentOptions } from '@motajs/system';
|
||||
import { clamp, isNil } from 'lodash-es';
|
||||
import { computed, defineComponent, onMounted, ref, watch } from 'vue';
|
||||
import { Scroll, ScrollExpose } from './scroll';
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { ElementLocator } from '@motajs/render';
|
||||
import { DefaultProps, GraphicPropsBase } from '@motajs/render-vue';
|
||||
import { SetupComponentOptions } from '@motajs/system-ui';
|
||||
import { SetupComponentOptions } from '@motajs/system';
|
||||
import {
|
||||
computed,
|
||||
defineComponent,
|
||||
|
||||
@@ -13,7 +13,7 @@ import {
|
||||
import { transitionedColor, useKey } from '../use';
|
||||
import { linear } from 'mutate-animate';
|
||||
import { Background, Selection } from './misc';
|
||||
import { GameUI, IUIMountable, SetupComponentOptions } from '@motajs/system-ui';
|
||||
import { GameUI, IUIMountable, SetupComponentOptions } from '@motajs/system';
|
||||
import { KeyCode } from '@motajs/client-base';
|
||||
|
||||
export interface InputProps extends DefaultProps, Partial<TextContentProps> {
|
||||
|
||||
@@ -2,7 +2,7 @@ import { DefaultProps } from '@motajs/render-vue';
|
||||
import { computed, defineComponent, ref, SlotsType, VNode } from 'vue';
|
||||
import { Selection } from './misc';
|
||||
import { ElementLocator, Font } from '@motajs/render';
|
||||
import { SetupComponentOptions } from '@motajs/system-ui';
|
||||
import { SetupComponentOptions } from '@motajs/system';
|
||||
import { Scroll } from './scroll';
|
||||
|
||||
export interface ListProps extends DefaultProps {
|
||||
|
||||
@@ -6,7 +6,7 @@ import { Scroll, ScrollExpose, ScrollProps } from './scroll';
|
||||
import { transitioned } from '../use';
|
||||
import { hyper } from 'mutate-animate';
|
||||
import { logger } from '@motajs/common';
|
||||
import { GameUI, IUIMountable, SetupComponentOptions } from '@motajs/system-ui';
|
||||
import { GameUI, IUIMountable, SetupComponentOptions } from '@motajs/system';
|
||||
import { clamp } from 'lodash-es';
|
||||
|
||||
interface ProgressProps extends DefaultProps {
|
||||
|
||||
@@ -10,7 +10,7 @@ import {
|
||||
} from 'vue';
|
||||
import { clamp, isNil } from 'lodash-es';
|
||||
import { ElementLocator, Font } from '@motajs/render';
|
||||
import { SetupComponentOptions } from '@motajs/system-ui';
|
||||
import { SetupComponentOptions } from '@motajs/system';
|
||||
import { DefaultProps } from '@motajs/render-vue';
|
||||
|
||||
/** 圆角矩形页码距离容器的边框大小,与 pageSize 相乘 */
|
||||
|
||||
@@ -29,7 +29,7 @@ import {
|
||||
import { hyper, linear, Transition } from 'mutate-animate';
|
||||
import { clamp } from 'lodash-es';
|
||||
import { transitioned } from '../use';
|
||||
import { SetupComponentOptions } from '@motajs/system-ui';
|
||||
import { SetupComponentOptions } from '@motajs/system';
|
||||
import { DefaultProps } from '@motajs/render-vue';
|
||||
|
||||
export const enum ScrollDirection {
|
||||
|
||||
@@ -29,7 +29,7 @@ import {
|
||||
WordBreak,
|
||||
TextAlign
|
||||
} from './textboxTyper';
|
||||
import { SetupComponentOptions } from '@motajs/system-ui';
|
||||
import { SetupComponentOptions } from '@motajs/system';
|
||||
import { texture } from '../elements';
|
||||
import { DefaultProps } from '@motajs/render-vue';
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { ElementLocator, MotaOffscreenCanvas2D, Sprite } from '@motajs/render';
|
||||
import { SpriteProps } from '@motajs/render-vue';
|
||||
import { defineComponent, ref, watch } from 'vue';
|
||||
import { SetupComponentOptions } from '@motajs/system-ui';
|
||||
import { SetupComponentOptions } from '@motajs/system';
|
||||
|
||||
export interface ThumbnailProps extends SpriteProps {
|
||||
/** 缩略图的位置 */
|
||||
|
||||
@@ -5,7 +5,7 @@ import { transitioned } from '../use';
|
||||
import { hyper } from 'mutate-animate';
|
||||
import { debounce } from 'lodash-es';
|
||||
import { texture } from '../elements';
|
||||
import { SetupComponentOptions } from '@motajs/system-ui';
|
||||
import { SetupComponentOptions } from '@motajs/system';
|
||||
import { DefaultProps } from '@motajs/render-vue';
|
||||
|
||||
export interface TipProps extends DefaultProps {
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
import { UIController } from '@motajs/system-ui';
|
||||
import { UIController } from '@motajs/system';
|
||||
|
||||
export const sceneController = new UIController('main-scene');
|
||||
@@ -4,7 +4,7 @@ import {
|
||||
SetupComponentOptions,
|
||||
UIComponentProps,
|
||||
UIController
|
||||
} from '@motajs/system-ui';
|
||||
} from '@motajs/system';
|
||||
import { defineComponent } from 'vue';
|
||||
import { MAIN_HEIGHT, MAIN_WIDTH } from '../shared';
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@ import {
|
||||
// import { WeatherController } from '../weather';
|
||||
import { defineComponent, onUnmounted, reactive, ref } from 'vue';
|
||||
import { Textbox, Tip } from '../components';
|
||||
import { GameUI } from '@motajs/system-ui';
|
||||
import { GameUI } from '@motajs/system';
|
||||
import {
|
||||
ENABLE_RIGHT_STATUS_BAR,
|
||||
MAIN_HEIGHT,
|
||||
|
||||
@@ -5,7 +5,7 @@ import {
|
||||
IUIMountable,
|
||||
SetupComponentOptions,
|
||||
UIComponentProps
|
||||
} from '@motajs/system-ui';
|
||||
} from '@motajs/system';
|
||||
import {
|
||||
defineComponent,
|
||||
ref,
|
||||
|
||||
@@ -4,7 +4,7 @@ import {
|
||||
IUIMountable,
|
||||
SetupComponentOptions,
|
||||
UIComponentProps
|
||||
} from '@motajs/system-ui';
|
||||
} from '@motajs/system';
|
||||
import { defineComponent } from 'vue';
|
||||
import {
|
||||
ChoiceItem,
|
||||
@@ -15,8 +15,7 @@ import {
|
||||
waitbox
|
||||
} from '../components';
|
||||
import { mainUi } from '@motajs/legacy-ui';
|
||||
import { gameKey } from '@motajs/system-action';
|
||||
import { generateKeyboardEvent } from '@motajs/system-action';
|
||||
import { gameKey, generateKeyboardEvent } from '@motajs/system';
|
||||
import { getVitualKeyOnce } from '@motajs/legacy-ui';
|
||||
import { getAllSavesData, getSaveData, syncFromServer } from '../utils';
|
||||
import { getInput } from '../components';
|
||||
|
||||
@@ -3,7 +3,7 @@ import {
|
||||
IUIMountable,
|
||||
SetupComponentOptions,
|
||||
UIComponentProps
|
||||
} from '@motajs/system-ui';
|
||||
} from '@motajs/system';
|
||||
import { defineComponent } from 'vue';
|
||||
import { waitbox, ListPage, TextContent } from '../components';
|
||||
import { DefaultProps } from '@motajs/render-vue';
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { GameUI, SetupComponentOptions } from '@motajs/system-ui';
|
||||
import { GameUI, SetupComponentOptions } from '@motajs/system';
|
||||
import { computed, ComputedRef, defineComponent, shallowReactive } from 'vue';
|
||||
import { TextContent } from '../components';
|
||||
import { ElementLocator, Font, SizedCanvasImageSource } from '@motajs/render';
|
||||
|
||||
@@ -3,7 +3,7 @@ import {
|
||||
GameUI,
|
||||
SetupComponentOptions,
|
||||
UIComponentProps
|
||||
} from '@motajs/system-ui';
|
||||
} from '@motajs/system';
|
||||
import { defineComponent, nextTick, onMounted, ref } from 'vue';
|
||||
import {
|
||||
BUTTONS_HEIGHT,
|
||||
|
||||
@@ -12,14 +12,13 @@ import {
|
||||
ViewMapIcon
|
||||
} from '../components/icons';
|
||||
import { getVitualKeyOnce } from '@motajs/legacy-ui';
|
||||
import { gameKey } from '@motajs/system-action';
|
||||
import { generateKeyboardEvent } from '@motajs/system-action';
|
||||
import { gameKey, generateKeyboardEvent } from '@motajs/system';
|
||||
import { transitioned } from '../use';
|
||||
import { linear } from 'mutate-animate';
|
||||
import { KeyCode } from '@motajs/client-base';
|
||||
import { Progress } from '../components/misc';
|
||||
import { generateBinary } from '@motajs/legacy-common';
|
||||
import { SetupComponentOptions } from '@motajs/system-ui';
|
||||
import { SetupComponentOptions } from '@motajs/system';
|
||||
import { saveSave, saveLoad } from './save';
|
||||
import { mainUIController } from './controller';
|
||||
import { MAIN_HEIGHT, FULL_LOC, POP_BOX_WIDTH, CENTER_LOC } from '../shared';
|
||||
|
||||
@@ -12,7 +12,7 @@ import {
|
||||
IUIMountable,
|
||||
SetupComponentOptions,
|
||||
UIComponentProps
|
||||
} from '@motajs/system-ui';
|
||||
} from '@motajs/system';
|
||||
import {
|
||||
computed,
|
||||
defineComponent,
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { Hotkey, gameKey } from '@motajs/system-action';
|
||||
import { Hotkey, gameKey } from '@motajs/system';
|
||||
import { loading } from '@user/data-base';
|
||||
import { TimingFn, Transition } from 'mutate-animate';
|
||||
import {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { compressToBase64, decompressFromBase64 } from 'lz-string';
|
||||
import { getConfirm, waitbox } from '../components';
|
||||
import { IUIMountable } from '@motajs/system-ui';
|
||||
import { IUIMountable } from '@motajs/system';
|
||||
import { SyncSaveFromServerResponse } from '@motajs/client-base';
|
||||
import { CENTER_LOC, POP_BOX_WIDTH } from '../shared';
|
||||
|
||||
|
||||
Reference in new issue
Block a user