@memorysmithapp/markdown-renderer 0.9.0 → 0.10.1
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/README.md +4 -2
- package/dist/DataTable.d.ts +37 -0
- package/dist/DataTable.js +149 -0
- package/dist/Markdown.js +13 -7
- package/dist/diagnose.d.ts +9 -1
- package/dist/diagnose.js +21 -0
- package/dist/edit/live.js +7 -0
- package/dist/host.d.ts +21 -0
- package/dist/host.js +4 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/strings.d.ts +23 -0
- package/dist/strings.js +24 -0
- package/dist/table-block.d.ts +170 -0
- package/dist/table-block.js +553 -0
- package/package.json +2 -2
- package/theme-default.css +136 -5
package/theme-default.css
CHANGED
|
@@ -460,6 +460,133 @@
|
|
|
460
460
|
background: rgba(var(--callout-color), 0.08);
|
|
461
461
|
}
|
|
462
462
|
|
|
463
|
+
/* A `table` block drawn as its table (§7.15): the note's table, with a header
|
|
464
|
+
that sorts for the reader alone, numbers to the end of their cells, the
|
|
465
|
+
total under its column, and the count and the pages under the table. */
|
|
466
|
+
.markdown .data-table {
|
|
467
|
+
margin-block: var(--ms-p-spacing);
|
|
468
|
+
}
|
|
469
|
+
.markdown .data-table table {
|
|
470
|
+
margin-block: 0;
|
|
471
|
+
}
|
|
472
|
+
.markdown .data-table th {
|
|
473
|
+
padding: 0;
|
|
474
|
+
}
|
|
475
|
+
.markdown .data-table-sort {
|
|
476
|
+
all: unset;
|
|
477
|
+
box-sizing: border-box;
|
|
478
|
+
display: block;
|
|
479
|
+
width: 100%;
|
|
480
|
+
padding: var(--ms-table-cell-padding);
|
|
481
|
+
cursor: pointer;
|
|
482
|
+
text-align: inherit;
|
|
483
|
+
}
|
|
484
|
+
.markdown .data-table-sort:focus-visible {
|
|
485
|
+
outline: 2px solid var(--ms-accent);
|
|
486
|
+
outline-offset: -2px;
|
|
487
|
+
}
|
|
488
|
+
.markdown .data-table .data-table-number {
|
|
489
|
+
text-align: end;
|
|
490
|
+
font-variant-numeric: tabular-nums;
|
|
491
|
+
}
|
|
492
|
+
.markdown .data-table .data-table-date {
|
|
493
|
+
white-space: nowrap;
|
|
494
|
+
}
|
|
495
|
+
.markdown .data-table tfoot td {
|
|
496
|
+
font-weight: 600;
|
|
497
|
+
border-top: var(--ms-table-header-rule);
|
|
498
|
+
}
|
|
499
|
+
.markdown .data-table-empty {
|
|
500
|
+
color: var(--ms-text-soft);
|
|
501
|
+
font-style: italic;
|
|
502
|
+
}
|
|
503
|
+
.markdown .data-table[aria-busy='true'] tbody {
|
|
504
|
+
opacity: 0.6;
|
|
505
|
+
}
|
|
506
|
+
.markdown .data-table-loading {
|
|
507
|
+
color: var(--ms-text-soft);
|
|
508
|
+
}
|
|
509
|
+
/* A block that cannot be answered says why, in place of its table. */
|
|
510
|
+
.markdown .data-table-problems {
|
|
511
|
+
margin-block: var(--ms-p-spacing);
|
|
512
|
+
padding: 0.5rem 0.75rem;
|
|
513
|
+
border: 1px solid var(--ms-border);
|
|
514
|
+
border-inline-start: 3px solid var(--ms-pending);
|
|
515
|
+
border-radius: 6px;
|
|
516
|
+
}
|
|
517
|
+
.markdown .data-table-problems ul {
|
|
518
|
+
margin: 0;
|
|
519
|
+
padding: 0;
|
|
520
|
+
list-style: none;
|
|
521
|
+
}
|
|
522
|
+
.markdown .data-table-problems code {
|
|
523
|
+
display: block;
|
|
524
|
+
margin-top: 0.15rem;
|
|
525
|
+
overflow-wrap: anywhere;
|
|
526
|
+
}
|
|
527
|
+
.markdown .data-table-failed > p {
|
|
528
|
+
margin-block: var(--ms-p-spacing) 0;
|
|
529
|
+
color: var(--ms-text-soft);
|
|
530
|
+
}
|
|
531
|
+
/* On paper a table is a table: `display: block`, which lets it scroll on a
|
|
532
|
+
screen, is what would stop the header repeating on each page. */
|
|
533
|
+
.markdown .data-table-printing table {
|
|
534
|
+
display: table;
|
|
535
|
+
width: 100%;
|
|
536
|
+
}
|
|
537
|
+
.markdown .data-table-printing thead {
|
|
538
|
+
display: table-header-group;
|
|
539
|
+
}
|
|
540
|
+
.markdown .data-table-printing tr {
|
|
541
|
+
break-inside: avoid;
|
|
542
|
+
}
|
|
543
|
+
.markdown .data-table-printed {
|
|
544
|
+
margin-block: 0.4rem 0;
|
|
545
|
+
font-size: 0.875em;
|
|
546
|
+
color: var(--ms-text-soft);
|
|
547
|
+
}
|
|
548
|
+
@media print {
|
|
549
|
+
.markdown .data-table table {
|
|
550
|
+
display: table;
|
|
551
|
+
width: 100%;
|
|
552
|
+
}
|
|
553
|
+
.markdown .data-table thead {
|
|
554
|
+
display: table-header-group;
|
|
555
|
+
}
|
|
556
|
+
.markdown .data-table-page,
|
|
557
|
+
.markdown .data-table-sort span {
|
|
558
|
+
display: none;
|
|
559
|
+
}
|
|
560
|
+
}
|
|
561
|
+
.markdown .data-table-footer {
|
|
562
|
+
display: flex;
|
|
563
|
+
flex-wrap: wrap;
|
|
564
|
+
justify-content: space-between;
|
|
565
|
+
align-items: center;
|
|
566
|
+
gap: 0.5rem;
|
|
567
|
+
margin-top: 0.4rem;
|
|
568
|
+
font-size: 0.875em;
|
|
569
|
+
color: var(--ms-text-soft);
|
|
570
|
+
}
|
|
571
|
+
.markdown .data-table-pages {
|
|
572
|
+
display: inline-flex;
|
|
573
|
+
align-items: center;
|
|
574
|
+
gap: 0.5rem;
|
|
575
|
+
}
|
|
576
|
+
.markdown .data-table-page {
|
|
577
|
+
min-width: 2rem;
|
|
578
|
+
min-height: 2rem;
|
|
579
|
+
border: 1px solid var(--ms-border);
|
|
580
|
+
border-radius: 6px;
|
|
581
|
+
background: var(--ms-surface);
|
|
582
|
+
color: var(--ms-text);
|
|
583
|
+
cursor: pointer;
|
|
584
|
+
}
|
|
585
|
+
.markdown .data-table-page:disabled {
|
|
586
|
+
cursor: default;
|
|
587
|
+
opacity: 0.4;
|
|
588
|
+
}
|
|
589
|
+
|
|
463
590
|
.markdown hr {
|
|
464
591
|
margin-block: calc(var(--ms-p-spacing) * 2);
|
|
465
592
|
border: 0;
|
|
@@ -738,8 +865,10 @@
|
|
|
738
865
|
|
|
739
866
|
/* A parameter of a model, `{{name}}` (§7.14): drawn as what it is, a place a
|
|
740
867
|
value goes, and never as broken text. The braces stay, so what is copied is
|
|
741
|
-
what was typed. A wikilink to one leads nowhere yet, so it is not a link.
|
|
742
|
-
|
|
868
|
+
what was typed. A wikilink to one leads nowhere yet, so it is not a link.
|
|
869
|
+
Named by its attribute: Prism calls a shell flag `token parameter`, and a
|
|
870
|
+
flag is code, not a parameter (#140). */
|
|
871
|
+
.markdown .parameter[data-parameter] {
|
|
743
872
|
color: rgb(var(--ms-parameter));
|
|
744
873
|
background: rgba(var(--ms-parameter), 0.12);
|
|
745
874
|
border-radius: 4px;
|
|
@@ -754,7 +883,7 @@
|
|
|
754
883
|
}
|
|
755
884
|
/* Marked, it takes the mark's ink: the parameter's violet on the mark's yellow
|
|
756
885
|
holds no contrast in the dark. Its tint still says what it is. */
|
|
757
|
-
.markdown mark .parameter {
|
|
886
|
+
.markdown mark .parameter[data-parameter] {
|
|
758
887
|
color: inherit;
|
|
759
888
|
}
|
|
760
889
|
|
|
@@ -1057,10 +1186,12 @@
|
|
|
1057
1186
|
line-height: 1.5;
|
|
1058
1187
|
}
|
|
1059
1188
|
|
|
1060
|
-
/* A task box that can be ticked. Disabled is the default.
|
|
1189
|
+
/* A task box that can be ticked. Disabled is the default. The item starts
|
|
1190
|
+
where its list's indent puts it, as a plain item's marker does, and is never
|
|
1191
|
+
pulled out of it: a pull lands past the edge of a container with little
|
|
1192
|
+
padding (#142). */
|
|
1061
1193
|
.markdown li.task-item {
|
|
1062
1194
|
list-style: none;
|
|
1063
|
-
margin-left: -1.2rem;
|
|
1064
1195
|
}
|
|
1065
1196
|
.markdown li.task-item input[type='checkbox'] {
|
|
1066
1197
|
margin-right: 0.5rem;
|