@xemahq/realtime-events
v0.1.1
Published
<p align="center"> <svg width="680" height="120" viewBox="0 0 680 120" fill="none" xmlns="http://www.w3.org/2000/svg" role="img" aria-label="@xemahq/realtime-events"> <rect width="680" height="120" rx="14" fill="#0B1020"/> <g transform="translate(28,3
Readme
@xemahq/realtime-events
Shared contract and helpers for the realtime SSE stream
Overview
The framework-agnostic contract for the unified realtime SSE stream — no DOM, no NestJS. It defines the event-type strings, frame shapes, channel definitions, and small registry helpers that derive subscription patterns and the known-types set from a descriptor registry. Producers publish against these shapes and the frontend imports the same definitions to route incoming frames. Dependency-light by design.
When to use it
- Use it when a producer or a frontend needs the shared realtime frame and channel definitions.
Installation
pnpm add @xemahq/realtime-eventsUsage
import { subscribedPatternsFromRegistry } from '@xemahq/realtime-events';
const patterns = subscribedPatternsFromRegistry(descriptors);License
Apache-2.0 © Xema — xema.dev
