upgrade to snabbdom

fix soome minor issues
pull/8554/head
topce 2021-04-03 20:36:53 +02:00
parent 7953eed94a
commit 169c9ed280
181 changed files with 254 additions and 250 deletions

View File

@ -28,7 +28,7 @@
"common": "2.0.0",
"game": "2.0.0",
"nvui": "2.0.0",
"snabbdom": "^0.7.4",
"snabbdom": "^3.0.1",
"tree": "2.0.0"
},
"scripts": {

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -1,4 +1,4 @@
import { VNode } from 'snabbdom/vnode';
import { VNode } from 'snabbdom';
import { Player, Status, Source, Clock } from 'game';
import * as cg from 'chessground/types';
import { ForecastData } from './forecast/interfaces';

View File

@ -4,7 +4,7 @@ import AnalyseCtrl from './ctrl';
import { h } from 'snabbdom';
import { modal } from './modal';
import { spinner } from './util';
import { VNode } from 'snabbdom/vnode';
import { VNode } from 'snabbdom';
export const bind = (ctrl: AnalyseCtrl) => {
const kbd = window.Mousetrap;

View File

@ -1,7 +1,7 @@
import AnalyseCtrl from './ctrl';
import attributes from 'snabbdom/modules/attributes';
import { attributesModule } from 'snabbdom';
import boot from './boot';
import klass from 'snabbdom/modules/class';
import { classModule } from 'snabbdom';
import LichessChat from 'chat';
import makeCtrl from './ctrl';
import menuHover from 'common/menuHover';
@ -9,9 +9,9 @@ import view from './view';
import { AnalyseApi, AnalyseOpts } from './interfaces';
import { Chessground } from 'chessground';
import { init } from 'snabbdom';
import { VNode } from 'snabbdom/vnode';
import { VNode } from 'snabbdom';
export const patch = init([klass, attributes]);
export const patch = init([classModule, attributesModule]);
export function start(opts: AnalyseOpts): AnalyseApi {
opts.element = document.querySelector('main.analyse') as HTMLElement;

View File

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

View File

@ -1,5 +1,5 @@
import { h } from 'snabbdom';
import { VNode } from 'snabbdom/vnode';
import { 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,5 @@
import { h } from 'snabbdom';
import { VNode } from 'snabbdom/vnode';
import { VNode } from 'snabbdom';
import { prop, Prop } from 'common';
import * as xhr from 'common/xhr';
import AnalyseController from '../ctrl';

View File

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

View File

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

View File

@ -1,5 +1,5 @@
import { h } from 'snabbdom';
import { VNode } from 'snabbdom/vnode';
import { 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,5 @@
import { h } from 'snabbdom';
import { VNode } from 'snabbdom/vnode';
import { 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,5 @@
import { h } from 'snabbdom';
import { VNode } from 'snabbdom/vnode';
import { VNode } from 'snabbdom';
import { currentComments } from './studyComments';
import { nodeFullName, bind } from '../util';
import { prop, Prop } from 'common';

View File

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

View File

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

View File

@ -3,9 +3,9 @@ import AnalyseCtrl from '../../ctrl';
import throttle from 'common/throttle';
import { bind, iconTag } from '../../util';
import { h } from 'snabbdom';
import { Hooks } from 'snabbdom/hooks';
import { Hooks } from 'snabbdom';
import { MaybeVNodes } from '../../interfaces';
import { VNode } from 'snabbdom/vnode';
import { VNode } from 'snabbdom';
export function running(ctrl: AnalyseCtrl): boolean {
return (

View File

@ -1,5 +1,5 @@
import { h } from 'snabbdom';
import { VNode } from 'snabbdom/vnode';
import { VNode } from 'snabbdom';
import GamebookPlayCtrl from './gamebookPlayCtrl';
import { bind, dataIcon, iconTag, richHTML } from '../../util';
import { State } from './gamebookPlayCtrl';

View File

@ -3,7 +3,7 @@ import { h } from 'snabbdom';
import { modal } from '../modal';
import { prop, Prop } from 'common';
import { StudyMemberMap } from './interfaces';
import { VNode } from 'snabbdom/vnode';
import { VNode } from 'snabbdom';
export function makeCtrl(
send: SocketSend,

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -1,5 +1,5 @@
import { h } from 'snabbdom';
import { VNode } from 'snabbdom/vnode';
import { 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,5 @@
import { h } from 'snabbdom';
import { VNode } from 'snabbdom/vnode';
import { VNode } from 'snabbdom';
import AnalyseCtrl from '../ctrl';
import { nodeFullName, bind, richHTML } from '../util';
import { StudyCtrl } from './interfaces';

View File

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

View File

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

View File

@ -1,5 +1,5 @@
import { h } from 'snabbdom';
import { VNode } from 'snabbdom/vnode';
import { 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,5 @@
import { h } from 'snabbdom';
import { VNode } from 'snabbdom/vnode';
import { VNode } from 'snabbdom';
import { bind, baseUrl } from '../util';
import { prop, Prop } from 'common';
import { renderIndexAndMove } from '../moveView';

View File

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

View File

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

View File

@ -5,7 +5,7 @@ import { h } from 'snabbdom';
import { prop, Prop } from 'common';
import { Redraw } from '../interfaces';
import { StudyCtrl, Topic } from './interfaces';
import { VNode } from 'snabbdom/vnode';
import { VNode } from 'snabbdom';
export interface TopicsCtrl {
open: Prop<boolean>;

View File

@ -1,5 +1,5 @@
import { h } from 'snabbdom';
import { VNode } from 'snabbdom/vnode';
import { VNode } from 'snabbdom';
import { isEmpty } from 'common';
import { fixCrazySan } from 'chess';
import { path as treePath, ops as treeOps } from 'tree';

View File

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

View File

@ -1,5 +1,5 @@
import { h } from 'snabbdom';
import { VNode } from 'snabbdom/vnode';
import { VNode } from 'snabbdom';
import { fixCrazySan } from 'chess';
import { path as treePath, ops as treeOps } from 'tree';
import * as moveView from '../moveView';

View File

@ -7,13 +7,13 @@ 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/hooks';
import { Hooks } 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/vnode';
import { VNode } from 'snabbdom';
export interface Ctx {
ctrl: AnalyseCtrl;

View File

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

View File

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

View File

@ -26,6 +26,6 @@
"chessops": "^0.8.1",
"common": "2.0.0",
"idb-keyval": "^5.0.4",
"snabbdom": "^0.7.4"
"snabbdom": "^3.0.1"
}
}

View File

@ -9,7 +9,7 @@ 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/vnode';
import { VNode } from 'snabbdom';
let gaugeLast = 0;
const gaugeTicks: VNode[] = [...Array(8).keys()].map(i =>

View File

@ -6,7 +6,7 @@
"author": "Thibault Duplessis",
"license": "AGPL-3.0-or-later",
"dependencies": {
"snabbdom": "^0.7.4"
"snabbdom": "^3.0.1"
},
"devDependencies": {
"@build/rollupProject": "2.0.0",

View File

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

View File

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

View File

@ -13,7 +13,7 @@
"prod": "yarn run compile && rollup --config --config-prod"
},
"dependencies": {
"snabbdom": "^0.7.4"
"snabbdom": "^3.0.1"
},
"devDependencies": {
"@build/rollupProject": "2.0.0",

View File

@ -6,7 +6,7 @@ import { h, thunk } from 'snabbdom';
import { lineAction as modLineAction } from './moderation';
import { presetView } from './preset';
import { userLink } from './util';
import { VNode, VNodeData } from 'snabbdom/vnode';
import { VNode, VNodeData } from 'snabbdom';
const whisperRegex = /^\/[wW](?:hisper)?\s/;

View File

@ -1,4 +1,4 @@
import { VNode } from 'snabbdom/vnode';
import { VNode } from 'snabbdom';
import { PresetCtrl } from './preset';
import { Prop } from 'common';

View File

@ -1,13 +1,13 @@
import { init } from 'snabbdom';
import { VNode } from 'snabbdom/vnode';
import { VNode } from 'snabbdom';
import makeCtrl from './ctrl';
import view from './view';
import { ChatOpts, Ctrl } from './interfaces';
import { PresetCtrl } from './preset';
import klass from 'snabbdom/modules/class';
import attributes from 'snabbdom/modules/attributes';
import { classModule } from 'snabbdom';
import { attributesModule } from 'snabbdom';
export { Ctrl as ChatCtrl, ChatPlugin } from './interfaces';
@ -17,7 +17,7 @@ export default function LichessChat(
): {
preset: PresetCtrl;
} {
const patch = init([klass, attributes]);
const patch = init([classModule, attributesModule]);
let vnode: VNode, ctrl: Ctrl;

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -6,7 +6,7 @@
"author": "Thibault Duplessis",
"license": "AGPL-3.0-or-later",
"dependencies": {
"snabbdom": "^0.7.4"
"snabbdom": "^3.0.1"
},
"devDependencies": {
"@build/rollupProject": "2.0.0",

View File

@ -1,5 +1,5 @@
import { h } from 'snabbdom';
import { VNode } from 'snabbdom/vnode';
import { 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,5 @@
import { h } from 'snabbdom';
import { VNode } from 'snabbdom/vnode';
import { 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,5 @@
import { h } from 'snabbdom';
import { VNode } from 'snabbdom/vnode';
import { VNode } from 'snabbdom';
import { Close, header } from './util';

View File

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

View File

@ -3,11 +3,11 @@ 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/vnode';
import klass from 'snabbdom/modules/class';
import attributes from 'snabbdom/modules/attributes';
import { VNode } from 'snabbdom';
import { classModule } from 'snabbdom';
import { attributesModule } from 'snabbdom';
const patch = init([klass, attributes]);
const patch = init([classModule, attributesModule]);
export default function LichessDasher(element: Element, opts: DasherOpts) {
let vnode: VNode, ctrl: DasherCtrl;

View File

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

View File

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

View File

@ -1,5 +1,5 @@
import { h } from 'snabbdom';
import { VNode } from 'snabbdom/vnode';
import { 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,5 @@
import { h } from 'snabbdom';
import { VNode } from 'snabbdom/vnode';
import { VNode } from 'snabbdom';
import changeColorHandle from 'common/coordsColor';
import * as xhr from 'common/xhr';

View File

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

View File

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

View File

@ -17,7 +17,7 @@
"dependencies": {
"chessground": "^7.11.1",
"chessops": "^0.8.1",
"snabbdom": "^0.7.4",
"snabbdom": "^3.0.1",
"common": "2.0.0"
},
"scripts": {

View File

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

View File

@ -1,16 +1,16 @@
import attributes from 'snabbdom/modules/attributes';
import { attributesModule } from 'snabbdom';
import EditorCtrl from './ctrl';
import eventlisteners from 'snabbdom/modules/eventlisteners';
import klass from 'snabbdom/modules/class';
import { eventListenersModule } from 'snabbdom';
import { classModule } from 'snabbdom';
import menuHover from 'common/menuHover';
import props from 'snabbdom/modules/props';
import { propsModule } from 'snabbdom';
import view from './view';
import { Chessground } from 'chessground';
import { EditorConfig } from './interfaces';
import { init } from 'snabbdom';
import { VNode } from 'snabbdom/vnode';
import { VNode } from 'snabbdom';
const patch = init([klass, attributes, props, eventlisteners]);
const patch = init([classModule, attributesModule, propsModule, eventListenersModule]);
export default function LichessEditor(element: HTMLElement, config: EditorConfig) {
let vnode: VNode, ctrl: EditorCtrl;

View File

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

View File

@ -19,7 +19,7 @@
"dependencies": {
"chessground": "^7.11.1",
"common": "2.0.0",
"snabbdom": "^0.7.4"
"snabbdom": "^3.0.1"
},
"scripts": {
"dev": "rollup --config",

View File

@ -1,4 +1,4 @@
import { VNode } from 'snabbdom/vnode';
import { VNode } from 'snabbdom';
export type MaybeVNode = VNode | string | null | undefined;
export type MaybeVNodes = MaybeVNode[];

View File

@ -1,12 +1,12 @@
import { init } from 'snabbdom';
import { VNode } from 'snabbdom/vnode';
import klass from 'snabbdom/modules/class';
import attributes from 'snabbdom/modules/attributes';
import { VNode } from 'snabbdom';
import { classModule } from 'snabbdom';
import { attributesModule } from 'snabbdom';
import { Chessground } from 'chessground';
import { LobbyOpts, Tab } from './interfaces';
import LobbyController from './ctrl';
export const patch = init([klass, attributes]);
export const patch = init([classModule, attributesModule]);
import makeCtrl from './ctrl';
import view from './view/main';

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -10,7 +10,7 @@
"@types/lichess": "2.0.0"
},
"dependencies": {
"snabbdom": "^0.7.4"
"snabbdom": "^3.0.1"
},
"scripts": {
"dev": "rollup --config",

View File

@ -1,9 +1,9 @@
import view from './view/main';
import { init } from 'snabbdom';
import { VNode } from 'snabbdom/vnode';
import klass from 'snabbdom/modules/class';
import attributes from 'snabbdom/modules/attributes';
import { VNode } from 'snabbdom';
import { classModule } from 'snabbdom';
import { attributesModule } from 'snabbdom';
import { MsgOpts } from './interfaces';
import { upgradeData } from './network';
@ -11,7 +11,7 @@ import MsgCtrl from './ctrl';
export default function LichessMsg(opts: MsgOpts) {
const element = document.querySelector('.msg-app') as HTMLElement,
patch = init([klass, attributes]),
patch = init([classModule, attributesModule]),
appHeight = () => document.body.style.setProperty('--app-height', `${window.innerHeight}px`);
window.addEventListener('resize', appHeight);
appHeight();

View File

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

View File

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

View File

@ -5,7 +5,7 @@ import renderMsgs from './msgs';
import { Convo } from '../interfaces';
import { h } from 'snabbdom';
import { userName, bindMobileMousedown } from './util';
import { VNode } from 'snabbdom/vnode';
import { VNode } from 'snabbdom';
export default function renderConvo(ctrl: MsgCtrl, convo: Convo): VNode {
const user = convo.user;

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -6,7 +6,7 @@
"author": "Thibault Duplessis",
"license": "AGPL-3.0-or-later",
"dependencies": {
"snabbdom": "^0.7.4"
"snabbdom": "^3.0.1"
},
"devDependencies": {
"@build/rollupProject": "2.0.0",

View File

@ -1,4 +1,4 @@
import { VNode } from 'snabbdom/vnode';
import { VNode } from 'snabbdom';
export interface NotifyOpts {
data?: NotifyData;

View File

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

View File

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

View File

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

View File

@ -22,6 +22,6 @@
"typescript": "^4.1.3"
},
"dependencies": {
"snabbdom": "^0.7.4"
"snabbdom": "^3.0.1"
}
}

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