@gravity-ui/blog-constructor 2.3.0 → 3.1.0-alpha.0

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.
@@ -38,7 +38,6 @@ const Posts_1 = require("../../components/Posts/Posts");
38
38
  const PostsError_1 = require("../../components/PostsError/PostsError");
39
39
  const constants_1 = require("../../constants");
40
40
  const FeedContext_1 = require("../../contexts/FeedContext");
41
- const LocaleContext_1 = require("../../contexts/LocaleContext");
42
41
  const RouterContext_1 = require("../../contexts/RouterContext");
43
42
  /**
44
43
  * @deprecated Metrika will be deleted after launch of analyticsEvents
@@ -56,7 +55,6 @@ const Feed = ({ image }) => {
56
55
  var _a;
57
56
  const { posts, totalCount, tags, services, pinnedPost, getPosts, pageCountForShowSupportButtons, } = (0, react_1.useContext)(FeedContext_1.FeedContext);
58
57
  const router = (0, react_1.useContext)(RouterContext_1.RouterContext);
59
- const { locale } = (0, react_1.useContext)(LocaleContext_1.LocaleContext);
60
58
  const handleAnalytics = (0, page_constructor_1.useAnalytics)(common_1.DefaultEventNames.ShowMore);
61
59
  const [{ errorLoad, errorShowMore, isFetching, isShowMoreFetching, isShowMoreVisible, lastLoadedCount, postCountOnPage, postsOnPage, pinnedPostOnPage, currentPage, queryParams, }, dispatch,] = (0, react_1.useReducer)(reducer_1.reducer, {
62
60
  errorLoad: false,
@@ -79,6 +77,12 @@ const Feed = ({ image }) => {
79
77
  };
80
78
  const handleChangeQueryParams = (value) => {
81
79
  dispatch({ type: reducer_1.ActionTypes.QueryParamsChange, payload: value });
80
+ const hasFirstPageQuery = Object.keys(value).some((queryKey) => queryKey === PAGE_QUERY && value[queryKey] === FIRST_PAGE);
81
+ if (hasFirstPageQuery) {
82
+ // eslint-disable-next-line no-not-accumulator-reassign/no-not-accumulator-reassign
83
+ value[PAGE_QUERY] = null;
84
+ }
85
+ router.updateQueryCallback(value);
82
86
  };
83
87
  const handlePageChange = async (value) => {
84
88
  pageChange(value);
@@ -169,22 +173,6 @@ const Feed = ({ image }) => {
169
173
  value: tag.slug,
170
174
  icon: tag.icon && react_1.default.createElement(uikit_1.Icon, { data: tag.icon }),
171
175
  })), [tags]);
172
- (0, react_1.useEffect)(() => {
173
- const queryString = Object.keys(queryParams)
174
- .reduce((acc, curr) => {
175
- if (curr === PAGE_QUERY && queryParams[curr] === FIRST_PAGE) {
176
- return acc;
177
- }
178
- if (queryParams[curr]) {
179
- acc.push(`${curr}=${queryParams[curr]}`);
180
- }
181
- return acc;
182
- }, [])
183
- .join('&');
184
- const pathPrefix = (locale === null || locale === void 0 ? void 0 : locale.pathPrefix) ? `/${locale === null || locale === void 0 ? void 0 : locale.pathPrefix}/` : '/';
185
- const newUrl = `${pathPrefix}blog${queryString ? `?${queryString}` : ''}`;
186
- window.history.replaceState(Object.assign(Object.assign({}, window.history.state), { as: newUrl, url: newUrl }), '', newUrl);
187
- }, [locale === null || locale === void 0 ? void 0 : locale.pathPrefix, queryParams]);
188
176
  return (react_1.default.createElement("div", null,
189
177
  react_1.default.createElement(FeedHeader_1.FeedHeader, { verticalOffset: "s", tags: tagItems, services: serviceItems, setIsFetching: setIsFetching, handleChangeQuery: handleChangeQueryParams, queryParams: queryParams, background: {
190
178
  fullWidth: true,
@@ -30,7 +30,7 @@ exports.Save = void 0;
30
30
  const react_1 = __importStar(require("react"));
31
31
  const page_constructor_1 = require("@gravity-ui/page-constructor");
32
32
  const uikit_1 = require("@gravity-ui/uikit");
33
- const UserContext_1 = require("../../../contexts/UserContext");
33
+ const LikesContext_1 = require("../../../contexts/LikesContext");
34
34
  const metrika_js_1 = __importDefault(require("../../../counters/metrika.js"));
35
35
  const utils_1 = require("../../../counters/utils");
36
36
  const Save_1 = require("../../../icons/Save");
@@ -53,14 +53,14 @@ const b = (0, cn_1.block)('post-info');
53
53
  * @returns jsx
54
54
  */
55
55
  const Save = ({ title, postId, hasUserLike, handleUserLike, metrikaGoal, size, theme, dataQa, }) => {
56
- const { uid } = (0, react_1.useContext)(UserContext_1.UserContext);
56
+ const { hasLikes } = (0, react_1.useContext)(LikesContext_1.LikesContext);
57
57
  const handleAnalytics = (0, page_constructor_1.useAnalytics)(common_1.DefaultEventNames.SaveButton);
58
58
  return (react_1.default.createElement("div", { className: b('item', { size }), onClick: (event) => {
59
59
  // both preventDefault and stopImmediatePropagation required to work properly
60
60
  // https://stackoverflow.com/questions/24415631/reactjs-syntheticevent-stoppropagation-only-works-with-react-events
61
61
  event.preventDefault();
62
62
  event.nativeEvent.stopImmediatePropagation();
63
- if (!uid) {
63
+ if (!hasLikes) {
64
64
  return;
65
65
  }
66
66
  (0, common_2.postLikeStatus)(postId, Boolean(hasUserLike));
@@ -68,9 +68,9 @@ const Save = ({ title, postId, hasUserLike, handleUserLike, metrikaGoal, size, t
68
68
  metrika_js_1.default.reachGoal(utils_1.MetrikaCounter.CrossSite, metrikaGoal);
69
69
  handleAnalytics();
70
70
  }, "data-qa": `${dataQa ? dataQa + '-' : ''}save` },
71
- react_1.default.createElement("div", { className: b('content', { cursor: Boolean(uid), theme }) },
71
+ react_1.default.createElement("div", { className: b('content', { cursor: hasLikes, theme }) },
72
72
  react_1.default.createElement("span", { className: b('icon') },
73
73
  react_1.default.createElement(uikit_1.Icon, { data: hasUserLike ? SaveFilled_1.SaveFilled : Save_1.Save, size: ICON_SIZE, className: b({ filled: Boolean(hasUserLike) }) })),
74
- react_1.default.createElement("span", { className: b('title', { cursor: Boolean(uid) }) }, title))));
74
+ react_1.default.createElement("span", { className: b('title', { cursor: hasLikes }) }, title))));
75
75
  };
76
76
  exports.Save = Save;
@@ -2,7 +2,6 @@ import React from 'react';
2
2
  import { AnalyticsContextProps } from '@gravity-ui/page-constructor';
3
3
  import { DeviceContextProps } from '../contexts/DeviceContext';
4
4
  import { RouterContextProps } from '../contexts/RouterContext';
5
- import { UserContextProps } from '../contexts/UserContext';
6
5
  import { ThemeValueType } from '../contexts/theme/ThemeValueContext';
7
6
  import { Locale } from '../models/locale';
8
7
  export interface BlogConstructorProviderProps {
@@ -10,7 +9,6 @@ export interface BlogConstructorProviderProps {
10
9
  locale?: Locale;
11
10
  router?: RouterContextProps;
12
11
  theme?: ThemeValueType;
13
- user?: UserContextProps;
14
12
  device?: DeviceContextProps;
15
13
  analytics?: AnalyticsContextProps;
16
14
  children?: React.ReactNode;
@@ -31,15 +31,13 @@ const DeviceContext_1 = require("../contexts/DeviceContext");
31
31
  const LocaleContext_1 = require("../contexts/LocaleContext");
32
32
  const MobileContext_1 = require("../contexts/MobileContext");
33
33
  const RouterContext_1 = require("../contexts/RouterContext");
34
- const UserContext_1 = require("../contexts/UserContext");
35
34
  const ThemeValueContext_1 = require("../contexts/theme/ThemeValueContext");
36
- const BlogConstructorProvider = ({ isMobile, locale = {}, router = {}, theme = constants_1.DEFAULT_THEME, user = {}, device = {}, analytics = {}, children, }) => {
35
+ const BlogConstructorProvider = ({ isMobile, locale = {}, router = {}, theme = constants_1.DEFAULT_THEME, device = {}, analytics = {}, children, }) => {
37
36
  const context = [
38
37
  react_1.default.createElement(ThemeValueContext_1.ThemeValueContext.Provider, { value: { themeValue: theme }, key: "theme-context" }),
39
38
  react_1.default.createElement(LocaleContext_1.LocaleContext.Provider, { value: { locale }, key: "locale-context" }),
40
39
  react_1.default.createElement(RouterContext_1.RouterContext.Provider, { value: router, key: "router-context" }),
41
40
  react_1.default.createElement(MobileContext_1.MobileContext.Provider, { value: Boolean(isMobile), key: "is-mobile-context" }),
42
- react_1.default.createElement(UserContext_1.UserContext.Provider, { value: user, key: "user-context" }),
43
41
  react_1.default.createElement(DeviceContext_1.DeviceContext.Provider, { value: device, key: "device-context" }),
44
42
  react_1.default.createElement(page_constructor_1.AnalyticsContext.Provider, { value: analytics, key: "analytics-context" }),
45
43
  ].reduceRight((prev, provider) => react_1.default.cloneElement(provider, {}, prev), children);
@@ -5,5 +5,6 @@ export interface RouterContextProps {
5
5
  as: string;
6
6
  hostname: string;
7
7
  query?: Query;
8
+ updateQueryCallback: (query: Query) => void;
8
9
  }
9
10
  export declare const RouterContext: React.Context<RouterContextProps>;
@@ -9,7 +9,6 @@ import { Posts } from '../../components/Posts/Posts';
9
9
  import { PostsError } from '../../components/PostsError/PostsError';
10
10
  import { BlogMetrikaGoalIds } from '../../constants';
11
11
  import { FeedContext } from '../../contexts/FeedContext';
12
- import { LocaleContext } from '../../contexts/LocaleContext';
13
12
  import { RouterContext } from '../../contexts/RouterContext';
14
13
  /**
15
14
  * @deprecated Metrika will be deleted after launch of analyticsEvents
@@ -27,7 +26,6 @@ export const Feed = ({ image }) => {
27
26
  var _a;
28
27
  const { posts, totalCount, tags, services, pinnedPost, getPosts, pageCountForShowSupportButtons, } = useContext(FeedContext);
29
28
  const router = useContext(RouterContext);
30
- const { locale } = useContext(LocaleContext);
31
29
  const handleAnalytics = useAnalytics(DefaultEventNames.ShowMore);
32
30
  const [{ errorLoad, errorShowMore, isFetching, isShowMoreFetching, isShowMoreVisible, lastLoadedCount, postCountOnPage, postsOnPage, pinnedPostOnPage, currentPage, queryParams, }, dispatch,] = useReducer(reducer, {
33
31
  errorLoad: false,
@@ -50,6 +48,12 @@ export const Feed = ({ image }) => {
50
48
  };
51
49
  const handleChangeQueryParams = (value) => {
52
50
  dispatch({ type: ActionTypes.QueryParamsChange, payload: value });
51
+ const hasFirstPageQuery = Object.keys(value).some((queryKey) => queryKey === PAGE_QUERY && value[queryKey] === FIRST_PAGE);
52
+ if (hasFirstPageQuery) {
53
+ // eslint-disable-next-line no-not-accumulator-reassign/no-not-accumulator-reassign
54
+ value[PAGE_QUERY] = null;
55
+ }
56
+ router.updateQueryCallback(value);
53
57
  };
54
58
  const handlePageChange = async (value) => {
55
59
  pageChange(value);
@@ -140,22 +144,6 @@ export const Feed = ({ image }) => {
140
144
  value: tag.slug,
141
145
  icon: tag.icon && React.createElement(Icon, { data: tag.icon }),
142
146
  })), [tags]);
143
- useEffect(() => {
144
- const queryString = Object.keys(queryParams)
145
- .reduce((acc, curr) => {
146
- if (curr === PAGE_QUERY && queryParams[curr] === FIRST_PAGE) {
147
- return acc;
148
- }
149
- if (queryParams[curr]) {
150
- acc.push(`${curr}=${queryParams[curr]}`);
151
- }
152
- return acc;
153
- }, [])
154
- .join('&');
155
- const pathPrefix = (locale === null || locale === void 0 ? void 0 : locale.pathPrefix) ? `/${locale === null || locale === void 0 ? void 0 : locale.pathPrefix}/` : '/';
156
- const newUrl = `${pathPrefix}blog${queryString ? `?${queryString}` : ''}`;
157
- window.history.replaceState(Object.assign(Object.assign({}, window.history.state), { as: newUrl, url: newUrl }), '', newUrl);
158
- }, [locale === null || locale === void 0 ? void 0 : locale.pathPrefix, queryParams]);
159
147
  return (React.createElement("div", null,
160
148
  React.createElement(FeedHeader, { verticalOffset: "s", tags: tagItems, services: serviceItems, setIsFetching: setIsFetching, handleChangeQuery: handleChangeQueryParams, queryParams: queryParams, background: {
161
149
  fullWidth: true,
@@ -1,7 +1,7 @@
1
1
  import React, { useContext } from 'react';
2
2
  import { useAnalytics } from '@gravity-ui/page-constructor';
3
3
  import { Icon } from '@gravity-ui/uikit';
4
- import { UserContext } from '../../../contexts/UserContext';
4
+ import { LikesContext } from '../../../contexts/LikesContext';
5
5
  import metrika from '../../../counters/metrika.js';
6
6
  import { MetrikaCounter } from '../../../counters/utils';
7
7
  import { Save as SaveIcon } from '../../../icons/Save';
@@ -25,14 +25,14 @@ const b = block('post-info');
25
25
  * @returns jsx
26
26
  */
27
27
  export const Save = ({ title, postId, hasUserLike, handleUserLike, metrikaGoal, size, theme, dataQa, }) => {
28
- const { uid } = useContext(UserContext);
28
+ const { hasLikes } = useContext(LikesContext);
29
29
  const handleAnalytics = useAnalytics(DefaultEventNames.SaveButton);
30
30
  return (React.createElement("div", { className: b('item', { size }), onClick: (event) => {
31
31
  // both preventDefault and stopImmediatePropagation required to work properly
32
32
  // https://stackoverflow.com/questions/24415631/reactjs-syntheticevent-stoppropagation-only-works-with-react-events
33
33
  event.preventDefault();
34
34
  event.nativeEvent.stopImmediatePropagation();
35
- if (!uid) {
35
+ if (!hasLikes) {
36
36
  return;
37
37
  }
38
38
  postLikeStatus(postId, Boolean(hasUserLike));
@@ -40,8 +40,8 @@ export const Save = ({ title, postId, hasUserLike, handleUserLike, metrikaGoal,
40
40
  metrika.reachGoal(MetrikaCounter.CrossSite, metrikaGoal);
41
41
  handleAnalytics();
42
42
  }, "data-qa": `${dataQa ? dataQa + '-' : ''}save` },
43
- React.createElement("div", { className: b('content', { cursor: Boolean(uid), theme }) },
43
+ React.createElement("div", { className: b('content', { cursor: hasLikes, theme }) },
44
44
  React.createElement("span", { className: b('icon') },
45
45
  React.createElement(Icon, { data: hasUserLike ? SaveFilled : SaveIcon, size: ICON_SIZE, className: b({ filled: Boolean(hasUserLike) }) })),
46
- React.createElement("span", { className: b('title', { cursor: Boolean(uid) }) }, title))));
46
+ React.createElement("span", { className: b('title', { cursor: hasLikes }) }, title))));
47
47
  };
@@ -2,7 +2,6 @@ import React from 'react';
2
2
  import { AnalyticsContextProps } from '@gravity-ui/page-constructor';
3
3
  import { DeviceContextProps } from '../contexts/DeviceContext';
4
4
  import { RouterContextProps } from '../contexts/RouterContext';
5
- import { UserContextProps } from '../contexts/UserContext';
6
5
  import { ThemeValueType } from '../contexts/theme/ThemeValueContext';
7
6
  import { Locale } from '../models/locale';
8
7
  export interface BlogConstructorProviderProps {
@@ -10,7 +9,6 @@ export interface BlogConstructorProviderProps {
10
9
  locale?: Locale;
11
10
  router?: RouterContextProps;
12
11
  theme?: ThemeValueType;
13
- user?: UserContextProps;
14
12
  device?: DeviceContextProps;
15
13
  analytics?: AnalyticsContextProps;
16
14
  children?: React.ReactNode;
@@ -5,15 +5,13 @@ import { DeviceContext } from '../contexts/DeviceContext';
5
5
  import { LocaleContext } from '../contexts/LocaleContext';
6
6
  import { MobileContext } from '../contexts/MobileContext';
7
7
  import { RouterContext } from '../contexts/RouterContext';
8
- import { UserContext } from '../contexts/UserContext';
9
8
  import { ThemeValueContext } from '../contexts/theme/ThemeValueContext';
10
- export const BlogConstructorProvider = ({ isMobile, locale = {}, router = {}, theme = DEFAULT_THEME, user = {}, device = {}, analytics = {}, children, }) => {
9
+ export const BlogConstructorProvider = ({ isMobile, locale = {}, router = {}, theme = DEFAULT_THEME, device = {}, analytics = {}, children, }) => {
11
10
  const context = [
12
11
  React.createElement(ThemeValueContext.Provider, { value: { themeValue: theme }, key: "theme-context" }),
13
12
  React.createElement(LocaleContext.Provider, { value: { locale }, key: "locale-context" }),
14
13
  React.createElement(RouterContext.Provider, { value: router, key: "router-context" }),
15
14
  React.createElement(MobileContext.Provider, { value: Boolean(isMobile), key: "is-mobile-context" }),
16
- React.createElement(UserContext.Provider, { value: user, key: "user-context" }),
17
15
  React.createElement(DeviceContext.Provider, { value: device, key: "device-context" }),
18
16
  React.createElement(AnalyticsContext.Provider, { value: analytics, key: "analytics-context" }),
19
17
  ].reduceRight((prev, provider) => React.cloneElement(provider, {}, prev), children);
@@ -5,5 +5,6 @@ export interface RouterContextProps {
5
5
  as: string;
6
6
  hostname: string;
7
7
  query?: Query;
8
+ updateQueryCallback: (query: Query) => void;
8
9
  }
9
10
  export declare const RouterContext: React.Context<RouterContextProps>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gravity-ui/blog-constructor",
3
- "version": "2.3.0",
3
+ "version": "3.1.0-alpha.0",
4
4
  "description": "Gravity UI Blog Constructor",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -141,5 +141,8 @@
141
141
  "*.{json,yaml,yml,md}": [
142
142
  "prettier --write"
143
143
  ]
144
+ },
145
+ "publishConfig": {
146
+ "tag": "alpha"
144
147
  }
145
148
  }
package/CHANGELOG.md DELETED
@@ -1,90 +0,0 @@
1
- # Changelog
2
-
3
- ## [2.3.0](https://github.com/gravity-ui/blog-constructor/compare/v2.2.0...v2.3.0) (2023-04-10)
4
-
5
-
6
- ### Features
7
-
8
- * analytics refactoring ([#13](https://github.com/gravity-ui/blog-constructor/issues/13)) ([a95c55b](https://github.com/gravity-ui/blog-constructor/commit/a95c55bd1ff98f86a110f33ac3275b590ee5db8e))
9
-
10
-
11
- ### Bug Fixes
12
-
13
- * margin-top of header ([#31](https://github.com/gravity-ui/blog-constructor/issues/31)) ([97ed974](https://github.com/gravity-ui/blog-constructor/commit/97ed974ab0ce0546010d60587b21b8c0eee3279c))
14
-
15
- ## [2.2.0](https://github.com/gravity-ui/blog-constructor/compare/v2.1.0...v2.2.0) (2023-04-06)
16
-
17
-
18
- ### Features
19
-
20
- * update linters ([#24](https://github.com/gravity-ui/blog-constructor/issues/24)) ([bc5aa0f](https://github.com/gravity-ui/blog-constructor/commit/bc5aa0f72e64b916acaf692874482ccdae3f94e9))
21
-
22
- ## [2.1.0](https://github.com/gravity-ui/blog-constructor/compare/v2.0.2...v2.1.0) (2023-04-06)
23
-
24
-
25
- ### Features
26
-
27
- * change source field with author description ([#5](https://github.com/gravity-ui/blog-constructor/issues/5)) ([fb7151c](https://github.com/gravity-ui/blog-constructor/commit/fb7151ceac39b2e4407c7110da0314b87c4db72b))
28
-
29
- ## [2.0.2](https://github.com/gravity-ui/blog-constructor/compare/v2.0.1...v2.0.2) (2023-04-05)
30
-
31
-
32
- ### Bug Fixes
33
-
34
- * covering pagination buttons into 'a' tag ([#23](https://github.com/gravity-ui/blog-constructor/issues/23)) ([e603f2e](https://github.com/gravity-ui/blog-constructor/commit/e603f2e2b0f86d492132174a1c8172786e7a09a1))
35
-
36
- ## [2.0.1](https://github.com/gravity-ui/blog-constructor/compare/v2.0.0...v2.0.1) (2023-04-04)
37
-
38
-
39
- ### Bug Fixes
40
-
41
- * throw virtualization threshold prop in Select ([#26](https://github.com/gravity-ui/blog-constructor/issues/26)) ([ccb0f19](https://github.com/gravity-ui/blog-constructor/commit/ccb0f19a904e54fd43ca66195da9e94925d0a26f))
42
- * throw virtualization threshold prop in Select ([#26](https://github.com/gravity-ui/blog-constructor/issues/26)) ([0aa5aed](https://github.com/gravity-ui/blog-constructor/commit/0aa5aeda9a0afd99ae8590c6b666c033a12b7fba))
43
-
44
- ## [2.0.0](https://github.com/gravity-ui/blog-constructor/compare/v1.1.2...v2.0.0) (2023-04-03)
45
-
46
-
47
- ### ⚠ BREAKING CHANGES
48
-
49
- * update uikit up to 4 ([#11](https://github.com/gravity-ui/blog-constructor/issues/11))
50
-
51
- ### Features
52
-
53
- * update uikit up to 4 ([#11](https://github.com/gravity-ui/blog-constructor/issues/11)) ([5d6f3d5](https://github.com/gravity-ui/blog-constructor/commit/5d6f3d51daf111a240871dbad721bbdd250d6b46))
54
-
55
- ## [1.1.2](https://github.com/gravity-ui/blog-constructor/compare/v1.1.1...v1.1.2) (2023-03-28)
56
-
57
-
58
- ### Bug Fixes
59
-
60
- * add info about release ([#19](https://github.com/gravity-ui/blog-constructor/issues/19)) ([8a5824f](https://github.com/gravity-ui/blog-constructor/commit/8a5824f24c4ad85f0f122111f8f5c1e7c36becc5))
61
-
62
- ## [1.1.1](https://github.com/gravity-ui/blog-constructor/compare/v1.1.0...v1.1.1) (2023-03-28)
63
-
64
-
65
- ### Bug Fixes
66
-
67
- * add info about ci in readme ([#17](https://github.com/gravity-ui/blog-constructor/issues/17)) ([b6cffaa](https://github.com/gravity-ui/blog-constructor/commit/b6cffaa1c255c53cd00d06d4fbe0330e117f42a0))
68
-
69
- ## 1.1.0 (2023-03-28)
70
-
71
- ### Features
72
-
73
- - add workflows, update @types/react, small refactors, update Select ([#2](https://github.com/gravity-ui/blog-constructor/issues/2)) ([326247a](https://github.com/gravity-ui/blog-constructor/commit/326247abe9411b50c82ed2cfa516ac6cd341bfa7))
74
- - Brush up stories, add content for CTA, Layout, Feed blocks. ([#4](https://github.com/gravity-ui/blog-constructor/issues/4)) ([0b73537](https://github.com/gravity-ui/blog-constructor/commit/0b73537b3bae35eca10610963369f3f5d8f9ecbd))
75
- - export author type ([9e5ee34](https://github.com/gravity-ui/blog-constructor/commit/9e5ee34c6b4d1b3288cda1258160e22073f9ad9d))
76
- - fix button savedOnly color ([#9](https://github.com/gravity-ui/blog-constructor/issues/9)) ([ef3b1ca](https://github.com/gravity-ui/blog-constructor/commit/ef3b1ca9048f1218817ec5c9c6a5b3e05492f062))
77
- - init tests ([#1](https://github.com/gravity-ui/blog-constructor/issues/1)) ([f8df32f](https://github.com/gravity-ui/blog-constructor/commit/f8df32f3eccb97abc7bfef222aca1ea56421619b))
78
- - **navigation:** pass the PageConstructor's navigation prop ([cb875ff](https://github.com/gravity-ui/blog-constructor/commit/cb875ff708832f5dd9e121d67cfccb387ae2499f))
79
- - uninstall doctools/components ([#14](https://github.com/gravity-ui/blog-constructor/issues/14)) ([16dc64c](https://github.com/gravity-ui/blog-constructor/commit/16dc64c3002b614831880dbe5b250c5637031c7d))
80
- - update license ([#3](https://github.com/gravity-ui/blog-constructor/issues/3)) ([aa4ee5b](https://github.com/gravity-ui/blog-constructor/commit/aa4ee5bdd01a7db5f6c6c457836658761eee1099))
81
- - update readme ([#15](https://github.com/gravity-ui/blog-constructor/issues/15)) ([3dbdf78](https://github.com/gravity-ui/blog-constructor/commit/3dbdf78b35f93024bebbcf64a6f06fb01509ae3e))
82
-
83
- ### Bug Fixes
84
-
85
- - **general:** better deps ([8c22384](https://github.com/gravity-ui/blog-constructor/commit/8c223848e47faf8b9beee6700afce317359ee226))
86
- - search input width ([051c145](https://github.com/gravity-ui/blog-constructor/commit/051c14502110306964c4ec9a2bea47cea9364db5))
87
-
88
- ## 1.0.0
89
-
90
- Create public access for blog-constructor library for creating blog format web pages.
@@ -1,18 +0,0 @@
1
- import React from 'react';
2
- export interface UserAccount {
3
- uid: string;
4
- login: string;
5
- avatarId: string;
6
- displayName?: string;
7
- lang?: string;
8
- hasStaffLogin?: boolean;
9
- }
10
- export interface User extends UserAccount {
11
- accounts: UserAccount[];
12
- passportHost: string;
13
- avatarHost: string;
14
- status: string;
15
- yandexuid: string;
16
- }
17
- export type UserContextProps = Partial<User>;
18
- export declare const UserContext: React.Context<Partial<User>>;
@@ -1,8 +0,0 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.UserContext = void 0;
7
- const react_1 = __importDefault(require("react"));
8
- exports.UserContext = react_1.default.createContext({});
@@ -1,18 +0,0 @@
1
- import React from 'react';
2
- export interface UserAccount {
3
- uid: string;
4
- login: string;
5
- avatarId: string;
6
- displayName?: string;
7
- lang?: string;
8
- hasStaffLogin?: boolean;
9
- }
10
- export interface User extends UserAccount {
11
- accounts: UserAccount[];
12
- passportHost: string;
13
- avatarHost: string;
14
- status: string;
15
- yandexuid: string;
16
- }
17
- export type UserContextProps = Partial<User>;
18
- export declare const UserContext: React.Context<Partial<User>>;
@@ -1,2 +0,0 @@
1
- import React from 'react';
2
- export const UserContext = React.createContext({});