style: no import infra submodule (#6278)

This commit is contained in:
EYHN
2024-03-25 03:55:29 +00:00
parent b93871f045
commit 7ce2bfbf0b
81 changed files with 105 additions and 122 deletions
@@ -4,7 +4,7 @@ import type {
DeletedCollection,
} from '@affine/env/filter';
import type { Workspace } from '@toeverything/infra';
import { LiveData } from '@toeverything/infra/livedata';
import { LiveData } from '@toeverything/infra';
import { Observable } from 'rxjs';
import { Array as YArray } from 'yjs';
@@ -27,7 +27,7 @@ import {
useLiveData,
Workspace,
} from '@toeverything/infra';
import { useService } from '@toeverything/infra/di';
import { useService } from '@toeverything/infra';
import { assignInlineVars } from '@vanilla-extract/dynamic';
import clsx from 'clsx';
import dayjs from 'dayjs';
@@ -1,8 +1,8 @@
import { IconButton, Tooltip } from '@affine/component';
import { useAFFiNEI18N } from '@affine/i18n/hooks';
import { ArrowLeftSmallIcon, ArrowRightSmallIcon } from '@blocksuite/icons';
import { useService } from '@toeverything/infra/di';
import { useLiveData } from '@toeverything/infra/livedata';
import { useService } from '@toeverything/infra';
import { useLiveData } from '@toeverything/infra';
import { useCallback, useEffect, useMemo } from 'react';
import { useGeneralShortcuts } from '../../../hooks/affine/use-shortcuts';
@@ -1,8 +1,8 @@
import {
PreconditionStrategy,
registerAffineCommand,
} from '@toeverything/infra/command';
import { useService } from '@toeverything/infra/di';
} from '@toeverything/infra';
import { useService } from '@toeverything/infra';
import { useEffect } from 'react';
import { Navigator } from '../entities/navigator';
@@ -1,5 +1,5 @@
import { LiveData } from '@toeverything/infra/livedata';
import type { GlobalState } from '@toeverything/infra/storage';
import type { GlobalState } from '@toeverything/infra';
import { LiveData } from '@toeverything/infra';
import type { RightSidebarView } from './right-sidebar-view';
@@ -1,8 +1,8 @@
import { ResizePanel } from '@affine/component/resize-panel';
import { appSidebarOpenAtom } from '@affine/core/components/app-sidebar';
import { appSettingAtom } from '@toeverything/infra/atom';
import { useService } from '@toeverything/infra/di';
import { useLiveData } from '@toeverything/infra/livedata';
import { appSettingAtom } from '@toeverything/infra';
import { useService } from '@toeverything/infra';
import { useLiveData } from '@toeverything/infra';
import { useAtomValue } from 'jotai';
import { useCallback, useEffect, useState } from 'react';
@@ -1,4 +1,4 @@
import { useLiveData } from '@toeverything/infra/livedata';
import { useLiveData } from '@toeverything/infra';
import { type Location } from 'history';
import { useEffect } from 'react';
// eslint-disable-next-line @typescript-eslint/no-restricted-imports
@@ -2,7 +2,7 @@ import { IconButton } from '@affine/component';
import { WindowsAppControls } from '@affine/core/components/pure/header/windows-app-controls';
import { RightSidebarIcon } from '@blocksuite/icons';
import { useLiveData } from '@toeverything/infra';
import { useService } from '@toeverything/infra/di';
import { useService } from '@toeverything/infra';
import { useAtomValue } from 'jotai';
import { Suspense, useCallback } from 'react';
@@ -7,8 +7,8 @@ import {
SoloViewIcon,
} from '@blocksuite/icons';
import { useSortable } from '@dnd-kit/sortable';
import { useService } from '@toeverything/infra/di';
import { useLiveData } from '@toeverything/infra/livedata';
import { useService } from '@toeverything/infra';
import { useLiveData } from '@toeverything/infra';
import { assignInlineVars } from '@vanilla-extract/dynamic';
import type { SetStateAction } from 'jotai';
import {
@@ -11,7 +11,7 @@ import {
horizontalListSortingStrategy,
SortableContext,
} from '@dnd-kit/sortable';
import { useService } from '@toeverything/infra/di';
import { useService } from '@toeverything/infra';
import clsx from 'clsx';
import {
type HTMLAttributes,
@@ -1,4 +1,4 @@
import { useService } from '@toeverything/infra/di';
import { useService } from '@toeverything/infra';
import { useEffect, useState } from 'react';
import type { View } from '../entities/view';
@@ -1,4 +1,4 @@
import { useLiveData } from '@toeverything/infra/livedata';
import { useLiveData } from '@toeverything/infra';
import { lazy as reactLazy, useEffect, useMemo } from 'react';
import {
createMemoryRouter,
@@ -1,6 +1,6 @@
import { useAppSettingHelper } from '@affine/core/hooks/affine/use-app-setting-helper';
import { useService } from '@toeverything/infra/di';
import { useLiveData } from '@toeverything/infra/livedata';
import { useService } from '@toeverything/infra';
import { useLiveData } from '@toeverything/infra';
import type { To } from 'history';
import { useCallback } from 'react';
@@ -1,5 +1,5 @@
import { useService } from '@toeverything/infra/di';
import { useLiveData } from '@toeverything/infra/livedata';
import { useService } from '@toeverything/infra';
import { useLiveData } from '@toeverything/infra';
import { useCallback, useEffect, useRef } from 'react';
import { useLocation } from 'react-router-dom';
@@ -1,5 +1,5 @@
import type { Workspace } from '@toeverything/infra';
import { LiveData } from '@toeverything/infra/livedata';
import { LiveData } from '@toeverything/infra';
/**
* service to manage current workspace
@@ -1,7 +1,7 @@
import type { Tag } from '@affine/env/filter';
import type { DocsPropertiesMeta } from '@blocksuite/store';
import { LiveData } from '@toeverything/infra/livedata';
import type { Workspace } from '@toeverything/infra/workspace';
import type { Workspace } from '@toeverything/infra';
import { LiveData } from '@toeverything/infra';
import { Observable } from 'rxjs';
/**