import type { ComponentDefinition } from './component-types'; import { type PropDef, prop } from './props'; export type { HostBindFn } from './host-bind'; export type { PropDef }; export { prop }; /** * Define and register a web component. * * The `setup` function runs for each connection and returns an `HTMLResult`. * Disconnecting disposes its state; reconnecting rebuilds it. All reactive * behaviour within a connection is expressed through directives inside the * template — not by re-evaluating setup itself. * * Everything besides `props` — lifecycle hooks, host bindings, context, slots, * emit — is a free function imported from `@vielzeug/ore` and called directly * from inside `setup()` (or from a composable it calls): * * ```ts * import { define, html, prop, onMounted, useEmit, useSlots } from '@vielzeug/ore'; * * define<{ count?: number }>('my-counter', { * props: { count: prop.number(0) }, * setup(props) { * const emit = useEmit<{ increment: number }>(); * const slots = useSlots<'header' | 'footer'>(); * * onMounted(() => console.log('mounted')); * * return html``; * }, * }); * ``` */ export declare function define = Record>(tag: string, definition: ComponentDefinition): void; //# sourceMappingURL=define.d.ts.map