fix no-duplicate-imports

pull/8572/head
topce 2021-04-05 09:10:35 +02:00
parent f7c56c0917
commit d7b8491b8e
153 changed files with 170 additions and 380 deletions

View File

@ -1,5 +1,4 @@
import { h, thunk } from 'snabbdom';
import { VNode, VNodeData } from 'snabbdom';
import { h, thunk, VNode, VNodeData } from 'snabbdom';
import AnalyseCtrl from './ctrl';
import { findTag } from './study/studyChapters';
import * as game from 'game';

View File

@ -1,8 +1,6 @@
import { isEmpty } from 'common';
import modal from 'common/modal';
import { h } from 'snabbdom';
import { VNode } from 'snabbdom';
import { Hooks } from 'snabbdom';
import { h, VNode, Hooks } from 'snabbdom';
import { MaybeVNodes } from './interfaces';
import { AutoplayDelay } from './autoplay';
import { boolSetting, BoolSetting } from './boolSetting';

View File

@ -1,5 +1,4 @@
import { h } from 'snabbdom';
import { VNode } from 'snabbdom';
import { h, VNode } from 'snabbdom';
import AnalyseCtrl from './ctrl';
import { isFinished } from './study/studyChapters';

View File

@ -43,7 +43,6 @@ import { storedProp, StoredBooleanProp } from 'common/storage';
import { StudyCtrl } from './study/interfaces';
import { StudyPracticeCtrl } from './study/practice/interfaces';
import { valid as crazyValid } from './crazy/crazyCtrl';
import { treeReconstruct } from './util';
export default class AnalyseCtrl {
data: AnalyseData;
@ -187,7 +186,7 @@ export default class AnalyseCtrl {
this.ongoing = !this.synthetic && game.playable(data);
const prevTree = merge && this.tree.root;
this.tree = makeTree(treeReconstruct(this.data.treeParts));
this.tree = makeTree(util.treeReconstruct(this.data.treeParts));
if (prevTree) this.tree.merge(prevTree);
this.actionMenu = new ActionMenuCtrl();

View File

@ -1,5 +1,4 @@
import { h } from 'snabbdom';
import { VNode } from 'snabbdom';
import { h, VNode } from 'snabbdom';
import { prop } from 'common';
import { storedProp, storedJsonProp } from 'common/storage';
import { bind, dataIcon } from '../util';

View File

@ -1,5 +1,4 @@
import { h } from 'snabbdom';
import { VNode } from 'snabbdom';
import { h, VNode } from 'snabbdom';
import { numberFormat } from 'common/number';
import { view as renderConfig } from './explorerConfig';
import { bind, dataIcon } from '../util';

View File

@ -1,5 +1,4 @@
import { h } from 'snabbdom';
import { VNode } from 'snabbdom';
import { h, VNode } from 'snabbdom';
import { ForecastCtrl, ForecastStep } from './interfaces';
import AnalyseCtrl from '../ctrl';
import { renderNodesHtml } from '../pgnExport';

View File

@ -1,5 +1,4 @@
import { h } from 'snabbdom';
import { VNode } from 'snabbdom';
import { h, VNode } from 'snabbdom';
import { Chessground } from 'chessground';
import { Api as CgApi } from 'chessground/api';
import { Config as CgConfig } from 'chessground/config';

View File

@ -1,10 +1,9 @@
import * as control from './control';
import * as xhr from 'common/xhr';
import AnalyseCtrl from './ctrl';
import { h } from 'snabbdom';
import { h, VNode } from 'snabbdom';
import { modal } from './modal';
import { spinner } from './util';
import { VNode } from 'snabbdom';
export const bind = (ctrl: AnalyseCtrl) => {
const kbd = window.Mousetrap;

View File

@ -1,15 +1,13 @@
import AnalyseCtrl from './ctrl';
import { attributesModule } from 'snabbdom';
import { attributesModule, classModule, init, VNode } from 'snabbdom';
import boot from './boot';
import { classModule } from 'snabbdom';
import LichessChat from 'chat';
// eslint-disable-next-line no-duplicate-imports
import makeCtrl from './ctrl';
import menuHover from 'common/menuHover';
import view from './view';
import { AnalyseApi, AnalyseOpts } from './interfaces';
import { Chessground } from 'chessground';
import { init } from 'snabbdom';
import { VNode } from 'snabbdom';
export const patch = init([classModule, attributesModule]);

View File

@ -1,5 +1,4 @@
import { h } from 'snabbdom';
import { VNode } from 'snabbdom';
import { h, VNode } from 'snabbdom';
import { MaybeVNodes } from './interfaces';
import { bind, onInsert } from './util';

View File

@ -1,5 +1,4 @@
import { h } from 'snabbdom';
import { VNode } from 'snabbdom';
import { h, VNode } from 'snabbdom';
import { fixCrazySan } from 'chess';
import { defined } from 'common';
import { view as cevalView, renderEval as normalizeEval } from 'ceval';

View File

@ -1,5 +1,4 @@
import { h } from 'snabbdom';
import { VNode } from 'snabbdom';
import { h, VNode } from 'snabbdom';
import { prop, Prop } from 'common';
import * as xhr from 'common/xhr';
import AnalyseController from '../ctrl';
@ -16,17 +15,15 @@ import {
prefixSetting,
boardSetting,
positionSetting,
} from 'nvui/chess';
import {
boardCommandsHandler,
selectionHandler,
arrowKeyHandler,
positionJumpHandler,
pieceJumpingHandler,
Style,
} from 'nvui/chess';
import { renderSetting } from 'nvui/setting';
import { Notify } from 'nvui/notify';
import { Style } from 'nvui/chess';
import { commands } from 'nvui/command';
import * as moveView from '../moveView';
import { bind } from '../util';

View File

@ -1,5 +1,4 @@
import { winningChances } from 'ceval';
import { Eval } from 'ceval';
import { winningChances, Eval } from 'ceval';
import { path as treePath } from 'tree';
import { detectThreefold } from '../nodeFinder';
import { tablebaseGuaranteed } from '../explorer/explorerCtrl';

View File

@ -1,7 +1,6 @@
import { Outcome } from 'chessops/types';
import { bind } from '../util';
import { h } from 'snabbdom';
import { VNode } from 'snabbdom';
import { h, VNode } from 'snabbdom';
import { PracticeCtrl, Comment } from './practiceCtrl';
import AnalyseCtrl from '../ctrl';
import { MaybeVNodes } from '../interfaces';

View File

@ -2,8 +2,7 @@ import { renderIndexAndMove } from '../moveView';
import { RetroCtrl } from './retroCtrl';
import AnalyseCtrl from '../ctrl';
import { bind, dataIcon, spinner } from '../util';
import { h } from 'snabbdom';
import { VNode } from 'snabbdom';
import { h, VNode } from 'snabbdom';
function skipOrViewSolution(ctrl: RetroCtrl) {
return h('div.choices', [

View File

@ -1,5 +1,4 @@
import { h } from 'snabbdom';
import { VNode } from 'snabbdom';
import { h, VNode } from 'snabbdom';
import { defined, prop, Prop } from 'common';
import { Redraw } from '../interfaces';
import { bind, bindSubmit, spinner, option, onInsert, emptyRedButton } from '../util';

View File

@ -1,5 +1,4 @@
import { h } from 'snabbdom';
import { VNode } from 'snabbdom';
import { h, VNode } from 'snabbdom';
import { defined, prop, Prop } from 'common';
import { storedProp, StoredProp } from 'common/storage';
import * as xhr from 'common/xhr';

View File

@ -1,5 +1,4 @@
import { h } from 'snabbdom';
import { VNode } from 'snabbdom';
import { h, VNode } from 'snabbdom';
import { currentComments } from './studyComments';
import { nodeFullName, bind } from '../util';
import { prop, Prop } from 'common';

View File

@ -1,5 +1,4 @@
import { h } from 'snabbdom';
import { VNode } from 'snabbdom';
import { h, VNode } from 'snabbdom';
import { StudyCtrl } from './interfaces';
import { bind, richHTML, onInsert } from '../util';

View File

@ -1,5 +1,4 @@
import { h } from 'snabbdom';
import { VNode } from 'snabbdom';
import { h, VNode } from 'snabbdom';
import { bind, dataIcon } from '../../util';
import AnalyseCtrl from '../../ctrl';
import { StudyCtrl } from '../interfaces';

View File

@ -2,10 +2,8 @@ import * as control from '../../control';
import AnalyseCtrl from '../../ctrl';
import throttle from 'common/throttle';
import { bind, iconTag } from '../../util';
import { h } from 'snabbdom';
import { Hooks } from 'snabbdom';
import { h, Hooks, VNode } from 'snabbdom';
import { MaybeVNodes } from '../../interfaces';
import { VNode } from 'snabbdom';
export function running(ctrl: AnalyseCtrl): boolean {
return (

View File

@ -1,7 +1,7 @@
import { h } from 'snabbdom';
import { VNode } from 'snabbdom';
import { h, VNode } from 'snabbdom';
import GamebookPlayCtrl from './gamebookPlayCtrl';
import { bind, dataIcon, iconTag, richHTML } from '../../util';
// eslint-disable-next-line no-duplicate-imports
import { State } from './gamebookPlayCtrl';
const defaultComments = {

View File

@ -1,9 +1,8 @@
import { bind, titleNameToId, onInsert } from '../util';
import { h } from 'snabbdom';
import { h, VNode } from 'snabbdom';
import { modal } from '../modal';
import { prop, Prop } from 'common';
import { StudyMemberMap } from './interfaces';
import { VNode } from 'snabbdom';
export function makeCtrl(
send: SocketSend,

View File

@ -1,5 +1,4 @@
import { h } from 'snabbdom';
import { VNode } from 'snabbdom';
import { h, VNode } from 'snabbdom';
import { opposite } from 'chessground/util';
import { StudyCtrl, ChapterPreview, ChapterPreviewPlayer, Position } from './interfaces';
import { MaybeVNodes } from '../interfaces';

View File

@ -1,5 +1,4 @@
import { h } from 'snabbdom';
import { VNode } from 'snabbdom';
import { h, VNode } from 'snabbdom';
interface Notif {
duration: number;

View File

@ -1,5 +1,4 @@
import { h } from 'snabbdom';
import { VNode } from 'snabbdom';
import { h, VNode } from 'snabbdom';
import { ops as treeOps } from 'tree';
import { TagArray } from './interfaces';
import renderClocks from '../clocks';

View File

@ -1,5 +1,4 @@
import { h, thunk } from 'snabbdom';
import { VNode } from 'snabbdom';
import { h, thunk, VNode } from 'snabbdom';
import { plural, bind, spinner, richHTML, option } from '../../util';
import { StudyCtrl } from '../interfaces';
import { MaybeVNodes } from '../../interfaces';

View File

@ -1,5 +1,4 @@
import { h } from 'snabbdom';
import { VNode } from 'snabbdom';
import { h, VNode } from 'snabbdom';
import AnalyseCtrl from '../../ctrl';
import { innerHTML } from '../../util';
import { view as multiBoardView } from '../multiBoard';

View File

@ -1,5 +1,4 @@
import { h } from 'snabbdom';
import { VNode } from 'snabbdom';
import { h, VNode } from 'snabbdom';
import RelayCtrl from './relayCtrl';
import { dataIcon, bind, onInsert } from '../../util';
import { LogEvent } from './interfaces';

View File

@ -1,8 +1,7 @@
import AnalyseCtrl from '../ctrl';
import { h } from 'snabbdom';
import { h, VNode } from 'snabbdom';
import { Prop, prop, defined } from 'common';
import { spinner, bind, onInsert } from '../util';
import { VNode } from 'snabbdom';
export interface ServerEvalCtrl {
requested: Prop<boolean>;

View File

@ -1,5 +1,4 @@
import { h } from 'snabbdom';
import { VNode } from 'snabbdom';
import { h, VNode } from 'snabbdom';
import { prop, Prop } from 'common';
import { bind, dataIcon, iconTag, scrollTo } from '../util';
import { ctrl as chapterNewForm, StudyChapterNewFormCtrl } from './chapterNewForm';

View File

@ -1,5 +1,4 @@
import { h } from 'snabbdom';
import { VNode } from 'snabbdom';
import { h, VNode } from 'snabbdom';
import AnalyseCtrl from '../ctrl';
import { nodeFullName, bind, richHTML } from '../util';
import { StudyCtrl } from './interfaces';

View File

@ -1,5 +1,4 @@
import { h } from 'snabbdom';
import { VNode } from 'snabbdom';
import { h, VNode } from 'snabbdom';
import * as modal from '../modal';
import { prop, Prop } from 'common';
import { bind, bindSubmit, emptyRedButton } from '../util';

View File

@ -1,5 +1,4 @@
import { h } from 'snabbdom';
import { VNode } from 'snabbdom';
import { h, VNode } from 'snabbdom';
import * as xhr from './studyXhr';
import { prop, Prop } from 'common';
import throttle from 'common/throttle';

View File

@ -1,5 +1,4 @@
import { h } from 'snabbdom';
import { VNode } from 'snabbdom';
import { h, VNode } from 'snabbdom';
import { titleNameToId, bind, dataIcon, iconTag, onInsert, scrollTo } from '../util';
import { prop, Prop } from 'common';
import { makeCtrl as inviteFormCtrl } from './inviteForm';

View File

@ -1,5 +1,4 @@
import { h } from 'snabbdom';
import { VNode } from 'snabbdom';
import { h, VNode } from 'snabbdom';
import { bind, baseUrl } from '../util';
import { prop, Prop } from 'common';
import { renderIndexAndMove } from '../moveView';

View File

@ -1,5 +1,4 @@
import { h, thunk } from 'snabbdom';
import { VNode } from 'snabbdom';
import { h, thunk, VNode } from 'snabbdom';
import throttle from 'common/throttle';
import { option, onInsert } from '../util';
import AnalyseCtrl from '../ctrl';

View File

@ -1,5 +1,4 @@
import { h } from 'snabbdom';
import { VNode } from 'snabbdom';
import { h, VNode } from 'snabbdom';
import { bind, dataIcon, iconTag, richHTML } from '../util';
import { view as memberView } from './studyMembers';
import { view as chapterView } from './studyChapters';

View File

@ -1,11 +1,10 @@
import * as modal from '../modal';
import * as xhr from 'common/xhr';
import { bind, bindSubmit, onInsert } from '../util';
import { h } from 'snabbdom';
import { h, VNode } from 'snabbdom';
import { prop, Prop } from 'common';
import { Redraw } from '../interfaces';
import { StudyCtrl, Topic } from './interfaces';
import { VNode } from 'snabbdom';
export interface TopicsCtrl {
open: Prop<boolean>;

View File

@ -1,5 +1,4 @@
import { h } from 'snabbdom';
import { VNode } from 'snabbdom';
import { h, VNode } from 'snabbdom';
import { isEmpty } from 'common';
import { fixCrazySan } from 'chess';
import { path as treePath, ops as treeOps } from 'tree';
@ -15,10 +14,10 @@ import {
renderInlineCommentsOf,
truncateComment,
retroLine,
Ctx as BaseCtx,
Opts as BaseOpts,
} from './treeView';
import { enrichText, innerHTML } from '../util';
import { Ctx as BaseCtx, Opts as BaseOpts } from './treeView';
import { renderGlyph } from '../moveView';
interface Ctx extends BaseCtx {
concealOf: ConcealOf;
@ -154,7 +153,7 @@ function renderVariationMoveOf(ctx: Ctx, node: Tree.Node, opts: Opts): VNode {
content: MaybeVNodes = [withIndex ? moveView.renderIndex(node.ply, true) : null, fixCrazySan(node.san!)],
classes = nodeClasses(ctx, node, path);
if (opts.conceal) classes[opts.conceal as string] = true;
if (node.glyphs) node.glyphs.forEach(g => content.push(renderGlyph(g)));
if (node.glyphs) node.glyphs.forEach(g => content.push(moveView.renderGlyph(g)));
return h(
'move',
{

View File

@ -1,5 +1,4 @@
import { h } from 'snabbdom';
import { VNode } from 'snabbdom';
import { h, VNode } from 'snabbdom';
import * as studyView from '../study/studyView';
import { nodeFullName, bind } from '../util';
import AnalyseCtrl from '../ctrl';

View File

@ -1,13 +1,10 @@
import { h } from 'snabbdom';
import { VNode } from 'snabbdom';
import { h, VNode } from 'snabbdom';
import { fixCrazySan } from 'chess';
import { path as treePath, ops as treeOps } from 'tree';
import * as moveView from '../moveView';
import AnalyseCtrl from '../ctrl';
import { MaybeVNodes } from '../interfaces';
import { mainHook, nodeClasses, findCurrentPath, renderInlineCommentsOf, retroLine } from './treeView';
import { Ctx, Opts } from './treeView';
import { renderGlyph } from '../moveView';
import { mainHook, nodeClasses, findCurrentPath, renderInlineCommentsOf, retroLine, Ctx, Opts } from './treeView';
function renderChildrenOf(ctx: Ctx, node: Tree.Node, opts: Opts): MaybeVNodes | undefined {
const cs = node.children,
@ -119,7 +116,7 @@ function renderMoveOf(ctx: Ctx, node: Tree.Node, opts: Opts): VNode {
opts.withIndex || node.ply & 1 ? moveView.renderIndex(node.ply, true) : null,
fixCrazySan(node.san!),
];
if (node.glyphs && ctx.showGlyphs) node.glyphs.forEach(g => content.push(renderGlyph(g)));
if (node.glyphs && ctx.showGlyphs) node.glyphs.forEach(g => content.push(moveView.renderGlyph(g)));
return h(
'move',
{

View File

@ -6,14 +6,12 @@ import isCol1 from 'common/isCol1';
import throttle from 'common/throttle';
import { authorText as commentAuthorText } from '../study/studyComments';
import { enrichText, innerHTML, bindMobileTapHold, clearSelection } from '../util';
import { h } from 'snabbdom';
import { Hooks } from 'snabbdom';
import { h, Hooks, VNode } from 'snabbdom';
import { isEmpty, defined } from 'common';
import { MaybeVNodes, ConcealOf } from '../interfaces';
import { path as treePath } from 'tree';
import { playable } from 'game';
import { storedProp, StoredProp } from 'common/storage';
import { VNode } from 'snabbdom';
export interface Ctx {
ctrl: AnalyseCtrl;

View File

@ -1,7 +1,4 @@
import { h } from 'snabbdom';
import { VNode } from 'snabbdom';
import { Hooks } from 'snabbdom';
import { Attrs } from 'snabbdom';
import { h, VNode, Hooks, Attrs } from 'snabbdom';
import { fixCrazySan } from 'chess';
export const emptyRedButton = 'button.button.button-red.button-empty';

View File

@ -1,6 +1,4 @@
import { h } from 'snabbdom';
import { VNode } from 'snabbdom';
import { h, VNode } from 'snabbdom';
import { parseFen } from 'chessops/fen';
import * as chessground from './ground';
import { bind, onInsert, dataIcon, spinner, bindMobileMousedown } from './util';

View File

@ -1,7 +1,7 @@
import * as winningChances from './winningChances';
import { defined } from 'common';
import { Eval, CevalCtrl, ParentCtrl, NodeEvals } from './types';
import { h } from 'snabbdom';
import { h, VNode } from 'snabbdom';
import { Position } from 'chessops/chess';
import { lichessVariantRules } from 'chessops/compat';
import { makeSanAndPlay } from 'chessops/san';
@ -9,7 +9,6 @@ import { opposite, parseUci } from 'chessops/util';
import { parseFen, makeBoardFen } from 'chessops/fen';
import { renderEval } from './util';
import { setupPosition } from 'chessops/variant';
import { VNode } from 'snabbdom';
let gaugeLast = 0;
const gaugeTicks: VNode[] = [...Array(8).keys()].map(i =>

View File

@ -1,13 +1,9 @@
import { init } from 'snabbdom';
import { VNode } from 'snabbdom';
import { init, VNode, classModule, attributesModule } from 'snabbdom';
import makeCtrl from './ctrl';
import { loaded, loading } from './view';
import { json } from 'common/xhr';
import { ChallengeOpts, ChallengeData, Ctrl } from './interfaces';
import { classModule } from 'snabbdom';
import { attributesModule } from 'snabbdom';
const patch = init([classModule, attributesModule]);
export default function LichessChallenge(element: Element, opts: ChallengeOpts) {

View File

@ -1,6 +1,5 @@
import { Ctrl, Challenge, ChallengeData, ChallengeDirection, ChallengeUser, TimeControl } from './interfaces';
import { h } from 'snabbdom';
import { VNode } from 'snabbdom';
import { h, VNode } from 'snabbdom';
export function loaded(ctrl: Ctrl): VNode {
return ctrl.redirecting()

View File

@ -2,11 +2,10 @@ import * as enhance from './enhance';
import * as spam from './spam';
import { Ctrl, Line } from './interfaces';
import { flag } from './xhr';
import { h, thunk } from 'snabbdom';
import { h, thunk, VNode, VNodeData } from 'snabbdom';
import { lineAction as modLineAction } from './moderation';
import { presetView } from './preset';
import { userLink } from './util';
import { VNode, VNodeData } from 'snabbdom';
const whisperRegex = /^\/[wW](?:hisper)?\s/;

View File

@ -1,14 +1,10 @@
import { init } from 'snabbdom';
import { VNode } from 'snabbdom';
import { init, attributesModule, classModule, VNode } from 'snabbdom';
import makeCtrl from './ctrl';
import view from './view';
import { ChatOpts, Ctrl } from './interfaces';
import { PresetCtrl } from './preset';
import { classModule } from 'snabbdom';
import { attributesModule } from 'snabbdom';
export { Ctrl as ChatCtrl, ChatPlugin } from './interfaces';
export default function LichessChat(

View File

@ -1,9 +1,8 @@
import { h } from 'snabbdom';
import { h, VNode } from 'snabbdom';
import { ModerationCtrl, ModerationOpts, ModerationData, ModerationReason } from './interfaces';
import { numberFormat } from 'common/number';
import { userLink, bind } from './util';
import { userModInfo } from './xhr';
import { VNode } from 'snabbdom';
export function moderationCtrl(opts: ModerationOpts): ModerationCtrl {
let data: ModerationData | undefined;

View File

@ -1,5 +1,4 @@
import { h } from 'snabbdom';
import { VNode } from 'snabbdom';
import { h, VNode } from 'snabbdom';
import { NoteCtrl, NoteOpts } from './interfaces';
import * as xhr from './xhr';
import debounce from 'common/debounce';

View File

@ -1,5 +1,4 @@
import { h } from 'snabbdom';
import { VNode } from 'snabbdom';
import { h, VNode } from 'snabbdom';
import { bind } from './util';
import { Redraw } from './interfaces';

View File

@ -1,5 +1,4 @@
import { h } from 'snabbdom';
import { VNode } from 'snabbdom';
import { h, VNode } from 'snabbdom';
export function userLink(u: string, title?: string): VNode {
const trunc = u.substring(0, 14);

View File

@ -1,5 +1,4 @@
import { h } from 'snabbdom';
import { VNode } from 'snabbdom';
import { h, VNode } from 'snabbdom';
import { Ctrl, Tab } from './interfaces';
import discussionView from './discussion';
import { noteView } from './note';

View File

@ -1,5 +1,4 @@
import { h } from 'snabbdom';
import { VNode } from 'snabbdom';
import { h, VNode } from 'snabbdom';
import { Redraw, Close, bind, header } from './util';
import debounce from 'common/debounce';
import * as xhr from 'common/xhr';

View File

@ -1,5 +1,4 @@
import { h } from 'snabbdom';
import { VNode } from 'snabbdom';
import { h, VNode } from 'snabbdom';
import { Redraw, Close, bind, header } from './util';
import debounce from 'common/debounce';
import * as xhr from 'common/xhr';

View File

@ -1,5 +1,4 @@
import { h } from 'snabbdom';
import { VNode } from 'snabbdom';
import { h, VNode } from 'snabbdom';
import { Close, header } from './util';

View File

@ -1,5 +1,4 @@
import { h } from 'snabbdom';
import { VNode } from 'snabbdom';
import { h, VNode } from 'snabbdom';
import { DasherCtrl, Mode } from './dasher';
import { view as pingView } from './ping';

View File

@ -2,10 +2,7 @@ import { Redraw } from './util';
import { DasherCtrl, DasherOpts, makeCtrl } from './dasher';
import { loading, loaded } from './view';
import * as xhr from 'common/xhr';
import { init } from 'snabbdom';
import { VNode } from 'snabbdom';
import { classModule } from 'snabbdom';
import { attributesModule } from 'snabbdom';
import { init, VNode, classModule, attributesModule } from 'snabbdom';
const patch = init([classModule, attributesModule]);

View File

@ -1,5 +1,4 @@
import { h } from 'snabbdom';
import { VNode } from 'snabbdom';
import { h, VNode } from 'snabbdom';
import * as xhr from 'common/xhr';
import { Redraw, Open, bind, header } from './util';

View File

@ -1,5 +1,4 @@
import { h } from 'snabbdom';
import { VNode } from 'snabbdom';
import { h, VNode } from 'snabbdom';
import { Redraw, defined } from './util';

View File

@ -1,5 +1,4 @@
import { h } from 'snabbdom';
import { VNode } from 'snabbdom';
import { h, VNode } from 'snabbdom';
import { Redraw, Close, bind, header } from './util';
import throttle from 'common/throttle';
import * as xhr from 'common/xhr';

View File

@ -1,5 +1,4 @@
import { h } from 'snabbdom';
import { VNode } from 'snabbdom';
import { h, VNode } from 'snabbdom';
import changeColorHandle from 'common/coordsColor';
import * as xhr from 'common/xhr';

View File

@ -1,5 +1,4 @@
import { h } from 'snabbdom';
import { VNode } from 'snabbdom';
import { h, VNode } from 'snabbdom';
export type Redraw = () => void;
export type Close = () => void;

View File

@ -1,5 +1,4 @@
import { h } from 'snabbdom';
import { VNode } from 'snabbdom';
import { h, VNode } from 'snabbdom';
import { DasherCtrl } from './dasher';
import links from './links';

View File

@ -1,5 +1,4 @@
import { h } from 'snabbdom';
import { VNode } from 'snabbdom';
import { h, VNode } from 'snabbdom';
import { Chessground } from 'chessground';
import { Config as CgConfig } from 'chessground/config';
import { MouchEvent } from 'chessground/types';

View File

@ -1,14 +1,9 @@
import { attributesModule } from 'snabbdom';
import { init, attributesModule, eventListenersModule, classModule, propsModule, VNode } from 'snabbdom';
import EditorCtrl from './ctrl';
import { eventListenersModule } from 'snabbdom';
import { classModule } from 'snabbdom';
import menuHover from 'common/menuHover';
import { propsModule } from 'snabbdom';
import view from './view';
import { Chessground } from 'chessground';
import { EditorConfig } from './interfaces';
import { init } from 'snabbdom';
import { VNode } from 'snabbdom';
const patch = init([classModule, attributesModule, propsModule, eventListenersModule]);

View File

@ -1,5 +1,4 @@
import { h } from 'snabbdom';
import { VNode } from 'snabbdom';
import { h, VNode } from 'snabbdom';
import { MouchEvent, NumberPair } from 'chessground/types';
import { dragNewPiece } from 'chessground/drag';
import { eventPosition, opposite } from 'chessground/util';

View File

@ -1,13 +1,11 @@
import { init } from 'snabbdom';
import { VNode } from 'snabbdom';
import { classModule } from 'snabbdom';
import { attributesModule } from 'snabbdom';
import { init, VNode, classModule, attributesModule } from 'snabbdom';
import { Chessground } from 'chessground';
import { LobbyOpts, Tab } from './interfaces';
import LobbyController from './ctrl';
export const patch = init([classModule, attributesModule]);
// eslint-disable-next-line no-duplicate-imports
import makeCtrl from './ctrl';
import view from './view/main';

View File

@ -1,5 +1,4 @@
import { h } from 'snabbdom';
import { VNode } from 'snabbdom';
import { h, VNode } from 'snabbdom';
import { tds, bind } from './util';
import LobbyController from '../ctrl';
import { Seek, MaybeVNodes } from '../interfaces';

View File

@ -1,5 +1,4 @@
import { h } from 'snabbdom';
import { VNodeData } from 'snabbdom';
import { h, VNodeData } from 'snabbdom';
import renderTabs from './tabs';
import * as renderPools from './pools';
import renderRealTime from './realTime/main';

View File

@ -1,5 +1,4 @@
import { h } from 'snabbdom';
import { Hooks } from 'snabbdom';
import { h, Hooks } from 'snabbdom';
import LobbyController from '../ctrl';
import { bind, spinner } from './util';

View File

@ -1,8 +1,7 @@
import LobbyController from '../../ctrl';
import { bind, perfIcons } from '../util';
import { h } from 'snabbdom';
import { h, VNode } from 'snabbdom';
import { Hook } from '../../interfaces';
import { VNode } from 'snabbdom';
const percents = (v: number) => v + '%';

View File

@ -1,5 +1,4 @@
import { h } from 'snabbdom';
import { Hooks } from 'snabbdom';
import { h, Hooks } from 'snabbdom';
import { MaybeVNodes } from '../interfaces';
export function bind(eventName: string, f: (e: Event) => any, redraw?: () => void): Hooks {

View File

@ -1,9 +1,6 @@
import view from './view/main';
import { init } from 'snabbdom';
import { VNode } from 'snabbdom';
import { classModule } from 'snabbdom';
import { attributesModule } from 'snabbdom';
import { init, VNode, classModule, attributesModule } from 'snabbdom';
import { MsgOpts } from './interfaces';
import { upgradeData } from './network';

View File

@ -1,5 +1,4 @@
import { h } from 'snabbdom';
import { VNode } from 'snabbdom';
import { h, VNode } from 'snabbdom';
import { Convo } from '../interfaces';
import { bind } from './util';
import MsgCtrl from '../ctrl';

View File

@ -1,5 +1,4 @@
import { h } from 'snabbdom';
import { VNode } from 'snabbdom';
import { h, VNode } from 'snabbdom';
import { Contact, LastMsg } from '../interfaces';
import MsgCtrl from '../ctrl';
import { userName, userIcon, bindMobileMousedown } from './util';

View File

@ -3,9 +3,8 @@ import renderActions from './actions';
import renderInteract from './interact';
import renderMsgs from './msgs';
import { Convo } from '../interfaces';
import { h } from 'snabbdom';
import { h, VNode } from 'snabbdom';
import { userName, bindMobileMousedown } from './util';
import { VNode } from 'snabbdom';
export default function renderConvo(ctrl: MsgCtrl, convo: Convo): VNode {
const user = convo.user;

View File

@ -1,5 +1,4 @@
import { h } from 'snabbdom';
import { VNode } from 'snabbdom';
import { h, VNode } from 'snabbdom';
import { User } from '../interfaces';
import MsgCtrl from '../ctrl';
import { bind } from './util';

View File

@ -1,5 +1,4 @@
import { h } from 'snabbdom';
import { VNode } from 'snabbdom';
import { h, VNode } from 'snabbdom';
import MsgCtrl from '../ctrl';
import renderConvo from './convo';
import renderContact from './contact';

View File

@ -1,5 +1,4 @@
import { h } from 'snabbdom';
import { VNode } from 'snabbdom';
import { h, VNode } from 'snabbdom';
import { Convo, Msg, Daily } from '../interfaces';
import * as enhance from './enhance';
import { scroller } from './scroller';

View File

@ -1,5 +1,4 @@
import { h } from 'snabbdom';
import { VNode } from 'snabbdom';
import { h, VNode } from 'snabbdom';
import throttle from 'common/throttle';
import MsgCtrl from '../ctrl';
import { SearchResult, User } from '../interfaces';

View File

@ -1,5 +1,4 @@
import { h } from 'snabbdom';
import { VNode } from 'snabbdom';
import { h, VNode } from 'snabbdom';
import { User } from '../interfaces';
export function userIcon(user: User, cls: string): VNode {

View File

@ -1,13 +1,8 @@
import { init } from 'snabbdom';
import { VNode } from 'snabbdom';
import { init, VNode, classModule, attributesModule } from 'snabbdom';
import makeCtrl from './ctrl';
import view from './view';
import { NotifyOpts, Ctrl } from './interfaces';
import { classModule } from 'snabbdom';
import { attributesModule } from 'snabbdom';
const patch = init([classModule, attributesModule]);
export default function LichessNotify(element: Element, opts: NotifyOpts) {

View File

@ -1,5 +1,4 @@
import { h } from 'snabbdom';
import { VNode } from 'snabbdom';
import { h, VNode } from 'snabbdom';
import { Notification, Renderers } from './interfaces';

View File

@ -1,7 +1,6 @@
import { Ctrl, NotifyData, Notification } from './interfaces';
import { h } from 'snabbdom';
import { h, VNode } from 'snabbdom';
import makeRenderers from './renderers';
import { VNode } from 'snabbdom';
export default function view(ctrl: Ctrl): VNode {
const d = ctrl.data();

View File

@ -1,10 +1,7 @@
import { h } from 'snabbdom';
import { VNode } from 'snabbdom';
import { Pieces } from 'chessground/types';
import { Rank, File } from 'chessground/types';
import { h, VNode } from 'snabbdom';
import { Pieces, Rank, File, files } from 'chessground/types';
import { invRanks, allKeys } from 'chessground/util';
import { Setting, makeSetting } from './setting';
import { files } from 'chessground/types';
import { parseFen } from 'chessops/fen';
import { Chess } from 'chessops/chess';
import { chessgroundDests } from 'chessops/compat';

View File

@ -1,5 +1,4 @@
import { h } from 'snabbdom';
import { VNode } from 'snabbdom';
import { h, VNode } from 'snabbdom';
export interface Setting<A> {
choices: Choices<A>;

View File

@ -1,7 +1,6 @@
import { defined } from 'common';
import { getNow } from '../util';
import { h } from 'snabbdom';
import { VNode } from 'snabbdom';
import { h, VNode } from 'snabbdom';
import { Run, TimeMod } from '../interfaces';
type OnFlag = () => void;

View File

@ -1,5 +1,4 @@
import { h } from 'snabbdom';
import { VNode } from 'snabbdom';
import { h, VNode } from 'snabbdom';
import { Config, Run } from '../interfaces';
import { getNow } from '../util';

View File

@ -1,8 +1,7 @@
import { winningChances } from 'ceval';
import { winningChances, CevalCtrl } from 'ceval';
import { DrawShape } from 'chessground/draw';
import { Vm } from './interfaces';
import { Api as CgApi } from 'chessground/api';
import { CevalCtrl } from 'ceval';
import { opposite } from 'chessground/util';
interface Opts {

View File

@ -3,9 +3,8 @@ import { Api as CgApi } from 'chessground/api';
import { CevalCtrl, NodeEvals } from 'ceval';
import { Config as CgConfig } from 'chessground/config';
import { Deferred } from 'common/defer';
import { Outcome } from 'chessops/types';
import { Outcome, Role, Move } from 'chessops/types';
import { Prop } from 'common';
import { Role, Move } from 'chessops/types';
import { StoredBooleanProp } from 'common/storage';
import { TreeWrapper } from 'tree';
import { VNode } from 'snabbdom';

View File

@ -1,12 +1,9 @@
import { attributesModule } from 'snabbdom';
import { classModule } from 'snabbdom';
import { attributesModule, classModule, init, VNode } from 'snabbdom';
import makeCtrl from './ctrl';
import menuHover from 'common/menuHover';
import view from './view/main';
import { Chessground } from 'chessground';
import { Controller, PuzzleOpts } from './interfaces';
import { init } from 'snabbdom';
import { VNode } from 'snabbdom';
const patch = init([classModule, attributesModule]);

View File

@ -1,7 +1,6 @@
import { bind, dataIcon } from '../util';
import { Controller, MaybeVNodes } from '../interfaces';
import { h } from 'snabbdom';
import { VNode } from 'snabbdom';
import { h, VNode } from 'snabbdom';
const renderVote = (ctrl: Controller): VNode =>
h(

View File

@ -3,8 +3,7 @@ import resizeHandle from 'common/resize';
import { Chessground } from 'chessground';
import { Config as CgConfig } from 'chessground/config';
import { Controller } from '../interfaces';
import { h } from 'snabbdom';
import { VNode } from 'snabbdom';
import { h, VNode } from 'snabbdom';
export default function (ctrl: Controller): VNode {
return h('div.cg-wrap', {

View File

@ -1,8 +1,7 @@
import afterView from './after';
import { bind } from '../util';
import { Controller, MaybeVNode } from '../interfaces';
import { h } from 'snabbdom';
import { VNode } from 'snabbdom';
import { h, VNode } from 'snabbdom';
const viewSolution = (ctrl: Controller): VNode =>
ctrl.streak

View File

@ -5,11 +5,10 @@ import changeColorHandle from 'common/coordsColor';
import chessground from './chessground';
import feedbackView from './feedback';
import { Controller } from '../interfaces';
import { h } from 'snabbdom';
import { h, VNode } from 'snabbdom';
import { onInsert, bind, bindMobileMousedown } from '../util';
import { render as treeView } from './tree';
import { view as cevalView } from 'ceval';
import { VNode } from 'snabbdom';
function renderAnalyse(ctrl: Controller): VNode {
return h('div.puzzle__moves.areplay', [treeView(ctrl)]);

View File

@ -1,8 +1,7 @@
import { Controller, Puzzle, PuzzleGame, MaybeVNode, PuzzleDifficulty } from '../interfaces';
import { dataIcon, onInsert } from '../util';
import { h } from 'snabbdom';
import { h, VNode } from 'snabbdom';
import { numberFormat } from 'common/number';
import { VNode } from 'snabbdom';
import PuzzleStreak from '../streak';
export function puzzleBox(ctrl: Controller): VNode {

Some files were not shown because too many files have changed in this diff Show More