@pristy/pristy-libvue
v2.16.2
Published
Core library used by all Pristy applications
Readme
Pristy Libvue
Shared Vue 3 component library for the Pristy ECM suite. Provides reusable components, services, stores, composables, and plugins used across all Pristy frontend applications.
Installation
npm install @pristy/pristy-libvueUsage
All exports use named imports:
import { alfrescoFileService, useUserStore, TreeExplorer } from "@pristy/pristy-libvue"What's included
| Category | Examples | Count |
|---|---|---|
| Components | TreeExplorer, PDFComponent, DynamicContentView, CopyOrMovePopup, AdvancedSearchPanel, ChatPanel | ~45 |
| Services | alfrescoFileService, alfrescoNodeService, configService, workspaceService, errorService | ~20 |
| Stores (Pinia) | useUserStore, useConfigStore, useNavigationStore, useFavoritesStore, useSearchStore | ~15 |
| Composables | useCodeMirror, useMarkdownPreview, useCollabEditor, useCollabWebSocket | 5 |
| Pages | LoginPage, NotFoundPages, ErrorPage | 3 |
| Plugins | vueKeyCloak | 1 |
See src/index.js for the full list of exports.
Peer Dependencies
These must be installed by the consuming application:
| Package | Version |
|---|---|
| vue | ^3.5 |
| vue-i18n | ^11.3 |
| vue-router | ^4.6 |
| @codemirror/* | ^6.x (14 packages) |
| codemirror | 6.0.2 |
Local Development
Build the library
npm install
npm run build:libraryLink locally to another Pristy app
# In pristy-libvue
npm link
# In the consuming app (e.g. pristy-espaces)
npm link ../pristy-libvue
npm run dev.link # Uses vite.config.link.jsAfter any change to pristy-libvue, rebuild with npm run build:library (or use npm run build:dev for watch mode with source maps).
Available scripts
| Script | Description |
|---|---|
| npm run build:library | Production build (ESM + UMD + CSS + .d.ts) |
| npm run build:dev | Watch mode build with source maps |
| npm run analyze | Bundle size analysis (opens stats.html) |
| npm run lint | Lint and auto-fix with ESLint |
| npm run check | Lint without fixing (CI mode) |
| npm run format | Format with Prettier |
| npm run test | Run tests with Vitest |
| npm run coverage | Generate test coverage report |
Architecture
The library follows a Services -> Stores -> Components pattern:
- Services (
src/services/): Stateless modules handling API calls and business logic - Stores (
src/stores/): Pinia stores managing session state - Components (
src/components/): UI presentation consuming stores - Composables (
src/composables/): Reusable composition functions (CodeMirror, Markdown, WebSocket)
Conventions
- Icons: Remixicon only (
ri-*classes). No PrimeIcons. - i18n: All user-facing strings must use
$t('key'). No hardcoded text. - Imports: Use
@/alias for all internal imports. Never import from@/index.jsinternally. - License: Every
.vueand.jsfile must include the AGPL-3.0 header. - Comments: English only.
