@tairu/next/server
Tairu Next.js integration for route handlers.
Installation
npm install @tairu/next/server
Type Aliases
BoxElement
BoxProps
BoxProps:
object
Type declaration
children?
optionalchildren:ReactNode|BoxV0|TextV0| (BoxV0|TextV0)[]
style?
optionalstyle:BoxStyleV0
Context
Context:
object
Type declaration
revalidate()
revalidate: () =>
void
Returns
void
ImageElement
ImageElement:
ReactElement<ImageProps, typeofImage>
ImageProps
ImageProps:
object
Type declaration
alt
alt:
string
height
height:
number
src
src:
string
width
width:
number
Method
Method:
"GET"|"OPTIONS"|"POST"
NextHandler()
NextHandler: (
req) =>Promise<Response>
Parameters
req
NextRequest
Returns
Promise<Response>
NextHandlers
NextHandlers:
Record<Method,NextHandler>
OpenActionElement
OpenActionElement:
ReactElement<OpenActionProps, typeofOpenAction>
OpenActionProps
OpenActionProps:
object
Type declaration
label
label:
string
uri
uri:
string
OptionElement
OptionElement:
ReactElement<OptionProps, typeofOption>
OptionProps
OptionProps:
InputOptionV0
OptionsInputElement
OptionsInputElement:
ReactElement<OptionsInputProps, typeofOptionsInput>
OptionsInputProps
OptionsInputProps:
object
Type declaration
children
children:
OptionElement|OptionElement[]
multiple?
optionalmultiple:boolean
SignActionElement
SignActionElement:
ReactElement<SignActionProps, typeofSignAction>
SignActionProps
SignActionProps:
object
Type declaration
label
label:
string
payload?
optionalpayload:Record<string,unknown>
state?
optionalstate:Record<string,unknown>
SubmitActionElement
SubmitActionElement:
ReactElement<SubmitActionProps, typeofSubmitAction>
SubmitActionProps
SubmitActionProps:
object
Type declaration
label
label:
string
state?
optionalstate:Record<string,unknown>
TextElement
TextInputElement
TextInputElement:
ReactElement<TextInputProps, typeofTextInput>
TextInputProps
TextInputProps:
object
Type declaration
defaultValue?
optionaldefaultValue:string
label
label:
string
placeholder?
optionalplaceholder:string
secure?
optionalsecure:boolean
TextProps
TextProps:
object
Type declaration
children
style?
optionalstyle:TextStyleV0
TileElement
TileProps
TileProps:
BoxProps&TileMetaV0&object
Type declaration
actions?
optionalactions:TileActionsProp
input?
optionalinput:TileInputProp
Functions
Box()
Box(
props):ReactElement<BoxProps,string|JSXElementConstructor>
Parameters
props
Returns
ReactElement<BoxProps, string | JSXElementConstructor>
handle()
handle<
SearchParams>(tileHandler):NextHandlers
Type Parameters
• SearchParams extends ParamsRecord = ParamsRecord
Parameters
tileHandler
TileHandler<Record<string, never>, SearchParams, ValidTileInput, Context>
Returns
Image()
Image(
props):ReactElement<ImageProps,string|JSXElementConstructor>
Parameters
props
Returns
ReactElement<ImageProps, string | JSXElementConstructor>
OpenAction()
OpenAction(
props):ReactElement<OpenActionProps,string|JSXElementConstructor>
Parameters
props
Returns
ReactElement<OpenActionProps, string | JSXElementConstructor>
Option()
Option(
props):ReactElement<object,string|JSXElementConstructor>
Parameters
props
props.label
string
props.value
string | number | boolean
Returns
ReactElement<object, string | JSXElementConstructor>
label
label:
string
value
value:
string|number|boolean
OptionsInput()
OptionsInput(
props):DOMElement
Parameters
props
Returns
DOMElement
SignAction()
SignAction(
props):ReactElement<SignActionProps,string|JSXElementConstructor>
Parameters
props
Returns
ReactElement<SignActionProps, string | JSXElementConstructor>
SubmitAction()
SubmitAction(
props):ReactElement<SubmitActionProps,string|JSXElementConstructor>
Parameters
props
Returns
ReactElement<SubmitActionProps, string | JSXElementConstructor>
Text()
Text(
props):ReactElement<TextProps,string|JSXElementConstructor>
Parameters
props
Returns
ReactElement<TextProps, string | JSXElementConstructor>
TextInput()
TextInput(
props):ReactElement<TextInputProps,string|JSXElementConstructor>
Parameters
props
Returns
ReactElement<TextInputProps, string | JSXElementConstructor>
Tile()
Tile(
props):ReactElement<BoxProps&object&object,string|JSXElementConstructor>
Parameters
props
Returns
ReactElement<BoxProps & object & object, string | JSXElementConstructor>