Skip to content

Commit

Permalink
Revert "Set import paths correctly for PCUI React (#274)" (#275)
Browse files Browse the repository at this point in the history
This reverts commit 6ac3444.
  • Loading branch information
willeastcott authored Dec 19, 2023
1 parent 9d449b1 commit 5bc3bdd
Show file tree
Hide file tree
Showing 11 changed files with 12 additions and 10 deletions.
2 changes: 1 addition & 1 deletion src/ui/components/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {
SliderInput,
VectorInput,
NumericInput
} from '@playcanvas/pcui/react';
} from 'pcui';
import { Option } from '../../types';

export const Detail = (props: { label: string, value:string|number}) => {
Expand Down
2 changes: 1 addition & 1 deletion src/ui/errors.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react';
import { InfoBox } from '@playcanvas/pcui/react';
import { InfoBox } from 'pcui';
import { ObserverData } from '../types';

// InfoBox that shows an error
Expand Down
2 changes: 1 addition & 1 deletion src/ui/index.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Observer } from '@playcanvas/observer';
import React from 'react';
import ReactDOM from 'react-dom';
import { Container, Spinner } from '@playcanvas/pcui/react';
import { Container, Spinner } from 'pcui';

import { getAssetPath } from '../helpers';
import { ObserverData } from '../types';
Expand Down
2 changes: 1 addition & 1 deletion src/ui/left-panel/index.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react';
import { Panel, Container, TreeViewItem, TreeView } from '@playcanvas/pcui/react';
import { Panel, Container, TreeViewItem, TreeView } from 'pcui';
import { HierarchyNode, SetProperty, ObserverData } from '../../types';

import { Detail, Select, Toggle, Vector } from '../components';
Expand Down
2 changes: 1 addition & 1 deletion src/ui/left-panel/morph-target-panel.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from 'react';
import VisibilitySensor from 'react-visibility-sensor';
import { MorphTargetData, SetProperty, ObserverData } from '../../types';
import { Panel } from '@playcanvas/pcui/react';
import { Panel } from 'pcui';
import { MorphSlider } from '../components';

class MorphTargetPanel extends React.Component <{ morphs: ObserverData['morphs'], progress: number, setProperty: SetProperty }> {
Expand Down
2 changes: 1 addition & 1 deletion src/ui/load-controls.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React, { useRef, useState } from 'react';
import { Container, Label, Button, TextInput } from '@playcanvas/pcui/react';
import { Container, Label, Button, TextInput } from 'pcui';
import { getAssetPath } from '../helpers';

import { File, SetProperty } from '../types';
Expand Down
2 changes: 1 addition & 1 deletion src/ui/popup-panel/animation-controls.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react';
import { Button } from '@playcanvas/pcui/react';
import { Button } from 'pcui';
import { SetProperty, ObserverData } from '../../types';

import { NakedSelect, NakedSlider } from '../components';
Expand Down
3 changes: 2 additions & 1 deletion src/ui/popup-panel/index.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import React from 'react';
import { Button } from '@playcanvas/pcui/react';
import { Observer } from '@playcanvas/observer';
import { Button } from 'pcui';
import { SetProperty, ObserverData } from '../../types';
import AnimationControls from './animation-controls';
import { CameraPanel, SkyboxPanel, LightPanel, DebugPanel, ViewPanel } from './panels';
Expand Down
2 changes: 1 addition & 1 deletion src/ui/popup-panel/panels.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react';
import { Container, Button, Label, TextInput } from '@playcanvas/pcui/react';
import { Container, Button, Label, TextInput } from 'pcui';
import { SetProperty, ObserverData } from '../../types';
import { extract } from '../../helpers';
// @ts-ignore no type defs included
Expand Down
2 changes: 1 addition & 1 deletion src/ui/selected-node.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react';
import { Container } from '@playcanvas/pcui/react';
import { Container } from 'pcui';
import { SetProperty, ObserverData } from '../types';

import { Vector, Detail } from './components';
Expand Down
1 change: 1 addition & 0 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
"noEmit": true,
"baseUrl": ".",
"paths": {
"pcui": ["node_modules/@playcanvas/pcui"],
"playcanvas-extras": ["node_modules/playcanvas/build/playcanvas-extras.mjs"]
}
},
Expand Down

0 comments on commit 5bc3bdd

Please sign in to comment.