Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
203 commits
Select commit Hold shift + click to select a range
43a2261
fix(docs-next): extract legacy fragment header into template metadata
dancormier Apr 14, 2026
eb0e1ed
fix(docs-next): match legacy badges by text label, not URL domain
dancormier Apr 15, 2026
6237de4
fix(docs-next): only extract proper figma.com URLs for Figma buttons
dancormier Apr 15, 2026
061b188
fix(docs-next): fix duplicate descriptions and Figma URLs in legacy p…
dancormier Apr 15, 2026
d161862
feat(docs-next): remove stacks-docs build dependency
dancormier Apr 15, 2026
c29b7f8
chore: revert stacks-docs changes — out of scope for this branch
dancormier Apr 15, 2026
34effaf
chore(docs-next): remove unused legacy assets
dancormier Apr 15, 2026
8a590b5
feat(docs-next): convert 38 legacy fragment pages to mdsvex
dancormier Apr 15, 2026
327a70c
feat(docs-next): add ClassTable component + convert activity-indicato…
dancormier Apr 15, 2026
bdea068
fix(docs-next): rename ClassTable prop rows→classes and fix tabindex …
dancormier Apr 15, 2026
eb42fea
fix(docs-next): restore full activity-indicator examples with correct…
dancormier Apr 15, 2026
99fd9ac
fix(docs-next): remove IconShieldXSm — not in public stacks-icons pac…
dancormier Apr 15, 2026
ef9600a
fix(docs-next): remove remaining IconShieldXSm from variations block
dancormier Apr 15, 2026
48f51e5
feat(docs-next): add Example component and style example containers
dancormier Apr 15, 2026
fa2ad8b
fix(docs-next): use bc-black-225 for Example container border
dancormier Apr 15, 2026
d8851c0
fix(docs-next): restore original prose text under Default heading
dancormier Apr 15, 2026
83e3dc0
fix(docs-next): restore original Default code block verbatim
dancormier Apr 15, 2026
dc7cee6
feat(docs-next): restore heading anchor icons on all mdsvex pages
dancormier Apr 15, 2026
e607e53
feat(docs-next): replace copy-to-markdown button with copy-link icon …
dancormier Apr 15, 2026
4c6a600
fix(docs-next): use s-btn__link and smaller icon for breadcrumb copy …
dancormier Apr 15, 2026
c52c5cb
fix(docs-next): use Button component and atomic classes for breadcrum…
dancormier Apr 15, 2026
3eb575c
fix(docs-next): clean up breadcrumb layout with flex + gap
dancormier Apr 15, 2026
f799f34
fix(docs-next): add d-inline-flex to breadcrumb copy button
dancormier Apr 15, 2026
824eb90
fix(docs-next): restore IconShieldXSm from stacks-icons-legacy
dancormier Apr 15, 2026
a55ae8c
fix(docs-next): hide Contents sidebar on smaller viewports instead of…
dancormier Apr 15, 2026
9647616
fix(docs-next): allow .doc flex item to shrink to prevent horizontal …
dancormier Apr 15, 2026
a5f4e97
refactor(docs-next): replace all flex--item* classes with explicit ut…
dancormier Apr 15, 2026
231acdc
fix(docs-next): cap article at wmx12 to constrain content width
dancormier Apr 15, 2026
ccc281c
fix(docs-next): use wmx9 on .doc to cap content column at 960px
dancormier Apr 15, 2026
1d0d485
feat(docs-next): convert avatars page to mdsvex
dancormier Apr 15, 2026
ec2d864
fix(docs-next): limit activity avatar examples to 16px and 24px
dancormier Apr 15, 2026
91ae4b6
fix(docs-next): use explicit bg classes and team-avatar.png in Stack …
dancormier Apr 15, 2026
1c16b34
fix(docs-next): update Stack Internal table headings to Default color…
dancormier Apr 15, 2026
c3c88a1
fix(docs-next): allow overflow to be visible on Example container
dancormier Apr 15, 2026
52bc1ee
fix(docs-next): rename Stack Internal column heading Default color → …
dancormier Apr 15, 2026
dad1426
fix(docs-next): use Button link variant for Edit/Figma/Svelte action …
dancormier Apr 15, 2026
a6c137a
fix(docs-next): increase action button gap to g16 and apply fs-caption
dancormier Apr 15, 2026
b67153c
fix(docs-next): use Link component for Edit/Figma/Svelte action buttons
dancormier Apr 15, 2026
dfd4820
fix(docs-next): fix TOC active item highlighting accuracy
dancormier Apr 15, 2026
044e591
feat(docs-next): convert badges page to mdsvex
dancormier Apr 15, 2026
9c650bf
feat(docs-next): add collapsible Show all classes button to ClassTable
dancormier Apr 15, 2026
6f49c40
fix(docs-next): remove wmx5 from description, replace gs* with g* in …
dancormier Apr 15, 2026
096829d
feat(docs-next): refactor ClassTable with v-truncate-fade and flexibl…
dancormier Apr 15, 2026
04b40e7
fix(docs-next): make ClassTable expandable opt-in (default false)
dancormier Apr 15, 2026
551dc35
feat(docs-next): convert banners page to mdsvex
dancormier Apr 15, 2026
c13e710
feat(docs-next): extract BannerDemo component for banners interactive…
dancormier Apr 15, 2026
53afb43
feat(docs-next): scope Stack Sans Text to nav and branded UI, not bod…
dancormier Apr 15, 2026
64a8bb5
feat(docs-next): apply ff-stack-sans-headline to nav/TOC; orange → th…
dancormier Apr 15, 2026
6e049cc
fix(docs-next): add custom theme color palette so theme toggle works
dancormier Apr 15, 2026
667c158
fix(docs-next): add ps-relative to static banner examples to prevent …
dancormier Apr 15, 2026
adc3094
fix(docs-next): fix banners page structure and example content
dancormier Apr 15, 2026
61b7b8f
fix(docs-next): remove Last updated date from all docs pages
dancormier Apr 15, 2026
53caa57
fix(docs-next): only hide Last updated on /system pages; restore it o…
dancormier Apr 15, 2026
ef57cc0
Merge remote-tracking branch 'origin/main' into STACKS-843/legacy-hea…
dancormier Apr 15, 2026
6aa52cc
fix(docs-next): remove explicit font-weight from body — inherits from…
dancormier Apr 15, 2026
008ec16
feat(docs-next): Stack Sans Text for docs UI, system font inside exam…
dancormier Apr 15, 2026
5dc3326
fix(docs-next): body font-weight 300; reset to initial inside Example…
dancormier Apr 15, 2026
3beacbf
fix(docs-next): fix banner example layout and add bg-black-100 to dem…
dancormier Apr 15, 2026
6fbe24a
Revert "fix(docs-next): fix banner example layout and add bg-black-10…
dancormier Apr 15, 2026
3f5ddca
fix(docs-next): add is-pinned to static banner examples; bg-black-100…
dancormier Apr 15, 2026
e89b45f
feat(docs-next): use Notice Svelte component for banner examples
dancormier Apr 15, 2026
51c0216
Revert "feat(docs-next): use Notice Svelte component for banner examp…
dancormier Apr 15, 2026
5981092
feat(docs-next): create BannerExample component for banner static exa…
dancormier Apr 15, 2026
d09bb1f
fix(docs-next): default BannerDemo to warning + important + pinned
dancormier Apr 15, 2026
ff5c305
feat(docs-next): use Select and Checkbox Svelte components in BannerDemo
dancormier Apr 15, 2026
3d06a97
fix(docs-next): restore original JavaScript section on banners page
dancormier Apr 15, 2026
39eb77f
fix(docs-next): restore original table content in banners JavaScript …
dancormier Apr 15, 2026
74e1b48
feat(docs-next): convert bling page to mdsvex
dancormier Apr 15, 2026
26eae9c
fix(docs-next): restore bling example tables and add Figma link
dancormier Apr 15, 2026
0623401
feat(docs-next): add ExampleTable component; use in bling page
dancormier Apr 15, 2026
a39ea19
feat(docs-next): add Classes section, Sizes note, fix figma URL on bu…
dancormier Apr 15, 2026
64b108a
fix(docs-next): wrap Notice content in span to prevent flex layout is…
dancormier Apr 15, 2026
10a8f4d
feat(docs-next): wrap all button example tables in Example containers
dancormier Apr 15, 2026
2e54097
feat(docs-next): wrap ordering examples in Example; convert additiona…
dancormier Apr 15, 2026
fe0bdea
fix(docs-next): use native Google SVG colors in Social example
dancormier Apr 15, 2026
4125419
fix(docs-next): add mb16 to Sizes notice
dancormier Apr 15, 2026
82e129a
fix(docs-next): escape curly braces in code-blocks pre elements
dancormier Apr 15, 2026
b1fea7a
feat(docs-next): convert code-blocks page to mdsvex
dancormier Apr 15, 2026
29409ab
fix(docs-next): restore search button, add figma+code to code-blocks
dancormier Apr 15, 2026
8df63b9
fix(docs-next): fix search button styling and remove disabled state
dancormier Apr 15, 2026
46a16d0
fix(docs-next): use Link for search button; fix mb128 forehead on ima…
dancormier Apr 15, 2026
48011b7
fix(docs-next): add spacing around nav header and above navigation list
dancormier Apr 15, 2026
effce6d
feat(docs-next): add editor page with live StacksEditor demos
dancormier Apr 15, 2026
6e76fff
fix(docs-next): fc-brand on logo, restore pt16 px24 padding on nav he…
dancormier Apr 15, 2026
7d5d94d
fix(docs-next): double top padding on nav header to pt32
dancormier Apr 15, 2026
1265fe3
feat(docs-next): convert empty-states page to mdsvex
dancormier Apr 15, 2026
0000a40
refactor(docs-next): replace .doc X descendant selectors with individ…
dancormier Apr 15, 2026
560d6a7
fix(docs-next): keep --brand-color-* tokens, remove duplicate utility…
dancormier Apr 15, 2026
cb60920
fix(docs-next): add wmx4 p48 to all EmptyState examples
dancormier Apr 15, 2026
14605de
revert(docs-next): restore Search.svelte to its original state
dancormier Apr 15, 2026
ac10d5b
fix(docs-next): use actual markdown content for editor tables example
dancormier Apr 15, 2026
833a4fb
feat(docs-next): convert links page to mdsvex
dancormier Apr 15, 2026
ecc56e0
fix(docs-next): replace docs-card with s-card in anchor examples; mat…
dancormier Apr 15, 2026
c4087f8
fix(docs-next): add .docs-card CSS; use it (not s-card) in anchor exa…
dancormier Apr 15, 2026
f6805d7
fix(docs-next): remove docs-card from code blocks; keep in Examples only
dancormier Apr 15, 2026
0ce7023
docs(docs-next): add TODO for s-anchors styling within s-prose
dancormier Apr 15, 2026
9914328
refactor(docs-next): remove docs-p class
dancormier Apr 15, 2026
ffdb6d7
fix(docs-next): use HTML code tags in links description (rendered via…
dancormier Apr 15, 2026
7bc8f2c
feat(docs-next): convert loader page to mdsvex
dancormier Apr 15, 2026
17fe981
fix(docs-next): add parent column to ClassTable; use it in loader.md
dancormier Apr 15, 2026
b256bec
fix(docs-next): add parent column to avatars/banners/buttons class ta…
dancormier Apr 15, 2026
d3a4d91
fix(docs-next): constrain description/definition column to s-table--c…
dancormier Apr 15, 2026
adf9211
fix(docs-next): render N/A in fc-black-400 in ClassTable
dancormier Apr 15, 2026
a52c01c
fix(docs-next): N/A color fc-black-400 → fc-black-350
dancormier Apr 15, 2026
e40fe06
fix(docs-next): render class names as inline code in ClassTable columns
dancormier Apr 15, 2026
8447edd
feat(docs-next): convert menus page to mdsvex
dancormier Apr 15, 2026
d440dcb
fix(docs-next): restore navigation link in menus examples intro
dancormier Apr 15, 2026
79bf0e8
fix(docs-next): restore popover and card links in menus Basic section…
dancormier Apr 15, 2026
5cb514b
feat(docs-next): add docs-copy class to all p elements via rehype plugin
dancormier Apr 15, 2026
fc50f58
fix(docs-next): add color: inherit to .docs-copy a:not([class])
dancormier Apr 15, 2026
c6baa06
fix(docs-next): apply color: inherit to .docs-copy .docs-link
dancormier Apr 16, 2026
591d0ad
fix(docs-next): add ws1 to Basic examples, ws2 to all other menu exam…
dancormier Apr 16, 2026
16b800c
feat(docs-next): convert modals page to mdsvex
dancormier Apr 16, 2026
05404da
chore(docs-next): delete 53 unused legacy fragment files
dancormier Apr 16, 2026
90aa205
fix(docs-next): use ClassTable for all modals tables; fix examples se…
dancormier Apr 16, 2026
95d4d9b
fix(docs-next): propagate positioning to s-modal--dialog for inline e…
dancormier Apr 16, 2026
d2e9ae0
Revert "fix(docs-next): propagate positioning to s-modal--dialog for …
dancormier Apr 16, 2026
35b4ff7
fix(docs-next): inline modal examples — no p16, ps-absolute z-base mn…
dancormier Apr 16, 2026
d8e160c
fix(docs-next): use raw HTML for inline modal examples so ps-absolute…
dancormier Apr 16, 2026
068c2f9
fix(docs-next): make Attributes and Events tables expandable with cus…
dancormier Apr 16, 2026
7e36b3c
feat(docs-next): add JavaScript action link for pages with a JS section
dancormier Apr 16, 2026
7ac2e59
fix(docs-next): move JavaScript link before Figma/Svelte; add IconCode
dancormier Apr 16, 2026
57b6454
fix(docs-next): use IconCodeBox for JavaScript link
dancormier Apr 16, 2026
e02910d
fix(docs-next): fc-green-400 on JavaScript link icon
dancormier Apr 16, 2026
d6bcc43
fix(docs-next): modal events table always expanded (not collapsible)
dancormier Apr 16, 2026
73e587e
feat(docs-next): add ExampleTable to all 7 badge sections with correc…
dancormier Apr 16, 2026
9140cc9
fix(docs-next): wrap ExampleTable in Example containers; add N/A to d…
dancormier Apr 16, 2026
01d2026
fix(docs-next): convert banners JS section markdown tables to ClassTa…
dancormier Apr 16, 2026
71035c3
fix(docs-next): add margin-top to docs-h3/h4 so subsection headings h…
dancormier Apr 16, 2026
617c0c4
fix(docs-next): apply docs-copy to ol elements via rehype plugin
dancormier Apr 16, 2026
f27d319
feat(docs-next): make second editor example taller via docs-editor-ta…
dancormier Apr 16, 2026
564375a
fix(docs-next): Basic menu examples — ws2 on popover, add section hea…
dancormier Apr 16, 2026
2564657
fix(docs-next): use s-popover is-visible ps-relative for menu examples
dancormier Apr 16, 2026
13e9a3f
fix(docs-next): use s-popover is-visible ps-relative for icons and se…
dancormier Apr 16, 2026
1fd50a1
fix(docs-next): add 'With radio input' and 'With checkbox input' head…
dancormier Apr 16, 2026
f5ad6d5
fix(docs-next): use raw s-radio markup for radio groups example
dancormier Apr 16, 2026
b9c7892
fix(docs-next): widen radio groups example popover to ws3
dancormier Apr 16, 2026
dc83135
fix(docs-next): use ff-mono mb8 for example section labels
dancormier Apr 16, 2026
4779230
fix(docs-next): convert modals sizes markdown table to ClassTable
dancormier Apr 16, 2026
e0bd1ba
feat(docs-next): convert navigation page to mdsvex
dancormier Apr 16, 2026
748d90b
fix(docs-next): replace legacy HTML removal notice with Notice component
dancormier Apr 16, 2026
95b0454
fix(docs-next): update v2 docs link to v2.stackoverflow.design
dancormier Apr 16, 2026
fc8ff22
fix(docs-next): add removed-in-v3 components to side navigation
dancormier Apr 16, 2026
1a4f131
fix(docs-next): wrap removal notice text in p to isolate from flex la…
dancormier Apr 16, 2026
d732558
fix(docs-next): grow content area to push footer to bottom of page
dancormier Apr 16, 2026
a92447c
fix(docs-next): update v2 docs link to using-stacks page
dancormier Apr 16, 2026
1075f41
fix(docs-next): remove legacy flag from navigation so mdsvex page loads
dancormier Apr 16, 2026
63e018a
fix(docs-next): remove s-prose from doc wrapper to isolate component …
dancormier Apr 16, 2026
c086192
fix(docs-next): restore font-weight 700 on page h1 and section headings
dancormier Apr 16, 2026
7e11837
fix(docs-next): set docs-h2 font-size to fs-headline1
dancormier Apr 16, 2026
b9cfb93
fix(docs-next): set docs-h3 color to black-500
dancormier Apr 16, 2026
bf59ef0
fix(docs-next): double spacing between h2 and h3 sections
dancormier Apr 16, 2026
2e0fc4d
docs: add CLAUDE.md with component page conversion guide for stacks-d…
dancormier Apr 16, 2026
d6eca41
feat(docs-next): convert notices page to mdsvex
dancormier Apr 16, 2026
b012ac1
fix(docs-next): expand styling child links example to show each s-anc…
dancormier Apr 16, 2026
174990d
fix(docs-next): move s-anchors classes onto the anchor element in sty…
dancormier Apr 16, 2026
a51de25
fix(docs-next): pass s-anchors classes to Notice component, not the a…
dancormier Apr 16, 2026
9ff861f
fix(docs-next): add s-anchors classes to all Notice components except…
dancormier Apr 16, 2026
ad72148
fix(docs-next): set role=presentation on all Notice components in exa…
dancormier Apr 16, 2026
831e122
fix(docs-next): use role=presentation on inline modal examples
dancormier Apr 16, 2026
2890c81
feat(docs-next): convert pagination page to mdsvex
dancormier Apr 16, 2026
c5c8f89
fix(docs-next): set h2 section margin-top to var(--su48)
dancormier Apr 16, 2026
8240219
fix(docs-next): replace hardcoded px values with Stacks custom proper…
dancormier Apr 16, 2026
f0971b9
fix(docs-next): remove custom fw-* classes in favour of Stacks atomic…
dancormier Apr 16, 2026
a05b6f5
fix(docs-next): replace remaining hardcoded values with Stacks custom…
dancormier Apr 16, 2026
6e4d32e
fix(docs-next): define --fw-bold custom property and use it for stron…
dancormier Apr 16, 2026
b468fac
fix(docs-next): apply docs-copy class to page description below h1
dancormier Apr 16, 2026
fc0ae43
fix(docs-next): set pagination example to page 2 to show both nav arrows
dancormier Apr 16, 2026
14b1b03
fix(stacks-svelte): remove hardcoded pl24 from Pagination nav element
dancormier Apr 16, 2026
4108427
fix: add role prop to Pagination/PaginationController; use presentati…
dancormier Apr 16, 2026
5b0a2cc
revert: undo role prop changes to Pagination Svelte components
dancormier Apr 16, 2026
a1cb7d7
fix(docs-next): add mln24 to pagination example to offset component l…
dancormier Apr 16, 2026
415ffbe
feat(docs-next): convert popovers page to mdsvex
dancormier Apr 16, 2026
adeea8e
fix(docs-next): use EmptyState component in popover example to includ…
dancormier Apr 16, 2026
7c48561
fix(docs-next): remove trapFocus from dismissible popover example to …
dancormier Apr 16, 2026
7f1d174
fix(docs-next): add hover tooltip to combined tooltip+popover example
dancormier Apr 16, 2026
bddef2a
feat(docs-next): convert post-summary page to mdsvex
dancormier Apr 16, 2026
477a145
feat(docs-next): convert prose page to mdsvex
dancormier Apr 16, 2026
c1c4b00
fix(docs-next): fix 500 on prose page by moving HTML to dedicated com…
dancormier Apr 16, 2026
c4d5143
fix(docs-next): escape curly braces in ProseContent code block
dancormier Apr 16, 2026
6b59ff8
fix(docs-next): isolate s-prose examples from docs custom fonts
dancormier Apr 16, 2026
945deea
fix(docs-next): explicitly set font-family on s-prose in example cont…
dancormier Apr 16, 2026
23c5825
feat(docs-next): convert sidebar-widgets page to mdsvex
dancormier Apr 16, 2026
5d24bbe
fix(docs-next): add mb16 to notices in doc content
dancormier Apr 16, 2026
e3e9c39
feat(docs-next): convert tables page to mdsvex
dancormier Apr 16, 2026
1545b29
fix(docs-next): import sort arrow icons from stacks-icons-legacy
dancormier Apr 16, 2026
bfc8dd4
fix(docs-next): escape > in data-action attribute value in tables exa…
dancormier Apr 16, 2026
581d865
fix(docs-next): add missing tbody to cell widths table examples
dancormier Apr 16, 2026
e898776
fix(docs-next): remove Icon components from table template cells
dancormier Apr 16, 2026
886498e
fix(docs-next): pass widths/atomic as classes= prop to ClassTable
dancormier Apr 16, 2026
27c346b
fix(docs-next): clean up spurious debugging changes in tables page
dancormier Apr 16, 2026
8eb1038
fix(docs-next): use inline SVG for sort icons in tables examples
dancormier Apr 16, 2026
4e68576
feat(docs-next): implement live sorting in tables JS example
dancormier Apr 16, 2026
44a7f57
feat(docs-next): convert tags page to mdsvex
dancormier Apr 16, 2026
f644408
fix(docs-next): render tag sizes as a table with live examples
dancormier Apr 16, 2026
fcd36af
fix(docs-next): remove unnecessary s-anchors classes from tag sizes t…
dancormier Apr 16, 2026
96508c6
fix(docs-next): wrap tag sizes table in Example container
dancormier Apr 16, 2026
e0de827
fix(docs-next): rearrange tag sizes to match badges pattern
dancormier Apr 16, 2026
bc99e74
feat(docs-next): convert toggle-switch page to mdsvex
dancormier Apr 16, 2026
e51509d
fix(docs-next): adjust docs heading and section spacing
dancormier Apr 16, 2026
5e44301
fix(docs-next): use adjacent sibling selector for h3 after h2 spacing
dancormier Apr 16, 2026
8b02955
fix(docs-next): set docs-section margin-top to var(--su24)
dancormier Apr 16, 2026
177f18e
feat(docs-next): convert user-cards and vote pages to mdsvex
dancormier Apr 16, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions packages/stacks-docs-next/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,4 @@ Thumbs.db
vite.config.js.timestamp-*
vite.config.ts.timestamp-*

/static/docs
/static/legacy
/static/docs
165 changes: 165 additions & 0 deletions packages/stacks-docs-next/CLAUDE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,165 @@
# stacks-docs-next — Claude Instructions

This is the SvelteKit documentation site for the Stacks v3 design system. Pages are written in mdsvex (`.md` files with Svelte support).

## Converting a component page from legacy stacks-docs

Work from the source in `packages/stacks-docs/product/components/<name>.html` and its companion JSON at `packages/stacks-docs/_data/components/<name>.json`.

### Checklist

1. Create `src/docs/public/system/components/<name>.md`
2. Write frontmatter (see below)
3. Write the `<script lang="ts">` block — imports + ClassTableRow data arrays
4. Convert all tables to `ClassTable`
5. Convert all examples to `<Example>` with Svelte components where available
6. Convert all code blocks to fenced HTML (clean up legacy template syntax)
7. Preserve all prose text exactly — no rewording
8. Remove the `legacy:` key from the component's entry in `src/structure.yaml`
9. Ensure the component has an entry in `src/structure.yaml` under the correct section

### Frontmatter

```yaml
---
title: "Component Name"
description: "…" # from the original page
figma: "https://…" # if present
svelte: "https://…" # if present
js: true # only if the component has a JavaScript section
---
```

### Script block

```svelte
<script lang="ts">
import { ComponentName, SubComponent } from '@stackoverflow/stacks-svelte';
import { IconName } from '@stackoverflow/stacks-icons/icons';
import ClassTable from '$components/ClassTable.svelte';
import Example from '$components/Example.svelte';
import type { ClassTableRow } from '$components/ClassTable.svelte';

const classes: ClassTableRow[] = [ … ];
const attributes: ClassTableRow[] = [ … ]; // JS tables, one array per table
</script>
```

### ClassTable

Use `ClassTable` for every table — never raw markdown tables.

```svelte
<!-- Main classes table — usually expandable -->
<ClassTable {classes} expandable />

<!-- JS section tables — override column headings as appropriate -->
<ClassTable classes={attributes} headings={{ class: 'Attribute', parent: 'Applies to' }} />
<ClassTable classes={events} headings={{ class: 'Event', parent: 'Applies to' }} />
<ClassTable classes={helpers} headings={{ class: 'Function', parent: 'Applies to' }} />
```

**ClassTableRow fields:** `class`, `parent`, `modifies`, `output`, `description`, `define`, `responsive`.
- Only populate fields that are relevant — `ClassTable` auto-hides columns with no data.
- Use `'N/A'` (string) for explicitly empty parent/modifies — renders as muted text.
- The `headings` prop renames any column: `headings={{ class: 'Selector', description: 'Notes' }}`.

### Example component

All examples must be wrapped in `<Example>`.

```svelte
<Example>
<!-- single example -->
<ComponentName prop="value" />
</Example>

<!-- Multiple labelled sub-examples in one block -->
<Example>
<div class="d-flex g16 ai-start fw-wrap">
<div class="d-flex fd-column g8">
<span class="ff-mono mb8">Label</span>
<ComponentName />
</div>
<div class="d-flex fd-column g8">
<span class="ff-mono mb8">Another label</span>
<ComponentName variant="other" />
</div>
</div>
</Example>
```

Sub-example labels always use `class="ff-mono mb8"`.

### Svelte components vs raw HTML

- **Always prefer** Svelte components from `@stackoverflow/stacks-svelte` when one exists for the use case.
- **Fall back to raw HTML** only when the component's prop API can't express what the example needs (e.g. `ps-absolute` positioning on a container that the component applies internally).
- Check `packages/stacks-svelte/src/components/index.ts` for available components.
- Check story files (`*.stories.svelte`) for usage patterns.

### Code blocks

- Keep all HTML code blocks verbatim from the original source.
- Replace Razor/C# SVG syntax (`@Svg.IconName.With("class")` or `{% icon "Name", "class" %}`) with `<svg class="…" aria-hidden="true">…</svg>`.
- Use fenced code blocks with explicit language tags (` ```html `).

### Popover containers for menu/navigation examples

Use `s-popover is-visible ps-relative` as the example container for anything that would appear inside a popover in real use. Standard sizing is `ws2 p8` or `ws3 p8`.

### Removed-in-v3 components

Pages for components removed in Stacks v3 contain only a warning notice:

```md
---
title: "Component Name"
---

<script lang="ts">
import { Notice } from '@stackoverflow/stacks-svelte';
</script>

<Notice variant="warning">
<p>This component has been removed in Stacks v3. If using Stacks v2, please refer to the <a href="https://v2.stackoverflow.design/product/develop/using-stacks/">v2 documentation</a> for more information.</p>
</Notice>
```

### structure.yaml

Every component page must have an entry in `src/structure.yaml` under the correct section (Components, Forms, etc.) in **alphabetical order**.

After converting a page, remove the `legacy:` key from its entry so the new `.md` file is served:

```yaml
# Before
- title: "Navigation"
slug: "navigation"
legacy: product/components/navigation

# After
- title: "Navigation"
slug: "navigation"
```

## Available doc components

| Component | Location | Purpose |
|---|---|---|
| `ClassTable` | `$components/ClassTable.svelte` | CSS class / JS attribute tables |
| `ExampleTable` | `$components/ExampleTable.svelte` | Example \| Class \| Description tables |
| `Example` | `$components/Example.svelte` | Bordered example container |
| `BannerExample` | `$components/BannerExample.svelte` | Full-width banner examples |
| `BannerDemo` | `$components/BannerDemo.svelte` | Interactive banner demo |
| `StacksEditorDemo` | `$components/StacksEditorDemo.svelte` | Stacks editor demo |

## Rehype plugins (automatic — no action needed)

The `svelte.config.js` rehype pipeline automatically:
- Adds `docs-heading docs-h2/h3/h4` to markdown headings
- Adds `docs-copy` to `p` and `ol` elements
- Adds `docs-section` to `<section>` elements (via rehype-sectionize)
- Adds `docs-link` to `<a>` elements
- Adds syntax highlighting via `s-code-block` to fenced code blocks
- Extracts the TOC from headings and exposes it as `metadata.toc`
5 changes: 3 additions & 2 deletions packages/stacks-docs-next/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@
"type": "module",
"scripts": {
"dev": "vite dev",
"predev": "node scripts/copy-legacy.mjs",
"prebuild": "npm run build -w @stackoverflow/stacks && npm run build -w @stackoverflow/stacks-svelte && npm run build -w @stackoverflow/stacks-docs && node scripts/copy-legacy.mjs",
"prebuild": "npm run build -w @stackoverflow/stacks && npm run build -w @stackoverflow/stacks-svelte",
"build": "bash netlify-setup.sh && npm run init-private-content && vite build",
"preview": "vite preview",
"prepare": "svelte-kit sync || echo ''",
Expand All @@ -28,7 +27,9 @@
"@docsearch/js": "^4.3.2",
"@hbsnow/rehype-sectionize": "^1.0.7",
"@stackoverflow/stacks": "*",
"@stackoverflow/stacks-editor": "*",
"@stackoverflow/stacks-icons": "*",
"@stackoverflow/stacks-icons-legacy": "*",
"@stackoverflow/stacks-svelte": "*",
"@stefanprobst/rehype-extract-toc": "^3.0.0",
"better-auth": "^1.4.7",
Expand Down
40 changes: 0 additions & 40 deletions packages/stacks-docs-next/scripts/copy-legacy.mjs

This file was deleted.

Loading
Loading