@mdzip/editor 1.3.0 → 1.3.8
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/README.md +145 -8
- package/dist/archive-utils.d.ts.map +1 -1
- package/dist/archive-utils.js +1 -34
- package/dist/archive-utils.js.map +1 -1
- package/dist/asset-cache.d.ts +81 -0
- package/dist/asset-cache.d.ts.map +1 -0
- package/dist/asset-cache.js +365 -0
- package/dist/asset-cache.js.map +1 -0
- package/dist/diff-view-css.d.ts +2 -0
- package/dist/diff-view-css.d.ts.map +1 -0
- package/dist/diff-view-css.js +49 -0
- package/dist/diff-view-css.js.map +1 -0
- package/dist/diff-view.d.ts +112 -0
- package/dist/diff-view.d.ts.map +1 -0
- package/dist/diff-view.js +573 -0
- package/dist/diff-view.js.map +1 -0
- package/dist/diff.d.ts +2 -1
- package/dist/diff.d.ts.map +1 -1
- package/dist/diff.js +3 -1
- package/dist/diff.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/library-info.d.ts +37 -0
- package/dist/library-info.d.ts.map +1 -0
- package/dist/library-info.js +46 -0
- package/dist/library-info.js.map +1 -0
- package/dist/preview.d.ts +10 -0
- package/dist/preview.d.ts.map +1 -0
- package/dist/preview.js +9 -0
- package/dist/preview.js.map +1 -0
- package/dist/rendering.d.ts +138 -2
- package/dist/rendering.d.ts.map +1 -1
- package/dist/rendering.js +108 -13
- package/dist/rendering.js.map +1 -1
- package/dist/view-css.d.ts.map +1 -1
- package/dist/view-css.js +109 -1
- package/dist/view-css.js.map +1 -1
- package/dist/view.d.ts +136 -1
- package/dist/view.d.ts.map +1 -1
- package/dist/view.js +733 -22
- package/dist/view.js.map +1 -1
- package/dist/workspace.d.ts +15 -0
- package/dist/workspace.d.ts.map +1 -1
- package/dist/workspace.js +28 -0
- package/dist/workspace.js.map +1 -1
- package/package.json +23 -4
package/dist/diff.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"diff.js","sourceRoot":"","sources":["../src/diff.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAoB,MAAM,gBAAgB,CAAC;AAClE,OAAO,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAQ1D,MAAM,CAAC,KAAK,UAAU,qBAAqB,CACzC,KAAiB;IAEjB,MAAM,OAAO,GAAG,MAAM,cAAc,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IACjD,MAAM,UAAU,GAAG,MAAM,OAAO,CAAC,iBAAiB,EAAE,CAAC;IACrD,MAAM,QAAQ,GAAG,MAAM,OAAO,CAAC,YAAY,EAAE,CAAC;IAC9C,MAAM,QAAQ,GAAG,MAAM,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAC,CAAC;IAEpD,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,QAAQ,EAAE,CAAC;AAC5C,CAAC;AAiBD,MAAM,CAAC,KAAK,UAAU,sBAAsB,CAC1C,KAAiB;IAEjB,MAAM,OAAO,GAAG,MAAM,cAAc,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IACjD,MAAM,UAAU,GAAG,MAAM,OAAO,CAAC,iBAAiB,EAAE,CAAC;IACrD,MAAM,QAAQ,GAAG,MAAM,OAAO,CAAC,YAAY,EAAE,CAAC;IAC9C,MAAM,cAAc,GAAG,OAAO,CAAC,WAAW,EAAE,CAAC;IAE7C,MAAM,OAAO,GAA4B,EAAE,CAAC;IAE5C,KAAK,MAAM,KAAK,IAAI,cAAc,EAAE,CAAC;QACnC,MAAM,UAAU,GAAG,MAAM,OAAO,CAAC,SAAS,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;QACvD,
|
|
1
|
+
{"version":3,"file":"diff.js","sourceRoot":"","sources":["../src/diff.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAoB,MAAM,gBAAgB,CAAC;AAClE,OAA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AE,WAAW;aACpB,CAAC,CAAC;YACH,YAAY,EAAE,CAAC;QACjB,CAAC;IACH,CAAC;IAED,eAAe;IACf,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC;IAErD,OAAO,EAAE,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,YAAY,EAAE,CAAC;AAC7D,CAAC"}
|
package/dist/index.d.ts
CHANGED
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,YAAY,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AACtE,cAAc,oBAAoB,CAAC;AACnC,cAAc,cAAc,CAAC;AAC7B,cAAc,WAAW,CAAC;AAC1B,cAAc,eAAe,CAAC;AAC9B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,YAAY,CAAC;AAC3B,cAAc,WAAW,CAAC;AAC1B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,qBAAqB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,YAAY,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AACtE,cAAc,oBAAoB,CAAC;AACnC,cAAc,kBAAkB,CAAC;AACjC,cAAc,cAAc,CAAC;AAC7B,cAAc,WAAW,CAAC;AAC1B,cAAc,eAAe,CAAC;AAC9B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,YAAY,CAAC;AAC3B,cAAc,WAAW,CAAC;AAC1B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,qBAAqB,CAAC"}
|
package/dist/index.js
CHANGED
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,cAAc,oBAAoB,CAAC;AACnC,cAAc,cAAc,CAAC;AAC7B,cAAc,WAAW,CAAC;AAC1B,cAAc,eAAe,CAAC;AAC9B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,YAAY,CAAC;AAC3B,cAAc,WAAW,CAAC;AAC1B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,qBAAqB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,cAAc,oBAAoB,CAAC;AACnC,cAAc,kBAAkB,CAAC;AACjC,cAAc,cAAc,CAAC;AAC7B,cAAc,WAAW,CAAC;AAC1B,cAAc,eAAe,CAAC;AAC9B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,YAAY,CAAC;AAC3B,cAAc,WAAW,CAAC;AAC1B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,qBAAqB,CAAC"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
export declare const MDZIP_RUNTIME_LIBRARIES: readonly [{
|
|
2
|
+
readonly name: "@mdzip/editor";
|
|
3
|
+
readonly version: "1.3.8";
|
|
4
|
+
readonly repositoryUrl: "https://github.com/mdzip-project/mdzip-editor";
|
|
5
|
+
readonly description: "MDZip workspace engine and browser UI.";
|
|
6
|
+
}, {
|
|
7
|
+
readonly name: "@mdzip/core-js";
|
|
8
|
+
readonly version: "1.3.1";
|
|
9
|
+
readonly repositoryUrl: "https://github.com/mdzip-project/mdzip-core-js";
|
|
10
|
+
readonly description: "MDZip archive reading, writing, and validation.";
|
|
11
|
+
}, {
|
|
12
|
+
readonly name: "CodeMirror";
|
|
13
|
+
readonly version: "6.43.0";
|
|
14
|
+
readonly repositoryUrl: "https://github.com/codemirror/dev";
|
|
15
|
+
readonly description: "Extensible code editor and diff UI.";
|
|
16
|
+
}, {
|
|
17
|
+
readonly name: "Marked";
|
|
18
|
+
readonly version: "15.0.12";
|
|
19
|
+
readonly repositoryUrl: "https://github.com/markedjs/marked";
|
|
20
|
+
readonly description: "Markdown parser and renderer.";
|
|
21
|
+
}, {
|
|
22
|
+
readonly name: "DOMPurify";
|
|
23
|
+
readonly version: "3.4.8";
|
|
24
|
+
readonly repositoryUrl: "https://github.com/cure53/DOMPurify";
|
|
25
|
+
readonly description: "HTML sanitization.";
|
|
26
|
+
}, {
|
|
27
|
+
readonly name: "highlight.js";
|
|
28
|
+
readonly version: "11.11.1";
|
|
29
|
+
readonly repositoryUrl: "https://github.com/highlightjs/highlight.js";
|
|
30
|
+
readonly description: "Code-block syntax highlighting.";
|
|
31
|
+
}, {
|
|
32
|
+
readonly name: "Lucide";
|
|
33
|
+
readonly version: "1.17.0";
|
|
34
|
+
readonly repositoryUrl: "https://github.com/lucide-icons/lucide";
|
|
35
|
+
readonly description: "Interface icons.";
|
|
36
|
+
}];
|
|
37
|
+
//# sourceMappingURL=library-info.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"library-info.d.ts","sourceRoot":"","sources":["../src/library-info.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA2C1B,CAAC"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
// Generated from package metadata. Do not edit by hand.
|
|
2
|
+
export const MDZIP_RUNTIME_LIBRARIES = [
|
|
3
|
+
{
|
|
4
|
+
"name": "@mdzip/editor",
|
|
5
|
+
"version": "1.3.8",
|
|
6
|
+
"repositoryUrl": "https://github.com/mdzip-project/mdzip-editor",
|
|
7
|
+
"description": "MDZip workspace engine and browser UI."
|
|
8
|
+
},
|
|
9
|
+
{
|
|
10
|
+
"name": "@mdzip/core-js",
|
|
11
|
+
"version": "1.3.1",
|
|
12
|
+
"repositoryUrl": "https://github.com/mdzip-project/mdzip-core-js",
|
|
13
|
+
"description": "MDZip archive reading, writing, and validation."
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
"name": "CodeMirror",
|
|
17
|
+
"version": "6.43.0",
|
|
18
|
+
"repositoryUrl": "https://github.com/codemirror/dev",
|
|
19
|
+
"description": "Extensible code editor and diff UI."
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
"name": "Marked",
|
|
23
|
+
"version": "15.0.12",
|
|
24
|
+
"repositoryUrl": "https://github.com/markedjs/marked",
|
|
25
|
+
"description": "Markdown parser and renderer."
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
"name": "DOMPurify",
|
|
29
|
+
"version": "3.4.8",
|
|
30
|
+
"repositoryUrl": "https://github.com/cure53/DOMPurify",
|
|
31
|
+
"description": "HTML sanitization."
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
"name": "highlight.js",
|
|
35
|
+
"version": "11.11.1",
|
|
36
|
+
"repositoryUrl": "https://github.com/highlightjs/highlight.js",
|
|
37
|
+
"description": "Code-block syntax highlighting."
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
"name": "Lucide",
|
|
41
|
+
"version": "1.17.0",
|
|
42
|
+
"repositoryUrl": "https://github.com/lucide-icons/lucide",
|
|
43
|
+
"description": "Interface icons."
|
|
44
|
+
}
|
|
45
|
+
];
|
|
46
|
+
//# sourceMappingURL=library-info.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"library-info.js","sourceRoot":"","sources":["../src/library-info.ts"],"names":[],"mappings":"AAAA,wDAAwD;AACxD,MAAM,CAAC,MAAM,uBAAuB,GAAG;IACrC;QACE,MAAM,EAAE,eAAe;QACvB,SAAS,EAAE,OAAO;QAClB,eAAe,EAAE,+CAA+C;QAChE,aAAa,EAAE,wCAAwC;KACxD;IACD;QACE,MAAM,EAAE,gBAAgB;QACxB,SAAS,EAAE,OAAO;QAClB,eAAe,EAAE,gDAAgD;QACjE,aAAa,EAAE,iDAAiD;KACjE;IACD;QACE,MAAM,EAAE,YAAY;QACpB,SAAS,EAAE,QAAQ;QACnB,eAAe,EAAE,mCAAmC;QACpD,aAAa,EAAE,qCAAqC;KACrD;IACD;QACE,MAAM,EAAE,QAAQ;QAChB,SAAS,EAAE,SAAS;QACpB,eAAe,EAAE,oCAAoC;QACrD,aAAa,EAAE,+BAA+B;KAC/C;IACD;QACE,MAAM,EAAE,WAAW;QACnB,SAAS,EAAE,OAAO;QAClB,eAAe,EAAE,qCAAqC;QACtD,aAAa,EAAE,oBAAoB;KACpC;IACD;QACE,MAAM,EAAE,cAAc;QACtB,SAAS,EAAE,SAAS;QACpB,eAAe,EAAE,6CAA6C;QAC9D,aAAa,EAAE,iCAAiC;KACjD;IACD;QACE,MAAM,EAAE,QAAQ;QAChB,SAAS,EAAE,QAAQ;QACnB,eAAe,EAAE,wCAAwC;QACzD,aAAa,EAAE,kBAAkB;KAClC;CACO,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export type { MdzWorkspace, MdzWorkspaceAsset } from '@mdzip/core-js';
|
|
2
|
+
export * from './archive-utils.js';
|
|
3
|
+
export * from './browser.js';
|
|
4
|
+
export * from './diff.js';
|
|
5
|
+
export * from './metadata.js';
|
|
6
|
+
export * from './rendering.js';
|
|
7
|
+
export * from './theme.js';
|
|
8
|
+
export * from './workspace.js';
|
|
9
|
+
export * from './workspace-view.js';
|
|
10
|
+
//# sourceMappingURL=preview.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"preview.d.ts","sourceRoot":"","sources":["../src/preview.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,YAAY,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AACtE,cAAc,oBAAoB,CAAC;AACnC,cAAc,cAAc,CAAC;AAC7B,cAAc,WAAW,CAAC;AAC1B,cAAc,eAAe,CAAC;AAC9B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,YAAY,CAAC;AAC3B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,qBAAqB,CAAC"}
|
package/dist/preview.js
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export * from './archive-utils.js';
|
|
2
|
+
export * from './browser.js';
|
|
3
|
+
export * from './diff.js';
|
|
4
|
+
export * from './metadata.js';
|
|
5
|
+
export * from './rendering.js';
|
|
6
|
+
export * from './theme.js';
|
|
7
|
+
export * from './workspace.js';
|
|
8
|
+
export * from './workspace-view.js';
|
|
9
|
+
//# sourceMappingURL=preview.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"preview.js","sourceRoot":"","sources":["../src/preview.ts"],"names":[],"mappings":"AACA,cAAc,oBAAoB,CAAC;AACnC,cAAc,cAAc,CAAC;AAC7B,cAAc,WAAW,CAAC;AAC1B,cAAc,eAAe,CAAC;AAC9B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,YAAY,CAAC;AAC3B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,qBAAqB,CAAC"}
|
package/dist/rendering.d.ts
CHANGED
|
@@ -1,6 +1,123 @@
|
|
|
1
|
+
import type { MdzManifest } from '@mdzip/core-js';
|
|
2
|
+
import type { MdzipPathType, MdzipSourceFormat, MdzipWorkspaceMode, MdzipWorkspaceSnapshot } from './workspace.js';
|
|
3
|
+
/**
|
|
4
|
+
* Sanitizes rendered HTML with the editor's default DOMPurify policy.
|
|
5
|
+
*
|
|
6
|
+
* Note the policy strips data attributes and inline styles. Markdown render
|
|
7
|
+
* extensions that need to find placeholders again in `mount()` should use
|
|
8
|
+
* class or id markers and carry payloads out-of-band (e.g. a side map keyed
|
|
9
|
+
* by marker id), not element attributes.
|
|
10
|
+
*/
|
|
11
|
+
export declare function sanitizeMdzipHtml(html: string): string;
|
|
12
|
+
/**
|
|
13
|
+
* Context handed to markdown renderers and render extensions for one render
|
|
14
|
+
* generation. `signal` aborts when the selection or content moves on before
|
|
15
|
+
* an asynchronous stage finishes; stages should stop work when it fires.
|
|
16
|
+
*/
|
|
17
|
+
export interface MdzipMarkdownRenderContext {
|
|
18
|
+
currentPath: string;
|
|
19
|
+
sourceFormat: MdzipSourceFormat;
|
|
20
|
+
colorScheme: 'light' | 'dark';
|
|
21
|
+
mode: MdzipWorkspaceMode;
|
|
22
|
+
manifest: MdzManifest | null;
|
|
23
|
+
/**
|
|
24
|
+
* Resolves archive asset paths (e.g. to data URIs) for stages that need to
|
|
25
|
+
* reference assets directly. Markdown image sources are already rewritten
|
|
26
|
+
* before the pipeline runs, so most extensions never need this.
|
|
27
|
+
*/
|
|
28
|
+
assetResolver?: MdzipAssetUrlResolver;
|
|
29
|
+
signal: AbortSignal;
|
|
30
|
+
}
|
|
1
31
|
export interface MdzipMarkdownRenderer {
|
|
2
|
-
|
|
32
|
+
/**
|
|
33
|
+
* Renders markdown to HTML. May return a promise; the pipeline keeps a
|
|
34
|
+
* fully synchronous fast path when it does not.
|
|
35
|
+
*
|
|
36
|
+
* String output is sanitized by the pipeline before insertion unless
|
|
37
|
+
* `sanitizesOutput` is `true` and no `transformHtml` extension is
|
|
38
|
+
* registered.
|
|
39
|
+
*/
|
|
40
|
+
render(markdown: string, context?: MdzipMarkdownRenderContext): string | Promise<string>;
|
|
41
|
+
/**
|
|
42
|
+
* Explicit sanitization bypass: declares that `render()` output is already
|
|
43
|
+
* safe to insert. Only set this when the renderer sanitizes internally —
|
|
44
|
+
* the default renderer does. When any `transformHtml` extension is
|
|
45
|
+
* registered the pipeline still sanitizes the final HTML, because the
|
|
46
|
+
* transformed output is no longer what this renderer produced.
|
|
47
|
+
*/
|
|
48
|
+
readonly sanitizesOutput?: boolean;
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* Handle returned by a `mount()` hook so the view can update or dispose
|
|
52
|
+
* mounted content. `destroy()` is called before the container's HTML is
|
|
53
|
+
* replaced and when the view is destroyed.
|
|
54
|
+
*/
|
|
55
|
+
export interface MdzipRenderHandle {
|
|
56
|
+
update?(context: MdzipMarkdownRenderContext): void | Promise<void>;
|
|
57
|
+
destroy(): void;
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* Composable extension over the default markdown pipeline:
|
|
61
|
+
*
|
|
62
|
+
* markdown -> transformMarkdown* -> renderer -> transformHtml*
|
|
63
|
+
* -> sanitize -> DOM insertion -> mount*
|
|
64
|
+
*
|
|
65
|
+
* `transformMarkdown`/`transformHtml` outputs pass through sanitization, so
|
|
66
|
+
* they cannot inject unsafe markup. `mount()` runs against the live preview
|
|
67
|
+
* DOM and is privileged host code.
|
|
68
|
+
*/
|
|
69
|
+
export interface MdzipMarkdownRenderExtension {
|
|
70
|
+
name: string;
|
|
71
|
+
transformMarkdown?(markdown: string, context: MdzipMarkdownRenderContext): string | Promise<string>;
|
|
72
|
+
transformHtml?(html: string, context: MdzipMarkdownRenderContext): string | Promise<string>;
|
|
73
|
+
mount?(container: HTMLElement, context: MdzipMarkdownRenderContext): void | MdzipRenderHandle | Promise<void | MdzipRenderHandle>;
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* Context handed to entry renderers for the currently selected archive entry.
|
|
77
|
+
* Exposes supported operations instead of view internals.
|
|
78
|
+
*/
|
|
79
|
+
export interface MdzipEntryRenderContext {
|
|
80
|
+
path: string;
|
|
81
|
+
pathType: MdzipPathType;
|
|
82
|
+
mode: MdzipWorkspaceMode;
|
|
83
|
+
sourceFormat: MdzipSourceFormat;
|
|
84
|
+
colorScheme: 'light' | 'dark';
|
|
85
|
+
manifest: MdzManifest | null;
|
|
86
|
+
snapshot: MdzipWorkspaceSnapshot;
|
|
87
|
+
signal: AbortSignal;
|
|
88
|
+
/** Reads the raw bytes of the selected entry. */
|
|
89
|
+
readBytes(): Promise<Uint8Array>;
|
|
90
|
+
/**
|
|
91
|
+
* Replaces the manifest wholesale (canonicalized). Routes through the
|
|
92
|
+
* workspace `'manifest'` edit event, so `onManifestChanged` host-delegated
|
|
93
|
+
* persistence keeps working.
|
|
94
|
+
*/
|
|
95
|
+
updateManifest(manifest: MdzManifest): Promise<void>;
|
|
96
|
+
}
|
|
97
|
+
export interface MdzipEntryRenderHandle {
|
|
98
|
+
update?(context: MdzipEntryRenderContext): void | Promise<void>;
|
|
99
|
+
destroy(): void;
|
|
100
|
+
}
|
|
101
|
+
/**
|
|
102
|
+
* Claims the full pane stack (edit and preview panes included) for selected
|
|
103
|
+
* archive entries it matches. The first matching renderer by descending
|
|
104
|
+
* `priority` wins; when none match, built-in rendering is used.
|
|
105
|
+
*/
|
|
106
|
+
export interface MdzipEntryRenderer {
|
|
107
|
+
id: string;
|
|
108
|
+
priority?: number;
|
|
109
|
+
/** Must be cheap and synchronous; called when the selection key changes. */
|
|
110
|
+
matches(context: MdzipEntryRenderContext): boolean;
|
|
111
|
+
mount(container: HTMLElement, context: MdzipEntryRenderContext): void | MdzipEntryRenderHandle | Promise<void | MdzipEntryRenderHandle>;
|
|
3
112
|
}
|
|
113
|
+
/** Predicate matching one or more exact archive paths (case-insensitive). */
|
|
114
|
+
export declare function mdzipPathMatcher(...paths: string[]): (context: {
|
|
115
|
+
path: string;
|
|
116
|
+
}) => boolean;
|
|
117
|
+
/** Predicate matching file extensions (case-insensitive, dot optional). */
|
|
118
|
+
export declare function mdzipExtensionMatcher(...extensions: string[]): (context: {
|
|
119
|
+
path: string;
|
|
120
|
+
}) => boolean;
|
|
4
121
|
export interface MdzipAssetUrlResolver {
|
|
5
122
|
resolveAssetUrl(path: string, fallbackDataUri?: string): string | undefined;
|
|
6
123
|
}
|
|
@@ -14,7 +131,26 @@ export interface MdzipRenderResult {
|
|
|
14
131
|
export declare const defaultSafeMarkdownRenderer: MdzipMarkdownRenderer;
|
|
15
132
|
export declare class MdzipRenderingService {
|
|
16
133
|
private readonly renderer;
|
|
17
|
-
|
|
134
|
+
private readonly extensions;
|
|
135
|
+
constructor(renderer?: MdzipMarkdownRenderer, extensions?: readonly MdzipMarkdownRenderExtension[]);
|
|
136
|
+
/**
|
|
137
|
+
* Legacy synchronous render. Behavior is unchanged: the configured
|
|
138
|
+
* renderer's output is returned as-is (the default renderer sanitizes
|
|
139
|
+
* internally). Extensions do not run here — use {@link renderMarkdown}.
|
|
140
|
+
*/
|
|
18
141
|
render(request: MdzipRenderRequest): MdzipRenderResult;
|
|
142
|
+
/**
|
|
143
|
+
* Full extension pipeline:
|
|
144
|
+
*
|
|
145
|
+
* transformMarkdown* -> renderer -> transformHtml* -> sanitize
|
|
146
|
+
*
|
|
147
|
+
* Returns a plain string when every stage is synchronous, so the common
|
|
148
|
+
* no-extensions path costs no microtask hop. Exactly one DOMPurify pass
|
|
149
|
+
* runs per render: the default renderer skips its internal pass when
|
|
150
|
+
* `transformHtml` extensions are registered, and renderers declaring
|
|
151
|
+
* `sanitizesOutput` skip the pipeline pass when no `transformHtml`
|
|
152
|
+
* extension is registered.
|
|
153
|
+
*/
|
|
154
|
+
renderMarkdown(markdown: string, context: MdzipMarkdownRenderContext): string | Promise<string>;
|
|
19
155
|
}
|
|
20
156
|
//# sourceMappingURL=rendering.d.ts.map
|
package/dist/rendering.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rendering.d.ts","sourceRoot":"","sources":["../src/rendering.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"rendering.d.ts","sourceRoot":"","sources":["../src/rendering.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAClD,OAAO,KAAK,EACV,aAAa,EACb,iBAAiB,EACjB,kBAAkB,EAClB,sBAAsB,EACvB,MAAM,gBAAgB,CAAC;AAiCxB;;;;;;;GAOG;AACH,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAEtD;AAED;;;;GAIG;AACH,MAAM,WAAW,0BAA0B;IACzC,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,iBAAiB,CAAC;IAChC,WAAW,EAAE,OAAO,GAAG,MAAM,CAAC;IAC9B,IAAI,EAAE,kBAAkB,CAAC;IACzB,QAAQ,EA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AAC;CACvC;AAED,MAAM,WAAW,iBAAiB;IAChC,IAAI,EAAE,MAAM,CAAC;CACd;AA0CD,eAAO,MAAM,2BAA2B,EAAE,qBAKzC,CAAC;AA+BF,qBAAa,qBAAqB;IAE9B,OAAO,CAAC,QAAQ,CAAC,QAAQ;IACzB,OAAO,CAAC,QAAQ,CAAC,UAAU;gBADV,QAAQ,GAAE,qBAAmD,EAC7D,UAAU,GAAE,SAAS,4BAA4B,EAAO;IAG3E;;;;OAIG;IACI,MAAM,CAAC,OAAO,EAAE,kBAAkB,GAAG,iBAAiB;IAa7D;;;;;;;;;;;OAWG;IACI,cAAc,CACnB,QAAQ,EAAE,MAAM,EAChB,OAAO,EAAE,0BAA0B,GAClC,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;CA6B5B"}
|
package/dist/rendering.js
CHANGED
|
@@ -20,6 +20,37 @@ function resolvePurifier() {
|
|
|
20
20
|
purifier = DOMPurify(globalWindow);
|
|
21
21
|
return purifier;
|
|
22
22
|
}
|
|
23
|
+
const SANITIZE_OPTIONS = {
|
|
24
|
+
USE_PROFILES: { html: true },
|
|
25
|
+
ADD_ATTR: ['class'],
|
|
26
|
+
FORBID_TAGS: ['base', 'embed', 'form', 'iframe', 'input', 'link', 'meta', 'object', 'script', 'style'],
|
|
27
|
+
FORBID_ATTR: ['style'],
|
|
28
|
+
ALLOW_DATA_ATTR: false
|
|
29
|
+
};
|
|
30
|
+
/**
|
|
31
|
+
* Sanitizes rendered HTML with the editor's default DOMPurify policy.
|
|
32
|
+
*
|
|
33
|
+
* Note the policy strips data attributes and inline styles. Markdown render
|
|
34
|
+
* extensions that need to find placeholders again in `mount()` should use
|
|
35
|
+
* class or id markers and carry payloads out-of-band (e.g. a side map keyed
|
|
36
|
+
* by marker id), not element attributes.
|
|
37
|
+
*/
|
|
38
|
+
export function sanitizeMdzipHtml(html) {
|
|
39
|
+
return resolvePurifier().sanitize(html, SANITIZE_OPTIONS);
|
|
40
|
+
}
|
|
41
|
+
/** Predicate matching one or more exact archive paths (case-insensitive). */
|
|
42
|
+
export function mdzipPathMatcher(...paths) {
|
|
43
|
+
const wanted = new Set(paths.map((path) => path.toLowerCase()));
|
|
44
|
+
return ({ path }) => wanted.has(path.toLowerCase());
|
|
45
|
+
}
|
|
46
|
+
/** Predicate matching file extensions (case-insensitive, dot optional). */
|
|
47
|
+
export function mdzipExtensionMatcher(...extensions) {
|
|
48
|
+
const wanted = extensions.map((ext) => (ext.startsWith('.') ? ext : `.${ext}`).toLowerCase());
|
|
49
|
+
return ({ path }) => {
|
|
50
|
+
const lower = path.toLowerCase();
|
|
51
|
+
return wanted.some((ext) => lower.endsWith(ext));
|
|
52
|
+
};
|
|
53
|
+
}
|
|
23
54
|
const marked = new Marked({
|
|
24
55
|
renderer: {
|
|
25
56
|
code(token) {
|
|
@@ -54,30 +85,94 @@ const marked = new Marked({
|
|
|
54
85
|
}
|
|
55
86
|
}
|
|
56
87
|
});
|
|
88
|
+
function renderDefaultMarkdownUnsanitized(markdown) {
|
|
89
|
+
const rendered = marked.parse(markdown, { async: false });
|
|
90
|
+
return typeof rendered === 'string' ? rendered : escapeHtml(markdown);
|
|
91
|
+
}
|
|
57
92
|
export const defaultSafeMarkdownRenderer = {
|
|
93
|
+
sanitizesOutput: true,
|
|
58
94
|
render(markdown) {
|
|
59
|
-
|
|
60
|
-
const html = typeof rendered === 'string' ? rendered : escapeHtml(markdown);
|
|
61
|
-
return resolvePurifier().sanitize(html, {
|
|
62
|
-
USE_PROFILES: { html: true },
|
|
63
|
-
ADD_ATTR: ['class'],
|
|
64
|
-
FORBID_TAGS: ['base', 'embed', 'form', 'iframe', 'input', 'link', 'meta', 'object', 'script', 'style'],
|
|
65
|
-
FORBID_ATTR: ['style'],
|
|
66
|
-
ALLOW_DATA_ATTR: false
|
|
67
|
-
});
|
|
95
|
+
return sanitizeMdzipHtml(renderDefaultMarkdownUnsanitized(markdown));
|
|
68
96
|
}
|
|
69
97
|
};
|
|
98
|
+
function isThenable(value) {
|
|
99
|
+
return typeof value?.then === 'function';
|
|
100
|
+
}
|
|
101
|
+
function createAbortError() {
|
|
102
|
+
return new DOMException('The markdown render was aborted.', 'AbortError');
|
|
103
|
+
}
|
|
104
|
+
/**
|
|
105
|
+
* Applies one pipeline stage, staying synchronous when the incoming value is
|
|
106
|
+
* synchronous. The async path checks the abort signal between stages so a
|
|
107
|
+
* superseded render stops early.
|
|
108
|
+
*/
|
|
109
|
+
function chainRenderStage(value, stage, signal) {
|
|
110
|
+
if (isThenable(value)) {
|
|
111
|
+
return Promise.resolve(value).then((resolved) => {
|
|
112
|
+
if (signal?.aborted) {
|
|
113
|
+
throw createAbortError();
|
|
114
|
+
}
|
|
115
|
+
return stage(resolved);
|
|
116
|
+
});
|
|
117
|
+
}
|
|
118
|
+
return stage(value);
|
|
119
|
+
}
|
|
70
120
|
export class MdzipRenderingService {
|
|
71
|
-
constructor(renderer = defaultSafeMarkdownRenderer) {
|
|
121
|
+
constructor(renderer = defaultSafeMarkdownRenderer, extensions = []) {
|
|
72
122
|
this.renderer = renderer;
|
|
123
|
+
this.extensions = extensions;
|
|
73
124
|
}
|
|
125
|
+
/**
|
|
126
|
+
* Legacy synchronous render. Behavior is unchanged: the configured
|
|
127
|
+
* renderer's output is returned as-is (the default renderer sanitizes
|
|
128
|
+
* internally). Extensions do not run here — use {@link renderMarkdown}.
|
|
129
|
+
*/
|
|
74
130
|
render(request) {
|
|
75
131
|
const markdown = request.assetResolver
|
|
76
132
|
? rewriteAssetSources(request.markdown, request.assetResolver)
|
|
77
133
|
: request.markdown;
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
134
|
+
const html = this.renderer.render(markdown);
|
|
135
|
+
if (isThenable(html)) {
|
|
136
|
+
throw new Error('render() requires a synchronous markdown renderer. Use renderMarkdown() for asynchronous pipelines.');
|
|
137
|
+
}
|
|
138
|
+
return { html };
|
|
139
|
+
}
|
|
140
|
+
/**
|
|
141
|
+
* Full extension pipeline:
|
|
142
|
+
*
|
|
143
|
+
* transformMarkdown* -> renderer -> transformHtml* -> sanitize
|
|
144
|
+
*
|
|
145
|
+
* Returns a plain string when every stage is synchronous, so the common
|
|
146
|
+
* no-extensions path costs no microtask hop. Exactly one DOMPurify pass
|
|
147
|
+
* runs per render: the default renderer skips its internal pass when
|
|
148
|
+
* `transformHtml` extensions are registered, and renderers declaring
|
|
149
|
+
* `sanitizesOutput` skip the pipeline pass when no `transformHtml`
|
|
150
|
+
* extension is registered.
|
|
151
|
+
*/
|
|
152
|
+
renderMarkdown(markdown, context) {
|
|
153
|
+
const htmlTransforms = this.extensions.filter((ext) => ext.transformHtml);
|
|
154
|
+
let value = markdown;
|
|
155
|
+
for (const ext of this.extensions) {
|
|
156
|
+
if (ext.transformMarkdown) {
|
|
157
|
+
value = chainRenderStage(value, (md) => ext.transformMarkdown(md, context), context.signal);
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
value = chainRenderStage(value, (md) => {
|
|
161
|
+
if (this.renderer === defaultSafeMarkdownRenderer && htmlTransforms.length > 0) {
|
|
162
|
+
// Render unsanitized so the single DOMPurify pass runs after the
|
|
163
|
+
// transformHtml stage instead of twice.
|
|
164
|
+
return renderDefaultMarkdownUnsanitized(md);
|
|
165
|
+
}
|
|
166
|
+
return this.renderer.render(md, context);
|
|
167
|
+
}, context.signal);
|
|
168
|
+
for (const ext of htmlTransforms) {
|
|
169
|
+
value = chainRenderStage(value, (html) => ext.transformHtml(html, context), context.signal);
|
|
170
|
+
}
|
|
171
|
+
const skipSanitize = htmlTransforms.length === 0 && this.renderer.sanitizesOutput === true;
|
|
172
|
+
if (!skipSanitize) {
|
|
173
|
+
value = chainRenderStage(value, (html) => sanitizeMdzipHtml(html), context.signal);
|
|
174
|
+
}
|
|
175
|
+
return value;
|
|
81
176
|
}
|
|
82
177
|
}
|
|
83
178
|
function rewriteAssetSources(markdown, resolver) {
|
package/dist/rendering.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rendering.js","sourceRoot":"","sources":["../src/rendering.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,WAAW,CAAC;AAClC,OAAO,IAAI,MAAM,cAAc,CAAC;AAChC,OAAO,EAAE,MAAM,EAAe,MAAM,QAAQ,CAAC;
|
|
1
|
+
{"version":3,"file":"rendering.js","sourceRoot":"","sources":["../src/rendering.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,WAAW,CAAC;AAClC,OAAO,IAAI,MAAM,cAAc,CAAC;AAChC,OAAO,EAAE,MAAM,EAAe,MAAM,QAAQ,CAAC;AAS7C,0EAA0E;AAC1E,8EAA8E;AAC9E,2DAA2D;AAC3D,IAAI,QAAQ,GAA4B,IAAI,CAAC;AAE7C,SAAS,eAAe;IACtB,IAAI,QAAQ,EAAE,CAAC;QACb,OAAO,QAAQ,CAAC;IAClB,CAAC;IACD,IAAI,OAAO,SAAS,CAAC,QAAQ,KAAK,UAAU,EAAE,CAAC;QAC7C,QAAQ,GAAG,SAAS,CAAC;QACrB,OAAO,QAAQ,CAAC;IAClB,CAAC;IACD,MAAM,YAAY,GAAI,UAAmC,CAAC,MAAM,CAAC;IACjE,IAAI,CAAC,YAAY,EAAE,CAAC;QAClB,MAAM,IAAI,KAAK,CACb,qIAAqI,CACtI,CAAC;IACJ,CAAC;IACD,QAAQ,GAAG,SAAS,CAAC,YAA0C,CAAC,CAAC;IACjE,OAAO,QAAQ,CAAC;AAClB,CAAC;AAED,MAAM,gBAAgB,GAAG;IACvB,YAAY,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE;IAC5B,QAAQ,EAAE,CAAC,OAAO,CAAC;IACnB,WAAW,EAAE,CAAC,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,QAAQ,EAAE,OAAO,CAAC;IACtG,WAAW,EAAE,CAAC,OAAO,CAAC;IACtB,eAAe,EAAE,KAAK;CACvB,CAA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G,KAAK,CAAC,CAAC,CAAC,KAAK,KAAK,CAAC,OAAO,CAAC,IAAI,EAAE,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC;QAClE,OAAO,KAAK,GAAG,KAAK,QAAQ,GAAG,MAAM,GAAG,CAAC;IAC3C,CAAC,CACF,CAAC;AACJ,CAAC;AAED,SAAS,UAAU,CAAC,KAAa;IAC/B,OAAO,KAAK;SACT,OAAO,CAAC,IAAI,EAAE,OAAO,CAAC;SACtB,OAAO,CAAC,IAAI,EAAE,MAAM,CAAC;SACrB,OAAO,CAAC,IAAI,EAAE,MAAM,CAAC;SACrB,OAAO,CAAC,IAAI,EAAE,QAAQ,CAAC;SACvB,OAAO,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;AAC7B,CAAC"}
|
package/dist/view-css.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"view-css.d.ts","sourceRoot":"","sources":["../src/view-css.ts"],"names":[],"mappings":"AAeA,eAAO,MAAM,aAAa,
|
|
1
|
+
{"version":3,"file":"view-css.d.ts","sourceRoot":"","sources":["../src/view-css.ts"],"names":[],"mappings":"AAeA,eAAO,MAAM,aAAa,QA8/CzB,CAAC"}
|
package/dist/view-css.js
CHANGED
|
@@ -720,6 +720,16 @@ export const WORKSPACE_CSS = `
|
|
|
720
720
|
overflow: auto;
|
|
721
721
|
}
|
|
722
722
|
|
|
723
|
+
.mdzip-root .entry-pane {
|
|
724
|
+
overflow: auto;
|
|
725
|
+
}
|
|
726
|
+
|
|
727
|
+
.mdzip-root .pane-stack.entry-claimed .edit-pane,
|
|
728
|
+
.mdzip-root .pane-stack.entry-claimed .preview-pane,
|
|
729
|
+
.mdzip-root .pane-stack.entry-claimed .split-resizer {
|
|
730
|
+
display: none !important;
|
|
731
|
+
}
|
|
732
|
+
|
|
723
733
|
.mdzip-root .edit-pane {
|
|
724
734
|
overflow: hidden;
|
|
725
735
|
flex-direction: column;
|
|
@@ -1017,6 +1027,46 @@ export const WORKSPACE_CSS = `
|
|
|
1017
1027
|
border-radius: 4px;
|
|
1018
1028
|
}
|
|
1019
1029
|
|
|
1030
|
+
/* Progressive image hydration. Each archive image mounts inside a collapsed
|
|
1031
|
+
slot so the text stays compact and immediately readable; when the image
|
|
1032
|
+
resolves, the slot eases open (0fr -> 1fr) to the height reserved from its
|
|
1033
|
+
sniffed dimensions, in a single slide, and the pixels drop into the exact
|
|
1034
|
+
box with no further reflow. */
|
|
1035
|
+
.mdzip-root .preview-content .mdzip-image-slot {
|
|
1036
|
+
display: inline-grid;
|
|
1037
|
+
grid-template-rows: 0fr;
|
|
1038
|
+
overflow: hidden;
|
|
1039
|
+
vertical-align: bottom;
|
|
1040
|
+
transition: grid-template-rows 0.28s ease;
|
|
1041
|
+
}
|
|
1042
|
+
|
|
1043
|
+
.mdzip-root .preview-content .mdzip-image-slot.mdzip-image-open {
|
|
1044
|
+
grid-template-rows: 1fr;
|
|
1045
|
+
}
|
|
1046
|
+
|
|
1047
|
+
.mdzip-root .preview-content .mdzip-image-slot > img {
|
|
1048
|
+
min-height: 0;
|
|
1049
|
+
}
|
|
1050
|
+
|
|
1051
|
+
.mdzip-root .preview-content img.mdzip-image-loading {
|
|
1052
|
+
background: var(--mdzip-control-background-color, rgba(127, 127, 127, 0.12));
|
|
1053
|
+
animation: mdzip-image-pulse 1.2s ease-in-out infinite;
|
|
1054
|
+
}
|
|
1055
|
+
|
|
1056
|
+
@keyframes mdzip-image-pulse {
|
|
1057
|
+
0%, 100% { opacity: 1; }
|
|
1058
|
+
50% { opacity: 0.55; }
|
|
1059
|
+
}
|
|
1060
|
+
|
|
1061
|
+
@media (prefers-reduced-motion: reduce) {
|
|
1062
|
+
.mdzip-root .preview-content .mdzip-image-slot {
|
|
1063
|
+
transition: none;
|
|
1064
|
+
}
|
|
1065
|
+
.mdzip-root .preview-content img.mdzip-image-loading {
|
|
1066
|
+
animation: none;
|
|
1067
|
+
}
|
|
1068
|
+
}
|
|
1069
|
+
|
|
1020
1070
|
.mdzip-root .plain-text-preview {
|
|
1021
1071
|
margin: 0;
|
|
1022
1072
|
white-space: pre-wrap;
|
|
@@ -1195,13 +1245,26 @@ export const WORKSPACE_CSS = `
|
|
|
1195
1245
|
margin: 12px 0 0;
|
|
1196
1246
|
}
|
|
1197
1247
|
|
|
1248
|
+
.mdzip-root .metadata-dialog {
|
|
1249
|
+
width: min(760px, calc(100vw - 32px));
|
|
1250
|
+
}
|
|
1251
|
+
|
|
1252
|
+
.mdzip-root .metadata-dialog h4 {
|
|
1253
|
+
margin: 18px 0 0;
|
|
1254
|
+
font-size: 13px;
|
|
1255
|
+
}
|
|
1256
|
+
|
|
1257
|
+
.mdzip-root .metadata-dialog h4 + dl {
|
|
1258
|
+
margin-top: 6px;
|
|
1259
|
+
}
|
|
1260
|
+
|
|
1198
1261
|
.mdzip-root .metadata-row {
|
|
1199
1262
|
display: grid;
|
|
1200
1263
|
grid-template-columns: 110px minmax(0, 1fr);
|
|
1201
1264
|
gap: 12px;
|
|
1202
1265
|
padding: 7px 0;
|
|
1203
1266
|
border-bottom: 1px solid var(--mdzip-border-color);
|
|
1204
|
-
font-size:
|
|
1267
|
+
font-size: 14px;
|
|
1205
1268
|
}
|
|
1206
1269
|
|
|
1207
1270
|
.mdzip-root .metadata-row:last-child {
|
|
@@ -1219,6 +1282,51 @@ export const WORKSPACE_CSS = `
|
|
|
1219
1282
|
overflow-wrap: anywhere;
|
|
1220
1283
|
}
|
|
1221
1284
|
|
|
1285
|
+
.mdzip-root .library-row dt a {
|
|
1286
|
+
color: var(--mdzip-link-color);
|
|
1287
|
+
text-decoration: none;
|
|
1288
|
+
}
|
|
1289
|
+
|
|
1290
|
+
.mdzip-root .library-row dt a:hover,
|
|
1291
|
+
.mdzip-root .library-row dt a:focus-visible {
|
|
1292
|
+
text-decoration: underline;
|
|
1293
|
+
}
|
|
1294
|
+
|
|
1295
|
+
.mdzip-root .library-row {
|
|
1296
|
+
grid-template-columns: minmax(230px, 0.75fr) minmax(280px, 1.25fr);
|
|
1297
|
+
}
|
|
1298
|
+
|
|
1299
|
+
.mdzip-root .library-row dt {
|
|
1300
|
+
display: flex;
|
|
1301
|
+
gap: 8px;
|
|
1302
|
+
align-items: baseline;
|
|
1303
|
+
white-space: nowrap;
|
|
1304
|
+
}
|
|
1305
|
+
|
|
1306
|
+
.mdzip-root .library-version {
|
|
1307
|
+
color: var(--mdzip-muted-foreground-color);
|
|
1308
|
+
font-weight: 400;
|
|
1309
|
+
}
|
|
1310
|
+
|
|
1311
|
+
.mdzip-root .library-row dd {
|
|
1312
|
+
white-space: nowrap;
|
|
1313
|
+
}
|
|
1314
|
+
|
|
1315
|
+
.mdzip-root .library-description {
|
|
1316
|
+
color: var(--mdzip-muted-foreground-color);
|
|
1317
|
+
}
|
|
1318
|
+
|
|
1319
|
+
@media (max-width: 640px) {
|
|
1320
|
+
.mdzip-root .library-row {
|
|
1321
|
+
grid-template-columns: 1fr;
|
|
1322
|
+
gap: 3px;
|
|
1323
|
+
}
|
|
1324
|
+
|
|
1325
|
+
.mdzip-root .library-row dd {
|
|
1326
|
+
white-space: normal;
|
|
1327
|
+
}
|
|
1328
|
+
}
|
|
1329
|
+
|
|
1222
1330
|
@media (max-width: 900px) {
|
|
1223
1331
|
.mdzip-root { --nav-pane-width: 220px; }
|
|
1224
1332
|
}
|