Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
57 changes: 57 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,51 @@
"require": "./server/index.js",
"import": "./server/index.js"
},
"./models": {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why we add these imports ?

"types": "./build/esm/models/index.d.ts",
"require": "./build/cjs/models/index.js",
"import": "./build/esm/models/index.js"
},
"./utils": {
"types": "./build/esm/utils/index.d.ts",
"require": "./build/cjs/utils/index.js",
"import": "./build/esm/utils/index.js"
},
"./grid": {
"types": "./build/esm/grid/index.d.ts",
"require": "./build/cjs/grid/index.js",
"import": "./build/esm/grid/index.js"
},
"./grid/*": {
"types": "./build/esm/grid/*.d.ts",
"require": "./build/cjs/grid/*.js",
"import": "./build/esm/grid/*.js"
},
"./components": {
"types": "./build/esm/components/index.d.ts",
"require": "./build/cjs/components/index.js",
"import": "./build/esm/components/index.js"
},
"./components/*": {
"types": "./build/esm/components/*.d.ts",
"require": "./build/cjs/components/*.js",
"import": "./build/esm/components/*.js"
},
"./sub-blocks/*": {
"types": "./build/esm/sub-blocks/*.d.ts",
"require": "./build/cjs/sub-blocks/*.js",
"import": "./build/esm/sub-blocks/*.js"
},
"./blocks/*": {
"types": "./build/esm/blocks/*.d.ts",
"require": "./build/cjs/blocks/*.js",
"import": "./build/esm/blocks/*.js"
},
"./navigation/*": {
"types": "./build/esm/navigation/*.d.ts",
"require": "./build/cjs/navigation/*.js",
"import": "./build/esm/navigation/*.js"
},
"./styles/*": "./styles/*",
"./widget/*": "./widget/*",
"./schema/*": "./schema/*"
Expand All @@ -46,6 +91,18 @@
],
"server": [
"./server/index.d.ts"
],
"models": [
"./build/esm/models/index.d.ts"
],
"utils": [
"./build/esm/utils/index.d.ts"
],
"grid": [
"./build/esm/grid/index.d.ts"
],
"components": [
"./build/esm/components/index.d.ts"
]
}
},
Expand Down
2 changes: 1 addition & 1 deletion src/blocks/Banner/Banner.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import AnimateBlock from '../../components/AnimateBlock/AnimateBlock';
import {BannerBlockProps} from '../../models';
import {BannerCard} from '../../sub-blocks';
import BannerCard from '../../sub-blocks/BannerCard/BannerCard';
import {block} from '../../utils';

import './Banner.scss';
Expand Down
4 changes: 3 additions & 1 deletion src/blocks/CardLayout/CardLayout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@ import * as React from 'react';

import isEmpty from 'lodash/isEmpty';

import {AnimateBlock, BackgroundImage, Title} from '../../components';
import AnimateBlock from '../../components/AnimateBlock/AnimateBlock';
import BackgroundImage from '../../components/BackgroundImage/BackgroundImage';
import Title from '../../components/Title/Title';
import {useTheme} from '../../context/theme';
import {Col, GridColumnSizesType, GridJustifyContent, Row} from '../../grid';
import {CardLayoutBlockProps as CardLayoutBlockParams, ClassNameProps} from '../../models';
Expand Down
3 changes: 2 additions & 1 deletion src/blocks/Companies/Companies.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import {Image, Title} from '../../components';
import AnimateBlock from '../../components/AnimateBlock/AnimateBlock';
import Image from '../../components/Image/Image';
import Title from '../../components/Title/Title';
import {useTheme} from '../../context/theme';
import {CompaniesBlockProps} from '../../models';
import {block, getThemedValue} from '../../utils';
Expand Down
2 changes: 2 additions & 0 deletions src/blocks/ContentLayout/ContentLayout.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
'use client';

import * as React from 'react';

import {BackgroundImage, FileLink} from '../../components';
Expand Down
6 changes: 4 additions & 2 deletions src/blocks/ExtendedFeatures/ExtendedFeatures.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
import {AnimateBlock, Title, YFMWrapper} from '../../components/';
import AnimateBlock from '../../components/AnimateBlock/AnimateBlock';
import Image from '../../components/Image/Image';
import {getMediaImage} from '../../components/Media/Image/utils';
import Title from '../../components/Title/Title';
import YFMWrapper from '../../components/YFMWrapper/YFMWrapper';
import {useTheme} from '../../context/theme';
import {Col, Row} from '../../grid';
import {ExtendedFeaturesProps} from '../../models';
import {Content} from '../../sub-blocks';
import Content from '../../sub-blocks/Content/Content';
import {block, getThemedValue} from '../../utils';

import './ExtendedFeatures.scss';
Expand Down
2 changes: 2 additions & 0 deletions src/blocks/FilterBlock/FilterBlock.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
'use client';

import * as React from 'react';

import {CardLayoutBlock} from '..';
Expand Down
2 changes: 2 additions & 0 deletions src/blocks/FoldableList/FoldableList.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
'use client';

import * as React from 'react';

import {Col, Row} from '../../grid';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
'use client';

import {useActionHandlers} from '@gravity-ui/uikit';

import {Foldable, ToggleArrow, YFMWrapper} from '../../../components';
Expand Down
3 changes: 2 additions & 1 deletion src/blocks/Footer/Footer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ import * as React from 'react';

import {Link} from '@gravity-ui/uikit';

import {BrandFooter, Image} from '../../components';
import BrandFooter from '../../components/BrandFooter/BrandFooter';
import Image from '../../components/Image/Image';
import {useTheme} from '../../context/theme';
import {Col, Grid, Row} from '../../grid';
import {ClassNameProps, FooterBlockProps} from '../../models';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
'use client';

import * as React from 'react';

import {DropdownMenu, DropdownMenuItem, Link, useResizeObserver} from '@gravity-ui/uikit';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {YFMWrapper} from '../../../../components';
import YFMWrapper from '../../../../components/YFMWrapper/YFMWrapper';
import {Col} from '../../../../grid';
import {FooterBlockProps} from '../../../../models';
import {block} from '../../../../utils';
Expand Down
2 changes: 2 additions & 0 deletions src/blocks/Footer/components/LangSwitcher/LangSwitcher.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
'use client';

import * as React from 'react';

import {InnerContext} from '../../../../context/innerContext';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
'use client';

import * as React from 'react';

import {Link} from '@gravity-ui/uikit';
Expand Down
2 changes: 1 addition & 1 deletion src/blocks/Footer/components/SocialFloor/SocialFloor.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import {Flex, Link, Tooltip} from '@gravity-ui/uikit';

import {Image} from '../../../../components';
import Image from '../../../../components/Image/Image';
import {useTheme} from '../../../../context/theme';
import {Col} from '../../../../grid';
import type {FooterBlockProps, FooterContactItem} from '../../../../models';
Expand Down
2 changes: 2 additions & 0 deletions src/blocks/Footer/hooks/useOverflowListItems.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
'use client';

import * as React from 'react';

import {DropdownMenuItem, useResizeObserver} from '@gravity-ui/uikit';
Expand Down
2 changes: 2 additions & 0 deletions src/blocks/Form/Form.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
'use client';

import * as React from 'react';

import {BackgroundImage, Title} from '../../components';
Expand Down
2 changes: 2 additions & 0 deletions src/blocks/Header/Header.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
'use client';

/* eslint-disable complexity */
import * as React from 'react';

Expand Down
2 changes: 2 additions & 0 deletions src/blocks/Hero/Hero.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
'use client';

import * as React from 'react';

import {HeaderBreadcrumbs, Media, YFMWrapper} from '../../components';
Expand Down
2 changes: 2 additions & 0 deletions src/blocks/Hero/hooks.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
'use client';

import * as React from 'react';

import throttle from 'lodash/throttle';
Expand Down
2 changes: 2 additions & 0 deletions src/blocks/Icons/Icons.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
'use client';

import * as React from 'react';

import {Image, Title} from '../../components';
Expand Down
2 changes: 2 additions & 0 deletions src/blocks/Media/Media.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
'use client';

import * as React from 'react';

import Media from '../../components/Media/Media';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
'use client';

import {useActionHandlers} from '@gravity-ui/uikit';

import {Foldable, ToggleArrow, YFMWrapper} from '../../../components';
Expand Down
2 changes: 2 additions & 0 deletions src/blocks/Questions/Questions.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
'use client';

import * as React from 'react';

import {Col, Row} from '../../grid';
Expand Down
2 changes: 2 additions & 0 deletions src/blocks/Share/Share.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
'use client';

import * as React from 'react';

import {Button, Icon} from '@gravity-ui/uikit';
Expand Down
2 changes: 2 additions & 0 deletions src/blocks/Slider/Arrow/Arrow.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
'use client';

import ToggleArrow from '../../../components/ToggleArrow/ToggleArrow';
import {ClassNameProps} from '../../../models';
import {block} from '../../../utils';
Expand Down
2 changes: 2 additions & 0 deletions src/blocks/Slider/Slider.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
'use client';

import * as React from 'react';

import 'swiper/css';
Expand Down
2 changes: 2 additions & 0 deletions src/blocks/Slider/useSlider.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
'use client';

import * as React from 'react';

import type {Swiper} from 'swiper';
Expand Down
2 changes: 2 additions & 0 deletions src/blocks/SliderOld/Arrow/Arrow.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
'use client';

import ToggleArrow from '../../../components/ToggleArrow/ToggleArrow';
import {ClassNameProps} from '../../../models';
import {block} from '../../../utils';
Expand Down
2 changes: 2 additions & 0 deletions src/blocks/SliderOld/SliderOld.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
'use client';

import * as React from 'react';

import {useUniqId} from '@gravity-ui/uikit';
Expand Down
2 changes: 2 additions & 0 deletions src/blocks/Table/Table.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
'use client';

import * as React from 'react';

import {Table, YFMWrapper} from '../../components';
Expand Down
2 changes: 2 additions & 0 deletions src/blocks/Tabs/TabContent/TabContent.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
'use client';

import * as React from 'react';

import {useUniqId} from '@gravity-ui/uikit';
Expand Down
2 changes: 2 additions & 0 deletions src/blocks/Tabs/Tabs.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
'use client';

import * as React from 'react';

import {getUniqId} from '@gravity-ui/uikit';
Expand Down
2 changes: 1 addition & 1 deletion src/blocks/Tabs/TabsTextContent/TabsTextContent.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import {Col} from '../../../grid';
import {ImageDeviceProps, ImageObjectProps, TabsBlockItem, TabsBlockProps} from '../../../models';
import {Content} from '../../../sub-blocks';
import Content from '../../../sub-blocks/Content/Content';
import {block} from '../../../utils';

import './TabsTextContent.scss';
Expand Down
2 changes: 2 additions & 0 deletions src/components/AnimateBlock/AnimateBlock.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
'use client';

import * as React from 'react';

import {Waypoint} from 'react-waypoint';
Expand Down
2 changes: 1 addition & 1 deletion src/components/Author/Author.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ import * as React from 'react';

import {AuthorProps, AuthorType, ImageProps} from '../../models';
import {block} from '../../utils';
import Image from '../Image/Image';
import {getMediaImage} from '../Media/Image/utils';
import {Image} from '../index';

import './Author.scss';

Expand Down
2 changes: 2 additions & 0 deletions src/components/BackLink/BackLink.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
'use client';

import * as React from 'react';

import {ArrowLeft} from '@gravity-ui/icons';
Expand Down
2 changes: 2 additions & 0 deletions src/components/BalancedMasonry/BalancedMasonry.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
'use client';

import * as React from 'react';

import debounce from 'lodash/debounce';
Expand Down
2 changes: 2 additions & 0 deletions src/components/Button/Button.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
'use client';

import * as React from 'react';

import {StoreBadge} from '@gravity-ui/components';
Expand Down
4 changes: 3 additions & 1 deletion src/components/ButtonTabs/ButtonTabs.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
'use client';

import * as React from 'react';

import {ButtonSize} from '@gravity-ui/uikit';

import {AnalyticsEventsProp, ButtonProps, QAProps} from '../../models';
import {block} from '../../utils';
import {Button} from '../index';
import Button from '../Button/Button';

import './ButtonTabs.scss';

Expand Down
2 changes: 2 additions & 0 deletions src/components/CardBase/CardBase.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
'use client';

import * as React from 'react';

import {Link} from '@gravity-ui/uikit';
Expand Down
2 changes: 2 additions & 0 deletions src/components/Control/Control.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
'use client';

import {Icon, IconData} from '@gravity-ui/uikit';

import {block} from '../../utils';
Expand Down
2 changes: 2 additions & 0 deletions src/components/DefaultVideo/DefaultVideo.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
'use client';

import * as React from 'react';

import {CustomControlsType, MediaVideoControlsType, MediaVideoProps} from '../../models';
Expand Down
2 changes: 2 additions & 0 deletions src/components/ErrorWrapper/ErrorWrapper.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
'use client';

import * as React from 'react';

import {Button} from '@gravity-ui/uikit';
Expand Down
2 changes: 2 additions & 0 deletions src/components/FileLink/FileLink.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
'use client';

import * as React from 'react';

import {Label, LabelProps} from '@gravity-ui/uikit';
Expand Down
2 changes: 2 additions & 0 deletions src/components/Foldable/Foldable.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
'use client';

import * as React from 'react';

import useHeightCalculator from '../../hooks/useHeightCalculator';
Expand Down
2 changes: 2 additions & 0 deletions src/components/FullWidthBackground/FullWidthBackground.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
'use client';

import * as React from 'react';

import debounce from 'lodash/debounce';
Expand Down
2 changes: 2 additions & 0 deletions src/components/FullscreenImage/FullscreenImage.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
'use client';

import * as React from 'react';

import {ChevronsExpandUpRight, Xmark} from '@gravity-ui/icons';
Expand Down
2 changes: 2 additions & 0 deletions src/components/FullscreenMedia/FullscreenMedia.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
'use client';

import * as React from 'react';

import {ChevronsExpandUpRight, Xmark} from '@gravity-ui/icons';
Expand Down
Loading
Loading