From ffc998091c126f45b36c485f181bce2e5857ec8c Mon Sep 17 00:00:00 2001 From: Dirk Holtwick Date: Thu, 16 May 2024 15:30:15 +0200 Subject: [PATCH 1/2] fix: again fixing jsx types --- env.d.ts | 12 ++++++------ jsx-runtime/index.d.ts | 16 ++++++++++++++++ jsx-runtime/package.json | 31 ------------------------------- package.json | 18 +++++++++--------- src/index.browser.ts | 2 -- src/jsx-intrinsicelements.ts | 8 -------- src/jsx-runtime.ts | 2 -- 7 files changed, 31 insertions(+), 58 deletions(-) delete mode 100644 jsx-runtime/package.json delete mode 100644 src/jsx-intrinsicelements.ts diff --git a/env.d.ts b/env.d.ts index db7de5e..91d21cd 100644 --- a/env.d.ts +++ b/env.d.ts @@ -1,6 +1,6 @@ -declare namespace JSX { - /** See https://www.typescriptlang.org/docs/handbook/jsx.html#intrinsic-elements */ - interface IntrinsicElements { - [elemName: string]: any - } -} +// declare namespace JSX { +// /** See https://www.typescriptlang.org/docs/handbook/jsx.html#intrinsic-elements */ +// interface IntrinsicElements { +// [elemName: string]: any +// } +// } diff --git a/jsx-runtime/index.d.ts b/jsx-runtime/index.d.ts index b69253a..c3c2700 100644 --- a/jsx-runtime/index.d.ts +++ b/jsx-runtime/index.d.ts @@ -1 +1,17 @@ export type * from '../dist/jsx-runtime.d.ts' + +declare namespace React { + namespace JSX { + interface IntrinsicElements { + [elemName: string]: any + } + } +} + +declare global { + namespace JSX { + interface IntrinsicElements { + [elemName: string]: any + } + } +} diff --git a/jsx-runtime/package.json b/jsx-runtime/package.json deleted file mode 100644 index 1a56ed1..0000000 --- a/jsx-runtime/package.json +++ /dev/null @@ -1,31 +0,0 @@ -{ - "name": "zeed-dom/jsx-runtime", - "type": "module", - "version": "0.9.26", - "description": "🌱 Lightweight offline DOM", - "author": { - "name": "Dirk Holtwick", - "email": "dirk.holtwick@gmail.com", - "url": "https://holtwick.de" - }, - "license": "MIT", - "funding": { - "type": "GitHub Sponsors ❤", - "url": "https://github.com/sponsors/holtwick" - }, - "homepage": "https://github.com/holtwick/zeed-dom", - "repository": { - "type": "git", - "url": "https://github.com/holtwick/zeed-dom.git" - }, - "bugs": { - "url": "https://github.com/holtwick/zeed-dom/issues" - }, - "sideEffects": false, - "main": "index.cjs", - "module": "index.js", - "types": "index.d.ts", - "engines": { - "node": ">=14.13.1" - } -} diff --git a/package.json b/package.json index 40d74b6..05bcfd9 100644 --- a/package.json +++ b/package.json @@ -31,15 +31,16 @@ "default": "./dist/index.browser.js" }, "./jsx-runtime": { - "types": "./dist/jsx-runtime.d.ts", - "browser": "./dist/jsx-runtime.js", - "import": "./dist/jsx-runtime.js", - "require": "./dist/jsx-runtime.cjs" + "types": "./jsx-runtime/index.d.ts", + "browser": "./jsx-runtime/index.js", + "import": "./jsx-runtime/index.js", + "require": "./jsx-runtime/index.cjs" }, "./jsx-dev-runtime": { - "browser": "./dist/jsx-runtime.js", - "import": "./dist/jsx-runtime.js", - "require": "./dist/jsx-runtime.cjs" + "types": "./jsx-runtime/index.d.ts", + "browser": "./jsx-runtime/index.js", + "import": "./jsx-runtime/index.js", + "require": "./jsx-runtime/index.cjs" } }, "main": "dist/index.node.cjs", @@ -48,8 +49,7 @@ "types": "dist/index.node.d.ts", "files": [ "dist", - "jsx-runtime", - "env.d.ts" + "jsx-runtime" ], "engines": { "node": ">=14.13.1" diff --git a/src/index.browser.ts b/src/index.browser.ts index e1c6ff5..18e1999 100644 --- a/src/index.browser.ts +++ b/src/index.browser.ts @@ -1,5 +1,3 @@ -export * from './jsx-intrinsicelements' - export * from './vdom' export * from './h' export * from './utils' diff --git a/src/jsx-intrinsicelements.ts b/src/jsx-intrinsicelements.ts deleted file mode 100644 index 9ed84fe..0000000 --- a/src/jsx-intrinsicelements.ts +++ /dev/null @@ -1,8 +0,0 @@ -/* eslint-disable ts/no-namespace */ - -export declare namespace JSX { - /** See https://www.typescriptlang.org/docs/handbook/jsx.html#intrinsic-elements */ - interface IntrinsicElements { - [elemName: string]: any - } -} diff --git a/src/jsx-runtime.ts b/src/jsx-runtime.ts index 181dce4..65cdec7 100644 --- a/src/jsx-runtime.ts +++ b/src/jsx-runtime.ts @@ -1,7 +1,5 @@ import { h } from './html' -export * from './jsx-intrinsicelements' - // See // https://esbuild.github.io/api/#jsx-import-source // https://www.typescriptlang.org/tsconfig/#jsxImportSource From ba93893ed922165d7834e4722fdaf9d70dc15307 Mon Sep 17 00:00:00 2001 From: Dirk Holtwick Date: Thu, 16 May 2024 15:30:17 +0200 Subject: [PATCH 2/2] 0.13.2 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 05bcfd9..7137c2a 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "zeed-dom", "type": "module", - "version": "0.13.1", + "version": "0.13.2", "description": "🌱 Lightweight offline DOM", "author": { "name": "Dirk Holtwick",