import { arc, rack, status, task } from '@synnaxlabs/client'; import { record, xy } from '@synnaxlabs/x'; import { default as z } from 'zod'; import { Flux } from '../flux'; import { List } from '../list'; declare const useDispatch: () => Flux.UseDispatchReturn; write: Record; }; }[]; edges: { source: { node: string; param: string; }; target: { node: string; param: string; }; kind: arc.ir.EdgeKind; key: string; }[]; nodes: { key: string; position: { x: number; y: number; }; }[]; inputs: Record>; }; text: { doc: { inserts: { id: { replica: number; counter: number; }; origin: { replica: number; counter: number; }; side: "left" | "right"; char: number; }[]; deletes: { id: { replica: number; counter: number; }; }[]; }; raw: string; }; program?: { functions: { key: string; body: { raw: string; }; inputs: import('@synnaxlabs/client').Param[]; outputs: import('@synnaxlabs/client').Param[]; channels: { read: Record; write: Record; }; }[]; nodes: { key: string; type: string; inputs: import('@synnaxlabs/client').Param[]; outputs: import('@synnaxlabs/client').Param[]; channels: { read: Record; write: Record; }; }[]; edges: { source: { node: string; param: string; }; target: { node: string; param: string; }; kind: arc.ir.EdgeKind; }[]; authorities: { channels: Record; default?: number | undefined; }; root: arc.ir.Scope; wasm: Uint8Array; outputMemoryBases: Record; } | undefined; status?: { key: string; name: string; variant: "success" | "error" | "info" | "warning" | "loading" | "disabled"; message: string; description: string; time: import('@synnaxlabs/x').TimeStamp; details: { running: boolean; }; labels?: { key: string; name: string; color: [number, number, number, number]; }[] | undefined; } | undefined; }; }; } | { type: "rename"; rename: { name: string; }; } | { type: "set_node"; setNode: { node: { key: string; position: { x: number; y: number; }; }; }; } | { type: "set_node_position"; setNodePosition: { key: string; position: { x: number; y: number; }; }; } | { type: "set_node_inputs"; setNodeInputs: { key: string; inputs: Record; }; } | { type: "remove_node"; removeNode: { key: string; }; } | { type: "add_edge"; addEdge: { edge: { source: { node: string; param: string; }; target: { node: string; param: string; }; kind: arc.ir.EdgeKind; key: string; }; }; } | { type: "remove_edge"; removeEdge: { key: string; }; } | { type: "reconnect_edge"; reconnectEdge: { key: string; source: { node: string; param: string; }; target: { node: string; param: string; }; }; } | { type: "insert_char"; insertChar: { id: { replica: number; counter: number; }; origin: { replica: number; counter: number; }; side: "left" | "right"; char: number; }; } | { type: "delete_char"; deleteChar: { id: { replica: number; counter: number; }; }; } | { type: "forget_chars"; forgetChars: { ids: { replica: number; counter: number; }[]; }; }>; export { useDispatch }; export declare const useUndo: (arg?: import('@synnaxlabs/x/dist/src/optional/optional.js').Optional<{ key: string; }, "key"> | undefined) => Flux.UseUndoReturn; export declare const useRedo: (arg?: import('@synnaxlabs/x/dist/src/optional/optional.js').Optional, "key"> | undefined) => Flux.UseRedoReturn; export declare const useSingleDispatch: (arg?: import('@synnaxlabs/x/dist/src/optional/optional.js').Optional, "key"> | undefined) => (action: { type: "create"; create: { arc: { key: string; name: string; mode: "text" | "graph"; graph: { functions: { key: string; body: { raw: string; }; inputs: import('@synnaxlabs/client').Param[]; outputs: import('@synnaxlabs/client').Param[]; channels: { read: Record; write: Record; }; }[]; edges: { source: { node: string; param: string; }; target: { node: string; param: string; }; kind: arc.ir.EdgeKind; key: string; }[]; nodes: { key: string; position: { x: number; y: number; }; }[]; inputs: Record>; }; text: { doc: { inserts: { id: { replica: number; counter: number; }; origin: { replica: number; counter: number; }; side: "left" | "right"; char: number; }[]; deletes: { id: { replica: number; counter: number; }; }[]; }; raw: string; }; program?: { functions: { key: string; body: { raw: string; }; inputs: import('@synnaxlabs/client').Param[]; outputs: import('@synnaxlabs/client').Param[]; channels: { read: Record; write: Record; }; }[]; nodes: { key: string; type: string; inputs: import('@synnaxlabs/client').Param[]; outputs: import('@synnaxlabs/client').Param[]; channels: { read: Record; write: Record; }; }[]; edges: { source: { node: string; param: string; }; target: { node: string; param: string; }; kind: arc.ir.EdgeKind; }[]; authorities: { channels: Record; default?: number | undefined; }; root: arc.ir.Scope; wasm: Uint8Array; outputMemoryBases: Record; } | undefined; status?: { key: string; name: string; variant: "success" | "error" | "info" | "warning" | "loading" | "disabled"; message: string; description: string; time: import('@synnaxlabs/x').TimeStamp; details: { running: boolean; }; labels?: { key: string; name: string; color: [number, number, number, number]; }[] | undefined; } | undefined; }; }; } | { type: "rename"; rename: { name: string; }; } | { type: "set_node"; setNode: { node: { key: string; position: { x: number; y: number; }; }; }; } | { type: "set_node_position"; setNodePosition: { key: string; position: { x: number; y: number; }; }; } | { type: "set_node_inputs"; setNodeInputs: { key: string; inputs: Record; }; } | { type: "remove_node"; removeNode: { key: string; }; } | { type: "add_edge"; addEdge: { edge: { source: { node: string; param: string; }; target: { node: string; param: string; }; kind: arc.ir.EdgeKind; key: string; }; }; } | { type: "remove_edge"; removeEdge: { key: string; }; } | { type: "reconnect_edge"; reconnectEdge: { key: string; source: { node: string; param: string; }; target: { node: string; param: string; }; }; } | { type: "insert_char"; insertChar: { id: { replica: number; counter: number; }; origin: { replica: number; counter: number; }; side: "left" | "right"; char: number; }; } | { type: "delete_char"; deleteChar: { id: { replica: number; counter: number; }; }; } | { type: "forget_chars"; forgetChars: { ids: { replica: number; counter: number; }[]; }; } | ({ type: "create"; create: { arc: { key: string; name: string; mode: "text" | "graph"; graph: { functions: { key: string; body: { raw: string; }; inputs: import('@synnaxlabs/client').Param[]; outputs: import('@synnaxlabs/client').Param[]; channels: { read: Record; write: Record; }; }[]; edges: { source: { node: string; param: string; }; target: { node: string; param: string; }; kind: arc.ir.EdgeKind; key: string; }[]; nodes: { key: string; position: { x: number; y: number; }; }[]; inputs: Record>; }; text: { doc: { inserts: { id: { replica: number; counter: number; }; origin: { replica: number; counter: number; }; side: "left" | "right"; char: number; }[]; deletes: { id: { replica: number; counter: number; }; }[]; }; raw: string; }; program?: { functions: { key: string; body: { raw: string; }; inputs: import('@synnaxlabs/client').Param[]; outputs: import('@synnaxlabs/client').Param[]; channels: { read: Record; write: Record; }; }[]; nodes: { key: string; type: string; inputs: import('@synnaxlabs/client').Param[]; outputs: import('@synnaxlabs/client').Param[]; channels: { read: Record; write: Record; }; }[]; edges: { source: { node: string; param: string; }; target: { node: string; param: string; }; kind: arc.ir.EdgeKind; }[]; authorities: { channels: Record; default?: number | undefined; }; root: arc.ir.Scope; wasm: Uint8Array; outputMemoryBases: Record; } | undefined; status?: { key: string; name: string; variant: "success" | "error" | "info" | "warning" | "loading" | "disabled"; message: string; description: string; time: import('@synnaxlabs/x').TimeStamp; details: { running: boolean; }; labels?: { key: string; name: string; color: [number, number, number, number]; }[] | undefined; } | undefined; }; }; } | { type: "rename"; rename: { name: string; }; } | { type: "set_node"; setNode: { node: { key: string; position: { x: number; y: number; }; }; }; } | { type: "set_node_position"; setNodePosition: { key: string; position: { x: number; y: number; }; }; } | { type: "set_node_inputs"; setNodeInputs: { key: string; inputs: Record; }; } | { type: "remove_node"; removeNode: { key: string; }; } | { type: "add_edge"; addEdge: { edge: { source: { node: string; param: string; }; target: { node: string; param: string; }; kind: arc.ir.EdgeKind; key: string; }; }; } | { type: "remove_edge"; removeEdge: { key: string; }; } | { type: "reconnect_edge"; reconnectEdge: { key: string; source: { node: string; param: string; }; target: { node: string; param: string; }; }; } | { type: "insert_char"; insertChar: { id: { replica: number; counter: number; }; origin: { replica: number; counter: number; }; side: "left" | "right"; char: number; }; } | { type: "delete_char"; deleteChar: { id: { replica: number; counter: number; }; }; } | { type: "forget_chars"; forgetChars: { ids: { replica: number; counter: number; }[]; }; })[]) => void; export interface KeyParams { key: arc.Key; } export type RetrieveQuery = { key: arc.Key; includeStatus?: boolean; }; export declare const use: Flux.Use, useEnsure: Flux.UseEnsure, useTombstone: Flux.UseTombstone, useResult: Flux.UseResult, createSelector: Flux.CreateSelector; export declare const useAllNodes: (arg?: import('@synnaxlabs/x/dist/src/optional/optional.js').Optional | undefined) => { key: string; position: { x: number; y: number; }; zIndex?: number | undefined; type?: string | undefined; draggable?: boolean | undefined; }[]; export interface NodesParams extends KeyParams { keys: string[]; } export declare const useNodes: (arg: import('@synnaxlabs/x/dist/src/optional/optional.js').Optional) => { key: string; position: { x: number; y: number; }; zIndex?: number | undefined; type?: string | undefined; draggable?: boolean | undefined; }[]; export declare const useAllEdges: (arg?: import('@synnaxlabs/x/dist/src/optional/optional.js').Optional | undefined) => { key: string; source: { node: string; param: string; }; target: { node: string; param: string; }; }[]; export interface NodePropsParams extends KeyParams { nodeKey: string; } export declare const useNodeConfig: (arg: import('@synnaxlabs/x/dist/src/optional/optional.js').Optional) => { type: "constant"; value: number; } | { type: "add"; } | { type: "subtract"; } | { type: "multiply"; } | { type: "divide"; } | { type: "gt"; } | { type: "lt"; } | { type: "eq"; } | { type: "ne"; } | { type: "ge"; } | { type: "le"; } | { type: "and"; } | { type: "or"; } | { type: "not"; } | { type: "select"; } | { type: "write"; channel: number; value: number; } | { type: "on"; channel: number; } | { type: "stable_for"; duration: number; } | { type: "status.set"; key_or_name: string; variant: "success" | "error" | "info" | "warning" | "loading" | "disabled"; message: string; }; export declare const useMode: (arg?: import('@synnaxlabs/x/dist/src/optional/optional.js').Optional | undefined) => "text" | "graph"; export declare const useHasText: (arg?: import('@synnaxlabs/x/dist/src/optional/optional.js').Optional | undefined) => boolean; export declare const useName: (arg?: import('@synnaxlabs/x/dist/src/optional/optional.js').Optional | undefined) => string; export interface AddNodeProps { key: string; type: string; position?: xy.Crude; } export declare const useAddNode: (keyOverride?: arc.Key) => ({ key: nodeKey, type, position }: AddNodeProps) => void; export type ListQuery = List.PagerParams & { keys?: arc.Key[]; }; export declare const useList: Flux.UseList; export declare const useDelete: Flux.UseUpdate; export declare const formSchema: z.ZodObject<{ key: z.ZodOptional; name: z.ZodString; mode: z.ZodEnum<{ text: "text"; graph: "graph"; }>; }, z.core.$strip>; export declare const ZERO_FORM_VALUES: z.infer; export type FormQuery = Record; export declare const useForm: Flux.UseForm; name: z.ZodString; mode: z.ZodEnum<{ text: "text"; graph: "graph"; }>; }, z.core.$strip>>; export interface CreateParams extends arc.New { } export declare const useCreate: Flux.UseUpdate; export interface RenameParams extends Pick { } export declare const useRename: Flux.UseUpdate; export interface SetRackParams { key: arc.Key; /** Target rack. Zero clears the binding, deleting the arc's task. */ rack: rack.Key; } export declare const useSetRack: Flux.UseUpdate>, z.ZodType>, z.ZodType>>> | null, z.ZodNever>; export type RetrieveTaskParams = { arcKey: arc.Key; }; export declare const useTask: Flux.Use>, z.ZodType>, z.ZodType>>> | null>, useResultTask: Flux.UseResult>, z.ZodType>, z.ZodType>>> | null>, createTaskResultSelector: Flux.CreateResultSelector>, z.ZodType>, z.ZodType>>> | null>; /** * Whether the arc's running instance was deployed from different content, config, or * rack than its task now holds. The Core rewrites the task config whenever the arc's * semantic content changes, so content drift surfaces as ordinary task config drift. * Arcs that are not running never drift. Re-renders only when the boolean changes. */ export declare const useDrifted: (query: RetrieveTaskParams) => boolean; export interface UseTaskControlsReturn { running: boolean; taskKey: task.Key; taskRack: rack.Key; /** Starts the task. The driver rebuilds from the current config when it drifted. */ onStart: () => void; /** Stops the running instance. */ onStop: () => void; onStartStop: () => void; taskStatus: status.Status; } /** Running state and start/stop controls for the arc's task. */ export declare const useTaskControls: (key: arc.Key, name: string) => UseTaskControlsReturn; //# sourceMappingURL=queries.d.ts.map