@leavepulse/ui 0.60.0 → 0.62.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/README.md +8 -0
- package/dist/assets/{LpTable-BZZf_rrt.css → LpTable-DpXyPzs8.css} +19 -19
- package/dist/chunks/{LpAddressInput-DD4zTN4P.js → LpAddressInput-CzdZguBo.js} +1 -1
- package/dist/chunks/{LpAlert--KLL4NLk.js → LpAlert-BAOujnXy.js} +8 -6
- package/dist/chunks/{LpAppShell-Cv-Y9qNA.js → LpAppShell-BXMNDEpF.js} +1 -1
- package/dist/chunks/{LpAutocomplete-PnL2ntKl.js → LpAutocomplete-D9mY5Tqk.js} +101 -36
- package/dist/chunks/{LpAvatar-CwGs1JCQ.js → LpAvatar-K6MOMfgn.js} +1 -1
- package/dist/chunks/{LpCard-B2D0GIUU.js → LpCard-D9HVgX8Y.js} +1 -1
- package/dist/chunks/{LpColorPicker-CvBF8TeL.js → LpColorPicker-BO1ZTY51.js} +1 -1
- package/dist/chunks/{LpContextMenu-BnN1k7ga.js → LpContextMenu-Cv_F2iCG.js} +6 -3
- package/dist/chunks/{LpFileTree-DEqh2ySW.js → LpFileTree-DTwUj0L-.js} +1 -1
- package/dist/chunks/{LpFileTreeNode-DCZA7sQ-.js → LpFileTreeNode-D-XLPZ6T.js} +1 -1
- package/dist/chunks/{LpHints-BTpvisgP.js → LpHints-B_85eSmm.js} +1 -1
- package/dist/chunks/{LpLogViewer-BuPe23sZ.js → LpLogViewer-D9UgNz2m.js} +1 -1
- package/dist/chunks/{LpModalNav-Cw7m-eks.js → LpModalNav-D4rmflQn.js} +1 -1
- package/dist/chunks/{LpNotificationBell-xH_JphpS.js → LpNotificationBell-CyylOlZR.js} +1 -1
- package/dist/chunks/{LpPie-BD5Lsh-2.js → LpPie-B2deu8CI.js} +1 -1
- package/dist/chunks/{LpSidebar-B3E_iViL.js → LpSidebar-D8tub3bt.js} +1 -1
- package/dist/chunks/{LpSidebarNav-32sAXNM-.js → LpSidebarNav-BBSRg34G.js} +1 -1
- package/dist/chunks/LpSwap-D82jiecV.js +38 -0
- package/dist/chunks/{LpThemeSwitcher-CeBG0e_D.js → LpThemeSwitcher-ZFFftBQn.js} +1 -1
- package/dist/chunks/{LpToaster-BcKs7vX7.js → LpToaster-D3OisETH.js} +1 -1
- package/dist/chunks/{LpTour-C29-1wha.js → LpTour-ByaL36fN.js} +75 -53
- package/dist/component-names.d.ts +1 -1
- package/dist/components/LpAddressInput.vue.js +1 -1
- package/dist/components/LpAlert.vue.d.ts +7 -0
- package/dist/components/LpAlert.vue.js +1 -1
- package/dist/components/LpAppShell.vue.js +1 -1
- package/dist/components/LpAutocomplete.vue.d.ts +24 -0
- package/dist/components/LpAutocomplete.vue.js +1 -1
- 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.js +1 -1
- package/dist/components/LpContextMenu.vue.js +1 -1
- package/dist/components/LpFileTree.vue.js +1 -1
- package/dist/components/LpFileTreeNode.vue.js +1 -1
- package/dist/components/LpHints.vue.js +1 -1
- package/dist/components/LpLogViewer.vue.js +1 -1
- package/dist/components/LpModalNav.vue.js +1 -1
- package/dist/components/LpNotificationBell.vue.js +1 -1
- package/dist/components/LpPaletteHeader.vue.js +1 -1
- package/dist/components/LpPie.vue.js +1 -1
- package/dist/components/LpSidebar.vue.js +1 -1
- package/dist/components/LpSidebarNav.vue.js +1 -1
- package/dist/components/LpSwap.vue.d.ts +19 -0
- package/dist/components/LpSwap.vue.js +4 -0
- package/dist/components/LpTable.vue.js +5 -4
- package/dist/components/LpThemeSwitcher.vue.js +1 -1
- package/dist/components/LpToaster.vue.js +1 -1
- package/dist/components/LpTour.vue.js +1 -1
- package/dist/components/tour.d.ts +9 -0
- package/dist/components/tour.js +22 -0
- package/dist/composables/useHintSystem.d.ts +2 -0
- package/dist/composables/useHintSystem.js +16 -4
- package/dist/composables/useToast.d.ts +13 -4
- package/dist/composables/useToast.js +13 -2
- package/dist/index.d.ts +3 -2
- package/dist/index.js +63 -61
- package/package.json +2 -1
- package/src/component-names.ts +1 -0
- package/src/components/LpAlert.vue +16 -5
- package/src/components/LpAutocomplete.vue +110 -24
- package/src/components/LpContextMenu.vue +6 -3
- package/src/components/LpSwap.vue +45 -0
- package/src/components/LpTable.vue +1 -0
- package/src/components/LpToaster.vue +1 -1
- package/src/components/LpTour.vue +26 -8
- package/src/components/tour.ts +31 -0
- package/src/composables/useHintSystem.ts +26 -4
- package/src/composables/useToast.ts +32 -5
- package/src/index.ts +3 -1
- package/src/tokens/selection.css +20 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent, useModel, computed, shallowRef, ref, watch, onBeforeUnmount, openBlock, createBlock, Teleport, createElementBlock, withModifiers, Fragment, renderList,
|
|
1
|
+
import { defineComponent, useModel, computed, shallowRef, ref, watch, onBeforeUnmount, openBlock, createBlock, Teleport, createVNode, Transition, withCtx, createElementBlock, withModifiers, createElementVNode, normalizeStyle, Fragment, renderList, normalizeClass, createCommentVNode, unref, renderSlot, mergeModels, nextTick } from "vue";
|
|
2
2
|
import { PopoverRoot, PopoverAnchor, PopoverPortal, PopoverContent } from "reka-ui";
|
|
3
3
|
import { prefersReducedMotion } from "../composables/easing.js";
|
|
4
4
|
import { hints } from "../composables/useHints.js";
|
|
@@ -8,7 +8,7 @@ import { useMediaQuery } from "../composables/useMediaQuery.js";
|
|
|
8
8
|
import { scrollToElement } from "../composables/scroll.js";
|
|
9
9
|
import { PANEL_SURFACE } from "../components/dropdown.js";
|
|
10
10
|
import { _ as _sfc_main$1 } from "./TourCard-AjN0uhs1.js";
|
|
11
|
-
import { holeOf, panelsAround } from "../components/tour.js";
|
|
11
|
+
import { holeOf, panelsAround, holeClip } from "../components/tour.js";
|
|
12
12
|
const _hoisted_1 = ["aria-label"];
|
|
13
13
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
14
14
|
__name: "LpTour",
|
|
@@ -55,6 +55,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
55
55
|
const panels = computed(
|
|
56
56
|
() => hole.value ? panelsAround(hole.value, viewport.value) : [{ x: 0, y: 0, width: viewport.value.width, height: viewport.value.height }]
|
|
57
57
|
);
|
|
58
|
+
const radius = ref(8);
|
|
59
|
+
const clip = computed(() => holeClip(hole.value, viewport.value, radius.value));
|
|
58
60
|
const reference = {
|
|
59
61
|
getBoundingClientRect: () => {
|
|
60
62
|
const h = hole.value;
|
|
@@ -173,7 +175,6 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
173
175
|
cancelAnimationFrame(frame);
|
|
174
176
|
frame = 0;
|
|
175
177
|
target.value = null;
|
|
176
|
-
box.value = null;
|
|
177
178
|
runAll(cleanups);
|
|
178
179
|
}
|
|
179
180
|
function finish() {
|
|
@@ -194,6 +195,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
194
195
|
(value) => {
|
|
195
196
|
if (value) {
|
|
196
197
|
direction = 1;
|
|
198
|
+
box.value = null;
|
|
199
|
+
radius.value = parseFloat(getComputedStyle(document.documentElement).getPropertyValue("--radius-control")) || 8;
|
|
197
200
|
document.addEventListener("click", onTargetClick, true);
|
|
198
201
|
document.addEventListener("contextmenu", onTargetClick, true);
|
|
199
202
|
frame ||= requestAnimationFrame(track);
|
|
@@ -226,28 +229,42 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
226
229
|
const CARD = `${PANEL_SURFACE} rounded-card w-80 max-w-[calc(100vw-24px)] p-4 text-sm text-ink outline-none`;
|
|
227
230
|
return (_ctx, _cache) => {
|
|
228
231
|
return openBlock(), createBlock(Teleport, { to: "body" }, [
|
|
229
|
-
|
|
232
|
+
createVNode(Transition, {
|
|
233
|
+
"enter-active-class": "transition-opacity duration-[var(--duration-medium)] ease-[var(--ease-emphasized)] motion-reduce:transition-none",
|
|
234
|
+
"leave-active-class": "transition-opacity duration-[var(--duration-medium)] ease-out motion-reduce:transition-none",
|
|
235
|
+
"enter-from-class": "opacity-0",
|
|
236
|
+
"leave-to-class": "opacity-0"
|
|
237
|
+
}, {
|
|
238
|
+
default: withCtx(() => [
|
|
239
|
+
open.value ? (openBlock(), createElementBlock("div", {
|
|
240
|
+
key: 0,
|
|
241
|
+
class: "lp-tour pointer-events-none fixed inset-0 z-(--z-tour)",
|
|
242
|
+
onPointerdown: _cache[0] || (_cache[0] = withModifiers(() => {
|
|
243
|
+
}, ["stop"]))
|
|
244
|
+
}, [
|
|
245
|
+
createElementVNode("div", {
|
|
246
|
+
class: "lp-scrim absolute inset-0 transition-[clip-path] duration-[var(--duration-medium)] ease-[var(--ease-emphasized)] motion-reduce:transition-none",
|
|
247
|
+
style: normalizeStyle({ clipPath: clip.value })
|
|
248
|
+
}, null, 4),
|
|
249
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(panels.value, (panel, i) => {
|
|
250
|
+
return openBlock(), createElementBlock("div", {
|
|
251
|
+
key: i,
|
|
252
|
+
class: "pointer-events-auto absolute left-0 top-0",
|
|
253
|
+
style: normalizeStyle({ transform: `translate(${panel.x}px, ${panel.y}px)`, width: `${panel.width}px`, height: `${panel.height}px` })
|
|
254
|
+
}, null, 4);
|
|
255
|
+
}), 128)),
|
|
256
|
+
hole.value ? (openBlock(), createElementBlock("div", {
|
|
257
|
+
key: 0,
|
|
258
|
+
class: normalizeClass(["absolute left-0 top-0 rounded-control ring-2 ring-brand transition-[transform,width,height] duration-[var(--duration-medium)] ease-[var(--ease-emphasized)] motion-reduce:transition-none", step.value?.try ? "pointer-events-none animate-pulse" : "pointer-events-auto"]),
|
|
259
|
+
style: normalizeStyle({ transform: `translate(${hole.value.x}px, ${hole.value.y}px)`, width: `${hole.value.width}px`, height: `${hole.value.height}px` })
|
|
260
|
+
}, null, 6)) : createCommentVNode("", true)
|
|
261
|
+
], 32)) : createCommentVNode("", true)
|
|
262
|
+
]),
|
|
263
|
+
_: 1
|
|
264
|
+
}),
|
|
265
|
+
unref(wide) ? (openBlock(), createBlock(unref(PopoverRoot), {
|
|
230
266
|
key: 0,
|
|
231
|
-
|
|
232
|
-
onPointerdown: _cache[0] || (_cache[0] = withModifiers(() => {
|
|
233
|
-
}, ["stop"]))
|
|
234
|
-
}, [
|
|
235
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList(panels.value, (panel, i) => {
|
|
236
|
-
return openBlock(), createElementBlock("div", {
|
|
237
|
-
key: i,
|
|
238
|
-
class: "lp-scrim pointer-events-auto absolute left-0 top-0 transition-[transform,width,height] duration-[var(--duration-medium)] ease-[var(--ease-emphasized)] motion-reduce:transition-none",
|
|
239
|
-
style: normalizeStyle({ transform: `translate(${panel.x}px, ${panel.y}px)`, width: `${panel.width}px`, height: `${panel.height}px` })
|
|
240
|
-
}, null, 4);
|
|
241
|
-
}), 128)),
|
|
242
|
-
hole.value ? (openBlock(), createElementBlock("div", {
|
|
243
|
-
key: 0,
|
|
244
|
-
class: normalizeClass(["absolute left-0 top-0 rounded-control ring-2 ring-brand transition-[transform,width,height] duration-[var(--duration-medium)] ease-[var(--ease-emphasized)] motion-reduce:transition-none", step.value?.try ? "pointer-events-none animate-pulse" : "pointer-events-auto"]),
|
|
245
|
-
style: normalizeStyle({ transform: `translate(${hole.value.x}px, ${hole.value.y}px)`, width: `${hole.value.width}px`, height: `${hole.value.height}px` })
|
|
246
|
-
}, null, 6)) : createCommentVNode("", true)
|
|
247
|
-
], 32)) : createCommentVNode("", true),
|
|
248
|
-
open.value && unref(wide) ? (openBlock(), createBlock(unref(PopoverRoot), {
|
|
249
|
-
key: 1,
|
|
250
|
-
open: ready.value
|
|
267
|
+
open: open.value && ready.value
|
|
251
268
|
}, {
|
|
252
269
|
default: withCtx(() => [
|
|
253
270
|
createVNode(unref(PopoverAnchor), { reference }),
|
|
@@ -259,7 +276,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
259
276
|
"collision-padding": 12,
|
|
260
277
|
"update-position-strategy": "always",
|
|
261
278
|
"trap-focus": false,
|
|
262
|
-
class: normalizeClass([CARD, "z-[calc(var(--z-tour)+1)] data-[state=open]:animate-[popover-in_var(--duration-medium)_var(--ease-emphasized)] motion-reduce:animate-none"]),
|
|
279
|
+
class: normalizeClass([CARD, "z-[calc(var(--z-tour)+1)] data-[state=open]:animate-[popover-in_var(--duration-medium)_var(--ease-emphasized)] data-[state=closed]:animate-[popover-out_var(--duration-fast)_ease-out] motion-reduce:animate-none"]),
|
|
263
280
|
role: "dialog",
|
|
264
281
|
"aria-label": step.value?.title,
|
|
265
282
|
onPointerdown: _cache[1] || (_cache[1] = withModifiers(() => {
|
|
@@ -300,34 +317,39 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
300
317
|
]),
|
|
301
318
|
_: 3
|
|
302
319
|
}, 8, ["open"])) : createCommentVNode("", true),
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
320
|
+
createVNode(Transition, { "leave-active-class": "animate-[rise-out_var(--duration-fast)_ease-out] motion-reduce:animate-none" }, {
|
|
321
|
+
default: withCtx(() => [
|
|
322
|
+
open.value && !unref(wide) && ready.value ? (openBlock(), createElementBlock("div", {
|
|
323
|
+
key: 0,
|
|
324
|
+
class: normalizeClass([CARD, "pointer-events-auto fixed inset-x-3 bottom-3 z-[calc(var(--z-tour)+1)] w-auto animate-[rise-in_var(--duration-medium)_var(--ease-emphasized)] motion-reduce:animate-none"]),
|
|
325
|
+
role: "dialog",
|
|
326
|
+
"aria-label": step.value?.title,
|
|
327
|
+
onPointerdown: _cache[5] || (_cache[5] = withModifiers(() => {
|
|
328
|
+
}, ["stop"]))
|
|
329
|
+
}, [
|
|
330
|
+
renderSlot(_ctx.$slots, "card", {
|
|
331
|
+
step: step.value,
|
|
332
|
+
index: index.value,
|
|
333
|
+
next,
|
|
334
|
+
back,
|
|
335
|
+
dismiss
|
|
336
|
+
}, () => [
|
|
337
|
+
createVNode(_sfc_main$1, {
|
|
338
|
+
step: step.value,
|
|
339
|
+
index: index.value,
|
|
340
|
+
last: last.value,
|
|
341
|
+
progress: progress.value,
|
|
342
|
+
labels: unref(labels),
|
|
343
|
+
onNext: next,
|
|
344
|
+
onBack: back,
|
|
345
|
+
onPerform: perform,
|
|
346
|
+
onDismiss: dismiss
|
|
347
|
+
}, null, 8, ["step", "index", "last", "progress", "labels"])
|
|
348
|
+
])
|
|
349
|
+
], 42, _hoisted_1)) : createCommentVNode("", true)
|
|
350
|
+
]),
|
|
351
|
+
_: 3
|
|
352
|
+
})
|
|
331
353
|
]);
|
|
332
354
|
};
|
|
333
355
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const COMPONENT_NAMES: readonly ["LayoutCanvas", "LpActionBar", "LpAddressInput", "LpAlert", "LpAppShell", "LpAutocomplete", "LpAvatar", "LpBadge", "LpBreadcrumbs", "LpButton", "LpCalendar", "LpCard", "LpChart", "LpCheckbox", "LpCodeBlock", "LpColorPicker", "LpCommandPalette", "LpConfirmDialog", "LpConfirmHost", "LpContextMenu", "LpDatePicker", "LpDateRangePicker", "LpDisclosure", "LpDivider", "LpDrawer", "LpDropdownMenu", "LpDropzone", "LpEmptyState", "LpFieldNotice", "LpFileTree", "LpFormField", "LpHintLayer", "LpHints", "LpIcon", "LpImageEditor", "LpInfraNode", "LpInput", "LpKeys", "LpLightbox", "LpLink", "LpLogViewer", "LpMapPicker", "LpMediaGallery", "LpModal", "LpModalNav", "LpNotificationBell", "LpNumberField", "LpNumberFlow", "LpOtpInput", "LpPagination", "LpPaletteFacts", "LpPaletteHeader", "LpPalettePreview", "LpPaletteStats", "LpPaletteSwatches", "LpPasswordInput", "LpPhoneInput", "LpPie", "LpPopover", "LpProgress", "LpRadio", "LpRadioGroup", "LpRangeCalendar", "LpRangeSlider", "LpRollingText", "LpScrollArea", "LpSection", "LpSegmented", "LpSelect", "LpServiceNode", "LpShift", "LpShortcutsDialog", "LpSidebar", "LpSkeleton", "LpSlider", "LpSparkline", "LpStat", "LpStepper", "LpSwitch", "LpTable", "LpTableOfContents", "LpTabs", "LpTagsInput", "LpTextarea", "LpThemeProvider", "LpThemeSwitcher", "LpTilt", "LpTimeField", "LpToaster", "LpTooltip", "LpTooltipProvider", "LpTopologyCanvas", "LpTour", "LpUptimeBar", "LpVideoBackdrop"];
|
|
1
|
+
export declare const COMPONENT_NAMES: readonly ["LayoutCanvas", "LpActionBar", "LpAddressInput", "LpAlert", "LpAppShell", "LpAutocomplete", "LpAvatar", "LpBadge", "LpBreadcrumbs", "LpButton", "LpCalendar", "LpCard", "LpChart", "LpCheckbox", "LpCodeBlock", "LpColorPicker", "LpCommandPalette", "LpConfirmDialog", "LpConfirmHost", "LpContextMenu", "LpDatePicker", "LpDateRangePicker", "LpDisclosure", "LpDivider", "LpDrawer", "LpDropdownMenu", "LpDropzone", "LpEmptyState", "LpFieldNotice", "LpFileTree", "LpFormField", "LpHintLayer", "LpHints", "LpIcon", "LpImageEditor", "LpInfraNode", "LpInput", "LpKeys", "LpLightbox", "LpLink", "LpLogViewer", "LpMapPicker", "LpMediaGallery", "LpModal", "LpModalNav", "LpNotificationBell", "LpNumberField", "LpNumberFlow", "LpOtpInput", "LpPagination", "LpPaletteFacts", "LpPaletteHeader", "LpPalettePreview", "LpPaletteStats", "LpPaletteSwatches", "LpPasswordInput", "LpPhoneInput", "LpPie", "LpPopover", "LpProgress", "LpRadio", "LpRadioGroup", "LpRangeCalendar", "LpRangeSlider", "LpRollingText", "LpScrollArea", "LpSection", "LpSegmented", "LpSelect", "LpServiceNode", "LpShift", "LpShortcutsDialog", "LpSidebar", "LpSkeleton", "LpSlider", "LpSparkline", "LpStat", "LpStepper", "LpSwap", "LpSwitch", "LpTable", "LpTableOfContents", "LpTabs", "LpTagsInput", "LpTextarea", "LpThemeProvider", "LpThemeSwitcher", "LpTilt", "LpTimeField", "LpToaster", "LpTooltip", "LpTooltipProvider", "LpTopologyCanvas", "LpTour", "LpUptimeBar", "LpVideoBackdrop"];
|
|
@@ -34,6 +34,12 @@ type __VLS_Props = {
|
|
|
34
34
|
* of the page from the start should not be shouted on load.
|
|
35
35
|
*/
|
|
36
36
|
live?: "assertive" | "polite" | false;
|
|
37
|
+
/**
|
|
38
|
+
* Work is under way: the icon becomes a spinning loader (unless `icon` is
|
|
39
|
+
* given, which then spins instead) and the alert is announced politely.
|
|
40
|
+
* A loader drawn as a still icon read as a frozen page.
|
|
41
|
+
*/
|
|
42
|
+
busy?: boolean;
|
|
37
43
|
};
|
|
38
44
|
declare var __VLS_6: {};
|
|
39
45
|
type __VLS_Slots = {} & {
|
|
@@ -42,6 +48,7 @@ type __VLS_Slots = {} & {
|
|
|
42
48
|
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
43
49
|
variant: "info" | "danger" | "success" | "warning";
|
|
44
50
|
live: "assertive" | "polite" | false;
|
|
51
|
+
busy: boolean;
|
|
45
52
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
46
53
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
47
54
|
declare const _default: typeof __VLS_export;
|
|
@@ -2,6 +2,14 @@ export interface AutocompleteOption {
|
|
|
2
2
|
value: string;
|
|
3
3
|
label?: string;
|
|
4
4
|
description?: string;
|
|
5
|
+
/** A picture beside the option: an avatar, an icon of a server. */
|
|
6
|
+
image?: string;
|
|
7
|
+
}
|
|
8
|
+
/** What the field's value stands for: a name for an id, with an optional muted hint and picture. */
|
|
9
|
+
export interface AutocompleteSelection {
|
|
10
|
+
label: string;
|
|
11
|
+
hint?: string;
|
|
12
|
+
image?: string;
|
|
5
13
|
}
|
|
6
14
|
declare const _default: typeof __VLS_export;
|
|
7
15
|
export default _default;
|
|
@@ -31,6 +39,14 @@ declare const __VLS_export: import("vue").DefineComponent<{
|
|
|
31
39
|
pattern?: RegExp | string;
|
|
32
40
|
/** Allowed-character RegExp; hard-blocks other input (see LpInput). */
|
|
33
41
|
restrict?: RegExp;
|
|
42
|
+
/**
|
|
43
|
+
* What the current value stands for, shown in the field itself while it is
|
|
44
|
+
* not being edited: a picked id reads as a person (avatar in place of the
|
|
45
|
+
* icon, name, muted hint) instead of digits nobody recognises, and nothing
|
|
46
|
+
* appears or jumps below the field. Focusing it brings the raw text back.
|
|
47
|
+
* When room runs short the hint gives way first; the name stays.
|
|
48
|
+
*/
|
|
49
|
+
selected?: AutocompleteSelection | null;
|
|
34
50
|
}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
|
|
35
51
|
select: (value: string) => any;
|
|
36
52
|
"update:modelValue": (value: string) => any;
|
|
@@ -60,6 +76,14 @@ declare const __VLS_export: import("vue").DefineComponent<{
|
|
|
60
76
|
pattern?: RegExp | string;
|
|
61
77
|
/** Allowed-character RegExp; hard-blocks other input (see LpInput). */
|
|
62
78
|
restrict?: RegExp;
|
|
79
|
+
/**
|
|
80
|
+
* What the current value stands for, shown in the field itself while it is
|
|
81
|
+
* not being edited: a picked id reads as a person (avatar in place of the
|
|
82
|
+
* icon, name, muted hint) instead of digits nobody recognises, and nothing
|
|
83
|
+
* appears or jumps below the field. Focusing it brings the raw text back.
|
|
84
|
+
* When room runs short the hint gives way first; the name stays.
|
|
85
|
+
*/
|
|
86
|
+
selected?: AutocompleteSelection | null;
|
|
63
87
|
}> & Readonly<{
|
|
64
88
|
onSelect?: ((value: string) => any) | undefined;
|
|
65
89
|
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
@@ -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-Cv_F2iCG.js";
|
|
9
9
|
import { _ as _sfc_main$2 } from "../chunks/LpIcon-CTuDVTYv.js";
|
|
10
10
|
import { _ as _sfc_main$3 } from "../chunks/LpShift-DXNsauQZ.js";
|
|
11
11
|
import { useMergedAttrs } from "../composables/useMergedClass.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineComponent, ref, useId, computed, shallowRef, watch, useSlots, onBeforeUnmount, nextTick, openBlock, createBlock, unref, withCtx, createVNode, normalizeStyle, normalizeClass, withModifiers, createTextVNode, toDisplayString, createElementVNode, createElementBlock, Fragment, renderList, createCommentVNode, withDirectives, withKeys, vModelText, resolveDynamicComponent, Transition, renderSlot } from "vue";
|
|
2
2
|
import { DialogRoot, DialogPortal, DialogOverlay, DialogContent, DialogTitle, DialogDescription } from "reka-ui";
|
|
3
|
-
import { _ as _sfc_main$3 } from "../chunks/LpAvatar-
|
|
3
|
+
import { _ as _sfc_main$3 } from "../chunks/LpAvatar-K6MOMfgn.js";
|
|
4
4
|
import { _ as _sfc_main$1 } from "../chunks/LpIcon-CTuDVTYv.js";
|
|
5
5
|
import { _ as _sfc_main$2 } from "../chunks/LpScrollArea-Hz3-JWUG.js";
|
|
6
6
|
import { useAsyncTask } from "../composables/useAsyncTask.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent, computed, openBlock, createElementBlock, createElementVNode, renderSlot, createBlock, createVNode, createCommentVNode, toDisplayString } from "vue";
|
|
2
|
-
import { _ as _sfc_main$1 } from "../chunks/LpAvatar-
|
|
2
|
+
import { _ as _sfc_main$1 } from "../chunks/LpAvatar-K6MOMfgn.js";
|
|
3
3
|
import { _ as _sfc_main$2 } from "../chunks/LpIcon-CTuDVTYv.js";
|
|
4
4
|
import { _ as _sfc_main$3 } from "../chunks/HighlightText-BvnYZkhi.js";
|
|
5
5
|
import { _ as _export_sfc } from "../chunks/_plugin-vue_export-helper-1tPrXgE0.js";
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
/** Identity of the current content; a new value plays the swap. */
|
|
3
|
+
swapKey: string | number;
|
|
4
|
+
/** Turn the motion off (the content still swaps). */
|
|
5
|
+
disabled?: boolean;
|
|
6
|
+
};
|
|
7
|
+
declare var __VLS_14: {};
|
|
8
|
+
type __VLS_Slots = {} & {
|
|
9
|
+
default?: (props: typeof __VLS_14) => any;
|
|
10
|
+
};
|
|
11
|
+
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>;
|
|
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
|
+
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineComponent, computed, useAttrs, ref, shallowRef, watch, onMounted, onBeforeUnmount, openBlock, createElementBlock, normalizeClass, createVNode, withCtx, createTextVNode, toDisplayString, createCommentVNode, Fragment, renderList, createElementVNode, Transition, renderSlot, mergeProps, normalizeStyle, createBlock, TransitionGroup, unref, withModifiers, nextTick } from "vue";
|
|
2
2
|
import { _ as _sfc_main$7 } from "../chunks/LpCheckbox-DV9W6T3H.js";
|
|
3
|
-
import { _ as _sfc_main$6 } from "../chunks/LpContextMenu-
|
|
3
|
+
import { _ as _sfc_main$6 } from "../chunks/LpContextMenu-Cv_F2iCG.js";
|
|
4
4
|
import { _ as _sfc_main$2 } from "../chunks/LpIcon-CTuDVTYv.js";
|
|
5
5
|
import { _ as _sfc_main$a } from "../chunks/LpPagination-BFl0I7tL.js";
|
|
6
6
|
import { _ as _sfc_main$8 } from "../chunks/LpPopover-DCKeqiVn.js";
|
|
@@ -18,7 +18,7 @@ import { _ as _sfc_main$1 } from "../chunks/LpButton-CJSD7N0Z.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-DpXyPzs8.css';const _hoisted_1 = {
|
|
22
22
|
key: 0,
|
|
23
23
|
class: "flex justify-end"
|
|
24
24
|
};
|
|
@@ -53,7 +53,7 @@ const _hoisted_16 = {
|
|
|
53
53
|
class: "lp-row-empty"
|
|
54
54
|
};
|
|
55
55
|
const _hoisted_17 = ["colspan"];
|
|
56
|
-
const _hoisted_18 = ["onContextmenu", "data-paint-key", "onClick", "onPointerdown"];
|
|
56
|
+
const _hoisted_18 = ["onContextmenu", "data-paint-key", "data-lp-context-row", "onClick", "onPointerdown"];
|
|
57
57
|
const _hoisted_19 = ["onPointerdown"];
|
|
58
58
|
const __default__ = { inheritAttrs: false };
|
|
59
59
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
@@ -899,6 +899,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
899
899
|
class: ["group border-b border-line/60 outline-none transition-colors last:border-0 hover:bg-surface-soft/60 focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring data-[active]:bg-surface-soft/40", selectedSet.value.has(keyFor(row, index)) ? "bg-brand-soft/40" : ""]
|
|
900
900
|
}, { ref_for: true }, unref(roving).itemProps(String(keyFor(row, index))), {
|
|
901
901
|
"data-paint-key": __props.selectable ? String(keyFor(row, index)) : void 0,
|
|
902
|
+
"data-lp-context-row": __props.rowMenu ? "" : void 0,
|
|
902
903
|
onClick: ($event) => onRowClick(row, keyFor(row, index)),
|
|
903
904
|
onPointerdown: ($event) => onRowPointerDown($event, keyFor(row, index)),
|
|
904
905
|
onKeydown: onRowKeydown
|
|
@@ -957,7 +958,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
957
958
|
};
|
|
958
959
|
}
|
|
959
960
|
});
|
|
960
|
-
const LpTable = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
961
|
+
const LpTable = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-a9d69d56"]]);
|
|
961
962
|
export {
|
|
962
963
|
LpTable as default
|
|
963
964
|
};
|
|
@@ -8,6 +8,15 @@ type Size = {
|
|
|
8
8
|
export declare function holeOf(target: Box, padding: number, viewport: Size): Box;
|
|
9
9
|
/** The four dim panels around a hole: top, bottom, left, right. */
|
|
10
10
|
export declare function panelsAround(hole: Box, viewport: Size): Box[];
|
|
11
|
+
/**
|
|
12
|
+
* The dimmed, blurred layer as one clip: the whole viewport with the hole cut
|
|
13
|
+
* out (evenodd), corners rounded like the ring drawn around it. One layer
|
|
14
|
+
* instead of the four panels, because each panel blurred the page on its own
|
|
15
|
+
* and the blur's edges showed as seams where they met. The point count never
|
|
16
|
+
* changes, so the clip eases between steps on every engine; with no target
|
|
17
|
+
* the hole shrinks to a dot in the middle.
|
|
18
|
+
*/
|
|
19
|
+
export declare function holeClip(hole: Box | null, viewport: Size, radius: number): string;
|
|
11
20
|
/**
|
|
12
21
|
* Open the context menu of an element as a right-click would, at its centre.
|
|
13
22
|
* Lets a tour step show a row's menu without the user hunting for it; the menu
|
package/dist/components/tour.js
CHANGED
|
@@ -14,6 +14,27 @@ function panelsAround(hole, viewport) {
|
|
|
14
14
|
{ x: hole.x + hole.width, y: hole.y, width: Math.max(0, viewport.width - hole.x - hole.width), height: hole.height }
|
|
15
15
|
];
|
|
16
16
|
}
|
|
17
|
+
const CORNER_STEPS = 6;
|
|
18
|
+
function holeClip(hole, viewport, radius) {
|
|
19
|
+
const h = hole ?? { x: viewport.width / 2, y: viewport.height / 2, width: 0, height: 0 };
|
|
20
|
+
const r = Math.max(0, Math.min(radius, h.width / 2, h.height / 2));
|
|
21
|
+
const px = (n) => `${Math.round(n * 100) / 100}px`;
|
|
22
|
+
const corners = [
|
|
23
|
+
[h.x + h.width - r, h.y + r, -90],
|
|
24
|
+
[h.x + h.width - r, h.y + h.height - r, 0],
|
|
25
|
+
[h.x + r, h.y + h.height - r, 90],
|
|
26
|
+
[h.x + r, h.y + r, 180]
|
|
27
|
+
];
|
|
28
|
+
const points = [];
|
|
29
|
+
for (const [cx, cy, start] of corners) {
|
|
30
|
+
for (let i = 0; i <= CORNER_STEPS; i++) {
|
|
31
|
+
const angle = (start + 90 * i / CORNER_STEPS) * Math.PI / 180;
|
|
32
|
+
points.push(`${px(cx + r * Math.cos(angle))} ${px(cy + r * Math.sin(angle))}`);
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
const outer = [`0px 0px`, `${px(viewport.width)} 0px`, `${px(viewport.width)} ${px(viewport.height)}`, `0px ${px(viewport.height)}`, `0px 0px`];
|
|
36
|
+
return `polygon(evenodd, ${[...outer, ...points, points[0]].join(", ")})`;
|
|
37
|
+
}
|
|
17
38
|
function openContextMenu(el) {
|
|
18
39
|
const box = el.getBoundingClientRect();
|
|
19
40
|
el.dispatchEvent(
|
|
@@ -32,6 +53,7 @@ function openContextMenu(el) {
|
|
|
32
53
|
};
|
|
33
54
|
}
|
|
34
55
|
export {
|
|
56
|
+
holeClip,
|
|
35
57
|
holeOf,
|
|
36
58
|
openContextMenu,
|
|
37
59
|
panelsAround
|
|
@@ -75,6 +75,8 @@ export declare const HINT_SIGNALS: {
|
|
|
75
75
|
/** An item's actions were opened in the palette (Tab). */
|
|
76
76
|
readonly paletteActions: "lp.palette-actions";
|
|
77
77
|
};
|
|
78
|
+
/** The element a left click just landed on that also has a right-click menu (a table row rather than the table). */
|
|
79
|
+
export declare function noteContextTarget(el: Element): void;
|
|
78
80
|
/** Right click instead of the "…" button. */
|
|
79
81
|
export declare function contextMenuTip(text?: Partial<Pick<HintTip, "title" | "text"> & {
|
|
80
82
|
stepText: string;
|
|
@@ -15,6 +15,20 @@ const HINT_SIGNALS = {
|
|
|
15
15
|
/** An item's actions were opened in the palette (Tab). */
|
|
16
16
|
paletteActions: "lp.palette-actions"
|
|
17
17
|
};
|
|
18
|
+
let lastContextTarget = null;
|
|
19
|
+
function noteContextTarget(el) {
|
|
20
|
+
lastContextTarget = new WeakRef(el);
|
|
21
|
+
}
|
|
22
|
+
const onScreen = (el) => {
|
|
23
|
+
const box = el.getBoundingClientRect();
|
|
24
|
+
return el.isConnected && box.width > 0 && box.bottom > 0 && box.top < window.innerHeight;
|
|
25
|
+
};
|
|
26
|
+
function rightClickTarget() {
|
|
27
|
+
const last = lastContextTarget?.deref();
|
|
28
|
+
if (last && onScreen(last)) return last;
|
|
29
|
+
const visible = (selector) => [...document.querySelectorAll(selector)].find(onScreen) ?? null;
|
|
30
|
+
return visible("[data-lp-context-row]") ?? visible("main [data-lp-context-menu]") ?? visible("[data-lp-context-menu]");
|
|
31
|
+
}
|
|
18
32
|
function contextMenuTip(text = {}) {
|
|
19
33
|
return {
|
|
20
34
|
id: "lp.tip.context-menu",
|
|
@@ -22,10 +36,7 @@ function contextMenuTip(text = {}) {
|
|
|
22
36
|
text: text.text ?? "Rows and cards open their actions on right-click, even where no … button shows it.",
|
|
23
37
|
when: (count) => count(HINT_SIGNALS.contextMenu) === 0 && (count(HINT_SIGNALS.menuButton) >= 5 || count(HINT_SIGNALS.contextTarget) >= 25),
|
|
24
38
|
step: () => {
|
|
25
|
-
const target =
|
|
26
|
-
const box = el.getBoundingClientRect();
|
|
27
|
-
return box.width > 0 && box.bottom > 0 && box.top < window.innerHeight;
|
|
28
|
-
});
|
|
39
|
+
const target = rightClickTarget();
|
|
29
40
|
return target ? { target, title: text.title ?? "Right-click works here", text: text.stepText ?? "Right-click this to see what it can do.", try: true } : null;
|
|
30
41
|
}
|
|
31
42
|
};
|
|
@@ -413,6 +424,7 @@ export {
|
|
|
413
424
|
hintKey,
|
|
414
425
|
hintSummary,
|
|
415
426
|
localHintStorage,
|
|
427
|
+
noteContextTarget,
|
|
416
428
|
paletteTip,
|
|
417
429
|
provideHintSystem,
|
|
418
430
|
runningHintSystem,
|