@gravity-ui/markdown-editor 13.6.0 → 13.7.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 (40) hide show
  1. package/build/cjs/extensions/markdown/CodeBlock/CodeBlockHighlight/TooltipPlugin/TooltipView.css +26 -0
  2. package/build/cjs/extensions/markdown/Table/plugins/TableCellContextPlugin/floating.css +11 -0
  3. package/build/cjs/extensions/yfm/FoldingHeading/plugins/folding.css +51 -0
  4. package/build/cjs/extensions/yfm/ImgSize/ImagePaste/skeleton.css +8 -0
  5. package/build/cjs/extensions/yfm/ImgSize/ImageWidget/view.css +12 -0
  6. package/build/cjs/extensions/yfm/ImgSize/plugins/ImgSizeNodeView/ImageForm/ImageForm.css +8 -0
  7. package/build/cjs/extensions/yfm/ImgSize/plugins/ImgSizeNodeView/ImgNodeView.css +4 -0
  8. package/build/cjs/extensions/yfm/Mermaid/MermaidNodeView/Mermaid.css +33 -0
  9. package/build/cjs/extensions/yfm/YfmCut/nodeviews/yfm-cut-title.css +3 -0
  10. package/build/cjs/extensions/yfm/YfmFile/YfmFilePaste/skeleton.css +8 -0
  11. package/build/cjs/extensions/yfm/YfmFile/YfmFileWidget/view.css +7 -0
  12. package/build/cjs/extensions/yfm/YfmHtmlBlock/YfmHtmlBlockNodeView/YfmHtmlBlock.css +66 -0
  13. package/build/cjs/extensions/yfm/YfmNote/plugins/YfmNoteTooltipPlugin/index.css +66 -0
  14. package/build/cjs/extensions/yfm/YfmTable/plugins/YfmTableControls/view.css +83 -0
  15. package/build/cjs/extensions/yfm/YfmTable/plugins/YfmTableControls/yfmTableCellView.css +37 -0
  16. package/build/cjs/markup/codemirror/search-plugin/view/SearchPopup.css +9 -0
  17. package/build/cjs/markup/codemirror/yfm.d.ts +9 -2
  18. package/build/cjs/markup/codemirror/yfm.js +55 -51
  19. package/build/cjs/version.js +1 -1
  20. package/build/esm/extensions/markdown/CodeBlock/CodeBlockHighlight/TooltipPlugin/TooltipView.css +26 -0
  21. package/build/esm/extensions/markdown/Table/plugins/TableCellContextPlugin/floating.css +11 -0
  22. package/build/esm/extensions/yfm/FoldingHeading/plugins/folding.css +51 -0
  23. package/build/esm/extensions/yfm/ImgSize/ImagePaste/skeleton.css +8 -0
  24. package/build/esm/extensions/yfm/ImgSize/ImageWidget/view.css +12 -0
  25. package/build/esm/extensions/yfm/ImgSize/plugins/ImgSizeNodeView/ImageForm/ImageForm.css +8 -0
  26. package/build/esm/extensions/yfm/ImgSize/plugins/ImgSizeNodeView/ImgNodeView.css +4 -0
  27. package/build/esm/extensions/yfm/Mermaid/MermaidNodeView/Mermaid.css +33 -0
  28. package/build/esm/extensions/yfm/YfmCut/nodeviews/yfm-cut-title.css +3 -0
  29. package/build/esm/extensions/yfm/YfmFile/YfmFilePaste/skeleton.css +8 -0
  30. package/build/esm/extensions/yfm/YfmFile/YfmFileWidget/view.css +7 -0
  31. package/build/esm/extensions/yfm/YfmHtmlBlock/YfmHtmlBlockNodeView/YfmHtmlBlock.css +66 -0
  32. package/build/esm/extensions/yfm/YfmNote/plugins/YfmNoteTooltipPlugin/index.css +66 -0
  33. package/build/esm/extensions/yfm/YfmTable/plugins/YfmTableControls/view.css +83 -0
  34. package/build/esm/extensions/yfm/YfmTable/plugins/YfmTableControls/yfmTableCellView.css +37 -0
  35. package/build/esm/markup/codemirror/search-plugin/view/SearchPopup.css +9 -0
  36. package/build/esm/markup/codemirror/yfm.d.ts +9 -2
  37. package/build/esm/markup/codemirror/yfm.js +55 -51
  38. package/build/esm/version.js +1 -1
  39. package/build/styles.css +432 -0
  40. package/package.json +1 -1
package/build/styles.css CHANGED
@@ -1152,4 +1152,436 @@ 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
+ .pm-h-folding-hidden {
1157
+ display: none;
1158
+ }
1159
+
1160
+ .pm-h-folding-content {
1161
+ padding-left: 28px;
1162
+ }
1163
+
1164
+ .pm-h-folding-separator {
1165
+ position: relative;
1166
+ }
1167
+ .pm-h-folding-separator::before {
1168
+ position: absolute;
1169
+ z-index: 1;
1170
+ bottom: -4px;
1171
+ left: 0;
1172
+ width: 12px;
1173
+ height: 12px;
1174
+ content: "";
1175
+ background-color: var(--g-color-text-secondary);
1176
+ mask-image: url('data:image/svg+xml;svg,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="none" viewBox="0 0 16 16"><path fill="currentColor" fill-rule="evenodd" d="M2 7.25a.75.75 0 0 0 0 1.5h5.69l-2.72 2.72a.75.75 0 1 0 1.06 1.06l4-4a.75.75 0 0 0 0-1.06l-4-4a.75.75 0 0 0-1.06 1.06l2.72 2.72zm7.47 4.22a.75.75 0 1 0 1.06 1.06l4-4a.75.75 0 0 0 0-1.06l-4-4a.75.75 0 1 0-1.06 1.06L12.94 8z" clip-rule="evenodd"/></svg>');
1177
+ mask-size: 12px;
1178
+ transform: translateY(80%);
1179
+ }
1180
+ .pm-h-folding-separator::after {
1181
+ position: absolute;
1182
+ z-index: 1;
1183
+ bottom: -8px;
1184
+ left: 16px;
1185
+ display: block;
1186
+ width: calc(100% - 16px - 56px - 6px);
1187
+ content: "";
1188
+ border-top: 1px dashed var(--g-color-line-generic);
1189
+ }
1190
+
1191
+ .pm-h-folding-label::after {
1192
+ position: absolute;
1193
+ z-index: 1;
1194
+ right: 2px;
1195
+ bottom: -6px;
1196
+ display: block;
1197
+ padding: 0 8px;
1198
+ content: attr(data-value);
1199
+ color: var(--g-color-text-misc);
1200
+ border-radius: 4px;
1201
+ background-color: var(--g-color-base-misc-medium-hover);
1202
+ transform: translate(0, 50%);
1203
+ font-size: var(--g-text-body-1-font-size);
1204
+ line-height: var(--g-text-body-1-line-height);
1205
+ font-weight: var(--g-text-body-font-weight);
1206
+ }
1207
+ .g-md-image-skeleton {
1208
+ vertical-align: middle;
1209
+ }
1210
+ .g-md-image-skeleton__skeleton {
1211
+ width: min(var(--img-skeleton-width) * 1px, 100%);
1212
+ height: min(var(--img-skeleton-height) * 1px, 700px);
1213
+ margin-bottom: -5px;
1214
+ }
1215
+ .g-md-image-placeholder {
1216
+ display: inline-flex;
1217
+ align-items: center;
1218
+ column-gap: 8px;
1219
+ min-width: 300px;
1220
+ padding: 12px 20px;
1221
+ border-radius: 4px;
1222
+ background-color: var(--g-color-base-simple-hover-solid);
1223
+ font-size: var(--g-text-body-2-font-size);
1224
+ line-height: var(--g-text-body-2-line-height);
1225
+ font-weight: var(--g-text-body-font-weight);
1226
+ }
1227
+ .g-md-Mermaid {
1228
+ display: flex;
1229
+ justify-content: space-between;
1230
+ margin-bottom: 15px;
1231
+ padding: 2px;
1232
+ border: 1px solid var(--g-color-line-generic);
1233
+ border-radius: var(--g-border-radius-m);
1234
+ }
1235
+ .g-md-Mermaid_edit {
1236
+ display: flex;
1237
+ }
1238
+ .g-md-Mermaid__Preview {
1239
+ flex: 1;
1240
+ }
1241
+ .g-md-Mermaid__Error {
1242
+ flex: 1;
1243
+ font-family: var(--g-font-family-monospace);
1244
+ color: var(--g-color-text-danger);
1245
+ }
1246
+ .g-md-Mermaid__Editor {
1247
+ flex: 1;
1248
+ white-space: nowrap;
1249
+ caret-color: auto;
1250
+ }
1251
+ .g-md-Mermaid__EditorPopover {
1252
+ z-index: 1;
1253
+ float: right;
1254
+ }
1255
+ .g-md-Mermaid__Controls {
1256
+ display: flex;
1257
+ justify-content: end;
1258
+ margin-top: 5px;
1259
+ }
1260
+ .yfm-cut-title .g-md-yfm-cut-title-inner {
1261
+ cursor: text;
1262
+ }
1263
+ .g-md-file-skeleton {
1264
+ display: inline-flex;
1265
+ align-items: center;
1266
+ }
1267
+ .g-md-file-skeleton__skeleton {
1268
+ width: 120px;
1269
+ height: 20px;
1270
+ }
1271
+ .g-md-file-placeholder {
1272
+ margin: 0 4px;
1273
+ pointer-events: none;
1274
+ }
1275
+ .g-md-file-placeholder .yfm-file__icon {
1276
+ margin-right: 8px;
1277
+ }
1278
+ .g-md-yfm-html-block {
1279
+ position: relative;
1280
+ display: flex;
1281
+ justify-content: space-between;
1282
+ margin-bottom: 15px;
1283
+ padding-top: 28px;
1284
+ border: 1px solid var(--g-color-line-generic);
1285
+ border-radius: var(--g-border-radius-m);
1286
+ }
1287
+ .g-md-yfm-html-block_editing {
1288
+ display: flex;
1289
+ padding-top: 0;
1290
+ border: 0;
1291
+ }
1292
+ .g-md-yfm-html-block__label {
1293
+ position: absolute;
1294
+ top: 8px;
1295
+ left: 8px;
1296
+ }
1297
+ .g-md-yfm-html-block__menu {
1298
+ position: absolute;
1299
+ top: 0;
1300
+ right: 0;
1301
+ }
1302
+ .g-md-yfm-html-block__preview {
1303
+ flex: 1;
1304
+ }
1305
+ .g-md-yfm-html-block__error {
1306
+ flex: 1;
1307
+ font-family: var(--g-font-family-monospace);
1308
+ color: var(--g-color-text-danger);
1309
+ }
1310
+ .g-md-yfm-html-block__editor {
1311
+ flex: 1;
1312
+ width: 50%;
1313
+ white-space: nowrap;
1314
+ caret-color: auto;
1315
+ }
1316
+ .g-md-yfm-html-block__editor .g-text-area__content {
1317
+ font-size: 1em;
1318
+ color: var(--yfm-color-hljs-subst);
1319
+ border: 0;
1320
+ border-radius: var(--g-border-radius-m);
1321
+ background: var(--yfm-color-hljs-background);
1322
+ font-feature-settings: normal;
1323
+ }
1324
+ .g-md-yfm-html-block__editor .g-text-area__control.g-md-YfmHtmlBlockHelper {
1325
+ font-family: var(--yfm-font-family-monospace);
1326
+ }
1327
+ .g-md-yfm-html-block__editor-popover {
1328
+ z-index: 1;
1329
+ float: right;
1330
+ }
1331
+ .g-md-yfm-html-block__controls {
1332
+ display: flex;
1333
+ justify-content: end;
1334
+ margin-top: 5px;
1335
+ }
1336
+ .g-md-yfm-html-block__content {
1337
+ flex-grow: 1;
1338
+ }
1339
+
1340
+ .g-root_theme_dark-hc .g-md-yfm-html-block_editing .g-text-area__content,
1341
+ .g-root_theme_dark .g-md-yfm-html-block_editing .g-text-area__content {
1342
+ color: var(--g-color-text-primary);
1343
+ }
1344
+ .g-md-search-card {
1345
+ padding: var(--g-spacing-2) var(--g-spacing-2) var(--g-spacing-3) var(--g-spacing-4);
1346
+ }
1347
+ .g-md-search-card__header {
1348
+ display: flex;
1349
+ justify-content: space-between;
1350
+ align-items: center;
1351
+ margin-bottom: var(--g-spacing-1);
1352
+ }
1353
+ .g-md-code-block-toolbar {
1354
+ margin: 2px 8px;
1355
+ }
1356
+
1357
+ .g-md-code-tooltip-menu {
1358
+ min-width: 150px;
1359
+ border-radius: 4px;
1360
+ }
1361
+
1362
+ .g-md-code-block__select-popup {
1363
+ width: 175px;
1364
+ max-height: 200px;
1365
+ }
1366
+ .g-md-code-block__select-popup .g-select-filter {
1367
+ border-bottom: 1px solid var(--g-color-line-generic);
1368
+ }
1369
+ .g-md-code-block__select-popup .g-select-filter .g-text-input__content {
1370
+ border: none;
1371
+ }
1372
+ .g-md-code-block__select-popup .g-md-code-block__select-empty {
1373
+ margin-left: 4px;
1374
+ }
1375
+
1376
+ .g-md-code-block__select-button {
1377
+ margin: auto 0;
1378
+ }
1379
+ .table-cell-floating-button.g-button {
1380
+ height: 28px;
1381
+ line-height: 28px;
1382
+ }
1383
+ .table-cell-floating-button.g-button .g-button__icon {
1384
+ width: 12px;
1385
+ }
1386
+
1387
+ .table-cell-floating-icon {
1388
+ transform: rotate(90deg);
1389
+ }
1390
+ .g-md-img-size-node-view__wrapper {
1391
+ position: relative;
1392
+ display: inline-block;
1393
+ }
1394
+ .yfm .yfm-note {
1395
+ max-width: 1296px;
1396
+ margin: 20px 0;
1397
+ padding: 20px 20px 20px 64px;
1398
+ border-radius: 10px;
1399
+ }
1400
+ .yfm .yfm-note .yfm-note-title {
1401
+ font-weight: 700;
1402
+ }
1403
+ .yfm .yfm-note > p {
1404
+ margin: 0 0 10px 0;
1405
+ }
1406
+ .yfm .yfm-note > p:first-child::before {
1407
+ box-sizing: content-box;
1408
+ display: block;
1409
+ width: 24px;
1410
+ height: 24px;
1411
+ margin-top: -2px;
1412
+ margin-left: -44px;
1413
+ padding-right: 20px;
1414
+ float: left;
1415
+ }
1416
+ .yfm .yfm-note > p:last-child {
1417
+ margin-bottom: 0;
1418
+ }
1419
+ .yfm .yfm-note.yfm-accent-info > p:first-child::before {
1420
+ 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');
1421
+ }
1422
+ .yfm .yfm-note.yfm-accent-tip > p:first-child::before {
1423
+ 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');
1424
+ }
1425
+ .yfm .yfm-note.yfm-accent-alert > p:first-child::before {
1426
+ 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');
1427
+ }
1428
+ .yfm .yfm-note.yfm-accent-warning > p:first-child::before {
1429
+ 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');
1430
+ }
1431
+ .yfm .yfm-note.yfm-accent-info {
1432
+ background: rgba(2, 123, 243, 0.08);
1433
+ }
1434
+ .yfm .yfm-note.yfm-accent-tip {
1435
+ background: rgba(63, 201, 46, 0.1);
1436
+ }
1437
+ .yfm .yfm-note.yfm-accent-alert {
1438
+ background: rgba(235, 50, 38, 0.08);
1439
+ }
1440
+ .yfm .yfm-note.yfm-accent-warning {
1441
+ background: rgba(255, 136, 0, 0.15);
1442
+ }
1443
+
1444
+ .g-md-yfm-note-toolbar {
1445
+ margin: 2px 8px;
1446
+ }
1447
+
1448
+ .g-md-toolbar-group__s-button_id_note-type-tip {
1449
+ color: #56bd67;
1450
+ }
1451
+ .g-md-toolbar-group__s-button_id_note-type-info {
1452
+ color: #027bf3;
1453
+ }
1454
+ .g-md-toolbar-group__s-button_id_note-type-alert {
1455
+ color: #ff4645;
1456
+ }
1457
+ .g-md-toolbar-group__s-button_id_note-type-warning {
1458
+ color: #f19518;
1459
+ }
1460
+ .g-md-table-view__hack-strip {
1461
+ position: absolute;
1462
+ left: -13px;
1463
+ display: block;
1464
+ width: 13px;
1465
+ height: 100%;
1466
+ background: transparent;
1467
+ }
1468
+ .g-md-table-view__wrapper {
1469
+ position: relative;
1470
+ display: inline-block;
1471
+ max-width: calc(100% - 18px);
1472
+ margin-right: 18px;
1473
+ /* stylelint-disable declaration-no-important */
1474
+ margin-bottom: 18px !important;
1475
+ }
1476
+ .g-md-table-view__buttons-visible .g-md-table-view__plus-button-controls {
1477
+ pointer-events: initial;
1478
+ opacity: 1;
1479
+ }
1480
+ .g-md-table-view__plus-button-controls {
1481
+ pointer-events: none;
1482
+ opacity: 0;
1483
+ transition: opacity 150ms ease 50ms;
1484
+ }
1485
+ .g-md-table-view__plus-button-controls_right {
1486
+ position: absolute;
1487
+ z-index: 100;
1488
+ top: 0;
1489
+ right: -18px;
1490
+ display: flex;
1491
+ align-items: center;
1492
+ width: 16px;
1493
+ height: 100%;
1494
+ }
1495
+ .g-md-table-view__plus-button-controls_bottom {
1496
+ position: absolute;
1497
+ z-index: 100;
1498
+ bottom: -18px;
1499
+ display: flex;
1500
+ justify-content: center;
1501
+ width: 100%;
1502
+ height: 16px;
1503
+ }
1504
+ .g-md-table-view__plus-button {
1505
+ display: flex;
1506
+ justify-content: center;
1507
+ align-items: center;
1508
+ height: 100%;
1509
+ }
1510
+ .g-md-table-view__plus-button_right {
1511
+ width: 16px;
1512
+ height: 100%;
1513
+ }
1514
+ .g-md-table-view__plus-button_bottom {
1515
+ width: 100%;
1516
+ height: 16px;
1517
+ }
1518
+
1519
+ .g-md-table-view.g-md-table-view {
1520
+ z-index: unset;
1521
+ display: block;
1522
+ overflow: auto;
1523
+ box-sizing: content-box;
1524
+ width: fit-content;
1525
+ margin: -13px 0 0 -13px;
1526
+ padding: 13px 0 0 13px;
1527
+ border: none;
1528
+ border-radius: 0;
1529
+ background: transparent !important;
1530
+ }
1531
+ .g-md-table-view.g-md-table-view tbody {
1532
+ display: block;
1533
+ border-radius: 8px;
1534
+ background: var(--g-color-base-background);
1535
+ box-shadow: inset 0 0 0 1px var(--g-color-line-generic);
1536
+ }
1537
+
1538
+ .g-md-table-wrapper {
1539
+ display: inline-block;
1540
+ width: 100%;
1541
+ margin-right: 2px;
1542
+ }
1543
+ .g-md-table-cell-view__left-button {
1544
+ position: absolute;
1545
+ z-index: 110;
1546
+ top: calc(50% - 14px);
1547
+ left: -13px;
1548
+ pointer-events: none;
1549
+ opacity: 0;
1550
+ border-radius: var(--g-border-radius-s);
1551
+ background: var(--g-color-base-background);
1552
+ }
1553
+ .g-md-table-cell-view__left-button:hover {
1554
+ pointer-events: initial;
1555
+ opacity: 1;
1556
+ }
1557
+ .g-md-table-cell-view__upper-button {
1558
+ position: absolute;
1559
+ z-index: 110;
1560
+ top: -13px;
1561
+ left: calc(50% - 14px);
1562
+ pointer-events: none;
1563
+ opacity: 0;
1564
+ border-radius: var(--g-border-radius-s);
1565
+ background: var(--g-color-base-background);
1566
+ transform: rotate(90deg);
1567
+ }
1568
+ .g-md-table-cell-view__upper-button:hover {
1569
+ pointer-events: initial;
1570
+ opacity: 1;
1571
+ }
1572
+ .g-md-table-cell-view__upper-visible .g-md-table-cell-view__upper-button {
1573
+ pointer-events: initial;
1574
+ opacity: 1;
1575
+ }
1576
+ .g-md-table-cell-view__left-visible .g-md-table-cell-view__left-button {
1577
+ pointer-events: initial;
1578
+ opacity: 1;
1579
+ }
1580
+ .g-md-image-tooltip-form__input_type_width, .g-md-image-tooltip-form__input_type_height {
1581
+ max-width: 112px;
1582
+ }
1583
+ .g-md-image-tooltip-form__size-controls {
1584
+ display: flex;
1585
+ align-items: center;
1586
+ gap: 0 16px;
1155
1587
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gravity-ui/markdown-editor",
3
- "version": "13.6.0",
3
+ "version": "13.7.0",
4
4
  "description": "Markdown wysiwyg and markup editor",
5
5
  "license": "MIT",
6
6
  "repository": {