Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
8 changes: 4 additions & 4 deletions packages/cli/assets/docs/cli-integrations.doc.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ export const docs = {
content: [
{
type: 'prose',
text: "Point the integration file's `docs` field at a directory of reference docs and every `{topic}.doc.{ts,mjs,js}` under it becomes a topic the CLI serves `astryx docs` lists it, `astryx docs <topic>` prints it, `astryx search` indexes it, and `astryx init` names it in the agent block. A topic is a plain object stamped `type: 'generic'`, the same shape core's own topics use.",
text: "Point the integration file's `docs` field at a directory of reference docs and every `{topic}.doc.{ts,mjs,js}` under it becomes a topic the CLI serves: `astryx docs` lists it, `astryx docs <topic>` prints it, `astryx search` indexes it, and `astryx init` names it in the agent block. A topic is a plain object stamped `type: 'generic'`, the same shape core's own topics use.",
},
{
type: 'code',
Expand All @@ -124,7 +124,7 @@ export const docs = {
},
{
type: 'prose',
text: "A topic can also speak about one that already exists. `replaces: 'x'` takes over topic x core's, or another integration's so a package whose consumers install it differently can serve its own Getting Started instead of the built-in one. Give the replacement a different `name` and the old name keeps resolving to it, so a link or an agent that learned the old topic still lands in the right place.",
text: "A topic can also speak about one that already exists. `replaces: 'x'` takes over topic x (core's, or another integration's) so a package whose consumers install it differently can serve its own Getting Started instead of the built-in one. Give the replacement a different `name` and the old name keeps resolving to it, so a link or an agent that learned the old topic still lands in the right place.",
},
{
type: 'code',
Expand All @@ -133,14 +133,14 @@ export const docs = {
},
{
type: 'prose',
text: "`extends: 'x'` merges onto a topic instead of owning it: a section whose title matches one in the base replaces that section, and a section the base does not have is appended. Reach for it to correct or add to a topic you do not want to fork a fork of someone else's guide stops receiving their fixes the day you write it.",
text: "`extends: 'x'` merges onto a topic instead of owning it: a section whose title matches one in the base replaces that section, and a section the base does not have is appended. Reach for it to correct or add to a topic you do not want to fork: a fork of someone else's guide stops receiving their fixes the day you write it.",
},
{
type: 'list',
style: 'unordered',
items: [
'A topic name is a CLI argument and a docsite path, so it may hold only letters, digits, `_` and `-`.',
"A name that collides with an existing topic and declares neither `replaces` nor `extends` is an error, not a silent override the CLI will not guess which one you meant.",
"A name that collides with an existing topic and declares neither `replaces` nor `extends` is an error, not a silent override; the CLI will not guess which one you meant.",
'`replaces` and `extends` are exclusive: a topic either takes another\'s place or merges onto it.',
'Two integrations replacing one topic is a warning, and the one configured later in `astryx.config` wins.',
],
Expand Down
10 changes: 5 additions & 5 deletions packages/core/src/theme/MediaTheme.doc.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ export const docs = {
{
guidance: true,
description:
'Prefer mode="auto" when the surface color comes from a theme token. A token named "inverted" is not guaranteed to be inverted, and auto measures what was actually painted instead of trusting the name — including deciding that a surface needs no media context at all.',
'Prefer mode="auto" when the surface color comes from a theme token. A token named "inverted" is not guaranteed to be inverted, and auto measures what was actually painted instead of trusting the name. It can even decide that a surface needs no media context at all.',
},
{
guidance: true,
Expand All @@ -93,14 +93,14 @@ export const docs = {
type: "'dark' | 'light' | 'auto' | 'off'",
required: true,
description:
'Surface luminance context: dark for content over dark backgrounds (light text, white-tinted interactions), light for content over light backgrounds (dark text, black-tinted interactions), auto to decide from the painted surface no media context when the ambient text already reads on the surface (3:1), otherwise the side that reads better and off to turn it off explicitly. The element renders either way, so a surface can switch contexts without remounting children.',
'Surface luminance context: dark for content over dark backgrounds (light text, white-tinted interactions), light for content over light backgrounds (dark text, black-tinted interactions), auto to decide from the painted surface (no media context when the ambient text already reads on the surface at 3:1, otherwise the side that reads better), and off to turn it off explicitly. The element renders either way, so a surface can switch contexts without remounting children.',
},
{
name: 'fallback',
type: "'dark' | 'light'",
default: "'dark'",
description:
'Which side auto uses when the surface cannot be measured: during SSR, on the first client frame, and whenever the backdrop is not knowable from CSS most often a background-image, whose pixels need sampling (useImageMode) rather than a computed style. Ignored unless mode is auto.',
'Which side auto uses when the surface cannot be measured: during SSR, on the first client frame, and whenever the backdrop is not knowable from CSS, most often a background-image, whose pixels need sampling (useImageMode) rather than a computed style. Ignored unless mode is auto.',
},
{
name: 'children',
Expand All @@ -126,7 +126,7 @@ export const docsDense = {
{
guidance: true,
description:
'Prefer mode="auto" when surface color comes from a theme token a token named "inverted" is not guaranteed to be; auto measures what was painted.',
'Prefer mode="auto" when surface color comes from a theme token; a token named "inverted" is not guaranteed to be; auto measures what was painted.',
},
{
guidance: true,
Expand All @@ -148,6 +148,6 @@ export const docsDense = {
propDescriptions: {
mode: 'surface luminance context: dark for content over dark backgrounds (light text, white-tinted interactions), light for content over light backgrounds (dark text, black-tinted interactions), auto to decide from painted surface (none if ambient text already reads at 3:1, else better-reading side), off to turn off explicitly (element still renders, so children never remount)',
fallback:
'side auto uses when surface is unmeasurable (SSR, first frame, background-image — those need useImageMode sampling); ignored unless mode is auto',
'side auto uses when surface is unmeasurable (SSR, first frame, background-image, which needs useImageMode sampling); ignored unless mode is auto',
},
};
Loading