@gravity-ui/blog-constructor 4.2.1 → 4.3.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.
Files changed (30) hide show
  1. package/build/cjs/components/FeedHeader/components/Controls/customRenders.d.ts +2 -1
  2. package/build/cjs/components/FeedHeader/components/CustomSelectOption/CustomSelectOption.d.ts +1 -1
  3. package/build/cjs/components/FeedHeader/components/CustomSwitcher/CustomSwitcher.d.ts +2 -1
  4. package/build/cjs/components/Paginator/Paginator.d.ts +2 -1
  5. package/build/cjs/components/Paginator/components/NavigationButton.d.ts +2 -1
  6. package/build/cjs/components/Paginator/components/PaginatorItem.d.ts +2 -1
  7. package/build/cjs/components/Prompt/Prompt.d.ts +2 -1
  8. package/build/cjs/components/Prompt/Prompt.js +5 -2
  9. package/build/cjs/components/PromptSignIn/PromptSignIn.d.ts +1 -1
  10. package/build/cjs/containers/BlogPage/BlogPage.d.ts +1 -1
  11. package/build/cjs/contexts/theme/ThemeProvider.d.ts +1 -1
  12. package/build/cjs/demo/DocsDecorator/DocsDecorator.css +11 -0
  13. package/build/cjs/hooks/useHover.d.ts +5 -0
  14. package/build/cjs/hooks/useHover.js +35 -0
  15. package/build/esm/components/FeedHeader/components/Controls/customRenders.d.ts +2 -1
  16. package/build/esm/components/FeedHeader/components/CustomSelectOption/CustomSelectOption.d.ts +1 -1
  17. package/build/esm/components/FeedHeader/components/CustomSwitcher/CustomSwitcher.d.ts +2 -1
  18. package/build/esm/components/Paginator/Paginator.d.ts +2 -1
  19. package/build/esm/components/Paginator/components/NavigationButton.d.ts +2 -1
  20. package/build/esm/components/Paginator/components/PaginatorItem.d.ts +2 -1
  21. package/build/esm/components/Prompt/Prompt.d.ts +2 -1
  22. package/build/esm/components/Prompt/Prompt.js +5 -2
  23. package/build/esm/components/PromptSignIn/PromptSignIn.d.ts +1 -1
  24. package/build/esm/containers/BlogPage/BlogPage.d.ts +1 -1
  25. package/build/esm/contexts/theme/ThemeProvider.d.ts +1 -1
  26. package/build/esm/demo/DocsDecorator/DocsDecorator.css +11 -0
  27. package/build/esm/hooks/useHover.d.ts +5 -0
  28. package/build/esm/hooks/useHover.js +28 -0
  29. package/package.json +14 -17
  30. package/CHANGELOG.md +0 -223
@@ -1,3 +1,4 @@
1
+ import React from 'react';
1
2
  import { SelectOption, SelectProps } from '@gravity-ui/uikit';
2
3
  import { CustomSwitcherProps } from '../CustomSwitcher/CustomSwitcher';
3
4
  type RenderSwitcherType = ({ initial, list, defaultLabel, }: {
@@ -7,5 +8,5 @@ type RenderSwitcherType = ({ initial, list, defaultLabel, }: {
7
8
  }) => SelectProps['renderControl'];
8
9
  export declare const renderSwitcher: RenderSwitcherType;
9
10
  export declare const renderFilter: SelectProps['renderFilter'];
10
- export declare const renderOption: (option: SelectOption) => JSX.Element;
11
+ export declare const renderOption: (option: SelectOption) => React.JSX.Element;
11
12
  export {};
@@ -5,4 +5,4 @@ export type CustomSelectOptionProps = {
5
5
  icon?: React.ReactElement;
6
6
  } & SelectOptionType;
7
7
  };
8
- export declare const CustomSelectOption: ({ data }: CustomSelectOptionProps) => JSX.Element;
8
+ export declare const CustomSelectOption: ({ data }: CustomSelectOptionProps) => React.JSX.Element;
@@ -1,3 +1,4 @@
1
+ import React from 'react';
1
2
  import { SelectProps } from '@gravity-ui/uikit';
2
3
  import { SelectItem } from '../Controls/Controls';
3
4
  type RenderControlParameters = Partial<Parameters<Required<SelectProps>['renderControl']>[0]>;
@@ -7,5 +8,5 @@ export type CustomSwitcherProps = {
7
8
  list: SelectItem[];
8
9
  controlRef: RenderControlParameters['ref'];
9
10
  } & Omit<RenderControlParameters, 'ref'>;
10
- export declare const CustomSwitcher: ({ initial, defaultLabel, list, onClick, controlRef, }: CustomSwitcherProps) => JSX.Element;
11
+ export declare const CustomSwitcher: ({ initial, defaultLabel, list, onClick, controlRef, }: CustomSwitcherProps) => React.JSX.Element;
11
12
  export {};
@@ -1,2 +1,3 @@
1
+ import React from 'react';
1
2
  import { PaginatorProps } from './types';
2
- export declare const Paginator: ({ itemsPerPage, totalItems, maxPages, page, className, onPageChange, pageCountForShowSupportButtons, }: PaginatorProps) => JSX.Element | null;
3
+ export declare const Paginator: ({ itemsPerPage, totalItems, maxPages, page, className, onPageChange, pageCountForShowSupportButtons, }: PaginatorProps) => React.JSX.Element | null;
@@ -1,6 +1,7 @@
1
+ import React from 'react';
1
2
  import { ArrowType } from '../types';
2
3
  export type NavigationButtonProps = {
3
4
  arrowType: ArrowType;
4
5
  disabled?: boolean;
5
6
  };
6
- export declare const NavigationButton: ({ arrowType, disabled }: NavigationButtonProps) => JSX.Element | null;
7
+ export declare const NavigationButton: ({ arrowType, disabled }: NavigationButtonProps) => React.JSX.Element | null;
@@ -1,2 +1,3 @@
1
+ import React from 'react';
1
2
  import { PaginatorItemProps } from '../types';
2
- export declare const PaginatorItem: ({ dataKey, mods, content, onClick, loading, index, }: PaginatorItemProps) => JSX.Element;
3
+ export declare const PaginatorItem: ({ dataKey, mods, content, onClick, loading, index, }: PaginatorItemProps) => React.JSX.Element;
@@ -1,3 +1,4 @@
1
+ import React from 'react';
1
2
  import { ButtonProps } from '@gravity-ui/uikit';
2
3
  export interface PromptProps {
3
4
  text: string;
@@ -14,4 +15,4 @@ export interface PromptProps {
14
15
  * - `openTimestamp` (`Date.now()`) resets the visible duration
15
16
  * @returns {JSX|null}
16
17
  */
17
- export declare const Prompt: ({ text, actions, className, openTimestamp, openDuration, theme, }: PromptProps) => JSX.Element;
18
+ export declare const Prompt: ({ text, actions, className, openTimestamp, openDuration, theme, }: PromptProps) => React.JSX.Element;
@@ -17,6 +17,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
17
17
  exports.Prompt = void 0;
18
18
  const react_1 = __importDefault(require("react"));
19
19
  const uikit_1 = require("@gravity-ui/uikit");
20
+ const useHover_1 = require("../../hooks/useHover");
20
21
  const useOpenCloseTimer_1 = require("../../hooks/useOpenCloseTimer");
21
22
  const cn_1 = require("../../utils/cn");
22
23
  const b = (0, cn_1.block)('prompt');
@@ -28,10 +29,12 @@ const b = (0, cn_1.block)('prompt');
28
29
  * @returns {JSX|null}
29
30
  */
30
31
  const Prompt = ({ text, actions, className, openTimestamp = 0, openDuration, theme, }) => {
31
- const { open } = (0, useOpenCloseTimer_1.useOpenCloseTimer)(openTimestamp, openDuration);
32
+ const [ref, hovering] = (0, useHover_1.useHover)();
33
+ const { open: isOpen } = (0, useOpenCloseTimer_1.useOpenCloseTimer)(openTimestamp, openDuration);
34
+ const open = isOpen || hovering;
32
35
  const mounted = openTimestamp > 0;
33
36
  return (react_1.default.createElement("div", { className: b({ theme, open, close: !open, mounted }, className) },
34
- react_1.default.createElement("div", { className: b('content') },
37
+ react_1.default.createElement("div", { className: b('content'), ref: ref },
35
38
  react_1.default.createElement("span", { className: b('text') }, text),
36
39
  react_1.default.createElement("div", { className: b('actions') }, actions.map((_a, i) => {
37
40
  var { view = 'action', className: btnClass } = _a, btnProps = __rest(_a, ["view", "className"]);
@@ -7,4 +7,4 @@ export interface PromptSignInProps extends Partial<PromptProps> {
7
7
  * Authentication Popup that appears when user action requires login
8
8
  * @returns {JSX|null}
9
9
  */
10
- export declare const PromptSignIn: ({ text, onClickSignIn, actions, ...props }: PromptSignInProps) => JSX.Element;
10
+ export declare const PromptSignIn: ({ text, onClickSignIn, actions, ...props }: PromptSignInProps) => React.JSX.Element;
@@ -17,4 +17,4 @@ export type BlogPageProps = {
17
17
  isSignedInUser?: boolean;
18
18
  onClickSignIn?: React.EventHandler<SyntheticEvent>;
19
19
  };
20
- export declare const BlogPage: ({ content, posts, tags, services, getPosts, metaData, hasLikes, toggleLike, navigation, settings, pageCountForShowSupportButtons, isSignedInUser, onClickSignIn, }: BlogPageProps) => JSX.Element;
20
+ export declare const BlogPage: ({ content, posts, tags, services, getPosts, metaData, hasLikes, toggleLike, navigation, settings, pageCountForShowSupportButtons, isSignedInUser, onClickSignIn, }: BlogPageProps) => React.JSX.Element;
@@ -17,7 +17,7 @@ export declare class ThemeProvider extends React.Component<ThemeProviderExternal
17
17
  state: ThemeProviderState;
18
18
  componentDidMount(): void;
19
19
  componentDidUpdate(prevProps: ThemeProviderProps, prevState: ThemeProviderState): void;
20
- render(): JSX.Element;
20
+ render(): React.JSX.Element;
21
21
  private updateBodyClassName;
22
22
  }
23
23
  export {};
@@ -0,0 +1,11 @@
1
+ /* use this for style redefinitions to awoid problems with
2
+ unpredictable css rules order in build */
3
+ .docs-decorator.docs-decorator.docs-decorator.docs-decorator.docs-decorator .sbdocs-wrapper {
4
+ padding: 0 40px;
5
+ }
6
+ .docs-decorator.docs-decorator.docs-decorator.docs-decorator.docs-decorator .sbdocs-content {
7
+ max-width: 1680px;
8
+ }
9
+ .docs-decorator.docs-decorator.docs-decorator.docs-decorator.docs-decorator .innerZoomElementWrapper {
10
+ overflow: hidden;
11
+ }
@@ -0,0 +1,5 @@
1
+ import React from 'react';
2
+ export declare function useHover<T extends HTMLElement = HTMLElement>(): [
3
+ ref: React.RefObject<T>,
4
+ hovering: boolean
5
+ ];
@@ -0,0 +1,35 @@
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.useHover = void 0;
7
+ const react_1 = __importDefault(require("react"));
8
+ /*
9
+ * Source code copied from https://github.com/uidotdev/usehooks | MIT License
10
+ * @see https://usehooks.com/usehover
11
+ */
12
+ function useHover() {
13
+ const [hovering, setHovering] = react_1.default.useState(false);
14
+ const ref = react_1.default.useRef(null);
15
+ react_1.default.useEffect(() => {
16
+ const node = ref.current;
17
+ if (!node)
18
+ return;
19
+ const handleMouseEnter = () => {
20
+ setHovering(true);
21
+ };
22
+ const handleMouseLeave = () => {
23
+ setHovering(false);
24
+ };
25
+ node.addEventListener('mouseenter', handleMouseEnter);
26
+ node.addEventListener('mouseleave', handleMouseLeave);
27
+ // eslint-disable-next-line consistent-return
28
+ return () => {
29
+ node.removeEventListener('mouseenter', handleMouseEnter);
30
+ node.removeEventListener('mouseleave', handleMouseLeave);
31
+ };
32
+ }, []);
33
+ return [ref, hovering];
34
+ }
35
+ exports.useHover = useHover;
@@ -1,3 +1,4 @@
1
+ import React from 'react';
1
2
  import { SelectOption, SelectProps } from '@gravity-ui/uikit';
2
3
  import { CustomSwitcherProps } from '../CustomSwitcher/CustomSwitcher';
3
4
  import './Controls.css';
@@ -8,5 +9,5 @@ type RenderSwitcherType = ({ initial, list, defaultLabel, }: {
8
9
  }) => SelectProps['renderControl'];
9
10
  export declare const renderSwitcher: RenderSwitcherType;
10
11
  export declare const renderFilter: SelectProps['renderFilter'];
11
- export declare const renderOption: (option: SelectOption) => JSX.Element;
12
+ export declare const renderOption: (option: SelectOption) => React.JSX.Element;
12
13
  export {};
@@ -6,4 +6,4 @@ export type CustomSelectOptionProps = {
6
6
  icon?: React.ReactElement;
7
7
  } & SelectOptionType;
8
8
  };
9
- export declare const CustomSelectOption: ({ data }: CustomSelectOptionProps) => JSX.Element;
9
+ export declare const CustomSelectOption: ({ data }: CustomSelectOptionProps) => React.JSX.Element;
@@ -1,3 +1,4 @@
1
+ import React from 'react';
1
2
  import { SelectProps } from '@gravity-ui/uikit';
2
3
  import { SelectItem } from '../Controls/Controls';
3
4
  import './CustomSwitcher.css';
@@ -8,5 +9,5 @@ export type CustomSwitcherProps = {
8
9
  list: SelectItem[];
9
10
  controlRef: RenderControlParameters['ref'];
10
11
  } & Omit<RenderControlParameters, 'ref'>;
11
- export declare const CustomSwitcher: ({ initial, defaultLabel, list, onClick, controlRef, }: CustomSwitcherProps) => JSX.Element;
12
+ export declare const CustomSwitcher: ({ initial, defaultLabel, list, onClick, controlRef, }: CustomSwitcherProps) => React.JSX.Element;
12
13
  export {};
@@ -1,3 +1,4 @@
1
+ import React from 'react';
1
2
  import { PaginatorProps } from './types';
2
3
  import './Paginator.css';
3
- export declare const Paginator: ({ itemsPerPage, totalItems, maxPages, page, className, onPageChange, pageCountForShowSupportButtons, }: PaginatorProps) => JSX.Element | null;
4
+ export declare const Paginator: ({ itemsPerPage, totalItems, maxPages, page, className, onPageChange, pageCountForShowSupportButtons, }: PaginatorProps) => React.JSX.Element | null;
@@ -1,7 +1,8 @@
1
+ import React from 'react';
1
2
  import { ArrowType } from '../types';
2
3
  import '../Paginator.css';
3
4
  export type NavigationButtonProps = {
4
5
  arrowType: ArrowType;
5
6
  disabled?: boolean;
6
7
  };
7
- export declare const NavigationButton: ({ arrowType, disabled }: NavigationButtonProps) => JSX.Element | null;
8
+ export declare const NavigationButton: ({ arrowType, disabled }: NavigationButtonProps) => React.JSX.Element | null;
@@ -1,3 +1,4 @@
1
+ import React from 'react';
1
2
  import { PaginatorItemProps } from '../types';
2
3
  import '../Paginator.css';
3
- export declare const PaginatorItem: ({ dataKey, mods, content, onClick, loading, index, }: PaginatorItemProps) => JSX.Element;
4
+ export declare const PaginatorItem: ({ dataKey, mods, content, onClick, loading, index, }: PaginatorItemProps) => React.JSX.Element;
@@ -1,3 +1,4 @@
1
+ import React from 'react';
1
2
  import { ButtonProps } from '@gravity-ui/uikit';
2
3
  import './Prompt.css';
3
4
  export interface PromptProps {
@@ -15,4 +16,4 @@ export interface PromptProps {
15
16
  * - `openTimestamp` (`Date.now()`) resets the visible duration
16
17
  * @returns {JSX|null}
17
18
  */
18
- export declare const Prompt: ({ text, actions, className, openTimestamp, openDuration, theme, }: PromptProps) => JSX.Element;
19
+ export declare const Prompt: ({ text, actions, className, openTimestamp, openDuration, theme, }: PromptProps) => React.JSX.Element;
@@ -11,6 +11,7 @@ var __rest = (this && this.__rest) || function (s, e) {
11
11
  };
12
12
  import React from 'react';
13
13
  import { Button } from '@gravity-ui/uikit';
14
+ import { useHover } from '../../hooks/useHover';
14
15
  import { useOpenCloseTimer } from '../../hooks/useOpenCloseTimer';
15
16
  import { block } from '../../utils/cn';
16
17
  import './Prompt.css';
@@ -23,10 +24,12 @@ const b = block('prompt');
23
24
  * @returns {JSX|null}
24
25
  */
25
26
  export const Prompt = ({ text, actions, className, openTimestamp = 0, openDuration, theme, }) => {
26
- const { open } = useOpenCloseTimer(openTimestamp, openDuration);
27
+ const [ref, hovering] = useHover();
28
+ const { open: isOpen } = useOpenCloseTimer(openTimestamp, openDuration);
29
+ const open = isOpen || hovering;
27
30
  const mounted = openTimestamp > 0;
28
31
  return (React.createElement("div", { className: b({ theme, open, close: !open, mounted }, className) },
29
- React.createElement("div", { className: b('content') },
32
+ React.createElement("div", { className: b('content'), ref: ref },
30
33
  React.createElement("span", { className: b('text') }, text),
31
34
  React.createElement("div", { className: b('actions') }, actions.map((_a, i) => {
32
35
  var { view = 'action', className: btnClass } = _a, btnProps = __rest(_a, ["view", "className"]);
@@ -7,4 +7,4 @@ export interface PromptSignInProps extends Partial<PromptProps> {
7
7
  * Authentication Popup that appears when user action requires login
8
8
  * @returns {JSX|null}
9
9
  */
10
- export declare const PromptSignIn: ({ text, onClickSignIn, actions, ...props }: PromptSignInProps) => JSX.Element;
10
+ export declare const PromptSignIn: ({ text, onClickSignIn, actions, ...props }: PromptSignInProps) => React.JSX.Element;
@@ -18,4 +18,4 @@ export type BlogPageProps = {
18
18
  isSignedInUser?: boolean;
19
19
  onClickSignIn?: React.EventHandler<SyntheticEvent>;
20
20
  };
21
- export declare const BlogPage: ({ content, posts, tags, services, getPosts, metaData, hasLikes, toggleLike, navigation, settings, pageCountForShowSupportButtons, isSignedInUser, onClickSignIn, }: BlogPageProps) => JSX.Element;
21
+ export declare const BlogPage: ({ content, posts, tags, services, getPosts, metaData, hasLikes, toggleLike, navigation, settings, pageCountForShowSupportButtons, isSignedInUser, onClickSignIn, }: BlogPageProps) => React.JSX.Element;
@@ -17,7 +17,7 @@ export declare class ThemeProvider extends React.Component<ThemeProviderExternal
17
17
  state: ThemeProviderState;
18
18
  componentDidMount(): void;
19
19
  componentDidUpdate(prevProps: ThemeProviderProps, prevState: ThemeProviderState): void;
20
- render(): JSX.Element;
20
+ render(): React.JSX.Element;
21
21
  private updateBodyClassName;
22
22
  }
23
23
  export {};
@@ -0,0 +1,11 @@
1
+ /* use this for style redefinitions to awoid problems with
2
+ unpredictable css rules order in build */
3
+ .docs-decorator.docs-decorator.docs-decorator.docs-decorator.docs-decorator .sbdocs-wrapper {
4
+ padding: 0 40px;
5
+ }
6
+ .docs-decorator.docs-decorator.docs-decorator.docs-decorator.docs-decorator .sbdocs-content {
7
+ max-width: 1680px;
8
+ }
9
+ .docs-decorator.docs-decorator.docs-decorator.docs-decorator.docs-decorator .innerZoomElementWrapper {
10
+ overflow: hidden;
11
+ }
@@ -0,0 +1,5 @@
1
+ import React from 'react';
2
+ export declare function useHover<T extends HTMLElement = HTMLElement>(): [
3
+ ref: React.RefObject<T>,
4
+ hovering: boolean
5
+ ];
@@ -0,0 +1,28 @@
1
+ import React from 'react';
2
+ /*
3
+ * Source code copied from https://github.com/uidotdev/usehooks | MIT License
4
+ * @see https://usehooks.com/usehover
5
+ */
6
+ export function useHover() {
7
+ const [hovering, setHovering] = React.useState(false);
8
+ const ref = React.useRef(null);
9
+ React.useEffect(() => {
10
+ const node = ref.current;
11
+ if (!node)
12
+ return;
13
+ const handleMouseEnter = () => {
14
+ setHovering(true);
15
+ };
16
+ const handleMouseLeave = () => {
17
+ setHovering(false);
18
+ };
19
+ node.addEventListener('mouseenter', handleMouseEnter);
20
+ node.addEventListener('mouseleave', handleMouseLeave);
21
+ // eslint-disable-next-line consistent-return
22
+ return () => {
23
+ node.removeEventListener('mouseenter', handleMouseEnter);
24
+ node.removeEventListener('mouseleave', handleMouseLeave);
25
+ };
26
+ }, []);
27
+ return [ref, hovering];
28
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gravity-ui/blog-constructor",
3
- "version": "4.2.1",
3
+ "version": "4.3.0",
4
4
  "description": "Gravity UI Blog Constructor",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -35,8 +35,8 @@
35
35
  "start": "node dist",
36
36
  "clean": "gulp clean",
37
37
  "build": "npm run clean && gulp",
38
- "storybook:start": "TS_NODE_PROJECT=.storybook/tsconfig.json start-storybook -p 7010",
39
- "storybook:build": "TS_NODE_PROJECT=.storybook/tsconfig.json build-storybook -c .storybook -o storybook-static .storybook/public",
38
+ "storybook:start": "TS_NODE_PROJECT=.storybook/tsconfig.json sb dev -p 7010",
39
+ "storybook:build": "TS_NODE_PROJECT=.storybook/tsconfig.json sb build -c .storybook -o storybook-static",
40
40
  "prepublishOnly": "npm run lint && npm run build",
41
41
  "prepare": "husky install",
42
42
  "svgo": "svgo --config svgo.config.js",
@@ -64,12 +64,14 @@
64
64
  },
65
65
  "peerDependencies": {
66
66
  "@doc-tools/transform": "^2.9.0",
67
- "@gravity-ui/uikit": "^4.1.0",
68
67
  "@gravity-ui/page-constructor": "^3.1.1",
68
+ "@gravity-ui/uikit": "^4.1.0",
69
69
  "react": "^16.0.0 || ^17.0.0 || ^18.0.0"
70
70
  },
71
71
  "devDependencies": {
72
- "@babel/core": "^7.15.8",
72
+ "@babel/preset-env": "^7.22.9",
73
+ "@babel/preset-react": "^7.22.5",
74
+ "@babel/preset-typescript": "^7.22.5",
73
75
  "@commitlint/config-conventional": "^17.4.3",
74
76
  "@doc-tools/transform": "^2.9.0",
75
77
  "@gravity-ui/eslint-config": "^2.0.0",
@@ -78,12 +80,11 @@
78
80
  "@gravity-ui/stylelint-config": "^1.0.0",
79
81
  "@gravity-ui/tsconfig": "^1.0.0",
80
82
  "@gravity-ui/uikit": "^4.4.0",
81
- "@storybook/addon-actions": "^6.3.12",
82
- "@storybook/addon-controls": "^6.5.16",
83
- "@storybook/addon-essentials": "^6.5.10",
84
- "@storybook/addon-viewport": "^6.3.12",
83
+ "@storybook/addon-essentials": "^7.0.27",
84
+ "@storybook/cli": "^7.0.27",
85
85
  "@storybook/preset-scss": "^1.0.3",
86
- "@storybook/react": "^6.5.10",
86
+ "@storybook/react": "^7.0.27",
87
+ "@storybook/react-webpack5": "^7.0.27",
87
88
  "@testing-library/jest-dom": "^5.16.5",
88
89
  "@testing-library/react": "^14.0.0",
89
90
  "@testing-library/user-event": "^14.4.3",
@@ -112,8 +113,6 @@
112
113
  "jest-transform-css": "^6.0.1",
113
114
  "js-yaml": "^3.14.1",
114
115
  "lint-staged": "^11.2.6",
115
- "markdown-loader": "^6.0.0",
116
- "move-file-cli": "^3.0.0",
117
116
  "npm-run-all": "^4.1.5",
118
117
  "postcss": "^8.4.14",
119
118
  "prettier": "2.4.1",
@@ -121,13 +120,11 @@
121
120
  "react-dom": "^18.2.0",
122
121
  "rimraf": "^3.0.2",
123
122
  "sass": "^1.54.4",
124
- "sass-loader": "^10.3.1",
123
+ "sass-loader": "^13.3.1",
124
+ "storybook": "^7.0.27",
125
125
  "stylelint": "^14.11.0",
126
- "stylelint-scss": "^4.0.0",
127
- "svg-sprite-loader": "^6.0.11",
128
126
  "ts-jest": "^29.0.5",
129
- "typescript": "^4.9.3",
130
- "webpack": "^4.46.0"
127
+ "typescript": "^4.9.3"
131
128
  },
132
129
  "lint-staged": {
133
130
  "*.{css,scss}": [
package/CHANGELOG.md DELETED
@@ -1,223 +0,0 @@
1
- # Changelog
2
-
3
- ## [4.2.1](https://github.com/gravity-ui/blog-constructor/compare/v4.2.0...v4.2.1) (2023-07-07)
4
-
5
-
6
- ### Bug Fixes
7
-
8
- * prompt-sign-in-on-like for blog post pages ([#75](https://github.com/gravity-ui/blog-constructor/issues/75)) ([1862306](https://github.com/gravity-ui/blog-constructor/commit/186230610d13e4c31bfd4bbbb52128b23e81bf39))
9
-
10
- ## [4.2.0](https://github.com/gravity-ui/blog-constructor/compare/v4.1.2...v4.2.0) (2023-06-28)
11
-
12
-
13
- ### Features
14
-
15
- * update page constructor version ([#73](https://github.com/gravity-ui/blog-constructor/issues/73)) ([2d46b27](https://github.com/gravity-ui/blog-constructor/commit/2d46b27c1e2550ebaa9da4c2eb7a873cdda66ca6))
16
-
17
- ## [4.1.2](https://github.com/gravity-ui/blog-constructor/compare/v4.1.1...v4.1.2) (2023-06-23)
18
-
19
-
20
- ### Bug Fixes
21
-
22
- * semantic markup ([#71](https://github.com/gravity-ui/blog-constructor/issues/71)) ([fb18afd](https://github.com/gravity-ui/blog-constructor/commit/fb18afd3d38d2bdb81b71e83608f54b90874f9e1))
23
-
24
- ## [4.1.1](https://github.com/gravity-ui/blog-constructor/compare/v4.1.0...v4.1.1) (2023-06-14)
25
-
26
-
27
- ### Bug Fixes
28
-
29
- * fix react peer ([#69](https://github.com/gravity-ui/blog-constructor/issues/69)) ([26cf1b1](https://github.com/gravity-ui/blog-constructor/commit/26cf1b1df1d49455b764841c6b3065dc7f64858d))
30
-
31
- ## [4.1.0](https://github.com/gravity-ui/blog-constructor/compare/v4.0.0...v4.1.0) (2023-06-08)
32
-
33
-
34
- ### Features
35
-
36
- * Prompt Sign In on Post Like ([#57](https://github.com/gravity-ui/blog-constructor/issues/57)) ([216cd9b](https://github.com/gravity-ui/blog-constructor/commit/216cd9b1accab047a46d7404f007623f56f1590e))
37
-
38
-
39
- ### Bug Fixes
40
-
41
- * update peer ([#67](https://github.com/gravity-ui/blog-constructor/issues/67)) ([da2cbac](https://github.com/gravity-ui/blog-constructor/commit/da2cbac4d02017c4d3f9ff49108ba163b9a7867b))
42
-
43
- ## [4.0.0](https://github.com/gravity-ui/blog-constructor/compare/v3.5.0...v4.0.0) (2023-06-07)
44
-
45
-
46
- ### ⚠ BREAKING CHANGES
47
-
48
- * install page-constructor@3 and refactor transform content ([#54](https://github.com/gravity-ui/blog-constructor/issues/54)) (#60)
49
-
50
- ### Features
51
-
52
- * install page-constructor@3 and refactor transform content ([#54](https://github.com/gravity-ui/blog-constructor/issues/54)) ([#60](https://github.com/gravity-ui/blog-constructor/issues/60)) ([26bf452](https://github.com/gravity-ui/blog-constructor/commit/26bf452419f9c01bd0e550fa857715665fe38cd2))
53
-
54
- ## [3.5.0](https://github.com/gravity-ui/blog-constructor/compare/v3.4.1...v3.5.0) (2023-06-07)
55
-
56
-
57
- ### Features
58
-
59
- * update page-constructor in second major ([#63](https://github.com/gravity-ui/blog-constructor/issues/63)) ([95d2fb8](https://github.com/gravity-ui/blog-constructor/commit/95d2fb88a13e4371bc4d6e603a3835790f1ffb4f))
60
-
61
- ## [3.4.1](https://github.com/gravity-ui/blog-constructor/compare/v3.4.0...v3.4.1) (2023-05-30)
62
-
63
-
64
- ### Bug Fixes
65
-
66
- * return js, jsx files to gulpfile.js ([#58](https://github.com/gravity-ui/blog-constructor/issues/58)) ([d5e4c42](https://github.com/gravity-ui/blog-constructor/commit/d5e4c428e8eae56fd7ab381c2969c04955adc45b))
67
-
68
- ## [3.4.0](https://github.com/gravity-ui/blog-constructor/compare/v3.3.0...v3.4.0) (2023-05-24)
69
-
70
-
71
- ### Features
72
-
73
- * new loading UI (shimmer) ([#50](https://github.com/gravity-ui/blog-constructor/issues/50)) ([ccdf08c](https://github.com/gravity-ui/blog-constructor/commit/ccdf08ccc62dd9930ab8c994601c787b03897f05))
74
-
75
- ## [3.3.0](https://github.com/gravity-ui/blog-constructor/compare/v3.2.1...v3.3.0) (2023-05-16)
76
-
77
-
78
- ### Features
79
-
80
- * add md breackpoint to cta-block ([#45](https://github.com/gravity-ui/blog-constructor/issues/45)) ([e859b0b](https://github.com/gravity-ui/blog-constructor/commit/e859b0b02e80b20eb0b4496e2c4834fb2de74922))
81
-
82
- ## [3.2.1](https://github.com/gravity-ui/blog-constructor/compare/v3.2.0...v3.2.1) (2023-05-16)
83
-
84
-
85
- ### Bug Fixes
86
-
87
- * add settings context to add a tag for pagination ([#47](https://github.com/gravity-ui/blog-constructor/issues/47)) ([0856675](https://github.com/gravity-ui/blog-constructor/commit/0856675316425c9a690664a99d30d2af63e116ca))
88
-
89
- ## [3.2.0](https://github.com/gravity-ui/blog-constructor/compare/v3.1.1...v3.2.0) (2023-05-15)
90
-
91
-
92
- ### Features
93
-
94
- * create schemas ([#41](https://github.com/gravity-ui/blog-constructor/issues/41)) ([f4f28f3](https://github.com/gravity-ui/blog-constructor/commit/f4f28f367db6d18588602d734623863ccfea1a01))
95
-
96
- ## [3.1.1](https://github.com/gravity-ui/blog-constructor/compare/v3.1.0...v3.1.1) (2023-05-11)
97
-
98
-
99
- ### Bug Fixes
100
-
101
- * add specificity to headings ([#43](https://github.com/gravity-ui/blog-constructor/issues/43)) ([de53d0b](https://github.com/gravity-ui/blog-constructor/commit/de53d0bb9a697f520626e8c0b1d8c48c8e4d8a64))
102
- * change href 'prev' to 'blog' and 'next' to page+1 ([#42](https://github.com/gravity-ui/blog-constructor/issues/42)) ([cb8b810](https://github.com/gravity-ui/blog-constructor/commit/cb8b8102d59368cfa0d285d63604a8e9f1ab6619))
103
-
104
- ## [3.1.0](https://github.com/gravity-ui/blog-constructor/compare/v3.0.2...v3.1.0) (2023-04-25)
105
-
106
-
107
- ### Features
108
-
109
- * remove user context ([#35](https://github.com/gravity-ui/blog-constructor/issues/35)) ([36e7112](https://github.com/gravity-ui/blog-constructor/commit/36e71123b515886f28722b08552d538b8f038a87))
110
-
111
- ## [3.0.2](https://github.com/gravity-ui/blog-constructor/compare/v3.0.1...v3.0.2) (2023-04-25)
112
-
113
-
114
- ### Bug Fixes
115
-
116
- * dump other queries when toggle savedOnly button ([#37](https://github.com/gravity-ui/blog-constructor/issues/37)) ([57ca01a](https://github.com/gravity-ui/blog-constructor/commit/57ca01a35736d7bd94711ed70887e7eb8cbaf0f4))
117
-
118
- ## [3.0.1](https://github.com/gravity-ui/blog-constructor/compare/v3.0.0...v3.0.1) (2023-04-24)
119
-
120
-
121
- ### Bug Fixes
122
-
123
- * rewrap pagination item ([#36](https://github.com/gravity-ui/blog-constructor/issues/36)) ([a3a56b2](https://github.com/gravity-ui/blog-constructor/commit/a3a56b2d4519871427de1e42267ce18736f7f7b1))
124
-
125
- ## [3.0.0](https://github.com/gravity-ui/blog-constructor/compare/v2.3.0...v3.0.0) (2023-04-10)
126
-
127
-
128
- ### ⚠ BREAKING CHANGES
129
-
130
- * add callback prop for blog page ([#25](https://github.com/gravity-ui/blog-constructor/issues/25))
131
-
132
- ### Features
133
-
134
- * add callback prop for blog page ([#25](https://github.com/gravity-ui/blog-constructor/issues/25)) ([7b1ab2c](https://github.com/gravity-ui/blog-constructor/commit/7b1ab2c12aa9ef4f8e5a11853508a9b439a196d7))
135
-
136
- ## [2.3.0](https://github.com/gravity-ui/blog-constructor/compare/v2.2.0...v2.3.0) (2023-04-10)
137
-
138
-
139
- ### Features
140
-
141
- * analytics refactoring ([#13](https://github.com/gravity-ui/blog-constructor/issues/13)) ([a95c55b](https://github.com/gravity-ui/blog-constructor/commit/a95c55bd1ff98f86a110f33ac3275b590ee5db8e))
142
-
143
-
144
- ### Bug Fixes
145
-
146
- * margin-top of header ([#31](https://github.com/gravity-ui/blog-constructor/issues/31)) ([97ed974](https://github.com/gravity-ui/blog-constructor/commit/97ed974ab0ce0546010d60587b21b8c0eee3279c))
147
-
148
- ## [2.2.0](https://github.com/gravity-ui/blog-constructor/compare/v2.1.0...v2.2.0) (2023-04-06)
149
-
150
-
151
- ### Features
152
-
153
- * update linters ([#24](https://github.com/gravity-ui/blog-constructor/issues/24)) ([bc5aa0f](https://github.com/gravity-ui/blog-constructor/commit/bc5aa0f72e64b916acaf692874482ccdae3f94e9))
154
-
155
- ## [2.1.0](https://github.com/gravity-ui/blog-constructor/compare/v2.0.2...v2.1.0) (2023-04-06)
156
-
157
-
158
- ### Features
159
-
160
- * 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))
161
-
162
- ## [2.0.2](https://github.com/gravity-ui/blog-constructor/compare/v2.0.1...v2.0.2) (2023-04-05)
163
-
164
-
165
- ### Bug Fixes
166
-
167
- * 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))
168
-
169
- ## [2.0.1](https://github.com/gravity-ui/blog-constructor/compare/v2.0.0...v2.0.1) (2023-04-04)
170
-
171
-
172
- ### Bug Fixes
173
-
174
- * 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))
175
- * 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))
176
-
177
- ## [2.0.0](https://github.com/gravity-ui/blog-constructor/compare/v1.1.2...v2.0.0) (2023-04-03)
178
-
179
-
180
- ### ⚠ BREAKING CHANGES
181
-
182
- * update uikit up to 4 ([#11](https://github.com/gravity-ui/blog-constructor/issues/11))
183
-
184
- ### Features
185
-
186
- * 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))
187
-
188
- ## [1.1.2](https://github.com/gravity-ui/blog-constructor/compare/v1.1.1...v1.1.2) (2023-03-28)
189
-
190
-
191
- ### Bug Fixes
192
-
193
- * add info about release ([#19](https://github.com/gravity-ui/blog-constructor/issues/19)) ([8a5824f](https://github.com/gravity-ui/blog-constructor/commit/8a5824f24c4ad85f0f122111f8f5c1e7c36becc5))
194
-
195
- ## [1.1.1](https://github.com/gravity-ui/blog-constructor/compare/v1.1.0...v1.1.1) (2023-03-28)
196
-
197
-
198
- ### Bug Fixes
199
-
200
- * 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))
201
-
202
- ## 1.1.0 (2023-03-28)
203
-
204
- ### Features
205
-
206
- - 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))
207
- - 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))
208
- - export author type ([9e5ee34](https://github.com/gravity-ui/blog-constructor/commit/9e5ee34c6b4d1b3288cda1258160e22073f9ad9d))
209
- - fix button savedOnly color ([#9](https://github.com/gravity-ui/blog-constructor/issues/9)) ([ef3b1ca](https://github.com/gravity-ui/blog-constructor/commit/ef3b1ca9048f1218817ec5c9c6a5b3e05492f062))
210
- - init tests ([#1](https://github.com/gravity-ui/blog-constructor/issues/1)) ([f8df32f](https://github.com/gravity-ui/blog-constructor/commit/f8df32f3eccb97abc7bfef222aca1ea56421619b))
211
- - **navigation:** pass the PageConstructor's navigation prop ([cb875ff](https://github.com/gravity-ui/blog-constructor/commit/cb875ff708832f5dd9e121d67cfccb387ae2499f))
212
- - uninstall doctools/components ([#14](https://github.com/gravity-ui/blog-constructor/issues/14)) ([16dc64c](https://github.com/gravity-ui/blog-constructor/commit/16dc64c3002b614831880dbe5b250c5637031c7d))
213
- - update license ([#3](https://github.com/gravity-ui/blog-constructor/issues/3)) ([aa4ee5b](https://github.com/gravity-ui/blog-constructor/commit/aa4ee5bdd01a7db5f6c6c457836658761eee1099))
214
- - update readme ([#15](https://github.com/gravity-ui/blog-constructor/issues/15)) ([3dbdf78](https://github.com/gravity-ui/blog-constructor/commit/3dbdf78b35f93024bebbcf64a6f06fb01509ae3e))
215
-
216
- ### Bug Fixes
217
-
218
- - **general:** better deps ([8c22384](https://github.com/gravity-ui/blog-constructor/commit/8c223848e47faf8b9beee6700afce317359ee226))
219
- - search input width ([051c145](https://github.com/gravity-ui/blog-constructor/commit/051c14502110306964c4ec9a2bea47cea9364db5))
220
-
221
- ## 1.0.0
222
-
223
- Create public access for blog-constructor library for creating blog format web pages.