import type { BindingContext, MountOptions, View } from './types'; /** * Mounts a reactive view to an element. * * @param selector - CSS selector or Element * @param context - Binding context with signals, computed, and functions * @param options - Mount options * @returns The mounted View instance * * @security **WARNING:** Directive expressions (bq-text, bq-if, bq-on, etc.) are evaluated * using `new Function()` at runtime. This means: * - Template attributes must come from trusted sources only * - NEVER load templates containing bq-* attributes from user input or untrusted APIs * - If you must use external templates, validate/sanitize attribute values first * * @example * ```ts * import { mount } from 'bquery/view'; * import { signal, computed } from 'bquery/reactive'; * * const name = signal('World'); * const greeting = computed(() => `Hello, ${name.value}!`); * const items = signal([ * { id: 1, text: 'Item 1' }, * { id: 2, text: 'Item 2' }, * ]); * * const view = mount('#app', { * name, * greeting, * items, * addItem: () => { * items.value = [...items.value, { id: Date.now(), text: 'New Item' }]; * }, * }); * * // Later, cleanup * view.destroy(); * ``` */ export declare const mount: (selector: string | Element, context: BindingContext, options?: MountOptions) => View; /** * Creates a reactive template function. * * @param template - HTML template string * @returns A function that creates a mounted element with the given context * * @example * ```ts * import { createTemplate } from 'bquery/view'; * import { signal } from 'bquery/reactive'; * * const TodoItem = createTemplate(` *