@leavepulse/ui 0.22.20 → 0.22.21

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.
@@ -1,7 +1,7 @@
1
1
  import { defineComponent, ref, watch, computed, openBlock, createElementBlock, Fragment, renderList, normalizeStyle, createBlock, createVNode, withCtx, createElementVNode, renderSlot, mergeProps, normalizeProps, guardReactiveProps, createTextVNode, toDisplayString, createCommentVNode } from "vue";
2
2
  import { computeStats, formatSize, sortNodes, subtreeIds, ancestorIds } from "../components/fileTree.js";
3
3
  import { _ as _sfc_main$1 } from "./LpEmptyState-CrfyRJUG.js";
4
- import { _ as _sfc_main$3 } from "./LpFileTreeNode-Cgf68Tup.js";
4
+ import { _ as _sfc_main$3 } from "./LpFileTreeNode-DFg4PhOK.js";
5
5
  import { _ as _sfc_main$2 } from "./LpScrollArea-D8xyKXcF.js";
6
6
  const _hoisted_1 = {
7
7
  key: 0,
@@ -34,7 +34,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
34
34
  emptyLabel: { default: "No files" },
35
35
  emptyDescription: { default: "This folder is empty." }
36
36
  },
37
- emits: ["update:selected", "update:expanded", "select", "open", "expand", "collapse", "update:checked", "summary", "contextmenu"],
37
+ emits: ["update:selected", "update:expanded", "select", "open", "expand", "collapse", "update:checked", "summary"],
38
38
  setup(__props, { expose: __expose, emit: __emit }) {
39
39
  const props = __props;
40
40
  const emit = __emit;
@@ -360,8 +360,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
360
360
  onSelect,
361
361
  onToggle,
362
362
  onFocus: _cache[0] || (_cache[0] = ($event) => focusedId.value = $event.id),
363
- onCheck,
364
- onContextmenu: _cache[1] || (_cache[1] = (n, e) => emit("contextmenu", n, e))
363
+ onCheck
365
364
  }, {
366
365
  row: withCtx((slotProps) => [
367
366
  renderSlot(_ctx.$slots, "row", mergeProps({ ref_for: true }, slotProps))
@@ -45,7 +45,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
45
45
  showSize: { type: Boolean },
46
46
  showModified: { type: Boolean }
47
47
  },
48
- emits: ["select", "toggle", "focus", "check", "contextmenu"],
48
+ emits: ["select", "toggle", "focus", "check"],
49
49
  setup(__props, { emit: __emit }) {
50
50
  const props = __props;
51
51
  const emit = __emit;
@@ -132,8 +132,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
132
132
  __props.node.disabled ? "cursor-not-allowed text-muted/50" : isSelected.value ? "bg-brand-soft text-ink" : "text-muted hover:bg-surface-soft hover:text-ink"
133
133
  ]]),
134
134
  style: normalizeStyle({ paddingLeft: `${__props.depth * 14 + 6}px` }),
135
- onClick: withModifiers(onActivate, ["stop"]),
136
- onContextmenu: _cache[2] || (_cache[2] = ($event) => emit("contextmenu", __props.node, $event))
135
+ onClick: withModifiers(onActivate, ["stop"])
137
136
  }, [
138
137
  createElementVNode("span", _hoisted_3, [
139
138
  isLoading.value ? (openBlock(), createBlock(_sfc_main$2, {
@@ -178,7 +177,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
178
177
  __props.node.meta ? (openBlock(), createElementBlock("span", _hoisted_6, toDisplayString(__props.node.meta), 1)) : createCommentVNode("", true),
179
178
  modifiedLabel.value ? (openBlock(), createElementBlock("span", _hoisted_7, toDisplayString(modifiedLabel.value), 1)) : createCommentVNode("", true),
180
179
  sizeLabel.value ? (openBlock(), createElementBlock("span", _hoisted_8, toDisplayString(sizeLabel.value), 1)) : createCommentVNode("", true)
181
- ], 46, _hoisted_2)
180
+ ], 14, _hoisted_2)
182
181
  ]),
183
182
  _: 3
184
183
  }, 8, ["items"]),
@@ -207,11 +206,10 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
207
206
  stats: __props.stats,
208
207
  "show-size": __props.showSize,
209
208
  "show-modified": __props.showModified,
210
- onSelect: _cache[3] || (_cache[3] = ($event) => emit("select", $event)),
211
- onToggle: _cache[4] || (_cache[4] = ($event) => emit("toggle", $event)),
212
- onFocus: _cache[5] || (_cache[5] = ($event) => emit("focus", $event)),
213
- onCheck: _cache[6] || (_cache[6] = (n, v) => emit("check", n, v)),
214
- onContextmenu: _cache[7] || (_cache[7] = (n, e) => emit("contextmenu", n, e))
209
+ onSelect: _cache[2] || (_cache[2] = ($event) => emit("select", $event)),
210
+ onToggle: _cache[3] || (_cache[3] = ($event) => emit("toggle", $event)),
211
+ onFocus: _cache[4] || (_cache[4] = ($event) => emit("focus", $event)),
212
+ onCheck: _cache[5] || (_cache[5] = (n, v) => emit("check", n, v))
215
213
  }, {
216
214
  row: withCtx((slotProps) => [
217
215
  renderSlot(_ctx.$slots, "row", mergeProps({ ref_for: true }, slotProps))
@@ -71,7 +71,6 @@ declare const __VLS_base: import('vue').DefineComponent<__VLS_Props, {
71
71
  expand: (node: FileNode) => any;
72
72
  select: (node: FileNode) => any;
73
73
  summary: (summary: FileTreeSummary) => any;
74
- contextmenu: (node: FileNode, event: MouseEvent) => any;
75
74
  open: (node: FileNode) => any;
76
75
  collapse: (node: FileNode) => any;
77
76
  "update:selected": (id: string) => any;
@@ -81,7 +80,6 @@ declare const __VLS_base: import('vue').DefineComponent<__VLS_Props, {
81
80
  onExpand?: ((node: FileNode) => any) | undefined;
82
81
  onSelect?: ((node: FileNode) => any) | undefined;
83
82
  onSummary?: ((summary: FileTreeSummary) => any) | undefined;
84
- onContextmenu?: ((node: FileNode, event: MouseEvent) => any) | undefined;
85
83
  onOpen?: ((node: FileNode) => any) | undefined;
86
84
  onCollapse?: ((node: FileNode) => any) | undefined;
87
85
  "onUpdate:selected"?: ((id: string) => any) | undefined;
@@ -1,4 +1,4 @@
1
- import { _ as _sfc_main } from "../chunks/LpFileTree-CMy2qQ1m.js";
1
+ import { _ as _sfc_main } from "../chunks/LpFileTree-Cw50eG_y.js";
2
2
  export {
3
3
  _sfc_main as default
4
4
  };
@@ -30,13 +30,11 @@ declare const __VLS_base: import('vue').DefineComponent<__VLS_Props, {}, {}, {},
30
30
  check: (node: FileNode, value: boolean) => any;
31
31
  focus: (node: FileNode) => any;
32
32
  select: (node: FileNode) => any;
33
- contextmenu: (node: FileNode, event: MouseEvent) => any;
34
33
  toggle: (node: FileNode) => any;
35
34
  }, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
36
35
  onCheck?: ((node: FileNode, value: boolean) => any) | undefined;
37
36
  onFocus?: ((node: FileNode) => any) | undefined;
38
37
  onSelect?: ((node: FileNode) => any) | undefined;
39
- onContextmenu?: ((node: FileNode, event: MouseEvent) => any) | undefined;
40
38
  onToggle?: ((node: FileNode) => any) | undefined;
41
39
  }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
42
40
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
@@ -1,4 +1,4 @@
1
- import { _ as _sfc_main } from "../chunks/LpFileTreeNode-Cgf68Tup.js";
1
+ import { _ as _sfc_main } from "../chunks/LpFileTreeNode-DFg4PhOK.js";
2
2
  export {
3
3
  _sfc_main as default
4
4
  };
package/dist/index.js CHANGED
@@ -22,7 +22,7 @@ import { _ as _19 } from "./chunks/LpDivider-CUX46KR0.js";
22
22
  import { _ as _20 } from "./chunks/LpDrawer-DAJN5rGK.js";
23
23
  import { _ as _21 } from "./chunks/LpDropdownMenu-DJpoqRCb.js";
24
24
  import { _ as _22 } from "./chunks/LpEmptyState-CrfyRJUG.js";
25
- import { _ as _23 } from "./chunks/LpFileTree-CMy2qQ1m.js";
25
+ import { _ as _23 } from "./chunks/LpFileTree-Cw50eG_y.js";
26
26
  import { ancestorIds, checkStateOf, checkedCount, computeStats, fileIcon, formatModified, formatSize, sortNodes, subtreeIds, subtreeSize } from "./components/fileTree.js";
27
27
  import { _ as _24 } from "./chunks/LpFormField-Bn-ZwC6z.js";
28
28
  import { _ as _25 } from "./chunks/LpIcon-CCnX5_2j.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@leavepulse/ui",
3
- "version": "0.22.20",
3
+ "version": "0.22.21",
4
4
  "type": "module",
5
5
  "description": "LeavePulse token-driven Vue component kit.",
6
6
  "repository": {
@@ -103,9 +103,6 @@ const emit = defineEmits<{
103
103
  (e: "update:checked", ids: string[]): void
104
104
  /** Ticked set changed, with the rolled-up stats already computed. */
105
105
  (e: "summary", summary: FileTreeSummary): void
106
- /* Not prevented here: a caller that wants the native menu on some rows needs
107
- the event intact to decide. */
108
- (e: "contextmenu", node: FileNode, event: MouseEvent): void
109
106
  }>()
110
107
 
111
108
  defineSlots<{
@@ -531,7 +528,6 @@ defineExpose({ reveal, expandAll, collapseAll, checkAll, clearChecked, summary }
531
528
  @toggle="onToggle"
532
529
  @focus="focusedId = $event.id"
533
530
  @check="onCheck"
534
- @contextmenu="(n, e) => emit('contextmenu', n, e)"
535
531
  >
536
532
  <template #row="slotProps">
537
533
  <slot name="row" v-bind="slotProps" />
@@ -47,7 +47,6 @@ const emit = defineEmits<{
47
47
  (e: "toggle", node: FileNode): void
48
48
  (e: "focus", node: FileNode): void
49
49
  (e: "check", node: FileNode, value: boolean): void
50
- (e: "contextmenu", node: FileNode, event: MouseEvent): void
51
50
  }>()
52
51
 
53
52
  // Declared explicitly: the component renders itself, so an inferred slot type
@@ -177,7 +176,6 @@ function onActivate() {
177
176
  ]"
178
177
  :style="{ paddingLeft: `${depth * 14 + 6}px` }"
179
178
  @click.stop="onActivate"
180
- @contextmenu="emit('contextmenu', node, $event)"
181
179
  >
182
180
  <!-- Chevron sits in a fixed-width slot so names line up whether or not
183
181
  the row can expand. Leaves get the same gutter, left empty. -->
@@ -283,7 +281,6 @@ function onActivate() {
283
281
  @toggle="emit('toggle', $event)"
284
282
  @focus="emit('focus', $event)"
285
283
  @check="(n, v) => emit('check', n, v)"
286
- @contextmenu="(n, e) => emit('contextmenu', n, e)"
287
284
  >
288
285
  <template #row="slotProps">
289
286
  <slot name="row" v-bind="slotProps" />