@gravity-ui/markdown-editor 14.0.0 → 14.0.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.
@@ -14,7 +14,8 @@ function useMarkdownEditor(props, deps = []) {
14
14
  const breaks = (_a = md.breaks) !== null && _a !== void 0 ? _a : props.breaks;
15
15
  const preset = (_b = props.preset) !== null && _b !== void 0 ? _b : 'full';
16
16
  const renderStorage = new extensions_1.ReactRenderStorage();
17
- const needToSetDimensionsForUploadedImages = (_c = experimental.needToSetDimensionsForUploadedImages) !== null && _c !== void 0 ? _c : props.needToSetDimensionsForUploadedImages;
17
+ const uploadFile = (_c = handlers.uploadFile) !== null && _c !== void 0 ? _c : props.fileUploadHandler;
18
+ const needToSetDimensionsForUploadedImages = (_d = experimental.needToSetDimensionsForUploadedImages) !== null && _d !== void 0 ? _d : props.needToSetDimensionsForUploadedImages;
18
19
  const extensions = (builder) => {
19
20
  var _a;
20
21
  const extensionOptions = (_a = wysiwygConfig.extensionOptions) !== null && _a !== void 0 ? _a : props.extensionOptions;
@@ -24,7 +25,7 @@ function useMarkdownEditor(props, deps = []) {
24
25
  }, onSubmit: () => {
25
26
  editor.emit('submit', null);
26
27
  return true;
27
- }, mdBreaks: breaks, fileUploadHandler: props.fileUploadHandler, needToSetDimensionsForUploadedImages }));
28
+ }, mdBreaks: breaks, fileUploadHandler: uploadFile, needToSetDimensionsForUploadedImages }));
28
29
  {
29
30
  const extraExtensions = wysiwygConfig.extensions || props.extraExtensions;
30
31
  if (extraExtensions) {
@@ -33,7 +34,7 @@ function useMarkdownEditor(props, deps = []) {
33
34
  }
34
35
  };
35
36
  return new Editor_1.EditorImpl(Object.assign(Object.assign({}, props), { preset,
36
- renderStorage, md: Object.assign(Object.assign({}, md), { breaks, html: (_d = md.html) !== null && _d !== void 0 ? _d : props.allowHTML, linkify: (_e = md.linkify) !== null && _e !== void 0 ? _e : props.linkify, linkifyTlds: (_f = md.linkifyTlds) !== null && _f !== void 0 ? _f : props.linkifyTlds }), initial: Object.assign(Object.assign({}, initial), { markup: (_g = initial.markup) !== null && _g !== void 0 ? _g : props.initialMarkup, mode: (_h = initial.mode) !== null && _h !== void 0 ? _h : props.initialEditorMode, toolbarVisible: (_j = initial.toolbarVisible) !== null && _j !== void 0 ? _j : props.initialToolbarVisible, splitModeEnabled: (_k = initial.splitModeEnabled) !== null && _k !== void 0 ? _k : props.initialSplitModeEnabled }), handlers: Object.assign(Object.assign({}, handlers), { uploadFile: (_l = handlers.uploadFile) !== null && _l !== void 0 ? _l : props.fileUploadHandler }), experimental: Object.assign(Object.assign({}, experimental), { needToSetDimensionsForUploadedImages, prepareRawMarkup: (_m = experimental.prepareRawMarkup) !== null && _m !== void 0 ? _m : props.prepareRawMarkup, beforeEditorModeChange: (_o = experimental.beforeEditorModeChange) !== null && _o !== void 0 ? _o : props.experimental_beforeEditorModeChange }), markupConfig: Object.assign(Object.assign({}, markupConfig), { splitMode: (_p = markupConfig.splitMode) !== null && _p !== void 0 ? _p : props.splitMode, renderPreview: (_q = markupConfig.renderPreview) !== null && _q !== void 0 ? _q : props.renderPreview, extensions: (_r = markupConfig.extensions) !== null && _r !== void 0 ? _r : props.extraMarkupExtensions }), wysiwygConfig: Object.assign(Object.assign({}, wysiwygConfig), { extensions, escapeConfig: (_s = wysiwygConfig.escapeConfig) !== null && _s !== void 0 ? _s : props.escapeConfig }) }));
37
+ renderStorage, md: Object.assign(Object.assign({}, md), { breaks, html: (_e = md.html) !== null && _e !== void 0 ? _e : props.allowHTML, linkify: (_f = md.linkify) !== null && _f !== void 0 ? _f : props.linkify, linkifyTlds: (_g = md.linkifyTlds) !== null && _g !== void 0 ? _g : props.linkifyTlds }), initial: Object.assign(Object.assign({}, initial), { markup: (_h = initial.markup) !== null && _h !== void 0 ? _h : props.initialMarkup, mode: (_j = initial.mode) !== null && _j !== void 0 ? _j : props.initialEditorMode, toolbarVisible: (_k = initial.toolbarVisible) !== null && _k !== void 0 ? _k : props.initialToolbarVisible, splitModeEnabled: (_l = initial.splitModeEnabled) !== null && _l !== void 0 ? _l : props.initialSplitModeEnabled }), handlers: Object.assign(Object.assign({}, handlers), { uploadFile }), experimental: Object.assign(Object.assign({}, experimental), { needToSetDimensionsForUploadedImages, prepareRawMarkup: (_m = experimental.prepareRawMarkup) !== null && _m !== void 0 ? _m : props.prepareRawMarkup, beforeEditorModeChange: (_o = experimental.beforeEditorModeChange) !== null && _o !== void 0 ? _o : props.experimental_beforeEditorModeChange }), markupConfig: Object.assign(Object.assign({}, markupConfig), { splitMode: (_p = markupConfig.splitMode) !== null && _p !== void 0 ? _p : props.splitMode, renderPreview: (_q = markupConfig.renderPreview) !== null && _q !== void 0 ? _q : props.renderPreview, extensions: (_r = markupConfig.extensions) !== null && _r !== void 0 ? _r : props.extraMarkupExtensions }), wysiwygConfig: Object.assign(Object.assign({}, wysiwygConfig), { extensions, escapeConfig: (_s = wysiwygConfig.escapeConfig) !== null && _s !== void 0 ? _s : props.escapeConfig }) }));
37
38
  }, deps);
38
39
  (0, react_1.useLayoutEffect)(() => {
39
40
  function onToolbarAction({ editorMode, id }) {
@@ -1,53 +1,3 @@
1
- .yfm .yfm-note {
2
- max-width: 1296px;
3
- margin: 20px 0;
4
- padding: 20px 20px 20px 64px;
5
- border-radius: 10px;
6
- }
7
- .yfm .yfm-note .yfm-note-title {
8
- font-weight: 700;
9
- }
10
- .yfm .yfm-note > p {
11
- margin: 0 0 10px;
12
- }
13
- .yfm .yfm-note > p:first-child::before {
14
- box-sizing: content-box;
15
- display: block;
16
- width: 24px;
17
- height: 24px;
18
- margin-top: -2px;
19
- margin-left: -44px;
20
- padding-right: 20px;
21
- float: left;
22
- }
23
- .yfm .yfm-note > p:last-child {
24
- margin-bottom: 0;
25
- }
26
- .yfm .yfm-note.yfm-accent-info > p:first-child::before {
27
- content: url('data:image/svg+xml,%3Csvg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 16 16"%3E%3Ccircle cx="8" cy="8" r="8" fill="rgb(2,123,243)"/%3E%3Crect width="1" height="5" x="7.5" y="6.5" stroke="%23fff" rx=".5"/%3E%3Ccircle cx="8" cy="4" r="1" fill="%23fff"/%3E%3C/svg%3E');
28
- }
29
- .yfm .yfm-note.yfm-accent-tip > p:first-child::before {
30
- content: url('data:image/svg+xml,%3Csvg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 16 16"%3E%3Ccircle cx="8" cy="8" r="8" fill="rgb(86,189,103)"/%3E%3Crect width="1" height="5" x="7.5" y="6.5" stroke="%23fff" rx=".5"/%3E%3Ccircle cx="8" cy="4" r="1" fill="%23fff"/%3E%3C/svg%3E');
31
- }
32
- .yfm .yfm-note.yfm-accent-warning > p:first-child::before {
33
- content: url('data:image/svg+xml,%3Csvg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 16 16"%3E%3Ccircle cx="8" cy="8" r="8" fill="rgb(241,149,24)"/%3E%3Crect width="1" height="5" x="7.5" y="6.5" stroke="%23fff" rx=".5"/%3E%3Ccircle cx="8" cy="4" r="1" fill="%23fff"/%3E%3C/svg%3E');
34
- }
35
- .yfm .yfm-note.yfm-accent-alert > p:first-child::before {
36
- content: url('data:image/svg+xml,%3Csvg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 16 16"%3E%3Ccircle cx="8" cy="8" r="8" fill="rgb(255,70,69)"/%3E%3Crect width="1" height="5" x="7.5" y="6.5" stroke="%23fff" rx=".5"/%3E%3Ccircle cx="8" cy="4" r="1" fill="%23fff"/%3E%3C/svg%3E');
37
- }
38
- .yfm .yfm-note.yfm-accent-info {
39
- background: var(--yfm-color-note-info-background);
40
- }
41
- .yfm .yfm-note.yfm-accent-tip {
42
- background: var(--yfm-color-note-tip-background);
43
- }
44
- .yfm .yfm-note.yfm-accent-alert {
45
- background: var(--yfm-color-note-important-background);
46
- }
47
- .yfm .yfm-note.yfm-accent-warning {
48
- background: var(--yfm-color-note-warning-background);
49
- }
50
-
51
1
  .g-md-yfm-note-toolbar {
52
2
  margin: 2px 8px;
53
3
  }
@@ -4,7 +4,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
4
4
  exports.formatter = void 0;
5
5
  const tslib_1 = require("tslib");
6
6
  const platform_1 = require("../utils/platform");
7
- const chars_1 = require("./chars");
8
7
  const const_1 = require("./const");
9
8
  class ShortCutFormatter {
10
9
  constructor() {
@@ -32,10 +31,7 @@ class ShortCutFormatter {
32
31
  const defs = tslib_1.__classPrivateFieldGet(this, _ShortCutFormatter_map, "f").get(name);
33
32
  if (!defs)
34
33
  return null;
35
- return defs
36
- .map((str) => { var _a; return (_a = chars_1.cmChars[str]) !== null && _a !== void 0 ? _a : str; })
37
- .sort((a) => (a === const_1.ModKey.Shift ? -1 : 0))
38
- .join('-');
34
+ return defs.sort((a) => (a === const_1.ModKey.Shift ? -1 : 0)).join('-');
39
35
  }
40
36
  toView(name) {
41
37
  const defs = tslib_1.__classPrivateFieldGet(this, _ShortCutFormatter_map, "f").get(name);
@@ -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 '14.0.0' !== 'undefined' ? '14.0.0' : 'unknown';
5
+ exports.VERSION = typeof '14.0.2' !== 'undefined' ? '14.0.2' : 'unknown';
@@ -11,7 +11,8 @@ export function useMarkdownEditor(props, deps = []) {
11
11
  const breaks = (_a = md.breaks) !== null && _a !== void 0 ? _a : props.breaks;
12
12
  const preset = (_b = props.preset) !== null && _b !== void 0 ? _b : 'full';
13
13
  const renderStorage = new ReactRenderStorage();
14
- const needToSetDimensionsForUploadedImages = (_c = experimental.needToSetDimensionsForUploadedImages) !== null && _c !== void 0 ? _c : props.needToSetDimensionsForUploadedImages;
14
+ const uploadFile = (_c = handlers.uploadFile) !== null && _c !== void 0 ? _c : props.fileUploadHandler;
15
+ const needToSetDimensionsForUploadedImages = (_d = experimental.needToSetDimensionsForUploadedImages) !== null && _d !== void 0 ? _d : props.needToSetDimensionsForUploadedImages;
15
16
  const extensions = (builder) => {
16
17
  var _a;
17
18
  const extensionOptions = (_a = wysiwygConfig.extensionOptions) !== null && _a !== void 0 ? _a : props.extensionOptions;
@@ -21,7 +22,7 @@ export function useMarkdownEditor(props, deps = []) {
21
22
  }, onSubmit: () => {
22
23
  editor.emit('submit', null);
23
24
  return true;
24
- }, mdBreaks: breaks, fileUploadHandler: props.fileUploadHandler, needToSetDimensionsForUploadedImages }));
25
+ }, mdBreaks: breaks, fileUploadHandler: uploadFile, needToSetDimensionsForUploadedImages }));
25
26
  {
26
27
  const extraExtensions = wysiwygConfig.extensions || props.extraExtensions;
27
28
  if (extraExtensions) {
@@ -30,7 +31,7 @@ export function useMarkdownEditor(props, deps = []) {
30
31
  }
31
32
  };
32
33
  return new EditorImpl(Object.assign(Object.assign({}, props), { preset,
33
- renderStorage, md: Object.assign(Object.assign({}, md), { breaks, html: (_d = md.html) !== null && _d !== void 0 ? _d : props.allowHTML, linkify: (_e = md.linkify) !== null && _e !== void 0 ? _e : props.linkify, linkifyTlds: (_f = md.linkifyTlds) !== null && _f !== void 0 ? _f : props.linkifyTlds }), initial: Object.assign(Object.assign({}, initial), { markup: (_g = initial.markup) !== null && _g !== void 0 ? _g : props.initialMarkup, mode: (_h = initial.mode) !== null && _h !== void 0 ? _h : props.initialEditorMode, toolbarVisible: (_j = initial.toolbarVisible) !== null && _j !== void 0 ? _j : props.initialToolbarVisible, splitModeEnabled: (_k = initial.splitModeEnabled) !== null && _k !== void 0 ? _k : props.initialSplitModeEnabled }), handlers: Object.assign(Object.assign({}, handlers), { uploadFile: (_l = handlers.uploadFile) !== null && _l !== void 0 ? _l : props.fileUploadHandler }), experimental: Object.assign(Object.assign({}, experimental), { needToSetDimensionsForUploadedImages, prepareRawMarkup: (_m = experimental.prepareRawMarkup) !== null && _m !== void 0 ? _m : props.prepareRawMarkup, beforeEditorModeChange: (_o = experimental.beforeEditorModeChange) !== null && _o !== void 0 ? _o : props.experimental_beforeEditorModeChange }), markupConfig: Object.assign(Object.assign({}, markupConfig), { splitMode: (_p = markupConfig.splitMode) !== null && _p !== void 0 ? _p : props.splitMode, renderPreview: (_q = markupConfig.renderPreview) !== null && _q !== void 0 ? _q : props.renderPreview, extensions: (_r = markupConfig.extensions) !== null && _r !== void 0 ? _r : props.extraMarkupExtensions }), wysiwygConfig: Object.assign(Object.assign({}, wysiwygConfig), { extensions, escapeConfig: (_s = wysiwygConfig.escapeConfig) !== null && _s !== void 0 ? _s : props.escapeConfig }) }));
34
+ renderStorage, md: Object.assign(Object.assign({}, md), { breaks, html: (_e = md.html) !== null && _e !== void 0 ? _e : props.allowHTML, linkify: (_f = md.linkify) !== null && _f !== void 0 ? _f : props.linkify, linkifyTlds: (_g = md.linkifyTlds) !== null && _g !== void 0 ? _g : props.linkifyTlds }), initial: Object.assign(Object.assign({}, initial), { markup: (_h = initial.markup) !== null && _h !== void 0 ? _h : props.initialMarkup, mode: (_j = initial.mode) !== null && _j !== void 0 ? _j : props.initialEditorMode, toolbarVisible: (_k = initial.toolbarVisible) !== null && _k !== void 0 ? _k : props.initialToolbarVisible, splitModeEnabled: (_l = initial.splitModeEnabled) !== null && _l !== void 0 ? _l : props.initialSplitModeEnabled }), handlers: Object.assign(Object.assign({}, handlers), { uploadFile }), experimental: Object.assign(Object.assign({}, experimental), { needToSetDimensionsForUploadedImages, prepareRawMarkup: (_m = experimental.prepareRawMarkup) !== null && _m !== void 0 ? _m : props.prepareRawMarkup, beforeEditorModeChange: (_o = experimental.beforeEditorModeChange) !== null && _o !== void 0 ? _o : props.experimental_beforeEditorModeChange }), markupConfig: Object.assign(Object.assign({}, markupConfig), { splitMode: (_p = markupConfig.splitMode) !== null && _p !== void 0 ? _p : props.splitMode, renderPreview: (_q = markupConfig.renderPreview) !== null && _q !== void 0 ? _q : props.renderPreview, extensions: (_r = markupConfig.extensions) !== null && _r !== void 0 ? _r : props.extraMarkupExtensions }), wysiwygConfig: Object.assign(Object.assign({}, wysiwygConfig), { extensions, escapeConfig: (_s = wysiwygConfig.escapeConfig) !== null && _s !== void 0 ? _s : props.escapeConfig }) }));
34
35
  }, deps);
35
36
  useLayoutEffect(() => {
36
37
  function onToolbarAction({ editorMode, id }) {
@@ -1,53 +1,3 @@
1
- .yfm .yfm-note {
2
- max-width: 1296px;
3
- margin: 20px 0;
4
- padding: 20px 20px 20px 64px;
5
- border-radius: 10px;
6
- }
7
- .yfm .yfm-note .yfm-note-title {
8
- font-weight: 700;
9
- }
10
- .yfm .yfm-note > p {
11
- margin: 0 0 10px;
12
- }
13
- .yfm .yfm-note > p:first-child::before {
14
- box-sizing: content-box;
15
- display: block;
16
- width: 24px;
17
- height: 24px;
18
- margin-top: -2px;
19
- margin-left: -44px;
20
- padding-right: 20px;
21
- float: left;
22
- }
23
- .yfm .yfm-note > p:last-child {
24
- margin-bottom: 0;
25
- }
26
- .yfm .yfm-note.yfm-accent-info > p:first-child::before {
27
- content: url('data:image/svg+xml,%3Csvg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 16 16"%3E%3Ccircle cx="8" cy="8" r="8" fill="rgb(2,123,243)"/%3E%3Crect width="1" height="5" x="7.5" y="6.5" stroke="%23fff" rx=".5"/%3E%3Ccircle cx="8" cy="4" r="1" fill="%23fff"/%3E%3C/svg%3E');
28
- }
29
- .yfm .yfm-note.yfm-accent-tip > p:first-child::before {
30
- content: url('data:image/svg+xml,%3Csvg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 16 16"%3E%3Ccircle cx="8" cy="8" r="8" fill="rgb(86,189,103)"/%3E%3Crect width="1" height="5" x="7.5" y="6.5" stroke="%23fff" rx=".5"/%3E%3Ccircle cx="8" cy="4" r="1" fill="%23fff"/%3E%3C/svg%3E');
31
- }
32
- .yfm .yfm-note.yfm-accent-warning > p:first-child::before {
33
- content: url('data:image/svg+xml,%3Csvg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 16 16"%3E%3Ccircle cx="8" cy="8" r="8" fill="rgb(241,149,24)"/%3E%3Crect width="1" height="5" x="7.5" y="6.5" stroke="%23fff" rx=".5"/%3E%3Ccircle cx="8" cy="4" r="1" fill="%23fff"/%3E%3C/svg%3E');
34
- }
35
- .yfm .yfm-note.yfm-accent-alert > p:first-child::before {
36
- content: url('data:image/svg+xml,%3Csvg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 16 16"%3E%3Ccircle cx="8" cy="8" r="8" fill="rgb(255,70,69)"/%3E%3Crect width="1" height="5" x="7.5" y="6.5" stroke="%23fff" rx=".5"/%3E%3Ccircle cx="8" cy="4" r="1" fill="%23fff"/%3E%3C/svg%3E');
37
- }
38
- .yfm .yfm-note.yfm-accent-info {
39
- background: var(--yfm-color-note-info-background);
40
- }
41
- .yfm .yfm-note.yfm-accent-tip {
42
- background: var(--yfm-color-note-tip-background);
43
- }
44
- .yfm .yfm-note.yfm-accent-alert {
45
- background: var(--yfm-color-note-important-background);
46
- }
47
- .yfm .yfm-note.yfm-accent-warning {
48
- background: var(--yfm-color-note-warning-background);
49
- }
50
-
51
1
  .g-md-yfm-note-toolbar {
52
2
  margin: 2px 8px;
53
3
  }
@@ -1,7 +1,6 @@
1
1
  var _ShortCutFormatter_map;
2
2
  import { __classPrivateFieldGet } from "tslib";
3
3
  import { isMac } from '../utils/platform';
4
- import { cmChars } from './chars';
5
4
  import { ModKey as MK } from './const';
6
5
  class ShortCutFormatter {
7
6
  constructor() {
@@ -29,10 +28,7 @@ class ShortCutFormatter {
29
28
  const defs = __classPrivateFieldGet(this, _ShortCutFormatter_map, "f").get(name);
30
29
  if (!defs)
31
30
  return null;
32
- return defs
33
- .map((str) => { var _a; return (_a = cmChars[str]) !== null && _a !== void 0 ? _a : str; })
34
- .sort((a) => (a === MK.Shift ? -1 : 0))
35
- .join('-');
31
+ return defs.sort((a) => (a === MK.Shift ? -1 : 0)).join('-');
36
32
  }
37
33
  toView(name) {
38
34
  const defs = __classPrivateFieldGet(this, _ShortCutFormatter_map, "f").get(name);
@@ -1,2 +1,2 @@
1
1
  /** During build process, the current version will be injected here */
2
- export const VERSION = typeof '14.0.0' !== 'undefined' ? '14.0.0' : 'unknown';
2
+ export const VERSION = typeof '14.0.2' !== 'undefined' ? '14.0.2' : 'unknown';
package/build/styles.css CHANGED
@@ -1595,56 +1595,6 @@ body :has(.g-md-resizable_resizing) {
1595
1595
  top: 3px;
1596
1596
  right: 3px;
1597
1597
  }
1598
- .yfm .yfm-note {
1599
- max-width: 1296px;
1600
- margin: 20px 0;
1601
- padding: 20px 20px 20px 64px;
1602
- border-radius: 10px;
1603
- }
1604
- .yfm .yfm-note .yfm-note-title {
1605
- font-weight: 700;
1606
- }
1607
- .yfm .yfm-note > p {
1608
- margin: 0 0 10px;
1609
- }
1610
- .yfm .yfm-note > p:first-child::before {
1611
- box-sizing: content-box;
1612
- display: block;
1613
- width: 24px;
1614
- height: 24px;
1615
- margin-top: -2px;
1616
- margin-left: -44px;
1617
- padding-right: 20px;
1618
- float: left;
1619
- }
1620
- .yfm .yfm-note > p:last-child {
1621
- margin-bottom: 0;
1622
- }
1623
- .yfm .yfm-note.yfm-accent-info > p:first-child::before {
1624
- content: url('data:image/svg+xml,%3Csvg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 16 16"%3E%3Ccircle cx="8" cy="8" r="8" fill="rgb(2,123,243)"/%3E%3Crect width="1" height="5" x="7.5" y="6.5" stroke="%23fff" rx=".5"/%3E%3Ccircle cx="8" cy="4" r="1" fill="%23fff"/%3E%3C/svg%3E');
1625
- }
1626
- .yfm .yfm-note.yfm-accent-tip > p:first-child::before {
1627
- content: url('data:image/svg+xml,%3Csvg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 16 16"%3E%3Ccircle cx="8" cy="8" r="8" fill="rgb(86,189,103)"/%3E%3Crect width="1" height="5" x="7.5" y="6.5" stroke="%23fff" rx=".5"/%3E%3Ccircle cx="8" cy="4" r="1" fill="%23fff"/%3E%3C/svg%3E');
1628
- }
1629
- .yfm .yfm-note.yfm-accent-warning > p:first-child::before {
1630
- content: url('data:image/svg+xml,%3Csvg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 16 16"%3E%3Ccircle cx="8" cy="8" r="8" fill="rgb(241,149,24)"/%3E%3Crect width="1" height="5" x="7.5" y="6.5" stroke="%23fff" rx=".5"/%3E%3Ccircle cx="8" cy="4" r="1" fill="%23fff"/%3E%3C/svg%3E');
1631
- }
1632
- .yfm .yfm-note.yfm-accent-alert > p:first-child::before {
1633
- content: url('data:image/svg+xml,%3Csvg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 16 16"%3E%3Ccircle cx="8" cy="8" r="8" fill="rgb(255,70,69)"/%3E%3Crect width="1" height="5" x="7.5" y="6.5" stroke="%23fff" rx=".5"/%3E%3Ccircle cx="8" cy="4" r="1" fill="%23fff"/%3E%3C/svg%3E');
1634
- }
1635
- .yfm .yfm-note.yfm-accent-info {
1636
- background: var(--yfm-color-note-info-background);
1637
- }
1638
- .yfm .yfm-note.yfm-accent-tip {
1639
- background: var(--yfm-color-note-tip-background);
1640
- }
1641
- .yfm .yfm-note.yfm-accent-alert {
1642
- background: var(--yfm-color-note-important-background);
1643
- }
1644
- .yfm .yfm-note.yfm-accent-warning {
1645
- background: var(--yfm-color-note-warning-background);
1646
- }
1647
-
1648
1598
  .g-md-yfm-note-toolbar {
1649
1599
  margin: 2px 8px;
1650
1600
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gravity-ui/markdown-editor",
3
- "version": "14.0.0",
3
+ "version": "14.0.2",
4
4
  "description": "Markdown wysiwyg and markup editor",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -174,7 +174,7 @@
174
174
  "@types/markdown-it": "^12.2.3",
175
175
  "base64-arraybuffer": "1.0.2",
176
176
  "is-number": "^7.0.0",
177
- "markdown-it-attrs": "4.1.4",
177
+ "markdown-it-attrs": "^4.2.0",
178
178
  "markdown-it-color": "^2.1.1",
179
179
  "markdown-it-emoji": "2.0.2",
180
180
  "markdown-it-ins": "^3.0.1",
@@ -254,8 +254,7 @@
254
254
  "sass-loader": "^13.3.2",
255
255
  "stylelint": "15.11.0",
256
256
  "ts-jest": "^27.0.7",
257
- "typescript": "^4.5.2",
258
- "web-streams-polyfill": "4.0.0"
257
+ "typescript": "^4.5.2"
259
258
  },
260
259
  "peerDependenciesMeta": {
261
260
  "@diplodoc/folding-headings-extension": {
@@ -1,2 +0,0 @@
1
- import { Chars } from './types';
2
- export declare const cmChars: Chars;
@@ -1,12 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.cmChars = void 0;
4
- const platform_1 = require("../utils/platform");
5
- const const_1 = require("./const");
6
- const cmMac = {
7
- [const_1.ModKey.Mod]: 'cmd',
8
- };
9
- const cmPC = {
10
- [const_1.ModKey.Mod]: 'ctrl',
11
- };
12
- exports.cmChars = Object.assign({ [const_1.Key.Esc]: 'Esc' }, ((0, platform_1.isMac)() ? cmMac : cmPC));
@@ -1,2 +0,0 @@
1
- import { Chars } from './types';
2
- export declare const cmChars: Chars;
@@ -1,9 +0,0 @@
1
- import { isMac } from '../utils/platform';
2
- import { Key as K, ModKey as MK } from './const';
3
- const cmMac = {
4
- [MK.Mod]: 'cmd',
5
- };
6
- const cmPC = {
7
- [MK.Mod]: 'ctrl',
8
- };
9
- export const cmChars = Object.assign({ [K.Esc]: 'Esc' }, (isMac() ? cmMac : cmPC));