@m3ui-vue/m3ui-vue 1.3.7 → 1.3.8

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.
@@ -21,8 +21,8 @@ type __VLS_Slots = {} & {
21
21
  declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
22
22
  color: "primary" | "error" | "secondary" | "tertiary";
23
23
  position: BadgePosition;
24
- overlap: BadgeOverlap;
25
24
  max: number;
25
+ overlap: BadgeOverlap;
26
26
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
27
27
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
28
28
  declare const _default: typeof __VLS_export;
@@ -39,6 +39,12 @@ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<{
39
39
  * the route in `edge.route`), or drag a leg at either end to add a jog. Default off
40
40
  */
41
41
  edgesReroutable?: boolean;
42
+ /**
43
+ * `smoothstep`/`step` edges from different sources whose middle runs would lie on top of each other, running the
44
+ * same way, are moved apart by this many px, so two wires never read as one (edges from the same output may share
45
+ * a run). Edges with their own `route` stay put and the others keep off them. Default 0: off
46
+ */
47
+ edgeSpacing?: number;
42
48
  /** Merged into edges made by connecting (`type`, `animated`, `markerEnd`…) */
43
49
  defaultEdgeOptions?: Partial<FlowEdge>;
44
50
  /** Adds an edge to `edges` when a connection is made; off, only `connect` fires */
@@ -192,6 +198,12 @@ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<{
192
198
  * the route in `edge.route`), or drag a leg at either end to add a jog. Default off
193
199
  */
194
200
  edgesReroutable?: boolean;
201
+ /**
202
+ * `smoothstep`/`step` edges from different sources whose middle runs would lie on top of each other, running the
203
+ * same way, are moved apart by this many px, so two wires never read as one (edges from the same output may share
204
+ * a run). Edges with their own `route` stay put and the others keep off them. Default 0: off
205
+ */
206
+ edgeSpacing?: number;
195
207
  /** Merged into edges made by connecting (`type`, `animated`, `markerEnd`…) */
196
208
  defaultEdgeOptions?: Partial<FlowEdge>;
197
209
  /** Adds an edge to `edges` when a connection is made; off, only `connect` fires */
@@ -335,6 +347,7 @@ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<{
335
347
  elementsSelectable: boolean;
336
348
  edgesReconnectable: boolean;
337
349
  edgesReroutable: boolean;
350
+ edgeSpacing: number;
338
351
  autoConnect: boolean;
339
352
  connectionRadius: number;
340
353
  deleteKeys: string[] | null;
@@ -44,9 +44,9 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {
44
44
  variant: "standard" | "centered" | "range";
45
45
  disabled: boolean;
46
46
  step: number;
47
- orientation: "horizontal" | "vertical";
48
- max: number;
49
47
  min: number;
48
+ max: number;
49
+ orientation: "horizontal" | "vertical";
50
50
  showValue: boolean;
51
51
  showTooltip: boolean;
52
52
  stops: boolean;
@@ -16,8 +16,8 @@ type __VLS_Slots = {} & {
16
16
  };
17
17
  declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
18
18
  direction: "horizontal" | "vertical";
19
- max: number;
20
19
  min: number;
20
+ max: number;
21
21
  initialSplit: number;
22
22
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
23
23
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
@@ -1,5 +1,10 @@
1
1
  export interface TourStep {
2
- target: string;
2
+ /**
3
+ * The element to highlight and point at: a CSS selector, or a function returning the element (looked up again
4
+ * on every frame in `interactive` mode, so it can change). None, or none found: the tooltip sits in the viewport,
5
+ * on its `placement` side (centered without one)
6
+ */
7
+ target?: string | (() => Element | null | undefined);
3
8
  title: string;
4
9
  content: string;
5
10
  placement?: 'top' | 'bottom' | 'left' | 'right';
@@ -15,13 +20,58 @@ type __VLS_Props = {
15
20
  nextLabel?: string;
16
21
  /** Label for the final step's button (defaults to the locale string, 'Finish') */
17
22
  finishLabel?: string;
23
+ /** The current step's index (v-model:step); without it the tour keeps its own */
24
+ step?: number;
25
+ /**
26
+ * Leaves the page usable while the tour is open: no scrim, a ring drawn over the target instead of lifting the
27
+ * target itself, tooltip and ring following the target as it moves, no scrolling to it
28
+ */
29
+ interactive?: boolean;
18
30
  };
19
- declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
31
+ declare function goNext(): void;
32
+ declare function goPrev(): void;
33
+ declare function close(): void;
34
+ declare var __VLS_19: {
35
+ index: number;
36
+ count: number;
37
+ }, __VLS_26: {
38
+ step: TourStep;
39
+ index: number;
40
+ }, __VLS_28: {
41
+ index: number;
42
+ count: number;
43
+ }, __VLS_30: {
44
+ step: TourStep;
45
+ index: number;
46
+ isFirst: boolean;
47
+ isLast: boolean;
48
+ next: typeof goNext;
49
+ prev: typeof goPrev;
50
+ close: typeof close;
51
+ };
52
+ type __VLS_Slots = {} & {
53
+ indicator?: (props: typeof __VLS_19) => any;
54
+ } & {
55
+ content?: (props: typeof __VLS_26) => any;
56
+ } & {
57
+ progress?: (props: typeof __VLS_28) => any;
58
+ } & {
59
+ actions?: (props: typeof __VLS_30) => any;
60
+ };
61
+ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
20
62
  "update:modelValue": (args_0: boolean) => any;
21
63
  finish: () => any;
64
+ "update:step": (args_0: number) => any;
22
65
  }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
23
66
  "onUpdate:modelValue"?: ((args_0: boolean) => any) | undefined;
24
67
  onFinish?: (() => any) | undefined;
68
+ "onUpdate:step"?: ((args_0: number) => any) | undefined;
25
69
  }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
70
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
26
71
  declare const _default: typeof __VLS_export;
27
72
  export default _default;
73
+ type __VLS_WithSlots<T, S> = T & {
74
+ new (): {
75
+ $slots: S;
76
+ };
77
+ };
@@ -29,7 +29,15 @@ export declare function getBezierPath(p: FlowEdgePathParams & {
29
29
  }): FlowEdgePath;
30
30
  type Pt = [number, number];
31
31
  /** The corners of an orthogonal route between the ends, leaving and arriving square to the sides */
32
- export declare function smoothStepPoints(p: FlowEdgePathParams & {
32
+ /**
33
+ * Where a step edge from `sourcePosition` to `targetPosition` turns. `centerX` / `centerY` move its middle run (the
34
+ * one halfway between the ends) off the halfway point, e.g. to keep it off another edge's
35
+ */
36
+ export interface FlowStepCenter {
37
+ centerX?: number;
38
+ centerY?: number;
39
+ }
40
+ export declare function smoothStepPoints(p: FlowEdgePathParams & FlowStepCenter & {
33
41
  offset?: number;
34
42
  }): Pt[];
35
43
  /**
@@ -49,7 +57,7 @@ export declare function getRoutedPath(p: FlowEdgePathParams & {
49
57
  borderRadius?: number;
50
58
  }): FlowEdgePath;
51
59
  /** Right-angled steps with rounded corners (`borderRadius`, default 8; 0 gives sharp steps). `offset` (default 20) is how far it leaves a node before turning */
52
- export declare function getSmoothStepPath(p: FlowEdgePathParams & {
60
+ export declare function getSmoothStepPath(p: FlowEdgePathParams & FlowStepCenter & {
53
61
  borderRadius?: number;
54
62
  offset?: number;
55
63
  }): FlowEdgePath;
@@ -63,7 +71,7 @@ export declare function edgePathPoints(type: string | undefined, p: FlowEdgePath
63
71
  /** The distance from a point to a polyline */
64
72
  export declare function distanceToPoints(x: number, y: number, pts: [number, number][]): number;
65
73
  /** `getSmoothStepPath` with sharp corners */
66
- export declare function getStepPath(p: FlowEdgePathParams & {
74
+ export declare function getStepPath(p: FlowEdgePathParams & FlowStepCenter & {
67
75
  offset?: number;
68
76
  route?: number[];
69
77
  }): FlowEdgePath;
@@ -195,6 +195,8 @@ export interface FlowContext {
195
195
  radius?: number;
196
196
  ignore?: (e: FlowEdge) => boolean;
197
197
  }): FlowEdgeHit | null;
198
+ /** The SVG path (`d`, flow coordinates) an edge is drawn along right now, its own route and edgeSpacing included: to draw it elsewhere, e.g. an exported image */
199
+ getEdgePath(id: string): string | null;
198
200
  /** Page (client) coordinates → flow coordinates */
199
201
  screenToFlow(p: {
200
202
  x: number;
@@ -243,6 +245,8 @@ export interface FlowContext {
243
245
  cut(): void;
244
246
  /** Pastes what was copied, at a flow point (default a step from the originals) */
245
247
  paste(at?: FlowXY): void;
248
+ /** Copies of the selection (with the edges between them) a step away, selected; the clipboard stays as it was */
249
+ duplicate(): void;
246
250
  /**
247
251
  * Drags a node with a pointer that's already down, e.g. one just added from a palette outside the canvas: it
248
252
  * follows the pointer from there (guides, splicing into an edge) until it's let go. With a finger, the page
package/dist/flow.d.ts CHANGED
@@ -6,7 +6,7 @@ export { default as MFlowMinimap } from './components/MFlowMinimap.vue';
6
6
  export { useFlow, useFlowNode } from './composables/useFlow';
7
7
  export type { FlowCircleData, FlowConnection, FlowContext, FlowEdge, FlowEdgeHit, FlowFitOptions, FlowHandleBounds, FlowMarker, FlowNode, FlowSelection, FlowViewport, FlowXY, } from './composables/useFlow';
8
8
  export { getBezierPath, getSmoothStepPath, getStepPath, getStraightPath, smoothStepPoints, routePoints, pointsToRoute, getRoutedPath, arrowPath } from './composables/flowPaths';
9
- export type { FlowEdgePath, FlowEdgePathParams, FlowPosition } from './composables/flowPaths';
9
+ export type { FlowEdgePath, FlowEdgePathParams, FlowPosition, FlowStepCenter } from './composables/flowPaths';
10
10
  export { layoutTree, layoutLayered } from './composables/flowLayout';
11
11
  export type { FlowLayout, FlowLayoutDirection, FlowLayoutOptions, FlowLayoutResult } from './composables/flowLayout';
12
12
  export type { FlowPanelPosition } from './composables/_flowPanel';