front

package
v0.3.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 20, 2025 License: UNKNOWN not legal advice Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Include = include{}

Functions

func AttrRender

func AttrRender(ctx context.Context, w io.Writer, a Attr) error

Types

type After

type After struct {
	Name string
	Arg  any
}

func (*After) MarshalJSON

func (a *After) MarshalJSON() ([]byte, error)

func (*After) Set

func (a *After) Set(h http.Header) error

type Attr

type Attr interface {
	Init(context.Context, door.Core, instance.Core, *Attrs)
	templ.Component
}

type Attrs

type Attrs struct {
	common.Attrs
}

func A

func A(ctx context.Context, attr ...Attr) *Attrs

func NewAttrs

func NewAttrs() *Attrs

func (*Attrs) AppendCapture

func (a *Attrs) AppendCapture(capture Capture, hook *Hook)

func (*Attrs) AppendDyna

func (a *Attrs) AppendDyna(id uint64, name string)

func (*Attrs) Init

func (a *Attrs) Init(_ context.Context, _ door.Core, _ instance.Core, attrs *Attrs)

func (*Attrs) Join

func (a *Attrs) Join(attrs *Attrs) *Attrs

func (*Attrs) Render

func (a *Attrs) Render(ctx context.Context, w io.Writer) error

func (*Attrs) SetData

func (a *Attrs) SetData(name string, data any)

func (*Attrs) SetHook

func (a *Attrs) SetHook(name string, hook *Hook)

type Capture

type Capture interface {
	Name() string
	Listen() string
}

type ChangeCapture

type ChangeCapture struct {
}

func (*ChangeCapture) Listen

func (c *ChangeCapture) Listen() string

func (*ChangeCapture) Name

func (c *ChangeCapture) Name() string

type ChangeEvent

type ChangeEvent struct {
	Type      string     `json:"type"`
	Name      string     `json:"name"`
	Value     string     `json:"value"`
	Number    *float64   `json:"number"`
	Date      *time.Time `json:"date"`
	Selected  []string   `json:"selected"`
	Checked   bool       `json:"checked"`
	Timestamp time.Time  `json:"timestamp"`
}

type ErrorAction

type ErrorAction struct {
	// contains filtered or unexported fields
}

func IntoErrorAction

func IntoErrorAction(errorActor []OnError) []*ErrorAction

func OnErrorCall

func OnErrorCall(name string, meta json.RawMessage) *ErrorAction

func OnErrorIndicate

func OnErrorIndicate(d time.Duration, i []*Indicate) *ErrorAction

func (*ErrorAction) MarshalJSON

func (ea *ErrorAction) MarshalJSON() ([]byte, error)

type FocusCapture

type FocusCapture struct {
	Event string `json:"-"`
}

func (*FocusCapture) Listen

func (c *FocusCapture) Listen() string

func (*FocusCapture) Name

func (c *FocusCapture) Name() string

type FocusEvent

type FocusEvent struct {
	Type      string    `json:"type"`
	Timestamp time.Time `json:"timestamp"`
}

type FocusIOCapture

type FocusIOCapture struct {
	Event           string `json:"-"`
	StopPropagation bool   `json:"stopPropagation"`
}

func (*FocusIOCapture) Listen

func (c *FocusIOCapture) Listen() string

func (*FocusIOCapture) Name

func (c *FocusIOCapture) Name() string

type FormCapture

type FormCapture struct {
}

func (*FormCapture) Listen

func (c *FormCapture) Listen() string

func (*FormCapture) Name

func (c *FormCapture) Name() string

type Hook

type Hook struct {
	Error    []*ErrorAction
	Scope    []*ScopeSet
	Indicate []*Indicate
	*door.HookEntry
}

func (*Hook) MarshalJSON

func (h *Hook) MarshalJSON() ([]byte, error)

type Indicate

type Indicate struct {
	// contains filtered or unexported fields
}

func IndicateAttr

func IndicateAttr(s *Selector, name string, value string) *Indicate

func IndicateClass

func IndicateClass(s *Selector, class string) *Indicate

func IndicateClassRemove

func IndicateClassRemove(s *Selector, class string) *Indicate

func IndicateContent

func IndicateContent(s *Selector, content string) *Indicate

func IntoIndicate

func IntoIndicate(indicator []Indicator) []*Indicate

func (*Indicate) MarshalJSON

func (i *Indicate) MarshalJSON() ([]byte, error)

type Indicator

type Indicator interface {
	Indicate() *Indicate
}

type InputCapture

type InputCapture struct {
	ExcludeValue bool `json:"excludeValue"`
}

func (*InputCapture) Listen

func (c *InputCapture) Listen() string

func (*InputCapture) Name

func (c *InputCapture) Name() string

type InputEvent

type InputEvent struct {
	Type      string `json:"type"`
	Name      string `json:"name"`
	Data      string
	Date      *time.Time `json:"date"`
	Value     string     `json:"value"`
	Number    *float64   `json:"number"`
	Selected  []string   `json:"selected"`
	Checked   bool       `json:"checked"`
	Timestamp time.Time  `json:"timestamp"`
}

type KeyboardEvent

type KeyboardEvent struct {
	Type      string    `json:"type"`
	Key       string    `json:"key"`
	Code      string    `json:"code"`
	Repeat    bool      `json:"repeat"`
	CtrlKey   bool      `json:"ctrlKey"`
	ShiftKey  bool      `json:"shiftKey"`
	AltKey    bool      `json:"altKey"`
	MetaKey   bool      `json:"metaKey"`
	Timestamp time.Time `json:"timestamp"`
}

type KeyboardEventCapture

type KeyboardEventCapture struct {
	Event           string `json:"-"`
	PreventDefault  bool   `json:"preventDefault"`
	StopPropagation bool   `json:"stopPropagation"`
}

func (*KeyboardEventCapture) Listen

func (c *KeyboardEventCapture) Listen() string

func (*KeyboardEventCapture) Name

func (c *KeyboardEventCapture) Name() string

type LinkCapture

type LinkCapture struct {
	StopPropagation bool `json:"stopPropagation"`
}

func (*LinkCapture) Listen

func (c *LinkCapture) Listen() string

func (*LinkCapture) Name

func (c *LinkCapture) Name() string

type OnError

type OnError interface {
	ErrorAction() *ErrorAction
}

type PointerCapture

type PointerCapture struct {
	Event           string `json:"-"`
	PreventDefault  bool   `json:"preventDefault"`
	StopPropagation bool   `json:"stopPropagation"`
}

func (*PointerCapture) Listen

func (pc *PointerCapture) Listen() string

func (*PointerCapture) Name

func (pc *PointerCapture) Name() string

type PointerEvent

type PointerEvent struct {
	Type               string    `json:"type"`
	PointerID          int       `json:"pointerId"`
	Width              float64   `json:"width"`
	Height             float64   `json:"height"`
	Pressure           float64   `json:"pressure"`
	TangentialPressure float64   `json:"tangentialPressure"`
	TiltX              float64   `json:"tiltX"`
	TiltY              float64   `json:"tiltY"`
	Twist              float64   `json:"twist"`
	Buttons            int       `json:"buttons"`
	Button             int       `json:"button"`
	PointerType        string    `json:"pointerType"`
	IsPrimary          bool      `json:"isPrimary"`
	ClientX            float64   `json:"clientX"`
	ClientY            float64   `json:"clientY"`
	ScreenX            float64   `json:"screenX"`
	ScreenY            float64   `json:"screenY"`
	PageX              float64   `json:"pageX"`
	PageY              float64   `json:"pageY"`
	Timestamp          time.Time `json:"timestamp"`
}

type Scope

type Scope interface {
	Scope(inst instance.Core) *ScopeSet
}

type ScopeAutoId

type ScopeAutoId struct {
	// contains filtered or unexported fields
}

func (*ScopeAutoId) Id

func (s *ScopeAutoId) Id(inst instance.Core) string

type ScopeSet

type ScopeSet struct {
	Type string
	Id   string
	Opt  any
}

func BlockingScope

func BlockingScope(id string) *ScopeSet

func DebounceScope

func DebounceScope(id string, duration time.Duration, limit time.Duration) *ScopeSet

func FrameScope

func FrameScope(id string, frame bool) *ScopeSet

func FreeScope

func FreeScope(id string) *ScopeSet

func IntoScopeSet

func IntoScopeSet(inst instance.Core, scope []Scope) []*ScopeSet

func LatestScope

func LatestScope(id string) *ScopeSet

func SerialScope

func SerialScope(id string) *ScopeSet

func (*ScopeSet) MarshalJSON

func (s *ScopeSet) MarshalJSON() ([]byte, error)

type Selector

type Selector struct {
	// contains filtered or unexported fields
}

func SelectParentQuery

func SelectParentQuery(query string) *Selector

func SelectQuery

func SelectQuery(query string) *Selector

func SelectTarget

func SelectTarget() *Selector

func (*Selector) MarshalJSON

func (s *Selector) MarshalJSON() ([]byte, error)

type SelectorMode

type SelectorMode string
const (
	SelectModeTarget      SelectorMode = "target"
	SelectModeQuery       SelectorMode = "query"
	SelectModeParentQuery SelectorMode = "parent_query"
)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL