@gravity-ui/markdown-editor 13.5.2 → 13.6.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 (124) hide show
  1. package/build/cjs/bundle/Editor.js +8 -5
  2. package/build/cjs/bundle/config/icons.d.ts +1 -1
  3. package/build/cjs/bundle/config/icons.js +1 -0
  4. package/build/cjs/bundle/config/wysiwyg.d.ts +2 -1
  5. package/build/cjs/bundle/config/wysiwyg.js +13 -2
  6. package/build/cjs/extensions/yfm/FoldingHeading/FoldingHeading.d.ts +12 -0
  7. package/build/cjs/extensions/yfm/FoldingHeading/FoldingHeading.js +22 -0
  8. package/build/cjs/extensions/yfm/FoldingHeading/FoldingHeadingSpec/FoldingHeadingSpecs.d.ts +2 -0
  9. package/build/cjs/extensions/yfm/FoldingHeading/FoldingHeadingSpec/FoldingHeadingSpecs.js +9 -0
  10. package/build/cjs/extensions/yfm/FoldingHeading/FoldingHeadingSpec/const.d.ts +11 -0
  11. package/build/cjs/extensions/yfm/FoldingHeading/FoldingHeadingSpec/const.js +5 -0
  12. package/build/cjs/extensions/yfm/FoldingHeading/FoldingHeadingSpec/index.d.ts +1 -0
  13. package/build/cjs/extensions/yfm/FoldingHeading/FoldingHeadingSpec/index.js +4 -0
  14. package/build/cjs/extensions/yfm/FoldingHeading/FoldingHeadingSpec/md/skip-heading-sections.d.ts +3 -0
  15. package/build/cjs/extensions/yfm/FoldingHeading/FoldingHeadingSpec/md/skip-heading-sections.js +17 -0
  16. package/build/cjs/extensions/yfm/FoldingHeading/actions.d.ts +2 -0
  17. package/build/cjs/extensions/yfm/FoldingHeading/actions.js +10 -0
  18. package/build/cjs/extensions/yfm/FoldingHeading/commands/index.d.ts +3 -0
  19. package/build/cjs/extensions/yfm/FoldingHeading/commands/index.js +6 -0
  20. package/build/cjs/extensions/yfm/FoldingHeading/commands/openHeadingAndCreateParagraphAfterIfCursorAtEndOfHeading.d.ts +2 -0
  21. package/build/cjs/extensions/yfm/FoldingHeading/commands/openHeadingAndCreateParagraphAfterIfCursorAtEndOfHeading.js +27 -0
  22. package/build/cjs/extensions/yfm/FoldingHeading/commands/removeFoldingIfCursorAtStartOfHeading.d.ts +2 -0
  23. package/build/cjs/extensions/yfm/FoldingHeading/commands/removeFoldingIfCursorAtStartOfHeading.js +17 -0
  24. package/build/cjs/extensions/yfm/FoldingHeading/commands/toggleFoldingOfHeading.d.ts +2 -0
  25. package/build/cjs/extensions/yfm/FoldingHeading/commands/toggleFoldingOfHeading.js +26 -0
  26. package/build/cjs/extensions/yfm/FoldingHeading/const.d.ts +1 -0
  27. package/build/cjs/extensions/yfm/FoldingHeading/const.js +6 -0
  28. package/build/cjs/extensions/yfm/FoldingHeading/index.d.ts +1 -0
  29. package/build/cjs/extensions/yfm/FoldingHeading/index.js +5 -0
  30. package/build/cjs/extensions/yfm/FoldingHeading/input-rules.d.ts +4 -0
  31. package/build/cjs/extensions/yfm/FoldingHeading/input-rules.js +31 -0
  32. package/build/cjs/extensions/yfm/FoldingHeading/plugins/Folding.d.ts +3 -0
  33. package/build/cjs/extensions/yfm/FoldingHeading/plugins/Folding.js +167 -0
  34. package/build/cjs/extensions/yfm/FoldingHeading/utils.d.ts +10 -0
  35. package/build/cjs/extensions/yfm/FoldingHeading/utils.js +30 -0
  36. package/build/cjs/extensions/yfm/YfmHeading/YfmHeadingSpecs/const.d.ts +1 -1
  37. package/build/cjs/extensions/yfm/YfmHeading/YfmHeadingSpecs/const.js +1 -1
  38. package/build/cjs/extensions/yfm/YfmHeading/YfmHeadingSpecs/index.js +4 -4
  39. package/build/cjs/extensions/yfm/YfmHeading/YfmHeadingSpecs/utils.js +9 -1
  40. package/build/cjs/i18n/menubar/en.json +2 -0
  41. package/build/cjs/i18n/menubar/index.d.ts +3 -1
  42. package/build/cjs/i18n/menubar/ru.json +2 -0
  43. package/build/cjs/icons/index.d.ts +1 -1
  44. package/build/cjs/icons/index.js +2 -1
  45. package/build/cjs/toolbar/ToolbarButton.js +3 -2
  46. package/build/cjs/version.js +1 -1
  47. package/build/esm/bundle/Editor.js +8 -5
  48. package/build/esm/bundle/config/icons.d.ts +1 -1
  49. package/build/esm/bundle/config/icons.js +2 -1
  50. package/build/esm/bundle/config/wysiwyg.d.ts +2 -1
  51. package/build/esm/bundle/config/wysiwyg.js +12 -1
  52. package/build/esm/extensions/yfm/FoldingHeading/FoldingHeading.d.ts +12 -0
  53. package/build/esm/extensions/yfm/FoldingHeading/FoldingHeading.js +18 -0
  54. package/build/esm/extensions/yfm/FoldingHeading/FoldingHeadingSpec/FoldingHeadingSpecs.d.ts +2 -0
  55. package/build/esm/extensions/yfm/FoldingHeading/FoldingHeadingSpec/FoldingHeadingSpecs.js +5 -0
  56. package/build/esm/extensions/yfm/FoldingHeading/FoldingHeadingSpec/const.d.ts +11 -0
  57. package/build/esm/extensions/yfm/FoldingHeading/FoldingHeadingSpec/const.js +2 -0
  58. package/build/esm/extensions/yfm/FoldingHeading/FoldingHeadingSpec/index.d.ts +1 -0
  59. package/build/esm/extensions/yfm/FoldingHeading/FoldingHeadingSpec/index.js +1 -0
  60. package/build/esm/extensions/yfm/FoldingHeading/FoldingHeadingSpec/md/skip-heading-sections.d.ts +3 -0
  61. package/build/esm/extensions/yfm/FoldingHeading/FoldingHeadingSpec/md/skip-heading-sections.js +13 -0
  62. package/build/esm/extensions/yfm/FoldingHeading/actions.d.ts +2 -0
  63. package/build/esm/extensions/yfm/FoldingHeading/actions.js +7 -0
  64. package/build/esm/extensions/yfm/FoldingHeading/commands/index.d.ts +3 -0
  65. package/build/esm/extensions/yfm/FoldingHeading/commands/index.js +3 -0
  66. package/build/esm/extensions/yfm/FoldingHeading/commands/openHeadingAndCreateParagraphAfterIfCursorAtEndOfHeading.d.ts +2 -0
  67. package/build/esm/extensions/yfm/FoldingHeading/commands/openHeadingAndCreateParagraphAfterIfCursorAtEndOfHeading.js +23 -0
  68. package/build/esm/extensions/yfm/FoldingHeading/commands/removeFoldingIfCursorAtStartOfHeading.d.ts +2 -0
  69. package/build/esm/extensions/yfm/FoldingHeading/commands/removeFoldingIfCursorAtStartOfHeading.js +13 -0
  70. package/build/esm/extensions/yfm/FoldingHeading/commands/toggleFoldingOfHeading.d.ts +2 -0
  71. package/build/esm/extensions/yfm/FoldingHeading/commands/toggleFoldingOfHeading.js +22 -0
  72. package/build/esm/extensions/yfm/FoldingHeading/const.d.ts +1 -0
  73. package/build/esm/extensions/yfm/FoldingHeading/const.js +1 -0
  74. package/build/esm/extensions/yfm/FoldingHeading/index.d.ts +1 -0
  75. package/build/esm/extensions/yfm/FoldingHeading/index.js +1 -0
  76. package/build/esm/extensions/yfm/FoldingHeading/input-rules.d.ts +4 -0
  77. package/build/esm/extensions/yfm/FoldingHeading/input-rules.js +27 -0
  78. package/build/esm/extensions/yfm/FoldingHeading/plugins/Folding.d.ts +4 -0
  79. package/build/esm/extensions/yfm/FoldingHeading/plugins/Folding.js +164 -0
  80. package/build/esm/extensions/yfm/FoldingHeading/utils.d.ts +10 -0
  81. package/build/esm/extensions/yfm/FoldingHeading/utils.js +19 -0
  82. package/build/esm/extensions/yfm/YfmHeading/YfmHeadingSpecs/const.d.ts +1 -1
  83. package/build/esm/extensions/yfm/YfmHeading/YfmHeadingSpecs/const.js +1 -1
  84. package/build/esm/extensions/yfm/YfmHeading/YfmHeadingSpecs/index.js +4 -4
  85. package/build/esm/extensions/yfm/YfmHeading/YfmHeadingSpecs/utils.js +9 -1
  86. package/build/esm/i18n/menubar/en.json +2 -0
  87. package/build/esm/i18n/menubar/index.d.ts +3 -1
  88. package/build/esm/i18n/menubar/ru.json +2 -0
  89. package/build/esm/icons/index.d.ts +1 -1
  90. package/build/esm/icons/index.js +1 -1
  91. package/build/esm/toolbar/ToolbarButton.js +3 -2
  92. package/build/esm/version.js +1 -1
  93. package/build/styles.css +0 -381
  94. package/package.json +10 -5
  95. package/build/cjs/extensions/markdown/CodeBlock/CodeBlockHighlight/TooltipPlugin/TooltipView.css +0 -26
  96. package/build/cjs/extensions/markdown/Table/plugins/TableCellContextPlugin/floating.css +0 -11
  97. package/build/cjs/extensions/yfm/ImgSize/ImagePaste/skeleton.css +0 -8
  98. package/build/cjs/extensions/yfm/ImgSize/ImageWidget/view.css +0 -12
  99. package/build/cjs/extensions/yfm/ImgSize/plugins/ImgSizeNodeView/ImageForm/ImageForm.css +0 -8
  100. package/build/cjs/extensions/yfm/ImgSize/plugins/ImgSizeNodeView/ImgNodeView.css +0 -4
  101. package/build/cjs/extensions/yfm/Mermaid/MermaidNodeView/Mermaid.css +0 -33
  102. package/build/cjs/extensions/yfm/YfmCut/nodeviews/yfm-cut-title.css +0 -3
  103. package/build/cjs/extensions/yfm/YfmFile/YfmFilePaste/skeleton.css +0 -8
  104. package/build/cjs/extensions/yfm/YfmFile/YfmFileWidget/view.css +0 -7
  105. package/build/cjs/extensions/yfm/YfmHtmlBlock/YfmHtmlBlockNodeView/YfmHtmlBlock.css +0 -66
  106. package/build/cjs/extensions/yfm/YfmNote/plugins/YfmNoteTooltipPlugin/index.css +0 -66
  107. package/build/cjs/extensions/yfm/YfmTable/plugins/YfmTableControls/view.css +0 -83
  108. package/build/cjs/extensions/yfm/YfmTable/plugins/YfmTableControls/yfmTableCellView.css +0 -37
  109. package/build/cjs/markup/codemirror/search-plugin/view/SearchPopup.css +0 -9
  110. package/build/esm/extensions/markdown/CodeBlock/CodeBlockHighlight/TooltipPlugin/TooltipView.css +0 -26
  111. package/build/esm/extensions/markdown/Table/plugins/TableCellContextPlugin/floating.css +0 -11
  112. package/build/esm/extensions/yfm/ImgSize/ImagePaste/skeleton.css +0 -8
  113. package/build/esm/extensions/yfm/ImgSize/ImageWidget/view.css +0 -12
  114. package/build/esm/extensions/yfm/ImgSize/plugins/ImgSizeNodeView/ImageForm/ImageForm.css +0 -8
  115. package/build/esm/extensions/yfm/ImgSize/plugins/ImgSizeNodeView/ImgNodeView.css +0 -4
  116. package/build/esm/extensions/yfm/Mermaid/MermaidNodeView/Mermaid.css +0 -33
  117. package/build/esm/extensions/yfm/YfmCut/nodeviews/yfm-cut-title.css +0 -3
  118. package/build/esm/extensions/yfm/YfmFile/YfmFilePaste/skeleton.css +0 -8
  119. package/build/esm/extensions/yfm/YfmFile/YfmFileWidget/view.css +0 -7
  120. package/build/esm/extensions/yfm/YfmHtmlBlock/YfmHtmlBlockNodeView/YfmHtmlBlock.css +0 -66
  121. package/build/esm/extensions/yfm/YfmNote/plugins/YfmNoteTooltipPlugin/index.css +0 -66
  122. package/build/esm/extensions/yfm/YfmTable/plugins/YfmTableControls/view.css +0 -83
  123. package/build/esm/extensions/yfm/YfmTable/plugins/YfmTableControls/yfmTableCellView.css +0 -37
  124. package/build/esm/markup/codemirror/search-plugin/view/SearchPopup.css +0 -9
package/build/styles.css CHANGED
@@ -1152,385 +1152,4 @@ img.ProseMirror-separator {
1152
1152
  font-size: var(--g-text-code-inline-1-font-size);
1153
1153
  line-height: var(--g-text-code-inline-1-line-height);
1154
1154
  font-weight: var(--g-text-code-font-weight);
1155
- }
1156
- .g-md-image-skeleton {
1157
- vertical-align: middle;
1158
- }
1159
- .g-md-image-skeleton__skeleton {
1160
- width: min(var(--img-skeleton-width) * 1px, 100%);
1161
- height: min(var(--img-skeleton-height) * 1px, 700px);
1162
- margin-bottom: -5px;
1163
- }
1164
- .g-md-image-placeholder {
1165
- display: inline-flex;
1166
- align-items: center;
1167
- column-gap: 8px;
1168
- min-width: 300px;
1169
- padding: 12px 20px;
1170
- border-radius: 4px;
1171
- background-color: var(--g-color-base-simple-hover-solid);
1172
- font-size: var(--g-text-body-2-font-size);
1173
- line-height: var(--g-text-body-2-line-height);
1174
- font-weight: var(--g-text-body-font-weight);
1175
- }
1176
- .g-md-Mermaid {
1177
- display: flex;
1178
- justify-content: space-between;
1179
- margin-bottom: 15px;
1180
- padding: 2px;
1181
- border: 1px solid var(--g-color-line-generic);
1182
- border-radius: var(--g-border-radius-m);
1183
- }
1184
- .g-md-Mermaid_edit {
1185
- display: flex;
1186
- }
1187
- .g-md-Mermaid__Preview {
1188
- flex: 1;
1189
- }
1190
- .g-md-Mermaid__Error {
1191
- flex: 1;
1192
- font-family: var(--g-font-family-monospace);
1193
- color: var(--g-color-text-danger);
1194
- }
1195
- .g-md-Mermaid__Editor {
1196
- flex: 1;
1197
- white-space: nowrap;
1198
- caret-color: auto;
1199
- }
1200
- .g-md-Mermaid__EditorPopover {
1201
- z-index: 1;
1202
- float: right;
1203
- }
1204
- .g-md-Mermaid__Controls {
1205
- display: flex;
1206
- justify-content: end;
1207
- margin-top: 5px;
1208
- }
1209
- .yfm-cut-title .g-md-yfm-cut-title-inner {
1210
- cursor: text;
1211
- }
1212
- .g-md-file-skeleton {
1213
- display: inline-flex;
1214
- align-items: center;
1215
- }
1216
- .g-md-file-skeleton__skeleton {
1217
- width: 120px;
1218
- height: 20px;
1219
- }
1220
- .g-md-file-placeholder {
1221
- margin: 0 4px;
1222
- pointer-events: none;
1223
- }
1224
- .g-md-file-placeholder .yfm-file__icon {
1225
- margin-right: 8px;
1226
- }
1227
- .g-md-yfm-html-block {
1228
- position: relative;
1229
- display: flex;
1230
- justify-content: space-between;
1231
- margin-bottom: 15px;
1232
- padding-top: 28px;
1233
- border: 1px solid var(--g-color-line-generic);
1234
- border-radius: var(--g-border-radius-m);
1235
- }
1236
- .g-md-yfm-html-block_editing {
1237
- display: flex;
1238
- padding-top: 0;
1239
- border: 0;
1240
- }
1241
- .g-md-yfm-html-block__label {
1242
- position: absolute;
1243
- top: 8px;
1244
- left: 8px;
1245
- }
1246
- .g-md-yfm-html-block__menu {
1247
- position: absolute;
1248
- top: 0;
1249
- right: 0;
1250
- }
1251
- .g-md-yfm-html-block__preview {
1252
- flex: 1;
1253
- }
1254
- .g-md-yfm-html-block__error {
1255
- flex: 1;
1256
- font-family: var(--g-font-family-monospace);
1257
- color: var(--g-color-text-danger);
1258
- }
1259
- .g-md-yfm-html-block__editor {
1260
- flex: 1;
1261
- width: 50%;
1262
- white-space: nowrap;
1263
- caret-color: auto;
1264
- }
1265
- .g-md-yfm-html-block__editor .g-text-area__content {
1266
- font-size: 1em;
1267
- color: var(--yfm-color-hljs-subst);
1268
- border: 0;
1269
- border-radius: var(--g-border-radius-m);
1270
- background: var(--yfm-color-hljs-background);
1271
- font-feature-settings: normal;
1272
- }
1273
- .g-md-yfm-html-block__editor .g-text-area__control.g-md-YfmHtmlBlockHelper {
1274
- font-family: var(--yfm-font-family-monospace);
1275
- }
1276
- .g-md-yfm-html-block__editor-popover {
1277
- z-index: 1;
1278
- float: right;
1279
- }
1280
- .g-md-yfm-html-block__controls {
1281
- display: flex;
1282
- justify-content: end;
1283
- margin-top: 5px;
1284
- }
1285
- .g-md-yfm-html-block__content {
1286
- flex-grow: 1;
1287
- }
1288
-
1289
- .g-root_theme_dark-hc .g-md-yfm-html-block_editing .g-text-area__content,
1290
- .g-root_theme_dark .g-md-yfm-html-block_editing .g-text-area__content {
1291
- color: var(--g-color-text-primary);
1292
- }
1293
- .g-md-search-card {
1294
- padding: var(--g-spacing-2) var(--g-spacing-2) var(--g-spacing-3) var(--g-spacing-4);
1295
- }
1296
- .g-md-search-card__header {
1297
- display: flex;
1298
- justify-content: space-between;
1299
- align-items: center;
1300
- margin-bottom: var(--g-spacing-1);
1301
- }
1302
- .g-md-code-block-toolbar {
1303
- margin: 2px 8px;
1304
- }
1305
-
1306
- .g-md-code-tooltip-menu {
1307
- min-width: 150px;
1308
- border-radius: 4px;
1309
- }
1310
-
1311
- .g-md-code-block__select-popup {
1312
- width: 175px;
1313
- max-height: 200px;
1314
- }
1315
- .g-md-code-block__select-popup .g-select-filter {
1316
- border-bottom: 1px solid var(--g-color-line-generic);
1317
- }
1318
- .g-md-code-block__select-popup .g-select-filter .g-text-input__content {
1319
- border: none;
1320
- }
1321
- .g-md-code-block__select-popup .g-md-code-block__select-empty {
1322
- margin-left: 4px;
1323
- }
1324
-
1325
- .g-md-code-block__select-button {
1326
- margin: auto 0;
1327
- }
1328
- .table-cell-floating-button.g-button {
1329
- height: 28px;
1330
- line-height: 28px;
1331
- }
1332
- .table-cell-floating-button.g-button .g-button__icon {
1333
- width: 12px;
1334
- }
1335
-
1336
- .table-cell-floating-icon {
1337
- transform: rotate(90deg);
1338
- }
1339
- .g-md-img-size-node-view__wrapper {
1340
- position: relative;
1341
- display: inline-block;
1342
- }
1343
- .yfm .yfm-note {
1344
- max-width: 1296px;
1345
- margin: 20px 0;
1346
- padding: 20px 20px 20px 64px;
1347
- border-radius: 10px;
1348
- }
1349
- .yfm .yfm-note .yfm-note-title {
1350
- font-weight: 700;
1351
- }
1352
- .yfm .yfm-note > p {
1353
- margin: 0 0 10px 0;
1354
- }
1355
- .yfm .yfm-note > p:first-child::before {
1356
- box-sizing: content-box;
1357
- display: block;
1358
- width: 24px;
1359
- height: 24px;
1360
- margin-top: -2px;
1361
- margin-left: -44px;
1362
- padding-right: 20px;
1363
- float: left;
1364
- }
1365
- .yfm .yfm-note > p:last-child {
1366
- margin-bottom: 0;
1367
- }
1368
- .yfm .yfm-note.yfm-accent-info > p:first-child::before {
1369
- 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');
1370
- }
1371
- .yfm .yfm-note.yfm-accent-tip > p:first-child::before {
1372
- 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');
1373
- }
1374
- .yfm .yfm-note.yfm-accent-alert > p:first-child::before {
1375
- 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');
1376
- }
1377
- .yfm .yfm-note.yfm-accent-warning > p:first-child::before {
1378
- 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');
1379
- }
1380
- .yfm .yfm-note.yfm-accent-info {
1381
- background: rgba(2, 123, 243, 0.08);
1382
- }
1383
- .yfm .yfm-note.yfm-accent-tip {
1384
- background: rgba(63, 201, 46, 0.1);
1385
- }
1386
- .yfm .yfm-note.yfm-accent-alert {
1387
- background: rgba(235, 50, 38, 0.08);
1388
- }
1389
- .yfm .yfm-note.yfm-accent-warning {
1390
- background: rgba(255, 136, 0, 0.15);
1391
- }
1392
-
1393
- .g-md-yfm-note-toolbar {
1394
- margin: 2px 8px;
1395
- }
1396
-
1397
- .g-md-toolbar-group__s-button_id_note-type-tip {
1398
- color: #56bd67;
1399
- }
1400
- .g-md-toolbar-group__s-button_id_note-type-info {
1401
- color: #027bf3;
1402
- }
1403
- .g-md-toolbar-group__s-button_id_note-type-alert {
1404
- color: #ff4645;
1405
- }
1406
- .g-md-toolbar-group__s-button_id_note-type-warning {
1407
- color: #f19518;
1408
- }
1409
- .g-md-table-view__hack-strip {
1410
- position: absolute;
1411
- left: -13px;
1412
- display: block;
1413
- width: 13px;
1414
- height: 100%;
1415
- background: transparent;
1416
- }
1417
- .g-md-table-view__wrapper {
1418
- position: relative;
1419
- display: inline-block;
1420
- max-width: calc(100% - 18px);
1421
- margin-right: 18px;
1422
- /* stylelint-disable declaration-no-important */
1423
- margin-bottom: 18px !important;
1424
- }
1425
- .g-md-table-view__buttons-visible .g-md-table-view__plus-button-controls {
1426
- pointer-events: initial;
1427
- opacity: 1;
1428
- }
1429
- .g-md-table-view__plus-button-controls {
1430
- pointer-events: none;
1431
- opacity: 0;
1432
- transition: opacity 150ms ease 50ms;
1433
- }
1434
- .g-md-table-view__plus-button-controls_right {
1435
- position: absolute;
1436
- z-index: 100;
1437
- top: 0;
1438
- right: -18px;
1439
- display: flex;
1440
- align-items: center;
1441
- width: 16px;
1442
- height: 100%;
1443
- }
1444
- .g-md-table-view__plus-button-controls_bottom {
1445
- position: absolute;
1446
- z-index: 100;
1447
- bottom: -18px;
1448
- display: flex;
1449
- justify-content: center;
1450
- width: 100%;
1451
- height: 16px;
1452
- }
1453
- .g-md-table-view__plus-button {
1454
- display: flex;
1455
- justify-content: center;
1456
- align-items: center;
1457
- height: 100%;
1458
- }
1459
- .g-md-table-view__plus-button_right {
1460
- width: 16px;
1461
- height: 100%;
1462
- }
1463
- .g-md-table-view__plus-button_bottom {
1464
- width: 100%;
1465
- height: 16px;
1466
- }
1467
-
1468
- .g-md-table-view.g-md-table-view {
1469
- z-index: unset;
1470
- display: block;
1471
- overflow: auto;
1472
- box-sizing: content-box;
1473
- width: fit-content;
1474
- margin: -13px 0 0 -13px;
1475
- padding: 13px 0 0 13px;
1476
- border: none;
1477
- border-radius: 0;
1478
- background: transparent !important;
1479
- }
1480
- .g-md-table-view.g-md-table-view tbody {
1481
- display: block;
1482
- border-radius: 8px;
1483
- background: var(--g-color-base-background);
1484
- box-shadow: inset 0 0 0 1px var(--g-color-line-generic);
1485
- }
1486
-
1487
- .g-md-table-wrapper {
1488
- display: inline-block;
1489
- width: 100%;
1490
- margin-right: 2px;
1491
- }
1492
- .g-md-table-cell-view__left-button {
1493
- position: absolute;
1494
- z-index: 110;
1495
- top: calc(50% - 14px);
1496
- left: -13px;
1497
- pointer-events: none;
1498
- opacity: 0;
1499
- border-radius: var(--g-border-radius-s);
1500
- background: var(--g-color-base-background);
1501
- }
1502
- .g-md-table-cell-view__left-button:hover {
1503
- pointer-events: initial;
1504
- opacity: 1;
1505
- }
1506
- .g-md-table-cell-view__upper-button {
1507
- position: absolute;
1508
- z-index: 110;
1509
- top: -13px;
1510
- left: calc(50% - 14px);
1511
- pointer-events: none;
1512
- opacity: 0;
1513
- border-radius: var(--g-border-radius-s);
1514
- background: var(--g-color-base-background);
1515
- transform: rotate(90deg);
1516
- }
1517
- .g-md-table-cell-view__upper-button:hover {
1518
- pointer-events: initial;
1519
- opacity: 1;
1520
- }
1521
- .g-md-table-cell-view__upper-visible .g-md-table-cell-view__upper-button {
1522
- pointer-events: initial;
1523
- opacity: 1;
1524
- }
1525
- .g-md-table-cell-view__left-visible .g-md-table-cell-view__left-button {
1526
- pointer-events: initial;
1527
- opacity: 1;
1528
- }
1529
- .g-md-image-tooltip-form__input_type_width, .g-md-image-tooltip-form__input_type_height {
1530
- max-width: 112px;
1531
- }
1532
- .g-md-image-tooltip-form__size-controls {
1533
- display: flex;
1534
- align-items: center;
1535
- gap: 0 16px;
1536
1155
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gravity-ui/markdown-editor",
3
- "version": "13.5.2",
3
+ "version": "13.6.0",
4
4
  "description": "Markdown wysiwyg and markup editor",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -167,7 +167,7 @@
167
167
  "@codemirror/state": "6.4.1",
168
168
  "@codemirror/view": "6.26.3",
169
169
  "@gravity-ui/i18n": "^1.1.0",
170
- "@gravity-ui/icons": "^2.0.0",
170
+ "@gravity-ui/icons": "^2.10.0",
171
171
  "@lezer/highlight": "1.2.0",
172
172
  "@lezer/markdown": "1.3.0",
173
173
  "@types/is-number": "^7.0.1",
@@ -199,6 +199,7 @@
199
199
  "tslib": "^2.3.1"
200
200
  },
201
201
  "devDependencies": {
202
+ "@diplodoc/folding-headings-extension": "0.1.0",
202
203
  "@diplodoc/html-extension": "1.2.7",
203
204
  "@diplodoc/latex-extension": "1.0.3",
204
205
  "@diplodoc/mermaid-extension": "1.2.1",
@@ -252,13 +253,16 @@
252
253
  "typescript": "^4.5.2"
253
254
  },
254
255
  "peerDependenciesMeta": {
255
- "@diplodoc/latex-extension": {
256
+ "@diplodoc/folding-headings-extension": {
256
257
  "optional": true
257
258
  },
258
- "@diplodoc/mermaid-extension": {
259
+ "@diplodoc/html-extension": {
259
260
  "optional": true
260
261
  },
261
- "@diplodoc/html-extension": {
262
+ "@diplodoc/latex-extension": {
263
+ "optional": true
264
+ },
265
+ "@diplodoc/mermaid-extension": {
262
266
  "optional": true
263
267
  },
264
268
  "highlight.js": {
@@ -269,6 +273,7 @@
269
273
  }
270
274
  },
271
275
  "peerDependencies": {
276
+ "@diplodoc/folding-headings-extension": "^0.1.0",
272
277
  "@diplodoc/html-extension": "^1.2.7",
273
278
  "@diplodoc/latex-extension": "^1.0.3",
274
279
  "@diplodoc/mermaid-extension": "^1.0.0",
@@ -1,26 +0,0 @@
1
- .g-md-code-block-toolbar {
2
- margin: 2px 8px;
3
- }
4
-
5
- .g-md-code-tooltip-menu {
6
- min-width: 150px;
7
- border-radius: 4px;
8
- }
9
-
10
- .g-md-code-block__select-popup {
11
- width: 175px;
12
- max-height: 200px;
13
- }
14
- .g-md-code-block__select-popup .g-select-filter {
15
- border-bottom: 1px solid var(--g-color-line-generic);
16
- }
17
- .g-md-code-block__select-popup .g-select-filter .g-text-input__content {
18
- border: none;
19
- }
20
- .g-md-code-block__select-popup .g-md-code-block__select-empty {
21
- margin-left: 4px;
22
- }
23
-
24
- .g-md-code-block__select-button {
25
- margin: auto 0;
26
- }
@@ -1,11 +0,0 @@
1
- .table-cell-floating-button.g-button {
2
- height: 28px;
3
- line-height: 28px;
4
- }
5
- .table-cell-floating-button.g-button .g-button__icon {
6
- width: 12px;
7
- }
8
-
9
- .table-cell-floating-icon {
10
- transform: rotate(90deg);
11
- }
@@ -1,8 +0,0 @@
1
- .g-md-image-skeleton {
2
- vertical-align: middle;
3
- }
4
- .g-md-image-skeleton__skeleton {
5
- width: min(var(--img-skeleton-width) * 1px, 100%);
6
- height: min(var(--img-skeleton-height) * 1px, 700px);
7
- margin-bottom: -5px;
8
- }
@@ -1,12 +0,0 @@
1
- .g-md-image-placeholder {
2
- display: inline-flex;
3
- align-items: center;
4
- column-gap: 8px;
5
- min-width: 300px;
6
- padding: 12px 20px;
7
- border-radius: 4px;
8
- background-color: var(--g-color-base-simple-hover-solid);
9
- font-size: var(--g-text-body-2-font-size);
10
- line-height: var(--g-text-body-2-line-height);
11
- font-weight: var(--g-text-body-font-weight);
12
- }
@@ -1,8 +0,0 @@
1
- .g-md-image-tooltip-form__input_type_width, .g-md-image-tooltip-form__input_type_height {
2
- max-width: 112px;
3
- }
4
- .g-md-image-tooltip-form__size-controls {
5
- display: flex;
6
- align-items: center;
7
- gap: 0 16px;
8
- }
@@ -1,4 +0,0 @@
1
- .g-md-img-size-node-view__wrapper {
2
- position: relative;
3
- display: inline-block;
4
- }
@@ -1,33 +0,0 @@
1
- .g-md-Mermaid {
2
- display: flex;
3
- justify-content: space-between;
4
- margin-bottom: 15px;
5
- padding: 2px;
6
- border: 1px solid var(--g-color-line-generic);
7
- border-radius: var(--g-border-radius-m);
8
- }
9
- .g-md-Mermaid_edit {
10
- display: flex;
11
- }
12
- .g-md-Mermaid__Preview {
13
- flex: 1;
14
- }
15
- .g-md-Mermaid__Error {
16
- flex: 1;
17
- font-family: var(--g-font-family-monospace);
18
- color: var(--g-color-text-danger);
19
- }
20
- .g-md-Mermaid__Editor {
21
- flex: 1;
22
- white-space: nowrap;
23
- caret-color: auto;
24
- }
25
- .g-md-Mermaid__EditorPopover {
26
- z-index: 1;
27
- float: right;
28
- }
29
- .g-md-Mermaid__Controls {
30
- display: flex;
31
- justify-content: end;
32
- margin-top: 5px;
33
- }
@@ -1,3 +0,0 @@
1
- .yfm-cut-title .g-md-yfm-cut-title-inner {
2
- cursor: text;
3
- }
@@ -1,8 +0,0 @@
1
- .g-md-file-skeleton {
2
- display: inline-flex;
3
- align-items: center;
4
- }
5
- .g-md-file-skeleton__skeleton {
6
- width: 120px;
7
- height: 20px;
8
- }
@@ -1,7 +0,0 @@
1
- .g-md-file-placeholder {
2
- margin: 0 4px;
3
- pointer-events: none;
4
- }
5
- .g-md-file-placeholder .yfm-file__icon {
6
- margin-right: 8px;
7
- }
@@ -1,66 +0,0 @@
1
- .g-md-yfm-html-block {
2
- position: relative;
3
- display: flex;
4
- justify-content: space-between;
5
- margin-bottom: 15px;
6
- padding-top: 28px;
7
- border: 1px solid var(--g-color-line-generic);
8
- border-radius: var(--g-border-radius-m);
9
- }
10
- .g-md-yfm-html-block_editing {
11
- display: flex;
12
- padding-top: 0;
13
- border: 0;
14
- }
15
- .g-md-yfm-html-block__label {
16
- position: absolute;
17
- top: 8px;
18
- left: 8px;
19
- }
20
- .g-md-yfm-html-block__menu {
21
- position: absolute;
22
- top: 0;
23
- right: 0;
24
- }
25
- .g-md-yfm-html-block__preview {
26
- flex: 1;
27
- }
28
- .g-md-yfm-html-block__error {
29
- flex: 1;
30
- font-family: var(--g-font-family-monospace);
31
- color: var(--g-color-text-danger);
32
- }
33
- .g-md-yfm-html-block__editor {
34
- flex: 1;
35
- width: 50%;
36
- white-space: nowrap;
37
- caret-color: auto;
38
- }
39
- .g-md-yfm-html-block__editor .g-text-area__content {
40
- font-size: 1em;
41
- color: var(--yfm-color-hljs-subst);
42
- border: 0;
43
- border-radius: var(--g-border-radius-m);
44
- background: var(--yfm-color-hljs-background);
45
- font-feature-settings: normal;
46
- }
47
- .g-md-yfm-html-block__editor .g-text-area__control.g-md-YfmHtmlBlockHelper {
48
- font-family: var(--yfm-font-family-monospace);
49
- }
50
- .g-md-yfm-html-block__editor-popover {
51
- z-index: 1;
52
- float: right;
53
- }
54
- .g-md-yfm-html-block__controls {
55
- display: flex;
56
- justify-content: end;
57
- margin-top: 5px;
58
- }
59
- .g-md-yfm-html-block__content {
60
- flex-grow: 1;
61
- }
62
-
63
- .g-root_theme_dark-hc .g-md-yfm-html-block_editing .g-text-area__content,
64
- .g-root_theme_dark .g-md-yfm-html-block_editing .g-text-area__content {
65
- color: var(--g-color-text-primary);
66
- }