@caido-utils/components 0.2.1 → 0.2.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  <script lang="ts">
2
2
  const scrollMemory = new Map<string, number>();
3
- const ROW_HEIGHT = 33;
3
+ const ROW_HEIGHT = 25;
4
4
  </script>
5
5
 
6
6
  <script setup lang="ts">
@@ -221,14 +221,14 @@ const tablePtOptions = {
221
221
  const columnPt = {
222
222
  headerCell: {
223
223
  class:
224
- "px-2.5 py-1.5 font-mono text-sm font-semibold !bg-transparent !text-inherit !border-surface-700/50 !border-t-0 !border-b-0",
224
+ "px-2.5 py-1 font-mono text-sm font-semibold !bg-transparent !text-inherit !border-surface-700/50 !border-t-0 !border-b-0",
225
225
  },
226
226
  sort: {
227
227
  class: "!text-inherit",
228
228
  },
229
229
  bodyCell: {
230
230
  class:
231
- "px-2.5 py-1.5 font-mono text-[13px] font-medium overflow-hidden text-ellipsis whitespace-nowrap !border-surface-700/50",
231
+ "px-2.5 py-0.5 font-mono text-sm font-semibold overflow-hidden text-ellipsis whitespace-nowrap !border-surface-700/50",
232
232
  },
233
233
  };
234
234
  </script>
@@ -213,7 +213,6 @@ function onScroll() {
213
213
  "
214
214
  @mousedown.prevent="acceptSuggestion(item)"
215
215
  >
216
- <span class="text-surface-500 text-xs w-3 shrink-0">x</span>
217
216
  <span class="flex-1">{{ item.value }}</span>
218
217
  <span v-if="item.description" class="text-surface-500 text-xs">{{
219
218
  item.description
@@ -173,7 +173,15 @@ export function getSuggestions(query, cursorPos) {
173
173
  };
174
174
  }
175
175
  if (currentToken === "filter") {
176
- return { category: "", items: [{ value: ":" }], partial: "", suffix: "" };
176
+ return {
177
+ category: "Filters",
178
+ items: FILTER_VALUES.map((f) => ({
179
+ ...f,
180
+ value: "filter:" + f.value
181
+ })),
182
+ partial: "filter",
183
+ suffix: " "
184
+ };
177
185
  }
178
186
  const upperPreceding = preceding.toUpperCase();
179
187
  if (!preceding || upperPreceding.endsWith("AND") || upperPreceding.endsWith("OR") || preceding.endsWith("(")) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@caido-utils/components",
3
- "version": "0.2.1",
3
+ "version": "0.2.3",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "dist"