@leavepulse/ui 0.22.6 → 0.22.7

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,4 +1,4 @@
1
- import { defineComponent, markRaw, computed, watch, openBlock, createBlock, unref, withCtx, createVNode, normalizeClass, createElementVNode, createElementBlock, Fragment, renderList, createTextVNode, toDisplayString, createCommentVNode } from "vue";
1
+ import { defineComponent, markRaw, computed, watch, openBlock, createBlock, unref, withCtx, createVNode, createCommentVNode, normalizeClass, createElementVNode, createElementBlock, Fragment, renderList, createTextVNode, toDisplayString } from "vue";
2
2
  import { Background } from "@vue-flow/background";
3
3
  import { Controls } from "@vue-flow/controls";
4
4
  import { MarkerType, useVueFlow, VueFlow, SelectionMode, Panel } from "@vue-flow/core";
@@ -23,7 +23,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
23
23
  selectable: { type: Boolean, default: false },
24
24
  legend: { type: Boolean, default: true },
25
25
  legendPosition: { default: "bottom-left" },
26
- lanes: { default: () => [] }
26
+ lanes: { default: () => [] },
27
+ minimap: { type: Boolean, default: true },
28
+ controls: { type: Boolean, default: true }
27
29
  },
28
30
  emits: ["connect", "node-select", "node-contextmenu", "edge-contextmenu", "pane-click", "selection-change", "update:nodes", "node-drag-stop", "viewport-change"],
29
31
  setup(__props, { expose: __expose, emit: __emit }) {
@@ -196,15 +198,16 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
196
198
  size: 1.4,
197
199
  "pattern-color": "var(--color-line-strong)"
198
200
  }),
199
- createVNode(unref(MiniMap), {
201
+ __props.minimap ? (openBlock(), createBlock(unref(MiniMap), {
202
+ key: 0,
200
203
  pannable: "",
201
204
  zoomable: "",
202
205
  "node-color": "var(--color-surface-soft)",
203
206
  "mask-color": "rgba(0,0,0,0.55)"
204
- }),
205
- createVNode(unref(Controls)),
207
+ })) : createCommentVNode("", true),
208
+ __props.controls ? (openBlock(), createBlock(unref(Controls), { key: 1 })) : createCommentVNode("", true),
206
209
  __props.legend ? (openBlock(), createBlock(unref(Panel), {
207
- key: 0,
210
+ key: 2,
208
211
  position: __props.legendPosition,
209
212
  class: normalizeClass(legendOffset.value)
210
213
  }, {
@@ -95,6 +95,13 @@ type __VLS_Props = {
95
95
  * Non-interactive; pan/zoom with the graph. Empty = no lanes.
96
96
  */
97
97
  lanes?: TopologyLane[];
98
+ /**
99
+ * Minimap and zoom controls. On by default — a full-page map needs both —
100
+ * but a graph embedded at a few hundred pixels has nothing to navigate, and
101
+ * the overlays then cover a real share of the picture.
102
+ */
103
+ minimap?: boolean;
104
+ controls?: boolean;
98
105
  };
99
106
  declare function applyViewport(v: CanvasViewport): Promise<void>;
100
107
  declare const __VLS_export: import('vue').DefineComponent<__VLS_Props, {
@@ -158,10 +165,12 @@ declare const __VLS_export: import('vue').DefineComponent<__VLS_Props, {
158
165
  }) => any) | undefined;
159
166
  }>, {
160
167
  legend: boolean;
168
+ controls: boolean;
161
169
  connectable: boolean;
162
170
  selectable: boolean;
163
171
  legendPosition: "top-left" | "top-right" | "bottom-left" | "bottom-right";
164
172
  lanes: TopologyLane[];
173
+ minimap: boolean;
165
174
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
166
175
  declare const _default: typeof __VLS_export;
167
176
  export default _default;
@@ -1,4 +1,4 @@
1
- import { _ as _sfc_main } from "../chunks/LpTopologyCanvas-BsJWyacK.js";
1
+ import { _ as _sfc_main } from "../chunks/LpTopologyCanvas-DNmL56pJ.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-BsJWyacK.js";
67
+ import { _ as _60 } from "./chunks/LpTopologyCanvas-DNmL56pJ.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.6",
3
+ "version": "0.22.7",
4
4
  "type": "module",
5
5
  "description": "LeavePulse token-driven Vue component kit.",
6
6
  "repository": {
@@ -130,6 +130,13 @@ const props = withDefaults(
130
130
  * Non-interactive; pan/zoom with the graph. Empty = no lanes.
131
131
  */
132
132
  lanes?: TopologyLane[]
133
+ /**
134
+ * Minimap and zoom controls. On by default — a full-page map needs both —
135
+ * but a graph embedded at a few hundred pixels has nothing to navigate, and
136
+ * the overlays then cover a real share of the picture.
137
+ */
138
+ minimap?: boolean
139
+ controls?: boolean
133
140
  }>(),
134
141
  {
135
142
  connectable: false,
@@ -137,6 +144,8 @@ const props = withDefaults(
137
144
  legend: true,
138
145
  legendPosition: "bottom-left",
139
146
  lanes: () => [],
147
+ minimap: true,
148
+ controls: true,
140
149
  },
141
150
  )
142
151
 
@@ -361,8 +370,14 @@ defineExpose({ fitView, setViewport: applyViewport })
361
370
  class="lp-topology"
362
371
  >
363
372
  <Background :gap="22" :size="1.4" pattern-color="var(--color-line-strong)" />
364
- <MiniMap pannable zoomable node-color="var(--color-surface-soft)" mask-color="rgba(0,0,0,0.55)" />
365
- <Controls />
373
+ <MiniMap
374
+ v-if="minimap"
375
+ pannable
376
+ zoomable
377
+ node-color="var(--color-surface-soft)"
378
+ mask-color="rgba(0,0,0,0.55)"
379
+ />
380
+ <Controls v-if="controls" />
366
381
 
367
382
  <!-- Edge-type legend: makes the colour/dash encoding self-explanatory. -->
368
383
  <Panel v-if="legend" :position="legendPosition" :class="legendOffset">