@tellaro/tql 0.1.13 → 0.1.14

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.
@@ -289,6 +289,38 @@ function G(e, t, a) {
289
289
  }
290
290
  return { type: "after_paren" };
291
291
  }
292
+ // Check if we're typing inside mutator params (e.g., "geo(for" while typing "force")
293
+ // Pattern: field token, preceded by "(", preceded by mutator
294
+ if (n.type === "field" && r && r.type === "paren" && r.value === "(") {
295
+ const mutatorToken = o.length > 2 ? o[o.length - 3] : null;
296
+ if (mutatorToken && mutatorToken.type === "mutator") {
297
+ const mutatorName = mutatorToken.value.toLowerCase();
298
+ return { type: "mutator_params", mutatorName: mutatorName, usedParams: [], partialText: n.value };
299
+ }
300
+ }
301
+ // Check if we're after a comma inside mutator params (e.g., "geo(force=true, ")
302
+ if (n.type === "comma") {
303
+ // Look back for the pattern: mutator, "(", ...params..., ","
304
+ let foundMutator = null;
305
+ let usedParams = [];
306
+ for (let i = o.length - 2; i >= 0; i--) {
307
+ const tok = o[i];
308
+ if (tok.type === "paren" && tok.value === "(") {
309
+ // Check if token before ( is a mutator
310
+ if (i > 0 && o[i - 1].type === "mutator") {
311
+ foundMutator = o[i - 1].value.toLowerCase();
312
+ }
313
+ break;
314
+ }
315
+ // Collect used parameter names (tokens that look like param=value)
316
+ if (tok.type === "field") {
317
+ usedParams.push(tok.value.toLowerCase());
318
+ }
319
+ }
320
+ if (foundMutator) {
321
+ return { type: "mutator_params", mutatorName: foundMutator, usedParams: usedParams, partialText: s };
322
+ }
323
+ }
292
324
  if (n.type === "arrow")
293
325
  return { type: "after_arrow", partialText: s };
294
326
  if (n.type === "doubleColon")
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tellaro/tql",
3
- "version": "0.1.13",
3
+ "version": "0.1.14",
4
4
  "description": "Tellaro Query Language (TQL) parser, validator, and autocomplete for JavaScript/TypeScript",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",