Skip to content

Commit 7968493

Browse files
JerryWu1234gioboa
andauthored
fix: add HTMLElementAttrs and SVGProps types to exports (#7510)
* fix: add HTMLElementAttrs and SVGProps types to exports * add cheng * change major into patch * export type in public.d.ts --------- Co-authored-by: Giorgio Boa <[email protected]>
1 parent 7ab8deb commit 7968493

File tree

6 files changed

+73
-6
lines changed

6 files changed

+73
-6
lines changed

.changeset/rich-shirts-thank.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@qwik.dev/core': patch
3+
---
4+
5+
FIX: add HTMLElementAttrs and SVGProps types to exports

packages/docs/src/routes/api/qwik/api.json

Lines changed: 30 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -686,6 +686,20 @@
686686
"editUrl": "https://github.com/QwikDev/qwik/tree/main/packages/qwik/src/core/shared/jsx/jsx-runtime.ts",
687687
"mdFile": "core.h.md"
688688
},
689+
{
690+
"name": "HTMLElementAttrs",
691+
"id": "htmlelementattrs",
692+
"hierarchy": [
693+
{
694+
"name": "HTMLElementAttrs",
695+
"id": "htmlelementattrs"
696+
}
697+
],
698+
"kind": "Interface",
699+
"content": "```typescript\nexport interface HTMLElementAttrs extends HTMLAttributesBase, FilterBase<HTMLElement> \n```\n**Extends:** HTMLAttributesBase, FilterBase&lt;HTMLElement&gt;",
700+
"editUrl": "https://github.com/QwikDev/qwik/tree/main/packages/qwik/src/core/shared/jsx/types/jsx-generated.ts",
701+
"mdFile": "core.htmlelementattrs.md"
702+
},
689703
{
690704
"name": "implicit$FirstArg",
691705
"id": "implicit_firstarg",
@@ -1318,7 +1332,7 @@
13181332
}
13191333
],
13201334
"kind": "TypeAlias",
1321-
"content": "The DOM props without plain handlers, for use inside functions\n\n\n```typescript\nexport type QwikHTMLElements = {\n [tag in keyof HTMLElementTagNameMap]: Augmented<HTMLElementTagNameMap[tag], SpecialAttrs[tag]> & HTMLElementAttrs & QwikAttributes<HTMLElementTagNameMap[tag]>;\n};\n```\n**References:** [QwikAttributes](#qwikattributes)",
1335+
"content": "The DOM props without plain handlers, for use inside functions\n\n\n```typescript\nexport type QwikHTMLElements = {\n [tag in keyof HTMLElementTagNameMap]: Augmented<HTMLElementTagNameMap[tag], SpecialAttrs[tag]> & HTMLElementAttrs & QwikAttributes<HTMLElementTagNameMap[tag]>;\n};\n```\n**References:** [HTMLElementAttrs](#htmlelementattrs)<!-- -->, [QwikAttributes](#qwikattributes)",
13221336
"editUrl": "https://github.com/QwikDev/qwik/tree/main/packages/qwik/src/core/shared/jsx/types/jsx-generated.ts",
13231337
"mdFile": "core.qwikhtmlelements.md"
13241338
},
@@ -1458,7 +1472,7 @@
14581472
}
14591473
],
14601474
"kind": "TypeAlias",
1461-
"content": "The SVG props without plain handlers, for use inside functions\n\n\n```typescript\nexport type QwikSVGElements = {\n [K in keyof Omit<SVGElementTagNameMap, keyof HTMLElementTagNameMap>]: SVGProps<SVGElementTagNameMap[K]>;\n};\n```",
1475+
"content": "The SVG props without plain handlers, for use inside functions\n\n\n```typescript\nexport type QwikSVGElements = {\n [K in keyof Omit<SVGElementTagNameMap, keyof HTMLElementTagNameMap>]: SVGProps<SVGElementTagNameMap[K]>;\n};\n```\n**References:** [SVGProps](#svgprops)",
14621476
"editUrl": "https://github.com/QwikDev/qwik/tree/main/packages/qwik/src/core/shared/jsx/types/jsx-generated.ts",
14631477
"mdFile": "core.qwiksvgelements.md"
14641478
},
@@ -2008,6 +2022,20 @@
20082022
"editUrl": "https://github.com/QwikDev/qwik/tree/main/packages/qwik/src/core/shared/jsx/types/jsx-generated.ts",
20092023
"mdFile": "core.svgattributes.md"
20102024
},
2025+
{
2026+
"name": "SVGProps",
2027+
"id": "svgprops",
2028+
"hierarchy": [
2029+
{
2030+
"name": "SVGProps",
2031+
"id": "svgprops"
2032+
}
2033+
],
2034+
"kind": "Interface",
2035+
"content": "```typescript\nexport interface SVGProps<T extends Element> extends SVGAttributes, QwikAttributes<T> \n```\n**Extends:** [SVGAttributes](#svgattributes)<!-- -->, [QwikAttributes](#qwikattributes)<!-- -->&lt;T&gt;",
2036+
"editUrl": "https://github.com/QwikDev/qwik/tree/main/packages/qwik/src/core/shared/jsx/types/jsx-generated.ts",
2037+
"mdFile": "core.svgprops.md"
2038+
},
20112039
{
20122040
"name": "sync$",
20132041
"id": "sync_",

packages/docs/src/routes/api/qwik/index.md

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1344,6 +1344,16 @@ any[]
13441344
13451345
[Edit this section](https://github.com/QwikDev/qwik/tree/main/packages/qwik/src/core/shared/jsx/jsx-runtime.ts)
13461346
1347+
## HTMLElementAttrs
1348+
1349+
```typescript
1350+
export interface HTMLElementAttrs extends HTMLAttributesBase, FilterBase<HTMLElement>
1351+
```
1352+
1353+
**Extends:** HTMLAttributesBase, FilterBase&lt;HTMLElement&gt;
1354+
1355+
[Edit this section](https://github.com/QwikDev/qwik/tree/main/packages/qwik/src/core/shared/jsx/types/jsx-generated.ts)
1356+
13471357
## implicit$FirstArg
13481358
13491359
Create a `____$(...)` convenience method from `___(...)`.
@@ -2593,7 +2603,7 @@ export type QwikHTMLElements = {
25932603
};
25942604
```
25952605
2596-
**References:** [QwikAttributes](#qwikattributes)
2606+
**References:** [HTMLElementAttrs](#htmlelementattrs), [QwikAttributes](#qwikattributes)
25972607
25982608
[Edit this section](https://github.com/QwikDev/qwik/tree/main/packages/qwik/src/core/shared/jsx/types/jsx-generated.ts)
25992609
@@ -2791,6 +2801,8 @@ export type QwikSVGElements = {
27912801
};
27922802
```
27932803
2804+
**References:** [SVGProps](#svgprops)
2805+
27942806
[Edit this section](https://github.com/QwikDev/qwik/tree/main/packages/qwik/src/core/shared/jsx/types/jsx-generated.ts)
27952807
27962808
## QwikSymbolEvent
@@ -8126,6 +8138,16 @@ _(Optional)_
81268138
81278139
[Edit this section](https://github.com/QwikDev/qwik/tree/main/packages/qwik/src/core/shared/jsx/types/jsx-generated.ts)
81288140
8141+
## SVGProps
8142+
8143+
```typescript
8144+
export interface SVGProps<T extends Element> extends SVGAttributes, QwikAttributes<T>
8145+
```
8146+
8147+
**Extends:** [SVGAttributes](#svgattributes), [QwikAttributes](#qwikattributes)&lt;T&gt;
8148+
8149+
[Edit this section](https://github.com/QwikDev/qwik/tree/main/packages/qwik/src/core/shared/jsx/types/jsx-generated.ts)
8150+
81298151
## sync$
81308152
81318153
Extract function into a synchronously loadable QRL.

packages/qwik/public.d.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,4 +78,6 @@ export {
7878
version,
7979
withLocale,
8080
SVGAttributes,
81+
HTMLElementAttrs,
82+
SVGProps,
8183
} from './dist/core-internal';

packages/qwik/src/core/core.api.md

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -336,6 +336,13 @@ function h<TYPE extends string | FunctionComponent<PROPS>, PROPS extends {} = {}
336336
export { h as createElement }
337337
export { h }
338338

339+
// Warning: (ae-forgotten-export) The symbol "HTMLAttributesBase" needs to be exported by the entry point index.d.ts
340+
// Warning: (ae-forgotten-export) The symbol "FilterBase" needs to be exported by the entry point index.d.ts
341+
//
342+
// @public (undocumented)
343+
export interface HTMLElementAttrs extends HTMLAttributesBase, FilterBase<HTMLElement> {
344+
}
345+
339346
// @internal @deprecated (undocumented)
340347
export const _IMMUTABLE: unique symbol;
341348

@@ -625,7 +632,6 @@ export type QwikFocusEvent<T = Element> = NativeFocusEvent;
625632

626633
// Warning: (ae-forgotten-export) The symbol "Augmented" needs to be exported by the entry point index.d.ts
627634
// Warning: (ae-forgotten-export) The symbol "SpecialAttrs" needs to be exported by the entry point index.d.ts
628-
// Warning: (ae-forgotten-export) The symbol "HTMLElementAttrs" needs to be exported by the entry point index.d.ts
629635
//
630636
// @public
631637
export type QwikHTMLElements = {
@@ -682,8 +688,6 @@ export type QwikPointerEvent<T = Element> = NativePointerEvent;
682688
// @public @deprecated (undocumented)
683689
export type QwikSubmitEvent<T = Element> = SubmitEvent;
684690

685-
// Warning: (ae-forgotten-export) The symbol "SVGProps" needs to be exported by the entry point index.d.ts
686-
//
687691
// @public
688692
export type QwikSVGElements = {
689693
[K in keyof Omit<SVGElementTagNameMap, keyof HTMLElementTagNameMap>]: SVGProps<SVGElementTagNameMap[K]>;
@@ -1550,6 +1554,10 @@ export interface SVGAttributes<T extends Element = Element> extends AriaAttribut
15501554
zoomAndPan?: string | undefined;
15511555
}
15521556

1557+
// @public (undocumented)
1558+
export interface SVGProps<T extends Element> extends SVGAttributes, QwikAttributes<T> {
1559+
}
1560+
15531561
// @public
15541562
export const sync$: <T extends Function>(fn: T) => SyncQRL<T>;
15551563

packages/qwik/src/core/index.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,8 @@ export type {
8585
QwikHTMLElements,
8686
QwikSVGElements,
8787
SVGAttributes,
88+
HTMLElementAttrs,
89+
SVGProps,
8890
} from './shared/jsx/types/jsx-generated';
8991
export { render } from './client/dom-render';
9092
export { getDomContainer, _getQContainerElement } from './client/dom-container';

0 commit comments

Comments
 (0)