jky-component-lib 0.0.146 → 0.0.147
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/es/amap/style2.css +6 -2
- package/dist/es/amap/style3.css +2 -6
- package/dist/es/package.json.js +1 -1
- package/dist/es/resolver.d.ts +2 -0
- package/dist/es/resolver.js +23 -2
- package/dist/lib/amap/style2.css +6 -2
- package/dist/lib/amap/style3.css +2 -6
- package/dist/lib/package.json.js +1 -1
- package/dist/lib/resolver.d.ts +2 -0
- package/dist/lib/resolver.js +23 -2
- package/package.json +1 -1
package/dist/es/amap/style2.css
CHANGED
package/dist/es/amap/style3.css
CHANGED
package/dist/es/package.json.js
CHANGED
package/dist/es/resolver.d.ts
CHANGED
|
@@ -2,5 +2,7 @@ import { ComponentResolver } from 'unplugin-vue-components';
|
|
|
2
2
|
export interface JkyComponentLibResolverOptions {
|
|
3
3
|
/** 不自动加载样式的组件白名单(组件名,不带 Jky 前缀) */
|
|
4
4
|
excludeStyleList?: string[];
|
|
5
|
+
/** 自定义样式映射 */
|
|
6
|
+
styleMap?: Record<string, string>;
|
|
5
7
|
}
|
|
6
8
|
export declare function JkyComponentLibResolver(options?: JkyComponentLibResolverOptions): ComponentResolver;
|
package/dist/es/resolver.js
CHANGED
|
@@ -1,3 +1,19 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
3
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
4
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
5
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
6
|
+
var __spreadValues = (a, b) => {
|
|
7
|
+
for (var prop in b || (b = {}))
|
|
8
|
+
if (__hasOwnProp.call(b, prop))
|
|
9
|
+
__defNormalProp(a, prop, b[prop]);
|
|
10
|
+
if (__getOwnPropSymbols)
|
|
11
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
12
|
+
if (__propIsEnum.call(b, prop))
|
|
13
|
+
__defNormalProp(a, prop, b[prop]);
|
|
14
|
+
}
|
|
15
|
+
return a;
|
|
16
|
+
};
|
|
1
17
|
const defaultExcludeStyleList = [
|
|
2
18
|
// AMap 相关子组件,共用 amap 目录的样式
|
|
3
19
|
"AMapPicker",
|
|
@@ -11,9 +27,13 @@ const defaultExcludeStyleList = [
|
|
|
11
27
|
"AMarkerCluster"
|
|
12
28
|
// AClusterMarker 的常见误写
|
|
13
29
|
];
|
|
30
|
+
const defaultStyleMap = {
|
|
31
|
+
AnimatedTransition: "animated"
|
|
32
|
+
};
|
|
14
33
|
function JkyComponentLibResolver(options = {}) {
|
|
15
|
-
const { excludeStyleList = [] } = options;
|
|
34
|
+
const { excludeStyleList = [], styleMap = {} } = options;
|
|
16
35
|
const excludeStyleSet = /* @__PURE__ */ new Set([...defaultExcludeStyleList, ...excludeStyleList]);
|
|
36
|
+
const styleMapLib = __spreadValues(__spreadValues({}, defaultStyleMap), styleMap);
|
|
17
37
|
return {
|
|
18
38
|
type: "component",
|
|
19
39
|
resolve: (name) => {
|
|
@@ -27,11 +47,12 @@ function JkyComponentLibResolver(options = {}) {
|
|
|
27
47
|
// 白名单中的组件不自动加载样式
|
|
28
48
|
};
|
|
29
49
|
}
|
|
50
|
+
const stylePath = styleMapLib[componentName] || kebabName;
|
|
30
51
|
return {
|
|
31
52
|
name,
|
|
32
53
|
from: "jky-component-lib",
|
|
33
54
|
sideEffects: [
|
|
34
|
-
`jky-component-lib/dist/es/${
|
|
55
|
+
`jky-component-lib/dist/es/${stylePath}/style.css`
|
|
35
56
|
]
|
|
36
57
|
};
|
|
37
58
|
}
|
package/dist/lib/amap/style2.css
CHANGED
package/dist/lib/amap/style3.css
CHANGED
package/dist/lib/package.json.js
CHANGED
package/dist/lib/resolver.d.ts
CHANGED
|
@@ -2,5 +2,7 @@ import { ComponentResolver } from 'unplugin-vue-components';
|
|
|
2
2
|
export interface JkyComponentLibResolverOptions {
|
|
3
3
|
/** 不自动加载样式的组件白名单(组件名,不带 Jky 前缀) */
|
|
4
4
|
excludeStyleList?: string[];
|
|
5
|
+
/** 自定义样式映射 */
|
|
6
|
+
styleMap?: Record<string, string>;
|
|
5
7
|
}
|
|
6
8
|
export declare function JkyComponentLibResolver(options?: JkyComponentLibResolverOptions): ComponentResolver;
|
package/dist/lib/resolver.js
CHANGED
|
@@ -1,4 +1,20 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
6
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
7
|
+
var __spreadValues = (a, b) => {
|
|
8
|
+
for (var prop in b || (b = {}))
|
|
9
|
+
if (__hasOwnProp.call(b, prop))
|
|
10
|
+
__defNormalProp(a, prop, b[prop]);
|
|
11
|
+
if (__getOwnPropSymbols)
|
|
12
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
13
|
+
if (__propIsEnum.call(b, prop))
|
|
14
|
+
__defNormalProp(a, prop, b[prop]);
|
|
15
|
+
}
|
|
16
|
+
return a;
|
|
17
|
+
};
|
|
2
18
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
19
|
const defaultExcludeStyleList = [
|
|
4
20
|
// AMap 相关子组件,共用 amap 目录的样式
|
|
@@ -13,9 +29,13 @@ const defaultExcludeStyleList = [
|
|
|
13
29
|
"AMarkerCluster"
|
|
14
30
|
// AClusterMarker 的常见误写
|
|
15
31
|
];
|
|
32
|
+
const defaultStyleMap = {
|
|
33
|
+
AnimatedTransition: "animated"
|
|
34
|
+
};
|
|
16
35
|
function JkyComponentLibResolver(options = {}) {
|
|
17
|
-
const { excludeStyleList = [] } = options;
|
|
36
|
+
const { excludeStyleList = [], styleMap = {} } = options;
|
|
18
37
|
const excludeStyleSet = /* @__PURE__ */ new Set([...defaultExcludeStyleList, ...excludeStyleList]);
|
|
38
|
+
const styleMapLib = __spreadValues(__spreadValues({}, defaultStyleMap), styleMap);
|
|
19
39
|
return {
|
|
20
40
|
type: "component",
|
|
21
41
|
resolve: (name) => {
|
|
@@ -29,11 +49,12 @@ function JkyComponentLibResolver(options = {}) {
|
|
|
29
49
|
// 白名单中的组件不自动加载样式
|
|
30
50
|
};
|
|
31
51
|
}
|
|
52
|
+
const stylePath = styleMapLib[componentName] || kebabName;
|
|
32
53
|
return {
|
|
33
54
|
name,
|
|
34
55
|
from: "jky-component-lib",
|
|
35
56
|
sideEffects: [
|
|
36
|
-
`jky-component-lib/dist/es/${
|
|
57
|
+
`jky-component-lib/dist/es/${stylePath}/style.css`
|
|
37
58
|
]
|
|
38
59
|
};
|
|
39
60
|
}
|