@gravity-ui/blog-constructor 6.5.1-beta.0 → 6.6.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/cjs/blocks/Author/Author.d.ts +3 -2
- package/build/cjs/blocks/Author/Author.js +13 -13
- package/build/cjs/blocks/Author/schema.js +3 -4
- package/build/cjs/blocks/Banner/Banner.d.ts +3 -2
- package/build/cjs/blocks/Banner/Banner.js +15 -11
- package/build/cjs/blocks/Banner/schema.js +3 -4
- package/build/cjs/blocks/CTA/CTA.d.ts +3 -2
- package/build/cjs/blocks/CTA/CTA.js +20 -19
- package/build/cjs/blocks/CTA/schema.js +3 -4
- package/build/cjs/blocks/ColoredText/ColoredText.d.ts +3 -2
- package/build/cjs/blocks/ColoredText/ColoredText.js +12 -9
- package/build/cjs/blocks/ColoredText/schema.js +3 -4
- package/build/cjs/blocks/Feed/Feed.d.ts +3 -2
- package/build/cjs/blocks/Feed/Feed.js +31 -31
- package/build/cjs/blocks/Feed/reducer.d.ts +1 -1
- package/build/cjs/blocks/Feed/reducer.js +2 -3
- package/build/cjs/blocks/Feed/schema.js +2 -3
- package/build/cjs/blocks/Form/Form.d.ts +3 -2
- package/build/cjs/blocks/Form/Form.js +10 -10
- package/build/cjs/blocks/Form/schema.js +3 -4
- package/build/cjs/blocks/Header/Header.d.ts +3 -2
- package/build/cjs/blocks/Header/Header.js +18 -18
- package/build/cjs/blocks/Header/schema.d.ts +0 -3
- package/build/cjs/blocks/Header/schema.js +3 -4
- package/build/cjs/blocks/Layout/Layout.d.ts +3 -3
- package/build/cjs/blocks/Layout/Layout.js +13 -12
- package/build/cjs/blocks/Layout/schema.js +3 -4
- package/build/cjs/blocks/Media/Media.d.ts +3 -2
- package/build/cjs/blocks/Media/Media.js +15 -12
- package/build/cjs/blocks/Media/schema.d.ts +0 -3
- package/build/cjs/blocks/Media/schema.js +3 -4
- package/build/cjs/blocks/Meta/Meta.d.ts +3 -2
- package/build/cjs/blocks/Meta/Meta.js +23 -22
- package/build/cjs/blocks/Meta/schema.js +3 -4
- package/build/cjs/blocks/Suggest/Suggest.d.ts +3 -2
- package/build/cjs/blocks/Suggest/Suggest.js +14 -15
- package/build/cjs/blocks/Suggest/schema.js +3 -4
- package/build/cjs/blocks/YFM/YFM.d.ts +3 -2
- package/build/cjs/blocks/YFM/YFM.js +11 -10
- package/build/cjs/blocks/YFM/schema.js +3 -4
- package/build/cjs/blocks/constants.js +1 -2
- package/build/cjs/components/FeedHeader/FeedHeader.d.ts +4 -3
- package/build/cjs/components/FeedHeader/FeedHeader.js +14 -10
- package/build/cjs/components/FeedHeader/components/Controls/Controls.d.ts +4 -4
- package/build/cjs/components/FeedHeader/components/Controls/Controls.js +40 -30
- package/build/cjs/components/FeedHeader/components/Controls/customRenders.d.ts +3 -2
- package/build/cjs/components/FeedHeader/components/Controls/customRenders.js +9 -13
- package/build/cjs/components/FeedHeader/components/CustomSelectOption/CustomSelectOption.d.ts +2 -2
- package/build/cjs/components/FeedHeader/components/CustomSelectOption/CustomSelectOption.js +7 -5
- package/build/cjs/components/FeedHeader/components/CustomSwitcher/CustomSwitcher.css +1 -1
- package/build/cjs/components/FeedHeader/components/CustomSwitcher/CustomSwitcher.d.ts +3 -2
- package/build/cjs/components/FeedHeader/components/CustomSwitcher/CustomSwitcher.js +17 -13
- package/build/cjs/components/MetaWrapper/MetaWrapper.d.ts +1 -1
- package/build/cjs/components/MetaWrapper/MetaWrapper.js +4 -4
- package/build/cjs/components/Paginator/Paginator.d.ts +3 -2
- package/build/cjs/components/Paginator/Paginator.js +29 -25
- package/build/cjs/components/Paginator/components/NavigationButton.d.ts +3 -2
- package/build/cjs/components/Paginator/components/NavigationButton.js +7 -7
- package/build/cjs/components/Paginator/components/PaginatorItem.d.ts +3 -2
- package/build/cjs/components/Paginator/components/PaginatorItem.js +11 -13
- package/build/cjs/components/Paginator/types.d.ts +3 -3
- package/build/cjs/components/Paginator/types.js +1 -2
- package/build/cjs/components/Paginator/utils.d.ts +2 -2
- package/build/cjs/components/Paginator/utils.js +1 -2
- package/build/cjs/components/PostCard/PostCard.d.ts +3 -2
- package/build/cjs/components/PostCard/PostCard.js +23 -16
- package/build/cjs/components/PostInfo/PostInfo.d.ts +3 -2
- package/build/cjs/components/PostInfo/PostInfo.js +15 -13
- package/build/cjs/components/PostInfo/SuggestPostInfo.d.ts +3 -2
- package/build/cjs/components/PostInfo/SuggestPostInfo.js +16 -12
- package/build/cjs/components/PostInfo/components/Date.d.ts +3 -2
- package/build/cjs/components/PostInfo/components/Date.js +8 -10
- package/build/cjs/components/PostInfo/components/ReadingTime.d.ts +3 -2
- package/build/cjs/components/PostInfo/components/ReadingTime.js +10 -7
- package/build/cjs/components/PostInfo/components/Save.d.ts +3 -2
- package/build/cjs/components/PostInfo/components/Save.js +16 -14
- package/build/cjs/components/PostInfo/components/Sharing.d.ts +2 -1
- package/build/cjs/components/PostInfo/components/Sharing.js +17 -17
- package/build/cjs/components/Posts/Posts.d.ts +4 -4
- package/build/cjs/components/Posts/Posts.js +28 -16
- package/build/cjs/components/PostsEmpty/PostsEmpty.d.ts +2 -1
- package/build/cjs/components/PostsEmpty/PostsEmpty.js +8 -6
- package/build/cjs/components/PostsError/PostsError.d.ts +2 -1
- package/build/cjs/components/PostsError/PostsError.js +10 -6
- package/build/cjs/components/Prompt/Prompt.d.ts +2 -1
- package/build/cjs/components/Prompt/Prompt.js +12 -10
- package/build/cjs/components/PromptSignIn/PromptSignIn.d.ts +4 -4
- package/build/cjs/components/PromptSignIn/PromptSignIn.js +5 -6
- package/build/cjs/components/PromptSignIn/hooks/usePromptSignInProps.d.ts +2 -2
- package/build/cjs/components/PromptSignIn/hooks/usePromptSignInProps.js +5 -6
- package/build/cjs/components/Search/Search.d.ts +3 -2
- package/build/cjs/components/Search/Search.js +17 -17
- package/build/cjs/components/Wrapper/Wrapper.d.ts +3 -3
- package/build/cjs/components/Wrapper/Wrapper.js +7 -7
- package/build/cjs/constants.d.ts +2 -2
- package/build/cjs/constants.js +3 -4
- package/build/cjs/constructor/BlogConstructorProvider.d.ts +7 -7
- package/build/cjs/constructor/BlogConstructorProvider.js +19 -21
- package/build/cjs/constructor/blocksMap.d.ts +12 -12
- package/build/cjs/constructor/blocksMap.js +14 -15
- package/build/cjs/containers/BlogPage/BlogPage.d.ts +4 -4
- package/build/cjs/containers/BlogPage/BlogPage.js +25 -22
- package/build/cjs/containers/BlogPostPage/BlogPostPage.d.ts +4 -4
- package/build/cjs/containers/BlogPostPage/BlogPostPage.js +30 -27
- package/build/cjs/contexts/DeviceContext.d.ts +2 -2
- package/build/cjs/contexts/DeviceContext.js +2 -3
- package/build/cjs/contexts/FeedContext.d.ts +2 -2
- package/build/cjs/contexts/FeedContext.js +2 -3
- package/build/cjs/contexts/LikesContext.d.ts +2 -2
- package/build/cjs/contexts/LikesContext.js +2 -3
- package/build/cjs/contexts/LocaleContext.d.ts +2 -2
- package/build/cjs/contexts/LocaleContext.js +3 -4
- package/build/cjs/contexts/MobileContext.d.ts +1 -1
- package/build/cjs/contexts/MobileContext.js +2 -3
- package/build/cjs/contexts/PostPageContext.d.ts +2 -2
- package/build/cjs/contexts/PostPageContext.js +2 -3
- package/build/cjs/contexts/RouterContext.d.ts +2 -2
- package/build/cjs/contexts/RouterContext.js +2 -3
- package/build/cjs/contexts/SettingsContext.d.ts +1 -1
- package/build/cjs/contexts/SettingsContext.js +2 -3
- package/build/cjs/contexts/theme/ThemeContext.d.ts +2 -2
- package/build/cjs/contexts/theme/ThemeContext.js +3 -4
- package/build/cjs/contexts/theme/ThemeProvider.d.ts +4 -4
- package/build/cjs/contexts/theme/ThemeProvider.js +8 -9
- package/build/cjs/contexts/theme/ThemeValueContext.d.ts +1 -1
- package/build/cjs/contexts/theme/ThemeValueContext.js +2 -3
- package/build/cjs/contexts/theme/index.d.ts +6 -6
- package/build/cjs/contexts/theme/index.js +6 -7
- package/build/cjs/contexts/theme/useTheme.d.ts +1 -1
- package/build/cjs/contexts/theme/useTheme.js +5 -5
- package/build/cjs/contexts/theme/useThemeValue.d.ts +1 -1
- package/build/cjs/contexts/theme/useThemeValue.js +5 -5
- package/build/cjs/contexts/theme/withTheme.d.ts +2 -2
- package/build/cjs/contexts/theme/withTheme.js +6 -7
- package/build/cjs/contexts/theme/withThemeValue.d.ts +2 -2
- package/build/cjs/contexts/theme/withThemeValue.js +6 -7
- package/build/cjs/counters/metrika.js +3 -3
- package/build/cjs/counters/utils.js +1 -2
- package/build/cjs/hooks/useAriaAttributes.js +4 -6
- package/build/cjs/hooks/useExtendedComponentMap.d.ts +17 -18
- package/build/cjs/hooks/useExtendedComponentMap.js +4 -5
- package/build/cjs/hooks/useHover.d.ts +1 -1
- package/build/cjs/hooks/useHover.js +6 -6
- package/build/cjs/hooks/useIsIPhone.js +4 -6
- package/build/cjs/hooks/useLikes.d.ts +1 -1
- package/build/cjs/hooks/useLikes.js +6 -8
- package/build/cjs/hooks/useOpenCloseTimer.js +5 -6
- package/build/cjs/i18n/index.d.ts +1 -5
- package/build/cjs/i18n/index.js +2 -3
- package/build/cjs/icons/Close.d.ts +2 -2
- package/build/cjs/icons/Close.js +6 -5
- package/build/cjs/icons/DropdownArrow.d.ts +2 -2
- package/build/cjs/icons/DropdownArrow.js +6 -5
- package/build/cjs/icons/Save.d.ts +2 -2
- package/build/cjs/icons/Save.js +6 -5
- package/build/cjs/icons/SaveFilled.d.ts +2 -2
- package/build/cjs/icons/SaveFilled.js +6 -5
- package/build/cjs/icons/SearchIcon.d.ts +2 -2
- package/build/cjs/icons/SearchIcon.js +6 -5
- package/build/cjs/icons/ShareArrowUp.d.ts +2 -2
- package/build/cjs/icons/ShareArrowUp.js +6 -5
- package/build/cjs/icons/Time.d.ts +2 -2
- package/build/cjs/icons/Time.js +6 -5
- package/build/cjs/index.d.ts +8 -8
- package/build/cjs/index.js +8 -9
- package/build/cjs/models/blocks.d.ts +4 -4
- package/build/cjs/models/blocks.js +1 -2
- package/build/cjs/models/common.d.ts +3 -3
- package/build/cjs/models/common.js +5 -6
- package/build/cjs/models/locale.js +1 -2
- package/build/cjs/models/paddings.js +1 -2
- package/build/cjs/schema/blocks.d.ts +10 -10
- package/build/cjs/schema/blocks.js +10 -11
- package/build/cjs/schema/common.js +1 -2
- package/build/cjs/schema/headers.d.ts +1 -1
- package/build/cjs/schema/headers.js +1 -2
- package/build/cjs/schema/index.d.ts +2 -8
- package/build/cjs/schema/index.js +4 -5
- package/build/cjs/schema/utils.d.ts +1 -1
- package/build/cjs/schema/utils.js +1 -2
- package/build/cjs/utils/cn.js +1 -2
- package/build/cjs/utils/common.d.ts +19 -18
- package/build/cjs/utils/common.js +8 -9
- package/build/cjs/utils/date.js +1 -2
- package/build/cjs/utils/index.d.ts +1 -1
- package/build/cjs/utils/index.js +2 -3
- package/build/cjs/utils/svg.js +1 -2
- package/build/esm/blocks/Author/Author.d.ts +3 -2
- package/build/esm/blocks/Author/Author.js +13 -13
- package/build/esm/blocks/Author/schema.js +3 -4
- package/build/esm/blocks/Banner/Banner.d.ts +3 -2
- package/build/esm/blocks/Banner/Banner.js +15 -11
- package/build/esm/blocks/Banner/schema.js +3 -4
- package/build/esm/blocks/CTA/CTA.d.ts +3 -2
- package/build/esm/blocks/CTA/CTA.js +19 -19
- package/build/esm/blocks/CTA/schema.js +3 -4
- package/build/esm/blocks/ColoredText/ColoredText.d.ts +3 -2
- package/build/esm/blocks/ColoredText/ColoredText.js +12 -9
- package/build/esm/blocks/ColoredText/schema.js +3 -4
- package/build/esm/blocks/Feed/Feed.d.ts +3 -2
- package/build/esm/blocks/Feed/Feed.js +31 -31
- package/build/esm/blocks/Feed/reducer.d.ts +1 -1
- package/build/esm/blocks/Feed/reducer.js +1 -2
- package/build/esm/blocks/Feed/schema.js +2 -3
- package/build/esm/blocks/Form/Form.d.ts +3 -2
- package/build/esm/blocks/Form/Form.js +10 -10
- package/build/esm/blocks/Form/schema.js +3 -4
- package/build/esm/blocks/Header/Header.d.ts +3 -2
- package/build/esm/blocks/Header/Header.js +18 -18
- package/build/esm/blocks/Header/schema.d.ts +0 -3
- package/build/esm/blocks/Header/schema.js +3 -4
- package/build/esm/blocks/Layout/Layout.d.ts +3 -3
- package/build/esm/blocks/Layout/Layout.js +13 -12
- package/build/esm/blocks/Layout/schema.js +3 -4
- package/build/esm/blocks/Media/Media.d.ts +3 -2
- package/build/esm/blocks/Media/Media.js +15 -12
- package/build/esm/blocks/Media/schema.d.ts +0 -3
- package/build/esm/blocks/Media/schema.js +3 -4
- package/build/esm/blocks/Meta/Meta.d.ts +3 -2
- package/build/esm/blocks/Meta/Meta.js +23 -22
- package/build/esm/blocks/Meta/schema.js +3 -4
- package/build/esm/blocks/Suggest/Suggest.d.ts +3 -2
- package/build/esm/blocks/Suggest/Suggest.js +14 -15
- package/build/esm/blocks/Suggest/schema.js +3 -4
- package/build/esm/blocks/YFM/YFM.d.ts +3 -2
- package/build/esm/blocks/YFM/YFM.js +10 -10
- package/build/esm/blocks/YFM/schema.js +3 -4
- package/build/esm/blocks/constants.js +1 -2
- package/build/esm/components/FeedHeader/FeedHeader.d.ts +4 -3
- package/build/esm/components/FeedHeader/FeedHeader.js +13 -10
- package/build/esm/components/FeedHeader/components/Controls/Controls.d.ts +4 -4
- package/build/esm/components/FeedHeader/components/Controls/Controls.js +40 -30
- package/build/esm/components/FeedHeader/components/Controls/customRenders.d.ts +3 -2
- package/build/esm/components/FeedHeader/components/Controls/customRenders.js +8 -12
- package/build/esm/components/FeedHeader/components/CustomSelectOption/CustomSelectOption.d.ts +2 -2
- package/build/esm/components/FeedHeader/components/CustomSelectOption/CustomSelectOption.js +5 -4
- package/build/esm/components/FeedHeader/components/CustomSwitcher/CustomSwitcher.css +1 -1
- package/build/esm/components/FeedHeader/components/CustomSwitcher/CustomSwitcher.d.ts +3 -2
- package/build/esm/components/FeedHeader/components/CustomSwitcher/CustomSwitcher.js +17 -13
- package/build/esm/components/MetaWrapper/MetaWrapper.d.ts +1 -1
- package/build/esm/components/MetaWrapper/MetaWrapper.js +2 -3
- package/build/esm/components/Paginator/Paginator.d.ts +3 -2
- package/build/esm/components/Paginator/Paginator.js +29 -25
- package/build/esm/components/Paginator/components/NavigationButton.d.ts +3 -2
- package/build/esm/components/Paginator/components/NavigationButton.js +5 -6
- package/build/esm/components/Paginator/components/PaginatorItem.d.ts +3 -2
- package/build/esm/components/Paginator/components/PaginatorItem.js +11 -13
- package/build/esm/components/Paginator/types.d.ts +3 -3
- package/build/esm/components/Paginator/types.js +1 -2
- package/build/esm/components/Paginator/utils.d.ts +2 -2
- package/build/esm/components/Paginator/utils.js +1 -2
- package/build/esm/components/PostCard/PostCard.d.ts +3 -2
- package/build/esm/components/PostCard/PostCard.js +23 -16
- package/build/esm/components/PostInfo/PostInfo.d.ts +3 -2
- package/build/esm/components/PostInfo/PostInfo.js +15 -13
- package/build/esm/components/PostInfo/SuggestPostInfo.d.ts +3 -2
- package/build/esm/components/PostInfo/SuggestPostInfo.js +15 -12
- package/build/esm/components/PostInfo/components/Date.d.ts +3 -2
- package/build/esm/components/PostInfo/components/Date.js +8 -10
- package/build/esm/components/PostInfo/components/ReadingTime.d.ts +3 -2
- package/build/esm/components/PostInfo/components/ReadingTime.js +8 -6
- package/build/esm/components/PostInfo/components/Save.d.ts +3 -2
- package/build/esm/components/PostInfo/components/Save.js +16 -14
- package/build/esm/components/PostInfo/components/Sharing.d.ts +2 -1
- package/build/esm/components/PostInfo/components/Sharing.js +17 -17
- package/build/esm/components/Posts/Posts.d.ts +4 -4
- package/build/esm/components/Posts/Posts.js +26 -15
- package/build/esm/components/PostsEmpty/PostsEmpty.d.ts +2 -1
- package/build/esm/components/PostsEmpty/PostsEmpty.js +6 -5
- package/build/esm/components/PostsError/PostsError.d.ts +2 -1
- package/build/esm/components/PostsError/PostsError.js +9 -6
- package/build/esm/components/Prompt/Prompt.d.ts +2 -1
- package/build/esm/components/Prompt/Prompt.js +12 -10
- package/build/esm/components/PromptSignIn/PromptSignIn.d.ts +4 -4
- package/build/esm/components/PromptSignIn/PromptSignIn.js +5 -6
- package/build/esm/components/PromptSignIn/hooks/usePromptSignInProps.d.ts +2 -2
- package/build/esm/components/PromptSignIn/hooks/usePromptSignInProps.js +4 -5
- package/build/esm/components/Search/Search.d.ts +3 -2
- package/build/esm/components/Search/Search.js +17 -17
- package/build/esm/components/Wrapper/Wrapper.d.ts +3 -3
- package/build/esm/components/Wrapper/Wrapper.js +5 -6
- package/build/esm/constants.d.ts +2 -2
- package/build/esm/constants.js +2 -3
- package/build/esm/constructor/BlogConstructorProvider.d.ts +7 -7
- package/build/esm/constructor/BlogConstructorProvider.js +18 -20
- package/build/esm/constructor/blocksMap.d.ts +12 -12
- package/build/esm/constructor/blocksMap.js +14 -15
- package/build/esm/containers/BlogPage/BlogPage.d.ts +4 -4
- package/build/esm/containers/BlogPage/BlogPage.js +25 -22
- package/build/esm/containers/BlogPostPage/BlogPostPage.d.ts +4 -4
- package/build/esm/containers/BlogPostPage/BlogPostPage.js +30 -27
- package/build/esm/contexts/DeviceContext.d.ts +2 -2
- package/build/esm/contexts/DeviceContext.js +2 -3
- package/build/esm/contexts/FeedContext.d.ts +2 -2
- package/build/esm/contexts/FeedContext.js +2 -3
- package/build/esm/contexts/LikesContext.d.ts +2 -2
- package/build/esm/contexts/LikesContext.js +2 -3
- package/build/esm/contexts/LocaleContext.d.ts +2 -2
- package/build/esm/contexts/LocaleContext.js +2 -3
- package/build/esm/contexts/MobileContext.d.ts +1 -1
- package/build/esm/contexts/MobileContext.js +2 -3
- package/build/esm/contexts/PostPageContext.d.ts +2 -2
- package/build/esm/contexts/PostPageContext.js +2 -3
- package/build/esm/contexts/RouterContext.d.ts +2 -2
- package/build/esm/contexts/RouterContext.js +2 -3
- package/build/esm/contexts/SettingsContext.d.ts +1 -1
- package/build/esm/contexts/SettingsContext.js +2 -3
- package/build/esm/contexts/theme/ThemeContext.d.ts +2 -2
- package/build/esm/contexts/theme/ThemeContext.js +3 -4
- package/build/esm/contexts/theme/ThemeProvider.d.ts +4 -4
- package/build/esm/contexts/theme/ThemeProvider.js +7 -8
- package/build/esm/contexts/theme/ThemeValueContext.d.ts +1 -1
- package/build/esm/contexts/theme/ThemeValueContext.js +2 -3
- package/build/esm/contexts/theme/index.d.ts +6 -6
- package/build/esm/contexts/theme/index.js +6 -7
- package/build/esm/contexts/theme/useTheme.d.ts +1 -1
- package/build/esm/contexts/theme/useTheme.js +3 -4
- package/build/esm/contexts/theme/useThemeValue.d.ts +1 -1
- package/build/esm/contexts/theme/useThemeValue.js +3 -4
- package/build/esm/contexts/theme/withTheme.d.ts +2 -2
- package/build/esm/contexts/theme/withTheme.js +4 -6
- package/build/esm/contexts/theme/withThemeValue.d.ts +2 -2
- package/build/esm/contexts/theme/withThemeValue.js +4 -6
- package/build/esm/counters/metrika.js +1 -2
- package/build/esm/counters/utils.js +1 -2
- package/build/esm/hooks/useAriaAttributes.js +4 -5
- package/build/esm/hooks/useExtendedComponentMap.d.ts +17 -18
- package/build/esm/hooks/useExtendedComponentMap.js +3 -4
- package/build/esm/hooks/useHover.d.ts +1 -1
- package/build/esm/hooks/useHover.js +2 -3
- package/build/esm/hooks/useIsIPhone.js +4 -5
- package/build/esm/hooks/useLikes.d.ts +1 -1
- package/build/esm/hooks/useLikes.js +6 -7
- package/build/esm/hooks/useOpenCloseTimer.js +4 -5
- package/build/esm/i18n/index.d.ts +1 -5
- package/build/esm/i18n/index.js +1 -2
- package/build/esm/icons/Close.d.ts +2 -2
- package/build/esm/icons/Close.js +4 -4
- package/build/esm/icons/DropdownArrow.d.ts +2 -2
- package/build/esm/icons/DropdownArrow.js +4 -4
- package/build/esm/icons/Save.d.ts +2 -2
- package/build/esm/icons/Save.js +4 -4
- package/build/esm/icons/SaveFilled.d.ts +2 -2
- package/build/esm/icons/SaveFilled.js +4 -4
- package/build/esm/icons/SearchIcon.d.ts +2 -2
- package/build/esm/icons/SearchIcon.js +4 -4
- package/build/esm/icons/ShareArrowUp.d.ts +2 -2
- package/build/esm/icons/ShareArrowUp.js +4 -4
- package/build/esm/icons/Time.d.ts +2 -2
- package/build/esm/icons/Time.js +4 -4
- package/build/esm/index.d.ts +8 -8
- package/build/esm/index.js +8 -9
- package/build/esm/models/blocks.d.ts +4 -4
- package/build/esm/models/blocks.js +1 -2
- package/build/esm/models/common.d.ts +3 -3
- package/build/esm/models/common.js +1 -2
- package/build/esm/models/locale.js +1 -2
- package/build/esm/models/paddings.js +1 -2
- package/build/esm/schema/blocks.d.ts +10 -10
- package/build/esm/schema/blocks.js +10 -11
- package/build/esm/schema/common.js +1 -2
- package/build/esm/schema/headers.d.ts +1 -1
- package/build/esm/schema/headers.js +1 -2
- package/build/esm/schema/index.d.ts +2 -8
- package/build/esm/schema/index.js +4 -5
- package/build/esm/schema/utils.d.ts +1 -1
- package/build/esm/schema/utils.js +1 -2
- package/build/esm/utils/cn.js +1 -2
- package/build/esm/utils/common.d.ts +19 -18
- package/build/esm/utils/common.js +6 -7
- package/build/esm/utils/date.js +1 -2
- package/build/esm/utils/index.d.ts +1 -1
- package/build/esm/utils/index.js +1 -2
- package/build/esm/utils/svg.js +1 -2
- package/package.json +24 -37
- package/server/data/config.js +1 -1
- package/server/data/contentFilter.js +3 -5
- package/server/data/createReadableContent.js +1 -1
- package/server/data/sanitizeMeta.d.ts +5 -5
- package/server/data/sanitizeMeta.js +1 -1
- package/server/data/transformPageContent.js +3 -5
- package/server/data/transformPost.js +3 -13
- package/server/index.d.ts +4 -4
- package/server/models/blocks.d.ts +2 -2
- package/server/models/blocks.js +1 -1
- package/server/models/common.d.ts +2 -2
- package/server/models/common.js +5 -5
- package/server/models/locale.js +1 -1
- package/server/models/paddings.js +1 -1
- package/styles/storybook/common.scss +0 -7
- package/build/cjs/blocks/Author/Author.js.map +0 -1
- package/build/cjs/blocks/Author/schema.js.map +0 -1
- package/build/cjs/blocks/Banner/Banner.js.map +0 -1
- package/build/cjs/blocks/Banner/schema.js.map +0 -1
- package/build/cjs/blocks/CTA/CTA.js.map +0 -1
- package/build/cjs/blocks/CTA/schema.js.map +0 -1
- package/build/cjs/blocks/ColoredText/ColoredText.js.map +0 -1
- package/build/cjs/blocks/ColoredText/schema.js.map +0 -1
- package/build/cjs/blocks/Feed/Feed.js.map +0 -1
- package/build/cjs/blocks/Feed/reducer.js.map +0 -1
- package/build/cjs/blocks/Feed/schema.js.map +0 -1
- package/build/cjs/blocks/Form/Form.js.map +0 -1
- package/build/cjs/blocks/Form/schema.js.map +0 -1
- package/build/cjs/blocks/Header/Header.js.map +0 -1
- package/build/cjs/blocks/Header/schema.js.map +0 -1
- package/build/cjs/blocks/Layout/Layout.js.map +0 -1
- package/build/cjs/blocks/Layout/schema.js.map +0 -1
- package/build/cjs/blocks/Media/Media.js.map +0 -1
- package/build/cjs/blocks/Media/schema.js.map +0 -1
- package/build/cjs/blocks/Meta/Meta.js.map +0 -1
- package/build/cjs/blocks/Meta/schema.js.map +0 -1
- package/build/cjs/blocks/Suggest/Suggest.js.map +0 -1
- package/build/cjs/blocks/Suggest/schema.js.map +0 -1
- package/build/cjs/blocks/YFM/YFM.js.map +0 -1
- package/build/cjs/blocks/YFM/schema.js.map +0 -1
- package/build/cjs/blocks/constants.js.map +0 -1
- package/build/cjs/components/FeedHeader/FeedHeader.js.map +0 -1
- package/build/cjs/components/FeedHeader/components/Controls/Controls.js.map +0 -1
- package/build/cjs/components/FeedHeader/components/Controls/customRenders.js.map +0 -1
- package/build/cjs/components/FeedHeader/components/CustomSelectOption/CustomSelectOption.js.map +0 -1
- package/build/cjs/components/FeedHeader/components/CustomSwitcher/CustomSwitcher.js.map +0 -1
- package/build/cjs/components/MetaWrapper/MetaWrapper.js.map +0 -1
- package/build/cjs/components/Paginator/Paginator.js.map +0 -1
- package/build/cjs/components/Paginator/components/NavigationButton.js.map +0 -1
- package/build/cjs/components/Paginator/components/PaginatorItem.js.map +0 -1
- package/build/cjs/components/Paginator/types.js.map +0 -1
- package/build/cjs/components/Paginator/utils.js.map +0 -1
- package/build/cjs/components/PostCard/PostCard.js.map +0 -1
- package/build/cjs/components/PostInfo/PostInfo.js.map +0 -1
- package/build/cjs/components/PostInfo/SuggestPostInfo.js.map +0 -1
- package/build/cjs/components/PostInfo/components/Date.js.map +0 -1
- package/build/cjs/components/PostInfo/components/ReadingTime.js.map +0 -1
- package/build/cjs/components/PostInfo/components/Save.js.map +0 -1
- package/build/cjs/components/PostInfo/components/Sharing.js.map +0 -1
- package/build/cjs/components/Posts/Posts.js.map +0 -1
- package/build/cjs/components/PostsEmpty/PostsEmpty.js.map +0 -1
- package/build/cjs/components/PostsError/PostsError.js.map +0 -1
- package/build/cjs/components/Prompt/Prompt.js.map +0 -1
- package/build/cjs/components/PromptSignIn/PromptSignIn.js.map +0 -1
- package/build/cjs/components/PromptSignIn/hooks/usePromptSignInProps.js.map +0 -1
- package/build/cjs/components/Search/Search.js.map +0 -1
- package/build/cjs/components/Wrapper/Wrapper.js.map +0 -1
- package/build/cjs/constants.js.map +0 -1
- package/build/cjs/constructor/BlogConstructorProvider.js.map +0 -1
- package/build/cjs/constructor/blocksMap.js.map +0 -1
- package/build/cjs/containers/BlogPage/BlogPage.js.map +0 -1
- package/build/cjs/containers/BlogPostPage/BlogPostPage.js.map +0 -1
- package/build/cjs/contexts/DeviceContext.js.map +0 -1
- package/build/cjs/contexts/FeedContext.js.map +0 -1
- package/build/cjs/contexts/LikesContext.js.map +0 -1
- package/build/cjs/contexts/LocaleContext.js.map +0 -1
- package/build/cjs/contexts/MobileContext.js.map +0 -1
- package/build/cjs/contexts/PostPageContext.js.map +0 -1
- package/build/cjs/contexts/RouterContext.js.map +0 -1
- package/build/cjs/contexts/SettingsContext.js.map +0 -1
- package/build/cjs/contexts/theme/ThemeContext.js.map +0 -1
- package/build/cjs/contexts/theme/ThemeProvider.js.map +0 -1
- package/build/cjs/contexts/theme/ThemeValueContext.js.map +0 -1
- package/build/cjs/contexts/theme/index.js.map +0 -1
- package/build/cjs/contexts/theme/useTheme.js.map +0 -1
- package/build/cjs/contexts/theme/useThemeValue.js.map +0 -1
- package/build/cjs/contexts/theme/withTheme.js.map +0 -1
- package/build/cjs/contexts/theme/withThemeValue.js.map +0 -1
- package/build/cjs/counters/metrika.js.map +0 -1
- package/build/cjs/counters/utils.js.map +0 -1
- package/build/cjs/hooks/useAriaAttributes.js.map +0 -1
- package/build/cjs/hooks/useExtendedComponentMap.js.map +0 -1
- package/build/cjs/hooks/useHover.js.map +0 -1
- package/build/cjs/hooks/useIsIPhone.js.map +0 -1
- package/build/cjs/hooks/useLikes.js.map +0 -1
- package/build/cjs/hooks/useOpenCloseTimer.js.map +0 -1
- package/build/cjs/i18n/index.js.map +0 -1
- package/build/cjs/icons/Close.js.map +0 -1
- package/build/cjs/icons/DropdownArrow.js.map +0 -1
- package/build/cjs/icons/Save.js.map +0 -1
- package/build/cjs/icons/SaveFilled.js.map +0 -1
- package/build/cjs/icons/SearchIcon.js.map +0 -1
- package/build/cjs/icons/ShareArrowUp.js.map +0 -1
- package/build/cjs/icons/Time.js.map +0 -1
- package/build/cjs/index.js.map +0 -1
- package/build/cjs/models/blocks.js.map +0 -1
- package/build/cjs/models/common.js.map +0 -1
- package/build/cjs/models/locale.js.map +0 -1
- package/build/cjs/models/paddings.js.map +0 -1
- package/build/cjs/package.json +0 -1
- package/build/cjs/schema/blocks.js.map +0 -1
- package/build/cjs/schema/common.js.map +0 -1
- package/build/cjs/schema/headers.js.map +0 -1
- package/build/cjs/schema/index.js.map +0 -1
- package/build/cjs/schema/utils.js.map +0 -1
- package/build/cjs/utils/cn.js.map +0 -1
- package/build/cjs/utils/common.js.map +0 -1
- package/build/cjs/utils/date.js.map +0 -1
- package/build/cjs/utils/index.js.map +0 -1
- package/build/cjs/utils/svg.js.map +0 -1
- package/build/esm/blocks/Author/Author.js.map +0 -1
- package/build/esm/blocks/Author/schema.js.map +0 -1
- package/build/esm/blocks/Banner/Banner.js.map +0 -1
- package/build/esm/blocks/Banner/schema.js.map +0 -1
- package/build/esm/blocks/CTA/CTA.js.map +0 -1
- package/build/esm/blocks/CTA/schema.js.map +0 -1
- package/build/esm/blocks/ColoredText/ColoredText.js.map +0 -1
- package/build/esm/blocks/ColoredText/schema.js.map +0 -1
- package/build/esm/blocks/Feed/Feed.js.map +0 -1
- package/build/esm/blocks/Feed/reducer.js.map +0 -1
- package/build/esm/blocks/Feed/schema.js.map +0 -1
- package/build/esm/blocks/Form/Form.js.map +0 -1
- package/build/esm/blocks/Form/schema.js.map +0 -1
- package/build/esm/blocks/Header/Header.js.map +0 -1
- package/build/esm/blocks/Header/schema.js.map +0 -1
- package/build/esm/blocks/Layout/Layout.js.map +0 -1
- package/build/esm/blocks/Layout/schema.js.map +0 -1
- package/build/esm/blocks/Media/Media.js.map +0 -1
- package/build/esm/blocks/Media/schema.js.map +0 -1
- package/build/esm/blocks/Meta/Meta.js.map +0 -1
- package/build/esm/blocks/Meta/schema.js.map +0 -1
- package/build/esm/blocks/Suggest/Suggest.js.map +0 -1
- package/build/esm/blocks/Suggest/schema.js.map +0 -1
- package/build/esm/blocks/YFM/YFM.js.map +0 -1
- package/build/esm/blocks/YFM/schema.js.map +0 -1
- package/build/esm/blocks/constants.js.map +0 -1
- package/build/esm/components/FeedHeader/FeedHeader.js.map +0 -1
- package/build/esm/components/FeedHeader/components/Controls/Controls.js.map +0 -1
- package/build/esm/components/FeedHeader/components/Controls/customRenders.js.map +0 -1
- package/build/esm/components/FeedHeader/components/CustomSelectOption/CustomSelectOption.js.map +0 -1
- package/build/esm/components/FeedHeader/components/CustomSwitcher/CustomSwitcher.js.map +0 -1
- package/build/esm/components/MetaWrapper/MetaWrapper.js.map +0 -1
- package/build/esm/components/Paginator/Paginator.js.map +0 -1
- package/build/esm/components/Paginator/components/NavigationButton.js.map +0 -1
- package/build/esm/components/Paginator/components/PaginatorItem.js.map +0 -1
- package/build/esm/components/Paginator/types.js.map +0 -1
- package/build/esm/components/Paginator/utils.js.map +0 -1
- package/build/esm/components/PostCard/PostCard.js.map +0 -1
- package/build/esm/components/PostInfo/PostInfo.js.map +0 -1
- package/build/esm/components/PostInfo/SuggestPostInfo.js.map +0 -1
- package/build/esm/components/PostInfo/components/Date.js.map +0 -1
- package/build/esm/components/PostInfo/components/ReadingTime.js.map +0 -1
- package/build/esm/components/PostInfo/components/Save.js.map +0 -1
- package/build/esm/components/PostInfo/components/Sharing.js.map +0 -1
- package/build/esm/components/Posts/Posts.js.map +0 -1
- package/build/esm/components/PostsEmpty/PostsEmpty.js.map +0 -1
- package/build/esm/components/PostsError/PostsError.js.map +0 -1
- package/build/esm/components/Prompt/Prompt.js.map +0 -1
- package/build/esm/components/PromptSignIn/PromptSignIn.js.map +0 -1
- package/build/esm/components/PromptSignIn/hooks/usePromptSignInProps.js.map +0 -1
- package/build/esm/components/Search/Search.js.map +0 -1
- package/build/esm/components/Wrapper/Wrapper.js.map +0 -1
- package/build/esm/constants.js.map +0 -1
- package/build/esm/constructor/BlogConstructorProvider.js.map +0 -1
- package/build/esm/constructor/blocksMap.js.map +0 -1
- package/build/esm/containers/BlogPage/BlogPage.js.map +0 -1
- package/build/esm/containers/BlogPostPage/BlogPostPage.js.map +0 -1
- package/build/esm/contexts/DeviceContext.js.map +0 -1
- package/build/esm/contexts/FeedContext.js.map +0 -1
- package/build/esm/contexts/LikesContext.js.map +0 -1
- package/build/esm/contexts/LocaleContext.js.map +0 -1
- package/build/esm/contexts/MobileContext.js.map +0 -1
- package/build/esm/contexts/PostPageContext.js.map +0 -1
- package/build/esm/contexts/RouterContext.js.map +0 -1
- package/build/esm/contexts/SettingsContext.js.map +0 -1
- package/build/esm/contexts/theme/ThemeContext.js.map +0 -1
- package/build/esm/contexts/theme/ThemeProvider.js.map +0 -1
- package/build/esm/contexts/theme/ThemeValueContext.js.map +0 -1
- package/build/esm/contexts/theme/index.js.map +0 -1
- package/build/esm/contexts/theme/useTheme.js.map +0 -1
- package/build/esm/contexts/theme/useThemeValue.js.map +0 -1
- package/build/esm/contexts/theme/withTheme.js.map +0 -1
- package/build/esm/contexts/theme/withThemeValue.js.map +0 -1
- package/build/esm/counters/metrika.js.map +0 -1
- package/build/esm/counters/utils.js.map +0 -1
- package/build/esm/hooks/useAriaAttributes.js.map +0 -1
- package/build/esm/hooks/useExtendedComponentMap.js.map +0 -1
- package/build/esm/hooks/useHover.js.map +0 -1
- package/build/esm/hooks/useIsIPhone.js.map +0 -1
- package/build/esm/hooks/useLikes.js.map +0 -1
- package/build/esm/hooks/useOpenCloseTimer.js.map +0 -1
- package/build/esm/i18n/index.js.map +0 -1
- package/build/esm/icons/Close.js.map +0 -1
- package/build/esm/icons/DropdownArrow.js.map +0 -1
- package/build/esm/icons/Save.js.map +0 -1
- package/build/esm/icons/SaveFilled.js.map +0 -1
- package/build/esm/icons/SearchIcon.js.map +0 -1
- package/build/esm/icons/ShareArrowUp.js.map +0 -1
- package/build/esm/icons/Time.js.map +0 -1
- package/build/esm/index.js.map +0 -1
- package/build/esm/models/blocks.js.map +0 -1
- package/build/esm/models/common.js.map +0 -1
- package/build/esm/models/locale.js.map +0 -1
- package/build/esm/models/paddings.js.map +0 -1
- package/build/esm/package.json +0 -1
- package/build/esm/schema/blocks.js.map +0 -1
- package/build/esm/schema/common.js.map +0 -1
- package/build/esm/schema/headers.js.map +0 -1
- package/build/esm/schema/index.js.map +0 -1
- package/build/esm/schema/utils.js.map +0 -1
- package/build/esm/utils/cn.js.map +0 -1
- package/build/esm/utils/common.js.map +0 -1
- package/build/esm/utils/date.js.map +0 -1
- package/build/esm/utils/index.js.map +0 -1
- package/build/esm/utils/svg.js.map +0 -1
@@ -1,8 +1,8 @@
|
|
1
|
-
import
|
1
|
+
import { useCallback, useEffect, useState } from 'react';
|
2
2
|
export const useLikes = ({ hasLike, count, toggleLikeCallback, postId }) => {
|
3
|
-
const [hasUserLike, setHasUserLike] =
|
4
|
-
const [likesCount, setLikesCount] =
|
5
|
-
const handleLike =
|
3
|
+
const [hasUserLike, setHasUserLike] = useState(hasLike !== null && hasLike !== void 0 ? hasLike : false);
|
4
|
+
const [likesCount, setLikesCount] = useState(count !== null && count !== void 0 ? count : 0);
|
5
|
+
const handleLike = useCallback(() => {
|
6
6
|
let newLikesCount = likesCount;
|
7
7
|
if (hasUserLike && likesCount > 0) {
|
8
8
|
newLikesCount--;
|
@@ -19,7 +19,7 @@ export const useLikes = ({ hasLike, count, toggleLikeCallback, postId }) => {
|
|
19
19
|
});
|
20
20
|
}
|
21
21
|
}, [hasUserLike, likesCount, postId, toggleLikeCallback]);
|
22
|
-
|
22
|
+
useEffect(() => {
|
23
23
|
setHasUserLike(hasLike !== null && hasLike !== void 0 ? hasLike : false);
|
24
24
|
setLikesCount(count !== null && count !== void 0 ? count : 0);
|
25
25
|
}, [hasLike, count]);
|
@@ -28,5 +28,4 @@ export const useLikes = ({ hasLike, count, toggleLikeCallback, postId }) => {
|
|
28
28
|
hasUserLike,
|
29
29
|
handleLike,
|
30
30
|
};
|
31
|
-
};
|
32
|
-
//# sourceMappingURL=useLikes.js.map
|
31
|
+
};
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import
|
1
|
+
import { useEffect, useState } from 'react';
|
2
2
|
/**
|
3
3
|
* Timer to automatically update `open` state after a given duration
|
4
4
|
* @param {number} openTimestamp - UNIX timestamp in milliseconds
|
@@ -7,8 +7,8 @@ import * as React from 'react';
|
|
7
7
|
*/
|
8
8
|
export function useOpenCloseTimer(openTimestamp = Date.now(), openDuration = 4000) {
|
9
9
|
const open = Date.now() - openTimestamp < openDuration;
|
10
|
-
const [, reset] =
|
11
|
-
|
10
|
+
const [, reset] = useState(0); // time to reset `open` state
|
11
|
+
useEffect(() => {
|
12
12
|
const closeTime = openTimestamp + openDuration;
|
13
13
|
const delay = closeTime - Date.now();
|
14
14
|
if (delay <= 0) {
|
@@ -23,5 +23,4 @@ export function useOpenCloseTimer(openTimestamp = Date.now(), openDuration = 400
|
|
23
23
|
};
|
24
24
|
}, [openTimestamp, openDuration]);
|
25
25
|
return { open };
|
26
|
-
}
|
27
|
-
//# sourceMappingURL=useOpenCloseTimer.js.map
|
26
|
+
}
|
@@ -21,8 +21,4 @@ export declare enum Keyset {
|
|
21
21
|
Save = "save",
|
22
22
|
ClearAction = "clear_action"
|
23
23
|
}
|
24
|
-
export declare const i18n: (
|
25
|
-
keysetData: {
|
26
|
-
blog: Record<Keyset, import("@gravity-ui/i18n").KeyData>;
|
27
|
-
};
|
28
|
-
};
|
24
|
+
export declare const i18n: (key: Keyset, params?: import("@gravity-ui/i18n").Params | undefined) => string;
|
package/build/esm/i18n/index.js
CHANGED
@@ -1,2 +1,2 @@
|
|
1
|
-
import
|
2
|
-
export declare const Close: (props: React.SVGProps<SVGSVGElement>) =>
|
1
|
+
import React from 'react';
|
2
|
+
export declare const Close: (props: React.SVGProps<SVGSVGElement>) => React.JSX.Element;
|
package/build/esm/icons/Close.js
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
import
|
2
|
-
import { a11yHiddenSvgProps } from
|
3
|
-
export const Close = (props) => (
|
4
|
-
|
1
|
+
import React from 'react';
|
2
|
+
import { a11yHiddenSvgProps } from '../utils/svg';
|
3
|
+
export const Close = (props) => (React.createElement("svg", Object.assign({ xmlns: "http://www.w3.org/2000/svg", width: "10", height: "10", viewBox: "0 0 10 10", fill: "currentColor" }, a11yHiddenSvgProps, props),
|
4
|
+
React.createElement("path", { d: "M10 0.7L9.3 0L5 4.3L0.7 0L0 0.7L4.3 5L0 9.3L0.7 10L5 5.7L9.3 10L10 9.3L5.7 5L10 0.7Z", fill: "currentColor" })));
|
@@ -1,2 +1,2 @@
|
|
1
|
-
import
|
2
|
-
export declare const DropdownArrow: (props: React.SVGProps<SVGSVGElement>) =>
|
1
|
+
import React from 'react';
|
2
|
+
export declare const DropdownArrow: (props: React.SVGProps<SVGSVGElement>) => React.JSX.Element;
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import
|
2
|
-
import { a11yHiddenSvgProps } from
|
3
|
-
export const DropdownArrow = (props) => (
|
4
|
-
|
1
|
+
import React from 'react';
|
2
|
+
import { a11yHiddenSvgProps } from '../utils/svg';
|
3
|
+
export const DropdownArrow = (props) => (React.createElement("svg", Object.assign({ xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 16 16", width: "16", height: "16", fill: "currentColor" }, a11yHiddenSvgProps, props),
|
4
|
+
React.createElement("path", { d: "M3.50172 5.44253C3.19384 5.16544 2.71962 5.19039 2.44253 5.49828C2.16544 5.80616 2.19039 6.28038 2.49828 6.55747L3.50172 5.44253ZM8 10.5L7.49828 11.0575C7.7835 11.3142 8.2165 11.3142 8.50172 11.0575L8 10.5ZM13.5017 6.55747C13.8096 6.28038 13.8346 5.80616 13.5575 5.49828C13.2804 5.19039 12.8062 5.16544 12.4983 5.44253L13.5017 6.55747ZM2.49828 6.55747L7.49828 11.0575L8.50172 9.94253L3.50172 5.44253L2.49828 6.55747ZM8.50172 11.0575L13.5017 6.55747L12.4983 5.44253L7.49828 9.94253L8.50172 11.0575Z" })));
|
@@ -1,2 +1,2 @@
|
|
1
|
-
import
|
2
|
-
export declare const Save: (props: React.SVGProps<SVGSVGElement>) =>
|
1
|
+
import React from 'react';
|
2
|
+
export declare const Save: (props: React.SVGProps<SVGSVGElement>) => React.JSX.Element;
|
package/build/esm/icons/Save.js
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
import
|
2
|
-
import { a11yHiddenSvgProps } from
|
3
|
-
export const Save = (props) => (
|
4
|
-
|
1
|
+
import React from 'react';
|
2
|
+
import { a11yHiddenSvgProps } from '../utils/svg';
|
3
|
+
export const Save = (props) => (React.createElement("svg", Object.assign({ xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", viewBox: "0 0 16 16", fill: "currentColor" }, a11yHiddenSvgProps, props),
|
4
|
+
React.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M13 3H3v9.6l3.445-2.94.028-.022a2.624 2.624 0 0 1 3.054 0l.028.021L13 12.6V3Zm1.357-1.614A1.593 1.593 0 0 1 15 2.655v10.547c0 .678-.416 1.218-.841 1.499-.417.275-1.24.517-1.898-.103L8.32 11.234a.64.64 0 0 0-.64 0l-3.942 3.364c-.58.546-1.348.461-1.838.18a1.808 1.808 0 0 1-.9-1.576V2.786C1 2.055 1.515 1 2.667 1H13.2c.405 0 .822.13 1.157.386Z" })));
|
@@ -1,2 +1,2 @@
|
|
1
|
-
import
|
2
|
-
export declare const SaveFilled: (props: React.SVGProps<SVGSVGElement>) =>
|
1
|
+
import React from 'react';
|
2
|
+
export declare const SaveFilled: (props: React.SVGProps<SVGSVGElement>) => React.JSX.Element;
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import
|
2
|
-
import { a11yHiddenSvgProps } from
|
3
|
-
export const SaveFilled = (props) => (
|
4
|
-
|
1
|
+
import React from 'react';
|
2
|
+
import { a11yHiddenSvgProps } from '../utils/svg';
|
3
|
+
export const SaveFilled = (props) => (React.createElement("svg", Object.assign({ xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", viewBox: "0 0 16 16", fill: "currentColor" }, a11yHiddenSvgProps, props),
|
4
|
+
React.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M14.357 1.386A1.593 1.593 0 0 1 15 2.655v10.547c0 .678-.416 1.218-.841 1.499-.417.275-1.24.517-1.898-.103L8.32 11.234a.64.64 0 0 0-.64 0l-3.942 3.364c-.58.546-1.348.461-1.838.18a1.808 1.808 0 0 1-.9-1.576V2.786C1 2.055 1.515 1 2.667 1H13.2c.405 0 .822.13 1.157.386Z" })));
|
@@ -1,2 +1,2 @@
|
|
1
|
-
import
|
2
|
-
export declare const SearchIcon: (props: React.SVGProps<SVGSVGElement>) =>
|
1
|
+
import React from 'react';
|
2
|
+
export declare const SearchIcon: (props: React.SVGProps<SVGSVGElement>) => React.JSX.Element;
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import
|
2
|
-
import { a11yHiddenSvgProps } from
|
3
|
-
export const SearchIcon = (props) => (
|
4
|
-
|
1
|
+
import React from 'react';
|
2
|
+
import { a11yHiddenSvgProps } from '../utils/svg';
|
3
|
+
export const SearchIcon = (props) => (React.createElement("svg", Object.assign({ xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", viewBox: "0 0 16 16", fill: "none" }, a11yHiddenSvgProps, props),
|
4
|
+
React.createElement("path", { d: "M9.532 9.539A5 5 0 1 0 2.468 2.46a5 5 0 0 0 7.064 7.08zm0 0L15 15", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", vectorEffect: "non-scaling-stroke" })));
|
@@ -1,2 +1,2 @@
|
|
1
|
-
import
|
2
|
-
export declare const ShareArrowUp: (props: React.SVGProps<SVGSVGElement>) =>
|
1
|
+
import React from 'react';
|
2
|
+
export declare const ShareArrowUp: (props: React.SVGProps<SVGSVGElement>) => React.JSX.Element;
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import
|
2
|
-
import { a11yHiddenSvgProps } from
|
3
|
-
export const ShareArrowUp = (props) => (
|
4
|
-
|
1
|
+
import React from 'react';
|
2
|
+
import { a11yHiddenSvgProps } from '../utils/svg';
|
3
|
+
export const ShareArrowUp = (props) => (React.createElement("svg", Object.assign({ xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", viewBox: "0 0 16 16", fill: "currentColor" }, a11yHiddenSvgProps, props),
|
4
|
+
React.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M4.798 3.16a.5.5 0 0 0 .363.842H7V9a1 1 0 0 0 2 0V4.002h1.839a.5.5 0 0 0 .363-.844L8.363.156a.5.5 0 0 0-.726 0l-2.84 3.002.001.001ZM13 7a1 1 0 0 1 2 0v6.5a1.5 1.5 0 0 1-1.5 1.5h-11A1.5 1.5 0 0 1 1 13.5V7a1 1 0 0 1 2 0v6h10V7Z" })));
|
@@ -1,2 +1,2 @@
|
|
1
|
-
import
|
2
|
-
export declare const Time: (props: React.SVGProps<SVGSVGElement>) =>
|
1
|
+
import React from 'react';
|
2
|
+
export declare const Time: (props: React.SVGProps<SVGSVGElement>) => React.JSX.Element;
|
package/build/esm/icons/Time.js
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
import
|
2
|
-
import { a11yHiddenSvgProps } from
|
3
|
-
export const Time = (props) => (
|
4
|
-
|
1
|
+
import React from 'react';
|
2
|
+
import { a11yHiddenSvgProps } from '../utils/svg';
|
3
|
+
export const Time = (props) => (React.createElement("svg", Object.assign({ xmlns: "http://www.w3.org/2000/svg", width: "16", height: "17", viewBox: "0 0 16 17", fill: "currentColor" }, a11yHiddenSvgProps, props),
|
4
|
+
React.createElement("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M8 16.004a8 8 0 1 1 0-16 8 8 0 0 1 0 16Zm0-2a6 6 0 1 0 0-12 6 6 0 0 0 0 12Zm3.357-3.736a1 1 0 0 0-.342-1.372L9 7.688V5.004a1 1 0 0 0-2 0v3.25a1 1 0 0 0 .486.857l2.5 1.5a1 1 0 0 0 1.371-.343Z" })));
|
package/build/esm/index.d.ts
CHANGED
@@ -1,8 +1,8 @@
|
|
1
|
-
export { BlogConstructorProvider } from
|
2
|
-
export { BlogPostPage } from
|
3
|
-
export { BlogPage } from
|
4
|
-
export * from
|
5
|
-
export * from
|
6
|
-
export * from
|
7
|
-
export { BREAKPOINTS } from
|
8
|
-
export * from
|
1
|
+
export { BlogConstructorProvider } from './constructor/BlogConstructorProvider';
|
2
|
+
export { BlogPostPage } from './containers/BlogPostPage/BlogPostPage';
|
3
|
+
export { BlogPage } from './containers/BlogPage/BlogPage';
|
4
|
+
export * from './models/common';
|
5
|
+
export * from './models/locale';
|
6
|
+
export * from './schema';
|
7
|
+
export { BREAKPOINTS } from './constants';
|
8
|
+
export * from './utils';
|
package/build/esm/index.js
CHANGED
@@ -1,9 +1,8 @@
|
|
1
|
-
export { BlogConstructorProvider } from
|
2
|
-
export { BlogPostPage } from
|
3
|
-
export { BlogPage } from
|
4
|
-
export * from
|
5
|
-
export * from
|
6
|
-
export * from
|
7
|
-
export { BREAKPOINTS } from
|
8
|
-
export * from
|
9
|
-
//# sourceMappingURL=index.js.map
|
1
|
+
export { BlogConstructorProvider } from './constructor/BlogConstructorProvider';
|
2
|
+
export { BlogPostPage } from './containers/BlogPostPage/BlogPostPage';
|
3
|
+
export { BlogPage } from './containers/BlogPage/BlogPage';
|
4
|
+
export * from './models/common';
|
5
|
+
export * from './models/locale';
|
6
|
+
export * from './schema';
|
7
|
+
export { BREAKPOINTS } from './constants';
|
8
|
+
export * from './utils';
|
@@ -1,7 +1,7 @@
|
|
1
|
-
import
|
1
|
+
import { ReactElement } from 'react';
|
2
2
|
import { ContentBlockProps, FormBlockData, HeaderBlockProps, MediaProps as PCMediaProps, TextTheme } from '@gravity-ui/page-constructor';
|
3
|
-
import { BlockType, ClassNameProps, PostData, QAProps } from
|
4
|
-
import { PaddingsYFMProps } from
|
3
|
+
import { BlockType, ClassNameProps, PostData, QAProps } from './common';
|
4
|
+
import { PaddingsYFMProps } from './paddings';
|
5
5
|
export type AuthorProps = ClassNameProps & {
|
6
6
|
authorId: number | string;
|
7
7
|
image: string;
|
@@ -25,7 +25,7 @@ export type HeaderProps = HeaderBlockProps & PaddingsYFMProps;
|
|
25
25
|
export type LayoutProps = {
|
26
26
|
fullWidth?: boolean;
|
27
27
|
mobileOrder?: string;
|
28
|
-
children:
|
28
|
+
children: ReactElement[];
|
29
29
|
} & PaddingsYFMProps;
|
30
30
|
export type MediaProps = ClassNameProps & PaddingsYFMProps & Partial<Pick<PCMediaProps, 'youtube' | 'previewImg' | 'image' | 'video' | 'dataLens'>> & {
|
31
31
|
text?: string;
|
@@ -1,2 +1 @@
|
|
1
|
-
export {};
|
2
|
-
//# sourceMappingURL=blocks.js.map
|
1
|
+
export {};
|
@@ -1,8 +1,8 @@
|
|
1
|
-
import
|
1
|
+
import { ReactNode } from 'react';
|
2
2
|
import { MarkdownItPluginCb } from '@diplodoc/transform/lib/plugins/typings';
|
3
3
|
import { HeaderBlockProps as PageConstructorHeaderBlockProps } from '@gravity-ui/page-constructor';
|
4
4
|
import { IBrowser, IDevice } from 'ua-parser-js';
|
5
|
-
import { Locale } from
|
5
|
+
import { Locale } from '../models/locale';
|
6
6
|
export declare enum Theme {
|
7
7
|
Light = "light",
|
8
8
|
Dark = "dark"
|
@@ -136,7 +136,7 @@ export type ToggleLikeCallbackType = ({ postId, hasLike, }: {
|
|
136
136
|
export interface HeaderBlockProps extends PageConstructorHeaderBlockProps {
|
137
137
|
backLink?: {
|
138
138
|
url: string;
|
139
|
-
title:
|
139
|
+
title: ReactNode;
|
140
140
|
};
|
141
141
|
}
|
142
142
|
export type GetPostsRequest = {
|
@@ -39,5 +39,4 @@ export var PostCardTitleHeadingLevel;
|
|
39
39
|
(function (PostCardTitleHeadingLevel) {
|
40
40
|
PostCardTitleHeadingLevel["H2"] = "h2";
|
41
41
|
PostCardTitleHeadingLevel["H3"] = "h3";
|
42
|
-
})(PostCardTitleHeadingLevel || (PostCardTitleHeadingLevel = {}));
|
43
|
-
//# sourceMappingURL=common.js.map
|
42
|
+
})(PostCardTitleHeadingLevel || (PostCardTitleHeadingLevel = {}));
|
@@ -4,5 +4,4 @@ export var PaddingsDirections;
|
|
4
4
|
PaddingsDirections["bottom"] = "bottom";
|
5
5
|
PaddingsDirections["left"] = "left";
|
6
6
|
PaddingsDirections["right"] = "right";
|
7
|
-
})(PaddingsDirections || (PaddingsDirections = {}));
|
8
|
-
//# sourceMappingURL=paddings.js.map
|
7
|
+
})(PaddingsDirections || (PaddingsDirections = {}));
|
@@ -1,10 +1,10 @@
|
|
1
|
-
export * from
|
2
|
-
export * from
|
3
|
-
export * from
|
4
|
-
export * from
|
5
|
-
export * from
|
6
|
-
export * from
|
7
|
-
export * from
|
8
|
-
export * from
|
9
|
-
export * from
|
10
|
-
export * from
|
1
|
+
export * from '../blocks/Author/schema';
|
2
|
+
export * from '../blocks/Banner/schema';
|
3
|
+
export * from '../blocks/ColoredText/schema';
|
4
|
+
export * from '../blocks/CTA/schema';
|
5
|
+
export * from '../blocks/Feed/schema';
|
6
|
+
export * from '../blocks/Layout/schema';
|
7
|
+
export * from '../blocks/Media/schema';
|
8
|
+
export * from '../blocks/Meta/schema';
|
9
|
+
export * from '../blocks/Suggest/schema';
|
10
|
+
export * from '../blocks/YFM/schema';
|
@@ -1,11 +1,10 @@
|
|
1
|
-
export * from
|
2
|
-
export * from
|
3
|
-
export * from
|
4
|
-
export * from
|
5
|
-
export * from
|
6
|
-
export * from
|
7
|
-
export * from
|
8
|
-
export * from
|
9
|
-
export * from
|
10
|
-
export * from
|
11
|
-
//# sourceMappingURL=blocks.js.map
|
1
|
+
export * from '../blocks/Author/schema';
|
2
|
+
export * from '../blocks/Banner/schema';
|
3
|
+
export * from '../blocks/ColoredText/schema';
|
4
|
+
export * from '../blocks/CTA/schema';
|
5
|
+
export * from '../blocks/Feed/schema';
|
6
|
+
export * from '../blocks/Layout/schema';
|
7
|
+
export * from '../blocks/Media/schema';
|
8
|
+
export * from '../blocks/Meta/schema';
|
9
|
+
export * from '../blocks/Suggest/schema';
|
10
|
+
export * from '../blocks/YFM/schema';
|
@@ -1 +1 @@
|
|
1
|
-
export * from
|
1
|
+
export * from '../blocks/Header/schema';
|
@@ -1,2 +1 @@
|
|
1
|
-
export * from
|
2
|
-
//# sourceMappingURL=headers.js.map
|
1
|
+
export * from '../blocks/Header/schema';
|
@@ -1,5 +1,5 @@
|
|
1
|
-
import * as blocks from
|
2
|
-
import * as headers from
|
1
|
+
import * as blocks from './blocks';
|
2
|
+
import * as headers from './headers';
|
3
3
|
export declare const validators: {
|
4
4
|
blocks: typeof blocks;
|
5
5
|
headers: typeof headers;
|
@@ -381,9 +381,6 @@ export declare const schemasForCustom: {
|
|
381
381
|
videoIframe: {
|
382
382
|
type: string;
|
383
383
|
};
|
384
|
-
autoplay: {
|
385
|
-
type: string;
|
386
|
-
};
|
387
384
|
parallax: {
|
388
385
|
type: string;
|
389
386
|
};
|
@@ -1575,9 +1572,6 @@ export declare const schemasForCustom: {
|
|
1575
1572
|
videoIframe: {
|
1576
1573
|
type: string;
|
1577
1574
|
};
|
1578
|
-
autoplay: {
|
1579
|
-
type: string;
|
1580
|
-
};
|
1581
1575
|
parallax: {
|
1582
1576
|
type: string;
|
1583
1577
|
};
|
@@ -1,6 +1,6 @@
|
|
1
|
-
import { BlockType } from
|
2
|
-
import * as blocks from
|
3
|
-
import * as headers from
|
1
|
+
import { BlockType } from '../models/common';
|
2
|
+
import * as blocks from './blocks';
|
3
|
+
import * as headers from './headers';
|
4
4
|
const { Author, Banner, ColoredText, CTA, Feed, Layout, Media, Meta, Suggest, YFM } = blocks;
|
5
5
|
const { Header } = headers;
|
6
6
|
export const validators = {
|
@@ -23,5 +23,4 @@ export const schemasForCustom = {
|
|
23
23
|
[BlockType.Suggest]: Suggest,
|
24
24
|
[BlockType.YFM]: YFM,
|
25
25
|
},
|
26
|
-
};
|
27
|
-
//# sourceMappingURL=index.js.map
|
26
|
+
};
|
package/build/esm/utils/cn.js
CHANGED
@@ -1,5 +1,4 @@
|
|
1
1
|
import { withNaming } from '@bem-react/classname';
|
2
2
|
export const NAMESPACE = 'bc-';
|
3
3
|
export const cn = withNaming({ e: '__', m: '_' });
|
4
|
-
export const block = withNaming({ n: NAMESPACE, e: '__', m: '_' });
|
5
|
-
//# sourceMappingURL=cn.js.map
|
4
|
+
export const block = withNaming({ n: NAMESPACE, e: '__', m: '_' });
|
@@ -1,7 +1,8 @@
|
|
1
|
+
/// <reference types="lodash" />
|
1
2
|
import { AnalyticsEvent, AnalyticsEventsProp, ContentBlockProps, HeaderBreadCrumbsProps } from '@gravity-ui/page-constructor';
|
2
|
-
import { RouterContextProps } from
|
3
|
-
import { GetPostsRequest, Query, Tag } from
|
4
|
-
import { AnalyticsCounter } from
|
3
|
+
import { RouterContextProps } from '../contexts/RouterContext';
|
4
|
+
import { GetPostsRequest, Query, Tag } from '../models/common';
|
5
|
+
import { AnalyticsCounter } from '../counters/utils';
|
5
6
|
export interface QueryParam {
|
6
7
|
name: string;
|
7
8
|
value?: string | number | null;
|
@@ -22,29 +23,29 @@ export declare const updateContentSizes: ({ size, colSizes, theme, ...contentDat
|
|
22
23
|
md: number;
|
23
24
|
} | Partial<Record<import("@gravity-ui/page-constructor").GridColumnSize, number>>;
|
24
25
|
theme: import("@gravity-ui/page-constructor").ContentTheme;
|
25
|
-
title?: import("@gravity-ui/page-constructor").TitleItemBaseProps |
|
26
|
-
titleId?: string;
|
27
|
-
text?: string;
|
28
|
-
textId?: string;
|
29
|
-
additionalInfo?: string;
|
30
|
-
links?: import("@gravity-ui/page-constructor").LinkProps[];
|
31
|
-
buttons?: import("@gravity-ui/page-constructor").ButtonProps[];
|
32
|
-
centered?: boolean;
|
33
|
-
list?: import("@gravity-ui/page-constructor").ContentItemProps[];
|
34
|
-
controlPosition?: "default" | "bottom";
|
26
|
+
title?: string | import("@gravity-ui/page-constructor").TitleItemBaseProps | undefined;
|
27
|
+
titleId?: string | undefined;
|
28
|
+
text?: string | undefined;
|
29
|
+
textId?: string | undefined;
|
30
|
+
additionalInfo?: string | undefined;
|
31
|
+
links?: import("@gravity-ui/page-constructor").LinkProps[] | undefined;
|
32
|
+
buttons?: import("@gravity-ui/page-constructor").ButtonProps[] | undefined;
|
33
|
+
centered?: boolean | undefined;
|
34
|
+
list?: import("@gravity-ui/page-constructor").ContentItemProps[] | undefined;
|
35
|
+
controlPosition?: "default" | "bottom" | undefined;
|
35
36
|
};
|
36
37
|
type GetBreadcrumbsProps = {
|
37
38
|
tags?: Tag[];
|
38
39
|
blogPath: string;
|
39
40
|
};
|
40
41
|
export declare const getBlogPath: (pathPrefix: string) => string;
|
41
|
-
export declare
|
42
|
+
export declare function getBreadcrumbs({ tags, blogPath }: GetBreadcrumbsProps): HeaderBreadCrumbsProps;
|
42
43
|
export declare const getMergedAnalyticsEvents: (analyticEvents: AnalyticsEventsProp, existringEvents?: AnalyticsEventsProp) => {
|
43
44
|
name: string;
|
44
|
-
type?: string;
|
45
|
-
counters?: import("@gravity-ui/page-constructor").AnalyticsCounters;
|
46
|
-
context?: string;
|
47
|
-
target?: string;
|
45
|
+
type?: string | undefined;
|
46
|
+
counters?: import("@gravity-ui/page-constructor").AnalyticsCounters | undefined;
|
47
|
+
context?: string | undefined;
|
48
|
+
target?: string | undefined;
|
48
49
|
}[];
|
49
50
|
export declare const getFeedQueryParams: (queryString: Query, pageNumber?: number) => GetPostsRequest;
|
50
51
|
export declare const scrollOnPageChange: (containerId: string) => void;
|
@@ -4,9 +4,9 @@ import camelCase from 'lodash/camelCase';
|
|
4
4
|
import debounce from 'lodash/debounce';
|
5
5
|
import flatten from 'lodash/flatten';
|
6
6
|
import memoize from 'lodash/memoize';
|
7
|
-
import { CONTENT_DEFAULT_COL_SIZES, CONTENT_DEFAULT_SIZE, CONTENT_DEFAULT_THEME, DEFAULT_PAGE, DEFAULT_ROWS_PER_PAGE, } from
|
8
|
-
import { Keyset, i18n } from
|
9
|
-
import { AnalyticsCounter } from
|
7
|
+
import { CONTENT_DEFAULT_COL_SIZES, CONTENT_DEFAULT_SIZE, CONTENT_DEFAULT_THEME, DEFAULT_PAGE, DEFAULT_ROWS_PER_PAGE, } from '../blocks/constants';
|
8
|
+
import { Keyset, i18n } from '../i18n';
|
9
|
+
import { AnalyticsCounter } from '../counters/utils';
|
10
10
|
const QA_ATTRIBUTES_KEYS = ['container', 'content', 'wrapper', 'image', 'button'];
|
11
11
|
export function getAbsolutePath(router, url) {
|
12
12
|
if (!router || !router.pathname) {
|
@@ -52,7 +52,7 @@ export const getBlogPath = (pathPrefix) => {
|
|
52
52
|
const prefix = pathPrefix ? `/${pathPrefix}` : '';
|
53
53
|
return `${prefix}/blog`;
|
54
54
|
};
|
55
|
-
export
|
55
|
+
export function getBreadcrumbs({ tags, blogPath }) {
|
56
56
|
const breadcrumbs = {
|
57
57
|
items: [{ text: i18n(Keyset.TitleBreadcrumbs), url: blogPath }],
|
58
58
|
theme: 'light',
|
@@ -64,7 +64,7 @@ export const getBreadcrumbs = ({ tags, blogPath }) => {
|
|
64
64
|
breadcrumbs.items.push({ text: tag.name, url: tag.url });
|
65
65
|
}
|
66
66
|
return breadcrumbs;
|
67
|
-
}
|
67
|
+
}
|
68
68
|
const getArrayOfEvents = (events) => {
|
69
69
|
if (!events) {
|
70
70
|
return [];
|
@@ -110,5 +110,4 @@ export const getQaAttributes = (qa, ...customKeys) => {
|
|
110
110
|
};
|
111
111
|
export const prepareAnalyticsEvent = ({ name, counter = AnalyticsCounter.Main, options = {}, }) => (Object.assign(Object.assign({}, options), { name, counters: {
|
112
112
|
include: [counter],
|
113
|
-
} }));
|
114
|
-
//# sourceMappingURL=common.js.map
|
113
|
+
} }));
|
package/build/esm/utils/date.js
CHANGED
@@ -52,5 +52,4 @@ function getDateTimeFormatter(localeCode) {
|
|
52
52
|
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion -- formatter will be always inserted above
|
53
53
|
return dateTimeFormatters.get(localeCode);
|
54
54
|
}
|
55
|
-
export const format = (date, formatCode, localeCode = defaultRegion) => getDateTimeFormatter(localeCode)[formatCode].format(new Date(date));
|
56
|
-
//# sourceMappingURL=date.js.map
|
55
|
+
export const format = (date, formatCode, localeCode = defaultRegion) => getDateTimeFormatter(localeCode)[formatCode].format(new Date(date));
|
@@ -1 +1 @@
|
|
1
|
-
export { getBreadcrumbs } from
|
1
|
+
export { getBreadcrumbs } from './common';
|
package/build/esm/utils/index.js
CHANGED
@@ -1,2 +1 @@
|
|
1
|
-
export { getBreadcrumbs } from
|
2
|
-
//# sourceMappingURL=index.js.map
|
1
|
+
export { getBreadcrumbs } from './common';
|
package/build/esm/utils/svg.js
CHANGED