@leavepulse/ui 0.22.8 → 0.22.9

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.
@@ -28,7 +28,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
28
28
  minimap: { type: Boolean, default: true },
29
29
  controls: { type: Boolean, default: true }
30
30
  },
31
- emits: ["connect", "node-select", "node-contextmenu", "edge-contextmenu", "pane-click", "selection-change", "update:nodes", "node-drag-stop", "viewport-change"],
31
+ emits: ["connect", "node-select", "node-activate", "node-contextmenu", "edge-contextmenu", "pane-click", "selection-change", "update:nodes", "node-drag-stop", "viewport-change"],
32
32
  setup(__props, { expose: __expose, emit: __emit }) {
33
33
  const props = __props;
34
34
  const emit = __emit;
@@ -123,6 +123,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
123
123
  );
124
124
  const {
125
125
  onNodeClick,
126
+ onNodeDoubleClick,
126
127
  onNodeContextMenu,
127
128
  onEdgeContextMenu,
128
129
  onPaneClick,
@@ -134,6 +135,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
134
135
  setViewport
135
136
  } = useVueFlow();
136
137
  onNodeClick(({ node }) => emit("node-select", node.id));
138
+ onNodeDoubleClick(({ node }) => emit("node-activate", node.id));
137
139
  onNodeDragStop(
138
140
  ({ node }) => emit("node-drag-stop", { id: node.id, position: { ...node.position } })
139
141
  );
@@ -112,6 +112,7 @@ declare const __VLS_export: import('vue').DefineComponent<__VLS_Props, {
112
112
  }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
113
113
  connect: (value: Connection) => any;
114
114
  "node-select": (id: string) => any;
115
+ "node-activate": (id: string) => any;
115
116
  "node-contextmenu": (value: {
116
117
  id: string;
117
118
  x: number;
@@ -140,6 +141,7 @@ declare const __VLS_export: import('vue').DefineComponent<__VLS_Props, {
140
141
  }, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
141
142
  onConnect?: ((value: Connection) => any) | undefined;
142
143
  "onNode-select"?: ((id: string) => any) | undefined;
144
+ "onNode-activate"?: ((id: string) => any) | undefined;
143
145
  "onNode-contextmenu"?: ((value: {
144
146
  id: string;
145
147
  x: number;
@@ -1,4 +1,4 @@
1
- import { _ as _sfc_main } from "../chunks/LpTopologyCanvas-B4tPWXFW.js";
1
+ import { _ as _sfc_main } from "../chunks/LpTopologyCanvas-DCgm_d5G.js";
2
2
  export {
3
3
  _sfc_main as default
4
4
  };
package/dist/index.js CHANGED
@@ -64,7 +64,7 @@ import { D, _ as _56, N, T, b, c, d, e, f, g, i, l, h, j, n, r, t, k, m, u, v }
64
64
  import { _ as _57 } from "./chunks/LpTilt-DuyKbpkA.js";
65
65
  import { _ as _58 } from "./chunks/LpToaster-gDB1EaU3.js";
66
66
  import { _ as _59 } from "./chunks/LpTooltip-D1hbjQWG.js";
67
- import { _ as _60 } from "./chunks/LpTopologyCanvas-B4tPWXFW.js";
67
+ import { _ as _60 } from "./chunks/LpTopologyCanvas-DCgm_d5G.js";
68
68
  import { _ as _61 } from "./chunks/LpUptimeBar-CB366k0O.js";
69
69
  import { deserializeLayout, serializeLayout } from "./layout/tree.js";
70
70
  import { addLeaf, addTab, countBlocks, countLeaves, makeLayout, moveLeaf, removeBlock, removeLeaf, reorderTab, resizeAt, setActiveTab } from "./layout/tree.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@leavepulse/ui",
3
- "version": "0.22.8",
3
+ "version": "0.22.9",
4
4
  "type": "module",
5
5
  "description": "LeavePulse token-driven Vue component kit.",
6
6
  "repository": {
@@ -156,6 +156,8 @@ const props = withDefaults(
156
156
  const emit = defineEmits<{
157
157
  (e: "connect", value: Connection): void
158
158
  (e: "node-select", id: string): void
159
+ /** Double-click — the host's "open this" gesture, distinct from selecting. */
160
+ (e: "node-activate", id: string): void
159
161
  (e: "node-contextmenu", value: { id: string; x: number; y: number }): void
160
162
  (e: "edge-contextmenu", value: { id: string; x: number; y: number }): void
161
163
  (e: "pane-click"): void
@@ -285,6 +287,7 @@ const flowEdges = computed(() =>
285
287
 
286
288
  const {
287
289
  onNodeClick,
290
+ onNodeDoubleClick,
288
291
  onNodeContextMenu,
289
292
  onEdgeContextMenu,
290
293
  onPaneClick,
@@ -296,6 +299,9 @@ const {
296
299
  setViewport,
297
300
  } = useVueFlow()
298
301
  onNodeClick(({ node }) => emit("node-select", node.id))
302
+ // A node usually has two levels of interest — pick it out, or open it — and a
303
+ // single click cannot carry both. Hosts that only need one can ignore this.
304
+ onNodeDoubleClick(({ node }) => emit("node-activate", node.id))
299
305
  // Drag settled → surface the node's final position so the host can persist it.
300
306
  onNodeDragStop(({ node }) =>
301
307
  emit("node-drag-stop", { id: node.id, position: { ...node.position } }),