@gravity-ui/markdown-editor 13.4.0 → 13.4.2
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/bundle/config/wysiwyg.js +0 -2
- package/build/cjs/bundle/settings/MarkdownHints/MarkdownHints.js +1 -2
- package/build/cjs/extensions/yfm/YfmTable/plugins/YfmTableControls/view.css +1 -0
- package/build/cjs/i18n/md-hints/en.json +2 -1
- package/build/cjs/i18n/md-hints/index.d.ts +2 -1
- package/build/cjs/i18n/md-hints/ru.json +2 -1
- package/build/cjs/table-utils/commands/removeColumn.js +2 -1
- package/build/cjs/version.js +1 -1
- package/build/esm/bundle/config/wysiwyg.js +0 -2
- package/build/esm/bundle/settings/MarkdownHints/MarkdownHints.js +1 -2
- package/build/esm/extensions/yfm/YfmTable/plugins/YfmTableControls/view.css +1 -0
- package/build/esm/i18n/md-hints/en.json +2 -1
- package/build/esm/i18n/md-hints/index.d.ts +2 -1
- package/build/esm/i18n/md-hints/ru.json +2 -1
- package/build/esm/table-utils/commands/removeColumn.js +2 -1
- package/build/esm/version.js +1 -1
- package/build/styles.css +1 -0
- package/package.json +1 -1
|
@@ -420,7 +420,6 @@ exports.wCommandMenuConfig = [
|
|
|
420
420
|
// wMathInlineItemData,
|
|
421
421
|
// wMathBlockItemData,
|
|
422
422
|
exports.wTabsItemData,
|
|
423
|
-
exports.wYfmHtmlBlockItemData,
|
|
424
423
|
];
|
|
425
424
|
exports.wHiddenData = exports.wCommandMenuConfig;
|
|
426
425
|
/** prepared wysiwyg toolbar config */
|
|
@@ -556,7 +555,6 @@ exports.wCommandMenuConfigByPreset = {
|
|
|
556
555
|
exports.wHruleItemData,
|
|
557
556
|
exports.wFileItemData,
|
|
558
557
|
exports.wTabsItemData,
|
|
559
|
-
exports.wYfmHtmlBlockItemData,
|
|
560
558
|
],
|
|
561
559
|
full: exports.wCommandMenuConfig.slice(),
|
|
562
560
|
};
|
|
@@ -7,7 +7,6 @@ const uikit_1 = require("@gravity-ui/uikit");
|
|
|
7
7
|
const md_hints_1 = require(".././../../i18n/md-hints");
|
|
8
8
|
const classname_1 = require("../../../classname");
|
|
9
9
|
const b = (0, classname_1.cn)('markdown-hints');
|
|
10
|
-
const YFM_DOCS_HREF = 'https://ydocs.tech';
|
|
11
10
|
exports.MarkdownHints = react_1.default.memo(function MarkdownHints() {
|
|
12
11
|
const hints = [
|
|
13
12
|
{ title: (0, md_hints_1.i18n)('header_title'), hint: (0, md_hints_1.i18n)('header_hint') },
|
|
@@ -25,6 +24,6 @@ exports.MarkdownHints = react_1.default.memo(function MarkdownHints() {
|
|
|
25
24
|
react_1.default.createElement("div", { className: b('grid') }, hints.map((hint, index) => (react_1.default.createElement(react_1.default.Fragment, { key: `md-hint-${index}` },
|
|
26
25
|
react_1.default.createElement("span", { className: b('title') }, hint.title),
|
|
27
26
|
react_1.default.createElement("span", { className: b('hint') }, hint.hint))))),
|
|
28
|
-
react_1.default.createElement(uikit_1.Link, { href:
|
|
27
|
+
react_1.default.createElement(uikit_1.Link, { href: (0, md_hints_1.i18n)('documentation_link'), target: "_blank", className: b('docs-link') }, (0, md_hints_1.i18n)('documentation'))));
|
|
29
28
|
});
|
|
30
29
|
exports.MarkdownHints.displayName = 'MarkdownHints';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare const i18n: <G extends "header_title" | "header_hint" | "italic_title" | "italic_hint" | "bold_title" | "bold_hint" | "strikethrough_title" | "strikethrough_hint" | "blockquote_title" | "blockquote_hint" | "code_title" | "code_hint" | "link_title" | "link_hint" | "image_title" | "image_hint" | "list_title" | "list_hint" | "numbered-list_title" | "numbered-list_hint" | "documentation", S extends string>(key: G | (string extends S ? S : never), params?: {
|
|
1
|
+
export declare const i18n: <G extends "header_title" | "header_hint" | "italic_title" | "italic_hint" | "bold_title" | "bold_hint" | "strikethrough_title" | "strikethrough_hint" | "blockquote_title" | "blockquote_hint" | "code_title" | "code_hint" | "link_title" | "link_hint" | "image_title" | "image_hint" | "list_title" | "list_hint" | "numbered-list_title" | "numbered-list_hint" | "documentation" | "documentation_link", S extends string>(key: G | (string extends S ? S : never), params?: {
|
|
2
2
|
[key: string]: any;
|
|
3
3
|
} | undefined) => S extends G ? {
|
|
4
4
|
header_title: string;
|
|
@@ -22,4 +22,5 @@ export declare const i18n: <G extends "header_title" | "header_hint" | "italic_t
|
|
|
22
22
|
"numbered-list_title": string;
|
|
23
23
|
"numbered-list_hint": string;
|
|
24
24
|
documentation: string;
|
|
25
|
+
documentation_link: string;
|
|
25
26
|
}[G] : string;
|
|
@@ -29,7 +29,8 @@ const removeColumn = (state, dispatch, _, attrs = {}) => {
|
|
|
29
29
|
if (!(0, utils_1.isTableCellNode)(cellNode))
|
|
30
30
|
return;
|
|
31
31
|
if (cellIndex === columnNumber) {
|
|
32
|
-
|
|
32
|
+
// table -> tbody -> tr -> td
|
|
33
|
+
const from = tablePos + 2 + rowOffset + 1 + cellOffset;
|
|
33
34
|
const to = from + cellNode.nodeSize;
|
|
34
35
|
tr.delete(tr.mapping.map(from), tr.mapping.map(to));
|
|
35
36
|
}
|
package/build/cjs/version.js
CHANGED
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.VERSION = void 0;
|
|
4
4
|
/** During build process, the current version will be injected here */
|
|
5
|
-
exports.VERSION = typeof '13.4.
|
|
5
|
+
exports.VERSION = typeof '13.4.2' !== 'undefined' ? '13.4.2' : 'unknown';
|
|
@@ -417,7 +417,6 @@ export const wCommandMenuConfig = [
|
|
|
417
417
|
// wMathInlineItemData,
|
|
418
418
|
// wMathBlockItemData,
|
|
419
419
|
wTabsItemData,
|
|
420
|
-
wYfmHtmlBlockItemData,
|
|
421
420
|
];
|
|
422
421
|
export const wHiddenData = wCommandMenuConfig;
|
|
423
422
|
/** prepared wysiwyg toolbar config */
|
|
@@ -553,7 +552,6 @@ export const wCommandMenuConfigByPreset = {
|
|
|
553
552
|
wHruleItemData,
|
|
554
553
|
wFileItemData,
|
|
555
554
|
wTabsItemData,
|
|
556
|
-
wYfmHtmlBlockItemData,
|
|
557
555
|
],
|
|
558
556
|
full: wCommandMenuConfig.slice(),
|
|
559
557
|
};
|
|
@@ -4,7 +4,6 @@ import { i18n } from '.././../../i18n/md-hints';
|
|
|
4
4
|
import { cn } from '../../../classname';
|
|
5
5
|
import './MarkdownHints.css';
|
|
6
6
|
const b = cn('markdown-hints');
|
|
7
|
-
const YFM_DOCS_HREF = 'https://ydocs.tech';
|
|
8
7
|
export const MarkdownHints = React.memo(function MarkdownHints() {
|
|
9
8
|
const hints = [
|
|
10
9
|
{ title: i18n('header_title'), hint: i18n('header_hint') },
|
|
@@ -22,6 +21,6 @@ export const MarkdownHints = React.memo(function MarkdownHints() {
|
|
|
22
21
|
React.createElement("div", { className: b('grid') }, hints.map((hint, index) => (React.createElement(React.Fragment, { key: `md-hint-${index}` },
|
|
23
22
|
React.createElement("span", { className: b('title') }, hint.title),
|
|
24
23
|
React.createElement("span", { className: b('hint') }, hint.hint))))),
|
|
25
|
-
React.createElement(Link, { href:
|
|
24
|
+
React.createElement(Link, { href: i18n('documentation_link'), target: "_blank", className: b('docs-link') }, i18n('documentation'))));
|
|
26
25
|
});
|
|
27
26
|
MarkdownHints.displayName = 'MarkdownHints';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare const i18n: <G extends "header_title" | "header_hint" | "italic_title" | "italic_hint" | "bold_title" | "bold_hint" | "strikethrough_title" | "strikethrough_hint" | "blockquote_title" | "blockquote_hint" | "code_title" | "code_hint" | "link_title" | "link_hint" | "image_title" | "image_hint" | "list_title" | "list_hint" | "numbered-list_title" | "numbered-list_hint" | "documentation", S extends string>(key: G | (string extends S ? S : never), params?: {
|
|
1
|
+
export declare const i18n: <G extends "header_title" | "header_hint" | "italic_title" | "italic_hint" | "bold_title" | "bold_hint" | "strikethrough_title" | "strikethrough_hint" | "blockquote_title" | "blockquote_hint" | "code_title" | "code_hint" | "link_title" | "link_hint" | "image_title" | "image_hint" | "list_title" | "list_hint" | "numbered-list_title" | "numbered-list_hint" | "documentation" | "documentation_link", S extends string>(key: G | (string extends S ? S : never), params?: {
|
|
2
2
|
[key: string]: any;
|
|
3
3
|
} | undefined) => S extends G ? {
|
|
4
4
|
header_title: string;
|
|
@@ -22,4 +22,5 @@ export declare const i18n: <G extends "header_title" | "header_hint" | "italic_t
|
|
|
22
22
|
"numbered-list_title": string;
|
|
23
23
|
"numbered-list_hint": string;
|
|
24
24
|
documentation: string;
|
|
25
|
+
documentation_link: string;
|
|
25
26
|
}[G] : string;
|
|
@@ -26,7 +26,8 @@ export const removeColumn = (state, dispatch, _, attrs = {}) => {
|
|
|
26
26
|
if (!isTableCellNode(cellNode))
|
|
27
27
|
return;
|
|
28
28
|
if (cellIndex === columnNumber) {
|
|
29
|
-
|
|
29
|
+
// table -> tbody -> tr -> td
|
|
30
|
+
const from = tablePos + 2 + rowOffset + 1 + cellOffset;
|
|
30
31
|
const to = from + cellNode.nodeSize;
|
|
31
32
|
tr.delete(tr.mapping.map(from), tr.mapping.map(to));
|
|
32
33
|
}
|
package/build/esm/version.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/** During build process, the current version will be injected here */
|
|
2
|
-
export const VERSION = typeof '13.4.
|
|
2
|
+
export const VERSION = typeof '13.4.2' !== 'undefined' ? '13.4.2' : 'unknown';
|
package/build/styles.css
CHANGED