@tellaro/tql 0.2.2 → 0.2.22

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.
@@ -1,4 +1,9 @@
1
- import { ComputedRef } from 'vue';
1
+ /**
2
+ * TQL (Tellaro Query Language) Type Definitions
3
+ *
4
+ * Comprehensive type system for TQL parsing, validation, and autocomplete.
5
+ * Synchronized with tellaro-query-language Python/Rust implementations.
6
+ */
2
7
  export type TqlTokenType = "field" | "operator" | "logicalOp" | "collectionOp" | "string" | "number" | "boolean" | "null" | "paren" | "bracket" | "comma" | "pipe" | "arrow" | "doubleColon" | "mutator" | "aggregation" | "keyword" | "typeHint" | "visualization" | "whitespace" | "unknown" | "error";
3
8
  export interface TqlToken {
4
9
  type: TqlTokenType;
@@ -231,6 +236,14 @@ export interface TqlInputEmits {
231
236
  (e: "parse", result: TqlParseResult): void;
232
237
  (e: "submit", value: string): void;
233
238
  }
239
+ /**
240
+ * Reactive reference type for Vue computed properties.
241
+ * This is a simplified type that matches Vue's ComputedRef interface
242
+ * without requiring Vue as a direct dependency.
243
+ */
244
+ export interface ReactiveRef<T> {
245
+ readonly value: T;
246
+ }
234
247
  export interface TqlInputExpose {
235
248
  focus(): void;
236
249
  blur(): void;
@@ -240,12 +253,12 @@ export interface TqlInputExpose {
240
253
  getTokenAtPosition(pos: number): TqlToken | null;
241
254
  getCursorPosition(): number;
242
255
  setCursorPosition(pos: number): void;
243
- /** Whether the current query is valid (no syntax errors) */
244
- isValid: ComputedRef<boolean>;
245
- /** Whether the current query has validation errors */
246
- hasErrors: ComputedRef<boolean>;
247
- /** Array of current validation errors */
248
- errors: ComputedRef<TqlParseError[]>;
256
+ /** Whether the current query is valid (no syntax errors). Access via .value */
257
+ isValid: ReactiveRef<boolean>;
258
+ /** Whether the current query has validation errors. Access via .value */
259
+ hasErrors: ReactiveRef<boolean>;
260
+ /** Array of current validation errors. Access via .value */
261
+ errors: ReactiveRef<TqlParseError[]>;
249
262
  }
250
263
  export type ComplexityScore = "low" | "medium" | "high";
251
264
  export interface ComplexityWarning {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tellaro/tql",
3
- "version": "0.2.2",
3
+ "version": "0.2.22",
4
4
  "description": "Tellaro Query Language (TQL) parser, validator, and autocomplete for JavaScript/TypeScript",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -73,6 +73,7 @@
73
73
  "@vue/test-utils": "^2.4.0",
74
74
  "@vue/tsconfig": "^0.5.1",
75
75
  "@vueuse/core": "^10.0.0",
76
+ "ajv": "^8.17.1",
76
77
  "eslint": "^8.56.0",
77
78
  "js-yaml": "^4.1.0",
78
79
  "jsdom": "^24.0.0",