Files
supabase/apps/docs/lib/content-listings.zod.mjs
Nik RichersandNik Richers 0405b31b26 docs: re-publish Multigres Private Alpha docs — merge on October 2, 2026 (#50664)
## I have read the CONTRIBUTING.md file.

YES

## What kind of change does this PR introduce?

Re-add. Reapplies the Multigres Private Alpha docs section removed in
#50662, ready to merge once Sugu gives the go-ahead. Do not merge until
then.

Linear: MUL-1621 (follow-up to MUL-452).

## What is the current behavior?

Multigres docs section is down (per #50662): no overview/compatibility
pages, no sidebar entry, no features-table row, no "What you get" cards.

## What is the new behavior?

Exact reapply of #49020 (with Multigres marked Private Alpha): overview
guide at `/docs/guides/database/multigres`, compatibility stub, Database
sidebar entry, features-table row, "What you get" cards, and the
`ContentListings` optional-`href` support they rely on.

Base branch is the revert PR (#50662) so the diff here is legible now;
retarget to `master` once #50662 merges.

## Additional context

- `pnpm --filter docs exec vitest run lib/content-listings.test.ts` — 22
passed
- Blocked on Sugu's go-ahead — `do-not-merge` label applied

---------

Co-authored-by: Nik Richers <nik@validmind.ai>
2026-10-02 09:18:25 -07:00

56 lines
1.8 KiB
JavaScript

import { z } from 'zod'
const contentListingIconKindSchema = z.enum([
'braces',
'otlp',
'datadog',
'grafana',
'cloud',
'sentry',
'axiom',
'last9',
'server',
])
const contentListingIconChipSchema = z.object({
kind: contentListingIconKindSchema,
color: z.string().min(1),
bg: z.string().min(1),
})
export const contentListingIconSchema = z.union([z.string().min(1), contentListingIconChipSchema])
export const contentListingItemSchema = z.object({
title: z.string().min(1),
href: z.string().min(1).optional(),
description: z.string().min(1),
/** Shown under the title on grid cards, before the description. */
subtitle: z.string().min(1).optional(),
icon: contentListingIconSchema.optional(),
hasLightIcon: z.boolean().optional(),
badge: z.string().min(1).optional(),
/** Grid cards only. Defaults to inline (next to the title), matching existing usage. */
badgePosition: z.enum(['inline', 'below']).optional(),
/**
* When set, the item is omitted unless `isFeatureEnabled(feature)` is true.
* Use for SDK- or product-gated links (e.g. `sdk:dart`) inside a shared listing.
*/
feature: z.string().min(1).optional(),
})
export const contentListingGroupTypeSchema = z.enum(['list', 'grid'])
export const contentListingGridColumnsSchema = z.union([z.literal(2), z.literal(3), z.literal(4)])
export const contentListingHeadingLevelSchema = z.enum(['h2', 'h3', 'h4'])
export const contentListingGroupSchema = z.object({
id: z.string().min(1),
heading: z.string().min(1).optional(),
headingLevel: contentListingHeadingLevelSchema.optional(),
description: z.string().optional(),
type: contentListingGroupTypeSchema.optional(),
columns: contentListingGridColumnsSchema.optional(),
items: z.array(contentListingItemSchema).min(1),
})