jky-component-lib 0.0.143 → 0.0.144

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,5 +1,4 @@
1
1
  import _sfc_main from "./AClusterMarker.vue.js";
2
- /* empty css */
3
2
  export {
4
3
  _sfc_main as default
5
4
  };
@@ -1,5 +1,4 @@
1
1
  import _sfc_main from "./AClusterMarker.vue.js";
2
- /* empty css */
3
2
  import { installWithSFC } from "../../utils/with-install.js";
4
3
  const JkyAClusterMarker = installWithSFC(_sfc_main);
5
4
  export {
@@ -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,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,4 +1,4 @@
1
- const version = "0.0.143";
1
+ const version = "0.0.144";
2
2
  export {
3
3
  version
4
4
  };
@@ -1,2 +1,6 @@
1
1
  import { ComponentResolver } from 'unplugin-vue-components';
2
- export declare function JkyComponentLibResolver(): ComponentResolver;
2
+ export interface JkyComponentLibResolverOptions {
3
+ /** 不自动加载样式的组件白名单(组件名,不带 Jky 前缀) */
4
+ excludeStyleList?: string[];
5
+ }
6
+ export declare function JkyComponentLibResolver(options?: JkyComponentLibResolverOptions): ComponentResolver;
@@ -1,13 +1,34 @@
1
- function JkyComponentLibResolver() {
1
+ const defaultExcludeStyleList = [
2
+ // AMap 相关子组件,共用 amap 目录的样式
3
+ "AMapPicker",
4
+ "AClusterMarker",
5
+ "AMarker",
6
+ "ATrackPlayback",
7
+ // Form 相关子组件,共用 form 目录的样式
8
+ "FormItem",
9
+ "AMapPickerItem"
10
+ ];
11
+ function JkyComponentLibResolver(options = {}) {
12
+ const { excludeStyleList = [] } = options;
13
+ const excludeStyleSet = /* @__PURE__ */ new Set([...defaultExcludeStyleList, ...excludeStyleList]);
2
14
  return {
3
15
  type: "component",
4
16
  resolve: (name) => {
5
17
  if (name.match(/^Jky[A-Z]/)) {
18
+ const componentName = name.replace("Jky", "");
19
+ const kebabName = componentName.replace(/([A-Z])/g, "-$1").replace(/^-/, "").toLowerCase();
20
+ if (excludeStyleSet.has(componentName)) {
21
+ return {
22
+ name,
23
+ from: "jky-component-lib"
24
+ // 白名单中的组件不自动加载样式
25
+ };
26
+ }
6
27
  return {
7
28
  name,
8
29
  from: "jky-component-lib",
9
30
  sideEffects: [
10
- `jky-component-lib/dist/es/${name.replace("Jky", "").replace(/([A-Z])/g, "-$1").replace(/^-/, "").toLowerCase()}/style.css`
31
+ `jky-component-lib/dist/es/${kebabName}/style.css`
11
32
  ]
12
33
  };
13
34
  }
@@ -1,5 +1,4 @@
1
1
  "use strict";
2
2
  Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
3
3
  const AClusterMarker_vue_vue_type_script_setup_true_lang = require("./AClusterMarker.vue.js");
4
- ;/* empty css */
5
4
  exports.default = AClusterMarker_vue_vue_type_script_setup_true_lang.default;
@@ -1,7 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
3
3
  const AClusterMarker_vue_vue_type_script_setup_true_lang = require("./AClusterMarker.vue.js");
4
- ;/* empty css */
5
4
  const withInstall = require("../../utils/with-install.js");
6
5
  const JkyAClusterMarker = withInstall.installWithSFC(AClusterMarker_vue_vue_type_script_setup_true_lang.default);
7
6
  exports.JkyAClusterMarker = JkyAClusterMarker;
@@ -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,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,4 +1,4 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const version = "0.0.143";
3
+ const version = "0.0.144";
4
4
  exports.version = version;
@@ -1,2 +1,6 @@
1
1
  import { ComponentResolver } from 'unplugin-vue-components';
2
- export declare function JkyComponentLibResolver(): ComponentResolver;
2
+ export interface JkyComponentLibResolverOptions {
3
+ /** 不自动加载样式的组件白名单(组件名,不带 Jky 前缀) */
4
+ excludeStyleList?: string[];
5
+ }
6
+ export declare function JkyComponentLibResolver(options?: JkyComponentLibResolverOptions): ComponentResolver;
@@ -1,15 +1,36 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- function JkyComponentLibResolver() {
3
+ const defaultExcludeStyleList = [
4
+ // AMap 相关子组件,共用 amap 目录的样式
5
+ "AMapPicker",
6
+ "AClusterMarker",
7
+ "AMarker",
8
+ "ATrackPlayback",
9
+ // Form 相关子组件,共用 form 目录的样式
10
+ "FormItem",
11
+ "AMapPickerItem"
12
+ ];
13
+ function JkyComponentLibResolver(options = {}) {
14
+ const { excludeStyleList = [] } = options;
15
+ const excludeStyleSet = /* @__PURE__ */ new Set([...defaultExcludeStyleList, ...excludeStyleList]);
4
16
  return {
5
17
  type: "component",
6
18
  resolve: (name) => {
7
19
  if (name.match(/^Jky[A-Z]/)) {
20
+ const componentName = name.replace("Jky", "");
21
+ const kebabName = componentName.replace(/([A-Z])/g, "-$1").replace(/^-/, "").toLowerCase();
22
+ if (excludeStyleSet.has(componentName)) {
23
+ return {
24
+ name,
25
+ from: "jky-component-lib"
26
+ // 白名单中的组件不自动加载样式
27
+ };
28
+ }
8
29
  return {
9
30
  name,
10
31
  from: "jky-component-lib",
11
32
  sideEffects: [
12
- `jky-component-lib/dist/es/${name.replace("Jky", "").replace(/([A-Z])/g, "-$1").replace(/^-/, "").toLowerCase()}/style.css`
33
+ `jky-component-lib/dist/es/${kebabName}/style.css`
13
34
  ]
14
35
  };
15
36
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "jky-component-lib",
3
3
  "type": "module",
4
- "version": "0.0.143",
4
+ "version": "0.0.144",
5
5
  "publishConfig": {
6
6
  "access": "public"
7
7
  },
@@ -1,3 +0,0 @@
1
- .jky-a-cluster-master {
2
- /** 簇类标记点主容器 */
3
- }
@@ -1,3 +0,0 @@
1
- .jky-a-cluster-master {
2
- /** 簇类标记点主容器 */
3
- }