@dominikcz/greg 0.9.29 → 0.9.32
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/docs/guide/asset-handling.md +15 -0
- package/docs/guide/markdown/links-and-toc.md +16 -0
- package/package.json +2 -1
- package/public/book-color.svg +5 -0
- package/public/book.svg +5 -0
- package/public/favicon-dark.svg +36 -0
- package/public/favicon-light.svg +36 -0
- package/public/favicon.svg +44 -0
- package/public/greg-logo-dark.svg +92 -0
- package/public/greg-logo-light.svg +92 -0
- package/public/greg-logo.svg +108 -0
- package/public/pure.html +15 -0
- package/public/quaggan.png +0 -0
- package/public/svelte.svg +1 -0
- package/src/lib/MarkdownDocs/MarkdownDocs.svelte +4 -0
- package/src/lib/MarkdownDocs/MarkdownRenderer.svelte +21 -1
- package/src/lib/MarkdownDocs/__tests__/helpers.js +3 -0
- package/src/lib/MarkdownDocs/__tests__/markdown.test.js +51 -0
- package/src/lib/MarkdownDocs/markdownRendererRuntime.ts +12 -0
- package/src/lib/MarkdownDocs/remarkFlexRow.js +86 -0
- package/src/lib/MarkdownDocs/vitePluginCopyDocs.js +44 -21
- package/src/lib/MarkdownDocs/vitePluginFrontmatter.js +11 -1
- package/src/lib/components/MarkdownImagePreview.svelte +345 -0
- package/src/lib/scss/__markdown.scss +21 -0
- package/src/lib/scss/__scrollbar.scss +11 -0
- package/svelte.config.js +2 -0
- package/types/index.d.ts +2 -0
|
@@ -73,6 +73,27 @@
|
|
|
73
73
|
margin: 1rem 0 0.4rem 0;
|
|
74
74
|
}
|
|
75
75
|
|
|
76
|
+
.markdown-flex-row {
|
|
77
|
+
display: flex;
|
|
78
|
+
flex-wrap: wrap;
|
|
79
|
+
gap: 0.75rem;
|
|
80
|
+
align-items: flex-start;
|
|
81
|
+
margin: 1rem 0;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
.markdown-flex-item {
|
|
85
|
+
min-width: 0;
|
|
86
|
+
flex: 0 1 auto;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
.markdown-flex-item > :first-child {
|
|
90
|
+
margin-top: 0;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
.markdown-flex-item > :last-child {
|
|
94
|
+
margin-bottom: 0;
|
|
95
|
+
}
|
|
96
|
+
|
|
76
97
|
img {
|
|
77
98
|
max-width: 100%;
|
|
78
99
|
border-style: none;
|
|
@@ -6,6 +6,12 @@ body,
|
|
|
6
6
|
scrollbar-color: var(--greg-accent) transparent;
|
|
7
7
|
}
|
|
8
8
|
|
|
9
|
+
.greg,
|
|
10
|
+
.greg * {
|
|
11
|
+
scrollbar-width: thin;
|
|
12
|
+
scrollbar-color: var(--greg-accent) transparent;
|
|
13
|
+
}
|
|
14
|
+
|
|
9
15
|
html::-webkit-scrollbar,
|
|
10
16
|
body::-webkit-scrollbar,
|
|
11
17
|
.greg::-webkit-scrollbar {
|
|
@@ -44,6 +50,11 @@ body::-webkit-scrollbar-thumb:hover,
|
|
|
44
50
|
height: 6px;
|
|
45
51
|
}
|
|
46
52
|
|
|
53
|
+
.greg *::-webkit-scrollbar {
|
|
54
|
+
width: 6px;
|
|
55
|
+
height: 6px;
|
|
56
|
+
}
|
|
57
|
+
|
|
47
58
|
.markdown-body *::-webkit-scrollbar-track {
|
|
48
59
|
background: transparent;
|
|
49
60
|
}
|
package/svelte.config.js
CHANGED
|
@@ -11,6 +11,7 @@ import { remarkImports } from './src/lib/MarkdownDocs/remarkImports.js';
|
|
|
11
11
|
import { remarkGlobalComponents } from './src/lib/MarkdownDocs/remarkGlobalComponents.js';
|
|
12
12
|
import { remarkCustomAnchors } from './src/lib/MarkdownDocs/remarkCustomAnchors.js';
|
|
13
13
|
import { remarkInlineAttrs } from './src/lib/MarkdownDocs/remarkInlineAttrs.js';
|
|
14
|
+
import { remarkFlexRow } from './src/lib/MarkdownDocs/remarkFlexRow.js';
|
|
14
15
|
import { remarkEscapeSvelte } from './src/lib/MarkdownDocs/remarkEscapeSvelte.js';
|
|
15
16
|
import { remarkMathToHtml } from './src/lib/MarkdownDocs/remarkMathToHtml.js';
|
|
16
17
|
import { parseCodeDirectives, decorateHighlightedCodeHtml } from './src/lib/MarkdownDocs/codeDirectives.js';
|
|
@@ -103,6 +104,7 @@ const mdsvexOptions = {
|
|
|
103
104
|
},
|
|
104
105
|
},
|
|
105
106
|
remarkPlugins: [
|
|
107
|
+
remarkFlexRow,
|
|
106
108
|
remarkInlineAttrs,
|
|
107
109
|
remarkGlobalComponents,
|
|
108
110
|
remarkCodeMeta,
|
package/types/index.d.ts
CHANGED
|
@@ -342,6 +342,8 @@ export type GregConfig = {
|
|
|
342
342
|
version?: string;
|
|
343
343
|
/** Site title shown in the header. */
|
|
344
344
|
mainTitle?: string;
|
|
345
|
+
/** Render markdown images as thumbnails with click-to-preview overlay. Default: true. */
|
|
346
|
+
markdownImagePreview?: boolean;
|
|
345
347
|
/**
|
|
346
348
|
* VitePress-compatible outline setting.
|
|
347
349
|
* false – disable outline
|