@tellaro/tql 0.1.1 → 0.1.3

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