chore: sort imports

This commit is contained in:
DarkSky
2022-08-13 03:16:26 +08:00
parent 5462b1707f
commit 754b2581cd
198 changed files with 839 additions and 917 deletions
+2 -2
View File
@@ -184,11 +184,11 @@ export const getDataExporter = () => {
return { importData, exportData, hasExporter, installExporter };
};
export { YjsAdapter } from './yjs';
export type { YjsContentOperation, YjsInitOptions } from './yjs';
export type {
AsyncDatabaseAdapter,
BlockPosition,
BlockInstance,
ContentOperation,
};
export type { YjsInitOptions, YjsContentOperation } from './yjs';
export { YjsAdapter } from './yjs';
+3 -3
View File
@@ -5,12 +5,12 @@ import {
transact,
} from 'yjs';
import { BlockInstance, BlockListener, HistoryManager } from '../index';
import { BlockItem, BlockTypes } from '../../types';
import { BlockInstance, BlockListener, HistoryManager } from '../index';
import { YjsContentOperation } from './operation';
import { ChildrenListenerHandler, ContentListenerHandler } from './listener';
import { YjsHistoryManager } from './history';
import { ChildrenListenerHandler, ContentListenerHandler } from './listener';
import { YjsContentOperation } from './operation';
const GET_BLOCK_ITEM = Symbol('GET_BLOCK_ITEM');
+13 -14
View File
@@ -5,17 +5,17 @@ import { Buffer } from 'buffer';
import { saveAs } from 'file-saver';
import { fromEvent } from 'file-selector';
import LRUCache from 'lru-cache';
import { debounce } from 'ts-debounce';
import { nanoid } from 'nanoid';
import { debounce } from 'ts-debounce';
import { Awareness } from 'y-protocols/awareness.js';
import {
Doc,
Array as YArray,
Map as YMap,
transact,
encodeStateAsUpdate,
applyUpdate,
Array as YArray,
Doc,
encodeStateAsUpdate,
Map as YMap,
snapshot,
transact,
} from 'yjs';
import {
@@ -31,12 +31,12 @@ import { getLogger, sha3, sleep } from '../../utils';
import { YjsRemoteBinaries } from './binary';
import { YjsBlockInstance } from './block';
import { GateKeeper } from './gatekeeper';
import {
YjsContentOperation,
DO_NOT_USE_THIS_OR_YOU_WILL_BE_FIRED_SYMBOL_INTO_INNER as INTO_INNER,
} from './operation';
import { EmitEvents, Suspend } from './listener';
import { YjsHistoryManager } from './history';
import { EmitEvents, Suspend } from './listener';
import {
DO_NOT_USE_THIS_OR_YOU_WILL_BE_FIRED_SYMBOL_INTO_INNER as INTO_INNER,
YjsContentOperation,
} from './operation';
import { YjsProvider } from './provider';
declare const JWT_DEV: boolean;
@@ -142,6 +142,8 @@ async function _initYjsDatabase(
export type { YjsBlockInstance } from './block';
export type { YjsContentOperation } from './operation';
export { getYjsProviders } from './provider';
export type { YjsProviderOptions } from './provider';
export type YjsInitOptions = {
userId?: string;
@@ -149,9 +151,6 @@ export type YjsInitOptions = {
provider?: Record<string, YjsProvider>;
};
export { getYjsProviders } from './provider';
export type { YjsProviderOptions } from './provider';
export class YjsAdapter implements AsyncDatabaseAdapter<YjsContentOperation> {
private readonly _provider: YjsProviders;
private readonly _doc: Doc; // doc instance
@@ -1,5 +1,5 @@
import { Doc } from 'yjs';
import { Awareness } from 'y-protocols/awareness.js';
import { Doc } from 'yjs';
import {
IndexedDBProvider,