rapier-markdown-kit 1.1.63 → 1.1.64
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/spec/md-layout.mjs +6 -2
- package/package.json +1 -1
- package/style.css +11 -4
package/dist/spec/md-layout.mjs
CHANGED
|
@@ -5,7 +5,9 @@
|
|
|
5
5
|
// `lines`: a picture's height in lines of the text beside it, set as a drop cap is (CSS `initial-letter`): its top on the first
|
|
6
6
|
// line's cap height, its foot on the Nth line's baseline, its width from its own aspect. A whole number 1 to 12; never with `width`.
|
|
7
7
|
// `first`/`indent`: a paragraph's first-line indent and its whole-block indent, in levels of one step (2em), a whole number from 1 to 4, omitted when 0; text only.
|
|
8
|
-
|
|
8
|
+
// `lock=on`: a picture locked in place (the founder, 5 October): a tap goes to the words, never the picture; a hold takes it
|
|
9
|
+
// to unlock it. Omitted when off.
|
|
10
|
+
export const fields = new Set(['align', 'width', 'lines', 'wrap', 'x', 'y', 'rotate', 'opacity', 'first', 'indent', 'lock']);
|
|
9
11
|
export const alignments = new Set(['left', 'center', 'right', 'justify']);
|
|
10
12
|
// `behind`/`front`: out of flow; the paragraph lays out as though the picture were absent.
|
|
11
13
|
export const wraps = new Set(['around', 'box', 'behind', 'front']);
|
|
@@ -29,6 +31,7 @@ export function validLayout(value) {
|
|
|
29
31
|
(!has(value, 'rotate') || oneDecimalDegrees(value.rotate)) &&
|
|
30
32
|
(!has(value, 'opacity') || Number.isInteger(value.opacity) && value.opacity >= 5 && value.opacity <= 100) &&
|
|
31
33
|
(!has(value, 'first') || level(value.first)) && (!has(value, 'indent') || level(value.indent)) &&
|
|
34
|
+
(!has(value, 'lock') || value.lock === 'on') &&
|
|
32
35
|
!(has(value, 'align') && (has(value, 'wrap') || has(value, 'x')));
|
|
33
36
|
}
|
|
34
37
|
|
|
@@ -93,7 +96,8 @@ export function imageStyle(value) {
|
|
|
93
96
|
decimal(Number(Math.max(0, Math.min(100 - width, value.x - width / 2)).toFixed(6))) + '%;margin-right:0';
|
|
94
97
|
parts.push('width:' + decimal(width) + '%;height:auto' + left);
|
|
95
98
|
}
|
|
96
|
-
|
|
99
|
+
// Wider than the column at its own aspect, it is contained in the N-line box, never stretched.
|
|
100
|
+
if (value.lines != null) parts.push('width:auto;max-width:100%;height:' + linesHeightCss(value.lines) + ';object-fit:contain');
|
|
97
101
|
if (value.opacity != null && value.opacity < 100) parts.push('opacity:' + decimal(value.opacity / 100));
|
|
98
102
|
return parts.join(';');
|
|
99
103
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "rapier-markdown-kit",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.64",
|
|
4
4
|
"description": "Read, render, write and style Self-contained Markdown, and carry its optional edit ledger: the shared HTML writer, semantic renderer, stylesheet, layout, marks, pictures, Will/1, replay, authorship and offline merge. MIT, no npm dependencies.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"markdown",
|
package/style.css
CHANGED
|
@@ -367,7 +367,7 @@
|
|
|
367
367
|
.md-render h1,.md-render h2,.md-render h3,.md-render h4,.md-render h5,.md-render h6{
|
|
368
368
|
font-family:var(--md-font-sans);letter-spacing:-0.01em;
|
|
369
369
|
line-height:var(--md-line);margin:0 0 calc(var(--md-line) / 2);color:var(--md-heading-color);text-wrap:balance}
|
|
370
|
-
.md-render h1{font-size:calc(var(--md-text-body) * 2.
|
|
370
|
+
.md-render h1{font-size:calc(var(--md-text-body) * 2.7);line-height:calc(var(--md-line) * 2);font-weight:620}
|
|
371
371
|
.md-render h2{font-size:calc(var(--md-text-body) * 1.9);line-height:calc(var(--md-line) * 1.5);font-weight:600}
|
|
372
372
|
.md-render h3{font-size:calc(var(--md-text-body) * 1.5);line-height:calc(var(--md-line) * 1.5);font-weight:600}
|
|
373
373
|
.md-render h4{font-size:calc(var(--md-text-body) * 1.25);font-weight:500}
|
|
@@ -577,7 +577,7 @@
|
|
|
577
577
|
background:var(--md-color-inset);border:1px solid var(--md-color-border);padding:1px 5px}
|
|
578
578
|
.md-render pre{margin:0 0 var(--md-line);padding:var(--md-space-3) var(--md-space-4);
|
|
579
579
|
background:var(--md-color-surface-2);border:1px solid var(--md-color-border);overflow-x:auto}
|
|
580
|
-
.md-render pre code{background:none;border:none;padding:0;font-size:0.
|
|
580
|
+
.md-render pre code{background:none;border:none;padding:0;font-size:calc(var(--md-text-body) * 0.7386);line-height:calc(var(--md-line) * .75)}
|
|
581
581
|
.md-render .math-display-wrap{
|
|
582
582
|
display:block;
|
|
583
583
|
max-width:100%;
|
|
@@ -784,11 +784,18 @@
|
|
|
784
784
|
.rapier-ink-layer svg{position:absolute;display:block;margin:0;padding:0;overflow:visible}
|
|
785
785
|
.rapier-ink-layer path{fill:light-dark(var(--md-ink),var(--md-ink-dark));stroke:none;opacity:.92}
|
|
786
786
|
@media print{.rapier-ink-layer path{fill:var(--md-ink)}}
|
|
787
|
-
.md-render [data-md-color="#1c7547"]{--md-color-dark:#70c390}
|
|
788
787
|
.md-render [data-md-color="#b32034"]{--md-color-dark:#ff8385}
|
|
789
|
-
.md-render [data-md-color="#
|
|
788
|
+
.md-render [data-md-color="#c2410c"]{--md-color-dark:#fb923c}
|
|
790
789
|
.md-render [data-md-color="#865818"]{--md-color-dark:#d6a367}
|
|
790
|
+
.md-render [data-md-color="#4d7c0f"]{--md-color-dark:#a3cf5c}
|
|
791
|
+
.md-render [data-md-color="#1c7547"]{--md-color-dark:#70c390}
|
|
792
|
+
.md-render [data-md-color="#0f766e"]{--md-color-dark:#5eead4}
|
|
793
|
+
.md-render [data-md-color="#0369a1"]{--md-color-dark:#7dd3fc}
|
|
794
|
+
.md-render [data-md-color="#175dc4"]{--md-color-dark:#7bafff}
|
|
795
|
+
.md-render [data-md-color="#4338ca"]{--md-color-dark:#a5b4fc}
|
|
791
796
|
.md-render [data-md-color="#7924d7"]{--md-color-dark:#ba97ff}
|
|
797
|
+
.md-render [data-md-color="#be185d"]{--md-color-dark:#f9a8d4}
|
|
798
|
+
.md-render [data-md-color="#57606a"]{--md-color-dark:#aab1bb}
|
|
792
799
|
.md-render abbr[title]{text-decoration:underline dotted;text-decoration-color:var(--md-color-text-muted);text-underline-offset:2px;cursor:help}
|
|
793
800
|
.md-render ins{text-decoration:underline;color:var(--md-color-success)}
|
|
794
801
|
/* The document owns its selection accent, including on an exported page. */
|