Skip to content

Commit 37c4841

Browse files
committed
Merge branch 'main' into nick/fix-doc-api-stories-regressions
2 parents a24145b + 529c500 commit 37c4841

136 files changed

Lines changed: 4004 additions & 1218 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

CLAUDE.md

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,10 @@ tests/visual/ Visual regression tests (Playwright + R2 baselines)
6767
| Visual regression tests | `tests/visual/` (see its CLAUDE.md) |
6868
| Document API contract | `packages/document-api/src/contract/operation-definitions.ts` |
6969
| Adding a doc-api operation | See `packages/document-api/README.md` § "Adding a new operation" |
70+
| Theming (`createTheme()`) | `packages/superdoc/src/core/theme/create-theme.js` |
71+
| CSS variable defaults | `packages/superdoc/src/assets/styles/helpers/variables.css` |
72+
| Preset themes | `packages/superdoc/src/assets/styles/helpers/themes.css` |
73+
| Consumer-facing agent guide | `packages/superdoc/AGENTS.md` (ships with npm package) |
7074

7175
## Style Resolution Boundary
7276

@@ -193,12 +197,15 @@ Pixel-level before/after comparison for documents that failed layout comparison.
193197

194198
## Brand & Design System
195199

196-
Brand guidelines, voice, and design tokens live in `brand/`. Token values are defined in `packages/superdoc/src/assets/styles/tokens.css`.
200+
Brand guidelines, voice, and design tokens live in `brand/`.
201+
Token contract source is `packages/superdoc/src/assets/styles/helpers/variables.css` (`:root` defaults).
202+
Preset theme overrides are defined in `packages/superdoc/src/assets/styles/helpers/themes.css`.
197203

198204
**When creating or modifying UI components:**
199-
- Use `--sd-*` CSS custom properties — never hardcode hex values. See `tokens.css` for all available variables.
200-
- Tokens follow three tiers: primitive (`--sd-color-blue-500`) → semantic (`--sd-action-primary`) → component (`--sd-comment-bg`). Components reference semantic or component-level variables.
201-
- Expose component-specific variables as `--sd-{component}-*` so consumers can customize via CSS.
202-
- Document component CSS variables in `apps/docs/ui-components/` (Mintlify docs).
205+
- Use `--sd-*` CSS custom properties — never hardcode hex values.
206+
- Treat `variables.css` as the canonical token contract; add new tokens there.
207+
- Keep preset themes in `themes.css` (`.sd-theme-*`) and override only the tokens that need theme-specific values.
208+
- Tokens are organized by layers: primitive (`--sd-color-blue-500`) → UI/document tokens (`--sd-ui-*`, `--sd-comments-*`, etc.) → component usage.
209+
- Expose UI component-specific variables as `--sd-ui-{component}-*` so consumers can customize via CSS.
203210

204211
**When writing copy or content:** see `brand/brand-guidelines.md` for voice, tone, and the dual-register pattern (developer vs. leader). Product name is always **SuperDoc** (capital S, capital D).

apps/cli/scripts/export-sdk-contract.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,7 @@ function buildSdkContract() {
9898
if (p.flag && p.flag !== p.name) spec.flag = p.flag;
9999
if (p.required) spec.required = true;
100100
if (p.schema) spec.schema = p.schema;
101+
if (p.description) spec.description = p.description;
101102
if (p.agentVisible === false) spec.agentVisible = false;
102103
return spec;
103104
}),

0 commit comments

Comments
 (0)