Teact: Use jsx-runtime (#5969)

This commit is contained in:
zubiden 2025-06-04 20:41:58 +02:00 committed by Alexander Zinchuk
parent 42d76abbba
commit 5b210b1755
721 changed files with 753 additions and 721 deletions

View File

@ -7,7 +7,13 @@ export default function (api) {
const presets = [ const presets = [
'@babel/typescript', '@babel/typescript',
'@babel/preset-env', '@babel/preset-env',
'@babel/preset-react', [
'@babel/preset-react',
{
runtime: 'automatic',
importSource: '@teact',
},
],
]; ];
const plugins = [ const plugins = [

View File

@ -18,6 +18,7 @@ export default tseslint.config(
tseslint.configs.recommendedTypeChecked, tseslint.configs.recommendedTypeChecked,
tseslint.configs.stylistic, tseslint.configs.stylistic,
reactPlugin.configs.flat.recommended, reactPlugin.configs.flat.recommended,
reactPlugin.configs.flat['jsx-runtime'],
reactXPlugin.configs['recommended-type-checked'], reactXPlugin.configs['recommended-type-checked'],
jsxA11yPlugin.flatConfigs.recommended, jsxA11yPlugin.flatConfigs.recommended,
ttMultitabPlugin.configs.recommended, ttMultitabPlugin.configs.recommended,

View File

@ -1,5 +1,5 @@
import type { FC } from '../lib/teact/teact'; import type { FC } from '../lib/teact/teact';
import React, { useEffect, useLayoutEffect } from '../lib/teact/teact'; import { useEffect, useLayoutEffect } from '../lib/teact/teact';
import { withGlobal } from '../global'; import { withGlobal } from '../global';
import type { GlobalState } from '../global/types'; import type { GlobalState } from '../global/types';

View File

@ -1,7 +1,7 @@
import '../../global/actions/initial'; import '../../global/actions/initial';
import type { FC } from '../../lib/teact/teact'; import type { FC } from '../../lib/teact/teact';
import React, { memo, useRef } from '../../lib/teact/teact'; import { memo, useRef } from '../../lib/teact/teact';
import { getActions, withGlobal } from '../../global'; import { getActions, withGlobal } from '../../global';
import type { GlobalState } from '../../global/types'; import type { GlobalState } from '../../global/types';

View File

@ -1,5 +1,4 @@
import type { FC } from '../../lib/teact/teact'; import type { FC } from '../../lib/teact/teact';
import React from '../../lib/teact/teact';
import { Bundles } from '../../util/moduleLoader'; import { Bundles } from '../../util/moduleLoader';

View File

@ -1,6 +1,6 @@
import type { FormEvent } from 'react'; import type { FormEvent } from 'react';
import type { FC } from '../../lib/teact/teact'; import type { FC } from '../../lib/teact/teact';
import React, { import {
memo, useCallback, useEffect, useRef, useState, memo, useCallback, useEffect, useRef, useState,
} from '../../lib/teact/teact'; } from '../../lib/teact/teact';
import { getActions, withGlobal } from '../../global'; import { getActions, withGlobal } from '../../global';

View File

@ -1,5 +1,4 @@
import type { FC } from '../../lib/teact/teact'; import type { FC } from '../../lib/teact/teact';
import React from '../../lib/teact/teact';
import { Bundles } from '../../util/moduleLoader'; import { Bundles } from '../../util/moduleLoader';

View File

@ -1,5 +1,5 @@
import type { FC } from '../../lib/teact/teact'; import type { FC } from '../../lib/teact/teact';
import React, { memo, useCallback, useState } from '../../lib/teact/teact'; import { memo, useCallback, useState } from '../../lib/teact/teact';
import { getActions, withGlobal } from '../../global'; import { getActions, withGlobal } from '../../global';
import type { GlobalState } from '../../global/types'; import type { GlobalState } from '../../global/types';

View File

@ -1,6 +1,7 @@
import type { ChangeEvent } from 'react'; import type { ChangeEvent } from 'react';
import type { FC } from '../../lib/teact/teact'; import type { FC } from '../../lib/teact/teact';
import React, { import type React from '../../lib/teact/teact';
import {
memo, useEffect, useLayoutEffect, useMemo, useRef, useState, memo, useEffect, useLayoutEffect, useMemo, useRef, useState,
} from '../../lib/teact/teact'; } from '../../lib/teact/teact';
import { getActions, withGlobal } from '../../global'; import { getActions, withGlobal } from '../../global';

View File

@ -1,4 +1,4 @@
import React, { import {
memo, useLayoutEffect, useRef, memo, useLayoutEffect, useRef,
} from '../../lib/teact/teact'; } from '../../lib/teact/teact';
import { getActions, withGlobal } from '../../global'; import { getActions, withGlobal } from '../../global';

View File

@ -1,5 +1,4 @@
import type { FC } from '../../lib/teact/teact'; import type { FC } from '../../lib/teact/teact';
import React from '../../lib/teact/teact';
import { Bundles } from '../../util/moduleLoader'; import { Bundles } from '../../util/moduleLoader';

View File

@ -1,6 +1,7 @@
import type { ChangeEvent } from 'react'; import type { ChangeEvent } from 'react';
import type { FC } from '../../lib/teact/teact'; import type { FC } from '../../lib/teact/teact';
import React, { memo, useCallback, useState } from '../../lib/teact/teact'; import type React from '../../lib/teact/teact';
import { memo, useCallback, useState } from '../../lib/teact/teact';
import { getActions, withGlobal } from '../../global'; import { getActions, withGlobal } from '../../global';
import type { GlobalState } from '../../global/types'; import type { GlobalState } from '../../global/types';

View File

@ -1,5 +1,6 @@
import type { FC } from '../../lib/teact/teact'; import type { FC } from '../../lib/teact/teact';
import React, { import type React from '../../lib/teact/teact';
import {
memo, useCallback, useRef, useState, memo, useCallback, useRef, useState,
} from '../../lib/teact/teact'; } from '../../lib/teact/teact';
import { withGlobal } from '../../global'; import { withGlobal } from '../../global';

View File

@ -1,5 +1,4 @@
import type { FC } from '../../lib/teact/teact'; import type { FC } from '../../lib/teact/teact';
import React from '../../lib/teact/teact';
import { Bundles } from '../../util/moduleLoader'; import { Bundles } from '../../util/moduleLoader';

View File

@ -1,5 +1,5 @@
import type { FC } from '../../lib/teact/teact'; import type { FC } from '../../lib/teact/teact';
import React, { memo, useEffect } from '../../lib/teact/teact'; import { memo, useEffect } from '../../lib/teact/teact';
import { getActions, withGlobal } from '../../global'; import { getActions, withGlobal } from '../../global';
import type { ApiGroupCall, ApiUser } from '../../api/types'; import type { ApiGroupCall, ApiUser } from '../../api/types';

View File

@ -1,5 +1,4 @@
import type { FC } from '../../../lib/teact/teact'; import type { FC } from '../../../lib/teact/teact';
import React from '../../../lib/teact/teact';
import type { OwnProps } from './GroupCall'; import type { OwnProps } from './GroupCall';

View File

@ -1,7 +1,7 @@
import '../../../global/actions/calls'; import '../../../global/actions/calls';
import type { FC } from '../../../lib/teact/teact'; import type { FC } from '../../../lib/teact/teact';
import React, { import {
memo, useEffect, useMemo, useRef, useState, memo, useEffect, useMemo, useRef, useState,
} from '../../../lib/teact/teact'; } from '../../../lib/teact/teact';
import { getActions, withGlobal } from '../../../global'; import { getActions, withGlobal } from '../../../global';

View File

@ -1,5 +1,5 @@
import type { FC } from '../../../lib/teact/teact'; import type { FC } from '../../../lib/teact/teact';
import React, { import {
memo, useCallback, useMemo, useRef, memo, useCallback, useMemo, useRef,
} from '../../../lib/teact/teact'; } from '../../../lib/teact/teact';
import { withGlobal } from '../../../global'; import { withGlobal } from '../../../global';

View File

@ -1,5 +1,5 @@
import type { FC } from '../../../lib/teact/teact'; import type { FC } from '../../../lib/teact/teact';
import React, { memo, useMemo } from '../../../lib/teact/teact'; import { memo, useMemo } from '../../../lib/teact/teact';
import { getActions, withGlobal } from '../../../global'; import { getActions, withGlobal } from '../../../global';
import type { GroupCallParticipant as TypeGroupCallParticipant } from '../../../lib/secret-sauce'; import type { GroupCallParticipant as TypeGroupCallParticipant } from '../../../lib/secret-sauce';

View File

@ -1,5 +1,6 @@
import type { ElementRef, FC } from '../../../lib/teact/teact'; import type { ElementRef, FC } from '../../../lib/teact/teact';
import React, { memo, useEffect, useState } from '../../../lib/teact/teact'; import type React from '../../../lib/teact/teact';
import { memo, useEffect, useState } from '../../../lib/teact/teact';
import { getActions, withGlobal } from '../../../global'; import { getActions, withGlobal } from '../../../global';
import type { GroupCallParticipant } from '../../../lib/secret-sauce'; import type { GroupCallParticipant } from '../../../lib/secret-sauce';

View File

@ -1,5 +1,5 @@
import type { FC } from '../../../lib/teact/teact'; import type { FC } from '../../../lib/teact/teact';
import React, { import {
memo, useCallback, useEffect, useMemo, useRef, useState, memo, useCallback, useEffect, useMemo, useRef, useState,
} from '../../../lib/teact/teact'; } from '../../../lib/teact/teact';
import { withGlobal } from '../../../global'; import { withGlobal } from '../../../global';

View File

@ -1,5 +1,5 @@
import type { FC } from '../../../lib/teact/teact'; import type { FC } from '../../../lib/teact/teact';
import React, { import {
memo, useCallback, useMemo, memo, useCallback, useMemo,
} from '../../../lib/teact/teact'; } from '../../../lib/teact/teact';
import { getActions, getGlobal, withGlobal } from '../../../global'; import { getActions, getGlobal, withGlobal } from '../../../global';

View File

@ -1,5 +1,5 @@
import type { FC } from '../../../lib/teact/teact'; import type { FC } from '../../../lib/teact/teact';
import React, { import {
memo, useCallback, useEffect, useMemo, useRef, useState, memo, useCallback, useEffect, useMemo, useRef, useState,
} from '../../../lib/teact/teact'; } from '../../../lib/teact/teact';
import { getActions, withGlobal } from '../../../global'; import { getActions, withGlobal } from '../../../global';

View File

@ -1,5 +1,5 @@
import type { FC } from '../../../lib/teact/teact'; import type { FC } from '../../../lib/teact/teact';
import React, { memo, useMemo } from '../../../lib/teact/teact'; import { memo, useMemo } from '../../../lib/teact/teact';
import type { GroupCallParticipant } from '../../../lib/secret-sauce'; import type { GroupCallParticipant } from '../../../lib/secret-sauce';

View File

@ -1,5 +1,4 @@
import type { FC } from '../../../lib/teact/teact'; import type { FC } from '../../../lib/teact/teact';
import React from '../../../lib/teact/teact';
import { Bundles } from '../../../util/moduleLoader'; import { Bundles } from '../../../util/moduleLoader';

View File

@ -1,7 +1,7 @@
import '../../../global/actions/calls'; import '../../../global/actions/calls';
import type { FC } from '../../../lib/teact/teact'; import type { FC } from '../../../lib/teact/teact';
import React, { import {
memo, useCallback, useEffect, useMemo, useRef, memo, useCallback, useEffect, useMemo, useRef,
} from '../../../lib/teact/teact'; } from '../../../lib/teact/teact';
import { getActions, withGlobal } from '../../../global'; import { getActions, withGlobal } from '../../../global';

View File

@ -1,5 +1,6 @@
import type { FC } from '../../../lib/teact/teact'; import type { FC } from '../../../lib/teact/teact';
import React, { memo } from '../../../lib/teact/teact'; import type React from '../../../lib/teact/teact';
import { memo } from '../../../lib/teact/teact';
import type { IconName } from '../../../types/icons'; import type { IconName } from '../../../types/icons';

View File

@ -1,5 +1,4 @@
import type { FC } from '../../../lib/teact/teact'; import type { FC } from '../../../lib/teact/teact';
import React from '../../../lib/teact/teact';
import type { OwnProps } from './RatePhoneCallModal'; import type { OwnProps } from './RatePhoneCallModal';

View File

@ -1,5 +1,5 @@
import type { FC } from '../../../lib/teact/teact'; import type { FC } from '../../../lib/teact/teact';
import React, { import {
memo, useCallback, useRef, useState, memo, useCallback, useRef, useState,
} from '../../../lib/teact/teact'; } from '../../../lib/teact/teact';
import { getActions } from '../../../global'; import { getActions } from '../../../global';

View File

@ -1,5 +1,4 @@
import type { FC } from '../../lib/teact/teact'; import type { FC } from '../../lib/teact/teact';
import React from '../../lib/teact/teact';
import type { OwnProps } from './AboutMonetizationModal'; import type { OwnProps } from './AboutMonetizationModal';

View File

@ -1,5 +1,5 @@
import type { FC } from '../../lib/teact/teact'; import type { FC } from '../../lib/teact/teact';
import React, { memo, useMemo } from '../../lib/teact/teact'; import { memo, useMemo } from '../../lib/teact/teact';
import type { TableAboutData } from '../modals/common/TableAboutModal'; import type { TableAboutData } from '../modals/common/TableAboutModal';

View File

@ -1,5 +1,6 @@
import type { ElementRef, FC } from '../../lib/teact/teact'; import type { ElementRef, FC } from '../../lib/teact/teact';
import React, { memo, useEffect, useMemo } from '../../lib/teact/teact'; import type React from '../../lib/teact/teact';
import { memo, useEffect, useMemo } from '../../lib/teact/teact';
import { getGlobal } from '../../global'; import { getGlobal } from '../../global';
import { selectCanAnimateInterface } from '../../global/selectors'; import { selectCanAnimateInterface } from '../../global/selectors';

View File

@ -1,4 +1,4 @@
import React, { memo, useState } from '../../lib/teact/teact'; import { memo, useState } from '../../lib/teact/teact';
import type { OwnProps as AnimatedStickerProps } from './AnimatedSticker'; import type { OwnProps as AnimatedStickerProps } from './AnimatedSticker';

View File

@ -1,4 +1,4 @@
import React, { memo } from '../../lib/teact/teact'; import { memo } from '../../lib/teact/teact';
import type { ApiSticker } from '../../api/types'; import type { ApiSticker } from '../../api/types';
import type { OwnProps as AnimatedIconProps } from './AnimatedIcon'; import type { OwnProps as AnimatedIconProps } from './AnimatedIcon';

View File

@ -1,4 +1,4 @@
import React, { memo } from '../../lib/teact/teact'; import { memo } from '../../lib/teact/teact';
import type { OwnProps as AnimatedIconProps } from './AnimatedIcon'; import type { OwnProps as AnimatedIconProps } from './AnimatedIcon';

View File

@ -1,5 +1,5 @@
import type { ElementRef, FC } from '../../lib/teact/teact'; import type { ElementRef, FC } from '../../lib/teact/teact';
import React, { import {
getIsHeavyAnimating, getIsHeavyAnimating,
memo, memo,
useEffect, useEffect,

View File

@ -1,5 +1,5 @@
import type { ElementRef, FC } from '../../lib/teact/teact'; import type { ElementRef, FC } from '../../lib/teact/teact';
import React, { import {
memo, useEffect, useLayoutEffect, useMemo, useRef, useState, memo, useEffect, useLayoutEffect, useMemo, useRef, useState,
} from '../../lib/teact/teact'; } from '../../lib/teact/teact';
import { getActions } from '../../global'; import { getActions } from '../../global';

View File

@ -1,6 +1,7 @@
import type { MouseEvent as ReactMouseEvent } from 'react'; import type { MouseEvent as ReactMouseEvent } from 'react';
import type { FC, TeactNode } from '../../lib/teact/teact'; import type { FC, TeactNode } from '../../lib/teact/teact';
import React, { memo, useMemo, useRef } from '../../lib/teact/teact'; import type React from '../../lib/teact/teact';
import { memo, useMemo, useRef } from '../../lib/teact/teact';
import { getActions } from '../../global'; import { getActions } from '../../global';
import type { import type {

View File

@ -1,5 +1,5 @@
import type { FC } from '../../lib/teact/teact'; import type { FC } from '../../lib/teact/teact';
import React, { memo, useMemo } from '../../lib/teact/teact'; import { memo, useMemo } from '../../lib/teact/teact';
import type { ApiPeer } from '../../api/types'; import type { ApiPeer } from '../../api/types';
import type { AvatarSize } from './Avatar'; import type { AvatarSize } from './Avatar';

View File

@ -1,4 +1,4 @@
import React, { import {
memo, useLayoutEffect, useMemo, useRef, memo, useLayoutEffect, useMemo, useRef,
} from '../../lib/teact/teact'; } from '../../lib/teact/teact';
import { withGlobal } from '../../global'; import { withGlobal } from '../../global';

View File

@ -1,4 +1,4 @@
import React from '../../lib/teact/teact'; import type React from '../../lib/teact/teact';
import buildClassName from '../../util/buildClassName'; import buildClassName from '../../util/buildClassName';

View File

@ -1,4 +1,4 @@
import React, { import {
type TeactNode, type TeactNode,
useRef, useRef,
} from '../../lib/teact/teact'; } from '../../lib/teact/teact';

View File

@ -1,5 +1,4 @@
import type { FC } from '../../lib/teact/teact'; import type { FC } from '../../lib/teact/teact';
import React from '../../lib/teact/teact';
import type { OwnProps } from './CalendarModal'; import type { OwnProps } from './CalendarModal';

View File

@ -1,5 +1,6 @@
import type { FC } from '../../lib/teact/teact'; import type { FC } from '../../lib/teact/teact';
import React, { import type React from '../../lib/teact/teact';
import {
memo, useCallback, useEffect, useMemo, useState, memo, useCallback, useEffect, useMemo, useState,
} from '../../lib/teact/teact'; } from '../../lib/teact/teact';

View File

@ -1,5 +1,6 @@
import type { FC } from '../../lib/teact/teact'; import type { FC } from '../../lib/teact/teact';
import React, { import type React from '../../lib/teact/teact';
import {
memo, memo,
useEffect, useEffect,
useMemo, useMemo,

View File

@ -1,5 +1,6 @@
import type { FC } from '../../lib/teact/teact'; import type { FC } from '../../lib/teact/teact';
import React, { memo, useCallback } from '../../lib/teact/teact'; import type React from '../../lib/teact/teact';
import { memo, useCallback } from '../../lib/teact/teact';
import { getActions } from '../../global'; import { getActions } from '../../global';
import buildClassName from '../../util/buildClassName'; import buildClassName from '../../util/buildClassName';

View File

@ -1,5 +1,5 @@
import type { FC, TeactNode } from '../../lib/teact/teact'; import type { FC, TeactNode } from '../../lib/teact/teact';
import React, { import {
memo, useEffect, useMemo, useRef, useSignal, useState, memo, useEffect, useMemo, useRef, useSignal, useState,
} from '../../lib/teact/teact'; } from '../../lib/teact/teact';
import { getActions, getGlobal, withGlobal } from '../../global'; import { getActions, getGlobal, withGlobal } from '../../global';

View File

@ -1,5 +1,4 @@
import type { FC } from '../../lib/teact/teact'; import type { FC } from '../../lib/teact/teact';
import React from '../../lib/teact/teact';
import type { OwnProps } from './CountryPickerModal'; import type { OwnProps } from './CountryPickerModal';

View File

@ -1,5 +1,5 @@
import type { FC } from '../../lib/teact/teact'; import type { FC } from '../../lib/teact/teact';
import React, { import {
memo, useMemo, useState, memo, useMemo, useState,
} from '../../lib/teact/teact'; } from '../../lib/teact/teact';
import { getActions } from '../../global'; import { getActions } from '../../global';

View File

@ -1,5 +1,5 @@
import type { ElementRef, FC } from '../../lib/teact/teact'; import type { ElementRef, FC } from '../../lib/teact/teact';
import React, { memo, useRef, useState } from '../../lib/teact/teact'; import { memo, useRef, useState } from '../../lib/teact/teact';
import { getGlobal } from '../../global'; import { getGlobal } from '../../global';
import type { ObserveFn } from '../../hooks/useIntersectionObserver'; import type { ObserveFn } from '../../hooks/useIntersectionObserver';

View File

@ -1,5 +1,5 @@
import type { FC } from '../../lib/teact/teact'; import type { FC } from '../../lib/teact/teact';
import React, { import {
memo, useEffect, useMemo, useRef, memo, useEffect, useMemo, useRef,
} from '../../lib/teact/teact'; } from '../../lib/teact/teact';
import { getGlobal, withGlobal } from '../../global'; import { getGlobal, withGlobal } from '../../global';

View File

@ -1,5 +1,4 @@
import type { FC } from '../../lib/teact/teact'; import type { FC } from '../../lib/teact/teact';
import React from '../../lib/teact/teact';
import type { OwnProps } from './CustomEmojiSetsModal'; import type { OwnProps } from './CustomEmojiSetsModal';

View File

@ -1,5 +1,5 @@
import type { FC } from '../../lib/teact/teact'; import type { FC } from '../../lib/teact/teact';
import React, { import {
memo, memo,
useMemo, useMemo,
useRef, useRef,

View File

@ -1,5 +1,5 @@
import type { FC } from '../../lib/teact/teact'; import type { FC } from '../../lib/teact/teact';
import React, { memo } from '../../lib/teact/teact'; import { memo } from '../../lib/teact/teact';
import { getActions, withGlobal } from '../../global'; import { getActions, withGlobal } from '../../global';
import type { ApiChat } from '../../api/types'; import type { ApiChat } from '../../api/types';

View File

@ -1,5 +1,4 @@
import type { FC } from '../../lib/teact/teact'; import type { FC } from '../../lib/teact/teact';
import React from '../../lib/teact/teact';
import type { OwnProps } from './DeleteMessageModal'; import type { OwnProps } from './DeleteMessageModal';

View File

@ -1,5 +1,5 @@
import type { FC } from '../../lib/teact/teact'; import type { FC } from '../../lib/teact/teact';
import React, { import {
memo, memo,
useEffect, useEffect,
useMemo, useMemo,

View File

@ -1,5 +1,5 @@
import type { FC } from '../../lib/teact/teact'; import type { FC } from '../../lib/teact/teact';
import React, { memo, useCallback } from '../../lib/teact/teact'; import { memo, useCallback } from '../../lib/teact/teact';
import { getActions } from '../../global'; import { getActions } from '../../global';
import type { ApiPhoto } from '../../api/types'; import type { ApiPhoto } from '../../api/types';

View File

@ -1,4 +1,4 @@
import React, { import {
memo, useEffect, useRef, useState, memo, useEffect, useRef, useState,
} from '../../lib/teact/teact'; } from '../../lib/teact/teact';
import { getActions } from '../../global'; import { getActions } from '../../global';

View File

@ -1,5 +1,4 @@
import type { FC } from '../../lib/teact/teact'; import type { FC } from '../../lib/teact/teact';
import React from '../../lib/teact/teact';
import buildClassName from '../../util/buildClassName'; import buildClassName from '../../util/buildClassName';
import renderText from './helpers/renderText'; import renderText from './helpers/renderText';

View File

@ -1,5 +1,5 @@
import type { FC } from '../../lib/teact/teact'; import type { FC } from '../../lib/teact/teact';
import React, { memo } from '../../lib/teact/teact'; import { memo } from '../../lib/teact/teact';
import type { ApiFakeType } from '../../api/types'; import type { ApiFakeType } from '../../api/types';

View File

@ -1,5 +1,6 @@
import type { ElementRef, FC } from '../../lib/teact/teact'; import type { ElementRef, FC } from '../../lib/teact/teact';
import React, { import type React from '../../lib/teact/teact';
import {
memo, useMemo, useRef, useState, memo, useMemo, useRef, useState,
} from '../../lib/teact/teact'; } from '../../lib/teact/teact';

View File

@ -1,5 +1,6 @@
import type { FC } from '../../lib/teact/teact'; import type { FC } from '../../lib/teact/teact';
import React, { memo, useMemo } from '../../lib/teact/teact'; import type React from '../../lib/teact/teact';
import { memo, useMemo } from '../../lib/teact/teact';
import { getActions } from '../../global'; import { getActions } from '../../global';
import type { import type {

View File

@ -1,5 +1,6 @@
import type { FC } from '../../lib/teact/teact'; import type { FC } from '../../lib/teact/teact';
import React, { import type React from '../../lib/teact/teact';
import {
memo, useEffect, useRef, useState, memo, useEffect, useRef, useState,
} from '../../lib/teact/teact'; } from '../../lib/teact/teact';

View File

@ -1,5 +1,6 @@
import type { FC } from '../../lib/teact/teact'; import type { FC } from '../../lib/teact/teact';
import React, { useCallback } from '../../lib/teact/teact'; import type React from '../../lib/teact/teact';
import { useCallback } from '../../lib/teact/teact';
import { getActions } from '../../global'; import { getActions } from '../../global';
import type { ApiGroupCall } from '../../api/types'; import type { ApiGroupCall } from '../../api/types';

View File

@ -1,5 +1,6 @@
import type { FC } from '../../lib/teact/teact'; import type { FC } from '../../lib/teact/teact';
import React, { memo, useEffect, useMemo } from '../../lib/teact/teact'; import type React from '../../lib/teact/teact';
import { memo, useEffect, useMemo } from '../../lib/teact/teact';
import { getActions, withGlobal } from '../../global'; import { getActions, withGlobal } from '../../global';
import type { import type {

View File

@ -1,4 +1,4 @@
import React, { memo } from '../../lib/teact/teact'; import { memo } from '../../lib/teact/teact';
import type { ApiMessage, ApiMessageOutgoingStatus } from '../../api/types'; import type { ApiMessage, ApiMessageOutgoingStatus } from '../../api/types';

View File

@ -1,5 +1,5 @@
import type { FC } from '../../lib/teact/teact'; import type { FC } from '../../lib/teact/teact';
import React, { memo, useMemo } from '../../lib/teact/teact'; import { memo, useMemo } from '../../lib/teact/teact';
import { getActions } from '../../global'; import { getActions } from '../../global';
import buildClassName from '../../util/buildClassName'; import buildClassName from '../../util/buildClassName';

View File

@ -1,5 +1,5 @@
import type { FC } from '../../lib/teact/teact'; import type { FC } from '../../lib/teact/teact';
import React, { import {
memo, useCallback, useEffect, useMemo, useState, memo, useCallback, useEffect, useMemo, useState,
} from '../../lib/teact/teact'; } from '../../lib/teact/teact';
import { getActions } from '../../global'; import { getActions } from '../../global';

View File

@ -1,5 +1,5 @@
import type { FC } from '../../lib/teact/teact'; import type { FC } from '../../lib/teact/teact';
import React, { memo, useRef } from '../../lib/teact/teact'; import { memo, useRef } from '../../lib/teact/teact';
import type { ApiMessage } from '../../api/types'; import type { ApiMessage } from '../../api/types';
import type { ObserveFn } from '../../hooks/useIntersectionObserver'; import type { ObserveFn } from '../../hooks/useIntersectionObserver';

View File

@ -1,5 +1,6 @@
import type { FC } from '../../lib/teact/teact'; import type { FC } from '../../lib/teact/teact';
import React, { memo, useRef } from '../../lib/teact/teact'; import type React from '../../lib/teact/teact';
import { memo, useRef } from '../../lib/teact/teact';
import { requestMutation } from '../../lib/fasterdom/fasterdom'; import { requestMutation } from '../../lib/fasterdom/fasterdom';
import buildClassName from '../../util/buildClassName'; import buildClassName from '../../util/buildClassName';

View File

@ -1,5 +1,6 @@
import type { FC } from '../../lib/teact/teact'; import type { FC } from '../../lib/teact/teact';
import React, { useCallback } from '../../lib/teact/teact'; import type React from '../../lib/teact/teact';
import { useCallback } from '../../lib/teact/teact';
import { getActions } from '../../global'; import { getActions } from '../../global';
import type { ApiMessage } from '../../api/types'; import type { ApiMessage } from '../../api/types';

View File

@ -1,5 +1,5 @@
import type { FC } from '../../lib/teact/teact'; import type { FC } from '../../lib/teact/teact';
import React, { memo } from '../../lib/teact/teact'; import { memo } from '../../lib/teact/teact';
import type { ApiMessageOutgoingStatus } from '../../api/types'; import type { ApiMessageOutgoingStatus } from '../../api/types';

View File

@ -1,4 +1,4 @@
import React, { memo } from '../../lib/teact/teact'; import { memo } from '../../lib/teact/teact';
import { withGlobal } from '../../global'; import { withGlobal } from '../../global';
import type { import type {

View File

@ -1,4 +1,4 @@
import React, { import {
memo, useMemo, useRef, memo, useMemo, useRef,
} from '../../lib/teact/teact'; } from '../../lib/teact/teact';

View File

@ -1,4 +1,4 @@
import React, { memo, type TeactNode } from '../../lib/teact/teact'; import { memo, type TeactNode } from '../../lib/teact/teact';
import buildClassName from '../../util/buildClassName'; import buildClassName from '../../util/buildClassName';

View File

@ -1,5 +1,5 @@
import type { FC } from '../../lib/teact/teact'; import type { FC } from '../../lib/teact/teact';
import React, { memo } from '../../lib/teact/teact'; import { memo } from '../../lib/teact/teact';
import buildClassName from '../../util/buildClassName'; import buildClassName from '../../util/buildClassName';
import renderText from './helpers/renderText'; import renderText from './helpers/renderText';

View File

@ -1,6 +1,7 @@
import type { ChangeEvent } from 'react'; import type { ChangeEvent } from 'react';
import type { FC } from '../../lib/teact/teact'; import type { FC } from '../../lib/teact/teact';
import React, { import type React from '../../lib/teact/teact';
import {
memo, useEffect, useRef, useState, memo, useEffect, useRef, useState,
} from '../../lib/teact/teact'; } from '../../lib/teact/teact';

View File

@ -1,5 +1,5 @@
import type { FC } from '../../lib/teact/teact'; import type { FC } from '../../lib/teact/teact';
import React, { memo, useCallback } from '../../lib/teact/teact'; import { memo, useCallback } from '../../lib/teact/teact';
import { STICKER_SIZE_AUTH, STICKER_SIZE_AUTH_MOBILE, STICKER_SIZE_TWO_FA } from '../../config'; import { STICKER_SIZE_AUTH, STICKER_SIZE_AUTH_MOBILE, STICKER_SIZE_TWO_FA } from '../../config';
import { LOCAL_TGS_URLS } from './helpers/animatedAssets'; import { LOCAL_TGS_URLS } from './helpers/animatedAssets';

View File

@ -1,5 +1,5 @@
import type { FC, StateHookSetter } from '../../lib/teact/teact'; import type { FC, StateHookSetter } from '../../lib/teact/teact';
import React, { memo } from '../../lib/teact/teact'; import { memo } from '../../lib/teact/teact';
import { formatStarsAsText } from '../../util/localization/format'; import { formatStarsAsText } from '../../util/localization/format';

View File

@ -1,4 +1,4 @@
import React, { memo } from '../../lib/teact/teact'; import { memo } from '../../lib/teact/teact';
import type { ApiPeer, ApiWebDocument } from '../../api/types'; import type { ApiPeer, ApiWebDocument } from '../../api/types';
import type { CustomPeer } from '../../types'; import type { CustomPeer } from '../../types';

View File

@ -1,5 +1,5 @@
import type { TeactNode } from '../../lib/teact/teact'; import type { TeactNode } from '../../lib/teact/teact';
import React, { memo } from '../../lib/teact/teact'; import { memo } from '../../lib/teact/teact';
import { withGlobal } from '../../global'; import { withGlobal } from '../../global';
import type { ApiPeer } from '../../api/types'; import type { ApiPeer } from '../../api/types';

View File

@ -1,5 +1,6 @@
import type { ElementRef } from '../../lib/teact/teact'; import type { ElementRef } from '../../lib/teact/teact';
import React, { memo } from '../../lib/teact/teact'; import type React from '../../lib/teact/teact';
import { memo } from '../../lib/teact/teact';
import type { ApiPeer, ApiPeerColor } from '../../api/types'; import type { ApiPeer, ApiPeerColor } from '../../api/types';

View File

@ -1,5 +1,4 @@
import type { FC } from '../../lib/teact/teact'; import type { FC } from '../../lib/teact/teact';
import React from '../../lib/teact/teact';
import type { OwnProps } from './PinMessageModal'; import type { OwnProps } from './PinMessageModal';

View File

@ -1,4 +1,4 @@
import React, { memo, useState } from '../../lib/teact/teact'; import { memo, useState } from '../../lib/teact/teact';
import { getActions, withGlobal } from '../../global'; import { getActions, withGlobal } from '../../global';
import { import {

View File

@ -1,5 +1,5 @@
import type { FC } from '../../lib/teact/teact'; import type { FC } from '../../lib/teact/teact';
import React, { import {
memo, useEffect, useRef, useState, memo, useEffect, useRef, useState,
} from '../../lib/teact/teact'; } from '../../lib/teact/teact';

View File

@ -1,5 +1,5 @@
import type { FC } from '../../lib/teact/teact'; import type { FC } from '../../lib/teact/teact';
import React, { memo, useRef } from '../../lib/teact/teact'; import { memo, useRef } from '../../lib/teact/teact';
import type { ApiBotPreviewMedia } from '../../api/types'; import type { ApiBotPreviewMedia } from '../../api/types';
import type { ObserveFn } from '../../hooks/useIntersectionObserver'; import type { ObserveFn } from '../../hooks/useIntersectionObserver';

View File

@ -1,5 +1,4 @@
import type { FC } from '../../lib/teact/teact'; import type { FC } from '../../lib/teact/teact';
import React from '../../lib/teact/teact';
import type { OwnProps } from './PrivacySettingsNoticeModal'; import type { OwnProps } from './PrivacySettingsNoticeModal';

View File

@ -1,4 +1,4 @@
import React, { memo } from '../../lib/teact/teact'; import { memo } from '../../lib/teact/teact';
import { getActions, withGlobal } from '../../global'; import { getActions, withGlobal } from '../../global';
import type { ApiUser } from '../../api/types'; import type { ApiUser } from '../../api/types';

View File

@ -1,5 +1,6 @@
import type { FC } from '../../lib/teact/teact'; import type { FC } from '../../lib/teact/teact';
import React, { memo, useEffect, useMemo } from '../../lib/teact/teact'; import type React from '../../lib/teact/teact';
import { memo, useEffect, useMemo } from '../../lib/teact/teact';
import { getActions, withGlobal } from '../../global'; import { getActions, withGlobal } from '../../global';
import type { import type {

View File

@ -1,5 +1,5 @@
import type { FC } from '../../lib/teact/teact'; import type { FC } from '../../lib/teact/teact';
import React, { memo, useEffect, useState } from '../../lib/teact/teact'; import { memo, useEffect, useState } from '../../lib/teact/teact';
import { getActions, withGlobal } from '../../global'; import { getActions, withGlobal } from '../../global';
import type { import type {

View File

@ -1,5 +1,5 @@
import type { FC, TeactNode } from '../../lib/teact/teact'; import type { FC, TeactNode } from '../../lib/teact/teact';
import React, { import {
memo, useEffect, useMemo, useRef, memo, useEffect, useMemo, useRef,
} from '../../lib/teact/teact'; } from '../../lib/teact/teact';

View File

@ -1,5 +1,5 @@
import type { FC } from '../../lib/teact/teact'; import type { FC } from '../../lib/teact/teact';
import React, { memo, useMemo, useState } from '../../lib/teact/teact'; import { memo, useMemo, useState } from '../../lib/teact/teact';
import { getGlobal, withGlobal } from '../../global'; import { getGlobal, withGlobal } from '../../global';
import type { ApiChatType } from '../../api/types'; import type { ApiChatType } from '../../api/types';

View File

@ -1,6 +1,6 @@
import type { ChangeEvent } from 'react'; import type { ChangeEvent } from 'react';
import type { FC } from '../../lib/teact/teact'; import type { FC } from '../../lib/teact/teact';
import React, { memo, useMemo, useState } from '../../lib/teact/teact'; import { memo, useMemo, useState } from '../../lib/teact/teact';
import { getActions } from '../../global'; import { getActions } from '../../global';
import type { ApiPhoto, ApiReportReason } from '../../api/types'; import type { ApiPhoto, ApiReportReason } from '../../api/types';

View File

@ -1,5 +1,5 @@
import type { TeactNode } from '../../lib/teact/teact'; import type { TeactNode } from '../../lib/teact/teact';
import React from '../../lib/teact/teact'; import type React from '../../lib/teact/teact';
import { getActions } from '../../global'; import { getActions } from '../../global';
import { ApiMessageEntityTypes } from '../../api/types'; import { ApiMessageEntityTypes } from '../../api/types';

View File

@ -1,5 +1,4 @@
import type { FC } from '../../lib/teact/teact'; import type { FC } from '../../lib/teact/teact';
import React from '../../lib/teact/teact';
import type { OwnProps } from './SeenByModal'; import type { OwnProps } from './SeenByModal';

View File

@ -1,4 +1,4 @@
import React, { memo, useMemo } from '../../lib/teact/teact'; import { memo, useMemo } from '../../lib/teact/teact';
import { getActions, withGlobal } from '../../global'; import { getActions, withGlobal } from '../../global';
import { selectChatMessage, selectTabState } from '../../global/selectors'; import { selectChatMessage, selectTabState } from '../../global/selectors';

View File

@ -1,5 +1,5 @@
import type { FC } from '../../lib/teact/teact'; import type { FC } from '../../lib/teact/teact';
import React, { memo, useCallback } from '../../lib/teact/teact'; import { memo, useCallback } from '../../lib/teact/teact';
import { IS_TOUCH_ENV } from '../../util/browser/windowEnvironment'; import { IS_TOUCH_ENV } from '../../util/browser/windowEnvironment';
import buildClassName from '../../util/buildClassName'; import buildClassName from '../../util/buildClassName';

View File

@ -1,4 +1,4 @@
import React, { memo } from '../../lib/teact/teact'; import { memo } from '../../lib/teact/teact';
import buildClassName from '../../util/buildClassName'; import buildClassName from '../../util/buildClassName';
import buildStyle from '../../util/buildStyle'; import buildStyle from '../../util/buildStyle';

View File

@ -1,7 +1,8 @@
import type { MouseEvent as ReactMouseEvent, ReactNode } from 'react'; import type { MouseEvent as ReactMouseEvent, ReactNode } from 'react';
import type { import type {
ElementRef } from '../../lib/teact/teact'; ElementRef } from '../../lib/teact/teact';
import React, { import type React from '../../lib/teact/teact';
import {
memo, useEffect, useMemo, useRef, memo, useEffect, useMemo, useRef,
} from '../../lib/teact/teact'; } from '../../lib/teact/teact';
import { getActions } from '../../global'; import { getActions } from '../../global';

View File

@ -1,5 +1,5 @@
import type { FC } from '../../lib/teact/teact'; import type { FC } from '../../lib/teact/teact';
import React, { import {
memo, useEffect, useMemo, useRef, useState, memo, useEffect, useMemo, useRef, useState,
} from '../../lib/teact/teact'; } from '../../lib/teact/teact';
import { getActions, getGlobal, withGlobal } from '../../global'; import { getActions, getGlobal, withGlobal } from '../../global';

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