@powerduck/md-editor 0.2.0 → 0.3.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.
@@ -0,0 +1,16 @@
1
+ import type MarkdownIt from 'markdown-it';
2
+ import 'highlight.js/styles/atom-one-dark.css';
3
+ export interface CodeHighlightOptions {
4
+ /** Languages to skip (delegate to the previously-registered renderer). Default: ['mindmap']. */
5
+ reservedLanguages?: readonly string[];
6
+ }
7
+ /**
8
+ * Highlight code fences with highlight.js and wrap them in a macOS-style
9
+ * container with traffic-light dots, a language label, and a copy button.
10
+ *
11
+ * The copy button works via event delegation on the preview container
12
+ * (see MarkdownEditor.setupCopyHandler), so no per-button listeners are needed.
13
+ *
14
+ * Mindmap fences are delegated to the previously-registered renderer.
15
+ */
16
+ export declare function useCodeHighlight(md: MarkdownIt, options?: CodeHighlightOptions): void;
@@ -0,0 +1,23 @@
1
+ /**
2
+ * Extract a YouTube video ID from various URL formats.
3
+ * Supports: watch?v=, youtu.be/, embed/, shorts/, v/, and raw 11-char IDs.
4
+ * Returns null if the input is not a recognizable YouTube URL.
5
+ */
6
+ export declare function extractYouTubeId(input: string): string | null;
7
+ /**
8
+ * Build a markdown image link that renders as a clickable YouTube thumbnail.
9
+ * The thumbnail links to the YouTube watch page.
10
+ */
11
+ export declare function youTubeEmbedMarkdown(videoId: string, alt?: string): string;
12
+ /** Check if a URL points to a video file based on its extension. */
13
+ export declare function isVideoFile(url: string): boolean;
14
+ /**
15
+ * Build markdown for an image insertion.
16
+ */
17
+ export declare function imageMarkdown(url: string, alt?: string): string;
18
+ /**
19
+ * Build markdown for a video file. Uses a linked image as a fallback for
20
+ * renderers that do not support <video> tags; the Renderer also registers
21
+ * a custom image rule that renders video URLs as <video> elements.
22
+ */
23
+ export declare function videoMarkdown(url: string, alt?: string): string;
@@ -20,5 +20,10 @@ export declare function useMindmap(md: MarkdownIt): void;
20
20
  * After the preview DOM is updated, render all non-hydrated mindmap nodes.
21
21
  * markmap-lib / markmap-view are dynamically imported so they do not
22
22
  * increase the initial bundle size when mindmaps are absent.
23
+ *
24
+ * IMPORTANT: The SVG must have explicit pixel width/height attributes before
25
+ * Markmap.create is called. markmap-view's d3-zoom gesture reads
26
+ * svg.width.baseVal.value, which throws "Could not resolve relative length"
27
+ * when the SVG only has percentage-based CSS dimensions (width:100%).
23
28
  */
24
29
  export declare function hydrateMindmaps(root: HTMLElement): Promise<void>;
@@ -0,0 +1,34 @@
1
+ export interface PopupField {
2
+ name: string;
3
+ label: string;
4
+ placeholder?: string;
5
+ type?: 'text' | 'textarea';
6
+ required?: boolean;
7
+ }
8
+ export interface PopupConfig {
9
+ title: string;
10
+ fields: readonly PopupField[];
11
+ submitLabel?: string;
12
+ onSubmit: (values: Record<string, string>) => void;
13
+ }
14
+ /**
15
+ * A lightweight floating popup panel anchored to a toolbar button.
16
+ * Used for image / video / YouTube insertion dialogs.
17
+ * Closes on outside click, Escape key, or successful submit.
18
+ */
19
+ export declare class Popup {
20
+ readonly el: HTMLDivElement;
21
+ private anchor;
22
+ private config;
23
+ private inputs;
24
+ private onOutsideClick;
25
+ private onKeyDown;
26
+ private destroyed;
27
+ constructor(anchor: HTMLElement, config: PopupConfig);
28
+ private build;
29
+ private submit;
30
+ show(): void;
31
+ hide(): void;
32
+ private position;
33
+ destroy(): void;
34
+ }
@@ -0,0 +1,7 @@
1
+ import type MarkdownIt from 'markdown-it';
2
+ /**
3
+ * Override the markdown-it image renderer to detect video file URLs
4
+ * (.mp4, .webm, .ogg, etc.) and render them as <video> elements instead
5
+ * of <img>. Non-video images fall through to the default renderer.
6
+ */
7
+ export declare function useVideo(md: MarkdownIt): void;
@@ -1,6 +1,6 @@
1
- import { type CSSProperties } from "react";
2
- import { type EditorMode, type EditorTheme, type MarkdownEditorOptions } from "../index.js";
3
- export interface MarkdownEditorProps extends Omit<MarkdownEditorOptions, "value" | "onChange"> {
1
+ import { type CSSProperties } from 'react';
2
+ import { type EditorMode, type EditorTheme, type MarkdownEditorOptions } from '../index.js';
3
+ export interface MarkdownEditorProps extends Omit<MarkdownEditorOptions, 'value' | 'onChange'> {
4
4
  /** Controlled value. When provided and different from internal state, syncs the editor. */
5
5
  value?: string;
6
6
  /** Uncontrolled initial value. Only applied on mount. */
package/dist/react.mjs CHANGED
@@ -1,80 +1,82 @@
1
1
  import { jsx as R } from "react/jsx-runtime";
2
2
  import { forwardRef as k, useRef as a, useLayoutEffect as y, useEffect as v, useImperativeHandle as H } from "react";
3
3
  import { MarkdownEditor as N } from "./index.mjs";
4
- const C = k(function(V, g) {
5
- const {
6
- value: n,
7
- defaultValue: h,
8
- onChange: s,
9
- className: E,
10
- style: M,
11
- mode: i,
12
- theme: u,
13
- math: l,
14
- mindmap: f,
15
- preview: d,
16
- autoPreview: m,
17
- renderDebounce: w
18
- } = V, o = a(null), r = a(null), c = a(s);
19
- return c.current = s, y(() => {
20
- if (!o.current) return;
21
- const e = new N(o.current, {
22
- value: n ?? h ?? "",
4
+ const C = k(
5
+ function(V, g) {
6
+ const {
7
+ value: n,
8
+ defaultValue: h,
9
+ onChange: s,
10
+ className: E,
11
+ style: M,
23
12
  mode: i,
24
13
  theme: u,
25
14
  math: l,
26
15
  mindmap: f,
27
16
  preview: d,
28
17
  autoPreview: m,
29
- renderDebounce: w,
30
- onChange: (t) => {
31
- var p;
32
- return (p = c.current) == null ? void 0 : p.call(c, t);
33
- }
34
- });
35
- return r.current = e, () => {
36
- e.destroy(), r.current = null;
37
- };
38
- }, [i, l, f, d, m, w]), v(() => {
39
- const e = r.current;
40
- !e || n === void 0 || e.getValue() !== n && e.setValue(n);
41
- }, [n]), v(() => {
42
- r.current && u && r.current.setTheme(u);
43
- }, [u]), H(
44
- g,
45
- () => ({
46
- getValue: () => {
47
- var e;
48
- return ((e = r.current) == null ? void 0 : e.getValue()) ?? "";
49
- },
50
- setValue: (e) => {
51
- var t;
52
- return (t = r.current) == null ? void 0 : t.setValue(e);
53
- },
54
- getHtml: () => {
55
- var e;
56
- return ((e = r.current) == null ? void 0 : e.getHtml()) ?? "";
57
- },
58
- focus: () => {
59
- var e;
60
- return (e = r.current) == null ? void 0 : e.focus();
61
- },
62
- setMode: (e) => {
63
- var t;
64
- return (t = r.current) == null ? void 0 : t.setMode(e);
65
- },
66
- setTheme: (e) => {
67
- var t;
68
- return (t = r.current) == null ? void 0 : t.setTheme(e);
69
- },
70
- renderNow: () => {
71
- var e;
72
- return (e = r.current) == null ? void 0 : e.renderNow();
73
- }
74
- }),
75
- []
76
- ), /* @__PURE__ */ R("div", { ref: o, className: E, style: M });
77
- });
18
+ renderDebounce: w
19
+ } = V, o = a(null), r = a(null), c = a(s);
20
+ return c.current = s, y(() => {
21
+ if (!o.current) return;
22
+ const e = new N(o.current, {
23
+ value: n ?? h ?? "",
24
+ mode: i,
25
+ theme: u,
26
+ math: l,
27
+ mindmap: f,
28
+ preview: d,
29
+ autoPreview: m,
30
+ renderDebounce: w,
31
+ onChange: (t) => {
32
+ var p;
33
+ return (p = c.current) == null ? void 0 : p.call(c, t);
34
+ }
35
+ });
36
+ return r.current = e, () => {
37
+ e.destroy(), r.current = null;
38
+ };
39
+ }, [i, l, f, d, m, w]), v(() => {
40
+ const e = r.current;
41
+ !e || n === void 0 || e.getValue() !== n && e.setValue(n);
42
+ }, [n]), v(() => {
43
+ r.current && u && r.current.setTheme(u);
44
+ }, [u]), H(
45
+ g,
46
+ () => ({
47
+ getValue: () => {
48
+ var e;
49
+ return ((e = r.current) == null ? void 0 : e.getValue()) ?? "";
50
+ },
51
+ setValue: (e) => {
52
+ var t;
53
+ return (t = r.current) == null ? void 0 : t.setValue(e);
54
+ },
55
+ getHtml: () => {
56
+ var e;
57
+ return ((e = r.current) == null ? void 0 : e.getHtml()) ?? "";
58
+ },
59
+ focus: () => {
60
+ var e;
61
+ return (e = r.current) == null ? void 0 : e.focus();
62
+ },
63
+ setMode: (e) => {
64
+ var t;
65
+ return (t = r.current) == null ? void 0 : t.setMode(e);
66
+ },
67
+ setTheme: (e) => {
68
+ var t;
69
+ return (t = r.current) == null ? void 0 : t.setTheme(e);
70
+ },
71
+ renderNow: () => {
72
+ var e;
73
+ return (e = r.current) == null ? void 0 : e.renderNow();
74
+ }
75
+ }),
76
+ []
77
+ ), /* @__PURE__ */ R("div", { ref: o, className: E, style: M });
78
+ }
79
+ );
78
80
  export {
79
81
  C as MarkdownEditorReact
80
82
  };
package/dist/style.css CHANGED
@@ -1 +1 @@
1
- .md-editor-root{--_surface: var(--color-surface, #ffffff);--_surface-subtle: var(--color-surface-subtle, #f8f9fa);--_surface-hover: var(--color-surface-hover, #f4f5f6);--_surface-active: var(--color-surface-active, #e7eaed);--_text-primary: var(--color-text-primary, #26282b);--_text-secondary: var(--color-text-secondary, #6f747c);--_text-tertiary: var(--color-text-tertiary, #989da5);--_accent: var(--color-accent, #f28c28);--_accent-bg: var(--color-accent-bg, #fff8ef);--_accent-bg-soft: var(--color-accent-bg-soft, #fff3e5);--_on-accent: var(--color-on-accent, #ffffff);--_focus-ring: var(--color-focus-ring, rgba(242, 140, 40, .28));--_border-subtle: var(--color-border-subtle, #eceff1);--_border-default: var(--color-border-default, #e0e4e8);--_border-strong: var(--color-border-strong, #ccd2d8);--_shadow-sm: var(--shadow-sm, 0 1px 2px rgba(28, 32, 36, .05));--_radius-md: var(--radius-md, 6px);--_radius-lg: var(--radius-lg, 8px);--_space-1: var(--space-1, 4px);--_space-2: var(--space-2, 8px);--_space-3: var(--space-3, 12px);--_transition-fast: var(--transition-fast, .14s ease);--_font-ui: var(--font-family-ui, Inter, ui-sans-serif, system-ui, sans-serif);--_font-size-sm: var(--font-size-sm, 13px);--_font-size-xs: var(--font-size-xs, 12px);--_control-height-sm: var(--control-height-sm, 28px);border:1px solid var(--_border-default);border-radius:var(--_radius-lg);overflow:hidden;background:var(--_surface);color:var(--_text-primary);font-family:var(--_font-ui);display:flex;flex-direction:column;box-sizing:border-box;box-shadow:var(--_shadow-sm)}.md-editor-root *{box-sizing:border-box}.md-editor-root[data-theme=dark]{--_surface: var(--color-surface, #1f2125);--_surface-subtle: var(--color-surface-subtle, #25282d);--_surface-hover: var(--color-surface-hover, #2b2f35);--_surface-active: var(--color-surface-active, #3d434c);--_text-primary: var(--color-text-primary, #edf0f3);--_text-secondary: var(--color-text-secondary, #b8bec7);--_text-tertiary: var(--color-text-tertiary, #89919c);--_accent: var(--color-accent, #f4a04a);--_accent-bg: var(--color-accent-bg, #2d2419);--_accent-bg-soft: var(--color-accent-bg-soft, #47351d);--_on-accent: var(--color-on-accent, #2a1a0c);--_focus-ring: var(--color-focus-ring, rgba(244, 160, 74, .36));--_border-subtle: var(--color-border-subtle, #2d3239);--_border-default: var(--color-border-default, #3b4149);--_border-strong: var(--color-border-strong, #525a65)}.md-editor-toolbar{display:flex;align-items:center;gap:2px;padding:var(--_space-1) var(--_space-2);border-bottom:1px solid var(--_border-default);background:var(--_surface-subtle);flex-wrap:wrap}.md-editor-toolbar-sep{width:1px;height:18px;background:var(--_border-default);margin:0 var(--_space-1);flex:0 0 auto}.md-editor-toolbar-btn{display:inline-flex;align-items:center;justify-content:center;width:var(--_control-height-sm);height:var(--_control-height-sm);border:1px solid transparent;background:transparent;border-radius:var(--_radius-md);cursor:pointer;color:var(--_text-secondary);transition:background var(--_transition-fast),color var(--_transition-fast),border-color var(--_transition-fast)}.md-editor-toolbar-btn:hover{background:var(--_surface-hover);color:var(--_text-primary)}.md-editor-toolbar-btn:active{background:var(--_surface-active)}.md-editor-toolbar-btn:focus-visible{outline:none;box-shadow:0 0 0 3px var(--_focus-ring)}.md-editor-toolbar-btn.is-toggle.is-active{background:var(--_accent-bg-soft);color:var(--_accent)}.md-editor-body{display:flex;min-height:320px;flex:1 1 auto}.md-editor-pane{flex:1 1 50%;min-width:0;overflow:auto;padding:var(--_space-3)}.md-editor-source{border-right:1px solid var(--_border-default)}.md-editor-source .cm-editor{height:100%;outline:none}.md-editor-source .cm-editor.cm-focused{outline:none}.md-editor-source .cm-scroller{font-family:SFMono-Regular,ui-monospace,Menlo,Consolas,Courier New,monospace;font-size:var(--_font-size-sm);line-height:1.6}.md-editor-source .cm-gutters{background:transparent;border-right:1px solid var(--_border-subtle);color:var(--_text-tertiary)}.md-editor-source .cm-activeLine,.md-editor-source .cm-activeLineGutter{background:var(--_surface-subtle)}.md-editor-preview{line-height:1.7;font-size:var(--_font-size-sm)}.md-editor-preview img{max-width:100%}.md-editor-preview pre{background:var(--_surface-subtle);padding:var(--_space-3);border-radius:var(--_radius-md);overflow:auto;border:1px solid var(--_border-subtle)}.md-editor-preview code{font-family:SFMono-Regular,ui-monospace,Menlo,Consolas,Courier New,monospace;font-size:.92em}.md-editor-preview :not(pre)>code{background:var(--_surface-subtle);padding:1px 5px;border-radius:var(--radius-xs, 3px)}.md-editor-preview table{border-collapse:collapse}.md-editor-preview th,.md-editor-preview td{border:1px solid var(--_border-default);padding:4px 10px}.md-editor-preview th{background:var(--_surface-subtle)}.md-editor-preview blockquote{border-left:3px solid var(--_border-strong);margin:0;padding-left:var(--_space-3);color:var(--_text-secondary)}.md-editor-preview a{color:var(--_accent)}.md-editor-preview hr{border:none;border-top:1px solid var(--_border-default)}.md-editor-block{content-visibility:auto;contain-intrinsic-size:0 160px}.md-editor-mindmap{border:1px dashed var(--_border-default);border-radius:var(--_radius-md);margin:var(--_space-3) 0;min-height:280px}.md-editor-statusbar{display:flex;align-items:center;gap:var(--_space-3);padding:var(--_space-1) var(--_space-3);border-top:1px solid var(--_border-default);background:var(--_surface-subtle);color:var(--_text-tertiary);font-size:var(--_font-size-xs);min-height:var(--footer-height, 24px)}.md-editor-statusbar-muted{color:var(--_text-tertiary)}.md-editor-statusbar-refresh{margin-left:auto;border:1px solid var(--_border-default);background:var(--_surface);color:var(--_text-primary);border-radius:var(--_radius-md);padding:2px var(--_space-2);font-size:var(--_font-size-xs);cursor:pointer}.md-editor-statusbar-refresh:hover{background:var(--_surface-hover)}
1
+ pre code.hljs{display:block;overflow-x:auto;padding:1em}code.hljs{padding:3px 5px}.hljs{color:#abb2bf;background:#282c34}.hljs-comment,.hljs-quote{color:#5c6370;font-style:italic}.hljs-doctag,.hljs-keyword,.hljs-formula{color:#c678dd}.hljs-section,.hljs-name,.hljs-selector-tag,.hljs-deletion,.hljs-subst{color:#e06c75}.hljs-literal{color:#56b6c2}.hljs-string,.hljs-regexp,.hljs-addition,.hljs-attribute,.hljs-meta .hljs-string{color:#98c379}.hljs-attr,.hljs-variable,.hljs-template-variable,.hljs-type,.hljs-selector-class,.hljs-selector-attr,.hljs-selector-pseudo,.hljs-number{color:#d19a66}.hljs-symbol,.hljs-bullet,.hljs-link,.hljs-meta,.hljs-selector-id,.hljs-title{color:#61aeee}.hljs-built_in,.hljs-title.class_,.hljs-class .hljs-title{color:#e6c07b}.hljs-emphasis{font-style:italic}.hljs-strong{font-weight:700}.hljs-link{text-decoration:underline}.markdown-body{--base-size-16: 1rem;--base-size-24: 1.5rem;--base-size-4: .25rem;--base-size-40: 2.5rem;--base-size-8: .5rem;--base-text-weight-medium: 500;--base-text-weight-normal: 400;--base-text-weight-semibold: 600;--fontStack-monospace: ui-monospace, SFMono-Regular, SF Mono, Menlo, Consolas, Liberation Mono, monospace;--fontStack-sansSerif: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji";--fgColor-accent: Highlight}@media (prefers-color-scheme: dark){.markdown-body,[data-theme=dark]{color-scheme:dark;--fgColor-accent: #4493f8;--bgColor-attention-muted: #bb800926;--bgColor-default: #0d1117;--bgColor-muted: #151b23;--bgColor-neutral-muted: #656c7633;--borderColor-accent-emphasis: #1f6feb;--borderColor-attention-emphasis: #9e6a03;--borderColor-danger-emphasis: #da3633;--borderColor-default: #3d444d;--borderColor-done-emphasis: #8957e5;--borderColor-success-emphasis: #238636;--color-prettylights-syntax-brackethighlighter-angle: #9198a1;--color-prettylights-syntax-brackethighlighter-unmatched: #f85149;--color-prettylights-syntax-carriage-return-bg: #b62324;--color-prettylights-syntax-carriage-return-text: #f0f6fc;--color-prettylights-syntax-comment: #9198a1;--color-prettylights-syntax-constant: #79c0ff;--color-prettylights-syntax-constant-other-reference-link: #a5d6ff;--color-prettylights-syntax-entity: #d2a8ff;--color-prettylights-syntax-entity-tag: #7ee787;--color-prettylights-syntax-keyword: #ff7b72;--color-prettylights-syntax-markup-bold: #f0f6fc;--color-prettylights-syntax-markup-changed-bg: #5a1e02;--color-prettylights-syntax-markup-changed-text: #ffdfb6;--color-prettylights-syntax-markup-deleted-bg: #67060c;--color-prettylights-syntax-markup-deleted-text: #ffdcd7;--color-prettylights-syntax-markup-heading: #1f6feb;--color-prettylights-syntax-markup-ignored-bg: #1158c7;--color-prettylights-syntax-markup-ignored-text: #f0f6fc;--color-prettylights-syntax-markup-inserted-bg: #033a16;--color-prettylights-syntax-markup-inserted-text: #aff5b4;--color-prettylights-syntax-markup-italic: #f0f6fc;--color-prettylights-syntax-markup-list: #f2cc60;--color-prettylights-syntax-meta-diff-range: #d2a8ff;--color-prettylights-syntax-storage-modifier-import: #f0f6fc;--color-prettylights-syntax-string: #a5d6ff;--color-prettylights-syntax-string-regexp: #7ee787;--color-prettylights-syntax-sublimelinter-gutter-mark: #3d444d;--color-prettylights-syntax-variable: #ffa657;--fgColor-attention: #d29922;--fgColor-danger: #f85149;--fgColor-default: #f0f6fc;--fgColor-done: #ab7df8;--fgColor-muted: #9198a1;--fgColor-success: #3fb950;--borderColor-muted: #3d444db3;--color-prettylights-syntax-invalid-illegal-bg: var(--bgColor-danger-muted);--color-prettylights-syntax-invalid-illegal-text: var(--fgColor-danger);--focus-outlineColor: var(--borderColor-accent-emphasis);--borderColor-neutral-muted: var(--borderColor-muted)}}@media (prefers-color-scheme: light){.markdown-body,[data-theme=light]{color-scheme:light;--fgColor-danger: #d1242f;--bgColor-attention-muted: #fff8c5;--bgColor-muted: #f6f8fa;--bgColor-neutral-muted: #818b981f;--borderColor-accent-emphasis: #0969da;--borderColor-attention-emphasis: #9a6700;--borderColor-danger-emphasis: #cf222e;--borderColor-default: #d1d9e0;--borderColor-done-emphasis: #8250df;--borderColor-success-emphasis: #1a7f37;--color-prettylights-syntax-brackethighlighter-angle: #59636e;--color-prettylights-syntax-brackethighlighter-unmatched: #82071e;--color-prettylights-syntax-carriage-return-bg: #cf222e;--color-prettylights-syntax-carriage-return-text: #f6f8fa;--color-prettylights-syntax-comment: #59636e;--color-prettylights-syntax-constant: #0550ae;--color-prettylights-syntax-constant-other-reference-link: #0a3069;--color-prettylights-syntax-entity: #6639ba;--color-prettylights-syntax-entity-tag: #0550ae;--color-prettylights-syntax-invalid-illegal-text: var(--fgColor-danger);--color-prettylights-syntax-keyword: #cf222e;--color-prettylights-syntax-markup-changed-bg: #ffd8b5;--color-prettylights-syntax-markup-changed-text: #953800;--color-prettylights-syntax-markup-deleted-bg: #ffebe9;--color-prettylights-syntax-markup-deleted-text: #82071e;--color-prettylights-syntax-markup-heading: #0550ae;--color-prettylights-syntax-markup-ignored-bg: #0550ae;--color-prettylights-syntax-markup-ignored-text: #d1d9e0;--color-prettylights-syntax-markup-inserted-bg: #dafbe1;--color-prettylights-syntax-markup-inserted-text: #116329;--color-prettylights-syntax-markup-list: #3b2300;--color-prettylights-syntax-meta-diff-range: #8250df;--color-prettylights-syntax-string: #0a3069;--color-prettylights-syntax-string-regexp: #116329;--color-prettylights-syntax-sublimelinter-gutter-mark: #818b98;--color-prettylights-syntax-variable: #953800;--fgColor-accent: #0969da;--fgColor-attention: #9a6700;--fgColor-done: #8250df;--fgColor-muted: #59636e;--fgColor-success: #1a7f37;--bgColor-default: #ffffff;--borderColor-muted: #d1d9e0b3;--color-prettylights-syntax-invalid-illegal-bg: var(--bgColor-danger-muted);--color-prettylights-syntax-markup-bold: #1f2328;--color-prettylights-syntax-markup-italic: #1f2328;--color-prettylights-syntax-storage-modifier-import: #1f2328;--fgColor-default: #1f2328;--focus-outlineColor: var(--borderColor-accent-emphasis);--borderColor-neutral-muted: var(--borderColor-muted)}}.markdown-body{-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%;margin:0;font-weight:var(--base-text-weight-normal, 400);color:var(--fgColor-default);background-color:var(--bgColor-default);font-family:var(--fontStack-sansSerif, -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji");font-size:16px;line-height:1.5;word-wrap:break-word}.markdown-body a{text-decoration:underline;text-underline-offset:.2rem}.markdown-body .octicon{display:inline-block;fill:currentColor;vertical-align:text-bottom}.markdown-body h1:hover .anchor .octicon-link:before,.markdown-body h2:hover .anchor .octicon-link:before,.markdown-body h3:hover .anchor .octicon-link:before,.markdown-body h4:hover .anchor .octicon-link:before,.markdown-body h5:hover .anchor .octicon-link:before,.markdown-body h6:hover .anchor .octicon-link:before{width:16px;height:16px;content:" ";display:inline-block;background-color:currentColor;-webkit-mask-image:url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' version='1.1' aria-hidden='true'><path fill-rule='evenodd' d='M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z'></path></svg>");mask-image:url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' version='1.1' aria-hidden='true'><path fill-rule='evenodd' d='M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z'></path></svg>")}.markdown-body details,.markdown-body figcaption,.markdown-body figure{display:block}.markdown-body summary{display:list-item}.markdown-body [hidden]{display:none!important}.markdown-body a{background-color:#0000;color:var(--fgColor-accent);text-decoration:none}.markdown-body abbr[title]{border-bottom:none;-webkit-text-decoration:underline dotted;text-decoration:underline dotted}.markdown-body b,.markdown-body strong{font-weight:var(--base-text-weight-semibold, 600)}.markdown-body dfn{font-style:italic}.markdown-body h1{margin:.67em 0;font-weight:var(--base-text-weight-semibold, 600);padding-bottom:.3em;font-size:2em;border-bottom:1px solid var(--borderColor-muted)}.markdown-body mark{background-color:var(--bgColor-attention-muted);color:var(--fgColor-default)}.markdown-body small{font-size:90%}.markdown-body sub,.markdown-body sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}.markdown-body sub{bottom:-.25em}.markdown-body sup{top:-.5em}.markdown-body img{border-style:none;max-width:100%;box-sizing:content-box}.markdown-body code,.markdown-body kbd,.markdown-body pre,.markdown-body samp{font-family:monospace;font-size:1em}.markdown-body figure{margin:1em var(--base-size-40)}.markdown-body hr{box-sizing:content-box;overflow:hidden;background:#0000;border-bottom:1px solid var(--borderColor-muted);height:.25em;padding:0;margin:var(--base-size-24) 0;background-color:var(--borderColor-default);border:0}.markdown-body input{font:inherit;margin:0;overflow:visible;font-family:inherit;font-size:inherit;line-height:inherit}.markdown-body [type=button],.markdown-body [type=reset],.markdown-body [type=submit]{-webkit-appearance:button;-moz-appearance:button;appearance:button}.markdown-body [type=checkbox],.markdown-body [type=radio]{box-sizing:border-box;padding:0}.markdown-body [type=number]::-webkit-inner-spin-button,.markdown-body [type=number]::-webkit-outer-spin-button{height:auto}.markdown-body [type=search]::-webkit-search-cancel-button,.markdown-body [type=search]::-webkit-search-decoration{-webkit-appearance:none;-moz-appearance:none;appearance:none}.markdown-body ::-webkit-input-placeholder{color:inherit;opacity:.54}.markdown-body ::-webkit-file-upload-button{-webkit-appearance:button;-moz-appearance:button;appearance:button;font:inherit}.markdown-body a:hover{text-decoration:underline}.markdown-body ::placeholder{color:var(--fgColor-muted);opacity:1}.markdown-body hr:before{display:table;content:""}.markdown-body hr:after{display:table;clear:both;content:""}.markdown-body table{border-spacing:0;border-collapse:collapse;display:block;width:max-content;max-width:100%;overflow:auto;font-variant:tabular-nums}.markdown-body td,.markdown-body th{padding:0}.markdown-body details summary{cursor:pointer}.markdown-body a:focus,.markdown-body [role=button]:focus,.markdown-body input[type=radio]:focus,.markdown-body input[type=checkbox]:focus{outline:2px solid var(--focus-outlineColor);outline-offset:-2px;box-shadow:none}.markdown-body a:focus:not(:focus-visible),.markdown-body [role=button]:focus:not(:focus-visible),.markdown-body input[type=radio]:focus:not(:focus-visible),.markdown-body input[type=checkbox]:focus:not(:focus-visible){outline:solid 1px rgba(0,0,0,0)}.markdown-body a:focus-visible,.markdown-body [role=button]:focus-visible,.markdown-body input[type=radio]:focus-visible,.markdown-body input[type=checkbox]:focus-visible{outline:2px solid var(--focus-outlineColor);outline-offset:-2px;box-shadow:none}.markdown-body a:not([class]):focus,.markdown-body a:not([class]):focus-visible,.markdown-body input[type=radio]:focus,.markdown-body input[type=radio]:focus-visible,.markdown-body input[type=checkbox]:focus,.markdown-body input[type=checkbox]:focus-visible{outline-offset:0}.markdown-body kbd{display:inline-block;padding:var(--base-size-4);font:11px var(--fontStack-monospace, ui-monospace, SFMono-Regular, SF Mono, Menlo, Consolas, Liberation Mono, monospace);line-height:10px;color:var(--fgColor-default);vertical-align:middle;background-color:var(--bgColor-muted);border:solid 1px var(--borderColor-neutral-muted);border-bottom-color:var(--borderColor-neutral-muted);border-radius:6px;box-shadow:inset 0 -1px 0 var(--borderColor-neutral-muted)}.markdown-body h1,.markdown-body h2,.markdown-body h3,.markdown-body h4,.markdown-body h5,.markdown-body h6{margin-top:var(--base-size-24);margin-bottom:var(--base-size-16);font-weight:var(--base-text-weight-semibold, 600);line-height:1.25}.markdown-body h2{font-weight:var(--base-text-weight-semibold, 600);padding-bottom:.3em;font-size:1.5em;border-bottom:1px solid var(--borderColor-muted)}.markdown-body h3{font-weight:var(--base-text-weight-semibold, 600);font-size:1.25em}.markdown-body h4{font-weight:var(--base-text-weight-semibold, 600);font-size:1em}.markdown-body h5{font-weight:var(--base-text-weight-semibold, 600);font-size:.875em}.markdown-body h6{font-weight:var(--base-text-weight-semibold, 600);font-size:.85em;color:var(--fgColor-muted)}.markdown-body p{margin-top:0;margin-bottom:10px}.markdown-body blockquote{margin:0;padding:0 1em;color:var(--fgColor-muted);border-left:.25em solid var(--borderColor-default)}.markdown-body ul,.markdown-body ol{margin-top:0;margin-bottom:0;padding-left:2em}.markdown-body ol ol,.markdown-body ul ol{list-style-type:lower-roman}.markdown-body ul ul ol,.markdown-body ul ol ol,.markdown-body ol ul ol,.markdown-body ol ol ol{list-style-type:lower-alpha}.markdown-body dd{margin-left:0}.markdown-body tt,.markdown-body code,.markdown-body samp{font-family:var(--fontStack-monospace, ui-monospace, SFMono-Regular, SF Mono, Menlo, Consolas, Liberation Mono, monospace);font-size:12px}.markdown-body pre{margin-top:0;margin-bottom:0;font-family:var(--fontStack-monospace, ui-monospace, SFMono-Regular, SF Mono, Menlo, Consolas, Liberation Mono, monospace);font-size:12px;word-wrap:normal}.markdown-body .octicon{display:inline-block;overflow:visible!important;vertical-align:text-bottom;fill:currentColor}.markdown-body input::-webkit-outer-spin-button,.markdown-body input::-webkit-inner-spin-button{margin:0;-webkit-appearance:none;-moz-appearance:none;appearance:none}.markdown-body .mr-2{margin-right:var(--base-size-8, 8px)!important}.markdown-body:before{display:table;content:""}.markdown-body:after{display:table;clear:both;content:""}.markdown-body>*:first-child{margin-top:0!important}.markdown-body>*:last-child{margin-bottom:0!important}.markdown-body a:not([href]){color:inherit;text-decoration:none}.markdown-body .absent{color:var(--fgColor-danger)}.markdown-body .anchor{float:left;padding-right:var(--base-size-4);margin-left:-20px;line-height:1}.markdown-body .anchor:focus{outline:none}.markdown-body p,.markdown-body blockquote,.markdown-body ul,.markdown-body ol,.markdown-body dl,.markdown-body table,.markdown-body pre,.markdown-body details{margin-top:0;margin-bottom:var(--base-size-16)}.markdown-body blockquote>:first-child{margin-top:0}.markdown-body blockquote>:last-child{margin-bottom:0}.markdown-body h1 .octicon-link,.markdown-body h2 .octicon-link,.markdown-body h3 .octicon-link,.markdown-body h4 .octicon-link,.markdown-body h5 .octicon-link,.markdown-body h6 .octicon-link{color:var(--fgColor-default);vertical-align:middle;visibility:hidden}.markdown-body h1:hover .anchor,.markdown-body h2:hover .anchor,.markdown-body h3:hover .anchor,.markdown-body h4:hover .anchor,.markdown-body h5:hover .anchor,.markdown-body h6:hover .anchor{text-decoration:none}.markdown-body h1:hover .anchor .octicon-link,.markdown-body h2:hover .anchor .octicon-link,.markdown-body h3:hover .anchor .octicon-link,.markdown-body h4:hover .anchor .octicon-link,.markdown-body h5:hover .anchor .octicon-link,.markdown-body h6:hover .anchor .octicon-link{visibility:visible}.markdown-body h1 tt,.markdown-body h1 code,.markdown-body h2 tt,.markdown-body h2 code,.markdown-body h3 tt,.markdown-body h3 code,.markdown-body h4 tt,.markdown-body h4 code,.markdown-body h5 tt,.markdown-body h5 code,.markdown-body h6 tt,.markdown-body h6 code{padding:0 .2em;font-size:inherit}.markdown-body summary h1,.markdown-body summary h2,.markdown-body summary h3,.markdown-body summary h4,.markdown-body summary h5,.markdown-body summary h6{display:inline-block}.markdown-body summary h1 .anchor,.markdown-body summary h2 .anchor,.markdown-body summary h3 .anchor,.markdown-body summary h4 .anchor,.markdown-body summary h5 .anchor,.markdown-body summary h6 .anchor{margin-left:-40px}.markdown-body summary h1,.markdown-body summary h2{padding-bottom:0;border-bottom:0}.markdown-body ul.no-list,.markdown-body ol.no-list{padding:0;list-style-type:none}.markdown-body ol[type="a s"]{list-style-type:lower-alpha}.markdown-body ol[type="A s"]{list-style-type:upper-alpha}.markdown-body ol[type="i s"]{list-style-type:lower-roman}.markdown-body ol[type="I s"]{list-style-type:upper-roman}.markdown-body ol[type="1"]{list-style-type:decimal}.markdown-body div>ol:not([type]){list-style-type:decimal}.markdown-body ul ul,.markdown-body ul ol,.markdown-body ol ol,.markdown-body ol ul{margin-top:0;margin-bottom:0}.markdown-body li>p{margin-top:var(--base-size-16)}.markdown-body li+li{margin-top:.25em}.markdown-body dl{padding:0}.markdown-body dl dt{padding:0;margin-top:var(--base-size-16);font-size:1em;font-style:italic;font-weight:var(--base-text-weight-semibold, 600)}.markdown-body dl dd{padding:0 var(--base-size-16);margin-bottom:var(--base-size-16)}.markdown-body table th{font-weight:var(--base-text-weight-semibold, 600)}.markdown-body table th,.markdown-body table td{padding:6px 13px;border:1px solid var(--borderColor-default)}.markdown-body table td>:last-child{margin-bottom:0}.markdown-body table tr{background-color:var(--bgColor-default);border-top:1px solid var(--borderColor-muted)}.markdown-body table tr:nth-child(2n){background-color:var(--bgColor-muted)}.markdown-body table img{background-color:#0000}.markdown-body img[align=right]{padding-left:20px}.markdown-body img[align=left]{padding-right:20px}.markdown-body .emoji{max-width:none;vertical-align:text-top;background-color:#0000}.markdown-body span.frame{display:block;overflow:hidden}.markdown-body span.frame>span{display:block;float:left;width:auto;padding:7px;margin:13px 0 0;overflow:hidden;border:1px solid var(--borderColor-default)}.markdown-body span.frame span img{display:block;float:left}.markdown-body span.frame span span{display:block;padding:5px 0 0;clear:both;color:var(--fgColor-default)}.markdown-body span.align-center{display:block;overflow:hidden;clear:both}.markdown-body span.align-center>span{display:block;margin:13px auto 0;overflow:hidden;text-align:center}.markdown-body span.align-center span img{margin:0 auto;text-align:center}.markdown-body span.align-right{display:block;overflow:hidden;clear:both}.markdown-body span.align-right>span{display:block;margin:13px 0 0;overflow:hidden;text-align:right}.markdown-body span.align-right span img{margin:0;text-align:right}.markdown-body span.float-left{display:block;float:left;margin-right:13px;overflow:hidden}.markdown-body span.float-left span{margin:13px 0 0}.markdown-body span.float-right{display:block;float:right;margin-left:13px;overflow:hidden}.markdown-body span.float-right>span{display:block;margin:13px auto 0;overflow:hidden;text-align:right}.markdown-body code,.markdown-body tt{padding:.2em .4em;margin:0;font-size:85%;white-space:break-spaces;background-color:var(--bgColor-neutral-muted);border-radius:6px}.markdown-body code br,.markdown-body tt br{display:none}.markdown-body del code{text-decoration:inherit}.markdown-body samp{font-size:85%}.markdown-body pre code{font-size:100%}.markdown-body pre>code{padding:0;margin:0;word-break:normal;white-space:pre;background:#0000;border:0}.markdown-body .highlight{margin-bottom:var(--base-size-16)}.markdown-body .highlight pre{margin-bottom:0;word-break:normal}.markdown-body .highlight pre,.markdown-body pre{padding:var(--base-size-16);overflow:auto;font-size:85%;line-height:1.45;color:var(--fgColor-default);background-color:var(--bgColor-muted);border-radius:6px}.markdown-body pre code,.markdown-body pre tt{display:inline;padding:0;margin:0;overflow:visible;line-height:inherit;word-wrap:normal;background-color:#0000;border:0}.markdown-body .csv-data td,.markdown-body .csv-data th{padding:5px;overflow:hidden;font-size:12px;line-height:1;text-align:left;white-space:nowrap}.markdown-body .csv-data .blob-num{padding:10px var(--base-size-8) 9px;text-align:right;background:var(--bgColor-default);border:0}.markdown-body .csv-data tr{border-top:0}.markdown-body .csv-data th{font-weight:var(--base-text-weight-semibold, 600);background:var(--bgColor-muted);border-top:0}.markdown-body [data-footnote-ref]:before{content:"["}.markdown-body [data-footnote-ref]:after{content:"]"}.markdown-body .footnotes{font-size:12px;color:var(--fgColor-muted);border-top:1px solid var(--borderColor-default)}.markdown-body .footnotes ol{padding-left:var(--base-size-16)}.markdown-body .footnotes ol ul{display:inline-block;padding-left:var(--base-size-16);margin-top:var(--base-size-16)}.markdown-body .footnotes li{position:relative}.markdown-body .footnotes li:target:before{position:absolute;top:calc(var(--base-size-8)*-1);right:calc(var(--base-size-8)*-1);bottom:calc(var(--base-size-8)*-1);left:calc(var(--base-size-24)*-1);pointer-events:none;content:"";border:2px solid var(--borderColor-accent-emphasis);border-radius:6px}.markdown-body .footnotes li:target{color:var(--fgColor-default)}.markdown-body .footnotes .data-footnote-backref g-emoji{font-family:monospace}.markdown-body .pl-c{color:var(--color-prettylights-syntax-comment)}.markdown-body .pl-c1,.markdown-body .pl-s .pl-v{color:var(--color-prettylights-syntax-constant)}.markdown-body .pl-e,.markdown-body .pl-en{color:var(--color-prettylights-syntax-entity)}.markdown-body .pl-smi,.markdown-body .pl-s .pl-s1{color:var(--color-prettylights-syntax-storage-modifier-import)}.markdown-body .pl-ent{color:var(--color-prettylights-syntax-entity-tag)}.markdown-body .pl-k{color:var(--color-prettylights-syntax-keyword)}.markdown-body .pl-s,.markdown-body .pl-pds,.markdown-body .pl-s .pl-pse .pl-s1,.markdown-body .pl-sr,.markdown-body .pl-sr .pl-cce,.markdown-body .pl-sr .pl-sre,.markdown-body .pl-sr .pl-sra{color:var(--color-prettylights-syntax-string)}.markdown-body .pl-v,.markdown-body .pl-smw{color:var(--color-prettylights-syntax-variable)}.markdown-body .pl-bu{color:var(--color-prettylights-syntax-brackethighlighter-unmatched)}.markdown-body .pl-ii{color:var(--color-prettylights-syntax-invalid-illegal-text);background-color:var(--color-prettylights-syntax-invalid-illegal-bg)}.markdown-body .pl-c2{color:var(--color-prettylights-syntax-carriage-return-text);background-color:var(--color-prettylights-syntax-carriage-return-bg)}.markdown-body .pl-sr .pl-cce{font-weight:700;color:var(--color-prettylights-syntax-string-regexp)}.markdown-body .pl-ml{color:var(--color-prettylights-syntax-markup-list)}.markdown-body .pl-mh,.markdown-body .pl-mh .pl-en,.markdown-body .pl-ms{font-weight:700;color:var(--color-prettylights-syntax-markup-heading)}.markdown-body .pl-mi{font-style:italic;color:var(--color-prettylights-syntax-markup-italic)}.markdown-body .pl-mb{font-weight:700;color:var(--color-prettylights-syntax-markup-bold)}.markdown-body .pl-md{color:var(--color-prettylights-syntax-markup-deleted-text);background-color:var(--color-prettylights-syntax-markup-deleted-bg)}.markdown-body .pl-mi1{color:var(--color-prettylights-syntax-markup-inserted-text);background-color:var(--color-prettylights-syntax-markup-inserted-bg)}.markdown-body .pl-mc{color:var(--color-prettylights-syntax-markup-changed-text);background-color:var(--color-prettylights-syntax-markup-changed-bg)}.markdown-body .pl-mi2{color:var(--color-prettylights-syntax-markup-ignored-text);background-color:var(--color-prettylights-syntax-markup-ignored-bg)}.markdown-body .pl-mdr{font-weight:700;color:var(--color-prettylights-syntax-meta-diff-range)}.markdown-body .pl-ba{color:var(--color-prettylights-syntax-brackethighlighter-angle)}.markdown-body .pl-sg{color:var(--color-prettylights-syntax-sublimelinter-gutter-mark)}.markdown-body .pl-corl{text-decoration:underline;color:var(--color-prettylights-syntax-constant-other-reference-link)}.markdown-body [role=button]:focus:not(:focus-visible),.markdown-body [role=tabpanel][tabindex="0"]:focus:not(:focus-visible),.markdown-body button:focus:not(:focus-visible),.markdown-body summary:focus:not(:focus-visible),.markdown-body a:focus:not(:focus-visible){outline:none;box-shadow:none}.markdown-body [tabindex="0"]:focus:not(:focus-visible),.markdown-body details-dialog:focus:not(:focus-visible){outline:none}.markdown-body g-emoji{display:inline-block;min-width:1ch;font-family:"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol;font-size:1em;font-style:normal!important;font-weight:var(--base-text-weight-normal, 400);line-height:1;vertical-align:-.075em}.markdown-body g-emoji img{width:1em;height:1em}.markdown-body a:has(>p,>div,>pre,>blockquote){display:block}.markdown-body a:has(>p,>div,>pre,>blockquote):not(:has(.snippet-clipboard-content,>pre)){width:fit-content}.markdown-body a:has(>p,>div,>pre,>blockquote):has(.snippet-clipboard-content,>pre):focus-visible{outline:2px solid var(--focus-outlineColor);outline-offset:2px}.markdown-body .task-list-item{list-style-type:none}.markdown-body .task-list-item label{font-weight:var(--base-text-weight-normal, 400)}.markdown-body .task-list-item.enabled label{cursor:pointer}.markdown-body .task-list-item+.task-list-item{margin-top:var(--base-size-4)}.markdown-body .task-list-item .handle{display:none}.markdown-body .task-list-item-checkbox{margin:0 .2em .25em -1.4em;vertical-align:middle}.markdown-body ul:dir(rtl) .task-list-item-checkbox{margin:0 -1.6em .25em .2em}.markdown-body ol:dir(rtl) .task-list-item-checkbox{margin:0 -1.6em .25em .2em}.markdown-body .contains-task-list:hover .task-list-item-convert-container,.markdown-body .contains-task-list:focus-within .task-list-item-convert-container{display:block;width:auto;height:24px;overflow:visible;clip-path:none}.markdown-body ::-webkit-calendar-picker-indicator{filter:invert(50%)}.markdown-body .markdown-alert{padding:var(--base-size-8) var(--base-size-16);margin-bottom:var(--base-size-16);color:inherit;border-left:.25em solid var(--borderColor-default)}.markdown-body .markdown-alert>:first-child{margin-top:0}.markdown-body .markdown-alert>:last-child{margin-bottom:0}.markdown-body .markdown-alert .markdown-alert-title{display:flex;font-weight:var(--base-text-weight-medium, 500);align-items:center;line-height:1}.markdown-body .markdown-alert.markdown-alert-note{border-left-color:var(--borderColor-accent-emphasis)}.markdown-body .markdown-alert.markdown-alert-note .markdown-alert-title{color:var(--fgColor-accent)}.markdown-body .markdown-alert.markdown-alert-important{border-left-color:var(--borderColor-done-emphasis)}.markdown-body .markdown-alert.markdown-alert-important .markdown-alert-title{color:var(--fgColor-done)}.markdown-body .markdown-alert.markdown-alert-warning{border-left-color:var(--borderColor-attention-emphasis)}.markdown-body .markdown-alert.markdown-alert-warning .markdown-alert-title{color:var(--fgColor-attention)}.markdown-body .markdown-alert.markdown-alert-tip{border-left-color:var(--borderColor-success-emphasis)}.markdown-body .markdown-alert.markdown-alert-tip .markdown-alert-title{color:var(--fgColor-success)}.markdown-body .markdown-alert.markdown-alert-caution{border-left-color:var(--borderColor-danger-emphasis)}.markdown-body .markdown-alert.markdown-alert-caution .markdown-alert-title{color:var(--fgColor-danger)}.markdown-body>*:first-child>.heading-element:first-child{margin-top:0!important}.markdown-body .highlight pre:has(+.zeroclipboard-container){min-height:52px}.md-editor-root{--_surface: var(--color-surface, #ffffff);--_surface-subtle: var(--color-surface-subtle, #f8f9fa);--_surface-hover: var(--color-surface-hover, #f4f5f6);--_surface-active: var(--color-surface-active, #e7eaed);--_text-primary: var(--color-text-primary, #26282b);--_text-secondary: var(--color-text-secondary, #6f747c);--_text-tertiary: var(--color-text-tertiary, #989da5);--_accent: var(--color-accent, #f28c28);--_accent-bg: var(--color-accent-bg, #fff8ef);--_accent-bg-soft: var(--color-accent-bg-soft, #fff3e5);--_on-accent: var(--color-on-accent, #ffffff);--_focus-ring: var(--color-focus-ring, rgba(242, 140, 40, .28));--_border-subtle: var(--color-border-subtle, #eceff1);--_border-default: var(--color-border-default, #e0e4e8);--_border-strong: var(--color-border-strong, #ccd2d8);--_shadow-sm: var(--shadow-sm, 0 1px 2px rgba(28, 32, 36, .05));--_shadow-md: var(--shadow-md, 0 4px 16px rgba(28, 32, 36, .12));--_radius-md: var(--radius-md, 6px);--_radius-lg: var(--radius-lg, 8px);--_space-1: var(--space-1, 4px);--_space-2: var(--space-2, 8px);--_space-3: var(--space-3, 12px);--_transition-fast: var(--transition-fast, .14s ease);--_font-ui: var(--font-family-ui, Inter, ui-sans-serif, system-ui, sans-serif);--_font-mono: var(--font-family-mono, "SFMono-Regular", ui-monospace, Menlo, Consolas, "Courier New", monospace);--_font-size-sm: var(--font-size-sm, 13px);--_font-size-xs: var(--font-size-xs, 12px);--_control-height-sm: var(--control-height-sm, 28px);border:1px solid var(--_border-default);border-radius:var(--_radius-lg);overflow:hidden;background:var(--_surface);color:var(--_text-primary);font-family:var(--_font-ui);display:flex;flex-direction:column;box-sizing:border-box;box-shadow:var(--_shadow-sm)}.md-editor-root *{box-sizing:border-box}.md-editor-root[data-theme=dark]{--_surface: var(--color-surface, #1f2125);--_surface-subtle: var(--color-surface-subtle, #25282d);--_surface-hover: var(--color-surface-hover, #2b2f35);--_surface-active: var(--color-surface-active, #3d434c);--_text-primary: var(--color-text-primary, #edf0f3);--_text-secondary: var(--color-text-secondary, #b8bec7);--_text-tertiary: var(--color-text-tertiary, #89919c);--_accent: var(--color-accent, #f4a04a);--_accent-bg: var(--color-accent-bg, #2d2419);--_accent-bg-soft: var(--color-accent-bg-soft, #47351d);--_on-accent: var(--color-on-accent, #2a1a0c);--_focus-ring: var(--color-focus-ring, rgba(244, 160, 74, .36));--_border-subtle: var(--color-border-subtle, #2d3239);--_border-default: var(--color-border-default, #3b4149);--_border-strong: var(--color-border-strong, #525a65)}.md-editor-toolbar{display:flex;align-items:center;gap:2px;padding:var(--_space-1) var(--_space-2);border-bottom:1px solid var(--_border-default);background:var(--_surface-subtle);flex-wrap:wrap}.md-editor-toolbar-sep{width:1px;height:18px;background:var(--_border-default);margin:0 var(--_space-1);flex:0 0 auto}.md-editor-toolbar-btn{display:inline-flex;align-items:center;justify-content:center;width:var(--_control-height-sm);height:var(--_control-height-sm);border:1px solid transparent;background:transparent;border-radius:var(--_radius-md);cursor:pointer;color:var(--_text-secondary);transition:background var(--_transition-fast),color var(--_transition-fast),border-color var(--_transition-fast)}.md-editor-toolbar-btn:hover{background:var(--_surface-hover);color:var(--_text-primary)}.md-editor-toolbar-btn:active{background:var(--_surface-active)}.md-editor-toolbar-btn:focus-visible{outline:none;box-shadow:0 0 0 3px var(--_focus-ring)}.md-editor-toolbar-btn.is-toggle.is-active{background:var(--_accent-bg-soft);color:var(--_accent)}.md-editor-body{display:flex;min-height:320px;flex:1 1 auto}.md-editor-pane{flex:1 1 50%;min-width:0;overflow:auto;padding:var(--_space-3)}.md-editor-source{border-right:1px solid var(--_border-default)}.md-editor-source .cm-editor{height:100%;outline:none}.md-editor-source .cm-editor.cm-focused{outline:none}.md-editor-source .cm-scroller{font-family:var(--_font-mono);font-size:var(--_font-size-sm);line-height:1.6}.md-editor-source .cm-gutters{background:transparent;border-right:1px solid var(--_border-subtle);color:var(--_text-tertiary)}.md-editor-source .cm-activeLine,.md-editor-source .cm-activeLineGutter{background:var(--_surface-subtle)}.md-editor-preview.markdown-body{padding:var(--_space-3);background:transparent;color:var(--_text-primary);font-size:var(--_font-size-sm);line-height:1.7}.md-editor-preview.markdown-body>*:first-child{margin-top:0}.md-editor-preview.markdown-body img{max-width:100%;border-radius:var(--_radius-md)}.md-editor-preview.markdown-body a{color:var(--_accent)}.md-editor-preview.markdown-body blockquote{border-left:3px solid var(--_border-strong);margin:0 0 16px;padding-left:var(--_space-3);color:var(--_text-secondary)}.md-editor-preview.markdown-body hr{border:none;border-top:1px solid var(--_border-default);margin:16px 0}.md-editor-preview.markdown-body table{border-collapse:collapse}.md-editor-preview.markdown-body th,.md-editor-preview.markdown-body td{border:1px solid var(--_border-default);padding:4px 10px}.md-editor-preview.markdown-body th{background:var(--_surface-subtle)}.md-editor-preview.markdown-body :not(pre)>code{background:var(--_surface-subtle);padding:1px 5px;border-radius:3px;font-family:var(--_font-mono);font-size:.9em}.md-editor-codeblock{margin:16px 0;border-radius:var(--_radius-md);overflow:hidden;border:1px solid var(--_border-default);background:#282c34}.md-editor-codeblock-header{display:flex;align-items:center;gap:var(--_space-2);padding:6px var(--_space-3);background:#21252b;border-bottom:1px solid rgba(255,255,255,.08)}.md-editor-codeblock-lights{display:flex;gap:6px;flex:0 0 auto}.md-editor-codeblock-dot{width:10px;height:10px;border-radius:50%;display:inline-block}.md-editor-codeblock-dot--red{background:#ff5f56}.md-editor-codeblock-dot--yellow{background:#ffbd2e}.md-editor-codeblock-dot--green{background:#27c93f}.md-editor-codeblock-lang{color:#abb2bf;font-size:11px;font-family:var(--_font-mono);text-transform:lowercase;flex:1 1 auto;-webkit-user-select:none;user-select:none}.md-editor-codeblock-copy{border:1px solid rgba(255,255,255,.15);background:transparent;color:#abb2bf;border-radius:4px;padding:2px 10px;font-size:11px;cursor:pointer;font-family:var(--_font-ui);transition:background var(--_transition-fast),color var(--_transition-fast)}.md-editor-codeblock-copy:hover{background:#ffffff1a;color:#fff}.md-editor-codeblock-copy.is-copied{background:#27c93f;color:#fff;border-color:#27c93f}.md-editor-codeblock-pre{margin:0;padding:var(--_space-3);overflow:auto;background:transparent}.md-editor-codeblock-pre code{font-family:var(--_font-mono);font-size:13px;line-height:1.6;background:transparent;color:#abb2bf}.md-editor-video{max-width:100%;border-radius:var(--_radius-md);margin:16px 0;display:block}.md-editor-popup{position:absolute;z-index:10000;min-width:320px;max-width:400px;background:var(--_surface);border:1px solid var(--_border-default);border-radius:var(--_radius-lg);box-shadow:var(--_shadow-md);font-family:var(--_font-ui);font-size:var(--_font-size-sm);color:var(--_text-primary);overflow:hidden}.md-editor-popup-header{padding:var(--_space-2) var(--_space-3);font-weight:600;border-bottom:1px solid var(--_border-subtle);background:var(--_surface-subtle)}.md-editor-popup-body{padding:var(--_space-3);display:flex;flex-direction:column;gap:var(--_space-2)}.md-editor-popup-field{display:flex;flex-direction:column;gap:4px}.md-editor-popup-label{font-size:var(--_font-size-xs);color:var(--_text-secondary);font-weight:500}.md-editor-popup-input{width:100%;padding:6px 10px;border:1px solid var(--_border-default);border-radius:var(--_radius-md);background:var(--_surface);color:var(--_text-primary);font-size:var(--_font-size-sm);font-family:var(--_font-ui);outline:none;transition:border-color var(--_transition-fast),box-shadow var(--_transition-fast)}.md-editor-popup-input:focus{border-color:var(--_accent);box-shadow:0 0 0 3px var(--_focus-ring)}.md-editor-popup-input::placeholder{color:var(--_text-tertiary)}.md-editor-popup-footer{display:flex;justify-content:flex-end;gap:var(--_space-2);padding:var(--_space-2) var(--_space-3);border-top:1px solid var(--_border-subtle);background:var(--_surface-subtle)}.md-editor-popup-btn{padding:5px 14px;border-radius:var(--_radius-md);font-size:var(--_font-size-xs);cursor:pointer;border:1px solid transparent;font-family:var(--_font-ui);transition:background var(--_transition-fast)}.md-editor-popup-btn--ghost{background:transparent;color:var(--_text-secondary);border-color:var(--_border-default)}.md-editor-popup-btn--ghost:hover{background:var(--_surface-hover);color:var(--_text-primary)}.md-editor-popup-btn--primary{background:var(--_accent);color:var(--_on-accent)}.md-editor-popup-btn--primary:hover{opacity:.9}.md-editor-block{content-visibility:auto;contain-intrinsic-size:0 160px}.md-editor-mindmap{border:1px dashed var(--_border-default);border-radius:var(--_radius-md);margin:var(--_space-3) 0;min-height:320px;width:100%;position:relative}.md-editor-statusbar{display:flex;align-items:center;gap:var(--_space-3);padding:var(--_space-1) var(--_space-3);border-top:1px solid var(--_border-default);background:var(--_surface-subtle);color:var(--_text-tertiary);font-size:var(--_font-size-xs);min-height:24px}.md-editor-statusbar-muted{color:var(--_text-tertiary)}.md-editor-statusbar-refresh{margin-left:auto;border:1px solid var(--_border-default);background:var(--_surface);color:var(--_text-primary);border-radius:var(--_radius-md);padding:2px var(--_space-2);font-size:var(--_font-size-xs);cursor:pointer}.md-editor-statusbar-refresh:hover{background:var(--_surface-hover)}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@powerduck/md-editor",
3
- "version": "0.2.0",
3
+ "version": "0.3.0",
4
4
  "description": "High-performance embeddable Markdown editor built on markdown-it: KaTeX math, Markmap mindmaps, native React component, block-level incremental rendering with debounced scheduling. Ships in simple mode (no toolbar) and complex mode (toolbar + status bar), styled via CSS custom properties with light/dark themes.",
5
5
  "type": "module",
6
6
  "main": "dist/index.cjs",
@@ -57,6 +57,7 @@
57
57
  "@codemirror/state": "^6.4.1",
58
58
  "@codemirror/view": "^6.28.0",
59
59
  "d3": "^7.9.0",
60
+ "github-markdown-css": "^5.9.0",
60
61
  "katex": "^0.16.11",
61
62
  "markdown-it": "^14.1.0",
62
63
  "markdown-it-texmath": "^1.0.0",