mdx-artifacts 0.1.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/LICENSE +21 -0
- package/README.md +234 -0
- package/README.zh-CN.md +129 -0
- package/agents/AGENTS.snippet.md +13 -0
- package/artifact-docs/examples/commentable-feedback.mdx +126 -0
- package/artifact-docs/examples/decision-matrix.mdx +80 -0
- package/artifact-docs/examples/layout-composition.mdx +216 -0
- package/artifact-docs/examples/streamlit-style-mixed.mdx +183 -0
- package/dist/lib/cli/artifact-state.d.ts +27 -0
- package/dist/lib/cli/artifact-state.js +115 -0
- package/dist/lib/cli/build.d.ts +1 -0
- package/dist/lib/cli/build.js +25 -0
- package/dist/lib/cli/components.d.ts +3 -0
- package/dist/lib/cli/components.js +58 -0
- package/dist/lib/cli/config.d.ts +2 -0
- package/dist/lib/cli/config.js +36 -0
- package/dist/lib/cli/dev.d.ts +1 -0
- package/dist/lib/cli/dev.js +24 -0
- package/dist/lib/cli/index.d.ts +2 -0
- package/dist/lib/cli/index.js +69 -0
- package/dist/lib/cli/review.d.ts +33 -0
- package/dist/lib/cli/review.js +390 -0
- package/dist/lib/cli/scaffold.d.ts +1 -0
- package/dist/lib/cli/scaffold.js +56 -0
- package/dist/lib/cli/types.d.ts +7 -0
- package/dist/lib/cli/types.js +1 -0
- package/dist/lib/cli/validate.d.ts +6 -0
- package/dist/lib/cli/validate.js +79 -0
- package/dist/lib/cli/vite-artifact.d.ts +13 -0
- package/dist/lib/cli/vite-artifact.js +213 -0
- package/dist/lib/react/components/AnnotatedCode.d.ts +19 -0
- package/dist/lib/react/components/AnnotatedCode.js +30 -0
- package/dist/lib/react/components/ArtifactState.d.ts +68 -0
- package/dist/lib/react/components/ArtifactState.js +286 -0
- package/dist/lib/react/components/Callout.d.ts +9 -0
- package/dist/lib/react/components/Callout.js +21 -0
- package/dist/lib/react/components/CodeBlock.d.ts +10 -0
- package/dist/lib/react/components/CodeBlock.js +28 -0
- package/dist/lib/react/components/Comments.d.ts +53 -0
- package/dist/lib/react/components/Comments.js +613 -0
- package/dist/lib/react/components/ComparisonSet.d.ts +24 -0
- package/dist/lib/react/components/ComparisonSet.js +30 -0
- package/dist/lib/react/components/DecisionMatrix.d.ts +16 -0
- package/dist/lib/react/components/DecisionMatrix.js +27 -0
- package/dist/lib/react/components/DiffBlock.d.ts +15 -0
- package/dist/lib/react/components/DiffBlock.js +24 -0
- package/dist/lib/react/components/ExportPanel.d.ts +7 -0
- package/dist/lib/react/components/ExportPanel.js +84 -0
- package/dist/lib/react/components/InlineText.d.ts +9 -0
- package/dist/lib/react/components/InlineText.js +18 -0
- package/dist/lib/react/components/Layout.d.ts +44 -0
- package/dist/lib/react/components/Layout.js +28 -0
- package/dist/lib/react/components/MarkdownBody.d.ts +7 -0
- package/dist/lib/react/components/MarkdownBody.js +36 -0
- package/dist/lib/react/components/OptionGrid.d.ts +13 -0
- package/dist/lib/react/components/OptionGrid.js +21 -0
- package/dist/lib/react/components/Section.d.ts +7 -0
- package/dist/lib/react/components/Section.js +41 -0
- package/dist/lib/react/components/SeverityBadge.d.ts +7 -0
- package/dist/lib/react/components/SeverityBadge.js +14 -0
- package/dist/lib/react/index.d.ts +33 -0
- package/dist/lib/react/index.js +16 -0
- package/dist/lib/react/registry.d.ts +24 -0
- package/dist/lib/react/registry.js +1002 -0
- package/dist/lib/react/styles.css +1417 -0
- package/docs/component-protocol.md +273 -0
- package/docs/component-taxonomy.md +273 -0
- package/docs/design.md +239 -0
- package/docs/design.zh-CN.md +217 -0
- package/docs/naming.md +123 -0
- package/docs/testing.md +138 -0
- package/package.json +90 -0
package/package.json
ADDED
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "mdx-artifacts",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Build interactive MDX artifacts with reusable React components and a local CLI.",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"packageManager": "pnpm@10.33.0",
|
|
8
|
+
"engines": {
|
|
9
|
+
"node": ">=20"
|
|
10
|
+
},
|
|
11
|
+
"homepage": "https://github.com/Marsax110/mdx-artifacts#readme",
|
|
12
|
+
"bugs": {
|
|
13
|
+
"url": "https://github.com/Marsax110/mdx-artifacts/issues"
|
|
14
|
+
},
|
|
15
|
+
"repository": {
|
|
16
|
+
"type": "git",
|
|
17
|
+
"url": "git+https://github.com/Marsax110/mdx-artifacts.git"
|
|
18
|
+
},
|
|
19
|
+
"files": [
|
|
20
|
+
"dist/lib",
|
|
21
|
+
"agents",
|
|
22
|
+
"artifact-docs/examples/*.mdx",
|
|
23
|
+
"docs/*.md",
|
|
24
|
+
"README.md",
|
|
25
|
+
"README.zh-CN.md",
|
|
26
|
+
"LICENSE"
|
|
27
|
+
],
|
|
28
|
+
"exports": {
|
|
29
|
+
".": {
|
|
30
|
+
"types": "./dist/lib/react/index.d.ts",
|
|
31
|
+
"import": "./dist/lib/react/index.js"
|
|
32
|
+
},
|
|
33
|
+
"./react": {
|
|
34
|
+
"types": "./dist/lib/react/index.d.ts",
|
|
35
|
+
"import": "./dist/lib/react/index.js"
|
|
36
|
+
},
|
|
37
|
+
"./registry": {
|
|
38
|
+
"types": "./dist/lib/react/registry.d.ts",
|
|
39
|
+
"import": "./dist/lib/react/registry.js"
|
|
40
|
+
},
|
|
41
|
+
"./styles.css": "./dist/lib/react/styles.css"
|
|
42
|
+
},
|
|
43
|
+
"bin": {
|
|
44
|
+
"artifact-kit": "dist/lib/cli/index.js"
|
|
45
|
+
},
|
|
46
|
+
"scripts": {
|
|
47
|
+
"artifact": "tsx src/cli/index.ts",
|
|
48
|
+
"artifact:dev": "tsx src/cli/index.ts dev artifact-docs/examples/decision-matrix.mdx",
|
|
49
|
+
"artifact:build": "tsx src/cli/index.ts build artifact-docs/examples/decision-matrix.mdx",
|
|
50
|
+
"artifact:validate": "tsx src/cli/index.ts validate artifact-docs/examples/decision-matrix.mdx",
|
|
51
|
+
"storybook": "storybook dev -p 6106 --no-open",
|
|
52
|
+
"test": "vitest run",
|
|
53
|
+
"test:watch": "vitest",
|
|
54
|
+
"check": "pnpm typecheck && pnpm test && pnpm artifact:validate",
|
|
55
|
+
"typecheck": "tsc --noEmit",
|
|
56
|
+
"clean:lib": "rm -rf dist/lib",
|
|
57
|
+
"build:lib": "tsc -p tsconfig.build.json",
|
|
58
|
+
"build:esm": "node scripts/fix-dist-esm.mjs",
|
|
59
|
+
"build:styles": "cp src/react/styles.css dist/lib/react/styles.css",
|
|
60
|
+
"build:cli": "pnpm clean:lib && pnpm build:lib && pnpm build:esm && pnpm build:styles",
|
|
61
|
+
"pack:smoke": "node scripts/pack-smoke.mjs",
|
|
62
|
+
"prepack": "pnpm build:cli"
|
|
63
|
+
},
|
|
64
|
+
"dependencies": {
|
|
65
|
+
"@mdx-js/rollup": "^3.1.0",
|
|
66
|
+
"@radix-ui/react-tabs": "^1.1.13",
|
|
67
|
+
"@tailwindcss/vite": "^4.1.17",
|
|
68
|
+
"@vitejs/plugin-react": "^5.0.0",
|
|
69
|
+
"react-markdown": "^10.1.0",
|
|
70
|
+
"remark-gfm": "^4.0.1",
|
|
71
|
+
"tailwindcss": "^4.1.17",
|
|
72
|
+
"vite": "^7.0.0"
|
|
73
|
+
},
|
|
74
|
+
"peerDependencies": {
|
|
75
|
+
"react": ">=18.3.0 <20",
|
|
76
|
+
"react-dom": ">=18.3.0 <20"
|
|
77
|
+
},
|
|
78
|
+
"devDependencies": {
|
|
79
|
+
"@storybook/react-vite": "^10.3.6",
|
|
80
|
+
"@types/node": "^22.0.0",
|
|
81
|
+
"@types/react": "^19.0.0",
|
|
82
|
+
"@types/react-dom": "^19.0.0",
|
|
83
|
+
"react": "^19.0.0",
|
|
84
|
+
"react-dom": "^19.0.0",
|
|
85
|
+
"storybook": "^10.3.6",
|
|
86
|
+
"tsx": "^4.20.0",
|
|
87
|
+
"typescript": "^5.8.0",
|
|
88
|
+
"vitest": "^4.1.6"
|
|
89
|
+
}
|
|
90
|
+
}
|