autumnnote 1.10.0 → 1.11.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/dist/autumnnote.css +40 -0
- package/dist/autumnnote.es.js +298 -56
- package/dist/autumnnote.es.js.map +1 -1
- package/dist/autumnnote.umd.js +298 -56
- package/dist/autumnnote.umd.js.map +1 -1
- package/package.json +1 -1
- package/src/js/core/markdown.js +282 -61
- package/src/js/index.js +1 -1
- package/src/js/module/Clipboard.js +69 -11
- package/src/styles/autumnnote.scss +23 -0
- package/types/index.d.ts +1 -1
|
@@ -459,8 +459,24 @@
|
|
|
459
459
|
// Content styles
|
|
460
460
|
p { margin: 0 0 0.75em; }
|
|
461
461
|
h1, h2, h3, h4, h5, h6 { margin: 0.5em 0; line-height: 1.3; }
|
|
462
|
+
h1 { font-size: 2em; }
|
|
463
|
+
h2 { font-size: 1.5em; }
|
|
464
|
+
h3 { font-size: 1.25em; }
|
|
465
|
+
h4 { font-size: 1.1em; }
|
|
466
|
+
h5 { font-size: 1em; }
|
|
467
|
+
h6 { font-size: 0.875em; }
|
|
462
468
|
ul, ol { margin: 0 0 0.75em 0; padding-left: 1.5em; list-style-position: inside; }
|
|
463
469
|
li { margin-bottom: 0.25em; }
|
|
470
|
+
|
|
471
|
+
// Loose lists (markdown paste wraps item text in <p>): keep the list marker
|
|
472
|
+
// on the same line as the first paragraph (list-style-position: inside puts
|
|
473
|
+
// it in the inline flow), and use tighter margins than standalone <p>.
|
|
474
|
+
li > p {
|
|
475
|
+
margin: 0 0 0.5em;
|
|
476
|
+
&:first-child { display: inline; }
|
|
477
|
+
&:last-child { margin-bottom: 0; }
|
|
478
|
+
}
|
|
479
|
+
li:has(> p) { margin-bottom: 0.6em; }
|
|
464
480
|
blockquote {
|
|
465
481
|
margin: 0.5em 0 0.5em 1em;
|
|
466
482
|
padding: 0.5em 1em;
|
|
@@ -475,6 +491,9 @@
|
|
|
475
491
|
}
|
|
476
492
|
pre { padding: 0.75em 1em; overflow-x: auto; }
|
|
477
493
|
code { padding: 0.1em 0.3em; }
|
|
494
|
+
// Inside <pre> the wrapper already paints the background — reset the inner
|
|
495
|
+
// <code> so a plain (non-Prism) code fence isn't double-tinted.
|
|
496
|
+
pre > code { background: transparent; padding: 0; }
|
|
478
497
|
|
|
479
498
|
// Prism-highlighted blocks — <pre> gets class="language-*" mirrored from <code>
|
|
480
499
|
// Set dark background here as fallback for before Prism CSS loads from CDN.
|
|
@@ -1981,6 +2000,8 @@ $an-video-accent: #8b5cf6; // violet-500
|
|
|
1981
2000
|
color: #cdd6f4;
|
|
1982
2001
|
}
|
|
1983
2002
|
|
|
2003
|
+
pre:not([class*='language-']) > code { background: transparent; }
|
|
2004
|
+
|
|
1984
2005
|
.an-code-line-numbers::before {
|
|
1985
2006
|
background: rgba(255, 255, 255, 0.05);
|
|
1986
2007
|
border-right-color: rgba(255, 255, 255, 0.1);
|
|
@@ -2447,6 +2468,8 @@ $an-video-accent: #8b5cf6; // violet-500
|
|
|
2447
2468
|
color: #cdd6f4;
|
|
2448
2469
|
}
|
|
2449
2470
|
|
|
2471
|
+
pre:not([class*='language-']) > code { background: transparent; }
|
|
2472
|
+
|
|
2450
2473
|
hr { border-color: #3f3f5f; }
|
|
2451
2474
|
|
|
2452
2475
|
table, .an-table {
|