@dxos/echo-query 0.8.4-main.84f28bd → 0.8.4-main.a4bbb77

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,73 @@
1
+ import { type Parser, type Tree } from '@lezer/common';
2
+ import { Filter } from '@dxos/echo';
3
+ /**
4
+ * Stateless query builder that parses DSL trees into filters.
5
+ *
6
+ * NOTE: QueryBuilder was largely developed using Claude Sonnet 4.5 (in Windsurf)..
7
+ * To modify the functionality, create a minimal breaking test and direct the LLM to fix either the grammar or builder.
8
+ */
9
+ export declare class QueryBuilder {
10
+ private readonly _parser;
11
+ constructor(_parser?: Parser);
12
+ /**
13
+ * Check valid input.
14
+ */
15
+ validate(input: string): boolean;
16
+ /**
17
+ * Build a query from the input string.
18
+ */
19
+ build(input: string): Filter.Any | null;
20
+ /**
21
+ * Build a query from a parsed DSL tree.
22
+ */
23
+ buildQuery(tree: Tree, input: string): Filter.Any;
24
+ /**
25
+ * Parse an expression node.
26
+ */
27
+ private _parseExpression;
28
+ /**
29
+ * Parse a binary expression (AND/OR).
30
+ */
31
+ private _parseBinaryExpression;
32
+ /**
33
+ * Parse a Filter node.
34
+ */
35
+ private _parseFilter;
36
+ /**
37
+ * Parse a TypeFilter node (type:typename).
38
+ */
39
+ private _parseTypeFilter;
40
+ /**
41
+ * Parse a TextFilter node (quoted string).
42
+ */
43
+ private _parseTextFilter;
44
+ /**
45
+ * Parse an ObjectLiteral node.
46
+ */
47
+ private _parseObjectLiteral;
48
+ /**
49
+ * Parse an ObjectProperty node.
50
+ */
51
+ private _parseObjectProperty;
52
+ /**
53
+ * Parse a PropertyFilter node (property:value).
54
+ */
55
+ private _parsePropertyFilter;
56
+ /**
57
+ * Parse a PropertyPath node (supports dot notation).
58
+ */
59
+ private _parsePropertyPath;
60
+ /**
61
+ * Parse a TagFilter node (#tag).
62
+ */
63
+ private _parseTagFilter;
64
+ /**
65
+ * Parse a Value node.
66
+ */
67
+ private _parseValue;
68
+ /**
69
+ * Get the text content of the current node.
70
+ */
71
+ private _getNodeText;
72
+ }
73
+ //# sourceMappingURL=query-builder.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"query-builder.d.ts","sourceRoot":"","sources":["../../../../src/parser/query-builder.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,MAAM,EAAE,KAAK,IAAI,EAAmB,MAAM,eAAe,CAAC;AAExE,OAAO,EAAE,MAAM,EAAE,MAAM,YAAY,CAAC;AAIpC;;;;;GAKG;AACH,qBAAa,YAAY;IACX,OAAO,CAAC,QAAQ,CAAC,OAAO;gBAAP,OAAO,GAAE,MAAoD;IAE1F;;OAEG;IACH,QAAQ,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO;IAShC;;OAEG;IACH,KAAK,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAAC,GAAG,GAAG,IAAI;IASvC;;OAEG;IACH,UAAU,CAAC,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CAAC,GAAG;IAiCjD;;OAEG;IACH,OAAO,CAAC,gBAAgB;IAmExB;;OAEG;IACH,OAAO,CAAC,sBAAsB;IA6E9B;;OAEG;IACH,OAAO,CAAC,YAAY;IAqCpB;;OAEG;IACH,OAAO,CAAC,gBAAgB;IAWxB;;OAEG;IACH,OAAO,CAAC,gBAAgB;IAQxB;;OAEG;IACH,OAAO,CAAC,mBAAmB;IAoB3B;;OAEG;IACH,OAAO,CAAC,oBAAoB;IAyB5B;;OAEG;IACH,OAAO,CAAC,oBAAoB;IA6B5B;;OAEG;IACH,OAAO,CAAC,kBAAkB;IAgB1B;;OAEG;IACH,OAAO,CAAC,eAAe;IAKvB;;OAEG;IACH,OAAO,CAAC,WAAW;IAwDnB;;OAEG;IACH,OAAO,CAAC,YAAY;CAGrB"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=query.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"query.test.d.ts","sourceRoot":"","sources":["../../../../src/parser/query.test.ts"],"names":[],"mappings":""}