@leavepulse/ui 0.45.1 → 0.47.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/dist/assets/HighlightText-BwC5xbqn.css +6 -0
- package/dist/assets/{LpCommandPalette-HzAA4gri.css → LpCommandPalette-DmQUsJqA.css} +21 -21
- package/dist/assets/{LpDropzone-i4BdMi1H.css → LpDropzone-Ev6X03zj.css} +12 -12
- package/dist/assets/LpKeys-BxRhfQda.css +36 -0
- package/dist/assets/LpPaletteFacts-B9FdVmIO.css +93 -0
- package/dist/assets/LpPaletteHeader-BVOu1UX5.css +70 -0
- package/dist/assets/LpPalettePreview-CJmAKgYW.css +43 -0
- package/dist/assets/LpPaletteStats-ClE-37MK.css +33 -0
- package/dist/assets/LpPaletteSwatches-CA0B8y2E.css +21 -0
- package/dist/assets/{LpShortcutsDialog-CqYX3yy6.css → LpShortcutsDialog-BUp_BX4s.css} +7 -28
- package/dist/assets/{LpTable-CPwWxTJS.css → LpTable-xWwI4KPZ.css} +17 -17
- package/dist/chunks/HighlightText-BvnYZkhi.js +27 -0
- package/dist/chunks/{LpAddressInput-CJOYGZlI.js → LpAddressInput-iOJhmRzy.js} +1 -1
- package/dist/chunks/{LpAppShell-B07Lf48e.js → LpAppShell-BmMYcEVx.js} +2 -2
- package/dist/chunks/{LpAvatar-C1XStdOo.js → LpAvatar-Cb1jtOVv.js} +22 -4
- package/dist/chunks/{LpCard-C2IvucmX.js → LpCard-BdxkMXjo.js} +1 -1
- package/dist/chunks/{LpColorPicker-zz4VGkG4.js → LpColorPicker-BLqPX5Vw.js} +1 -1
- package/dist/chunks/{LpConfirmDialog-BTVAR4tF.js → LpConfirmDialog-Ca-CTlxT.js} +1 -1
- package/dist/chunks/{LpConfirmHost-Ci_uCHgQ.js → LpConfirmHost-BAaSaT2b.js} +1 -1
- package/dist/chunks/{LpContextMenu-BqkAYa9X.js → LpContextMenu-1cKew_Dc.js} +17 -4
- package/dist/chunks/{LpDrawer-CfRhHwmE.js → LpDrawer-CBFVD624.js} +1 -1
- package/dist/chunks/{LpDropdownMenu-DdJGQzPn.js → LpDropdownMenu-DrpJJBp0.js} +22 -8
- package/dist/chunks/{LpFileTree-CNurOvkV.js → LpFileTree-bk5VjBey.js} +2 -2
- package/dist/chunks/{LpFileTreeNode-D_qRRdsH.js → LpFileTreeNode-BvMSBM7X.js} +1 -1
- package/dist/chunks/{LpLightbox-DSDahF23.js → LpLightbox-EVXzAq62.js} +3 -3
- package/dist/chunks/{LpLogViewer-KypbgOyo.js → LpLogViewer-BDFXzvcl.js} +2 -2
- package/dist/chunks/{LpMediaGallery-YKr-cQPN.js → LpMediaGallery-BnlkN_1f.js} +1 -1
- package/dist/chunks/{LpModal-BzTVeNqe.js → LpModal-JNa3B_Lr.js} +12 -5
- package/dist/chunks/{LpModalNav-CjABSGCu.js → LpModalNav-BAxC9et7.js} +10 -3
- package/dist/chunks/{LpNotificationBell-CCwyJP5C.js → LpNotificationBell-DsqSyMwS.js} +2 -2
- package/dist/chunks/LpPalettePreview-CFav_7co.js +19 -0
- package/dist/chunks/{LpPie-BEJ2SfI6.js → LpPie-BdSnta11.js} +1 -1
- package/dist/chunks/{LpScrollArea-Bry1fdOM.js → LpScrollArea-Hz3-JWUG.js} +23 -5
- package/dist/chunks/{LpSidebar-Bwws_X29.js → LpSidebar-DpEiGi8L.js} +2 -2
- package/dist/chunks/{LpSidebarNav-kx-LdqNU.js → LpSidebarNav-BUuxipX-.js} +2 -2
- package/dist/chunks/{LpThemeSwitcher-B4aVPbNC.js → LpThemeSwitcher-BbYFFT5w.js} +1 -1
- package/dist/chunks/MenuTitle-J3ZDYjpV.js +56 -0
- package/dist/component-names.d.ts +1 -1
- package/dist/components/HighlightText.vue.d.ts +7 -0
- package/dist/components/HighlightText.vue.js +4 -0
- package/dist/components/LpAddressInput.vue.js +1 -1
- package/dist/components/LpAppShell.vue.js +1 -1
- package/dist/components/LpAvatar.vue.d.ts +12 -0
- package/dist/components/LpAvatar.vue.js +1 -1
- package/dist/components/LpCard.vue.js +1 -1
- package/dist/components/LpChart.vue.js +1 -1
- package/dist/components/LpColorPicker.vue.js +1 -1
- package/dist/components/LpCommandPalette.vue.d.ts +152 -15
- package/dist/components/LpCommandPalette.vue.js +181 -92
- package/dist/components/LpConfirmDialog.vue.js +1 -1
- package/dist/components/LpConfirmHost.vue.js +1 -1
- package/dist/components/LpContextMenu.vue.d.ts +11 -0
- package/dist/components/LpContextMenu.vue.js +1 -1
- package/dist/components/LpDrawer.vue.js +1 -1
- package/dist/components/LpDropdownMenu.vue.d.ts +6 -0
- package/dist/components/LpDropdownMenu.vue.js +1 -1
- package/dist/components/LpDropzone.vue.d.ts +14 -0
- package/dist/components/LpDropzone.vue.js +9 -7
- package/dist/components/LpFileTree.vue.js +1 -1
- package/dist/components/LpFileTreeNode.vue.js +1 -1
- package/dist/components/LpKeys.vue.d.ts +22 -0
- package/dist/components/LpKeys.vue.js +52 -0
- package/dist/components/LpLightbox.vue.js +1 -1
- package/dist/components/LpLogViewer.vue.js +1 -1
- package/dist/components/LpMediaGallery.vue.js +1 -1
- package/dist/components/LpModal.vue.d.ts +7 -5
- package/dist/components/LpModal.vue.js +1 -1
- package/dist/components/LpModalNav.vue.d.ts +5 -3
- package/dist/components/LpModalNav.vue.js +1 -1
- package/dist/components/LpNotificationBell.vue.js +1 -1
- package/dist/components/LpPaletteFacts.vue.d.ts +25 -0
- package/dist/components/LpPaletteFacts.vue.js +85 -0
- package/dist/components/LpPaletteHeader.vue.d.ts +32 -0
- package/dist/components/LpPaletteHeader.vue.js +103 -0
- package/dist/components/LpPalettePreview.vue.d.ts +19 -0
- package/dist/components/LpPalettePreview.vue.js +4 -0
- package/dist/components/LpPaletteStats.vue.d.ts +11 -0
- package/dist/components/LpPaletteStats.vue.js +47 -0
- package/dist/components/LpPaletteSwatches.vue.d.ts +10 -0
- package/dist/components/LpPaletteSwatches.vue.js +34 -0
- package/dist/components/LpPie.vue.js +1 -1
- package/dist/components/LpScrollArea.vue.d.ts +2 -2
- package/dist/components/LpScrollArea.vue.js +1 -1
- package/dist/components/LpShortcutsDialog.vue.js +9 -29
- package/dist/components/LpSidebar.vue.js +1 -1
- package/dist/components/LpSidebarNav.vue.js +1 -1
- package/dist/components/LpTable.vue.js +8 -6
- package/dist/components/LpThemeSwitcher.vue.js +1 -1
- package/dist/components/MenuTitle.vue.d.ts +9 -0
- package/dist/components/MenuTitle.vue.js +4 -0
- package/dist/components/commandPalette.d.ts +157 -0
- package/dist/components/commandPalette.js +103 -0
- package/dist/components/commandSearch.d.ts +32 -0
- package/dist/components/commandSearch.js +48 -0
- package/dist/components/keys.d.ts +2 -0
- package/dist/components/keys.js +11 -0
- package/dist/composables/useClipboard.js +35 -2
- package/dist/index.d.ts +12 -3
- package/dist/index.js +161 -138
- package/package.json +1 -1
- package/src/component-names.ts +6 -0
- package/src/components/HighlightText.vue +28 -0
- package/src/components/LpAvatar.vue +21 -2
- package/src/components/LpCommandPalette.vue +392 -86
- package/src/components/LpContextMenu.vue +19 -1
- package/src/components/LpDropdownMenu.vue +14 -2
- package/src/components/LpDropzone.vue +13 -5
- package/src/components/LpKeys.vue +79 -0
- package/src/components/LpLightbox.vue +4 -1
- package/src/components/LpModal.vue +7 -1
- package/src/components/LpModalNav.vue +4 -0
- package/src/components/LpPaletteFacts.vue +165 -0
- package/src/components/LpPaletteHeader.vue +155 -0
- package/src/components/LpPalettePreview.vue +77 -0
- package/src/components/LpPaletteStats.vue +81 -0
- package/src/components/LpPaletteSwatches.vue +56 -0
- package/src/components/LpScrollArea.vue +30 -2
- package/src/components/LpShortcutsDialog.vue +2 -45
- package/src/components/LpTable.vue +7 -2
- package/src/components/MenuTitle.vue +34 -0
- package/src/components/commandPalette.ts +264 -0
- package/src/components/commandSearch.ts +79 -0
- package/src/components/keys.ts +13 -0
- package/src/composables/useClipboard.ts +49 -7
- package/src/index.ts +12 -3
|
@@ -5,6 +5,12 @@ declare const __VLS_export: import("vue").DefineComponent<{
|
|
|
5
5
|
src?: string;
|
|
6
6
|
alt?: string;
|
|
7
7
|
fallback?: string;
|
|
8
|
+
/**
|
|
9
|
+
* An icon shown while there is no picture, instead of initials. For things
|
|
10
|
+
* that have no name worth abbreviating (a world, a mod, a file), where two
|
|
11
|
+
* letters read as noise. `fallback` text still wins when both are given.
|
|
12
|
+
*/
|
|
13
|
+
icon?: string;
|
|
8
14
|
size?: "md" | "sm" | "lg" | "xs" | "xl" | undefined;
|
|
9
15
|
/** Explicit pixel size, wins over `size` — for avatars keyed to a layout. */
|
|
10
16
|
pixelSize?: number;
|
|
@@ -18,6 +24,12 @@ declare const __VLS_export: import("vue").DefineComponent<{
|
|
|
18
24
|
src?: string;
|
|
19
25
|
alt?: string;
|
|
20
26
|
fallback?: string;
|
|
27
|
+
/**
|
|
28
|
+
* An icon shown while there is no picture, instead of initials. For things
|
|
29
|
+
* that have no name worth abbreviating (a world, a mod, a file), where two
|
|
30
|
+
* letters read as noise. `fallback` text still wins when both are given.
|
|
31
|
+
*/
|
|
32
|
+
icon?: string;
|
|
21
33
|
size?: "md" | "sm" | "lg" | "xs" | "xl" | undefined;
|
|
22
34
|
/** Explicit pixel size, wins over `size` — for avatars keyed to a layout. */
|
|
23
35
|
pixelSize?: number;
|
|
@@ -5,7 +5,7 @@ import { prefersReducedMotion, easeTravel } from "../composables/easing.js";
|
|
|
5
5
|
import { usePillTransition } from "../composables/usePillTransition.js";
|
|
6
6
|
import { useReveal } from "../composables/useReveal.js";
|
|
7
7
|
import { normalise, pointCount, resolveLabels, extent, axisTicks, plotHeight, plotWidth, xAt, yAt, areaPath, linePath, barPath, markerIndex, chartSummary, niceScale, nearestIndex, formatTick } from "./chart.js";
|
|
8
|
-
import { _ as _sfc_main$1 } from "../chunks/LpContextMenu-
|
|
8
|
+
import { _ as _sfc_main$1 } from "../chunks/LpContextMenu-1cKew_Dc.js";
|
|
9
9
|
import { _ as _sfc_main$2 } from "../chunks/LpIcon-DYtaid0K.js";
|
|
10
10
|
import { _ as _sfc_main$3 } from "../chunks/LpShift-DXNsauQZ.js";
|
|
11
11
|
import { useMergedAttrs } from "../composables/useMergedClass.js";
|
|
@@ -1,3 +1,20 @@
|
|
|
1
|
+
import { type HighlightPart, type PaletteQuery } from "./commandSearch";
|
|
2
|
+
import { type RecentEntry, type RecentItem } from "./commandPalette";
|
|
3
|
+
/**
|
|
4
|
+
* A picture in a row's icon slot: an avatar, a project logo, a world's
|
|
5
|
+
* thumbnail. While it loads, and for good if it fails, the row shows
|
|
6
|
+
* `fallback` (initials) or else `icon`, so a dead link never leaves a hole.
|
|
7
|
+
*/
|
|
8
|
+
export interface CommandImage {
|
|
9
|
+
src?: string | null;
|
|
10
|
+
alt?: string;
|
|
11
|
+
/** Text shown while there is no picture, usually initials. */
|
|
12
|
+
fallback?: string;
|
|
13
|
+
/** Icon shown while there is no picture; the command's `icon` when unset. */
|
|
14
|
+
icon?: string;
|
|
15
|
+
/** circle for people, soft or square for things. Defaults to soft. */
|
|
16
|
+
shape?: "circle" | "soft" | "square";
|
|
17
|
+
}
|
|
1
18
|
export interface Command {
|
|
2
19
|
id: string;
|
|
3
20
|
label: string;
|
|
@@ -17,6 +34,12 @@ export interface Command {
|
|
|
17
34
|
*/
|
|
18
35
|
highlight?: string[];
|
|
19
36
|
icon?: string;
|
|
37
|
+
/**
|
|
38
|
+
* A picture in place of the icon: a URL, or a `CommandImage` with a
|
|
39
|
+
* fallback. Sized like the icon and faded in once loaded; until then, and
|
|
40
|
+
* when it fails, the fallback (or `icon`) holds the slot.
|
|
41
|
+
*/
|
|
42
|
+
image?: string | CommandImage;
|
|
20
43
|
/** Right-aligned hint, e.g. "⌘P". */
|
|
21
44
|
shortcut?: string;
|
|
22
45
|
/** Extra search terms not shown but matched against the query. */
|
|
@@ -37,11 +60,60 @@ export interface Command {
|
|
|
37
60
|
* and what lets the second step search a list too big to enumerate.
|
|
38
61
|
*
|
|
39
62
|
* `onSelect` still runs when the mode opens, so a command can both act and
|
|
40
|
-
* drill in.
|
|
63
|
+
* drill in. A fetcher is called like `search` (see CommandFetcher): its
|
|
64
|
+
* abort signal may never reach the transport, and an answer that lands
|
|
65
|
+
* after the query moved on or the mode was left is discarded.
|
|
41
66
|
*/
|
|
42
|
-
children?: Command[] |
|
|
67
|
+
children?: Command[] | CommandFetcher;
|
|
43
68
|
/** Placeholder while inside this command's mode. */
|
|
44
69
|
childPlaceholder?: string;
|
|
70
|
+
/**
|
|
71
|
+
* The mode's name in the chip beside the box, when the row's label is a
|
|
72
|
+
* sentence: "Mods" for a row reading `Search mods for "{query}"`. Without
|
|
73
|
+
* it a `{query}` placeholder and its quotes are dropped from the label.
|
|
74
|
+
*/
|
|
75
|
+
modeLabel?: string;
|
|
76
|
+
/**
|
|
77
|
+
* Typed at the start of the box, enters this command's mode directly, and
|
|
78
|
+
* whatever follows the prefix becomes the query inside it: ">" for
|
|
79
|
+
* commands, "mr " for a mod search. Only for a command with `children`,
|
|
80
|
+
* matched against the list on screen (the root, or the open mode's own
|
|
81
|
+
* static children), longest prefix first, letters in any case. Entering
|
|
82
|
+
* this way does not run `onSelect`. The row shows the prefix as its hint
|
|
83
|
+
* when it has no `shortcut`.
|
|
84
|
+
*/
|
|
85
|
+
prefix?: string;
|
|
86
|
+
/**
|
|
87
|
+
* Opening this mode takes the query typed so far along, operators and
|
|
88
|
+
* all, so typing "sodium", arrowing to "Search mods" and pressing Enter
|
|
89
|
+
* opens the mod search already searching for sodium instead of starting
|
|
90
|
+
* it empty. Backspace out of the mode restores the query as it was.
|
|
91
|
+
*/
|
|
92
|
+
carryQuery?: boolean;
|
|
93
|
+
/**
|
|
94
|
+
* A "search somewhere else" row: listed only while words are typed, for
|
|
95
|
+
* any words (it is not matched against them), after local and fetched
|
|
96
|
+
* results: at the end of the list, or of its group when that group is
|
|
97
|
+
* already listed. `{query}` in the label becomes the
|
|
98
|
+
* typed words without the operators, `Search Modrinth for "{query}"`;
|
|
99
|
+
* `-word` and `in:group` still apply to the row's own label, keywords and
|
|
100
|
+
* group. Usually a mode with `carryQuery`, so picking it runs the search.
|
|
101
|
+
*/
|
|
102
|
+
fallback?: boolean;
|
|
103
|
+
/**
|
|
104
|
+
* Keep this out of the recent history. Picks are remembered wherever they
|
|
105
|
+
* are made, inside modes and among fetched results too; a pick that is a
|
|
106
|
+
* setting rather than a destination (a language, a zoom step) can opt out.
|
|
107
|
+
* Rows offered by Tab (`actions`) are never remembered.
|
|
108
|
+
*/
|
|
109
|
+
remember?: boolean;
|
|
110
|
+
/**
|
|
111
|
+
* A JSON-safe value stored with this command in the recent history and
|
|
112
|
+
* handed back to `resolveRecent`: what an app needs to rebuild a result
|
|
113
|
+
* that a search fetched (a project id, a hit), since the command's
|
|
114
|
+
* functions cannot be stored.
|
|
115
|
+
*/
|
|
116
|
+
recentData?: unknown;
|
|
45
117
|
/**
|
|
46
118
|
* Keep the palette open after this runs. For a command that toggles
|
|
47
119
|
* something the user may want to toggle again (a theme, a filter) without
|
|
@@ -69,8 +141,35 @@ export interface Command {
|
|
|
69
141
|
* breaks are kept. Without it the pane shows the `excerpt`.
|
|
70
142
|
*/
|
|
71
143
|
preview?: string;
|
|
144
|
+
/**
|
|
145
|
+
* This row has nothing for the pane, even with a `#preview` slot: the pane
|
|
146
|
+
* folds away while it is highlighted instead of the slot having to draw a
|
|
147
|
+
* placeholder. For a whole class of rows, `hasPreview` says it once.
|
|
148
|
+
*/
|
|
149
|
+
noPreview?: boolean;
|
|
72
150
|
onSelect?: () => void;
|
|
73
151
|
}
|
|
152
|
+
/**
|
|
153
|
+
* Commands fetched for a query: `search` at the root, a function `children`
|
|
154
|
+
* inside a mode.
|
|
155
|
+
*
|
|
156
|
+
* `query` is the box's positive words only, in the case they were typed:
|
|
157
|
+
* `sodium -forge in:mods` arrives as "sodium", because a server would treat
|
|
158
|
+
* the operators as words to find. They come in `parsed` instead (a
|
|
159
|
+
* PaletteQuery: `raw`, `text`, lowercased `include`, `exclude` and `groups`)
|
|
160
|
+
* for a provider that can scope or exclude on its side; either way the
|
|
161
|
+
* palette drops returned rows that match an exclusion or miss an `in:` scope.
|
|
162
|
+
*
|
|
163
|
+
* `signal` aborts when the query moves on, the mode is left or the palette
|
|
164
|
+
* closes. It is a courtesy, not a guarantee: hand it to `fetch` and the
|
|
165
|
+
* request is cancelled, but a transport that cannot be cancelled (a Tauri
|
|
166
|
+
* `invoke`, a worker message, most SDKs) never sees it and runs to the end.
|
|
167
|
+
* That is safe: an answer that lands after a newer request was made, or
|
|
168
|
+
* after the palette closed, is discarded and never reaches the list, so a
|
|
169
|
+
* fetcher does not need to check the signal itself. Checking it before an
|
|
170
|
+
* expensive step is only a saving.
|
|
171
|
+
*/
|
|
172
|
+
export type CommandFetcher = (query: string, signal: AbortSignal, parsed: PaletteQuery) => Command[] | Promise<Command[]>;
|
|
74
173
|
/** Footer hints and the mode chip, spelled out so an app can translate them. */
|
|
75
174
|
export type PaletteLabels = {
|
|
76
175
|
navigate: string;
|
|
@@ -113,28 +212,46 @@ type __VLS_Props = {
|
|
|
113
212
|
* (or too remote) to hand over as a list: people, files, tickets. Called
|
|
114
213
|
* debounced, never for a query shorter than `minChars`, and only its
|
|
115
214
|
* newest call counts: an earlier one that lands late is dropped, so a slow
|
|
116
|
-
* response can't overwrite a fresher list.
|
|
215
|
+
* response can't overwrite a fresher list. The abort signal may never
|
|
216
|
+
* reach the transport (a Tauri invoke cannot be cancelled); the late
|
|
217
|
+
* answer is discarded all the same. See CommandFetcher for what
|
|
218
|
+
* `query` and `parsed` hold: the operators are stripped from the first,
|
|
219
|
+
* and the palette applies them to the results itself.
|
|
117
220
|
*
|
|
118
221
|
* Results join the static commands, so a palette can do both.
|
|
119
222
|
*/
|
|
120
|
-
search?:
|
|
223
|
+
search?: CommandFetcher;
|
|
121
224
|
/** Wait after the last keystroke before `search` runs. */
|
|
122
225
|
debounce?: number;
|
|
123
|
-
/** Shortest query `search` runs for. */
|
|
226
|
+
/** Shortest query `search` runs for, counted on its positive words. */
|
|
124
227
|
minChars?: number;
|
|
125
228
|
/**
|
|
126
|
-
*
|
|
127
|
-
*
|
|
128
|
-
*
|
|
129
|
-
*
|
|
229
|
+
* Recently picked commands, newest first — bind it to storage and the
|
|
230
|
+
* palette opens on what this person actually uses. An item is a root
|
|
231
|
+
* command's id, or a RecentEntry for a pick made inside a mode or among
|
|
232
|
+
* fetched results (the `remember` event hands over exactly what to
|
|
233
|
+
* store; `pushRecent` adds it to a list). A root id only reorders
|
|
234
|
+
* commands already in the list. An entry is found again down its path
|
|
235
|
+
* of static children, then through `resolveRecent`, then from its own
|
|
236
|
+
* `href`; what none of them finds is skipped, so a stored history never
|
|
237
|
+
* resurrects a command that has gone away.
|
|
130
238
|
*/
|
|
131
|
-
recent?:
|
|
239
|
+
recent?: RecentItem[];
|
|
132
240
|
/**
|
|
133
241
|
* Let the palette keep the history itself, in localStorage under this key:
|
|
134
|
-
* every
|
|
135
|
-
* `recent` is bound, which
|
|
242
|
+
* every pick is remembered, newest first, root ones as bare ids as before
|
|
243
|
+
* and deeper ones as entries. Ignored while `recent` is bound, which
|
|
244
|
+
* stays the way to store it somewhere else.
|
|
136
245
|
*/
|
|
137
246
|
recentKey?: string;
|
|
247
|
+
/**
|
|
248
|
+
* Finds the live command for a remembered pick the palette cannot find
|
|
249
|
+
* itself: a result a fetcher returned, or one inside a mode whose
|
|
250
|
+
* children are fetched. Gets the stored entry, with the command's
|
|
251
|
+
* `recentData` as `data`; returns the command to show and run, or
|
|
252
|
+
* nothing to drop it.
|
|
253
|
+
*/
|
|
254
|
+
resolveRecent?: (entry: RecentEntry) => Command | null | undefined;
|
|
138
255
|
/** How many recent commands to surface. */
|
|
139
256
|
recentLimit?: number;
|
|
140
257
|
/** Headings the palette adds itself. */
|
|
@@ -155,8 +272,10 @@ type __VLS_Props = {
|
|
|
155
272
|
* `preview` text, or the `preview` slot. For palettes that search
|
|
156
273
|
* content rather than commands: the excerpt says why a row matched, the
|
|
157
274
|
* pane lets it be read without leaving the page. It opens only for a row
|
|
158
|
-
* with `preview` or `excerpt` (any row, with the slot
|
|
159
|
-
*
|
|
275
|
+
* with `preview` or `excerpt` (any row, with the slot, unless `hasPreview`
|
|
276
|
+
* or the row's `noPreview` says otherwise): the dialog eases wider, the
|
|
277
|
+
* pane slides in, and the text arrives paragraph by paragraph. A slot
|
|
278
|
+
* that renders nothing for a row falls back to that built-in text.
|
|
160
279
|
* Hidden below the md breakpoint, where there is no room beside the list.
|
|
161
280
|
*
|
|
162
281
|
* The width is an inline style rather than a pair of classes: a base
|
|
@@ -164,6 +283,14 @@ type __VLS_Props = {
|
|
|
164
283
|
* build in an order where the base won, and the pane opened squeezed.
|
|
165
284
|
*/
|
|
166
285
|
previewPane?: boolean;
|
|
286
|
+
/**
|
|
287
|
+
* Which rows the pane opens for. With a `#preview` slot every row would
|
|
288
|
+
* otherwise qualify, and an app whose previews cover only some kinds of
|
|
289
|
+
* row had to draw a placeholder for the rest. Return false and the pane
|
|
290
|
+
* folds away for that row, as it does for a row without text. A row's
|
|
291
|
+
* own `noPreview` wins over this.
|
|
292
|
+
*/
|
|
293
|
+
hasPreview?: (command: Command) => boolean;
|
|
167
294
|
/**
|
|
168
295
|
* Frosted glass instead of a solid panel: the page shows through,
|
|
169
296
|
* blurred, under a lighter scrim (.lp-glass-overlay, .lp-scrim--light).
|
|
@@ -173,19 +300,29 @@ type __VLS_Props = {
|
|
|
173
300
|
glass?: boolean;
|
|
174
301
|
};
|
|
175
302
|
type __VLS_Slots = {
|
|
176
|
-
/**
|
|
303
|
+
/**
|
|
304
|
+
* Body of the preview pane for the highlighted command. `highlight(text)`
|
|
305
|
+
* splits any text around the words typed (positive terms only, plus the
|
|
306
|
+
* command's own `highlight` words), the same matching the rows use; the
|
|
307
|
+
* LpPalette* blocks take its result wherever they take text, and
|
|
308
|
+
* `query` is the parsed box for anything else.
|
|
309
|
+
*/
|
|
177
310
|
preview?: (props: {
|
|
178
311
|
command: Command;
|
|
312
|
+
highlight: (text: string) => HighlightPart[];
|
|
313
|
+
query: PaletteQuery;
|
|
179
314
|
}) => unknown;
|
|
180
315
|
};
|
|
181
316
|
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
182
317
|
select: (command: Command) => any;
|
|
183
318
|
"update:open": (value: boolean) => any;
|
|
184
319
|
run: (id: string, command: Command) => any;
|
|
320
|
+
remember: (item: RecentItem, command: Command) => any;
|
|
185
321
|
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
186
322
|
onSelect?: ((command: Command) => any) | undefined;
|
|
187
323
|
"onUpdate:open"?: ((value: boolean) => any) | undefined;
|
|
188
324
|
onRun?: ((id: string, command: Command) => any) | undefined;
|
|
325
|
+
onRemember?: ((item: RecentItem, command: Command) => any) | undefined;
|
|
189
326
|
}>, {
|
|
190
327
|
placeholder: string;
|
|
191
328
|
emptyText: string;
|