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.
Files changed (141) hide show
  1. package/README.md +211 -59
  2. package/README.zh-CN.md +299 -42
  3. package/agents/AGENTS.snippet.md +21 -10
  4. package/artifact-docs/examples/commentable-feedback.mdx +76 -70
  5. package/artifact-docs/examples/decision-matrix.mdx +122 -50
  6. package/artifact-docs/examples/layout-composition.mdx +106 -128
  7. package/artifact-docs/examples/streamlit-style-mixed.mdx +100 -85
  8. package/dist/lib/cli/{build.js → commands/build.js} +2 -2
  9. package/dist/lib/cli/{components.js → commands/components.js} +19 -3
  10. package/dist/lib/cli/{dev.js → commands/dev.js} +2 -2
  11. package/dist/lib/cli/commands/interactions.d.ts +2 -0
  12. package/dist/lib/cli/commands/interactions.js +280 -0
  13. package/dist/lib/cli/commands/review.d.ts +1 -0
  14. package/dist/lib/cli/commands/review.js +171 -0
  15. package/dist/lib/cli/commands/scaffold.d.ts +16 -0
  16. package/dist/lib/cli/commands/scaffold.js +440 -0
  17. package/dist/lib/cli/commands/validate.d.ts +18 -0
  18. package/dist/lib/cli/commands/validate.js +311 -0
  19. package/dist/lib/cli/config/config.d.ts +2 -0
  20. package/dist/lib/cli/{config.js → config/config.js} +3 -2
  21. package/dist/lib/cli/{types.d.ts → config/types.d.ts} +2 -1
  22. package/dist/lib/cli/{vite-artifact.d.ts → dev-server/vite-artifact.d.ts} +3 -3
  23. package/dist/lib/cli/{vite-artifact.js → dev-server/vite-artifact.js} +170 -10
  24. package/dist/lib/cli/diagnostics/diagnostics.d.ts +11 -0
  25. package/dist/lib/cli/diagnostics/diagnostics.js +1 -0
  26. package/dist/lib/cli/index.js +39 -18
  27. package/dist/lib/cli/mdx/sortable-list.d.ts +14 -0
  28. package/dist/lib/cli/mdx/sortable-list.js +520 -0
  29. package/dist/lib/cli/resources/resource-policy.d.ts +15 -0
  30. package/dist/lib/cli/resources/resource-policy.js +46 -0
  31. package/dist/lib/cli/resources/safe-path.d.ts +13 -0
  32. package/dist/lib/cli/resources/safe-path.js +55 -0
  33. package/dist/lib/cli/services/interaction-service.d.ts +40 -0
  34. package/dist/lib/cli/services/interaction-service.js +226 -0
  35. package/dist/lib/cli/services/review.d.ts +43 -0
  36. package/dist/lib/cli/{review.js → services/review.js} +34 -172
  37. package/dist/lib/react/{components → composites/comparison-set}/ComparisonSet.d.ts +1 -1
  38. package/dist/lib/react/{components → composites/comparison-set}/ComparisonSet.js +3 -3
  39. package/dist/lib/react/composites/comparison-set/index.d.ts +2 -0
  40. package/dist/lib/react/composites/comparison-set/index.js +1 -0
  41. package/dist/lib/react/composites/content-set/ContentItem.d.ts +37 -0
  42. package/dist/lib/react/composites/content-set/ContentItem.js +49 -0
  43. package/dist/lib/react/composites/content-set/index.d.ts +2 -0
  44. package/dist/lib/react/composites/content-set/index.js +1 -0
  45. package/dist/lib/react/{components → composites/export-panel}/ExportPanel.js +2 -2
  46. package/dist/lib/react/composites/export-panel/index.d.ts +2 -0
  47. package/dist/lib/react/composites/export-panel/index.js +1 -0
  48. package/dist/lib/react/{components → composites/section}/Section.js +1 -1
  49. package/dist/lib/react/composites/section/index.d.ts +2 -0
  50. package/dist/lib/react/composites/section/index.js +1 -0
  51. package/dist/lib/react/index.d.ts +36 -31
  52. package/dist/lib/react/index.js +18 -15
  53. package/dist/lib/react/interactions/artifact-state/index.d.ts +1 -0
  54. package/dist/lib/react/interactions/artifact-state/index.js +1 -0
  55. package/dist/lib/react/{components → interactions/comments}/Comments.d.ts +2 -2
  56. package/dist/lib/react/{components → interactions/comments}/Comments.js +3 -3
  57. package/dist/lib/react/interactions/comments/index.d.ts +1 -0
  58. package/dist/lib/react/interactions/comments/index.js +1 -0
  59. package/dist/lib/react/interactions/sortable-list/SortableList.d.ts +29 -0
  60. package/dist/lib/react/interactions/sortable-list/SortableList.js +282 -0
  61. package/dist/lib/react/interactions/sortable-list/index.d.ts +1 -0
  62. package/dist/lib/react/interactions/sortable-list/index.js +1 -0
  63. package/dist/lib/react/layout/layout-primitives/index.d.ts +2 -0
  64. package/dist/lib/react/layout/layout-primitives/index.js +1 -0
  65. package/dist/lib/react/legacy/LegacyContentComponents.d.ts +65 -0
  66. package/dist/lib/react/legacy/LegacyContentComponents.js +26 -0
  67. package/dist/lib/react/mdx-components.d.ts +5 -0
  68. package/dist/lib/react/mdx-components.js +38 -0
  69. package/dist/lib/react/{components → primitives/annotated-code}/AnnotatedCode.d.ts +1 -1
  70. package/dist/lib/react/{components → primitives/annotated-code}/AnnotatedCode.js +5 -5
  71. package/dist/lib/react/primitives/annotated-code/index.d.ts +2 -0
  72. package/dist/lib/react/primitives/annotated-code/index.js +1 -0
  73. package/dist/lib/react/primitives/callout/Callout.d.ts +11 -0
  74. package/dist/lib/react/{components → primitives/callout}/Callout.js +9 -6
  75. package/dist/lib/react/primitives/callout/index.d.ts +2 -0
  76. package/dist/lib/react/primitives/callout/index.js +1 -0
  77. package/dist/lib/react/primitives/code-block/CodeBlock.d.ts +20 -0
  78. package/dist/lib/react/primitives/code-block/CodeBlock.js +32 -0
  79. package/dist/lib/react/primitives/code-block/index.d.ts +2 -0
  80. package/dist/lib/react/primitives/code-block/index.js +1 -0
  81. package/dist/lib/react/primitives/code-surface/CodeSurface.d.ts +11 -0
  82. package/dist/lib/react/primitives/code-surface/CodeSurface.js +34 -0
  83. package/dist/lib/react/primitives/code-surface/index.d.ts +2 -0
  84. package/dist/lib/react/primitives/code-surface/index.js +1 -0
  85. package/dist/lib/react/primitives/diff-block/DiffBlock.js +25 -0
  86. package/dist/lib/react/primitives/diff-block/index.d.ts +2 -0
  87. package/dist/lib/react/primitives/diff-block/index.js +1 -0
  88. package/dist/lib/react/{components → primitives/inline-text}/InlineText.d.ts +4 -2
  89. package/dist/lib/react/primitives/inline-text/InlineText.js +28 -0
  90. package/dist/lib/react/primitives/inline-text/index.d.ts +2 -0
  91. package/dist/lib/react/primitives/inline-text/index.js +1 -0
  92. package/dist/lib/react/primitives/markdown-body/MarkdownBody.d.ts +9 -0
  93. package/dist/lib/react/primitives/markdown-body/MarkdownBody.js +49 -0
  94. package/dist/lib/react/primitives/markdown-body/index.d.ts +2 -0
  95. package/dist/lib/react/primitives/markdown-body/index.js +1 -0
  96. package/dist/lib/react/primitives/severity-badge/index.d.ts +2 -0
  97. package/dist/lib/react/primitives/severity-badge/index.js +1 -0
  98. package/dist/lib/react/registry.d.ts +10 -0
  99. package/dist/lib/react/registry.js +505 -210
  100. package/dist/lib/react/styles.css +490 -38
  101. package/docs/cli-structure.md +141 -0
  102. package/docs/component-protocol.md +199 -33
  103. package/docs/component-taxonomy.md +40 -4
  104. package/docs/design.md +42 -21
  105. package/docs/design.zh-CN.md +41 -21
  106. package/docs/naming.md +17 -7
  107. package/docs/releasing.md +132 -0
  108. package/docs/testing.md +35 -10
  109. package/package.json +9 -7
  110. package/dist/lib/cli/config.d.ts +0 -2
  111. package/dist/lib/cli/review.d.ts +0 -33
  112. package/dist/lib/cli/scaffold.d.ts +0 -1
  113. package/dist/lib/cli/scaffold.js +0 -56
  114. package/dist/lib/cli/validate.d.ts +0 -6
  115. package/dist/lib/cli/validate.js +0 -79
  116. package/dist/lib/react/components/Callout.d.ts +0 -9
  117. package/dist/lib/react/components/CodeBlock.d.ts +0 -10
  118. package/dist/lib/react/components/CodeBlock.js +0 -28
  119. package/dist/lib/react/components/DecisionMatrix.d.ts +0 -16
  120. package/dist/lib/react/components/DecisionMatrix.js +0 -27
  121. package/dist/lib/react/components/DiffBlock.js +0 -24
  122. package/dist/lib/react/components/InlineText.js +0 -18
  123. package/dist/lib/react/components/MarkdownBody.d.ts +0 -7
  124. package/dist/lib/react/components/MarkdownBody.js +0 -36
  125. package/dist/lib/react/components/OptionGrid.d.ts +0 -13
  126. package/dist/lib/react/components/OptionGrid.js +0 -21
  127. /package/dist/lib/cli/{build.d.ts → commands/build.d.ts} +0 -0
  128. /package/dist/lib/cli/{components.d.ts → commands/components.d.ts} +0 -0
  129. /package/dist/lib/cli/{dev.d.ts → commands/dev.d.ts} +0 -0
  130. /package/dist/lib/cli/{types.js → config/types.js} +0 -0
  131. /package/dist/lib/cli/{artifact-state.d.ts → state/artifact-state.d.ts} +0 -0
  132. /package/dist/lib/cli/{artifact-state.js → state/artifact-state.js} +0 -0
  133. /package/dist/lib/react/{components → composites/export-panel}/ExportPanel.d.ts +0 -0
  134. /package/dist/lib/react/{components → composites/section}/Section.d.ts +0 -0
  135. /package/dist/lib/react/{components → interactions/artifact-state}/ArtifactState.d.ts +0 -0
  136. /package/dist/lib/react/{components → interactions/artifact-state}/ArtifactState.js +0 -0
  137. /package/dist/lib/react/{components → layout/layout-primitives}/Layout.d.ts +0 -0
  138. /package/dist/lib/react/{components → layout/layout-primitives}/Layout.js +0 -0
  139. /package/dist/lib/react/{components → primitives/diff-block}/DiffBlock.d.ts +0 -0
  140. /package/dist/lib/react/{components → primitives/severity-badge}/SeverityBadge.d.ts +0 -0
  141. /package/dist/lib/react/{components → primitives/severity-badge}/SeverityBadge.js +0 -0
@@ -1,62 +1,134 @@
1
- import { DecisionMatrix, ExportPanel, OptionGrid } from "mdx-artifacts/react";
1
+ import { ContentSet, ExportPanel, SortableList } from "mdx-artifacts/react";
2
2
 
3
- # Artifact Kit Stage One Decision
3
+ # MDX Artifacts Stage One Content Set
4
4
 
5
- <DecisionMatrix
6
- id="decision.stage-one"
7
- question="Should stage one focus on a **Vite single HTML artifact** instead of starting with an Astro docs site?"
8
- options={[
9
- {
10
- id: "vite",
11
- name: "**Vite** single HTML artifact",
12
- summary: "Validate the shortest `MDX -> HTML` loop first.",
13
- pros: ["Shortest loop", "Direct interactive component debugging", "Fits one-off tool artifacts"],
14
- cons: ["No docs-site navigation yet", "Weaker long-term archive experience"],
15
- confidence: "high",
16
- verdict: "Recommended for stage one"
17
- },
18
- {
19
- id: "astro",
20
- name: "Astro docs site",
21
- summary: "Turn the artifact-docs tree into a structured static docs site.",
22
- pros: ["Better long-term reading experience", "File-based pages", "Good for archives"],
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
- <OptionGrid
40
- id="option.first-components"
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
- options={[
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: "decision-matrix",
45
- name: "DecisionMatrix",
46
- intent: "Compare options",
47
- tradeoffs: ["Stable **decision** structure", "Does not own complex interaction"]
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: "option-grid",
51
- name: "OptionGrid",
52
- intent: "Show alternatives side by side",
53
- tradeoffs: ["Easy to scan", "Can add selection later"]
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: "export-panel",
57
- name: "ExportPanel",
58
- intent: "Return conclusions or edits to the workflow",
59
- tradeoffs: ["Copy-only in v1", "Can add file download later"]
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
- DecisionMatrix,
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
- as="h2"
21
- variant="title"
22
- text="A composed artifact using **layout primitives** and text components"
23
- />
24
- <MarkdownBody
25
- body={`This example shows how \`Stack\`, \`Columns\`, \`Grid\`, \`SplitPane\`, and \`Frame\` can arrange existing semantic components without replacing them.
26
-
27
- The layout components control placement and surface. Components such as \`DecisionMatrix\`, \`ComparisonSet\`, and \`ExportPanel\` still own the artifact meaning.`}
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
- <DecisionMatrix
36
- id="decision.layout-authoring"
37
- question="Should layout primitives become the default authoring path?"
38
- options={[
39
- {
40
- id: "semantic-first",
41
- name: "Semantic-first authoring",
42
- summary: "Agents choose task-oriented components first, then use layout only when composition needs it.",
43
- pros: ["Stable protocol", "Less ad hoc JSX", "Better validation path"],
44
- cons: ["Less free-form than raw HTML"],
45
- confidence: "high",
46
- verdict: "Recommended"
47
- },
48
- {
49
- id: "layout-first",
50
- name: "Layout-first authoring",
51
- summary: "Agents assemble artifacts from generic layout blocks and arbitrary children.",
52
- pros: ["Maximum flexibility"],
53
- cons: ["Easy to recreate raw HTML", "Harder to query through CLI", "Harder to keep consistent"],
54
- confidence: "low",
55
- verdict: "Keep as an advanced escape hatch"
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" text="Reading note" />
63
- <MarkdownBody
64
- variant="compact"
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
- </Stack>
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" text="InlineText" />
82
- <MarkdownBody
83
- variant="compact"
84
- body={`Short labels and headings can use **inline Markdown**, including *emphasis*, ~~removed text~~, and \`inline code\`.`}
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" text="MarkdownBody" />
90
- <MarkdownBody
91
- variant="compact"
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
- variant="compact"
109
- body={`Frame provides surface treatment:
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
- </Frame>
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
- variant="compact"
128
- body={`# This **item** is ~~plain Markdown content~~.
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
- #### **item** is ~~plain Markdown content~~.
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
- </ComparisonSet.Item>
143
-
144
- <ComparisonSet.Item id="framed-snippet" title="Framed snippet" value="framed-snippet">
145
- <Frame surface="subtle">
146
- <MarkdownBody
147
- variant="compact"
148
- body={`This slot can hold a future \`CodeBlock\`, \`MermaidBlock\`, image renderer, or project-local component.`}
149
- />
150
- </Frame>
151
- </ComparisonSet.Item>
152
-
153
- <ComparisonSet.Item id="custom-composition" title="Custom composition" value="custom-composition">
154
- <Stack gap="sm">
155
- <InlineText text="Nested layout is allowed when the item needs it." variant="label" />
156
- <MarkdownBody body="The comparison item owns the title. Its body remains open to child components." variant="compact" />
157
- </Stack>
158
-
159
- </ComparisonSet.Item>
160
-
161
- </ComparisonSet>
162
-
163
- <Grid columns={2} gap="md">
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" text="Surface check" />
181
- <MarkdownBody
182
- body={`This frame uses \`surface=\"plain\"\`. In light mode it should read as a white surface on a very light neutral page background.
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
- </Stack>
188
- </Frame>
189
-
165
+ </MarkdownBody>
166
+ </Stack>
167
+ </Frame>
190
168
  </Grid>
191
169
 
192
170
  <ExportPanel