Skip to content

An open source design system that's fully customizable and agent ready

TypeScript

docs(cli): recast em dashes in elevation, i18n, and getting-started prose (#4633)

Joey8e63bf3b6c3c
diff --git a/packages/cli/assets/docs/elevation.doc.mjs b/packages/cli/assets/docs/elevation.doc.mjs
index 3c66df8f4e..845e839cca 100644
--- a/packages/cli/assets/docs/elevation.doc.mjs
+++ b/packages/cli/assets/docs/elevation.doc.mjs
@@ -50,29 +50,29 @@ export const docs = {
rows: [
[
'none',
- 'The component is flat and embedded in the surface — it is part of the page, not layered above it. This is the default for every surface except ChatComposer.',
+ 'The component is flat and embedded in the surface; it is part of the page, not layered above it. This is the default for every surface except ChatComposer.',
'A Card in a grid, an inline Banner, a standard Button',
],
[
'low',
- 'The component is in the normal page flow but should read as distinct from the background. Use for emphasis or to separate the component from the surface behind it — the component still sits on the page, it is not floating over other content.',
+ 'The component is in the normal page flow but should read as distinct from the background. Use for emphasis or to separate the component from the surface behind it; the component still sits on the page, it is not floating over other content.',
'A raised Card that needs emphasis, a ChatComposer',
],
[
'med',
- 'The component sits over other content on the same page — it floats above nearby elements but not the whole screen.',
+ 'The component sits over other content on the same page; it floats above nearby elements but not the whole screen.',
'A Popover, a floating Banner, a floating action Button',
],
[
'high',
- 'The component is placed over the entire UI — it is the topmost layer and typically has a backdrop or takes focus from everything else.',
+ 'The component is placed over the entire UI; it is the topmost layer and typically has a backdrop or takes focus from everything else.',
'A modal Dialog, a full-screen overlay surface',
],
],
},
{
type: 'prose',
- text: 'If two surfaces overlap, the one on top takes the higher level. If a surface does not overlap anything, it is `none` or `low` — never `med` or `high`.',
+ text: 'If two surfaces overlap, the one on top takes the higher level. If a surface does not overlap anything, it is `none` or `low`; never `med` or `high`.',
},
],
},
@@ -86,13 +86,13 @@ export const docs = {
},
{
type: 'prose',
- text: 'Prop defaults preserve current appearance: every surface defaults to `none` except ChatComposer, which defaults to `low` to keep its raised look. Set `elevation="none"` to flatten it — the flat composer draws a border with the same rest / hover / focus treatment as a text input.',
+ text: 'Prop defaults preserve current appearance: every surface defaults to `none` except ChatComposer, which defaults to `low` to keep its raised look. Set `elevation="none"` to flatten it; the flat composer draws a border with the same rest / hover / focus treatment as a text input.',
},
{
type: 'code',
lang: 'tsx',
label: 'Raising a surface with the elevation prop',
- code: `// Flat by default — raise only when the surface needs to float.
+ code: `// Flat by default; raise only when the surface needs to float.
<Card elevation="low">Raised card</Card>
// A floating action button.
@@ -103,7 +103,7 @@ export const docs = {
},
{
type: 'prose',
- text: 'Always float — no prop: intrinsic overlays (Dialog, Popover, Tooltip, Toast, HoverCard, DropdownMenu, and the components that compose them) bake their elevation in and never expose the prop. Flow content (inputs, Text, layout) is never elevated; input fields use inset rings, which are a separate concept from elevation.',
+ text: 'Always float; no prop: intrinsic overlays (Dialog, Popover, Tooltip, Toast, HoverCard, DropdownMenu, and the components that compose them) bake their elevation in and never expose the prop. Flow content (inputs, Text, layout) is never elevated; input fields use inset rings, which are a separate concept from elevation.',
},
],
},
@@ -113,7 +113,7 @@ export const docs = {
content: [
{
type: 'prose',
- text: 'When building a custom surface, read elevation from the token scale rather than a hand-rolled shadow — the same tokens the elevation prop resolves to.',
+ text: 'When building a custom surface, read elevation from the token scale rather than a hand-rolled shadow; the same tokens the elevation prop resolves to.',
},
{
type: 'code',
@@ -152,8 +152,8 @@ const styles = stylex.create({
type: 'list',
style: 'dont',
items: [
- 'Hand-write a `box-shadow` in app code — set the `elevation` prop or read `shadowVars` instead.',
- 'Raise a surface that does not sit above other content — a non-overlapping surface is `none` or `low`, never `med` or `high`.',
+ 'Hand-write a `box-shadow` in app code; set the `elevation` prop or read `shadowVars` instead.',
+ 'Raise a surface that does not sit above other content; a non-overlapping surface is `none` or `low`, never `med` or `high`.',
'Stack multiple elevation levels on the same element.',
'Use elevation shadows for decorative borders. Use --color-border tokens instead.',
],
diff --git a/packages/cli/assets/docs/getting-started.doc.mjs b/packages/cli/assets/docs/getting-started.doc.mjs
index beebf385a7..90ed8ff05b 100644
--- a/packages/cli/assets/docs/getting-started.doc.mjs
+++ b/packages/cli/assets/docs/getting-started.doc.mjs
@@ -40,7 +40,7 @@ export const docs = {
},
{
type: 'prose',
- text: "Then run `astryx init` to install the AI agent cheat sheet (AGENTS.md/CLAUDE.md). It's non-interactive — no prompts — so it's safe for AI agents, CI, and scripts. Add `--all` for pointers to the theme and page-building workflows.",
+ text: "Then run `astryx init` to install the AI agent cheat sheet (AGENTS.md/CLAUDE.md). It's non-interactive; no prompts; so it's safe for AI agents, CI, and scripts. Add `--all` for pointers to the theme and page-building workflows.",
},
{
type: 'code',
diff --git a/packages/cli/assets/docs/internationalization.doc.mjs b/packages/cli/assets/docs/internationalization.doc.mjs
index 139bcb871d..3c7f2bb041 100644
--- a/packages/cli/assets/docs/internationalization.doc.mjs
+++ b/packages/cli/assets/docs/internationalization.doc.mjs
@@ -106,7 +106,7 @@ import fr from '@astryxdesign/core/locales/fr.json';
},
{
type: 'prose',
- text: 'Pass the optional `dir` prop to force a direction. This overrides the locale-derived default — useful for RTL layout testing under an English catalog, or to skip derivation when you already know the direction.',
+ text: 'Pass the optional `dir` prop to force a direction. This overrides the locale-derived default; useful for RTL layout testing under an English catalog, or to skip derivation when you already know the direction.',
},
{
type: 'code',
@@ -119,11 +119,11 @@ import fr from '@astryxdesign/core/locales/fr.json';
},
{
type: 'prose',
- text: "There's one more step: tell the browser about the direction too. Add a `dir` attribute to your page — usually on the `<html>` tag. This is what makes text align to the correct side, punctuation and mixed-language text flow correctly, and layouts mirror. The provider handles astryx components; the `dir` attribute handles everything else on the page.",
+ text: "There's one more step: tell the browser about the direction too. Add a `dir` attribute to your page; usually on the `<html>` tag. This is what makes text align to the correct side, punctuation and mixed-language text flow correctly, and layouts mirror. The provider handles astryx components; the `dir` attribute handles everything else on the page.",
},
{
type: 'prose',
- text: "Astryx doesn't set `dir` for you — you set it, alongside the same direction you pass to the provider. If your app is server-rendered (like Next.js), the `getLocaleDirection()` helper computes the direction from a locale so you can set it while the page renders:",
+ text: "Astryx doesn't set `dir` for you; you set it, alongside the same direction you pass to the provider. If your app is server-rendered (like Next.js), the `getLocaleDirection()` helper computes the direction from a locale so you can set it while the page renders:",
},
{
type: 'code',
@@ -146,7 +146,7 @@ export default function RootLayout({children, params}) {
},
{
type: 'prose',
- text: 'To make just one part of a left-to-right page right-to-left — say an Arabic quote or a comment thread — wrap that part in its own `<InternationalizationProvider dir="rtl">` and add `dir="rtl"` to the element around it. (One current limitation: pop-up overlays like menus and dialogs opened from inside that region aren\'t mirrored yet; that\'s coming in later RTL work.)',
+ text: 'To make just one part of a left-to-right page right-to-left; say an Arabic quote or a comment thread; wrap that part in its own `<InternationalizationProvider dir="rtl">` and add `dir="rtl"` to the element around it. (One current limitation: pop-up overlays like menus and dialogs opened from inside that region aren\'t mirrored yet; that\'s coming in later RTL work.)',
},
],
},
@@ -341,7 +341,7 @@ function SaveButton() {
},
{
type: 'prose',
- text: "Component authors read the ambient text direction with `useDirection()`. Reach for it only when CSS logical properties can't express the mirroring — swapping a directional icon, mirroring behavioral logic (slider math, keyboard nav), or direction-specific geometry. It returns `'ltr'` when called outside a provider, matching the silent-fallback behavior of `useTranslator`.",
+ text: "Component authors read the ambient text direction with `useDirection()`. Reach for it only when CSS logical properties can't express the mirroring; swapping a directional icon, mirroring behavioral logic (slider math, keyboard nav), or direction-specific geometry. It returns `'ltr'` when called outside a provider, matching the silent-fallback behavior of `useTranslator`.",
},
{
type: 'code',
@@ -362,7 +362,7 @@ function NextButton() {
},
{
type: 'prose',
- text: 'Crowdin is the preferred way to contribute — [join a language](https://crowdin.com/project/astryx), translate strings in the web UI, and your work syncs back to the repo without opening a PR. Direct PRs against `packages/core/locales/*.json` also work if you prefer that flow.',
+ text: 'Crowdin is the preferred way to contribute; [join a language](https://crowdin.com/project/astryx), translate strings in the web UI, and your work syncs back to the repo without opening a PR. Direct PRs against `packages/core/locales/*.json` also work if you prefer that flow.',
},
],
},