@tellaro/tql 0.1.5 → 0.1.7

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