@tellaro/tql 0.1.7 → 0.1.9

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