fix: server/client
This commit is contained in:
parent
e3c70abda3
commit
21d85e4063
|
@ -1,18 +1,26 @@
|
|||
import {connectRouter, routerMiddleware} from 'connected-react-router';
|
||||
|
||||
import {selfEntity} from './state';
|
||||
|
||||
import App from './components/app';
|
||||
import history from './components/app/history';
|
||||
import ValentUiContext from './components/valent-ui/context';
|
||||
import Ui, {Context} from './components/valent-ui';
|
||||
|
||||
export {Ui};
|
||||
|
||||
export * from './hooks';
|
||||
export * from './state';
|
||||
|
||||
export default {
|
||||
hooks: {
|
||||
'@latus/react/components': () => App,
|
||||
'@latus/react/providers': async (latus) => [
|
||||
ValentUiContext.Provider,
|
||||
Context.Provider,
|
||||
{value: latus.get('@humus/core.resolution')},
|
||||
],
|
||||
'@latus/react/components': () => App,
|
||||
'@latus/redux/slices': () => ({
|
||||
router: connectRouter(history),
|
||||
selfEntity,
|
||||
}),
|
||||
'@latus/redux/store': (options) => {
|
||||
options.middleware.push(routerMiddleware(history));
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
import '@humus/scss/reset.scss';
|
||||
import './index.scss';
|
||||
|
||||
import {hot} from 'react-hot-loader';
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
@import '@humus/scss/colors.scss';
|
||||
@import '~@humus/scss/colors.scss';
|
||||
@import '~@humus/scss/reset.scss';
|
||||
|
||||
html {
|
||||
background-color: #212121;
|
||||
|
|
|
@ -10,6 +10,8 @@ import {
|
|||
|
||||
import Context from './context';
|
||||
|
||||
export {Context};
|
||||
|
||||
const ValentUi = ({children}) => {
|
||||
const [width, height] = useContext(Context);
|
||||
const $ui = useRef();
|
||||
|
|
|
@ -1,12 +1,5 @@
|
|||
import {gatherWithLatus} from '@latus/core';
|
||||
|
||||
import {selfEntity} from './state';
|
||||
|
||||
export {default as Ui} from './components/valent-ui';
|
||||
|
||||
export * from './hooks';
|
||||
export * from './state';
|
||||
|
||||
export default {
|
||||
hooks: {
|
||||
'@avocado/traits/traits': gatherWithLatus(
|
||||
|
@ -15,9 +8,6 @@ export default {
|
|||
'@latus/core/config': () => ({
|
||||
resolution: [1600, 900],
|
||||
}),
|
||||
'@latus/redux/slices': () => ({
|
||||
selfEntity,
|
||||
}),
|
||||
'@latus/socket/packets': gatherWithLatus(
|
||||
require.context('./packets', false, /\.js$/),
|
||||
),
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import {Ui, useIsNative} from '@humus/core';
|
||||
import {Ui, useIsNative} from '@humus/core/client';
|
||||
import {React} from '@latus/react';
|
||||
import {
|
||||
Redirect,
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import './index.scss';
|
||||
|
||||
import {useIsNative} from '@humus/core';
|
||||
import {useIsNative} from '@humus/core/client';
|
||||
import {useSelector} from '@latus/redux';
|
||||
import {PropTypes, React} from '@latus/react';
|
||||
import {
|
||||
|
|
|
@ -10,7 +10,7 @@ import {Container, Renderer, Stage} from '@avocado/graphics';
|
|||
import {Vector} from '@avocado/math';
|
||||
import {createLoop, destroyLoop} from '@avocado/timing';
|
||||
import {RoomView} from '@avocado/topdown';
|
||||
import {useRoom, useSelfEntity} from '@humus/core';
|
||||
import {useRoom, useSelfEntity} from '@humus/core/client';
|
||||
|
||||
const renderer = new Renderer();
|
||||
const ticker = () => {};
|
||||
|
|
|
@ -7,7 +7,7 @@ import {
|
|||
setSelfEntity,
|
||||
useRoom,
|
||||
useSelfEntity,
|
||||
} from '@humus/core';
|
||||
} from '@humus/core/client';
|
||||
import {
|
||||
React,
|
||||
useEffect,
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import './index.scss';
|
||||
|
||||
import {Ui} from '@humus/core';
|
||||
import {Ui} from '@humus/core/client';
|
||||
import {React} from '@latus/react';
|
||||
import {
|
||||
Link,
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import './index.scss';
|
||||
|
||||
import {Ui} from '@humus/core';
|
||||
import {Ui} from '@humus/core/client';
|
||||
import {React} from '@latus/react';
|
||||
import {
|
||||
Link,
|
||||
|
|
Loading…
Reference in New Issue
Block a user