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.
@@ -1,3 +1,7 @@
1
1
 
2
- /* 轨迹回放组件不需要额外样式 */
3
- /* 所有样式通过 TailwindCSS 工具类或外部组件控制 */
2
+ /* JkyAMarker 组件样式 - 参考高德官方示例 */
3
+ .amap-icon img,
4
+ .amap-marker-content img {
5
+ width: 25px;
6
+ height: 34px;
7
+ }
@@ -1,7 +1,3 @@
1
1
 
2
- /* JkyAMarker 组件样式 - 参考高德官方示例 */
3
- .amap-icon img,
4
- .amap-marker-content img {
5
- width: 25px;
6
- height: 34px;
7
- }
2
+ /* 轨迹回放组件不需要额外样式 */
3
+ /* 所有样式通过 TailwindCSS 工具类或外部组件控制 */
@@ -1,4 +1,4 @@
1
- const version = "0.0.146";
1
+ const version = "0.0.147";
2
2
  export {
3
3
  version
4
4
  };
@@ -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;
@@ -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/${kebabName}/style.css`
55
+ `jky-component-lib/dist/es/${stylePath}/style.css`
35
56
  ]
36
57
  };
37
58
  }
@@ -1,3 +1,7 @@
1
1
 
2
- /* 轨迹回放组件不需要额外样式 */
3
- /* 所有样式通过 TailwindCSS 工具类或外部组件控制 */
2
+ /* JkyAMarker 组件样式 - 参考高德官方示例 */
3
+ .amap-icon img,
4
+ .amap-marker-content img {
5
+ width: 25px;
6
+ height: 34px;
7
+ }
@@ -1,7 +1,3 @@
1
1
 
2
- /* JkyAMarker 组件样式 - 参考高德官方示例 */
3
- .amap-icon img,
4
- .amap-marker-content img {
5
- width: 25px;
6
- height: 34px;
7
- }
2
+ /* 轨迹回放组件不需要额外样式 */
3
+ /* 所有样式通过 TailwindCSS 工具类或外部组件控制 */
@@ -1,4 +1,4 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const version = "0.0.146";
3
+ const version = "0.0.147";
4
4
  exports.version = version;
@@ -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;
@@ -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/${kebabName}/style.css`
57
+ `jky-component-lib/dist/es/${stylePath}/style.css`
37
58
  ]
38
59
  };
39
60
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "jky-component-lib",
3
3
  "type": "module",
4
- "version": "0.0.146",
4
+ "version": "0.0.147",
5
5
  "publishConfig": {
6
6
  "access": "public"
7
7
  },