{"_id":"@composy/address-book-vue","name":"@composy/address-book-vue","dist-tags":{"latest":"0.0.1"},"versions":{"0.0.1":{"name":"@composy/address-book-vue","version":"0.0.1","description":"Vue 3 components, composables, and plugin wrappers for @composy/address-book-core.","keywords":["address-book","vue","vue3","component"],"author":{"name":"LDesign Team"},"license":"MIT","type":"module","sideEffects":["*.vue","*.tsx","*.jsx","dist/*","es/**/style/**","esm/**/style/**"],"exports":{".":{"types":"./es/index.d.ts","import":"./es/index.js","require":"./lib/index.cjs","default":"./es/index.js"},"./components":{"types":"./es/components/index.d.ts","import":"./es/components/index.js","require":"./lib/components/index.cjs","default":"./es/components/index.js"},"./components/*":{"types":"./es/components/*.d.ts","import":"./es/components/*.js","require":"./lib/components/*.cjs","default":"./es/components/*.js"},"./composables":{"types":"./es/composables/index.d.ts","import":"./es/composables/index.js","require":"./lib/composables/index.cjs","default":"./es/composables/index.js"},"./composables/*":{"types":"./es/composables/*.d.ts","import":"./es/composables/*.js","require":"./lib/composables/*.cjs","default":"./es/composables/*.js"},"./plugins":{"types":"./es/plugins/index.d.ts","import":"./es/plugins/index.js","require":"./lib/plugins/index.cjs","default":"./es/plugins/index.js"},"./plugins/*":{"types":"./es/plugins/*.d.ts","import":"./es/plugins/*.js","require":"./lib/plugins/*.cjs","default":"./es/plugins/*.js"},"./index.css":"./dist/index.css","./index.min.css":"./dist/index.min.css","./style/index.css":"./lib/style/index.css","./style/index.less":"./es/style/index.less","./package.json":"./package.json"},"main":"./lib/index.cjs","module":"./es/index.js","types":"./es/index.d.ts","unpkg":"./dist/index.min.js","jsdelivr":"./dist/index.min.js","scripts":{"build":"ldesign-builder build","dev":"vite build --watch","lint":"eslint . --cache","lint:check":"eslint . --cache --max-warnings 0","lint:fix":"eslint . --cache --fix","test":"ltesting run:unit","test:coverage":"ltesting run:unit --coverage","test:watch":"ltesting run:unit --watch","typecheck":"vue-tsc --noEmit -p tsconfig.typecheck.json --pretty false","test:run":"ltesting run:unit","test:changed":"ltesting run:unit --changed","test:failed":"ltesting run:unit --failed","test:ui":"ltesting dashboard"},"dependencies":{"@composy/address-book-core":"^0.0.1"},"peerDependencies":{"vue":"^3.5.32"},"devDependencies":{"@antfu/eslint-config":"9.1.0","@composy/builder":"^0.0.1","@composy/testing":"^0.0.1","@vue/test-utils":"^2.4.11","eslint":"10.7.0","fast-check":"^4.9.0","jsdom":"29.1.1","typescript":"5.9.3","vite":"^8.1.4","vue":"3.5.39","vue-tsc":"^3.3.7"},"publishConfig":{"registry":"http://npm.longrise.cn:6286/"},"typings":"./es/index.d.ts","browser":"./dist/index.js","_id":"@composy/address-book-vue@0.0.1","_nodeVersion":"23.11.1","_npmVersion":"10.9.2","dist":{"integrity":"sha512-0/r/hakGp4yGBIrd4yp4zyTTQm2u3bjgDoxawq4VlRRxoepnAJVQpyvyMAi1CMu3PCO5shuWF6z8qn5U2gwFiw==","shasum":"bf247f15e462f02da7471872b7e775f7b61a2129","tarball":"https://registry.npmjs.org/@composy/address-book-vue/-/address-book-vue-0.0.1.tgz","fileCount":72,"unpackedSize":240597,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQD0MD66zslW1uzMQM9wOwFRLWtEqm+ZpiP7eMfekmUQrQIhAOFpdrHKAnzfTLZx4op2PS1OgzUUEmGxO40mP/LEyVbI"}]},"_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/address-book-vue_0.0.1_1786948963532_0.8687974576350705"},"_hasShrinkwrap":false}},"time":{"created":"2026-08-17T06:42:43.358Z","0.0.1":"2026-08-17T06:42:43.683Z","modified":"2026-08-17T06:42:43.934Z"},"maintainers":[{"name":"swimly","email":"979741120@qq.com"}],"description":"Vue 3 components, composables, and plugin wrappers for @composy/address-book-core.","keywords":["address-book","vue","vue3","component"],"author":{"name":"LDesign Team"},"license":"MIT","readme":"# @composy/address-book-vue\n\nVue 3 adapter for `@composy/address-book-core`. It provides typed components, composables, and a plugin while keeping all directory logic in the framework-agnostic core package.\n\n## Install\n\n```bash\npnpm add @composy/address-book-core @composy/address-book-vue vue\n```\n\n## Components\n\n```vue\n<script setup lang=\"ts\">\nimport { AddressBook, PeoplePicker } from '@composy/address-book-vue'\n\nconst departments = []\nconst persons = []\n</script>\n\n<template>\n  <AddressBook\n    :departments=\"departments\"\n    :persons=\"persons\"\n    enable-multi-select\n    show-alphabet-index\n    @selection-change=\"selected => console.log(selected)\"\n    @department-select=\"department => console.log(department)\"\n  />\n\n  <PeoplePicker\n    :departments=\"departments\"\n    :persons=\"persons\"\n    mode=\"multiple\"\n    :max=\"20\"\n    @confirm=\"selected => console.log(selected)\"\n  />\n</template>\n```\n\nComponent instance methods exposed by `AddressBook` include `search`, `clearSearch`, `selectDepartment`, `selectGroup`, `selectVisiblePersons`, `getSelectedPersons`, `setSelectedPersons`, `clearSelection`, `exportData`, `print`, `setTheme`, `setLocale`, and data mutation helpers.\n\nComponent instance methods exposed by `PeoplePicker` include `getSelected`, `setSelected`, `clearSelection`, `selectDepartment`, `removeSelected`, `setDepartments`, `setPersons`, `setTheme`, and `setLocale`.\n\n## Composables\n\n```ts\nimport { useAddressBook, usePeoplePicker } from '@composy/address-book-vue'\n\nconst addressBook = useAddressBook()\nconst picker = usePeoplePicker()\n\naddressBook.create(container, {\n  departments,\n  persons,\n  enableHistory: true,\n})\n\naddressBook.search('alice')\naddressBook.selectVisiblePersons()\npicker.setSelected(['u1'])\n```\n\n## Plugin\n\n```ts\nimport { createApp } from 'vue'\nimport { createAddressBookPlugin } from '@composy/address-book-vue'\n\ncreateApp(App)\n  .use(createAddressBookPlugin({\n    addressBookName: 'LdesignAddressBook',\n    peoplePickerName: 'LdesignPeoplePicker',\n  }))\n  .mount('#app')\n```\n\n## Styling\n\nThe Vue host element uses `ldesign-address-book-vue-host`. Core component classes use `ldesign-address-book-*`.\n\nThe adapter relies on the core package style system, which maps component variables to LDesign color and size CSS variables:\n\n- Color source: `packages/color`, for example `--ld-primary-default`, `--ld-bg-surface`, `--ld-text-primary`.\n- Size source: `packages/size`, for example `--ld-spacing-md`, `--ld-font-sm`, `--ld-radius-lg`.\n\n## Build Outputs\n\n`ldesign-builder build` emits:\n\n- `dist/`\n- `es/`\n- `esm/`\n- `lib/`\n\n## Development\n\n```bash\npnpm run typecheck\npnpm run build\n```\n\n## License\n\nMIT\n","readmeFilename":"README.md","_rev":"1-1a7e9858d6d43a3850824157c10b3440"}