···11import type { UserSession } from '#shared/schemas/userSession'
2233-/** @public */
43export function useAtproto() {
54 const { data: user, pending, clear } = useFetch<UserSession | null>('/api/auth/session')
65
-1
app/composables/useCachedFetch.ts
···2727 * )
2828 * }
2929 * ```
3030- * @public
3130 */
3231export function useCachedFetch(): CachedFetchFunction {
3332 // On client, return a function that just uses $fetch (no caching, not stale)
-1
app/composables/useCharts.ts
···286286 return versionDates[0] ?? null
287287}
288288289289-/** @public */
290289export function useCharts() {
291290 function resolveDateRange(
292291 downloadEvolutionOptions: PackageDownloadEvolutionOptions,
···33/**
44 * Composable for accessing translation status data from Lunaria.
55 * Provides information about translation progress for each locale.
66- * @public
76 */
87export function useI18nStatus() {
98 const { locale } = useI18n()
-1
app/composables/useInstallCommand.ts
···33/**
44 * Composable for generating install commands with support for
55 * multiple package managers, @types packages, and JSR.
66- * @public
76 */
87export function useInstallCommand(
98 packageName: MaybeRefOrGetter<string | null>,
-1
app/composables/useIsMobile.ts
···33 * Uses the same breakpoint as Tailwind's `md:` (768px).
44 *
55 * Returns `false` during SSR to avoid hydration mismatches.
66- * @public
76 */
87export function useIsMobile() {
98 return useMediaQuery('(max-width: 767px)')
-2
app/composables/useJsonLd.ts
···90909191/**
9292 * Inject JSON-LD script into head
9393- * @public
9493 */
9594export function setJsonLd(schema: JsonLdSchema | JsonLdSchema[]) {
9695 const schemas = Array.isArray(schema) ? schema : [schema]
···106105107106/**
108107 * Create WebSite schema with search action
109109- * @public
110108 */
111109export function createWebSiteSchema(options?: {
112110 name?: string
-1
app/composables/useModuleReplacement.ts
···11import type { ModuleReplacement } from 'module-replacements'
2233-/** @public */
43export function useModuleReplacement(packageName: MaybeRefOrGetter<string>) {
54 return useLazyFetch<ModuleReplacement | null>(() => `/api/replacements/${toValue(packageName)}`)
65}
-8
app/composables/useNpmRegistry.ts
···176176 }
177177}
178178179179-/** @public */
180179export function usePackage(
181180 name: MaybeRefOrGetter<string>,
182181 requestedVersion?: MaybeRefOrGetter<string | null>,
···226225 return resolved
227226}
228227229229-/** @public */
230228export function usePackageDownloads(
231229 name: MaybeRefOrGetter<string>,
232230 period: MaybeRefOrGetter<'last-day' | 'last-week' | 'last-month' | 'last-year'> = 'last-week',
···264262/**
265263 * Fetch download range data from npm API.
266264 * Exported for external use (e.g., in components).
267267- * @public
268265 */
269266export async function fetchNpmDownloadsRange(
270267 packageName: string,
···289286 size?: number
290287}
291288292292-/** @public */
293289export function useNpmSearch(
294290 query: MaybeRefOrGetter<string>,
295291 options: MaybeRefOrGetter<NpmSearchOptions> = {},
···505501/**
506502 * Fetch all packages for an npm organization
507503 * Returns search-result-like objects for compatibility with PackageList
508508- * @public
509504 */
510505export function useOrgPackages(orgName: MaybeRefOrGetter<string>) {
511506 const cachedFetch = useCachedFetch()
···758753/**
759754 * Composable to check for outdated dependencies.
760755 * Returns a reactive map of dependency name to outdated info.
761761- * @public
762756 */
763757export function useOutdatedDependencies(
764758 dependencies: MaybeRefOrGetter<Record<string, string> | undefined>,
···808802809803/**
810804 * Get tooltip text for an outdated dependency
811811- * @public
812805 */
813806export function getOutdatedTooltip(
814807 info: OutdatedDependencyInfo,
···833826834827/**
835828 * Get CSS class for a dependency version based on outdated status
836836- * @public
837829 */
838830export function getVersionClass(info: OutdatedDependencyInfo | undefined): string {
839831 if (!info) return 'text-fg-subtle'
-1
app/composables/usePackageAnalysis.ts
···14141515/**
1616 * Composable for fetching package analysis data (module format, types info, etc.)
1717- * @public
1817 */
1918export function usePackageAnalysis(
2019 packageName: MaybeRefOrGetter<string>,
-1
app/composables/usePackageComparison.ts
···2828/**
2929 * Composable for fetching and comparing multiple packages.
3030 *
3131- * @public
3231 */
3332export function usePackageComparison(packageNames: MaybeRefOrGetter<string[]>) {
3433 const packages = computed(() => toValue(packageNames))
-1
app/composables/usePackageListPreferences.ts
···1515 * Composable for managing package list display preferences
1616 * Persists to localStorage and provides reactive state
1717 *
1818- * @public
1918 */
2019export function usePackageListPreferences() {
2120 const {
···55 * `data-pm` attribute on `<html>`. The attribute enables CSS-based
66 * visibility of PM-specific content without JavaScript.
77 *
88- * @public
98 */
109export const useSelectedPackageManager = createSharedComposable(
1110 function useSelectedPackageManager() {
-1
app/composables/useSettings.ts
···5555/**
5656 * Composable for accessing just the relative dates setting.
5757 * Useful for components that only need to read this specific setting.
5858- * @public
5958 */
6059export function useRelativeDates() {
6160 const { settings } = useSettings()
-1
app/composables/useStructuredFilters.ts
···111111/**
112112 * Composable for structured filtering and sorting of package lists
113113 *
114114- * @public
115114 */
116115export function useStructuredFilters(options: UseStructuredFiltersOptions) {
117116 const { packages, initialFilters, initialSort } = options
-1
app/composables/useVirtualInfiniteScroll.ts
···3434 * Composable for handling infinite scroll with virtua's WindowVirtualizer
3535 * Detects when user scrolls near the end and triggers loading more items
3636 * Also tracks current visible page for URL persistence
3737- * @public
3837 */
3938export function useVirtualInfiniteScroll(options: UseVirtualInfiniteScrollOptions) {
4039 const {
-2
app/utils/charts.ts
···1010 return result
1111}
12121313-/** @public */
1413export function buildWeeklyEvolutionFromDaily(
1514 daily: Array<{ day: string; downloads: number }>,
1615): Array<{ weekStart: string; weekEnd: string; downloads: number }> {
···2322 })
2423}
25242626-/** @public */
2725export function addDays(date: Date, days: number): Date {
2826 const d = new Date(date)
2927 d.setUTCDate(d.getUTCDate() + days)
-2
app/utils/colors.ts
···4444 * Used to create light tints of accent colors for better visibility in light mode.
4545 * @param hex - The hex color to lighten (e.g., "#ff0000")
4646 * @param factor - Lighten factor from 0 to 1 (0.5 = 50% lighter, mixed with white)
4747- * @public
4847 */
4948export function lightenHex(hex: string, factor: number = 0.5): string {
5049 const rgb = hexToRgb(hex)
···5554 return rgbToHex(...lightened)
5655}
57565858-/** @public */
5957export function oklchToHex(color: string | undefined | null): string | undefined | null {
6058 if (color == null) return color
6159
···90909191/**
9292 * Generate the full install command for a package.
9393- * @public
9493 */
9594export function getInstallCommand(options: InstallCommandOptions): string {
9695 return getInstallCommandParts(options).join(' ')
···118117 isCreatePackage?: boolean
119118}
120119121121-/** @public */
122120export function getExecuteCommand(options: ExecuteCommandOptions): string {
123121 return getExecuteCommandParts(options).join(' ')
124122}
-1
app/utils/prehydrate.ts
···88 * to show the correct content before Vue hydration occurs.
99 *
1010 * Call this in app.vue or any page that needs early access to user preferences.
1111- * @public
1211 */
1312export function initPreferencesOnPrehydrate() {
1413 // Callback is stringified by Nuxt - external variables won't be available.
-1
app/utils/responsive.ts
···11-/** @public */
21export function isTouchDevice() {
32 if (import.meta.server) {
43 return false
-4
app/utils/run-command.ts
···2121 * - Name starts with "create-" (e.g., create-vite)
2222 * - Scoped name contains "/create-" (e.g., @vue/create-app)
2323 * - Has bin field but no main, module, or exports fields
2424- * @public
2524 */
2625export function isBinaryOnlyPackage(pkg: PackageMetadata): boolean {
2726 const baseName = pkg.name.startsWith('@') ? pkg.name.split('/')[1] : pkg.name
···41404241/**
4342 * Check if a package uses the create-* naming convention.
4444- * @public
4543 */
4644export function isCreatePackage(packageName: string): boolean {
4745 const baseName = packageName.startsWith('@') ? packageName.split('/')[1] : packageName
···6361/**
6462 * Extract executable command information from a package's bin field.
6563 * Handles both string format ("bin": "./cli.js") and object format ("bin": { "cmd": "./cli.js" }).
6666- * @public
6764 */
6865export function getExecutableInfo(
6966 packageName: string,
···150147151148/**
152149 * Generate the full run command for a package.
153153- * @public
154150 */
155151export function getRunCommand(options: RunCommandOptions): string {
156152 return getRunCommandParts(options).join(' ')
-2
app/utils/versions.ts
···5555 * Sort tags with 'latest' first, then alphabetically
5656 * @param tags - Array of tag names
5757 * @returns New sorted array
5858- * @public
5958 */
6059export function sortTags(tags: string[]): string[] {
6160 return [...tags].sort((a, b) => {
···112111 * Each unique version appears once with all its tags
113112 * @param distTags - Object mapping tag names to version strings
114113 * @returns Array of rows sorted by version (descending)
115115- * @public
116114 */
117115export function buildTaggedVersionRows(distTags: Record<string, string>): TaggedVersionRow[] {
118116 const versionToTags = buildVersionToTagsMap(distTags)
-24
cli/src/logger.ts
···5454export const logDebug = createDebug('npmx-connector')
55555656/**
5757- * Log a message (generic)
5858- * @public
5959- */
6060-export function logMessage(message: string): void {
6161- p.log.message(message)
6262-}
6363-6464-/**
6557 * Show the connection token in a nice box
6658 */
6759export function showToken(token: string, port: number, frontendUrl: string): void {
···7668 'Click to connect',
7769 )
7870}
7979-8080-/**
8181- * Show outro message
8282- * @public
8383- */
8484-export function showOutro(message: string): void {
8585- p.outro(message)
8686-}
8787-8888-/**
8989- * Create a spinner for async operations
9090- * @public
9191- */
9292-export function createSpinner() {
9393- return p.spinner()
9494-}
···81818282/**
8383 * Determine the language for syntax highlighting based on file path
8484- * @public
8584 */
8685export function getLanguageFromPath(filePath: string): string {
8786 const filename = filePath.split('/').pop() || ''
···263262/**
264263 * Highlight code using Shiki with line-by-line output for line highlighting.
265264 * Each line is wrapped in a span.line for individual line highlighting.
266266- * @public
267265 */
268266export async function highlightCode(
269267 code: string,
···55/**
66 * Generic error handler for Nitro routes
77 * Handles H3 errors, Valibot, and fallbacks in that order
88- * @public
98 */
109export function handleApiError(error: unknown, fallback: ErrorOptions): never {
1110 // If already a known Nuxt/H3 Error, re-throw
-1
server/utils/file-tree.ts
···6969/**
7070 * Fetch and convert file tree for a package version.
7171 * Returns the full response including tree and metadata.
7272- * @public
7372 */
7473export async function getPackageFileTree(
7574 packageName: string,
-2
server/utils/import-resolver.ts
···8899/**
1010 * Flatten a nested file tree into a set of file paths for quick lookups.
1111- * @public
1211 */
1312export function flattenFileTree(tree: PackageFileTree[]): FileSet {
1413 const files = new Set<string>()
···203202204203/**
205204 * Create a resolver function bound to a specific file tree and current file.
206206- * @public
207205 */
208206export function createImportResolver(
209207 files: FileSet,
-1
server/utils/install-size.ts
···3131 * No filesystem operations - safe for serverless environments.
3232 *
3333 * Dependencies are resolved for linux-x64-glibc as a representative platform.
3434- * @public
3534 */
3635export const calculateInstallSize = defineCachedFunction(
3736 async (name: string, version: string): Promise<InstallSizeResult> => {
-1
server/utils/jsr.ts
···1414 *
1515 * @param npmPackageName - The npm package name (e.g., "@hono/hono")
1616 * @returns JsrPackageInfo with existence status and metadata
1717- * @public
1817 */
1918export const fetchJsrPackageInfo = defineCachedFunction(
2019 async (npmPackageName: string): Promise<JsrPackageInfo> => {
-1
server/utils/npm.ts
···6464/**
6565 * Resolve multiple dependency constraints to their best matching versions.
6666 * Returns a map of package name to resolved version.
6767- * @public
6867 */
6968export async function resolveDependencyVersions(
7069 dependencies: Record<string, string>,
-1
server/utils/parse-package-params.ts
···11/**
22 * Parses Nitro router segments into packageName and an optional version
33 * Handles patterns: [pkg], [pkg, 'v', version], [@scope, pkg], [@scope, pkg, 'v', version]
44- * @public
54 */
65export function parsePackageParams(segments: string[]): {
76 rawPackageName: string
···2121 * Generate an SPDX license URL for the given license identifier.
2222 * Returns null if the license is not a valid SPDX identifier.
2323 * @see https://spdx.org/licenses/
2424- * @public
2524 */
2625export function getSpdxLicenseUrl(license: string | undefined): string | null {
2726 if (!license) return null
-1
uno-preset-rtl.ts
···58585959/**
6060 * CSS RTL support to detect, replace and warn wrong left/right usages.
6161- * @public
6261 */
6362export function presetRtl(): Preset {
6463 return {