Skip to content

Commit fe2ae0c

Browse files
committed
Merge branch 'main' into feat/invert
2 parents 313ee39 + 86bf74f commit fe2ae0c

21 files changed

+174
-158
lines changed

.eslintrc.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ module.exports = {
44
node: true
55
},
66
extends: [
7-
'plugin:vue/vue3-essential',
7+
'plugin:vue/vue3-recommended',
88
'@vue/standard'
99
],
1010
parserOptions: {

README.md

Lines changed: 33 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -119,24 +119,24 @@ export default {
119119
Some properties can be changed, therefore, adding the `v-model` directive is
120120
required.
121121

122-
| Property | Description | Type | Default value | Required | `v-model` |
123-
| -------------------- | ----------------------------------------------- | ---------- | ----------------------------- | -------- | --------- |
124-
| `commands` | See [Commands](#commands) | `Object` | `{}` | No | No |
125-
| `cursor-position` | Cursor position | `Number` | `0` | No | Yes |
126-
| `dispatched-queries` | Non-empty dispatched queries, successful or not | `Set` | `new Set()` | No | Yes |
127-
| `event-resolver` | See [Event resolver](#Event-resolver) section | `Function` | See `newDefaultEventResolver` | No | No |
128-
| `help-text` | Command help | `String` | `''` | No | Yes |
129-
| `help-timeout` | Command help timeout | `Number` | `3000` | No | No |
130-
| `hide-bar` | Hides the bar | `Boolean` | `false` | No | No |
131-
| `hide-prompt` | Hides the prompt | `Boolean` | `false` | No | No |
132-
| `history` | Terminal history | `Array` | `[]` | No | Yes |
133-
| `history-position` | Points to the latest dispatched query entry | `Number` | `0` | No | Yes |
134-
| `is-fullscreen` | Terminal fullscreen mode | `Boolean` | `false` | No | Yes |
135-
| `options-resolver` | See [Options resolver](#Options-resolver) | `Function` | `null` | No | No |
136-
| `parser` | Query parser | `Function` | See `defaultParser` | No | No |
137-
| `prompt` | Terminal prompt | `String` | `~$` | No | No |
138-
| `show-help` | Show query help | `Boolean` | `false` | No | No |
139-
| `query` | Terminal query | `String` | `''` | No | Yes |
122+
| Property | Description | Type | Default value | Required | `v-model` |
123+
| -------------------- | --------------------------------------------- | ---------- | ----------------------------- | -------- | --------- |
124+
| `commands` | See [Commands](#commands) | `Object` | `{}` | No | No |
125+
| `cursor-position` | Cursor position | `Number` | `0` | No | Yes |
126+
| `dispatched-queries` | Non-empty dispatched queries | `Set` | `new Set()` | No | Yes |
127+
| `event-resolver` | See [Event resolver](#Event-resolver) section | `Function` | See `newDefaultEventResolver` | No | No |
128+
| `help-text` | Command help | `String` | `''` | No | Yes |
129+
| `help-timeout` | Command help timeout | `Number` | `3000` | No | No |
130+
| `hide-bar` | Hides the bar | `Boolean` | `false` | No | No |
131+
| `hide-prompt` | Hides the prompt | `Boolean` | `false` | No | No |
132+
| `history` | Terminal history | `Array` | `[]` | No | Yes |
133+
| `history-position` | Points to the latest dispatched query entry | `Number` | `0` | No | Yes |
134+
| `is-fullscreen` | Terminal fullscreen mode | `Boolean` | `false` | No | Yes |
135+
| `options-resolver` | See [Options resolver](#Options-resolver) | `Function` | `null` | No | No |
136+
| `parser` | Query parser | `Function` | See `defaultParser` | No | No |
137+
| `prompt` | Terminal prompt | `String` | `~$` | No | No |
138+
| `show-help` | Show query help | `Boolean` | `false` | No | No |
139+
| `query` | Terminal query | `String` | `''` | No | Yes |
140140

141141
### Commands
142142

@@ -181,7 +181,7 @@ Library provides helper methods to render terminal related content.
181181
| Function | Parameters | Description |
182182
| ----------------------------- | ------------------------------------------------------------------ | ------------------------------------- |
183183
| `createCommandNotFound` | `command, text = 'command not found', name = 'VueCommandNotFound'` | Creates a command not found component |
184-
| `createStdout` | `formatter, name = 'VueCommandStdout'` | Creates a "stdout" component |
184+
| `createStdout` | `formatterOrText, name = 'VueCommandStdout'` | Creates a "stdout" component |
185185
| `createQuery` | | Creates a query component |
186186
| `defaultHistoryEventResolver` | `refs, eventProvider` | Returns the default history resolver |
187187
| `defaultParser` | `query` | Returns the default parser |
@@ -199,8 +199,9 @@ import { createStdout, createQuery } from "vue-command";
199199

200200
### Formatters
201201

202-
`createStdout` requires a formatter as the first argument to format the content
203-
as a list or table or something else.
202+
The first argument of `createStdout` can be either a primitive
203+
(`boolean`, `number` or `string`) or a formatter. A formatter formats the
204+
content as a list or table or something else.
204205

205206
| Formatters |
206207
| ---------------- |
@@ -214,6 +215,8 @@ Formatters can be imported by name:
214215
import { listFormatter } from "vue-command";
215216
```
216217

218+
Another possible formatter could be a `jsonFormatter`.
219+
217220
## Provided
218221

219222
| Provided |
@@ -260,13 +263,21 @@ inject: ["exit", "terminal"],
260263
| `setQuery` |
261264
| `terminal` |
262265

266+
## Events
267+
268+
| Name | Description |
269+
| ------------------- | ---------------------------------- |
270+
| `closeClicked` | Emitted on button close click |
271+
| `minimizeClicked` | Emitted on button minimize click |
272+
| `fullscreenClicked` | Emitted on button fullscreen click |
273+
263274
## Nice-to-haves
264275

265276
These features didn't make it into the last release. If you would like to
266277
contribute please consult `CONTRIBUTING.md`.
267278

268279
- Draggable terminal
269-
- Events (like query dispatched, close button clicked, etc.)
280+
- More events (like query dispatched)
270281
- More terminal slots
271282
- Multi-line queries
272283
- Syntax highlighting

docs/css/app.33ad189a.css.map

Lines changed: 0 additions & 1 deletion
This file was deleted.

docs/css/app.33ad189a.css renamed to docs/css/app.7170e878.css

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)