vantage-md 0.6.0 → 0.6.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.cts +32 -32
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.ts +32 -32
- package/dist/index.d.ts.map +1 -1
- package/dist/react.d.cts +21 -21
- package/dist/react.d.cts.map +1 -1
- package/dist/react.d.ts +21 -21
- package/dist/react.d.ts.map +1 -1
- package/package.json +7 -7
package/dist/index.d.cts
CHANGED
|
@@ -43,7 +43,7 @@ interface RenderResult {
|
|
|
43
43
|
* Mermaid code blocks are preserved as `<pre><code class="language-mermaid">`.
|
|
44
44
|
* Use the React `<MarkdownViewer>` component for client-side mermaid rendering.
|
|
45
45
|
*/
|
|
46
|
-
declare function renderMarkdown(content: string, options?: RenderOptions): Promise<RenderResult>;
|
|
46
|
+
export declare function renderMarkdown(content: string, options?: RenderOptions): Promise<RenderResult>;
|
|
47
47
|
//#endregion
|
|
48
48
|
//#region ../../node_modules/@types/unist/index.d.ts
|
|
49
49
|
// ## Interfaces
|
|
@@ -1003,10 +1003,10 @@ interface TextData extends Data {}
|
|
|
1003
1003
|
* closed by different authorities and a change to one must not silently move the
|
|
1004
1004
|
* other. A test asserts the five are a subset of the tones.
|
|
1005
1005
|
*/
|
|
1006
|
-
declare const VANTAGE_ALERTS: readonly ["note", "tip", "important", "warning", "caution"];
|
|
1006
|
+
export declare const VANTAGE_ALERTS: readonly ["note", "tip", "important", "warning", "caution"];
|
|
1007
1007
|
type VantageAlert = (typeof VANTAGE_ALERTS)[number];
|
|
1008
1008
|
/** The visible label per kind. Title case, as GitHub renders it. */
|
|
1009
|
-
declare const ALERT_TITLES: Readonly<Record<VantageAlert, string>>;
|
|
1009
|
+
export declare const ALERT_TITLES: Readonly<Record<VantageAlert, string>>;
|
|
1010
1010
|
/**
|
|
1011
1011
|
* Compile `> [!KIND]` blockquotes into `data-vantage-alert="kind"`.
|
|
1012
1012
|
*
|
|
@@ -1020,7 +1020,7 @@ declare const ALERT_TITLES: Readonly<Record<VantageAlert, string>>;
|
|
|
1020
1020
|
* passed. `dataVantageAlert` is allowlisted there by name *and* value, like
|
|
1021
1021
|
* every other `data-vantage-*` attribute.
|
|
1022
1022
|
*/
|
|
1023
|
-
declare function rehypeVantageAlerts(): (tree: Root) => void;
|
|
1023
|
+
export declare function rehypeVantageAlerts(): (tree: Root) => void;
|
|
1024
1024
|
//#endregion
|
|
1025
1025
|
//#region src/rehypeSourceLines.d.ts
|
|
1026
1026
|
interface RehypeSourceLinesOptions {
|
|
@@ -1069,7 +1069,7 @@ declare function rehypeVantageAnchors(): (tree: Root) => void;
|
|
|
1069
1069
|
* as markup, and it makes the common case a prefix test rather than a grammar
|
|
1070
1070
|
* attempt (Ledger OQ-1).
|
|
1071
1071
|
*/
|
|
1072
|
-
declare const VANTAGE_SENTINEL = "vantage:";
|
|
1072
|
+
export declare const VANTAGE_SENTINEL = "vantage:";
|
|
1073
1073
|
/**
|
|
1074
1074
|
* The closed name set. An unknown name drops the **whole** directive: there is
|
|
1075
1075
|
* no target semantics without a name. An unknown key or value drops only that
|
|
@@ -1081,7 +1081,7 @@ declare const VANTAGE_SENTINEL = "vantage:";
|
|
|
1081
1081
|
* it only says how far the stamp reaches — so §4.2's refusal of a `scope=` key
|
|
1082
1082
|
* stands.
|
|
1083
1083
|
*/
|
|
1084
|
-
declare const DIRECTIVE_NAMES: readonly ["section", "block", "oq"];
|
|
1084
|
+
export declare const DIRECTIVE_NAMES: readonly ["section", "block", "oq"];
|
|
1085
1085
|
/**
|
|
1086
1086
|
* The `tone` vocabulary: GitHub's alert words plus `muted`.
|
|
1087
1087
|
*
|
|
@@ -1089,11 +1089,11 @@ declare const DIRECTIVE_NAMES: readonly ["section", "block", "oq"];
|
|
|
1089
1089
|
* *is*; the theme decides what that looks like, which is what lets one document
|
|
1090
1090
|
* render correctly in light, in dark, and in themes that do not exist yet.
|
|
1091
1091
|
*/
|
|
1092
|
-
declare const VANTAGE_TONES: readonly ["note", "tip", "important", "warning", "caution", "muted"];
|
|
1092
|
+
export declare const VANTAGE_TONES: readonly ["note", "tip", "important", "warning", "caution", "muted"];
|
|
1093
1093
|
/** How much the block should pull the eye — separate from `tone` on purpose. */
|
|
1094
|
-
declare const VANTAGE_EMPHASIS: readonly ["strong", "normal", "quiet"];
|
|
1094
|
+
export declare const VANTAGE_EMPHASIS: readonly ["strong", "normal", "quiet"];
|
|
1095
1095
|
/** A small chip beside the heading. */
|
|
1096
|
-
declare const VANTAGE_BADGES: readonly ["draft", "stale", "blocked", "done", "wip"];
|
|
1096
|
+
export declare const VANTAGE_BADGES: readonly ["draft", "stale", "blocked", "done", "wip"];
|
|
1097
1097
|
/**
|
|
1098
1098
|
* `collapsed` is a token, not a flag: `false` is the default written down.
|
|
1099
1099
|
*
|
|
@@ -1104,7 +1104,7 @@ declare const VANTAGE_BADGES: readonly ["draft", "stale", "blocked", "done", "wi
|
|
|
1104
1104
|
* member of the outer group by design (A3), and the outer run is stamped before
|
|
1105
1105
|
* any inner directive has been resolved.
|
|
1106
1106
|
*/
|
|
1107
|
-
declare const VANTAGE_COLLAPSED: readonly ["true", "false"];
|
|
1107
|
+
export declare const VANTAGE_COLLAPSED: readonly ["true", "false"];
|
|
1108
1108
|
/**
|
|
1109
1109
|
* Where a block sits in a stamped run, so section-wide CSS can join its members
|
|
1110
1110
|
* without an adjacent-sibling combinator.
|
|
@@ -1114,7 +1114,7 @@ declare const VANTAGE_COLLAPSED: readonly ["true", "false"];
|
|
|
1114
1114
|
* commented paragraph and bleeds across the boundary between two adjacent runs
|
|
1115
1115
|
* of different tone. An attribute survives both.
|
|
1116
1116
|
*/
|
|
1117
|
-
declare const VANTAGE_RUNS: readonly ["start", "middle", "end", "only"];
|
|
1117
|
+
export declare const VANTAGE_RUNS: readonly ["start", "middle", "end", "only"];
|
|
1118
1118
|
/**
|
|
1119
1119
|
* The tags a `<!-- vantage: oq … -->` directive actually yields a *button* on —
|
|
1120
1120
|
* `VANTAGE_ANCHOR_TARGETS` minus `pre` and `table`, written as an explicit
|
|
@@ -1132,7 +1132,7 @@ declare const VANTAGE_RUNS: readonly ["start", "middle", "end", "only"];
|
|
|
1132
1132
|
* checker called an `oq` above a fence fine while the app rendered no button
|
|
1133
1133
|
* and said nothing, which is the D5 break this module exists to prevent.
|
|
1134
1134
|
*/
|
|
1135
|
-
declare const VANTAGE_OQ_HOST_TARGETS: ("p" | "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "li" | "blockquote")[];
|
|
1135
|
+
export declare const VANTAGE_OQ_HOST_TARGETS: ("p" | "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "li" | "blockquote")[];
|
|
1136
1136
|
/** `null` for a key the grammar accepts but no closed set covers. */
|
|
1137
1137
|
type KeyVocabulary = readonly string[] | null;
|
|
1138
1138
|
/** The keys one directive name accepts. `undefined` for an unknown key. */
|
|
@@ -1148,7 +1148,7 @@ type DirectiveVocabulary = Readonly<Record<string, KeyTable | undefined>>;
|
|
|
1148
1148
|
* neither can be value-allowlisted, which is recorded here as `null` rather
|
|
1149
1149
|
* than left to a caller to guess.
|
|
1150
1150
|
*/
|
|
1151
|
-
declare const DIRECTIVE_VOCABULARY: DirectiveVocabulary;
|
|
1151
|
+
export declare const DIRECTIVE_VOCABULARY: DirectiveVocabulary;
|
|
1152
1152
|
interface DirectivePair {
|
|
1153
1153
|
key: string;
|
|
1154
1154
|
/** The value with quotes stripped, if it was quoted. */
|
|
@@ -1184,7 +1184,7 @@ type DirectiveParse = ParsedDirective | MalformedDirective | null;
|
|
|
1184
1184
|
* Note `<!--- vantage: x -->` is *not* a directive: its inner text begins with
|
|
1185
1185
|
* the extra `-`, and the sentinel must be the first thing in the comment.
|
|
1186
1186
|
*/
|
|
1187
|
-
declare function hasVantageSentinel(comment: string): boolean;
|
|
1187
|
+
export declare function hasVantageSentinel(comment: string): boolean;
|
|
1188
1188
|
/**
|
|
1189
1189
|
* Parse one comment's **inner** text — the value of a hast `comment` node, with
|
|
1190
1190
|
* `<!--` and `-->` already stripped. `null` means "no sentinel, not ours".
|
|
@@ -1193,7 +1193,7 @@ declare function hasVantageSentinel(comment: string): boolean;
|
|
|
1193
1193
|
* group keeps only its last match and the checker needs an offset per token to
|
|
1194
1194
|
* point at the character that broke.
|
|
1195
1195
|
*/
|
|
1196
|
-
declare function parseVantageDirective(comment: string): DirectiveParse;
|
|
1196
|
+
export declare function parseVantageDirective(comment: string): DirectiveParse;
|
|
1197
1197
|
//#endregion
|
|
1198
1198
|
//#region src/pipeline.d.ts
|
|
1199
1199
|
interface PipelineOptions {
|
|
@@ -1225,7 +1225,7 @@ interface Pipeline {
|
|
|
1225
1225
|
* rehype (`packages/vantage-check/src/core/document.ts`), and it has to parse
|
|
1226
1226
|
* them exactly the way the viewer does.
|
|
1227
1227
|
*/
|
|
1228
|
-
declare function buildRemarkPlugins(options?: PipelineOptions): PluggableList;
|
|
1228
|
+
export declare function buildRemarkPlugins(options?: PipelineOptions): PluggableList;
|
|
1229
1229
|
/**
|
|
1230
1230
|
* Both halves from one options object.
|
|
1231
1231
|
*
|
|
@@ -1238,7 +1238,7 @@ declare function buildRemarkPlugins(options?: PipelineOptions): PluggableList;
|
|
|
1238
1238
|
* that way, so a plugin in the chain cannot become a function of how many times
|
|
1239
1239
|
* the chain has been built.
|
|
1240
1240
|
*/
|
|
1241
|
-
declare function buildPipeline(options?: PipelineOptions): Pipeline;
|
|
1241
|
+
export declare function buildPipeline(options?: PipelineOptions): Pipeline;
|
|
1242
1242
|
//#endregion
|
|
1243
1243
|
//#region src/scrollToLineAnchor.d.ts
|
|
1244
1244
|
/**
|
|
@@ -1250,7 +1250,7 @@ declare function buildPipeline(options?: PipelineOptions): Pipeline;
|
|
|
1250
1250
|
/**
|
|
1251
1251
|
* Clear all line anchor highlights from a container.
|
|
1252
1252
|
*/
|
|
1253
|
-
declare function clearLineAnchorHighlights(container: HTMLElement): void;
|
|
1253
|
+
export declare function clearLineAnchorHighlights(container: HTMLElement): void;
|
|
1254
1254
|
/**
|
|
1255
1255
|
* Scroll to and highlight line-anchored elements in a container.
|
|
1256
1256
|
*
|
|
@@ -1258,7 +1258,7 @@ declare function clearLineAnchorHighlights(container: HTMLElement): void;
|
|
|
1258
1258
|
* @param hash - The URL hash (e.g. "#L42" or "#L42-L50")
|
|
1259
1259
|
* @returns A cleanup function that removes the highlights
|
|
1260
1260
|
*/
|
|
1261
|
-
declare function scrollToLineAnchor(container: HTMLElement, hash: string): (() => void) | null;
|
|
1261
|
+
export declare function scrollToLineAnchor(container: HTMLElement, hash: string): (() => void) | null;
|
|
1262
1262
|
//#endregion
|
|
1263
1263
|
//#region src/lineAnchor.d.ts
|
|
1264
1264
|
/**
|
|
@@ -1274,7 +1274,7 @@ declare function scrollToLineAnchor(container: HTMLElement, hash: string): (() =
|
|
|
1274
1274
|
* Supports: #L42, #L42-L50, #L42-50
|
|
1275
1275
|
* Returns null if the hash is not a line anchor.
|
|
1276
1276
|
*/
|
|
1277
|
-
declare function parseLineAnchor(hash: string): {
|
|
1277
|
+
export declare function parseLineAnchor(hash: string): {
|
|
1278
1278
|
start: number;
|
|
1279
1279
|
end: number;
|
|
1280
1280
|
} | null;
|
|
@@ -1333,7 +1333,7 @@ interface ParsedFrontmatter {
|
|
|
1333
1333
|
* Parse frontmatter from markdown content.
|
|
1334
1334
|
* Supports YAML (delimited by ---) and TOML (delimited by +++).
|
|
1335
1335
|
*/
|
|
1336
|
-
declare function parseFrontmatter(content: string): ParsedFrontmatter;
|
|
1336
|
+
export declare function parseFrontmatter(content: string): ParsedFrontmatter;
|
|
1337
1337
|
//#endregion
|
|
1338
1338
|
//#region src/vantageFrontmatter.d.ts
|
|
1339
1339
|
/**
|
|
@@ -1347,10 +1347,10 @@ declare function parseFrontmatter(content: string): ParsedFrontmatter;
|
|
|
1347
1347
|
* `in-review` — the value the design doc's own only example renders — is not a
|
|
1348
1348
|
* badge word at all. Only `draft` is a member of both, and a token set is per key.
|
|
1349
1349
|
*/
|
|
1350
|
-
declare const DOC_STATUSES: readonly ["draft", "in-review", "accepted", "deprecated"];
|
|
1350
|
+
export declare const DOC_STATUSES: readonly ["draft", "in-review", "accepted", "deprecated"];
|
|
1351
1351
|
type DocStatus = (typeof DOC_STATUSES)[number];
|
|
1352
1352
|
/** Every key this build knows under `vantage:`. Closed. */
|
|
1353
|
-
declare const VANTAGE_FRONTMATTER_KEYS: readonly ["status-chip"];
|
|
1353
|
+
export declare const VANTAGE_FRONTMATTER_KEYS: readonly ["status-chip"];
|
|
1354
1354
|
/**
|
|
1355
1355
|
* Which tone each status borrows its colours from.
|
|
1356
1356
|
*
|
|
@@ -1360,7 +1360,7 @@ declare const VANTAGE_FRONTMATTER_KEYS: readonly ["status-chip"];
|
|
|
1360
1360
|
* than a computed class name, so the whole status→tone relation is one readable
|
|
1361
1361
|
* table and a test can assert it covers the vocabulary.
|
|
1362
1362
|
*/
|
|
1363
|
-
declare const DOC_STATUS_TONES: Readonly<Record<DocStatus, (typeof VANTAGE_TONES)[number]>>;
|
|
1363
|
+
export declare const DOC_STATUS_TONES: Readonly<Record<DocStatus, (typeof VANTAGE_TONES)[number]>>;
|
|
1364
1364
|
/**
|
|
1365
1365
|
* Why something under `vantage:` produced no chrome.
|
|
1366
1366
|
*
|
|
@@ -1394,18 +1394,18 @@ interface VantageFrontmatter {
|
|
|
1394
1394
|
issues: VantageFrontmatterIssue[];
|
|
1395
1395
|
}
|
|
1396
1396
|
/** Narrowing helper the chip and the checker both use. */
|
|
1397
|
-
declare function isDocStatus(value: unknown): value is DocStatus;
|
|
1397
|
+
export declare function isDocStatus(value: unknown): value is DocStatus;
|
|
1398
1398
|
/**
|
|
1399
1399
|
* Read the `vantage:` key out of parsed frontmatter.
|
|
1400
1400
|
*
|
|
1401
1401
|
* Pure: no module state, no mutation of the input, no logging. The same object
|
|
1402
1402
|
* in twice gives equal results out.
|
|
1403
1403
|
*/
|
|
1404
|
-
declare function readVantageFrontmatter(frontmatter: Record<string, unknown>): VantageFrontmatter;
|
|
1404
|
+
export declare function readVantageFrontmatter(frontmatter: Record<string, unknown>): VantageFrontmatter;
|
|
1405
1405
|
//#endregion
|
|
1406
1406
|
//#region src/sanitize.d.ts
|
|
1407
1407
|
type Schema = typeof defaultSchema;
|
|
1408
|
-
declare const SAFE_STYLE: RegExp;
|
|
1408
|
+
export declare const SAFE_STYLE: RegExp;
|
|
1409
1409
|
/**
|
|
1410
1410
|
* Never set `allowComments` here.
|
|
1411
1411
|
*
|
|
@@ -1418,7 +1418,7 @@ declare const SAFE_STYLE: RegExp;
|
|
|
1418
1418
|
* whole premise. `vantageDirectives.test.ts` ("leaves no comment in the rendered
|
|
1419
1419
|
* markup") is the guard.
|
|
1420
1420
|
*/
|
|
1421
|
-
declare const sanitizeSchema: Schema;
|
|
1421
|
+
export declare const sanitizeSchema: Schema;
|
|
1422
1422
|
//#endregion
|
|
1423
1423
|
//#region src/renderMermaidBlocks.d.ts
|
|
1424
1424
|
/**
|
|
@@ -1453,7 +1453,7 @@ interface RenderMermaidOptions {
|
|
|
1453
1453
|
* await renderMermaidBlocks(container);
|
|
1454
1454
|
* ```
|
|
1455
1455
|
*/
|
|
1456
|
-
declare function renderMermaidBlocks(container: HTMLElement, options?: RenderMermaidOptions): Promise<void>;
|
|
1456
|
+
export declare function renderMermaidBlocks(container: HTMLElement, options?: RenderMermaidOptions): Promise<void>;
|
|
1457
1457
|
//#endregion
|
|
1458
1458
|
//#region src/resolveLinks.d.ts
|
|
1459
1459
|
/**
|
|
@@ -1499,7 +1499,7 @@ interface ResolveLinkOptions {
|
|
|
1499
1499
|
* });
|
|
1500
1500
|
* ```
|
|
1501
1501
|
*/
|
|
1502
|
-
declare function resolveLinks(html: string, options?: ResolveLinkOptions): string;
|
|
1502
|
+
export declare function resolveLinks(html: string, options?: ResolveLinkOptions): string;
|
|
1503
1503
|
//#endregion
|
|
1504
1504
|
//#region src/styleGuide.d.ts
|
|
1505
1505
|
/**
|
|
@@ -1516,7 +1516,7 @@ declare function resolveLinks(html: string, options?: ResolveLinkOptions): strin
|
|
|
1516
1516
|
* Every rule stated here should be one a checker can enforce or a renderer
|
|
1517
1517
|
* actually cares about — if a line is neither, it does not belong.
|
|
1518
1518
|
*/
|
|
1519
|
-
declare const STYLE_GUIDE = "## Markdown style guide (for Vantage viewer)\n\nWhen writing or updating markdown documents that will be viewed in Vantage, follow these conventions:\n\n### Structure\n- Use headings (## and ###) to organize content — they become navigable outline anchors.\n- Keep paragraphs focused and concise. Break up dense text with subheadings, lists, or tables.\n\n### Links and cross-references\n- **Relative paths only**: Always link relative to the *current file's directory*:\n - Sibling in same folder: `[Other Doc](./other-doc.md)` or `[Other Doc](other-doc.md)`\n - Subdirectory: `[Design Doc](./design/auth.md)`\n - Parent / sibling folder: `[Overview](../overview.md)` or `[Spec](../specs/api.md)`\n- **Never use leading slashes**:\n - ❌ `[Doc](/docs/guide.md)` (breaks web routing and multi-repo scoping)\n - ✅ `[Doc](../docs/guide.md)` or `[Doc](./guide.md)`\n- **Never use absolute filesystem paths or URI schemes**:\n - ❌ `file:///workspace/docs/guide.md`, `/workspace/docs/guide.md`, `C:\\...`\n - ✅ `[Doc](./guide.md)` or `[Doc](../guide.md)`\n- **Always include the file extension**: Use `.md`, `.ts`, `.go`, etc. (e.g. `[Model](model.go)`).\n- **Line anchors and ranges**:\n - Link to specific lines: `[Handler](../server/api.go#L42)` or `[Range](../server/api.go#L42-L58)`\n - Same-file line anchor: `[See lines](#L10-L25)`\n - Vantage scrolls to and highlights the target lines.\n- **Section anchors**:\n - Same doc: `[Usage](#usage)`\n - Cross-doc: `[Architecture](../overview.md#system-architecture)`\n - Anchor slugs are lowercase, hyphenated, and punctuation-stripped.\n- **Backticks in links**: Place backticks inside the link label, not around the markdown link syntax:\n - ✅ `[`config.json`](./config.json)` or `[config.json](./config.json)`\n - ❌ ``[config.json](./config.json)``\n\n### Frontmatter (Metadata)\n- Include structured metadata at the very top of docs delimited by `---` (YAML) or `+++` (TOML). Vantage renders this as a metadata card:\n```yaml\n---\ntitle: \"Feature Specification\"\nauthor: \"Agent\"\ndate: 2026-08-15\nstatus: in-review # draft | in-review | accepted | deprecated\ntags: [architecture, backend, api]\nsummary: \"Brief description of the document purpose.\"\nvantage:\n status-chip: true # show `status` as a chip above the metadata card\n---\n```\n- **Nothing may sit above the opening delimiter** — not a blank line, not an editorial comment, not a `<!-- vantage: … -->` directive. Frontmatter is recognised only at the very first byte of the file (in Vantage, on GitHub, and in every other reader), so one line above it turns the whole block into body text: a horizontal rule followed by a heading made of the raw keys, with every field lost. `vantage-check` reports it as `frontmatter/not-at-top`.\n- **`vantage:` is Vantage's own reserved key.** It holds chrome that belongs to the file rather than to a section, it never shows up in the metadata card, and every other renderer ignores it. One key today: `status-chip`.\n- **Prefer `status-chip: true`**, which shows the document's own `status:` and therefore cannot disagree with it. A literal `status-chip: accepted` is accepted too, but it is a second value that goes stale on its own — `vantage-check` reports the disagreement.\n- The chip's vocabulary is `status`'s, exactly: `draft | in-review | accepted | deprecated`, lowercase. `Draft` renders no chip at all, silently.\n\n### Mermaid diagrams\n- Use ```mermaid code blocks for flowcharts, sequence diagrams, and architecture diagrams. Vantage provides interactive zoom, pan, dark/light theme adaptation, and SVG export.\n- **Quote labels with special characters**: Always quote node labels containing parentheses, brackets, or colons to prevent syntax errors:\n```mermaid\nflowchart TD\n client[\"Client (React SPA)\"] -->|WebSocket| srv[\"Vantage Server (Go)\"]\n srv --> git[\"Git CLI (git diff)\"]\n```\n\n### Code blocks and diffs\n- Always tag fenced code blocks with language identifiers (`ts`, `go`, `python`, `bash`, `json`, `yaml`, `diff`, `sql`, etc.) for syntax highlighting.\n- For proposed code modifications, use ```diff blocks with `+` and `-` prefixes:\n```diff\n-const oldUrl = \"/api/v1\";\n+const newUrl = \"/api/v2\";\n```\n\n### Callouts and alerts\n- Use GitHub-style blockquote callouts for notes, tips, and warnings:\n> [!NOTE]\n> Background context or helpful explanation.\n\n> [!TIP]\n> Best practice advice or optimization suggestions.\n\n> [!IMPORTANT]\n> Key requirements or crucial information.\n\n> [!WARNING]\n> Urgent caution, breaking changes, or potential pitfalls.\n\n> [!CAUTION]\n> High-risk actions that could cause data loss or security issues.\n\n### Vantage directives (optional, and Vantage-only)\n\nVantage reads a few styling hints from ordinary HTML comments. Every other renderer — GitHub included — drops them, so a document has to read exactly the same without them: directives decorate, they never carry meaning. One goes on a line of its own, with a blank line after it, and applies to the block that follows:\n\n```markdown\n<!-- vantage: section tone=warning badge=stale -->\n\n## Migration path\n\nThe steps below predate the rewrite.\n```\n\n- **Three names**: `section` (the heading and everything under it), `block` (the one block after it), `oq` (one answerable Open Question).\n- **The keys and values are a closed set**: `tone` = `note | tip | important | warning | caution | muted`; `emphasis` = `strong | normal | quiet`; `badge` = `draft | stale | blocked | done | wip`; `collapsed` = `true | false`. Name a *tone*, never a colour — the theme decides what a warning looks like, in light mode, in dark mode, and in print.\n- **Use them sparingly.** One or two per document, on the sections that genuinely differ. A document where everything is toned says nothing, and a rainbow one is harder to read than a plain one.\n- **Anything outside those sets is silently ignored** — nothing breaks, and nothing styles either. Run `vantage-check` on the document: the `vantage/*` rules are the only thing that will ever tell you a directive did nothing.\n- **Always close the comment with `-->`.** Never `--!>`, and never leave it open: Markdown reads every line below an unclosed `<!--` as part of the comment, and the whole rest of the document vanishes from the page. For the same reason `-->` cannot appear *inside* a value — it ends the comment early and spills the remainder into the page as literal text.\n- **In a list, indent the directive inside the item**, with blank lines around it (below). At the start of a line between two items it ends the list and starts a second one, which changes the numbering and the spacing in every renderer — the one thing a directive must never do.\n- **An open question's id is `OQ-` then an optional short uppercase prefix then digits** — `OQ-9`, `OQ-TP6`, `OQ-A03`. The prefix is what keeps ids distinct once one document references another's questions, so use one in both whenever they cross-reference. `vantage-check` reports anything outside that shape as `vantage/oq-id-format`, and the same id twice in one document as `vantage/oq-id-duplicate` — both are silent otherwise, because the id becomes the block's anchor and a refused or duplicated one simply goes nowhere.\n- **A reference is a link, or it is a lie.** An `OQ-` id, a `§N` section number and a filename all read like pointers, and written as bare prose none of them can be followed or checked — which is exactly why a stale one is never caught. Link the question to its anchor (`[OQ-4](#OQ-4)`, or the Decision Ledger once it is compacted), the section to its heading, the filename to the file. `vantage-check` reports all three (`ref/*`) as errors, and checks that the link points at the thing the reference names rather than merely at something. Writing a specimen rather than a reference? Put it in a fenced block, which the rules never read.\n- **Every open question (💬) with a stated leaning gets an `oq` directive.** The convention's prose — the emoji, the `OQ-N` id, the `_Leaning:_` line, the fill-in `**Answer:**` — produces no button on its own. Writing the convention and stopping there is the most common way this feature goes missing: the questions look complete, review mode is on, and there is nothing to click. **`vantage-check` reports it as an error** (`vantage/oq-missing`), because a question awaiting a ruling that the reviewer cannot file is not a style preference. Mark it 🔒 if it is blocked on something upstream and cannot be answered yet, or ✅ once it is decided; either state needs no directive.\n- **A `leaning` restates the leaning; it is never \"yes\".** The one-click button in review mode files that text as a review comment, and the comment is all the agent reading it has — nobody remembers which button was clicked. `leaning=\"Yes\"` beside a two-branch question is a support ticket.\n\n```markdown\n1. **OQ-9: Queue position on re-entry.**\n\n <!-- vantage: oq id=OQ-9 leaning=\"Back of the queue — the fix might interact with what merged while it was out.\" -->\n\n _Leaning:_ Back of the queue.\n```\n\n### Tables, task lists, and math\n- **Tables**: Use standard markdown tables for structured comparisons and schemas.\n- **Task lists**: Use `- [ ]` and `- [x]` for actionable checklists and status tracking.\n- **LaTeX Math**: Use `$$...$$` for *all* KaTeX math — display blocks (`$$` alone on its own lines) and inline alike (`$$E = mc^2$$` mid-sentence).\n - Single dollars are **not** math delimiters: `$HOME` and `$100` stay literal, so prose and shell snippets are safe to write as-is.\n";
|
|
1519
|
+
export declare const STYLE_GUIDE = "## Markdown style guide (for Vantage viewer)\n\nWhen writing or updating markdown documents that will be viewed in Vantage, follow these conventions:\n\n### Structure\n- Use headings (## and ###) to organize content — they become navigable outline anchors.\n- Keep paragraphs focused and concise. Break up dense text with subheadings, lists, or tables.\n\n### Links and cross-references\n- **Relative paths only**: Always link relative to the *current file's directory*:\n - Sibling in same folder: `[Other Doc](./other-doc.md)` or `[Other Doc](other-doc.md)`\n - Subdirectory: `[Design Doc](./design/auth.md)`\n - Parent / sibling folder: `[Overview](../overview.md)` or `[Spec](../specs/api.md)`\n- **Never use leading slashes**:\n - ❌ `[Doc](/docs/guide.md)` (breaks web routing and multi-repo scoping)\n - ✅ `[Doc](../docs/guide.md)` or `[Doc](./guide.md)`\n- **Never use absolute filesystem paths or URI schemes**:\n - ❌ `file:///workspace/docs/guide.md`, `/workspace/docs/guide.md`, `C:\\...`\n - ✅ `[Doc](./guide.md)` or `[Doc](../guide.md)`\n- **Always include the file extension**: Use `.md`, `.ts`, `.go`, etc. (e.g. `[Model](model.go)`).\n- **Line anchors and ranges**:\n - Link to specific lines: `[Handler](../server/api.go#L42)` or `[Range](../server/api.go#L42-L58)`\n - Same-file line anchor: `[See lines](#L10-L25)`\n - Vantage scrolls to and highlights the target lines.\n- **Section anchors**:\n - Same doc: `[Usage](#usage)`\n - Cross-doc: `[Architecture](../overview.md#system-architecture)`\n - Anchor slugs are lowercase, hyphenated, and punctuation-stripped.\n- **Backticks in links**: Place backticks inside the link label, not around the markdown link syntax:\n - ✅ `[`config.json`](./config.json)` or `[config.json](./config.json)`\n - ❌ ``[config.json](./config.json)``\n\n### Frontmatter (Metadata)\n- Include structured metadata at the very top of docs delimited by `---` (YAML) or `+++` (TOML). Vantage renders this as a metadata card:\n```yaml\n---\ntitle: \"Feature Specification\"\nauthor: \"Agent\"\ndate: 2026-08-15\nstatus: in-review # draft | in-review | accepted | deprecated\ntags: [architecture, backend, api]\nsummary: \"Brief description of the document purpose.\"\nvantage:\n status-chip: true # show `status` as a chip above the metadata card\n---\n```\n- **Nothing may sit above the opening delimiter** — not a blank line, not an editorial comment, not a `<!-- vantage: … -->` directive. Frontmatter is recognised only at the very first byte of the file (in Vantage, on GitHub, and in every other reader), so one line above it turns the whole block into body text: a horizontal rule followed by a heading made of the raw keys, with every field lost. `vantage-check` reports it as `frontmatter/not-at-top`.\n- **`vantage:` is Vantage's own reserved key.** It holds chrome that belongs to the file rather than to a section, it never shows up in the metadata card, and every other renderer ignores it. One key today: `status-chip`.\n- **Prefer `status-chip: true`**, which shows the document's own `status:` and therefore cannot disagree with it. A literal `status-chip: accepted` is accepted too, but it is a second value that goes stale on its own — `vantage-check` reports the disagreement.\n- The chip's vocabulary is `status`'s, exactly: `draft | in-review | accepted | deprecated`, lowercase. `Draft` renders no chip at all, silently.\n\n### Mermaid diagrams\n- Use ```mermaid code blocks for flowcharts, sequence diagrams, and architecture diagrams. Vantage provides interactive zoom, pan, dark/light theme adaptation, and SVG export.\n- **Quote labels with special characters**: Always quote node labels containing parentheses, brackets, or colons to prevent syntax errors:\n```mermaid\nflowchart TD\n client[\"Client (React SPA)\"] -->|WebSocket| srv[\"Vantage Server (Go)\"]\n srv --> git[\"Git CLI (git diff)\"]\n```\n\n### Code blocks and diffs\n- Always tag fenced code blocks with language identifiers (`ts`, `go`, `python`, `bash`, `json`, `yaml`, `diff`, `sql`, etc.) for syntax highlighting.\n- For proposed code modifications, use ```diff blocks with `+` and `-` prefixes:\n```diff\n-const oldUrl = \"/api/v1\";\n+const newUrl = \"/api/v2\";\n```\n\n### Callouts and alerts\n- Use GitHub-style blockquote callouts for notes, tips, and warnings:\n> [!NOTE]\n> Background context or helpful explanation.\n\n> [!TIP]\n> Best practice advice or optimization suggestions.\n\n> [!IMPORTANT]\n> Key requirements or crucial information.\n\n> [!WARNING]\n> Urgent caution, breaking changes, or potential pitfalls.\n\n> [!CAUTION]\n> High-risk actions that could cause data loss or security issues.\n\n### Vantage directives (optional, and Vantage-only)\n\nVantage reads a few styling hints from ordinary HTML comments. Every other renderer — GitHub included — drops them, so a document has to read exactly the same without them: directives decorate, they never carry meaning. One goes on a line of its own, with a blank line after it, and applies to the block that follows:\n\n```markdown\n<!-- vantage: section tone=warning badge=stale -->\n\n## Migration path\n\nThe steps below predate the rewrite.\n```\n\n- **Three names**: `section` (the heading and everything under it), `block` (the one block after it), `oq` (one answerable Open Question).\n- **The keys and values are a closed set**: `tone` = `note | tip | important | warning | caution | muted`; `emphasis` = `strong | normal | quiet`; `badge` = `draft | stale | blocked | done | wip`; `collapsed` = `true | false`. Name a *tone*, never a colour — the theme decides what a warning looks like, in light mode, in dark mode, and in print.\n- **Use them sparingly.** One or two per document, on the sections that genuinely differ. A document where everything is toned says nothing, and a rainbow one is harder to read than a plain one.\n- **Anything outside those sets is silently ignored** — nothing breaks, and nothing styles either. Run `vantage-check` on the document: the `vantage/*` rules are the only thing that will ever tell you a directive did nothing.\n- **Always close the comment with `-->`.** Never `--!>`, and never leave it open: Markdown reads every line below an unclosed `<!--` as part of the comment, and the whole rest of the document vanishes from the page. For the same reason `-->` cannot appear *inside* a value — it ends the comment early and spills the remainder into the page as literal text.\n- **In a list, indent the directive inside the item**, with blank lines around it (below). At the start of a line between two items it ends the list and starts a second one, which changes the numbering and the spacing in every renderer — the one thing a directive must never do.\n- **An open question's id is `OQ-` then an optional short uppercase prefix then digits** — `OQ-9`, `OQ-TP6`, `OQ-A03`. The prefix is what keeps ids distinct once one document references another's questions, so use one in both whenever they cross-reference. `vantage-check` reports anything outside that shape as `vantage/oq-id-format`, and the same id twice in one document as `vantage/oq-id-duplicate` — both are silent otherwise, because the id becomes the block's anchor and a refused or duplicated one simply goes nowhere.\n- **A reference is a link, or it is a lie.** An `OQ-` id, a `§N` section number and a filename all read like pointers, and written as bare prose none of them can be followed or checked — which is exactly why a stale one is never caught. Link the question to its anchor (`[OQ-4](#OQ-4)`, or the Decision Ledger once it is compacted), the section to its heading, the filename to the file. `vantage-check` reports all three (`ref/*`) as errors, and checks that the link points at the thing the reference names rather than merely at something. Writing a specimen rather than a reference? Put it in a fenced block, which the rules never read.\n- **Every open question (💬) with a stated leaning gets an `oq` directive.** The convention's prose — the emoji, the `OQ-N` id, the `_Leaning:_` line, the fill-in `**Answer:**` — produces no button on its own. Writing the convention and stopping there is the most common way this feature goes missing: the questions look complete, review mode is on, and there is nothing to click. **`vantage-check` reports it as an error** (`vantage/oq-missing`), because a question awaiting a ruling that the reviewer cannot file is not a style preference. Mark it 🔒 if it is blocked on something upstream and cannot be answered yet, or ✅ once it is decided; either state needs no directive.\n- **A `leaning` restates the leaning; it is never \"yes\".** The one-click button in review mode files that text as a review comment, and the comment is all the agent reading it has — nobody remembers which button was clicked. `leaning=\"Yes\"` beside a two-branch question is a support ticket.\n\n```markdown\n1. **OQ-9: Queue position on re-entry.**\n\n <!-- vantage: oq id=OQ-9 leaning=\"Back of the queue — the fix might interact with what merged while it was out.\" -->\n\n _Leaning:_ Back of the queue.\n```\n\n### Tables, task lists, and math\n- **Tables**: Use standard markdown tables for structured comparisons and schemas.\n- **Task lists**: Use `- [ ]` and `- [x]` for actionable checklists and status tracking.\n- **LaTeX Math**: Use `$$...$$` for *all* KaTeX math — display blocks (`$$` alone on its own lines) and inline alike (`$$E = mc^2$$` mid-sentence).\n - Single dollars are **not** math delimiters: `$HOME` and `$100` stay literal, so prose and shell snippets are safe to write as-is.\n";
|
|
1520
1520
|
//#endregion
|
|
1521
|
-
export {
|
|
1521
|
+
export { type DirectivePair, type DirectiveParse, type DirectiveVocabulary, type DocStatus, type FrontmatterFormat, type FrontmatterProblem, type KeyTable, type KeyVocabulary, type MalformedDirective, type ParsedDirective, type ParsedFrontmatter, type Pipeline, type PipelineOptions, type RenderMermaidOptions, type RenderOptions, type RenderResult, type ResolveLinkOptions, type VantageAlert, type VantageFrontmatter, type VantageFrontmatterIssue, rehypeSourceLines, rehypeVantageAnchors, rehypeVantageDirectives };
|
|
1522
1522
|
//# sourceMappingURL=index.d.cts.map
|
package/dist/index.d.cts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.cts","names":[],"sources":["../src/renderMarkdown.ts","../../../node_modules/@types/unist/index.d.ts","../../../node_modules/@types/hast/index.d.ts","../src/rehypeVantageAlerts.ts","../src/rehypeSourceLines.ts","../src/rehypeVantageDirectives.ts","../src/rehypeVantageAnchors.ts","../src/vantageDirectives.ts","../src/pipeline.ts","../src/scrollToLineAnchor.ts","../src/lineAnchor.ts","../src/frontmatter.ts","../src/vantageFrontmatter.ts","../src/sanitize.ts","../src/renderMermaidBlocks.ts","../src/resolveLinks.ts","../src/styleGuide.ts"],"x_google_ignoreList":[1,2],"mappings":";;;;;;;UAaiB;;EAEf;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;;UAGe;;EAEf;;EAEA,aAAa;;EAEb;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"index.d.cts","names":[],"sources":["../src/renderMarkdown.ts","../../../node_modules/@types/unist/index.d.ts","../../../node_modules/@types/hast/index.d.ts","../src/rehypeVantageAlerts.ts","../src/rehypeSourceLines.ts","../src/rehypeVantageDirectives.ts","../src/rehypeVantageAnchors.ts","../src/vantageDirectives.ts","../src/pipeline.ts","../src/scrollToLineAnchor.ts","../src/lineAnchor.ts","../src/frontmatter.ts","../src/vantageFrontmatter.ts","../src/sanitize.ts","../src/renderMermaidBlocks.ts","../src/resolveLinks.ts","../src/styleGuide.ts"],"x_google_ignoreList":[1,2],"mappings":";;;;;;;UAaiB;;EAEf;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;;UAGe;;EAEf;;EAEA,aAAa;;EAEb;;;;;;;;;;;;;;;;;;wBAmBoB,eACpB,iBACA,UAAS,gBACR,QAAQ;;;;;;;;;;;;;;;;;;;;;;;UCnCM;;;;UAKA;;;;EAIb;;;;EAKA;;;;EAIA;;;;;;;UAQa;;;;EAIb,OAAO;;;;EAKP,KAAK;;;;;;;;;;;;UA6BQ;;;;EAIb;;;;EAKA,OAAO;;;;;;;EAQP,WAAW;;;;;;;;;;;;;;;;;;;;;;;UChFE,aAAa;;;;UAKb;EACb;EACA,QAAQ;EACR;EACA,SAAS;EACT,gBAAgB;EAChB,YAAY;EACZ;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA,UAAU;EACV;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA,eAAe;EACf;EACA,kBAAkB;EAClB;EACA;EACA,iBAAiB;EACjB;EACA;EACA,aAAa;EACb;EACA;EACA;EACA;EACA;EACA;EACA,iBAAiB;EACjB;EACA;EACA;EACA;EACA;EACA;EACA,WAAW;EACX;EACA;EACA;EACA;EACA;EACA;EACA,sBAAsB;EACtB;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA,eAAe;EACf;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA,WAAW;EACX;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA,YAAY;EACZ;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA,eAAe;EACf,SAAS;EACT;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA,cAAc;EACd;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA,KAAK;EACL,KAAK;EACL,YAAY;EACZ;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA,UAAU;EACV;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA,UAAU;EACV,YAAY;EACZ;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA,WAAW;EACX,UAAU;EACV;EACA,WAAW;EACX;EACA;EACA;EACA;EACA;EACA,eAAe;EACf;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA,OAAO;EACP;EACA;EACA;EACA;EACA;EACA;EACA;EACA,OAAO;EACP;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA,oBAAoB;EACpB;EACA;EACA;EACA;EACA;EACA;EACA,MAAM;EACN;EACA;EACA;EACA;EACA,qBAAqB;EACrB,mBAAmB;EACnB,gBAAgB;EAChB,kBAAkB;EAClB;EACA;EACA;EACA;EACA,eAAe;EACf;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA,UAAU;EACV;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA,kBAAkB;EAClB;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA,iBAAiB;EACjB;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA,SAAS;EACT;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;GACC,sEAAsE;;;;;;;;;KAW/D,iBAAiB,wBAAwB;;;;;;UAOpC;EACb,SAAS;EACT,SAAS;EACT,MAAM;;;;;;;;KASE,cAAc,qBAAqB;;;;;;;;;UAU9B;EACb,SAAS;EACT,SAAS;EACT,SAAS;EACT,MAAM;;;;;;;;;;;;;;;;UAsDO,aAAa;;;;EAI1B,OAAO;;;;;;;;;UAUM,gBAAgB;;;;EAI7B;;;;;;;;;UAUa,eAAe;;;;EAI5B,UAAU;;;;;;UAQG,gBAAgB;;;;EAI7B;;;;EAIA,OAAO;;;;;UAMM,oBAAoB;;;;UAKpB,gBAAgB;;;;EAI7B;;;;EAIA,OAAO;;;;;UAMM,oBAAoB;;;;UAKpB,gBAAgB;;;;EAI7B;;;;EAIA;;;;EAIA,YAAY;;;;EAIZ,UAAU;;;;;EAKV,UAAU;;;;EAIV,OAAO;;;;;UAMM,oBAAoB;;;;;;;;UASpB,aAAa;;;;EAI1B;;;;EAIA,UAAU;;;;EAIV,OAAO;;;;;UAMM,iBAAiB;;;;UAKjB,aAAa;;;;EAI1B;;;;EAIA,OAAO;;;;;UAMM,iBAAiB;;;;;;;;;;;;qBC92BrB;KAQD,uBAAuB;;qBAGtB,cAAc,SAAS,OAAO;;;;;;;;;;;;;;wBA8C3B,wBACN,MAAM;;;UC9DC;;;;;;;EAOf;;cAkBI,mBAAmB,QAAQ,4BAA4B;;;cCkYvD,yBAAyB,WAAW;;;iBCvalB,yBACd,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qBCDH;;;;;;;;;;;;qBAaA;;;;;;;;qBASA;;qBAUA;;qBAGA;;;;;;;;;;;qBAkBA;;;;;;;;;;qBAWA;;;;;;;;;;;;;;;;;;qBAiFA;;KAuBD;;KAGA,WAAW,SAAS,eAAe;;KAGnC,sBAAsB,SAChC,eAAe;;;;;;;;;;qBAmBJ,sBAAsB;UAMlB;EACf;;EAEA;;EAEA;;EAEA;EACA;;UAGe;EACf;EACA;;EAEA;;;EAGA,OAAO;;;UAIQ;EACf;;EAEA;;EAEA;;KAGU,iBAAiB,kBAAkB;;;;;;;;wBA6B/B,mBAAmB;;;;;;;;;wBAwCnB,sBAAsB,kBAAkB;;;UCrRvC;;EAEf;;EAEA;;EAEA;;EAEA;;EAEA;;;;;;;EAOA;;UAGe;EACf,eAAe;EACf,eAAe;;;;;;;;wBASD,mBACd,UAAS,kBACR;;;;;;;;;;;;;wBA+Ea,cAAc,UAAS,kBAAuB;;;;;;;;;;;;wBCrJ9C,0BAA0B,WAAW;;;;;;;;wBAarC,mBACd,WAAW,aACX;;;;;;;;;;;;;;;;wBCfc,gBACd;EACG;EAAe;;;;;;;;KCRR;;;;;;;;;;;;;;;;UAiBK;EACf;;EAEA;EACA;EACA;EACA;;UAGe;EACf,aAAa;EACb;EACA,QAAQ;;;;;;;;;;EAUR;;;;;;EAMA,UAAU;;;;;;wBAOI,iBAAiB,kBAAkB;;;;;;;;;;;;;;qBC1BtC;KAOD,oBAAoB;;qBAGnB;;;;;;;;;;qBAWA,kBAAkB,SAC7B,OAAO,mBAAmB;;;;;;;;KAehB;EACN;EAAqB;;EACrB;EAAqB;;EACrB;EAAmB;EAAa;EAAgB;;EAChD;EAA4B;;EAC5B;EAA+B,MAAM;EAAW;;UAErC;;EAEf,aAAa;;EAEb,QAAQ;;;wBAWM,YAAY,iBAAiB,SAAS;;;;;;;wBAsBtC,uBACd,aAAa,0BACZ;;;KCpGE,gBAAgB;qBA2JR,YAAU;;;;;;;;;;;;;qBA2BV,gBAAgB;;;;;;;;;;;;UC1LZ;;EAEf;;EAEA,WAAW,cAAc,OAAO;;;;;;;;;;;;;;;;;;;wBAoBZ,oBACpB,WAAW,aACX,UAAS,uBACR;;;;;;;;;;UChCc;;EAEf;;;;;;EAMA,YAAY,cAAc;;EAE1B;;;;;;;;;;;;;;;;;;;;;;;;;;wBA2Bc,aACd,cACA,UAAS;;;;;;;;;;;;;;;;;qBChCE"}
|
package/dist/index.d.ts
CHANGED
|
@@ -43,7 +43,7 @@ interface RenderResult {
|
|
|
43
43
|
* Mermaid code blocks are preserved as `<pre><code class="language-mermaid">`.
|
|
44
44
|
* Use the React `<MarkdownViewer>` component for client-side mermaid rendering.
|
|
45
45
|
*/
|
|
46
|
-
declare function renderMarkdown(content: string, options?: RenderOptions): Promise<RenderResult>;
|
|
46
|
+
export declare function renderMarkdown(content: string, options?: RenderOptions): Promise<RenderResult>;
|
|
47
47
|
//#endregion
|
|
48
48
|
//#region ../../node_modules/@types/unist/index.d.ts
|
|
49
49
|
// ## Interfaces
|
|
@@ -1003,10 +1003,10 @@ interface TextData extends Data {}
|
|
|
1003
1003
|
* closed by different authorities and a change to one must not silently move the
|
|
1004
1004
|
* other. A test asserts the five are a subset of the tones.
|
|
1005
1005
|
*/
|
|
1006
|
-
declare const VANTAGE_ALERTS: readonly ["note", "tip", "important", "warning", "caution"];
|
|
1006
|
+
export declare const VANTAGE_ALERTS: readonly ["note", "tip", "important", "warning", "caution"];
|
|
1007
1007
|
type VantageAlert = (typeof VANTAGE_ALERTS)[number];
|
|
1008
1008
|
/** The visible label per kind. Title case, as GitHub renders it. */
|
|
1009
|
-
declare const ALERT_TITLES: Readonly<Record<VantageAlert, string>>;
|
|
1009
|
+
export declare const ALERT_TITLES: Readonly<Record<VantageAlert, string>>;
|
|
1010
1010
|
/**
|
|
1011
1011
|
* Compile `> [!KIND]` blockquotes into `data-vantage-alert="kind"`.
|
|
1012
1012
|
*
|
|
@@ -1020,7 +1020,7 @@ declare const ALERT_TITLES: Readonly<Record<VantageAlert, string>>;
|
|
|
1020
1020
|
* passed. `dataVantageAlert` is allowlisted there by name *and* value, like
|
|
1021
1021
|
* every other `data-vantage-*` attribute.
|
|
1022
1022
|
*/
|
|
1023
|
-
declare function rehypeVantageAlerts(): (tree: Root) => void;
|
|
1023
|
+
export declare function rehypeVantageAlerts(): (tree: Root) => void;
|
|
1024
1024
|
//#endregion
|
|
1025
1025
|
//#region src/rehypeSourceLines.d.ts
|
|
1026
1026
|
interface RehypeSourceLinesOptions {
|
|
@@ -1069,7 +1069,7 @@ declare function rehypeVantageAnchors(): (tree: Root) => void;
|
|
|
1069
1069
|
* as markup, and it makes the common case a prefix test rather than a grammar
|
|
1070
1070
|
* attempt (Ledger OQ-1).
|
|
1071
1071
|
*/
|
|
1072
|
-
declare const VANTAGE_SENTINEL = "vantage:";
|
|
1072
|
+
export declare const VANTAGE_SENTINEL = "vantage:";
|
|
1073
1073
|
/**
|
|
1074
1074
|
* The closed name set. An unknown name drops the **whole** directive: there is
|
|
1075
1075
|
* no target semantics without a name. An unknown key or value drops only that
|
|
@@ -1081,7 +1081,7 @@ declare const VANTAGE_SENTINEL = "vantage:";
|
|
|
1081
1081
|
* it only says how far the stamp reaches — so §4.2's refusal of a `scope=` key
|
|
1082
1082
|
* stands.
|
|
1083
1083
|
*/
|
|
1084
|
-
declare const DIRECTIVE_NAMES: readonly ["section", "block", "oq"];
|
|
1084
|
+
export declare const DIRECTIVE_NAMES: readonly ["section", "block", "oq"];
|
|
1085
1085
|
/**
|
|
1086
1086
|
* The `tone` vocabulary: GitHub's alert words plus `muted`.
|
|
1087
1087
|
*
|
|
@@ -1089,11 +1089,11 @@ declare const DIRECTIVE_NAMES: readonly ["section", "block", "oq"];
|
|
|
1089
1089
|
* *is*; the theme decides what that looks like, which is what lets one document
|
|
1090
1090
|
* render correctly in light, in dark, and in themes that do not exist yet.
|
|
1091
1091
|
*/
|
|
1092
|
-
declare const VANTAGE_TONES: readonly ["note", "tip", "important", "warning", "caution", "muted"];
|
|
1092
|
+
export declare const VANTAGE_TONES: readonly ["note", "tip", "important", "warning", "caution", "muted"];
|
|
1093
1093
|
/** How much the block should pull the eye — separate from `tone` on purpose. */
|
|
1094
|
-
declare const VANTAGE_EMPHASIS: readonly ["strong", "normal", "quiet"];
|
|
1094
|
+
export declare const VANTAGE_EMPHASIS: readonly ["strong", "normal", "quiet"];
|
|
1095
1095
|
/** A small chip beside the heading. */
|
|
1096
|
-
declare const VANTAGE_BADGES: readonly ["draft", "stale", "blocked", "done", "wip"];
|
|
1096
|
+
export declare const VANTAGE_BADGES: readonly ["draft", "stale", "blocked", "done", "wip"];
|
|
1097
1097
|
/**
|
|
1098
1098
|
* `collapsed` is a token, not a flag: `false` is the default written down.
|
|
1099
1099
|
*
|
|
@@ -1104,7 +1104,7 @@ declare const VANTAGE_BADGES: readonly ["draft", "stale", "blocked", "done", "wi
|
|
|
1104
1104
|
* member of the outer group by design (A3), and the outer run is stamped before
|
|
1105
1105
|
* any inner directive has been resolved.
|
|
1106
1106
|
*/
|
|
1107
|
-
declare const VANTAGE_COLLAPSED: readonly ["true", "false"];
|
|
1107
|
+
export declare const VANTAGE_COLLAPSED: readonly ["true", "false"];
|
|
1108
1108
|
/**
|
|
1109
1109
|
* Where a block sits in a stamped run, so section-wide CSS can join its members
|
|
1110
1110
|
* without an adjacent-sibling combinator.
|
|
@@ -1114,7 +1114,7 @@ declare const VANTAGE_COLLAPSED: readonly ["true", "false"];
|
|
|
1114
1114
|
* commented paragraph and bleeds across the boundary between two adjacent runs
|
|
1115
1115
|
* of different tone. An attribute survives both.
|
|
1116
1116
|
*/
|
|
1117
|
-
declare const VANTAGE_RUNS: readonly ["start", "middle", "end", "only"];
|
|
1117
|
+
export declare const VANTAGE_RUNS: readonly ["start", "middle", "end", "only"];
|
|
1118
1118
|
/**
|
|
1119
1119
|
* The tags a `<!-- vantage: oq … -->` directive actually yields a *button* on —
|
|
1120
1120
|
* `VANTAGE_ANCHOR_TARGETS` minus `pre` and `table`, written as an explicit
|
|
@@ -1132,7 +1132,7 @@ declare const VANTAGE_RUNS: readonly ["start", "middle", "end", "only"];
|
|
|
1132
1132
|
* checker called an `oq` above a fence fine while the app rendered no button
|
|
1133
1133
|
* and said nothing, which is the D5 break this module exists to prevent.
|
|
1134
1134
|
*/
|
|
1135
|
-
declare const VANTAGE_OQ_HOST_TARGETS: ("p" | "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "li" | "blockquote")[];
|
|
1135
|
+
export declare const VANTAGE_OQ_HOST_TARGETS: ("p" | "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "li" | "blockquote")[];
|
|
1136
1136
|
/** `null` for a key the grammar accepts but no closed set covers. */
|
|
1137
1137
|
type KeyVocabulary = readonly string[] | null;
|
|
1138
1138
|
/** The keys one directive name accepts. `undefined` for an unknown key. */
|
|
@@ -1148,7 +1148,7 @@ type DirectiveVocabulary = Readonly<Record<string, KeyTable | undefined>>;
|
|
|
1148
1148
|
* neither can be value-allowlisted, which is recorded here as `null` rather
|
|
1149
1149
|
* than left to a caller to guess.
|
|
1150
1150
|
*/
|
|
1151
|
-
declare const DIRECTIVE_VOCABULARY: DirectiveVocabulary;
|
|
1151
|
+
export declare const DIRECTIVE_VOCABULARY: DirectiveVocabulary;
|
|
1152
1152
|
interface DirectivePair {
|
|
1153
1153
|
key: string;
|
|
1154
1154
|
/** The value with quotes stripped, if it was quoted. */
|
|
@@ -1184,7 +1184,7 @@ type DirectiveParse = ParsedDirective | MalformedDirective | null;
|
|
|
1184
1184
|
* Note `<!--- vantage: x -->` is *not* a directive: its inner text begins with
|
|
1185
1185
|
* the extra `-`, and the sentinel must be the first thing in the comment.
|
|
1186
1186
|
*/
|
|
1187
|
-
declare function hasVantageSentinel(comment: string): boolean;
|
|
1187
|
+
export declare function hasVantageSentinel(comment: string): boolean;
|
|
1188
1188
|
/**
|
|
1189
1189
|
* Parse one comment's **inner** text — the value of a hast `comment` node, with
|
|
1190
1190
|
* `<!--` and `-->` already stripped. `null` means "no sentinel, not ours".
|
|
@@ -1193,7 +1193,7 @@ declare function hasVantageSentinel(comment: string): boolean;
|
|
|
1193
1193
|
* group keeps only its last match and the checker needs an offset per token to
|
|
1194
1194
|
* point at the character that broke.
|
|
1195
1195
|
*/
|
|
1196
|
-
declare function parseVantageDirective(comment: string): DirectiveParse;
|
|
1196
|
+
export declare function parseVantageDirective(comment: string): DirectiveParse;
|
|
1197
1197
|
//#endregion
|
|
1198
1198
|
//#region src/pipeline.d.ts
|
|
1199
1199
|
interface PipelineOptions {
|
|
@@ -1225,7 +1225,7 @@ interface Pipeline {
|
|
|
1225
1225
|
* rehype (`packages/vantage-check/src/core/document.ts`), and it has to parse
|
|
1226
1226
|
* them exactly the way the viewer does.
|
|
1227
1227
|
*/
|
|
1228
|
-
declare function buildRemarkPlugins(options?: PipelineOptions): PluggableList;
|
|
1228
|
+
export declare function buildRemarkPlugins(options?: PipelineOptions): PluggableList;
|
|
1229
1229
|
/**
|
|
1230
1230
|
* Both halves from one options object.
|
|
1231
1231
|
*
|
|
@@ -1238,7 +1238,7 @@ declare function buildRemarkPlugins(options?: PipelineOptions): PluggableList;
|
|
|
1238
1238
|
* that way, so a plugin in the chain cannot become a function of how many times
|
|
1239
1239
|
* the chain has been built.
|
|
1240
1240
|
*/
|
|
1241
|
-
declare function buildPipeline(options?: PipelineOptions): Pipeline;
|
|
1241
|
+
export declare function buildPipeline(options?: PipelineOptions): Pipeline;
|
|
1242
1242
|
//#endregion
|
|
1243
1243
|
//#region src/scrollToLineAnchor.d.ts
|
|
1244
1244
|
/**
|
|
@@ -1250,7 +1250,7 @@ declare function buildPipeline(options?: PipelineOptions): Pipeline;
|
|
|
1250
1250
|
/**
|
|
1251
1251
|
* Clear all line anchor highlights from a container.
|
|
1252
1252
|
*/
|
|
1253
|
-
declare function clearLineAnchorHighlights(container: HTMLElement): void;
|
|
1253
|
+
export declare function clearLineAnchorHighlights(container: HTMLElement): void;
|
|
1254
1254
|
/**
|
|
1255
1255
|
* Scroll to and highlight line-anchored elements in a container.
|
|
1256
1256
|
*
|
|
@@ -1258,7 +1258,7 @@ declare function clearLineAnchorHighlights(container: HTMLElement): void;
|
|
|
1258
1258
|
* @param hash - The URL hash (e.g. "#L42" or "#L42-L50")
|
|
1259
1259
|
* @returns A cleanup function that removes the highlights
|
|
1260
1260
|
*/
|
|
1261
|
-
declare function scrollToLineAnchor(container: HTMLElement, hash: string): (() => void) | null;
|
|
1261
|
+
export declare function scrollToLineAnchor(container: HTMLElement, hash: string): (() => void) | null;
|
|
1262
1262
|
//#endregion
|
|
1263
1263
|
//#region src/lineAnchor.d.ts
|
|
1264
1264
|
/**
|
|
@@ -1274,7 +1274,7 @@ declare function scrollToLineAnchor(container: HTMLElement, hash: string): (() =
|
|
|
1274
1274
|
* Supports: #L42, #L42-L50, #L42-50
|
|
1275
1275
|
* Returns null if the hash is not a line anchor.
|
|
1276
1276
|
*/
|
|
1277
|
-
declare function parseLineAnchor(hash: string): {
|
|
1277
|
+
export declare function parseLineAnchor(hash: string): {
|
|
1278
1278
|
start: number;
|
|
1279
1279
|
end: number;
|
|
1280
1280
|
} | null;
|
|
@@ -1333,7 +1333,7 @@ interface ParsedFrontmatter {
|
|
|
1333
1333
|
* Parse frontmatter from markdown content.
|
|
1334
1334
|
* Supports YAML (delimited by ---) and TOML (delimited by +++).
|
|
1335
1335
|
*/
|
|
1336
|
-
declare function parseFrontmatter(content: string): ParsedFrontmatter;
|
|
1336
|
+
export declare function parseFrontmatter(content: string): ParsedFrontmatter;
|
|
1337
1337
|
//#endregion
|
|
1338
1338
|
//#region src/vantageFrontmatter.d.ts
|
|
1339
1339
|
/**
|
|
@@ -1347,10 +1347,10 @@ declare function parseFrontmatter(content: string): ParsedFrontmatter;
|
|
|
1347
1347
|
* `in-review` — the value the design doc's own only example renders — is not a
|
|
1348
1348
|
* badge word at all. Only `draft` is a member of both, and a token set is per key.
|
|
1349
1349
|
*/
|
|
1350
|
-
declare const DOC_STATUSES: readonly ["draft", "in-review", "accepted", "deprecated"];
|
|
1350
|
+
export declare const DOC_STATUSES: readonly ["draft", "in-review", "accepted", "deprecated"];
|
|
1351
1351
|
type DocStatus = (typeof DOC_STATUSES)[number];
|
|
1352
1352
|
/** Every key this build knows under `vantage:`. Closed. */
|
|
1353
|
-
declare const VANTAGE_FRONTMATTER_KEYS: readonly ["status-chip"];
|
|
1353
|
+
export declare const VANTAGE_FRONTMATTER_KEYS: readonly ["status-chip"];
|
|
1354
1354
|
/**
|
|
1355
1355
|
* Which tone each status borrows its colours from.
|
|
1356
1356
|
*
|
|
@@ -1360,7 +1360,7 @@ declare const VANTAGE_FRONTMATTER_KEYS: readonly ["status-chip"];
|
|
|
1360
1360
|
* than a computed class name, so the whole status→tone relation is one readable
|
|
1361
1361
|
* table and a test can assert it covers the vocabulary.
|
|
1362
1362
|
*/
|
|
1363
|
-
declare const DOC_STATUS_TONES: Readonly<Record<DocStatus, (typeof VANTAGE_TONES)[number]>>;
|
|
1363
|
+
export declare const DOC_STATUS_TONES: Readonly<Record<DocStatus, (typeof VANTAGE_TONES)[number]>>;
|
|
1364
1364
|
/**
|
|
1365
1365
|
* Why something under `vantage:` produced no chrome.
|
|
1366
1366
|
*
|
|
@@ -1394,18 +1394,18 @@ interface VantageFrontmatter {
|
|
|
1394
1394
|
issues: VantageFrontmatterIssue[];
|
|
1395
1395
|
}
|
|
1396
1396
|
/** Narrowing helper the chip and the checker both use. */
|
|
1397
|
-
declare function isDocStatus(value: unknown): value is DocStatus;
|
|
1397
|
+
export declare function isDocStatus(value: unknown): value is DocStatus;
|
|
1398
1398
|
/**
|
|
1399
1399
|
* Read the `vantage:` key out of parsed frontmatter.
|
|
1400
1400
|
*
|
|
1401
1401
|
* Pure: no module state, no mutation of the input, no logging. The same object
|
|
1402
1402
|
* in twice gives equal results out.
|
|
1403
1403
|
*/
|
|
1404
|
-
declare function readVantageFrontmatter(frontmatter: Record<string, unknown>): VantageFrontmatter;
|
|
1404
|
+
export declare function readVantageFrontmatter(frontmatter: Record<string, unknown>): VantageFrontmatter;
|
|
1405
1405
|
//#endregion
|
|
1406
1406
|
//#region src/sanitize.d.ts
|
|
1407
1407
|
type Schema = typeof defaultSchema;
|
|
1408
|
-
declare const SAFE_STYLE: RegExp;
|
|
1408
|
+
export declare const SAFE_STYLE: RegExp;
|
|
1409
1409
|
/**
|
|
1410
1410
|
* Never set `allowComments` here.
|
|
1411
1411
|
*
|
|
@@ -1418,7 +1418,7 @@ declare const SAFE_STYLE: RegExp;
|
|
|
1418
1418
|
* whole premise. `vantageDirectives.test.ts` ("leaves no comment in the rendered
|
|
1419
1419
|
* markup") is the guard.
|
|
1420
1420
|
*/
|
|
1421
|
-
declare const sanitizeSchema: Schema;
|
|
1421
|
+
export declare const sanitizeSchema: Schema;
|
|
1422
1422
|
//#endregion
|
|
1423
1423
|
//#region src/renderMermaidBlocks.d.ts
|
|
1424
1424
|
/**
|
|
@@ -1453,7 +1453,7 @@ interface RenderMermaidOptions {
|
|
|
1453
1453
|
* await renderMermaidBlocks(container);
|
|
1454
1454
|
* ```
|
|
1455
1455
|
*/
|
|
1456
|
-
declare function renderMermaidBlocks(container: HTMLElement, options?: RenderMermaidOptions): Promise<void>;
|
|
1456
|
+
export declare function renderMermaidBlocks(container: HTMLElement, options?: RenderMermaidOptions): Promise<void>;
|
|
1457
1457
|
//#endregion
|
|
1458
1458
|
//#region src/resolveLinks.d.ts
|
|
1459
1459
|
/**
|
|
@@ -1499,7 +1499,7 @@ interface ResolveLinkOptions {
|
|
|
1499
1499
|
* });
|
|
1500
1500
|
* ```
|
|
1501
1501
|
*/
|
|
1502
|
-
declare function resolveLinks(html: string, options?: ResolveLinkOptions): string;
|
|
1502
|
+
export declare function resolveLinks(html: string, options?: ResolveLinkOptions): string;
|
|
1503
1503
|
//#endregion
|
|
1504
1504
|
//#region src/styleGuide.d.ts
|
|
1505
1505
|
/**
|
|
@@ -1516,7 +1516,7 @@ declare function resolveLinks(html: string, options?: ResolveLinkOptions): strin
|
|
|
1516
1516
|
* Every rule stated here should be one a checker can enforce or a renderer
|
|
1517
1517
|
* actually cares about — if a line is neither, it does not belong.
|
|
1518
1518
|
*/
|
|
1519
|
-
declare const STYLE_GUIDE = "## Markdown style guide (for Vantage viewer)\n\nWhen writing or updating markdown documents that will be viewed in Vantage, follow these conventions:\n\n### Structure\n- Use headings (## and ###) to organize content — they become navigable outline anchors.\n- Keep paragraphs focused and concise. Break up dense text with subheadings, lists, or tables.\n\n### Links and cross-references\n- **Relative paths only**: Always link relative to the *current file's directory*:\n - Sibling in same folder: `[Other Doc](./other-doc.md)` or `[Other Doc](other-doc.md)`\n - Subdirectory: `[Design Doc](./design/auth.md)`\n - Parent / sibling folder: `[Overview](../overview.md)` or `[Spec](../specs/api.md)`\n- **Never use leading slashes**:\n - ❌ `[Doc](/docs/guide.md)` (breaks web routing and multi-repo scoping)\n - ✅ `[Doc](../docs/guide.md)` or `[Doc](./guide.md)`\n- **Never use absolute filesystem paths or URI schemes**:\n - ❌ `file:///workspace/docs/guide.md`, `/workspace/docs/guide.md`, `C:\\...`\n - ✅ `[Doc](./guide.md)` or `[Doc](../guide.md)`\n- **Always include the file extension**: Use `.md`, `.ts`, `.go`, etc. (e.g. `[Model](model.go)`).\n- **Line anchors and ranges**:\n - Link to specific lines: `[Handler](../server/api.go#L42)` or `[Range](../server/api.go#L42-L58)`\n - Same-file line anchor: `[See lines](#L10-L25)`\n - Vantage scrolls to and highlights the target lines.\n- **Section anchors**:\n - Same doc: `[Usage](#usage)`\n - Cross-doc: `[Architecture](../overview.md#system-architecture)`\n - Anchor slugs are lowercase, hyphenated, and punctuation-stripped.\n- **Backticks in links**: Place backticks inside the link label, not around the markdown link syntax:\n - ✅ `[`config.json`](./config.json)` or `[config.json](./config.json)`\n - ❌ ``[config.json](./config.json)``\n\n### Frontmatter (Metadata)\n- Include structured metadata at the very top of docs delimited by `---` (YAML) or `+++` (TOML). Vantage renders this as a metadata card:\n```yaml\n---\ntitle: \"Feature Specification\"\nauthor: \"Agent\"\ndate: 2026-08-15\nstatus: in-review # draft | in-review | accepted | deprecated\ntags: [architecture, backend, api]\nsummary: \"Brief description of the document purpose.\"\nvantage:\n status-chip: true # show `status` as a chip above the metadata card\n---\n```\n- **Nothing may sit above the opening delimiter** — not a blank line, not an editorial comment, not a `<!-- vantage: … -->` directive. Frontmatter is recognised only at the very first byte of the file (in Vantage, on GitHub, and in every other reader), so one line above it turns the whole block into body text: a horizontal rule followed by a heading made of the raw keys, with every field lost. `vantage-check` reports it as `frontmatter/not-at-top`.\n- **`vantage:` is Vantage's own reserved key.** It holds chrome that belongs to the file rather than to a section, it never shows up in the metadata card, and every other renderer ignores it. One key today: `status-chip`.\n- **Prefer `status-chip: true`**, which shows the document's own `status:` and therefore cannot disagree with it. A literal `status-chip: accepted` is accepted too, but it is a second value that goes stale on its own — `vantage-check` reports the disagreement.\n- The chip's vocabulary is `status`'s, exactly: `draft | in-review | accepted | deprecated`, lowercase. `Draft` renders no chip at all, silently.\n\n### Mermaid diagrams\n- Use ```mermaid code blocks for flowcharts, sequence diagrams, and architecture diagrams. Vantage provides interactive zoom, pan, dark/light theme adaptation, and SVG export.\n- **Quote labels with special characters**: Always quote node labels containing parentheses, brackets, or colons to prevent syntax errors:\n```mermaid\nflowchart TD\n client[\"Client (React SPA)\"] -->|WebSocket| srv[\"Vantage Server (Go)\"]\n srv --> git[\"Git CLI (git diff)\"]\n```\n\n### Code blocks and diffs\n- Always tag fenced code blocks with language identifiers (`ts`, `go`, `python`, `bash`, `json`, `yaml`, `diff`, `sql`, etc.) for syntax highlighting.\n- For proposed code modifications, use ```diff blocks with `+` and `-` prefixes:\n```diff\n-const oldUrl = \"/api/v1\";\n+const newUrl = \"/api/v2\";\n```\n\n### Callouts and alerts\n- Use GitHub-style blockquote callouts for notes, tips, and warnings:\n> [!NOTE]\n> Background context or helpful explanation.\n\n> [!TIP]\n> Best practice advice or optimization suggestions.\n\n> [!IMPORTANT]\n> Key requirements or crucial information.\n\n> [!WARNING]\n> Urgent caution, breaking changes, or potential pitfalls.\n\n> [!CAUTION]\n> High-risk actions that could cause data loss or security issues.\n\n### Vantage directives (optional, and Vantage-only)\n\nVantage reads a few styling hints from ordinary HTML comments. Every other renderer — GitHub included — drops them, so a document has to read exactly the same without them: directives decorate, they never carry meaning. One goes on a line of its own, with a blank line after it, and applies to the block that follows:\n\n```markdown\n<!-- vantage: section tone=warning badge=stale -->\n\n## Migration path\n\nThe steps below predate the rewrite.\n```\n\n- **Three names**: `section` (the heading and everything under it), `block` (the one block after it), `oq` (one answerable Open Question).\n- **The keys and values are a closed set**: `tone` = `note | tip | important | warning | caution | muted`; `emphasis` = `strong | normal | quiet`; `badge` = `draft | stale | blocked | done | wip`; `collapsed` = `true | false`. Name a *tone*, never a colour — the theme decides what a warning looks like, in light mode, in dark mode, and in print.\n- **Use them sparingly.** One or two per document, on the sections that genuinely differ. A document where everything is toned says nothing, and a rainbow one is harder to read than a plain one.\n- **Anything outside those sets is silently ignored** — nothing breaks, and nothing styles either. Run `vantage-check` on the document: the `vantage/*` rules are the only thing that will ever tell you a directive did nothing.\n- **Always close the comment with `-->`.** Never `--!>`, and never leave it open: Markdown reads every line below an unclosed `<!--` as part of the comment, and the whole rest of the document vanishes from the page. For the same reason `-->` cannot appear *inside* a value — it ends the comment early and spills the remainder into the page as literal text.\n- **In a list, indent the directive inside the item**, with blank lines around it (below). At the start of a line between two items it ends the list and starts a second one, which changes the numbering and the spacing in every renderer — the one thing a directive must never do.\n- **An open question's id is `OQ-` then an optional short uppercase prefix then digits** — `OQ-9`, `OQ-TP6`, `OQ-A03`. The prefix is what keeps ids distinct once one document references another's questions, so use one in both whenever they cross-reference. `vantage-check` reports anything outside that shape as `vantage/oq-id-format`, and the same id twice in one document as `vantage/oq-id-duplicate` — both are silent otherwise, because the id becomes the block's anchor and a refused or duplicated one simply goes nowhere.\n- **A reference is a link, or it is a lie.** An `OQ-` id, a `§N` section number and a filename all read like pointers, and written as bare prose none of them can be followed or checked — which is exactly why a stale one is never caught. Link the question to its anchor (`[OQ-4](#OQ-4)`, or the Decision Ledger once it is compacted), the section to its heading, the filename to the file. `vantage-check` reports all three (`ref/*`) as errors, and checks that the link points at the thing the reference names rather than merely at something. Writing a specimen rather than a reference? Put it in a fenced block, which the rules never read.\n- **Every open question (💬) with a stated leaning gets an `oq` directive.** The convention's prose — the emoji, the `OQ-N` id, the `_Leaning:_` line, the fill-in `**Answer:**` — produces no button on its own. Writing the convention and stopping there is the most common way this feature goes missing: the questions look complete, review mode is on, and there is nothing to click. **`vantage-check` reports it as an error** (`vantage/oq-missing`), because a question awaiting a ruling that the reviewer cannot file is not a style preference. Mark it 🔒 if it is blocked on something upstream and cannot be answered yet, or ✅ once it is decided; either state needs no directive.\n- **A `leaning` restates the leaning; it is never \"yes\".** The one-click button in review mode files that text as a review comment, and the comment is all the agent reading it has — nobody remembers which button was clicked. `leaning=\"Yes\"` beside a two-branch question is a support ticket.\n\n```markdown\n1. **OQ-9: Queue position on re-entry.**\n\n <!-- vantage: oq id=OQ-9 leaning=\"Back of the queue — the fix might interact with what merged while it was out.\" -->\n\n _Leaning:_ Back of the queue.\n```\n\n### Tables, task lists, and math\n- **Tables**: Use standard markdown tables for structured comparisons and schemas.\n- **Task lists**: Use `- [ ]` and `- [x]` for actionable checklists and status tracking.\n- **LaTeX Math**: Use `$$...$$` for *all* KaTeX math — display blocks (`$$` alone on its own lines) and inline alike (`$$E = mc^2$$` mid-sentence).\n - Single dollars are **not** math delimiters: `$HOME` and `$100` stay literal, so prose and shell snippets are safe to write as-is.\n";
|
|
1519
|
+
export declare const STYLE_GUIDE = "## Markdown style guide (for Vantage viewer)\n\nWhen writing or updating markdown documents that will be viewed in Vantage, follow these conventions:\n\n### Structure\n- Use headings (## and ###) to organize content — they become navigable outline anchors.\n- Keep paragraphs focused and concise. Break up dense text with subheadings, lists, or tables.\n\n### Links and cross-references\n- **Relative paths only**: Always link relative to the *current file's directory*:\n - Sibling in same folder: `[Other Doc](./other-doc.md)` or `[Other Doc](other-doc.md)`\n - Subdirectory: `[Design Doc](./design/auth.md)`\n - Parent / sibling folder: `[Overview](../overview.md)` or `[Spec](../specs/api.md)`\n- **Never use leading slashes**:\n - ❌ `[Doc](/docs/guide.md)` (breaks web routing and multi-repo scoping)\n - ✅ `[Doc](../docs/guide.md)` or `[Doc](./guide.md)`\n- **Never use absolute filesystem paths or URI schemes**:\n - ❌ `file:///workspace/docs/guide.md`, `/workspace/docs/guide.md`, `C:\\...`\n - ✅ `[Doc](./guide.md)` or `[Doc](../guide.md)`\n- **Always include the file extension**: Use `.md`, `.ts`, `.go`, etc. (e.g. `[Model](model.go)`).\n- **Line anchors and ranges**:\n - Link to specific lines: `[Handler](../server/api.go#L42)` or `[Range](../server/api.go#L42-L58)`\n - Same-file line anchor: `[See lines](#L10-L25)`\n - Vantage scrolls to and highlights the target lines.\n- **Section anchors**:\n - Same doc: `[Usage](#usage)`\n - Cross-doc: `[Architecture](../overview.md#system-architecture)`\n - Anchor slugs are lowercase, hyphenated, and punctuation-stripped.\n- **Backticks in links**: Place backticks inside the link label, not around the markdown link syntax:\n - ✅ `[`config.json`](./config.json)` or `[config.json](./config.json)`\n - ❌ ``[config.json](./config.json)``\n\n### Frontmatter (Metadata)\n- Include structured metadata at the very top of docs delimited by `---` (YAML) or `+++` (TOML). Vantage renders this as a metadata card:\n```yaml\n---\ntitle: \"Feature Specification\"\nauthor: \"Agent\"\ndate: 2026-08-15\nstatus: in-review # draft | in-review | accepted | deprecated\ntags: [architecture, backend, api]\nsummary: \"Brief description of the document purpose.\"\nvantage:\n status-chip: true # show `status` as a chip above the metadata card\n---\n```\n- **Nothing may sit above the opening delimiter** — not a blank line, not an editorial comment, not a `<!-- vantage: … -->` directive. Frontmatter is recognised only at the very first byte of the file (in Vantage, on GitHub, and in every other reader), so one line above it turns the whole block into body text: a horizontal rule followed by a heading made of the raw keys, with every field lost. `vantage-check` reports it as `frontmatter/not-at-top`.\n- **`vantage:` is Vantage's own reserved key.** It holds chrome that belongs to the file rather than to a section, it never shows up in the metadata card, and every other renderer ignores it. One key today: `status-chip`.\n- **Prefer `status-chip: true`**, which shows the document's own `status:` and therefore cannot disagree with it. A literal `status-chip: accepted` is accepted too, but it is a second value that goes stale on its own — `vantage-check` reports the disagreement.\n- The chip's vocabulary is `status`'s, exactly: `draft | in-review | accepted | deprecated`, lowercase. `Draft` renders no chip at all, silently.\n\n### Mermaid diagrams\n- Use ```mermaid code blocks for flowcharts, sequence diagrams, and architecture diagrams. Vantage provides interactive zoom, pan, dark/light theme adaptation, and SVG export.\n- **Quote labels with special characters**: Always quote node labels containing parentheses, brackets, or colons to prevent syntax errors:\n```mermaid\nflowchart TD\n client[\"Client (React SPA)\"] -->|WebSocket| srv[\"Vantage Server (Go)\"]\n srv --> git[\"Git CLI (git diff)\"]\n```\n\n### Code blocks and diffs\n- Always tag fenced code blocks with language identifiers (`ts`, `go`, `python`, `bash`, `json`, `yaml`, `diff`, `sql`, etc.) for syntax highlighting.\n- For proposed code modifications, use ```diff blocks with `+` and `-` prefixes:\n```diff\n-const oldUrl = \"/api/v1\";\n+const newUrl = \"/api/v2\";\n```\n\n### Callouts and alerts\n- Use GitHub-style blockquote callouts for notes, tips, and warnings:\n> [!NOTE]\n> Background context or helpful explanation.\n\n> [!TIP]\n> Best practice advice or optimization suggestions.\n\n> [!IMPORTANT]\n> Key requirements or crucial information.\n\n> [!WARNING]\n> Urgent caution, breaking changes, or potential pitfalls.\n\n> [!CAUTION]\n> High-risk actions that could cause data loss or security issues.\n\n### Vantage directives (optional, and Vantage-only)\n\nVantage reads a few styling hints from ordinary HTML comments. Every other renderer — GitHub included — drops them, so a document has to read exactly the same without them: directives decorate, they never carry meaning. One goes on a line of its own, with a blank line after it, and applies to the block that follows:\n\n```markdown\n<!-- vantage: section tone=warning badge=stale -->\n\n## Migration path\n\nThe steps below predate the rewrite.\n```\n\n- **Three names**: `section` (the heading and everything under it), `block` (the one block after it), `oq` (one answerable Open Question).\n- **The keys and values are a closed set**: `tone` = `note | tip | important | warning | caution | muted`; `emphasis` = `strong | normal | quiet`; `badge` = `draft | stale | blocked | done | wip`; `collapsed` = `true | false`. Name a *tone*, never a colour — the theme decides what a warning looks like, in light mode, in dark mode, and in print.\n- **Use them sparingly.** One or two per document, on the sections that genuinely differ. A document where everything is toned says nothing, and a rainbow one is harder to read than a plain one.\n- **Anything outside those sets is silently ignored** — nothing breaks, and nothing styles either. Run `vantage-check` on the document: the `vantage/*` rules are the only thing that will ever tell you a directive did nothing.\n- **Always close the comment with `-->`.** Never `--!>`, and never leave it open: Markdown reads every line below an unclosed `<!--` as part of the comment, and the whole rest of the document vanishes from the page. For the same reason `-->` cannot appear *inside* a value — it ends the comment early and spills the remainder into the page as literal text.\n- **In a list, indent the directive inside the item**, with blank lines around it (below). At the start of a line between two items it ends the list and starts a second one, which changes the numbering and the spacing in every renderer — the one thing a directive must never do.\n- **An open question's id is `OQ-` then an optional short uppercase prefix then digits** — `OQ-9`, `OQ-TP6`, `OQ-A03`. The prefix is what keeps ids distinct once one document references another's questions, so use one in both whenever they cross-reference. `vantage-check` reports anything outside that shape as `vantage/oq-id-format`, and the same id twice in one document as `vantage/oq-id-duplicate` — both are silent otherwise, because the id becomes the block's anchor and a refused or duplicated one simply goes nowhere.\n- **A reference is a link, or it is a lie.** An `OQ-` id, a `§N` section number and a filename all read like pointers, and written as bare prose none of them can be followed or checked — which is exactly why a stale one is never caught. Link the question to its anchor (`[OQ-4](#OQ-4)`, or the Decision Ledger once it is compacted), the section to its heading, the filename to the file. `vantage-check` reports all three (`ref/*`) as errors, and checks that the link points at the thing the reference names rather than merely at something. Writing a specimen rather than a reference? Put it in a fenced block, which the rules never read.\n- **Every open question (💬) with a stated leaning gets an `oq` directive.** The convention's prose — the emoji, the `OQ-N` id, the `_Leaning:_` line, the fill-in `**Answer:**` — produces no button on its own. Writing the convention and stopping there is the most common way this feature goes missing: the questions look complete, review mode is on, and there is nothing to click. **`vantage-check` reports it as an error** (`vantage/oq-missing`), because a question awaiting a ruling that the reviewer cannot file is not a style preference. Mark it 🔒 if it is blocked on something upstream and cannot be answered yet, or ✅ once it is decided; either state needs no directive.\n- **A `leaning` restates the leaning; it is never \"yes\".** The one-click button in review mode files that text as a review comment, and the comment is all the agent reading it has — nobody remembers which button was clicked. `leaning=\"Yes\"` beside a two-branch question is a support ticket.\n\n```markdown\n1. **OQ-9: Queue position on re-entry.**\n\n <!-- vantage: oq id=OQ-9 leaning=\"Back of the queue — the fix might interact with what merged while it was out.\" -->\n\n _Leaning:_ Back of the queue.\n```\n\n### Tables, task lists, and math\n- **Tables**: Use standard markdown tables for structured comparisons and schemas.\n- **Task lists**: Use `- [ ]` and `- [x]` for actionable checklists and status tracking.\n- **LaTeX Math**: Use `$$...$$` for *all* KaTeX math — display blocks (`$$` alone on its own lines) and inline alike (`$$E = mc^2$$` mid-sentence).\n - Single dollars are **not** math delimiters: `$HOME` and `$100` stay literal, so prose and shell snippets are safe to write as-is.\n";
|
|
1520
1520
|
//#endregion
|
|
1521
|
-
export {
|
|
1521
|
+
export { type DirectivePair, type DirectiveParse, type DirectiveVocabulary, type DocStatus, type FrontmatterFormat, type FrontmatterProblem, type KeyTable, type KeyVocabulary, type MalformedDirective, type ParsedDirective, type ParsedFrontmatter, type Pipeline, type PipelineOptions, type RenderMermaidOptions, type RenderOptions, type RenderResult, type ResolveLinkOptions, type VantageAlert, type VantageFrontmatter, type VantageFrontmatterIssue, rehypeSourceLines, rehypeVantageAnchors, rehypeVantageDirectives };
|
|
1522
1522
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","names":[],"sources":["../src/renderMarkdown.ts","../../../node_modules/@types/unist/index.d.ts","../../../node_modules/@types/hast/index.d.ts","../src/rehypeVantageAlerts.ts","../src/rehypeSourceLines.ts","../src/rehypeVantageDirectives.ts","../src/rehypeVantageAnchors.ts","../src/vantageDirectives.ts","../src/pipeline.ts","../src/scrollToLineAnchor.ts","../src/lineAnchor.ts","../src/frontmatter.ts","../src/vantageFrontmatter.ts","../src/sanitize.ts","../src/renderMermaidBlocks.ts","../src/resolveLinks.ts","../src/styleGuide.ts"],"x_google_ignoreList":[1,2],"mappings":";;;;;;;UAaiB;;EAEf;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;;UAGe;;EAEf;;EAEA,aAAa;;EAEb;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"index.d.ts","names":[],"sources":["../src/renderMarkdown.ts","../../../node_modules/@types/unist/index.d.ts","../../../node_modules/@types/hast/index.d.ts","../src/rehypeVantageAlerts.ts","../src/rehypeSourceLines.ts","../src/rehypeVantageDirectives.ts","../src/rehypeVantageAnchors.ts","../src/vantageDirectives.ts","../src/pipeline.ts","../src/scrollToLineAnchor.ts","../src/lineAnchor.ts","../src/frontmatter.ts","../src/vantageFrontmatter.ts","../src/sanitize.ts","../src/renderMermaidBlocks.ts","../src/resolveLinks.ts","../src/styleGuide.ts"],"x_google_ignoreList":[1,2],"mappings":";;;;;;;UAaiB;;EAEf;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;;UAGe;;EAEf;;EAEA,aAAa;;EAEb;;;;;;;;;;;;;;;;;;wBAmBoB,eACpB,iBACA,UAAS,gBACR,QAAQ;;;;;;;;;;;;;;;;;;;;;;;UCnCM;;;;UAKA;;;;EAIb;;;;EAKA;;;;EAIA;;;;;;;UAQa;;;;EAIb,OAAO;;;;EAKP,KAAK;;;;;;;;;;;;UA6BQ;;;;EAIb;;;;EAKA,OAAO;;;;;;;EAQP,WAAW;;;;;;;;;;;;;;;;;;;;;;;UChFE,aAAa;;;;UAKb;EACb;EACA,QAAQ;EACR;EACA,SAAS;EACT,gBAAgB;EAChB,YAAY;EACZ;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA,UAAU;EACV;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA,eAAe;EACf;EACA,kBAAkB;EAClB;EACA;EACA,iBAAiB;EACjB;EACA;EACA,aAAa;EACb;EACA;EACA;EACA;EACA;EACA;EACA,iBAAiB;EACjB;EACA;EACA;EACA;EACA;EACA;EACA,WAAW;EACX;EACA;EACA;EACA;EACA;EACA;EACA,sBAAsB;EACtB;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA,eAAe;EACf;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA,WAAW;EACX;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA,YAAY;EACZ;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA,eAAe;EACf,SAAS;EACT;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA,cAAc;EACd;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA,KAAK;EACL,KAAK;EACL,YAAY;EACZ;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA,UAAU;EACV;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA,UAAU;EACV,YAAY;EACZ;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA,WAAW;EACX,UAAU;EACV;EACA,WAAW;EACX;EACA;EACA;EACA;EACA;EACA,eAAe;EACf;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA,OAAO;EACP;EACA;EACA;EACA;EACA;EACA;EACA;EACA,OAAO;EACP;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA,oBAAoB;EACpB;EACA;EACA;EACA;EACA;EACA;EACA,MAAM;EACN;EACA;EACA;EACA;EACA,qBAAqB;EACrB,mBAAmB;EACnB,gBAAgB;EAChB,kBAAkB;EAClB;EACA;EACA;EACA;EACA,eAAe;EACf;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA,UAAU;EACV;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA,kBAAkB;EAClB;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA,iBAAiB;EACjB;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA,SAAS;EACT;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;GACC,sEAAsE;;;;;;;;;KAW/D,iBAAiB,wBAAwB;;;;;;UAOpC;EACb,SAAS;EACT,SAAS;EACT,MAAM;;;;;;;;KASE,cAAc,qBAAqB;;;;;;;;;UAU9B;EACb,SAAS;EACT,SAAS;EACT,SAAS;EACT,MAAM;;;;;;;;;;;;;;;;UAsDO,aAAa;;;;EAI1B,OAAO;;;;;;;;;UAUM,gBAAgB;;;;EAI7B;;;;;;;;;UAUa,eAAe;;;;EAI5B,UAAU;;;;;;UAQG,gBAAgB;;;;EAI7B;;;;EAIA,OAAO;;;;;UAMM,oBAAoB;;;;UAKpB,gBAAgB;;;;EAI7B;;;;EAIA,OAAO;;;;;UAMM,oBAAoB;;;;UAKpB,gBAAgB;;;;EAI7B;;;;EAIA;;;;EAIA,YAAY;;;;EAIZ,UAAU;;;;;EAKV,UAAU;;;;EAIV,OAAO;;;;;UAMM,oBAAoB;;;;;;;;UASpB,aAAa;;;;EAI1B;;;;EAIA,UAAU;;;;EAIV,OAAO;;;;;UAMM,iBAAiB;;;;UAKjB,aAAa;;;;EAI1B;;;;EAIA,OAAO;;;;;UAMM,iBAAiB;;;;;;;;;;;;qBC92BrB;KAQD,uBAAuB;;qBAGtB,cAAc,SAAS,OAAO;;;;;;;;;;;;;;wBA8C3B,wBACN,MAAM;;;UC9DC;;;;;;;EAOf;;cAkBI,mBAAmB,QAAQ,4BAA4B;;;cCkYvD,yBAAyB,WAAW;;;iBCvalB,yBACd,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qBCDH;;;;;;;;;;;;qBAaA;;;;;;;;qBASA;;qBAUA;;qBAGA;;;;;;;;;;;qBAkBA;;;;;;;;;;qBAWA;;;;;;;;;;;;;;;;;;qBAiFA;;KAuBD;;KAGA,WAAW,SAAS,eAAe;;KAGnC,sBAAsB,SAChC,eAAe;;;;;;;;;;qBAmBJ,sBAAsB;UAMlB;EACf;;EAEA;;EAEA;;EAEA;EACA;;UAGe;EACf;EACA;;EAEA;;;EAGA,OAAO;;;UAIQ;EACf;;EAEA;;EAEA;;KAGU,iBAAiB,kBAAkB;;;;;;;;wBA6B/B,mBAAmB;;;;;;;;;wBAwCnB,sBAAsB,kBAAkB;;;UCrRvC;;EAEf;;EAEA;;EAEA;;EAEA;;EAEA;;;;;;;EAOA;;UAGe;EACf,eAAe;EACf,eAAe;;;;;;;;wBASD,mBACd,UAAS,kBACR;;;;;;;;;;;;;wBA+Ea,cAAc,UAAS,kBAAuB;;;;;;;;;;;;wBCrJ9C,0BAA0B,WAAW;;;;;;;;wBAarC,mBACd,WAAW,aACX;;;;;;;;;;;;;;;;wBCfc,gBACd;EACG;EAAe;;;;;;;;KCRR;;;;;;;;;;;;;;;;UAiBK;EACf;;EAEA;EACA;EACA;EACA;;UAGe;EACf,aAAa;EACb;EACA,QAAQ;;;;;;;;;;EAUR;;;;;;EAMA,UAAU;;;;;;wBAOI,iBAAiB,kBAAkB;;;;;;;;;;;;;;qBC1BtC;KAOD,oBAAoB;;qBAGnB;;;;;;;;;;qBAWA,kBAAkB,SAC7B,OAAO,mBAAmB;;;;;;;;KAehB;EACN;EAAqB;;EACrB;EAAqB;;EACrB;EAAmB;EAAa;EAAgB;;EAChD;EAA4B;;EAC5B;EAA+B,MAAM;EAAW;;UAErC;;EAEf,aAAa;;EAEb,QAAQ;;;wBAWM,YAAY,iBAAiB,SAAS;;;;;;;wBAsBtC,uBACd,aAAa,0BACZ;;;KCpGE,gBAAgB;qBA2JR,YAAU;;;;;;;;;;;;;qBA2BV,gBAAgB;;;;;;;;;;;;UC1LZ;;EAEf;;EAEA,WAAW,cAAc,OAAO;;;;;;;;;;;;;;;;;;;wBAoBZ,oBACpB,WAAW,aACX,UAAS,uBACR;;;;;;;;;;UChCc;;EAEf;;;;;;EAMA,YAAY,cAAc;;EAE1B;;;;;;;;;;;;;;;;;;;;;;;;;;wBA2Bc,aACd,cACA,UAAS;;;;;;;;;;;;;;;;;qBChCE"}
|
package/dist/react.d.cts
CHANGED
|
@@ -18,7 +18,7 @@ interface MarkdownViewerProps {
|
|
|
18
18
|
/** Callback when an internal link is clicked */
|
|
19
19
|
onNavigate?: (path: string) => void;
|
|
20
20
|
}
|
|
21
|
-
declare const MarkdownViewer: React.NamedExoticComponent<MarkdownViewerProps>;
|
|
21
|
+
export declare const MarkdownViewer: React.NamedExoticComponent<MarkdownViewerProps>;
|
|
22
22
|
//#endregion
|
|
23
23
|
//#region src/useLineAnchor.d.ts
|
|
24
24
|
/**
|
|
@@ -32,7 +32,7 @@ declare const MarkdownViewer: React.NamedExoticComponent<MarkdownViewerProps>;
|
|
|
32
32
|
* @param containerRef - Ref to the DOM element containing rendered markdown
|
|
33
33
|
* @param hash - The current URL hash (e.g. "#L42", from location.hash or window.location.hash)
|
|
34
34
|
*/
|
|
35
|
-
declare function useLineAnchor(containerRef: RefObject<HTMLElement | null>, hash: string): {
|
|
35
|
+
export declare function useLineAnchor(containerRef: RefObject<HTMLElement | null>, hash: string): {
|
|
36
36
|
clearHighlights: () => void;
|
|
37
37
|
};
|
|
38
38
|
//#endregion
|
|
@@ -40,13 +40,13 @@ declare function useLineAnchor(containerRef: RefObject<HTMLElement | null>, hash
|
|
|
40
40
|
interface MermaidDiagramProps {
|
|
41
41
|
code: string;
|
|
42
42
|
}
|
|
43
|
-
declare const MermaidDiagram: React.NamedExoticComponent<MermaidDiagramProps>;
|
|
43
|
+
export declare const MermaidDiagram: React.NamedExoticComponent<MermaidDiagramProps>;
|
|
44
44
|
//#endregion
|
|
45
45
|
//#region src/FrontmatterDisplay.d.ts
|
|
46
46
|
interface FrontmatterDisplayProps {
|
|
47
47
|
frontmatter: Record<string, unknown>;
|
|
48
48
|
}
|
|
49
|
-
declare const FrontmatterDisplay: React.NamedExoticComponent<FrontmatterDisplayProps>;
|
|
49
|
+
export declare const FrontmatterDisplay: React.NamedExoticComponent<FrontmatterDisplayProps>;
|
|
50
50
|
//#endregion
|
|
51
51
|
//#region src/vantageDirectives.d.ts
|
|
52
52
|
/**
|
|
@@ -70,10 +70,10 @@ declare const VANTAGE_TONES: readonly ["note", "tip", "important", "warning", "c
|
|
|
70
70
|
* `in-review` — the value the design doc's own only example renders — is not a
|
|
71
71
|
* badge word at all. Only `draft` is a member of both, and a token set is per key.
|
|
72
72
|
*/
|
|
73
|
-
declare const DOC_STATUSES: readonly ["draft", "in-review", "accepted", "deprecated"];
|
|
73
|
+
export declare const DOC_STATUSES: readonly ["draft", "in-review", "accepted", "deprecated"];
|
|
74
74
|
type DocStatus = (typeof DOC_STATUSES)[number];
|
|
75
75
|
/** Every key this build knows under `vantage:`. Closed. */
|
|
76
|
-
declare const VANTAGE_FRONTMATTER_KEYS: readonly ["status-chip"];
|
|
76
|
+
export declare const VANTAGE_FRONTMATTER_KEYS: readonly ["status-chip"];
|
|
77
77
|
/**
|
|
78
78
|
* Which tone each status borrows its colours from.
|
|
79
79
|
*
|
|
@@ -83,7 +83,7 @@ declare const VANTAGE_FRONTMATTER_KEYS: readonly ["status-chip"];
|
|
|
83
83
|
* than a computed class name, so the whole status→tone relation is one readable
|
|
84
84
|
* table and a test can assert it covers the vocabulary.
|
|
85
85
|
*/
|
|
86
|
-
declare const DOC_STATUS_TONES: Readonly<Record<DocStatus, (typeof VANTAGE_TONES)[number]>>;
|
|
86
|
+
export declare const DOC_STATUS_TONES: Readonly<Record<DocStatus, (typeof VANTAGE_TONES)[number]>>;
|
|
87
87
|
/**
|
|
88
88
|
* Why something under `vantage:` produced no chrome.
|
|
89
89
|
*
|
|
@@ -117,17 +117,17 @@ interface VantageFrontmatter {
|
|
|
117
117
|
issues: VantageFrontmatterIssue[];
|
|
118
118
|
}
|
|
119
119
|
/** Narrowing helper the chip and the checker both use. */
|
|
120
|
-
declare function isDocStatus(value: unknown): value is DocStatus;
|
|
120
|
+
export declare function isDocStatus(value: unknown): value is DocStatus;
|
|
121
121
|
/**
|
|
122
122
|
* Read the `vantage:` key out of parsed frontmatter.
|
|
123
123
|
*
|
|
124
124
|
* Pure: no module state, no mutation of the input, no logging. The same object
|
|
125
125
|
* in twice gives equal results out.
|
|
126
126
|
*/
|
|
127
|
-
declare function readVantageFrontmatter(frontmatter: Record<string, unknown>): VantageFrontmatter;
|
|
127
|
+
export declare function readVantageFrontmatter(frontmatter: Record<string, unknown>): VantageFrontmatter;
|
|
128
128
|
//#endregion
|
|
129
129
|
//#region src/DocumentStatusChip.d.ts
|
|
130
|
-
declare const DocumentStatusChip: React.NamedExoticComponent<{
|
|
130
|
+
export declare const DocumentStatusChip: React.NamedExoticComponent<{
|
|
131
131
|
status: DocStatus;
|
|
132
132
|
}>;
|
|
133
133
|
//#endregion
|
|
@@ -174,7 +174,7 @@ interface RenderResult {
|
|
|
174
174
|
* Mermaid code blocks are preserved as `<pre><code class="language-mermaid">`.
|
|
175
175
|
* Use the React `<MarkdownViewer>` component for client-side mermaid rendering.
|
|
176
176
|
*/
|
|
177
|
-
declare function renderMarkdown(content: string, options?: RenderOptions): Promise<RenderResult>;
|
|
177
|
+
export declare function renderMarkdown(content: string, options?: RenderOptions): Promise<RenderResult>;
|
|
178
178
|
//#endregion
|
|
179
179
|
//#region ../../node_modules/@types/unist/index.d.ts
|
|
180
180
|
// ## Interfaces
|
|
@@ -1166,7 +1166,7 @@ interface Pipeline {
|
|
|
1166
1166
|
* rehype (`packages/vantage-check/src/core/document.ts`), and it has to parse
|
|
1167
1167
|
* them exactly the way the viewer does.
|
|
1168
1168
|
*/
|
|
1169
|
-
declare function buildRemarkPlugins(options?: PipelineOptions): PluggableList;
|
|
1169
|
+
export declare function buildRemarkPlugins(options?: PipelineOptions): PluggableList;
|
|
1170
1170
|
/**
|
|
1171
1171
|
* Both halves from one options object.
|
|
1172
1172
|
*
|
|
@@ -1179,7 +1179,7 @@ declare function buildRemarkPlugins(options?: PipelineOptions): PluggableList;
|
|
|
1179
1179
|
* that way, so a plugin in the chain cannot become a function of how many times
|
|
1180
1180
|
* the chain has been built.
|
|
1181
1181
|
*/
|
|
1182
|
-
declare function buildPipeline(options?: PipelineOptions): Pipeline;
|
|
1182
|
+
export declare function buildPipeline(options?: PipelineOptions): Pipeline;
|
|
1183
1183
|
//#endregion
|
|
1184
1184
|
//#region src/scrollToLineAnchor.d.ts
|
|
1185
1185
|
/**
|
|
@@ -1191,7 +1191,7 @@ declare function buildPipeline(options?: PipelineOptions): Pipeline;
|
|
|
1191
1191
|
/**
|
|
1192
1192
|
* Clear all line anchor highlights from a container.
|
|
1193
1193
|
*/
|
|
1194
|
-
declare function clearLineAnchorHighlights(container: HTMLElement): void;
|
|
1194
|
+
export declare function clearLineAnchorHighlights(container: HTMLElement): void;
|
|
1195
1195
|
/**
|
|
1196
1196
|
* Scroll to and highlight line-anchored elements in a container.
|
|
1197
1197
|
*
|
|
@@ -1199,7 +1199,7 @@ declare function clearLineAnchorHighlights(container: HTMLElement): void;
|
|
|
1199
1199
|
* @param hash - The URL hash (e.g. "#L42" or "#L42-L50")
|
|
1200
1200
|
* @returns A cleanup function that removes the highlights
|
|
1201
1201
|
*/
|
|
1202
|
-
declare function scrollToLineAnchor(container: HTMLElement, hash: string): (() => void) | null;
|
|
1202
|
+
export declare function scrollToLineAnchor(container: HTMLElement, hash: string): (() => void) | null;
|
|
1203
1203
|
//#endregion
|
|
1204
1204
|
//#region src/lineAnchor.d.ts
|
|
1205
1205
|
/**
|
|
@@ -1215,7 +1215,7 @@ declare function scrollToLineAnchor(container: HTMLElement, hash: string): (() =
|
|
|
1215
1215
|
* Supports: #L42, #L42-L50, #L42-50
|
|
1216
1216
|
* Returns null if the hash is not a line anchor.
|
|
1217
1217
|
*/
|
|
1218
|
-
declare function parseLineAnchor(hash: string): {
|
|
1218
|
+
export declare function parseLineAnchor(hash: string): {
|
|
1219
1219
|
start: number;
|
|
1220
1220
|
end: number;
|
|
1221
1221
|
} | null;
|
|
@@ -1274,7 +1274,7 @@ interface ParsedFrontmatter {
|
|
|
1274
1274
|
* Parse frontmatter from markdown content.
|
|
1275
1275
|
* Supports YAML (delimited by ---) and TOML (delimited by +++).
|
|
1276
1276
|
*/
|
|
1277
|
-
declare function parseFrontmatter(content: string): ParsedFrontmatter;
|
|
1277
|
+
export declare function parseFrontmatter(content: string): ParsedFrontmatter;
|
|
1278
1278
|
//#endregion
|
|
1279
1279
|
//#region src/sanitize.d.ts
|
|
1280
1280
|
type Schema = typeof defaultSchema;
|
|
@@ -1290,7 +1290,7 @@ type Schema = typeof defaultSchema;
|
|
|
1290
1290
|
* whole premise. `vantageDirectives.test.ts` ("leaves no comment in the rendered
|
|
1291
1291
|
* markup") is the guard.
|
|
1292
1292
|
*/
|
|
1293
|
-
declare const sanitizeSchema: Schema;
|
|
1293
|
+
export declare const sanitizeSchema: Schema;
|
|
1294
1294
|
//#endregion
|
|
1295
1295
|
//#region src/renderMermaidBlocks.d.ts
|
|
1296
1296
|
/**
|
|
@@ -1325,7 +1325,7 @@ interface RenderMermaidOptions {
|
|
|
1325
1325
|
* await renderMermaidBlocks(container);
|
|
1326
1326
|
* ```
|
|
1327
1327
|
*/
|
|
1328
|
-
declare function renderMermaidBlocks(container: HTMLElement, options?: RenderMermaidOptions): Promise<void>;
|
|
1328
|
+
export declare function renderMermaidBlocks(container: HTMLElement, options?: RenderMermaidOptions): Promise<void>;
|
|
1329
1329
|
//#endregion
|
|
1330
1330
|
//#region src/resolveLinks.d.ts
|
|
1331
1331
|
/**
|
|
@@ -1371,7 +1371,7 @@ interface ResolveLinkOptions {
|
|
|
1371
1371
|
* });
|
|
1372
1372
|
* ```
|
|
1373
1373
|
*/
|
|
1374
|
-
declare function resolveLinks(html: string, options?: ResolveLinkOptions): string;
|
|
1374
|
+
export declare function resolveLinks(html: string, options?: ResolveLinkOptions): string;
|
|
1375
1375
|
//#endregion
|
|
1376
|
-
export {
|
|
1376
|
+
export { type DocStatus, type FrontmatterFormat, type MarkdownViewerProps, type ParsedFrontmatter, type Pipeline, type PipelineOptions, type RenderMermaidOptions, type RenderOptions, type RenderResult, type ResolveLinkOptions, type VantageFrontmatter, type VantageFrontmatterIssue, rehypeSourceLines };
|
|
1377
1377
|
//# sourceMappingURL=react.d.cts.map
|
package/dist/react.d.cts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"react.d.cts","names":[],"sources":["../src/MarkdownViewer.tsx","../src/useLineAnchor.ts","../src/MermaidDiagram.tsx","../src/FrontmatterDisplay.tsx","../src/vantageDirectives.ts","../src/vantageFrontmatter.ts","../src/DocumentStatusChip.tsx","../src/renderMarkdown.ts","../../../node_modules/@types/unist/index.d.ts","../../../node_modules/@types/hast/index.d.ts","../src/rehypeSourceLines.ts","../src/pipeline.ts","../src/scrollToLineAnchor.ts","../src/lineAnchor.ts","../src/frontmatter.ts","../src/sanitize.ts","../src/renderMermaidBlocks.ts","../src/resolveLinks.ts"],"x_google_ignoreList":[8,9],"mappings":";;;;UAkBiB;;EAEf;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA,cAAc;;
|
|
1
|
+
{"version":3,"file":"react.d.cts","names":[],"sources":["../src/MarkdownViewer.tsx","../src/useLineAnchor.ts","../src/MermaidDiagram.tsx","../src/FrontmatterDisplay.tsx","../src/vantageDirectives.ts","../src/vantageFrontmatter.ts","../src/DocumentStatusChip.tsx","../src/renderMarkdown.ts","../../../node_modules/@types/unist/index.d.ts","../../../node_modules/@types/hast/index.d.ts","../src/rehypeSourceLines.ts","../src/pipeline.ts","../src/scrollToLineAnchor.ts","../src/lineAnchor.ts","../src/frontmatter.ts","../src/sanitize.ts","../src/renderMermaidBlocks.ts","../src/resolveLinks.ts"],"x_google_ignoreList":[8,9],"mappings":";;;;UAkBiB;;EAEf;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA,cAAc;;qBA0MH,gBAAc,MAAA,qBAAA;;;;;;;;;;;;;;wBCzNX,cACd,cAAc,UAAU,qBACxB;;;;;UC+RQ;EACR;;qBAqPW,gBAAc,MAAA,qBAAA;;;UC/gBjB;EACR,aAAa;;qBAuIF,oBAAkB,MAAA,qBAAA;;;;;;;;;;cC9GlB;;;;;;;;;;;;;;qBCjBA;KAOD,oBAAoB;;qBAGnB;;;;;;;;;;qBAWA,kBAAkB,SAC7B,OAAO,mBAAmB;;;;;;;;KAehB;EACN;EAAqB;;EACrB;EAAqB;;EACrB;EAAmB;EAAa;EAAgB;;EAChD;EAA4B;;EAC5B;EAA+B,MAAM;EAAW;;UAErC;;EAEf,aAAa;;EAEb,QAAQ;;;wBAWM,YAAY,iBAAiB,SAAS;;;;;;;wBAsBtC,uBACd,aAAa,0BACZ;;;qBCjFU,oBAAkB,MAAA;EAZmB,QAAA;;;;;;;;UCXjC;;EAEf;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;;UAGe;;EAEf;;EAEA,aAAa;;EAEb;;;;;;;;;;;;;;;;;;wBAmBoB,eACpB,iBACA,UAAS,gBACR,QAAQ;;;;;;;;;;;;;;;;;;;;;;;UCnCM;;;;UAKA;;;;EAIb;;;;EAKA;;;;EAIA;;;;;;;UAQa;;;;EAIb,OAAO;;;;EAKP,KAAK;;;;;;;;;;;;UA6BQ;;;;EAIb;;;;EAKA,OAAO;;;;;;;EAQP,WAAW;;;;;;;;;;;;;;;;;;;;;;;UChFE,aAAa;;;;UAKb;EACb;EACA,QAAQ;EACR;EACA,SAAS;EACT,gBAAgB;EAChB,YAAY;EACZ;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA,UAAU;EACV;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA,eAAe;EACf;EACA,kBAAkB;EAClB;EACA;EACA,iBAAiB;EACjB;EACA;EACA,aAAa;EACb;EACA;EACA;EACA;EACA;EACA;EACA,iBAAiB;EACjB;EACA;EACA;EACA;EACA;EACA;EACA,WAAW;EACX;EACA;EACA;EACA;EACA;EACA;EACA,sBAAsB;EACtB;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA,eAAe;EACf;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA,WAAW;EACX;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA,YAAY;EACZ;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA,eAAe;EACf,SAAS;EACT;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA,cAAc;EACd;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA,KAAK;EACL,KAAK;EACL,YAAY;EACZ;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA,UAAU;EACV;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA,UAAU;EACV,YAAY;EACZ;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA,WAAW;EACX,UAAU;EACV;EACA,WAAW;EACX;EACA;EACA;EACA;EACA;EACA,eAAe;EACf;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA,OAAO;EACP;EACA;EACA;EACA;EACA;EACA;EACA;EACA,OAAO;EACP;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA,oBAAoB;EACpB;EACA;EACA;EACA;EACA;EACA;EACA,MAAM;EACN;EACA;EACA;EACA;EACA,qBAAqB;EACrB,mBAAmB;EACnB,gBAAgB;EAChB,kBAAkB;EAClB;EACA;EACA;EACA;EACA,eAAe;EACf;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA,UAAU;EACV;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA,kBAAkB;EAClB;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA,iBAAiB;EACjB;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA,SAAS;EACT;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;GACC,sEAAsE;;;;;;;;;KAW/D,iBAAiB,wBAAwB;;;;;;UAOpC;EACb,SAAS;EACT,SAAS;EACT,MAAM;;;;;;;;KASE,cAAc,qBAAqB;;;;;;;;;UAU9B;EACb,SAAS;EACT,SAAS;EACT,SAAS;EACT,MAAM;;;;;;;;;;;;;;;;UAsDO,aAAa;;;;EAI1B,OAAO;;;;;;;;;UAUM,gBAAgB;;;;EAI7B;;;;;;;;;UAUa,eAAe;;;;EAI5B,UAAU;;;;;;UAQG,gBAAgB;;;;EAI7B;;;;EAIA,OAAO;;;;;UAMM,oBAAoB;;;;UAKpB,gBAAgB;;;;EAI7B;;;;EAIA,OAAO;;;;;UAMM,oBAAoB;;;;UAKpB,gBAAgB;;;;EAI7B;;;;EAIA;;;;EAIA,YAAY;;;;EAIZ,UAAU;;;;;EAKV,UAAU;;;;EAIV,OAAO;;;;;UAMM,oBAAoB;;;;;;;;UASpB,aAAa;;;;EAI1B;;;;EAIA,UAAU;;;;EAIV,OAAO;;;;;UAMM,iBAAiB;;;;UAKjB,aAAa;;;;EAI1B;;;;EAIA,OAAO;;;;;UAMM,iBAAiB;;;UCl3BjB;;;;;;;EAOf;;cAkBI,mBAAmB,QAAQ,4BAA4B;;;UCf5C;;EAEf;;EAEA;;EAEA;;EAEA;;EAEA;;;;;;;EAOA;;UAGe;EACf,eAAe;EACf,eAAe;;;;;;;;wBASD,mBACd,UAAS,kBACR;;;;;;;;;;;;;wBA+Ea,cAAc,UAAS,kBAAuB;;;;;;;;;;;;wBCrJ9C,0BAA0B,WAAW;;;;;;;;wBAarC,mBACd,WAAW,aACX;;;;;;;;;;;;;;;;wBCfc,gBACd;EACG;EAAe;;;;;;;;KCRR;;;;;;;;;;;;;;;;UAiBK;EACf;;EAEA;EACA;EACA;EACA;;UAGe;EACf,aAAa;EACb;EACA,QAAQ;;;;;;;;;;EAUR;;;;;;EAMA,UAAU;;;;;;wBAOI,iBAAiB,kBAAkB;;;KC3C9C,gBAAgB;;;;;;;;;;;;;qBAsLR,gBAAgB;;;;;;;;;;;;UC1LZ;;EAEf;;EAEA,WAAW,cAAc,OAAO;;;;;;;;;;;;;;;;;;;wBAoBZ,oBACpB,WAAW,aACX,UAAS,uBACR;;;;;;;;;;UChCc;;EAEf;;;;;;EAMA,YAAY,cAAc;;EAE1B;;;;;;;;;;;;;;;;;;;;;;;;;;wBA2Bc,aACd,cACA,UAAS"}
|
package/dist/react.d.ts
CHANGED
|
@@ -18,7 +18,7 @@ interface MarkdownViewerProps {
|
|
|
18
18
|
/** Callback when an internal link is clicked */
|
|
19
19
|
onNavigate?: (path: string) => void;
|
|
20
20
|
}
|
|
21
|
-
declare const MarkdownViewer: React.NamedExoticComponent<MarkdownViewerProps>;
|
|
21
|
+
export declare const MarkdownViewer: React.NamedExoticComponent<MarkdownViewerProps>;
|
|
22
22
|
//#endregion
|
|
23
23
|
//#region src/useLineAnchor.d.ts
|
|
24
24
|
/**
|
|
@@ -32,7 +32,7 @@ declare const MarkdownViewer: React.NamedExoticComponent<MarkdownViewerProps>;
|
|
|
32
32
|
* @param containerRef - Ref to the DOM element containing rendered markdown
|
|
33
33
|
* @param hash - The current URL hash (e.g. "#L42", from location.hash or window.location.hash)
|
|
34
34
|
*/
|
|
35
|
-
declare function useLineAnchor(containerRef: RefObject<HTMLElement | null>, hash: string): {
|
|
35
|
+
export declare function useLineAnchor(containerRef: RefObject<HTMLElement | null>, hash: string): {
|
|
36
36
|
clearHighlights: () => void;
|
|
37
37
|
};
|
|
38
38
|
//#endregion
|
|
@@ -40,13 +40,13 @@ declare function useLineAnchor(containerRef: RefObject<HTMLElement | null>, hash
|
|
|
40
40
|
interface MermaidDiagramProps {
|
|
41
41
|
code: string;
|
|
42
42
|
}
|
|
43
|
-
declare const MermaidDiagram: React.NamedExoticComponent<MermaidDiagramProps>;
|
|
43
|
+
export declare const MermaidDiagram: React.NamedExoticComponent<MermaidDiagramProps>;
|
|
44
44
|
//#endregion
|
|
45
45
|
//#region src/FrontmatterDisplay.d.ts
|
|
46
46
|
interface FrontmatterDisplayProps {
|
|
47
47
|
frontmatter: Record<string, unknown>;
|
|
48
48
|
}
|
|
49
|
-
declare const FrontmatterDisplay: React.NamedExoticComponent<FrontmatterDisplayProps>;
|
|
49
|
+
export declare const FrontmatterDisplay: React.NamedExoticComponent<FrontmatterDisplayProps>;
|
|
50
50
|
//#endregion
|
|
51
51
|
//#region src/vantageDirectives.d.ts
|
|
52
52
|
/**
|
|
@@ -70,10 +70,10 @@ declare const VANTAGE_TONES: readonly ["note", "tip", "important", "warning", "c
|
|
|
70
70
|
* `in-review` — the value the design doc's own only example renders — is not a
|
|
71
71
|
* badge word at all. Only `draft` is a member of both, and a token set is per key.
|
|
72
72
|
*/
|
|
73
|
-
declare const DOC_STATUSES: readonly ["draft", "in-review", "accepted", "deprecated"];
|
|
73
|
+
export declare const DOC_STATUSES: readonly ["draft", "in-review", "accepted", "deprecated"];
|
|
74
74
|
type DocStatus = (typeof DOC_STATUSES)[number];
|
|
75
75
|
/** Every key this build knows under `vantage:`. Closed. */
|
|
76
|
-
declare const VANTAGE_FRONTMATTER_KEYS: readonly ["status-chip"];
|
|
76
|
+
export declare const VANTAGE_FRONTMATTER_KEYS: readonly ["status-chip"];
|
|
77
77
|
/**
|
|
78
78
|
* Which tone each status borrows its colours from.
|
|
79
79
|
*
|
|
@@ -83,7 +83,7 @@ declare const VANTAGE_FRONTMATTER_KEYS: readonly ["status-chip"];
|
|
|
83
83
|
* than a computed class name, so the whole status→tone relation is one readable
|
|
84
84
|
* table and a test can assert it covers the vocabulary.
|
|
85
85
|
*/
|
|
86
|
-
declare const DOC_STATUS_TONES: Readonly<Record<DocStatus, (typeof VANTAGE_TONES)[number]>>;
|
|
86
|
+
export declare const DOC_STATUS_TONES: Readonly<Record<DocStatus, (typeof VANTAGE_TONES)[number]>>;
|
|
87
87
|
/**
|
|
88
88
|
* Why something under `vantage:` produced no chrome.
|
|
89
89
|
*
|
|
@@ -117,17 +117,17 @@ interface VantageFrontmatter {
|
|
|
117
117
|
issues: VantageFrontmatterIssue[];
|
|
118
118
|
}
|
|
119
119
|
/** Narrowing helper the chip and the checker both use. */
|
|
120
|
-
declare function isDocStatus(value: unknown): value is DocStatus;
|
|
120
|
+
export declare function isDocStatus(value: unknown): value is DocStatus;
|
|
121
121
|
/**
|
|
122
122
|
* Read the `vantage:` key out of parsed frontmatter.
|
|
123
123
|
*
|
|
124
124
|
* Pure: no module state, no mutation of the input, no logging. The same object
|
|
125
125
|
* in twice gives equal results out.
|
|
126
126
|
*/
|
|
127
|
-
declare function readVantageFrontmatter(frontmatter: Record<string, unknown>): VantageFrontmatter;
|
|
127
|
+
export declare function readVantageFrontmatter(frontmatter: Record<string, unknown>): VantageFrontmatter;
|
|
128
128
|
//#endregion
|
|
129
129
|
//#region src/DocumentStatusChip.d.ts
|
|
130
|
-
declare const DocumentStatusChip: React.NamedExoticComponent<{
|
|
130
|
+
export declare const DocumentStatusChip: React.NamedExoticComponent<{
|
|
131
131
|
status: DocStatus;
|
|
132
132
|
}>;
|
|
133
133
|
//#endregion
|
|
@@ -174,7 +174,7 @@ interface RenderResult {
|
|
|
174
174
|
* Mermaid code blocks are preserved as `<pre><code class="language-mermaid">`.
|
|
175
175
|
* Use the React `<MarkdownViewer>` component for client-side mermaid rendering.
|
|
176
176
|
*/
|
|
177
|
-
declare function renderMarkdown(content: string, options?: RenderOptions): Promise<RenderResult>;
|
|
177
|
+
export declare function renderMarkdown(content: string, options?: RenderOptions): Promise<RenderResult>;
|
|
178
178
|
//#endregion
|
|
179
179
|
//#region ../../node_modules/@types/unist/index.d.ts
|
|
180
180
|
// ## Interfaces
|
|
@@ -1166,7 +1166,7 @@ interface Pipeline {
|
|
|
1166
1166
|
* rehype (`packages/vantage-check/src/core/document.ts`), and it has to parse
|
|
1167
1167
|
* them exactly the way the viewer does.
|
|
1168
1168
|
*/
|
|
1169
|
-
declare function buildRemarkPlugins(options?: PipelineOptions): PluggableList;
|
|
1169
|
+
export declare function buildRemarkPlugins(options?: PipelineOptions): PluggableList;
|
|
1170
1170
|
/**
|
|
1171
1171
|
* Both halves from one options object.
|
|
1172
1172
|
*
|
|
@@ -1179,7 +1179,7 @@ declare function buildRemarkPlugins(options?: PipelineOptions): PluggableList;
|
|
|
1179
1179
|
* that way, so a plugin in the chain cannot become a function of how many times
|
|
1180
1180
|
* the chain has been built.
|
|
1181
1181
|
*/
|
|
1182
|
-
declare function buildPipeline(options?: PipelineOptions): Pipeline;
|
|
1182
|
+
export declare function buildPipeline(options?: PipelineOptions): Pipeline;
|
|
1183
1183
|
//#endregion
|
|
1184
1184
|
//#region src/scrollToLineAnchor.d.ts
|
|
1185
1185
|
/**
|
|
@@ -1191,7 +1191,7 @@ declare function buildPipeline(options?: PipelineOptions): Pipeline;
|
|
|
1191
1191
|
/**
|
|
1192
1192
|
* Clear all line anchor highlights from a container.
|
|
1193
1193
|
*/
|
|
1194
|
-
declare function clearLineAnchorHighlights(container: HTMLElement): void;
|
|
1194
|
+
export declare function clearLineAnchorHighlights(container: HTMLElement): void;
|
|
1195
1195
|
/**
|
|
1196
1196
|
* Scroll to and highlight line-anchored elements in a container.
|
|
1197
1197
|
*
|
|
@@ -1199,7 +1199,7 @@ declare function clearLineAnchorHighlights(container: HTMLElement): void;
|
|
|
1199
1199
|
* @param hash - The URL hash (e.g. "#L42" or "#L42-L50")
|
|
1200
1200
|
* @returns A cleanup function that removes the highlights
|
|
1201
1201
|
*/
|
|
1202
|
-
declare function scrollToLineAnchor(container: HTMLElement, hash: string): (() => void) | null;
|
|
1202
|
+
export declare function scrollToLineAnchor(container: HTMLElement, hash: string): (() => void) | null;
|
|
1203
1203
|
//#endregion
|
|
1204
1204
|
//#region src/lineAnchor.d.ts
|
|
1205
1205
|
/**
|
|
@@ -1215,7 +1215,7 @@ declare function scrollToLineAnchor(container: HTMLElement, hash: string): (() =
|
|
|
1215
1215
|
* Supports: #L42, #L42-L50, #L42-50
|
|
1216
1216
|
* Returns null if the hash is not a line anchor.
|
|
1217
1217
|
*/
|
|
1218
|
-
declare function parseLineAnchor(hash: string): {
|
|
1218
|
+
export declare function parseLineAnchor(hash: string): {
|
|
1219
1219
|
start: number;
|
|
1220
1220
|
end: number;
|
|
1221
1221
|
} | null;
|
|
@@ -1274,7 +1274,7 @@ interface ParsedFrontmatter {
|
|
|
1274
1274
|
* Parse frontmatter from markdown content.
|
|
1275
1275
|
* Supports YAML (delimited by ---) and TOML (delimited by +++).
|
|
1276
1276
|
*/
|
|
1277
|
-
declare function parseFrontmatter(content: string): ParsedFrontmatter;
|
|
1277
|
+
export declare function parseFrontmatter(content: string): ParsedFrontmatter;
|
|
1278
1278
|
//#endregion
|
|
1279
1279
|
//#region src/sanitize.d.ts
|
|
1280
1280
|
type Schema = typeof defaultSchema;
|
|
@@ -1290,7 +1290,7 @@ type Schema = typeof defaultSchema;
|
|
|
1290
1290
|
* whole premise. `vantageDirectives.test.ts` ("leaves no comment in the rendered
|
|
1291
1291
|
* markup") is the guard.
|
|
1292
1292
|
*/
|
|
1293
|
-
declare const sanitizeSchema: Schema;
|
|
1293
|
+
export declare const sanitizeSchema: Schema;
|
|
1294
1294
|
//#endregion
|
|
1295
1295
|
//#region src/renderMermaidBlocks.d.ts
|
|
1296
1296
|
/**
|
|
@@ -1325,7 +1325,7 @@ interface RenderMermaidOptions {
|
|
|
1325
1325
|
* await renderMermaidBlocks(container);
|
|
1326
1326
|
* ```
|
|
1327
1327
|
*/
|
|
1328
|
-
declare function renderMermaidBlocks(container: HTMLElement, options?: RenderMermaidOptions): Promise<void>;
|
|
1328
|
+
export declare function renderMermaidBlocks(container: HTMLElement, options?: RenderMermaidOptions): Promise<void>;
|
|
1329
1329
|
//#endregion
|
|
1330
1330
|
//#region src/resolveLinks.d.ts
|
|
1331
1331
|
/**
|
|
@@ -1371,7 +1371,7 @@ interface ResolveLinkOptions {
|
|
|
1371
1371
|
* });
|
|
1372
1372
|
* ```
|
|
1373
1373
|
*/
|
|
1374
|
-
declare function resolveLinks(html: string, options?: ResolveLinkOptions): string;
|
|
1374
|
+
export declare function resolveLinks(html: string, options?: ResolveLinkOptions): string;
|
|
1375
1375
|
//#endregion
|
|
1376
|
-
export {
|
|
1376
|
+
export { type DocStatus, type FrontmatterFormat, type MarkdownViewerProps, type ParsedFrontmatter, type Pipeline, type PipelineOptions, type RenderMermaidOptions, type RenderOptions, type RenderResult, type ResolveLinkOptions, type VantageFrontmatter, type VantageFrontmatterIssue, rehypeSourceLines };
|
|
1377
1377
|
//# sourceMappingURL=react.d.ts.map
|
package/dist/react.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"react.d.ts","names":[],"sources":["../src/MarkdownViewer.tsx","../src/useLineAnchor.ts","../src/MermaidDiagram.tsx","../src/FrontmatterDisplay.tsx","../src/vantageDirectives.ts","../src/vantageFrontmatter.ts","../src/DocumentStatusChip.tsx","../src/renderMarkdown.ts","../../../node_modules/@types/unist/index.d.ts","../../../node_modules/@types/hast/index.d.ts","../src/rehypeSourceLines.ts","../src/pipeline.ts","../src/scrollToLineAnchor.ts","../src/lineAnchor.ts","../src/frontmatter.ts","../src/sanitize.ts","../src/renderMermaidBlocks.ts","../src/resolveLinks.ts"],"x_google_ignoreList":[8,9],"mappings":";;;;UAkBiB;;EAEf;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA,cAAc;;
|
|
1
|
+
{"version":3,"file":"react.d.ts","names":[],"sources":["../src/MarkdownViewer.tsx","../src/useLineAnchor.ts","../src/MermaidDiagram.tsx","../src/FrontmatterDisplay.tsx","../src/vantageDirectives.ts","../src/vantageFrontmatter.ts","../src/DocumentStatusChip.tsx","../src/renderMarkdown.ts","../../../node_modules/@types/unist/index.d.ts","../../../node_modules/@types/hast/index.d.ts","../src/rehypeSourceLines.ts","../src/pipeline.ts","../src/scrollToLineAnchor.ts","../src/lineAnchor.ts","../src/frontmatter.ts","../src/sanitize.ts","../src/renderMermaidBlocks.ts","../src/resolveLinks.ts"],"x_google_ignoreList":[8,9],"mappings":";;;;UAkBiB;;EAEf;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA,cAAc;;qBA0MH,gBAAc,MAAA,qBAAA;;;;;;;;;;;;;;wBCzNX,cACd,cAAc,UAAU,qBACxB;;;;;UC+RQ;EACR;;qBAqPW,gBAAc,MAAA,qBAAA;;;UC/gBjB;EACR,aAAa;;qBAuIF,oBAAkB,MAAA,qBAAA;;;;;;;;;;cC9GlB;;;;;;;;;;;;;;qBCjBA;KAOD,oBAAoB;;qBAGnB;;;;;;;;;;qBAWA,kBAAkB,SAC7B,OAAO,mBAAmB;;;;;;;;KAehB;EACN;EAAqB;;EACrB;EAAqB;;EACrB;EAAmB;EAAa;EAAgB;;EAChD;EAA4B;;EAC5B;EAA+B,MAAM;EAAW;;UAErC;;EAEf,aAAa;;EAEb,QAAQ;;;wBAWM,YAAY,iBAAiB,SAAS;;;;;;;wBAsBtC,uBACd,aAAa,0BACZ;;;qBCjFU,oBAAkB,MAAA;EAZmB,QAAA;;;;;;;;UCXjC;;EAEf;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;;UAGe;;EAEf;;EAEA,aAAa;;EAEb;;;;;;;;;;;;;;;;;;wBAmBoB,eACpB,iBACA,UAAS,gBACR,QAAQ;;;;;;;;;;;;;;;;;;;;;;;UCnCM;;;;UAKA;;;;EAIb;;;;EAKA;;;;EAIA;;;;;;;UAQa;;;;EAIb,OAAO;;;;EAKP,KAAK;;;;;;;;;;;;UA6BQ;;;;EAIb;;;;EAKA,OAAO;;;;;;;EAQP,WAAW;;;;;;;;;;;;;;;;;;;;;;;UChFE,aAAa;;;;UAKb;EACb;EACA,QAAQ;EACR;EACA,SAAS;EACT,gBAAgB;EAChB,YAAY;EACZ;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA,UAAU;EACV;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA,eAAe;EACf;EACA,kBAAkB;EAClB;EACA;EACA,iBAAiB;EACjB;EACA;EACA,aAAa;EACb;EACA;EACA;EACA;EACA;EACA;EACA,iBAAiB;EACjB;EACA;EACA;EACA;EACA;EACA;EACA,WAAW;EACX;EACA;EACA;EACA;EACA;EACA;EACA,sBAAsB;EACtB;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA,eAAe;EACf;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA,WAAW;EACX;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA,YAAY;EACZ;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA,eAAe;EACf,SAAS;EACT;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA,cAAc;EACd;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA,KAAK;EACL,KAAK;EACL,YAAY;EACZ;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA,UAAU;EACV;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA,UAAU;EACV,YAAY;EACZ;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA,WAAW;EACX,UAAU;EACV;EACA,WAAW;EACX;EACA;EACA;EACA;EACA;EACA,eAAe;EACf;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA,OAAO;EACP;EACA;EACA;EACA;EACA;EACA;EACA;EACA,OAAO;EACP;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA,oBAAoB;EACpB;EACA;EACA;EACA;EACA;EACA;EACA,MAAM;EACN;EACA;EACA;EACA;EACA,qBAAqB;EACrB,mBAAmB;EACnB,gBAAgB;EAChB,kBAAkB;EAClB;EACA;EACA;EACA;EACA,eAAe;EACf;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA,UAAU;EACV;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA,kBAAkB;EAClB;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA,iBAAiB;EACjB;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA,SAAS;EACT;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;GACC,sEAAsE;;;;;;;;;KAW/D,iBAAiB,wBAAwB;;;;;;UAOpC;EACb,SAAS;EACT,SAAS;EACT,MAAM;;;;;;;;KASE,cAAc,qBAAqB;;;;;;;;;UAU9B;EACb,SAAS;EACT,SAAS;EACT,SAAS;EACT,MAAM;;;;;;;;;;;;;;;;UAsDO,aAAa;;;;EAI1B,OAAO;;;;;;;;;UAUM,gBAAgB;;;;EAI7B;;;;;;;;;UAUa,eAAe;;;;EAI5B,UAAU;;;;;;UAQG,gBAAgB;;;;EAI7B;;;;EAIA,OAAO;;;;;UAMM,oBAAoB;;;;UAKpB,gBAAgB;;;;EAI7B;;;;EAIA,OAAO;;;;;UAMM,oBAAoB;;;;UAKpB,gBAAgB;;;;EAI7B;;;;EAIA;;;;EAIA,YAAY;;;;EAIZ,UAAU;;;;;EAKV,UAAU;;;;EAIV,OAAO;;;;;UAMM,oBAAoB;;;;;;;;UASpB,aAAa;;;;EAI1B;;;;EAIA,UAAU;;;;EAIV,OAAO;;;;;UAMM,iBAAiB;;;;UAKjB,aAAa;;;;EAI1B;;;;EAIA,OAAO;;;;;UAMM,iBAAiB;;;UCl3BjB;;;;;;;EAOf;;cAkBI,mBAAmB,QAAQ,4BAA4B;;;UCf5C;;EAEf;;EAEA;;EAEA;;EAEA;;EAEA;;;;;;;EAOA;;UAGe;EACf,eAAe;EACf,eAAe;;;;;;;;wBASD,mBACd,UAAS,kBACR;;;;;;;;;;;;;wBA+Ea,cAAc,UAAS,kBAAuB;;;;;;;;;;;;wBCrJ9C,0BAA0B,WAAW;;;;;;;;wBAarC,mBACd,WAAW,aACX;;;;;;;;;;;;;;;;wBCfc,gBACd;EACG;EAAe;;;;;;;;KCRR;;;;;;;;;;;;;;;;UAiBK;EACf;;EAEA;EACA;EACA;EACA;;UAGe;EACf,aAAa;EACb;EACA,QAAQ;;;;;;;;;;EAUR;;;;;;EAMA,UAAU;;;;;;wBAOI,iBAAiB,kBAAkB;;;KC3C9C,gBAAgB;;;;;;;;;;;;;qBAsLR,gBAAgB;;;;;;;;;;;;UC1LZ;;EAEf;;EAEA,WAAW,cAAc,OAAO;;;;;;;;;;;;;;;;;;;wBAoBZ,oBACpB,WAAW,aACX,UAAS,uBACR;;;;;;;;;;UChCc;;EAEf;;;;;;EAMA,YAAY,cAAc;;EAE1B;;;;;;;;;;;;;;;;;;;;;;;;;;wBA2Bc,aACd,cACA,UAAS"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vantage-md",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.1",
|
|
4
4
|
"description": "Markdown rendering pipeline with GitHub-style line anchors, mermaid diagrams, KaTeX math, and syntax highlighting",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.cjs",
|
|
@@ -94,21 +94,21 @@
|
|
|
94
94
|
"yaml": "^2.8.2"
|
|
95
95
|
},
|
|
96
96
|
"optionalDependencies": {
|
|
97
|
-
"mermaid": "^
|
|
97
|
+
"mermaid": "^12.0.0"
|
|
98
98
|
},
|
|
99
99
|
"devDependencies": {
|
|
100
100
|
"@eslint/js": "^10.0.1",
|
|
101
101
|
"@types/hast": "^3.0.5",
|
|
102
|
-
"@types/react": "^19.
|
|
103
|
-
"@types/react-dom": "^19.
|
|
102
|
+
"@types/react": "^19.3.0",
|
|
103
|
+
"@types/react-dom": "^19.3.0",
|
|
104
104
|
"eslint": "^10.7.0",
|
|
105
105
|
"eslint-plugin-react-hooks": "^7.1.1",
|
|
106
106
|
"globals": "^17.11.0",
|
|
107
107
|
"prettier": "^3.8.1",
|
|
108
|
-
"react": "^19.
|
|
109
|
-
"react-dom": "^19.
|
|
108
|
+
"react": "^19.3.0",
|
|
109
|
+
"react-dom": "^19.3.0",
|
|
110
110
|
"react-markdown": "^10.1.0",
|
|
111
|
-
"tsdown": "^0.
|
|
111
|
+
"tsdown": "^0.23.0",
|
|
112
112
|
"typescript": "~6.0.3",
|
|
113
113
|
"typescript-5": "npm:typescript@~5.9.3",
|
|
114
114
|
"typescript-eslint": "^8.63.0"
|