@robot-admin/naive-ui-components 0.11.4 → 0.11.6

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.
Files changed (104) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/README.md +35 -0
  3. package/README_EN.md +34 -0
  4. package/SECURITY.md +2 -0
  5. package/dist/C_Map.cjs +1 -1
  6. package/dist/C_Map.css +8 -8
  7. package/dist/C_Map.d.cts +2 -2
  8. package/dist/C_Map.d.ts +2 -2
  9. package/dist/C_Map.js +1 -1
  10. package/dist/C_Map2.cjs +1 -1
  11. package/dist/C_Map2.js +1 -1
  12. package/dist/C_Table.d.ts +1 -0
  13. package/dist/constants2.d.cts +1 -1
  14. package/dist/constants2.d.ts +1 -1
  15. package/dist/constants3.d.cts +3 -3
  16. package/dist/constants3.d.ts +3 -3
  17. package/dist/constants4.d.cts +4 -4
  18. package/dist/constants4.d.ts +4 -4
  19. package/dist/constants5.d.cts +2 -2
  20. package/dist/constants5.d.ts +2 -2
  21. package/dist/images/layers-2x.png +0 -0
  22. package/dist/images/layers.png +0 -0
  23. package/dist/index.cjs +1 -1
  24. package/dist/index.d.cts +2 -2
  25. package/dist/index.d.ts +3 -2
  26. package/dist/index.js +1 -1
  27. package/dist/index.vue.d.cts +1 -1
  28. package/dist/index.vue.d.ts +1 -1
  29. package/dist/index10.vue.d.cts +2 -2
  30. package/dist/index10.vue.d.ts +1 -1
  31. package/dist/index11.vue.d.cts +1 -1
  32. package/dist/index12.vue.d.ts +1 -1
  33. package/dist/index13.vue.d.cts +1 -1
  34. package/dist/index13.vue.d.ts +1 -1
  35. package/dist/index14.vue.d.cts +1 -1
  36. package/dist/index14.vue.d.ts +5 -5
  37. package/dist/index15.vue.d.cts +5 -5
  38. package/dist/index15.vue.d.ts +1 -1
  39. package/dist/index16.vue.d.cts +1 -1
  40. package/dist/index17.vue.d.ts +1 -1
  41. package/dist/index18.vue.d.cts +1 -1
  42. package/dist/index18.vue.d.ts +2 -2
  43. package/dist/index2.vue.d.cts +5 -5
  44. package/dist/index2.vue.d.ts +5 -5
  45. package/dist/index20.vue.d.cts +1 -1
  46. package/dist/index20.vue.d.ts +1 -1
  47. package/dist/index21.vue.d.cts +2 -2
  48. package/dist/index21.vue.d.ts +2 -2
  49. package/dist/index22.vue.d.cts +1 -1
  50. package/dist/index22.vue.d.ts +1 -1
  51. package/dist/index24.vue.d.cts +3 -3
  52. package/dist/index24.vue.d.ts +3 -3
  53. package/dist/index26.vue.d.cts +4 -4
  54. package/dist/index26.vue.d.ts +4 -4
  55. package/dist/index27.vue.d.cts +2 -2
  56. package/dist/index27.vue.d.ts +2 -2
  57. package/dist/index3.vue.d.cts +2 -2
  58. package/dist/index3.vue.d.ts +2 -2
  59. package/dist/index4.vue.d.cts +2 -2
  60. package/dist/index4.vue.d.ts +2 -2
  61. package/dist/index5.vue.d.cts +2 -2
  62. package/dist/index9.vue.d.ts +2 -2
  63. package/dist/mapUtils.d.cts +144 -0
  64. package/dist/mapUtils.d.ts +144 -0
  65. package/dist/style.css +8 -8
  66. package/dist/useCalendarEvents.d.cts +2 -2
  67. package/dist/useCalendarEvents.d.ts +2 -2
  68. package/dist/useCollapsePanel.d.cts +2 -2
  69. package/dist/useCollapsePanel.d.ts +2 -2
  70. package/dist/useCropperCore.d.cts +6 -6
  71. package/dist/useCropperCore.d.ts +6 -6
  72. package/dist/useDraggableLayout.d.cts +5 -5
  73. package/dist/useDraggableLayout.d.ts +5 -5
  74. package/dist/useDynamicFormState.d.cts +3 -3
  75. package/dist/useDynamicFormState.d.ts +3 -3
  76. package/dist/useEdgeInteraction.d.cts +1 -1
  77. package/dist/useEdgeInteraction.d.ts +1 -1
  78. package/dist/useFullscreen.d.cts +2 -2
  79. package/dist/useFullscreen.d.ts +2 -2
  80. package/dist/useGlobalSearch.d.cts +1 -1
  81. package/dist/useGlobalSearch.d.ts +1 -1
  82. package/dist/useInfiniteScroll.d.cts +1 -1
  83. package/dist/useInfiniteScroll.d.ts +1 -1
  84. package/dist/useQRCode.d.cts +4 -4
  85. package/dist/useQRCode.d.ts +4 -4
  86. package/dist/useSearchState.d.cts +21 -21
  87. package/dist/useSearchState.d.ts +21 -21
  88. package/dist/useSignatureHistory.d.cts +1 -1
  89. package/dist/useSignatureHistory.d.ts +1 -1
  90. package/dist/useSplitResize.d.cts +7 -7
  91. package/dist/useSplitResize.d.ts +7 -7
  92. package/dist/useTableQuery.d.cts +1 -1
  93. package/dist/useTableQuery.d.ts +1 -1
  94. package/dist/useTimeSelection.d.cts +2 -2
  95. package/dist/useTimeSelection.d.ts +2 -2
  96. package/dist/useTreeOperations.d.cts +6 -6
  97. package/dist/useTreeOperations.d.ts +6 -6
  98. package/dist/useWorkflowValidation.d.cts +5 -5
  99. package/dist/useWorkflowValidation.d.ts +5 -5
  100. package/dist/verification.d.cts +5 -5
  101. package/dist/verification.d.ts +5 -5
  102. package/package.json +2 -1
  103. package/dist/data.d.cts +0 -67
  104. package/dist/data.d.ts +0 -67
@@ -84,17 +84,17 @@ declare const __VLS_base: vue.DefineComponent<TimelineProps, {
84
84
  /** 展开全部 */expandAll: () => void; /** 折叠全部 */
85
85
  collapseAll: () => void;
86
86
  }, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {} & {
87
- "item-click": (item: TimelineItem, index: number) => any;
88
87
  expand: (item: TimelineItem, expanded: boolean) => any;
88
+ "item-click": (item: TimelineItem, index: number) => any;
89
89
  }, string, vue.PublicProps, Readonly<TimelineProps> & Readonly<{
90
- "onItem-click"?: ((item: TimelineItem, index: number) => any) | undefined;
91
90
  onExpand?: ((item: TimelineItem, expanded: boolean) => any) | undefined;
91
+ "onItem-click"?: ((item: TimelineItem, index: number) => any) | undefined;
92
92
  }>, {
93
+ items: TimelineItem[];
93
94
  reverse: boolean;
95
+ labelPlacement: "left" | "right" | "alternate";
94
96
  size: "small" | "medium" | "large";
95
97
  mode: "vertical" | "horizontal";
96
- items: TimelineItem[];
97
- labelPlacement: "left" | "right" | "alternate";
98
98
  pending: boolean;
99
99
  pendingText: string;
100
100
  lineType: "solid" | "dashed" | "dotted";
@@ -62,10 +62,10 @@ type __VLS_Props = {
62
62
  };
63
63
  declare const __VLS_export: vue.DefineComponent<__VLS_Props, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
64
64
  "update:modelValue": (value: (string | number)[]) => any;
65
- change: (targetKeys: (string | number)[], direction: "right" | "left", moveKeys: (string | number)[]) => any;
65
+ change: (targetKeys: (string | number)[], direction: "left" | "right", moveKeys: (string | number)[]) => any;
66
66
  }, string, vue.PublicProps, Readonly<__VLS_Props> & Readonly<{
67
67
  "onUpdate:modelValue"?: ((value: (string | number)[]) => any) | undefined;
68
- onChange?: ((targetKeys: (string | number)[], direction: "right" | "left", moveKeys: (string | number)[]) => any) | undefined;
68
+ onChange?: ((targetKeys: (string | number)[], direction: "left" | "right", moveKeys: (string | number)[]) => any) | undefined;
69
69
  }>, {
70
70
  size: "small" | "medium" | "large";
71
71
  filterable: boolean;
@@ -62,10 +62,10 @@ type __VLS_Props = {
62
62
  };
63
63
  declare const __VLS_export: vue.DefineComponent<__VLS_Props, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
64
64
  "update:modelValue": (value: (string | number)[]) => any;
65
- change: (targetKeys: (string | number)[], direction: "right" | "left", moveKeys: (string | number)[]) => any;
65
+ change: (targetKeys: (string | number)[], direction: "left" | "right", moveKeys: (string | number)[]) => any;
66
66
  }, string, vue.PublicProps, Readonly<__VLS_Props> & Readonly<{
67
67
  "onUpdate:modelValue"?: ((value: (string | number)[]) => any) | undefined;
68
- onChange?: ((targetKeys: (string | number)[], direction: "right" | "left", moveKeys: (string | number)[]) => any) | undefined;
68
+ onChange?: ((targetKeys: (string | number)[], direction: "left" | "right", moveKeys: (string | number)[]) => any) | undefined;
69
69
  }>, {
70
70
  size: "small" | "medium" | "large";
71
71
  filterable: boolean;
@@ -72,10 +72,10 @@ declare const __VLS_export: vue.DefineComponent<__VLS_Props, {}, {}, {}, {}, vue
72
72
  onItemClick?: ((item: AvatarItem) => any) | undefined;
73
73
  onOverflowClick?: ((hiddenItems: AvatarItem[]) => any) | undefined;
74
74
  }>, {
75
- direction: "ltr" | "rtl";
75
+ max: number;
76
76
  size: number;
77
77
  overlap: number;
78
- max: number;
78
+ direction: "ltr" | "rtl";
79
79
  clickable: boolean;
80
80
  shape: "circle" | "square";
81
81
  showStatus: boolean;
@@ -72,10 +72,10 @@ declare const __VLS_export: vue.DefineComponent<__VLS_Props, {}, {}, {}, {}, vue
72
72
  onItemClick?: ((item: AvatarItem) => any) | undefined;
73
73
  onOverflowClick?: ((hiddenItems: AvatarItem[]) => any) | undefined;
74
74
  }>, {
75
- direction: "ltr" | "rtl";
75
+ max: number;
76
76
  size: number;
77
77
  overlap: number;
78
- max: number;
78
+ direction: "ltr" | "rtl";
79
79
  clickable: boolean;
80
80
  shape: "circle" | "square";
81
81
  showStatus: boolean;
@@ -26,11 +26,11 @@ declare const __VLS_export: vue.DefineComponent<Props, {}, {}, {}, {}, vue.Compo
26
26
  fontSize: number;
27
27
  lineColor: string;
28
28
  format: "CODE128" | "CODE39" | "EAN13" | "EAN8" | "UPC" | "ITF14" | "MSI" | "pharmacode";
29
- showBorder: boolean;
30
- showLabel: boolean;
31
29
  showText: boolean;
32
30
  textPosition: "bottom" | "top";
33
31
  background: string;
32
+ showBorder: boolean;
33
+ showLabel: boolean;
34
34
  }, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
35
35
  declare const _default: typeof __VLS_export;
36
36
  //#endregion
@@ -26,11 +26,11 @@ declare const __VLS_export: vue.DefineComponent<Props, {}, {}, {}, {}, vue.Compo
26
26
  fontSize: number;
27
27
  lineColor: string;
28
28
  format: "CODE128" | "CODE39" | "EAN13" | "EAN8" | "UPC" | "ITF14" | "MSI" | "pharmacode";
29
- showBorder: boolean;
30
- showLabel: boolean;
31
29
  showText: boolean;
32
30
  textPosition: "bottom" | "top";
33
31
  background: string;
32
+ showBorder: boolean;
33
+ showLabel: boolean;
34
34
  }, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
35
35
  declare const _default: typeof __VLS_export;
36
36
  //#endregion
@@ -108,13 +108,13 @@ declare const __VLS_export: vue.DefineComponent<MenuProps, {
108
108
  deriveResponsiveState: () => void;
109
109
  } | null>;
110
110
  }, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
111
- "update:modelValue": (key: MenuValue) => any;
112
111
  select: (key: string) => any;
112
+ "update:modelValue": (key: MenuValue) => any;
113
113
  "update:value": (key: MenuValue) => any;
114
114
  "update:expandedKeys": (keys: string[]) => any;
115
115
  }, string, vue.PublicProps, Readonly<MenuProps> & Readonly<{
116
- "onUpdate:modelValue"?: ((key: MenuValue) => any) | undefined;
117
116
  onSelect?: ((key: string) => any) | undefined;
117
+ "onUpdate:modelValue"?: ((key: MenuValue) => any) | undefined;
118
118
  "onUpdate:value"?: ((key: MenuValue) => any) | undefined;
119
119
  "onUpdate:expandedKeys"?: ((keys: string[]) => any) | undefined;
120
120
  }>, {
@@ -25,12 +25,12 @@ declare const __VLS_export: vue.DefineComponent<Props, {
25
25
  copyCode: typeof copyCode;
26
26
  toggleFullscreen: typeof toggleFullscreen;
27
27
  }, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
28
- copy: (code: string) => any;
29
28
  click: (event: MouseEvent) => any;
29
+ copy: (code: string) => any;
30
30
  fullscreen: (isFullscreen: boolean) => any;
31
31
  }, string, vue.PublicProps, Readonly<Props> & Readonly<{
32
- onCopy?: ((code: string) => any) | undefined;
33
32
  onClick?: ((event: MouseEvent) => any) | undefined;
33
+ onCopy?: ((code: string) => any) | undefined;
34
34
  onFullscreen?: ((isFullscreen: boolean) => any) | undefined;
35
35
  }>, {
36
36
  trim: boolean;
@@ -0,0 +1,144 @@
1
+ import * as vue from "vue";
2
+ import { LeafletMouseEvent, Map, TileLayerOptions } from "leaflet";
3
+
4
+ //#region src/components/C_Map/types.d.ts
5
+ type MapType = 'osm' | 'amap';
6
+ type MapCoordinate = [latitude: number, longitude: number];
7
+ type AMapPosition = [longitude: number, latitude: number];
8
+ /** 高德 JS API 安全配置;生产环境优先使用服务端代理。 */
9
+ type AMapSecurityConfig = {
10
+ serviceHost: string;
11
+ securityJsCode?: never;
12
+ } | {
13
+ securityJsCode: string;
14
+ serviceHost?: never;
15
+ };
16
+ interface MapMarker {
17
+ id?: string | number;
18
+ lat: number;
19
+ lng: number;
20
+ popup?: string;
21
+ title?: string;
22
+ }
23
+ interface MapTileConfig extends TileLayerOptions {
24
+ url?: string;
25
+ }
26
+ interface MapFitOptions {
27
+ maxZoom?: number;
28
+ padding?: [horizontal: number, vertical: number];
29
+ }
30
+ interface AMapMarkerEvent {
31
+ lnglat?: unknown;
32
+ originalEvent?: Event;
33
+ target?: unknown;
34
+ [key: string]: unknown;
35
+ }
36
+ interface AMapMarkerInstance {
37
+ getPosition(): unknown;
38
+ on(event: 'click', handler: (event: AMapMarkerEvent) => void): void;
39
+ setMap(map: AMapMapInstance | null): void;
40
+ }
41
+ interface AMapInfoWindowInstance {
42
+ close?(): void;
43
+ open(map: AMapMapInstance, position: unknown): void;
44
+ }
45
+ interface AMapMapInstance {
46
+ destroy(): void;
47
+ resize?(): void;
48
+ setCenter(center: AMapPosition): void;
49
+ setFitView?(overlays?: AMapMarkerInstance[], immediately?: boolean, avoid?: [number, number, number, number], maxZoom?: number): void;
50
+ setZoom(zoom: number): void;
51
+ }
52
+ interface AMapApi {
53
+ Map: new (container: HTMLElement, options: Record<string, unknown>) => AMapMapInstance;
54
+ Marker: new (options: Record<string, unknown>) => AMapMarkerInstance;
55
+ InfoWindow: new (options: Record<string, unknown>) => AMapInfoWindowInstance;
56
+ Pixel: new (x: number, y: number) => unknown;
57
+ }
58
+ type MapInstance = Map | AMapMapInstance;
59
+ type MapMarkerEvent = LeafletMouseEvent | AMapMarkerEvent | null;
60
+ interface MapProps {
61
+ /** 地图区域的无障碍名称。 */
62
+ ariaLabel?: string;
63
+ height?: string;
64
+ center?: MapCoordinate;
65
+ zoom?: number;
66
+ markers?: MapMarker[];
67
+ mapType?: MapType;
68
+ amapKey?: string;
69
+ amapSecurityConfig?: AMapSecurityConfig;
70
+ amapLoadTimeout?: number;
71
+ amapOptions?: Record<string, unknown>;
72
+ tileConfig?: MapTileConfig;
73
+ zoomControl?: boolean;
74
+ preferCanvas?: boolean;
75
+ fitMarkersOnInit?: boolean;
76
+ }
77
+ type MapConfig = MapProps;
78
+ interface MapExpose {
79
+ fitToMarkers(options?: MapFitOptions): boolean;
80
+ getMap(): MapInstance | null;
81
+ refresh(): void;
82
+ }
83
+ //#endregion
84
+ //#region src/components/C_Map/index.vue.d.ts
85
+ declare const __VLS_export: vue.DefineComponent<MapProps, MapExpose, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
86
+ error: (error: Error) => any;
87
+ ready: (map: MapInstance) => any;
88
+ markerClick: (marker: MapMarker, event: MapMarkerEvent) => any;
89
+ }, string, vue.PublicProps, Readonly<MapProps> & Readonly<{
90
+ onError?: ((error: Error) => any) | undefined;
91
+ onReady?: ((map: MapInstance) => any) | undefined;
92
+ onMarkerClick?: ((marker: MapMarker, event: MapMarkerEvent) => any) | undefined;
93
+ }>, {
94
+ height: string;
95
+ zoom: number;
96
+ center: MapCoordinate;
97
+ mapType: MapType;
98
+ ariaLabel: string;
99
+ markers: MapMarker[];
100
+ amapKey: string;
101
+ amapLoadTimeout: number;
102
+ amapOptions: Record<string, unknown>;
103
+ tileConfig: MapTileConfig;
104
+ zoomControl: boolean;
105
+ preferCanvas: boolean;
106
+ fitMarkersOnInit: boolean;
107
+ }, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
108
+ declare const _default: typeof __VLS_export;
109
+ //#endregion
110
+ //#region src/components/C_Map/data.d.ts
111
+ declare const MAP_TYPES: readonly [{
112
+ readonly label: "OpenStreetMap";
113
+ readonly value: "osm";
114
+ }, {
115
+ readonly label: "高德地图";
116
+ readonly value: "amap";
117
+ }];
118
+ declare const DEFAULT_MAP_CONFIG: Required<Pick<MapConfig, 'height' | 'center' | 'zoom' | 'mapType'>>;
119
+ declare const OSM_TILE_CONFIG: {
120
+ readonly url: "https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png";
121
+ readonly attribution: "© OpenStreetMap contributors";
122
+ readonly maxZoom: 19;
123
+ readonly minZoom: 1;
124
+ readonly tileSize: 256;
125
+ readonly detectRetina: true;
126
+ };
127
+ //#endregion
128
+ //#region src/components/C_Map/mapUtils.d.ts
129
+ interface ResolvedTileConfig {
130
+ options: TileLayerOptions;
131
+ url: string;
132
+ }
133
+ /** 判断纬度、经度是否处于合法范围。 */
134
+ declare function isValidMapCoordinate(coordinate: MapCoordinate | readonly number[] | null | undefined): coordinate is MapCoordinate;
135
+ /** 将统一的 [纬度, 经度] 转为高德地图要求的 [经度, 纬度]。 */
136
+ declare function toAMapPosition(coordinate: MapCoordinate): AMapPosition;
137
+ /** 过滤非法标记,防止地图 SDK 因异常坐标中断整个渲染。 */
138
+ declare function getValidMapMarkers(markers: readonly MapMarker[]): MapMarker[];
139
+ /** 将缩放值限制在当前瓦片图层允许的范围内。 */
140
+ declare function normalizeMapZoom(zoom: number, minZoom?: 1, maxZoom?: 19): number;
141
+ /** 合并默认瓦片配置,并将 URL 与 Leaflet options 分离。 */
142
+ declare function resolveTileConfig(config?: MapTileConfig): ResolvedTileConfig;
143
+ //#endregion
144
+ export { MapTileConfig as C, MapProps as S, MapExpose as _, toAMapPosition as a, MapMarker as b, OSM_TILE_CONFIG as c, AMapMapInstance as d, AMapMarkerEvent as f, MapCoordinate as g, MapConfig as h, resolveTileConfig as i, _default as l, AMapSecurityConfig as m, isValidMapCoordinate as n, DEFAULT_MAP_CONFIG as o, AMapPosition as p, normalizeMapZoom as r, MAP_TYPES as s, getValidMapMarkers as t, AMapApi as u, MapFitOptions as v, MapType as w, MapMarkerEvent as x, MapInstance as y };
@@ -0,0 +1,144 @@
1
+ import * as vue from "vue";
2
+ import { LeafletMouseEvent, Map, TileLayerOptions } from "leaflet";
3
+
4
+ //#region src/components/C_Map/types.d.ts
5
+ type MapType = 'osm' | 'amap';
6
+ type MapCoordinate = [latitude: number, longitude: number];
7
+ type AMapPosition = [longitude: number, latitude: number];
8
+ /** 高德 JS API 安全配置;生产环境优先使用服务端代理。 */
9
+ type AMapSecurityConfig = {
10
+ serviceHost: string;
11
+ securityJsCode?: never;
12
+ } | {
13
+ securityJsCode: string;
14
+ serviceHost?: never;
15
+ };
16
+ interface MapMarker {
17
+ id?: string | number;
18
+ lat: number;
19
+ lng: number;
20
+ popup?: string;
21
+ title?: string;
22
+ }
23
+ interface MapTileConfig extends TileLayerOptions {
24
+ url?: string;
25
+ }
26
+ interface MapFitOptions {
27
+ maxZoom?: number;
28
+ padding?: [horizontal: number, vertical: number];
29
+ }
30
+ interface AMapMarkerEvent {
31
+ lnglat?: unknown;
32
+ originalEvent?: Event;
33
+ target?: unknown;
34
+ [key: string]: unknown;
35
+ }
36
+ interface AMapMarkerInstance {
37
+ getPosition(): unknown;
38
+ on(event: 'click', handler: (event: AMapMarkerEvent) => void): void;
39
+ setMap(map: AMapMapInstance | null): void;
40
+ }
41
+ interface AMapInfoWindowInstance {
42
+ close?(): void;
43
+ open(map: AMapMapInstance, position: unknown): void;
44
+ }
45
+ interface AMapMapInstance {
46
+ destroy(): void;
47
+ resize?(): void;
48
+ setCenter(center: AMapPosition): void;
49
+ setFitView?(overlays?: AMapMarkerInstance[], immediately?: boolean, avoid?: [number, number, number, number], maxZoom?: number): void;
50
+ setZoom(zoom: number): void;
51
+ }
52
+ interface AMapApi {
53
+ Map: new (container: HTMLElement, options: Record<string, unknown>) => AMapMapInstance;
54
+ Marker: new (options: Record<string, unknown>) => AMapMarkerInstance;
55
+ InfoWindow: new (options: Record<string, unknown>) => AMapInfoWindowInstance;
56
+ Pixel: new (x: number, y: number) => unknown;
57
+ }
58
+ type MapInstance = Map | AMapMapInstance;
59
+ type MapMarkerEvent = LeafletMouseEvent | AMapMarkerEvent | null;
60
+ interface MapProps {
61
+ /** 地图区域的无障碍名称。 */
62
+ ariaLabel?: string;
63
+ height?: string;
64
+ center?: MapCoordinate;
65
+ zoom?: number;
66
+ markers?: MapMarker[];
67
+ mapType?: MapType;
68
+ amapKey?: string;
69
+ amapSecurityConfig?: AMapSecurityConfig;
70
+ amapLoadTimeout?: number;
71
+ amapOptions?: Record<string, unknown>;
72
+ tileConfig?: MapTileConfig;
73
+ zoomControl?: boolean;
74
+ preferCanvas?: boolean;
75
+ fitMarkersOnInit?: boolean;
76
+ }
77
+ type MapConfig = MapProps;
78
+ interface MapExpose {
79
+ fitToMarkers(options?: MapFitOptions): boolean;
80
+ getMap(): MapInstance | null;
81
+ refresh(): void;
82
+ }
83
+ //#endregion
84
+ //#region src/components/C_Map/index.vue.d.ts
85
+ declare const __VLS_export: vue.DefineComponent<MapProps, MapExpose, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
86
+ error: (error: Error) => any;
87
+ ready: (map: MapInstance) => any;
88
+ markerClick: (marker: MapMarker, event: MapMarkerEvent) => any;
89
+ }, string, vue.PublicProps, Readonly<MapProps> & Readonly<{
90
+ onError?: ((error: Error) => any) | undefined;
91
+ onReady?: ((map: MapInstance) => any) | undefined;
92
+ onMarkerClick?: ((marker: MapMarker, event: MapMarkerEvent) => any) | undefined;
93
+ }>, {
94
+ height: string;
95
+ zoom: number;
96
+ center: MapCoordinate;
97
+ mapType: MapType;
98
+ ariaLabel: string;
99
+ markers: MapMarker[];
100
+ amapKey: string;
101
+ amapLoadTimeout: number;
102
+ amapOptions: Record<string, unknown>;
103
+ tileConfig: MapTileConfig;
104
+ zoomControl: boolean;
105
+ preferCanvas: boolean;
106
+ fitMarkersOnInit: boolean;
107
+ }, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
108
+ declare const _default: typeof __VLS_export;
109
+ //#endregion
110
+ //#region src/components/C_Map/data.d.ts
111
+ declare const MAP_TYPES: readonly [{
112
+ readonly label: "OpenStreetMap";
113
+ readonly value: "osm";
114
+ }, {
115
+ readonly label: "高德地图";
116
+ readonly value: "amap";
117
+ }];
118
+ declare const DEFAULT_MAP_CONFIG: Required<Pick<MapConfig, 'height' | 'center' | 'zoom' | 'mapType'>>;
119
+ declare const OSM_TILE_CONFIG: {
120
+ readonly url: "https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png";
121
+ readonly attribution: "© OpenStreetMap contributors";
122
+ readonly maxZoom: 19;
123
+ readonly minZoom: 1;
124
+ readonly tileSize: 256;
125
+ readonly detectRetina: true;
126
+ };
127
+ //#endregion
128
+ //#region src/components/C_Map/mapUtils.d.ts
129
+ interface ResolvedTileConfig {
130
+ options: TileLayerOptions;
131
+ url: string;
132
+ }
133
+ /** 判断纬度、经度是否处于合法范围。 */
134
+ declare function isValidMapCoordinate(coordinate: MapCoordinate | readonly number[] | null | undefined): coordinate is MapCoordinate;
135
+ /** 将统一的 [纬度, 经度] 转为高德地图要求的 [经度, 纬度]。 */
136
+ declare function toAMapPosition(coordinate: MapCoordinate): AMapPosition;
137
+ /** 过滤非法标记,防止地图 SDK 因异常坐标中断整个渲染。 */
138
+ declare function getValidMapMarkers(markers: readonly MapMarker[]): MapMarker[];
139
+ /** 将缩放值限制在当前瓦片图层允许的范围内。 */
140
+ declare function normalizeMapZoom(zoom: number, minZoom?: 1, maxZoom?: 19): number;
141
+ /** 合并默认瓦片配置,并将 URL 与 Leaflet options 分离。 */
142
+ declare function resolveTileConfig(config?: MapTileConfig): ResolvedTileConfig;
143
+ //#endregion
144
+ export { MapTileConfig as C, MapProps as S, MapExpose as _, toAMapPosition as a, MapMarker as b, OSM_TILE_CONFIG as c, AMapMapInstance as d, AMapMarkerEvent as f, MapCoordinate as g, MapConfig as h, resolveTileConfig as i, _default as l, AMapSecurityConfig as m, isValidMapCoordinate as n, DEFAULT_MAP_CONFIG as o, AMapPosition as p, normalizeMapZoom as r, MAP_TYPES as s, getValidMapMarkers as t, AMapApi as u, MapFitOptions as v, MapType as w, MapMarkerEvent as x, MapInstance as y };
package/dist/style.css CHANGED
@@ -8105,21 +8105,21 @@ to {
8105
8105
 
8106
8106
 
8107
8107
  /* --- C_Map --- */
8108
- /* unplugin-vue-components disabled */.c-map[data-v-09a5ef45] {
8108
+ /* unplugin-vue-components disabled */.c-map[data-v-536a68a9] {
8109
8109
  position: relative;
8110
8110
  width: 100%;
8111
8111
  min-height: 300px;
8112
- background: #f5f5f5;
8113
- border-radius: 4px;
8112
+ background: var(--c-bg-surface, #fff);
8113
+ border-radius: var(--c-radius-sm, 4px);
8114
8114
  overflow: hidden;
8115
8115
  }
8116
- .c-map .map-container[data-v-09a5ef45] {
8116
+ .c-map .map-container[data-v-536a68a9] {
8117
8117
  width: 100%;
8118
8118
  height: 100%;
8119
- border-radius: 4px;
8119
+ border-radius: inherit;
8120
8120
  overflow: hidden;
8121
8121
  }
8122
- .c-map .map-loading[data-v-09a5ef45] {
8122
+ .c-map .map-loading[data-v-536a68a9] {
8123
8123
  position: absolute;
8124
8124
  top: 0;
8125
8125
  left: 0;
@@ -8128,8 +8128,8 @@ to {
8128
8128
  display: flex;
8129
8129
  align-items: center;
8130
8130
  justify-content: center;
8131
- background: rgba(255, 255, 255, 0.9);
8132
- border-radius: 4px;
8131
+ background: color-mix(in srgb, var(--c-bg-surface, #fff) 90%, transparent);
8132
+ border-radius: inherit;
8133
8133
  z-index: 1000;
8134
8134
  }
8135
8135
 
@@ -66,9 +66,9 @@ declare const __VLS_export: vue.DefineComponent<CalendarProps, CalendarExpose, {
66
66
  }) => any) | undefined;
67
67
  "onEvent-dropped"?: ((event: Partial<CalendarEvent>) => any) | undefined;
68
68
  }>, {
69
- editable: boolean;
70
- initialView: CalendarViewType;
71
69
  events: CalendarEvent[];
70
+ initialView: CalendarViewType;
71
+ editable: boolean;
72
72
  showAddDialog: boolean;
73
73
  showEditDialog: boolean;
74
74
  }, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
@@ -66,9 +66,9 @@ declare const __VLS_export: vue.DefineComponent<CalendarProps, CalendarExpose, {
66
66
  }) => any) | undefined;
67
67
  "onEvent-dropped"?: ((event: Partial<CalendarEvent>) => any) | undefined;
68
68
  }>, {
69
- editable: boolean;
70
- initialView: CalendarViewType;
71
69
  events: CalendarEvent[];
70
+ initialView: CalendarViewType;
71
+ editable: boolean;
72
72
  showAddDialog: boolean;
73
73
  showEditDialog: boolean;
74
74
  }, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
@@ -71,14 +71,14 @@ declare var __VLS_7: `header-${string}`, __VLS_8: {
71
71
  type __VLS_Slots = {} & { [K in NonNullable<typeof __VLS_7>]?: (props: typeof __VLS_8) => any } & { [K in NonNullable<typeof __VLS_16>]?: (props: typeof __VLS_17) => any } & { [K in NonNullable<typeof __VLS_31>]?: (props: typeof __VLS_32) => any };
72
72
  declare const __VLS_base: vue.DefineComponent<Props, CollapsePanelExpose, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
73
73
  change: (activeKeys: string[]) => any;
74
+ "update:activeKeys": (keys: string[]) => any;
74
75
  expand: (key: string) => any;
75
76
  collapse: (key: string) => any;
76
- "update:activeKeys": (keys: string[]) => any;
77
77
  }, string, vue.PublicProps, Readonly<Props> & Readonly<{
78
78
  onChange?: ((activeKeys: string[]) => any) | undefined;
79
+ "onUpdate:activeKeys"?: ((keys: string[]) => any) | undefined;
79
80
  onExpand?: ((key: string) => any) | undefined;
80
81
  onCollapse?: ((key: string) => any) | undefined;
81
- "onUpdate:activeKeys"?: ((keys: string[]) => any) | undefined;
82
82
  }>, {
83
83
  bordered: boolean;
84
84
  persistKey: string;
@@ -71,14 +71,14 @@ declare var __VLS_7: `header-${string}`, __VLS_8: {
71
71
  type __VLS_Slots = {} & { [K in NonNullable<typeof __VLS_7>]?: (props: typeof __VLS_8) => any } & { [K in NonNullable<typeof __VLS_16>]?: (props: typeof __VLS_17) => any } & { [K in NonNullable<typeof __VLS_31>]?: (props: typeof __VLS_32) => any };
72
72
  declare const __VLS_base: vue.DefineComponent<Props, CollapsePanelExpose, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
73
73
  change: (activeKeys: string[]) => any;
74
+ "update:activeKeys": (keys: string[]) => any;
74
75
  expand: (key: string) => any;
75
76
  collapse: (key: string) => any;
76
- "update:activeKeys": (keys: string[]) => any;
77
77
  }, string, vue.PublicProps, Readonly<Props> & Readonly<{
78
78
  onChange?: ((activeKeys: string[]) => any) | undefined;
79
+ "onUpdate:activeKeys"?: ((keys: string[]) => any) | undefined;
79
80
  onExpand?: ((key: string) => any) | undefined;
80
81
  onCollapse?: ((key: string) => any) | undefined;
81
- "onUpdate:activeKeys"?: ((keys: string[]) => any) | undefined;
82
82
  }>, {
83
83
  bordered: boolean;
84
84
  persistKey: string;
@@ -51,30 +51,30 @@ interface ImageCropperEmits {
51
51
  //#endregion
52
52
  //#region src/components/C_ImageCropper/index.vue.d.ts
53
53
  declare const __VLS_export: vue.DefineComponent<ImageCropperProps, ImageCropperExpose, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
54
+ cancel: () => any;
54
55
  error: (error: Event) => any;
56
+ crop: (result: any) => any;
55
57
  ready: () => any;
56
- cancel: () => any;
57
58
  confirm: (result: any) => any;
58
- crop: (result: any) => any;
59
59
  }, string, vue.PublicProps, Readonly<ImageCropperProps> & Readonly<{
60
+ onCancel?: (() => any) | undefined;
60
61
  onError?: ((error: Event) => any) | undefined;
62
+ onCrop?: ((result: any) => any) | undefined;
61
63
  onReady?: (() => any) | undefined;
62
- onCancel?: (() => any) | undefined;
63
64
  onConfirm?: ((result: any) => any) | undefined;
64
- onCrop?: ((result: any) => any) | undefined;
65
65
  }>, {
66
66
  disabled: boolean;
67
67
  height: string | number;
68
68
  showToolbar: boolean;
69
- showPreview: boolean;
70
- modal: boolean;
71
69
  src: string;
72
70
  aspectRatio: number;
73
71
  outputFormat: CropOutputFormat;
74
72
  outputQuality: number;
75
73
  maxOutputWidth: number;
76
74
  maxOutputHeight: number;
75
+ showPreview: boolean;
77
76
  circular: boolean;
77
+ modal: boolean;
78
78
  modalTitle: string;
79
79
  }, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
80
80
  declare const _default: typeof __VLS_export;
@@ -51,30 +51,30 @@ interface ImageCropperEmits {
51
51
  //#endregion
52
52
  //#region src/components/C_ImageCropper/index.vue.d.ts
53
53
  declare const __VLS_export: vue.DefineComponent<ImageCropperProps, ImageCropperExpose, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
54
+ cancel: () => any;
54
55
  error: (error: Event) => any;
56
+ crop: (result: any) => any;
55
57
  ready: () => any;
56
- cancel: () => any;
57
58
  confirm: (result: any) => any;
58
- crop: (result: any) => any;
59
59
  }, string, vue.PublicProps, Readonly<ImageCropperProps> & Readonly<{
60
+ onCancel?: (() => any) | undefined;
60
61
  onError?: ((error: Event) => any) | undefined;
62
+ onCrop?: ((result: any) => any) | undefined;
61
63
  onReady?: (() => any) | undefined;
62
- onCancel?: (() => any) | undefined;
63
64
  onConfirm?: ((result: any) => any) | undefined;
64
- onCrop?: ((result: any) => any) | undefined;
65
65
  }>, {
66
66
  disabled: boolean;
67
67
  height: string | number;
68
68
  showToolbar: boolean;
69
- showPreview: boolean;
70
- modal: boolean;
71
69
  src: string;
72
70
  aspectRatio: number;
73
71
  outputFormat: CropOutputFormat;
74
72
  outputQuality: number;
75
73
  maxOutputWidth: number;
76
74
  maxOutputHeight: number;
75
+ showPreview: boolean;
77
76
  circular: boolean;
77
+ modal: boolean;
78
78
  modalTitle: string;
79
79
  }, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
80
80
  declare const _default: typeof __VLS_export;
@@ -118,10 +118,13 @@ declare const __VLS_base: vue.DefineComponent<DraggableProps, {
118
118
  }>, {
119
119
  sort: boolean;
120
120
  modelValue: DraggableItem[];
121
+ layout: LayoutMode;
121
122
  disabled: boolean;
122
- group: string | GroupOptions;
123
- animation: number;
124
123
  delay: number;
124
+ direction: "vertical" | "horizontal";
125
+ animation: number;
126
+ gap: string | number;
127
+ group: string | GroupOptions;
125
128
  handle: string;
126
129
  showHandle: boolean;
127
130
  ghostClass: string;
@@ -134,11 +137,8 @@ declare const __VLS_base: vue.DefineComponent<DraggableProps, {
134
137
  emptyText: string;
135
138
  swapThreshold: number;
136
139
  invertSwap: boolean;
137
- direction: "vertical" | "horizontal";
138
- layout: LayoutMode;
139
140
  gridColumns: number;
140
141
  gridRows: number;
141
- gap: string | number;
142
142
  flexWrap: boolean;
143
143
  justifyContent: JustifyContent;
144
144
  alignItems: AlignItems;
@@ -118,10 +118,13 @@ declare const __VLS_base: vue.DefineComponent<DraggableProps, {
118
118
  }>, {
119
119
  sort: boolean;
120
120
  modelValue: DraggableItem[];
121
+ layout: LayoutMode;
121
122
  disabled: boolean;
122
- group: string | GroupOptions;
123
- animation: number;
124
123
  delay: number;
124
+ direction: "vertical" | "horizontal";
125
+ animation: number;
126
+ gap: string | number;
127
+ group: string | GroupOptions;
125
128
  handle: string;
126
129
  showHandle: boolean;
127
130
  ghostClass: string;
@@ -134,11 +137,8 @@ declare const __VLS_base: vue.DefineComponent<DraggableProps, {
134
137
  emptyText: string;
135
138
  swapThreshold: number;
136
139
  invertSwap: boolean;
137
- direction: "vertical" | "horizontal";
138
- layout: LayoutMode;
139
140
  gridColumns: number;
140
141
  gridRows: number;
141
- gap: string | number;
142
142
  flexWrap: boolean;
143
143
  justifyContent: JustifyContent;
144
144
  alignItems: AlignItems;