@fangzhongya/vue-components 0.1.29 → 0.1.30
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/archive.cjs +190 -340
- package/dist/archive.d.cts +5 -4
- package/dist/archive.d.ts +5 -4
- package/dist/archive.js +190 -341
- package/dist/chunk-J7CICTHH-DzD10422.cjs +25 -0
- package/dist/chunk-J7CICTHH-Ikr5rmAQ.js +20 -0
- package/dist/component-B-5G8Yjc.js +431 -0
- package/dist/component-CVkcT_sw.cjs +459 -0
- package/dist/component.cjs +2 -8
- package/dist/component.d.cts +14 -14
- package/dist/component.d.ts +15 -14
- package/dist/component.js +2 -8
- package/dist/config.cjs +59 -6
- package/dist/config.d.cts +134 -133
- package/dist/config.d.ts +134 -133
- package/dist/config.js +57 -5
- package/dist/import.cjs +18 -25
- package/dist/import.d.cts +5 -4
- package/dist/import.d.ts +5 -4
- package/dist/import.js +18 -26
- package/dist/imports-Cl3zPCxJ.cjs +971 -0
- package/dist/imports-DLu2DPCK.js +966 -0
- package/dist/imports.cjs +2 -8
- package/dist/imports.d.cts +14 -14
- package/dist/imports.d.ts +15 -14
- package/dist/imports.js +2 -8
- package/dist/index-5NuL-vgA.d.ts +5609 -0
- package/dist/index-DORWvPc3.d.cts +5609 -0
- package/dist/index.cjs +8 -17
- package/dist/index.d.cts +7 -8
- package/dist/index.d.ts +7 -8
- package/dist/index.js +6 -17
- package/dist/library.cjs +32 -48
- package/dist/library.d.cts +7 -6
- package/dist/library.d.ts +7 -6
- package/dist/library.js +32 -49
- package/dist/resolver.cjs +25 -10
- package/dist/resolver.d.cts +5 -4
- package/dist/resolver.d.ts +5 -4
- package/dist/resolver.js +24 -10
- package/dist/types-CZdqb5KI-T7Ielv5Y.d.cts +134 -0
- package/dist/types-CZdqb5KI-T7Ielv5Y.d.ts +134 -0
- package/dist/util-Ddld3oFr.js +93 -0
- package/dist/util-DtBzae46.cjs +116 -0
- package/dist/util.cjs +8 -16
- package/dist/util.d.cts +104 -5
- package/dist/util.d.ts +104 -5
- package/dist/util.js +3 -16
- package/package.json +10 -10
- package/dist/chunk-2SBJQUCI.cjs +0 -1238
- package/dist/chunk-3XFEJIQP.js +0 -135
- package/dist/chunk-6PYVVU7E.cjs +0 -581
- package/dist/chunk-7JRVVHVI.cjs +0 -33
- package/dist/chunk-AKNB7BKJ.cjs +0 -25
- package/dist/chunk-DURXCSNX.js +0 -62
- package/dist/chunk-HFFYPZA3.js +0 -1238
- package/dist/chunk-IXN2F3IJ.js +0 -581
- package/dist/chunk-NLSI7A24.cjs +0 -135
- package/dist/chunk-RRQV2YXW.js +0 -33
- package/dist/chunk-TVGK2KRP.js +0 -25
- package/dist/chunk-UNBQUEQ4.cjs +0 -62
package/dist/index.cjs
CHANGED
|
@@ -1,17 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
require('./chunk-AKNB7BKJ.cjs');
|
|
10
|
-
|
|
11
|
-
// packages/index.ts
|
|
12
|
-
var FangComponent = class extends _chunk6PYVVU7Ecjs.component_default {
|
|
13
|
-
};
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
exports.ComponentsResolver = _chunk7JRVVHVIcjs.ComponentsResolver; exports.FangComponent = FangComponent;
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
+
const require_component = require("./component-CVkcT_sw.cjs");
|
|
3
|
+
const require_resolver = require("./resolver.cjs");
|
|
4
|
+
//#region packages/index.ts
|
|
5
|
+
var FangComponent = class extends require_component.FangComponent {};
|
|
6
|
+
//#endregion
|
|
7
|
+
exports.ComponentsResolver = require_resolver.ComponentsResolver;
|
|
8
|
+
exports.FangComponent = FangComponent;
|
package/dist/index.d.cts
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
import 'unplugin-vue-components';
|
|
1
|
+
import { Config } from "./config.cjs";
|
|
2
|
+
import FangComponent$1 from "./component.cjs";
|
|
3
|
+
import { ComponentsResolver } from "./resolver.cjs";
|
|
5
4
|
|
|
6
|
-
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
export { FangComponent };
|
|
5
|
+
//#region packages/index.d.ts
|
|
6
|
+
declare class FangComponent extends FangComponent$1 {}
|
|
7
|
+
//#endregion
|
|
8
|
+
export { ComponentsResolver, type Config, FangComponent };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
import 'unplugin-vue-components';
|
|
1
|
+
import { Config } from "./config.js";
|
|
2
|
+
import FangComponent$1 from "./component.js";
|
|
3
|
+
import { ComponentsResolver } from "./resolver.js";
|
|
5
4
|
|
|
6
|
-
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
export { FangComponent };
|
|
5
|
+
//#region packages/index.d.ts
|
|
6
|
+
declare class FangComponent extends FangComponent$1 {}
|
|
7
|
+
//#endregion
|
|
8
|
+
export { ComponentsResolver, type Config, FangComponent };
|
package/dist/index.js
CHANGED
|
@@ -1,17 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
import "./chunk-DURXCSNX.js";
|
|
8
|
-
import "./chunk-3XFEJIQP.js";
|
|
9
|
-
import "./chunk-TVGK2KRP.js";
|
|
10
|
-
|
|
11
|
-
// packages/index.ts
|
|
12
|
-
var FangComponent = class extends component_default {
|
|
13
|
-
};
|
|
14
|
-
export {
|
|
15
|
-
ComponentsResolver,
|
|
16
|
-
FangComponent
|
|
17
|
-
};
|
|
1
|
+
import { t as FangComponent$1 } from "./component-B-5G8Yjc.js";
|
|
2
|
+
import { ComponentsResolver } from "./resolver.js";
|
|
3
|
+
//#region packages/index.ts
|
|
4
|
+
var FangComponent = class extends FangComponent$1 {};
|
|
5
|
+
//#endregion
|
|
6
|
+
export { ComponentsResolver, FangComponent };
|
package/dist/library.cjs
CHANGED
|
@@ -1,53 +1,37 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
// packages/library.ts
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
+
const require_chunk_J7CICTHH = require("./chunk-J7CICTHH-DzD10422.cjs");
|
|
3
|
+
//#region packages/library.ts
|
|
6
4
|
function namefilter(config, name) {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
const reg = new RegExp("^" + config.prefix + "-");
|
|
15
|
-
if (reg.test(vm)) {
|
|
16
|
-
return vm;
|
|
17
|
-
} else {
|
|
18
|
-
return false;
|
|
19
|
-
}
|
|
5
|
+
let vm = require_chunk_J7CICTHH.humpToLine(name);
|
|
6
|
+
if (config.alias) {
|
|
7
|
+
const reg1 = new RegExp("^" + config.alias + "-" + config.prefix + "-");
|
|
8
|
+
if (reg1.test(vm)) return vm.replace(reg1, config.prefix + "-");
|
|
9
|
+
}
|
|
10
|
+
if (new RegExp("^" + config.prefix + "-").test(vm)) return vm;
|
|
11
|
+
else return false;
|
|
20
12
|
}
|
|
13
|
+
/**
|
|
14
|
+
* 自动按需匹配注册
|
|
15
|
+
* @returns
|
|
16
|
+
*/
|
|
21
17
|
function FangLibResolver(config) {
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
let mc = namefilter(config, name);
|
|
40
|
-
if (mc) {
|
|
41
|
-
if (config.getFrom) {
|
|
42
|
-
return config.getFrom(mc, 1);
|
|
43
|
-
}
|
|
44
|
-
} else {
|
|
45
|
-
return;
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
];
|
|
18
|
+
return [{
|
|
19
|
+
type: "component",
|
|
20
|
+
resolve: (name) => {
|
|
21
|
+
let mc = namefilter(config, name);
|
|
22
|
+
if (mc) {
|
|
23
|
+
if (config.getFrom) return config.getFrom(mc, 1);
|
|
24
|
+
} else return;
|
|
25
|
+
}
|
|
26
|
+
}, {
|
|
27
|
+
type: "directive",
|
|
28
|
+
resolve: (name) => {
|
|
29
|
+
let mc = namefilter(config, name);
|
|
30
|
+
if (mc) {
|
|
31
|
+
if (config.getFrom) return config.getFrom(mc, 1);
|
|
32
|
+
} else return;
|
|
33
|
+
}
|
|
34
|
+
}];
|
|
50
35
|
}
|
|
51
|
-
|
|
52
|
-
|
|
36
|
+
//#endregion
|
|
53
37
|
exports.FangLibResolver = FangLibResolver;
|
package/dist/library.d.cts
CHANGED
|
@@ -1,14 +1,15 @@
|
|
|
1
|
-
import { ComponentResolveResult, ComponentResolver } from
|
|
1
|
+
import { n as ComponentResolveResult, r as ComponentResolver } from "./index-DORWvPc3.cjs";
|
|
2
2
|
|
|
3
|
+
//#region packages/library.d.ts
|
|
3
4
|
type Config = {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
prefix: string;
|
|
6
|
+
alias?: string;
|
|
7
|
+
getFrom?(mc: string, type: string | number): ComponentResolveResult;
|
|
7
8
|
};
|
|
8
9
|
/**
|
|
9
10
|
* 自动按需匹配注册
|
|
10
11
|
* @returns
|
|
11
12
|
*/
|
|
12
13
|
declare function FangLibResolver(config: Config): ComponentResolver[];
|
|
13
|
-
|
|
14
|
-
export { FangLibResolver };
|
|
14
|
+
//#endregion
|
|
15
|
+
export { FangLibResolver };
|
package/dist/library.d.ts
CHANGED
|
@@ -1,14 +1,15 @@
|
|
|
1
|
-
import { ComponentResolveResult, ComponentResolver } from
|
|
1
|
+
import { n as ComponentResolveResult, r as ComponentResolver } from "./index-5NuL-vgA.js";
|
|
2
2
|
|
|
3
|
+
//#region packages/library.d.ts
|
|
3
4
|
type Config = {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
prefix: string;
|
|
6
|
+
alias?: string;
|
|
7
|
+
getFrom?(mc: string, type: string | number): ComponentResolveResult;
|
|
7
8
|
};
|
|
8
9
|
/**
|
|
9
10
|
* 自动按需匹配注册
|
|
10
11
|
* @returns
|
|
11
12
|
*/
|
|
12
13
|
declare function FangLibResolver(config: Config): ComponentResolver[];
|
|
13
|
-
|
|
14
|
-
export { FangLibResolver };
|
|
14
|
+
//#endregion
|
|
15
|
+
export { FangLibResolver };
|
package/dist/library.js
CHANGED
|
@@ -1,53 +1,36 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
} from "./chunk-TVGK2KRP.js";
|
|
4
|
-
|
|
5
|
-
// packages/library.ts
|
|
1
|
+
import { t as humpToLine } from "./chunk-J7CICTHH-Ikr5rmAQ.js";
|
|
2
|
+
//#region packages/library.ts
|
|
6
3
|
function namefilter(config, name) {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
const reg = new RegExp("^" + config.prefix + "-");
|
|
15
|
-
if (reg.test(vm)) {
|
|
16
|
-
return vm;
|
|
17
|
-
} else {
|
|
18
|
-
return false;
|
|
19
|
-
}
|
|
4
|
+
let vm = humpToLine(name);
|
|
5
|
+
if (config.alias) {
|
|
6
|
+
const reg1 = new RegExp("^" + config.alias + "-" + config.prefix + "-");
|
|
7
|
+
if (reg1.test(vm)) return vm.replace(reg1, config.prefix + "-");
|
|
8
|
+
}
|
|
9
|
+
if (new RegExp("^" + config.prefix + "-").test(vm)) return vm;
|
|
10
|
+
else return false;
|
|
20
11
|
}
|
|
12
|
+
/**
|
|
13
|
+
* 自动按需匹配注册
|
|
14
|
+
* @returns
|
|
15
|
+
*/
|
|
21
16
|
function FangLibResolver(config) {
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
let mc = namefilter(config, name);
|
|
40
|
-
if (mc) {
|
|
41
|
-
if (config.getFrom) {
|
|
42
|
-
return config.getFrom(mc, 1);
|
|
43
|
-
}
|
|
44
|
-
} else {
|
|
45
|
-
return;
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
];
|
|
17
|
+
return [{
|
|
18
|
+
type: "component",
|
|
19
|
+
resolve: (name) => {
|
|
20
|
+
let mc = namefilter(config, name);
|
|
21
|
+
if (mc) {
|
|
22
|
+
if (config.getFrom) return config.getFrom(mc, 1);
|
|
23
|
+
} else return;
|
|
24
|
+
}
|
|
25
|
+
}, {
|
|
26
|
+
type: "directive",
|
|
27
|
+
resolve: (name) => {
|
|
28
|
+
let mc = namefilter(config, name);
|
|
29
|
+
if (mc) {
|
|
30
|
+
if (config.getFrom) return config.getFrom(mc, 1);
|
|
31
|
+
} else return;
|
|
32
|
+
}
|
|
33
|
+
}];
|
|
50
34
|
}
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
};
|
|
35
|
+
//#endregion
|
|
36
|
+
export { FangLibResolver };
|
package/dist/resolver.cjs
CHANGED
|
@@ -1,10 +1,25 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
require(
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
+
const require_component = require("./component-CVkcT_sw.cjs");
|
|
3
|
+
const require_config = require("./config.cjs");
|
|
4
|
+
const require_util = require("./util-DtBzae46.cjs");
|
|
5
|
+
//#region packages/resolver.ts
|
|
6
|
+
/**
|
|
7
|
+
* 自动按需匹配注册
|
|
8
|
+
* @returns
|
|
9
|
+
*/
|
|
10
|
+
function ComponentsResolver(config$1 = {}) {
|
|
11
|
+
const fangComp = new require_component.FangComponent(require_util.unmergeObject(require_config.config, config$1, 1));
|
|
12
|
+
return [{
|
|
13
|
+
type: "component",
|
|
14
|
+
resolve: (name) => {
|
|
15
|
+
return fangComp.resolve(name, "component");
|
|
16
|
+
}
|
|
17
|
+
}, {
|
|
18
|
+
type: "directive",
|
|
19
|
+
resolve: (name) => {
|
|
20
|
+
return fangComp.resolve(name, "directive");
|
|
21
|
+
}
|
|
22
|
+
}];
|
|
23
|
+
}
|
|
24
|
+
//#endregion
|
|
25
|
+
exports.ComponentsResolver = ComponentsResolver;
|
package/dist/resolver.d.cts
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import { Config } from
|
|
2
|
-
import { ComponentResolver } from
|
|
1
|
+
import { Config } from "./config.cjs";
|
|
2
|
+
import { r as ComponentResolver } from "./index-DORWvPc3.cjs";
|
|
3
3
|
|
|
4
|
+
//#region packages/resolver.d.ts
|
|
4
5
|
/**
|
|
5
6
|
* 自动按需匹配注册
|
|
6
7
|
* @returns
|
|
7
8
|
*/
|
|
8
9
|
declare function ComponentsResolver(config?: Config): ComponentResolver[];
|
|
9
|
-
|
|
10
|
-
export { ComponentsResolver };
|
|
10
|
+
//#endregion
|
|
11
|
+
export { ComponentsResolver };
|
package/dist/resolver.d.ts
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import { Config } from
|
|
2
|
-
import { ComponentResolver } from
|
|
1
|
+
import { Config } from "./config.js";
|
|
2
|
+
import { r as ComponentResolver } from "./index-5NuL-vgA.js";
|
|
3
3
|
|
|
4
|
+
//#region packages/resolver.d.ts
|
|
4
5
|
/**
|
|
5
6
|
* 自动按需匹配注册
|
|
6
7
|
* @returns
|
|
7
8
|
*/
|
|
8
9
|
declare function ComponentsResolver(config?: Config): ComponentResolver[];
|
|
9
|
-
|
|
10
|
-
export { ComponentsResolver };
|
|
10
|
+
//#endregion
|
|
11
|
+
export { ComponentsResolver };
|
package/dist/resolver.js
CHANGED
|
@@ -1,10 +1,24 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
} from "./
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
1
|
+
import { config } from "./config.js";
|
|
2
|
+
import { r as unmergeObject } from "./util-Ddld3oFr.js";
|
|
3
|
+
import { t as FangComponent } from "./component-B-5G8Yjc.js";
|
|
4
|
+
//#region packages/resolver.ts
|
|
5
|
+
/**
|
|
6
|
+
* 自动按需匹配注册
|
|
7
|
+
* @returns
|
|
8
|
+
*/
|
|
9
|
+
function ComponentsResolver(config$1 = {}) {
|
|
10
|
+
const fangComp = new FangComponent(unmergeObject(config, config$1, 1));
|
|
11
|
+
return [{
|
|
12
|
+
type: "component",
|
|
13
|
+
resolve: (name) => {
|
|
14
|
+
return fangComp.resolve(name, "component");
|
|
15
|
+
}
|
|
16
|
+
}, {
|
|
17
|
+
type: "directive",
|
|
18
|
+
resolve: (name) => {
|
|
19
|
+
return fangComp.resolve(name, "directive");
|
|
20
|
+
}
|
|
21
|
+
}];
|
|
22
|
+
}
|
|
23
|
+
//#endregion
|
|
24
|
+
export { ComponentsResolver };
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
//#region node_modules/.pnpm/mlly@1.8.2/node_modules/mlly/dist/index.d.ts
|
|
2
|
+
/**
|
|
3
|
+
* Represents a general structure for ECMAScript module exports.
|
|
4
|
+
*/
|
|
5
|
+
interface ESMExport {
|
|
6
|
+
/**
|
|
7
|
+
* Optional explicit type for complex scenarios, often used internally.
|
|
8
|
+
* @optional
|
|
9
|
+
*/
|
|
10
|
+
_type?: "declaration" | "named" | "default" | "star";
|
|
11
|
+
/**
|
|
12
|
+
* The type of export (declaration, named, default or star).
|
|
13
|
+
*/
|
|
14
|
+
type: "declaration" | "named" | "default" | "star";
|
|
15
|
+
/**
|
|
16
|
+
* The specific type of declaration being exported, if applicable.
|
|
17
|
+
* @optional
|
|
18
|
+
*/
|
|
19
|
+
declarationType?: "let" | "var" | "const" | "enum" | "const enum" | "class" | "function" | "async function";
|
|
20
|
+
/**
|
|
21
|
+
* The full code snippet of the export statement.
|
|
22
|
+
*/
|
|
23
|
+
code: string;
|
|
24
|
+
/**
|
|
25
|
+
* The starting position (index) of the export declaration in the source code.
|
|
26
|
+
*/
|
|
27
|
+
start: number;
|
|
28
|
+
/**
|
|
29
|
+
* The end position (index) of the export declaration in the source code.
|
|
30
|
+
*/
|
|
31
|
+
end: number;
|
|
32
|
+
/**
|
|
33
|
+
* The name of the variable, function or class being exported, if given explicitly.
|
|
34
|
+
* @optional
|
|
35
|
+
*/
|
|
36
|
+
name?: string;
|
|
37
|
+
/**
|
|
38
|
+
* The name used for default exports when a specific identifier isn't given.
|
|
39
|
+
* @optional
|
|
40
|
+
*/
|
|
41
|
+
defaultName?: string;
|
|
42
|
+
/**
|
|
43
|
+
* An array of names to export, applicable to named and destructured exports.
|
|
44
|
+
*/
|
|
45
|
+
names: string[];
|
|
46
|
+
/**
|
|
47
|
+
* The module specifier, if any, from which exports are being re-exported.
|
|
48
|
+
* @optional
|
|
49
|
+
*/
|
|
50
|
+
specifier?: string;
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* Represents a declaration export within an ECMAScript module.
|
|
54
|
+
* Extends {@link ESMExport}.
|
|
55
|
+
*/
|
|
56
|
+
//#endregion
|
|
57
|
+
//#region node_modules/.pnpm/unimport@5.7.0/node_modules/unimport/dist/shared/unimport.DCeIjgcw.d.mts
|
|
58
|
+
type ModuleId = string;
|
|
59
|
+
type ImportName = string;
|
|
60
|
+
interface ImportCommon {
|
|
61
|
+
/** Module specifier to import from */
|
|
62
|
+
from: ModuleId;
|
|
63
|
+
/**
|
|
64
|
+
* Priority of the import, if multiple imports have the same name, the one with the highest priority will be used
|
|
65
|
+
* @default 1
|
|
66
|
+
*/
|
|
67
|
+
priority?: number;
|
|
68
|
+
/** If this import is disabled */
|
|
69
|
+
disabled?: boolean;
|
|
70
|
+
/** Won't output import in declaration file if true */
|
|
71
|
+
dtsDisabled?: boolean;
|
|
72
|
+
/** Import declaration type like const / var / enum */
|
|
73
|
+
declarationType?: ESMExport['declarationType'];
|
|
74
|
+
/**
|
|
75
|
+
* Metadata of the import
|
|
76
|
+
*/
|
|
77
|
+
meta?: {
|
|
78
|
+
/** Short description of the import */description?: string; /** URL to the documentation */
|
|
79
|
+
docsUrl?: string; /** Additional metadata */
|
|
80
|
+
[key: string]: any;
|
|
81
|
+
};
|
|
82
|
+
/**
|
|
83
|
+
* If this import is a pure type import
|
|
84
|
+
*/
|
|
85
|
+
type?: boolean;
|
|
86
|
+
/**
|
|
87
|
+
* Using this as the from when generating type declarations
|
|
88
|
+
*/
|
|
89
|
+
typeFrom?: ModuleId;
|
|
90
|
+
}
|
|
91
|
+
interface Import extends ImportCommon {
|
|
92
|
+
/** Import name to be detected */
|
|
93
|
+
name: ImportName;
|
|
94
|
+
/** Import as this name */
|
|
95
|
+
as?: ImportName;
|
|
96
|
+
/**
|
|
97
|
+
* With properties
|
|
98
|
+
*
|
|
99
|
+
* Ignored for CJS imports.
|
|
100
|
+
*/
|
|
101
|
+
with?: Record<string, string>;
|
|
102
|
+
}
|
|
103
|
+
//#endregion
|
|
104
|
+
//#region node_modules/.pnpm/unplugin-auto-import@21.0.0/node_modules/unplugin-auto-import/dist/types-CZdqb5KI.d.mts
|
|
105
|
+
//#region node_modules/.pnpm/@antfu+utils@9.3.0/node_modules/@antfu/utils/dist/index.d.mts
|
|
106
|
+
/**
|
|
107
|
+
* Promise, or maybe not
|
|
108
|
+
*/
|
|
109
|
+
type Awaitable<T> = T | PromiseLike<T>;
|
|
110
|
+
/**
|
|
111
|
+
* Null or whatever
|
|
112
|
+
*/
|
|
113
|
+
/**
|
|
114
|
+
* Array, or not yet
|
|
115
|
+
*/
|
|
116
|
+
type Arrayable<T> = T | Array<T>;
|
|
117
|
+
/**
|
|
118
|
+
* Function
|
|
119
|
+
*/
|
|
120
|
+
//#endregion
|
|
121
|
+
//#region src/presets/index.d.ts
|
|
122
|
+
interface ImportExtended extends Import {
|
|
123
|
+
sideEffects?: SideEffectsInfo;
|
|
124
|
+
__source?: 'dir' | 'resolver';
|
|
125
|
+
}
|
|
126
|
+
type SideEffectsInfo = Arrayable<ResolverResult | string> | undefined;
|
|
127
|
+
interface ResolverResult {
|
|
128
|
+
as?: string;
|
|
129
|
+
name?: string;
|
|
130
|
+
from: string;
|
|
131
|
+
}
|
|
132
|
+
type ResolverFunction = (name: string) => Awaitable<string | ResolverResult | ImportExtended | null | undefined | void>;
|
|
133
|
+
//#endregion
|
|
134
|
+
export { ResolverResult as n, ResolverFunction as t };
|