{"id":26221720,"url":"https://github.com/centralmind/artifacts","last_synced_at":"2025-04-17T08:47:19.514Z","repository":{"id":253841412,"uuid":"844244237","full_name":"centralmind/artifacts","owner":"centralmind","description":"Artifact Viewer for Generative AI","archived":false,"fork":false,"pushed_at":"2024-08-27T09:41:24.000Z","size":171,"stargazers_count":6,"open_issues_count":1,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-03-29T06:04:49.497Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/@centralmind/artifacts","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/centralmind.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-08-18T20:10:07.000Z","updated_at":"2024-11-14T22:02:07.000Z","dependencies_parsed_at":"2024-08-27T10:53:41.534Z","dependency_job_id":"59167a5c-a3ab-496b-a765-81bd79f9b258","html_url":"https://github.com/centralmind/artifacts","commit_stats":null,"previous_names":["centralmind/artifacts"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/centralmind%2Fartifacts","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/centralmind%2Fartifacts/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/centralmind%2Fartifacts/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/centralmind%2Fartifacts/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/centralmind","download_url":"https://codeload.github.com/centralmind/artifacts/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249289777,"owners_count":21245017,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-03-12T16:29:20.132Z","updated_at":"2025-04-17T08:47:19.496Z","avatar_url":"https://github.com/centralmind.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# CentralMind Artifacts\n\n[![NPM version][npm-image]][npm-url]\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n\nArtifact viewer for Generative AI. The library provides a React component to compile and run any React or Vue.js code in a secure browser environment. [Tailwind CSS](https://tailwindcss.com/) styling and [shadcn/ui](https://ui.shadcn.com/) components are both supported.\n\n## Table of contents\n\n* [Installation](#Installation)\n* [Usage](#Usage)\n* [License](#license)\n\n## Installation\n\n```console\n$ npm install @centralmind/artifacts\n```\n\n## Usage\n\n### React Artifacts\n\n```tsx\nimport { ArtifactViewer } from '@centralmind/artifacts';\n\nconst files = {\n  '/app.tsx': `import { useState } from 'react';\nimport { Button } from \"@/components/ui/button\";\n\nexport default function App() {\n  const [count, setCount] = useState(0);\n\n  return (\n    \u003cdiv\u003e\n      \u003ch1 class=\"text-3xl font-bold\"\u003e{count}\u003c/h1\u003e\n      \u003cbr/\u003e\n      \u003cButton onClick={() =\u003e setCount(count + 1)}\u003eIncrement\u003c/Button\u003e\n    \u003c/div\u003e\n  );\n}`};\n\nexport default function App() {\n  return \u003cArtifactViewer files={files} /\u003e;\n}\n```\n\n### Vue.js Artifacts\n\n```tsx\nimport { ArtifactViewer } from '@centralmind/artifacts';\n\nconst files = {\n  '/app.vue': `\n\u003ctemplate\u003e\n  \u003cdiv id=\"app\"\u003e\n    \u003ch1\u003eHello World!\u003c/h1\u003e\n  \u003c/div\u003e\n\u003c/template\u003e\n\n\u003cscript\u003e\nexport default {\n  name: 'App',\n};\n\u003c/script\u003e\n\n\u003cstyle scoped\u003e\n#app {\n  text-align: center;\n  margin-top: 60px;\n}\n\nh1 {\n  color: #42b983;\n}\n\u003c/style\u003e\n`,\n};\n\nexport default function App() {\n  return \u003cArtifactViewer files={files} /\u003e;\n}\n```\n\n#### HTML Artifacts\n```tsx\nimport { ArtifactViewer } from '@centralmind/artifacts';\n\nconst files = {\n  '/index.html': `\n\u003c!DOCTYPE html\u003e\n\u003chtml lang=\"en\"\u003e\n\u003chead\u003e\n    \u003cmeta charset=\"UTF-8\"\u003e\n    \u003cmeta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\"\u003e\n    \u003ctitle\u003eHello World\u003c/title\u003e\n\u003c/head\u003e\n\u003cbody\u003e\n    \u003ch1\u003eHello, World!\u003c/h1\u003e\n    \u003cp\u003eThis is a simple HTML page that displays \"Hello, World!\"\u003c/p\u003e\n\u003c/body\u003e\n\u003c/html\u003e\n  `,\n};\n\nexport default function App() {\n  return \u003cArtifactViewer files={files} /\u003e;\n}\n```\n\n\n\n## License\n\n[MIT](LICENSE)\n\n[npm-url]: https://www.npmjs.com/package/@centralmind/artifacts\n[npm-image]: https://img.shields.io/npm/v/@centralmind/artifacts","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcentralmind%2Fartifacts","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcentralmind%2Fartifacts","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcentralmind%2Fartifacts/lists"}