mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-14 05:14:54 +00:00
chore: prohibit import package itself (#2612)
Co-authored-by: Whitewater <me@waterwater.moe>
This commit is contained in:
@@ -1,4 +1,3 @@
|
||||
import { IconButton } from '@affine/component';
|
||||
import {
|
||||
DeleteTemporarilyIcon,
|
||||
SettingsIcon,
|
||||
@@ -8,6 +7,7 @@ import type { Meta, StoryFn } from '@storybook/react';
|
||||
import { useAtom } from 'jotai';
|
||||
import { type PropsWithChildren, useState } from 'react';
|
||||
|
||||
import { IconButton } from '../..';
|
||||
import { AppSidebar, AppSidebarFallback, appSidebarOpenAtom } from '.';
|
||||
import { AddPageButton } from './add-page-button';
|
||||
import { CategoryDivider } from './category-divider';
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
import { IconButton } from '@affine/component';
|
||||
import { getEnvironment } from '@affine/env/config';
|
||||
import {
|
||||
ArrowLeftSmallIcon,
|
||||
@@ -7,6 +6,7 @@ import {
|
||||
} from '@blocksuite/icons';
|
||||
import { useAtom } from 'jotai';
|
||||
|
||||
import { IconButton } from '../../..';
|
||||
import type { History } from '..';
|
||||
import { navHeaderStyle, sidebarButtonStyle } from '../index.css';
|
||||
import { appSidebarOpenAtom } from '../index.jotai';
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
import { MenuItem, MuiClickAwayListener, PureMenu } from '@affine/component';
|
||||
import type { EditorPlugin } from '@affine/component/block-suite-editor';
|
||||
import type { SerializedBlock } from '@blocksuite/blocks';
|
||||
import {
|
||||
getCurrentBlockRange,
|
||||
@@ -10,6 +8,9 @@ import type { Page } from '@blocksuite/store';
|
||||
import { assertExists } from '@blocksuite/store';
|
||||
import { useCallback, useEffect, useMemo, useState } from 'react';
|
||||
|
||||
import { MenuItem, MuiClickAwayListener, PureMenu } from '../../..';
|
||||
import type { EditorPlugin } from '..';
|
||||
|
||||
type ShortcutMap = {
|
||||
[key: string]: (e: KeyboardEvent, page: Page) => void;
|
||||
};
|
||||
|
||||
@@ -1,11 +1,6 @@
|
||||
import {
|
||||
FlexWrapper,
|
||||
Modal,
|
||||
ModalCloseButton,
|
||||
ModalWrapper,
|
||||
} from '@affine/component';
|
||||
import { useAFFiNEI18N } from '@affine/i18n/hooks';
|
||||
|
||||
import { FlexWrapper, Modal, ModalCloseButton, ModalWrapper } from '../..';
|
||||
import {
|
||||
DiscordIcon,
|
||||
DocIcon,
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { absoluteCenter, displayFlex, styled } from '@affine/component';
|
||||
import { absoluteCenter, displayFlex, styled } from '../..';
|
||||
|
||||
export const StyledBigLink = styled('a')(() => {
|
||||
return {
|
||||
|
||||
@@ -1,10 +1,3 @@
|
||||
import {
|
||||
Table,
|
||||
TableBody,
|
||||
TableCell,
|
||||
TableHead,
|
||||
TableRow,
|
||||
} from '@affine/component';
|
||||
import { DEFAULT_SORT_KEY } from '@affine/env/constant';
|
||||
import { useAFFiNEI18N } from '@affine/i18n/hooks';
|
||||
import { ArrowDownBigIcon, ArrowUpBigIcon } from '@blocksuite/icons';
|
||||
@@ -12,6 +5,7 @@ import { useMediaQuery, useTheme } from '@mui/material';
|
||||
import type React from 'react';
|
||||
import { type CSSProperties } from 'react';
|
||||
|
||||
import { Table, TableBody, TableCell, TableHead, TableRow } from '../..';
|
||||
import { AllPagesBody } from './all-pages-body';
|
||||
import { NewPageButton } from './components/new-page-buttton';
|
||||
import { TitleCell } from './components/title-cell';
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import { styled, TableBody, TableCell } from '@affine/component';
|
||||
import { useAFFiNEI18N } from '@affine/i18n/hooks';
|
||||
import { useDraggable } from '@dnd-kit/core';
|
||||
import type { ReactNode } from 'react';
|
||||
import { Fragment } from 'react';
|
||||
|
||||
import { styled, TableBody, TableCell } from '../../..';
|
||||
import { FavoriteTag } from './components/favorite-tag';
|
||||
import { TitleCell } from './components/title-cell';
|
||||
import { OperationCell } from './operation-cell';
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
import type { IconButtonProps } from '@affine/component';
|
||||
import { IconButton, Tooltip } from '@affine/component';
|
||||
import { useAFFiNEI18N } from '@affine/i18n/hooks';
|
||||
import { FavoritedIcon, FavoriteIcon } from '@blocksuite/icons';
|
||||
import { forwardRef } from 'react';
|
||||
|
||||
import type { IconButtonProps } from '../../..';
|
||||
import { IconButton, Tooltip } from '../../..';
|
||||
|
||||
export const FavoriteTag = forwardRef<
|
||||
HTMLButtonElement,
|
||||
{
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import type { TableCellProps } from '@affine/component';
|
||||
import { Content, TableCell } from '@affine/component';
|
||||
import React, { useCallback } from 'react';
|
||||
|
||||
import type { TableCellProps } from '../../..';
|
||||
import { Content, TableCell } from '../../..';
|
||||
import {
|
||||
StyledTitleContentWrapper,
|
||||
StyledTitleLink,
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
import { Menu } from '@affine/component';
|
||||
|
||||
import { Menu } from '../../..';
|
||||
import { Condition } from './condition';
|
||||
import type { Filter } from './vars';
|
||||
import { CreateFilterMenu } from './vars';
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
import { useAFFiNEI18N } from '@affine/i18n/hooks';
|
||||
|
||||
import {
|
||||
Content,
|
||||
Table,
|
||||
@@ -5,9 +7,7 @@ import {
|
||||
TableCell,
|
||||
TableHead,
|
||||
TableRow,
|
||||
} from '@affine/component';
|
||||
import { useAFFiNEI18N } from '@affine/i18n/hooks';
|
||||
|
||||
} from '../../..';
|
||||
import { AllPagesBody } from './all-pages-body';
|
||||
import { NewPageButton } from './components/new-page-buttton';
|
||||
import {
|
||||
|
||||
@@ -1,11 +1,3 @@
|
||||
import {
|
||||
Confirm,
|
||||
FlexWrapper,
|
||||
IconButton,
|
||||
Menu,
|
||||
MenuItem,
|
||||
Tooltip,
|
||||
} from '@affine/component';
|
||||
import { useAFFiNEI18N } from '@affine/i18n/hooks';
|
||||
import {
|
||||
DeletePermanentlyIcon,
|
||||
@@ -18,6 +10,14 @@ import {
|
||||
import type React from 'react';
|
||||
import { useState } from 'react';
|
||||
|
||||
import {
|
||||
Confirm,
|
||||
FlexWrapper,
|
||||
IconButton,
|
||||
Menu,
|
||||
MenuItem,
|
||||
Tooltip,
|
||||
} from '../../..';
|
||||
import { DisablePublicSharing, MoveToTrash } from './operation-menu-items';
|
||||
|
||||
export type OperationCellProps = {
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import { MenuItem, toast } from '@affine/component';
|
||||
import { useAFFiNEI18N } from '@affine/i18n/hooks';
|
||||
import { CopyIcon } from '@blocksuite/icons';
|
||||
import { useCallback } from 'react';
|
||||
|
||||
import { MenuItem, toast } from '../../..';
|
||||
import type { CommonMenuItemProps } from './types';
|
||||
|
||||
export const CopyLink = ({ onItemClick, onSelect }: CommonMenuItemProps) => {
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import { MenuItem, styled } from '@affine/component';
|
||||
import { PublicLinkDisableModal } from '@affine/component/share-menu';
|
||||
import { useAFFiNEI18N } from '@affine/i18n/hooks';
|
||||
import { ShareIcon } from '@blocksuite/icons';
|
||||
|
||||
import { MenuItem, styled } from '../../../';
|
||||
import { PublicLinkDisableModal } from '../../share-menu';
|
||||
import type { CommonMenuItemProps } from './types';
|
||||
|
||||
const StyledMenuItem = styled(MenuItem)(({ theme }) => {
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
import { Menu, MenuItem } from '@affine/component';
|
||||
import { useAFFiNEI18N } from '@affine/i18n/hooks';
|
||||
import type { PageBlockModel } from '@blocksuite/blocks';
|
||||
import { ContentParser } from '@blocksuite/blocks/content-parser';
|
||||
@@ -12,6 +11,7 @@ import {
|
||||
} from '@blocksuite/icons';
|
||||
import { useRef } from 'react';
|
||||
|
||||
import { Menu, MenuItem } from '../../..';
|
||||
import type { CommonMenuItemProps } from './types';
|
||||
|
||||
export const Export = ({
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import type { ConfirmProps } from '@affine/component';
|
||||
import { Confirm, MenuItem } from '@affine/component';
|
||||
import { useAFFiNEI18N } from '@affine/i18n/hooks';
|
||||
import { DeleteTemporarilyIcon } from '@blocksuite/icons';
|
||||
|
||||
import type { ConfirmProps } from '../../..';
|
||||
import { Confirm, MenuItem } from '../../..';
|
||||
import type { CommonMenuItemProps } from './types';
|
||||
|
||||
export const MoveToTrash = ({
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { Content, displayFlex, styled } from '@affine/component';
|
||||
import { TableRow } from '@affine/component';
|
||||
import { TableRow } from '../..';
|
||||
import { Content, displayFlex, styled } from '../../';
|
||||
|
||||
export const StyledTableContainer = styled('div')(({ theme }) => {
|
||||
return {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { Button, Input, Modal, ModalWrapper } from '@affine/component';
|
||||
import { uuidv4 } from '@blocksuite/store';
|
||||
import { useState } from 'react';
|
||||
|
||||
import { Button, Input, Modal, ModalWrapper } from '../../..';
|
||||
import { FilterList } from '../filter';
|
||||
import type { Filter } from '../filter/vars';
|
||||
import type { View } from '../use-all-page-setting';
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { Button, MenuItem } from '@affine/component';
|
||||
import { FilteredIcon } from '@blocksuite/icons';
|
||||
|
||||
import { Button, MenuItem } from '../../..';
|
||||
import Menu from '../../../ui/menu/menu';
|
||||
import { CreateFilterMenu } from '../filter/vars';
|
||||
import type { useAllPageSetting } from '../use-all-page-setting';
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { styled, TextButton } from '@affine/component';
|
||||
import { styled, TextButton } from '../../..';
|
||||
|
||||
export const StyledModalWrapper = styled('div')(() => {
|
||||
return {
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import { BlockCard } from '@affine/component/card/block-card';
|
||||
import { WorkspaceFlavour } from '@affine/workspace/type';
|
||||
import { EdgelessIcon, PageIcon } from '@blocksuite/icons';
|
||||
import { Workspace } from '@blocksuite/store';
|
||||
|
||||
import { BlockCard } from '../components/card/block-card';
|
||||
import { WorkspaceCard } from '../components/card/workspace-card';
|
||||
import { toast } from '../ui/toast';
|
||||
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import { Button } from '@affine/component';
|
||||
import type { StoryFn } from '@storybook/react';
|
||||
import { useState } from 'react';
|
||||
|
||||
import type { ContactModalProps } from '../components/contact-modal';
|
||||
import { ContactModal } from '../components/contact-modal';
|
||||
import { Button } from '../ui/button';
|
||||
|
||||
export default {
|
||||
title: 'AFFiNE/ContactModal',
|
||||
|
||||
Reference in New Issue
Block a user