From 1302bc66f5592b1eb58b7efd67c369d4e3f76fd5 Mon Sep 17 00:00:00 2001 From: Jerry_Wu <409187100@qq.com> Date: Fri, 11 Apr 2025 15:15:11 +0800 Subject: [PATCH 1/4] fix: add HTMLElementAttrs and SVGProps types to exports --- packages/docs/src/routes/api/qwik/api.json | 32 ++++++++++++++++++++-- packages/docs/src/routes/api/qwik/index.md | 24 +++++++++++++++- packages/qwik/src/core/core.api.md | 14 ++++++++-- packages/qwik/src/core/index.ts | 2 ++ 4 files changed, 66 insertions(+), 6 deletions(-) diff --git a/packages/docs/src/routes/api/qwik/api.json b/packages/docs/src/routes/api/qwik/api.json index f1099fda25c..117b3bbea70 100644 --- a/packages/docs/src/routes/api/qwik/api.json +++ b/packages/docs/src/routes/api/qwik/api.json @@ -672,6 +672,20 @@ "editUrl": "https://github.com/QwikDev/qwik/tree/main/packages/qwik/src/core/shared/jsx/jsx-runtime.ts", "mdFile": "core.h.md" }, + { + "name": "HTMLElementAttrs", + "id": "htmlelementattrs", + "hierarchy": [ + { + "name": "HTMLElementAttrs", + "id": "htmlelementattrs" + } + ], + "kind": "Interface", + "content": "```typescript\nexport interface HTMLElementAttrs extends HTMLAttributesBase, FilterBase \n```\n**Extends:** HTMLAttributesBase, FilterBase<HTMLElement>", + "editUrl": "https://github.com/QwikDev/qwik/tree/main/packages/qwik/src/core/shared/jsx/types/jsx-generated.ts", + "mdFile": "core.htmlelementattrs.md" + }, { "name": "implicit$FirstArg", "id": "implicit_firstarg", @@ -1304,7 +1318,7 @@ } ], "kind": "TypeAlias", - "content": "The DOM props without plain handlers, for use inside functions\n\n\n```typescript\nexport type QwikHTMLElements = {\n [tag in keyof HTMLElementTagNameMap]: Augmented & HTMLElementAttrs & QwikAttributes;\n};\n```\n**References:** [QwikAttributes](#qwikattributes)", + "content": "The DOM props without plain handlers, for use inside functions\n\n\n```typescript\nexport type QwikHTMLElements = {\n [tag in keyof HTMLElementTagNameMap]: Augmented & HTMLElementAttrs & QwikAttributes;\n};\n```\n**References:** [HTMLElementAttrs](#htmlelementattrs), [QwikAttributes](#qwikattributes)", "editUrl": "https://github.com/QwikDev/qwik/tree/main/packages/qwik/src/core/shared/jsx/types/jsx-generated.ts", "mdFile": "core.qwikhtmlelements.md" }, @@ -1444,7 +1458,7 @@ } ], "kind": "TypeAlias", - "content": "The SVG props without plain handlers, for use inside functions\n\n\n```typescript\nexport type QwikSVGElements = {\n [K in keyof Omit]: SVGProps;\n};\n```", + "content": "The SVG props without plain handlers, for use inside functions\n\n\n```typescript\nexport type QwikSVGElements = {\n [K in keyof Omit]: SVGProps;\n};\n```\n**References:** [SVGProps](#svgprops)", "editUrl": "https://github.com/QwikDev/qwik/tree/main/packages/qwik/src/core/shared/jsx/types/jsx-generated.ts", "mdFile": "core.qwiksvgelements.md" }, @@ -1994,6 +2008,20 @@ "editUrl": "https://github.com/QwikDev/qwik/tree/main/packages/qwik/src/core/shared/jsx/types/jsx-generated.ts", "mdFile": "core.svgattributes.md" }, + { + "name": "SVGProps", + "id": "svgprops", + "hierarchy": [ + { + "name": "SVGProps", + "id": "svgprops" + } + ], + "kind": "Interface", + "content": "```typescript\nexport interface SVGProps extends SVGAttributes, QwikAttributes \n```\n**Extends:** [SVGAttributes](#svgattributes), [QwikAttributes](#qwikattributes)<T>", + "editUrl": "https://github.com/QwikDev/qwik/tree/main/packages/qwik/src/core/shared/jsx/types/jsx-generated.ts", + "mdFile": "core.svgprops.md" + }, { "name": "sync$", "id": "sync_", diff --git a/packages/docs/src/routes/api/qwik/index.md b/packages/docs/src/routes/api/qwik/index.md index a82d3ab35fa..a79bf3cceb6 100644 --- a/packages/docs/src/routes/api/qwik/index.md +++ b/packages/docs/src/routes/api/qwik/index.md @@ -1333,6 +1333,16 @@ any[] [Edit this section](https://github.com/QwikDev/qwik/tree/main/packages/qwik/src/core/shared/jsx/jsx-runtime.ts) +## HTMLElementAttrs + +```typescript +export interface HTMLElementAttrs extends HTMLAttributesBase, FilterBase +``` + +**Extends:** HTMLAttributesBase, FilterBase<HTMLElement> + +[Edit this section](https://github.com/QwikDev/qwik/tree/main/packages/qwik/src/core/shared/jsx/types/jsx-generated.ts) + ## implicit$FirstArg Create a `____$(...)` convenience method from `___(...)`. @@ -2582,7 +2592,7 @@ export type QwikHTMLElements = { }; ``` -**References:** [QwikAttributes](#qwikattributes) +**References:** [HTMLElementAttrs](#htmlelementattrs), [QwikAttributes](#qwikattributes) [Edit this section](https://github.com/QwikDev/qwik/tree/main/packages/qwik/src/core/shared/jsx/types/jsx-generated.ts) @@ -2780,6 +2790,8 @@ export type QwikSVGElements = { }; ``` +**References:** [SVGProps](#svgprops) + [Edit this section](https://github.com/QwikDev/qwik/tree/main/packages/qwik/src/core/shared/jsx/types/jsx-generated.ts) ## QwikSymbolEvent @@ -8115,6 +8127,16 @@ _(Optional)_ [Edit this section](https://github.com/QwikDev/qwik/tree/main/packages/qwik/src/core/shared/jsx/types/jsx-generated.ts) +## SVGProps + +```typescript +export interface SVGProps extends SVGAttributes, QwikAttributes +``` + +**Extends:** [SVGAttributes](#svgattributes), [QwikAttributes](#qwikattributes)<T> + +[Edit this section](https://github.com/QwikDev/qwik/tree/main/packages/qwik/src/core/shared/jsx/types/jsx-generated.ts) + ## sync$ Extract function into a synchronously loadable QRL. diff --git a/packages/qwik/src/core/core.api.md b/packages/qwik/src/core/core.api.md index 37592cb6a3d..f271bf2d47a 100644 --- a/packages/qwik/src/core/core.api.md +++ b/packages/qwik/src/core/core.api.md @@ -325,6 +325,13 @@ function h, PROPS extends {} = {} export { h as createElement } export { h } +// Warning: (ae-forgotten-export) The symbol "HTMLAttributesBase" needs to be exported by the entry point index.d.ts +// Warning: (ae-forgotten-export) The symbol "FilterBase" needs to be exported by the entry point index.d.ts +// +// @public (undocumented) +export interface HTMLElementAttrs extends HTMLAttributesBase, FilterBase { +} + // @internal @deprecated (undocumented) export const _IMMUTABLE: unique symbol; @@ -614,7 +621,6 @@ export type QwikFocusEvent = NativeFocusEvent; // Warning: (ae-forgotten-export) The symbol "Augmented" needs to be exported by the entry point index.d.ts // Warning: (ae-forgotten-export) The symbol "SpecialAttrs" needs to be exported by the entry point index.d.ts -// Warning: (ae-forgotten-export) The symbol "HTMLElementAttrs" needs to be exported by the entry point index.d.ts // // @public export type QwikHTMLElements = { @@ -671,8 +677,6 @@ export type QwikPointerEvent = NativePointerEvent; // @public @deprecated (undocumented) export type QwikSubmitEvent = SubmitEvent; -// Warning: (ae-forgotten-export) The symbol "SVGProps" needs to be exported by the entry point index.d.ts -// // @public export type QwikSVGElements = { [K in keyof Omit]: SVGProps; @@ -1539,6 +1543,10 @@ export interface SVGAttributes extends AriaAttribut zoomAndPan?: string | undefined; } +// @public (undocumented) +export interface SVGProps extends SVGAttributes, QwikAttributes { +} + // @public export const sync$: (fn: T) => SyncQRL; diff --git a/packages/qwik/src/core/index.ts b/packages/qwik/src/core/index.ts index 50c3e232e4f..921188abe73 100644 --- a/packages/qwik/src/core/index.ts +++ b/packages/qwik/src/core/index.ts @@ -85,6 +85,8 @@ export type { QwikHTMLElements, QwikSVGElements, SVGAttributes, + HTMLElementAttrs, + SVGProps, } from './shared/jsx/types/jsx-generated'; export { render } from './client/dom-render'; export { getDomContainer, _getQContainerElement } from './client/dom-container'; From b02810552dead628d6ab3e78b64acd5897fdef42 Mon Sep 17 00:00:00 2001 From: Jerry_Wu <409187100@qq.com> Date: Fri, 11 Apr 2025 15:17:08 +0800 Subject: [PATCH 2/4] add cheng --- .changeset/rich-shirts-thank.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/rich-shirts-thank.md diff --git a/.changeset/rich-shirts-thank.md b/.changeset/rich-shirts-thank.md new file mode 100644 index 00000000000..39534df48a2 --- /dev/null +++ b/.changeset/rich-shirts-thank.md @@ -0,0 +1,5 @@ +--- +'@qwik.dev/core': major +--- + +FIX: add HTMLElementAttrs and SVGProps types to exports From d549682ed46a9f15b9ebb54fb6def0bfb211be80 Mon Sep 17 00:00:00 2001 From: JerryWu <409187100@qq.com> Date: Sun, 13 Apr 2025 10:51:39 +0800 Subject: [PATCH 3/4] change major into patch --- .changeset/rich-shirts-thank.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.changeset/rich-shirts-thank.md b/.changeset/rich-shirts-thank.md index 39534df48a2..51f3cd948e1 100644 --- a/.changeset/rich-shirts-thank.md +++ b/.changeset/rich-shirts-thank.md @@ -1,5 +1,5 @@ --- -'@qwik.dev/core': major +'@qwik.dev/core': patch --- FIX: add HTMLElementAttrs and SVGProps types to exports From 700906c9142cea7013ace45d91daac7bca9b1068 Mon Sep 17 00:00:00 2001 From: Jerry_Wu <409187100@qq.com> Date: Wed, 23 Apr 2025 11:14:56 +0800 Subject: [PATCH 4/4] export type in public.d.ts --- packages/qwik/public.d.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/qwik/public.d.ts b/packages/qwik/public.d.ts index 55008e659ce..f212731c4d9 100644 --- a/packages/qwik/public.d.ts +++ b/packages/qwik/public.d.ts @@ -78,4 +78,6 @@ export { version, withLocale, SVGAttributes, + HTMLElementAttrs, + SVGProps, } from './dist/core-internal';