first commit

This commit is contained in:
douboer
2026-01-21 13:22:26 +08:00
commit 24452838a1
28 changed files with 7901 additions and 0 deletions

36
src/index.ts Normal file
View File

@@ -0,0 +1,36 @@
/**
* 罗盘组件库入口文件
*/
// 类型导出
export type {
Example,
Sector,
PolarPoint,
AnnularSectorParams,
CentroidResult,
} from './types';
// 组件导出
export { default as Luopan } from './Luopan.vue';
// 工具函数导出
export {
polarToXY,
normalizeDeg,
annularSectorCentroid,
annularSectorPath,
annularSectorInsetPath,
calculateLabelRotation,
generateSectorColor,
generateTextPath,
generateVerticalTextPath,
getTextColorForBackground,
} from './utils';
// Composables 导出
export { useLuopan } from './composables/useLuopan';
export type { UseLuopanReturn } from './composables/useLuopan';
// 常量导出
export { EXAMPLES, DEFAULT_SIZE, SECTOR_INSET_DISTANCE } from './constants';