nimbus-docs 0.1.12 → 0.1.14
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/cli/index.js +1 -1
- package/dist/content.d.ts +4 -4
- package/dist/index.d.ts +15 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +13 -7
- package/dist/index.js.map +1 -1
- package/dist/markdown.d.ts +37 -0
- package/dist/markdown.d.ts.map +1 -0
- package/dist/markdown.js +126 -0
- package/dist/markdown.js.map +1 -0
- package/dist/schemas.d.ts +2 -2
- package/dist/schemas.d.ts.map +1 -1
- package/dist/types.d.ts +2 -1
- package/dist/types.d.ts.map +1 -1
- package/package.json +12 -8
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { HastPluginDefinition } from "satteri";
|
|
2
|
+
|
|
3
|
+
//#region src/markdown/external-links.d.ts
|
|
4
|
+
/** Default arrow affordance (space + U+2197). Exported so a consumer's
|
|
5
|
+
* heading-slug plugin can strip it before computing ids. */
|
|
6
|
+
declare const EXTERNAL_LINK_ARROW = " \u2197";
|
|
7
|
+
interface ExternalLinksOptions {
|
|
8
|
+
/** `target` attribute set on external links. Default `"_blank"`. */
|
|
9
|
+
target?: string;
|
|
10
|
+
/** `rel` tokens set on external links. Default `["noopener"]`. */
|
|
11
|
+
rel?: string[];
|
|
12
|
+
/**
|
|
13
|
+
* Arrow affordance appended after the link text (inside the anchor), unless
|
|
14
|
+
* the link wraps an image. `null` disables it. Default `" ↗"`.
|
|
15
|
+
*/
|
|
16
|
+
arrow?: string | null;
|
|
17
|
+
/** Class on the arrow `<span>`. Default `"external-link"`. */
|
|
18
|
+
arrowClass?: string;
|
|
19
|
+
/**
|
|
20
|
+
* Hosts considered internal (left undecorated). Default: none — any absolute
|
|
21
|
+
* `http(s)`/protocol-relative link is external (rehype-external-links default).
|
|
22
|
+
*/
|
|
23
|
+
internalHosts?: string[];
|
|
24
|
+
}
|
|
25
|
+
declare function externalLinks(options?: ExternalLinksOptions): HastPluginDefinition;
|
|
26
|
+
//#endregion
|
|
27
|
+
//#region src/markdown/title-figure.d.ts
|
|
28
|
+
interface TitleFigureOptions {
|
|
29
|
+
/** Class on the generated `<figure>`. Default: none. */
|
|
30
|
+
figureClass?: string;
|
|
31
|
+
/** Class on the generated `<figcaption>`. Default: none. */
|
|
32
|
+
figcaptionClass?: string;
|
|
33
|
+
}
|
|
34
|
+
declare function titleFigure(options?: TitleFigureOptions): HastPluginDefinition;
|
|
35
|
+
//#endregion
|
|
36
|
+
export { EXTERNAL_LINK_ARROW, type ExternalLinksOptions, type TitleFigureOptions, externalLinks, titleFigure };
|
|
37
|
+
//# sourceMappingURL=markdown.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"markdown.d.ts","names":[],"sources":["../src/markdown/external-links.ts","../src/markdown/title-figure.ts"],"mappings":";;;;;cAkBa,mBAAA;AAAA,UAEI,oBAAA;EAgBF;EAdb,MAAA;EAgC2B;EA9B3B,GAAA;EAgCqB;;;;EA3BrB,KAAA;EA2BqB;EAzBrB,UAAA;;;ACfF;;EDoBE,aAAA;AAAA;AAAA,iBAkBc,aAAA,CACd,OAAA,GAAS,oBAAA,GACR,oBAAA;;;UCxCc,kBAAA;EDef;ECbA,WAAA;EDkBa;EChBb,eAAA;AAAA;AAAA,iBAqBc,WAAA,CACd,OAAA,GAAS,kBAAA,GACR,oBAAA"}
|
package/dist/markdown.js
ADDED
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
//#region src/markdown/types.ts
|
|
2
|
+
/** Narrow a node to an element, optionally of a given tagName. */
|
|
3
|
+
function isElement(node, tagName) {
|
|
4
|
+
return !!node && node.type === "element" && (tagName === void 0 || node.tagName === tagName);
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
//#endregion
|
|
8
|
+
//#region src/markdown/external-links.ts
|
|
9
|
+
/** Default arrow affordance (space + U+2197). Exported so a consumer's
|
|
10
|
+
* heading-slug plugin can strip it before computing ids. */
|
|
11
|
+
const EXTERNAL_LINK_ARROW = " ↗";
|
|
12
|
+
const EXTERNAL = /^(?:https?:)?\/\//i;
|
|
13
|
+
function hasImgChild(node) {
|
|
14
|
+
return (node.children ?? []).some((c) => isElement(c, "img"));
|
|
15
|
+
}
|
|
16
|
+
function hostOf(href) {
|
|
17
|
+
try {
|
|
18
|
+
return new URL(href.startsWith("//") ? `https:${href}` : href).host;
|
|
19
|
+
} catch {
|
|
20
|
+
return null;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
function externalLinks(options = {}) {
|
|
24
|
+
const target = options.target ?? "_blank";
|
|
25
|
+
const rel = options.rel ?? ["noopener"];
|
|
26
|
+
const arrow = options.arrow === void 0 ? EXTERNAL_LINK_ARROW : options.arrow;
|
|
27
|
+
const arrowClass = options.arrowClass ?? "external-link";
|
|
28
|
+
const internalHosts = options.internalHosts;
|
|
29
|
+
return {
|
|
30
|
+
name: "nimbus:external-links",
|
|
31
|
+
element: {
|
|
32
|
+
filter: ["a"],
|
|
33
|
+
visit(node) {
|
|
34
|
+
const href = node.properties?.href;
|
|
35
|
+
if (typeof href !== "string" || !EXTERNAL.test(href)) return;
|
|
36
|
+
if (internalHosts && internalHosts.length > 0) {
|
|
37
|
+
const host = hostOf(href);
|
|
38
|
+
if (host && internalHosts.includes(host)) return;
|
|
39
|
+
}
|
|
40
|
+
const children = [...node.children ?? []];
|
|
41
|
+
if (arrow !== null && !hasImgChild(node)) children.push({
|
|
42
|
+
type: "element",
|
|
43
|
+
tagName: "span",
|
|
44
|
+
properties: { className: [arrowClass] },
|
|
45
|
+
children: [{
|
|
46
|
+
type: "text",
|
|
47
|
+
value: arrow
|
|
48
|
+
}]
|
|
49
|
+
});
|
|
50
|
+
return {
|
|
51
|
+
type: "element",
|
|
52
|
+
tagName: "a",
|
|
53
|
+
properties: {
|
|
54
|
+
...node.properties,
|
|
55
|
+
target,
|
|
56
|
+
rel
|
|
57
|
+
},
|
|
58
|
+
children
|
|
59
|
+
};
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
};
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
//#endregion
|
|
66
|
+
//#region src/markdown/title-figure.ts
|
|
67
|
+
const WHITESPACE_ONLY = /^\s*$/;
|
|
68
|
+
function isStandaloneImageParagraph(node) {
|
|
69
|
+
let sawImage = false;
|
|
70
|
+
for (const child of node.children ?? []) {
|
|
71
|
+
if (child.type === "text") {
|
|
72
|
+
if (!WHITESPACE_ONLY.test(child.value)) return false;
|
|
73
|
+
continue;
|
|
74
|
+
}
|
|
75
|
+
if (isElement(child, "img")) {
|
|
76
|
+
sawImage = true;
|
|
77
|
+
continue;
|
|
78
|
+
}
|
|
79
|
+
return false;
|
|
80
|
+
}
|
|
81
|
+
return sawImage;
|
|
82
|
+
}
|
|
83
|
+
function titleFigure(options = {}) {
|
|
84
|
+
const figureProps = options.figureClass ? { className: [options.figureClass] } : {};
|
|
85
|
+
const figcaptionProps = options.figcaptionClass ? { className: [options.figcaptionClass] } : {};
|
|
86
|
+
function build(img) {
|
|
87
|
+
const title = `${img.properties?.title ?? ""}`;
|
|
88
|
+
if (!title) return img;
|
|
89
|
+
return {
|
|
90
|
+
type: "element",
|
|
91
|
+
tagName: "figure",
|
|
92
|
+
properties: { ...figureProps },
|
|
93
|
+
children: [{
|
|
94
|
+
type: "element",
|
|
95
|
+
tagName: "img",
|
|
96
|
+
properties: { ...img.properties },
|
|
97
|
+
children: []
|
|
98
|
+
}, {
|
|
99
|
+
type: "element",
|
|
100
|
+
tagName: "figcaption",
|
|
101
|
+
properties: { ...figcaptionProps },
|
|
102
|
+
children: [{
|
|
103
|
+
type: "text",
|
|
104
|
+
value: title
|
|
105
|
+
}]
|
|
106
|
+
}]
|
|
107
|
+
};
|
|
108
|
+
}
|
|
109
|
+
return {
|
|
110
|
+
name: "nimbus:title-figure",
|
|
111
|
+
element: {
|
|
112
|
+
filter: ["p"],
|
|
113
|
+
visit(node, ctx) {
|
|
114
|
+
if (!isStandaloneImageParagraph(node)) return;
|
|
115
|
+
const figures = (node.children ?? []).filter((c) => isElement(c, "img")).map(build);
|
|
116
|
+
if (figures.length === 0) return;
|
|
117
|
+
for (const fig of figures) ctx.insertBefore(node, fig);
|
|
118
|
+
ctx.removeNode(node);
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
};
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
//#endregion
|
|
125
|
+
export { EXTERNAL_LINK_ARROW, externalLinks, titleFigure };
|
|
126
|
+
//# sourceMappingURL=markdown.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"markdown.js","names":[],"sources":["../src/markdown/types.ts","../src/markdown/external-links.ts","../src/markdown/title-figure.ts"],"sourcesContent":["// Shared types for `nimbus-docs/markdown`. Sourced from `satteri` (a direct\n// dependency); `@types/hast` is not available here, so the node shapes these\n// plugins build are declared as minimal structural interfaces.\n\nimport type {\n HastPluginDefinition,\n HastVisitorContext,\n} from \"satteri\";\n\nexport type { HastPluginDefinition, HastVisitorContext };\n\nexport interface HastElement {\n type: \"element\";\n tagName: string;\n properties?: Record<string, unknown> | null;\n children?: HastChild[];\n}\n\nexport interface HastText {\n type: \"text\";\n value: string;\n}\n\nexport type HastChild = HastElement | HastText | { type: string; value?: string };\n\n/** Narrow a node to an element, optionally of a given tagName. */\nexport function isElement(\n node: { type: string; tagName?: string } | null | undefined,\n tagName?: string,\n): node is HastElement {\n return (\n !!node &&\n node.type === \"element\" &&\n (tagName === undefined || node.tagName === tagName)\n );\n}\n\n/** Normalise a hast `className` property to a string[]. */\nexport function classNames(node: HastElement): string[] {\n const cn = node.properties?.className;\n if (Array.isArray(cn)) return cn.map(String);\n if (typeof cn === \"string\") return cn.split(/\\s+/).filter(Boolean);\n return [];\n}\n","/**\n * Decorates external links (absolute `http(s)`/protocol-relative): sets\n * `target`/`rel` and appends an arrow affordance after the link text, unless\n * the link wraps an image. Defaults mirror the common `rehype-external-links`\n * setup, so `externalLinks()` is a drop-in.\n *\n * nimbus(config, { markdown: { hastPlugins: [externalLinks()] } })\n *\n * This runs before Sätteri's built-in heading-ids, whose text collection\n * re-includes the arrow and cannot be told to strip it. So an external link\n * inside a heading would pollute that heading's slug unless the consumer owns\n * heading slugging and strips `EXTERNAL_LINK_ARROW` before slugging.\n */\nimport type { HastChild, HastElement, HastPluginDefinition } from \"./types\";\nimport { isElement } from \"./types\";\n\n/** Default arrow affordance (space + U+2197). Exported so a consumer's\n * heading-slug plugin can strip it before computing ids. */\nexport const EXTERNAL_LINK_ARROW = \" ↗\";\n\nexport interface ExternalLinksOptions {\n /** `target` attribute set on external links. Default `\"_blank\"`. */\n target?: string;\n /** `rel` tokens set on external links. Default `[\"noopener\"]`. */\n rel?: string[];\n /**\n * Arrow affordance appended after the link text (inside the anchor), unless\n * the link wraps an image. `null` disables it. Default `\" ↗\"`.\n */\n arrow?: string | null;\n /** Class on the arrow `<span>`. Default `\"external-link\"`. */\n arrowClass?: string;\n /**\n * Hosts considered internal (left undecorated). Default: none — any absolute\n * `http(s)`/protocol-relative link is external (rehype-external-links default).\n */\n internalHosts?: string[];\n}\n\n// Absolute http(s) or protocol-relative `//host`.\nconst EXTERNAL = /^(?:https?:)?\\/\\//i;\n\nfunction hasImgChild(node: HastElement): boolean {\n return (node.children ?? []).some((c) => isElement(c, \"img\"));\n}\n\nfunction hostOf(href: string): string | null {\n try {\n return new URL(href.startsWith(\"//\") ? `https:${href}` : href).host;\n } catch {\n return null;\n }\n}\n\nexport function externalLinks(\n options: ExternalLinksOptions = {},\n): HastPluginDefinition {\n const target = options.target ?? \"_blank\";\n const rel = options.rel ?? [\"noopener\"];\n const arrow = options.arrow === undefined ? EXTERNAL_LINK_ARROW : options.arrow;\n const arrowClass = options.arrowClass ?? \"external-link\";\n const internalHosts = options.internalHosts;\n\n const plugin = {\n name: \"nimbus:external-links\",\n element: {\n filter: [\"a\"],\n visit(node: HastElement) {\n const href = node.properties?.href;\n if (typeof href !== \"string\" || !EXTERNAL.test(href)) return;\n if (internalHosts && internalHosts.length > 0) {\n const host = hostOf(href);\n if (host && internalHosts.includes(host)) return;\n }\n\n const children: HastChild[] = [...(node.children ?? [])];\n if (arrow !== null && !hasImgChild(node)) {\n children.push({\n type: \"element\",\n tagName: \"span\",\n properties: { className: [arrowClass] },\n children: [{ type: \"text\", value: arrow }],\n });\n }\n\n return {\n type: \"element\",\n tagName: \"a\",\n properties: { ...node.properties, target, rel },\n children,\n } as HastElement;\n },\n },\n };\n\n return plugin as unknown as HastPluginDefinition;\n}\n","/**\n * Turns a titled standalone image into a captioned figure:\n * <p><img title=\"cap\"></p> -> <figure><img …><figcaption>cap</figcaption></figure>\n * Untitled standalone images are unwrapped without a caption.\n *\n * nimbus(config, { markdown: { hastPlugins: [titleFigure()] } })\n *\n * `rehype-title-figure` only acts on root-level paragraphs; Sätteri's filtered\n * visitors expose no ancestors, so we instead require the paragraph to contain\n * only image(s) plus whitespace. A standalone-image paragraph nested in a\n * list/aside/blockquote is therefore also transformed; mixed text+image\n * paragraphs are left untouched.\n */\nimport type { HastChild, HastElement, HastPluginDefinition } from \"./types\";\nimport { isElement } from \"./types\";\n\nexport interface TitleFigureOptions {\n /** Class on the generated `<figure>`. Default: none. */\n figureClass?: string;\n /** Class on the generated `<figcaption>`. Default: none. */\n figcaptionClass?: string;\n}\n\nconst WHITESPACE_ONLY = /^\\s*$/;\n\nfunction isStandaloneImageParagraph(node: HastElement): boolean {\n let sawImage = false;\n for (const child of node.children ?? []) {\n if (child.type === \"text\") {\n if (!WHITESPACE_ONLY.test((child as { value: string }).value)) return false;\n continue;\n }\n if (isElement(child, \"img\")) {\n sawImage = true;\n continue;\n }\n return false;\n }\n return sawImage;\n}\n\nexport function titleFigure(\n options: TitleFigureOptions = {},\n): HastPluginDefinition {\n const figureProps = options.figureClass\n ? { className: [options.figureClass] }\n : {};\n const figcaptionProps = options.figcaptionClass\n ? { className: [options.figcaptionClass] }\n : {};\n\n function build(img: HastElement): HastElement {\n const title = `${img.properties?.title ?? \"\"}`;\n if (!title) return img;\n return {\n type: \"element\",\n tagName: \"figure\",\n properties: { ...figureProps },\n children: [\n { type: \"element\", tagName: \"img\", properties: { ...img.properties }, children: [] },\n {\n type: \"element\",\n tagName: \"figcaption\",\n properties: { ...figcaptionProps },\n children: [{ type: \"text\", value: title }],\n },\n ],\n };\n }\n\n const plugin = {\n name: \"nimbus:title-figure\",\n element: {\n filter: [\"p\"],\n visit(node: HastElement, ctx: { insertBefore(n: unknown, x: unknown): void; removeNode(n: unknown): void }) {\n if (!isStandaloneImageParagraph(node)) return;\n const figures = (node.children ?? [])\n .filter((c): c is HastElement => isElement(c, \"img\"))\n .map(build);\n if (figures.length === 0) return;\n for (const fig of figures as HastChild[]) ctx.insertBefore(node, fig);\n ctx.removeNode(node);\n },\n },\n };\n\n return plugin as unknown as HastPluginDefinition;\n}\n"],"mappings":";;AA0BA,SAAgB,UACd,MACA,SACqB;AACrB,QACE,CAAC,CAAC,QACF,KAAK,SAAS,cACb,YAAY,UAAa,KAAK,YAAY;;;;;;;ACf/C,MAAa,sBAAsB;AAsBnC,MAAM,WAAW;AAEjB,SAAS,YAAY,MAA4B;AAC/C,SAAQ,KAAK,YAAY,EAAE,EAAE,MAAM,MAAM,UAAU,GAAG,MAAM,CAAC;;AAG/D,SAAS,OAAO,MAA6B;AAC3C,KAAI;AACF,SAAO,IAAI,IAAI,KAAK,WAAW,KAAK,GAAG,SAAS,SAAS,KAAK,CAAC;SACzD;AACN,SAAO;;;AAIX,SAAgB,cACd,UAAgC,EAAE,EACZ;CACtB,MAAM,SAAS,QAAQ,UAAU;CACjC,MAAM,MAAM,QAAQ,OAAO,CAAC,WAAW;CACvC,MAAM,QAAQ,QAAQ,UAAU,SAAY,sBAAsB,QAAQ;CAC1E,MAAM,aAAa,QAAQ,cAAc;CACzC,MAAM,gBAAgB,QAAQ;AAkC9B,QAhCe;EACb,MAAM;EACN,SAAS;GACP,QAAQ,CAAC,IAAI;GACb,MAAM,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Aa;GAC9B,UAAU,CACR;IAAE,MAAM;IAAW,SAAS;IAAO,YAAY,EAAE,GAAG,IAAI,YAAY;IAAE,UAAU,EAAE;IAAE,EACpF;IACE,MAAM;IACN,SAAS;IACT,YAAY,EAAE,GAAG,iBAAiB;IAClC,UAAU,CAAC;KAAE,MAAM;KAAQ,OAAO;KAAO,CAAC;IAC3C,CACF;GACF;;AAmBH,QAhBe;EACb,MAAM;EACN,SAAS;GACP,QAAQ,CAAC,IAAI;GACb,MAAM,MAAmB,KAAmF;AAC1G,QAAI,CAAC,2BAA2B,KAAK,CAAE;IACvC,MAAM,WAAW,KAAK,YAAY,EAAE,EACjC,QAAQ,MAAwB,UAAU,GAAG,MAAM,CAAC,CACpD,IAAI,MAAM;AACb,QAAI,QAAQ,WAAW,EAAG;AAC1B,SAAK,MAAM,OAAO,QAAwB,KAAI,aAAa,MAAM,IAAI;AACrE,QAAI,WAAW,KAAK;;GAEvB;EACF"}
|
package/dist/schemas.d.ts
CHANGED
|
@@ -234,9 +234,9 @@ interface DefineSchemaOptions {
|
|
|
234
234
|
* }),
|
|
235
235
|
* };
|
|
236
236
|
*/
|
|
237
|
-
declare function defineSchema(factory: (ctx: astro_content0.SchemaContext) => DefineSchemaOptions): (ctx: astro_content0.SchemaContext) => z.ZodObject<Readonly<{
|
|
237
|
+
declare function defineSchema(factory: (ctx: astro_content0.SchemaContext) => DefineSchemaOptions): (ctx: astro_content0.SchemaContext) => z.ZodIntersection<z.ZodObject<any, z.core.$strip>, z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>> | z.ZodObject<Readonly<{
|
|
238
238
|
[k: string]: z.core.$ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
|
|
239
|
-
}>, z.core.$loose
|
|
239
|
+
}>, z.core.$loose>;
|
|
240
240
|
/** Default docs schema. Equivalent to `defineDocSchema()`. */
|
|
241
241
|
declare const docsSchema: z.ZodObject<{
|
|
242
242
|
[x: string]: never;
|
package/dist/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,CAAA,OAAA,mBAAA,CAAA,CAAA,IAAA,CAAA,iBAAA,uBAAA,CAAA,CAAA,SAAA,CAAA,QAAA;EAAA;;;cA8BvC,UAAA,EAAU,CAAA,CAAA,SAAA;EAAA;GAAoB,CAAA,CAAA,IAAA,CAAA,MAAA;;cAW9B,cAAA,EAAc,CAAA,CAAA,UAAA,CAAA,CAAA,CAAA,SAAA;;;;;;;;;;;;;;;;iBAeX,oBAAA,iBACE,MAAA,SAAe,CAAA,CAAE,UAAA,IAAc,MAAA,gBAAA,CAC/C,MAAA;EAAU,MAAA,GAAS,OAAA;AAAA,IAAc,CAAA,CAAA,SAAA,mBAAA,OAAA;;;;;;cAmBtB,iBAAA,EAAiB,CAAA,CAAA,SAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAGjB,qBAAA,EAAqB,CAAA,CAAA,SAAA;;;;cAU5B,mBAAA,EAAmB,CAAA,CAAA,SAAA;;;;;;;KAQb,aAAA,GAAgB,CAAA,CAAE,KAAA,QAAa,mBAAA;;cAG9B,gBAAA,EAAgB,CAAA,CAAA,SAAA"}
|
package/dist/types.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { a as Severity, i as RuleCode, n as Diagnostic, o as SeverityConfig, r as DiagnosticFix, t as AuthoringRuleCode } from "./diagnostic-CnxJwVpT.js";
|
|
2
|
+
import { HastPluginInput, MdastPluginInput } from "satteri";
|
|
2
3
|
|
|
3
4
|
//#region src/types.d.ts
|
|
4
5
|
/**
|
|
@@ -537,5 +538,5 @@ interface DocsPageProps extends BasePageProps {
|
|
|
537
538
|
prevNext: PrevNext;
|
|
538
539
|
}
|
|
539
540
|
//#endregion
|
|
540
|
-
export { type AuthoringRuleCode, BadgeVariant, BannerProps, BasePageProps, Breadcrumb, type Diagnostic, type DiagnosticFix, DocsPageProps, FeaturesConfig, HeadElement, NimbusConfig, PrevNext, PrevNextLink, PrevNextOverrides, ResolvedVersions, type RuleCode, SearchConfig, SearchProvider, SearchResult, type Severity, type SeverityConfig, SidebarBadge, SidebarConfig, SidebarConfigItem, SidebarExternalLinkItem, SidebarGroupItem, SidebarItem, SidebarLinkItem, SidebarSection, SidebarTransform, TOCItem, VersionAlternateRecord, VersionAlternatesTable, VersionPageRef, VersionStatus, VersionsConfig };
|
|
541
|
+
export { type AuthoringRuleCode, BadgeVariant, BannerProps, BasePageProps, Breadcrumb, type Diagnostic, type DiagnosticFix, DocsPageProps, FeaturesConfig, type HastPluginInput, HeadElement, type MdastPluginInput, NimbusConfig, PrevNext, PrevNextLink, PrevNextOverrides, ResolvedVersions, type RuleCode, SearchConfig, SearchProvider, SearchResult, type Severity, type SeverityConfig, SidebarBadge, SidebarConfig, SidebarConfigItem, SidebarExternalLinkItem, SidebarGroupItem, SidebarItem, SidebarLinkItem, SidebarSection, SidebarTransform, TOCItem, VersionAlternateRecord, VersionAlternatesTable, VersionPageRef, VersionStatus, VersionsConfig };
|
|
541
542
|
//# sourceMappingURL=types.d.ts.map
|
package/dist/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","names":[],"sources":["../src/types.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"types.d.ts","names":[],"sources":["../src/types.ts"],"mappings":";;;;;;;UAQiB,YAAA;EAAA;EAEf,IAAA;EACA,KAAA;EACA,WAAA;EACA,MAAA;EA0BW;EAxBX,SAAA;EAsDW;EApDX,MAAA;EAoDyB;EAlDzB,WAAA;EARA;;;;;EAcA,WAAA;EAAA;EAEA,cAAA;EAEA;EAAA,IAAA,GAAO,WAAA;EACP,OAAA,GAAU,aAAA;EAAA;;;;;;;;EASV,QAAA,GAAW,cAAA;EAoCI;;;;;EA9Bf,MAAA,GAAS,YAAA;EAiCT;;;;AASF;;;;;;;;;;;AAYA;;;;;;;;EA9BE,QAAA,GAAW,cAAA;AAAA;AAoD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AAA,CAAQ,WAAA;AAAA,UAMb,OAAA;EACf,KAAA;EACA,IAAA;EACA,IAAA;AAAA;AAAA,UAGe,UAAA;EACf,KAAA;EA+IS;;;;;EAzIT,IAAA;AAAA;AAAA,UAGe,YAAA;EACf,KAAA;EACA,IAAA;AAAA;AAAA,UAGe,QAAA;EACf,IAAA,GAAO,YAAA;EACP,IAAA,GAAO,YAAA;AAAA;AAAA,UAGQ,iBAAA;EACf,IAAA;IAAkB,IAAA;IAAe,KAAA;EAAA;EACjC,IAAA;IAAkB,IAAA;IAAe,KAAA;EAAA;AAAA;;;;;;;UAalB,WAAA;EACf,OAAA;EACA,IAAA;;EAEA,WAAA;wFAEE,EAAA;IAEA,IAAA;EAAA;AAAA;;;;;;;;;;;;;;;UAkBa,aAAA;EACf,KAAA;EACA,WAAA;;EAEA,IAAA,GAAO,WAAA;;EAEP,OAAA;;EAEA,WAAA;;;;;;;;EAQA,WAAA;;;;;;EAMA,WAAA,GAAc,IAAA;;;;;;EAMd,UAAA;;;;;EAKA,OAAA;AAAA;;;;;;;;;;;;;;;;;UAmBe,aAAA,SAAsB,aAAA;;;;;;;EAQrC,IAAA;;;;;EAKA,UAAA;;EAEA,KAAA;;EAIA,OAAA;;EAEA,MAAA,GAAS,WAAA;;;;;;;;EAUT,OAAA,EAAS,WAAA;;;;;;;EAOT,QAAA,EAAU,OAAA;;EAEV,WAAA,EAAa,UAAA;;EAEb,QAAA,EAAU,QAAA;AAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "nimbus-docs",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.14",
|
|
4
4
|
"private": false,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"description": "Docs, for humans and agents",
|
|
@@ -46,6 +46,10 @@
|
|
|
46
46
|
"types": "./dist/client.d.ts",
|
|
47
47
|
"import": "./dist/client.js"
|
|
48
48
|
},
|
|
49
|
+
"./markdown": {
|
|
50
|
+
"types": "./dist/markdown.d.ts",
|
|
51
|
+
"import": "./dist/markdown.js"
|
|
52
|
+
},
|
|
49
53
|
"./react": {
|
|
50
54
|
"types": "./dist/react.d.ts",
|
|
51
55
|
"import": "./dist/react.js"
|
|
@@ -60,6 +64,12 @@
|
|
|
60
64
|
"dist",
|
|
61
65
|
"src/components"
|
|
62
66
|
],
|
|
67
|
+
"scripts": {
|
|
68
|
+
"build": "tsdown",
|
|
69
|
+
"dev": "tsdown --watch",
|
|
70
|
+
"typecheck": "tsc --noEmit",
|
|
71
|
+
"test": "node --import tsx --test \"test/**/*.test.ts\""
|
|
72
|
+
},
|
|
63
73
|
"peerDependencies": {
|
|
64
74
|
"astro": ">=6.4.0",
|
|
65
75
|
"react": ">=19.0.0",
|
|
@@ -108,11 +118,5 @@
|
|
|
108
118
|
"tsdown": "^0.20.3",
|
|
109
119
|
"tsx": "^4.22.3",
|
|
110
120
|
"typescript": "^5.8.3"
|
|
111
|
-
},
|
|
112
|
-
"scripts": {
|
|
113
|
-
"build": "tsdown",
|
|
114
|
-
"dev": "tsdown --watch",
|
|
115
|
-
"typecheck": "tsc --noEmit",
|
|
116
|
-
"test": "node --import tsx --test \"test/**/*.test.ts\""
|
|
117
121
|
}
|
|
118
|
-
}
|
|
122
|
+
}
|