@tellaro/tql 0.1.7 → 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-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-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-e47ed020"]]);
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 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 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
- }, 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" }, Rt = {
25
25
  key: 0,
26
26
  class: "tql-history-empty"
27
- }, Vt = {
27
+ }, $t = {
28
28
  key: 0,
29
29
  class: "tql-error-suggestion"
30
- }, $t = {
30
+ }, Dt = {
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
+ }, 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
- }, 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,352 @@ 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"), {
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
78
  tokens: De,
79
- cursorPosition: te,
80
- completionItems: K,
81
- showAutocomplete: q,
82
- isValid: le,
83
- errors: $,
84
- hasErrors: D,
79
+ cursorPosition: K,
80
+ completionItems: O,
81
+ showAutocomplete: C,
82
+ isValid: oe,
83
+ errors: 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,
92
- getTokenAtCursor: Te
93
- } = at({
94
- modelValue: Pe,
95
- fieldSchema: Se,
96
- fieldValues: Ve,
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
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 && {
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] || ""), 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 = 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 Me(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
120
  function ve() {
121
- S && n.value.trim() && S.addQuery(n.value);
121
+ $ && u.value.trim() && $.addQuery(u.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 && (R.value = !1);
125
125
  }
126
- function ze() {
127
- P.value = !P.value, P.value && (C.value = !1);
126
+ function Le() {
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 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 = 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
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
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 D.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
+ 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 && I(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
174
  function he(e) {
175
- var t, l, s, p, b;
175
+ var t, l, a, r, v;
176
176
  if (e.key === "Tab" && !e.shiftKey) {
177
- if (Q.value.length > 0 && T.value >= 0) {
178
- e.preventDefault(), Fe();
177
+ if (z.value.length > 0 && H.value >= 0) {
178
+ e.preventDefault(), Ne();
179
+ return;
180
+ }
181
+ if (me()) {
182
+ e.preventDefault(), We();
179
183
  return;
180
184
  }
181
- if (Ne()) {
182
- e.preventDefault(), Ue();
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
199
  if (e.preventDefault(), Date.now() - se < 100)
196
200
  return;
197
- I(((s = d.value) == null ? void 0 : s.selectionStart) || 0), K.value.length > 0 && ((p = L.value) == null || p.selectCurrent());
201
+ x(((a = s.value) == null ? void 0 : a.selectionStart) || 0), O.value.length > 0 && ((r = A.value) == null || r.selectCurrent());
198
202
  return;
199
203
  case "Enter":
200
- if (!c.multiline)
204
+ if (!f.multiline)
201
205
  break;
202
- e.preventDefault(), (b = L.value) == null || b.selectCurrent();
206
+ e.preventDefault(), (v = A.value) == null || v.selectCurrent();
203
207
  return;
204
208
  case "Escape":
205
- e.preventDefault(), N(), ie();
209
+ e.preventDefault(), W(), ie();
206
210
  return;
207
211
  }
208
212
  if (e.key === " " && e.ctrlKey) {
209
- e.preventDefault(), re();
213
+ e.preventDefault(), F();
210
214
  return;
211
215
  }
212
- e.key === "Enter" && (c.multiline && e.ctrlKey || !c.multiline && !q.value) && (e.preventDefault(), ve(), x("submit", n.value));
216
+ e.key === "Enter" && (f.multiline && e.ctrlKey || !f.multiline && !C.value) && (e.preventDefault(), ve(), b("submit", u.value));
213
217
  }
214
- function Fe() {
215
- if (T.value++, T.value >= Q.value.length) {
218
+ function Ne() {
219
+ if (H.value++, H.value >= z.value.length) {
216
220
  ie();
217
221
  return;
218
222
  }
219
- const e = Q.value[T.value];
220
- d.value && (d.value.setSelectionRange(e.start, e.end), d.value.focus(), I(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));
221
225
  }
222
226
  function ie() {
223
- Q.value = [], T.value = -1;
227
+ z.value = [], H.value = -1;
224
228
  }
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));
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));
231
235
  }
232
236
  return l;
233
237
  }
234
238
  function Ue() {
235
- const e = te.value, t = n.value;
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;
236
262
  for (let l = e; l < t.length; l++)
237
263
  if (t[l] === '"' || t[l] === "'") {
238
- const s = l + 1;
239
- d.value && (d.value.setSelectionRange(s, s), I(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
+ }
240
282
  return;
241
283
  }
242
284
  }
243
- function me() {
244
- w.value = !0, z.value = !1, O.value = Date.now(), V(() => {
245
- j(), re();
285
+ function ye() {
286
+ k.value = !0, L.value = !1, U.value = Date.now(), P(() => {
287
+ J(), F();
246
288
  });
247
289
  }
248
- function ye(e) {
290
+ function ge(e) {
249
291
  const l = e.relatedTarget;
250
292
  if (l != null && l.closest(".tql-autocomplete-dropdown")) {
251
293
  setTimeout(() => {
252
- w.value || (N(), h.value = !1);
294
+ k.value || (W(), y.value = !1);
253
295
  }, 300);
254
296
  return;
255
297
  }
256
- w.value = !1, setTimeout(() => {
257
- w.value || (N(), h.value = !1);
298
+ k.value = !1, setTimeout(() => {
299
+ k.value || (W(), y.value = !1);
258
300
  }, 200);
259
301
  }
260
- function je(e) {
302
+ function Ge(e) {
261
303
  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));
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));
265
307
  });
266
308
  }
267
- function We(e) {
268
- const t = Re(e);
269
- n.value = t, x("update:modelValue", t), V(() => {
270
- 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();
271
313
  });
272
314
  }
273
- function Ge() {
315
+ function Xe() {
274
316
  var e;
275
- (e = d.value) == null || e.focus();
317
+ (e = s.value) == null || e.focus();
276
318
  }
277
- function Je() {
319
+ function Ye() {
278
320
  var e;
279
- (e = d.value) == null || e.blur();
321
+ (e = s.value) == null || e.blur();
280
322
  }
281
- function ge() {
323
+ function we() {
282
324
  var e;
283
- return ((e = d.value) == null ? void 0 : e.selectionStart) || 0;
325
+ return ((e = s.value) == null ? void 0 : e.selectionStart) || 0;
284
326
  }
285
- function we(e) {
286
- d.value && (d.value.setSelectionRange(e, e), I(e));
327
+ function be(e) {
328
+ s.value && (s.value.setSelectionRange(e, e), x(e));
287
329
  }
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);
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);
292
334
  });
293
335
  }
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";
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";
297
339
  }
298
- function be(e) {
340
+ function qe(e) {
299
341
  var l;
300
342
  const t = e.target;
301
- (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);
302
344
  }
303
- xe({
304
- focus: Ge,
305
- blur: Je,
345
+ Ce({
346
+ focus: Xe,
347
+ blur: Ye,
306
348
  validate: Ie,
307
- insertText: Xe,
308
- insertSnippet: We,
309
- getTokenAtPosition: Te,
310
- getCursorPosition: ge,
311
- setCursorPosition: we
349
+ insertText: Ze,
350
+ insertSnippet: Je,
351
+ getTokenAtPosition: He,
352
+ getCursorPosition: we,
353
+ setCursorPosition: be
312
354
  });
313
- function G() {
314
- (q.value || D.value) && w.value && j();
355
+ function Y() {
356
+ (C.value || I.value) && k.value && J();
315
357
  }
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();
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();
321
363
  });
322
- }), Y(
323
- () => D.value,
364
+ }), _(
365
+ () => I.value,
324
366
  (e) => {
325
- e && V(() => {
326
- j();
367
+ e && P(() => {
368
+ J();
327
369
  });
328
370
  },
329
371
  { immediate: !0 }
330
- ), Y(
331
- E,
372
+ ), _(
373
+ B,
332
374
  (e) => {
333
- if (e && g.value) {
334
- const t = g.value.getBoundingClientRect();
375
+ if (e && q.value) {
376
+ const t = q.value.getBoundingClientRect();
335
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`);
336
378
  }
337
379
  }
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", {
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", {
341
383
  ref_key: "wrapperRef",
342
- ref: g,
343
- class: k([
384
+ ref: q,
385
+ class: S([
344
386
  "tql-input-wrapper",
345
387
  {
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
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
353
395
  }
354
396
  ])
355
397
  }, [
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", {
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", {
363
405
  key: 1,
364
- id: ne,
406
+ id: ue,
365
407
  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,
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,
373
415
  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,
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,
378
420
  "aria-autocomplete": "list",
379
421
  "aria-haspopup": "listbox",
380
422
  spellcheck: "false",
@@ -382,27 +424,27 @@ const ut = {
382
424
  autocapitalize: "off",
383
425
  onInput: pe,
384
426
  onKeydown: he,
385
- onFocus: me,
386
- onBlur: ye,
387
- onClick: W
388
- }, null, 42, rt)), [
389
- [ae, n.value]
390
- ]) : oe((i(), a("input", {
427
+ onFocus: ye,
428
+ onBlur: ge,
429
+ onClick: X
430
+ }, null, 42, dt)), [
431
+ [ne, u.value]
432
+ ]) : ae((o(), n("input", {
391
433
  key: 2,
392
- id: ne,
434
+ id: ue,
393
435
  ref_key: "inputRef",
394
- ref: d,
395
- "onUpdate:modelValue": t[1] || (t[1] = (l) => n.value = l),
436
+ ref: s,
437
+ "onUpdate:modelValue": t[1] || (t[1] = (l) => u.value = l),
396
438
  type: "text",
397
- class: k(["tql-input", { "tql-input-highlighted": o.syntaxHighlighting }]),
398
- placeholder: o.placeholder,
399
- disabled: o.disabled,
400
- 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,
401
443
  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,
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,
406
448
  "aria-autocomplete": "list",
407
449
  "aria-haspopup": "listbox",
408
450
  spellcheck: "false",
@@ -410,194 +452,194 @@ const ut = {
410
452
  autocapitalize: "off",
411
453
  onInput: pe,
412
454
  onKeydown: he,
413
- onFocus: me,
414
- onBlur: ye,
415
- onClick: W
416
- }, null, 42, dt)), [
417
- [ae, n.value]
455
+ onFocus: ye,
456
+ onBlur: ge,
457
+ onClick: X
458
+ }, null, 42, vt)), [
459
+ [ne, u.value]
418
460
  ]),
419
- r("div", ct, [
420
- 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", {
421
463
  key: 0,
422
- class: k(["tql-complexity-badge", Ee.value]),
423
- title: `${de.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)`
424
466
  }, [
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", {
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", {
429
471
  key: 1,
430
472
  type: "button",
431
- class: k(["tql-toolbar-button", { "tql-toolbar-button--active": C.value }]),
473
+ class: S(["tql-toolbar-button", { "tql-toolbar-button--active": V.value }]),
432
474
  title: "Query history",
433
- onClick: M(Le, ["stop"])
475
+ onClick: Q(Ae, ["stop"])
434
476
  }, [...t[10] || (t[10] = [
435
- r("i", { class: "pi pi-history" }, null, -1)
436
- ])], 2)) : f("", !0),
437
- o.showPreview ? (i(), a("button", {
477
+ d("i", { class: "pi pi-history" }, null, -1)
478
+ ])], 2)) : m("", !0),
479
+ i.showPreview ? (o(), n("button", {
438
480
  key: 2,
439
481
  type: "button",
440
- class: k(["tql-toolbar-button", { "tql-toolbar-button--active": P.value }]),
482
+ class: S(["tql-toolbar-button", { "tql-toolbar-button--active": R.value }]),
441
483
  title: "Preview query structure",
442
- onClick: M(ze, ["stop"])
484
+ onClick: Q(Le, ["stop"])
443
485
  }, [...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", {
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", {
447
489
  key: 3,
448
490
  type: "button",
449
491
  class: "tql-toolbar-button tql-snippet-button",
450
492
  title: "Insert snippet",
451
- onClick: t[2] || (t[2] = M(() => {
493
+ onClick: t[2] || (t[2] = Q(() => {
452
494
  }, ["stop"]))
453
495
  }, [...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", {
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", {
458
500
  key: 1,
459
501
  class: "pi pi-exclamation-circle tql-icon-invalid tql-icon-clickable",
460
502
  role: "button",
461
503
  tabindex: "0",
462
504
  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),
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),
466
508
  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"]))
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"]))
469
511
  ]
470
- }, null, 40, yt))
471
- ])) : f("", !0)
512
+ }, null, 40, wt))
513
+ ])) : m("", !0)
472
514
  ]),
473
- o.showHistory && C.value ? (i(), a("div", {
515
+ i.showHistory && V.value ? (o(), n("div", {
474
516
  key: 3,
475
517
  class: "tql-history-dropdown",
476
- onClick: t[8] || (t[8] = M(() => {
518
+ onClick: t[8] || (t[8] = Q(() => {
477
519
  }, ["stop"]))
478
520
  }, [
479
- r("div", gt, [
480
- oe(r("input", {
481
- "onUpdate:modelValue": t[6] || (t[6] = (l) => R.value = l),
521
+ d("div", bt, [
522
+ ae(d("input", {
523
+ "onUpdate:modelValue": t[6] || (t[6] = (l) => E.value = l),
482
524
  type: "text",
483
525
  class: "tql-history-search",
484
526
  placeholder: "Search history...",
485
- onKeydown: t[7] || (t[7] = M(() => {
527
+ onKeydown: t[7] || (t[7] = Q(() => {
486
528
  }, ["stop"]))
487
529
  }, null, 544), [
488
- [ae, R.value]
530
+ [ne, E.value]
489
531
  ])
490
532
  ]),
491
- r("div", wt, [
492
- (i(!0), a(B, null, A(ce.value, (l) => (i(), a("div", {
533
+ d("div", qt, [
534
+ (o(!0), n(M, null, N(de.value, (l) => (o(), n("div", {
493
535
  key: l.id,
494
- class: k(["tql-history-item", { "tql-history-item--favorite": l.isFavorite }]),
495
- onClick: (s) => Be(l)
536
+ class: S(["tql-history-item", { "tql-history-item--favorite": l.isFavorite }]),
537
+ onClick: (a) => Me(l)
496
538
  }, [
497
- r("button", {
539
+ d("button", {
498
540
  type: "button",
499
541
  class: "tql-history-favorite",
500
542
  title: l.isFavorite ? "Remove from favorites" : "Add to favorites",
501
- onClick: (s) => Me(l, s)
543
+ onClick: (a) => Qe(l, a)
502
544
  }, [
503
- r("i", {
504
- 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")
505
547
  }, 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)
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)
510
552
  ]),
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)
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)
514
556
  ])
515
- ])) : f("", !0),
516
- ke(it, {
517
- id: _,
557
+ ])) : m("", !0),
558
+ xe(at, {
559
+ id: te,
518
560
  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)
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)
525
567
  }, 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", {
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", {
528
570
  key: 0,
529
571
  ref_key: "validationMessagesRef",
530
- ref: E,
531
- id: ee,
572
+ ref: B,
573
+ id: le,
532
574
  class: "tql-validation-messages-portal",
533
575
  role: "alert",
534
576
  "aria-live": "polite"
535
577
  }, [
536
- (i(!0), a(B, null, A(u($).slice(0, 3), (l, s) => (i(), a("div", {
537
- key: s,
578
+ (o(!0), n(M, null, N(c(D).slice(0, 3), (l, a) => (o(), n("div", {
579
+ key: a,
538
580
  class: "tql-error-message"
539
581
  }, [
540
- t[13] || (t[13] = r("i", {
582
+ t[13] || (t[13] = d("i", {
541
583
  class: "pi pi-exclamation-triangle",
542
584
  "aria-hidden": "true"
543
585
  }, null, -1)),
544
- r("span", null, y(l.message), 1),
545
- l.suggestion ? (i(), a("span", Vt, 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)
546
588
  ]))), 128))
547
- ], 512)) : f("", !0)
589
+ ], 512)) : m("", !0)
548
590
  ])),
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}`])
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}`])
553
595
  }, [
554
- t[14] || (t[14] = r("i", {
596
+ t[14] || (t[14] = d("i", {
555
597
  class: "pi pi-info-circle",
556
598
  "aria-hidden": "true"
557
599
  }, null, -1)),
558
- r("span", null, y(l.message), 1)
600
+ d("span", null, w(l.message), 1)
559
601
  ], 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,
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,
563
605
  class: "tql-complexity-suggestion"
564
606
  }, [
565
- t[15] || (t[15] = r("i", {
607
+ t[15] || (t[15] = d("i", {
566
608
  class: "pi pi-lightbulb",
567
609
  "aria-hidden": "true"
568
610
  }, null, -1)),
569
- r("span", null, y(l), 1)
611
+ d("span", null, w(l), 1)
570
612
  ]))), 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", {
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", {
577
619
  type: "button",
578
620
  class: "tql-preview-close",
579
621
  title: "Close preview",
580
- onClick: t[9] || (t[9] = (l) => P.value = !1)
622
+ onClick: t[9] || (t[9] = (l) => R.value = !1)
581
623
  }, [...t[16] || (t[16] = [
582
- r("i", { class: "pi pi-times" }, null, -1)
624
+ d("i", { class: "pi pi-times" }, null, -1)
583
625
  ])])
584
626
  ]),
585
- ke(ot, {
586
- query: n.value,
627
+ xe(nt, {
628
+ query: u.value,
587
629
  "show-complexity": !1,
588
630
  "show-field-usage": !0,
589
631
  "show-logic-tree": !0,
590
632
  compact: ""
591
633
  }, 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)
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)
597
639
  ])
598
640
  ], 2));
599
641
  }
600
642
  });
601
643
  export {
602
- Ot as default
644
+ Nt as default
603
645
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tellaro/tql",
3
- "version": "0.1.7",
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",