{
  "version": 3,
  "sources": ["../../../src/Scope.ts"],
  "sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\n// @import-as-namespace\n\nimport { type QueryAST } from '@dxos/echo-protocol';\n\n/**\n * Scope targeting a space's automerge documents.\n *\n * With no `spaceId`, targets the owning space — i.e. the space of whichever database\n * executes the query — so callers can reference \"this space\" without looking up its id.\n *\n * @example\n * ```ts\n * db.query(Filter.type(Person).from(Scope.space()));            // owning space\n * db.query(Filter.type(Person).from(Scope.space({ id: otherSpaceId }))); // a specific space\n * ```\n */\nexport const space = (options?: { id?: string; includeAllFeeds?: boolean }): QueryAST.SpaceScope => ({\n  _tag: 'space',\n  ...(options?.id !== undefined ? { spaceId: options.id } : {}),\n  ...(options?.includeAllFeeds ? { includeAllFeeds: true } : {}),\n});\n\n/**\n * Scope targeting a code-shipped object/type registry.\n *\n * - `'local'`  — the in-process registry attached to the hypergraph (default).\n * - `'remote'` — a remote registry service (not yet implemented).\n *\n * @example\n * ```ts\n * // Discover all types — persisted in the space and code-shipped in the registry.\n * db.query(Filter.type(Type.Type).from(Scope.space(), Scope.registry()));\n * ```\n */\nexport const registry = (location: 'local' | 'remote' = 'local'): QueryAST.RegistryScope => ({\n  _tag: 'registry',\n  location,\n});\n\n/**\n * Scope targeting a specific feed (by its underlying queue EID).\n */\nexport const feed = (feedUri: string): QueryAST.FeedScope => ({\n  _tag: 'feed',\n  feedUri,\n});\n"],
  "mappings": ";;;;;AAAA;;;;;;AAoBO,IAAMA,QAAQ,CAACC,aAA+E;EACnGC,MAAM;EACN,GAAID,SAASE,OAAOC,SAAY;IAAEC,SAASJ,QAAQE;EAAG,IAAI,CAAC;EAC3D,GAAIF,SAASK,kBAAkB;IAAEA,iBAAiB;EAAK,IAAI,CAAC;AAC9D;AAcO,IAAMC,WAAW,CAACC,WAA+B,aAAqC;EAC3FN,MAAM;EACNM;AACF;AAKO,IAAMC,OAAO,CAACC,aAAyC;EAC5DR,MAAM;EACNQ;AACF;",
  "names": ["space", "options", "_tag", "id", "undefined", "spaceId", "includeAllFeeds", "registry", "location", "feed", "feedUri"]
}
