@vuetify/v0 0.0.18 → 0.0.21

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,11 +1,14 @@
1
1
  <div align="center">
2
2
  <picture>
3
3
  <source media="(prefers-color-scheme: dark)" srcset="https://vuetifyjs.b-cdn.net/docs/images/logos/vzero-logo-dark.png">
4
- <img alt="Vuetify One Logo" src="https://vuetifyjs.b-cdn.net/docs/images/logos/vzero-logo-light.png" height="150">
4
+ <img alt="Vuetify Zero Logo" src="https://vuetifyjs.b-cdn.net/docs/images/logos/vzero-logo-light.png" height="150">
5
5
  </picture>
6
6
  </div>
7
7
 
8
8
  <p align="center">
9
+ <a href="https://codecov.io/github/vuetifyjs/0">
10
+ <img src="https://img.shields.io/codecov/c/github/vuetifyjs/0" alt="Coverage">
11
+ </a>
9
12
  <a href="https://www.npmjs.com/package/@vuetify/v0">
10
13
  <img src="https://img.shields.io/npm/dt/@vuetify/v0.svg" alt="Downloads">
11
14
  </a>
@@ -13,7 +16,7 @@
13
16
  <img src="https://img.shields.io/npm/dm/@vuetify/v0.svg" alt="Downloads">
14
17
  </a>
15
18
  <br>
16
- <a href="https://github.com/vuetifyjs/@vuetify/v0/blob/master/LICENSE.md">
19
+ <a href="https://github.com/vuetifyjs/0/blob/master/LICENSE.md">
17
20
  <img src="https://img.shields.io/npm/l/@vuetify/v0.svg" alt="License">
18
21
  </a>
19
22
  <a href="https://community.vuetifyjs.com">
@@ -23,9 +26,29 @@
23
26
 
24
27
  # @vuetify/v0
25
28
 
26
- Core foundational package from providing components and composables for building modern applications. `@vuetify/v0` is the foundational layer of the Vuetify ecosystem, offering lightweight, headless building blocks with TypeScript support and accessibility features built-in that serve as building blocks for higher-order UI libraries and custom design systems.
29
+ Headless Vue 3 UI primitives and composables for building modern applications and design systems. `@vuetify/v0` is the foundation of the Vuetify ecosystem, offering lightweight, unstyled building blocks with full TypeScript support and accessibility features built-in.
30
+
31
+ > **Note:** This package is in early development (pre-1.0). APIs may change between minor versions.
32
+
33
+ ## Repository Structure
34
+
35
+ This is a **pnpm monorepo** containing:
36
+
37
+ | Package | Description |
38
+ |---------|-------------|
39
+ | [`@vuetify/v0`](./packages/0) | Core headless components and composables |
40
+ | [`@vuetify/paper`](./packages/paper) | Styling and layout primitives |
41
+ | [`apps/docs`](./apps/docs) | Documentation site ([0.vuetifyjs.com](https://0.vuetifyjs.com)) |
42
+ | [`apps/storybook`](./apps/storybook) | Component stories and visual testing |
43
+ | [`playground`](./playground) | Interactive development environment |
44
+
45
+ ## Requirements
46
+
47
+ - **Node.js** >= 22
48
+ - **pnpm** >= 10.6
49
+ - **Vue** >= 3.3.0
27
50
 
28
- ## 🚀 Installation
51
+ ## Installation
29
52
 
30
53
  ```bash
31
54
  npm install @vuetify/v0@latest
@@ -37,88 +60,146 @@ yarn add @vuetify/v0
37
60
  bun add @vuetify/v0
38
61
  ```
39
62
 
40
- ## 📦 What's Included
63
+ ## Exports
64
+
65
+ The package provides tree-shakeable subpath exports:
66
+
67
+ ```ts
68
+ import { ... } from '@vuetify/v0' // Everything
69
+ import { ... } from '@vuetify/v0/components' // Components only
70
+ import { ... } from '@vuetify/v0/composables' // Composables only
71
+ import { ... } from '@vuetify/v0/utilities' // Utilities only
72
+ import { ... } from '@vuetify/v0/types' // Types only
73
+ import { ... } from '@vuetify/v0/constants' // Constants only
74
+ ```
75
+
76
+ ## What's Included
41
77
 
42
78
  ### Components
43
79
 
44
- - **`Atom`** - Base element wrapper with renderless capabilities
45
- - **`Avatar`** - User avatar component
46
- - **`Popover`** - CSS anchor-positioned popup components
80
+ | Component | Description |
81
+ |-----------|-------------|
82
+ | **Atom** | Polymorphic base element. Renders as any HTML element via `as` prop with renderless mode support |
83
+ | **Avatar** | Image with fallback display. Compound component with Root, Image, and Fallback sub-components |
84
+ | **ExpansionPanel** | Accordion/collapsible panels. Supports single (accordion) or multi-expand modes |
85
+ | **Group** | Multi-selection with tri-state support. Provides `selectAll`, `unselectAll`, `toggleAll` |
86
+ | **Pagination** | Page navigation with ellipsis. Root, Item, First, Prev, Next, Last, Ellipsis sub-components |
87
+ | **Popover** | CSS anchor-positioned popup. Root, Anchor, and Content sub-components |
88
+ | **Selection** | Generic single/multi-selection. Configurable via `multiple` prop |
89
+ | **Single** | Single-selection specialization of Selection |
90
+ | **Step** | Navigation/stepper with first, last, next, prev controls |
47
91
 
48
92
  ### Composables
49
93
 
50
94
  #### Factories
51
95
 
52
- - **`createContext`** - Context factory with type safety
53
- - **`createPlugin`** - Vue plugin factory
54
- - **`createTrinity`** - Trinity pattern factory
96
+ Core factories that provide the foundation for all other composables:
55
97
 
56
- #### Registration
98
+ - **`createContext`** - Type-safe Vue dependency injection wrapper
99
+ - **`createPlugin`** - Vue plugin factory with context provision
100
+ - **`createTrinity`** - Context triple pattern: `[use, provide, default]`
57
101
 
58
- - **`useRegistry`** - Component registration and retrieval system
59
- - **`useProxyRegistry`** - Make any registry reactive
60
- - **`useQueue`** - Registry for managing ordered items
61
- - **`useTimeline`** - Registry for managing timeline items
62
- - **`useTokens`** - Design token system
102
+ #### Registry
103
+
104
+ Base data structures that most other composables build upon:
105
+
106
+ - **`useRegistry`** - Enhanced Map with indexing, caching, and event support
107
+ - **`useProxyRegistry`** - Convert registry Map to reactive object
108
+ - **`useQueue`** - FIFO queue with timeout management (notifications/toasts)
109
+ - **`useTimeline`** - Bounded undo/redo history
110
+ - **`useTokens`** - Design token registry with alias resolution
63
111
 
64
112
  #### Selection
65
113
 
66
- - **`useFilter`** - Collection filtering utilities
67
- - **`useSelection`** - Selection management
68
- - **`useGroup`** - Selection group management
69
- - **`useSingle`** - Single selection utilities
70
- - **`useStep`** - Step navigation logic
114
+ Selection management composables built on `useRegistry`:
71
115
 
72
- #### Forms
116
+ - **`useSelection`** - Base selection with Set-based tracking
117
+ - **`useGroup`** - Multi-selection with tri-state/mixed support
118
+ - **`useSingle`** - Single-selection specialization
119
+ - **`useStep`** - Navigation through items (first, last, next, prev)
73
120
 
74
- - **`useForm`** - Form validation and state management
75
- - **`useProxyModel`** - Proxy registry for Vue reactive models
121
+ #### Forms & Data
76
122
 
77
- #### System
78
- - **`useEventListener`** - Event listener utilities
79
- - **`useIntersectionObserver`** - Intersection observer utilities
123
+ - **`useForm`** - Form validation and state management with async rules
124
+ - **`useProxyModel`** - Bridge selection context to component v-model
125
+ - **`useFilter`** - Reactive array filtering with multiple modes
126
+
127
+ #### Layout & Measurement
128
+
129
+ - **`usePagination`** - Lightweight page navigation (non-registry based)
130
+ - **`useOverflow`** - Container overflow measurement for item capacity
131
+ - **`useVirtual`** - Virtual scrolling for large lists
132
+
133
+ #### Observers & Events
134
+
135
+ - **`useEventListener`** - Lifecycle-managed event listeners
136
+ - **`useIntersectionObserver`** - Intersection observer with auto-cleanup
80
137
  - **`useKeydown`** - Keyboard event handling
81
138
  - **`useMutationObserver`** - DOM mutation observation
82
139
  - **`useResizeObserver`** - Resize observer utilities
83
140
 
141
+ #### System
84
142
 
85
- #### Plugins
143
+ Plugin-capable composables following the trinity pattern:
86
144
 
87
145
  - **`useBreakpoints`** - Responsive breakpoint detection
88
- - **`useFeatures`** - Feature detection utilities
146
+ - **`useFeatures`** - Feature flags with variations
89
147
  - **`useHydration`** - SSR hydration helpers
90
- - **`useLocale`** - Internationalization support
91
- - **`useLogger`** - Development logging utilities
92
- - **`usePermissions`** - User permission management
93
- - **`useStorage`** - Local/session storage utilities
94
- - **`useTheme`** - Theme switching and CSS variable management
148
+ - **`useLocale`** - Internationalization with message interpolation
149
+ - **`useLogger`** - Logging adapter (consola/pino/custom)
150
+ - **`usePermissions`** - RBAC/ABAC permission system
151
+ - **`useStorage`** - Storage adapter (localStorage/sessionStorage/memory)
152
+ - **`useTheme`** - Theme management with CSS variable injection
95
153
 
96
- ### Transformers
154
+ #### Utilities
97
155
 
156
+ - **`useToggleScope`** - Conditional effect scope management
98
157
  - **`toArray`** - Array transformation utilities
99
158
  - **`toReactive`** - Reactive object conversion
100
159
 
101
- ## 🏗️ Design Principles
160
+ ## Design Principles
102
161
 
103
162
  - **Headless First**: Components provide logic and accessibility without imposed styling
104
163
  - **Slot-Driven**: Maximum flexibility through comprehensive slot APIs
105
- - **CSS Variables**: All styling configurable via CSS custom properties
106
- - **TypeScript Native**: Full type safety with excellent developer experience
107
- - **Minimal Dependencies**: Lightweight with only essential peer dependencies
164
+ - **CSS Variables**: All styling configurable via `--v0-*` custom properties
165
+ - **TypeScript Native**: Full type safety with generics for extensibility
166
+ - **Minimal Dependencies**: Only Vue 3.3+ required (markdown libraries optional)
108
167
  - **Composable Architecture**: Reusable logic through Vue 3 composables
109
168
 
110
- ## 📚 API Reference
169
+ ## Documentation
170
+
171
+ For detailed API documentation, examples, and guides, visit [0.vuetifyjs.com](https://0.vuetifyjs.com).
172
+
173
+ ## Development
111
174
 
112
- For detailed API documentation, type definitions, and examples, visit our [documentation site](https://0.vuetifyjs.com) or explore the TypeScript definitions included in this package.
175
+ ```bash
176
+ # Install dependencies
177
+ pnpm install
178
+
179
+ # Start playground
180
+ pnpm dev
181
+
182
+ # Start documentation site
183
+ pnpm dev:docs
184
+
185
+ # Run tests
186
+ pnpm test
187
+
188
+ # Type check
189
+ pnpm typecheck
190
+
191
+ # Lint
192
+ pnpm lint
193
+ ```
113
194
 
114
- ## 🤝 Contributing
195
+ ## Contributing
115
196
 
116
- We are not currently accepting contributions to this package, check back later.
197
+ We are not currently accepting external contributions. Check back later or join our [Discord community](https://community.vuetifyjs.com) for updates.
117
198
 
118
- ## 📄 License
199
+ ## License
119
200
 
120
- MIT License
201
+ [MIT License](./LICENSE.md)
121
202
 
122
203
  ---
123
204
 
124
- Built with ❤️ for the Vue ecosystem. Part of the Vuetify family.
205
+ Built with care for the Vue ecosystem. Part of the [Vuetify](https://vuetifyjs.com) family.