@leavepulse/ui 0.45.0 → 0.46.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.
Files changed (87) hide show
  1. package/dist/assets/{LpCommandPalette-nGNnzXqQ.css → LpCommandPalette-5miKYsb-.css} +21 -21
  2. package/dist/assets/{LpDropzone-i4BdMi1H.css → LpDropzone-Ev6X03zj.css} +12 -12
  3. package/dist/assets/{LpTable-CPwWxTJS.css → LpTable-BoeA_TgK.css} +17 -17
  4. package/dist/chunks/{LpAddressInput-BwX8uo4_.js → LpAddressInput-iOJhmRzy.js} +1 -1
  5. package/dist/chunks/{LpAppShell-C53_RaGF.js → LpAppShell-BmMYcEVx.js} +2 -2
  6. package/dist/chunks/{LpAvatar-C1XStdOo.js → LpAvatar-DeSb6H0c.js} +1 -1
  7. package/dist/chunks/{LpCard-C2IvucmX.js → LpCard-BdxkMXjo.js} +1 -1
  8. package/dist/chunks/{LpColorPicker-zz4VGkG4.js → LpColorPicker-BLqPX5Vw.js} +1 -1
  9. package/dist/chunks/{LpConfirmDialog-DCw5jR1t.js → LpConfirmDialog-Ca-CTlxT.js} +1 -1
  10. package/dist/chunks/{LpConfirmHost-CbywMpMP.js → LpConfirmHost-BAaSaT2b.js} +1 -1
  11. package/dist/chunks/{LpContextMenu-BqkAYa9X.js → LpContextMenu-1cKew_Dc.js} +17 -4
  12. package/dist/chunks/{LpDatePicker-DuusgT69.js → LpDatePicker-BrdFtSTy.js} +3 -1
  13. package/dist/chunks/{LpDateRangePicker-DHeuznfC.js → LpDateRangePicker-Drd7EbIz.js} +4 -2
  14. package/dist/chunks/{LpDrawer-Dt4aB4Fr.js → LpDrawer-CBFVD624.js} +2 -2
  15. package/dist/chunks/{LpDropdownMenu-DdJGQzPn.js → LpDropdownMenu-DrpJJBp0.js} +22 -8
  16. package/dist/chunks/{LpFileTree-CNurOvkV.js → LpFileTree-bk5VjBey.js} +2 -2
  17. package/dist/chunks/{LpFileTreeNode-D_qRRdsH.js → LpFileTreeNode-BvMSBM7X.js} +1 -1
  18. package/dist/chunks/{LpLogViewer-KypbgOyo.js → LpLogViewer-BDFXzvcl.js} +2 -2
  19. package/dist/chunks/{LpModal-DMMDQHAu.js → LpModal-JNa3B_Lr.js} +13 -6
  20. package/dist/chunks/{LpModalNav-BVPDyIup.js → LpModalNav-BAxC9et7.js} +20 -7
  21. package/dist/chunks/{LpNotificationBell-CCwyJP5C.js → LpNotificationBell-DsqSyMwS.js} +2 -2
  22. package/dist/chunks/{LpPie-BEJ2SfI6.js → LpPie-BdSnta11.js} +1 -1
  23. package/dist/chunks/{LpScrollArea-Bry1fdOM.js → LpScrollArea-Hz3-JWUG.js} +23 -5
  24. package/dist/chunks/{LpSidebar-CQNB0-yU.js → LpSidebar-DpEiGi8L.js} +2 -2
  25. package/dist/chunks/{LpSidebarNav-kx-LdqNU.js → LpSidebarNav-BUuxipX-.js} +2 -2
  26. package/dist/chunks/{LpThemeSwitcher-B4aVPbNC.js → LpThemeSwitcher-BbYFFT5w.js} +1 -1
  27. package/dist/chunks/{LpToaster-DpJvoCOh.js → LpToaster-DTtWuKvq.js} +39 -6
  28. package/dist/chunks/MenuTitle-J3ZDYjpV.js +56 -0
  29. package/dist/components/LpAddressInput.vue.js +1 -1
  30. package/dist/components/LpAppShell.vue.js +1 -1
  31. package/dist/components/LpAvatar.vue.js +1 -1
  32. package/dist/components/LpCard.vue.js +1 -1
  33. package/dist/components/LpChart.vue.js +1 -1
  34. package/dist/components/LpColorPicker.vue.js +1 -1
  35. package/dist/components/LpCommandPalette.vue.js +7 -4
  36. package/dist/components/LpConfirmDialog.vue.js +1 -1
  37. package/dist/components/LpConfirmHost.vue.js +1 -1
  38. package/dist/components/LpContextMenu.vue.d.ts +11 -0
  39. package/dist/components/LpContextMenu.vue.js +1 -1
  40. package/dist/components/LpDatePicker.vue.js +1 -1
  41. package/dist/components/LpDateRangePicker.vue.js +1 -1
  42. package/dist/components/LpDrawer.vue.js +1 -1
  43. package/dist/components/LpDropdownMenu.vue.d.ts +6 -0
  44. package/dist/components/LpDropdownMenu.vue.js +1 -1
  45. package/dist/components/LpDropzone.vue.d.ts +14 -0
  46. package/dist/components/LpDropzone.vue.js +9 -7
  47. package/dist/components/LpFileTree.vue.js +1 -1
  48. package/dist/components/LpFileTreeNode.vue.js +1 -1
  49. package/dist/components/LpLogViewer.vue.js +1 -1
  50. package/dist/components/LpModal.vue.d.ts +7 -5
  51. package/dist/components/LpModal.vue.js +1 -1
  52. package/dist/components/LpModalNav.vue.d.ts +5 -3
  53. package/dist/components/LpModalNav.vue.js +1 -1
  54. package/dist/components/LpNotificationBell.vue.js +1 -1
  55. package/dist/components/LpPie.vue.js +1 -1
  56. package/dist/components/LpScrollArea.vue.d.ts +2 -2
  57. package/dist/components/LpScrollArea.vue.js +1 -1
  58. package/dist/components/LpShortcutsDialog.vue.js +1 -1
  59. package/dist/components/LpSidebar.vue.js +1 -1
  60. package/dist/components/LpSidebarNav.vue.js +1 -1
  61. package/dist/components/LpTable.vue.js +5 -5
  62. package/dist/components/LpThemeSwitcher.vue.js +1 -1
  63. package/dist/components/LpToaster.vue.d.ts +2 -0
  64. package/dist/components/LpToaster.vue.js +1 -1
  65. package/dist/components/MenuTitle.vue.d.ts +9 -0
  66. package/dist/components/MenuTitle.vue.js +4 -0
  67. package/dist/composables/useClipboard.js +35 -2
  68. package/dist/composables/useLocale.d.ts +2 -0
  69. package/dist/composables/useLocale.js +9 -0
  70. package/dist/index.js +22 -22
  71. package/package.json +1 -1
  72. package/src/components/LpCommandPalette.vue +7 -1
  73. package/src/components/LpContextMenu.vue +19 -1
  74. package/src/components/LpDatePicker.vue +3 -1
  75. package/src/components/LpDateRangePicker.vue +3 -1
  76. package/src/components/LpDrawer.vue +1 -1
  77. package/src/components/LpDropdownMenu.vue +14 -2
  78. package/src/components/LpDropzone.vue +13 -5
  79. package/src/components/LpModal.vue +8 -2
  80. package/src/components/LpModalNav.vue +17 -2
  81. package/src/components/LpScrollArea.vue +30 -2
  82. package/src/components/LpTable.vue +1 -1
  83. package/src/components/LpToaster.vue +42 -4
  84. package/src/components/MenuTitle.vue +34 -0
  85. package/src/composables/useClipboard.ts +49 -7
  86. package/src/composables/useLocale.ts +14 -0
  87. package/src/tokens/tokens.css +7 -4
@@ -1,9 +1,10 @@
1
1
  import { defineComponent, computed, ref, openBlock, createBlock, createSlots, withCtx, renderSlot, createElementVNode, normalizeClass, createVNode, createCommentVNode, createTextVNode, toDisplayString } from "vue";
2
+ import { useGlass } from "../composables/useGlass.js";
2
3
  import { useLabels } from "../composables/useLpConfig.js";
3
4
  import { _ as _sfc_main$2 } from "./LpButton-CKSwC6Mu.js";
4
5
  import { _ as _sfc_main$3 } from "./LpIcon-DYtaid0K.js";
5
- import { _ as _sfc_main$1 } from "./LpModal-DMMDQHAu.js";
6
- import { _ as _sfc_main$4 } from "./LpSidebar-CQNB0-yU.js";
6
+ import { _ as _sfc_main$1 } from "./LpModal-JNa3B_Lr.js";
7
+ import { _ as _sfc_main$4 } from "./LpSidebar-DpEiGi8L.js";
7
8
  const _hoisted_1 = { class: "flex items-center gap-2" };
8
9
  const _sfc_main = /* @__PURE__ */ defineComponent({
9
10
  __name: "LpModalNav",
@@ -61,6 +62,11 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
61
62
  );
62
63
  const triggerClass = computed(() => TRIGGER_VISIBILITY[props.mobileBreakpoint]);
63
64
  const railStyle = { maxHeight: "min(90vh, calc(100dvh - 2rem))" };
65
+ const frosted = useGlass(() => props.glass);
66
+ const railPanel = computed(() => [
67
+ "rounded-card border border-line p-2 shadow-panel",
68
+ frosted.value ? "lp-glass-overlay" : "bg-surface-raised"
69
+ ]);
64
70
  return (_ctx, _cache) => {
65
71
  return openBlock(), createBlock(_sfc_main$1, {
66
72
  glass: __props.glass,
@@ -122,8 +128,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
122
128
  responsive: "",
123
129
  "mobile-breakpoint": __props.mobileBreakpoint,
124
130
  style: railStyle,
125
- class: "rounded-card border border-line bg-surface-raised p-2 shadow-panel"
126
- }, null, 8, ["modelValue", "open", "items", "sections", "width", "searchable", "search-placeholder", "loading", "mobile-breakpoint"])
131
+ class: normalizeClass(railPanel.value)
132
+ }, null, 8, ["modelValue", "open", "items", "sections", "width", "searchable", "search-placeholder", "loading", "mobile-breakpoint", "class"])
127
133
  ], 2)
128
134
  ]),
129
135
  key: "0"
@@ -149,18 +155,25 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
149
155
  responsive: "",
150
156
  "mobile-breakpoint": __props.mobileBreakpoint,
151
157
  style: railStyle,
152
- class: "rounded-card border border-line bg-surface-raised p-2 shadow-panel"
153
- }, null, 8, ["modelValue", "open", "items", "sections", "width", "searchable", "search-placeholder", "loading", "mobile-breakpoint"])
158
+ class: normalizeClass(railPanel.value)
159
+ }, null, 8, ["modelValue", "open", "items", "sections", "width", "searchable", "search-placeholder", "loading", "mobile-breakpoint", "class"])
154
160
  ], 2)
155
161
  ]),
156
162
  key: "1"
157
163
  } : void 0,
164
+ _ctx.$slots.actions ? {
165
+ name: "actions",
166
+ fn: withCtx(() => [
167
+ renderSlot(_ctx.$slots, "actions")
168
+ ]),
169
+ key: "2"
170
+ } : void 0,
158
171
  _ctx.$slots.footer ? {
159
172
  name: "footer",
160
173
  fn: withCtx(() => [
161
174
  renderSlot(_ctx.$slots, "footer")
162
175
  ]),
163
- key: "2"
176
+ key: "3"
164
177
  } : void 0
165
178
  ]), 1032, ["glass", "open", "title", "description", "size", "width", "fill-body"]);
166
179
  };
@@ -2,12 +2,12 @@ import { defineComponent, computed, useModel, getCurrentInstance, ref, onMounted
2
2
  import { useLabels } from "../composables/useLpConfig.js";
3
3
  import { _ as _sfc_main$8 } from "./LpBadge-Fe0D1bYx.js";
4
4
  import { _ as _sfc_main$7 } from "./LpButton-CKSwC6Mu.js";
5
- import { _ as _sfc_main$5 } from "./LpContextMenu-BqkAYa9X.js";
5
+ import { _ as _sfc_main$5 } from "./LpContextMenu-1cKew_Dc.js";
6
6
  import { _ as _sfc_main$3 } from "./LpEmptyState-BJbZXC8D.js";
7
7
  import { _ as _sfc_main$6 } from "./LpIcon-DYtaid0K.js";
8
8
  import { _ as _sfc_main$1 } from "./LpPopover-DCKeqiVn.js";
9
9
  import { _ as _sfc_main$9 } from "./LpRollingText-DB7upf-5.js";
10
- import { _ as _sfc_main$4 } from "./LpScrollArea-Bry1fdOM.js";
10
+ import { _ as _sfc_main$4 } from "./LpScrollArea-Hz3-JWUG.js";
11
11
  import { _ as _sfc_main$2 } from "./LpShift-DXNsauQZ.js";
12
12
  const _hoisted_1 = { class: "flex items-center justify-between gap-2 px-3 py-2.5" };
13
13
  const _hoisted_2 = { class: "text-sm font-semibold" };
@@ -2,7 +2,7 @@ import { defineComponent, computed, ref, watch, onBeforeUnmount, openBlock, crea
2
2
  import { prefersReducedMotion, easeTravel } from "../composables/easing.js";
3
3
  import { useReveal } from "../composables/useReveal.js";
4
4
  import { resolveSlices, arcPath, calloutLabels, formatTick } from "../components/chart.js";
5
- import { _ as _sfc_main$2 } from "./LpContextMenu-BqkAYa9X.js";
5
+ import { _ as _sfc_main$2 } from "./LpContextMenu-1cKew_Dc.js";
6
6
  import { _ as _sfc_main$1 } from "./LpIcon-DYtaid0K.js";
7
7
  import { _ as _sfc_main$4 } from "./LpNumberFlow-z4WPZcZu.js";
8
8
  import { _ as _sfc_main$5 } from "./LpRollingText-DB7upf-5.js";
@@ -1,5 +1,6 @@
1
1
  import { defineComponent, ref, computed, watch, onBeforeUnmount, openBlock, createBlock, unref, normalizeClass, withCtx, createVNode, normalizeStyle, createElementVNode, renderSlot } from "vue";
2
2
  import { ScrollAreaRoot, ScrollAreaScrollbar, ScrollAreaThumb, ScrollAreaViewport } from "reka-ui";
3
+ import { prefersReducedMotion } from "../composables/easing.js";
3
4
  const barFade = "opacity-0 data-[state=visible]:animate-[fade-in_180ms_ease] data-[state=visible]:opacity-100 data-[state=hidden]:animate-[fade-out_240ms_ease]";
4
5
  const FADE_PX = 14;
5
6
  const _sfc_main = /* @__PURE__ */ defineComponent({
@@ -85,6 +86,19 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
85
86
  { immediate: true, flush: "post" }
86
87
  );
87
88
  onBeforeUnmount(stopEdgeWatch);
89
+ function onTrackPointerDown(event, axis) {
90
+ const el = viewportEl.value;
91
+ const bar = event.currentTarget;
92
+ const thumb = bar.querySelector("[data-lp-thumb]");
93
+ if (!el || !thumb || event.button !== 0 || thumb.contains(event.target)) return;
94
+ event.preventDefault();
95
+ event.stopImmediatePropagation();
96
+ const rect = thumb.getBoundingClientRect();
97
+ const before = axis === "y" ? event.clientY < rect.top : event.clientX < rect.left;
98
+ const step = (axis === "y" ? el.clientHeight : el.clientWidth) * 0.85 * (before ? -1 : 1);
99
+ const behavior = prefersReducedMotion() ? "auto" : "smooth";
100
+ el.scrollBy(axis === "y" ? { top: step, behavior } : { left: step, behavior });
101
+ }
88
102
  function onThumbPointerDown() {
89
103
  dragging.value = true;
90
104
  const stop = () => {
@@ -106,11 +120,13 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
106
120
  orientation: "vertical",
107
121
  "force-mount": "",
108
122
  class: normalizeClass(["group z-1 flex w-3.5 touch-none select-none justify-end py-px pl-2.5 pr-px", barFade]),
109
- style: normalizeStyle(__props.barInsetTop ? { marginTop: __props.barInsetTop } : void 0)
123
+ style: normalizeStyle(__props.barInsetTop ? { marginTop: __props.barInsetTop } : void 0),
124
+ onPointerdownCapture: _cache[0] || (_cache[0] = ($event) => onTrackPointerDown($event, "y"))
110
125
  }, {
111
126
  default: withCtx(() => [
112
127
  createVNode(unref(ScrollAreaThumb), {
113
- class: "min-w-1 rounded-l-pill bg-brand/40 transition-[min-width,background-color] duration-[var(--duration-fast)] group-hover:min-w-1.5 group-hover:bg-brand",
128
+ "data-lp-thumb": "",
129
+ class: "relative min-w-1 rounded-l-pill bg-brand/40 before:absolute before:inset-y-0 before:right-0 before:-left-2.5 before:content-[''] transition-[min-width,background-color] duration-[var(--duration-fast)] group-hover:min-w-1.5 group-hover:bg-brand",
114
130
  onPointerdown: onThumbPointerDown
115
131
  })
116
132
  ]),
@@ -118,11 +134,13 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
118
134
  }, 8, ["style"]),
119
135
  createVNode(unref(ScrollAreaScrollbar), {
120
136
  orientation: "horizontal",
121
- class: normalizeClass(["group z-1 flex h-3.5 flex-col touch-none select-none justify-end px-px pb-px pt-2.5", barFade])
137
+ class: normalizeClass(["group z-1 flex h-3.5 flex-col touch-none select-none justify-end px-px pb-px pt-2.5", barFade]),
138
+ onPointerdownCapture: _cache[1] || (_cache[1] = ($event) => onTrackPointerDown($event, "x"))
122
139
  }, {
123
140
  default: withCtx(() => [
124
141
  createVNode(unref(ScrollAreaThumb), {
125
- class: "min-h-1 rounded-t-pill bg-brand/40 transition-[min-height,background-color] duration-[var(--duration-fast)] group-hover:min-h-1.5 group-hover:bg-brand",
142
+ "data-lp-thumb": "",
143
+ class: "relative min-h-1 rounded-t-pill bg-brand/40 before:absolute before:inset-x-0 before:bottom-0 before:-top-2.5 before:content-[''] transition-[min-height,background-color] duration-[var(--duration-fast)] group-hover:min-h-1.5 group-hover:bg-brand",
126
144
  onPointerdown: onThumbPointerDown
127
145
  })
128
146
  ]),
@@ -138,7 +156,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
138
156
  style: normalizeStyle(__props.fade ? { maskImage: fadeMask.value, WebkitMaskImage: fadeMask.value } : void 0),
139
157
  onScrollPassive: onViewportScroll,
140
158
  onPointerdown: onViewportPointerDown,
141
- onFocusout: _cache[0] || (_cache[0] = (e) => e.target === e.currentTarget && onViewportBlur())
159
+ onFocusout: _cache[2] || (_cache[2] = (e) => e.target === e.currentTarget && onViewportBlur())
142
160
  }, {
143
161
  default: withCtx(() => [
144
162
  createElementVNode("div", {
@@ -1,8 +1,8 @@
1
1
  import { defineComponent, computed, ref, useId, openBlock, createElementBlock, Fragment, createElementVNode, mergeProps, unref, normalizeClass, renderSlot, createCommentVNode, createBlock, createVNode, createSlots, withCtx, normalizeProps, guardReactiveProps } from "vue";
2
2
  import { useLabels } from "../composables/useLpConfig.js";
3
- import { _ as _sfc_main$3 } from "./LpDrawer-Dt4aB4Fr.js";
3
+ import { _ as _sfc_main$3 } from "./LpDrawer-CBFVD624.js";
4
4
  import { _ as _sfc_main$1 } from "./LpInput-D-YGQbEv.js";
5
- import { _ as _sfc_main$2 } from "./LpSidebarNav-kx-LdqNU.js";
5
+ import { _ as _sfc_main$2 } from "./LpSidebarNav-BUuxipX-.js";
6
6
  const _hoisted_1 = ["aria-label"];
7
7
  const _hoisted_2 = {
8
8
  key: 2,
@@ -3,9 +3,9 @@ import { Motion } from "motion-v";
3
3
  import { CollapsibleRoot, CollapsibleTrigger, CollapsibleContent } from "reka-ui";
4
4
  import { usePillTransition } from "../composables/usePillTransition.js";
5
5
  import { _ as _sfc_main$3 } from "./LpBadge-Fe0D1bYx.js";
6
- import { _ as _sfc_main$4 } from "./LpContextMenu-BqkAYa9X.js";
6
+ import { _ as _sfc_main$4 } from "./LpContextMenu-1cKew_Dc.js";
7
7
  import { _ as _sfc_main$2 } from "./LpIcon-DYtaid0K.js";
8
- import { _ as _sfc_main$1 } from "./LpScrollArea-Bry1fdOM.js";
8
+ import { _ as _sfc_main$1 } from "./LpScrollArea-Hz3-JWUG.js";
9
9
  import { resolveLink } from "../components/link.js";
10
10
  import { useLinkComponent } from "../composables/useLpConfig.js";
11
11
  import { useMergedAttrs } from "../composables/useMergedClass.js";
@@ -1,7 +1,7 @@
1
1
  import { defineComponent, computed, onMounted, ref, openBlock, createBlock, withCtx, createElementVNode, normalizeClass, createElementBlock, createVNode, toDisplayString, createCommentVNode } from "vue";
2
2
  import { useLabels } from "../composables/useLpConfig.js";
3
3
  import { u as useTheme, p as presets } from "./useTheme-DJm1JSsY.js";
4
- import { _ as _sfc_main$1 } from "./LpContextMenu-BqkAYa9X.js";
4
+ import { _ as _sfc_main$1 } from "./LpContextMenu-1cKew_Dc.js";
5
5
  import { _ as _sfc_main$2 } from "./LpIcon-DYtaid0K.js";
6
6
  const _hoisted_1 = ["aria-label", "title"];
7
7
  const _hoisted_2 = {
@@ -1,6 +1,7 @@
1
1
  import { defineComponent, useId, onMounted, nextTick, onBeforeUnmount, ref, watch, openBlock, createBlock, unref, withCtx, createElementBlock, Fragment, renderList, normalizeClass, createElementVNode, createVNode, createTextVNode, toDisplayString, createCommentVNode, withModifiers, normalizeStyle, Teleport } from "vue";
2
2
  import { ToastProvider, ToastRoot, ToastTitle, ToastDescription, ToastViewport } from "reka-ui";
3
3
  import { prefersReducedMotion } from "../composables/easing.js";
4
+ import { useClipboard } from "../composables/useClipboard.js";
4
5
  import { useLabels } from "../composables/useLpConfig.js";
5
6
  import { useToast } from "../composables/useToast.js";
6
7
  import { CLOSE_ICON } from "../components/dropdown.js";
@@ -8,7 +9,8 @@ import { _ as _sfc_main$1 } from "./LpIcon-DYtaid0K.js";
8
9
  const _hoisted_1 = { class: "flex items-start gap-3 p-3.5" };
9
10
  const _hoisted_2 = { class: "flex min-w-0 flex-1 flex-col gap-0.5" };
10
11
  const _hoisted_3 = ["disabled", "aria-busy", "onClick"];
11
- const _hoisted_4 = ["aria-label", "onClick"];
12
+ const _hoisted_4 = ["aria-label", "title", "onClick"];
13
+ const _hoisted_5 = ["aria-label", "onClick"];
12
14
  const _sfc_main = /* @__PURE__ */ defineComponent({
13
15
  __name: "LpToaster",
14
16
  props: {
@@ -16,7 +18,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
16
18
  },
17
19
  setup(__props) {
18
20
  const props = __props;
19
- const text = useLabels("toast", { dismiss: "Dismiss" }, () => props.labels);
21
+ const text = useLabels("toast", { dismiss: "Dismiss", copy: "Copy message", copied: "Copied" }, () => props.labels);
20
22
  const { queue, dismiss } = useToast();
21
23
  let observer;
22
24
  const tops = /* @__PURE__ */ new WeakMap();
@@ -147,8 +149,22 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
147
149
  busy.value = next;
148
150
  }
149
151
  }
152
+ const { copy } = useClipboard();
153
+ const copiedId = ref(null);
154
+ let copiedTimer;
155
+ const copyable = (t) => t.variant === "error" || t.variant === "warning";
156
+ async function copyToast(t) {
157
+ if (!await copy([t.title, t.message].filter(Boolean).join("\n"))) return;
158
+ copiedId.value = tag(t);
159
+ clearTimeout(copiedTimer);
160
+ copiedTimer = setTimeout(() => copiedId.value = null, 1500);
161
+ }
162
+ onBeforeUnmount(() => clearTimeout(copiedTimer));
163
+ function selecting() {
164
+ return Boolean(window.getSelection()?.toString());
165
+ }
150
166
  function runClick(t) {
151
- if (swiped === tag(t)) return;
167
+ if (swiped === tag(t) || selecting()) return;
152
168
  if (t.onClick) return settle(t, t.onClick);
153
169
  }
154
170
  function runAction(t, action) {
@@ -189,7 +205,11 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
189
205
  ]),
190
206
  _: 2
191
207
  }, 1024)) : createCommentVNode("", true),
192
- createVNode(unref(ToastDescription), { class: "break-words text-xs text-muted" }, {
208
+ createVNode(unref(ToastDescription), {
209
+ class: "cursor-text select-text break-words text-xs text-muted",
210
+ onPointerdown: _cache[0] || (_cache[0] = withModifiers(() => {
211
+ }, ["stop"]))
212
+ }, {
193
213
  default: withCtx(() => [
194
214
  createTextVNode(toDisplayString(t.message), 1)
195
215
  ]),
@@ -198,7 +218,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
198
218
  t.actions?.length ? (openBlock(), createElementBlock("div", {
199
219
  key: 1,
200
220
  class: "mt-2 flex flex-wrap gap-2",
201
- onClick: _cache[0] || (_cache[0] = withModifiers(() => {
221
+ onClick: _cache[1] || (_cache[1] = withModifiers(() => {
202
222
  }, ["stop"]))
203
223
  }, [
204
224
  (openBlock(true), createElementBlock(Fragment, null, renderList(t.actions, (action, i) => {
@@ -220,6 +240,19 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
220
240
  }), 128))
221
241
  ])) : createCommentVNode("", true)
222
242
  ]),
243
+ copyable(t) ? (openBlock(), createElementBlock("button", {
244
+ key: 0,
245
+ type: "button",
246
+ class: "-mt-1 rounded-md p-1 text-muted outline-none transition-colors duration-[var(--duration-fast)] hover:text-ink focus-visible:ring-2 focus-visible:ring-ring",
247
+ "aria-label": copiedId.value === tag(t) ? unref(text).copied : unref(text).copy,
248
+ title: copiedId.value === tag(t) ? unref(text).copied : unref(text).copy,
249
+ onClick: withModifiers(($event) => copyToast(t), ["stop"])
250
+ }, [
251
+ createVNode(_sfc_main$1, {
252
+ name: copiedId.value === tag(t) ? "lucide:check" : "lucide:copy",
253
+ size: 15
254
+ }, null, 8, ["name"])
255
+ ], 8, _hoisted_4)) : createCommentVNode("", true),
223
256
  createElementVNode("button", {
224
257
  type: "button",
225
258
  class: "group -mr-1 -mt-1 rounded-md p-1 text-muted outline-none transition-colors duration-[var(--duration-fast)] hover:text-ink",
@@ -231,7 +264,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
231
264
  size: 16,
232
265
  class: normalizeClass(unref(CLOSE_ICON))
233
266
  }, null, 8, ["class"])
234
- ], 8, _hoisted_4)
267
+ ], 8, _hoisted_5)
235
268
  ]),
236
269
  t.dismissAt ? (openBlock(), createElementBlock("div", {
237
270
  key: 0,
@@ -0,0 +1,56 @@
1
+ import { defineComponent, openBlock, createElementBlock, Fragment, createElementVNode, createVNode, createCommentVNode, toDisplayString } from "vue";
2
+ import { _ as _sfc_main$1 } from "./LpIcon-DYtaid0K.js";
3
+ const _hoisted_1 = {
4
+ class: "flex max-w-72 min-w-0 items-center gap-2 px-2.5 pt-1.5 pb-2",
5
+ "aria-hidden": "true"
6
+ };
7
+ const _hoisted_2 = ["src"];
8
+ const _hoisted_3 = {
9
+ key: 1,
10
+ class: "grid size-7 shrink-0 place-items-center rounded-md bg-surface-soft text-muted"
11
+ };
12
+ const _hoisted_4 = { class: "flex min-w-0 flex-col" };
13
+ const _hoisted_5 = { class: "truncate text-sm font-medium text-ink" };
14
+ const _hoisted_6 = {
15
+ key: 0,
16
+ class: "truncate text-xs text-muted"
17
+ };
18
+ const _sfc_main = /* @__PURE__ */ defineComponent({
19
+ __name: "MenuTitle",
20
+ props: {
21
+ title: {},
22
+ subtitle: {},
23
+ icon: {},
24
+ image: {}
25
+ },
26
+ setup(__props) {
27
+ return (_ctx, _cache) => {
28
+ return openBlock(), createElementBlock(Fragment, null, [
29
+ createElementVNode("div", _hoisted_1, [
30
+ __props.image ? (openBlock(), createElementBlock("img", {
31
+ key: 0,
32
+ src: __props.image,
33
+ alt: "",
34
+ class: "size-7 shrink-0 rounded-md object-cover"
35
+ }, null, 8, _hoisted_2)) : __props.icon ? (openBlock(), createElementBlock("span", _hoisted_3, [
36
+ createVNode(_sfc_main$1, {
37
+ name: __props.icon,
38
+ size: 15
39
+ }, null, 8, ["name"])
40
+ ])) : createCommentVNode("", true),
41
+ createElementVNode("span", _hoisted_4, [
42
+ createElementVNode("span", _hoisted_5, toDisplayString(__props.title), 1),
43
+ __props.subtitle ? (openBlock(), createElementBlock("span", _hoisted_6, toDisplayString(__props.subtitle), 1)) : createCommentVNode("", true)
44
+ ])
45
+ ]),
46
+ _cache[0] || (_cache[0] = createElementVNode("div", {
47
+ class: "mb-1 h-px bg-line",
48
+ role: "presentation"
49
+ }, null, -1))
50
+ ], 64);
51
+ };
52
+ }
53
+ });
54
+ export {
55
+ _sfc_main as _
56
+ };
@@ -1,4 +1,4 @@
1
- import { _ as _sfc_main } from "../chunks/LpAddressInput-BwX8uo4_.js";
1
+ import { _ as _sfc_main } from "../chunks/LpAddressInput-iOJhmRzy.js";
2
2
  export {
3
3
  _sfc_main as default
4
4
  };
@@ -1,4 +1,4 @@
1
- import { _ as _sfc_main } from "../chunks/LpAppShell-C53_RaGF.js";
1
+ import { _ as _sfc_main } from "../chunks/LpAppShell-BmMYcEVx.js";
2
2
  export {
3
3
  _sfc_main as default
4
4
  };
@@ -1,4 +1,4 @@
1
- import { _ as _sfc_main } from "../chunks/LpAvatar-C1XStdOo.js";
1
+ import { _ as _sfc_main } from "../chunks/LpAvatar-DeSb6H0c.js";
2
2
  export {
3
3
  _sfc_main as default
4
4
  };
@@ -1,4 +1,4 @@
1
- import { _ as _sfc_main } from "../chunks/LpCard-C2IvucmX.js";
1
+ import { _ as _sfc_main } from "../chunks/LpCard-BdxkMXjo.js";
2
2
  export {
3
3
  _sfc_main as default
4
4
  };
@@ -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-BqkAYa9X.js";
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,4 +1,4 @@
1
- import { _ as _sfc_main } from "../chunks/LpColorPicker-zz4VGkG4.js";
1
+ import { _ as _sfc_main } from "../chunks/LpColorPicker-BLqPX5Vw.js";
2
2
  export {
3
3
  _sfc_main as default
4
4
  };
@@ -1,7 +1,7 @@
1
1
  import { defineComponent, ref, useId, computed, shallowRef, watch, useSlots, nextTick, onBeforeUnmount, 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
3
  import { _ as _sfc_main$1 } from "../chunks/LpIcon-DYtaid0K.js";
4
- import { _ as _sfc_main$2 } from "../chunks/LpScrollArea-Bry1fdOM.js";
4
+ import { _ as _sfc_main$2 } from "../chunks/LpScrollArea-Hz3-JWUG.js";
5
5
  import { useAsyncTask } from "../composables/useAsyncTask.js";
6
6
  import { useGlass } from "../composables/useGlass.js";
7
7
  import { useClipboard } from "../composables/useClipboard.js";
@@ -10,7 +10,7 @@ import { useModalLayer } from "./modalDepth.js";
10
10
  import { useLabels } from "../composables/useLpConfig.js";
11
11
  import { parseCommandQuery, rankCommandItems } from "./commandSearch.js";
12
12
  import { _ as _export_sfc } from "../chunks/_plugin-vue_export-helper-1tPrXgE0.js";
13
- import '../assets/LpCommandPalette-nGNnzXqQ.css';const _hoisted_1 = { class: "flex shrink-0 items-center gap-2.5 border-b border-line px-4" };
13
+ import '../assets/LpCommandPalette-5miKYsb-.css';const _hoisted_1 = { class: "flex shrink-0 items-center gap-2.5 border-b border-line px-4" };
14
14
  const _hoisted_2 = ["title", "onClick"];
15
15
  const _hoisted_3 = ["aria-activedescendant", "placeholder", "onKeydown"];
16
16
  const _hoisted_4 = { class: "shrink-0 rounded border border-line px-1.5 py-0.5 text-[10px] text-muted" };
@@ -313,6 +313,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
313
313
  });
314
314
  const expanded = ref(/* @__PURE__ */ new Set());
315
315
  const moreOf = /* @__PURE__ */ new WeakMap();
316
+ const firstHidden = /* @__PURE__ */ new WeakMap();
316
317
  function folded(name, items) {
317
318
  const limit = props.groupLimit;
318
319
  if (!limit || items.length <= limit + 1 || expanded.value.has(name)) return items;
@@ -323,6 +324,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
323
324
  keepOpen: true
324
325
  };
325
326
  moreOf.set(more, name);
327
+ firstHidden.set(more, items[limit].id);
326
328
  return [...items.slice(0, limit), more];
327
329
  }
328
330
  const flat = computed(() => grouped.value.flatMap((g) => g.items));
@@ -472,6 +474,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
472
474
  if (!c || c.disabled) return;
473
475
  const group = moreOf.get(c);
474
476
  if (group !== void 0) {
477
+ selectedId.value = firstHidden.get(c) ?? null;
475
478
  expanded.value = /* @__PURE__ */ new Set([...expanded.value, group]);
476
479
  inputRef.value?.focus();
477
480
  return;
@@ -554,7 +557,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
554
557
  createVNode(unref(DialogContent), {
555
558
  ref_key: "contentRef",
556
559
  ref: contentRef,
557
- class: normalizeClass(["lp-cmd-dialog fixed left-1/2 top-[12vh] 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]", [unref(frosted) ? unref(layer).nested ? "lp-glass-overlay--nested" : "lp-glass-overlay" : "bg-surface-raised", __props.previewPane && "lp-cmd-split"]]),
560
+ class: normalizeClass(["lp-cmd-dialog fixed left-1/2 top-[12vh] 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]", [unref(frosted) ? unref(layer).nested ? "lp-glass-overlay lp-glass-overlay--nested" : "lp-glass-overlay" : "bg-surface-raised", __props.previewPane && "lp-cmd-split"]]),
558
561
  style: normalizeStyle({ zIndex: unref(layer).panel }),
559
562
  "data-pane": paneOpen.value ? "open" : void 0,
560
563
  onOpenAutoFocus: _cache[2] || (_cache[2] = withModifiers(() => {
@@ -844,7 +847,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
844
847
  };
845
848
  }
846
849
  });
847
- const LpCommandPalette = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-2da506c1"]]);
850
+ const LpCommandPalette = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-254e59f7"]]);
848
851
  export {
849
852
  LpCommandPalette as default
850
853
  };
@@ -1,4 +1,4 @@
1
- import { _ as _sfc_main } from "../chunks/LpConfirmDialog-DCw5jR1t.js";
1
+ import { _ as _sfc_main } from "../chunks/LpConfirmDialog-Ca-CTlxT.js";
2
2
  export {
3
3
  _sfc_main as default
4
4
  };
@@ -1,4 +1,4 @@
1
- import { _ as _sfc_main } from "../chunks/LpConfirmHost-CbywMpMP.js";
1
+ import { _ as _sfc_main } from "../chunks/LpConfirmHost-BAaSaT2b.js";
2
2
  export {
3
3
  _sfc_main as default
4
4
  };
@@ -26,6 +26,17 @@ type __VLS_Props = {
26
26
  * native-menu mode on that first click and swallow it.
27
27
  */
28
28
  always?: boolean;
29
+ /**
30
+ * What the menu acts on, shown as a heading above the items: the row's name
31
+ * in a list of similar rows, so the user sees which one the right-click hit.
32
+ * Also names the menu for assistive tech.
33
+ */
34
+ title?: string;
35
+ /** A muted second line under `title`, e.g. a version or a path. */
36
+ subtitle?: string;
37
+ /** An icon beside the title, or `titleImage` for a picture (an avatar, a logo). */
38
+ titleIcon?: string;
39
+ titleImage?: string;
29
40
  };
30
41
  declare var __VLS_16: {};
31
42
  type __VLS_Slots = {} & {
@@ -1,4 +1,4 @@
1
- import { _ as _sfc_main } from "../chunks/LpContextMenu-BqkAYa9X.js";
1
+ import { _ as _sfc_main } from "../chunks/LpContextMenu-1cKew_Dc.js";
2
2
  export {
3
3
  _sfc_main as default
4
4
  };
@@ -1,4 +1,4 @@
1
- import { _ as _sfc_main } from "../chunks/LpDatePicker-DuusgT69.js";
1
+ import { _ as _sfc_main } from "../chunks/LpDatePicker-BrdFtSTy.js";
2
2
  export {
3
3
  _sfc_main as default
4
4
  };
@@ -1,4 +1,4 @@
1
- import { _ as _sfc_main } from "../chunks/LpDateRangePicker-DHeuznfC.js";
1
+ import { _ as _sfc_main } from "../chunks/LpDateRangePicker-Drd7EbIz.js";
2
2
  export {
3
3
  _sfc_main as default
4
4
  };
@@ -1,4 +1,4 @@
1
- import { _ as _sfc_main } from "../chunks/LpDrawer-Dt4aB4Fr.js";
1
+ import { _ as _sfc_main } from "../chunks/LpDrawer-CBFVD624.js";
2
2
  export {
3
3
  _sfc_main as default
4
4
  };
@@ -3,10 +3,16 @@ export interface MenuItem {
3
3
  icon?: string;
4
4
  danger?: boolean;
5
5
  separatorBefore?: boolean;
6
+ disabled?: boolean;
6
7
  onSelect?: () => void;
7
8
  }
8
9
  type __VLS_Props = {
9
10
  items: MenuItem[];
11
+ /** A heading naming what the menu acts on; see LpContextMenu's `title`. */
12
+ title?: string;
13
+ subtitle?: string;
14
+ titleIcon?: string;
15
+ titleImage?: string;
10
16
  };
11
17
  declare var __VLS_14: {};
12
18
  type __VLS_Slots = {} & {
@@ -1,4 +1,4 @@
1
- import { _ as _sfc_main } from "../chunks/LpDropdownMenu-DdJGQzPn.js";
1
+ import { _ as _sfc_main } from "../chunks/LpDropdownMenu-DrpJJBp0.js";
2
2
  export {
3
3
  _sfc_main as default
4
4
  };
@@ -6,6 +6,13 @@ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<{
6
6
  /** Take more than one at a time. */
7
7
  multiple?: boolean;
8
8
  disabled?: boolean;
9
+ /**
10
+ * A drag the page itself cannot see is over the zone. Desktop shells
11
+ * (Tauri, Electron) often take file drags natively, and the page then gets
12
+ * no dragenter or dragover at all, only the shell's own events; the app
13
+ * hit-tests those and passes the answer here so the zone lights up the same.
14
+ */
15
+ dragOver?: boolean;
9
16
  /**
10
17
  * Also accept a paste anywhere on the page, not only while focused.
11
18
  * Off by default: two zones both listening would each take the same
@@ -42,6 +49,13 @@ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<{
42
49
  /** Take more than one at a time. */
43
50
  multiple?: boolean;
44
51
  disabled?: boolean;
52
+ /**
53
+ * A drag the page itself cannot see is over the zone. Desktop shells
54
+ * (Tauri, Electron) often take file drags natively, and the page then gets
55
+ * no dragenter or dragover at all, only the shell's own events; the app
56
+ * hit-tests those and passes the answer here so the zone lights up the same.
57
+ */
58
+ dragOver?: boolean;
45
59
  /**
46
60
  * Also accept a paste anywhere on the page, not only while focused.
47
61
  * Off by default: two zones both listening would each take the same
@@ -1,9 +1,9 @@
1
- import { defineComponent, ref, onMounted, watch, onBeforeUnmount, openBlock, createElementBlock, mergeProps, unref, withModifiers, createElementVNode, renderSlot, createVNode, normalizeClass, toDisplayString, createCommentVNode } from "vue";
1
+ import { defineComponent, ref, computed, onMounted, watch, onBeforeUnmount, openBlock, createElementBlock, mergeProps, unref, withModifiers, createElementVNode, renderSlot, createVNode, normalizeClass, toDisplayString, createCommentVNode } from "vue";
2
2
  import { useMergedAttrs } from "../composables/useMergedClass.js";
3
3
  import { useReveal } from "../composables/useReveal.js";
4
4
  import { _ as _sfc_main$1 } from "../chunks/LpIcon-DYtaid0K.js";
5
5
  import { _ as _export_sfc } from "../chunks/_plugin-vue_export-helper-1tPrXgE0.js";
6
- import '../assets/LpDropzone-i4BdMi1H.css';const _hoisted_1 = ["disabled"];
6
+ import '../assets/LpDropzone-Ev6X03zj.css';const _hoisted_1 = ["disabled"];
7
7
  const _hoisted_2 = {
8
8
  key: 0,
9
9
  class: "text-sm font-medium text-ink"
@@ -21,6 +21,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
21
21
  accept: { default: "" },
22
22
  multiple: { type: Boolean, default: false },
23
23
  disabled: { type: Boolean },
24
+ dragOver: { type: Boolean },
24
25
  pasteTarget: { type: Boolean },
25
26
  maxBytes: {},
26
27
  icon: { default: "lucide:upload" },
@@ -40,16 +41,17 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
40
41
  const { el: revealAnchor, revealed } = useReveal({ immediate: () => !props.animate });
41
42
  const emit = __emit;
42
43
  const input = ref(null);
43
- const over = ref(false);
44
+ const pointerOver = ref(false);
45
+ const over = computed(() => pointerOver.value || props.dragOver && !props.disabled);
44
46
  function onDragOver(event) {
45
47
  if (props.disabled) return;
46
- over.value = true;
48
+ pointerOver.value = true;
47
49
  if (event.dataTransfer) event.dataTransfer.dropEffect = "copy";
48
50
  }
49
51
  function onDragLeave(event) {
50
52
  const to = event.relatedTarget;
51
53
  if (to && event.currentTarget.contains(to)) return;
52
- over.value = false;
54
+ pointerOver.value = false;
53
55
  }
54
56
  function matches(file) {
55
57
  if (!props.accept) return true;
@@ -77,7 +79,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
77
79
  if (bounded.length) emit("files", bounded);
78
80
  }
79
81
  function onDrop(event) {
80
- over.value = false;
82
+ pointerOver.value = false;
81
83
  take(event.dataTransfer?.files);
82
84
  }
83
85
  function onPaste(event) {
@@ -179,7 +181,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
179
181
  };
180
182
  }
181
183
  });
182
- const LpDropzone = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-6f6d375e"]]);
184
+ const LpDropzone = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-8f39f653"]]);
183
185
  export {
184
186
  LpDropzone as default
185
187
  };