Skip to content

Commit d51677c

Browse files
authored
Merge pull request #247 from qualcomm/dev
dev
2 parents 19a77bb + 0c35430 commit d51677c

30 files changed

Lines changed: 278 additions & 66 deletions

File tree

packages/common/mdx-common/CHANGELOG.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,17 @@
11
# @qualcomm-ui/mdx-common Changelog
22

3+
## 2.2.0
4+
5+
Apr 23rd, 2026
6+
7+
### Features
8+
9+
- [mdx-common]: add NavBadge type and isNavBadge type guard ([1ef8453](https://github.com/qualcomm/qualcomm-ui/commit/1ef8453))
10+
11+
### Miscellaneous Chores
12+
13+
- **deps:** update dependencies [@qualcomm-ui/typedoc-common]
14+
315
## 2.1.3
416

517
Apr 23rd, 2026

packages/common/mdx-common/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@qualcomm-ui/mdx-common",
3-
"version": "2.1.3",
3+
"version": "2.2.0",
44
"description": "MDX common types and utilities",
55
"author": "Ryan Bower",
66
"license": "BSD-3-Clause-Clear",
@@ -38,15 +38,15 @@
3838
"@qualcomm-ui/cli": "catalog:",
3939
"@qualcomm-ui/esbuild": "catalog:",
4040
"@qualcomm-ui/tsconfig": "catalog:",
41-
"@qualcomm-ui/typedoc-common": "workspace:^1.0.5",
41+
"@qualcomm-ui/typedoc-common": "workspace:^1.0.6",
4242
"esbuild": "catalog:",
4343
"fuzzysort": "^3.0.1",
4444
"shx": "^0.4.0",
4545
"tsx": "catalog:",
4646
"vite": "catalog:"
4747
},
4848
"peerDependencies": {
49-
"@qualcomm-ui/typedoc-common": "workspace:^1.0.5",
49+
"@qualcomm-ui/typedoc-common": "workspace:^1.0.6",
5050
"fuzzysort": ">=3"
5151
}
5252
}

packages/common/mdx-common/src/docs-plugin.types.ts

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -207,6 +207,13 @@ export interface PageSection extends PageFrontmatter {
207207
export type PageMap = Record<string, PageSection>
208208

209209
export interface NavItem {
210+
/**
211+
* Badges rendered in the sideNav
212+
*
213+
* @since 2.2.0
214+
*/
215+
badges?: NavBadge[] | undefined
216+
210217
/**
211218
* The depth of the nav item. The root nav item starts at 1. Each child has n+1
212219
* depth, where n is the depth of the parent item.
@@ -527,3 +534,42 @@ export interface KnowledgePages {
527534
totalPages: number
528535
version: 1
529536
}
537+
538+
/**
539+
* @since 2.2.0
540+
*/
541+
export interface NavBadge {
542+
/**
543+
* If true, this badge won't be displayed in the side nav.
544+
*/
545+
hideFromNav?: boolean
546+
547+
/**
548+
* Unique key for the badge.
549+
*/
550+
id: string
551+
552+
/**
553+
* Text rendered inside the badge.
554+
*/
555+
label: string
556+
557+
/**
558+
* Optional HTML title attribute to show on hover.
559+
*/
560+
title?: string
561+
562+
/**
563+
* Optional URL that the badge links to. To link to a local path, start the pathname with `/`. To link to an external URL, start the url with `https://`
564+
*
565+
* @example
566+
* ```js
567+
* // local path
568+
* /guides/developer-preview
569+
*
570+
* // external
571+
* https://github.com/qualcomm/qualcomm-ui
572+
* ```
573+
*/
574+
url?: string
575+
}
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
// Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries.
2+
// SPDX-License-Identifier: BSD-3-Clause-Clear
3+
4+
import type {NavBadge} from "./docs-plugin.types"
5+
6+
/**
7+
* @since 2.2.0
8+
*/
9+
export function isNavBadge(obj: unknown): obj is NavBadge {
10+
return (
11+
typeof obj === "object" &&
12+
!!obj &&
13+
"label" in obj &&
14+
"id" in obj &&
15+
typeof obj.label === "string" &&
16+
(!("url" in obj) ||
17+
("url" in obj && (typeof obj.url === "string" || !obj.url)))
18+
)
19+
}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
export type * from "./demo-plugin.types"
22
export type * from "./docs-plugin.types"
3+
export * from "./docs-plugin.utils"
34
export * from "./id-service"
45
export * from "./search"
56
export * from "./shiki-themes"

packages/common/mdx-vite/CHANGELOG.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,17 @@
11
# @qualcomm-ui/mdx-vite Changelog
22

3+
## 3.5.0
4+
5+
Apr 23rd, 2026
6+
7+
### Features
8+
9+
- [mdx-vite]: extract badges from frontmatter in nav builder ([58ecfcd](https://github.com/qualcomm/qualcomm-ui/commit/58ecfcd))
10+
11+
### Miscellaneous Chores
12+
13+
- **deps:** update dependencies [@qualcomm-ui/mdx-common, @qualcomm-ui/typedoc-common]
14+
315
## 3.4.0
416

517
Apr 23rd, 2026

packages/common/mdx-vite/package.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@qualcomm-ui/mdx-vite",
3-
"version": "3.4.0",
3+
"version": "3.5.0",
44
"description": "Vite documentation plugin for applications that use MDX",
55
"author": "Ryan Bower",
66
"license": "BSD-3-Clause-Clear",
@@ -90,11 +90,11 @@
9090
"devDependencies": {
9191
"@qualcomm-ui/cli": "catalog:",
9292
"@qualcomm-ui/esbuild": "catalog:",
93-
"@qualcomm-ui/mdx-common": "workspace:^2.1.3",
93+
"@qualcomm-ui/mdx-common": "workspace:^2.2.0",
9494
"@qualcomm-ui/utils": "workspace:^1.2.3",
9595
"@qualcomm-ui/tsconfig": "catalog:",
9696
"@qualcomm-ui/tailwind-plugin": "workspace:^1.7.0",
97-
"@qualcomm-ui/typedoc-common": "workspace:^1.0.5",
97+
"@qualcomm-ui/typedoc-common": "workspace:^1.0.6",
9898
"@types/hast": "^3.0.4",
9999
"@types/lodash-es": "catalog:",
100100
"@types/mdast": "^4.0.4",
@@ -125,8 +125,8 @@
125125
"zod": "^4.1.13"
126126
},
127127
"peerDependencies": {
128-
"@qualcomm-ui/mdx-common": "workspace:^2.1.3",
129-
"@qualcomm-ui/typedoc-common": "workspace:^1.0.5",
128+
"@qualcomm-ui/mdx-common": "workspace:^2.2.0",
129+
"@qualcomm-ui/typedoc-common": "workspace:^1.0.6",
130130
"@qualcomm-ui/utils": "workspace:^1.2.3",
131131
"lodash-es": ">=4.17.21 <5",
132132
"minimatch": ">=10",

packages/common/mdx-vite/src/docs-plugin/nav-builder/nav-builder.ts

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,12 @@
44
import {sortBy} from "lodash-es"
55
import {v4 as uuidv4} from "uuid"
66

7-
import type {
8-
NavItem,
9-
PageFrontmatter,
10-
PageSection,
7+
import {
8+
isNavBadge,
9+
type NavBadge,
10+
type NavItem,
11+
type PageFrontmatter,
12+
type PageSection,
1113
} from "@qualcomm-ui/mdx-common"
1214
import {capitalCase} from "@qualcomm-ui/utils/change-case"
1315
import {defined} from "@qualcomm-ui/utils/guard"
@@ -175,6 +177,7 @@ export class NavBuilder {
175177
) ?? {}
176178

177179
this.flatNavItems.push({
180+
badges: isPage ? this.extractBadges(pageFrontmatter) : undefined,
178181
depth,
179182
expanded: routeMeta?.expanded || false,
180183
group: isPage
@@ -388,4 +391,16 @@ export class NavBuilder {
388391

389392
return results
390393
}
394+
395+
private extractBadges(
396+
pageFrontmatter: Partial<PageFrontmatter>,
397+
): NavBadge[] | undefined {
398+
const badges = (
399+
pageFrontmatter as Partial<PageFrontmatter> & Record<string, unknown>
400+
).badges
401+
if (badges && typeof badges === "object" && Array.isArray(badges)) {
402+
return badges.filter((badge) => isNavBadge(badge) && !badge.hideFromNav)
403+
}
404+
return undefined
405+
}
391406
}

packages/common/qds-core/CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
# @qualcomm-ui/qds-core Changelog
22

3+
## 1.26.1
4+
5+
Apr 23rd, 2026
6+
7+
### Bug Fixes
8+
9+
- [qds-core]: remove hardcoded cursor default from badge component ([f7c0c0e](https://github.com/qualcomm/qualcomm-ui/commit/f7c0c0e))
10+
311
## 1.26.0
412

513
Apr 23rd, 2026

packages/common/qds-core/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@qualcomm-ui/qds-core",
3-
"version": "1.26.0",
3+
"version": "1.26.1",
44
"description": "qds core components",
55
"author": "Ryan Bower",
66
"license": "BSD-3-Clause-Clear",

0 commit comments

Comments
 (0)