{"_id":"@composy/room-designer-core","name":"@composy/room-designer-core","dist-tags":{"latest":"0.0.1"},"versions":{"0.0.1":{"name":"@composy/room-designer-core","version":"0.0.1","description":"会议室/空间布局编辑器核心模块 - 平面图绘制与座位管理","keywords":["room-designer","floor-plan","seat-map","meeting-room","ldesign","typescript"],"author":{"name":"LDesign Team"},"license":"MIT","type":"module","sideEffects":false,"main":"./lib/index.cjs","module":"./es/index.js","types":"./es/index.d.ts","typings":"./es/index.d.ts","browser":"./dist/index.js","unpkg":"./dist/index.min.js","jsdelivr":"./dist/index.min.js","exports":{".":{"types":"./es/index.d.ts","import":"./es/index.js","require":"./lib/index.cjs","default":"./es/index.js"},"./core/*":{"types":"./es/core/*.d.ts","import":"./es/core/*.js","require":"./lib/core/*.cjs","default":"./es/core/*.js"},"./renderer/*":{"types":"./es/renderer/*.d.ts","import":"./es/renderer/*.js","require":"./lib/renderer/*.cjs","default":"./es/renderer/*.js"},"./shapes":{"types":"./es/shapes/index.d.ts","import":"./es/shapes/index.js","require":"./lib/shapes/index.cjs","default":"./es/shapes/index.js"},"./shapes/*":{"types":"./es/shapes/*.d.ts","import":"./es/shapes/*.js","require":"./lib/shapes/*.cjs","default":"./es/shapes/*.js"},"./templates":{"types":"./es/templates/index.d.ts","import":"./es/templates/index.js","require":"./lib/templates/index.cjs","default":"./es/templates/index.js"},"./templates/*":{"types":"./es/templates/*.d.ts","import":"./es/templates/*.js","require":"./lib/templates/*.cjs","default":"./es/templates/*.js"},"./theme/*":{"types":"./es/theme/*.d.ts","import":"./es/theme/*.js","require":"./lib/theme/*.cjs","default":"./es/theme/*.js"},"./tools/*":{"types":"./es/tools/*.d.ts","import":"./es/tools/*.js","require":"./lib/tools/*.cjs","default":"./es/tools/*.js"},"./types":{"types":"./es/types/index.d.ts","import":"./es/types/index.js","require":"./lib/types/index.cjs","default":"./es/types/index.js"},"./types/*":{"types":"./es/types/*.d.ts","import":"./es/types/*.js","require":"./lib/types/*.cjs","default":"./es/types/*.js"},"./package.json":"./package.json"},"scripts":{"build":"ldesign-builder build","lint":"eslint . --cache","lint:check":"eslint . --cache --max-warnings 0","lint:fix":"eslint . --cache --fix","type-check":"tsc --noEmit","test":"ltesting run:unit","test:run":"ltesting run:unit","test:watch":"ltesting run:unit --watch","test:coverage":"ltesting run:unit --coverage","test:changed":"ltesting run:unit --changed","test:failed":"ltesting run:unit --failed","test:ui":"ltesting dashboard"},"devDependencies":{"@antfu/eslint-config":"9.1.0","@composy/builder":"^0.0.1","@composy/testing":"^0.0.1","eslint":"10.7.0","typescript":"5.9.3"},"publishConfig":{"registry":"http://npm.longrise.cn:6286/"},"_id":"@composy/room-designer-core@0.0.1","_nodeVersion":"23.11.1","_npmVersion":"10.9.2","dist":{"integrity":"sha512-7NuPWqd0+eKTpr2BL5diaKv5JhzP9I8c5ynQUdxJJ2XVXOW75yYzBsDlgMe5vinAxMPNit29+7ebZla2V3lwKw==","shasum":"c16e836f3aad088e45fd87bfd35306473650369b","tarball":"https://registry.npmjs.org/@composy/room-designer-core/-/room-designer-core-0.0.1.tgz","fileCount":187,"unpackedSize":1460853,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIBNN7KIFlOkUO/TGD3faZk6mtMnR6sd5WqewRsk32QQ3AiEAnwhkNmTbMqnT7f8aMdABEGiB850Im2bMird3XKhSlg0="}]},"_npmUser":{"name":"swimly","email":"979741120@qq.com"},"directories":{},"maintainers":[{"name":"swimly","email":"979741120@qq.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/room-designer-core_0.0.1_1786948588655_0.5942413392223118"},"_hasShrinkwrap":false}},"time":{"created":"2026-08-17T06:36:28.505Z","0.0.1":"2026-08-17T06:36:28.803Z","modified":"2026-08-17T06:36:29.005Z"},"maintainers":[{"name":"swimly","email":"979741120@qq.com"}],"description":"会议室/空间布局编辑器核心模块 - 平面图绘制与座位管理","keywords":["room-designer","floor-plan","seat-map","meeting-room","ldesign","typescript"],"author":{"name":"LDesign Team"},"license":"MIT","readme":"# @composy/room-designer-core\n\n会议室/空间布局编辑器核心库 - 框架无关的纯 TypeScript 实现\n\n## 安装\n\n```bash\npnpm add @composy/room-designer-core\n```\n\n## 快速开始\n\n```typescript\nimport { createRoomDesigner } from '@composy/room-designer-core'\n\nconst designer = createRoomDesigner({\n  container: '#designer',\n  width: 800,\n  height: 600,\n})\n\n// 添加房间\ndesigner.addRoom({\n  name: '会议室A',\n  x: 100, y: 100,\n  width: 600, height: 400,\n  capacity: 20,\n})\n\n// 添加座位\ndesigner.addSeat({ name: '1', x: 150, y: 150, status: 'free' })\n\n// 监听变化\ndesigner.on('change', (floor) => console.log(floor))\n```\n\n## 主要功能\n\n- 平面图绘制（房间、座位、设备、区域、家具）\n- 拖拽交互（移动、缩放、平移）\n- 撤销/重做（Ctrl+Z/Y）\n- 键盘快捷键（Delete 删除、方向键微调）\n- PNG/SVG 导出\n- 小地图导航\n- 右键菜单\n- 模板系统（6 种预设）\n- 亮色/暗色主题\n- 网格吸附与对齐辅助线\n\n## 子路径导入\n\n```typescript\n// 核心模块\nimport { createRoomDesigner } from '@composy/room-designer-core'\n\n// 形状工厂\nimport { createRoom, createSeat } from '@composy/room-designer-core/shapes'\n\n// 模板\nimport { getTemplate, allTemplateTypes } from '@composy/room-designer-core/templates'\n\n// 主题\nimport { ThemeManager, lightTokens, darkTokens } from '@composy/room-designer-core/theme/*'\n\n// 工具\nimport { snapToGrid, drawGrid } from '@composy/room-designer-core/tools/*'\n\n// 类型\nimport type { Floor, Room, Seat } from '@composy/room-designer-core/types'\n```\n\n## 产物结构\n\n```\nes/       # ESM 格式，保留模块结构\nesm/      # ESM 格式，保留源文件结构\nlib/      # CJS 格式，.cjs 后缀\ndist/     # UMD 格式，单文件打包\n```\n\n## CSS 变量\n\n本库引用 `@composy/color-core` 和 `@composy/size-core` 的 CSS 变量，所有变量均提供 fallback 值。\n\n## 许可证\n\nMIT License\n","readmeFilename":"README.md","_rev":"1-d8a428d334971e85eab32201a0d3ea2c"}