import type { ComponentDebugOptions } from '@miurajs/miura-debugger'; import { MiuraElement } from "./miura-element"; import { type ContextKey } from "./context.js"; import { type Beacon, type Pulse } from './channels.js'; export interface ComponentOptions { tag?: string; } export interface PropertyOptions { type?: typeof String | typeof Number | typeof Boolean | typeof Array | typeof Object; default?: unknown; attribute?: string | false; reflect?: boolean; } export interface StateOptions { type?: typeof String | typeof Number | typeof Boolean | typeof Array | typeof Object; default?: unknown; } export interface SignalOptions { type?: typeof String | typeof Number | typeof Boolean | typeof Array | typeof Object; default?: unknown; } export interface GlobalOptions { key?: string | readonly (string | number)[]; initial?: unknown; } export interface BeaconOptions { channel?: Beacon; key?: string; } export interface PulseOptions { channel?: Pulse; key?: string; } export type ComponentDebugDecoratorOptions = ComponentDebugOptions; /** * Class decorator that registers the custom element * @example * @component({ tag: 'my-element' }) * class MyElement extends MiuraElement { ... } */ export declare function component(options: ComponentOptions): (target: T) => T; /** * Class decorator for component-specific debugger configuration. */ export declare function debug(options?: ComponentDebugDecoratorOptions): (target: T) => T; /** * Compatibility alias for earlier debugger decorator naming. */ export declare const componentDebug: typeof debug; /** * Property decorator for reactive properties that can be set via attributes * @example * @component({ tag: 'my-element' }) * class MyElement extends MiuraElement { * @property({ type: String, default: '' }) * name!: string; * } */ export declare function property(options?: PropertyOptions): (target: MiuraElement, propertyKey: string) => void; /** * State decorator for internal reactive state (not reflected to attributes) * @example * @component({ tag: 'my-element' }) * class MyElement extends MiuraElement { * @state({ default: false }) * isOpen!: boolean; * } */ export declare function state(options?: StateOptions): (target: MiuraElement, propertyKey: string) => void; /** * Local signal-backed field metadata. * * This is the decorator counterpart to `$signal()`, but field instances still * expose plain property syntax. Bindings can opt into fine-grained updates by * reading the backing signal through `this.$signalRef(name)`. */ export declare function signal(options?: SignalOptions): (target: MiuraElement, propertyKey: string) => void; /** * Property decorator that automatically consumes a context value from the DOM tree. * * This decorator uses a lazy getter mechanism which solves the "constructor bug" * (where context lookups fail because the element is not yet connected). * * @example * class MyElement extends MiuraElement { * @consume(MY_CONTEXT) * data!: MyContextType; * } */ export declare function consume(key: ContextKey): (target: MiuraElement, propertyKey: string) => void; /** * Early decorator scaffold for the upcoming shared global-state primitive. * * This stores only metadata for now so the public API can settle before the * runtime field wiring becomes permanent. */ export declare function global(options?: GlobalOptions): (target: MiuraElement, propertyKey: string) => void; /** * Early decorator scaffold for payload event channels. */ export declare function beacon(options?: BeaconOptions): (target: MiuraElement, propertyKey: string) => void; /** * Early decorator scaffold for void event channels. */ export declare function pulse(options?: PulseOptions): (target: MiuraElement, propertyKey: string) => void; //# sourceMappingURL=decorators.d.ts.map