Skip to content

Commit b2c13ab

Browse files
committed
fix(cli): improve api metadata
Signed-off-by: Cory Rylan <crylan@nvidia.com>
1 parent b5b71ca commit b2c13ab

3 files changed

Lines changed: 32 additions & 7 deletions

File tree

‎projects/cli/src/mcp/ui/index.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ export const examplesRenderResource: UIResource = {
2020
mimeType: MCP_UI_MIME_TYPE,
2121
resourceUri: 'ui://elements/example-preview',
2222
description:
23-
'Use this MCP app when an Elements example or template should be shown to the user. It renders validated nve-* HTML from examples_get or examples_render so users can inspect component layout, theme, and validation messages visually instead of reading markup only.',
23+
'Use this MCP app when an NVIDIA Elements UI example or template should be shown to the user. It renders validated nve-* HTML from examples_get or examples_render so users can inspect component layout, theme, and validation messages visually instead of reading markup only.',
2424
getHtml: ()=>examplesRenderHtml
2525
};
2626

‎projects/internals/tools/src/api/utils.ts‎

Lines changed: 30 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -114,25 +114,44 @@ function getAPIDescriptionMarkdown(api: PartialAPIResult) {
114114
returnwrapText(description).trim();
115115
}
116116

117-
functiongetAttributeExampleContext(attribute: Attribute){
118-
if(attribute.name==='nve-layout'){
119-
return/* html */`
117+
constNVE_LAYOUT_EXAMPLE=/* html */`
118+
<!-- import path layout styles -->
119+
<style>
120+
@import "@nvidia-elements/styles/layout.css";
121+
</style>
122+
123+
<!-- inline row layout -->
120124
<section nve-layout="row gap:sm">
121125
<div></div>
122126
<div></div>
123127
<div></div>
124128
</section>
129+
130+
<!-- stacked column layout -->
125131
<section nve-layout="column gap:sm">
126132
<div></div>
127133
<div></div>
128134
<div></div>
129135
</section>
136+
137+
<!-- 12 column grid layout with 6 column span -->
130138
<section nve-layout="grid gap:sm span-items:6">
131139
<div>columns 1-6</div>
132140
<div>columns 7-12</div>
141+
</section>
142+
143+
<!-- 12 column grid layout with variable column span -->
144+
<section nve-layout="grid gap:sm">
145+
<div nve-layout="span:4">columns 1-4</div>
146+
<div nve-layout="span:8">columns 5-12</div>
133147
</section>`;
134-
}elseif(attribute.name==='nve-text'){
135-
return/* html */`
148+
149+
constNVE_TEXT_EXAMPLE=/* html */`
150+
<!-- import path typography styles -->
151+
<style>
152+
@import "@nvidia-elements/styles/typography.css";
153+
</style>
154+
136155
<h1 nve-text="heading">heading</h1>
137156
<p nve-text="body">body</p>
138157
<p nve-text="label">label</p>
@@ -152,6 +171,12 @@ function getAttributeExampleContext(attribute: Attribute) {
152171
<p nve-text="start">start</p>
153172
<p nve-text="center">center</p>
154173
<p nve-text="end">end</p>`;
174+
175+
functiongetAttributeExampleContext(attribute: Attribute){
176+
if(attribute.name==='nve-layout'){
177+
returnNVE_LAYOUT_EXAMPLE;
178+
}elseif(attribute.name==='nve-text'){
179+
returnNVE_TEXT_EXAMPLE;
155180
}
156181
returnattribute.example??'';
157182
}

‎projects/site/src/docs/skills/index.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
{
33
title: 'Skills',
4-
description: 'Use NVIDIA Elements skills to give AI agents persistent project context, workflow guidance, and access to Elements UI authoring practices.',
4+
description: 'NVIDIA skills to give AI agents persistent project context, workflow guidance, and access to NVIDIA Elements UI authoring practices.',
55
layout: 'docs.11ty.js'
66
}
77
---

0 commit comments

Comments
 (0)