@gravity-ui/blog-constructor 2.0.0-alpha.1 → 2.0.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.
- package/CHANGELOG.md +28 -210
- package/README.md +63 -1
- package/build/cjs/blocks/YFM/__tests__/YFM.test.d.ts +1 -0
- package/build/cjs/blocks/YFM/__tests__/YFM.test.js +16 -0
- package/build/cjs/components/FeedHeader/components/Controls/Controls.css +12 -4
- package/build/cjs/models/blocks.d.ts +0 -1
- package/build/esm/blocks/YFM/__tests__/YFM.test.d.ts +1 -0
- package/build/esm/blocks/YFM/__tests__/YFM.test.js +11 -0
- package/build/esm/components/FeedHeader/components/Controls/Controls.css +12 -4
- package/build/esm/models/blocks.d.ts +0 -1
- package/package.json +38 -34
- package/server/models/blocks.d.ts +0 -1
- package/styles/mixins.scss +0 -10
- package/styles/storybook/index.scss +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,231 +1,49 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Changelog
|
|
2
2
|
|
|
3
|
-
## 0.
|
|
3
|
+
## [2.0.0](https://github.com/gravity-ui/blog-constructor/compare/v1.1.2...v2.0.0) (2023-04-03)
|
|
4
4
|
|
|
5
|
-
- Rewrite storybook on ts
|
|
6
5
|
|
|
7
|
-
|
|
6
|
+
### ⚠ BREAKING CHANGES
|
|
8
7
|
|
|
9
|
-
|
|
8
|
+
* update uikit up to 4 ([#11](https://github.com/gravity-ui/blog-constructor/issues/11))
|
|
10
9
|
|
|
11
|
-
|
|
10
|
+
### Features
|
|
12
11
|
|
|
13
|
-
|
|
12
|
+
* 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))
|
|
14
13
|
|
|
15
|
-
-
|
|
16
|
-
- Update react to 18.2.0
|
|
17
|
-
- Update TS to 4.9.3
|
|
14
|
+
## [1.1.2](https://github.com/gravity-ui/blog-constructor/compare/v1.1.1...v1.1.2) (2023-03-28)
|
|
18
15
|
|
|
19
|
-
## 0.18.1
|
|
20
16
|
|
|
21
|
-
|
|
17
|
+
### Bug Fixes
|
|
22
18
|
|
|
23
|
-
|
|
19
|
+
* add info about release ([#19](https://github.com/gravity-ui/blog-constructor/issues/19)) ([8a5824f](https://github.com/gravity-ui/blog-constructor/commit/8a5824f24c4ad85f0f122111f8f5c1e7c36becc5))
|
|
24
20
|
|
|
25
|
-
|
|
21
|
+
## [1.1.1](https://github.com/gravity-ui/blog-constructor/compare/v1.1.0...v1.1.1) (2023-03-28)
|
|
26
22
|
|
|
27
|
-
- Refactor naming
|
|
28
23
|
|
|
29
|
-
|
|
24
|
+
### Bug Fixes
|
|
30
25
|
|
|
31
|
-
|
|
26
|
+
* 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))
|
|
32
27
|
|
|
33
|
-
##
|
|
28
|
+
## 1.1.0 (2023-03-28)
|
|
34
29
|
|
|
35
|
-
|
|
30
|
+
### Features
|
|
36
31
|
|
|
37
|
-
|
|
32
|
+
- 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))
|
|
33
|
+
- 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))
|
|
34
|
+
- export author type ([9e5ee34](https://github.com/gravity-ui/blog-constructor/commit/9e5ee34c6b4d1b3288cda1258160e22073f9ad9d))
|
|
35
|
+
- fix button savedOnly color ([#9](https://github.com/gravity-ui/blog-constructor/issues/9)) ([ef3b1ca](https://github.com/gravity-ui/blog-constructor/commit/ef3b1ca9048f1218817ec5c9c6a5b3e05492f062))
|
|
36
|
+
- init tests ([#1](https://github.com/gravity-ui/blog-constructor/issues/1)) ([f8df32f](https://github.com/gravity-ui/blog-constructor/commit/f8df32f3eccb97abc7bfef222aca1ea56421619b))
|
|
37
|
+
- **navigation:** pass the PageConstructor's navigation prop ([cb875ff](https://github.com/gravity-ui/blog-constructor/commit/cb875ff708832f5dd9e121d67cfccb387ae2499f))
|
|
38
|
+
- uninstall doctools/components ([#14](https://github.com/gravity-ui/blog-constructor/issues/14)) ([16dc64c](https://github.com/gravity-ui/blog-constructor/commit/16dc64c3002b614831880dbe5b250c5637031c7d))
|
|
39
|
+
- update license ([#3](https://github.com/gravity-ui/blog-constructor/issues/3)) ([aa4ee5b](https://github.com/gravity-ui/blog-constructor/commit/aa4ee5bdd01a7db5f6c6c457836658761eee1099))
|
|
40
|
+
- update readme ([#15](https://github.com/gravity-ui/blog-constructor/issues/15)) ([3dbdf78](https://github.com/gravity-ui/blog-constructor/commit/3dbdf78b35f93024bebbcf64a6f06fb01509ae3e))
|
|
38
41
|
|
|
39
|
-
|
|
42
|
+
### Bug Fixes
|
|
40
43
|
|
|
41
|
-
|
|
44
|
+
- **general:** better deps ([8c22384](https://github.com/gravity-ui/blog-constructor/commit/8c223848e47faf8b9beee6700afce317359ee226))
|
|
45
|
+
- search input width ([051c145](https://github.com/gravity-ui/blog-constructor/commit/051c14502110306964c4ec9a2bea47cea9364db5))
|
|
42
46
|
|
|
43
|
-
|
|
47
|
+
## 1.0.0
|
|
44
48
|
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
- Do not show pointer cursor on save button title hover when the button is not clickable
|
|
48
|
-
|
|
49
|
-
## 0.15.0
|
|
50
|
-
|
|
51
|
-
- Prevent save button to be clickable when user is not logged in
|
|
52
|
-
|
|
53
|
-
## 0.14.0
|
|
54
|
-
|
|
55
|
-
- Refactor metaProps in BlogPostPage
|
|
56
|
-
|
|
57
|
-
## 0.13.0
|
|
58
|
-
|
|
59
|
-
- Remove temporal flag of icon selection
|
|
60
|
-
|
|
61
|
-
## 0.12.4
|
|
62
|
-
|
|
63
|
-
- Prevent collapse of a custom switcher on a blog feed
|
|
64
|
-
|
|
65
|
-
## 0.12.2
|
|
66
|
-
|
|
67
|
-
- Update types for getBlogPosts handler
|
|
68
|
-
|
|
69
|
-
## 0.12.1
|
|
70
|
-
|
|
71
|
-
- Render post card title via dangerouslySetInnerHTML
|
|
72
|
-
|
|
73
|
-
## 0.12.0
|
|
74
|
-
|
|
75
|
-
- Update page change logic when interactions with blog search panel
|
|
76
|
-
|
|
77
|
-
## 0.11.1
|
|
78
|
-
|
|
79
|
-
- **BlogYFM**: add `yfm_no-list-reset` class
|
|
80
|
-
|
|
81
|
-
## 0.11.0
|
|
82
|
-
|
|
83
|
-
- Refactor styles (kebab, prefix, variables)
|
|
84
|
-
|
|
85
|
-
## 0.10.2
|
|
86
|
-
|
|
87
|
-
- Add teamcity publish
|
|
88
|
-
|
|
89
|
-
## 0.10.1
|
|
90
|
-
|
|
91
|
-
- BlogPostTag types became Partial, BlogPostTagExtended is deleted
|
|
92
|
-
|
|
93
|
-
## 0.10.0
|
|
94
|
-
|
|
95
|
-
- add props for show support buttons in paginator
|
|
96
|
-
|
|
97
|
-
## 0.9.2
|
|
98
|
-
|
|
99
|
-
- added yfm headers weight style
|
|
100
|
-
|
|
101
|
-
## 0.9.1
|
|
102
|
-
|
|
103
|
-
- add specificity for search input styles
|
|
104
|
-
|
|
105
|
-
## 0.9.0
|
|
106
|
-
|
|
107
|
-
- add customization for sharing options in blog posts
|
|
108
|
-
|
|
109
|
-
## 0.8.0
|
|
110
|
-
|
|
111
|
-
- add BlogPage with gravity-ui requirements
|
|
112
|
-
|
|
113
|
-
## 0.7.1
|
|
114
|
-
|
|
115
|
-
- Add info about publish in readme
|
|
116
|
-
|
|
117
|
-
## 0.7.0
|
|
118
|
-
|
|
119
|
-
- Change packages @yandex-cloud => @gravity-ui
|
|
120
|
-
- Remove i18n from peer dependencies
|
|
121
|
-
|
|
122
|
-
## 0.6.30
|
|
123
|
-
|
|
124
|
-
- add BlogPage
|
|
125
|
-
|
|
126
|
-
## 0.5.10
|
|
127
|
-
|
|
128
|
-
- fix yfm styles for table
|
|
129
|
-
|
|
130
|
-
## 0.5.9
|
|
131
|
-
|
|
132
|
-
- fix yfm styles
|
|
133
|
-
|
|
134
|
-
## 0.5.8
|
|
135
|
-
|
|
136
|
-
- delete selection of blog structure
|
|
137
|
-
|
|
138
|
-
## 0.5.7
|
|
139
|
-
|
|
140
|
-
- color variables updates
|
|
141
|
-
|
|
142
|
-
## 0.5.6
|
|
143
|
-
|
|
144
|
-
- change transformPostTags() routine
|
|
145
|
-
|
|
146
|
-
## 0.5.5
|
|
147
|
-
|
|
148
|
-
- add page-constructor in peer-dependencies
|
|
149
|
-
|
|
150
|
-
## 0.5.3
|
|
151
|
-
|
|
152
|
-
- fix yfm styles: add css variables to be able to redefine styles in projects
|
|
153
|
-
|
|
154
|
-
## 0.5.2
|
|
155
|
-
|
|
156
|
-
- condition for likes in cards
|
|
157
|
-
|
|
158
|
-
## 0.5.1
|
|
159
|
-
|
|
160
|
-
- refactor LocaleContext
|
|
161
|
-
- refactor RouterContext
|
|
162
|
-
- now likes is not required props
|
|
163
|
-
|
|
164
|
-
## 0.4.3
|
|
165
|
-
|
|
166
|
-
- Back previously patch
|
|
167
|
-
|
|
168
|
-
## 0.4.2
|
|
169
|
-
|
|
170
|
-
- Fix meta
|
|
171
|
-
|
|
172
|
-
## 0.4.1
|
|
173
|
-
|
|
174
|
-
- Fix share button
|
|
175
|
-
- now region props is not required in TransformPageContentPropsType
|
|
176
|
-
|
|
177
|
-
## 0.4.0
|
|
178
|
-
|
|
179
|
-
- Add likes state update conditions
|
|
180
|
-
|
|
181
|
-
## 0.3.1
|
|
182
|
-
|
|
183
|
-
- Add metaData render condition
|
|
184
|
-
|
|
185
|
-
## 0.3.0
|
|
186
|
-
|
|
187
|
-
- Update props metaData
|
|
188
|
-
|
|
189
|
-
## 0.2.3
|
|
190
|
-
|
|
191
|
-
- Update types and namings
|
|
192
|
-
|
|
193
|
-
## 0.2.2
|
|
194
|
-
|
|
195
|
-
- Update styles
|
|
196
|
-
|
|
197
|
-
## 0.2.1
|
|
198
|
-
|
|
199
|
-
- Add default color for avatars (grey)
|
|
200
|
-
|
|
201
|
-
## 0.2.0
|
|
202
|
-
|
|
203
|
-
- Custom hook for likes
|
|
204
|
-
|
|
205
|
-
- Change props for BlogPostPage
|
|
206
|
-
- delete:
|
|
207
|
-
- data
|
|
208
|
-
- add:
|
|
209
|
-
- likes
|
|
210
|
-
- content
|
|
211
|
-
- post
|
|
212
|
-
|
|
213
|
-
## 0.1.0
|
|
214
|
-
|
|
215
|
-
- Refactor business-logic BlogSuggets
|
|
216
|
-
|
|
217
|
-
## 0.0.4
|
|
218
|
-
|
|
219
|
-
- Delete extra requirements
|
|
220
|
-
|
|
221
|
-
## 0.0.3
|
|
222
|
-
|
|
223
|
-
- Refactor BlogContextProvider
|
|
224
|
-
|
|
225
|
-
## 0.0.2
|
|
226
|
-
|
|
227
|
-
- Meta fixes
|
|
228
|
-
|
|
229
|
-
## 0.0.1
|
|
230
|
-
|
|
231
|
-
- Create first version including Blog Post Page
|
|
49
|
+
Create public access for blog-constructor library for creating blog format web pages.
|
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# @gravity-ui/blog-constructor ·
|
|
1
|
+
# @gravity-ui/blog-constructor · [](https://www.npmjs.com/package/@gravity-ui/blog-constructor) [](https://github.com/gravity-ui/blog-constructor/actions/workflows/ci.yml?query=branch:main) [](https://github.com/gravity-ui/blog-constructor/actions/workflows/release.yml?query=branch:main) [](https://preview.yandexcloud.dev/blog-constructor/)
|
|
2
2
|
|
|
3
3
|
## Install
|
|
4
4
|
|
|
@@ -6,6 +6,68 @@
|
|
|
6
6
|
npm install @gravity-ui/blog-constructor
|
|
7
7
|
```
|
|
8
8
|
|
|
9
|
+
## Blog-constructor
|
|
10
|
+
|
|
11
|
+
`Blog-constructor` is a library based on the [Page-constructor](https://github.com/gravity-ui/page-constructor) library for creating blog format web pages. Blog-constructor uses the [`custom`](https://github.com/gravity-ui/page-constructor#custom-blocks) prop from page-constructor to add the components needed for the blog.
|
|
12
|
+
|
|
13
|
+
### Documentation - [storybook](https://preview.yandexcloud.dev/blog-constructor/)
|
|
14
|
+
|
|
15
|
+
### Getting started
|
|
16
|
+
|
|
17
|
+
The blog-constructor has both client components and server components for import. The blog pages is imported as a React component. To make sure it runs properly, wrap it in `BlogConstructorProvider`:
|
|
18
|
+
|
|
19
|
+
```jsx
|
|
20
|
+
import {BlogPage, BlogConstructorProvider} from '@gravity-ui/blog-constructor';
|
|
21
|
+
|
|
22
|
+
// Main blog page
|
|
23
|
+
<BlogConstructorProvider {...providerProps}>
|
|
24
|
+
<BlogPage
|
|
25
|
+
content={content}
|
|
26
|
+
posts={posts}
|
|
27
|
+
tags={tags}
|
|
28
|
+
getPosts={handleGetPosts}
|
|
29
|
+
settings={settings}
|
|
30
|
+
/>
|
|
31
|
+
</BlogConstructorProvider>
|
|
32
|
+
|
|
33
|
+
---
|
|
34
|
+
|
|
35
|
+
import {BlogPostPage, BlogConstructorProvider} from '@gravity-ui/blog-constructor';
|
|
36
|
+
|
|
37
|
+
// Post page
|
|
38
|
+
<BlogConstructorProvider {...providerProps}>
|
|
39
|
+
<BlogPostPage
|
|
40
|
+
content={content}
|
|
41
|
+
post={post}
|
|
42
|
+
suggestedPosts={suggestedPosts}
|
|
43
|
+
settings={settings}
|
|
44
|
+
shareOptions={shareOptions}
|
|
45
|
+
/>
|
|
46
|
+
</BlogConstructorProvider>
|
|
47
|
+
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
Also blog-constructor have server components to help you transform your data if you need
|
|
51
|
+
|
|
52
|
+
```jsx
|
|
53
|
+
import {
|
|
54
|
+
transformPost,
|
|
55
|
+
sanitizeMeta,
|
|
56
|
+
createReadableContent,
|
|
57
|
+
transformPageContent,
|
|
58
|
+
} from '@gravity-ui/blog-constructor/server';
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
## i18n
|
|
62
|
+
|
|
63
|
+
To make sure the i18n library used in your project runs properly, perform its initialization and set the project's current locale value in `lang`. For example:
|
|
64
|
+
|
|
65
|
+
```typescript
|
|
66
|
+
import {configure, Lang} from '@gravity-ui/blog-constructor';
|
|
67
|
+
|
|
68
|
+
configure({lang: Lang.En});
|
|
69
|
+
```
|
|
70
|
+
|
|
9
71
|
## Development
|
|
10
72
|
|
|
11
73
|
```bash
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,16 @@
|
|
|
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
|
+
const react_1 = __importDefault(require("react"));
|
|
7
|
+
const react_2 = require("@testing-library/react");
|
|
8
|
+
const YFM_1 = require("../YFM");
|
|
9
|
+
const text = 'YFM block';
|
|
10
|
+
describe('YFM', () => {
|
|
11
|
+
test('Has id', async () => {
|
|
12
|
+
(0, react_2.render)(react_1.default.createElement(YFM_1.YFM, { text: text }));
|
|
13
|
+
const yfm = react_2.screen.getByText(text);
|
|
14
|
+
expect(yfm).toHaveClass('yfm');
|
|
15
|
+
});
|
|
16
|
+
});
|
|
@@ -46,6 +46,9 @@ unpredictable css rules order in build */
|
|
|
46
46
|
.bc-feed-controls__popup.bc-feed-controls__popup .g-select-list::-webkit-scrollbar {
|
|
47
47
|
display: none;
|
|
48
48
|
}
|
|
49
|
+
.bc-feed-controls__popup.bc-feed-controls__popup .g-select-list .yc-list {
|
|
50
|
+
max-height: calc(500px - var(--yc-text-body-3-line-height) - 12px);
|
|
51
|
+
}
|
|
49
52
|
.bc-feed-controls__popup.bc-feed-controls__popup .yc-list__item {
|
|
50
53
|
margin: 4px;
|
|
51
54
|
border-radius: 8px;
|
|
@@ -57,6 +60,9 @@ unpredictable css rules order in build */
|
|
|
57
60
|
.bc-feed-controls__popup.bc-feed-controls__popup .g-select-filter .yc-text-input__control.yc-text-input__control_type_input {
|
|
58
61
|
border: none;
|
|
59
62
|
}
|
|
63
|
+
.bc-feed-controls__popup.bc-feed-controls__popup .g-select-list_size_xl .g-select-list__option {
|
|
64
|
+
padding: 0 16px;
|
|
65
|
+
}
|
|
60
66
|
|
|
61
67
|
.bc-feed-controls__popup-filter .yc-text-input__control {
|
|
62
68
|
font-size: var(--yc-text-body-2-font-size);
|
|
@@ -74,12 +80,14 @@ unpredictable css rules order in build */
|
|
|
74
80
|
border-radius: 10px;
|
|
75
81
|
}
|
|
76
82
|
.bc-feed-controls__saved-only-button_savedOnly {
|
|
77
|
-
--yc-button-background-color: var(--pc-monochrome-button);
|
|
78
|
-
--yc-button-background-color-hover: var(--pc-monochrome-button-hover);
|
|
79
|
-
|
|
83
|
+
--yc-button-background-color: var(--pc-monochrome-button-background-color);
|
|
84
|
+
--yc-button-background-color-hover: var(--pc-monochrome-button-background-color-hover);
|
|
85
|
+
}
|
|
86
|
+
.bc-feed-controls__saved-only-button_savedOnly, .bc-feed-controls__saved-only-button_savedOnly:link, .bc-feed-controls__saved-only-button_savedOnly:visited, .bc-feed-controls__saved-only-button_savedOnly:active, .bc-feed-controls__saved-only-button_savedOnly:focus {
|
|
87
|
+
color: var(--pc-monochrome-button-color);
|
|
80
88
|
}
|
|
81
89
|
.bc-feed-controls__saved-only-button_savedOnly:hover {
|
|
82
|
-
color: var(--
|
|
90
|
+
color: var(--pc-monochrome-button-color);
|
|
83
91
|
}
|
|
84
92
|
.bc-feed-controls__saved-only-button_savedOnly:focus {
|
|
85
93
|
color: var(--yc-color-base-background);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { render, screen } from '@testing-library/react';
|
|
3
|
+
import { YFM } from '../YFM';
|
|
4
|
+
const text = 'YFM block';
|
|
5
|
+
describe('YFM', () => {
|
|
6
|
+
test('Has id', async () => {
|
|
7
|
+
render(React.createElement(YFM, { text: text }));
|
|
8
|
+
const yfm = screen.getByText(text);
|
|
9
|
+
expect(yfm).toHaveClass('yfm');
|
|
10
|
+
});
|
|
11
|
+
});
|
|
@@ -46,6 +46,9 @@ unpredictable css rules order in build */
|
|
|
46
46
|
.bc-feed-controls__popup.bc-feed-controls__popup .g-select-list::-webkit-scrollbar {
|
|
47
47
|
display: none;
|
|
48
48
|
}
|
|
49
|
+
.bc-feed-controls__popup.bc-feed-controls__popup .g-select-list .yc-list {
|
|
50
|
+
max-height: calc(500px - var(--yc-text-body-3-line-height) - 12px);
|
|
51
|
+
}
|
|
49
52
|
.bc-feed-controls__popup.bc-feed-controls__popup .yc-list__item {
|
|
50
53
|
margin: 4px;
|
|
51
54
|
border-radius: 8px;
|
|
@@ -57,6 +60,9 @@ unpredictable css rules order in build */
|
|
|
57
60
|
.bc-feed-controls__popup.bc-feed-controls__popup .g-select-filter .yc-text-input__control.yc-text-input__control_type_input {
|
|
58
61
|
border: none;
|
|
59
62
|
}
|
|
63
|
+
.bc-feed-controls__popup.bc-feed-controls__popup .g-select-list_size_xl .g-select-list__option {
|
|
64
|
+
padding: 0 16px;
|
|
65
|
+
}
|
|
60
66
|
|
|
61
67
|
.bc-feed-controls__popup-filter .yc-text-input__control {
|
|
62
68
|
font-size: var(--yc-text-body-2-font-size);
|
|
@@ -74,12 +80,14 @@ unpredictable css rules order in build */
|
|
|
74
80
|
border-radius: 10px;
|
|
75
81
|
}
|
|
76
82
|
.bc-feed-controls__saved-only-button_savedOnly {
|
|
77
|
-
--yc-button-background-color: var(--pc-monochrome-button);
|
|
78
|
-
--yc-button-background-color-hover: var(--pc-monochrome-button-hover);
|
|
79
|
-
|
|
83
|
+
--yc-button-background-color: var(--pc-monochrome-button-background-color);
|
|
84
|
+
--yc-button-background-color-hover: var(--pc-monochrome-button-background-color-hover);
|
|
85
|
+
}
|
|
86
|
+
.bc-feed-controls__saved-only-button_savedOnly, .bc-feed-controls__saved-only-button_savedOnly:link, .bc-feed-controls__saved-only-button_savedOnly:visited, .bc-feed-controls__saved-only-button_savedOnly:active, .bc-feed-controls__saved-only-button_savedOnly:focus {
|
|
87
|
+
color: var(--pc-monochrome-button-color);
|
|
80
88
|
}
|
|
81
89
|
.bc-feed-controls__saved-only-button_savedOnly:hover {
|
|
82
|
-
color: var(--
|
|
90
|
+
color: var(--pc-monochrome-button-color);
|
|
83
91
|
}
|
|
84
92
|
.bc-feed-controls__saved-only-button_savedOnly:focus {
|
|
85
93
|
color: var(--yc-color-base-background);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gravity-ui/blog-constructor",
|
|
3
|
-
"version": "2.0.0
|
|
3
|
+
"version": "2.0.0",
|
|
4
4
|
"description": "Gravity UI Blog Constructor",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -40,62 +40,54 @@
|
|
|
40
40
|
"prepublishOnly": "npm run lint && npm run build",
|
|
41
41
|
"prepare": "husky install",
|
|
42
42
|
"svgo": "svgo --config svgo.config.js",
|
|
43
|
-
"svgo:all": "svgo --config svgo.config.js -r -f assets"
|
|
43
|
+
"svgo:all": "svgo --config svgo.config.js -r -f assets",
|
|
44
|
+
"test": "jest --maxWorkers=50%",
|
|
45
|
+
"test:coverage": "jest --coverage",
|
|
46
|
+
"test:watch": "jest --watchAll --maxWorkers=25%"
|
|
44
47
|
},
|
|
45
48
|
"dependencies": {
|
|
46
49
|
"@gravity-ui/i18n": "^1.0.0",
|
|
47
|
-
"@gravity-ui/uikit": "^4.1.0",
|
|
48
|
-
"@types/fast-html-parser": "^1.0.2",
|
|
49
|
-
"@types/recompose": "^0.30.10",
|
|
50
50
|
"bem-cn-lite": "^4.0.0",
|
|
51
|
-
"fast-html-parser": "^1.0.1",
|
|
52
|
-
"gulp": "^4.0.2",
|
|
53
|
-
"gulp-dart-sass": "^1.0.2",
|
|
54
|
-
"gulp-rename": "^2.0.0",
|
|
55
|
-
"gulp-replace": "^1.1.3",
|
|
56
|
-
"gulp-typescript": "^6.0.0-alpha.1",
|
|
57
|
-
"html-loader": "^1.3.2",
|
|
58
|
-
"isomorphic-dompurify": "^0.20.0",
|
|
59
51
|
"lodash": "^4.17.21",
|
|
60
|
-
"markdown-loader": "^6.0.0",
|
|
61
52
|
"react-helmet": "^6.1.0",
|
|
62
53
|
"react-player": "^2.9.0",
|
|
63
|
-
"react-slick": "^0.
|
|
64
|
-
"react-spring": "
|
|
54
|
+
"react-slick": "^0.29.0",
|
|
55
|
+
"react-spring": "~9.6.0",
|
|
65
56
|
"react-transition-group": "^4.4.2",
|
|
66
57
|
"react-waypoint": "^10.1.0",
|
|
67
|
-
"recompose": "^0.30.0",
|
|
68
|
-
"rimraf": "^3.0.2",
|
|
69
58
|
"sanitize-html": "^2.6.1",
|
|
70
|
-
"sass": "^1.54.4",
|
|
71
59
|
"snakecase-keys": "^5.1.0",
|
|
72
60
|
"typograf": "^6.14.0",
|
|
73
61
|
"ua-parser-js": "^0.7.28",
|
|
74
62
|
"url": "^0.11.0",
|
|
75
|
-
"url-join": "^5.0.0"
|
|
76
|
-
"webpack": "^4.46.0"
|
|
63
|
+
"url-join": "^5.0.0"
|
|
77
64
|
},
|
|
78
65
|
"peerDependencies": {
|
|
79
|
-
"@doc-tools/
|
|
80
|
-
"@
|
|
81
|
-
"@gravity-ui/page-constructor": "^
|
|
82
|
-
"react": "^16.0.0 || ^17.0.0"
|
|
66
|
+
"@doc-tools/transform": "^2.9.0",
|
|
67
|
+
"@gravity-ui/uikit": "^4.1.0",
|
|
68
|
+
"@gravity-ui/page-constructor": "^2.2.1",
|
|
69
|
+
"react": "^16.0.0 || ^17.0.0 | ^18.0.0"
|
|
83
70
|
},
|
|
84
71
|
"devDependencies": {
|
|
85
72
|
"@babel/core": "^7.15.8",
|
|
86
|
-
"@
|
|
73
|
+
"@commitlint/config-conventional": "^17.4.3",
|
|
87
74
|
"@doc-tools/transform": "^2.9.0",
|
|
88
75
|
"@gravity-ui/eslint-config": "^1.0.2",
|
|
89
|
-
"@gravity-ui/page-constructor": "^
|
|
76
|
+
"@gravity-ui/page-constructor": "^2.2.1",
|
|
90
77
|
"@gravity-ui/prettier-config": "^1.0.1",
|
|
91
78
|
"@gravity-ui/stylelint-config": "^1.0.0",
|
|
92
79
|
"@gravity-ui/tsconfig": "^1.0.0",
|
|
80
|
+
"@gravity-ui/uikit": "^4.4.0",
|
|
93
81
|
"@storybook/addon-actions": "^6.3.12",
|
|
82
|
+
"@storybook/addon-controls": "^6.5.16",
|
|
94
83
|
"@storybook/addon-essentials": "^6.5.10",
|
|
95
|
-
"@storybook/addon-knobs": "^6.3.1",
|
|
96
84
|
"@storybook/addon-viewport": "^6.3.12",
|
|
97
85
|
"@storybook/preset-scss": "^1.0.3",
|
|
98
86
|
"@storybook/react": "^6.5.10",
|
|
87
|
+
"@testing-library/jest-dom": "^5.16.5",
|
|
88
|
+
"@testing-library/react": "^14.0.0",
|
|
89
|
+
"@testing-library/user-event": "^14.4.3",
|
|
90
|
+
"@types/jest": "^29.2.5",
|
|
99
91
|
"@types/js-yaml": "^4.0.5",
|
|
100
92
|
"@types/lodash": "^4.14.176",
|
|
101
93
|
"@types/react": "^18.0.26",
|
|
@@ -104,22 +96,37 @@
|
|
|
104
96
|
"@types/react-transition-group": "^4.4.4",
|
|
105
97
|
"@types/sanitize-html": "^2.6.0",
|
|
106
98
|
"@types/ua-parser-js": "^0.7.36",
|
|
107
|
-
"eslint": "^
|
|
99
|
+
"eslint": "^8.0.0",
|
|
108
100
|
"eslint-plugin-local": "./eslint-plugin-local",
|
|
101
|
+
"eslint-plugin-testing-library": "^5.9.1",
|
|
102
|
+
"gulp": "^4.0.2",
|
|
103
|
+
"gulp-dart-sass": "^1.0.2",
|
|
104
|
+
"gulp-rename": "^2.0.0",
|
|
105
|
+
"gulp-replace": "^1.1.3",
|
|
106
|
+
"gulp-typescript": "^6.0.0-alpha.1",
|
|
107
|
+
"html-loader": "^1.3.2",
|
|
109
108
|
"husky": "^7.0.4",
|
|
109
|
+
"jest": "^29.3.1",
|
|
110
|
+
"jest-environment-jsdom": "^29.3.1",
|
|
111
|
+
"jest-transform-css": "^6.0.1",
|
|
110
112
|
"js-yaml": "^3.14.1",
|
|
111
113
|
"lint-staged": "^11.2.6",
|
|
114
|
+
"markdown-loader": "^6.0.0",
|
|
112
115
|
"move-file-cli": "^3.0.0",
|
|
113
116
|
"npm-run-all": "^4.1.5",
|
|
114
117
|
"postcss": "^8.4.14",
|
|
115
118
|
"prettier": "2.4.1",
|
|
116
119
|
"react": "^18.2.0",
|
|
117
120
|
"react-dom": "^18.2.0",
|
|
121
|
+
"rimraf": "^3.0.2",
|
|
122
|
+
"sass": "^1.54.4",
|
|
118
123
|
"sass-loader": "^10.3.1",
|
|
119
124
|
"stylelint": "^14.11.0",
|
|
120
|
-
"stylelint-scss": "^
|
|
125
|
+
"stylelint-scss": "^4.0.0",
|
|
121
126
|
"svg-sprite-loader": "^6.0.11",
|
|
122
|
-
"
|
|
127
|
+
"ts-jest": "^29.0.5",
|
|
128
|
+
"typescript": "^4.9.3",
|
|
129
|
+
"webpack": "^4.46.0"
|
|
123
130
|
},
|
|
124
131
|
"lint-staged": {
|
|
125
132
|
"*.{css,scss}": [
|
|
@@ -133,8 +140,5 @@
|
|
|
133
140
|
"*.{json,yaml,yml,md}": [
|
|
134
141
|
"prettier --write"
|
|
135
142
|
]
|
|
136
|
-
},
|
|
137
|
-
"publishConfig": {
|
|
138
|
-
"tag": "alpha"
|
|
139
143
|
}
|
|
140
144
|
}
|
package/styles/mixins.scss
CHANGED
|
@@ -47,13 +47,3 @@
|
|
|
47
47
|
}
|
|
48
48
|
}
|
|
49
49
|
}
|
|
50
|
-
|
|
51
|
-
@mixin monochromeButton() {
|
|
52
|
-
--yc-button-background-color: var(--pc-monochrome-button);
|
|
53
|
-
--yc-button-background-color-hover: var(--pc-monochrome-button-hover);
|
|
54
|
-
color: var(--yc-color-text-light-primary);
|
|
55
|
-
|
|
56
|
-
&:hover {
|
|
57
|
-
color: var(--yc-color-text-light-primary);
|
|
58
|
-
}
|
|
59
|
-
}
|