@tellaro/tql 0.1.8 → 0.1.9

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