@memorysmithapp/markdown-renderer 0.8.5 → 0.10.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.
package/theme-default.css CHANGED
@@ -33,6 +33,9 @@
33
33
  --ms-text-soft: var(--markdown-text-soft, #545d73);
34
34
  --ms-accent: var(--markdown-accent, #0f56d7);
35
35
  --ms-pending: var(--markdown-pending, #a6ab9f);
36
+ /* A parameter of a model, the violet of an aside: distinct from a link's
37
+ blue and a pending link's grey, and its text holds 5:1 on its own tint. */
38
+ --ms-parameter: var(--markdown-parameter, 109, 40, 217);
36
39
  --ms-code-bg: var(--markdown-code-bg, #f4f5f2);
37
40
  /* Muted, as the default theme sets inline code: the soft text of the
38
41
  surface. Inline code has no fill, so it sits on the paper or on the tint
@@ -165,6 +168,7 @@
165
168
  --ms-text-soft: var(--markdown-text-soft, #93a0ba);
166
169
  --ms-accent: var(--markdown-accent, #4c8dff);
167
170
  --ms-pending: var(--markdown-pending, #5d6880);
171
+ --ms-parameter: var(--markdown-parameter, 167, 139, 250);
168
172
  --ms-code-bg: var(--markdown-code-bg, #0e1728);
169
173
  --ms-token-keyword: var(--markdown-token-keyword, #4c8dff);
170
174
  --ms-token-string: var(--markdown-token-string, #f0a05a);
@@ -456,6 +460,133 @@
456
460
  background: rgba(var(--callout-color), 0.08);
457
461
  }
458
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
+
459
590
  .markdown hr {
460
591
  margin-block: calc(var(--ms-p-spacing) * 2);
461
592
  border: 0;
@@ -732,6 +863,30 @@
732
863
  cursor: pointer;
733
864
  }
734
865
 
866
+ /* A parameter of a model, `{{name}}` (§7.14): drawn as what it is, a place a
867
+ value goes, and never as broken text. The braces stay, so what is copied is
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] {
872
+ color: rgb(var(--ms-parameter));
873
+ background: rgba(var(--ms-parameter), 0.12);
874
+ border-radius: 4px;
875
+ padding: 0 0.2em;
876
+ font-weight: 500;
877
+ -webkit-box-decoration-break: clone;
878
+ box-decoration-break: clone;
879
+ }
880
+ .markdown .wikilink-parameter {
881
+ font-weight: 600;
882
+ cursor: default;
883
+ }
884
+ /* Marked, it takes the mark's ink: the parameter's violet on the mark's yellow
885
+ holds no contrast in the dark. Its tint still says what it is. */
886
+ .markdown mark .parameter[data-parameter] {
887
+ color: inherit;
888
+ }
889
+
735
890
  /* The choice a link to several notes opens. A dialog opened with showModal()
736
891
  lives in the top layer, which no ancestor clips and no stacking context
737
892
  reaches; it is still under `.markdown` in the document, so it takes the
@@ -1818,6 +1973,16 @@
1818
1973
  color: var(--ms-pending);
1819
1974
  border-bottom: 1px dashed var(--ms-pending);
1820
1975
  }
1976
+ .markdown .cm-ms-parameter,
1977
+ .markdown .cm-ms-wikilink.cm-ms-wikilink-parameter {
1978
+ /* A link to a parameter leads nowhere yet: it takes the parameter's colour,
1979
+ as on the page, and not a link's. */
1980
+ color: rgb(var(--ms-parameter));
1981
+ }
1982
+ .markdown .cm-ms-parameter {
1983
+ background: rgba(var(--ms-parameter), 0.12);
1984
+ border-radius: 4px;
1985
+ }
1821
1986
  .markdown .cm-ms-bullet {
1822
1987
  display: inline-block;
1823
1988
  width: 1em;