Core API

The wijjit.core package glues together every subsystem in the runtime—views, rendering, events, focus, overlays, wiring, and notifications. Use this reference when extending framework behaviour or embedding Wijjit inside another application.

Application lifecycle

wijjit.core.app.Wijjit

Main Wijjit application class.

Inline rendering

The wijjit.inline module provides APIs for rendering Wijjit templates without entering alternate screen mode. Content is output directly to terminal scrollback.

wijjit.render_inline(template, *, width=None, height='auto', print_output=True, file=None, **context)

One-shot template rendering to stdout. See Inline Rendering.

class wijjit.InlineApp(template, *, height='auto', width=None, initial_state=None, refresh_interval=0.1, enable_input=False, quit_key='ctrl+q')

Async context manager for interactive inline displays with reactive state. See Inline Rendering.

Event loop & routing

wijjit.core.event_loop.EventLoop

Main event loop for Wijjit applications.

wijjit.core.view_router.ViewRouter

Manages view registration and navigation.

wijjit.core.view_router.ViewConfig

Configuration for a view.

wijjit.core.renderer.Renderer

Template renderer using Jinja2.

wijjit.core.render_context.RenderContext

Consolidated rendering context for template processing.

View templating

Flask-style helpers a view function returns to describe what to render. See Templates & Tags.

wijjit.core.templating.RenderedView

Immutable result of a view function describing what to render.

wijjit.render_template_string(source, /, **context)

Render an inline template string with the given context, returning a RenderedView. state is auto-injected.

wijjit.render_template(name, /, **context)

Render a template file (loaded from the configured template_dir / auto-discovered templates/ directory) with the given context, returning a RenderedView.

Virtual DOM & Reconciliation

wijjit.core.vdom.VNode

Immutable description of a UI element.

wijjit.core.vdom.VNodeBuilder

Mutable builder for constructing VNode trees during template execution.

wijjit.core.reconciler.Reconciler

Reconciles old and new VNode trees, producing a patched Element tree.

wijjit.core.reconciler.DiffType

Types of differences detected during reconciliation.

wijjit.core.element_registry.ElementRegistry

Registry mapping VNode types to Element factories.

Interaction managers

wijjit.core.focus.FocusManager

Manages focus across UI elements.

wijjit.core.hover.HoverManager

Manages hover state across UI elements.

wijjit.core.mouse_router.MouseEventRouter

Routes mouse events to appropriate handlers.

wijjit.core.overlay.OverlayManager

Manages overlay rendering, z-indexing, and event routing.

wijjit.core.notification_manager.NotificationManager

Manager for notification stack and lifecycle.

wijjit.core.wiring.ElementWiringManager

Manages element callback wiring and state binding.

Supporting structures

wijjit.core.overlay.LayerType

Layer types for z-index management.

wijjit.core.overlay.Overlay

Represents a UI overlay (modal, dropdown, tooltip, etc.).