Skip to content
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/rich-shirts-thank.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@qwik.dev/core': patch
---

FIX: add HTMLElementAttrs and SVGProps types to exports
32 changes: 30 additions & 2 deletions packages/docs/src/routes/api/qwik/api.json
Original file line number Diff line number Diff line change
Expand Up @@ -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<HTMLElement> \n```\n**Extends:** HTMLAttributesBase, FilterBase&lt;HTMLElement&gt;",
"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",
Expand Down Expand Up @@ -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<HTMLElementTagNameMap[tag], SpecialAttrs[tag]> & HTMLElementAttrs & QwikAttributes<HTMLElementTagNameMap[tag]>;\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<HTMLElementTagNameMap[tag], SpecialAttrs[tag]> & HTMLElementAttrs & QwikAttributes<HTMLElementTagNameMap[tag]>;\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"
},
Expand Down Expand Up @@ -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<SVGElementTagNameMap, keyof HTMLElementTagNameMap>]: SVGProps<SVGElementTagNameMap[K]>;\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<SVGElementTagNameMap, keyof HTMLElementTagNameMap>]: SVGProps<SVGElementTagNameMap[K]>;\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"
},
Expand Down Expand Up @@ -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<T extends Element> extends SVGAttributes, QwikAttributes<T> \n```\n**Extends:** [SVGAttributes](#svgattributes)<!-- -->, [QwikAttributes](#qwikattributes)<!-- -->&lt;T&gt;",
"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_",
Expand Down
24 changes: 23 additions & 1 deletion packages/docs/src/routes/api/qwik/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -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<HTMLElement>
```

**Extends:** HTMLAttributesBase, FilterBase&lt;HTMLElement&gt;

[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 `___(...)`.
Expand Down Expand Up @@ -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)

Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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<T extends Element> extends SVGAttributes, QwikAttributes<T>
```

**Extends:** [SVGAttributes](#svgattributes), [QwikAttributes](#qwikattributes)&lt;T&gt;

[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.
Expand Down
14 changes: 11 additions & 3 deletions packages/qwik/src/core/core.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -325,6 +325,13 @@ function h<TYPE extends string | FunctionComponent<PROPS>, 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<HTMLElement> {
}

// @internal @deprecated (undocumented)
export const _IMMUTABLE: unique symbol;

Expand Down Expand Up @@ -614,7 +621,6 @@ export type QwikFocusEvent<T = Element> = 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 = {
Expand Down Expand Up @@ -671,8 +677,6 @@ export type QwikPointerEvent<T = Element> = NativePointerEvent;
// @public @deprecated (undocumented)
export type QwikSubmitEvent<T = Element> = 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<SVGElementTagNameMap, keyof HTMLElementTagNameMap>]: SVGProps<SVGElementTagNameMap[K]>;
Expand Down Expand Up @@ -1539,6 +1543,10 @@ export interface SVGAttributes<T extends Element = Element> extends AriaAttribut
zoomAndPan?: string | undefined;
}

// @public (undocumented)
export interface SVGProps<T extends Element> extends SVGAttributes, QwikAttributes<T> {
}

// @public
export const sync$: <T extends Function>(fn: T) => SyncQRL<T>;

Expand Down
2 changes: 2 additions & 0 deletions packages/qwik/src/core/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down