vantage-md 0.6.1 → 0.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -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;;;;;;;;;;;;;;;;;;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;;;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AAmB;;;;;;;;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"}
1
+ {"version":3,"file":"index.d.ts","names":[],"sources":["../../../node_modules/@types/unist/index.d.ts","../../../node_modules/@types/mdast/index.d.ts","../src/renderMarkdown.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/mermaidTheme.ts","../src/resolveLinks.ts","../src/styleGuide.ts"],"x_google_ignoreList":[0,1,3],"mappings":";;;;;;;;;;;;;;;;;;;;;;;UAqBiB;;;;UAKA;;;;EAIb;;;;EAKA;;;;EAIA;;;;;;;UAQa;;;;EAIb,OAAO;;;;EAKP,KAAK;;;;;;;;;;;;UA6BQ;;;;EAIb;;;;EAKA,OAAO;;;;;;;EAQP,WAAW;;;;;;;;;;;;;;;;;;;;;;KCjFH;;;;;;;;;;KAWA;;;;;UAOK;;;;;EAKb;;;;;;;;;;;UA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A;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;;;;;U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;;;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;;;;;;;;qBCIU;;;;;;;;;;;;;qBAcA;;wBAGG;;;;;;;;;;UCrDC;;EAEf;;;;;;EAMA,YAAY,cAAc;;EAE1B;;;;;;;;;;;;;;;;;;;;;;;;;;wBA2Bc,aACd,cACA,UAAS;;;;;;;;;;;;;;;;;qBChCE"}
package/dist/index.js CHANGED
@@ -82,14 +82,14 @@ const rehypeSourceLines = (options) => {
82
82
  * `remark-gfm` does not implement alerts, so until this plugin existed a
83
83
  * `> [!WARNING]` rendered as an ordinary blockquote with the literal marker
84
84
  * visible as its first words. Worse than merely unstyled: `@tailwindcss/typography`
85
- * italicises blockquotes and draws `open-quote`/`close-quote` around the first
85
+ * italicizes blockquotes and draws `open-quote`/`close-quote` around the first
86
86
  * paragraph, so a callout came out as an italic *quotation* whose opening words
87
87
  * were `"[!WARNING]`. That was the "Known gaps" entry in
88
88
  * `docs/reference/inline-markup.md` and OQ-10, filed rather than fixed, while
89
89
  * `styleGuide.ts` went on telling every agent to write them.
90
90
  *
91
91
  * The tokens are deliberately the ones the `tone` vocabulary already resolves —
92
- * an alert *is* the six-colour light/dark treatment `tone` shipped, which is
92
+ * an alert *is* the six-color light/dark treatment `tone` shipped, which is
93
93
  * exactly what the gap entry said whoever fixed this should do rather than
94
94
  * building a second palette. `[!WARNING]` and `<!-- vantage: block tone=warning -->`
95
95
  * therefore agree by construction, and adding a theme still touches one
@@ -103,7 +103,7 @@ const rehypeSourceLines = (options) => {
103
103
  *
104
104
  * ## What it does not do
105
105
  *
106
- * It does not touch a blockquote that carries no marker, and an unrecognised
106
+ * It does not touch a blockquote that carries no marker, and an unrecognized
107
107
  * marker (`[!HINT]`) is left exactly as it was — visible literal text, which is
108
108
  * the honest rendering of something GitHub also would not style. Silently
109
109
  * swallowing it would hide a typo that reads as a callout on neither renderer.
@@ -387,11 +387,63 @@ const VANTAGE_OQ_HOST_TARGETS = VANTAGE_ANCHOR_TARGETS.filter((tag) => tag !== "
387
387
  * file, and requiring it everywhere would fire on every single-doc sketch.
388
388
  *
389
389
  * Three consumers read it from here and none of them may re-spell it: the
390
- * plugin that stamps the anchor, the sanitiser that allowlists the value, and
390
+ * plugin that stamps the anchor, the sanitizer that allowlists the value, and
391
391
  * the checker's `vantage/oq-id-format`. A fourth copy is how the checker starts
392
392
  * calling a working anchor malformed.
393
393
  */
394
394
  const VANTAGE_OQ_ID = /^OQ-(?:[A-Z][A-Z0-9]{0,5})?[0-9]+$/;
395
+ /**
396
+ * The status emoji the documentation convention marks an Open Question with, and
397
+ * what each one means to a reader deciding whether the question wants them.
398
+ *
399
+ * These are *prose* — ordinary characters in the question's title, not part of
400
+ * any directive — which is exactly why they need a home that both readers of
401
+ * them can import. Two consumers ask what a marker means and they must not
402
+ * answer differently: the checker's `vantage/oq-missing`, which demands a
403
+ * directive on an open question and must never demand one on a blocked one, and
404
+ * the viewer's contents column, which shows the marker and needs a word for it
405
+ * that a screen reader can say. They were private constants in the checker until
406
+ * the second consumer arrived.
407
+ *
408
+ * `open` is the only state that wants a one-click answer. `settled` and
409
+ * `blocked` deliberately carry no directive at all — a control offering to
410
+ * answer a question that is already decided, or that cannot be answered yet, is
411
+ * a lie — so the checker keys on the distinction rather than on the word
412
+ * "Leaning:" alone. Either non-open marker wins when both appear on one item.
413
+ */
414
+ const VANTAGE_OQ_STATUS = {
415
+ /** 💬 — an active decision awaiting a ruling. */
416
+ open: "💬",
417
+ /** ✅ — decided, awaiting compaction into a Decision Ledger. */
418
+ settled: "✅",
419
+ /** 🔒 — blocked on an upstream decision or experiment. */
420
+ blocked: "🔒"
421
+ };
422
+ /**
423
+ * What a marker says, in words, for somewhere an emoji cannot go.
424
+ *
425
+ * An accessible name is the reason this exists: a contents entry whose whole
426
+ * status is one glyph says nothing to a screen reader, and "speech bubble" —
427
+ * which is what it would otherwise read out — is worse than nothing.
428
+ */
429
+ const VANTAGE_OQ_STATUS_LABEL = {
430
+ open: "Open question",
431
+ settled: "Answered question",
432
+ blocked: "Blocked question"
433
+ };
434
+ /**
435
+ * The state `text` is marked with, or `null` when it carries no marker.
436
+ *
437
+ * Non-open wins over open, the resolution `vantage/oq-missing` has always made:
438
+ * a question marked both 💬 and ✅ has been answered and the stale marker simply
439
+ * has not been cleared yet, so treating it as open would re-open a ruling.
440
+ */
441
+ function vantageOqStatus(text) {
442
+ if (text.includes(VANTAGE_OQ_STATUS.settled)) return "settled";
443
+ if (text.includes(VANTAGE_OQ_STATUS.blocked)) return "blocked";
444
+ if (text.includes(VANTAGE_OQ_STATUS.open)) return "open";
445
+ return null;
446
+ }
395
447
  const STYLE_KEYS = {
396
448
  tone: VANTAGE_TONES,
397
449
  emphasis: VANTAGE_EMPHASIS,
@@ -555,7 +607,7 @@ const HEADING_DEPTHS = /* @__PURE__ */ new Map([
555
607
  /**
556
608
  * Key → hast property, for the keys that treat a whole run.
557
609
  *
558
- * A camelCase hast property serialises to the kebab-case attribute, so
610
+ * A camelCase hast property serializes to the kebab-case attribute, so
559
611
  * `dataVantageTone` is `data-vantage-tone` in every renderer.
560
612
  *
561
613
  * `tone` and `emphasis` describe what a section *is* and how loud it is, so
@@ -590,11 +642,11 @@ const LEANING_PROPERTY = "dataVantageLeaning";
590
642
  * The id, carried as a `data-` attribute rather than written straight to `id`.
591
643
  *
592
644
  * This plugin runs *before* `rehypeSanitize` — it has to, it reads comments and
593
- * the sanitiser deletes them — and the sanitiser's default schema clobbers `id`
645
+ * the sanitizer deletes them — and the sanitizer's default schema clobbers `id`
594
646
  * with the prefix `user-content-`. A bare `id` set here would reach the page as
595
647
  * `user-content-OQ-4`, every `#OQ-4` link in every document would land nowhere,
596
648
  * and nothing would error. `rehypeVantageAnchors` promotes this to a real `id`
597
- * on the other side of the sanitiser, which is the same reason `rehypeSlug` is
649
+ * on the other side of the sanitizer, which is the same reason `rehypeSlug` is
598
650
  * registered there (`pipeline.ts`).
599
651
  */
600
652
  const OQ_ID_PROPERTY = "dataVantageOqId";
@@ -626,7 +678,7 @@ const MAX_LEANING = 500;
626
678
  * A whitespace-only `text` node always does — measured, with or without a blank
627
679
  * line in the source. Comments do too, and an unrelated `<!-- TODO -->` must not
628
680
  * break the chain: it is invisible in every renderer and deleted by the
629
- * sanitiser, so letting it change a directive's meaning would make behaviour
681
+ * sanitizer, so letting it change a directive's meaning would make behavior
630
682
  * depend on something no reader can see.
631
683
  */
632
684
  function isSkippable(node) {
@@ -678,7 +730,7 @@ function accepts(name, key, value) {
678
730
  * two stamped paragraphs — and the section's one continuous vertical rule is
679
731
  * drawn per member, so an unstamped member is a hole the height of the block
680
732
  * plus its margins. Measured over the real stylesheet: 44px for a one-line
681
- * `<figure>`, against the 40px a neighbour can bleed upward, and arbitrarily
733
+ * `<figure>`, against the 40px a neighbor can bleed upward, and arbitrarily
682
734
  * large for anything taller. `collapsed=true` had the same shape of bug the
683
735
  * other way round — it hid the paragraphs and left the figure on the page.
684
736
  *
@@ -860,7 +912,7 @@ function classNames(node) {
860
912
  * A `<pre>` `rehype-katex` will replace — its own condition, restated.
861
913
  *
862
914
  * `language-math` is the only class to test: `rehype-katex` keys the
863
- * pre-as-scope branch on it, and the sanitiser strips the `math-display` that
915
+ * pre-as-scope branch on it, and the sanitizer strips the `math-display` that
864
916
  * `remark-math` also emits (measured — a stamped fence arrives here with
865
917
  * `className: ["language-math"]` alone).
866
918
  */
@@ -1014,7 +1066,7 @@ const COLLAPSE_GROUP_ID = /^[0-9]+$/;
1014
1066
  * `false` — comments are not elements, so `tagNames` has nothing to do with it.
1015
1067
  * `rehypeVantageDirectives` relies on that deletion: it consumes a
1016
1068
  * `<!-- vantage: … -->` comment into attributes and deliberately leaves the node
1017
- * for the sanitiser. Turning the switch on readmits every directive comment —
1069
+ * for the sanitizer. Turning the switch on readmits every directive comment —
1018
1070
  * valid and malformed alike — into the rendered HTML, which breaks the carrier's
1019
1071
  * whole premise. `vantageDirectives.test.ts` ("leaves no comment in the rendered
1020
1072
  * markup") is the guard.
@@ -1237,10 +1289,6 @@ function errorPosition(error) {
1237
1289
  //#endregion
1238
1290
  //#region src/renderMarkdown.ts
1239
1291
  /**
1240
- * Framework-agnostic markdown -> HTML rendering pipeline.
1241
- * Uses the same remark/rehype chain as the Vantage viewer.
1242
- */
1243
- /**
1244
1292
  * Render a markdown string to HTML using the full Vantage pipeline.
1245
1293
  *
1246
1294
  * Features (all enabled by default):
@@ -1257,7 +1305,7 @@ function errorPosition(error) {
1257
1305
  * Use the React `<MarkdownViewer>` component for client-side mermaid rendering.
1258
1306
  */
1259
1307
  async function renderMarkdown(content, options = {}) {
1260
- const { gfm = true, math = true, highlight = true, sourceLines = true, sanitize = true, frontmatter: parseFm = true } = options;
1308
+ const { gfm = true, math = true, highlight = true, sourceLines = true, sanitize = true, frontmatter: parseFm = true, tree } = options;
1261
1309
  let parsed;
1262
1310
  if (parseFm) parsed = parseFrontmatter(content);
1263
1311
  else parsed = {
@@ -1274,7 +1322,8 @@ async function renderMarkdown(content, options = {}) {
1274
1322
  sanitize,
1275
1323
  bodyLineOffset: parsed.bodyLineOffset
1276
1324
  });
1277
- const result = await unified().use(remarkParse).use(remarkPlugins).use(remarkRehype, { allowDangerousHtml: true }).use(rehypePlugins).use(rehypeStringify).process(parsed.body);
1325
+ const processor = unified().use(remarkParse).use(remarkPlugins).use(remarkRehype, { allowDangerousHtml: true }).use(rehypePlugins).use(rehypeStringify);
1326
+ const result = tree === void 0 ? String(await processor.process(parsed.body)) : processor.stringify(await processor.run(tree, parsed.body), parsed.body);
1278
1327
  return {
1279
1328
  html: String(result),
1280
1329
  frontmatter: parsed.frontmatter,
@@ -1288,7 +1337,7 @@ async function renderMarkdown(content, options = {}) {
1288
1337
  *
1289
1338
  * Split out from scrollToLineAnchor.ts so that non-browser consumers — the
1290
1339
  * `vantage-check` CLI, which validates `#L42` links against the file on disk —
1291
- * can share the *same* syntax the viewer honours instead of reimplementing it
1340
+ * can share the *same* syntax the viewer honors instead of reimplementing it
1292
1341
  * and drifting.
1293
1342
  */
1294
1343
  /**
@@ -1405,7 +1454,7 @@ const DOC_STATUSES = [
1405
1454
  /** Every key this build knows under `vantage:`. Closed. */
1406
1455
  const VANTAGE_FRONTMATTER_KEYS = ["status-chip"];
1407
1456
  /**
1408
- * Which tone each status borrows its colours from.
1457
+ * Which tone each status borrows its colors from.
1409
1458
  *
1410
1459
  * The chip has no palette of its own: it reuses the tone chips
1411
1460
  * (`.vantage-chip--<tone>` in `styles/directives.css`), which is also what makes
@@ -1512,6 +1561,49 @@ function currentMermaidTheme() {
1512
1561
  return typeof document !== "undefined" && document.documentElement.classList.contains("dark") ? "dark" : "default";
1513
1562
  }
1514
1563
  /**
1564
+ * The attribute on `<html>` naming the active color theme. Absent means the
1565
+ * built-in look. The app sets it only once the theme's stylesheet has loaded,
1566
+ * so a reader of this attribute can trust the theme's variables are in effect.
1567
+ */
1568
+ const COLOR_THEME_ATTRIBUTE = "data-vantage-theme";
1569
+ /**
1570
+ * The attribute on `<html>` saying where the active theme came from: `"user"`
1571
+ * for a stylesheet in the reader's themes directory, `"built-in"` for one the
1572
+ * app ships. Set with {@link COLOR_THEME_ATTRIBUTE}, and absent with it.
1573
+ *
1574
+ * It exists because an id alone is not a palette. A user theme may share a
1575
+ * built-in's id — that is how a reader tweaks one — and the app applies the
1576
+ * stored built-in synchronously, then swaps in the same-id user file once
1577
+ * /api/themes answers. Keyed on the id, the diagrams drawn in between kept the
1578
+ * built-in's colors: the key did not change, so neither the cache nor
1579
+ * `useSyncExternalStore` saw a reason to redraw.
1580
+ */
1581
+ const COLOR_THEME_SOURCE_ATTRIBUTE = "data-vantage-theme-source";
1582
+ /** The active color theme's id, or `""` for the built-in look. */
1583
+ function currentColorTheme() {
1584
+ if (typeof document === "undefined") return "";
1585
+ return document.documentElement.getAttribute("data-vantage-theme") ?? "";
1586
+ }
1587
+ /**
1588
+ * Everything a rendered diagram's colors depend on, as one string: the
1589
+ * light/dark mode, plus the color theme when one is active.
1590
+ *
1591
+ * A diagram is baked at render time, so anything that changes its colors has
1592
+ * to change this key — it is what the SVG cache and the loader's "configured
1593
+ * for" check compare. Under the built-in look it is exactly the mode name,
1594
+ * which is what both keyed on before color themes existed.
1595
+ */
1596
+ function currentMermaidPalette() {
1597
+ const theme = currentColorTheme();
1598
+ if (!theme) return currentMermaidTheme();
1599
+ const user = document.documentElement.getAttribute(COLOR_THEME_SOURCE_ATTRIBUTE) === "user";
1600
+ return `${currentMermaidTheme()} ${theme}${user ? " user" : ""}`;
1601
+ }
1602
+ /** The mermaid theme name a palette key was built from. */
1603
+ function mermaidThemeOf(palette) {
1604
+ return palette.startsWith("dark") ? "dark" : "default";
1605
+ }
1606
+ /**
1515
1607
  * Theme variables per theme. Mermaid derives most of its palette from these, so
1516
1608
  * the set is deliberately small: the surfaces, the ink, and the lines.
1517
1609
  */
@@ -1535,27 +1627,108 @@ const THEME_VARIABLES = {
1535
1627
  edgeLabelBackground: "#f8fafc"
1536
1628
  }
1537
1629
  };
1630
+ /**
1631
+ * Where each variable comes from under a color theme: the palette step the
1632
+ * built-in value was chosen from. The hex above IS that step in Tailwind's own
1633
+ * palette, so reading the step back out of the page gives the same diagram
1634
+ * under the built-in look and the theme's colors under any other.
1635
+ */
1636
+ const THEME_SOURCES = {
1637
+ dark: {
1638
+ background: "--color-slate-800",
1639
+ mainBkg: "--color-slate-700",
1640
+ nodeBorder: "--color-slate-400",
1641
+ nodeTextColor: "--color-slate-100",
1642
+ lineColor: "--color-slate-400",
1643
+ textColor: "--color-slate-200",
1644
+ edgeLabelBackground: "--color-slate-800"
1645
+ },
1646
+ default: {
1647
+ background: "--color-slate-50",
1648
+ mainBkg: "--color-slate-100",
1649
+ nodeBorder: "--color-slate-500",
1650
+ nodeTextColor: "--color-slate-900",
1651
+ lineColor: "--color-slate-500",
1652
+ textColor: "--color-slate-800",
1653
+ edgeLabelBackground: "--color-slate-50"
1654
+ }
1655
+ };
1538
1656
  function mermaidThemeVariables(theme) {
1539
- return THEME_VARIABLES[theme];
1657
+ const fixed = THEME_VARIABLES[theme];
1658
+ if (!currentColorTheme()) return fixed;
1659
+ const out = {};
1660
+ for (const [key, hex] of Object.entries(fixed)) out[key] = resolveCssColor(THEME_SOURCES[theme][key]) ?? hex;
1661
+ return out;
1662
+ }
1663
+ /**
1664
+ * A custom property's color as `#rrggbb`, or `null` when it cannot be read.
1665
+ *
1666
+ * Mermaid wants hex at `initialize()` time, and a theme's value can be any CSS
1667
+ * color — `oklch()`, `color-mix()`, a `var()` of another variable. So the
1668
+ * browser does the work: a probe element resolves the property to a computed
1669
+ * color, and a 1×1 canvas turns that into sRGB bytes whatever syntax it came
1670
+ * back in. No canvas (jsdom, a locked-down embed) is `null`, and the caller
1671
+ * falls back to the built-in value.
1672
+ *
1673
+ * A property nobody declared is `null` too, and has to be checked for up
1674
+ * front: `color: var(--unset)` is invalid at computed-value time, so the probe
1675
+ * *inherits* its color instead — the page's text color, which the canvas
1676
+ * would dutifully turn into a plausible hex and mermaid would paint every node
1677
+ * box with.
1678
+ */
1679
+ function resolveCssColor(property) {
1680
+ if (typeof document === "undefined") return null;
1681
+ if (!getComputedStyle(document.documentElement).getPropertyValue(property).trim()) return null;
1682
+ const probe = document.createElement("span");
1683
+ probe.style.display = "none";
1684
+ probe.style.color = `var(${property})`;
1685
+ document.documentElement.appendChild(probe);
1686
+ const computed = getComputedStyle(probe).color;
1687
+ probe.remove();
1688
+ if (!computed) return null;
1689
+ const ctx = pixelContext();
1690
+ if (!ctx) return null;
1691
+ ctx.fillStyle = computed;
1692
+ ctx.fillRect(0, 0, 1, 1);
1693
+ const [r, g, b] = ctx.getImageData(0, 0, 1, 1).data;
1694
+ return `#${[
1695
+ r,
1696
+ g,
1697
+ b
1698
+ ].map((v) => v.toString(16).padStart(2, "0")).join("")}`;
1699
+ }
1700
+ /** A 1×1 2D context to read a color back from, or `null` where there is none. */
1701
+ function pixelContext() {
1702
+ try {
1703
+ const canvas = document.createElement("canvas");
1704
+ canvas.width = canvas.height = 1;
1705
+ return canvas.getContext("2d", { willReadFrequently: true });
1706
+ } catch {
1707
+ return null;
1708
+ }
1540
1709
  }
1541
1710
  //#endregion
1542
1711
  //#region src/mermaidCache.ts
1543
1712
  const svgCache = /* @__PURE__ */ new Map();
1544
- const cacheKey = (code, theme) => `${theme}${code}`;
1713
+ const cacheKey = (code, theme) => `${theme}\u0000${code}`;
1545
1714
  /** The SVG for this fence in the theme the page is currently asking for. */
1546
- function getCachedSvg(code, theme = currentMermaidTheme()) {
1715
+ function getCachedSvg(code, theme = currentMermaidPalette()) {
1547
1716
  return svgCache.get(cacheKey(code, theme));
1548
1717
  }
1549
- function setCachedSvg(code, svg, theme = currentMermaidTheme()) {
1718
+ function setCachedSvg(code, svg, theme = currentMermaidPalette()) {
1550
1719
  svgCache.set(cacheKey(code, theme), svg);
1551
1720
  }
1552
1721
  //#endregion
1553
1722
  //#region src/mermaidLoader.ts
1554
1723
  let mermaidInstance = null;
1555
1724
  let mermaidLoading = null;
1556
- /** The theme the loaded instance was last configured for, `null` until loaded. */
1725
+ /**
1726
+ * The palette key (`currentMermaidPalette`) the loaded instance was last
1727
+ * configured for, `null` until loaded.
1728
+ */
1557
1729
  let configuredTheme = null;
1558
- function configure(m, theme) {
1730
+ function configure(m, palette) {
1731
+ const theme = mermaidThemeOf(palette);
1559
1732
  m.initialize({
1560
1733
  startOnLoad: false,
1561
1734
  theme,
@@ -1563,7 +1736,7 @@ function configure(m, theme) {
1563
1736
  securityLevel: "strict",
1564
1737
  suppressErrorRendering: true
1565
1738
  });
1566
- configuredTheme = theme;
1739
+ configuredTheme = palette;
1567
1740
  }
1568
1741
  /**
1569
1742
  * The mermaid module, configured for the theme the page is asking for *now*.
@@ -1577,19 +1750,19 @@ function configure(m, theme) {
1577
1750
  * served instead (`mermaidCache.ts`).
1578
1751
  */
1579
1752
  async function getMermaid() {
1580
- const theme = currentMermaidTheme();
1753
+ const theme = currentMermaidPalette();
1581
1754
  if (mermaidInstance) {
1582
1755
  if (configuredTheme !== theme) configure(mermaidInstance, theme);
1583
1756
  return mermaidInstance;
1584
1757
  }
1585
1758
  if (!mermaidLoading) mermaidLoading = import("mermaid").then((mod) => {
1586
1759
  const m = mod.default;
1587
- configure(m, currentMermaidTheme());
1760
+ configure(m, currentMermaidPalette());
1588
1761
  mermaidInstance = m;
1589
1762
  return m;
1590
1763
  });
1591
1764
  const loaded = await mermaidLoading;
1592
- const wanted = currentMermaidTheme();
1765
+ const wanted = currentMermaidPalette();
1593
1766
  if (configuredTheme !== wanted) configure(loaded, wanted);
1594
1767
  return loaded;
1595
1768
  }
@@ -1791,7 +1964,7 @@ vantage:
1791
1964
  status-chip: true # show \`status\` as a chip above the metadata card
1792
1965
  ---
1793
1966
  \`\`\`
1794
- - **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\`.
1967
+ - **Nothing may sit above the opening delimiter** — not a blank line, not an editorial comment, not a \`<!-- vantage: … -->\` directive. Frontmatter is recognized 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\`.
1795
1968
  - **\`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\`.
1796
1969
  - **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.
1797
1970
  - The chip's vocabulary is \`status\`'s, exactly: \`draft | in-review | accepted | deprecated\`, lowercase. \`Draft\` renders no chip at all, silently.
@@ -1843,7 +2016,7 @@ The steps below predate the rewrite.
1843
2016
  \`\`\`
1844
2017
 
1845
2018
  - **Three names**: \`section\` (the heading and everything under it), \`block\` (the one block after it), \`oq\` (one answerable Open Question).
1846
- - **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.
2019
+ - **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 color — the theme decides what a warning looks like, in light mode, in dark mode, and in print.
1847
2020
  - **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.
1848
2021
  - **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.
1849
2022
  - **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.
@@ -1868,6 +2041,6 @@ The steps below predate the rewrite.
1868
2041
  - Single dollars are **not** math delimiters: \`$HOME\` and \`$100\` stay literal, so prose and shell snippets are safe to write as-is.
1869
2042
  `;
1870
2043
  //#endregion
1871
- export { ALERT_TITLES, DIRECTIVE_NAMES, DIRECTIVE_VOCABULARY, DOC_STATUSES, DOC_STATUS_TONES, SAFE_STYLE, STYLE_GUIDE, VANTAGE_ALERTS, VANTAGE_BADGES, VANTAGE_COLLAPSED, VANTAGE_EMPHASIS, VANTAGE_FRONTMATTER_KEYS, VANTAGE_OQ_HOST_TARGETS, VANTAGE_RUNS, VANTAGE_SENTINEL, VANTAGE_TONES, buildPipeline, buildRemarkPlugins, clearLineAnchorHighlights, hasVantageSentinel, isDocStatus, parseFrontmatter, parseLineAnchor, parseVantageDirective, readVantageFrontmatter, rehypeSourceLines, rehypeVantageAlerts, rehypeVantageAnchors, rehypeVantageDirectives, renderMarkdown, renderMermaidBlocks, resolveLinks, sanitizeSchema, scrollToLineAnchor };
2044
+ export { ALERT_TITLES, COLOR_THEME_ATTRIBUTE, COLOR_THEME_SOURCE_ATTRIBUTE, DIRECTIVE_NAMES, DIRECTIVE_VOCABULARY, DOC_STATUSES, DOC_STATUS_TONES, SAFE_STYLE, STYLE_GUIDE, VANTAGE_ALERTS, VANTAGE_BADGES, VANTAGE_COLLAPSED, VANTAGE_EMPHASIS, VANTAGE_FRONTMATTER_KEYS, VANTAGE_OQ_HOST_TARGETS, VANTAGE_OQ_STATUS, VANTAGE_OQ_STATUS_LABEL, VANTAGE_RUNS, VANTAGE_SENTINEL, VANTAGE_TONES, buildPipeline, buildRemarkPlugins, clearLineAnchorHighlights, currentColorTheme, hasVantageSentinel, isDocStatus, parseFrontmatter, parseLineAnchor, parseVantageDirective, readVantageFrontmatter, rehypeSourceLines, rehypeVantageAlerts, rehypeVantageAnchors, rehypeVantageDirectives, renderMarkdown, renderMermaidBlocks, resolveLinks, sanitizeSchema, scrollToLineAnchor, vantageOqStatus };
1872
2045
 
1873
2046
  //# sourceMappingURL=index.js.map