@mintlify/common 1.0.1287 → 1.0.1288
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,3 +1,3 @@
|
|
|
1
1
|
/** Label for a link that follows block content when nothing names its target. */
|
|
2
2
|
export declare const BLOCK_LINK_LABEL = "Open";
|
|
3
|
-
export declare const FIRST_PARTY_MARKDOWN_COMPONENT_SOURCE = "\nexport const Note = ({ children }) => <blockquote>{\"[!NOTE]\\n\\n\"}{children}</blockquote>;\n\nexport const Info = ({ children }) => <blockquote>{\"[!NOTE]\\n\\n\"}{children}</blockquote>;\n\nexport const Tip = ({ children }) => <blockquote>{\"[!TIP]\\n\\n\"}{children}</blockquote>;\n\nexport const Check = ({ children }) => <blockquote>{\"[!TIP]\\n\\n\"}{children}</blockquote>;\n\nexport const Warning = ({ children }) => <blockquote>{\"[!WARNING]\\n\\n\"}{children}</blockquote>;\n\nexport const Danger = ({ children }) => <blockquote>{\"[!CAUTION]\\n\\n\"}{children}</blockquote>;\n\nexport const Card = ({ title = \"\", href = \"\", description = \"\", children }) => title === \"\" ? <blockquote>{(children ?? \"\") === \"\" ? description : children}{href === \"\" ? \"\" : <>{\"\\n\\n\"}<a href={href}>Open</a></>}</blockquote> : <blockquote><strong><a href={href}>{title}</a></strong>{\"\\n\\n\"}{(children ?? \"\") === \"\" ? description : children}</blockquote>;\n\nexport const Accordion = ({ title = \"\", description = \"\", children }) => <blockquote>{title === \"\" ? \"\" : <><strong>{title}</strong>{\"\\n\\n\"}</>}{description === \"\" ? \"\" : <>{description}{\"\\n\\n\"}</>}{children}</blockquote>;\n\nexport const ParamField = ({ path = \"\", body = \"\", query = \"\", header = \"\", type = \"\", required = false, deprecated = false, default: defaultValue = \"\", children }) => (path || body || query || header) === \"\" ? <>{children}</> : <>{\"**\" + (path || body || query || header) + \"**\"}{type === \"\" ? \"\" : \" \\`\" + type + \"\\`\"}{required ? \" *required*\" : \"\"}{deprecated ? \" *deprecated*\" : \"\"}{defaultValue === \"\" ? \"\" : \" (default: \" + defaultValue + \")\"}{\"\\n\\n\"}{children}</>;\n\nexport const ResponseField = ({ name = \"\", type = \"\", required = false, deprecated = false, default: defaultValue = \"\", children }) => name === \"\" ? <>{children}</> : <>{\"**\" + name + \"**\"}{type === \"\" ? \"\" : \" \\`\" + type + \"\\`\"}{required ? \" *required*\" : \"\"}{deprecated ? \" *deprecated*\" : \"\"}{defaultValue === \"\" ? \"\" : \" (default: \" + defaultValue + \")\"}{\"\\n\\n\"}{children}</>;\n\nexport const Steps = ({ children }) => <>{children}</>;\n\nexport const Step = ({ title = \"\", stepNumber = 1, titleSize = \"p\", children }) => <>{\"\\n\\n\"}{titleSize === \"h2\" ? \"## \" : titleSize === \"h3\" ? \"### \" : titleSize === \"h4\" ? \"#### \" : \"**\"}{title === \"\" ? \"Step \" + stepNumber : stepNumber + \". \" + title}{titleSize === \"h2\" || titleSize === \"h3\" || titleSize === \"h4\" ? \"\" : \"**\"}{\"\\n\\n\"}{children}{\"\\n\\n\"}</>;\n\nexport const Tooltip = ({ tip = \"\", children }) => tip === \"\" ? <>{children}</> : <>{children}{\" (\" + tip + \")\"}</>;\n";
|
|
3
|
+
export declare const FIRST_PARTY_MARKDOWN_COMPONENT_SOURCE = "\nexport const Note = ({ children }) => <blockquote>{\"[!NOTE]\\n\\n\"}{children}</blockquote>;\n\nexport const Info = ({ children }) => <blockquote>{\"[!NOTE]\\n\\n\"}{children}</blockquote>;\n\nexport const Tip = ({ children }) => <blockquote>{\"[!TIP]\\n\\n\"}{children}</blockquote>;\n\nexport const Check = ({ children }) => <blockquote>{\"[!TIP]\\n\\n\"}{children}</blockquote>;\n\nexport const Warning = ({ children }) => <blockquote>{\"[!WARNING]\\n\\n\"}{children}</blockquote>;\n\nexport const Danger = ({ children }) => <blockquote>{\"[!CAUTION]\\n\\n\"}{children}</blockquote>;\n\nexport const Card = ({ title = \"\", href = \"\", description = \"\", children }) => title === \"\" ? <blockquote>{(children ?? \"\") === \"\" ? description : children}{href === \"\" ? \"\" : <>{\"\\n\\n\"}<a href={href}>Open</a></>}</blockquote> : <blockquote><strong><a href={href}>{title}</a></strong>{\"\\n\\n\"}{(children ?? \"\") === \"\" ? description : children}</blockquote>;\n\nexport const Accordion = ({ title = \"\", description = \"\", children }) => <blockquote>{title === \"\" ? \"\" : <><strong>{title}</strong>{\"\\n\\n\"}</>}{description === \"\" ? \"\" : <>{description}{\"\\n\\n\"}</>}{children}</blockquote>;\n\nexport const ParamField = ({ path = \"\", body = \"\", query = \"\", header = \"\", type = \"\", required = false, deprecated = false, default: defaultValue = \"\", children }) => (path || body || query || header) === \"\" ? <>{children}</> : <>{\"**\" + (path || body || query || header) + \"**\"}{type === \"\" ? \"\" : \" \\`\" + type + \"\\`\"}{required ? \" *required*\" : \"\"}{deprecated ? \" *deprecated*\" : \"\"}{defaultValue === \"\" ? \"\" : \" (default: \" + defaultValue + \")\"}{\"\\n\\n\"}{children}</>;\n\nexport const ResponseField = ({ name = \"\", type = \"\", required = false, deprecated = false, default: defaultValue = \"\", children }) => name === \"\" ? <>{children}</> : <>{\"**\" + name + \"**\"}{type === \"\" ? \"\" : \" \\`\" + type + \"\\`\"}{required ? \" *required*\" : \"\"}{deprecated ? \" *deprecated*\" : \"\"}{defaultValue === \"\" ? \"\" : \" (default: \" + defaultValue + \")\"}{\"\\n\\n\"}{children}</>;\n\nexport const Steps = ({ children }) => <>{children}</>;\n\nexport const Step = ({ title = \"\", stepNumber = 1, titleSize = \"p\", children }) => <>{\"\\n\\n\"}{titleSize === \"h2\" ? \"## \" : titleSize === \"h3\" ? \"### \" : titleSize === \"h4\" ? \"#### \" : \"**\"}{title === \"\" ? \"Step \" + stepNumber : stepNumber + \". \" + title}{titleSize === \"h2\" || titleSize === \"h3\" || titleSize === \"h4\" ? \"\" : \"**\"}{\"\\n\\n\"}{children}{\"\\n\\n\"}</>;\n\nexport const Tooltip = ({ tip = \"\", children }) => tip === \"\" ? <>{children}</> : <>{children}{\" (\" + tip + \")\"}</>;\n\nexport const Frame = ({ caption = \"\", children }) => caption === \"\" ? <>{children}</> : <>{children}{\"\\n\\n\"}{caption}</>;\n\nexport const Update = ({ label = \"\", description = \"\", children }) => <>{label === \"\" ? \"\" : <><strong>{label}</strong>{\"\\n\\n\"}</>}{description === \"\" ? \"\" : <>{description}{\"\\n\\n\"}</>}{children}</>;\n\nexport const Tile = ({ href = \"\", title = \"\", \"aria-label\": ariaLabel = \"\", description = \"\", children }) => <>{(title || ariaLabel) === \"\" ? \"\" : href === \"\" ? <><strong>{title || ariaLabel}</strong>{\"\\n\\n\"}</> : <><a href={href}>{title || ariaLabel}</a>{\"\\n\\n\"}</>}{description === \"\" ? \"\" : <>{description}{\"\\n\\n\"}</>}{children}</>;\n\nexport const Prompt = ({ description = \"\", children }) => <>{description === \"\" ? \"\" : <>{description}{\"\\n\\n\"}</>}{children}</>;\n\nexport const Color_Item = ({ name = \"\", value = \"\" }) => <>{name === \"\" ? \"\" : \"**\" + name + \"** \"}{typeof value === \"string\" ? \"\\`\" + value + \"\\`\" : \"\\`\" + value.light + \"\\` (light), \\`\" + value.dark + \"\\` (dark)\"}{\"\\n\\n\"}</>;\n";
|
|
@@ -26,4 +26,14 @@ export const Steps = ({ children }) => <>{children}</>;
|
|
|
26
26
|
export const Step = ({ title = "", stepNumber = 1, titleSize = "p", children }) => <>{"\\n\\n"}{titleSize === "h2" ? "## " : titleSize === "h3" ? "### " : titleSize === "h4" ? "#### " : "**"}{title === "" ? "Step " + stepNumber : stepNumber + ". " + title}{titleSize === "h2" || titleSize === "h3" || titleSize === "h4" ? "" : "**"}{"\\n\\n"}{children}{"\\n\\n"}</>;
|
|
27
27
|
|
|
28
28
|
export const Tooltip = ({ tip = "", children }) => tip === "" ? <>{children}</> : <>{children}{" (" + tip + ")"}</>;
|
|
29
|
+
|
|
30
|
+
export const Frame = ({ caption = "", children }) => caption === "" ? <>{children}</> : <>{children}{"\\n\\n"}{caption}</>;
|
|
31
|
+
|
|
32
|
+
export const Update = ({ label = "", description = "", children }) => <>{label === "" ? "" : <><strong>{label}</strong>{"\\n\\n"}</>}{description === "" ? "" : <>{description}{"\\n\\n"}</>}{children}</>;
|
|
33
|
+
|
|
34
|
+
export const Tile = ({ href = "", title = "", "aria-label": ariaLabel = "", description = "", children }) => <>{(title || ariaLabel) === "" ? "" : href === "" ? <><strong>{title || ariaLabel}</strong>{"\\n\\n"}</> : <><a href={href}>{title || ariaLabel}</a>{"\\n\\n"}</>}{description === "" ? "" : <>{description}{"\\n\\n"}</>}{children}</>;
|
|
35
|
+
|
|
36
|
+
export const Prompt = ({ description = "", children }) => <>{description === "" ? "" : <>{description}{"\\n\\n"}</>}{children}</>;
|
|
37
|
+
|
|
38
|
+
export const Color_Item = ({ name = "", value = "" }) => <>{name === "" ? "" : "**" + name + "** "}{typeof value === "string" ? "\\\`" + value + "\\\`" : "\\\`" + value.light + "\\\` (light), \\\`" + value.dark + "\\\` (dark)"}{"\\n\\n"}</>;
|
|
29
39
|
`;
|
|
@@ -110,7 +110,10 @@ let firstPartyDefsCache;
|
|
|
110
110
|
export function getFirstPartyComponentDefs() {
|
|
111
111
|
if (firstPartyDefsCache === undefined) {
|
|
112
112
|
const tree = getJsxEsmTree(FIRST_PARTY_MARKDOWN_COMPONENT_SOURCE, 'first-party-markdown.jsx');
|
|
113
|
-
|
|
113
|
+
const declared = collectContextFromTree(tree).defs;
|
|
114
|
+
// Member components like `Color.Item` can't be declared under their own name, so
|
|
115
|
+
// `Color_Item` stands in for `Color.Item`
|
|
116
|
+
firstPartyDefsCache = new Map([...declared].map(([name, def]) => [name.replaceAll('_', '.'), def]));
|
|
114
117
|
}
|
|
115
118
|
return firstPartyDefsCache;
|
|
116
119
|
}
|