@sdata/web-vue-auto-import-resolver 3.21.3 → 3.23.0
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/index.d.ts +8 -9
- package/index.js +1 -1
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
import { ComponentResolver } from "unplugin-vue-components/types";
|
|
2
2
|
import { Plugin } from "vite";
|
|
3
3
|
//#region index.d.ts
|
|
4
|
-
interface SdDesignResolverOptions {
|
|
4
|
+
export interface SdDesignResolverOptions {
|
|
5
5
|
/** @default 'Sd' */
|
|
6
6
|
prefix?: string;
|
|
7
7
|
}
|
|
8
|
-
interface SdDesignScssImporterOptions {
|
|
8
|
+
export interface SdDesignScssImporterOptions {
|
|
9
9
|
/** @default '@sdata/web-vue' */
|
|
10
10
|
packageName?: string;
|
|
11
11
|
}
|
|
12
|
-
interface SdDesignVitePluginOptions extends SdDesignScssImporterOptions {}
|
|
12
|
+
export interface SdDesignVitePluginOptions extends SdDesignScssImporterOptions {}
|
|
13
13
|
/**
|
|
14
14
|
* Resolver for SD Design Vue
|
|
15
15
|
*
|
|
16
16
|
* @link https://www.npmjs.com/package/@sdata/web-vue
|
|
17
17
|
*/
|
|
18
|
-
declare function SdDesignResolver(options?: SdDesignResolverOptions): ComponentResolver[];
|
|
18
|
+
export declare function SdDesignResolver(options?: SdDesignResolverOptions): ComponentResolver[];
|
|
19
19
|
/**
|
|
20
20
|
* Create a custom Sass importer that resolves `@style/` and `@components/`
|
|
21
21
|
* aliases used in `@sdata/web-vue` SCSS files.
|
|
@@ -38,8 +38,8 @@ declare function SdDesignResolver(options?: SdDesignResolverOptions): ComponentR
|
|
|
38
38
|
* });
|
|
39
39
|
* ```
|
|
40
40
|
*/
|
|
41
|
-
declare function createSdDesignScssImporter(options?: SdDesignScssImporterOptions): {
|
|
42
|
-
canonicalize(url: string): import("url").URL | null;
|
|
41
|
+
export declare function createSdDesignScssImporter(options?: SdDesignScssImporterOptions): {
|
|
42
|
+
canonicalize(url: string): import("node:url").URL | null;
|
|
43
43
|
load(canonicalUrl: URL): Promise<{
|
|
44
44
|
contents: string;
|
|
45
45
|
syntax: "scss" | "indented" | "css";
|
|
@@ -64,6 +64,5 @@ declare function createSdDesignScssImporter(options?: SdDesignScssImporterOption
|
|
|
64
64
|
* });
|
|
65
65
|
* ```
|
|
66
66
|
*/
|
|
67
|
-
declare function createSdDesignVitePlugin(options?: SdDesignVitePluginOptions): Plugin;
|
|
68
|
-
//#endregion
|
|
69
|
-
export { SdDesignResolver, SdDesignResolverOptions, SdDesignScssImporterOptions, SdDesignVitePluginOptions, createSdDesignScssImporter, createSdDesignVitePlugin };
|
|
67
|
+
export declare function createSdDesignVitePlugin(options?: SdDesignVitePluginOptions): Plugin;
|
|
68
|
+
//#endregion
|
package/index.js
CHANGED
|
@@ -102,7 +102,7 @@ function resolveAliasedPath(url, componentsDir) {
|
|
|
102
102
|
]).find((c) => existsSync(c)) ?? null;
|
|
103
103
|
}
|
|
104
104
|
function getComponentsDir(packageName) {
|
|
105
|
-
const packageRoot = path.dirname(createRequire(import.meta.url)(`${packageName}/package.json`));
|
|
105
|
+
const packageRoot = path.dirname(createRequire(import.meta.url).resolve(`${packageName}/package.json`));
|
|
106
106
|
return path.resolve(packageRoot, "es");
|
|
107
107
|
}
|
|
108
108
|
function createImporter(componentsDir) {
|
package/package.json
CHANGED