@leavepulse/ui 0.40.0 → 0.40.1
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.
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
|
|
2
|
+
/*
|
|
3
|
+
* Sizes for the split layout. Only the dialog's width animates: the list and
|
|
4
|
+
* the pane keep fixed widths, and the dialog — overflow hidden — uncovers the
|
|
5
|
+
* pane from its right edge as it grows. Animating the columns themselves made
|
|
6
|
+
* every line of the list and the pane re-wrap on every frame.
|
|
7
|
+
*/
|
|
8
|
+
.lp-cmd-dialog[data-v-27071a60] {
|
|
9
|
+
--lp-cmd-list: min(92vw, 40rem);
|
|
10
|
+
--lp-cmd-pane: max(0px, min(26rem, 96vw - var(--lp-cmd-list)));
|
|
11
|
+
width: var(--lp-cmd-list);
|
|
12
|
+
}
|
|
13
|
+
.lp-cmd-split[data-v-27071a60] {
|
|
14
|
+
transition:
|
|
15
|
+
width 300ms var(--ease-emphasized, ease),
|
|
16
|
+
min-height 300ms var(--ease-emphasized, ease);
|
|
17
|
+
}
|
|
18
|
+
@media (min-width: 768px) {
|
|
19
|
+
.lp-cmd-split .lp-cmd-list[data-v-27071a60] {
|
|
20
|
+
flex: 0 0 auto;
|
|
21
|
+
/* the dialog's 1px border on each side */
|
|
22
|
+
width: calc(var(--lp-cmd-list) - 2px);
|
|
23
|
+
}
|
|
24
|
+
.lp-cmd-dialog[data-pane="open"][data-v-27071a60] {
|
|
25
|
+
width: calc(var(--lp-cmd-list) + var(--lp-cmd-pane));
|
|
26
|
+
min-height: min(76vh, 36rem);
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
.lp-cmd-pane[data-v-27071a60] {
|
|
30
|
+
width: var(--lp-cmd-pane);
|
|
31
|
+
}
|
|
32
|
+
/*
|
|
33
|
+
* The pane rides in from the right edge while the dialog opens up to it, and
|
|
34
|
+
* leaves the same way, for as long as the dialog takes to close over it.
|
|
35
|
+
*/
|
|
36
|
+
.lp-cmd-pane-enter-active[data-v-27071a60],
|
|
37
|
+
.lp-cmd-pane-leave-active[data-v-27071a60] {
|
|
38
|
+
transition:
|
|
39
|
+
transform 300ms var(--ease-emphasized, ease),
|
|
40
|
+
opacity 300ms ease;
|
|
41
|
+
}
|
|
42
|
+
.lp-cmd-pane-enter-from[data-v-27071a60],
|
|
43
|
+
.lp-cmd-pane-leave-to[data-v-27071a60] {
|
|
44
|
+
opacity: 0;
|
|
45
|
+
transform: translateX(40%);
|
|
46
|
+
}
|
|
47
|
+
.lp-cmd-para[data-v-27071a60] {
|
|
48
|
+
animation: lp-cmd-para-in-27071a60 260ms ease-out both;
|
|
49
|
+
}
|
|
50
|
+
@keyframes lp-cmd-para-in-27071a60 {
|
|
51
|
+
from {
|
|
52
|
+
opacity: 0;
|
|
53
|
+
transform: translateY(4px);
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
@media (prefers-reduced-motion: reduce) {
|
|
57
|
+
.lp-cmd-split[data-v-27071a60],
|
|
58
|
+
.lp-cmd-pane-enter-active[data-v-27071a60],
|
|
59
|
+
.lp-cmd-pane-leave-active[data-v-27071a60] {
|
|
60
|
+
transition: none;
|
|
61
|
+
}
|
|
62
|
+
.lp-cmd-para[data-v-27071a60] {
|
|
63
|
+
animation: none;
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
.lp-cmd-excerpt[data-v-27071a60] {
|
|
67
|
+
display: -webkit-box;
|
|
68
|
+
-webkit-box-orient: vertical;
|
|
69
|
+
overflow: hidden;
|
|
70
|
+
}
|
|
71
|
+
/* Each result eases in; honours reduced motion. */
|
|
72
|
+
.lp-cmd-item[data-v-27071a60] {
|
|
73
|
+
animation: lp-cmd-in-27071a60 140ms ease-out both;
|
|
74
|
+
}
|
|
75
|
+
@keyframes lp-cmd-in-27071a60 {
|
|
76
|
+
from {
|
|
77
|
+
opacity: 0;
|
|
78
|
+
transform: translateY(3px);
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
@media (prefers-reduced-motion: reduce) {
|
|
82
|
+
.lp-cmd-item[data-v-27071a60] {
|
|
83
|
+
animation: none;
|
|
84
|
+
}
|
|
85
|
+
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent, computed, ref, useId, shallowRef, useSlots, watch, nextTick, openBlock, createBlock, unref, withCtx, createVNode, normalizeClass, withModifiers,
|
|
1
|
+
import { defineComponent, computed, ref, useId, shallowRef, useSlots, watch, nextTick, openBlock, createBlock, unref, withCtx, createVNode, normalizeClass, withModifiers, createTextVNode, createElementVNode, createElementBlock, Fragment, renderList, createCommentVNode, toDisplayString, withDirectives, withKeys, vModelText, resolveDynamicComponent, normalizeStyle, Transition, renderSlot } from "vue";
|
|
2
2
|
import { DialogRoot, DialogPortal, DialogOverlay, DialogContent, DialogTitle, DialogDescription } from "reka-ui";
|
|
3
3
|
import { _ as _sfc_main$1 } from "../chunks/LpIcon-CCnX5_2j.js";
|
|
4
4
|
import { _ as _sfc_main$2 } from "../chunks/LpScrollArea-D8xyKXcF.js";
|
|
@@ -6,7 +6,7 @@ import { useAsyncTask } from "../composables/useAsyncTask.js";
|
|
|
6
6
|
import { useClipboard } from "../composables/useClipboard.js";
|
|
7
7
|
import { useHotkeys } from "../composables/useHotkeys.js";
|
|
8
8
|
import { _ as _export_sfc } from "../chunks/_plugin-vue_export-helper-1tPrXgE0.js";
|
|
9
|
-
import '../assets/LpCommandPalette-
|
|
9
|
+
import '../assets/LpCommandPalette-DDGFwOom.css';const _hoisted_1 = { class: "flex shrink-0 items-center gap-2.5 border-b border-line px-4" };
|
|
10
10
|
const _hoisted_2 = ["title", "onClick"];
|
|
11
11
|
const _hoisted_3 = ["aria-activedescendant", "placeholder", "onKeydown"];
|
|
12
12
|
const _hoisted_4 = { class: "flex min-h-0 flex-1" };
|
|
@@ -40,7 +40,7 @@ const _hoisted_14 = {
|
|
|
40
40
|
};
|
|
41
41
|
const _hoisted_15 = {
|
|
42
42
|
key: 0,
|
|
43
|
-
class: "hidden min-h-0
|
|
43
|
+
class: "lp-cmd-pane hidden min-h-0 shrink-0 flex-col border-l border-line md:flex"
|
|
44
44
|
};
|
|
45
45
|
const _hoisted_16 = { class: "lp-cmd-para flex items-center gap-2 text-ink" };
|
|
46
46
|
const _hoisted_17 = { class: "min-w-0 text-base font-semibold" };
|
|
@@ -485,11 +485,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
485
485
|
class: normalizeClass([{ "lp-scrim--light": __props.glass }, "lp-scrim fixed inset-0 z-(--z-overlay) data-[state=open]:animate-[fade-in_150ms_ease] data-[state=closed]:animate-[fade-out_130ms_ease]"])
|
|
486
486
|
}, null, 8, ["class"]),
|
|
487
487
|
createVNode(unref(DialogContent), {
|
|
488
|
-
class: normalizeClass(["fixed left-1/2 top-[12vh] z-(--z-modal) flex max-h-[76vh] -translate-x-1/2 flex-col overflow-hidden rounded-card border border-line shadow-panel outline-none data-[state=open]:animate-[pop-in_160ms_var(--ease-emphasized)] data-[state=closed]:animate-[pop-out_130ms_ease]", [__props.glass ? "lp-glass-overlay" : "bg-surface-raised", __props.previewPane && "lp-cmd-
|
|
489
|
-
|
|
490
|
-
width: paneOpen.value ? "min(92vw, 64rem)" : "min(92vw, 40rem)",
|
|
491
|
-
minHeight: paneOpen.value ? "min(76vh, 36rem)" : "0px"
|
|
492
|
-
}),
|
|
488
|
+
class: normalizeClass(["lp-cmd-dialog fixed left-1/2 top-[12vh] z-(--z-modal) flex max-h-[76vh] -translate-x-1/2 flex-col overflow-hidden rounded-card border border-line shadow-panel outline-none data-[state=open]:animate-[pop-in_160ms_var(--ease-emphasized)] data-[state=closed]:animate-[pop-out_130ms_ease]", [__props.glass ? "lp-glass-overlay" : "bg-surface-raised", __props.previewPane && "lp-cmd-split"]]),
|
|
489
|
+
"data-pane": paneOpen.value ? "open" : void 0,
|
|
493
490
|
onOpenAutoFocus: _cache[2] || (_cache[2] = withModifiers(() => {
|
|
494
491
|
}, ["prevent"]))
|
|
495
492
|
}, {
|
|
@@ -568,7 +565,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
568
565
|
createVNode(_sfc_main$2, {
|
|
569
566
|
ref_key: "scrollRef",
|
|
570
567
|
ref: scrollRef,
|
|
571
|
-
class: "min-h-0 min-w-0 flex-1",
|
|
568
|
+
class: "lp-cmd-list min-h-0 min-w-0 flex-1",
|
|
572
569
|
"content-class": "p-2"
|
|
573
570
|
}, {
|
|
574
571
|
default: withCtx(() => [
|
|
@@ -765,7 +762,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
765
762
|
])
|
|
766
763
|
]),
|
|
767
764
|
_: 3
|
|
768
|
-
}, 8, ["class", "
|
|
765
|
+
}, 8, ["class", "data-pane"])
|
|
769
766
|
]),
|
|
770
767
|
_: 3
|
|
771
768
|
})
|
|
@@ -775,7 +772,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
775
772
|
};
|
|
776
773
|
}
|
|
777
774
|
});
|
|
778
|
-
const LpCommandPalette = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
775
|
+
const LpCommandPalette = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-27071a60"]]);
|
|
779
776
|
export {
|
|
780
777
|
LpCommandPalette as default
|
|
781
778
|
};
|
package/package.json
CHANGED
|
@@ -868,12 +868,9 @@ useHotkeys(() =>
|
|
|
868
868
|
class="lp-scrim fixed inset-0 z-(--z-overlay) data-[state=open]:animate-[fade-in_150ms_ease] data-[state=closed]:animate-[fade-out_130ms_ease]"
|
|
869
869
|
/>
|
|
870
870
|
<DialogContent
|
|
871
|
-
class="fixed left-1/2 top-[12vh] z-(--z-modal) flex max-h-[76vh] -translate-x-1/2 flex-col overflow-hidden rounded-card border border-line shadow-panel outline-none data-[state=open]:animate-[pop-in_160ms_var(--ease-emphasized)] data-[state=closed]:animate-[pop-out_130ms_ease]"
|
|
872
|
-
:class="[glass ? 'lp-glass-overlay' : 'bg-surface-raised', previewPane && 'lp-cmd-
|
|
873
|
-
:
|
|
874
|
-
width: paneOpen ? 'min(92vw, 64rem)' : 'min(92vw, 40rem)',
|
|
875
|
-
minHeight: paneOpen ? 'min(76vh, 36rem)' : '0px',
|
|
876
|
-
}"
|
|
871
|
+
class="lp-cmd-dialog fixed left-1/2 top-[12vh] z-(--z-modal) flex max-h-[76vh] -translate-x-1/2 flex-col overflow-hidden rounded-card border border-line shadow-panel outline-none data-[state=open]:animate-[pop-in_160ms_var(--ease-emphasized)] data-[state=closed]:animate-[pop-out_130ms_ease]"
|
|
872
|
+
:class="[glass ? 'lp-glass-overlay' : 'bg-surface-raised', previewPane && 'lp-cmd-split']"
|
|
873
|
+
:data-pane="paneOpen ? 'open' : undefined"
|
|
877
874
|
@open-auto-focus.prevent
|
|
878
875
|
>
|
|
879
876
|
<DialogTitle class="sr-only">Command palette</DialogTitle>
|
|
@@ -927,7 +924,7 @@ useHotkeys(() =>
|
|
|
927
924
|
|
|
928
925
|
<!-- Results -->
|
|
929
926
|
<div class="flex min-h-0 flex-1">
|
|
930
|
-
<LpScrollArea ref="scrollRef" class="min-h-0 min-w-0 flex-1" content-class="p-2">
|
|
927
|
+
<LpScrollArea ref="scrollRef" class="lp-cmd-list min-h-0 min-w-0 flex-1" content-class="p-2">
|
|
931
928
|
<!-- While a request is out there is nothing to say yet: "no results"
|
|
932
929
|
under a spinner reads as an answer, and it is not one. -->
|
|
933
930
|
<p v-if="flat.length === 0 && !failed" class="px-2 py-10 text-center text-sm text-muted">
|
|
@@ -1040,7 +1037,7 @@ useHotkeys(() =>
|
|
|
1040
1037
|
<Transition name="lp-cmd-pane">
|
|
1041
1038
|
<aside
|
|
1042
1039
|
v-if="paneOpen"
|
|
1043
|
-
class="hidden min-h-0
|
|
1040
|
+
class="lp-cmd-pane hidden min-h-0 shrink-0 flex-col border-l border-line md:flex"
|
|
1044
1041
|
>
|
|
1045
1042
|
<LpScrollArea ref="previewRef" class="min-h-0 flex-1" content-class="px-5 py-4">
|
|
1046
1043
|
<!-- Keyed by the row, so moving the highlight replays the
|
|
@@ -1107,28 +1104,49 @@ useHotkeys(() =>
|
|
|
1107
1104
|
|
|
1108
1105
|
<style scoped>
|
|
1109
1106
|
/*
|
|
1110
|
-
*
|
|
1111
|
-
*
|
|
1107
|
+
* Sizes for the split layout. Only the dialog's width animates: the list and
|
|
1108
|
+
* the pane keep fixed widths, and the dialog — overflow hidden — uncovers the
|
|
1109
|
+
* pane from its right edge as it grows. Animating the columns themselves made
|
|
1110
|
+
* every line of the list and the pane re-wrap on every frame.
|
|
1112
1111
|
*/
|
|
1113
|
-
.lp-cmd-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1112
|
+
.lp-cmd-dialog {
|
|
1113
|
+
--lp-cmd-list: min(92vw, 40rem);
|
|
1114
|
+
--lp-cmd-pane: max(0px, min(26rem, 96vw - var(--lp-cmd-list)));
|
|
1115
|
+
width: var(--lp-cmd-list);
|
|
1117
1116
|
}
|
|
1118
|
-
.lp-cmd-
|
|
1117
|
+
.lp-cmd-split {
|
|
1119
1118
|
transition:
|
|
1120
|
-
|
|
1121
|
-
|
|
1119
|
+
width 300ms var(--ease-emphasized, ease),
|
|
1120
|
+
min-height 300ms var(--ease-emphasized, ease);
|
|
1122
1121
|
}
|
|
1123
|
-
|
|
1124
|
-
|
|
1122
|
+
@media (min-width: 768px) {
|
|
1123
|
+
.lp-cmd-split .lp-cmd-list {
|
|
1124
|
+
flex: 0 0 auto;
|
|
1125
|
+
/* the dialog's 1px border on each side */
|
|
1126
|
+
width: calc(var(--lp-cmd-list) - 2px);
|
|
1127
|
+
}
|
|
1128
|
+
.lp-cmd-dialog[data-pane="open"] {
|
|
1129
|
+
width: calc(var(--lp-cmd-list) + var(--lp-cmd-pane));
|
|
1130
|
+
min-height: min(76vh, 36rem);
|
|
1131
|
+
}
|
|
1125
1132
|
}
|
|
1126
|
-
.lp-cmd-pane
|
|
1127
|
-
|
|
1128
|
-
|
|
1133
|
+
.lp-cmd-pane {
|
|
1134
|
+
width: var(--lp-cmd-pane);
|
|
1135
|
+
}
|
|
1136
|
+
/*
|
|
1137
|
+
* The pane rides in from the right edge while the dialog opens up to it, and
|
|
1138
|
+
* leaves the same way, for as long as the dialog takes to close over it.
|
|
1139
|
+
*/
|
|
1140
|
+
.lp-cmd-pane-enter-active,
|
|
1141
|
+
.lp-cmd-pane-leave-active {
|
|
1142
|
+
transition:
|
|
1143
|
+
transform 300ms var(--ease-emphasized, ease),
|
|
1144
|
+
opacity 300ms ease;
|
|
1129
1145
|
}
|
|
1146
|
+
.lp-cmd-pane-enter-from,
|
|
1130
1147
|
.lp-cmd-pane-leave-to {
|
|
1131
1148
|
opacity: 0;
|
|
1149
|
+
transform: translateX(40%);
|
|
1132
1150
|
}
|
|
1133
1151
|
.lp-cmd-para {
|
|
1134
1152
|
animation: lp-cmd-para-in 260ms ease-out both;
|
|
@@ -1140,7 +1158,7 @@ useHotkeys(() =>
|
|
|
1140
1158
|
}
|
|
1141
1159
|
}
|
|
1142
1160
|
@media (prefers-reduced-motion: reduce) {
|
|
1143
|
-
.lp-cmd-
|
|
1161
|
+
.lp-cmd-split,
|
|
1144
1162
|
.lp-cmd-pane-enter-active,
|
|
1145
1163
|
.lp-cmd-pane-leave-active {
|
|
1146
1164
|
transition: none;
|
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
/*
|
|
3
|
-
* The dialog changes width and height when the preview pane comes and goes;
|
|
4
|
-
* eased, so the list does not jump sideways under the pointer.
|
|
5
|
-
*/
|
|
6
|
-
.lp-cmd-resizing[data-v-79f73da4] {
|
|
7
|
-
transition:
|
|
8
|
-
width 260ms var(--ease-emphasized, ease),
|
|
9
|
-
min-height 260ms var(--ease-emphasized, ease);
|
|
10
|
-
}
|
|
11
|
-
.lp-cmd-pane-enter-active[data-v-79f73da4] {
|
|
12
|
-
transition:
|
|
13
|
-
opacity 220ms ease 60ms,
|
|
14
|
-
transform 260ms var(--ease-emphasized, ease);
|
|
15
|
-
}
|
|
16
|
-
.lp-cmd-pane-leave-active[data-v-79f73da4] {
|
|
17
|
-
transition: opacity 120ms ease;
|
|
18
|
-
}
|
|
19
|
-
.lp-cmd-pane-enter-from[data-v-79f73da4] {
|
|
20
|
-
opacity: 0;
|
|
21
|
-
transform: translateX(16px);
|
|
22
|
-
}
|
|
23
|
-
.lp-cmd-pane-leave-to[data-v-79f73da4] {
|
|
24
|
-
opacity: 0;
|
|
25
|
-
}
|
|
26
|
-
.lp-cmd-para[data-v-79f73da4] {
|
|
27
|
-
animation: lp-cmd-para-in-79f73da4 260ms ease-out both;
|
|
28
|
-
}
|
|
29
|
-
@keyframes lp-cmd-para-in-79f73da4 {
|
|
30
|
-
from {
|
|
31
|
-
opacity: 0;
|
|
32
|
-
transform: translateY(4px);
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
@media (prefers-reduced-motion: reduce) {
|
|
36
|
-
.lp-cmd-resizing[data-v-79f73da4],
|
|
37
|
-
.lp-cmd-pane-enter-active[data-v-79f73da4],
|
|
38
|
-
.lp-cmd-pane-leave-active[data-v-79f73da4] {
|
|
39
|
-
transition: none;
|
|
40
|
-
}
|
|
41
|
-
.lp-cmd-para[data-v-79f73da4] {
|
|
42
|
-
animation: none;
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
.lp-cmd-excerpt[data-v-79f73da4] {
|
|
46
|
-
display: -webkit-box;
|
|
47
|
-
-webkit-box-orient: vertical;
|
|
48
|
-
overflow: hidden;
|
|
49
|
-
}
|
|
50
|
-
/* Each result eases in; honours reduced motion. */
|
|
51
|
-
.lp-cmd-item[data-v-79f73da4] {
|
|
52
|
-
animation: lp-cmd-in-79f73da4 140ms ease-out both;
|
|
53
|
-
}
|
|
54
|
-
@keyframes lp-cmd-in-79f73da4 {
|
|
55
|
-
from {
|
|
56
|
-
opacity: 0;
|
|
57
|
-
transform: translateY(3px);
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
@media (prefers-reduced-motion: reduce) {
|
|
61
|
-
.lp-cmd-item[data-v-79f73da4] {
|
|
62
|
-
animation: none;
|
|
63
|
-
}
|
|
64
|
-
}
|