vue-pane 0.0.0
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/LICENSE +21 -0
- package/README.md +424 -0
- package/dist/src/components/PButton.vue.d.ts +11 -0
- package/dist/src/components/PCheckbox.vue.d.ts +15 -0
- package/dist/src/components/PColor.vue.d.ts +16 -0
- package/dist/src/components/PFolder.vue.d.ts +27 -0
- package/dist/src/components/PGraph.vue.d.ts +10 -0
- package/dist/src/components/PLabel.vue.d.ts +17 -0
- package/dist/src/components/PMonitor.vue.d.ts +8 -0
- package/dist/src/components/PMonitorMulti.vue.d.ts +8 -0
- package/dist/src/components/PNumber.vue.d.ts +18 -0
- package/dist/src/components/PPoint2d.vue.d.ts +26 -0
- package/dist/src/components/PSelect.vue.d.ts +19 -0
- package/dist/src/components/PSeparator.vue.d.ts +3 -0
- package/dist/src/components/PSlider.vue.d.ts +18 -0
- package/dist/src/components/PTab.vue.d.ts +25 -0
- package/dist/src/components/PText.vue.d.ts +15 -0
- package/dist/src/components/PTooltipIcon.vue.d.ts +3 -0
- package/dist/src/components/VPane.vue.d.ts +28 -0
- package/dist/src/composables/useFoldable.d.ts +5 -0
- package/dist/src/composables/usePaneConfig.d.ts +8 -0
- package/dist/src/composables/usePickerFold.d.ts +2 -0
- package/dist/src/composables/useTooltip.d.ts +19 -0
- package/dist/src/index.d.ts +19 -0
- package/dist/vue-pane.css +2 -0
- package/dist/vue-pane.js +3076 -0
- package/dist/vue-pane.umd.cjs +1 -0
- package/package.json +79 -0
- package/src/components/PButton.vue +53 -0
- package/src/components/PCheckbox.vue +37 -0
- package/src/components/PColor.vue +107 -0
- package/src/components/PConfig.vue +10 -0
- package/src/components/PFolder.vue +81 -0
- package/src/components/PGraph.vue +49 -0
- package/src/components/PLabel.vue +50 -0
- package/src/components/PMonitor.vue +28 -0
- package/src/components/PMonitorMulti.vue +30 -0
- package/src/components/PNumber.vue +162 -0
- package/src/components/PPoint2d.vue +191 -0
- package/src/components/PSelect.vue +44 -0
- package/src/components/PSeparator.vue +8 -0
- package/src/components/PSlider.vue +96 -0
- package/src/components/PTab.vue +73 -0
- package/src/components/PText.vue +30 -0
- package/src/components/PTooltipIcon.vue +30 -0
- package/src/components/VPane.vue +61 -0
- package/src/composables/useFoldable.ts +128 -0
- package/src/composables/usePaneConfig.ts +25 -0
- package/src/composables/usePickerFold.ts +46 -0
- package/src/composables/useTooltip.ts +27 -0
- package/src/index.ts +38 -0
- package/src/styles/_vp.scss +12 -0
- package/src/styles/common/_defs.scss +56 -0
- package/src/styles/index.scss +1 -0
- package/src/styles/view/_button.scss +12 -0
- package/src/styles/view/_checkbox.scss +54 -0
- package/src/styles/view/_color.scss +57 -0
- package/src/styles/view/_folder.scss +70 -0
- package/src/styles/view/_graph.scss +11 -0
- package/src/styles/view/_label.scss +37 -0
- package/src/styles/view/_list.scss +17 -0
- package/src/styles/view/_log.scss +13 -0
- package/src/styles/view/_monitor-multi.scss +18 -0
- package/src/styles/view/_number.scss +110 -0
- package/src/styles/view/_point-2d.scss +61 -0
- package/src/styles/view/_root.scss +126 -0
- package/src/styles/view/_separator.scss +15 -0
- package/src/styles/view/_slider.scss +32 -0
- package/src/styles/view/_tab.scss +139 -0
- package/src/styles/view/_text.scss +24 -0
- package/src/styles/view/_tooltip.scss +17 -0
- package/src/styles/view/_views.scss +2 -0
- package/src/styles/view/placeholder/_button.scss +28 -0
- package/src/styles/view/placeholder/_container.scss +80 -0
- package/src/styles/view/placeholder/_folder.scss +102 -0
- package/src/styles/view/placeholder/_input.scss +26 -0
- package/src/styles/view/placeholder/_list.scss +35 -0
- package/src/styles/view/placeholder/_monitor.scss +26 -0
- package/src/styles/view/placeholder/_texts.scss +11 -0
- package/src/styles/view/placeholder/_theme.scss +111 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Carl Olsen
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,424 @@
|
|
|
1
|
+
# vue-pane
|
|
2
|
+
|
|
3
|
+
Compact debug panel components for Vue 3. A spiritual replacement for [Tweakpane](https://tweakpane.github.io/docs/) — same visual style, Vue-native API.
|
|
4
|
+
|
|
5
|
+
## Features
|
|
6
|
+
|
|
7
|
+
- Inputs: text, number (drag-to-change), slider, checkbox, select, color picker, 2D point
|
|
8
|
+
- Display: single-line monitor, multi-line monitor, graph/sparkline
|
|
9
|
+
- Layout: collapsible pane, collapsible folders, tabs, separator
|
|
10
|
+
- Folder state persisted to `localStorage` via a `name` prop
|
|
11
|
+
- BEM CSS class names (`vp-pane`, `vp-folder__title`, etc.) — fully themeable via CSS custom properties
|
|
12
|
+
- TypeScript throughout
|
|
13
|
+
|
|
14
|
+
## Installation
|
|
15
|
+
|
|
16
|
+
```sh
|
|
17
|
+
npm install vue-pane
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
Import styles once in your app entry:
|
|
21
|
+
|
|
22
|
+
```ts
|
|
23
|
+
import 'vue-pane/dist/vue-pane.css'
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
### Nuxt / source-first bundlers
|
|
27
|
+
|
|
28
|
+
The package exposes a `"source"` export condition pointing at the raw `.vue` and `.scss` files. Bundlers that understand this condition (Nuxt, Vite with explicit `resolve.conditions: ['source']`) will process the source directly — no CSS import needed, and templates are compiled once by your own build.
|
|
29
|
+
|
|
30
|
+
```ts
|
|
31
|
+
// vite.config.ts — opt in explicitly if needed
|
|
32
|
+
export default defineConfig({
|
|
33
|
+
resolve: { conditions: ['source'] },
|
|
34
|
+
})
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
## Quick start
|
|
38
|
+
|
|
39
|
+
```vue
|
|
40
|
+
<script setup lang="ts">
|
|
41
|
+
import { ref } from 'vue'
|
|
42
|
+
import { VPane, VPFolder, VPNumber, VPCheckbox, VPButton } from 'vue-pane'
|
|
43
|
+
|
|
44
|
+
const speed = ref(1)
|
|
45
|
+
const enabled = ref(true)
|
|
46
|
+
</script>
|
|
47
|
+
|
|
48
|
+
<template>
|
|
49
|
+
<VPane title="Controls" style="width: 280px">
|
|
50
|
+
<VPNumber v-model="speed" label="Speed" :min="0" :max="10" :step="0.1" />
|
|
51
|
+
<VPCheckbox v-model="enabled" label="Enabled" />
|
|
52
|
+
<VPButton label="Reset" @click="speed = 1; enabled = true" />
|
|
53
|
+
|
|
54
|
+
<VPFolder title="Advanced" name="advanced">
|
|
55
|
+
<VPNumber v-model="speed" label="Fine" :step="0.01" />
|
|
56
|
+
</VPFolder>
|
|
57
|
+
</VPane>
|
|
58
|
+
</template>
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
---
|
|
62
|
+
|
|
63
|
+
## Component reference
|
|
64
|
+
|
|
65
|
+
### `VPane`
|
|
66
|
+
|
|
67
|
+
Root container. Applies theming (font, colors, shadow, border-radius) to all children.
|
|
68
|
+
|
|
69
|
+
```vue
|
|
70
|
+
<VPane title="My Panel" :expanded="true" style="width: 300px">
|
|
71
|
+
<!-- components -->
|
|
72
|
+
</VPane>
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
| Prop | Type | Default | Description |
|
|
76
|
+
|---|---|---|---|
|
|
77
|
+
| `title` | `string` | — | Title text. If omitted the header button is hidden and the pane is always open. |
|
|
78
|
+
| `expanded` | `boolean` | `true` | Initial open/closed state. Only applies when `title` is set. |
|
|
79
|
+
| `disabled` | `boolean` | — | Applies `vp--disabled` — disables pointer events. |
|
|
80
|
+
| `hidden` | `boolean` | — | Applies `vp--hidden` — `display: none`. |
|
|
81
|
+
|
|
82
|
+
---
|
|
83
|
+
|
|
84
|
+
### `VPFolder`
|
|
85
|
+
|
|
86
|
+
Collapsible folder. Expanded state is saved to `localStorage` when `name` is provided.
|
|
87
|
+
|
|
88
|
+
```vue
|
|
89
|
+
<VPFolder title="Transform" name="transform">
|
|
90
|
+
<!-- components -->
|
|
91
|
+
</VPFolder>
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
| Prop | Type | Default | Description |
|
|
95
|
+
|---|---|---|---|
|
|
96
|
+
| `title` | `string` | **required** | Folder title. |
|
|
97
|
+
| `name` | `string` | — | localStorage key (`vp-folder-{name}`). Without it, state is not persisted. |
|
|
98
|
+
| `expanded` | `boolean` | `true` | Initial open/closed state (overridden by localStorage when `name` is set). |
|
|
99
|
+
| `disabled` | `boolean` | — | Disables pointer events on the folder. |
|
|
100
|
+
| `hidden` | `boolean` | — | Hides the folder. |
|
|
101
|
+
|
|
102
|
+
---
|
|
103
|
+
|
|
104
|
+
### `VPText`
|
|
105
|
+
|
|
106
|
+
Plain text input.
|
|
107
|
+
|
|
108
|
+
```vue
|
|
109
|
+
<VPText v-model="name" label="Name" />
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
| Prop | Type | Description |
|
|
113
|
+
|---|---|---|
|
|
114
|
+
| `modelValue` | `string` | **required** |
|
|
115
|
+
| `label` | `string` | Label text. Omit for full-width input. |
|
|
116
|
+
|
|
117
|
+
---
|
|
118
|
+
|
|
119
|
+
### `VPNumber`
|
|
120
|
+
|
|
121
|
+
Number input with a drag-to-change knob on the left edge. Keyboard: `↑`/`↓` steps by `step`; `Shift+↑`/`↓` steps by `step × 10`.
|
|
122
|
+
|
|
123
|
+
```vue
|
|
124
|
+
<VPNumber v-model="count" label="Count" :min="0" :max="100" :step="1" />
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
| Prop | Type | Default | Description |
|
|
128
|
+
|---|---|---|---|
|
|
129
|
+
| `modelValue` | `number` | **required** | |
|
|
130
|
+
| `label` | `string` | — | |
|
|
131
|
+
| `min` | `number` | — | Clamp minimum. |
|
|
132
|
+
| `max` | `number` | — | Clamp maximum. |
|
|
133
|
+
| `step` | `number` | `1` | Drag and arrow key increment. |
|
|
134
|
+
|
|
135
|
+
---
|
|
136
|
+
|
|
137
|
+
### `VPSlider`
|
|
138
|
+
|
|
139
|
+
Horizontal track-and-knob slider.
|
|
140
|
+
|
|
141
|
+
```vue
|
|
142
|
+
<VPSlider v-model="opacity" label="Opacity" :min="0" :max="1" :step="0.01" />
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
| Prop | Type | Default | Description |
|
|
146
|
+
|---|---|---|---|
|
|
147
|
+
| `modelValue` | `number` | **required** | |
|
|
148
|
+
| `label` | `string` | — | |
|
|
149
|
+
| `min` | `number` | `0` | |
|
|
150
|
+
| `max` | `number` | `1` | |
|
|
151
|
+
| `step` | `number` | `0.01` | |
|
|
152
|
+
|
|
153
|
+
---
|
|
154
|
+
|
|
155
|
+
### `VPCheckbox`
|
|
156
|
+
|
|
157
|
+
Boolean toggle.
|
|
158
|
+
|
|
159
|
+
```vue
|
|
160
|
+
<VPCheckbox v-model="visible" label="Visible" />
|
|
161
|
+
```
|
|
162
|
+
|
|
163
|
+
| Prop | Type | Description |
|
|
164
|
+
|---|---|---|
|
|
165
|
+
| `modelValue` | `boolean` | **required** |
|
|
166
|
+
| `label` | `string` | |
|
|
167
|
+
|
|
168
|
+
---
|
|
169
|
+
|
|
170
|
+
### `VPSelect`
|
|
171
|
+
|
|
172
|
+
Dropdown list.
|
|
173
|
+
|
|
174
|
+
```vue
|
|
175
|
+
<VPSelect v-model="mode" :options="options" label="Mode" />
|
|
176
|
+
```
|
|
177
|
+
|
|
178
|
+
```ts
|
|
179
|
+
const options = [
|
|
180
|
+
{ value: 'linear', label: 'Linear' },
|
|
181
|
+
{ value: 'ease', label: 'Ease' },
|
|
182
|
+
]
|
|
183
|
+
```
|
|
184
|
+
|
|
185
|
+
| Prop | Type | Description |
|
|
186
|
+
|---|---|---|
|
|
187
|
+
| `modelValue` | `string \| number` | **required** |
|
|
188
|
+
| `options` | `{ value: string \| number; label: string }[]` | **required** |
|
|
189
|
+
| `label` | `string` | |
|
|
190
|
+
|
|
191
|
+
---
|
|
192
|
+
|
|
193
|
+
### `VPColor`
|
|
194
|
+
|
|
195
|
+
Color picker. Clicking the swatch opens an inline HSV palette with a hue slider and RGB inputs.
|
|
196
|
+
|
|
197
|
+
```vue
|
|
198
|
+
<VPColor v-model="fill" label="Fill" />
|
|
199
|
+
```
|
|
200
|
+
|
|
201
|
+
| Prop | Type | Default | Description |
|
|
202
|
+
|---|---|---|---|
|
|
203
|
+
| `modelValue` | `string` | **required** | Hex color string, e.g. `#ff5500`. |
|
|
204
|
+
| `label` | `string` | — | |
|
|
205
|
+
| `alpha` | `boolean` | `false` | Show alpha channel controls. |
|
|
206
|
+
|
|
207
|
+
---
|
|
208
|
+
|
|
209
|
+
### `VPPoint2d`
|
|
210
|
+
|
|
211
|
+
Two-axis coordinate input. Click the crosshair button to open an interactive 2D canvas picker.
|
|
212
|
+
|
|
213
|
+
```vue
|
|
214
|
+
<VPPoint2d v-model="position" label="Position" :min="-1" :max="1" />
|
|
215
|
+
```
|
|
216
|
+
|
|
217
|
+
| Prop | Type | Default | Description |
|
|
218
|
+
|---|---|---|---|
|
|
219
|
+
| `modelValue` | `{ x: number; y: number }` | **required** | |
|
|
220
|
+
| `label` | `string` | — | |
|
|
221
|
+
| `min` | `number` | `-1` | Range minimum for both axes. |
|
|
222
|
+
| `max` | `number` | `1` | Range maximum for both axes. |
|
|
223
|
+
|
|
224
|
+
---
|
|
225
|
+
|
|
226
|
+
### `VPButton`
|
|
227
|
+
|
|
228
|
+
Clickable action button.
|
|
229
|
+
|
|
230
|
+
```vue
|
|
231
|
+
<VPButton label="Apply" @click="apply" />
|
|
232
|
+
```
|
|
233
|
+
|
|
234
|
+
| Prop | Type | Description |
|
|
235
|
+
|---|---|---|
|
|
236
|
+
| `label` | `string` | **required** |
|
|
237
|
+
|
|
238
|
+
| Event | Description |
|
|
239
|
+
|---|---|
|
|
240
|
+
| `click` | Emitted on button press. |
|
|
241
|
+
|
|
242
|
+
---
|
|
243
|
+
|
|
244
|
+
### `VPSeparator`
|
|
245
|
+
|
|
246
|
+
Horizontal rule for visual grouping.
|
|
247
|
+
|
|
248
|
+
```vue
|
|
249
|
+
<VPSeparator />
|
|
250
|
+
```
|
|
251
|
+
|
|
252
|
+
---
|
|
253
|
+
|
|
254
|
+
### `VPTab`
|
|
255
|
+
|
|
256
|
+
Tab container with named slots per tab. Slot names match the strings in the `tabs` array.
|
|
257
|
+
|
|
258
|
+
```vue
|
|
259
|
+
<VPTab :tabs="['Settings', 'Info']" v-model="activeTab">
|
|
260
|
+
<template #Settings>
|
|
261
|
+
<VPNumber v-model="speed" label="Speed" />
|
|
262
|
+
</template>
|
|
263
|
+
<template #Info>
|
|
264
|
+
<VPMonitor :value="speed" label="Speed" />
|
|
265
|
+
</template>
|
|
266
|
+
</VPTab>
|
|
267
|
+
```
|
|
268
|
+
|
|
269
|
+
| Prop | Type | Default | Description |
|
|
270
|
+
|---|---|---|---|
|
|
271
|
+
| `tabs` | `string[]` | **required** | Tab labels (also the slot names). |
|
|
272
|
+
| `modelValue` | `number` | `0` | Active tab index. |
|
|
273
|
+
|
|
274
|
+
---
|
|
275
|
+
|
|
276
|
+
### `VPMonitor`
|
|
277
|
+
|
|
278
|
+
Read-only single-line display.
|
|
279
|
+
|
|
280
|
+
```vue
|
|
281
|
+
<VPMonitor :value="fps" label="FPS" />
|
|
282
|
+
```
|
|
283
|
+
|
|
284
|
+
| Prop | Type | Description |
|
|
285
|
+
|---|---|---|
|
|
286
|
+
| `value` | `unknown` | **required** — rendered with `{{ value }}`. |
|
|
287
|
+
| `label` | `string` | |
|
|
288
|
+
|
|
289
|
+
---
|
|
290
|
+
|
|
291
|
+
### `VPMonitorMulti`
|
|
292
|
+
|
|
293
|
+
Read-only multi-line display (3 rows).
|
|
294
|
+
|
|
295
|
+
```vue
|
|
296
|
+
<VPMonitorMulti :value="`x: ${pos.x}\ny: ${pos.y}`" label="Position" />
|
|
297
|
+
```
|
|
298
|
+
|
|
299
|
+
| Prop | Type | Description |
|
|
300
|
+
|---|---|---|
|
|
301
|
+
| `value` | `unknown` | Rendered verbatim. Use `\n` for line breaks. |
|
|
302
|
+
| `label` | `string` | |
|
|
303
|
+
|
|
304
|
+
---
|
|
305
|
+
|
|
306
|
+
### `VPGraph`
|
|
307
|
+
|
|
308
|
+
Sparkline chart. Pass a rolling array of numbers; the component normalises the range automatically.
|
|
309
|
+
|
|
310
|
+
```vue
|
|
311
|
+
<VPGraph :values="history" label="FPS" />
|
|
312
|
+
```
|
|
313
|
+
|
|
314
|
+
| Prop | Type | Description |
|
|
315
|
+
|---|---|---|
|
|
316
|
+
| `values` | `number[]` | **required** |
|
|
317
|
+
| `label` | `string` | |
|
|
318
|
+
| `min` | `number` | Auto from data. |
|
|
319
|
+
| `max` | `number` | Auto from data. |
|
|
320
|
+
|
|
321
|
+
---
|
|
322
|
+
|
|
323
|
+
### `VPLabel`
|
|
324
|
+
|
|
325
|
+
Layout primitive that pairs a label with any arbitrary content. Used internally by all inputs — available for custom components.
|
|
326
|
+
|
|
327
|
+
```vue
|
|
328
|
+
<VPLabel label="Custom">
|
|
329
|
+
<MyWidget />
|
|
330
|
+
</VPLabel>
|
|
331
|
+
```
|
|
332
|
+
|
|
333
|
+
| Prop | Type | Description |
|
|
334
|
+
|---|---|---|
|
|
335
|
+
| `label` | `string` | Omit for full-width (no-label) layout. |
|
|
336
|
+
|
|
337
|
+
---
|
|
338
|
+
|
|
339
|
+
## Theming
|
|
340
|
+
|
|
341
|
+
Override the default dark theme by setting CSS custom properties on any ancestor element (or `:root`).
|
|
342
|
+
|
|
343
|
+
```css
|
|
344
|
+
.my-app {
|
|
345
|
+
--vp-base-background-color: #1e1e2e;
|
|
346
|
+
--vp-container-foreground-color: #cdd6f4;
|
|
347
|
+
--vp-input-background-color: rgba(205, 214, 244, 0.06);
|
|
348
|
+
--vp-blade-value-width: 180px;
|
|
349
|
+
--vp-container-unit-size: 22px;
|
|
350
|
+
}
|
|
351
|
+
```
|
|
352
|
+
|
|
353
|
+
### Full variable reference
|
|
354
|
+
|
|
355
|
+
| Variable | Default | Description |
|
|
356
|
+
|---|---|---|
|
|
357
|
+
| `--vp-base-background-color` | `#28292e` | Pane background |
|
|
358
|
+
| `--vp-base-border-radius` | `6px` | Pane corner radius |
|
|
359
|
+
| `--vp-base-font-family` | `Roboto Mono, monospace` | Font stack |
|
|
360
|
+
| `--vp-base-shadow-color` | `rgba(0,0,0,0.2)` | Drop shadow |
|
|
361
|
+
| `--vp-blade-border-radius` | `2px` | Input element corner radius |
|
|
362
|
+
| `--vp-blade-horizontal-padding` | `4px` | Input horizontal padding |
|
|
363
|
+
| `--vp-blade-value-width` | `160px` | Width of the value column |
|
|
364
|
+
| `--vp-button-background-color` | `#adafb8` | Button fill |
|
|
365
|
+
| `--vp-button-foreground-color` | `#28292e` | Button text |
|
|
366
|
+
| `--vp-container-background-color` | `rgba(...)` | Folder/tab header fill |
|
|
367
|
+
| `--vp-container-foreground-color` | `#bbbcc4` | Folder/tab header text |
|
|
368
|
+
| `--vp-container-unit-size` | `20px` | Row height |
|
|
369
|
+
| `--vp-container-unit-spacing` | `4px` | Gap between rows |
|
|
370
|
+
| `--vp-container-vertical-padding` | `4px` | Folder content top/bottom padding |
|
|
371
|
+
| `--vp-input-background-color` | `rgba(...)` | Input fill |
|
|
372
|
+
| `--vp-input-foreground-color` | `#bbbcc4` | Input text |
|
|
373
|
+
| `--vp-label-foreground-color` | `rgba(...)` | Label text (slightly dimmed) |
|
|
374
|
+
| `--vp-monitor-background-color` | `rgba(...)` | Monitor/display fill |
|
|
375
|
+
| `--vp-monitor-foreground-color` | `rgba(...)` | Monitor text |
|
|
376
|
+
| `--vp-groove-foreground-color` | `rgba(...)` | Separator line colour |
|
|
377
|
+
|
|
378
|
+
---
|
|
379
|
+
|
|
380
|
+
## TypeScript
|
|
381
|
+
|
|
382
|
+
All components are typed. Named exports only — import what you need:
|
|
383
|
+
|
|
384
|
+
```ts
|
|
385
|
+
import type { } from 'vue-pane' // no public types beyond the components themselves
|
|
386
|
+
import { VPane, VPNumber, VPColor } from 'vue-pane'
|
|
387
|
+
```
|
|
388
|
+
|
|
389
|
+
---
|
|
390
|
+
|
|
391
|
+
## CSS class names
|
|
392
|
+
|
|
393
|
+
Classes follow BEM with a `vp-` prefix. Useful for targeted overrides:
|
|
394
|
+
|
|
395
|
+
```css
|
|
396
|
+
/* make all labels uppercase */
|
|
397
|
+
.vp-label__text { text-transform: uppercase; }
|
|
398
|
+
|
|
399
|
+
/* widen value column in one pane only */
|
|
400
|
+
#my-pane { --vp-blade-value-width: 200px; }
|
|
401
|
+
```
|
|
402
|
+
|
|
403
|
+
Global state classes applied automatically:
|
|
404
|
+
|
|
405
|
+
| Class | Description |
|
|
406
|
+
|---|---|
|
|
407
|
+
| `vp--disabled` | Pointer events off, element dimmed |
|
|
408
|
+
| `vp--hidden` | `display: none` |
|
|
409
|
+
| `vp--first` | First visible child in a container |
|
|
410
|
+
| `vp--last` | Last visible child |
|
|
411
|
+
|
|
412
|
+
---
|
|
413
|
+
|
|
414
|
+
## Monorepo
|
|
415
|
+
|
|
416
|
+
```
|
|
417
|
+
packages/vue-pane/ ← npm package
|
|
418
|
+
apps/example/ ← development example app
|
|
419
|
+
```
|
|
420
|
+
|
|
421
|
+
```sh
|
|
422
|
+
pnpm dev # start the example app (resolves vue-pane from source, no build needed)
|
|
423
|
+
pnpm build # build the package
|
|
424
|
+
```
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
label: string;
|
|
3
|
+
tooltip?: string;
|
|
4
|
+
};
|
|
5
|
+
declare const __VLS_export: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
6
|
+
click: () => any;
|
|
7
|
+
}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
8
|
+
onClick?: (() => any) | undefined;
|
|
9
|
+
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
10
|
+
declare const _default: typeof __VLS_export;
|
|
11
|
+
export default _default;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
label?: string;
|
|
3
|
+
tooltip?: string;
|
|
4
|
+
};
|
|
5
|
+
type __VLS_ModelProps = {
|
|
6
|
+
modelValue: boolean;
|
|
7
|
+
};
|
|
8
|
+
type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
|
|
9
|
+
declare const __VLS_export: import('vue').DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
10
|
+
"update:modelValue": (value: boolean) => any;
|
|
11
|
+
}, string, import('vue').PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
12
|
+
"onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
|
|
13
|
+
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
14
|
+
declare const _default: typeof __VLS_export;
|
|
15
|
+
export default _default;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
label?: string;
|
|
3
|
+
tooltip?: string;
|
|
4
|
+
alpha?: boolean;
|
|
5
|
+
};
|
|
6
|
+
type __VLS_ModelProps = {
|
|
7
|
+
modelValue: string;
|
|
8
|
+
};
|
|
9
|
+
type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
|
|
10
|
+
declare const __VLS_export: import('vue').DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
11
|
+
"update:modelValue": (value: string) => any;
|
|
12
|
+
}, string, import('vue').PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
13
|
+
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
14
|
+
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
15
|
+
declare const _default: typeof __VLS_export;
|
|
16
|
+
export default _default;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
title: string;
|
|
3
|
+
tooltip?: string;
|
|
4
|
+
id?: string;
|
|
5
|
+
disabled?: boolean;
|
|
6
|
+
};
|
|
7
|
+
type __VLS_ModelProps = {
|
|
8
|
+
'expanded'?: boolean;
|
|
9
|
+
};
|
|
10
|
+
type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
|
|
11
|
+
declare var __VLS_6: {};
|
|
12
|
+
type __VLS_Slots = {} & {
|
|
13
|
+
default?: (props: typeof __VLS_6) => any;
|
|
14
|
+
};
|
|
15
|
+
declare const __VLS_base: import('vue').DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
16
|
+
"update:expanded": (value: boolean) => any;
|
|
17
|
+
}, string, import('vue').PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
18
|
+
"onUpdate:expanded"?: ((value: boolean) => any) | undefined;
|
|
19
|
+
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
20
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
21
|
+
declare const _default: typeof __VLS_export;
|
|
22
|
+
export default _default;
|
|
23
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
24
|
+
new (): {
|
|
25
|
+
$slots: S;
|
|
26
|
+
};
|
|
27
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
values: number[];
|
|
3
|
+
label?: string;
|
|
4
|
+
tooltip?: string;
|
|
5
|
+
min?: number;
|
|
6
|
+
max?: number;
|
|
7
|
+
};
|
|
8
|
+
declare const __VLS_export: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
9
|
+
declare const _default: typeof __VLS_export;
|
|
10
|
+
export default _default;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
label?: string;
|
|
3
|
+
tooltip?: string;
|
|
4
|
+
};
|
|
5
|
+
declare var __VLS_9: {};
|
|
6
|
+
type __VLS_Slots = {} & {
|
|
7
|
+
default?: (props: typeof __VLS_9) => any;
|
|
8
|
+
};
|
|
9
|
+
declare const __VLS_base: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
10
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
11
|
+
declare const _default: typeof __VLS_export;
|
|
12
|
+
export default _default;
|
|
13
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
14
|
+
new (): {
|
|
15
|
+
$slots: S;
|
|
16
|
+
};
|
|
17
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
value: unknown;
|
|
3
|
+
label?: string;
|
|
4
|
+
tooltip?: string;
|
|
5
|
+
};
|
|
6
|
+
declare const __VLS_export: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
7
|
+
declare const _default: typeof __VLS_export;
|
|
8
|
+
export default _default;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
value: unknown;
|
|
3
|
+
label?: string;
|
|
4
|
+
tooltip?: string;
|
|
5
|
+
};
|
|
6
|
+
declare const __VLS_export: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
7
|
+
declare const _default: typeof __VLS_export;
|
|
8
|
+
export default _default;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
label?: string;
|
|
3
|
+
tooltip?: string;
|
|
4
|
+
min?: number;
|
|
5
|
+
max?: number;
|
|
6
|
+
step?: number;
|
|
7
|
+
};
|
|
8
|
+
type __VLS_ModelProps = {
|
|
9
|
+
modelValue: number;
|
|
10
|
+
};
|
|
11
|
+
type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
|
|
12
|
+
declare const __VLS_export: import('vue').DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
13
|
+
"update:modelValue": (value: number) => any;
|
|
14
|
+
}, string, import('vue').PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
15
|
+
"onUpdate:modelValue"?: ((value: number) => any) | undefined;
|
|
16
|
+
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
17
|
+
declare const _default: typeof __VLS_export;
|
|
18
|
+
export default _default;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
label?: string;
|
|
3
|
+
tooltip?: string;
|
|
4
|
+
min?: number;
|
|
5
|
+
max?: number;
|
|
6
|
+
};
|
|
7
|
+
type __VLS_ModelProps = {
|
|
8
|
+
modelValue: {
|
|
9
|
+
x: number;
|
|
10
|
+
y: number;
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
|
|
14
|
+
declare const __VLS_export: import('vue').DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
15
|
+
"update:modelValue": (value: {
|
|
16
|
+
x: number;
|
|
17
|
+
y: number;
|
|
18
|
+
}) => any;
|
|
19
|
+
}, string, import('vue').PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
20
|
+
"onUpdate:modelValue"?: ((value: {
|
|
21
|
+
x: number;
|
|
22
|
+
y: number;
|
|
23
|
+
}) => any) | undefined;
|
|
24
|
+
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
25
|
+
declare const _default: typeof __VLS_export;
|
|
26
|
+
export default _default;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
label?: string;
|
|
3
|
+
tooltip?: string;
|
|
4
|
+
options: {
|
|
5
|
+
value: string | number;
|
|
6
|
+
label: string;
|
|
7
|
+
}[];
|
|
8
|
+
};
|
|
9
|
+
type __VLS_ModelProps = {
|
|
10
|
+
modelValue: string | number;
|
|
11
|
+
};
|
|
12
|
+
type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
|
|
13
|
+
declare const __VLS_export: import('vue').DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
14
|
+
"update:modelValue": (value: string | number) => any;
|
|
15
|
+
}, string, import('vue').PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
16
|
+
"onUpdate:modelValue"?: ((value: string | number) => any) | undefined;
|
|
17
|
+
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
18
|
+
declare const _default: typeof __VLS_export;
|
|
19
|
+
export default _default;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
declare const __VLS_export: import('vue').DefineComponent<{}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
2
|
+
declare const _default: typeof __VLS_export;
|
|
3
|
+
export default _default;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
label?: string;
|
|
3
|
+
tooltip?: string;
|
|
4
|
+
min?: number;
|
|
5
|
+
max?: number;
|
|
6
|
+
step?: number | null;
|
|
7
|
+
};
|
|
8
|
+
type __VLS_ModelProps = {
|
|
9
|
+
modelValue: number;
|
|
10
|
+
};
|
|
11
|
+
type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
|
|
12
|
+
declare const __VLS_export: import('vue').DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
13
|
+
"update:modelValue": (value: number) => any;
|
|
14
|
+
}, string, import('vue').PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
15
|
+
"onUpdate:modelValue"?: ((value: number) => any) | undefined;
|
|
16
|
+
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
17
|
+
declare const _default: typeof __VLS_export;
|
|
18
|
+
export default _default;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
tabs: string[];
|
|
3
|
+
tooltips?: string[];
|
|
4
|
+
};
|
|
5
|
+
type __VLS_ModelProps = {
|
|
6
|
+
modelValue?: number;
|
|
7
|
+
};
|
|
8
|
+
type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
|
|
9
|
+
declare var __VLS_16: string, __VLS_17: {};
|
|
10
|
+
type __VLS_Slots = {} & {
|
|
11
|
+
[K in NonNullable<typeof __VLS_16>]?: (props: typeof __VLS_17) => any;
|
|
12
|
+
};
|
|
13
|
+
declare const __VLS_base: import('vue').DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
14
|
+
"update:modelValue": (value: number) => any;
|
|
15
|
+
}, string, import('vue').PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
16
|
+
"onUpdate:modelValue"?: ((value: number) => any) | undefined;
|
|
17
|
+
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
18
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
19
|
+
declare const _default: typeof __VLS_export;
|
|
20
|
+
export default _default;
|
|
21
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
22
|
+
new (): {
|
|
23
|
+
$slots: S;
|
|
24
|
+
};
|
|
25
|
+
};
|