@leavepulse/ui 0.46.0 → 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-5miKYsb-.css → LpCommandPalette-DmQUsJqA.css} +21 -21
- 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-BoeA_TgK.css → LpTable-xWwI4KPZ.css} +17 -17
- package/dist/chunks/HighlightText-BvnYZkhi.js +27 -0
- package/dist/chunks/{LpAvatar-DeSb6H0c.js → LpAvatar-Cb1jtOVv.js} +21 -3
- package/dist/chunks/{LpLightbox-DSDahF23.js → LpLightbox-EVXzAq62.js} +3 -3
- package/dist/chunks/{LpMediaGallery-YKr-cQPN.js → LpMediaGallery-BnlkN_1f.js} +1 -1
- package/dist/chunks/LpPalettePreview-CFav_7co.js +19 -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/LpAvatar.vue.d.ts +12 -0
- package/dist/components/LpAvatar.vue.js +1 -1
- package/dist/components/LpCommandPalette.vue.d.ts +152 -15
- package/dist/components/LpCommandPalette.vue.js +178 -92
- 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/LpMediaGallery.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/LpShortcutsDialog.vue.js +8 -28
- package/dist/components/LpTable.vue.js +5 -3
- 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/index.d.ts +12 -3
- package/dist/index.js +157 -134
- 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 +387 -87
- package/src/components/LpKeys.vue +79 -0
- package/src/components/LpLightbox.vue +4 -1
- 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/LpShortcutsDialog.vue +2 -45
- package/src/components/LpTable.vue +6 -1
- package/src/components/commandPalette.ts +264 -0
- package/src/components/commandSearch.ts +79 -0
- package/src/components/keys.ts +13 -0
- package/src/index.ts +12 -3
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import { defineComponent, openBlock, createElementBlock, normalizeClass, toDisplayString, createCommentVNode, createElementVNode, Fragment, renderList, normalizeStyle, createBlock, createVNode, renderSlot } from "vue";
|
|
2
|
+
import { _ as _sfc_main$2 } from "../chunks/HighlightText-BvnYZkhi.js";
|
|
3
|
+
import { _ as _sfc_main$1 } from "../chunks/LpIcon-DYtaid0K.js";
|
|
4
|
+
import { _ as _sfc_main$3 } from "../chunks/LpRollingText-DB7upf-5.js";
|
|
5
|
+
import { _ as _export_sfc } from "../chunks/_plugin-vue_export-helper-1tPrXgE0.js";
|
|
6
|
+
import '../assets/LpPaletteFacts-B9FdVmIO.css';const _hoisted_1 = {
|
|
7
|
+
key: 0,
|
|
8
|
+
class: "lp-palette-facts__title"
|
|
9
|
+
};
|
|
10
|
+
const _hoisted_2 = { class: "lp-palette-facts__list" };
|
|
11
|
+
const _hoisted_3 = ["aria-current"];
|
|
12
|
+
const _hoisted_4 = { class: "lp-palette-facts__label" };
|
|
13
|
+
const _hoisted_5 = { class: "lp-palette-facts__name" };
|
|
14
|
+
const _hoisted_6 = {
|
|
15
|
+
key: 0,
|
|
16
|
+
class: "lp-palette-facts__hint"
|
|
17
|
+
};
|
|
18
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
19
|
+
__name: "LpPaletteFacts",
|
|
20
|
+
props: {
|
|
21
|
+
items: {},
|
|
22
|
+
title: {},
|
|
23
|
+
plain: { type: Boolean, default: false }
|
|
24
|
+
},
|
|
25
|
+
setup(__props) {
|
|
26
|
+
return (_ctx, _cache) => {
|
|
27
|
+
return openBlock(), createElementBlock("section", {
|
|
28
|
+
class: normalizeClass(["lp-palette-facts", { "lp-palette-facts--plain": __props.plain }])
|
|
29
|
+
}, [
|
|
30
|
+
__props.title ? (openBlock(), createElementBlock("p", _hoisted_1, toDisplayString(__props.title), 1)) : createCommentVNode("", true),
|
|
31
|
+
createElementVNode("ul", _hoisted_2, [
|
|
32
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(__props.items, (item, index) => {
|
|
33
|
+
return openBlock(), createElementBlock("li", {
|
|
34
|
+
key: index,
|
|
35
|
+
class: normalizeClass(["lp-palette-facts__row", { "is-current": item.current }]),
|
|
36
|
+
"aria-current": item.current || void 0
|
|
37
|
+
}, [
|
|
38
|
+
item.color ? (openBlock(), createElementBlock("span", {
|
|
39
|
+
key: 0,
|
|
40
|
+
class: "lp-palette-facts__dot",
|
|
41
|
+
style: normalizeStyle({ background: item.color })
|
|
42
|
+
}, null, 4)) : item.icon ? (openBlock(), createBlock(_sfc_main$1, {
|
|
43
|
+
key: 1,
|
|
44
|
+
name: item.icon,
|
|
45
|
+
size: 15,
|
|
46
|
+
class: "lp-palette-facts__icon"
|
|
47
|
+
}, null, 8, ["name"])) : createCommentVNode("", true),
|
|
48
|
+
createElementVNode("span", _hoisted_4, [
|
|
49
|
+
createElementVNode("span", _hoisted_5, [
|
|
50
|
+
createVNode(_sfc_main$2, {
|
|
51
|
+
text: item.label
|
|
52
|
+
}, null, 8, ["text"])
|
|
53
|
+
]),
|
|
54
|
+
item.hint?.length ? (openBlock(), createElementBlock("span", _hoisted_6, [
|
|
55
|
+
createVNode(_sfc_main$2, {
|
|
56
|
+
text: item.hint
|
|
57
|
+
}, null, 8, ["text"])
|
|
58
|
+
])) : createCommentVNode("", true)
|
|
59
|
+
]),
|
|
60
|
+
item.value !== void 0 && item.value !== "" || _ctx.$slots.value ? (openBlock(), createElementBlock("span", {
|
|
61
|
+
key: 2,
|
|
62
|
+
class: normalizeClass(["lp-palette-facts__value", { "lp-palette-facts__value--mono": item.mono }])
|
|
63
|
+
}, [
|
|
64
|
+
renderSlot(_ctx.$slots, "value", {
|
|
65
|
+
item,
|
|
66
|
+
index
|
|
67
|
+
}, () => [
|
|
68
|
+
item.value !== void 0 ? (openBlock(), createBlock(_sfc_main$3, {
|
|
69
|
+
key: 0,
|
|
70
|
+
value: item.value,
|
|
71
|
+
align: "end"
|
|
72
|
+
}, null, 8, ["value"])) : createCommentVNode("", true)
|
|
73
|
+
], true)
|
|
74
|
+
], 2)) : createCommentVNode("", true)
|
|
75
|
+
], 10, _hoisted_3);
|
|
76
|
+
}), 128))
|
|
77
|
+
])
|
|
78
|
+
], 2);
|
|
79
|
+
};
|
|
80
|
+
}
|
|
81
|
+
});
|
|
82
|
+
const LpPaletteFacts = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-f1ab3788"]]);
|
|
83
|
+
export {
|
|
84
|
+
LpPaletteFacts as default
|
|
85
|
+
};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import type { HighlightPart } from "./commandSearch";
|
|
2
|
+
import type { CommandImage } from "./LpCommandPalette.vue";
|
|
3
|
+
type __VLS_Props = {
|
|
4
|
+
eyebrow?: string;
|
|
5
|
+
/** Text, or the preview slot's `highlight(text)` to mark the query. */
|
|
6
|
+
title?: string | HighlightPart[];
|
|
7
|
+
subtitle?: string | HighlightPart[];
|
|
8
|
+
lead?: string | HighlightPart[];
|
|
9
|
+
/** Icon beside the title, on a soft tile. */
|
|
10
|
+
icon?: string;
|
|
11
|
+
/** Picture beside the title; wins over `icon`, which becomes its fallback. */
|
|
12
|
+
image?: string | CommandImage | null;
|
|
13
|
+
};
|
|
14
|
+
declare var __VLS_1: {}, __VLS_13: {}, __VLS_25: {}, __VLS_27: {};
|
|
15
|
+
type __VLS_Slots = {} & {
|
|
16
|
+
media?: (props: typeof __VLS_1) => any;
|
|
17
|
+
} & {
|
|
18
|
+
title?: (props: typeof __VLS_13) => any;
|
|
19
|
+
} & {
|
|
20
|
+
default?: (props: typeof __VLS_25) => any;
|
|
21
|
+
} & {
|
|
22
|
+
lead?: (props: typeof __VLS_27) => any;
|
|
23
|
+
};
|
|
24
|
+
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>;
|
|
25
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
26
|
+
declare const _default: typeof __VLS_export;
|
|
27
|
+
export default _default;
|
|
28
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
29
|
+
new (): {
|
|
30
|
+
$slots: S;
|
|
31
|
+
};
|
|
32
|
+
};
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
import { defineComponent, computed, openBlock, createElementBlock, createElementVNode, renderSlot, createBlock, createVNode, createCommentVNode, toDisplayString } from "vue";
|
|
2
|
+
import { _ as _sfc_main$1 } from "../chunks/LpAvatar-Cb1jtOVv.js";
|
|
3
|
+
import { _ as _sfc_main$2 } from "../chunks/LpIcon-DYtaid0K.js";
|
|
4
|
+
import { _ as _sfc_main$3 } from "../chunks/HighlightText-BvnYZkhi.js";
|
|
5
|
+
import { _ as _export_sfc } from "../chunks/_plugin-vue_export-helper-1tPrXgE0.js";
|
|
6
|
+
import '../assets/LpPaletteHeader-BVOu1UX5.css';const _hoisted_1 = { class: "lp-palette-header" };
|
|
7
|
+
const _hoisted_2 = { class: "lp-palette-header__row" };
|
|
8
|
+
const _hoisted_3 = {
|
|
9
|
+
key: 1,
|
|
10
|
+
class: "lp-palette-header__tile"
|
|
11
|
+
};
|
|
12
|
+
const _hoisted_4 = { class: "lp-palette-header__text" };
|
|
13
|
+
const _hoisted_5 = {
|
|
14
|
+
key: 0,
|
|
15
|
+
class: "lp-palette-header__eyebrow"
|
|
16
|
+
};
|
|
17
|
+
const _hoisted_6 = {
|
|
18
|
+
key: 1,
|
|
19
|
+
class: "lp-palette-header__title"
|
|
20
|
+
};
|
|
21
|
+
const _hoisted_7 = {
|
|
22
|
+
key: 2,
|
|
23
|
+
class: "lp-palette-header__subtitle"
|
|
24
|
+
};
|
|
25
|
+
const _hoisted_8 = {
|
|
26
|
+
key: 0,
|
|
27
|
+
class: "lp-palette-header__extra"
|
|
28
|
+
};
|
|
29
|
+
const _hoisted_9 = {
|
|
30
|
+
key: 1,
|
|
31
|
+
class: "lp-palette-header__lead"
|
|
32
|
+
};
|
|
33
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
34
|
+
__name: "LpPaletteHeader",
|
|
35
|
+
props: {
|
|
36
|
+
eyebrow: {},
|
|
37
|
+
title: {},
|
|
38
|
+
subtitle: {},
|
|
39
|
+
lead: {},
|
|
40
|
+
icon: {},
|
|
41
|
+
image: {}
|
|
42
|
+
},
|
|
43
|
+
setup(__props) {
|
|
44
|
+
const props = __props;
|
|
45
|
+
const picture = computed(() => {
|
|
46
|
+
if (!props.image) return null;
|
|
47
|
+
const image = typeof props.image === "string" ? { src: props.image } : props.image;
|
|
48
|
+
return { ...image, icon: image.icon ?? props.icon };
|
|
49
|
+
});
|
|
50
|
+
return (_ctx, _cache) => {
|
|
51
|
+
return openBlock(), createElementBlock("header", _hoisted_1, [
|
|
52
|
+
createElementVNode("div", _hoisted_2, [
|
|
53
|
+
renderSlot(_ctx.$slots, "media", {}, () => [
|
|
54
|
+
picture.value ? (openBlock(), createBlock(_sfc_main$1, {
|
|
55
|
+
key: 0,
|
|
56
|
+
src: picture.value.src ?? void 0,
|
|
57
|
+
alt: picture.value.alt ?? "",
|
|
58
|
+
fallback: picture.value.fallback,
|
|
59
|
+
icon: picture.value.icon,
|
|
60
|
+
shape: picture.value.shape ?? "soft",
|
|
61
|
+
"pixel-size": 44,
|
|
62
|
+
class: "lp-palette-header__media"
|
|
63
|
+
}, null, 8, ["src", "alt", "fallback", "icon", "shape"])) : __props.icon ? (openBlock(), createElementBlock("span", _hoisted_3, [
|
|
64
|
+
createVNode(_sfc_main$2, {
|
|
65
|
+
name: __props.icon,
|
|
66
|
+
size: 18
|
|
67
|
+
}, null, 8, ["name"])
|
|
68
|
+
])) : createCommentVNode("", true)
|
|
69
|
+
], true),
|
|
70
|
+
createElementVNode("div", _hoisted_4, [
|
|
71
|
+
__props.eyebrow ? (openBlock(), createElementBlock("p", _hoisted_5, toDisplayString(__props.eyebrow), 1)) : createCommentVNode("", true),
|
|
72
|
+
__props.title?.length || _ctx.$slots.title ? (openBlock(), createElementBlock("h3", _hoisted_6, [
|
|
73
|
+
renderSlot(_ctx.$slots, "title", {}, () => [
|
|
74
|
+
__props.title ? (openBlock(), createBlock(_sfc_main$3, {
|
|
75
|
+
key: 0,
|
|
76
|
+
text: __props.title
|
|
77
|
+
}, null, 8, ["text"])) : createCommentVNode("", true)
|
|
78
|
+
], true)
|
|
79
|
+
])) : createCommentVNode("", true),
|
|
80
|
+
__props.subtitle?.length ? (openBlock(), createElementBlock("p", _hoisted_7, [
|
|
81
|
+
createVNode(_sfc_main$3, { text: __props.subtitle }, null, 8, ["text"])
|
|
82
|
+
])) : createCommentVNode("", true)
|
|
83
|
+
])
|
|
84
|
+
]),
|
|
85
|
+
_ctx.$slots.default ? (openBlock(), createElementBlock("div", _hoisted_8, [
|
|
86
|
+
renderSlot(_ctx.$slots, "default", {}, void 0, true)
|
|
87
|
+
])) : createCommentVNode("", true),
|
|
88
|
+
__props.lead?.length || _ctx.$slots.lead ? (openBlock(), createElementBlock("p", _hoisted_9, [
|
|
89
|
+
renderSlot(_ctx.$slots, "lead", {}, () => [
|
|
90
|
+
__props.lead ? (openBlock(), createBlock(_sfc_main$3, {
|
|
91
|
+
key: 0,
|
|
92
|
+
text: __props.lead
|
|
93
|
+
}, null, 8, ["text"])) : createCommentVNode("", true)
|
|
94
|
+
], true)
|
|
95
|
+
])) : createCommentVNode("", true)
|
|
96
|
+
]);
|
|
97
|
+
};
|
|
98
|
+
}
|
|
99
|
+
});
|
|
100
|
+
const LpPaletteHeader = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-68065cf8"]]);
|
|
101
|
+
export {
|
|
102
|
+
LpPaletteHeader as default
|
|
103
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
/** Space between blocks. */
|
|
3
|
+
gap?: "sm" | "md" | "lg";
|
|
4
|
+
};
|
|
5
|
+
declare var __VLS_1: {};
|
|
6
|
+
type __VLS_Slots = {} & {
|
|
7
|
+
default?: (props: typeof __VLS_1) => 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<{}>, {
|
|
10
|
+
gap: "sm" | "md" | "lg";
|
|
11
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
12
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
13
|
+
declare const _default: typeof __VLS_export;
|
|
14
|
+
export default _default;
|
|
15
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
16
|
+
new (): {
|
|
17
|
+
$slots: S;
|
|
18
|
+
};
|
|
19
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { PaletteStat } from "./commandPalette";
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
items: PaletteStat[];
|
|
4
|
+
/** Tiles per row. */
|
|
5
|
+
columns?: 2 | 3 | 4;
|
|
6
|
+
};
|
|
7
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
8
|
+
columns: 2 | 3 | 4;
|
|
9
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
10
|
+
declare const _default: typeof __VLS_export;
|
|
11
|
+
export default _default;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { defineComponent, openBlock, createElementBlock, normalizeStyle, Fragment, renderList, createElementVNode, toDisplayString, createBlock } from "vue";
|
|
2
|
+
import { _ as _sfc_main$1 } from "../chunks/LpNumberFlow-z4WPZcZu.js";
|
|
3
|
+
import { _ as _sfc_main$2 } from "../chunks/LpRollingText-DB7upf-5.js";
|
|
4
|
+
import { _ as _export_sfc } from "../chunks/_plugin-vue_export-helper-1tPrXgE0.js";
|
|
5
|
+
import '../assets/LpPaletteStats-ClE-37MK.css';const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
6
|
+
__name: "LpPaletteStats",
|
|
7
|
+
props: {
|
|
8
|
+
items: {},
|
|
9
|
+
columns: { default: 2 }
|
|
10
|
+
},
|
|
11
|
+
setup(__props) {
|
|
12
|
+
return (_ctx, _cache) => {
|
|
13
|
+
return openBlock(), createElementBlock("dl", {
|
|
14
|
+
class: "lp-palette-stats",
|
|
15
|
+
style: normalizeStyle({ gridTemplateColumns: `repeat(${__props.columns}, minmax(0, 1fr))` })
|
|
16
|
+
}, [
|
|
17
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(__props.items, (item, index) => {
|
|
18
|
+
return openBlock(), createElementBlock("div", {
|
|
19
|
+
key: `${item.label}-${index}`,
|
|
20
|
+
class: "lp-palette-stats__tile"
|
|
21
|
+
}, [
|
|
22
|
+
createElementVNode("dt", null, toDisplayString(item.label), 1),
|
|
23
|
+
createElementVNode("dd", null, [
|
|
24
|
+
typeof item.value === "number" ? (openBlock(), createBlock(_sfc_main$1, {
|
|
25
|
+
key: 0,
|
|
26
|
+
value: item.value,
|
|
27
|
+
compact: item.compact,
|
|
28
|
+
suffix: item.suffix,
|
|
29
|
+
format: item.format,
|
|
30
|
+
"animate-on-mount": false,
|
|
31
|
+
grouped: ""
|
|
32
|
+
}, null, 8, ["value", "compact", "suffix", "format"])) : (openBlock(), createBlock(_sfc_main$2, {
|
|
33
|
+
key: 1,
|
|
34
|
+
value: item.value,
|
|
35
|
+
align: "start"
|
|
36
|
+
}, null, 8, ["value"]))
|
|
37
|
+
])
|
|
38
|
+
]);
|
|
39
|
+
}), 128))
|
|
40
|
+
], 4);
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
});
|
|
44
|
+
const LpPaletteStats = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-dc30a10e"]]);
|
|
45
|
+
export {
|
|
46
|
+
LpPaletteStats as default
|
|
47
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
colors: string[];
|
|
3
|
+
/** The surface the swatches sit on, usually the theme's own. */
|
|
4
|
+
background?: string;
|
|
5
|
+
/** Accessible name of the strip, e.g. the theme's name. */
|
|
6
|
+
label?: string;
|
|
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,34 @@
|
|
|
1
|
+
import { defineComponent, openBlock, createElementBlock, normalizeStyle, Fragment, renderList } from "vue";
|
|
2
|
+
import { _ as _export_sfc } from "../chunks/_plugin-vue_export-helper-1tPrXgE0.js";
|
|
3
|
+
import '../assets/LpPaletteSwatches-CA0B8y2E.css';const _hoisted_1 = ["aria-label"];
|
|
4
|
+
const _hoisted_2 = ["title"];
|
|
5
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
6
|
+
__name: "LpPaletteSwatches",
|
|
7
|
+
props: {
|
|
8
|
+
colors: {},
|
|
9
|
+
background: {},
|
|
10
|
+
label: {}
|
|
11
|
+
},
|
|
12
|
+
setup(__props) {
|
|
13
|
+
return (_ctx, _cache) => {
|
|
14
|
+
return openBlock(), createElementBlock("div", {
|
|
15
|
+
class: "lp-palette-swatches",
|
|
16
|
+
role: "img",
|
|
17
|
+
"aria-label": __props.label,
|
|
18
|
+
style: normalizeStyle({ background: __props.background, gridTemplateColumns: `repeat(${Math.max(__props.colors.length, 1)}, minmax(0, 1fr))` })
|
|
19
|
+
}, [
|
|
20
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(__props.colors, (color, index) => {
|
|
21
|
+
return openBlock(), createElementBlock("span", {
|
|
22
|
+
key: index,
|
|
23
|
+
title: color,
|
|
24
|
+
style: normalizeStyle({ background: color })
|
|
25
|
+
}, null, 12, _hoisted_2);
|
|
26
|
+
}), 128))
|
|
27
|
+
], 12, _hoisted_1);
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
});
|
|
31
|
+
const LpPaletteSwatches = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-7c6934b1"]]);
|
|
32
|
+
export {
|
|
33
|
+
LpPaletteSwatches as default
|
|
34
|
+
};
|
|
@@ -1,14 +1,11 @@
|
|
|
1
|
-
import { defineComponent, computed, openBlock, createBlock, unref, withCtx, createElementVNode, createElementBlock, Fragment, renderList, toDisplayString, createTextVNode, createCommentVNode } from "vue";
|
|
1
|
+
import { defineComponent, computed, openBlock, createBlock, unref, withCtx, createElementVNode, createElementBlock, Fragment, renderList, toDisplayString, createTextVNode, createCommentVNode, createVNode } from "vue";
|
|
2
|
+
import LpKeys from "./LpKeys.vue.js";
|
|
2
3
|
import { _ as _sfc_main$1 } from "../chunks/LpModal-JNa3B_Lr.js";
|
|
3
|
-
import {
|
|
4
|
+
import { mergeShortcutGroups, activeShortcuts, useHotkeys } from "../composables/useHotkeys.js";
|
|
4
5
|
import { useLabels } from "../composables/useLpConfig.js";
|
|
5
6
|
import { _ as _export_sfc } from "../chunks/_plugin-vue_export-helper-1tPrXgE0.js";
|
|
6
|
-
import '../assets/LpShortcutsDialog-
|
|
7
|
+
import '../assets/LpShortcutsDialog-BUp_BX4s.css';const _hoisted_1 = { class: "shortcut-groups" };
|
|
7
8
|
const _hoisted_2 = ["aria-label", "title"];
|
|
8
|
-
const _hoisted_3 = {
|
|
9
|
-
key: 0,
|
|
10
|
-
class: "shortcut-then"
|
|
11
|
-
};
|
|
12
9
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
13
10
|
__name: "LpShortcutsDialog",
|
|
14
11
|
props: {
|
|
@@ -25,17 +22,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
25
22
|
const props = __props;
|
|
26
23
|
const text = useLabels("shortcuts", {
|
|
27
24
|
title: "Keyboard shortcuts",
|
|
28
|
-
then: "then",
|
|
29
25
|
conflict: "Also bound elsewhere: only one of them runs",
|
|
30
26
|
group: "General"
|
|
31
27
|
});
|
|
32
|
-
const apple = useAppleKeyboard();
|
|
33
|
-
function keysOf(chord) {
|
|
34
|
-
return chord.split(/\+(?!$)/);
|
|
35
|
-
}
|
|
36
|
-
function stepsOf(combo) {
|
|
37
|
-
return combo.trim().split(/\s+/);
|
|
38
|
-
}
|
|
39
28
|
const shown = computed(() => props.live ? mergeShortcutGroups(props.groups, activeShortcuts.value) : props.groups);
|
|
40
29
|
const emit = __emit;
|
|
41
30
|
useHotkeys(
|
|
@@ -84,18 +73,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
84
73
|
}, "!", 8, _hoisted_2)) : createCommentVNode("", true)
|
|
85
74
|
]),
|
|
86
75
|
createElementVNode("dd", null, [
|
|
87
|
-
(
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
}, [
|
|
91
|
-
stepIndex ? (openBlock(), createElementBlock("span", _hoisted_3, toDisplayString(unref(text).then), 1)) : createCommentVNode("", true),
|
|
92
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList(keysOf(step), (key, index) => {
|
|
93
|
-
return openBlock(), createElementBlock("kbd", {
|
|
94
|
-
key: `${key}-${index}`
|
|
95
|
-
}, toDisplayString(unref(appleModifierLabel)(key.trim(), unref(apple))), 1);
|
|
96
|
-
}), 128))
|
|
97
|
-
], 64);
|
|
98
|
-
}), 128))
|
|
76
|
+
createVNode(LpKeys, {
|
|
77
|
+
combo: entry.combo
|
|
78
|
+
}, null, 8, ["combo"])
|
|
99
79
|
])
|
|
100
80
|
]);
|
|
101
81
|
}), 128))
|
|
@@ -109,7 +89,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
109
89
|
};
|
|
110
90
|
}
|
|
111
91
|
});
|
|
112
|
-
const LpShortcutsDialog = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
92
|
+
const LpShortcutsDialog = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-611c415f"]]);
|
|
113
93
|
export {
|
|
114
94
|
LpShortcutsDialog as default
|
|
115
95
|
};
|
|
@@ -18,7 +18,7 @@ import { _ as _sfc_main$1 } from "../chunks/LpButton-CKSwC6Mu.js";
|
|
|
18
18
|
import { toCsv, downloadFile, fileStem } from "./exportData.js";
|
|
19
19
|
import { summarizeShown, parseTableState, serializeTableState, countValues } from "./tableFilter.js";
|
|
20
20
|
import { _ as _export_sfc } from "../chunks/_plugin-vue_export-helper-1tPrXgE0.js";
|
|
21
|
-
import '../assets/LpTable-
|
|
21
|
+
import '../assets/LpTable-xWwI4KPZ.css';const _hoisted_1 = {
|
|
22
22
|
key: 0,
|
|
23
23
|
class: "flex justify-end"
|
|
24
24
|
};
|
|
@@ -544,7 +544,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
544
544
|
}
|
|
545
545
|
return t.rowsTotal.replace("{total}", String(props.rows.length));
|
|
546
546
|
});
|
|
547
|
-
const showBar = computed(
|
|
547
|
+
const showBar = computed(
|
|
548
|
+
() => props.summary || !!props.selectable && props.selected.length > 0 || activeFilters.value.length > 0
|
|
549
|
+
);
|
|
548
550
|
const filteredOut = computed(() => {
|
|
549
551
|
if (loading.value || failed.value || displayRows.value.length) return false;
|
|
550
552
|
if (props.load) return Object.values(hiddenValues.value).some((set) => set.size);
|
|
@@ -924,7 +926,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
924
926
|
};
|
|
925
927
|
}
|
|
926
928
|
});
|
|
927
|
-
const LpTable = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
929
|
+
const LpTable = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-4fa70e89"]]);
|
|
928
930
|
export {
|
|
929
931
|
LpTable as default
|
|
930
932
|
};
|
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
import { type CommandSearchTerms, type HighlightPart, type SearchableCommand } from "./commandSearch";
|
|
2
|
+
/** The fields of a command that decide whether the preview pane opens for it. */
|
|
3
|
+
export interface PreviewableCommand {
|
|
4
|
+
preview?: string;
|
|
5
|
+
excerpt?: string;
|
|
6
|
+
noPreview?: boolean;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Whether the pane has something to show for a row. `noPreview` on the row
|
|
10
|
+
* wins, then the app's `hasPreview`; without either, a row qualifies when the
|
|
11
|
+
* app supplied a `#preview` slot or the row carries text of its own.
|
|
12
|
+
*/
|
|
13
|
+
export declare function commandHasPreview<T extends PreviewableCommand>(command: T | undefined, options: {
|
|
14
|
+
slot: boolean;
|
|
15
|
+
hasPreview?: (command: T) => boolean;
|
|
16
|
+
}): boolean;
|
|
17
|
+
/** One line of LpPaletteFacts: what it is, and what it is set to now. */
|
|
18
|
+
export interface PaletteFact {
|
|
19
|
+
/** Text, or the preview slot's `highlight(text)` to mark the query. */
|
|
20
|
+
label: string | HighlightPart[];
|
|
21
|
+
/** Right-aligned value; a change rolls in rather than swapping. */
|
|
22
|
+
value?: string | number;
|
|
23
|
+
/** A second, quieter line under the label. */
|
|
24
|
+
hint?: string | HighlightPart[];
|
|
25
|
+
icon?: string;
|
|
26
|
+
/** A colour dot in place of the icon: a role colour, a status. */
|
|
27
|
+
color?: string;
|
|
28
|
+
/** Marks the row that is in effect now: the current theme, the open tab. */
|
|
29
|
+
current?: boolean;
|
|
30
|
+
/** Draw the value in the monospace face: ids, paths, versions. */
|
|
31
|
+
mono?: boolean;
|
|
32
|
+
}
|
|
33
|
+
/** One tile of LpPaletteStats. */
|
|
34
|
+
export interface PaletteStat {
|
|
35
|
+
label: string;
|
|
36
|
+
/** A number counts to its new value; text rolls. */
|
|
37
|
+
value: number | string;
|
|
38
|
+
/** Abbreviate a number: 1.2k, 3.4M. */
|
|
39
|
+
compact?: boolean;
|
|
40
|
+
suffix?: string;
|
|
41
|
+
format?: (value: number) => string;
|
|
42
|
+
}
|
|
43
|
+
/** The fields of a command that let typing enter its mode. */
|
|
44
|
+
export interface PrefixedCommand {
|
|
45
|
+
prefix?: string;
|
|
46
|
+
children?: unknown;
|
|
47
|
+
disabled?: boolean;
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* The mode a query opens by its prefix, and the query left after it. Only a
|
|
51
|
+
* command with `children` and a non-empty `prefix` qualifies; letters match
|
|
52
|
+
* in any case, and the longest prefix wins, so "mr " and "m" can live side by
|
|
53
|
+
* side. Leading spaces are ignored: they are never what someone meant.
|
|
54
|
+
*/
|
|
55
|
+
export declare function matchModePrefix<T extends PrefixedCommand>(query: string, commands: readonly T[]): {
|
|
56
|
+
command: T;
|
|
57
|
+
rest: string;
|
|
58
|
+
} | null;
|
|
59
|
+
/** The fields of a command that make it a "search elsewhere" row. */
|
|
60
|
+
export interface FallbackCommand extends SearchableCommand {
|
|
61
|
+
fallback?: boolean;
|
|
62
|
+
hidden?: boolean;
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* The fallback rows to show for a query, with their labels filled in. They
|
|
66
|
+
* appear only while positive words are typed, whatever those words are: the
|
|
67
|
+
* row offers to search somewhere else for them, so matching it against them
|
|
68
|
+
* would hide it exactly when it is needed. Exclusions and `in:` scopes still
|
|
69
|
+
* apply, to the row's own label, keywords and group. `{query}` in the label
|
|
70
|
+
* becomes the positive words, without the operators.
|
|
71
|
+
*/
|
|
72
|
+
export declare function fallbackRows<T extends FallbackCommand>(items: readonly T[], raw: string): {
|
|
73
|
+
command: T;
|
|
74
|
+
label: string;
|
|
75
|
+
}[];
|
|
76
|
+
/**
|
|
77
|
+
* A remembered pick that is not a root command: one chosen inside a mode, or
|
|
78
|
+
* a result a search fetched. It keeps what the row needs to be drawn again
|
|
79
|
+
* and where it was found, so the palette can find the live command next time
|
|
80
|
+
* (`path` through static children, or the app's `resolveRecent`), and fall
|
|
81
|
+
* back to its `href` when neither can.
|
|
82
|
+
*/
|
|
83
|
+
export interface RecentEntry {
|
|
84
|
+
id: string;
|
|
85
|
+
label: string;
|
|
86
|
+
description?: string;
|
|
87
|
+
icon?: string;
|
|
88
|
+
image?: string | {
|
|
89
|
+
src?: string | null;
|
|
90
|
+
alt?: string;
|
|
91
|
+
fallback?: string;
|
|
92
|
+
icon?: string;
|
|
93
|
+
shape?: "circle" | "soft" | "square";
|
|
94
|
+
};
|
|
95
|
+
href?: string;
|
|
96
|
+
/** Ids of the modes it was picked in, outermost first. */
|
|
97
|
+
path: string[];
|
|
98
|
+
/** The command's `recentData`, kept as given for `resolveRecent`. */
|
|
99
|
+
data?: unknown;
|
|
100
|
+
}
|
|
101
|
+
/** A stored history item: a root command id (the old format), or an entry. */
|
|
102
|
+
export type RecentItem = string | RecentEntry;
|
|
103
|
+
/** The fields of a command a history entry is built from and resolved to. */
|
|
104
|
+
export interface RecentSource {
|
|
105
|
+
id: string;
|
|
106
|
+
label: string;
|
|
107
|
+
description?: string;
|
|
108
|
+
icon?: string;
|
|
109
|
+
image?: RecentEntry["image"];
|
|
110
|
+
href?: string;
|
|
111
|
+
recentData?: unknown;
|
|
112
|
+
disabled?: boolean;
|
|
113
|
+
children?: unknown;
|
|
114
|
+
}
|
|
115
|
+
/** Stored history, with anything malformed dropped rather than trusted. */
|
|
116
|
+
export declare function readRecent(stored: unknown): RecentItem[];
|
|
117
|
+
/**
|
|
118
|
+
* The history item for a pick. A root pick stays a bare id, the format older
|
|
119
|
+
* versions wrote and still read; anything deeper becomes an entry with only
|
|
120
|
+
* the fields that survive JSON.
|
|
121
|
+
*/
|
|
122
|
+
export declare function toRecentItem(command: RecentSource, path: readonly string[]): RecentItem;
|
|
123
|
+
/** The history with `item` first and any earlier copy of it dropped. */
|
|
124
|
+
export declare function pushRecent(list: readonly RecentItem[], item: RecentItem, keep: number): RecentItem[];
|
|
125
|
+
/**
|
|
126
|
+
* The live commands a history stands for, newest first. A bare id is looked
|
|
127
|
+
* up among the root commands; an entry is followed down its path through
|
|
128
|
+
* static children, then offered to `resolve` (for results a fetcher found),
|
|
129
|
+
* and last rebuilt from its own fields when it has an `href` to follow.
|
|
130
|
+
* Whatever none of these can find is skipped, so a stored history never
|
|
131
|
+
* resurrects something that cannot run.
|
|
132
|
+
*/
|
|
133
|
+
export declare function resolveRecentItems<T extends RecentSource>(items: readonly RecentItem[], commands: readonly T[], options: {
|
|
134
|
+
limit: number;
|
|
135
|
+
resolve?: (entry: RecentEntry) => T | null | undefined;
|
|
136
|
+
fromEntry: (entry: RecentEntry) => T;
|
|
137
|
+
}): {
|
|
138
|
+
command: T;
|
|
139
|
+
path: string[];
|
|
140
|
+
}[];
|
|
141
|
+
/**
|
|
142
|
+
* Whether a recent row survives the operators typed so far. Recent rows show
|
|
143
|
+
* while no positive words are typed, so "-theme" or "in:recent" filters them
|
|
144
|
+
* like any other row; an `in:` scope matches the row's own group or the
|
|
145
|
+
* Recent heading it sits under.
|
|
146
|
+
*/
|
|
147
|
+
export declare function recentVisible(command: SearchableCommand, terms: CommandSearchTerms, recentLabel: string): boolean;
|
|
148
|
+
/**
|
|
149
|
+
* The name a mode's chip shows. `modeLabel` when given; otherwise the label,
|
|
150
|
+
* with a `{query}` placeholder and the quotes around it taken out, since the
|
|
151
|
+
* words it stood for are in the box now ("Search mods for "{query}"" reads
|
|
152
|
+
* "Search mods").
|
|
153
|
+
*/
|
|
154
|
+
export declare function modeChipLabel(command: {
|
|
155
|
+
label: string;
|
|
156
|
+
modeLabel?: string;
|
|
157
|
+
}): string;
|