diff --git a/code/modules/client/preferences/README.md b/code/modules/client/preferences/README.md index 674f234d48e..a653039f1b8 100644 --- a/code/modules/client/preferences/README.md +++ b/code/modules/client/preferences/README.md @@ -419,7 +419,7 @@ In the `.ts` file you created earlier, you must now give the information of your ```ts import { Antagonist, Category } from "../base"; -import { multiline } from "common/string"; +import { multiline } from "tgui-core/string"; const Changeling: Antagonist = { key: "changeling", // This must be the same as your filename diff --git a/tgui/docs/writing-tests.md b/tgui/docs/writing-tests.md index 633e73bcd1a..dc6299d53d9 100644 --- a/tgui/docs/writing-tests.md +++ b/tgui/docs/writing-tests.md @@ -12,7 +12,7 @@ test('something', () => { Refer to [README](../README.md) to learn how to run tests. -There is an example test in `packages/common/react.spec.ts`. +There is an example test in `packages/tgui-core/react.spec.ts`. You can read more about Jest here: https://jestjs.io/docs/en/getting-started diff --git a/tgui/packages/tgui/interfaces/AmmoWorkbench.jsx b/tgui/packages/tgui/interfaces/AmmoWorkbench.jsx index b815cc212da..3f21e12880a 100644 --- a/tgui/packages/tgui/interfaces/AmmoWorkbench.jsx +++ b/tgui/packages/tgui/interfaces/AmmoWorkbench.jsx @@ -1,5 +1,5 @@ // THIS IS A SKYRAT UI FILE -import { toTitleCase } from 'common/string'; +import { toTitleCase } from 'tgui-core/string'; import { useState } from 'react'; import { useBackend, useSharedState } from '../backend'; diff --git a/tgui/packages/tgui/interfaces/AntagInfoAssaultops.tsx b/tgui/packages/tgui/interfaces/AntagInfoAssaultops.tsx index 9cd4a1f5edc..cebc1c05064 100644 --- a/tgui/packages/tgui/interfaces/AntagInfoAssaultops.tsx +++ b/tgui/packages/tgui/interfaces/AntagInfoAssaultops.tsx @@ -1,8 +1,5 @@ // THIS IS A SKYRAT UI FILE -import { BooleanLike } from 'common/react'; import { useState } from 'react'; - -import { useBackend } from '../backend'; import { Box, Button, @@ -12,7 +9,10 @@ import { Section, Stack, Tabs, -} from '../components'; +} from 'tgui-core/components'; +import { BooleanLike } from 'tgui-core/react'; + +import { useBackend } from '../backend'; import { Window } from '../layouts'; import { Rules } from './AntagInfoRules'; diff --git a/tgui/packages/tgui/interfaces/AntagInfoBloodsucker.tsx b/tgui/packages/tgui/interfaces/AntagInfoBloodsucker.tsx index 13985de99ba..cd02e1322a5 100644 --- a/tgui/packages/tgui/interfaces/AntagInfoBloodsucker.tsx +++ b/tgui/packages/tgui/interfaces/AntagInfoBloodsucker.tsx @@ -1,9 +1,9 @@ -import { BooleanLike } from 'common/react'; import { useState } from 'react'; +import { Box, Button, Image, Section, Stack, Tabs } from 'tgui-core/components'; +import { BooleanLike } from 'tgui-core/react'; import { resolveAsset } from '../assets'; import { useBackend } from '../backend'; -import { Box, Button, Image, Section, Stack, Tabs } from 'tgui-core/components'; import { Window } from '../layouts'; import { Objective } from './common/Objectives'; import { PowerDetails } from './PowerInfo'; diff --git a/tgui/packages/tgui/interfaces/AntagInfoClock.tsx b/tgui/packages/tgui/interfaces/AntagInfoClock.tsx index 78911f8462c..757cb999fab 100644 --- a/tgui/packages/tgui/interfaces/AntagInfoClock.tsx +++ b/tgui/packages/tgui/interfaces/AntagInfoClock.tsx @@ -1,6 +1,7 @@ // THIS IS A SKYRAT UI FILE +import { Icon, Section, Stack } from 'tgui-core/components'; + import { useBackend } from '../backend'; -import { Icon, Section, Stack } from '../components'; import { Window } from '../layouts'; import { Rules } from './AntagInfoRules'; diff --git a/tgui/packages/tgui/interfaces/AntagInfoGhoul.tsx b/tgui/packages/tgui/interfaces/AntagInfoGhoul.tsx index b403dc98fca..b653d9ef101 100644 --- a/tgui/packages/tgui/interfaces/AntagInfoGhoul.tsx +++ b/tgui/packages/tgui/interfaces/AntagInfoGhoul.tsx @@ -1,5 +1,6 @@ +import { Section, Stack } from 'tgui-core/components'; + import { useBackend } from '../backend'; -import { Section, Stack } from '../components'; import { Window } from '../layouts'; import { GhoulProps } from './AntagInfoBloodsucker'; import { ObjectivePrintout } from './common/Objectives'; diff --git a/tgui/packages/tgui/interfaces/AntagInfoOpfor.tsx b/tgui/packages/tgui/interfaces/AntagInfoOpfor.tsx index cd344af8619..9343fb6a9fe 100644 --- a/tgui/packages/tgui/interfaces/AntagInfoOpfor.tsx +++ b/tgui/packages/tgui/interfaces/AntagInfoOpfor.tsx @@ -1,6 +1,7 @@ // THIS IS A SKYRAT UI FILE +import { Button, Section, Stack } from 'tgui-core/components'; + import { useBackend } from '../backend'; -import { Button, Section, Stack } from '../components'; import { Window } from '../layouts'; export const AntagInfoOpfor = (props) => { diff --git a/tgui/packages/tgui/interfaces/AntagInfoRules.tsx b/tgui/packages/tgui/interfaces/AntagInfoRules.tsx index b1a3a919add..ca7ba2d0509 100644 --- a/tgui/packages/tgui/interfaces/AntagInfoRules.tsx +++ b/tgui/packages/tgui/interfaces/AntagInfoRules.tsx @@ -1,6 +1,7 @@ // THIS IS A SKYRAT UI FILE +import { Stack } from 'tgui-core/components'; + import { useBackend } from '../backend'; -import { Stack } from '../components'; import { Objective } from './common/Objectives'; type Info = { diff --git a/tgui/packages/tgui/interfaces/ArmamentStation.jsx b/tgui/packages/tgui/interfaces/ArmamentStation.jsx index c223cd4eb5c..9d066779543 100644 --- a/tgui/packages/tgui/interfaces/ArmamentStation.jsx +++ b/tgui/packages/tgui/interfaces/ArmamentStation.jsx @@ -1,5 +1,4 @@ // THIS IS A SKYRAT UI FILE -import { useBackend, useLocalState } from '../backend'; import { Box, Button, @@ -8,7 +7,9 @@ import { NoticeBox, Section, Stack, -} from '../components'; +} from 'tgui-core/components'; + +import { useBackend, useLocalState } from '../backend'; import { Window } from '../layouts'; export const ArmamentStation = (props) => { diff --git a/tgui/packages/tgui/interfaces/BluespaceArtillerySkyrat.tsx b/tgui/packages/tgui/interfaces/BluespaceArtillerySkyrat.tsx index fd29ca62d21..7d9e24d3fa1 100644 --- a/tgui/packages/tgui/interfaces/BluespaceArtillerySkyrat.tsx +++ b/tgui/packages/tgui/interfaces/BluespaceArtillerySkyrat.tsx @@ -1,7 +1,4 @@ // THIS IS A SKYRAT UI FILE -import { BooleanLike } from 'common/react'; - -import { useBackend } from '../backend'; import { Box, Button, @@ -9,8 +6,11 @@ import { NoticeBox, Section, Slider, -} from '../components'; -import { formatPower } from '../format'; +} from 'tgui-core/components'; +import { formatPower } from 'tgui-core/format'; +import { BooleanLike } from 'tgui-core/react'; + +import { useBackend } from '../backend'; import { Window } from '../layouts'; type Data = { diff --git a/tgui/packages/tgui/interfaces/BorerChem.jsx b/tgui/packages/tgui/interfaces/BorerChem.jsx index 42b7841abe1..2b268e32775 100644 --- a/tgui/packages/tgui/interfaces/BorerChem.jsx +++ b/tgui/packages/tgui/interfaces/BorerChem.jsx @@ -1,8 +1,14 @@ // THIS IS A SKYRAT UI FILE -import { toFixed } from 'common/math'; +import { + Box, + Button, + LabeledList, + ProgressBar, + Section, +} from 'tgui-core/components'; +import { toFixed } from 'tgui-core/math'; import { useBackend } from '../backend'; -import { Box, Button, LabeledList, ProgressBar, Section } from '../components'; import { Window } from '../layouts'; export const BorerChem = (props) => { diff --git a/tgui/packages/tgui/interfaces/BorerEvolution.tsx b/tgui/packages/tgui/interfaces/BorerEvolution.tsx index a906cb24ee8..15696772a66 100644 --- a/tgui/packages/tgui/interfaces/BorerEvolution.tsx +++ b/tgui/packages/tgui/interfaces/BorerEvolution.tsx @@ -1,6 +1,7 @@ // THIS IS A SKYRAT UI FILE +import { BlockQuote, Button, Section, Stack } from 'tgui-core/components'; + import { useBackend } from '../backend'; -import { BlockQuote, Button, Section, Stack } from '../components'; import { Window } from '../layouts'; const borerColor = { diff --git a/tgui/packages/tgui/interfaces/CargoImportConsole.jsx b/tgui/packages/tgui/interfaces/CargoImportConsole.jsx index 2854aee9828..6f6a3eb557c 100644 --- a/tgui/packages/tgui/interfaces/CargoImportConsole.jsx +++ b/tgui/packages/tgui/interfaces/CargoImportConsole.jsx @@ -1,8 +1,15 @@ // THIS IS A SKYRAT UI FILE import { useState } from 'react'; +import { + Box, + Button, + Divider, + Image, + Section, + Stack, +} from 'tgui-core/components'; import { useBackend } from '../backend'; -import { Box, Button, Divider, Image, Section, Stack } from '../components'; import { Window } from '../layouts'; export const CargoImportConsole = (props) => { diff --git a/tgui/packages/tgui/interfaces/CharacterPreview.tsx b/tgui/packages/tgui/interfaces/CharacterPreview.tsx index c6935409fb4..bd3fe7c4853 100644 --- a/tgui/packages/tgui/interfaces/CharacterPreview.tsx +++ b/tgui/packages/tgui/interfaces/CharacterPreview.tsx @@ -1,4 +1,4 @@ -import { ByondUi } from '../components'; +import { ByondUi } from 'tgui-core/components'; export const CharacterPreview = (props: { height: string; id: string }) => { return ( diff --git a/tgui/packages/tgui/interfaces/ChemPress.jsx b/tgui/packages/tgui/interfaces/ChemPress.jsx index b91406db3ec..217646a0ffc 100644 --- a/tgui/packages/tgui/interfaces/ChemPress.jsx +++ b/tgui/packages/tgui/interfaces/ChemPress.jsx @@ -1,5 +1,4 @@ // THIS IS A SKYRAT UI FILE -import { useBackend } from '../backend'; import { Box, Button, @@ -7,7 +6,9 @@ import { LabeledList, NumberInput, Section, -} from '../components'; +} from 'tgui-core/components'; + +import { useBackend } from '../backend'; import { Window } from '../layouts'; export const ChemPress = (props) => { diff --git a/tgui/packages/tgui/interfaces/ClockworkResearch.tsx b/tgui/packages/tgui/interfaces/ClockworkResearch.tsx index 215e0343077..a831fb28f2b 100644 --- a/tgui/packages/tgui/interfaces/ClockworkResearch.tsx +++ b/tgui/packages/tgui/interfaces/ClockworkResearch.tsx @@ -1,7 +1,15 @@ // THIS IS A SKYRAT UI FILE -import { BooleanLike, classes } from '../../common/react'; +import { + Box, + Button, + Divider, + Flex, + Section, + Stack, +} from 'tgui-core/components'; +import { BooleanLike, classes } from 'tgui-core/react'; + import { useBackend } from '../backend'; -import { Box, Button, Divider, Flex, Section, Stack } from '../components'; import { Window } from '../layouts'; type Data = { diff --git a/tgui/packages/tgui/interfaces/ClockworkSlab.jsx b/tgui/packages/tgui/interfaces/ClockworkSlab.jsx index 7acb39b8713..7cb3244e7ca 100644 --- a/tgui/packages/tgui/interfaces/ClockworkSlab.jsx +++ b/tgui/packages/tgui/interfaces/ClockworkSlab.jsx @@ -1,7 +1,5 @@ // THIS IS A SKYRAT UI FILE import { Fragment } from 'react'; - -import { useBackend, useLocalState } from '../backend'; import { Box, Button, @@ -12,8 +10,9 @@ import { Section, Stack, Table, -} from '../components'; -import { TableRow } from '../components/Table'; +} from 'tgui-core/components'; + +import { useBackend, useLocalState } from '../backend'; import { Window } from '../layouts'; const brassColor = '#DFC69C'; @@ -221,7 +220,7 @@ const ClockworkSpellList = (props) => { {scriptures.map((script) => script.type === selectedTab ? ( - + {script.name}