@memorysmithapp/markdown-renderer 0.3.1 → 0.3.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.
package/dist/theme.d.ts CHANGED
@@ -53,6 +53,8 @@ export interface ThemeProperties {
53
53
  readonly calloutStop?: string;
54
54
  readonly calloutAside?: string;
55
55
  readonly calloutQuote?: string;
56
+ readonly calloutTitleLinkDecoration?: string;
57
+ readonly calloutTitleLinkOffset?: string;
56
58
  readonly iconNote?: string;
57
59
  readonly iconInfo?: string;
58
60
  readonly iconSummary?: string;
package/dist/theme.js CHANGED
@@ -26,6 +26,7 @@ export const THEME_PROPERTIES = Object.keys({
26
26
  codeBg: 1, codeColor: 1, codeBorder: 1, inlineCodeBg: 1, inlineCodePadding: 1,
27
27
  tokenKeyword: 1, tokenString: 1, tokenNumber: 1, tokenComment: 1, tokenPunctuation: 1,
28
28
  calloutInfo: 1, calloutIdea: 1, calloutDone: 1, calloutWarn: 1, calloutStop: 1, calloutAside: 1, calloutQuote: 1,
29
+ calloutTitleLinkDecoration: 1, calloutTitleLinkOffset: 1,
29
30
  iconNote: 1, iconInfo: 1, iconSummary: 1, iconTip: 1, iconSuccess: 1, iconQuestion: 1, iconWarning: 1,
30
31
  iconFailure: 1, iconDanger: 1, iconExample: 1, iconQuote: 1,
31
32
  fontSans: 1, fontDisplay: 1, fontMono: 1, fontHeading: 1,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@memorysmithapp/markdown-renderer",
3
- "version": "0.3.1",
3
+ "version": "0.3.2",
4
4
  "description": "A React component that draws a MemorySmith note exactly as MemorySmith's reading page does.",
5
5
  "keywords": [
6
6
  "markdown",
@@ -67,7 +67,7 @@
67
67
  "unified": "11.0.5"
68
68
  },
69
69
  "devDependencies": {
70
- "@memorysmithapp/markdown-spec": "0.3.1",
70
+ "@memorysmithapp/markdown-spec": "0.3.2",
71
71
  "@types/hast": "3.0.5",
72
72
  "@types/react": "19.2.18",
73
73
  "@types/react-dom": "19.2.4",
package/theme-default.css CHANGED
@@ -61,6 +61,11 @@
61
61
  --ms-callout-stop: var(--markdown-callout-stop, 180, 35, 24);
62
62
  --ms-callout-aside: var(--markdown-callout-aside, 109, 40, 217);
63
63
  --ms-callout-quote: var(--markdown-callout-quote, 84, 93, 115);
64
+ /* A link in a callout title is underlined: the title is in the callout's
65
+ colour and weight, and the blue family's colour is the accent's, so a link
66
+ there would read as more of the title. */
67
+ --ms-callout-title-link-decoration: var(--markdown-callout-title-link-decoration, underline 1px);
68
+ --ms-callout-title-link-offset: var(--markdown-callout-title-link-offset, 0.15em);
64
69
  --ms-font-sans: var(--markdown-font-sans, 'Inter', 'Segoe UI', system-ui, sans-serif);
65
70
  --ms-font-display: var(--markdown-font-display, 'Space Grotesk', 'Segoe UI', system-ui, sans-serif);
66
71
  --ms-font-mono: var(--markdown-font-mono, ui-monospace, 'Cascadia Code', Consolas, monospace);
@@ -583,6 +588,13 @@
583
588
  font-weight: 600;
584
589
  line-height: var(--ms-line-height-tight);
585
590
  }
591
+ /* A link in the title is marked by more than its colour, which may be the
592
+ title's own; a pending link keeps its dashed rule, and a footnote's number
593
+ its own look. */
594
+ .markdown .callout-title :is(a, .wikilink):not(.wikilink-pending, [data-footnote-ref]) {
595
+ text-decoration: var(--ms-callout-title-link-decoration);
596
+ text-underline-offset: var(--ms-callout-title-link-offset);
597
+ }
586
598
  .markdown .callout-title::before {
587
599
  content: '';
588
600
  flex: 0 0 auto;