{"id":18141437,"url":"https://github.com/potahtml/namespace-jsx-project","last_synced_at":"2025-04-22T13:11:07.561Z","repository":{"id":260653087,"uuid":"862710753","full_name":"potahtml/namespace-jsx-project","owner":"potahtml","description":"Table listing TypeScript types for `namespace JSX` for many frameworks  https://potahtml.github.io/namespace-jsx-project/index.html","archived":false,"fork":false,"pushed_at":"2025-04-16T10:10:36.000Z","size":1522,"stargazers_count":11,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-16T13:19:05.731Z","etag":null,"topics":["html","html-types","javascript","jsx","namespace-jsx","types","types-library","typescript-definitions"],"latest_commit_sha":null,"homepage":"https://potahtml.github.io/namespace-jsx-project/index.html","language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/potahtml.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":null,"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},"funding":{"github":["titoBouzout"],"patreon":null,"open_collective":"tito-bouzout","ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"lfx_crowdfunding":null,"polar":null,"custom":null}},"created_at":"2024-09-25T04:13:21.000Z","updated_at":"2025-04-16T10:10:41.000Z","dependencies_parsed_at":"2024-11-01T16:28:37.299Z","dependency_job_id":"675836e9-785d-499e-b10d-89dc7cf5e85d","html_url":"https://github.com/potahtml/namespace-jsx-project","commit_stats":null,"previous_names":["potahtml/namespace-jsx-project"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/potahtml%2Fnamespace-jsx-project","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/potahtml%2Fnamespace-jsx-project/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/potahtml%2Fnamespace-jsx-project/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/potahtml%2Fnamespace-jsx-project/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/potahtml","download_url":"https://codeload.github.com/potahtml/namespace-jsx-project/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250246727,"owners_count":21398919,"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":["html","html-types","javascript","jsx","namespace-jsx","types","types-library","typescript-definitions"],"created_at":"2024-11-01T17:06:54.451Z","updated_at":"2025-04-22T13:11:07.545Z","avatar_url":"https://github.com/potahtml.png","language":"HTML","funding_links":["https://github.com/sponsors/titoBouzout","https://opencollective.com/tito-bouzout"],"categories":[],"sub_categories":[],"readme":"# The `namespace JSX` Project\n\n## Context\n\n`namespace JSX` provides typings for `attributes` and `properties` in\nHTML tags for various frameworks. This includes things like alignment\nstyles or event listeners.\n\n_Typings_ is a loaded term, some expect\n`FunctionMaybe\u003c'left' | 'center' | 'right'\u003e` while others are content\nwith just `'left' | 'center' | 'right'`.\n\nThe core of the issue is that everything is based on the same\nunderlying data, `'left' | 'center' | 'right'`, as these possible\nvalues come from the HTML specification and browser implementations.\n\nDespite my best efforts, I couldn't find a comprehensive source, such\nas a JSON file, listing all tag names with their associated\nattributes/properties, possible values, descriptions, deprecation\nnotices, and links.\n\nOne might expect this information to be available from the\nspecification, TypeScript, or MDN. However, that doesn't seem to be\nthe case. While MDN has made efforts to provide such a resource, it\nremains incomplete and somewhat disorganized.\n\nThe most _reliable_, _complete_ and _condensed_ source of data comes\nfrom the `namespace JSX` files of various modern JavaScript\nframeworks.\n\nUnfortunately, a `namespace JSX` files tend to be a \"write once and\nforget\" files, rarely updated unless the project becomes widely\nadopted. This is because there's no efficient way to generate or track\nupdates for these files automatically.\n\n## Goals\n\nThe ultimate goal of this project is to inspire the powers that\nbe—HTML specification authors, MDN contributors, and TypeScript\nmaintainers—to collaborate and provide this data in an easily\nconsumable format.\n\n## The Project\n\nThis project helps track some of the most popular frameworks\n`namespace JSX` by parsing, mapping (when necessary), and merging\ntheir interfaces into a unified structure. It also uses VSCode\nLSP-HTML and brute forces Chrome/Firefox element setters to see if a\nproperty is reflected as an attribute.\n\nThis makes it easier to quickly track and visualize whether any\nattribute or property for an HTML, SVG, or MathML element has been\nadded or updated. So far, that's better than nothing.\n\nAn attempt to unify the efforts dedicated to updating this data.\n\nSince this project maps interfaces for tag names, attributes, and\npossible values, there's potential to enhance this data by adding\ndescriptions for what each attribute or property does, deprecation\nnotices, links to MDN, and more.\n\nIt's an ambitious, complex, and tedious task(—likely the reason why\nsuch a comprehensive data file doesn't exist yet).\n\nYou can see the current table at\nhttps://potahtml.github.io/namespace-jsx-project/index.html\n\nTheres a `data.json` at\nhttps://github.com/potahtml/namespace-jsx-project/blob/master/jsx/data.json\nwhich can be used to generate types.\n\n## Frameworks\n\nList of frameworks so far: Solid, Voby, Pota, Vue, Preact, React.\n\n## Usage\n\nTo use this project, simply use `./jsx/data.json` or check the commit\nlist for this file\nhttps://github.com/potahtml/namespace-jsx-project/commits/master/jsx/data.json\n. Over time, I will be committing \"updates\" that show the diffs\nwhenever a framework's `namespace JSX` changes. At least, that's the\nidea!\n\n## Generating the data\n\n1. Clone this repository and run `npm install`.\n\n2. Run `npm run dev`. This will create a jsx directory containing\n   numerous `.d.ts` files, generated by parsing and merging the\n   `namespace JSX` data from different frameworks.\n\n3. Periodically, run `npm run dev`. This will generate new data and\n   show diffs, allowing you to see whether you need to update your own\n   `namespace JSX`. The data from frameworks come from their repos,\n   live.\n\n4. It may be possible that you run into a random error with puppeteer,\n   on which case you just run the whole thing again. Theres also the\n   need to install firefox via puppeteer. Then command is given to you\n   by a console error from puppeteer.\n\n## TODO\n\n- add global attributes\n\n## Related\n\n- https://github.com/microsoft/TypeScript-DOM-lib-generator\n- https://github.com/microsoft/vscode-custom-data\n- https://github.com/mdn/data\n- https://github.com/w3c/browser-specs\n- https://github.com/w3c/webref\n\n## Sponsors\n\nWith enough support, I'll be able to dedicate more time to this\nproject.\n\n\u003ca href=\"https://www.solidjs.com/\" target=\"_blank\"\u003e\u003cimg src=\"https://www.solidjs.com/img/logo/without-wordmark/logo.png\" width=\"100\"\u003e\u003c/a\u003e\n\nSponsors welcome at https://opencollective.com/tito-bouzout thanks!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpotahtml%2Fnamespace-jsx-project","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpotahtml%2Fnamespace-jsx-project","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpotahtml%2Fnamespace-jsx-project/lists"}