{"_id":"@composy/bookmark-vue","name":"@composy/bookmark-vue","dist-tags":{"latest":"0.0.1"},"versions":{"0.0.1":{"name":"@composy/bookmark-vue","version":"0.0.1","description":"LDesign 书签系统 - Vue 3 适配层","keywords":["bookmark","favorites","navigation","vue","vue3","composable","ldesign","typescript"],"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"},"./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"},"./index.css":"./dist/index.css","./index.min.css":"./dist/index.min.css","./style/index.css":"./es/style/index.css","./styles/index.css":"./es/styles/index.css","./style/index.less":"./esm/style/index.less","./styles/index.less":"./esm/styles/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","clean":"rimraf dist es esm cjs lib","dev":"ldesign-builder build --watch","lint":"eslint . --fix","lint:check":"eslint . --max-warnings 0","lint:fix":"eslint . --fix","postbuild":"node --experimental-strip-types ../../../../scripts/index.ts clean:packages-source-declarations --cwd .. --target packages/vue","type-check":"vue-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"},"dependencies":{"@composy/bookmark-core":"^0.0.1","lucide-vue-next":"^1.0.0"},"peerDependencies":{"vue":"^3.5.32"},"devDependencies":{"@antfu/eslint-config":"9.1.0","@composy/builder":"^0.0.1","@composy/testing":"^0.0.1","eslint":"10.7.0","rimraf":"^6.1.3","typescript":"5.9.3","vue":"3.5.39","vue-tsc":"^3.3.7"},"typings":"./es/index.d.ts","browser":"./dist/index.js","_id":"@composy/bookmark-vue@0.0.1","_nodeVersion":"23.11.1","_npmVersion":"10.9.2","dist":{"integrity":"sha512-OO/T1k/trWrwCtUNWSxIQ1JKrdf0gx7Ch2lAuokDKcgoauG/7cZjCbggoxpfFrh2xtn84OZoJw8UA+1xHE1diA==","shasum":"943a1df8afa2825edd168aa93e562b5f885fa208","tarball":"https://registry.npmjs.org/@composy/bookmark-vue/-/bookmark-vue-0.0.1.tgz","fileCount":257,"unpackedSize":2446838,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQDweWFdcjUetUOQ0ylfeQ1rBHwekpS1fPpwQhEotR03rAIgT1DZn1jNDPtgRfK41cED+4ARaJ0PmaWQAkmz4f+exL0="}]},"_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/bookmark-vue_0.0.1_1786948984568_0.3670380691763748"},"_hasShrinkwrap":false}},"time":{"created":"2026-08-17T06:43:04.398Z","0.0.1":"2026-08-17T06:43:04.712Z","modified":"2026-08-17T06:43:04.934Z"},"maintainers":[{"name":"swimly","email":"979741120@qq.com"}],"description":"LDesign 书签系统 - Vue 3 适配层","keywords":["bookmark","favorites","navigation","vue","vue3","composable","ldesign","typescript"],"author":{"name":"LDesign Team"},"license":"MIT","readme":"# @composy/bookmark-vue\n\nVue 3 adapter for `@composy/bookmark-core`. It provides bookmark UI components, composables, plugin registration and tokenized styles.\n\n## Features\n\n- `BookmarkBar` with keyboard navigation, overflow handling, exposed manager actions and optional visit tracking.\n- `BookmarkItem` and `BookmarkFolder` for nested tree rendering, separators and visit badges.\n- `BookmarkSearch` with safe highlighted rendering and `SearchOptions` support.\n- `ChromeTabs` for browser-like tabs with drag sorting and context actions.\n- `VirtualList` and `LazyBookmarkBar` for larger bookmark sets.\n- `useBookmarkStore()` exposes `addSeparator()`, `recordVisit()`, `search()`, `getAllTags()`, `findDuplicates()`, `getInsights()`, `audit()` and import/export methods.\n- `useRouteTabs()` uses minimal router typing, so `vue-router` is optional for consumers.\n- Theme handling is SSR-safe and writes `ldesign-theme-light` / `ldesign-theme-dark` classes plus `data-theme-mode`.\n\n## Install\n\n```bash\npnpm add @composy/bookmark-vue @composy/bookmark-core vue\n```\n\n## Usage\n\n```vue\n<script setup lang=\"ts\">\nimport { ref, useTemplateRef } from 'vue'\nimport type { BookmarkBarExpose, BookmarkItemType } from '@composy/bookmark-vue'\nimport { BookmarkBar, BookmarkSearch } from '@composy/bookmark-vue'\nimport '@composy/bookmark-vue/index.css'\n\nconst bar = useTemplateRef<BookmarkBarExpose>('bar')\nconst items = ref<BookmarkItemType[]>([\n  { id: 'docs', title: 'Docs', url: 'https://ldesign.dev/docs', tags: ['docs'] },\n  {\n    id: 'tools',\n    type: 'folder',\n    title: 'Tools',\n    children: [\n      { id: 'builder', title: 'Builder', url: 'https://ldesign.dev/builder' },\n    ],\n  },\n])\n\nfunction exportBookmarks() {\n  return bar.value?.exportToJSON({ source: 'vue-app' })\n}\n</script>\n\n<template>\n  <BookmarkSearch :items=\"items\" />\n  <BookmarkBar\n    ref=\"bar\"\n    :items=\"items\"\n    mode=\"horizontal\"\n    theme=\"auto\"\n    :track-visits=\"true\"\n  />\n</template>\n```\n\n## Composable\n\n```ts\nimport { useBookmarkStore } from '@composy/bookmark-vue'\n\nconst store = useBookmarkStore({\n  items: [],\n  persistent: true,\n  storageKey: 'ldesign-bookmarks',\n  trackVisits: true,\n})\n\nstore.add({ title: 'LDesign', url: 'https://ldesign.dev' })\nstore.addSeparator()\nstore.audit()\nstore.getInsights()\n```\n\n## Public Classes And Tokens\n\n- All public classes use the `ldesign-` prefix.\n- Bookmark UI classes use `ldesign-bookmark-*`.\n- Chrome tabs use `ldesign-chrome-*`.\n- Virtual list uses `ldesign-virtual-*`.\n- Theme helpers use `ldesign-theme-light` and `ldesign-theme-dark`.\n- Component variables use `--ldesign-bookmark-*`.\n- Color values use `packages/color` generated `--ld-*` variables.\n- Size, spacing, radius, border width and typography values use `packages/size` generated `--ld-*` variables.\n\nImport `@composy/bookmark-vue/index.css` once in the application and load global LDesign color/size token styles before mounting components.\n\n## Build\n\nThe package uses `@composy/builder`.\n\n```bash\npnpm run type-check\npnpm run build\n```\n\nGenerated output directories:\n\n- `dist`: browser bundle and CSS bundle.\n- `es`: ESM output and declarations.\n- `esm`: ESM compatibility mirror.\n- `lib`: CommonJS `.cjs` output and declarations.\n\n## License\n\nMIT\n","readmeFilename":"README.md","_rev":"1-0f2afe093e5fa8f9d5962b9e9e5b8940"}