/** * Trellis Vue — schema-typed, live entity composables. * * The Vue half of the typed read surface. Identical semantics to * `trellis/react/typed`, bridging the same Signal-first {@link liveEntities} * (live subscription + hydration) into Vue's reactivity via `shallowRef` + * `onScopeDispose`. Shipped under `trellis/vue/typed`. * * import { defineType } from 'trellis/schema'; * import { useEntities, useMutation } from 'trellis/vue/typed'; * * const sections = useEntities(client, NavSection); // ComputedRef<{ data, loading, error }> * const nav = useMutation(client, NavSection); * * @module trellis/vue/typed */ import { type ComputedRef } from 'vue'; import { type LiveEntitiesOptions, type LiveEntityOptions } from '../client/live.js'; import type { TrellisDb } from '../client/sdk.js'; import { type EntityMutations } from '../schema/mutations.js'; import type { AnyType, InferEntitiesRead, InferEntityRead, InferType, ResolveSpecFor } from '../schema/define.js'; import type { WhereInput } from '../schema/eql.js'; export interface TypedRead { data: T; loading: boolean; error: Error | null; } export type TypedReadOptions = LiveEntitiesOptions & { where?: WhereInput; resolve?: ResolveSpecFor; }; export type TypedEntityOptions = LiveEntityOptions & { resolve?: ResolveSpecFor; }; /** Live list of a type — filter with `where`, expand relations with `resolve`. */ export declare function useEntities> | TypedReadOptions | undefined = undefined>(client: TrellisDb, schema: S, opts?: O): ComputedRef>>; /** Live single entity by id — read-first, then type subscription. */ export declare function useEntity | undefined = undefined>(client: TrellisDb, schema: S, id: string | null | undefined, opts?: O): ComputedRef>>; /** Schema-typed create/update/remove. */ export declare function useMutation(client: TrellisDb, schema: S): EntityMutations>; //# sourceMappingURL=schema-hooks.d.ts.map