@tellaro/tql 0.1.6 → 0.1.8

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.
@@ -274,11 +274,11 @@ function B(e, t, a) {
274
274
  return v.set(o, n), n;
275
275
  }
276
276
  function G(e, t, a) {
277
- var d;
277
+ var u;
278
278
  const i = b(e.substring(0, t)).filter((l) => l.type !== "whitespace");
279
279
  if (i.length === 0)
280
280
  return { type: "start" };
281
- const n = i[i.length - 1], r = i.length > 1 ? i[i.length - 2] : null, u = n.end === t && !((d = e[t - 1]) != null && d.match(/\s/)), s = u ? n.value : void 0;
281
+ const n = i[i.length - 1], r = i.length > 1 ? i[i.length - 2] : null, d = n.end === t && !((u = e[t - 1]) != null && u.match(/\s/)), s = d ? n.value : void 0;
282
282
  if (n.type === "logicalOp")
283
283
  return { type: "start" };
284
284
  if (n.type === "paren" && n.value === "(")
@@ -287,9 +287,9 @@ function G(e, t, a) {
287
287
  return { type: "after_arrow", partialText: s };
288
288
  if (n.type === "doubleColon")
289
289
  return { type: "after_double_colon", partialText: s };
290
- if (n.type === "visualization" && u)
290
+ if (n.type === "visualization" && d)
291
291
  return { type: "after_arrow", partialText: s };
292
- if (n.type === "typeHint" && u)
292
+ if (n.type === "typeHint" && d)
293
293
  return { type: "after_double_colon", partialText: s };
294
294
  if (n.type === "keyword" && n.value.toLowerCase() === "stats")
295
295
  return { type: "after_stats", partialText: s };
@@ -298,7 +298,7 @@ function G(e, t, a) {
298
298
  if (n.type === "pipe")
299
299
  return { type: "after_pipe", partialText: s };
300
300
  if (n.type === "mutator") {
301
- if (u)
301
+ if (d)
302
302
  return { type: "after_pipe", partialText: s };
303
303
  const l = n.value.toLowerCase(), c = h[l];
304
304
  return {
@@ -308,9 +308,9 @@ function G(e, t, a) {
308
308
  };
309
309
  }
310
310
  if (n.type === "aggregation")
311
- return u ? { type: "after_stats", partialText: s } : { type: "after_value" };
311
+ return d ? { type: "after_stats", partialText: s } : { type: "after_value" };
312
312
  if (n.type === "field") {
313
- if (u)
313
+ if (d)
314
314
  return (r == null ? void 0 : r.type) === "pipe" ? { type: "after_pipe", partialText: s } : { type: "start", partialText: s };
315
315
  if ((r == null ? void 0 : r.type) === "pipe")
316
316
  return { type: "after_pipe", partialText: n.value };
@@ -318,7 +318,7 @@ function G(e, t, a) {
318
318
  return { type: "after_field", fieldName: n.value, fieldType: l };
319
319
  }
320
320
  if (n.type === "operator") {
321
- if (u) {
321
+ if (d) {
322
322
  if ((r == null ? void 0 : r.type) === "field") {
323
323
  const l = f(r.value, a);
324
324
  return { type: "after_field", fieldName: r.value, fieldType: l, partialText: s };
@@ -331,14 +331,14 @@ function G(e, t, a) {
331
331
  return { type: "after_operator", operatorName: n.value };
332
332
  }
333
333
  if (n.type === "string" || n.type === "number" || n.type === "boolean" || n.type === "null")
334
- return { type: "after_value" };
334
+ return d ? { type: "at_value_end" } : { type: "after_value" };
335
335
  if (n.type === "paren" && n.value === ")")
336
336
  return { type: "after_value" };
337
- if ((r == null ? void 0 : r.type) === "field" && u) {
337
+ if ((r == null ? void 0 : r.type) === "field" && d) {
338
338
  const l = f(r.value, a);
339
339
  return { type: "after_field", fieldName: r.value, fieldType: l, partialText: s };
340
340
  }
341
- if ((r == null ? void 0 : r.type) === "mutator" && u) {
341
+ if ((r == null ? void 0 : r.type) === "mutator" && d) {
342
342
  const l = r.value.toLowerCase(), c = h[l];
343
343
  return { type: "after_mutator", mutatorName: l, mutatorOutputType: c, partialText: s };
344
344
  }
@@ -366,6 +366,8 @@ function te(e, t = {}) {
366
366
  case "after_value":
367
367
  n.push(...C());
368
368
  break;
369
+ case "at_value_end":
370
+ break;
369
371
  case "after_pipe":
370
372
  n.push(...K(i.partialText));
371
373
  break;
@@ -386,13 +388,13 @@ function te(e, t = {}) {
386
388
  }
387
389
  t.includeAggregations && i.type === "start" && n.push(...O(i.partialText));
388
390
  let r = n;
389
- const u = t.fuzzyMatching !== !1, s = t.minFuzzyScore ?? 0;
391
+ const d = t.fuzzyMatching !== !1, s = t.minFuzzyScore ?? 0;
390
392
  if (i.partialText) {
391
- const d = i.partialText.toLowerCase();
392
- if (u) {
393
+ const u = i.partialText.toLowerCase();
394
+ if (d) {
393
395
  const l = [];
394
396
  for (const c of n) {
395
- const m = _(d, c.label), w = c.filterText ? _(d, c.filterText) : { matched: !1, score: 0 }, g = m.score >= w.score ? m : w;
397
+ const m = _(u, c.label), w = c.filterText ? _(u, c.filterText) : { matched: !1, score: 0 }, g = m.score >= w.score ? m : w;
396
398
  g.matched && g.score >= s && l.push({
397
399
  ...c,
398
400
  matchScore: g.score,
@@ -404,11 +406,11 @@ function te(e, t = {}) {
404
406
  r = n.filter(
405
407
  (l) => {
406
408
  var c;
407
- return l.label.toLowerCase().includes(d) || ((c = l.filterText) == null ? void 0 : c.toLowerCase().includes(d));
409
+ return l.label.toLowerCase().includes(u) || ((c = l.filterText) == null ? void 0 : c.toLowerCase().includes(u));
408
410
  }
409
411
  );
410
412
  }
411
- return r.sort((d, l) => d.matchScore !== void 0 && l.matchScore !== void 0 && l.matchScore !== d.matchScore ? l.matchScore - d.matchScore : d.sortOrder - l.sortOrder), t.maxItems && t.maxItems > 0 && (r = r.slice(0, t.maxItems)), r;
413
+ return r.sort((u, l) => u.matchScore !== void 0 && l.matchScore !== void 0 && l.matchScore !== u.matchScore ? l.matchScore - u.matchScore : u.sortOrder - l.sortOrder), t.maxItems && t.maxItems > 0 && (r = r.slice(0, t.maxItems)), r;
412
414
  }
413
415
  function y(e, t) {
414
416
  if (!e || e.length === 0)
package/dist/style.css CHANGED
@@ -1 +1 @@
1
- .tql-autocomplete-dropdown[data-v-3df9a4be]{position:fixed;top:var(--dropdown-top);left:var(--dropdown-left);z-index:9999;min-width:280px;max-width:450px;max-height:var(--dropdown-max-height);background:var(--surface-overlay, #fff);border:1px solid var(--surface-border, #ddd);border-radius:var(--border-radius, 6px);box-shadow:0 4px 16px #00000026;overflow:hidden;display:flex;flex-direction:column}.tql-completion-list[data-v-3df9a4be]{overflow-y:auto;max-height:calc(var(--dropdown-max-height) - 60px)}.tql-completion-item[data-v-3df9a4be]{display:flex;align-items:center;gap:.5rem;padding:.5rem .75rem;cursor:pointer;transition:background-color .15s}.tql-completion-item[data-v-3df9a4be]:hover,.tql-completion-item.selected[data-v-3df9a4be]{background:var(--highlight-bg, #f0f0f0)}.tql-completion-icon[data-v-3df9a4be]{display:flex;align-items:center;justify-content:center;width:1.5rem;height:1.5rem;border-radius:4px;font-size:.75rem}.tql-completion-icon.tql-completion-kind-field[data-v-3df9a4be]{background:var(--blue-100, #e3f2fd);color:var(--blue-600, #1e88e5)}.tql-completion-icon.tql-completion-kind-operator[data-v-3df9a4be]{background:var(--pink-100, #fce4ec);color:var(--pink-600, #d81b60)}.tql-completion-icon.tql-completion-kind-value[data-v-3df9a4be]{background:var(--green-100, #e8f5e9);color:var(--green-600, #43a047)}.tql-completion-icon.tql-completion-kind-keyword[data-v-3df9a4be]{background:var(--purple-100, #f3e5f5);color:var(--purple-600, #8e24aa)}.tql-completion-icon.tql-completion-kind-snippet[data-v-3df9a4be]{background:var(--orange-100, #fff3e0);color:var(--orange-600, #fb8c00)}.tql-completion-icon.tql-completion-kind-mutator[data-v-3df9a4be]{background:var(--cyan-100, #e0f7fa);color:var(--cyan-600, #00acc1)}.tql-completion-icon.tql-completion-kind-aggregation[data-v-3df9a4be]{background:var(--indigo-100, #e8eaf6);color:var(--indigo-600, #3949ab)}.tql-completion-icon.tql-completion-kind-logicalOp[data-v-3df9a4be]{background:var(--yellow-100, #fffde7);color:var(--yellow-700, #fbc02d)}.tql-completion-icon.tql-completion-kind-typeHint[data-v-3df9a4be]{background:var(--teal-100, #e0f2f1);color:var(--teal-600, #00897b)}.tql-completion-icon.tql-completion-kind-visualization[data-v-3df9a4be]{background:var(--red-100, #ffebee);color:var(--red-600, #e53935)}.tql-completion-content[data-v-3df9a4be]{flex:1;display:flex;flex-direction:column;min-width:0}.tql-completion-label[data-v-3df9a4be]{font-family:Courier New,monospace;font-size:.875rem;font-weight:500;color:var(--text-color, #333);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.tql-completion-detail[data-v-3df9a4be]{font-size:.75rem;color:var(--text-color-secondary, #666);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.tql-completion-kind-badge[data-v-3df9a4be]{font-size:.625rem;padding:.125rem .375rem;background:var(--surface-100, #f5f5f5);border-radius:3px;color:var(--text-color-secondary, #666);text-transform:uppercase;letter-spacing:.025em}.tql-completion-docs[data-v-3df9a4be]{padding:.5rem .75rem;border-top:1px solid var(--surface-border, #ddd);background:var(--surface-50, #fafafa);font-size:.75rem;color:var(--text-color-secondary, #666);max-height:60px;overflow-y:auto}.tql-preview[data-v-bae811e6]{font-family:ui-monospace,monospace;font-size:13px;line-height:1.5;padding:12px;border:1px solid var(--tql-preview-border, #e0e0e0);border-radius:6px;background:var(--tql-preview-bg, #fafafa)}.tql-preview--compact[data-v-bae811e6]{padding:8px;font-size:12px}.tql-preview--empty[data-v-bae811e6]{color:var(--tql-preview-muted, #888)}.tql-preview__empty[data-v-bae811e6]{text-align:center;padding:20px}.tql-preview__complexity[data-v-bae811e6]{display:flex;align-items:center;gap:12px;margin-bottom:12px}.tql-preview__complexity-badge[data-v-bae811e6]{padding:2px 8px;border-radius:4px;font-size:11px;font-weight:600;text-transform:uppercase}.tql-preview--low .tql-preview__complexity-badge[data-v-bae811e6]{background:var(--tql-preview-low-bg, #e8f5e9);color:var(--tql-preview-low-text, #2e7d32)}.tql-preview--medium .tql-preview__complexity-badge[data-v-bae811e6]{background:var(--tql-preview-medium-bg, #fff3e0);color:var(--tql-preview-medium-text, #e65100)}.tql-preview--high .tql-preview__complexity-badge[data-v-bae811e6]{background:var(--tql-preview-high-bg, #ffebee);color:var(--tql-preview-high-text, #c62828)}.tql-preview__field-count[data-v-bae811e6]{color:var(--tql-preview-muted, #666);font-size:12px}.tql-preview__warnings[data-v-bae811e6]{margin-bottom:12px}.tql-preview__warning[data-v-bae811e6]{display:flex;align-items:flex-start;gap:8px;padding:6px 8px;border-radius:4px;margin-bottom:4px}.tql-preview__warning--info[data-v-bae811e6]{background:var(--tql-preview-info-bg, #e3f2fd);color:var(--tql-preview-info-text, #1565c0)}.tql-preview__warning--warning[data-v-bae811e6]{background:var(--tql-preview-warning-bg, #fff3e0);color:var(--tql-preview-warning-text, #e65100)}.tql-preview__warning--error[data-v-bae811e6]{background:var(--tql-preview-error-bg, #ffebee);color:var(--tql-preview-error-text, #c62828)}.tql-preview__warning-icon[data-v-bae811e6]{font-weight:700;width:16px;text-align:center}.tql-preview__warning-text[data-v-bae811e6]{flex:1}.tql-preview__suggestions[data-v-bae811e6]{margin-bottom:12px;padding:8px;background:var(--tql-preview-suggestion-bg, #f5f5f5);border-radius:4px}.tql-preview__suggestions-header[data-v-bae811e6]{font-weight:600;margin-bottom:4px;color:var(--tql-preview-header, #333)}.tql-preview__suggestions-list[data-v-bae811e6]{margin:0;padding-left:20px}.tql-preview__suggestion[data-v-bae811e6]{color:var(--tql-preview-muted, #666);margin:2px 0}.tql-preview__tree[data-v-bae811e6]{margin-bottom:12px}.tql-preview__tree-header[data-v-bae811e6],.tql-preview__fields-header[data-v-bae811e6],.tql-preview__operators-header[data-v-bae811e6]{font-weight:600;margin-bottom:8px;color:var(--tql-preview-header, #333);font-size:12px;text-transform:uppercase;letter-spacing:.5px}.tql-preview__tree-content[data-v-bae811e6]{border:1px solid var(--tql-preview-tree-border, #e0e0e0);border-radius:4px;background:var(--tql-preview-tree-bg, #fff);padding:8px}.tql-preview__node[data-v-bae811e6]{margin:2px 0}.tql-preview__node-content[data-v-bae811e6]{display:flex;align-items:center;gap:4px;padding:2px 4px;border-radius:3px;cursor:pointer}.tql-preview__node-content[data-v-bae811e6]:hover{background:var(--tql-preview-node-hover, #f0f0f0)}.tql-preview__node-toggle[data-v-bae811e6]{width:16px;height:16px;border:none;background:var(--tql-preview-toggle-bg, #e0e0e0);border-radius:3px;cursor:pointer;font-size:12px;line-height:1;display:flex;align-items:center;justify-content:center}.tql-preview__node-toggle[data-v-bae811e6]:hover{background:var(--tql-preview-toggle-hover, #d0d0d0)}.tql-preview__node-toggle--leaf[data-v-bae811e6]{visibility:hidden}.tql-preview__node-type[data-v-bae811e6]{font-weight:600;color:var(--tql-preview-node-type, #666)}.tql-preview__node--and .tql-preview__node-type[data-v-bae811e6]{color:var(--tql-preview-and, #1976d2)}.tql-preview__node--or .tql-preview__node-type[data-v-bae811e6]{color:var(--tql-preview-or, #7b1fa2)}.tql-preview__node--not .tql-preview__node-type[data-v-bae811e6]{color:var(--tql-preview-not, #c62828)}.tql-preview__node--group .tql-preview__node-type[data-v-bae811e6]{color:var(--tql-preview-group, #666)}.tql-preview__node-label[data-v-bae811e6]{flex:1}.tql-preview__fields-list[data-v-bae811e6]{display:flex;flex-direction:column;gap:4px}.tql-preview__field[data-v-bae811e6]{display:flex;align-items:center;gap:6px;padding:4px 8px;background:var(--tql-preview-field-bg, #fff);border:1px solid var(--tql-preview-field-border, #e0e0e0);border-radius:4px;cursor:pointer}.tql-preview__field[data-v-bae811e6]:hover{background:var(--tql-preview-field-hover, #f5f5f5)}.tql-preview__field-name[data-v-bae811e6]{font-weight:600;color:var(--tql-preview-field-name, #1976d2)}.tql-preview__field-mutators[data-v-bae811e6]{color:var(--tql-preview-mutator, #7b1fa2)}.tql-preview__field-operator[data-v-bae811e6]{color:var(--tql-preview-operator, #666)}.tql-preview__field-value[data-v-bae811e6]{color:var(--tql-preview-value, #2e7d32)}.tql-preview__match-type[data-v-bae811e6]{margin-left:auto;padding:1px 4px;border-radius:3px;font-size:10px;font-weight:600;background:var(--tql-preview-match-bg, #f0f0f0)}.tql-preview__match-type--exact[data-v-bae811e6]{background:var(--tql-preview-match-exact-bg, #e8f5e9);color:var(--tql-preview-match-exact, #2e7d32)}.tql-preview__match-type--wildcard[data-v-bae811e6]{background:var(--tql-preview-match-wildcard-bg, #fff3e0);color:var(--tql-preview-match-wildcard, #e65100)}.tql-preview__match-type--regex[data-v-bae811e6]{background:var(--tql-preview-match-regex-bg, #fce4ec);color:var(--tql-preview-match-regex, #c2185b)}.tql-preview__match-type--range[data-v-bae811e6]{background:var(--tql-preview-match-range-bg, #e3f2fd);color:var(--tql-preview-match-range, #1565c0)}.tql-preview__match-type--cidr[data-v-bae811e6]{background:var(--tql-preview-match-cidr-bg, #f3e5f5);color:var(--tql-preview-match-cidr, #7b1fa2)}.tql-preview__operators-list[data-v-bae811e6]{display:flex;flex-wrap:wrap;gap:8px}.tql-preview__operator[data-v-bae811e6]{padding:2px 6px;background:var(--tql-preview-op-bg, #f0f0f0);border-radius:3px;font-size:11px}.tql-input-wrapper[data-v-ab996cb5]{position:relative;display:flex;align-items:flex-start;border:1px solid var(--surface-border, #ddd);border-radius:var(--border-radius, 6px);background:var(--surface-ground, #fff);transition:border-color .2s,box-shadow .2s}.tql-input-wrapper.tql-input-has-min-height[data-v-ab996cb5],.tql-input-wrapper.tql-input-has-min-height .tql-input[data-v-ab996cb5]{min-height:var(--tql-min-height)}.tql-input-wrapper.tql-input-focused[data-v-ab996cb5]{border-color:var(--primary-color, #3b82f6);box-shadow:0 0 0 2px var(--primary-100, rgba(59, 130, 246, .2))}.tql-input-wrapper.tql-input-invalid[data-v-ab996cb5]{border-color:var(--red-500, #ef4444)}.tql-input-wrapper.tql-input-invalid.tql-input-focused[data-v-ab996cb5]{box-shadow:0 0 0 2px var(--red-100, rgba(239, 68, 68, .2))}.tql-input-wrapper.tql-input-disabled[data-v-ab996cb5]{opacity:.6;cursor:not-allowed}.tql-highlight-layer[data-v-ab996cb5]{position:absolute;top:0;left:0;right:0;bottom:0;padding:.5rem .75rem;pointer-events:none;white-space:pre-wrap;word-wrap:break-word;font-family:Courier New,monospace;font-size:.875rem;line-height:1.5;overflow:hidden}.tql-input-multiline .tql-highlight-layer[data-v-ab996cb5]{overflow-y:auto}.tql-input[data-v-ab996cb5]{flex:1;width:100%;padding:.5rem 8rem .5rem .75rem;border:none;background:transparent;font-family:Courier New,monospace;font-size:.875rem;line-height:1.5;color:var(--text-color, #333);outline:none;resize:none}.tql-input.tql-input-highlighted[data-v-ab996cb5]{color:transparent;caret-color:var(--text-color, #333)}.tql-input[data-v-ab996cb5]::placeholder{color:var(--text-color-secondary, #666);opacity:.7}.tql-input[data-v-ab996cb5]:disabled{cursor:not-allowed}.tql-token-field[data-v-ab996cb5]{color:var(--tql-field-color, var(--blue-600, #2563eb))}.tql-token-operator[data-v-ab996cb5]{color:var(--tql-operator-color, var(--pink-600, #db2777));font-weight:500}.tql-token-logicalOp[data-v-ab996cb5]{color:var(--tql-logical-color, var(--purple-600, #9333ea));font-weight:600}.tql-token-collectionOp[data-v-ab996cb5]{color:var(--tql-collection-color, var(--indigo-600, #4f46e5));font-weight:600}.tql-token-string[data-v-ab996cb5]{color:var(--tql-string-color, var(--green-600, #16a34a))}.tql-token-number[data-v-ab996cb5]{color:var(--tql-number-color, var(--orange-600, #ea580c))}.tql-token-boolean[data-v-ab996cb5]{color:var(--tql-boolean-color, var(--cyan-600, #0891b2))}.tql-token-null[data-v-ab996cb5]{color:var(--tql-null-color, var(--gray-500, #6b7280));font-style:italic}.tql-token-mutator[data-v-ab996cb5]{color:var(--tql-mutator-color, var(--teal-600, #0d9488));font-style:italic}.tql-token-aggregation[data-v-ab996cb5]{color:var(--tql-aggregation-color, var(--indigo-600, #4f46e5))}.tql-token-keyword[data-v-ab996cb5]{color:var(--tql-keyword-color, var(--purple-500, #a855f7))}.tql-token-typeHint[data-v-ab996cb5]{color:var(--tql-typehint-color, var(--teal-500, #14b8a6))}.tql-token-visualization[data-v-ab996cb5]{color:var(--tql-viz-color, var(--red-500, #ef4444))}.tql-token-arrow[data-v-ab996cb5]{color:var(--tql-arrow-color, var(--gray-600, #4b5563));font-weight:600}.tql-token-doubleColon[data-v-ab996cb5]{color:var(--tql-colon-color, var(--gray-500, #6b7280))}.tql-token-paren[data-v-ab996cb5],.tql-token-bracket[data-v-ab996cb5]{color:var(--tql-bracket-color, var(--gray-600, #4b5563))}.tql-token-error[data-v-ab996cb5]{color:var(--tql-error-color, var(--red-600, #dc2626));text-decoration:wavy underline;text-decoration-color:var(--red-400, #f87171)}.tql-token-error-range[data-v-ab996cb5]{background-color:var(--red-50, #fef2f2)}.tql-token-unknown[data-v-ab996cb5]{color:var(--text-color-secondary, #666)}.tql-validation-icon[data-v-ab996cb5]{position:absolute;right:.5rem;top:50%;transform:translateY(-50%);display:flex;align-items:center;justify-content:center}.tql-input-multiline .tql-validation-icon[data-v-ab996cb5]{top:.75rem;transform:none}.tql-icon-valid[data-v-ab996cb5]{color:var(--green-500, #22c55e)}.tql-icon-invalid[data-v-ab996cb5]{color:var(--red-500, #ef4444)}.tql-icon-clickable[data-v-ab996cb5]{cursor:pointer;transition:transform .2s}.tql-icon-clickable[data-v-ab996cb5]:hover{transform:scale(1.2)}.tql-icon-clickable[data-v-ab996cb5]:focus{outline:2px solid var(--primary-color, #3b82f6);outline-offset:2px;border-radius:50%}.tql-snippet-button[data-v-ab996cb5]{position:absolute;right:2rem;top:50%;transform:translateY(-50%);padding:.25rem;border:none;background:transparent;color:var(--text-color-secondary, #666);cursor:pointer;border-radius:var(--border-radius, 6px);transition:color .2s,background-color .2s}.tql-snippet-button[data-v-ab996cb5]:hover{color:var(--primary-color, #3b82f6);background:var(--surface-100, #f5f5f5)}.tql-input-multiline .tql-snippet-button[data-v-ab996cb5]{top:.75rem;transform:none}.tql-input-resizable-textarea[data-v-ab996cb5]{resize:vertical;min-height:80px}.tql-input-wrapper.tql-input-resizable[data-v-ab996cb5]{height:auto}.tql-input-wrapper.tql-input-resizable .tql-highlight-layer[data-v-ab996cb5]{height:100%}.tql-validation-messages[data-v-ab996cb5]{position:absolute;top:100%;left:0;right:0;margin-top:.25rem;background:var(--surface-overlay, #fff);border:1px solid var(--red-200, #fecaca);border-radius:var(--border-radius, 6px);padding:.5rem;z-index:10;box-shadow:0 2px 8px #0000001a}.tql-input-autocomplete-active .tql-validation-messages[data-v-ab996cb5],.tql-input-autocomplete-active .tql-complexity-warnings[data-v-ab996cb5],.tql-input-autocomplete-active .tql-history-dropdown[data-v-ab996cb5],.tql-input-autocomplete-active .tql-preview-panel[data-v-ab996cb5]{display:none!important}.tql-error-message[data-v-ab996cb5]{display:flex;align-items:flex-start;gap:.5rem;padding:.25rem 0;font-size:.75rem;color:var(--red-600, #dc2626)}.tql-error-message i[data-v-ab996cb5]{margin-top:.125rem;font-size:.75rem}.tql-error-suggestion[data-v-ab996cb5]{display:block;color:var(--text-color-secondary, #666);font-style:italic;margin-left:1.25rem}.sr-only[data-v-ab996cb5]{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}.tql-toolbar[data-v-ab996cb5]{position:absolute;right:.5rem;top:50%;transform:translateY(-50%);display:flex;align-items:center;gap:.25rem}.tql-input-multiline .tql-toolbar[data-v-ab996cb5]{top:.5rem;transform:none}.tql-toolbar-button[data-v-ab996cb5]{padding:.25rem;border:none;background:transparent;color:var(--text-color-secondary, #666);cursor:pointer;border-radius:var(--border-radius, 4px);transition:color .2s,background-color .2s;display:flex;align-items:center;justify-content:center}.tql-toolbar-button[data-v-ab996cb5]:hover{color:var(--primary-color, #3b82f6);background:var(--surface-100, #f5f5f5)}.tql-toolbar-button--active[data-v-ab996cb5]{color:var(--primary-color, #3b82f6);background:var(--primary-100, rgba(59, 130, 246, .1))}.tql-validation-status[data-v-ab996cb5]{display:flex;align-items:center}.tql-complexity-badge[data-v-ab996cb5]{display:flex;align-items:center;gap:.25rem;padding:.125rem .5rem;border-radius:9999px;font-size:.625rem;font-weight:600;text-transform:uppercase;letter-spacing:.025em}.tql-complexity-low[data-v-ab996cb5]{background:var(--green-100, #dcfce7);color:var(--green-700, #15803d)}.tql-complexity-medium[data-v-ab996cb5]{background:var(--yellow-100, #fef9c3);color:var(--yellow-700, #a16207)}.tql-complexity-high[data-v-ab996cb5]{background:var(--red-100, #fee2e2);color:var(--red-700, #b91c1c)}.tql-complexity-count[data-v-ab996cb5]{display:inline-flex;align-items:center;justify-content:center;min-width:1rem;height:1rem;padding:0 .25rem;border-radius:9999px;background:currentColor;color:#fff;font-size:.5rem}.tql-complexity-low .tql-complexity-count[data-v-ab996cb5]{background:var(--green-600, #16a34a)}.tql-complexity-medium .tql-complexity-count[data-v-ab996cb5]{background:var(--yellow-600, #ca8a04)}.tql-complexity-high .tql-complexity-count[data-v-ab996cb5]{background:var(--red-600, #dc2626)}.tql-complexity-warnings[data-v-ab996cb5]{position:absolute;top:100%;left:0;right:0;margin-top:.25rem;background:var(--surface-overlay, #fff);border:1px solid var(--surface-border, #e0e0e0);border-radius:var(--border-radius, 6px);padding:.5rem;z-index:9;box-shadow:0 2px 8px #0000001a}.tql-complexity-warning[data-v-ab996cb5]{display:flex;align-items:flex-start;gap:.5rem;padding:.25rem 0;font-size:.75rem}.tql-complexity-warning i[data-v-ab996cb5]{margin-top:.125rem;font-size:.75rem}.tql-complexity-warning--info[data-v-ab996cb5]{color:var(--blue-600, #2563eb)}.tql-complexity-warning--warning[data-v-ab996cb5]{color:var(--yellow-600, #ca8a04)}.tql-complexity-warning--error[data-v-ab996cb5]{color:var(--red-600, #dc2626)}.tql-complexity-suggestions[data-v-ab996cb5]{margin-top:.5rem;padding-top:.5rem;border-top:1px solid var(--surface-border, #e0e0e0)}.tql-complexity-suggestion[data-v-ab996cb5]{display:flex;align-items:flex-start;gap:.5rem;padding:.25rem 0;font-size:.75rem;color:var(--text-color-secondary, #666)}.tql-complexity-suggestion i[data-v-ab996cb5]{color:var(--yellow-500, #eab308)}.tql-history-dropdown[data-v-ab996cb5]{position:absolute;top:100%;left:0;right:0;margin-top:.25rem;background:var(--surface-overlay, #fff);border:1px solid var(--surface-border, #e0e0e0);border-radius:var(--border-radius, 6px);z-index:20;box-shadow:0 4px 12px #00000026;max-height:300px;overflow:hidden;display:flex;flex-direction:column}.tql-history-header[data-v-ab996cb5]{padding:.5rem;border-bottom:1px solid var(--surface-border, #e0e0e0)}.tql-history-search[data-v-ab996cb5]{width:100%;padding:.375rem .5rem;border:1px solid var(--surface-border, #e0e0e0);border-radius:var(--border-radius, 4px);font-size:.75rem;outline:none}.tql-history-search[data-v-ab996cb5]:focus{border-color:var(--primary-color, #3b82f6)}.tql-history-list[data-v-ab996cb5]{overflow-y:auto;flex:1}.tql-history-item[data-v-ab996cb5]{display:flex;align-items:flex-start;gap:.5rem;padding:.5rem;cursor:pointer;border-bottom:1px solid var(--surface-50, #f9fafb);transition:background-color .15s}.tql-history-item[data-v-ab996cb5]:hover{background:var(--surface-100, #f5f5f5)}.tql-history-item--favorite[data-v-ab996cb5]{background:var(--yellow-50, #fefce8)}.tql-history-item--favorite[data-v-ab996cb5]:hover{background:var(--yellow-100, #fef9c3)}.tql-history-favorite[data-v-ab996cb5]{padding:.125rem;border:none;background:transparent;color:var(--text-color-secondary, #999);cursor:pointer;flex-shrink:0}.tql-history-favorite[data-v-ab996cb5]:hover,.tql-history-item--favorite .tql-history-favorite[data-v-ab996cb5]{color:var(--yellow-500, #eab308)}.tql-history-content[data-v-ab996cb5]{flex:1;min-width:0}.tql-history-label[data-v-ab996cb5]{font-size:.6875rem;font-weight:600;color:var(--text-color, #333);margin-bottom:.125rem}.tql-history-query[data-v-ab996cb5]{font-family:Courier New,monospace;font-size:.6875rem;color:var(--text-color-secondary, #666);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.tql-history-time[data-v-ab996cb5]{font-size:.625rem;color:var(--text-color-secondary, #999);flex-shrink:0}.tql-history-empty[data-v-ab996cb5]{padding:1rem;text-align:center;color:var(--text-color-secondary, #666);font-size:.75rem}.tql-preview-panel[data-v-ab996cb5]{position:absolute;top:100%;left:0;right:0;margin-top:.25rem;background:var(--surface-overlay, #fff);border:1px solid var(--surface-border, #e0e0e0);border-radius:var(--border-radius, 6px);z-index:15;box-shadow:0 4px 12px #00000026;max-height:400px;overflow:hidden;display:flex;flex-direction:column}.tql-preview-header[data-v-ab996cb5]{display:flex;align-items:center;justify-content:space-between;padding:.5rem .75rem;border-bottom:1px solid var(--surface-border, #e0e0e0);font-size:.75rem;font-weight:600;color:var(--text-color, #333)}.tql-preview-close[data-v-ab996cb5]{padding:.125rem;border:none;background:transparent;color:var(--text-color-secondary, #666);cursor:pointer;border-radius:var(--border-radius, 4px)}.tql-preview-close[data-v-ab996cb5]:hover{background:var(--surface-100, #f5f5f5);color:var(--text-color, #333)}.tql-preview-panel[data-v-ab996cb5] .tql-preview{border:none;border-radius:0;max-height:350px;overflow-y:auto}.tql-validation-messages-portal{position:fixed;top:var(--tql-msg-top, 0);left:var(--tql-msg-left, 0);width:var(--tql-msg-width, auto);z-index:9998;background:var(--surface-overlay, #fff);border:2px solid var(--red-500, #ef4444);border-radius:var(--border-radius, 6px);padding:.5rem;box-shadow:0 4px 12px #00000026}.tql-validation-messages-portal .tql-error-message{display:flex;align-items:flex-start;gap:.5rem;padding:.25rem 0;font-size:.75rem;color:var(--red-600, #dc2626)}.tql-validation-messages-portal .tql-error-message i{margin-top:.125rem;font-size:.75rem}.tql-validation-messages-portal .tql-error-suggestion{display:block;color:var(--text-color-secondary, #6b7280);font-style:italic;margin-left:1.25rem}
1
+ .tql-autocomplete-dropdown[data-v-3df9a4be]{position:fixed;top:var(--dropdown-top);left:var(--dropdown-left);z-index:9999;min-width:280px;max-width:450px;max-height:var(--dropdown-max-height);background:var(--surface-overlay, #fff);border:1px solid var(--surface-border, #ddd);border-radius:var(--border-radius, 6px);box-shadow:0 4px 16px #00000026;overflow:hidden;display:flex;flex-direction:column}.tql-completion-list[data-v-3df9a4be]{overflow-y:auto;max-height:calc(var(--dropdown-max-height) - 60px)}.tql-completion-item[data-v-3df9a4be]{display:flex;align-items:center;gap:.5rem;padding:.5rem .75rem;cursor:pointer;transition:background-color .15s}.tql-completion-item[data-v-3df9a4be]:hover,.tql-completion-item.selected[data-v-3df9a4be]{background:var(--highlight-bg, #f0f0f0)}.tql-completion-icon[data-v-3df9a4be]{display:flex;align-items:center;justify-content:center;width:1.5rem;height:1.5rem;border-radius:4px;font-size:.75rem}.tql-completion-icon.tql-completion-kind-field[data-v-3df9a4be]{background:var(--blue-100, #e3f2fd);color:var(--blue-600, #1e88e5)}.tql-completion-icon.tql-completion-kind-operator[data-v-3df9a4be]{background:var(--pink-100, #fce4ec);color:var(--pink-600, #d81b60)}.tql-completion-icon.tql-completion-kind-value[data-v-3df9a4be]{background:var(--green-100, #e8f5e9);color:var(--green-600, #43a047)}.tql-completion-icon.tql-completion-kind-keyword[data-v-3df9a4be]{background:var(--purple-100, #f3e5f5);color:var(--purple-600, #8e24aa)}.tql-completion-icon.tql-completion-kind-snippet[data-v-3df9a4be]{background:var(--orange-100, #fff3e0);color:var(--orange-600, #fb8c00)}.tql-completion-icon.tql-completion-kind-mutator[data-v-3df9a4be]{background:var(--cyan-100, #e0f7fa);color:var(--cyan-600, #00acc1)}.tql-completion-icon.tql-completion-kind-aggregation[data-v-3df9a4be]{background:var(--indigo-100, #e8eaf6);color:var(--indigo-600, #3949ab)}.tql-completion-icon.tql-completion-kind-logicalOp[data-v-3df9a4be]{background:var(--yellow-100, #fffde7);color:var(--yellow-700, #fbc02d)}.tql-completion-icon.tql-completion-kind-typeHint[data-v-3df9a4be]{background:var(--teal-100, #e0f2f1);color:var(--teal-600, #00897b)}.tql-completion-icon.tql-completion-kind-visualization[data-v-3df9a4be]{background:var(--red-100, #ffebee);color:var(--red-600, #e53935)}.tql-completion-content[data-v-3df9a4be]{flex:1;display:flex;flex-direction:column;min-width:0}.tql-completion-label[data-v-3df9a4be]{font-family:Courier New,monospace;font-size:.875rem;font-weight:500;color:var(--text-color, #333);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.tql-completion-detail[data-v-3df9a4be]{font-size:.75rem;color:var(--text-color-secondary, #666);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.tql-completion-kind-badge[data-v-3df9a4be]{font-size:.625rem;padding:.125rem .375rem;background:var(--surface-100, #f5f5f5);border-radius:3px;color:var(--text-color-secondary, #666);text-transform:uppercase;letter-spacing:.025em}.tql-completion-docs[data-v-3df9a4be]{padding:.5rem .75rem;border-top:1px solid var(--surface-border, #ddd);background:var(--surface-50, #fafafa);font-size:.75rem;color:var(--text-color-secondary, #666);max-height:60px;overflow-y:auto}.tql-preview[data-v-bae811e6]{font-family:ui-monospace,monospace;font-size:13px;line-height:1.5;padding:12px;border:1px solid var(--tql-preview-border, #e0e0e0);border-radius:6px;background:var(--tql-preview-bg, #fafafa)}.tql-preview--compact[data-v-bae811e6]{padding:8px;font-size:12px}.tql-preview--empty[data-v-bae811e6]{color:var(--tql-preview-muted, #888)}.tql-preview__empty[data-v-bae811e6]{text-align:center;padding:20px}.tql-preview__complexity[data-v-bae811e6]{display:flex;align-items:center;gap:12px;margin-bottom:12px}.tql-preview__complexity-badge[data-v-bae811e6]{padding:2px 8px;border-radius:4px;font-size:11px;font-weight:600;text-transform:uppercase}.tql-preview--low .tql-preview__complexity-badge[data-v-bae811e6]{background:var(--tql-preview-low-bg, #e8f5e9);color:var(--tql-preview-low-text, #2e7d32)}.tql-preview--medium .tql-preview__complexity-badge[data-v-bae811e6]{background:var(--tql-preview-medium-bg, #fff3e0);color:var(--tql-preview-medium-text, #e65100)}.tql-preview--high .tql-preview__complexity-badge[data-v-bae811e6]{background:var(--tql-preview-high-bg, #ffebee);color:var(--tql-preview-high-text, #c62828)}.tql-preview__field-count[data-v-bae811e6]{color:var(--tql-preview-muted, #666);font-size:12px}.tql-preview__warnings[data-v-bae811e6]{margin-bottom:12px}.tql-preview__warning[data-v-bae811e6]{display:flex;align-items:flex-start;gap:8px;padding:6px 8px;border-radius:4px;margin-bottom:4px}.tql-preview__warning--info[data-v-bae811e6]{background:var(--tql-preview-info-bg, #e3f2fd);color:var(--tql-preview-info-text, #1565c0)}.tql-preview__warning--warning[data-v-bae811e6]{background:var(--tql-preview-warning-bg, #fff3e0);color:var(--tql-preview-warning-text, #e65100)}.tql-preview__warning--error[data-v-bae811e6]{background:var(--tql-preview-error-bg, #ffebee);color:var(--tql-preview-error-text, #c62828)}.tql-preview__warning-icon[data-v-bae811e6]{font-weight:700;width:16px;text-align:center}.tql-preview__warning-text[data-v-bae811e6]{flex:1}.tql-preview__suggestions[data-v-bae811e6]{margin-bottom:12px;padding:8px;background:var(--tql-preview-suggestion-bg, #f5f5f5);border-radius:4px}.tql-preview__suggestions-header[data-v-bae811e6]{font-weight:600;margin-bottom:4px;color:var(--tql-preview-header, #333)}.tql-preview__suggestions-list[data-v-bae811e6]{margin:0;padding-left:20px}.tql-preview__suggestion[data-v-bae811e6]{color:var(--tql-preview-muted, #666);margin:2px 0}.tql-preview__tree[data-v-bae811e6]{margin-bottom:12px}.tql-preview__tree-header[data-v-bae811e6],.tql-preview__fields-header[data-v-bae811e6],.tql-preview__operators-header[data-v-bae811e6]{font-weight:600;margin-bottom:8px;color:var(--tql-preview-header, #333);font-size:12px;text-transform:uppercase;letter-spacing:.5px}.tql-preview__tree-content[data-v-bae811e6]{border:1px solid var(--tql-preview-tree-border, #e0e0e0);border-radius:4px;background:var(--tql-preview-tree-bg, #fff);padding:8px}.tql-preview__node[data-v-bae811e6]{margin:2px 0}.tql-preview__node-content[data-v-bae811e6]{display:flex;align-items:center;gap:4px;padding:2px 4px;border-radius:3px;cursor:pointer}.tql-preview__node-content[data-v-bae811e6]:hover{background:var(--tql-preview-node-hover, #f0f0f0)}.tql-preview__node-toggle[data-v-bae811e6]{width:16px;height:16px;border:none;background:var(--tql-preview-toggle-bg, #e0e0e0);border-radius:3px;cursor:pointer;font-size:12px;line-height:1;display:flex;align-items:center;justify-content:center}.tql-preview__node-toggle[data-v-bae811e6]:hover{background:var(--tql-preview-toggle-hover, #d0d0d0)}.tql-preview__node-toggle--leaf[data-v-bae811e6]{visibility:hidden}.tql-preview__node-type[data-v-bae811e6]{font-weight:600;color:var(--tql-preview-node-type, #666)}.tql-preview__node--and .tql-preview__node-type[data-v-bae811e6]{color:var(--tql-preview-and, #1976d2)}.tql-preview__node--or .tql-preview__node-type[data-v-bae811e6]{color:var(--tql-preview-or, #7b1fa2)}.tql-preview__node--not .tql-preview__node-type[data-v-bae811e6]{color:var(--tql-preview-not, #c62828)}.tql-preview__node--group .tql-preview__node-type[data-v-bae811e6]{color:var(--tql-preview-group, #666)}.tql-preview__node-label[data-v-bae811e6]{flex:1}.tql-preview__fields-list[data-v-bae811e6]{display:flex;flex-direction:column;gap:4px}.tql-preview__field[data-v-bae811e6]{display:flex;align-items:center;gap:6px;padding:4px 8px;background:var(--tql-preview-field-bg, #fff);border:1px solid var(--tql-preview-field-border, #e0e0e0);border-radius:4px;cursor:pointer}.tql-preview__field[data-v-bae811e6]:hover{background:var(--tql-preview-field-hover, #f5f5f5)}.tql-preview__field-name[data-v-bae811e6]{font-weight:600;color:var(--tql-preview-field-name, #1976d2)}.tql-preview__field-mutators[data-v-bae811e6]{color:var(--tql-preview-mutator, #7b1fa2)}.tql-preview__field-operator[data-v-bae811e6]{color:var(--tql-preview-operator, #666)}.tql-preview__field-value[data-v-bae811e6]{color:var(--tql-preview-value, #2e7d32)}.tql-preview__match-type[data-v-bae811e6]{margin-left:auto;padding:1px 4px;border-radius:3px;font-size:10px;font-weight:600;background:var(--tql-preview-match-bg, #f0f0f0)}.tql-preview__match-type--exact[data-v-bae811e6]{background:var(--tql-preview-match-exact-bg, #e8f5e9);color:var(--tql-preview-match-exact, #2e7d32)}.tql-preview__match-type--wildcard[data-v-bae811e6]{background:var(--tql-preview-match-wildcard-bg, #fff3e0);color:var(--tql-preview-match-wildcard, #e65100)}.tql-preview__match-type--regex[data-v-bae811e6]{background:var(--tql-preview-match-regex-bg, #fce4ec);color:var(--tql-preview-match-regex, #c2185b)}.tql-preview__match-type--range[data-v-bae811e6]{background:var(--tql-preview-match-range-bg, #e3f2fd);color:var(--tql-preview-match-range, #1565c0)}.tql-preview__match-type--cidr[data-v-bae811e6]{background:var(--tql-preview-match-cidr-bg, #f3e5f5);color:var(--tql-preview-match-cidr, #7b1fa2)}.tql-preview__operators-list[data-v-bae811e6]{display:flex;flex-wrap:wrap;gap:8px}.tql-preview__operator[data-v-bae811e6]{padding:2px 6px;background:var(--tql-preview-op-bg, #f0f0f0);border-radius:3px;font-size:11px}.tql-input-wrapper[data-v-b0fd503e]{position:relative;display:flex;align-items:flex-start;border:1px solid var(--surface-border, #ddd);border-radius:var(--border-radius, 6px);background:var(--surface-ground, #fff);transition:border-color .2s,box-shadow .2s}.tql-input-wrapper.tql-input-has-min-height[data-v-b0fd503e],.tql-input-wrapper.tql-input-has-min-height .tql-input[data-v-b0fd503e]{min-height:var(--tql-min-height)}.tql-input-wrapper.tql-input-focused[data-v-b0fd503e]{border-color:var(--primary-color, #3b82f6);box-shadow:0 0 0 2px var(--primary-100, rgba(59, 130, 246, .2))}.tql-input-wrapper.tql-input-invalid[data-v-b0fd503e]{border-color:var(--red-500, #ef4444)}.tql-input-wrapper.tql-input-invalid.tql-input-focused[data-v-b0fd503e]{box-shadow:0 0 0 2px var(--red-100, rgba(239, 68, 68, .2))}.tql-input-wrapper.tql-input-disabled[data-v-b0fd503e]{opacity:.6;cursor:not-allowed}.tql-highlight-layer[data-v-b0fd503e]{position:absolute;top:0;left:0;right:0;bottom:0;padding:.5rem .75rem;pointer-events:none;white-space:pre-wrap;word-wrap:break-word;font-family:Courier New,monospace;font-size:.875rem;line-height:1.5;overflow:hidden}.tql-input-multiline .tql-highlight-layer[data-v-b0fd503e]{overflow-y:auto}.tql-input[data-v-b0fd503e]{flex:1;width:100%;padding:.5rem 8rem .5rem .75rem;border:none;background:transparent;font-family:Courier New,monospace;font-size:.875rem;line-height:1.5;color:var(--text-color, #333);outline:none;resize:none}.tql-input.tql-input-highlighted[data-v-b0fd503e]{color:transparent;caret-color:var(--text-color, #333)}.tql-input[data-v-b0fd503e]::placeholder{color:var(--text-color-secondary, #666);opacity:.7}.tql-input[data-v-b0fd503e]:disabled{cursor:not-allowed}.tql-token-field[data-v-b0fd503e]{color:var(--tql-field-color, var(--blue-600, #2563eb))}.tql-token-operator[data-v-b0fd503e]{color:var(--tql-operator-color, var(--pink-600, #db2777));font-weight:500}.tql-token-logicalOp[data-v-b0fd503e]{color:var(--tql-logical-color, var(--purple-600, #9333ea));font-weight:600}.tql-token-collectionOp[data-v-b0fd503e]{color:var(--tql-collection-color, var(--indigo-600, #4f46e5));font-weight:600}.tql-token-string[data-v-b0fd503e]{color:var(--tql-string-color, var(--green-600, #16a34a))}.tql-token-number[data-v-b0fd503e]{color:var(--tql-number-color, var(--orange-600, #ea580c))}.tql-token-boolean[data-v-b0fd503e]{color:var(--tql-boolean-color, var(--cyan-600, #0891b2))}.tql-token-null[data-v-b0fd503e]{color:var(--tql-null-color, var(--gray-500, #6b7280));font-style:italic}.tql-token-mutator[data-v-b0fd503e]{color:var(--tql-mutator-color, var(--teal-600, #0d9488));font-style:italic}.tql-token-aggregation[data-v-b0fd503e]{color:var(--tql-aggregation-color, var(--indigo-600, #4f46e5))}.tql-token-keyword[data-v-b0fd503e]{color:var(--tql-keyword-color, var(--purple-500, #a855f7))}.tql-token-typeHint[data-v-b0fd503e]{color:var(--tql-typehint-color, var(--teal-500, #14b8a6))}.tql-token-visualization[data-v-b0fd503e]{color:var(--tql-viz-color, var(--red-500, #ef4444))}.tql-token-arrow[data-v-b0fd503e]{color:var(--tql-arrow-color, var(--gray-600, #4b5563));font-weight:600}.tql-token-doubleColon[data-v-b0fd503e]{color:var(--tql-colon-color, var(--gray-500, #6b7280))}.tql-token-paren[data-v-b0fd503e],.tql-token-bracket[data-v-b0fd503e]{color:var(--tql-bracket-color, var(--gray-600, #4b5563))}.tql-token-error[data-v-b0fd503e]{color:var(--tql-error-color, var(--red-600, #dc2626));text-decoration:wavy underline;text-decoration-color:var(--red-400, #f87171)}.tql-token-error-range[data-v-b0fd503e]{background-color:var(--red-50, #fef2f2)}.tql-token-unknown[data-v-b0fd503e]{color:var(--text-color-secondary, #666)}.tql-validation-icon[data-v-b0fd503e]{position:absolute;right:.5rem;top:50%;transform:translateY(-50%);display:flex;align-items:center;justify-content:center}.tql-input-multiline .tql-validation-icon[data-v-b0fd503e]{top:.75rem;transform:none}.tql-icon-valid[data-v-b0fd503e]{color:var(--green-500, #22c55e)}.tql-icon-invalid[data-v-b0fd503e]{color:var(--red-500, #ef4444)}.tql-icon-clickable[data-v-b0fd503e]{cursor:pointer;transition:transform .2s}.tql-icon-clickable[data-v-b0fd503e]:hover{transform:scale(1.2)}.tql-icon-clickable[data-v-b0fd503e]:focus{outline:2px solid var(--primary-color, #3b82f6);outline-offset:2px;border-radius:50%}.tql-snippet-button[data-v-b0fd503e]{position:absolute;right:2rem;top:50%;transform:translateY(-50%);padding:.25rem;border:none;background:transparent;color:var(--text-color-secondary, #666);cursor:pointer;border-radius:var(--border-radius, 6px);transition:color .2s,background-color .2s}.tql-snippet-button[data-v-b0fd503e]:hover{color:var(--primary-color, #3b82f6);background:var(--surface-100, #f5f5f5)}.tql-input-multiline .tql-snippet-button[data-v-b0fd503e]{top:.75rem;transform:none}.tql-input-resizable-textarea[data-v-b0fd503e]{resize:vertical;min-height:80px}.tql-input-wrapper.tql-input-resizable[data-v-b0fd503e]{height:auto}.tql-input-wrapper.tql-input-resizable .tql-highlight-layer[data-v-b0fd503e]{height:100%}.tql-validation-messages[data-v-b0fd503e]{position:absolute;top:100%;left:0;right:0;margin-top:.25rem;background:var(--surface-overlay, #fff);border:1px solid var(--red-200, #fecaca);border-radius:var(--border-radius, 6px);padding:.5rem;z-index:10;box-shadow:0 2px 8px #0000001a}.tql-input-autocomplete-active .tql-validation-messages[data-v-b0fd503e],.tql-input-autocomplete-active .tql-complexity-warnings[data-v-b0fd503e],.tql-input-autocomplete-active .tql-history-dropdown[data-v-b0fd503e],.tql-input-autocomplete-active .tql-preview-panel[data-v-b0fd503e]{display:none!important}.tql-error-message[data-v-b0fd503e]{display:flex;align-items:flex-start;gap:.5rem;padding:.25rem 0;font-size:.75rem;color:var(--red-600, #dc2626)}.tql-error-message i[data-v-b0fd503e]{margin-top:.125rem;font-size:.75rem}.tql-error-suggestion[data-v-b0fd503e]{display:block;color:var(--text-color-secondary, #666);font-style:italic;margin-left:1.25rem}.sr-only[data-v-b0fd503e]{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}.tql-toolbar[data-v-b0fd503e]{position:absolute;right:.5rem;top:50%;transform:translateY(-50%);display:flex;align-items:center;gap:.25rem}.tql-input-multiline .tql-toolbar[data-v-b0fd503e]{top:.5rem;transform:none}.tql-toolbar-button[data-v-b0fd503e]{padding:.25rem;border:none;background:transparent;color:var(--text-color-secondary, #666);cursor:pointer;border-radius:var(--border-radius, 4px);transition:color .2s,background-color .2s;display:flex;align-items:center;justify-content:center}.tql-toolbar-button[data-v-b0fd503e]:hover{color:var(--primary-color, #3b82f6);background:var(--surface-100, #f5f5f5)}.tql-toolbar-button--active[data-v-b0fd503e]{color:var(--primary-color, #3b82f6);background:var(--primary-100, rgba(59, 130, 246, .1))}.tql-validation-status[data-v-b0fd503e]{display:flex;align-items:center}.tql-complexity-badge[data-v-b0fd503e]{display:flex;align-items:center;gap:.25rem;padding:.125rem .5rem;border-radius:9999px;font-size:.625rem;font-weight:600;text-transform:uppercase;letter-spacing:.025em}.tql-complexity-low[data-v-b0fd503e]{background:var(--green-100, #dcfce7);color:var(--green-700, #15803d)}.tql-complexity-medium[data-v-b0fd503e]{background:var(--yellow-100, #fef9c3);color:var(--yellow-700, #a16207)}.tql-complexity-high[data-v-b0fd503e]{background:var(--red-100, #fee2e2);color:var(--red-700, #b91c1c)}.tql-complexity-count[data-v-b0fd503e]{display:inline-flex;align-items:center;justify-content:center;min-width:1rem;height:1rem;padding:0 .25rem;border-radius:9999px;background:currentColor;color:#fff;font-size:.5rem}.tql-complexity-low .tql-complexity-count[data-v-b0fd503e]{background:var(--green-600, #16a34a)}.tql-complexity-medium .tql-complexity-count[data-v-b0fd503e]{background:var(--yellow-600, #ca8a04)}.tql-complexity-high .tql-complexity-count[data-v-b0fd503e]{background:var(--red-600, #dc2626)}.tql-complexity-warnings[data-v-b0fd503e]{position:absolute;top:100%;left:0;right:0;margin-top:.25rem;background:var(--surface-overlay, #fff);border:1px solid var(--surface-border, #e0e0e0);border-radius:var(--border-radius, 6px);padding:.5rem;z-index:9;box-shadow:0 2px 8px #0000001a}.tql-complexity-warning[data-v-b0fd503e]{display:flex;align-items:flex-start;gap:.5rem;padding:.25rem 0;font-size:.75rem}.tql-complexity-warning i[data-v-b0fd503e]{margin-top:.125rem;font-size:.75rem}.tql-complexity-warning--info[data-v-b0fd503e]{color:var(--blue-600, #2563eb)}.tql-complexity-warning--warning[data-v-b0fd503e]{color:var(--yellow-600, #ca8a04)}.tql-complexity-warning--error[data-v-b0fd503e]{color:var(--red-600, #dc2626)}.tql-complexity-suggestions[data-v-b0fd503e]{margin-top:.5rem;padding-top:.5rem;border-top:1px solid var(--surface-border, #e0e0e0)}.tql-complexity-suggestion[data-v-b0fd503e]{display:flex;align-items:flex-start;gap:.5rem;padding:.25rem 0;font-size:.75rem;color:var(--text-color-secondary, #666)}.tql-complexity-suggestion i[data-v-b0fd503e]{color:var(--yellow-500, #eab308)}.tql-history-dropdown[data-v-b0fd503e]{position:absolute;top:100%;left:0;right:0;margin-top:.25rem;background:var(--surface-overlay, #fff);border:1px solid var(--surface-border, #e0e0e0);border-radius:var(--border-radius, 6px);z-index:20;box-shadow:0 4px 12px #00000026;max-height:300px;overflow:hidden;display:flex;flex-direction:column}.tql-history-header[data-v-b0fd503e]{padding:.5rem;border-bottom:1px solid var(--surface-border, #e0e0e0)}.tql-history-search[data-v-b0fd503e]{width:100%;padding:.375rem .5rem;border:1px solid var(--surface-border, #e0e0e0);border-radius:var(--border-radius, 4px);font-size:.75rem;outline:none}.tql-history-search[data-v-b0fd503e]:focus{border-color:var(--primary-color, #3b82f6)}.tql-history-list[data-v-b0fd503e]{overflow-y:auto;flex:1}.tql-history-item[data-v-b0fd503e]{display:flex;align-items:flex-start;gap:.5rem;padding:.5rem;cursor:pointer;border-bottom:1px solid var(--surface-50, #f9fafb);transition:background-color .15s}.tql-history-item[data-v-b0fd503e]:hover{background:var(--surface-100, #f5f5f5)}.tql-history-item--favorite[data-v-b0fd503e]{background:var(--yellow-50, #fefce8)}.tql-history-item--favorite[data-v-b0fd503e]:hover{background:var(--yellow-100, #fef9c3)}.tql-history-favorite[data-v-b0fd503e]{padding:.125rem;border:none;background:transparent;color:var(--text-color-secondary, #999);cursor:pointer;flex-shrink:0}.tql-history-favorite[data-v-b0fd503e]:hover,.tql-history-item--favorite .tql-history-favorite[data-v-b0fd503e]{color:var(--yellow-500, #eab308)}.tql-history-content[data-v-b0fd503e]{flex:1;min-width:0}.tql-history-label[data-v-b0fd503e]{font-size:.6875rem;font-weight:600;color:var(--text-color, #333);margin-bottom:.125rem}.tql-history-query[data-v-b0fd503e]{font-family:Courier New,monospace;font-size:.6875rem;color:var(--text-color-secondary, #666);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.tql-history-time[data-v-b0fd503e]{font-size:.625rem;color:var(--text-color-secondary, #999);flex-shrink:0}.tql-history-empty[data-v-b0fd503e]{padding:1rem;text-align:center;color:var(--text-color-secondary, #666);font-size:.75rem}.tql-preview-panel[data-v-b0fd503e]{position:absolute;top:100%;left:0;right:0;margin-top:.25rem;background:var(--surface-overlay, #fff);border:1px solid var(--surface-border, #e0e0e0);border-radius:var(--border-radius, 6px);z-index:15;box-shadow:0 4px 12px #00000026;max-height:400px;overflow:hidden;display:flex;flex-direction:column}.tql-preview-header[data-v-b0fd503e]{display:flex;align-items:center;justify-content:space-between;padding:.5rem .75rem;border-bottom:1px solid var(--surface-border, #e0e0e0);font-size:.75rem;font-weight:600;color:var(--text-color, #333)}.tql-preview-close[data-v-b0fd503e]{padding:.125rem;border:none;background:transparent;color:var(--text-color-secondary, #666);cursor:pointer;border-radius:var(--border-radius, 4px)}.tql-preview-close[data-v-b0fd503e]:hover{background:var(--surface-100, #f5f5f5);color:var(--text-color, #333)}.tql-preview-panel[data-v-b0fd503e] .tql-preview{border:none;border-radius:0;max-height:350px;overflow-y:auto}.tql-validation-messages-portal{position:fixed;top:var(--tql-msg-top, 0);left:var(--tql-msg-left, 0);width:var(--tql-msg-width, auto);z-index:9998;background:var(--surface-overlay, #fff);border:2px solid var(--red-500, #ef4444);border-radius:var(--border-radius, 6px);padding:.5rem;box-shadow:0 4px 12px #00000026}.tql-validation-messages-portal .tql-error-message{display:flex;align-items:flex-start;gap:.5rem;padding:.25rem 0;font-size:.75rem;color:var(--red-600, #dc2626)}.tql-validation-messages-portal .tql-error-message i{margin-top:.125rem;font-size:.75rem}.tql-validation-messages-portal .tql-error-suggestion{display:block;color:var(--text-color-secondary, #6b7280);font-style:italic;margin-left:1.25rem}
@@ -2,7 +2,7 @@ import o from "./TqlInput.vue2.js";
2
2
  /* empty css */
3
3
  /* empty css */
4
4
  import t from "../_virtual/_plugin-vue_export-helper.js";
5
- const _ = /* @__PURE__ */ t(o, [["__scopeId", "data-v-ab996cb5"]]);
5
+ const _ = /* @__PURE__ */ t(o, [["__scopeId", "data-v-b0fd503e"]]);
6
6
  export {
7
7
  _ as default
8
8
  };
@@ -1,47 +1,47 @@
1
- import { defineComponent as Ye, ref as v, toRef as X, computed as R, watch as Y, onMounted as Ze, nextTick as V, onUnmounted as _e, openBlock as i, createElementBlock as a, normalizeClass as k, unref as u, Fragment as B, renderList as A, toDisplayString as y, createCommentVNode as f, withDirectives as oe, vModelText as ae, createElementVNode as r, withModifiers as M, withKeys as be, createVNode as qe, createBlock as et, Teleport as tt } from "vue";
2
- import lt from "./TqlAutocomplete.vue.js";
3
- import it from "./components/TqlPreview.vue.js";
4
- import { useTqlInput as ot } from "./useTqlInput.js";
5
- import { useQueryHistory as at } from "./composables/useQueryHistory.js";
6
- import { analyzeComplexity as st } from "../src/complexityAnalyzer.js";
7
- const nt = {
1
+ import { defineComponent as et, ref as h, toRef as Z, computed as T, watch as _, onMounted as tt, nextTick as P, onUnmounted as lt, openBlock as o, createElementBlock as n, normalizeClass as S, unref as c, Fragment as M, renderList as N, toDisplayString as w, createCommentVNode as m, withDirectives as ae, vModelText as ne, createElementVNode as d, withModifiers as Q, withKeys as ke, createVNode as xe, createBlock as ot, Teleport as it } from "vue";
2
+ import at from "./TqlAutocomplete.vue.js";
3
+ import nt from "./components/TqlPreview.vue.js";
4
+ import { useTqlInput as st } from "./useTqlInput.js";
5
+ import { useQueryHistory as ut } from "./composables/useQueryHistory.js";
6
+ import { analyzeComplexity as rt } from "../src/complexityAnalyzer.js";
7
+ const ct = {
8
8
  key: 0,
9
9
  class: "tql-highlight-layer",
10
10
  "aria-hidden": "true"
11
- }, ut = ["placeholder", "disabled", "readonly", "rows", "aria-expanded", "aria-invalid", "aria-describedby"], rt = ["placeholder", "disabled", "readonly", "aria-expanded", "aria-invalid", "aria-describedby"], dt = { class: "tql-toolbar" }, ct = ["title"], vt = { class: "tql-complexity-label" }, ft = {
11
+ }, dt = ["placeholder", "disabled", "readonly", "rows", "aria-expanded", "aria-invalid", "aria-describedby"], vt = ["placeholder", "disabled", "readonly", "aria-expanded", "aria-invalid", "aria-describedby"], ft = { class: "tql-toolbar" }, pt = ["title"], ht = { class: "tql-complexity-label" }, mt = {
12
12
  key: 0,
13
13
  class: "tql-complexity-count"
14
- }, pt = {
14
+ }, yt = {
15
15
  key: 4,
16
16
  class: "tql-validation-status"
17
- }, ht = {
17
+ }, gt = {
18
18
  key: 0,
19
19
  class: "pi pi-check-circle tql-icon-valid",
20
20
  "aria-label": "Query is valid"
21
- }, mt = ["aria-label", "aria-expanded"], yt = { class: "tql-history-header" }, gt = { class: "tql-history-list" }, wt = ["onClick"], bt = ["title", "onClick"], qt = { class: "tql-history-content" }, kt = {
21
+ }, wt = ["aria-label", "aria-expanded"], bt = { class: "tql-history-header" }, qt = { class: "tql-history-list" }, kt = ["onClick"], xt = ["title", "onClick"], Ct = { class: "tql-history-content" }, Pt = {
22
22
  key: 0,
23
23
  class: "tql-history-label"
24
- }, xt = { class: "tql-history-query" }, Ct = { class: "tql-history-time" }, Pt = {
24
+ }, St = { class: "tql-history-query" }, Vt = { class: "tql-history-time" }, Rt = {
25
25
  key: 0,
26
26
  class: "tql-history-empty"
27
- }, St = {
27
+ }, $t = {
28
28
  key: 0,
29
29
  class: "tql-error-suggestion"
30
- }, Vt = {
30
+ }, Dt = {
31
31
  key: 4,
32
32
  class: "tql-complexity-warnings"
33
- }, $t = {
33
+ }, It = {
34
34
  key: 0,
35
35
  class: "tql-complexity-suggestions"
36
- }, It = {
36
+ }, Tt = {
37
37
  key: 5,
38
38
  class: "tql-preview-panel"
39
- }, Ht = { class: "tql-preview-header" }, Rt = {
39
+ }, Et = { class: "tql-preview-header" }, Ht = {
40
40
  class: "sr-only",
41
41
  role: "status",
42
42
  "aria-live": "polite",
43
43
  "aria-atomic": "true"
44
- }, Dt = { key: 0 }, Et = { key: 1 }, Tt = 1500, At = /* @__PURE__ */ Ye({
44
+ }, Bt = { key: 0 }, Mt = { key: 1 }, Qt = 1500, Nt = /* @__PURE__ */ et({
45
45
  __name: "TqlInput",
46
46
  props: {
47
47
  modelValue: {},
@@ -71,530 +71,575 @@ const nt = {
71
71
  historyStorageKey: {}
72
72
  },
73
73
  emits: ["update:modelValue", "validation", "parse", "submit"],
74
- setup(o, { expose: ke, emit: xe }) {
75
- const c = o, x = xe, d = v(null), g = v(null), L = v(null), n = v(c.modelValue), w = v(!1), h = v(!1), O = v(0), z = v(!1);
76
- let F = null;
77
- const C = v(!1), P = v(!1), D = v(""), Z = `tql-input-${Math.random().toString(36).substring(2, 9)}`, se = `${Z}-input`, _ = `${Z}-autocomplete`, ee = `${Z}-errors`, Q = v([]), E = v(-1), Ce = X(c, "modelValue"), Pe = X(c, "fieldSchema"), Se = X(c, "fieldValues"), Ve = X(c, "snippets"), {
78
- tokens: $e,
79
- cursorPosition: te,
80
- completionItems: K,
81
- showAutocomplete: q,
82
- isValid: le,
83
- errors: $,
74
+ setup(i, { expose: Ce, emit: Pe }) {
75
+ const f = i, b = Pe, s = h(null), q = h(null), A = h(null), u = h(f.modelValue), k = h(!1), y = h(!1), U = h(0), L = h(!1);
76
+ let j = null, se = 0;
77
+ const V = h(!1), R = h(!1), E = h(""), ee = `tql-input-${Math.random().toString(36).substring(2, 9)}`, ue = `${ee}-input`, te = `${ee}-autocomplete`, le = `${ee}-errors`, z = h([]), H = h(-1), Se = Z(f, "modelValue"), Ve = Z(f, "fieldSchema"), Re = Z(f, "fieldValues"), $e = Z(f, "snippets"), {
78
+ tokens: De,
79
+ cursorPosition: K,
80
+ completionItems: O,
81
+ showAutocomplete: C,
82
+ isValid: oe,
83
+ errors: D,
84
84
  hasErrors: I,
85
85
  validate: Ie,
86
- handleInput: ne,
87
- handleCursorChange: H,
88
- insertCompletion: He,
89
- insertSnippet: Re,
90
- triggerAutocomplete: ue,
91
- hideAutocomplete: N,
92
- getTokenAtCursor: De
93
- } = ot({
94
- modelValue: Ce,
95
- fieldSchema: Pe,
96
- fieldValues: Se,
97
- snippets: Ve,
98
- validateOnInput: c.validateOnInput,
99
- debounceMs: c.debounceMs,
100
- autocomplete: c.autocomplete,
101
- onValidation: (e) => x("validation", e),
102
- onParse: (e) => x("parse", e)
103
- }), S = c.showHistory ? at({
104
- storageKey: c.historyStorageKey || "tql-history",
105
- ...c.historyOptions
106
- }) : null, m = R(() => !c.showComplexity || !n.value.trim() ? null : st(n.value, c.complexityThresholds)), Ee = R(() => m.value ? `tql-complexity-${m.value.score}` : ""), re = R(() => m.value && {
86
+ handleInput: re,
87
+ handleCursorChange: x,
88
+ insertCompletion: Te,
89
+ insertSnippet: Ee,
90
+ triggerAutocomplete: F,
91
+ hideAutocomplete: W,
92
+ getTokenAtCursor: He
93
+ } = st({
94
+ modelValue: Se,
95
+ fieldSchema: Ve,
96
+ fieldValues: Re,
97
+ snippets: $e,
98
+ validateOnInput: f.validateOnInput,
99
+ debounceMs: f.debounceMs,
100
+ autocomplete: f.autocomplete,
101
+ onValidation: (e) => b("validation", e),
102
+ onParse: (e) => b("parse", e)
103
+ }), $ = f.showHistory ? ut({
104
+ storageKey: f.historyStorageKey || "tql-history",
105
+ ...f.historyOptions
106
+ }) : null, g = T(() => !f.showComplexity || !u.value.trim() ? null : rt(u.value, f.complexityThresholds)), Be = T(() => g.value ? `tql-complexity-${g.value.score}` : ""), ce = T(() => g.value && {
107
107
  low: "Low",
108
108
  medium: "Medium",
109
109
  high: "High"
110
- }[m.value.score] || ""), de = R(() => S ? D.value.trim() ? S.searchHistory(D.value).slice(0, 10) : S.getRecentQueries(10) : []);
111
- function Te(e) {
112
- n.value = e.query, x("update:modelValue", e.query), ne(e.query), C.value = !1, D.value = "", V(() => {
110
+ }[g.value.score] || ""), de = T(() => $ ? E.value.trim() ? $.searchHistory(E.value).slice(0, 10) : $.getRecentQueries(10) : []);
111
+ function Me(e) {
112
+ u.value = e.query, b("update:modelValue", e.query), re(e.query), V.value = !1, E.value = "", P(() => {
113
113
  var t;
114
- return (t = d.value) == null ? void 0 : t.focus();
114
+ return (t = s.value) == null ? void 0 : t.focus();
115
115
  });
116
116
  }
117
- function Be(e, t) {
118
- t.stopPropagation(), S == null || S.toggleFavorite(e.id);
117
+ function Qe(e, t) {
118
+ t.stopPropagation(), $ == null || $.toggleFavorite(e.id);
119
119
  }
120
- function ce() {
121
- S && n.value.trim() && S.addQuery(n.value);
120
+ function ve() {
121
+ $ && u.value.trim() && $.addQuery(u.value);
122
122
  }
123
- function Me() {
124
- C.value = !C.value, C.value && (P.value = !1);
123
+ function Ae() {
124
+ V.value = !V.value, V.value && (R.value = !1);
125
125
  }
126
126
  function Le() {
127
- P.value = !P.value, P.value && (C.value = !1);
127
+ R.value = !R.value, R.value && (V.value = !1);
128
128
  }
129
- Y(
130
- () => c.modelValue,
129
+ _(
130
+ () => f.modelValue,
131
131
  (e) => {
132
- e !== n.value && (n.value = e);
132
+ e !== u.value && (u.value = e);
133
133
  }
134
- ), Y(
135
- () => c.minHeight,
134
+ ), _(
135
+ () => f.minHeight,
136
136
  (e) => {
137
- g.value && (e ? g.value.style.setProperty("--tql-min-height", e) : g.value.style.removeProperty("--tql-min-height"));
137
+ q.value && (e ? q.value.style.setProperty("--tql-min-height", e) : q.value.style.removeProperty("--tql-min-height"));
138
138
  },
139
139
  { immediate: !0 }
140
140
  );
141
- const ze = R(() => h.value ? !0 : q.value && K.value.length > 0 ? !1 : !!(!w.value || z.value)), U = v({ top: 0, left: 0 }), Qe = R(() => U.value.top > 0 || U.value.left > 0), ve = v({ top: 0, left: 0, width: 0 }), T = v(null), Ke = R(() => {
142
- const e = ve.value;
141
+ const ze = T(() => y.value ? !0 : C.value && O.value.length > 0 ? !1 : !!(!k.value || L.value)), G = h({ top: 0, left: 0 }), Ke = T(() => G.value.top > 0 || G.value.left > 0), fe = h({ top: 0, left: 0, width: 0 }), B = h(null), Oe = T(() => {
142
+ const e = fe.value;
143
143
  return e.top > 0 || e.left > 0 || e.width > 0;
144
144
  });
145
- function j() {
146
- if (!g.value)
145
+ function J() {
146
+ if (!q.value)
147
147
  return;
148
- const e = g.value.getBoundingClientRect();
149
- U.value = {
148
+ const e = q.value.getBoundingClientRect();
149
+ G.value = {
150
150
  top: e.bottom + 4,
151
151
  left: e.left
152
- }, ve.value = {
152
+ }, fe.value = {
153
153
  top: e.bottom + 4,
154
154
  left: e.left,
155
155
  width: e.width
156
- }, T.value && (T.value.style.setProperty("--tql-msg-top", `${e.bottom + 4}px`), T.value.style.setProperty("--tql-msg-left", `${e.left}px`), T.value.style.setProperty("--tql-msg-width", `${e.width}px`));
156
+ }, B.value && (B.value.style.setProperty("--tql-msg-top", `${e.bottom + 4}px`), B.value.style.setProperty("--tql-msg-left", `${e.left}px`), B.value.style.setProperty("--tql-msg-width", `${e.width}px`));
157
157
  }
158
- function Ae(e) {
158
+ function Fe(e) {
159
159
  const t = `tql-token tql-token-${e.type}`;
160
- return $.value.some((s) => e.start >= s.start && e.end <= s.end) ? `${t} tql-token-error-range` : t;
160
+ return D.value.some((a) => e.start >= a.start && e.end <= a.end) ? `${t} tql-token-error-range` : t;
161
161
  }
162
- function fe(e) {
162
+ function pe(e) {
163
163
  const t = e.target;
164
- n.value = t.value, x("update:modelValue", t.value), ne(t.value), O.value = Date.now(), z.value = !1, V(() => {
165
- d.value && H(d.value.selectionStart || 0);
164
+ u.value = t.value, b("update:modelValue", t.value), re(t.value), U.value = Date.now(), L.value = !1, P(() => {
165
+ s.value && x(s.value.selectionStart || 0);
166
166
  });
167
167
  }
168
- function W() {
169
- if (d.value) {
170
- const e = d.value.selectionStart || 0;
171
- e !== te.value && H(e);
168
+ function X() {
169
+ if (s.value) {
170
+ const e = s.value.selectionStart || 0;
171
+ e !== K.value && x(e);
172
172
  }
173
173
  }
174
- function pe(e) {
175
- var t, l, s, p, b;
174
+ function he(e) {
175
+ var t, l, a, r, v;
176
176
  if (e.key === "Tab" && !e.shiftKey) {
177
- if (Q.value.length > 0 && E.value >= 0) {
178
- e.preventDefault(), Oe();
177
+ if (z.value.length > 0 && H.value >= 0) {
178
+ e.preventDefault(), Ne();
179
179
  return;
180
180
  }
181
- if (Fe()) {
182
- e.preventDefault(), Ne();
181
+ if (me()) {
182
+ e.preventDefault(), We();
183
+ return;
184
+ }
185
+ if (Ue()) {
186
+ e.preventDefault(), je();
183
187
  return;
184
188
  }
185
189
  }
186
- if (q.value && K.value.length > 0)
190
+ if (C.value && O.value.length > 0)
187
191
  switch (e.key) {
188
192
  case "ArrowDown":
189
- e.preventDefault(), (t = L.value) == null || t.moveDown();
193
+ e.preventDefault(), (t = A.value) == null || t.moveDown();
190
194
  return;
191
195
  case "ArrowUp":
192
- e.preventDefault(), (l = L.value) == null || l.moveUp();
196
+ e.preventDefault(), (l = A.value) == null || l.moveUp();
193
197
  return;
194
198
  case "Tab":
195
- e.preventDefault(), H(((s = d.value) == null ? void 0 : s.selectionStart) || 0), K.value.length > 0 && ((p = L.value) == null || p.selectCurrent());
199
+ if (e.preventDefault(), Date.now() - se < 100)
200
+ return;
201
+ x(((a = s.value) == null ? void 0 : a.selectionStart) || 0), O.value.length > 0 && ((r = A.value) == null || r.selectCurrent());
196
202
  return;
197
203
  case "Enter":
198
- if (!c.multiline)
204
+ if (!f.multiline)
199
205
  break;
200
- e.preventDefault(), (b = L.value) == null || b.selectCurrent();
206
+ e.preventDefault(), (v = A.value) == null || v.selectCurrent();
201
207
  return;
202
208
  case "Escape":
203
- e.preventDefault(), N(), ie();
209
+ e.preventDefault(), W(), ie();
204
210
  return;
205
211
  }
206
212
  if (e.key === " " && e.ctrlKey) {
207
- e.preventDefault(), ue();
213
+ e.preventDefault(), F();
208
214
  return;
209
215
  }
210
- e.key === "Enter" && (c.multiline && e.ctrlKey || !c.multiline && !q.value) && (e.preventDefault(), ce(), x("submit", n.value));
216
+ e.key === "Enter" && (f.multiline && e.ctrlKey || !f.multiline && !C.value) && (e.preventDefault(), ve(), b("submit", u.value));
211
217
  }
212
- function Oe() {
213
- if (E.value++, E.value >= Q.value.length) {
218
+ function Ne() {
219
+ if (H.value++, H.value >= z.value.length) {
214
220
  ie();
215
221
  return;
216
222
  }
217
- const e = Q.value[E.value];
218
- d.value && (d.value.setSelectionRange(e.start, e.end), d.value.focus(), H(e.start));
223
+ const e = z.value[H.value];
224
+ s.value && (s.value.setSelectionRange(e.start, e.end), s.value.focus(), x(e.start));
219
225
  }
220
226
  function ie() {
221
- Q.value = [], E.value = -1;
227
+ z.value = [], H.value = -1;
222
228
  }
223
- function Fe() {
224
- const e = te.value, t = n.value;
225
- let l = !1, s = null;
226
- for (let p = 0; p < e; p++) {
227
- const b = t[p], J = p > 0 ? t[p - 1] : "";
228
- (b === '"' || b === "'") && J !== "\\" && (l ? b === s && (l = !1, s = null) : (l = !0, s = b));
229
+ function me() {
230
+ const e = K.value, t = u.value;
231
+ let l = !1, a = null;
232
+ for (let r = 0; r < e; r++) {
233
+ const v = t[r], p = r > 0 ? t[r - 1] : "";
234
+ (v === '"' || v === "'") && p !== "\\" && (l ? v === a && (l = !1, a = null) : (l = !0, a = v));
229
235
  }
230
236
  return l;
231
237
  }
232
- function Ne() {
233
- const e = te.value, t = n.value;
238
+ function Ue() {
239
+ const e = K.value, t = u.value;
240
+ if (e === 0) return !1;
241
+ const l = t[e - 1];
242
+ return l !== '"' && l !== "'" ? !1 : !me();
243
+ }
244
+ function je() {
245
+ const e = K.value, t = u.value, l = t[e];
246
+ if (l === " " || l === `
247
+ ` || l === " ") {
248
+ const p = e + 1;
249
+ s.value && (s.value.setSelectionRange(p, p), x(p), F());
250
+ return;
251
+ }
252
+ const a = t.substring(0, e), r = t.substring(e), v = a + " " + r;
253
+ u.value = v, b("update:modelValue", v), P(() => {
254
+ if (s.value) {
255
+ const p = e + 1;
256
+ s.value.setSelectionRange(p, p), x(p), F();
257
+ }
258
+ });
259
+ }
260
+ function We() {
261
+ const e = K.value, t = u.value;
234
262
  for (let l = e; l < t.length; l++)
235
263
  if (t[l] === '"' || t[l] === "'") {
236
- const s = l + 1;
237
- d.value && (d.value.setSelectionRange(s, s), H(s));
264
+ const a = l + 1, r = t[a];
265
+ if (r && r !== " " && r !== `
266
+ ` && r !== " ")
267
+ s.value && (s.value.setSelectionRange(a, a), x(a));
268
+ else if (!r || r === " " || r === `
269
+ ` || r === " ")
270
+ if (r) {
271
+ const v = a + 1;
272
+ s.value && (s.value.setSelectionRange(v, v), x(v));
273
+ } else {
274
+ const v = t + " ";
275
+ u.value = v, b("update:modelValue", v), P(() => {
276
+ if (s.value) {
277
+ const p = a + 1;
278
+ s.value.setSelectionRange(p, p), x(p), F();
279
+ }
280
+ });
281
+ }
238
282
  return;
239
283
  }
240
284
  }
241
- function he() {
242
- w.value = !0, z.value = !1, O.value = Date.now(), V(() => {
243
- j(), ue();
285
+ function ye() {
286
+ k.value = !0, L.value = !1, U.value = Date.now(), P(() => {
287
+ J(), F();
244
288
  });
245
289
  }
246
- function me(e) {
290
+ function ge(e) {
247
291
  const l = e.relatedTarget;
248
292
  if (l != null && l.closest(".tql-autocomplete-dropdown")) {
249
293
  setTimeout(() => {
250
- w.value || (N(), h.value = !1);
294
+ k.value || (W(), y.value = !1);
251
295
  }, 300);
252
296
  return;
253
297
  }
254
- w.value = !1, setTimeout(() => {
255
- w.value || (N(), h.value = !1);
298
+ k.value = !1, setTimeout(() => {
299
+ k.value || (W(), y.value = !1);
256
300
  }, 200);
257
301
  }
258
- function Ue(e) {
259
- const t = He(e);
260
- n.value = t.query, x("update:modelValue", t.query), t.placeholders.length > 0 ? (Q.value = t.placeholders, E.value = 0) : ie(), V(() => {
261
- d.value && (d.value.focus(), d.value.setSelectionRange(t.newCursorPosition, t.newCursorPosition), H(t.newCursorPosition));
302
+ function Ge(e) {
303
+ se = Date.now();
304
+ const t = Te(e);
305
+ u.value = t.query, b("update:modelValue", t.query), t.placeholders.length > 0 ? (z.value = t.placeholders, H.value = 0) : ie(), P(() => {
306
+ s.value && (s.value.focus(), s.value.setSelectionRange(t.newCursorPosition, t.newCursorPosition), x(t.newCursorPosition));
262
307
  });
263
308
  }
264
- function je(e) {
265
- const t = Re(e);
266
- n.value = t, x("update:modelValue", t), V(() => {
267
- d.value && d.value.focus();
309
+ function Je(e) {
310
+ const t = Ee(e);
311
+ u.value = t, b("update:modelValue", t), P(() => {
312
+ s.value && s.value.focus();
268
313
  });
269
314
  }
270
- function We() {
315
+ function Xe() {
271
316
  var e;
272
- (e = d.value) == null || e.focus();
317
+ (e = s.value) == null || e.focus();
273
318
  }
274
- function Ge() {
319
+ function Ye() {
275
320
  var e;
276
- (e = d.value) == null || e.blur();
321
+ (e = s.value) == null || e.blur();
277
322
  }
278
- function ye() {
323
+ function we() {
279
324
  var e;
280
- return ((e = d.value) == null ? void 0 : e.selectionStart) || 0;
325
+ return ((e = s.value) == null ? void 0 : e.selectionStart) || 0;
281
326
  }
282
- function ge(e) {
283
- d.value && (d.value.setSelectionRange(e, e), H(e));
327
+ function be(e) {
328
+ s.value && (s.value.setSelectionRange(e, e), x(e));
284
329
  }
285
- function Je(e) {
286
- const t = ye(), l = n.value.substring(0, t), s = n.value.substring(t), p = l + e + s;
287
- n.value = p, x("update:modelValue", p), V(() => {
288
- ge(t + e.length);
330
+ function Ze(e) {
331
+ const t = we(), l = u.value.substring(0, t), a = u.value.substring(t), r = l + e + a;
332
+ u.value = r, b("update:modelValue", r), P(() => {
333
+ be(t + e.length);
289
334
  });
290
335
  }
291
- function Xe(e) {
292
- const l = Date.now() - e, s = Math.floor(l / 1e3), p = Math.floor(s / 60), b = Math.floor(p / 60), J = Math.floor(b / 24);
293
- return J > 0 ? `${J}d ago` : b > 0 ? `${b}h ago` : p > 0 ? `${p}m ago` : "just now";
336
+ function _e(e) {
337
+ const l = Date.now() - e, a = Math.floor(l / 1e3), r = Math.floor(a / 60), v = Math.floor(r / 60), p = Math.floor(v / 24);
338
+ return p > 0 ? `${p}d ago` : v > 0 ? `${v}h ago` : r > 0 ? `${r}m ago` : "just now";
294
339
  }
295
- function we(e) {
340
+ function qe(e) {
296
341
  var l;
297
342
  const t = e.target;
298
- (l = g.value) != null && l.contains(t) || (C.value = !1, P.value = !1);
343
+ (l = q.value) != null && l.contains(t) || (V.value = !1, R.value = !1);
299
344
  }
300
- ke({
301
- focus: We,
302
- blur: Ge,
345
+ Ce({
346
+ focus: Xe,
347
+ blur: Ye,
303
348
  validate: Ie,
304
- insertText: Je,
305
- insertSnippet: je,
306
- getTokenAtPosition: De,
307
- getCursorPosition: ye,
308
- setCursorPosition: ge
349
+ insertText: Ze,
350
+ insertSnippet: Je,
351
+ getTokenAtPosition: He,
352
+ getCursorPosition: we,
353
+ setCursorPosition: be
309
354
  });
310
- function G() {
311
- (q.value || I.value) && w.value && j();
355
+ function Y() {
356
+ (C.value || I.value) && k.value && J();
312
357
  }
313
- return Ze(() => {
314
- document.addEventListener("selectionchange", W), document.addEventListener("click", we), window.addEventListener("scroll", G, !0), window.addEventListener("resize", G), c.minHeight && g.value && g.value.style.setProperty("--tql-min-height", c.minHeight), F = setInterval(() => {
315
- w.value && O.value > 0 && Date.now() - O.value >= Tt && !z.value && (z.value = !0);
316
- }, 500), V(() => {
317
- j();
358
+ return tt(() => {
359
+ document.addEventListener("selectionchange", X), document.addEventListener("click", qe), window.addEventListener("scroll", Y, !0), window.addEventListener("resize", Y), f.minHeight && q.value && q.value.style.setProperty("--tql-min-height", f.minHeight), j = setInterval(() => {
360
+ k.value && U.value > 0 && Date.now() - U.value >= Qt && !L.value && (L.value = !0);
361
+ }, 500), P(() => {
362
+ J();
318
363
  });
319
- }), Y(
364
+ }), _(
320
365
  () => I.value,
321
366
  (e) => {
322
- e && V(() => {
323
- j();
367
+ e && P(() => {
368
+ J();
324
369
  });
325
370
  },
326
371
  { immediate: !0 }
327
- ), Y(
328
- T,
372
+ ), _(
373
+ B,
329
374
  (e) => {
330
- if (e && g.value) {
331
- const t = g.value.getBoundingClientRect();
375
+ if (e && q.value) {
376
+ const t = q.value.getBoundingClientRect();
332
377
  e.style.setProperty("--tql-msg-top", `${t.bottom + 4}px`), e.style.setProperty("--tql-msg-left", `${t.left}px`), e.style.setProperty("--tql-msg-width", `${t.width}px`);
333
378
  }
334
379
  }
335
- ), _e(() => {
336
- document.removeEventListener("selectionchange", W), document.removeEventListener("click", we), window.removeEventListener("scroll", G, !0), window.removeEventListener("resize", G), F && (clearInterval(F), F = null);
337
- }), (e, t) => (i(), a("div", {
380
+ ), lt(() => {
381
+ document.removeEventListener("selectionchange", X), document.removeEventListener("click", qe), window.removeEventListener("scroll", Y, !0), window.removeEventListener("resize", Y), j && (clearInterval(j), j = null);
382
+ }), (e, t) => (o(), n("div", {
338
383
  ref_key: "wrapperRef",
339
- ref: g,
340
- class: k([
384
+ ref: q,
385
+ class: S([
341
386
  "tql-input-wrapper",
342
387
  {
343
- "tql-input-focused": w.value,
344
- "tql-input-invalid": u(I) && o.showValidation,
345
- "tql-input-disabled": o.disabled,
346
- "tql-input-multiline": o.multiline,
347
- "tql-input-autocomplete-active": u(q),
348
- "tql-input-resizable": o.resizable && o.multiline,
349
- "tql-input-has-min-height": !!o.minHeight
388
+ "tql-input-focused": k.value,
389
+ "tql-input-invalid": c(I) && i.showValidation,
390
+ "tql-input-disabled": i.disabled,
391
+ "tql-input-multiline": i.multiline,
392
+ "tql-input-autocomplete-active": c(C),
393
+ "tql-input-resizable": i.resizable && i.multiline,
394
+ "tql-input-has-min-height": !!i.minHeight
350
395
  }
351
396
  ])
352
397
  }, [
353
- o.syntaxHighlighting ? (i(), a("div", nt, [
354
- (i(!0), a(B, null, A(u($e), (l, s) => (i(), a("span", {
355
- key: s,
356
- class: k(Ae(l))
357
- }, y(l.raw || l.value), 3))), 128))
358
- ])) : f("", !0),
359
- o.multiline ? oe((i(), a("textarea", {
398
+ i.syntaxHighlighting ? (o(), n("div", ct, [
399
+ (o(!0), n(M, null, N(c(De), (l, a) => (o(), n("span", {
400
+ key: a,
401
+ class: S(Fe(l))
402
+ }, w(l.raw || l.value), 3))), 128))
403
+ ])) : m("", !0),
404
+ i.multiline ? ae((o(), n("textarea", {
360
405
  key: 1,
361
- id: se,
406
+ id: ue,
362
407
  ref_key: "inputRef",
363
- ref: d,
364
- "onUpdate:modelValue": t[0] || (t[0] = (l) => n.value = l),
365
- class: k(["tql-input", { "tql-input-highlighted": o.syntaxHighlighting, "tql-input-resizable-textarea": o.resizable }]),
366
- placeholder: o.placeholder,
367
- disabled: o.disabled,
368
- readonly: o.readonly,
369
- rows: o.rows,
408
+ ref: s,
409
+ "onUpdate:modelValue": t[0] || (t[0] = (l) => u.value = l),
410
+ class: S(["tql-input", { "tql-input-highlighted": i.syntaxHighlighting, "tql-input-resizable-textarea": i.resizable }]),
411
+ placeholder: i.placeholder,
412
+ disabled: i.disabled,
413
+ readonly: i.readonly,
414
+ rows: i.rows,
370
415
  role: "combobox",
371
- "aria-expanded": u(q) && w.value,
372
- "aria-controls": _,
373
- "aria-invalid": u(I) && o.showValidation,
374
- "aria-describedby": u(I) && h.value ? ee : void 0,
416
+ "aria-expanded": c(C) && k.value,
417
+ "aria-controls": te,
418
+ "aria-invalid": c(I) && i.showValidation,
419
+ "aria-describedby": c(I) && y.value ? le : void 0,
375
420
  "aria-autocomplete": "list",
376
421
  "aria-haspopup": "listbox",
377
422
  spellcheck: "false",
378
423
  autocomplete: "off",
379
424
  autocapitalize: "off",
380
- onInput: fe,
381
- onKeydown: pe,
382
- onFocus: he,
383
- onBlur: me,
384
- onClick: W
385
- }, null, 42, ut)), [
386
- [ae, n.value]
387
- ]) : oe((i(), a("input", {
425
+ onInput: pe,
426
+ onKeydown: he,
427
+ onFocus: ye,
428
+ onBlur: ge,
429
+ onClick: X
430
+ }, null, 42, dt)), [
431
+ [ne, u.value]
432
+ ]) : ae((o(), n("input", {
388
433
  key: 2,
389
- id: se,
434
+ id: ue,
390
435
  ref_key: "inputRef",
391
- ref: d,
392
- "onUpdate:modelValue": t[1] || (t[1] = (l) => n.value = l),
436
+ ref: s,
437
+ "onUpdate:modelValue": t[1] || (t[1] = (l) => u.value = l),
393
438
  type: "text",
394
- class: k(["tql-input", { "tql-input-highlighted": o.syntaxHighlighting }]),
395
- placeholder: o.placeholder,
396
- disabled: o.disabled,
397
- readonly: o.readonly,
439
+ class: S(["tql-input", { "tql-input-highlighted": i.syntaxHighlighting }]),
440
+ placeholder: i.placeholder,
441
+ disabled: i.disabled,
442
+ readonly: i.readonly,
398
443
  role: "combobox",
399
- "aria-expanded": u(q) && w.value,
400
- "aria-controls": _,
401
- "aria-invalid": u(I) && o.showValidation,
402
- "aria-describedby": u(I) && h.value ? ee : void 0,
444
+ "aria-expanded": c(C) && k.value,
445
+ "aria-controls": te,
446
+ "aria-invalid": c(I) && i.showValidation,
447
+ "aria-describedby": c(I) && y.value ? le : void 0,
403
448
  "aria-autocomplete": "list",
404
449
  "aria-haspopup": "listbox",
405
450
  spellcheck: "false",
406
451
  autocomplete: "off",
407
452
  autocapitalize: "off",
408
- onInput: fe,
409
- onKeydown: pe,
410
- onFocus: he,
411
- onBlur: me,
412
- onClick: W
413
- }, null, 42, rt)), [
414
- [ae, n.value]
453
+ onInput: pe,
454
+ onKeydown: he,
455
+ onFocus: ye,
456
+ onBlur: ge,
457
+ onClick: X
458
+ }, null, 42, vt)), [
459
+ [ne, u.value]
415
460
  ]),
416
- r("div", dt, [
417
- o.showComplexity && m.value && n.value.trim() ? (i(), a("div", {
461
+ d("div", ft, [
462
+ i.showComplexity && g.value && u.value.trim() ? (o(), n("div", {
418
463
  key: 0,
419
- class: k(["tql-complexity-badge", Ee.value]),
420
- title: `${re.value} complexity - ${m.value.warnings.length} warning(s)`
464
+ class: S(["tql-complexity-badge", Be.value]),
465
+ title: `${ce.value} complexity - ${g.value.warnings.length} warning(s)`
421
466
  }, [
422
- r("span", vt, y(re.value), 1),
423
- m.value.warnings.length > 0 ? (i(), a("span", ft, y(m.value.warnings.length), 1)) : f("", !0)
424
- ], 10, ct)) : f("", !0),
425
- o.showHistory ? (i(), a("button", {
467
+ d("span", ht, w(ce.value), 1),
468
+ g.value.warnings.length > 0 ? (o(), n("span", mt, w(g.value.warnings.length), 1)) : m("", !0)
469
+ ], 10, pt)) : m("", !0),
470
+ i.showHistory ? (o(), n("button", {
426
471
  key: 1,
427
472
  type: "button",
428
- class: k(["tql-toolbar-button", { "tql-toolbar-button--active": C.value }]),
473
+ class: S(["tql-toolbar-button", { "tql-toolbar-button--active": V.value }]),
429
474
  title: "Query history",
430
- onClick: M(Me, ["stop"])
475
+ onClick: Q(Ae, ["stop"])
431
476
  }, [...t[10] || (t[10] = [
432
- r("i", { class: "pi pi-history" }, null, -1)
433
- ])], 2)) : f("", !0),
434
- o.showPreview ? (i(), a("button", {
477
+ d("i", { class: "pi pi-history" }, null, -1)
478
+ ])], 2)) : m("", !0),
479
+ i.showPreview ? (o(), n("button", {
435
480
  key: 2,
436
481
  type: "button",
437
- class: k(["tql-toolbar-button", { "tql-toolbar-button--active": P.value }]),
482
+ class: S(["tql-toolbar-button", { "tql-toolbar-button--active": R.value }]),
438
483
  title: "Preview query structure",
439
- onClick: M(Le, ["stop"])
484
+ onClick: Q(Le, ["stop"])
440
485
  }, [...t[11] || (t[11] = [
441
- r("i", { class: "pi pi-sitemap" }, null, -1)
442
- ])], 2)) : f("", !0),
443
- o.showSnippetButton && o.snippets && o.snippets.length > 0 ? (i(), a("button", {
486
+ d("i", { class: "pi pi-sitemap" }, null, -1)
487
+ ])], 2)) : m("", !0),
488
+ i.showSnippetButton && i.snippets && i.snippets.length > 0 ? (o(), n("button", {
444
489
  key: 3,
445
490
  type: "button",
446
491
  class: "tql-toolbar-button tql-snippet-button",
447
492
  title: "Insert snippet",
448
- onClick: t[2] || (t[2] = M(() => {
493
+ onClick: t[2] || (t[2] = Q(() => {
449
494
  }, ["stop"]))
450
495
  }, [...t[12] || (t[12] = [
451
- r("i", { class: "pi pi-code" }, null, -1)
452
- ])])) : f("", !0),
453
- o.showValidation && n.value ? (i(), a("div", pt, [
454
- u(le) ? (i(), a("i", ht)) : (i(), a("i", {
496
+ d("i", { class: "pi pi-code" }, null, -1)
497
+ ])])) : m("", !0),
498
+ i.showValidation && u.value ? (o(), n("div", yt, [
499
+ c(oe) ? (o(), n("i", gt)) : (o(), n("i", {
455
500
  key: 1,
456
501
  class: "pi pi-exclamation-circle tql-icon-invalid tql-icon-clickable",
457
502
  role: "button",
458
503
  tabindex: "0",
459
504
  title: "Click to show/hide errors",
460
- "aria-label": `Query has ${u($).length} error${u($).length === 1 ? "" : "s"}. Click to ${h.value ? "hide" : "show"} details.`,
461
- "aria-expanded": h.value,
462
- onClick: t[3] || (t[3] = (l) => h.value = !h.value),
505
+ "aria-label": `Query has ${c(D).length} error${c(D).length === 1 ? "" : "s"}. Click to ${y.value ? "hide" : "show"} details.`,
506
+ "aria-expanded": y.value,
507
+ onClick: t[3] || (t[3] = (l) => y.value = !y.value),
463
508
  onKeydown: [
464
- t[4] || (t[4] = be((l) => h.value = !h.value, ["enter"])),
465
- t[5] || (t[5] = be(M((l) => h.value = !h.value, ["prevent"]), ["space"]))
509
+ t[4] || (t[4] = ke((l) => y.value = !y.value, ["enter"])),
510
+ t[5] || (t[5] = ke(Q((l) => y.value = !y.value, ["prevent"]), ["space"]))
466
511
  ]
467
- }, null, 40, mt))
468
- ])) : f("", !0)
512
+ }, null, 40, wt))
513
+ ])) : m("", !0)
469
514
  ]),
470
- o.showHistory && C.value ? (i(), a("div", {
515
+ i.showHistory && V.value ? (o(), n("div", {
471
516
  key: 3,
472
517
  class: "tql-history-dropdown",
473
- onClick: t[8] || (t[8] = M(() => {
518
+ onClick: t[8] || (t[8] = Q(() => {
474
519
  }, ["stop"]))
475
520
  }, [
476
- r("div", yt, [
477
- oe(r("input", {
478
- "onUpdate:modelValue": t[6] || (t[6] = (l) => D.value = l),
521
+ d("div", bt, [
522
+ ae(d("input", {
523
+ "onUpdate:modelValue": t[6] || (t[6] = (l) => E.value = l),
479
524
  type: "text",
480
525
  class: "tql-history-search",
481
526
  placeholder: "Search history...",
482
- onKeydown: t[7] || (t[7] = M(() => {
527
+ onKeydown: t[7] || (t[7] = Q(() => {
483
528
  }, ["stop"]))
484
529
  }, null, 544), [
485
- [ae, D.value]
530
+ [ne, E.value]
486
531
  ])
487
532
  ]),
488
- r("div", gt, [
489
- (i(!0), a(B, null, A(de.value, (l) => (i(), a("div", {
533
+ d("div", qt, [
534
+ (o(!0), n(M, null, N(de.value, (l) => (o(), n("div", {
490
535
  key: l.id,
491
- class: k(["tql-history-item", { "tql-history-item--favorite": l.isFavorite }]),
492
- onClick: (s) => Te(l)
536
+ class: S(["tql-history-item", { "tql-history-item--favorite": l.isFavorite }]),
537
+ onClick: (a) => Me(l)
493
538
  }, [
494
- r("button", {
539
+ d("button", {
495
540
  type: "button",
496
541
  class: "tql-history-favorite",
497
542
  title: l.isFavorite ? "Remove from favorites" : "Add to favorites",
498
- onClick: (s) => Be(l, s)
543
+ onClick: (a) => Qe(l, a)
499
544
  }, [
500
- r("i", {
501
- class: k(l.isFavorite ? "pi pi-star-fill" : "pi pi-star")
545
+ d("i", {
546
+ class: S(l.isFavorite ? "pi pi-star-fill" : "pi pi-star")
502
547
  }, null, 2)
503
- ], 8, bt),
504
- r("div", qt, [
505
- l.label ? (i(), a("div", kt, y(l.label), 1)) : f("", !0),
506
- r("div", xt, y(l.query), 1)
548
+ ], 8, xt),
549
+ d("div", Ct, [
550
+ l.label ? (o(), n("div", Pt, w(l.label), 1)) : m("", !0),
551
+ d("div", St, w(l.query), 1)
507
552
  ]),
508
- r("div", Ct, y(Xe(l.timestamp)), 1)
509
- ], 10, wt))), 128)),
510
- de.value.length === 0 ? (i(), a("div", Pt, y(D.value ? "No matching queries" : "No query history"), 1)) : f("", !0)
553
+ d("div", Vt, w(_e(l.timestamp)), 1)
554
+ ], 10, kt))), 128)),
555
+ de.value.length === 0 ? (o(), n("div", Rt, w(E.value ? "No matching queries" : "No query history"), 1)) : m("", !0)
511
556
  ])
512
- ])) : f("", !0),
513
- qe(lt, {
514
- id: _,
557
+ ])) : m("", !0),
558
+ xe(at, {
559
+ id: te,
515
560
  ref_key: "autocompleteRef",
516
- ref: L,
517
- items: u(K),
518
- visible: u(q) && w.value && Qe.value,
519
- position: U.value,
520
- onSelect: Ue,
521
- onClose: u(N)
561
+ ref: A,
562
+ items: c(O),
563
+ visible: c(C) && k.value && Ke.value,
564
+ position: G.value,
565
+ onSelect: Ge,
566
+ onClose: c(W)
522
567
  }, null, 8, ["items", "visible", "position", "onClose"]),
523
- (i(), et(tt, { to: "body" }, [
524
- o.showValidation && !u(le) && ze.value && n.value && u($).length > 0 && !(u(q) && u(K).length > 0) && Ke.value ? (i(), a("div", {
568
+ (o(), ot(it, { to: "body" }, [
569
+ i.showValidation && !c(oe) && ze.value && u.value && c(D).length > 0 && !(c(C) && c(O).length > 0) && Oe.value ? (o(), n("div", {
525
570
  key: 0,
526
571
  ref_key: "validationMessagesRef",
527
- ref: T,
528
- id: ee,
572
+ ref: B,
573
+ id: le,
529
574
  class: "tql-validation-messages-portal",
530
575
  role: "alert",
531
576
  "aria-live": "polite"
532
577
  }, [
533
- (i(!0), a(B, null, A(u($).slice(0, 3), (l, s) => (i(), a("div", {
534
- key: s,
578
+ (o(!0), n(M, null, N(c(D).slice(0, 3), (l, a) => (o(), n("div", {
579
+ key: a,
535
580
  class: "tql-error-message"
536
581
  }, [
537
- t[13] || (t[13] = r("i", {
582
+ t[13] || (t[13] = d("i", {
538
583
  class: "pi pi-exclamation-triangle",
539
584
  "aria-hidden": "true"
540
585
  }, null, -1)),
541
- r("span", null, y(l.message), 1),
542
- l.suggestion ? (i(), a("span", St, y(l.suggestion), 1)) : f("", !0)
586
+ d("span", null, w(l.message), 1),
587
+ l.suggestion ? (o(), n("span", $t, w(l.suggestion), 1)) : m("", !0)
543
588
  ]))), 128))
544
- ], 512)) : f("", !0)
589
+ ], 512)) : m("", !0)
545
590
  ])),
546
- o.showComplexity && m.value && m.value.warnings.length > 0 && !u(q) ? (i(), a("div", Vt, [
547
- (i(!0), a(B, null, A(m.value.warnings.slice(0, 3), (l, s) => (i(), a("div", {
548
- key: s,
549
- class: k(["tql-complexity-warning", `tql-complexity-warning--${l.severity}`])
591
+ i.showComplexity && g.value && g.value.warnings.length > 0 && !c(C) ? (o(), n("div", Dt, [
592
+ (o(!0), n(M, null, N(g.value.warnings.slice(0, 3), (l, a) => (o(), n("div", {
593
+ key: a,
594
+ class: S(["tql-complexity-warning", `tql-complexity-warning--${l.severity}`])
550
595
  }, [
551
- t[14] || (t[14] = r("i", {
596
+ t[14] || (t[14] = d("i", {
552
597
  class: "pi pi-info-circle",
553
598
  "aria-hidden": "true"
554
599
  }, null, -1)),
555
- r("span", null, y(l.message), 1)
600
+ d("span", null, w(l.message), 1)
556
601
  ], 2))), 128)),
557
- m.value.suggestions.length > 0 ? (i(), a("div", $t, [
558
- (i(!0), a(B, null, A(m.value.suggestions.slice(0, 2), (l, s) => (i(), a("div", {
559
- key: s,
602
+ g.value.suggestions.length > 0 ? (o(), n("div", It, [
603
+ (o(!0), n(M, null, N(g.value.suggestions.slice(0, 2), (l, a) => (o(), n("div", {
604
+ key: a,
560
605
  class: "tql-complexity-suggestion"
561
606
  }, [
562
- t[15] || (t[15] = r("i", {
607
+ t[15] || (t[15] = d("i", {
563
608
  class: "pi pi-lightbulb",
564
609
  "aria-hidden": "true"
565
610
  }, null, -1)),
566
- r("span", null, y(l), 1)
611
+ d("span", null, w(l), 1)
567
612
  ]))), 128))
568
- ])) : f("", !0)
569
- ])) : f("", !0),
570
- o.showPreview && P.value && n.value.trim() ? (i(), a("div", It, [
571
- r("div", Ht, [
572
- t[17] || (t[17] = r("span", null, "Query Structure", -1)),
573
- r("button", {
613
+ ])) : m("", !0)
614
+ ])) : m("", !0),
615
+ i.showPreview && R.value && u.value.trim() ? (o(), n("div", Tt, [
616
+ d("div", Et, [
617
+ t[17] || (t[17] = d("span", null, "Query Structure", -1)),
618
+ d("button", {
574
619
  type: "button",
575
620
  class: "tql-preview-close",
576
621
  title: "Close preview",
577
- onClick: t[9] || (t[9] = (l) => P.value = !1)
622
+ onClick: t[9] || (t[9] = (l) => R.value = !1)
578
623
  }, [...t[16] || (t[16] = [
579
- r("i", { class: "pi pi-times" }, null, -1)
624
+ d("i", { class: "pi pi-times" }, null, -1)
580
625
  ])])
581
626
  ]),
582
- qe(it, {
583
- query: n.value,
627
+ xe(nt, {
628
+ query: u.value,
584
629
  "show-complexity": !1,
585
630
  "show-field-usage": !0,
586
631
  "show-logic-tree": !0,
587
632
  compact: ""
588
633
  }, null, 8, ["query"])
589
- ])) : f("", !0),
590
- r("div", Rt, [
591
- o.showValidation && n.value ? (i(), a(B, { key: 0 }, [
592
- u(le) ? (i(), a("span", Dt, "Query syntax is valid")) : (i(), a("span", Et, "Query has " + y(u($).length) + " validation error" + y(u($).length === 1 ? "" : "s"), 1))
593
- ], 64)) : f("", !0)
634
+ ])) : m("", !0),
635
+ d("div", Ht, [
636
+ i.showValidation && u.value ? (o(), n(M, { key: 0 }, [
637
+ c(oe) ? (o(), n("span", Bt, "Query syntax is valid")) : (o(), n("span", Mt, "Query has " + w(c(D).length) + " validation error" + w(c(D).length === 1 ? "" : "s"), 1))
638
+ ], 64)) : m("", !0)
594
639
  ])
595
640
  ], 2));
596
641
  }
597
642
  });
598
643
  export {
599
- At as default
644
+ Nt as default
600
645
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tellaro/tql",
3
- "version": "0.1.6",
3
+ "version": "0.1.8",
4
4
  "description": "Tellaro Query Language (TQL) parser, validator, and autocomplete for JavaScript/TypeScript",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",