From b5a71ccdc633367d6bf7a22222217c61173c9b04 Mon Sep 17 00:00:00 2001 From: cha0s Date: Thu, 24 Mar 2022 01:56:22 -0500 Subject: [PATCH] refactor: aliases ^_^ --- packages/graphics/src/components/stage/index.jsx | 2 +- packages/physics/src/resources/decorators/room.js | 7 +++---- packages/physics/src/resources/decorators/tiles.js | 3 +-- .../resource-persea/src/components/json-tabs/index.jsx | 5 ++--- packages/resource-persea/src/components/resource/index.jsx | 3 +-- .../resource-persea/src/controllers/binary/component.jsx | 2 +- .../resource-persea/src/controllers/json/component.jsx | 5 ++--- .../timing-persea/src/controllers/animation/component.jsx | 3 +-- packages/timing-persea/src/traits/animated/animation.jsx | 3 +-- packages/timing/src/resources/decorators/entity.js | 4 ++-- 10 files changed, 15 insertions(+), 22 deletions(-) diff --git a/packages/graphics/src/components/stage/index.jsx b/packages/graphics/src/components/stage/index.jsx index 8eba27e..84eabb0 100644 --- a/packages/graphics/src/components/stage/index.jsx +++ b/packages/graphics/src/components/stage/index.jsx @@ -1,3 +1,4 @@ +import Renderer from '@avocado/graphics/renderer'; import {Vector} from '@avocado/math'; import { forwardRef, @@ -12,7 +13,6 @@ import { import K from 'kefir'; import Slider from 'rc-slider'; -import Renderer from '../../renderer'; import './index.css'; const marks = { diff --git a/packages/physics/src/resources/decorators/room.js b/packages/physics/src/resources/decorators/room.js index 65b926e..ad3bd6d 100644 --- a/packages/physics/src/resources/decorators/room.js +++ b/packages/physics/src/resources/decorators/room.js @@ -1,7 +1,6 @@ import {Vector} from '@avocado/math'; - -import RectangleShape from '../../shape/rectangle'; -import World from '../../matter/world'; +import RectangleShape from '@avocado/physics/shape/rectangle'; +import World from '@avocado/physics/matter/world'; const ROOM_BOUND_SIZE = 64; const HALF_ROOM_BOUND_SIZE = ROOM_BOUND_SIZE / 2; @@ -76,7 +75,7 @@ export default (Room) => class PhysicsRoom extends Room { }; if (module.hot) { - module.hot.accept('../../matter/world', () => { + module.hot.accept('@avocado/physics/matter/world', () => { const it = rooms.values(); for (let value = it.next(); value.done !== true; value = it.next()) { const {value: room} = value; diff --git a/packages/physics/src/resources/decorators/tiles.js b/packages/physics/src/resources/decorators/tiles.js index b10e4fc..44f99ec 100644 --- a/packages/physics/src/resources/decorators/tiles.js +++ b/packages/physics/src/resources/decorators/tiles.js @@ -2,8 +2,7 @@ import { Vector, Vertice, } from '@avocado/math'; - -import PolygonShape from '../../shape/polygon'; +import PolygonShape from '@avocado/physics/shape/polygon'; export default (Tiles) => class PhysicsTiles extends Tiles { diff --git a/packages/resource-persea/src/components/json-tabs/index.jsx b/packages/resource-persea/src/components/json-tabs/index.jsx index 09ea97c..8e210d4 100644 --- a/packages/resource-persea/src/components/json-tabs/index.jsx +++ b/packages/resource-persea/src/components/json-tabs/index.jsx @@ -1,5 +1,3 @@ -import './index.scss'; - import {join} from 'path'; import { @@ -8,6 +6,7 @@ import { TabList, TabPanel, } from '@avocado/react'; +import useJsonPatcher from '@avocado/resource-persea/hooks/use-json-patcher'; import { PropTypes, React, @@ -17,7 +16,7 @@ import { useState, } from '@flecks/react'; -import useJsonPatcher from '../../hooks/use-json-patcher'; +import './index.scss'; const JsonTabs = ({ createPanel, diff --git a/packages/resource-persea/src/components/resource/index.jsx b/packages/resource-persea/src/components/resource/index.jsx index 5cd93fe..59e3327 100644 --- a/packages/resource-persea/src/components/resource/index.jsx +++ b/packages/resource-persea/src/components/resource/index.jsx @@ -1,10 +1,9 @@ +import useResourceController from '@avocado/resource-persea/hooks/use-resource-controller'; import { PropTypes, React, } from '@flecks/react'; -import useResourceController from '../../hooks/use-resource-controller'; - import styles from './index.module.scss'; const Resource = ({resource, uri}) => { diff --git a/packages/resource-persea/src/controllers/binary/component.jsx b/packages/resource-persea/src/controllers/binary/component.jsx index a5dfbfa..35464f8 100644 --- a/packages/resource-persea/src/controllers/binary/component.jsx +++ b/packages/resource-persea/src/controllers/binary/component.jsx @@ -1,10 +1,10 @@ import './component.scss'; +import {controller as controllerPropTypes} from '@avocado/resource-persea/prop-types'; import {React} from '@flecks/react'; import HexEditor from 'react-hex-editor'; import oneDarkPro from 'react-hex-editor/themes/oneDarkPro'; -import {controller as controllerPropTypes} from '../../prop-types'; import toBuffer from './to-buffer'; const Binary = ({resource}) => { diff --git a/packages/resource-persea/src/controllers/json/component.jsx b/packages/resource-persea/src/controllers/json/component.jsx index 120319c..4c565b9 100644 --- a/packages/resource-persea/src/controllers/json/component.jsx +++ b/packages/resource-persea/src/controllers/json/component.jsx @@ -3,12 +3,11 @@ import './component.scss'; import {join} from 'path'; import {Json as JsonComponent} from '@avocado/react'; +import useJsonPatcher from '@avocado/resource-persea/hooks/use-json-patcher'; +import {controller as controllerPropTypes} from '@avocado/resource-persea/prop-types'; import {React} from '@flecks/react'; import {compare} from 'fast-json-patch'; -import useJsonPatcher from '../../hooks/use-json-patcher'; -import {controller as controllerPropTypes} from '../../prop-types'; - const Json = ({path, resource}) => { const patch = useJsonPatcher(); return ( diff --git a/packages/timing-persea/src/controllers/animation/component.jsx b/packages/timing-persea/src/controllers/animation/component.jsx index fbf0cd7..ef49fb9 100644 --- a/packages/timing-persea/src/controllers/animation/component.jsx +++ b/packages/timing-persea/src/controllers/animation/component.jsx @@ -12,8 +12,7 @@ import { vectorPropType, } from '@avocado/math-persea'; import {useJsonPatcher} from '@avocado/resource-persea'; - -import AnimationVisualization from '../../components/animation-visualization'; +import AnimationVisualization from '@avocado/timing-persea/components/animation-visualization'; const Animation = ({ resource, diff --git a/packages/timing-persea/src/traits/animated/animation.jsx b/packages/timing-persea/src/traits/animated/animation.jsx index 1d8874b..53f64df 100644 --- a/packages/timing-persea/src/traits/animated/animation.jsx +++ b/packages/timing-persea/src/traits/animated/animation.jsx @@ -10,6 +10,7 @@ import { useFullJson, } from '@avocado/resource-persea'; import {AnimationView} from '@avocado/timing'; +import AnimationVisualization from '@avocado/timing-persea/components/animation-visualization'; import { PropTypes, React, @@ -18,8 +19,6 @@ import { useState, } from '@flecks/react'; -import AnimationVisualization from '../../components/animation-visualization'; - const Animation = ({ json, }) => { diff --git a/packages/timing/src/resources/decorators/entity.js b/packages/timing/src/resources/decorators/entity.js index ac290a5..e07c185 100644 --- a/packages/timing/src/resources/decorators/entity.js +++ b/packages/timing/src/resources/decorators/entity.js @@ -1,7 +1,7 @@ import {TickingPromise} from '@avocado/core'; -import LfoResult from '../../lfo/result'; -import TransitionResult from '../../transition/result'; +import LfoResult from '@avocado/timing/lfo/result'; +import TransitionResult from '@avocado/timing/transition/result'; export default (Entity) => class EvolvingEntity extends Entity {