mdx-artifacts 0.1.2 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +211 -59
- package/README.zh-CN.md +299 -42
- package/agents/AGENTS.snippet.md +21 -10
- package/artifact-docs/examples/commentable-feedback.mdx +76 -70
- package/artifact-docs/examples/decision-matrix.mdx +122 -50
- package/artifact-docs/examples/layout-composition.mdx +106 -128
- package/artifact-docs/examples/streamlit-style-mixed.mdx +100 -85
- package/dist/lib/cli/{build.js → commands/build.js} +2 -2
- package/dist/lib/cli/{components.js → commands/components.js} +19 -3
- package/dist/lib/cli/{dev.js → commands/dev.js} +2 -2
- package/dist/lib/cli/commands/interactions.d.ts +2 -0
- package/dist/lib/cli/commands/interactions.js +280 -0
- package/dist/lib/cli/commands/review.d.ts +1 -0
- package/dist/lib/cli/commands/review.js +171 -0
- package/dist/lib/cli/commands/scaffold.d.ts +16 -0
- package/dist/lib/cli/commands/scaffold.js +440 -0
- package/dist/lib/cli/commands/validate.d.ts +18 -0
- package/dist/lib/cli/commands/validate.js +311 -0
- package/dist/lib/cli/config/config.d.ts +2 -0
- package/dist/lib/cli/{config.js → config/config.js} +3 -2
- package/dist/lib/cli/{types.d.ts → config/types.d.ts} +2 -1
- package/dist/lib/cli/{vite-artifact.d.ts → dev-server/vite-artifact.d.ts} +3 -3
- package/dist/lib/cli/{vite-artifact.js → dev-server/vite-artifact.js} +170 -10
- package/dist/lib/cli/diagnostics/diagnostics.d.ts +11 -0
- package/dist/lib/cli/diagnostics/diagnostics.js +1 -0
- package/dist/lib/cli/index.js +39 -18
- package/dist/lib/cli/mdx/sortable-list.d.ts +14 -0
- package/dist/lib/cli/mdx/sortable-list.js +520 -0
- package/dist/lib/cli/resources/resource-policy.d.ts +15 -0
- package/dist/lib/cli/resources/resource-policy.js +46 -0
- package/dist/lib/cli/resources/safe-path.d.ts +13 -0
- package/dist/lib/cli/resources/safe-path.js +55 -0
- package/dist/lib/cli/services/interaction-service.d.ts +40 -0
- package/dist/lib/cli/services/interaction-service.js +226 -0
- package/dist/lib/cli/services/review.d.ts +43 -0
- package/dist/lib/cli/{review.js → services/review.js} +34 -172
- package/dist/lib/react/{components → composites/comparison-set}/ComparisonSet.d.ts +1 -1
- package/dist/lib/react/{components → composites/comparison-set}/ComparisonSet.js +3 -3
- package/dist/lib/react/composites/comparison-set/index.d.ts +2 -0
- package/dist/lib/react/composites/comparison-set/index.js +1 -0
- package/dist/lib/react/composites/content-set/ContentItem.d.ts +37 -0
- package/dist/lib/react/composites/content-set/ContentItem.js +49 -0
- package/dist/lib/react/composites/content-set/index.d.ts +2 -0
- package/dist/lib/react/composites/content-set/index.js +1 -0
- package/dist/lib/react/{components → composites/export-panel}/ExportPanel.js +2 -2
- package/dist/lib/react/composites/export-panel/index.d.ts +2 -0
- package/dist/lib/react/composites/export-panel/index.js +1 -0
- package/dist/lib/react/{components → composites/section}/Section.js +1 -1
- package/dist/lib/react/composites/section/index.d.ts +2 -0
- package/dist/lib/react/composites/section/index.js +1 -0
- package/dist/lib/react/index.d.ts +36 -31
- package/dist/lib/react/index.js +18 -15
- package/dist/lib/react/interactions/artifact-state/index.d.ts +1 -0
- package/dist/lib/react/interactions/artifact-state/index.js +1 -0
- package/dist/lib/react/{components → interactions/comments}/Comments.d.ts +2 -2
- package/dist/lib/react/{components → interactions/comments}/Comments.js +3 -3
- package/dist/lib/react/interactions/comments/index.d.ts +1 -0
- package/dist/lib/react/interactions/comments/index.js +1 -0
- package/dist/lib/react/interactions/sortable-list/SortableList.d.ts +29 -0
- package/dist/lib/react/interactions/sortable-list/SortableList.js +282 -0
- package/dist/lib/react/interactions/sortable-list/index.d.ts +1 -0
- package/dist/lib/react/interactions/sortable-list/index.js +1 -0
- package/dist/lib/react/layout/layout-primitives/index.d.ts +2 -0
- package/dist/lib/react/layout/layout-primitives/index.js +1 -0
- package/dist/lib/react/legacy/LegacyContentComponents.d.ts +65 -0
- package/dist/lib/react/legacy/LegacyContentComponents.js +26 -0
- package/dist/lib/react/mdx-components.d.ts +5 -0
- package/dist/lib/react/mdx-components.js +38 -0
- package/dist/lib/react/{components → primitives/annotated-code}/AnnotatedCode.d.ts +1 -1
- package/dist/lib/react/{components → primitives/annotated-code}/AnnotatedCode.js +5 -5
- package/dist/lib/react/primitives/annotated-code/index.d.ts +2 -0
- package/dist/lib/react/primitives/annotated-code/index.js +1 -0
- package/dist/lib/react/primitives/callout/Callout.d.ts +11 -0
- package/dist/lib/react/{components → primitives/callout}/Callout.js +9 -6
- package/dist/lib/react/primitives/callout/index.d.ts +2 -0
- package/dist/lib/react/primitives/callout/index.js +1 -0
- package/dist/lib/react/primitives/code-block/CodeBlock.d.ts +20 -0
- package/dist/lib/react/primitives/code-block/CodeBlock.js +32 -0
- package/dist/lib/react/primitives/code-block/index.d.ts +2 -0
- package/dist/lib/react/primitives/code-block/index.js +1 -0
- package/dist/lib/react/primitives/code-surface/CodeSurface.d.ts +11 -0
- package/dist/lib/react/primitives/code-surface/CodeSurface.js +34 -0
- package/dist/lib/react/primitives/code-surface/index.d.ts +2 -0
- package/dist/lib/react/primitives/code-surface/index.js +1 -0
- package/dist/lib/react/primitives/diff-block/DiffBlock.js +25 -0
- package/dist/lib/react/primitives/diff-block/index.d.ts +2 -0
- package/dist/lib/react/primitives/diff-block/index.js +1 -0
- package/dist/lib/react/{components → primitives/inline-text}/InlineText.d.ts +4 -2
- package/dist/lib/react/primitives/inline-text/InlineText.js +28 -0
- package/dist/lib/react/primitives/inline-text/index.d.ts +2 -0
- package/dist/lib/react/primitives/inline-text/index.js +1 -0
- package/dist/lib/react/primitives/markdown-body/MarkdownBody.d.ts +9 -0
- package/dist/lib/react/primitives/markdown-body/MarkdownBody.js +49 -0
- package/dist/lib/react/primitives/markdown-body/index.d.ts +2 -0
- package/dist/lib/react/primitives/markdown-body/index.js +1 -0
- package/dist/lib/react/primitives/severity-badge/index.d.ts +2 -0
- package/dist/lib/react/primitives/severity-badge/index.js +1 -0
- package/dist/lib/react/registry.d.ts +10 -0
- package/dist/lib/react/registry.js +505 -210
- package/dist/lib/react/styles.css +490 -38
- package/docs/cli-structure.md +141 -0
- package/docs/component-protocol.md +199 -33
- package/docs/component-taxonomy.md +40 -4
- package/docs/design.md +42 -21
- package/docs/design.zh-CN.md +41 -21
- package/docs/naming.md +17 -7
- package/docs/releasing.md +132 -0
- package/docs/testing.md +35 -10
- package/package.json +9 -7
- package/dist/lib/cli/config.d.ts +0 -2
- package/dist/lib/cli/review.d.ts +0 -33
- package/dist/lib/cli/scaffold.d.ts +0 -1
- package/dist/lib/cli/scaffold.js +0 -56
- package/dist/lib/cli/validate.d.ts +0 -6
- package/dist/lib/cli/validate.js +0 -79
- package/dist/lib/react/components/Callout.d.ts +0 -9
- package/dist/lib/react/components/CodeBlock.d.ts +0 -10
- package/dist/lib/react/components/CodeBlock.js +0 -28
- package/dist/lib/react/components/DecisionMatrix.d.ts +0 -16
- package/dist/lib/react/components/DecisionMatrix.js +0 -27
- package/dist/lib/react/components/DiffBlock.js +0 -24
- package/dist/lib/react/components/InlineText.js +0 -18
- package/dist/lib/react/components/MarkdownBody.d.ts +0 -7
- package/dist/lib/react/components/MarkdownBody.js +0 -36
- package/dist/lib/react/components/OptionGrid.d.ts +0 -13
- package/dist/lib/react/components/OptionGrid.js +0 -21
- /package/dist/lib/cli/{build.d.ts → commands/build.d.ts} +0 -0
- /package/dist/lib/cli/{components.d.ts → commands/components.d.ts} +0 -0
- /package/dist/lib/cli/{dev.d.ts → commands/dev.d.ts} +0 -0
- /package/dist/lib/cli/{types.js → config/types.js} +0 -0
- /package/dist/lib/cli/{artifact-state.d.ts → state/artifact-state.d.ts} +0 -0
- /package/dist/lib/cli/{artifact-state.js → state/artifact-state.js} +0 -0
- /package/dist/lib/react/{components → composites/export-panel}/ExportPanel.d.ts +0 -0
- /package/dist/lib/react/{components → composites/section}/Section.d.ts +0 -0
- /package/dist/lib/react/{components → interactions/artifact-state}/ArtifactState.d.ts +0 -0
- /package/dist/lib/react/{components → interactions/artifact-state}/ArtifactState.js +0 -0
- /package/dist/lib/react/{components → layout/layout-primitives}/Layout.d.ts +0 -0
- /package/dist/lib/react/{components → layout/layout-primitives}/Layout.js +0 -0
- /package/dist/lib/react/{components → primitives/diff-block}/DiffBlock.d.ts +0 -0
- /package/dist/lib/react/{components → primitives/severity-badge}/SeverityBadge.d.ts +0 -0
- /package/dist/lib/react/{components → primitives/severity-badge}/SeverityBadge.js +0 -0
|
@@ -1,62 +1,134 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ContentSet, ExportPanel, SortableList } from "mdx-artifacts/react";
|
|
2
2
|
|
|
3
|
-
#
|
|
3
|
+
# MDX Artifacts Stage One Content Set
|
|
4
4
|
|
|
5
|
-
<
|
|
6
|
-
id="
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
cons: ["Too heavy for stage one", "Mixes component protocol work with docs-site engineering"],
|
|
24
|
-
confidence: "medium",
|
|
25
|
-
verdict: "Add in stage two"
|
|
26
|
-
},
|
|
27
|
-
{
|
|
28
|
-
id: "raw-html",
|
|
29
|
-
name: "Raw HTML",
|
|
30
|
-
summary: "Let agents generate complete HTML directly.",
|
|
31
|
-
pros: ["No toolchain", "Fast for very small throwaway pages"],
|
|
32
|
-
cons: ["Duplicated code", "Style drift", "~~Reusable~~ export behavior is hard to reuse"],
|
|
33
|
-
confidence: "low",
|
|
34
|
-
verdict: "Keep only as fallback"
|
|
35
|
-
}
|
|
36
|
-
]}
|
|
37
|
-
/>
|
|
5
|
+
<ContentSet
|
|
6
|
+
id="set.stage-one"
|
|
7
|
+
title="Should stage one focus on a **Vite single HTML artifact** instead of starting with an Astro docs site?"
|
|
8
|
+
icon="🧭"
|
|
9
|
+
layout="grid"
|
|
10
|
+
columns={3}
|
|
11
|
+
surface="subtle"
|
|
12
|
+
>
|
|
13
|
+
<ContentSet.Item
|
|
14
|
+
id="vite"
|
|
15
|
+
title="**Vite** single HTML artifact"
|
|
16
|
+
badge="Recommended"
|
|
17
|
+
icon="✅"
|
|
18
|
+
tone="positive"
|
|
19
|
+
emphasis="primary"
|
|
20
|
+
summary="Validate the shortest `MDX -> HTML` loop first."
|
|
21
|
+
>
|
|
22
|
+
### Tradeoffs
|
|
38
23
|
|
|
39
|
-
|
|
40
|
-
|
|
24
|
+
- Shortest loop
|
|
25
|
+
- Direct interactive component debugging
|
|
26
|
+
- Fits one-off tool artifacts
|
|
27
|
+
- No docs-site navigation yet
|
|
28
|
+
- Weaker long-term archive experience
|
|
29
|
+
</ContentSet.Item>
|
|
30
|
+
<ContentSet.Item
|
|
31
|
+
id="astro"
|
|
32
|
+
title="Astro docs site"
|
|
33
|
+
badge="Later"
|
|
34
|
+
icon="🗂️"
|
|
35
|
+
tone="info"
|
|
36
|
+
summary="Turn the artifact-docs tree into a structured static docs site."
|
|
37
|
+
>
|
|
38
|
+
### Tradeoffs
|
|
39
|
+
|
|
40
|
+
- Better long-term reading experience
|
|
41
|
+
- File-based pages
|
|
42
|
+
- Good for archives
|
|
43
|
+
- Too heavy for stage one
|
|
44
|
+
- Mixes component protocol work with docs-site engineering
|
|
45
|
+
</ContentSet.Item>
|
|
46
|
+
<ContentSet.Item
|
|
47
|
+
id="raw-html"
|
|
48
|
+
title="Raw HTML"
|
|
49
|
+
badge="Fallback"
|
|
50
|
+
icon="⚠️"
|
|
51
|
+
tone="warning"
|
|
52
|
+
emphasis="subtle"
|
|
53
|
+
summary="Let agents generate complete HTML directly."
|
|
54
|
+
>
|
|
55
|
+
### Tradeoffs
|
|
56
|
+
|
|
57
|
+
- No toolchain
|
|
58
|
+
- Fast for very small throwaway pages
|
|
59
|
+
- Duplicated code
|
|
60
|
+
- Style drift
|
|
61
|
+
- ~~Reusable~~ export behavior is hard to reuse
|
|
62
|
+
</ContentSet.Item>
|
|
63
|
+
</ContentSet>
|
|
64
|
+
|
|
65
|
+
<ContentSet
|
|
66
|
+
id="set.first-components"
|
|
41
67
|
title="First component scope"
|
|
42
|
-
|
|
68
|
+
layout="grid"
|
|
69
|
+
columns={3}
|
|
70
|
+
>
|
|
71
|
+
<ContentSet.Item
|
|
72
|
+
id="content-set"
|
|
73
|
+
title="ContentSet"
|
|
74
|
+
badge="Core"
|
|
75
|
+
tone="accent"
|
|
76
|
+
emphasis="primary"
|
|
77
|
+
summary="Group reusable content items."
|
|
78
|
+
>
|
|
79
|
+
Use for comparable options, recommendations, risks, and findings.
|
|
80
|
+
|
|
81
|
+
- Stable item slots
|
|
82
|
+
- Tone and emphasis styling
|
|
83
|
+
</ContentSet.Item>
|
|
84
|
+
<ContentSet.Item
|
|
85
|
+
id="content-item"
|
|
86
|
+
title="ContentItem"
|
|
87
|
+
summary="Render a standalone content card."
|
|
88
|
+
>
|
|
89
|
+
Use when a single reusable content block is enough.
|
|
90
|
+
|
|
91
|
+
- Easy to scan
|
|
92
|
+
- Keeps Markdown body content readable
|
|
93
|
+
</ContentSet.Item>
|
|
94
|
+
<ContentSet.Item
|
|
95
|
+
id="export-panel"
|
|
96
|
+
title="ExportPanel"
|
|
97
|
+
tone="info"
|
|
98
|
+
summary="Return conclusions or edits to the workflow."
|
|
99
|
+
>
|
|
100
|
+
Use when the artifact needs to hand structured results back to the agent.
|
|
101
|
+
|
|
102
|
+
- Copy-only in v1
|
|
103
|
+
- Can add file download later
|
|
104
|
+
</ContentSet.Item>
|
|
105
|
+
</ContentSet>
|
|
106
|
+
|
|
107
|
+
<SortableList
|
|
108
|
+
id="list.next-priorities"
|
|
109
|
+
title="Next priorities"
|
|
110
|
+
summary="Drag items or use the controls to change the priority order."
|
|
111
|
+
items={[
|
|
43
112
|
{
|
|
44
|
-
id: "
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
113
|
+
id: "validate-build",
|
|
114
|
+
title: "Keep validate/build/dev reliable",
|
|
115
|
+
summary: "The CLI loop is the artifact authoring baseline.",
|
|
116
|
+
badge: "P0",
|
|
117
|
+
tags: ["cli"]
|
|
48
118
|
},
|
|
49
119
|
{
|
|
50
|
-
id: "
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
120
|
+
id: "example-output",
|
|
121
|
+
title: "Verify example HTML output",
|
|
122
|
+
summary: "The example MDX must keep producing standalone HTML.",
|
|
123
|
+
badge: "P1",
|
|
124
|
+
tags: ["artifact"]
|
|
54
125
|
},
|
|
55
126
|
{
|
|
56
|
-
id: "
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
127
|
+
id: "adapter-design",
|
|
128
|
+
title: "Design the Astro adapter later",
|
|
129
|
+
summary: "Adapter work should follow the component protocol.",
|
|
130
|
+
badge: "Later",
|
|
131
|
+
tags: ["adapter"]
|
|
60
132
|
}
|
|
61
133
|
]}
|
|
62
134
|
/>
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import {
|
|
2
2
|
Columns,
|
|
3
3
|
ComparisonSet,
|
|
4
|
-
|
|
4
|
+
ContentSet,
|
|
5
5
|
ExportPanel,
|
|
6
6
|
Frame,
|
|
7
7
|
Grid,
|
|
8
8
|
InlineText,
|
|
9
9
|
MarkdownBody,
|
|
10
10
|
SplitPane,
|
|
11
|
-
Stack
|
|
11
|
+
Stack
|
|
12
12
|
} from "mdx-artifacts/react";
|
|
13
13
|
|
|
14
14
|
# Layout Composition Example
|
|
@@ -16,177 +16,155 @@ import {
|
|
|
16
16
|
<Stack gap="lg">
|
|
17
17
|
<Frame surface="plain" padding="lg">
|
|
18
18
|
<Stack gap="sm">
|
|
19
|
-
<InlineText
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
/>
|
|
29
|
-
|
|
30
|
-
</Stack>
|
|
31
|
-
|
|
19
|
+
<InlineText as="h2" variant="title">
|
|
20
|
+
A composed artifact using **layout primitives** and text components
|
|
21
|
+
</InlineText>
|
|
22
|
+
<MarkdownBody>
|
|
23
|
+
{`This example shows how \`Stack\`, \`Columns\`, \`Grid\`, \`SplitPane\`, and \`Frame\` can arrange existing content components without replacing them.
|
|
24
|
+
|
|
25
|
+
The layout components control placement and surface. Components such as \`ContentSet\`, \`ComparisonSet\`, and \`ExportPanel\` still own reusable content structure and handoff behavior.`}
|
|
26
|
+
</MarkdownBody>
|
|
27
|
+
</Stack>
|
|
32
28
|
</Frame>
|
|
33
29
|
|
|
34
30
|
<SplitPane ratio="3:1" gap="lg">
|
|
35
|
-
<
|
|
36
|
-
id="
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
31
|
+
<ContentSet
|
|
32
|
+
id="set.layout-authoring"
|
|
33
|
+
title="Should layout primitives become the default authoring path?"
|
|
34
|
+
layout="grid"
|
|
35
|
+
columns={2}
|
|
36
|
+
>
|
|
37
|
+
<ContentSet.Item
|
|
38
|
+
id="semantic-first"
|
|
39
|
+
title="Semantic-first authoring"
|
|
40
|
+
badge="Recommended"
|
|
41
|
+
tone="positive"
|
|
42
|
+
emphasis="primary"
|
|
43
|
+
summary="Agents choose task-oriented components first, then use layout only when composition needs it."
|
|
44
|
+
>
|
|
45
|
+
- Stable protocol
|
|
46
|
+
- Less ad hoc JSX
|
|
47
|
+
- Better validation path
|
|
48
|
+
- Less free-form than raw HTML
|
|
49
|
+
</ContentSet.Item>
|
|
50
|
+
<ContentSet.Item
|
|
51
|
+
id="layout-first"
|
|
52
|
+
title="Layout-first authoring"
|
|
53
|
+
badge="Advanced"
|
|
54
|
+
tone="warning"
|
|
55
|
+
emphasis="subtle"
|
|
56
|
+
summary="Agents assemble artifacts from generic layout blocks and arbitrary children."
|
|
57
|
+
>
|
|
58
|
+
- Maximum flexibility
|
|
59
|
+
- Easy to recreate raw HTML
|
|
60
|
+
- Harder to query through CLI
|
|
61
|
+
- Harder to keep consistent
|
|
62
|
+
</ContentSet.Item>
|
|
63
|
+
</ContentSet>
|
|
59
64
|
|
|
60
65
|
<Frame surface="subtle">
|
|
61
66
|
<Stack gap="sm">
|
|
62
|
-
<InlineText as="h3" variant="subtitle"
|
|
63
|
-
<MarkdownBody
|
|
64
|
-
|
|
65
|
-
body={`Use layout primitives when the artifact needs a custom reading shape:
|
|
67
|
+
<InlineText as="h3" variant="subtitle">Reading note</InlineText>
|
|
68
|
+
<MarkdownBody variant="compact">
|
|
69
|
+
{`Use layout primitives when the artifact needs a custom reading shape:
|
|
66
70
|
|
|
67
71
|
- main content plus sidebar
|
|
68
72
|
- equal option previews
|
|
69
73
|
- framed snippets or mockups
|
|
70
74
|
|
|
71
75
|
Do not use them to rebuild existing semantic components.`}
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
</
|
|
75
|
-
</Frame>
|
|
76
|
-
|
|
76
|
+
</MarkdownBody>
|
|
77
|
+
</Stack>
|
|
78
|
+
</Frame>
|
|
77
79
|
</SplitPane>
|
|
78
80
|
|
|
79
81
|
<Columns ratio="1:1:1" gap="md">
|
|
80
82
|
<Frame surface="outlined">
|
|
81
|
-
<InlineText as="h3" variant="subtitle"
|
|
82
|
-
<MarkdownBody
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
/>
|
|
83
|
+
<InlineText as="h3" variant="subtitle">InlineText</InlineText>
|
|
84
|
+
<MarkdownBody variant="compact">
|
|
85
|
+
Short labels and headings can use **inline Markdown**, including *emphasis*, ~~removed text~~, and `inline code`.
|
|
86
|
+
</MarkdownBody>
|
|
86
87
|
</Frame>
|
|
87
88
|
|
|
88
89
|
<Frame surface="outlined">
|
|
89
|
-
<InlineText as="h3" variant="subtitle"
|
|
90
|
-
<MarkdownBody
|
|
91
|
-
|
|
92
|
-
body={`Body copy supports controlled Markdown:
|
|
90
|
+
<InlineText as="h3" variant="subtitle">MarkdownBody</InlineText>
|
|
91
|
+
<MarkdownBody variant="compact">
|
|
92
|
+
{`Body copy supports controlled Markdown:
|
|
93
93
|
|
|
94
94
|
1. paragraphs
|
|
95
95
|
2. ordered lists
|
|
96
96
|
3. unordered lists
|
|
97
97
|
4. blockquotes`}
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
</Frame>
|
|
101
|
-
|
|
102
|
-
<Frame surface="outlined">
|
|
103
|
-
|
|
104
|
-
<InlineText as="h3" variant="subtitle" text="Frame" />
|
|
105
|
-
|
|
106
|
-
<MarkdownBody
|
|
98
|
+
</MarkdownBody>
|
|
99
|
+
</Frame>
|
|
107
100
|
|
|
108
|
-
|
|
109
|
-
|
|
101
|
+
<Frame surface="outlined">
|
|
102
|
+
<InlineText as="h3" variant="subtitle">Frame</InlineText>
|
|
103
|
+
<MarkdownBody variant="compact">
|
|
104
|
+
{`Frame provides surface treatment:
|
|
110
105
|
|
|
111
106
|
- \`none\`
|
|
112
107
|
- \`plain\`
|
|
113
108
|
- \`subtle\`
|
|
114
109
|
- \`outlined\``}
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
</Columns>
|
|
120
|
-
|
|
121
|
-
<ComparisonSet id="comparison.content-shapes" title="Compare content shapes" columns={3}>
|
|
122
|
-
|
|
123
|
-
<ComparisonSet.Item id="markdown-body" title="Markdown body" value="markdown-body">
|
|
124
|
-
|
|
125
|
-
<MarkdownBody
|
|
110
|
+
</MarkdownBody>
|
|
111
|
+
</Frame>
|
|
112
|
+
</Columns>
|
|
126
113
|
|
|
127
|
-
|
|
128
|
-
|
|
114
|
+
<ComparisonSet id="comparison.content-shapes" title="Compare content shapes" columns={3}>
|
|
115
|
+
<ComparisonSet.Item id="markdown-body" title="Markdown body" value="markdown-body">
|
|
116
|
+
<MarkdownBody variant="compact">
|
|
117
|
+
{`# This **item** is ~~plain Markdown content~~.
|
|
129
118
|
|
|
130
|
-
|
|
119
|
+
#### **item** is ~~plain Markdown content~~.
|
|
131
120
|
|
|
132
121
|
- Good for notes
|
|
133
122
|
- Easy for agents to write
|
|
134
123
|
- Easy to validate
|
|
135
124
|
|
|
136
125
|
1. Ordered item
|
|
137
|
-
2. Nested content check
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
<Frame surface="outlined">
|
|
166
|
-
|
|
167
|
-
<InlineText as="h3" variant="subtitle" text="Grid is only layout" />
|
|
168
|
-
|
|
169
|
-
<MarkdownBody
|
|
170
|
-
|
|
171
|
-
body={`This card is built manually from \`Frame\`, \`InlineText\`, and \`MarkdownBody\`.
|
|
126
|
+
2. Nested content check`}
|
|
127
|
+
</MarkdownBody>
|
|
128
|
+
</ComparisonSet.Item>
|
|
129
|
+
|
|
130
|
+
<ComparisonSet.Item id="framed-snippet" title="Framed snippet" value="framed-snippet">
|
|
131
|
+
<Frame surface="subtle">
|
|
132
|
+
<MarkdownBody variant="compact">
|
|
133
|
+
This slot can hold a future `CodeBlock`, `MermaidBlock`, image renderer, or project-local component.
|
|
134
|
+
</MarkdownBody>
|
|
135
|
+
</Frame>
|
|
136
|
+
</ComparisonSet.Item>
|
|
137
|
+
|
|
138
|
+
<ComparisonSet.Item id="custom-composition" title="Custom composition" value="custom-composition">
|
|
139
|
+
<Stack gap="sm">
|
|
140
|
+
<InlineText variant="label">Nested layout is allowed when the item needs it.</InlineText>
|
|
141
|
+
<MarkdownBody variant="compact">
|
|
142
|
+
The comparison item owns the title. Its body remains open to child components.
|
|
143
|
+
</MarkdownBody>
|
|
144
|
+
</Stack>
|
|
145
|
+
</ComparisonSet.Item>
|
|
146
|
+
</ComparisonSet>
|
|
147
|
+
|
|
148
|
+
<Grid columns={2} gap="md">
|
|
149
|
+
<Frame surface="outlined">
|
|
150
|
+
<InlineText as="h3" variant="subtitle">Grid is only layout</InlineText>
|
|
151
|
+
<MarkdownBody>
|
|
152
|
+
{`This card is built manually from \`Frame\`, \`InlineText\`, and \`MarkdownBody\`.
|
|
172
153
|
|
|
173
154
|
Use this when there is no reusable artifact meaning beyond placement.`}
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
</Frame>
|
|
155
|
+
</MarkdownBody>
|
|
156
|
+
</Frame>
|
|
177
157
|
|
|
178
158
|
<Frame surface="plain" padding="lg">
|
|
179
159
|
<Stack gap="md">
|
|
180
|
-
<InlineText as="h3" variant="subtitle"
|
|
181
|
-
<MarkdownBody
|
|
182
|
-
|
|
160
|
+
<InlineText as="h3" variant="subtitle">Surface check</InlineText>
|
|
161
|
+
<MarkdownBody>
|
|
162
|
+
{`This frame uses \`surface="plain"\`. In light mode it should read as a white surface on a very light neutral page background.
|
|
183
163
|
|
|
184
164
|
In dark mode it should read as a quiet elevated surface, not as a blue-tinted panel.`}
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
</
|
|
188
|
-
</Frame>
|
|
189
|
-
|
|
165
|
+
</MarkdownBody>
|
|
166
|
+
</Stack>
|
|
167
|
+
</Frame>
|
|
190
168
|
</Grid>
|
|
191
169
|
|
|
192
170
|
<ExportPanel
|