mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-23 13:29:02 +08:00
style: no import infra submodule (#6278)
This commit is contained in:
@@ -3,14 +3,6 @@
|
|||||||
"type": "module",
|
"type": "module",
|
||||||
"private": true,
|
"private": true,
|
||||||
"exports": {
|
"exports": {
|
||||||
"./blocksuite": "./src/blocksuite/index.ts",
|
|
||||||
"./command": "./src/command/index.ts",
|
|
||||||
"./atom": "./src/atom/index.ts",
|
|
||||||
"./app-config-storage": "./src/app-config-storage.ts",
|
|
||||||
"./di": "./src/di/index.ts",
|
|
||||||
"./livedata": "./src/livedata/index.ts",
|
|
||||||
"./storage": "./src/storage/index.ts",
|
|
||||||
"./lifecycle": "./src/lifecycle/index.ts",
|
|
||||||
".": "./src/index.ts"
|
".": "./src/index.ts"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import type { Doc as BlockSuiteDoc } from '@blocksuite/store';
|
import type { Doc as BlockSuiteDoc } from '@blocksuite/store';
|
||||||
import type { ServiceProvider } from '@toeverything/infra/di';
|
import type { ServiceProvider } from '@toeverything/infra';
|
||||||
|
|
||||||
import type { PageMode, PageRecord } from './record';
|
import type { PageMode, PageRecord } from './record';
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import type { useAFFiNEI18N } from '@affine/i18n/hooks';
|
import type { useAFFiNEI18N } from '@affine/i18n/hooks';
|
||||||
import { ImportIcon, PlusIcon } from '@blocksuite/icons';
|
import { ImportIcon, PlusIcon } from '@blocksuite/icons';
|
||||||
import { registerAffineCommand } from '@toeverything/infra/command';
|
import { registerAffineCommand } from '@toeverything/infra';
|
||||||
import type { createStore } from 'jotai';
|
import type { createStore } from 'jotai';
|
||||||
|
|
||||||
import { openCreateWorkspaceModalAtom } from '../atoms';
|
import { openCreateWorkspaceModalAtom } from '../atoms';
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import type { useAFFiNEI18N } from '@affine/i18n/hooks';
|
import type { useAFFiNEI18N } from '@affine/i18n/hooks';
|
||||||
import { ContactWithUsIcon, NewIcon } from '@blocksuite/icons';
|
import { ContactWithUsIcon, NewIcon } from '@blocksuite/icons';
|
||||||
import { registerAffineCommand } from '@toeverything/infra/command';
|
import { registerAffineCommand } from '@toeverything/infra';
|
||||||
import type { createStore } from 'jotai';
|
import type { createStore } from 'jotai';
|
||||||
|
|
||||||
import { openSettingModalAtom } from '../atoms';
|
import { openSettingModalAtom } from '../atoms';
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import type { useAFFiNEI18N } from '@affine/i18n/hooks';
|
import type { useAFFiNEI18N } from '@affine/i18n/hooks';
|
||||||
import { SidebarIcon } from '@blocksuite/icons';
|
import { SidebarIcon } from '@blocksuite/icons';
|
||||||
import { registerAffineCommand } from '@toeverything/infra/command';
|
import { registerAffineCommand } from '@toeverything/infra';
|
||||||
import type { createStore } from 'jotai';
|
import type { createStore } from 'jotai';
|
||||||
|
|
||||||
import { appSidebarOpenAtom } from '../components/app-sidebar';
|
import { appSidebarOpenAtom } from '../components/app-sidebar';
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ import { WorkspaceSubPath } from '@affine/core/shared';
|
|||||||
import type { useAFFiNEI18N } from '@affine/i18n/hooks';
|
import type { useAFFiNEI18N } from '@affine/i18n/hooks';
|
||||||
import { ArrowRightBigIcon } from '@blocksuite/icons';
|
import { ArrowRightBigIcon } from '@blocksuite/icons';
|
||||||
import type { DocCollection } from '@blocksuite/store';
|
import type { DocCollection } from '@blocksuite/store';
|
||||||
import { registerAffineCommand } from '@toeverything/infra/command';
|
import { registerAffineCommand } from '@toeverything/infra';
|
||||||
import type { createStore } from 'jotai';
|
import type { createStore } from 'jotai';
|
||||||
|
|
||||||
import { openSettingModalAtom, openWorkspaceListModalAtom } from '../atoms';
|
import { openSettingModalAtom, openWorkspaceListModalAtom } from '../atoms';
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
import type { useAFFiNEI18N } from '@affine/i18n/hooks';
|
import type { useAFFiNEI18N } from '@affine/i18n/hooks';
|
||||||
import { SettingsIcon } from '@blocksuite/icons';
|
import { SettingsIcon } from '@blocksuite/icons';
|
||||||
import type { AffineEditorContainer } from '@blocksuite/presets';
|
import type { AffineEditorContainer } from '@blocksuite/presets';
|
||||||
import { appSettingAtom } from '@toeverything/infra/atom';
|
import { appSettingAtom } from '@toeverything/infra';
|
||||||
import {
|
import {
|
||||||
PreconditionStrategy,
|
PreconditionStrategy,
|
||||||
registerAffineCommand,
|
registerAffineCommand,
|
||||||
} from '@toeverything/infra/command';
|
} from '@toeverything/infra';
|
||||||
import { type createStore } from 'jotai';
|
import { type createStore } from 'jotai';
|
||||||
import type { useTheme } from 'next-themes';
|
import type { useTheme } from 'next-themes';
|
||||||
|
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ import { updateReadyAtom } from '@affine/core/hooks/use-app-updater';
|
|||||||
import { apis } from '@affine/electron-api';
|
import { apis } from '@affine/electron-api';
|
||||||
import type { useAFFiNEI18N } from '@affine/i18n/hooks';
|
import type { useAFFiNEI18N } from '@affine/i18n/hooks';
|
||||||
import { ResetIcon } from '@blocksuite/icons';
|
import { ResetIcon } from '@blocksuite/icons';
|
||||||
import { registerAffineCommand } from '@toeverything/infra/command';
|
import { registerAffineCommand } from '@toeverything/infra';
|
||||||
import type { createStore } from 'jotai';
|
import type { createStore } from 'jotai';
|
||||||
|
|
||||||
export function registerAffineUpdatesCommands({
|
export function registerAffineUpdatesCommands({
|
||||||
|
|||||||
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
import { getCurrentStore } from '@toeverything/infra/atom';
|
import { getCurrentStore } from '@toeverything/infra';
|
||||||
import { Provider } from 'jotai/react';
|
import { Provider } from 'jotai/react';
|
||||||
import type { FC } from 'react';
|
import type { FC } from 'react';
|
||||||
import { useMemo } from 'react';
|
import { useMemo } from 'react';
|
||||||
|
|||||||
+2
-2
@@ -1,6 +1,6 @@
|
|||||||
import { WorkspaceListService } from '@toeverything/infra';
|
import { WorkspaceListService } from '@toeverything/infra';
|
||||||
import { useService } from '@toeverything/infra/di';
|
import { useService } from '@toeverything/infra';
|
||||||
import { useLiveData } from '@toeverything/infra/livedata';
|
import { useLiveData } from '@toeverything/infra';
|
||||||
import { useEffect } from 'react';
|
import { useEffect } from 'react';
|
||||||
import { useLocation, useParams } from 'react-router-dom';
|
import { useLocation, useParams } from 'react-router-dom';
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { useService } from '@toeverything/infra/di';
|
import { useService } from '@toeverything/infra';
|
||||||
import { useLiveData } from '@toeverything/infra/livedata';
|
import { useLiveData } from '@toeverything/infra';
|
||||||
import { Suspense, useEffect } from 'react';
|
import { Suspense, useEffect } from 'react';
|
||||||
|
|
||||||
import { useCurrentLoginStatus } from '../../../hooks/affine/use-current-login-status';
|
import { useCurrentLoginStatus } from '../../../hooks/affine/use-current-login-status';
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ import { useAFFiNEI18N } from '@affine/i18n/hooks';
|
|||||||
import { _addLocalWorkspace } from '@affine/workspace-impl';
|
import { _addLocalWorkspace } from '@affine/workspace-impl';
|
||||||
import { WorkspaceManager } from '@toeverything/infra';
|
import { WorkspaceManager } from '@toeverything/infra';
|
||||||
import { buildShowcaseWorkspace, initEmptyPage } from '@toeverything/infra';
|
import { buildShowcaseWorkspace, initEmptyPage } from '@toeverything/infra';
|
||||||
import { useService } from '@toeverything/infra/di';
|
import { useService } from '@toeverything/infra';
|
||||||
import { useSetAtom } from 'jotai';
|
import { useSetAtom } from 'jotai';
|
||||||
import type { KeyboardEvent } from 'react';
|
import type { KeyboardEvent } from 'react';
|
||||||
import { useLayoutEffect } from 'react';
|
import { useLayoutEffect } from 'react';
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ import { type DocCollection } from '@blocksuite/store';
|
|||||||
import * as Collapsible from '@radix-ui/react-collapsible';
|
import * as Collapsible from '@radix-ui/react-collapsible';
|
||||||
import type { DialogContentProps } from '@radix-ui/react-dialog';
|
import type { DialogContentProps } from '@radix-ui/react-dialog';
|
||||||
import { Doc, type PageMode, Workspace } from '@toeverything/infra';
|
import { Doc, type PageMode, Workspace } from '@toeverything/infra';
|
||||||
import { useService } from '@toeverything/infra/di';
|
import { useService } from '@toeverything/infra';
|
||||||
import { atom, useAtom, useSetAtom } from 'jotai';
|
import { atom, useAtom, useSetAtom } from 'jotai';
|
||||||
import {
|
import {
|
||||||
Fragment,
|
Fragment,
|
||||||
|
|||||||
+1
-1
@@ -3,7 +3,7 @@ import { WorkspacePropertiesAdapter } from '@affine/core/modules/workspace';
|
|||||||
import type { PageInfoCustomPropertyMeta } from '@affine/core/modules/workspace/properties/schema';
|
import type { PageInfoCustomPropertyMeta } from '@affine/core/modules/workspace/properties/schema';
|
||||||
import { Trans } from '@affine/i18n';
|
import { Trans } from '@affine/i18n';
|
||||||
import { useAFFiNEI18N } from '@affine/i18n/hooks';
|
import { useAFFiNEI18N } from '@affine/i18n/hooks';
|
||||||
import { useService } from '@toeverything/infra/di';
|
import { useService } from '@toeverything/infra';
|
||||||
import { useMemo } from 'react';
|
import { useMemo } from 'react';
|
||||||
|
|
||||||
import { PagePropertiesMetaManager } from './page-properties-manager';
|
import { PagePropertiesMetaManager } from './page-properties-manager';
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ import { WorkspaceLegacyProperties } from '@affine/core/modules/workspace';
|
|||||||
import { useAFFiNEI18N } from '@affine/i18n/hooks';
|
import { useAFFiNEI18N } from '@affine/i18n/hooks';
|
||||||
import { DeleteIcon, MoreHorizontalIcon, TagsIcon } from '@blocksuite/icons';
|
import { DeleteIcon, MoreHorizontalIcon, TagsIcon } from '@blocksuite/icons';
|
||||||
import { useLiveData } from '@toeverything/infra';
|
import { useLiveData } from '@toeverything/infra';
|
||||||
import { useService } from '@toeverything/infra/di';
|
import { useService } from '@toeverything/infra';
|
||||||
import clsx from 'clsx';
|
import clsx from 'clsx';
|
||||||
import {
|
import {
|
||||||
type HTMLAttributes,
|
type HTMLAttributes,
|
||||||
|
|||||||
+1
-1
@@ -1,5 +1,5 @@
|
|||||||
import { Menu, MenuItem, MenuTrigger } from '@affine/component/ui/menu';
|
import { Menu, MenuItem, MenuTrigger } from '@affine/component/ui/menu';
|
||||||
import { dateFormatOptions, type DateFormats } from '@toeverything/infra/atom';
|
import { dateFormatOptions, type DateFormats } from '@toeverything/infra';
|
||||||
import dayjs from 'dayjs';
|
import dayjs from 'dayjs';
|
||||||
import { useCallback } from 'react';
|
import { useCallback } from 'react';
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -7,7 +7,7 @@ import {
|
|||||||
type AppSetting,
|
type AppSetting,
|
||||||
fontStyleOptions,
|
fontStyleOptions,
|
||||||
windowFrameStyleOptions,
|
windowFrameStyleOptions,
|
||||||
} from '@toeverything/infra/atom';
|
} from '@toeverything/infra';
|
||||||
import { useTheme } from 'next-themes';
|
import { useTheme } from 'next-themes';
|
||||||
import { useCallback } from 'react';
|
import { useCallback } from 'react';
|
||||||
|
|
||||||
|
|||||||
+2
-2
@@ -16,8 +16,8 @@ import {
|
|||||||
WorkspaceManager,
|
WorkspaceManager,
|
||||||
type WorkspaceMetadata,
|
type WorkspaceMetadata,
|
||||||
} from '@toeverything/infra';
|
} from '@toeverything/infra';
|
||||||
import { useService } from '@toeverything/infra/di';
|
import { useService } from '@toeverything/infra';
|
||||||
import { useLiveData } from '@toeverything/infra/livedata';
|
import { useLiveData } from '@toeverything/infra';
|
||||||
import clsx from 'clsx';
|
import clsx from 'clsx';
|
||||||
import { useAtom } from 'jotai/react';
|
import { useAtom } from 'jotai/react';
|
||||||
import { type ReactElement, Suspense, useCallback, useMemo } from 'react';
|
import { type ReactElement, Suspense, useCallback, useMemo } from 'react';
|
||||||
|
|||||||
+2
-2
@@ -5,8 +5,8 @@ import { useAsyncCallback } from '@affine/core/hooks/affine-async-hooks';
|
|||||||
import { useAFFiNEI18N } from '@affine/i18n/hooks';
|
import { useAFFiNEI18N } from '@affine/i18n/hooks';
|
||||||
import { ArrowRightSmallIcon } from '@blocksuite/icons';
|
import { ArrowRightSmallIcon } from '@blocksuite/icons';
|
||||||
import { Workspace, WorkspaceManager } from '@toeverything/infra';
|
import { Workspace, WorkspaceManager } from '@toeverything/infra';
|
||||||
import { useService } from '@toeverything/infra/di';
|
import { useService } from '@toeverything/infra';
|
||||||
import { useLiveData } from '@toeverything/infra/livedata';
|
import { useLiveData } from '@toeverything/infra';
|
||||||
import { useSetAtom } from 'jotai';
|
import { useSetAtom } from 'jotai';
|
||||||
import { useCallback, useState } from 'react';
|
import { useCallback, useState } from 'react';
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -6,7 +6,7 @@ import { UNTITLED_WORKSPACE_NAME } from '@affine/env/constant';
|
|||||||
import { WorkspaceFlavour } from '@affine/env/workspace';
|
import { WorkspaceFlavour } from '@affine/env/workspace';
|
||||||
import { useAFFiNEI18N } from '@affine/i18n/hooks';
|
import { useAFFiNEI18N } from '@affine/i18n/hooks';
|
||||||
import { type Workspace, WorkspaceManager } from '@toeverything/infra';
|
import { type Workspace, WorkspaceManager } from '@toeverything/infra';
|
||||||
import { useService } from '@toeverything/infra/di';
|
import { useService } from '@toeverything/infra';
|
||||||
import { useSetAtom } from 'jotai';
|
import { useSetAtom } from 'jotai';
|
||||||
import { useState } from 'react';
|
import { useState } from 'react';
|
||||||
|
|
||||||
|
|||||||
+1
-4
@@ -7,10 +7,7 @@ import type { PageInfoCustomPropertyMeta } from '@affine/core/modules/workspace/
|
|||||||
import { Trans } from '@affine/i18n';
|
import { Trans } from '@affine/i18n';
|
||||||
import { useAFFiNEI18N } from '@affine/i18n/hooks';
|
import { useAFFiNEI18N } from '@affine/i18n/hooks';
|
||||||
import { DeleteIcon, FilterIcon, MoreHorizontalIcon } from '@blocksuite/icons';
|
import { DeleteIcon, FilterIcon, MoreHorizontalIcon } from '@blocksuite/icons';
|
||||||
import type {
|
import type { Workspace, WorkspaceMetadata } from '@toeverything/infra';
|
||||||
Workspace,
|
|
||||||
WorkspaceMetadata,
|
|
||||||
} from '@toeverything/infra/workspace';
|
|
||||||
import {
|
import {
|
||||||
createContext,
|
createContext,
|
||||||
Fragment,
|
Fragment,
|
||||||
|
|||||||
+1
-1
@@ -5,7 +5,7 @@ import { WorkspaceFlavour } from '@affine/env/workspace';
|
|||||||
import { useAFFiNEI18N } from '@affine/i18n/hooks';
|
import { useAFFiNEI18N } from '@affine/i18n/hooks';
|
||||||
import { LinkIcon } from '@blocksuite/icons';
|
import { LinkIcon } from '@blocksuite/icons';
|
||||||
import { Doc, useLiveData } from '@toeverything/infra';
|
import { Doc, useLiveData } from '@toeverything/infra';
|
||||||
import { useService } from '@toeverything/infra/di';
|
import { useService } from '@toeverything/infra';
|
||||||
|
|
||||||
import { useExportPage } from '../../../../hooks/affine/use-export-page';
|
import { useExportPage } from '../../../../hooks/affine/use-export-page';
|
||||||
import * as styles from './index.css';
|
import * as styles from './index.css';
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import { Skeleton } from '@affine/component';
|
import { Skeleton } from '@affine/component';
|
||||||
import { ResizePanel } from '@affine/component/resize-panel';
|
import { ResizePanel } from '@affine/component/resize-panel';
|
||||||
import { Workspace } from '@toeverything/infra';
|
import { Workspace } from '@toeverything/infra';
|
||||||
import { useServiceOptional } from '@toeverything/infra/di';
|
import { useServiceOptional } from '@toeverything/infra';
|
||||||
import { useAtom, useAtomValue } from 'jotai';
|
import { useAtom, useAtomValue } from 'jotai';
|
||||||
import { debounce } from 'lodash-es';
|
import { debounce } from 'lodash-es';
|
||||||
import type { PropsWithChildren, ReactElement } from 'react';
|
import type { PropsWithChildren, ReactElement } from 'react';
|
||||||
|
|||||||
+1
-1
@@ -5,7 +5,7 @@ import { toast } from '@affine/core/utils';
|
|||||||
import { useAFFiNEI18N } from '@affine/i18n/hooks';
|
import { useAFFiNEI18N } from '@affine/i18n/hooks';
|
||||||
import { assertExists } from '@blocksuite/global/utils';
|
import { assertExists } from '@blocksuite/global/utils';
|
||||||
import { Workspace } from '@toeverything/infra';
|
import { Workspace } from '@toeverything/infra';
|
||||||
import { useService } from '@toeverything/infra/di';
|
import { useService } from '@toeverything/infra';
|
||||||
import { useCallback } from 'react';
|
import { useCallback } from 'react';
|
||||||
|
|
||||||
export interface FavoriteButtonProps {
|
export interface FavoriteButtonProps {
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ import {
|
|||||||
useLiveData,
|
useLiveData,
|
||||||
useService,
|
useService,
|
||||||
} from '@toeverything/infra';
|
} from '@toeverything/infra';
|
||||||
import { fontStyleOptions } from '@toeverything/infra/atom';
|
import { fontStyleOptions } from '@toeverything/infra';
|
||||||
import clsx from 'clsx';
|
import clsx from 'clsx';
|
||||||
import type { CSSProperties } from 'react';
|
import type { CSSProperties } from 'react';
|
||||||
import { memo, Suspense, useCallback, useMemo } from 'react';
|
import { memo, Suspense, useCallback, useMemo } from 'react';
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { Workspace } from '@toeverything/infra';
|
import { Workspace } from '@toeverything/infra';
|
||||||
import { useService } from '@toeverything/infra/di';
|
import { useService } from '@toeverything/infra';
|
||||||
import type { PropsWithChildren } from 'react';
|
import type { PropsWithChildren } from 'react';
|
||||||
|
|
||||||
import { usePageHelper } from '../../blocksuite/block-suite-page-list/utils';
|
import { usePageHelper } from '../../blocksuite/block-suite-page-list/utils';
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ import {
|
|||||||
FilterIcon,
|
FilterIcon,
|
||||||
SplitViewIcon,
|
SplitViewIcon,
|
||||||
} from '@blocksuite/icons';
|
} from '@blocksuite/icons';
|
||||||
import { useService } from '@toeverything/infra/di';
|
import { useService } from '@toeverything/infra';
|
||||||
import {
|
import {
|
||||||
type PropsWithChildren,
|
type PropsWithChildren,
|
||||||
type ReactElement,
|
type ReactElement,
|
||||||
|
|||||||
@@ -26,8 +26,8 @@ import {
|
|||||||
AffineCommandRegistry,
|
AffineCommandRegistry,
|
||||||
type CommandCategory,
|
type CommandCategory,
|
||||||
PreconditionStrategy,
|
PreconditionStrategy,
|
||||||
} from '@toeverything/infra/command';
|
} from '@toeverything/infra';
|
||||||
import { useService, useServiceOptional } from '@toeverything/infra/di';
|
import { useService, useServiceOptional } from '@toeverything/infra';
|
||||||
import { atom, useAtomValue } from 'jotai';
|
import { atom, useAtomValue } from 'jotai';
|
||||||
import { useCallback, useEffect, useMemo, useState } from 'react';
|
import { useCallback, useEffect, useMemo, useState } from 'react';
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import type { CommandCategory } from '@toeverything/infra/command';
|
import type { CommandCategory } from '@toeverything/infra';
|
||||||
import { commandScore } from 'cmdk';
|
import { commandScore } from 'cmdk';
|
||||||
import { groupBy } from 'lodash-es';
|
import { groupBy } from 'lodash-es';
|
||||||
|
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import { useDocEngineStatus } from '@affine/core/hooks/affine/use-doc-engine-sta
|
|||||||
import { useAsyncCallback } from '@affine/core/hooks/affine-async-hooks';
|
import { useAsyncCallback } from '@affine/core/hooks/affine-async-hooks';
|
||||||
import { useAFFiNEI18N } from '@affine/i18n/hooks';
|
import { useAFFiNEI18N } from '@affine/i18n/hooks';
|
||||||
import type { DocMeta } from '@blocksuite/store';
|
import type { DocMeta } from '@blocksuite/store';
|
||||||
import type { CommandCategory } from '@toeverything/infra/command';
|
import type { CommandCategory } from '@toeverything/infra';
|
||||||
import clsx from 'clsx';
|
import clsx from 'clsx';
|
||||||
import { Command } from 'cmdk';
|
import { Command } from 'cmdk';
|
||||||
import { useAtom } from 'jotai';
|
import { useAtom } from 'jotai';
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import type { CommandCategory } from '@toeverything/infra/command';
|
import type { CommandCategory } from '@toeverything/infra';
|
||||||
|
|
||||||
export interface CommandContext {
|
export interface CommandContext {
|
||||||
pageMode: 'page' | 'edgeless' | undefined;
|
pageMode: 'page' | 'edgeless' | undefined;
|
||||||
|
|||||||
@@ -5,8 +5,8 @@ import { useBlockSuiteDocMeta } from '@affine/core/hooks/use-block-suite-page-me
|
|||||||
import { useAFFiNEI18N } from '@affine/i18n/hooks';
|
import { useAFFiNEI18N } from '@affine/i18n/hooks';
|
||||||
import { assertExists } from '@blocksuite/global/utils';
|
import { assertExists } from '@blocksuite/global/utils';
|
||||||
import { DeleteIcon, ResetIcon } from '@blocksuite/icons';
|
import { DeleteIcon, ResetIcon } from '@blocksuite/icons';
|
||||||
import { useService } from '@toeverything/infra/di';
|
import { useService } from '@toeverything/infra';
|
||||||
import { useLiveData } from '@toeverything/infra/livedata';
|
import { useLiveData } from '@toeverything/infra';
|
||||||
import { useCallback, useState } from 'react';
|
import { useCallback, useState } from 'react';
|
||||||
|
|
||||||
import { useAppSettingHelper } from '../../../hooks/affine/use-app-setting-helper';
|
import { useAppSettingHelper } from '../../../hooks/affine/use-app-setting-helper';
|
||||||
|
|||||||
+1
-1
@@ -14,7 +14,7 @@ import type { DocCollection, DocMeta } from '@blocksuite/store';
|
|||||||
import { useDroppable } from '@dnd-kit/core';
|
import { useDroppable } from '@dnd-kit/core';
|
||||||
import * as Collapsible from '@radix-ui/react-collapsible';
|
import * as Collapsible from '@radix-ui/react-collapsible';
|
||||||
import { useService } from '@toeverything/infra';
|
import { useService } from '@toeverything/infra';
|
||||||
import { useLiveData } from '@toeverything/infra/livedata';
|
import { useLiveData } from '@toeverything/infra';
|
||||||
import { useCallback, useMemo, useState } from 'react';
|
import { useCallback, useMemo, useState } from 'react';
|
||||||
|
|
||||||
import { useAllPageListConfig } from '../../../../hooks/affine/use-all-page-list-config';
|
import { useAllPageListConfig } from '../../../../hooks/affine/use-all-page-list-config';
|
||||||
|
|||||||
+1
-1
@@ -5,7 +5,7 @@ import { Workbench } from '@affine/core/modules/workbench';
|
|||||||
import { useAFFiNEI18N } from '@affine/i18n/hooks';
|
import { useAFFiNEI18N } from '@affine/i18n/hooks';
|
||||||
import { MoreHorizontalIcon } from '@blocksuite/icons';
|
import { MoreHorizontalIcon } from '@blocksuite/icons';
|
||||||
import type { DocCollection } from '@blocksuite/store';
|
import type { DocCollection } from '@blocksuite/store';
|
||||||
import { useService } from '@toeverything/infra/di';
|
import { useService } from '@toeverything/infra';
|
||||||
import { useCallback } from 'react';
|
import { useCallback } from 'react';
|
||||||
|
|
||||||
import { useBlockSuiteMetaHelper } from '../../../../hooks/affine/use-block-suite-meta-helper';
|
import { useBlockSuiteMetaHelper } from '../../../../hooks/affine/use-block-suite-meta-helper';
|
||||||
|
|||||||
+2
-2
@@ -6,8 +6,8 @@ import { Unreachable } from '@affine/env/constant';
|
|||||||
import { useAFFiNEI18N } from '@affine/i18n/hooks';
|
import { useAFFiNEI18N } from '@affine/i18n/hooks';
|
||||||
import { Logo1Icon } from '@blocksuite/icons';
|
import { Logo1Icon } from '@blocksuite/icons';
|
||||||
import { WorkspaceManager } from '@toeverything/infra';
|
import { WorkspaceManager } from '@toeverything/infra';
|
||||||
import { useService } from '@toeverything/infra/di';
|
import { useService } from '@toeverything/infra';
|
||||||
import { useLiveData } from '@toeverything/infra/livedata';
|
import { useLiveData } from '@toeverything/infra';
|
||||||
import { useSetAtom } from 'jotai';
|
import { useSetAtom } from 'jotai';
|
||||||
import { Suspense, useCallback, useEffect } from 'react';
|
import { Suspense, useCallback, useEffect } from 'react';
|
||||||
|
|
||||||
|
|||||||
+2
-2
@@ -10,8 +10,8 @@ import { WorkspaceFlavour } from '@affine/env/workspace';
|
|||||||
import { useAFFiNEI18N } from '@affine/i18n/hooks';
|
import { useAFFiNEI18N } from '@affine/i18n/hooks';
|
||||||
import type { DragEndEvent } from '@dnd-kit/core';
|
import type { DragEndEvent } from '@dnd-kit/core';
|
||||||
import { WorkspaceManager, type WorkspaceMetadata } from '@toeverything/infra';
|
import { WorkspaceManager, type WorkspaceMetadata } from '@toeverything/infra';
|
||||||
import { useService } from '@toeverything/infra/di';
|
import { useService } from '@toeverything/infra';
|
||||||
import { useLiveData } from '@toeverything/infra/livedata';
|
import { useLiveData } from '@toeverything/infra';
|
||||||
import { useSetAtom } from 'jotai';
|
import { useSetAtom } from 'jotai';
|
||||||
import { useCallback, useMemo } from 'react';
|
import { useCallback, useMemo } from 'react';
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -18,7 +18,7 @@ import {
|
|||||||
UnsyncIcon,
|
UnsyncIcon,
|
||||||
} from '@blocksuite/icons';
|
} from '@blocksuite/icons';
|
||||||
import { Workspace } from '@toeverything/infra';
|
import { Workspace } from '@toeverything/infra';
|
||||||
import { useService } from '@toeverything/infra/di';
|
import { useService } from '@toeverything/infra';
|
||||||
import { useSetAtom } from 'jotai';
|
import { useSetAtom } from 'jotai';
|
||||||
import { debounce } from 'lodash-es';
|
import { debounce } from 'lodash-es';
|
||||||
import {
|
import {
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import { useNavigateHelper } from '@affine/core/hooks/use-navigate-helper';
|
|||||||
import { useWorkspaceStatus } from '@affine/core/hooks/use-workspace-status';
|
import { useWorkspaceStatus } from '@affine/core/hooks/use-workspace-status';
|
||||||
import { useAFFiNEI18N } from '@affine/i18n/hooks';
|
import { useAFFiNEI18N } from '@affine/i18n/hooks';
|
||||||
import { Workspace, WorkspaceManager } from '@toeverything/infra';
|
import { Workspace, WorkspaceManager } from '@toeverything/infra';
|
||||||
import { useService } from '@toeverything/infra/di';
|
import { useService } from '@toeverything/infra';
|
||||||
import { useState } from 'react';
|
import { useState } from 'react';
|
||||||
|
|
||||||
import { WorkspaceSubPath } from '../../shared';
|
import { WorkspaceSubPath } from '../../shared';
|
||||||
|
|||||||
+1
-1
@@ -6,7 +6,7 @@ import 'fake-indexeddb/auto';
|
|||||||
import { WorkspacePropertiesAdapter } from '@affine/core/modules/workspace';
|
import { WorkspacePropertiesAdapter } from '@affine/core/modules/workspace';
|
||||||
import { render } from '@testing-library/react';
|
import { render } from '@testing-library/react';
|
||||||
import { Workspace } from '@toeverything/infra';
|
import { Workspace } from '@toeverything/infra';
|
||||||
import { ServiceProviderContext, useService } from '@toeverything/infra/di';
|
import { ServiceProviderContext, useService } from '@toeverything/infra';
|
||||||
import { createStore, Provider } from 'jotai';
|
import { createStore, Provider } from 'jotai';
|
||||||
import { Suspense } from 'react';
|
import { Suspense } from 'react';
|
||||||
import { describe, expect, test, vi } from 'vitest';
|
import { describe, expect, test, vi } from 'vitest';
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ import { useBlockSuiteDocMeta } from '@affine/core/hooks/use-block-suite-page-me
|
|||||||
import { useAFFiNEI18N } from '@affine/i18n/hooks';
|
import { useAFFiNEI18N } from '@affine/i18n/hooks';
|
||||||
import type { DocMeta } from '@blocksuite/store';
|
import type { DocMeta } from '@blocksuite/store';
|
||||||
import { Workspace } from '@toeverything/infra';
|
import { Workspace } from '@toeverything/infra';
|
||||||
import { useService } from '@toeverything/infra/di';
|
import { useService } from '@toeverything/infra';
|
||||||
import { useCallback, useMemo } from 'react';
|
import { useCallback, useMemo } from 'react';
|
||||||
|
|
||||||
import { usePageHelper } from '../../components/blocksuite/block-suite-page-list/utils';
|
import { usePageHelper } from '../../components/blocksuite/block-suite-page-list/utils';
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { type AppSetting, appSettingAtom } from '@toeverything/infra/atom';
|
import { type AppSetting, appSettingAtom } from '@toeverything/infra';
|
||||||
import { useAtom } from 'jotai';
|
import { useAtom } from 'jotai';
|
||||||
import { useCallback, useMemo } from 'react';
|
import { useCallback, useMemo } from 'react';
|
||||||
|
|
||||||
|
|||||||
@@ -8,8 +8,8 @@ import { Doc, useLiveData, Workspace } from '@toeverything/infra';
|
|||||||
import {
|
import {
|
||||||
PreconditionStrategy,
|
PreconditionStrategy,
|
||||||
registerAffineCommand,
|
registerAffineCommand,
|
||||||
} from '@toeverything/infra/command';
|
} from '@toeverything/infra';
|
||||||
import { useService } from '@toeverything/infra/di';
|
import { useService } from '@toeverything/infra';
|
||||||
import { useSetAtom } from 'jotai';
|
import { useSetAtom } from 'jotai';
|
||||||
import { useCallback, useEffect } from 'react';
|
import { useCallback, useEffect } from 'react';
|
||||||
|
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import { useDocMetaHelper } from '@affine/core/hooks/use-block-suite-page-meta';
|
|||||||
import { useAFFiNEI18N } from '@affine/i18n/hooks';
|
import { useAFFiNEI18N } from '@affine/i18n/hooks';
|
||||||
import type { DragEndEvent, UniqueIdentifier } from '@dnd-kit/core';
|
import type { DragEndEvent, UniqueIdentifier } from '@dnd-kit/core';
|
||||||
import { Workspace } from '@toeverything/infra';
|
import { Workspace } from '@toeverything/infra';
|
||||||
import { useService } from '@toeverything/infra/di';
|
import { useService } from '@toeverything/infra';
|
||||||
import { useCallback } from 'react';
|
import { useCallback } from 'react';
|
||||||
|
|
||||||
import { useBlockSuiteMetaHelper } from './use-block-suite-meta-helper';
|
import { useBlockSuiteMetaHelper } from './use-block-suite-meta-helper';
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import type { Workspace } from '@toeverything/infra';
|
import type { Workspace } from '@toeverything/infra';
|
||||||
import { useService } from '@toeverything/infra/di';
|
import { useService } from '@toeverything/infra';
|
||||||
import { useDebouncedState } from 'foxact/use-debounced-state';
|
import { useDebouncedState } from 'foxact/use-debounced-state';
|
||||||
import { useEffect, useMemo } from 'react';
|
import { useEffect, useMemo } from 'react';
|
||||||
|
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import {
|
|||||||
type AppConfigSchema,
|
type AppConfigSchema,
|
||||||
AppConfigStorage,
|
AppConfigStorage,
|
||||||
defaultAppConfig,
|
defaultAppConfig,
|
||||||
} from '@toeverything/infra/app-config-storage';
|
} from '@toeverything/infra';
|
||||||
import { type Dispatch, useEffect, useState } from 'react';
|
import { type Dispatch, useEffect, useState } from 'react';
|
||||||
import { useMemo } from 'react';
|
import { useMemo } from 'react';
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import { apis, events, type UpdateMeta } from '@affine/electron-api';
|
import { apis, events, type UpdateMeta } from '@affine/electron-api';
|
||||||
import { isBrowser } from '@affine/env/constant';
|
import { isBrowser } from '@affine/env/constant';
|
||||||
import { appSettingAtom } from '@toeverything/infra/atom';
|
import { appSettingAtom } from '@toeverything/infra';
|
||||||
import { atom, useAtom, useAtomValue } from 'jotai';
|
import { atom, useAtom, useAtomValue } from 'jotai';
|
||||||
import { atomWithObservable, atomWithStorage } from 'jotai/utils';
|
import { atomWithObservable, atomWithStorage } from 'jotai/utils';
|
||||||
import { useCallback, useState } from 'react';
|
import { useCallback, useState } from 'react';
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import { useAFFiNEI18N } from '@affine/i18n/hooks';
|
import { useAFFiNEI18N } from '@affine/i18n/hooks';
|
||||||
import { Workspace } from '@toeverything/infra';
|
import { Workspace } from '@toeverything/infra';
|
||||||
import { useService } from '@toeverything/infra/di';
|
import { useService } from '@toeverything/infra';
|
||||||
import { useStore } from 'jotai';
|
import { useStore } from 'jotai';
|
||||||
import { useTheme } from 'next-themes';
|
import { useTheme } from 'next-themes';
|
||||||
import { useEffect } from 'react';
|
import { useEffect } from 'react';
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { WorkspaceManager, type WorkspaceMetadata } from '@toeverything/infra';
|
import { WorkspaceManager, type WorkspaceMetadata } from '@toeverything/infra';
|
||||||
import { useService } from '@toeverything/infra/di';
|
import { useService } from '@toeverything/infra';
|
||||||
import { useEffect, useState } from 'react';
|
import { useEffect, useState } from 'react';
|
||||||
|
|
||||||
import { useWorkspaceBlobObjectUrl } from './use-workspace-blob';
|
import { useWorkspaceBlobObjectUrl } from './use-workspace-blob';
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import type { WorkspaceMetadata } from '@toeverything/infra';
|
import type { WorkspaceMetadata } from '@toeverything/infra';
|
||||||
import { type Workspace, WorkspaceManager } from '@toeverything/infra';
|
import { type Workspace, WorkspaceManager } from '@toeverything/infra';
|
||||||
import { useService } from '@toeverything/infra/di';
|
import { useService } from '@toeverything/infra';
|
||||||
import { useEffect, useState } from 'react';
|
import { useEffect, useState } from 'react';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ import {
|
|||||||
useSensors,
|
useSensors,
|
||||||
} from '@dnd-kit/core';
|
} from '@dnd-kit/core';
|
||||||
import { PageRecordList, useLiveData, Workspace } from '@toeverything/infra';
|
import { PageRecordList, useLiveData, Workspace } from '@toeverything/infra';
|
||||||
import { useService } from '@toeverything/infra/di';
|
import { useService } from '@toeverything/infra';
|
||||||
import { useAtom, useAtomValue, useSetAtom } from 'jotai';
|
import { useAtom, useAtomValue, useSetAtom } from 'jotai';
|
||||||
import type { PropsWithChildren, ReactNode } from 'react';
|
import type { PropsWithChildren, ReactNode } from 'react';
|
||||||
import { lazy, Suspense, useCallback, useEffect, useState } from 'react';
|
import { lazy, Suspense, useCallback, useEffect, useState } from 'react';
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import type {
|
|||||||
DeletedCollection,
|
DeletedCollection,
|
||||||
} from '@affine/env/filter';
|
} from '@affine/env/filter';
|
||||||
import type { Workspace } from '@toeverything/infra';
|
import type { Workspace } from '@toeverything/infra';
|
||||||
import { LiveData } from '@toeverything/infra/livedata';
|
import { LiveData } from '@toeverything/infra';
|
||||||
import { Observable } from 'rxjs';
|
import { Observable } from 'rxjs';
|
||||||
import { Array as YArray } from 'yjs';
|
import { Array as YArray } from 'yjs';
|
||||||
|
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ import {
|
|||||||
useLiveData,
|
useLiveData,
|
||||||
Workspace,
|
Workspace,
|
||||||
} from '@toeverything/infra';
|
} from '@toeverything/infra';
|
||||||
import { useService } from '@toeverything/infra/di';
|
import { useService } from '@toeverything/infra';
|
||||||
import { assignInlineVars } from '@vanilla-extract/dynamic';
|
import { assignInlineVars } from '@vanilla-extract/dynamic';
|
||||||
import clsx from 'clsx';
|
import clsx from 'clsx';
|
||||||
import dayjs from 'dayjs';
|
import dayjs from 'dayjs';
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
import { IconButton, Tooltip } from '@affine/component';
|
import { IconButton, Tooltip } from '@affine/component';
|
||||||
import { useAFFiNEI18N } from '@affine/i18n/hooks';
|
import { useAFFiNEI18N } from '@affine/i18n/hooks';
|
||||||
import { ArrowLeftSmallIcon, ArrowRightSmallIcon } from '@blocksuite/icons';
|
import { ArrowLeftSmallIcon, ArrowRightSmallIcon } from '@blocksuite/icons';
|
||||||
import { useService } from '@toeverything/infra/di';
|
import { useService } from '@toeverything/infra';
|
||||||
import { useLiveData } from '@toeverything/infra/livedata';
|
import { useLiveData } from '@toeverything/infra';
|
||||||
import { useCallback, useEffect, useMemo } from 'react';
|
import { useCallback, useEffect, useMemo } from 'react';
|
||||||
|
|
||||||
import { useGeneralShortcuts } from '../../../hooks/affine/use-shortcuts';
|
import { useGeneralShortcuts } from '../../../hooks/affine/use-shortcuts';
|
||||||
|
|||||||
+2
-2
@@ -1,8 +1,8 @@
|
|||||||
import {
|
import {
|
||||||
PreconditionStrategy,
|
PreconditionStrategy,
|
||||||
registerAffineCommand,
|
registerAffineCommand,
|
||||||
} from '@toeverything/infra/command';
|
} from '@toeverything/infra';
|
||||||
import { useService } from '@toeverything/infra/di';
|
import { useService } from '@toeverything/infra';
|
||||||
import { useEffect } from 'react';
|
import { useEffect } from 'react';
|
||||||
|
|
||||||
import { Navigator } from '../entities/navigator';
|
import { Navigator } from '../entities/navigator';
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { LiveData } from '@toeverything/infra/livedata';
|
import type { GlobalState } from '@toeverything/infra';
|
||||||
import type { GlobalState } from '@toeverything/infra/storage';
|
import { LiveData } from '@toeverything/infra';
|
||||||
|
|
||||||
import type { RightSidebarView } from './right-sidebar-view';
|
import type { RightSidebarView } from './right-sidebar-view';
|
||||||
|
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
import { ResizePanel } from '@affine/component/resize-panel';
|
import { ResizePanel } from '@affine/component/resize-panel';
|
||||||
import { appSidebarOpenAtom } from '@affine/core/components/app-sidebar';
|
import { appSidebarOpenAtom } from '@affine/core/components/app-sidebar';
|
||||||
import { appSettingAtom } from '@toeverything/infra/atom';
|
import { appSettingAtom } from '@toeverything/infra';
|
||||||
import { useService } from '@toeverything/infra/di';
|
import { useService } from '@toeverything/infra';
|
||||||
import { useLiveData } from '@toeverything/infra/livedata';
|
import { useLiveData } from '@toeverything/infra';
|
||||||
import { useAtomValue } from 'jotai';
|
import { useAtomValue } from 'jotai';
|
||||||
import { useCallback, useEffect, useState } from 'react';
|
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 { type Location } from 'history';
|
||||||
import { useEffect } from 'react';
|
import { useEffect } from 'react';
|
||||||
// eslint-disable-next-line @typescript-eslint/no-restricted-imports
|
// 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 { WindowsAppControls } from '@affine/core/components/pure/header/windows-app-controls';
|
||||||
import { RightSidebarIcon } from '@blocksuite/icons';
|
import { RightSidebarIcon } from '@blocksuite/icons';
|
||||||
import { useLiveData } from '@toeverything/infra';
|
import { useLiveData } from '@toeverything/infra';
|
||||||
import { useService } from '@toeverything/infra/di';
|
import { useService } from '@toeverything/infra';
|
||||||
import { useAtomValue } from 'jotai';
|
import { useAtomValue } from 'jotai';
|
||||||
import { Suspense, useCallback } from 'react';
|
import { Suspense, useCallback } from 'react';
|
||||||
|
|
||||||
|
|||||||
@@ -7,8 +7,8 @@ import {
|
|||||||
SoloViewIcon,
|
SoloViewIcon,
|
||||||
} from '@blocksuite/icons';
|
} from '@blocksuite/icons';
|
||||||
import { useSortable } from '@dnd-kit/sortable';
|
import { useSortable } from '@dnd-kit/sortable';
|
||||||
import { useService } from '@toeverything/infra/di';
|
import { useService } from '@toeverything/infra';
|
||||||
import { useLiveData } from '@toeverything/infra/livedata';
|
import { useLiveData } from '@toeverything/infra';
|
||||||
import { assignInlineVars } from '@vanilla-extract/dynamic';
|
import { assignInlineVars } from '@vanilla-extract/dynamic';
|
||||||
import type { SetStateAction } from 'jotai';
|
import type { SetStateAction } from 'jotai';
|
||||||
import {
|
import {
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ import {
|
|||||||
horizontalListSortingStrategy,
|
horizontalListSortingStrategy,
|
||||||
SortableContext,
|
SortableContext,
|
||||||
} from '@dnd-kit/sortable';
|
} from '@dnd-kit/sortable';
|
||||||
import { useService } from '@toeverything/infra/di';
|
import { useService } from '@toeverything/infra';
|
||||||
import clsx from 'clsx';
|
import clsx from 'clsx';
|
||||||
import {
|
import {
|
||||||
type HTMLAttributes,
|
type HTMLAttributes,
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { useService } from '@toeverything/infra/di';
|
import { useService } from '@toeverything/infra';
|
||||||
import { useEffect, useState } from 'react';
|
import { useEffect, useState } from 'react';
|
||||||
|
|
||||||
import type { View } from '../entities/view';
|
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 { lazy as reactLazy, useEffect, useMemo } from 'react';
|
||||||
import {
|
import {
|
||||||
createMemoryRouter,
|
createMemoryRouter,
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import { useAppSettingHelper } from '@affine/core/hooks/affine/use-app-setting-helper';
|
import { useAppSettingHelper } from '@affine/core/hooks/affine/use-app-setting-helper';
|
||||||
import { useService } from '@toeverything/infra/di';
|
import { useService } from '@toeverything/infra';
|
||||||
import { useLiveData } from '@toeverything/infra/livedata';
|
import { useLiveData } from '@toeverything/infra';
|
||||||
import type { To } from 'history';
|
import type { To } from 'history';
|
||||||
import { useCallback } from 'react';
|
import { useCallback } from 'react';
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { useService } from '@toeverything/infra/di';
|
import { useService } from '@toeverything/infra';
|
||||||
import { useLiveData } from '@toeverything/infra/livedata';
|
import { useLiveData } from '@toeverything/infra';
|
||||||
import { useCallback, useEffect, useRef } from 'react';
|
import { useCallback, useEffect, useRef } from 'react';
|
||||||
import { useLocation } from 'react-router-dom';
|
import { useLocation } from 'react-router-dom';
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import type { Workspace } from '@toeverything/infra';
|
import type { Workspace } from '@toeverything/infra';
|
||||||
import { LiveData } from '@toeverything/infra/livedata';
|
import { LiveData } from '@toeverything/infra';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* service to manage current workspace
|
* service to manage current workspace
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import type { Tag } from '@affine/env/filter';
|
import type { Tag } from '@affine/env/filter';
|
||||||
import type { DocsPropertiesMeta } from '@blocksuite/store';
|
import type { DocsPropertiesMeta } from '@blocksuite/store';
|
||||||
import { LiveData } from '@toeverything/infra/livedata';
|
import type { Workspace } from '@toeverything/infra';
|
||||||
import type { Workspace } from '@toeverything/infra/workspace';
|
import { LiveData } from '@toeverything/infra';
|
||||||
import { Observable } from 'rxjs';
|
import { Observable } from 'rxjs';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -17,8 +17,8 @@ import {
|
|||||||
ViewLayersIcon,
|
ViewLayersIcon,
|
||||||
} from '@blocksuite/icons';
|
} from '@blocksuite/icons';
|
||||||
import { Workspace } from '@toeverything/infra';
|
import { Workspace } from '@toeverything/infra';
|
||||||
import { useService } from '@toeverything/infra/di';
|
import { useService } from '@toeverything/infra';
|
||||||
import { useLiveData } from '@toeverything/infra/livedata';
|
import { useLiveData } from '@toeverything/infra';
|
||||||
import { useSetAtom } from 'jotai';
|
import { useSetAtom } from 'jotai';
|
||||||
import { useCallback, useEffect, useState } from 'react';
|
import { useCallback, useEffect, useState } from 'react';
|
||||||
import { useParams } from 'react-router-dom';
|
import { useParams } from 'react-router-dom';
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
import { useWorkspace } from '@affine/core/hooks/use-workspace';
|
import { useWorkspace } from '@affine/core/hooks/use-workspace';
|
||||||
import type { Workspace } from '@toeverything/infra';
|
import type { Workspace } from '@toeverything/infra';
|
||||||
import { WorkspaceListService, WorkspaceManager } from '@toeverything/infra';
|
import { WorkspaceListService, WorkspaceManager } from '@toeverything/infra';
|
||||||
import { ServiceProviderContext, useService } from '@toeverything/infra/di';
|
import { ServiceProviderContext, useService } from '@toeverything/infra';
|
||||||
import { useLiveData } from '@toeverything/infra/livedata';
|
import { useLiveData } from '@toeverything/infra';
|
||||||
import { type ReactElement, Suspense, useEffect, useMemo } from 'react';
|
import { type ReactElement, Suspense, useEffect, useMemo } from 'react';
|
||||||
import { useParams } from 'react-router-dom';
|
import { useParams } from 'react-router-dom';
|
||||||
|
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ import { assertExists } from '@blocksuite/global/utils';
|
|||||||
import { DeleteIcon } from '@blocksuite/icons';
|
import { DeleteIcon } from '@blocksuite/icons';
|
||||||
import type { DocMeta } from '@blocksuite/store';
|
import type { DocMeta } from '@blocksuite/store';
|
||||||
import { Workspace } from '@toeverything/infra';
|
import { Workspace } from '@toeverything/infra';
|
||||||
import { useService } from '@toeverything/infra/di';
|
import { useService } from '@toeverything/infra';
|
||||||
import { useCallback } from 'react';
|
import { useCallback } from 'react';
|
||||||
|
|
||||||
import { ViewBodyIsland, ViewHeaderIsland } from '../../modules/workbench';
|
import { ViewBodyIsland, ViewHeaderIsland } from '../../modules/workbench';
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
import { events } from '@affine/electron-api';
|
import { events } from '@affine/electron-api';
|
||||||
import { WorkspaceFlavour } from '@affine/env/workspace';
|
import { WorkspaceFlavour } from '@affine/env/workspace';
|
||||||
import { WorkspaceManager } from '@toeverything/infra';
|
import { WorkspaceManager } from '@toeverything/infra';
|
||||||
import { useService } from '@toeverything/infra/di';
|
import { useService } from '@toeverything/infra';
|
||||||
import { useLiveData } from '@toeverything/infra/livedata';
|
import { useLiveData } from '@toeverything/infra';
|
||||||
import { useAtom } from 'jotai';
|
import { useAtom } from 'jotai';
|
||||||
import {
|
import {
|
||||||
lazy,
|
lazy,
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { LiveData, useLiveData } from '@toeverything/infra/livedata';
|
import { LiveData, useLiveData } from '@toeverything/infra';
|
||||||
import { useEffect, useRef } from 'react';
|
import { useEffect, useRef } from 'react';
|
||||||
import { createPortal } from 'react-dom';
|
import { createPortal } from 'react-dom';
|
||||||
|
|
||||||
|
|||||||
@@ -16,8 +16,8 @@ import createEmotionCache from '@affine/core/utils/create-emotion-cache';
|
|||||||
import { configureWebServices } from '@affine/core/web';
|
import { configureWebServices } from '@affine/core/web';
|
||||||
import { createI18n, setUpLanguage } from '@affine/i18n';
|
import { createI18n, setUpLanguage } from '@affine/i18n';
|
||||||
import { CacheProvider } from '@emotion/react';
|
import { CacheProvider } from '@emotion/react';
|
||||||
import { getCurrentStore } from '@toeverything/infra/atom';
|
import { getCurrentStore } from '@toeverything/infra';
|
||||||
import { ServiceCollection } from '@toeverything/infra/di';
|
import { ServiceCollection } from '@toeverything/infra';
|
||||||
import mixpanel from 'mixpanel-browser';
|
import mixpanel from 'mixpanel-browser';
|
||||||
import type { PropsWithChildren, ReactElement } from 'react';
|
import type { PropsWithChildren, ReactElement } from 'react';
|
||||||
import { lazy, Suspense } from 'react';
|
import { lazy, Suspense } from 'react';
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ import {
|
|||||||
SqliteConnection,
|
SqliteConnection,
|
||||||
ValidationResult,
|
ValidationResult,
|
||||||
} from '@affine/native';
|
} from '@affine/native';
|
||||||
import { WorkspaceVersion } from '@toeverything/infra/blocksuite';
|
import { WorkspaceVersion } from '@toeverything/infra';
|
||||||
|
|
||||||
import { applyGuidCompatibilityFix, migrateToLatest } from '../db/migration';
|
import { applyGuidCompatibilityFix, migrateToLatest } from '../db/migration';
|
||||||
import { logger } from '../logger';
|
import { logger } from '../logger';
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ import {
|
|||||||
migrateGuidCompatibility,
|
migrateGuidCompatibility,
|
||||||
migrateToSubdoc,
|
migrateToSubdoc,
|
||||||
WorkspaceVersion,
|
WorkspaceVersion,
|
||||||
} from '@toeverything/infra/blocksuite';
|
} from '@toeverything/infra';
|
||||||
import fs from 'fs-extra';
|
import fs from 'fs-extra';
|
||||||
import { nanoid } from 'nanoid';
|
import { nanoid } from 'nanoid';
|
||||||
import { applyUpdate, Doc as YDoc, encodeStateAsUpdate } from 'yjs';
|
import { applyUpdate, Doc as YDoc, encodeStateAsUpdate } from 'yjs';
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import path from 'node:path';
|
import path from 'node:path';
|
||||||
|
|
||||||
import { ValidationResult } from '@affine/native';
|
import { ValidationResult } from '@affine/native';
|
||||||
import { WorkspaceVersion } from '@toeverything/infra/blocksuite';
|
import { WorkspaceVersion } from '@toeverything/infra';
|
||||||
import fs from 'fs-extra';
|
import fs from 'fs-extra';
|
||||||
import { nanoid } from 'nanoid';
|
import { nanoid } from 'nanoid';
|
||||||
|
|
||||||
|
|||||||
@@ -1,10 +1,7 @@
|
|||||||
import fs from 'node:fs';
|
import fs from 'node:fs';
|
||||||
import path from 'node:path';
|
import path from 'node:path';
|
||||||
|
|
||||||
import {
|
import { AppConfigStorage, defaultAppConfig } from '@toeverything/infra';
|
||||||
AppConfigStorage,
|
|
||||||
defaultAppConfig,
|
|
||||||
} from '@toeverything/infra/app-config-storage';
|
|
||||||
import { app } from 'electron';
|
import { app } from 'electron';
|
||||||
|
|
||||||
const FILENAME = 'config.json';
|
const FILENAME = 'config.json';
|
||||||
|
|||||||
@@ -16,8 +16,8 @@ import createEmotionCache from '@affine/core/utils/create-emotion-cache';
|
|||||||
import { configureWebServices } from '@affine/core/web';
|
import { configureWebServices } from '@affine/core/web';
|
||||||
import { createI18n, setUpLanguage } from '@affine/i18n';
|
import { createI18n, setUpLanguage } from '@affine/i18n';
|
||||||
import { CacheProvider } from '@emotion/react';
|
import { CacheProvider } from '@emotion/react';
|
||||||
import { getCurrentStore } from '@toeverything/infra/atom';
|
import { getCurrentStore } from '@toeverything/infra';
|
||||||
import { ServiceCollection } from '@toeverything/infra/di';
|
import { ServiceCollection } from '@toeverything/infra';
|
||||||
import mixpanel from 'mixpanel-browser';
|
import mixpanel from 'mixpanel-browser';
|
||||||
import type { PropsWithChildren, ReactElement } from 'react';
|
import type { PropsWithChildren, ReactElement } from 'react';
|
||||||
import { lazy, Suspense } from 'react';
|
import { lazy, Suspense } from 'react';
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
import { WorkspaceFlavour } from '@affine/env/workspace';
|
import { WorkspaceFlavour } from '@affine/env/workspace';
|
||||||
import type { WorkspaceFactory } from '@toeverything/infra';
|
import type { WorkspaceFactory } from '@toeverything/infra';
|
||||||
|
import type { ServiceCollection } from '@toeverything/infra';
|
||||||
import {
|
import {
|
||||||
AwarenessContext,
|
AwarenessContext,
|
||||||
AwarenessProvider,
|
AwarenessProvider,
|
||||||
@@ -8,7 +9,6 @@ import {
|
|||||||
WorkspaceIdContext,
|
WorkspaceIdContext,
|
||||||
WorkspaceScope,
|
WorkspaceScope,
|
||||||
} from '@toeverything/infra';
|
} from '@toeverything/infra';
|
||||||
import type { ServiceCollection } from '@toeverything/infra/di';
|
|
||||||
|
|
||||||
import { LocalWorkspaceFactory } from '../local';
|
import { LocalWorkspaceFactory } from '../local';
|
||||||
import { IndexedDBBlobStorage } from '../local/blob-indexeddb';
|
import { IndexedDBBlobStorage } from '../local/blob-indexeddb';
|
||||||
|
|||||||
@@ -7,14 +7,14 @@ import { useDarkMode } from 'storybook-dark-mode';
|
|||||||
import { AffineContext } from '@affine/component/context';
|
import { AffineContext } from '@affine/component/context';
|
||||||
import useSWR from 'swr';
|
import useSWR from 'swr';
|
||||||
import type { Decorator } from '@storybook/react';
|
import type { Decorator } from '@storybook/react';
|
||||||
import { _setCurrentStore } from '@toeverything/infra/atom';
|
import { _setCurrentStore } from '@toeverything/infra';
|
||||||
import { setupGlobal, type Environment } from '@affine/env/global';
|
import { setupGlobal, type Environment } from '@affine/env/global';
|
||||||
|
|
||||||
import type { Preview } from '@storybook/react';
|
import type { Preview } from '@storybook/react';
|
||||||
import { useLayoutEffect, useRef } from 'react';
|
import { useLayoutEffect, useRef } from 'react';
|
||||||
import { setup } from '@affine/core/bootstrap/setup';
|
import { setup } from '@affine/core/bootstrap/setup';
|
||||||
import { WorkspaceFlavour } from '@affine/env/workspace';
|
import { WorkspaceFlavour } from '@affine/env/workspace';
|
||||||
import { ServiceCollection } from '@toeverything/infra/di';
|
import { ServiceCollection } from '@toeverything/infra';
|
||||||
import {
|
import {
|
||||||
WorkspaceManager,
|
WorkspaceManager,
|
||||||
configureInfraServices,
|
configureInfraServices,
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ import { expect } from '@storybook/jest';
|
|||||||
import type { Meta, StoryFn } from '@storybook/react';
|
import type { Meta, StoryFn } from '@storybook/react';
|
||||||
import { Workspace } from '@toeverything/infra';
|
import { Workspace } from '@toeverything/infra';
|
||||||
import { initEmptyPage } from '@toeverything/infra';
|
import { initEmptyPage } from '@toeverything/infra';
|
||||||
import { useService } from '@toeverything/infra/di';
|
import { useService } from '@toeverything/infra';
|
||||||
import { nanoid } from 'nanoid';
|
import { nanoid } from 'nanoid';
|
||||||
import { useEffect, useState } from 'react';
|
import { useEffect, useState } from 'react';
|
||||||
|
|
||||||
|
|||||||
+1
-4
@@ -67,7 +67,7 @@
|
|||||||
"@affine-test/kit/*": ["./tests/kit/*"],
|
"@affine-test/kit/*": ["./tests/kit/*"],
|
||||||
"@affine-test/fixtures/*": ["./tests/fixtures/*"],
|
"@affine-test/fixtures/*": ["./tests/fixtures/*"],
|
||||||
"@toeverything/y-indexeddb": ["./packages/common/y-indexeddb/src"],
|
"@toeverything/y-indexeddb": ["./packages/common/y-indexeddb/src"],
|
||||||
"@toeverything/infra/*": ["./packages/common/infra/src/*"],
|
"@toeverything/infra": ["./packages/common/infra/src"],
|
||||||
"@affine/native": ["./packages/frontend/native/index.d.ts"],
|
"@affine/native": ["./packages/frontend/native/index.d.ts"],
|
||||||
"@affine/native/*": ["./packages/frontend/native/*"],
|
"@affine/native/*": ["./packages/frontend/native/*"],
|
||||||
"@affine/storage": ["./packages/backend/storage/index.d.ts"],
|
"@affine/storage": ["./packages/backend/storage/index.d.ts"],
|
||||||
@@ -119,9 +119,6 @@
|
|||||||
{
|
{
|
||||||
"path": "./packages/common/infra"
|
"path": "./packages/common/infra"
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"path": "./packages/common/infra"
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"path": "./packages/common/y-indexeddb"
|
"path": "./packages/common/y-indexeddb"
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user