@kimesh/auto-import 0.2.35 → 0.2.36

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.
@@ -82,11 +82,28 @@ var ConflictResolver = class {
82
82
  this.resolved.set(name, entries[0]);
83
83
  continue;
84
84
  }
85
- const sorted = [...entries].sort((a, b) => a.priority - b.priority);
85
+ const seenLayers = /* @__PURE__ */ new Set();
86
+ const deduped = entries.filter((entry) => {
87
+ const key = `${entry.layer}:${entry.from}`;
88
+ if (seenLayers.has(key)) return false;
89
+ seenLayers.add(key);
90
+ return true;
91
+ });
92
+ const seenLayerNames = /* @__PURE__ */ new Set();
93
+ const layerDeduped = deduped.filter((entry) => {
94
+ if (seenLayerNames.has(entry.layer)) return false;
95
+ seenLayerNames.add(entry.layer);
96
+ return true;
97
+ });
98
+ if (layerDeduped.length === 1) {
99
+ this.resolved.set(name, layerDeduped[0]);
100
+ continue;
101
+ }
102
+ const sorted = [...layerDeduped].sort((a, b) => a.priority - b.priority);
86
103
  const winner = sorted[0];
87
104
  const losers = sorted.slice(1);
88
105
  this.resolved.set(name, winner);
89
- const uniqueLosers = losers.filter((l) => l.layer !== winner.layer || l.from !== winner.from);
106
+ const uniqueLosers = losers.filter((l) => l.layer !== winner.layer);
90
107
  if (uniqueLosers.length > 0) this.conflicts.push({
91
108
  name,
92
109
  winner,
@@ -381,6 +398,9 @@ const kimeshPreset = {
381
398
  "useParams",
382
399
  "useReactiveParams",
383
400
  "useSearch",
401
+ "useRouteQuery",
402
+ "useRouteQueryNumber",
403
+ "useRouteQueryBoolean",
384
404
  "useRuntimeConfig",
385
405
  "KmOutlet",
386
406
  "KmLink",
@@ -402,6 +422,10 @@ const kimeshPreset = {
402
422
  {
403
423
  name: "NavigationRedirect",
404
424
  type: true
425
+ },
426
+ {
427
+ name: "UseRouteQueryOptions",
428
+ type: true
405
429
  }
406
430
  ]
407
431
  };
@@ -0,0 +1,4 @@
1
+ import "./oxc-scanner-tiRVQcUS.mjs";
2
+ import { t as RegistryBuilder } from "./builder-BLRYHH86.mjs";
3
+
4
+ export { RegistryBuilder };
package/dist/index.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  import { t as OxcExportScanner } from "./oxc-scanner-tiRVQcUS.mjs";
2
- import { a as piniaPreset, c as vuePreset, d as collectExistingDirectories, i as normalizePreset, l as vueRouterPreset, n as builtinPresets, o as resolvePresets, r as kimeshPreset, s as tanstackQueryPreset, t as RegistryBuilder, u as ConflictResolver } from "./builder-BrFfPpqU.mjs";
2
+ import { a as piniaPreset, c as vuePreset, d as collectExistingDirectories, i as normalizePreset, l as vueRouterPreset, n as builtinPresets, o as resolvePresets, r as kimeshPreset, s as tanstackQueryPreset, t as RegistryBuilder, u as ConflictResolver } from "./builder-BLRYHH86.mjs";
3
3
  import { parseSync } from "oxc-parser";
4
4
  import { parse } from "@vue/compiler-sfc";
5
5
  import * as fs from "node:fs";
@@ -1000,7 +1000,7 @@ var plugin_default = autoImportPlugin;
1000
1000
  * Build import registry from sources (convenience function)
1001
1001
  */
1002
1002
  async function buildImportRegistry(sources) {
1003
- const { RegistryBuilder } = await import("./builder-p679nA-t.mjs");
1003
+ const { RegistryBuilder } = await import("./builder-CeNuOpK1.mjs");
1004
1004
  return new RegistryBuilder().build(sources);
1005
1005
  }
1006
1006
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kimesh/auto-import",
3
- "version": "0.2.35",
3
+ "version": "0.2.36",
4
4
  "description": "OXC-powered auto-import system for Kimesh framework with layer support",
5
5
  "repository": {
6
6
  "type": "git",
@@ -25,7 +25,7 @@
25
25
  "test": "vitest"
26
26
  },
27
27
  "dependencies": {
28
- "@kimesh/shared": "0.2.35",
28
+ "@kimesh/shared": "0.2.36",
29
29
  "@vue/compiler-sfc": "^3.5.26",
30
30
  "consola": "^3.4.2",
31
31
  "magic-string": "^0.30.21",
@@ -1,4 +0,0 @@
1
- import "./oxc-scanner-tiRVQcUS.mjs";
2
- import { t as RegistryBuilder } from "./builder-BrFfPpqU.mjs";
3
-
4
- export { RegistryBuilder };