mirror of
https://github.com/roleypoly/roleypoly.git
synced 2025-06-17 09:59:10 +00:00
chore: move types to @roleypoly/types package
This commit is contained in:
parent
38ee680a33
commit
a374030438
46 changed files with 244 additions and 59 deletions
|
@ -1,8 +1,8 @@
|
|||
import { numberToChroma } from '@roleypoly/design-system/atoms/colors';
|
||||
import { Role as RPCRole, RoleSafety } from '@roleypoly/types';
|
||||
import chroma from 'chroma-js';
|
||||
import * as React from 'react';
|
||||
import { FaCheck, FaTimes } from 'react-icons/fa';
|
||||
import { Role as RPCRole, RoleSafety } from '../../../../src/common/types';
|
||||
import {
|
||||
evaluatePermission,
|
||||
permissions,
|
||||
|
|
|
@ -11,7 +11,7 @@ import {
|
|||
Role,
|
||||
RoleSafety,
|
||||
RoleypolyUser,
|
||||
} from '../../../src/common/types';
|
||||
} from '@roleypoly/types';
|
||||
|
||||
export const roleCategory: Role[] = [
|
||||
{
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { Typist } from '@roleypoly/design-system/atoms/typist';
|
||||
import { demoData } from '@roleypoly/types/demoData';
|
||||
import * as React from 'react';
|
||||
import { demoData } from '../../../../src/common/types/demoData';
|
||||
import {
|
||||
Base,
|
||||
InputBox,
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
import { Role } from '@roleypoly/design-system/atoms/role';
|
||||
import { Role as RPCRole } from '@roleypoly/types';
|
||||
import { demoData } from '@roleypoly/types/demoData';
|
||||
import * as React from 'react';
|
||||
import styled from 'styled-components';
|
||||
import { Role as RPCRole } from '../../../../src/common/types';
|
||||
import { demoData } from '../../../../src/common/types/demoData';
|
||||
|
||||
const Container = styled.div`
|
||||
display: flex;
|
||||
|
|
|
@ -6,9 +6,9 @@ import { Space } from '@roleypoly/design-system/atoms/space';
|
|||
import { TextInput, TextInputWithIcon } from '@roleypoly/design-system/atoms/text-input';
|
||||
import { Text } from '@roleypoly/design-system/atoms/typography';
|
||||
import { RoleSearch } from '@roleypoly/design-system/molecules/role-search';
|
||||
import { Category, CategoryType, Role as RoleType } from '@roleypoly/types';
|
||||
import * as React from 'react';
|
||||
import { GoSearch } from 'react-icons/go';
|
||||
import { Category, CategoryType, Role as RoleType } from '../../../../src/common/types';
|
||||
import { RoleContainer } from './EditorCategory.styled';
|
||||
|
||||
type Props = {
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
import { NavSlug } from '@roleypoly/design-system/molecules/nav-slug';
|
||||
import { GuildSlug, UserGuildPermissions } from '@roleypoly/types';
|
||||
import * as React from 'react';
|
||||
import Scrollbars from 'react-custom-scrollbars';
|
||||
import { GoStar, GoZap } from 'react-icons/go';
|
||||
import ReactTooltip from 'react-tooltip';
|
||||
import { GuildSlug, UserGuildPermissions } from '../../../../src/common/types';
|
||||
import { sortBy } from '../../../../src/common/utils/sortBy';
|
||||
import { GuildNavItem } from './GuildNav.styled';
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import { Avatar, utils } from '@roleypoly/design-system/atoms/avatar';
|
||||
import { GuildSlug } from '@roleypoly/types';
|
||||
import * as React from 'react';
|
||||
import { GoOrganization } from 'react-icons/go';
|
||||
import { GuildSlug } from '../../../../src/common/types';
|
||||
import { SlugContainer, SlugName } from './NavSlug.styled';
|
||||
|
||||
type Props = {
|
||||
|
|
|
@ -1,13 +1,9 @@
|
|||
import { Role } from '@roleypoly/design-system/atoms/role';
|
||||
import { AmbientLarge, LargeText } from '@roleypoly/design-system/atoms/typography';
|
||||
import { Category as RPCCategory, Role as RPCRole, RoleSafety } from '@roleypoly/types';
|
||||
import * as React from 'react';
|
||||
import ReactTooltip from 'react-tooltip';
|
||||
import styled from 'styled-components';
|
||||
import {
|
||||
Category as RPCCategory,
|
||||
Role as RPCRole,
|
||||
RoleSafety,
|
||||
} from '../../../../src/common/types';
|
||||
import { sortBy } from '../../../../src/common/utils/sortBy';
|
||||
import { Head, HeadSub, HeadTitle } from './PickerCategory.styled';
|
||||
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
import { Avatar, utils as avatarUtils } from '@roleypoly/design-system/atoms/avatar';
|
||||
import { Space } from '@roleypoly/design-system/atoms/space';
|
||||
import { AccentTitle } from '@roleypoly/design-system/atoms/typography';
|
||||
import { GuildSlug } from '@roleypoly/types';
|
||||
import * as React from 'react';
|
||||
import styled from 'styled-components';
|
||||
import { GuildSlug } from '../../../../src/common/types';
|
||||
|
||||
type GreetingProps = {
|
||||
guildSlug: GuildSlug;
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
import { Role } from '@roleypoly/design-system/atoms/role';
|
||||
import { Space } from '@roleypoly/design-system/atoms/space';
|
||||
import { TextInputWithIcon } from '@roleypoly/design-system/atoms/text-input';
|
||||
import { Role as RoleType } from '@roleypoly/types';
|
||||
import Fuse from 'fuse.js';
|
||||
import * as React from 'react';
|
||||
import { GoSearch } from 'react-icons/go';
|
||||
import styled from 'styled-components';
|
||||
import { Role as RoleType } from '../../../../src/common/types';
|
||||
|
||||
type Props = {
|
||||
roles: RoleType[];
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
import { Avatar, utils } from '@roleypoly/design-system/atoms/avatar';
|
||||
import { Collapse } from '@roleypoly/design-system/atoms/collapse';
|
||||
import { GuildSlug, UserGuildPermissions } from '@roleypoly/types';
|
||||
import * as React from 'react';
|
||||
import { GoPerson, GoStar, GoZap } from 'react-icons/go';
|
||||
import { GuildSlug, UserGuildPermissions } from '../../../../src/common/types';
|
||||
import {
|
||||
CardBase,
|
||||
CardLine,
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
import { Avatar, utils } from '@roleypoly/design-system/atoms/avatar';
|
||||
import { AccentTitle, AmbientLarge } from '@roleypoly/design-system/atoms/typography';
|
||||
import { GuildSlug } from '@roleypoly/types';
|
||||
import * as React from 'react';
|
||||
import { GoPencil } from 'react-icons/go';
|
||||
import { GuildSlug } from '../../../../src/common/types';
|
||||
import { Editable, Icon, Name, Wrapper } from './ServerMasthead.styled';
|
||||
|
||||
export type ServerMastheadProps = {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { Avatar, utils } from '@roleypoly/design-system/atoms/avatar';
|
||||
import { DiscordUser } from '@roleypoly/types';
|
||||
import * as React from 'react';
|
||||
import { DiscordUser } from '../../../../src/common/types';
|
||||
import { Collapse, Discriminator, Group, GroupText } from './UserAvatarGroup.styled';
|
||||
|
||||
type Props = {
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
import { CompletelyStylelessLink } from '@roleypoly/design-system/atoms/typography';
|
||||
import { UserAvatarGroup } from '@roleypoly/design-system/molecules/user-avatar-group';
|
||||
import { DiscordUser } from '@roleypoly/types';
|
||||
import * as React from 'react';
|
||||
import { GoGear, GoSignOut } from 'react-icons/go';
|
||||
import { DiscordUser } from '../../../../src/common/types';
|
||||
import { Base, NavAction } from './UserPopover.styled';
|
||||
|
||||
type UserPopoverProps = {
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
import { GlobalStyleColors } from '@roleypoly/design-system/atoms/colors';
|
||||
import { Footer } from '@roleypoly/design-system/molecules/footer';
|
||||
import * as Masthead from '@roleypoly/design-system/organisms/masthead';
|
||||
import { DiscordUser, GuildSlug } from '@roleypoly/types';
|
||||
import * as React from 'react';
|
||||
import { Scrollbars } from 'react-custom-scrollbars';
|
||||
import { DiscordUser, GuildSlug } from '../../../../src/common/types';
|
||||
import { Content, GlobalStyles } from './AppShell.styled';
|
||||
|
||||
export type AppShellProps = {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { Tab, TabView } from '@roleypoly/design-system/atoms/tab-view';
|
||||
import { PresentableGuild } from '@roleypoly/types';
|
||||
import * as React from 'react';
|
||||
import { PresentableGuild } from '../../../../src/common/types';
|
||||
import { EditorCategory } from '../../molecules/editor-category';
|
||||
import { CategoryContainer } from './EditorShell.styled';
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { numberToChroma, palette } from '@roleypoly/design-system/atoms/colors';
|
||||
import { Role } from '@roleypoly/types';
|
||||
import styled, { css } from 'styled-components';
|
||||
import { Role } from '../../../../src/common/types';
|
||||
|
||||
export const DiscordBase = styled.div`
|
||||
background-color: ${palette.discord100};
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
import { palette } from '@roleypoly/design-system/atoms/colors';
|
||||
import { HalfsiesContainer, HalfsiesItem } from '@roleypoly/design-system/atoms/halfsies';
|
||||
import { SparkleOverlay } from '@roleypoly/design-system/atoms/sparkle';
|
||||
import { Role } from '@roleypoly/types';
|
||||
import { demoData } from '@roleypoly/types/demoData';
|
||||
import chroma from 'chroma-js';
|
||||
import * as React from 'react';
|
||||
import { FaCheck, FaTimes } from 'react-icons/fa';
|
||||
import { Role } from '../../../../src/common/types';
|
||||
import { demoData } from '../../../../src/common/types/demoData';
|
||||
import { DiscordBase, DiscordRole } from './WhyNoRoles.styled';
|
||||
|
||||
const adminRoles: Role[] = [
|
||||
|
|
|
@ -4,9 +4,9 @@ import { GuildNav } from '@roleypoly/design-system/molecules/guild-nav';
|
|||
import { NavSlug } from '@roleypoly/design-system/molecules/nav-slug';
|
||||
import { UserAvatarGroup } from '@roleypoly/design-system/molecules/user-avatar-group';
|
||||
import { UserPopover } from '@roleypoly/design-system/molecules/user-popover';
|
||||
import { DiscordUser, GuildSlug } from '@roleypoly/types';
|
||||
import * as React from 'react';
|
||||
import { GoOrganization } from 'react-icons/go';
|
||||
import { DiscordUser, GuildSlug } from '../../../../src/common/types';
|
||||
import {
|
||||
GuildPopoverHead,
|
||||
InteractionBase,
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
import { Button } from '@roleypoly/design-system/atoms/button';
|
||||
import { PreauthGreeting } from '@roleypoly/design-system/molecules/preauth-greeting';
|
||||
import { GuildSlug } from '@roleypoly/types';
|
||||
import * as React from 'react';
|
||||
import { FaDiscord } from 'react-icons/fa';
|
||||
import styled from 'styled-components';
|
||||
import { GuildSlug } from '../../../../src/common/types';
|
||||
|
||||
export type PreauthProps = {
|
||||
guildSlug?: GuildSlug;
|
||||
|
|
|
@ -4,9 +4,6 @@ import { Link } from '@roleypoly/design-system/atoms/typography';
|
|||
import { PickerCategory } from '@roleypoly/design-system/molecules/picker-category';
|
||||
import { ResetSubmit } from '@roleypoly/design-system/molecules/reset-submit';
|
||||
import { ServerMasthead } from '@roleypoly/design-system/molecules/server-masthead';
|
||||
import { isEqual, xor } from 'lodash';
|
||||
import * as React from 'react';
|
||||
import { GoInfo } from 'react-icons/go';
|
||||
import {
|
||||
Category,
|
||||
CategoryType,
|
||||
|
@ -14,7 +11,10 @@ import {
|
|||
GuildSlug,
|
||||
Member,
|
||||
Role,
|
||||
} from '../../../../src/common/types';
|
||||
} from '@roleypoly/types';
|
||||
import { isEqual, xor } from 'lodash';
|
||||
import * as React from 'react';
|
||||
import { GoInfo } from 'react-icons/go';
|
||||
import { ReactifyNewlines } from '../../../../src/common/utils/ReactifyNewlines';
|
||||
import { sortBy } from '../../../../src/common/utils/sortBy';
|
||||
import {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import { UserGuildPermissions } from '../../../../src/common/types';
|
||||
import { UserGuildPermissions } from '@roleypoly/types';
|
||||
import { mastheadSlugs } from '../../fixtures/storyData';
|
||||
import { ServerSetup } from './ServerSetup';
|
||||
|
||||
|
|
|
@ -3,10 +3,10 @@ import { Button } from '@roleypoly/design-system/atoms/button';
|
|||
import { DotOverlay } from '@roleypoly/design-system/atoms/dot-overlay';
|
||||
import { Hero } from '@roleypoly/design-system/atoms/hero';
|
||||
import { AccentTitle, SmallTitle } from '@roleypoly/design-system/atoms/typography';
|
||||
import { GuildSlug, UserGuildPermissions } from '@roleypoly/types';
|
||||
import * as React from 'react';
|
||||
import { FaDiscord } from 'react-icons/fa';
|
||||
import { GoArrowLeft } from 'react-icons/go';
|
||||
import { GuildSlug, UserGuildPermissions } from '../../../../src/common/types';
|
||||
import { evaluatePermission } from '../../../../src/common/utils/hasPermission';
|
||||
import { FlexLine, FlexWrap } from './ServerSetup.styled';
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import { CompletelyStylelessLink } from '@roleypoly/design-system/atoms/typography';
|
||||
import { ServerListingCard } from '@roleypoly/design-system/molecules/server-listing-card';
|
||||
import { GuildSlug } from '@roleypoly/types';
|
||||
import * as React from 'react';
|
||||
import { GuildSlug } from '../../../../src/common/types';
|
||||
import { sortBy } from '../../../../src/common/utils/sortBy';
|
||||
import { CardContainer, ContentContainer } from './ServersListing.styled';
|
||||
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
"start": "start-storybook -p 6006"
|
||||
},
|
||||
"dependencies": {
|
||||
"@roleypoly/types": "*",
|
||||
"chroma-js": "^2.1.0",
|
||||
"isomorphic-unfetch": "^3.1.0",
|
||||
"ksuid": "^2.0.0",
|
||||
|
|
|
@ -5,8 +5,8 @@ import {
|
|||
ErrorMessage,
|
||||
} from '@roleypoly/design-system/molecules/error-banner';
|
||||
import { AppShell } from '@roleypoly/design-system/organisms/app-shell';
|
||||
import { DiscordUser } from '@roleypoly/types';
|
||||
import * as React from 'react';
|
||||
import { DiscordUser } from '../../../../src/common/types';
|
||||
import { getMessageFromCode } from './errorStrings';
|
||||
|
||||
export type ErrorProps = {
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import { AppShell, AppShellProps } from '@roleypoly/design-system/organisms/app-shell';
|
||||
import { ServersListing } from '@roleypoly/design-system/organisms/servers-listing/ServersListing';
|
||||
import { GuildSlug } from '@roleypoly/types';
|
||||
import * as React from 'react';
|
||||
import { GuildSlug } from '../../../../src/common/types';
|
||||
|
||||
type ServerTemplateProps = Omit<AppShellProps, 'children'> & {
|
||||
guilds: GuildSlug[];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue