DatastarPackageBase

zio.http.datastar.DatastarPackageBase

Attributes

Source
DatastarPackageBase.scala
Graph
Supertypes
trait Attributes
class Object
trait Matchable
class Any
Self type

Members list

Type members

Classlikes

implicit class DatastarEndpointOps[PathInput](endpoint: Endpoint[PathInput, _, _, _, _])

Attributes

Source
DatastarPackageBase.scala
Supertypes
class Object
trait Matchable
class Any
implicit class DatastarHeaderOps(header: Header.type)

Attributes

Source
DatastarPackageBase.scala
Supertypes
class Object
trait Matchable
class Any
implicit class EndpointExtensions(endpoint: Endpoint.type)

Attributes

Source
DatastarPackageBase.scala
Supertypes
class Object
trait Matchable
class Any
implicit class RequestOps(req: Request)

Attributes

Source
DatastarPackageBase.scala
Supertypes
class Object
trait Matchable
class Any

Value members

Concrete methods

Script element that loads Datastar from CDN using the version zio-http-datastar-sdk was built against.

Script element that loads Datastar from CDN using the version zio-http-datastar-sdk was built against.

Attributes

Example
head( datastarScript() )
Source
DatastarPackageBase.scala
def datastarScript(version: String): Script

Script element that loads Datastar from CDN using a specific version.

Script element that loads Datastar from CDN using a specific version.

Value parameters

version

The Datastar version to load (e.g., "1.0.1")

Attributes

Example
head( datastarScript("1.0.1") )
Source
DatastarPackageBase.scala
def event[R, In](h: Handler[R, Response, In, DatastarEvent]): Handler[R, Response, In, Response]

Attributes

Source
DatastarPackageBase.scala
def events[R, R1, In](h: Handler[R, Nothing, In, Unit])(implicit ev: R <:< (R1 & Datastar)): Handler[R1, Nothing, In, Response]

Attributes

Source
DatastarPackageBase.scala
def events[R, R1](e: ZIO[R, Nothing, Unit])(implicit ev: R <:< (R1 & Datastar)): ZIO[R1 & Scope, Nothing, ZStream[Any, Nothing, ServerSentEvent[String]]]

Attributes

Source
DatastarPackageBase.scala
def events[R](e: ZStream[R, Nothing, DatastarEvent]): ZIO[R, Nothing, ZStream[Any, Nothing, ServerSentEvent[String]]]

Attributes

Source
DatastarPackageBase.scala
def events[R, R1, In](h: Handler[R, Nothing, In, ZStream[R1, Nothing, DatastarEvent]]): Handler[R & R1, Nothing, In, Response]

Attributes

Source
DatastarPackageBase.scala
def mainPage(headContent: Seq[Dom], bodyContent: Seq[Dom], datastarVersion: String = ..., language: Option[String] = ...): Dom

Creates a complete HTML page template with a specific version of Datastar.

Creates a complete HTML page template with a specific version of Datastar.

Value parameters

bodyContent

Content for the body element

datastarVersion

The Datastar version to load

headContent

Additional content for the head element (e.g., meta tags, title, styles)

language

Language attribute for the html element

Attributes

Example
 mainPage( headContent = Seq( title("My App"), meta.charset("UTF-8")
 ), bodyContent = Seq( div("Hello, Datastar!") ), datastarVersion =
 "1.0.1", language = Some("en") ) 
Source
DatastarPackageBase.scala
def readSignals[T : Schema](request: Request): IO[String, T]

Attributes

Source
DatastarPackageBase.scala

Deprecated methods

def eventStream[R, R1](e: ZIO[R, Nothing, Unit])(implicit ev: R <:< (R1 & Datastar)): ZIO[R1 & Scope, Nothing, ZStream[Any, Nothing, ServerSentEvent[String]]]

Attributes

Deprecated
[Since version 3.6.0] Use events instead
Source
DatastarPackageBase.scala

Inherited methods

Attributes

Inherited from:
Attributes
Source
Attributes.scala
final def dataAttr(attr: String): DatastarAttribute

data-attr:* – Set arbitrary attributes. Doc: https://data-star.dev/reference/attributes#data-attr

data-attr:* – Set arbitrary attributes. Doc: https://data-star.dev/reference/attributes#data-attr

Attributes

Inherited from:
Attributes
Source
Attributes.scala

data-attr:* – Set arbitrary attributes. Doc: https://data-star.dev/reference/attributes#data-attr

data-attr:* – Set arbitrary attributes. Doc: https://data-star.dev/reference/attributes#data-attr

Attributes

Inherited from:
Attributes
Source
Attributes.scala

data-attr:* – Set arbitrary attributes. Doc: https://data-star.dev/reference/attributes#data-attr

data-attr:* – Set arbitrary attributes. Doc: https://data-star.dev/reference/attributes#data-attr

Attributes

Inherited from:
Attributes
Source
Attributes.scala
final def dataBind(caseModifier: CaseModifier): PartialDataBind

data-bind-* – Binds the given signal name to the value of input, select, textarea or web components. Doc: https://data-star.dev/reference/attributes#data-bind

data-bind-* – Binds the given signal name to the value of input, select, textarea or web components. Doc: https://data-star.dev/reference/attributes#data-bind

Attributes

Inherited from:
Attributes
Source
Attributes.scala

data-bind-* – Binds the given signal name to the value of input, select, textarea or web components. Doc: https://data-star.dev/reference/attributes#data-bind

data-bind-* – Binds the given signal name to the value of input, select, textarea or web components. Doc: https://data-star.dev/reference/attributes#data-bind

Attributes

Inherited from:
Attributes
Source
Attributes.scala
final def dataClass(caseModifier: CaseModifier)(className: String): Single

data-class – Dynamically toggle classes. Doc: https://data-star.dev/reference/attributes#data-class

data-class – Dynamically toggle classes. Doc: https://data-star.dev/reference/attributes#data-class

Attributes

Inherited from:
Attributes
Source
Attributes.scala
final def dataClass: DataClass

data-class – Dynamically toggle classes. Doc: https://data-star.dev/reference/attributes#data-class

data-class – Dynamically toggle classes. Doc: https://data-star.dev/reference/attributes#data-class

Attributes

Inherited from:
Attributes
Source
Attributes.scala
final def dataClass(className: String): Single

data-class – Dynamically toggle classes. Doc: https://data-star.dev/reference/attributes#data-class

data-class – Dynamically toggle classes. Doc: https://data-star.dev/reference/attributes#data-class

Attributes

Inherited from:
Attributes
Source
Attributes.scala
final def dataComputed(caseModifier: CaseModifier): PartialSignalAttr

data-computed – Computed values from expressions. Doc: https://data-star.dev/reference/attributes#data-computed

data-computed – Computed values from expressions. Doc: https://data-star.dev/reference/attributes#data-computed

Attributes

Inherited from:
Attributes
Source
Attributes.scala

data-computed – Computed values from expressions. Doc: https://data-star.dev/reference/attributes#data-computed

data-computed – Computed values from expressions. Doc: https://data-star.dev/reference/attributes#data-computed

Attributes

Inherited from:
Attributes
Source
Attributes.scala

data-effect – Side effects from expressions. Doc: https://data-star.dev/reference/attributes#data-effect

data-effect – Side effects from expressions. Doc: https://data-star.dev/reference/attributes#data-effect

Attributes

Inherited from:
Attributes
Source
Attributes.scala
final def dataIgnore: Attribute

data-ignore – Ignore this element and its children. Doc: https://data-star.dev/reference/attributes#data-ignore

data-ignore – Ignore this element and its children. Doc: https://data-star.dev/reference/attributes#data-ignore

Attributes

Inherited from:
Attributes
Source
Attributes.scala

data-ignore-morph – Ignore morphing for this element. Doc: https://data-star.dev/reference/attributes#data-ignore-morph

data-ignore-morph – Ignore morphing for this element. Doc: https://data-star.dev/reference/attributes#data-ignore-morph

Attributes

Inherited from:
Attributes
Source
Attributes.scala

like data-ignore, but only ignores this element and not its children. Doc: https://data-star.dev/reference/attributes#data-ignore

like data-ignore, but only ignores this element and not its children. Doc: https://data-star.dev/reference/attributes#data-ignore

Attributes

Inherited from:
Attributes
Source
Attributes.scala

data-indicator – Loading indicator. Doc: https://data-star.dev/reference/attributes#data-indicator

data-indicator – Loading indicator. Doc: https://data-star.dev/reference/attributes#data-indicator

Attributes

Inherited from:
Attributes
Source
Attributes.scala
final def dataInit: DataInit

data-init – Execute when element loads. Doc: https://data-star.dev/reference/attributes#data-init

data-init – Execute when element loads. Doc: https://data-star.dev/reference/attributes#data-init

Attributes

Inherited from:
Attributes
Source
Attributes.scala

data-json-signals – JSON signal declarations. Doc: https://data-star.dev/reference/attributes#data-json-signals

data-json-signals – JSON signal declarations. Doc: https://data-star.dev/reference/attributes#data-json-signals

Attributes

Inherited from:
Attributes
Source
Attributes.scala
final def dataOn: PartialDataOn

data-on* – Event listener. Doc: https://data-star.dev/reference/attributes#data-on

data-on* – Event listener. Doc: https://data-star.dev/reference/attributes#data-on

Attributes

Inherited from:
Attributes
Source
Attributes.scala

data-on-intersect – Execute when element intersects viewport. Doc: https://data-star.dev/reference/attributes#data-on-intersect

data-on-intersect – Execute when element intersects viewport. Doc: https://data-star.dev/reference/attributes#data-on-intersect

Attributes

Inherited from:
Attributes
Source
Attributes.scala

data-on-interval – Execute on interval. Doc: https://data-star.dev/reference/attributes#data-on-interval

data-on-interval – Execute on interval. Doc: https://data-star.dev/reference/attributes#data-on-interval

Attributes

Inherited from:
Attributes
Source
Attributes.scala

data-on-signal-patch – Execute when signal patches. Doc: https://data-star.dev/reference/attributes#data-on-signal-patch

data-on-signal-patch – Execute when signal patches. Doc: https://data-star.dev/reference/attributes#data-on-signal-patch

Attributes

Inherited from:
Attributes
Source
Attributes.scala

data-on-signal-patch-filter – Filter signal patch events. Doc: https://data-star.dev/reference/attributes#data-on-signal-patch-filter

data-on-signal-patch-filter – Filter signal patch events. Doc: https://data-star.dev/reference/attributes#data-on-signal-patch-filter

Attributes

Inherited from:
Attributes
Source
Attributes.scala
final def dataPreserveAttr(attribute: String, attributes: String*): Attribute

data-preserve-attr – Preserve attributes during morphing. Doc: https://data-star.dev/reference/attributes#data-preserve-attr

data-preserve-attr – Preserve attributes during morphing. Doc: https://data-star.dev/reference/attributes#data-preserve-attr

Attributes

Inherited from:
Attributes
Source
Attributes.scala
final def dataPreserveAttr(attribute: Attribute, attributes: Attribute*): Attribute

data-preserve-attr – Preserve attributes during morphing. Doc: https://data-star.dev/reference/attributes#data-preserve-attr

data-preserve-attr – Preserve attributes during morphing. Doc: https://data-star.dev/reference/attributes#data-preserve-attr

Attributes

Inherited from:
Attributes
Source
Attributes.scala
final def dataRef(caseModifier: CaseModifier): PartialDataRef

data-ref – Assign a local reference. Doc: https://data-star.dev/reference/attributes#data-ref

data-ref – Assign a local reference. Doc: https://data-star.dev/reference/attributes#data-ref

Attributes

Inherited from:
Attributes
Source
Attributes.scala
final def dataRef: PartialDataRef

data-ref – Assign a local reference. Doc: https://data-star.dev/reference/attributes#data-ref

data-ref – Assign a local reference. Doc: https://data-star.dev/reference/attributes#data-ref

Attributes

Inherited from:
Attributes
Source
Attributes.scala

data-show – Show element when expression truthy. Doc: https://data-star.dev/reference/attributes#data-show

data-show – Show element when expression truthy. Doc: https://data-star.dev/reference/attributes#data-show

Attributes

Inherited from:
Attributes
Source
Attributes.scala

data-signals – Declare / expose signals. Doc: https://data-star.dev/reference/attributes#data-signals

data-signals – Declare / expose signals. Doc: https://data-star.dev/reference/attributes#data-signals

Attributes

Inherited from:
Attributes
Source
Attributes.scala
final def dataStyle(styleName: String): DatastarAttribute

data-style:* – Dynamically set inline style(s). Doc: https://data-star.dev/reference/attributes#data-style

data-style:* – Dynamically set inline style(s). Doc: https://data-star.dev/reference/attributes#data-style

Attributes

Inherited from:
Attributes
Source
Attributes.scala

data-style – Dynamically set inline style(s). Doc: https://data-star.dev/reference/attributes#data-style

data-style – Dynamically set inline style(s). Doc: https://data-star.dev/reference/attributes#data-style

Attributes

Inherited from:
Attributes
Source
Attributes.scala

data-text – Sets element text content from an expression / signal. Doc: https://data-star.dev/reference/attributes#data-text

data-text – Sets element text content from an expression / signal. Doc: https://data-star.dev/reference/attributes#data-text

Attributes

Inherited from:
Attributes
Source
Attributes.scala

Deprecated and Inherited methods

final def dataOnLoad: DataOnLoad

data-on-load – Execute when element loads (deprecated, use dataInit). Doc: https://data-star.dev/reference/attributes#data-init

data-on-load – Execute when element loads (deprecated, use dataInit). Doc: https://data-star.dev/reference/attributes#data-init

Note: This is kept for binary compatibility. It generates the same data-init attribute.

Attributes

Deprecated
[Since version 3.6.0] Use dataInit instead of dataOnLoad
Inherited from:
Attributes
Source
Attributes.scala

Implicits

Implicits

final implicit def DatastarEndpointOps[PathInput](endpoint: Endpoint[PathInput, _, _, _, _]): DatastarEndpointOps[PathInput]

Attributes

Source
DatastarPackageBase.scala
final implicit def DatastarHeaderOps(header: Header.type): DatastarHeaderOps

Attributes

Source
DatastarPackageBase.scala
final implicit def EndpointExtensions(endpoint: Endpoint.type): EndpointExtensions

Attributes

Source
DatastarPackageBase.scala
final implicit def RequestOps(req: Request): RequestOps

Attributes

Source
DatastarPackageBase.scala