Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
"css-loader": "6.7.3",
"css-minimizer-webpack-plugin": "^4.2.2",
"dotenv": "16.0.3",
"eslint-plugin-nullstack": "0.0.12",
"eslint-plugin-nullstack": "0.0.26",
"express": "4.18.2",
"fs-extra": "11.1.0",
"lightningcss": "^1.19.0",
Expand Down
4 changes: 2 additions & 2 deletions types/ClientContext.d.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { NullstackEnvironment } from './Environment'
import { NullstackNode } from './JSX'
import { NullstackFragment } from './JSX'
import { NullstackPage } from './Page'
import { NullstackParams } from './Params'
import { NullstackProject } from './Project'
Expand Down Expand Up @@ -98,7 +98,7 @@ export type NullstackClientContext<TProps = unknown> = TProps & {
*
* @see https://nullstack.app/renderable-components#components-with-children
*/
children: NullstackNode
children: NullstackFragment

/**
* Bind object.
Expand Down
16 changes: 12 additions & 4 deletions types/JSX.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -577,10 +577,14 @@ type AriaRole =
| 'treeitem'
| (string & {})

type Falsy = false | 0 | '' | null | undefined
type CssClass = string | Falsy | Array<string | Falsy>
type CssStyle = string | Falsy | Array<string | Falsy>

export interface HTMLAttributes<T> extends AriaAttributes, DOMAttributes<T> {
// Standard HTML Attributes
accesskey?: string
class?: string | string[]
class?: CssClass
contenteditable?: Booleanish | 'inherit'
contextmenu?: string
dir?: string
Expand All @@ -591,7 +595,7 @@ export interface HTMLAttributes<T> extends AriaAttributes, DOMAttributes<T> {
placeholder?: string
slot?: string
spellcheck?: Booleanish
style?: string
style?: CssStyle
tabindex?: number | string
title?: string
translate?: 'yes' | 'no'
Expand Down Expand Up @@ -1188,7 +1192,7 @@ export interface VideoHTMLAttributes<T> extends MediaHTMLAttributes<T> {
// - union of string literals
export interface SVGAttributes<T> extends AriaAttributes, DOMAttributes<T> {
// Attributes which also defined in HTMLAttributes
class?: string | string[]
class?: CssClass
color?: string
height?: number | string
id?: string
Expand All @@ -1198,7 +1202,7 @@ export interface SVGAttributes<T> extends AriaAttributes, DOMAttributes<T> {
method?: string
min?: number | string
name?: string
style?: string
style?: CssStyle
target?: string
type?: string
width?: number | string
Expand Down Expand Up @@ -1426,5 +1430,9 @@ declare global {
}

interface IntrinsicElements extends ExoticElements, AllElements {}

interface ElementChildrenAttribute {
children: NullstackNode
}
}
}