{"id":28217882,"url":"https://github.com/maxchang3/jsx-dom","last_synced_at":"2026-02-14T22:05:33.406Z","repository":{"id":291787600,"uuid":"978782587","full_name":"maxchang3/jsx-dom","owner":"maxchang3","description":"A browser and userscript-friendly repackaging of jsx-dom.","archived":false,"fork":false,"pushed_at":"2025-05-06T15:01:30.000Z","size":28,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-12T16:44:33.748Z","etag":null,"topics":["dom","jacascript","jsx","styled-components","typescript","userscript-library"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/maxchang3.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,"zenodo":null}},"created_at":"2025-05-06T13:57:05.000Z","updated_at":"2025-05-07T15:41:24.000Z","dependencies_parsed_at":"2025-05-06T15:06:14.070Z","dependency_job_id":"3d858a99-4c80-4df6-99a2-a50da63b36b3","html_url":"https://github.com/maxchang3/jsx-dom","commit_stats":null,"previous_names":["maxchang3/jsx-dom"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/maxchang3/jsx-dom","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maxchang3%2Fjsx-dom","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maxchang3%2Fjsx-dom/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maxchang3%2Fjsx-dom/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maxchang3%2Fjsx-dom/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/maxchang3","download_url":"https://codeload.github.com/maxchang3/jsx-dom/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maxchang3%2Fjsx-dom/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29457869,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-14T21:29:27.764Z","status":"ssl_error","status_checked_at":"2026-02-14T21:28:11.111Z","response_time":53,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["dom","jacascript","jsx","styled-components","typescript","userscript-library"],"created_at":"2025-05-18T01:09:39.709Z","updated_at":"2026-02-14T22:05:33.402Z","avatar_url":"https://github.com/maxchang3.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# @maxchang/jsx-dom\n\n[![npm](https://img.shields.io/npm/v/@maxchang/jsx-dom.svg?style=flat-square\u0026color=444)](https://www.npmjs.com/package/@maxchang/jsx-dom)\n[![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/maxchang3/jsx-dom/ci.yml?style=flat-square\u0026label=CI)](https://github.com/maxchang3/jsx-dom/actions)\n[![Checked with Biome](https://img.shields.io/badge/Checked_with-Biome-60a5fa?style=flat-square\u0026logo=biome)](https://biomejs.dev)\n\nA browser and userscript-friendly repackaging of [alex-kinokon/jsx-dom](https://github.com/alex-kinokon/jsx-dom).\n\n\n## What is `jsx-dom`?\n\nA lightweight wrapper around `document.createElement` that lets you create DOM elements using JSX syntax, eliminating tedious imperative code. Particularly valuable for userscripts that need to dynamically generate DOM elements.\n\n## Features\n\n- **UMD Support**: Allows loading directly from a CDN in userscripts via @require.\n- **ESM Retained**: Keeps the ESM build for benefits like HMR and optional bundling.\n  - Improves DX, especially for projects using [vite-plugin-monkey](https://github.com/lisonge/vite-plugin-monkey).\n\n## Installation\n\n```sh\npnpm add @maxchang/jsx-dom\n```\n\n```sh\nyarn add @maxchang/jsx-dom\n```\n\n```sh\nnpm install @maxchang/jsx-dom\n```\n\n## Usage \n\nSee [userscript-tsx-starter](https://github.com/maxchang3/userscript-tsx-starter) for a complete example of using `vite-plugin-monkey` with `@maxchang/jsx-dom`.\n\nReference [jsx-dom](https://github.com/alex-kinokon/jsx-dom#usage).\n\n```jsonc\n// tsconfig.json\n{\n  \"jsx\": \"preserve\",\n  \"jsxImportSource\": \"@maxchang/jsx-dom\",\n}\n```\n\n```js\n// esbuild\n{\n  jsxInject: `import React from \"@maxchang/jsx-dom\"`,\n  jsx: 'transform',\n}\n```\n\n```js\n// vite.config.js\n{\n    plugins: [\n        monkey({\n          //...\n            build: {\n                externalGlobals: {\n                    '@maxchang/jsx-dom': cdn.jsdelivrFastly(`jsxDOM.default`, `dist/index.js`),\n                },\n            },\n        }),\n    ],\n}\n```\n\n## Why Not ...?\n\n- alex-kinokon's [jsx-dom](https://github.com/alex-kinokon/jsx-dom)\n  - No UMD support, only ESM. Cannot be used in userscripts via `@require` a CDN.\n- violentmonkey's [vm-dom](https://github.com/violentmonkey/vm-dom)\n  - Based on `@gera2ld/jsx-dom`, which is not actively maintained.\n  - Do not have type definitions for `jsx-runtime`.\n\n## License\n\nThis project is licensed under the BSD 3-Clause License, the same as [jsx-dom](https://github.com/alex-kinokon/jsx-dom).\n\nSee [LICENSE](./LICENSE) for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaxchang3%2Fjsx-dom","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmaxchang3%2Fjsx-dom","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaxchang3%2Fjsx-dom/lists"}