@nubisco/ui 2.7.0 → 2.8.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.
- package/dist/components/Blueprint.types.d.ts +40 -1
- package/dist/components/Blueprint.types.d.ts.map +1 -1
- package/dist/components/Blueprint.vue.d.ts +4 -11
- package/dist/components/Blueprint.vue.d.ts.map +1 -1
- package/dist/components/BlueprintCard.types.d.ts +28 -0
- package/dist/components/BlueprintCard.types.d.ts.map +1 -1
- package/dist/components/BlueprintCard.vue.d.ts +9 -22
- package/dist/components/BlueprintCard.vue.d.ts.map +1 -1
- package/dist/components/Button.vue.d.ts +1 -1
- package/dist/components/Tree.vue.d.ts +1 -1
- package/dist/index.cjs +7 -7
- package/dist/index.mjs +910 -692
- package/dist/ui.css +1 -1
- package/package.json +1 -1
- package/src/styles/_theme.scss +47 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Ref } from 'vue';
|
|
2
|
-
import type { IBlueprintPort, TBlueprintCardStatus } from './BlueprintCard.types';
|
|
2
|
+
import type { IBlueprintPort, TBlueprintCardStatus, TBlueprintDensity, TBlueprintPinDataType } from './BlueprintCard.types';
|
|
3
3
|
import type { BlueprintLiveData } from './blueprint-pixi/live-data';
|
|
4
4
|
import type { TWireActivityStyle } from './blueprint-pixi/pixi-scene';
|
|
5
5
|
export type { TWireActivityStyle } from './blueprint-pixi/pixi-scene';
|
|
@@ -140,6 +140,16 @@ export interface IBlueprintProps {
|
|
|
140
140
|
* Wire connections between card ports.
|
|
141
141
|
*/
|
|
142
142
|
connections?: IBlueprintConnection[];
|
|
143
|
+
/**
|
|
144
|
+
* Chrome density for every card on the canvas. Cards inherit it and can
|
|
145
|
+
* override their own. `'compact'` drops the header to 28px and hides the
|
|
146
|
+
* category line, which is worth having once a graph is past roughly twenty
|
|
147
|
+
* nodes and card headers are more of the canvas than the graph is.
|
|
148
|
+
*
|
|
149
|
+
* It never changes port geometry, so switching density does not move a
|
|
150
|
+
* single wire.
|
|
151
|
+
*/
|
|
152
|
+
density?: TBlueprintDensity;
|
|
143
153
|
/**
|
|
144
154
|
* Card geometry for the windowed rendering API. When provided, Blueprint
|
|
145
155
|
* owns the card `v-for` and position wrappers and renders each card
|
|
@@ -336,6 +346,12 @@ export interface IBlueprintCardPortEvent {
|
|
|
336
346
|
nodeId: string;
|
|
337
347
|
portId: string;
|
|
338
348
|
type: 'input' | 'output';
|
|
349
|
+
/**
|
|
350
|
+
* The port's declared data type, forwarded so the other end of a drag can
|
|
351
|
+
* decide whether it could accept this wire before the user lets go. Absent
|
|
352
|
+
* on events synthesised by older callers, which is read as `'any'`.
|
|
353
|
+
*/
|
|
354
|
+
dataType?: TBlueprintPinDataType;
|
|
339
355
|
}
|
|
340
356
|
/**
|
|
341
357
|
* Shape NbBlueprint provides via inject so its child cards can drive wire
|
|
@@ -346,5 +362,28 @@ export interface IBlueprintCardPortEvent {
|
|
|
346
362
|
export interface IBlueprintCardContext {
|
|
347
363
|
onPortDown: (event: IBlueprintCardPortEvent) => void;
|
|
348
364
|
onPortUp: (event: IBlueprintCardPortEvent) => void;
|
|
365
|
+
/**
|
|
366
|
+
* The port a wire drag started from, or null when no drag is in flight.
|
|
367
|
+
*
|
|
368
|
+
* Cards read this to answer the question the user is actually asking while
|
|
369
|
+
* they drag: can this wire land here? A port that could accept the wire
|
|
370
|
+
* lights up, every port that could not dims. Before this existed the answer
|
|
371
|
+
* only arrived on release, as either a wire or nothing at all.
|
|
372
|
+
*/
|
|
373
|
+
dragOrigin: Ref<IBlueprintCardPortEvent | null>;
|
|
374
|
+
/**
|
|
375
|
+
* Canvas-level chrome density. A card uses it unless it sets its own
|
|
376
|
+
* `density` prop.
|
|
377
|
+
*/
|
|
378
|
+
density: Ref<TBlueprintDensity>;
|
|
379
|
+
/**
|
|
380
|
+
* Move a card by a delta in canvas units, and report it through the
|
|
381
|
+
* blueprint's normal `move` event. Cards call this for keyboard nudging so
|
|
382
|
+
* arrow keys go through exactly the same path as a mouse drag.
|
|
383
|
+
*/
|
|
384
|
+
nudge: (id: string, dx: number, dy: number) => void;
|
|
385
|
+
/** Abandon an in-flight wire drag without connecting anything. Bound to
|
|
386
|
+
* Escape so a keyboard user can back out of a connection they started. */
|
|
387
|
+
cancelPortDrag: () => void;
|
|
349
388
|
}
|
|
350
389
|
//# sourceMappingURL=Blueprint.types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Blueprint.types.d.ts","sourceRoot":"","sources":["../../src/components/Blueprint.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,KAAK,CAAA;AAC9B,OAAO,KAAK,EACV,cAAc,EACd,oBAAoB,
|
|
1
|
+
{"version":3,"file":"Blueprint.types.d.ts","sourceRoot":"","sources":["../../src/components/Blueprint.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,KAAK,CAAA;AAC9B,OAAO,KAAK,EACV,cAAc,EACd,oBAAoB,EACpB,iBAAiB,EACjB,qBAAqB,EACtB,MAAM,uBAAuB,CAAA;AAC9B,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAA;AACnE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAA;AACrE,YAAY,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAA;AAErE,MAAM,WAAW,oBAAoB;IACnC,QAAQ,EAAE,MAAM,CAAA;IAChB,QAAQ,EAAE,MAAM,CAAA;IAChB,MAAM,EAAE,MAAM,CAAA;IACd,MAAM,EAAE,MAAM,CAAA;IACd;;;;;OAKG;IACH,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB;;;;;;;OAOG;IACH,KAAK,CAAC,EAAE,MAAM,CAAA;CACf;AAED,MAAM,WAAW,kBAAkB;IACjC,EAAE,EAAE,MAAM,CAAA;IACV,CAAC,EAAE,MAAM,CAAA;IACT,CAAC,EAAE,MAAM,CAA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BAAuB,GAAG,IAAI,CAAC,CAAA;IAC/C;;;OAGG;IACH,OAAO,EAAE,GAAG,CAAC,iBAAiB,CAAC,CAAA;IAC/B;;;;OAIG;IACH,KAAK,EAAE,CAAC,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,KAAK,IAAI,CAAA;IACnD;+EAC2E;IAC3E,cAAc,EAAE,MAAM,IAAI,CAAA;CAC3B"}
|
|
@@ -1,20 +1,12 @@
|
|
|
1
1
|
import { BlueprintLiveData } from './blueprint-pixi/live-data';
|
|
2
|
-
import type { IBlueprintCamera, IBlueprintConnection, IBlueprintCard, IBlueprintCardMove, IBlueprintProps } from './Blueprint.types';
|
|
2
|
+
import type { IBlueprintCamera, IBlueprintConnection, IBlueprintCard, IBlueprintCardMove, IBlueprintCardPortEvent, IBlueprintProps } from './Blueprint.types';
|
|
3
3
|
declare function selectAll(): void;
|
|
4
4
|
declare function deselectAll(): void;
|
|
5
5
|
declare function zoomIn(): void;
|
|
6
6
|
declare function zoomOut(): void;
|
|
7
|
-
declare function onPortMouseDown(data:
|
|
8
|
-
nodeId: string;
|
|
9
|
-
portId: string;
|
|
10
|
-
type: string;
|
|
11
|
-
}): void;
|
|
7
|
+
declare function onPortMouseDown(data: IBlueprintCardPortEvent): void;
|
|
12
8
|
declare function closeWireMenu(): void;
|
|
13
|
-
declare function onPortMouseUp(data:
|
|
14
|
-
nodeId: string;
|
|
15
|
-
portId: string;
|
|
16
|
-
type: string;
|
|
17
|
-
}): void;
|
|
9
|
+
declare function onPortMouseUp(data: IBlueprintCardPortEvent): void;
|
|
18
10
|
declare function centerView(): void;
|
|
19
11
|
/**
|
|
20
12
|
* Frame the board, or with `ids`, just those cards.
|
|
@@ -143,6 +135,7 @@ declare const __VLS_base: import("vue").DefineComponent<IBlueprintProps, {
|
|
|
143
135
|
background: import("./Blueprint.types").TBlueprintBackground;
|
|
144
136
|
animateConnections: "never" | "always" | "on-activity" | "levels";
|
|
145
137
|
connections: IBlueprintConnection[];
|
|
138
|
+
density: import("./BlueprintCard.types").TBlueprintDensity;
|
|
146
139
|
wheelMode: "auto" | "zoom" | "pan";
|
|
147
140
|
editable: boolean;
|
|
148
141
|
renderer: import("./Blueprint.types").TBlueprintRenderer;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Blueprint.vue.d.ts","sourceRoot":"","sources":["../../src/components/Blueprint.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Blueprint.vue.d.ts","sourceRoot":"","sources":["../../src/components/Blueprint.vue"],"names":[],"mappings":"AAi3EA,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAA;AAM9D,OAAO,KAAK,EACV,gBAAgB,EAChB,oBAAoB,EACpB,cAAc,EACd,kBAAkB,EAClB,uBAAuB,EACvB,eAAe,EAChB,MAAM,mBAAmB,CAAA;AA0S1B,iBAAS,SAAS,SAejB;AAED,iBAAS,WAAW,SAGnB;AAmND,iBAAS,MAAM,SAEd;AACD,iBAAS,OAAO,SAEf;AAocD,iBAAS,eAAe,CAAC,IAAI,EAAE,uBAAuB,QAKrD;AA8MD,iBAAS,aAAa,SAErB;AA6DD,iBAAS,aAAa,CAAC,IAAI,EAAE,uBAAuB,QAmCnD;AA4TD,iBAAS,UAAU,SAgBlB;AAED;;;;;;;GAOG;AACH,iBAAS,SAAS,CAAC,OAAO,SAAK,EAAE,GAAG,CAAC,EAAE,SAAS,MAAM,EAAE,QAkCvD;AAED,iBAAS,SAAS,SAIjB;AAED;;;;;;;;;GASG;AACH,iBAAS,SAAS,IAAI,gBAAgB,CAErC;AAED;;;;;;;;GAQG;AACH,iBAAS,SAAS,CAAC,CAAC,EAAE,OAAO,CAAC,gBAAgB,CAAC,QAI9C;AAsDD,iBAAS,SAAS,SAMjB;AAED,iBAAS,WAAW,SAOnB;AAED,iBAAS,UAAU,SAMlB;AAED,iBAAS,QAAQ,SAMhB;AAED,iBAAS,WAAW,SAOnB;AAED,i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OAAO,YAAY;AAAxC,wBAAyC;AAWzC,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KACV,CAAA;CACD,CAAC"}
|
|
@@ -36,6 +36,19 @@ export type TBlueprintPortShape = 'pill' | 'diamond' | 'square' | 'circle';
|
|
|
36
36
|
* need to be visually emphasised).
|
|
37
37
|
*/
|
|
38
38
|
export type TBlueprintPortSize = 'sm' | 'md' | 'lg';
|
|
39
|
+
/**
|
|
40
|
+
* How tightly a card packs its chrome. Set once on `NbBlueprint` and every
|
|
41
|
+
* card in the canvas inherits it; a card can still override its own.
|
|
42
|
+
*
|
|
43
|
+
* - `'default'`: 40px header, category line visible, 24px parameter rows.
|
|
44
|
+
* - `'compact'`: 28px header, category hidden, 20px parameter rows. Meant
|
|
45
|
+
* for graphs past roughly twenty nodes, where the header of every card is
|
|
46
|
+
* more of the canvas than the graph is.
|
|
47
|
+
*
|
|
48
|
+
* Density changes chrome only. It never changes port geometry, because a pin
|
|
49
|
+
* that moves when the view setting changes would drag every wire with it.
|
|
50
|
+
*/
|
|
51
|
+
export type TBlueprintDensity = 'default' | 'compact';
|
|
39
52
|
export interface IBlueprintPort {
|
|
40
53
|
/** Unique port identifier */
|
|
41
54
|
id: string;
|
|
@@ -146,5 +159,20 @@ export interface IBlueprintCardProps {
|
|
|
146
159
|
* Default: false (tooltip only).
|
|
147
160
|
*/
|
|
148
161
|
showPortLabels?: TBlueprintPortLabelMode;
|
|
162
|
+
/**
|
|
163
|
+
* Signal level per port id, 0 to 1. A port present here fills from the
|
|
164
|
+
* bottom in proportion to its level, so a quiet port looks quiet and a hot
|
|
165
|
+
* one looks hot. Ports in `activePorts` but absent here render as a solid
|
|
166
|
+
* fill instead.
|
|
167
|
+
*
|
|
168
|
+
* This replaces the old behaviour, where every active port ran the same
|
|
169
|
+
* looping ring forever and carried no information beyond "wired and live".
|
|
170
|
+
*/
|
|
171
|
+
portLevels?: Record<string, number>;
|
|
172
|
+
/**
|
|
173
|
+
* Chrome density. Inherited from the parent `NbBlueprint` when unset, so
|
|
174
|
+
* setting it here overrides the canvas for this card only.
|
|
175
|
+
*/
|
|
176
|
+
density?: TBlueprintDensity;
|
|
149
177
|
}
|
|
150
178
|
//# sourceMappingURL=BlueprintCard.types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BlueprintCard.types.d.ts","sourceRoot":"","sources":["../../src/components/BlueprintCard.types.ts"],"names":[],"mappings":"AAAA,uDAAuD;AACvD,MAAM,MAAM,qBAAqB,GAC7B,UAAU,GACV,WAAW,GACX,UAAU,GACV,QAAQ,GACR,SAAS,GACT,OAAO,GACP,YAAY,GACZ,cAAc,GACd,WAAW,GACX,MAAM,GACN,oBAAoB,GACpB,SAAS,GACT,QAAQ,GACR,QAAQ,GACR,SAAS,GACT,OAAO,GACP,OAAO,GACP,KAAK,CAAA;AAET,+DAA+D;AAC/D,MAAM,WAAW,qBAAqB;IACpC;;;OAGG;IACH,EAAE,EAAE,MAAM,CAAA;IACV,qEAAqE;IACrE,KAAK,EAAE,MAAM,CAAA;CACd;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,MAAM,mBAAmB,GAAG,MAAM,GAAG,SAAS,GAAG,QAAQ,GAAG,QAAQ,CAAA;AAE1E;;;;;GAKG;AACH,MAAM,MAAM,kBAAkB,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAA;AAEnD,MAAM,WAAW,cAAc;IAC7B,6BAA6B;IAC7B,EAAE,EAAE,MAAM,CAAA;IACV,+EAA+E;IAC/E,KAAK,EAAE,MAAM,CAAA;IACb,qBAAqB;IACrB,IAAI,EAAE,OAAO,GAAG,QAAQ,CAAA;IACxB,qDAAqD;IACrD,QAAQ,CAAC,EAAE,qBAAqB,CAAA;IAChC,8DAA8D;IAC9D,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB;;;;;;;;;;OAUG;IACH,QAAQ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,iDAAiD;IACjD,CAAC,CAAC,EAAE,MAAM,CAAA;IACV,sCAAsC;IACtC,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,2DAA2D;IAC3D,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,+CAA+C;IAC/C,MAAM,CAAC,EAAE,oBAAoB,CAAA;IAC7B,kDAAkD;IAClD,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,2DAA2D;IAC3D,UAAU,CAAC,EAAE,uBAAuB,EAAE,CAAA;IACtC;;;OAGG;IACH,cAAc,CAAC,EAAE,uBAAuB,CAAA;
|
|
1
|
+
{"version":3,"file":"BlueprintCard.types.d.ts","sourceRoot":"","sources":["../../src/components/BlueprintCard.types.ts"],"names":[],"mappings":"AAAA,uDAAuD;AACvD,MAAM,MAAM,qBAAqB,GAC7B,UAAU,GACV,WAAW,GACX,UAAU,GACV,QAAQ,GACR,SAAS,GACT,OAAO,GACP,YAAY,GACZ,cAAc,GACd,WAAW,GACX,MAAM,GACN,oBAAoB,GACpB,SAAS,GACT,QAAQ,GACR,QAAQ,GACR,SAAS,GACT,OAAO,GACP,OAAO,GACP,KAAK,CAAA;AAET,+DAA+D;AAC/D,MAAM,WAAW,qBAAqB;IACpC;;;OAGG;IACH,EAAE,EAAE,MAAM,CAAA;IACV,qEAAqE;IACrE,KAAK,EAAE,MAAM,CAAA;CACd;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,MAAM,mBAAmB,GAAG,MAAM,GAAG,SAAS,GAAG,QAAQ,GAAG,QAAQ,CAAA;AAE1E;;;;;GAKG;AACH,MAAM,MAAM,kBAAkB,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAA;AAEnD;;;;;;;;;;;GAWG;AACH,MAAM,MAAM,iBAAiB,GAAG,SAAS,GAAG,SAAS,CAAA;AAErD,MAAM,WAAW,cAAc;IAC7B,6BAA6B;IAC7B,EAAE,EAAE,MAAM,CAAA;IACV,+EAA+E;IAC/E,KAAK,EAAE,MAA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,KAAK,CAAC,EAAE,cAAc,EAAE,CAAA;IACxB,+DAA+D;IAC/D,cAAc,CAAC,EAAE,MAAM,EAAE,CAAA;IACzB;;;;OAIG;IACH,WAAW,CAAC,EAAE,MAAM,EAAE,CAAA;IACtB,iDAAiD;IACjD,CAAC,CAAC,EAAE,MAAM,CAAA;IACV,iDAAiD;IACjD,CAAC,CAAC,EAAE,MAAM,CAAA;IACV,sCAAsC;IACtC,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,2DAA2D;IAC3D,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,+CAA+C;IAC/C,MAAM,CAAC,EAAE,oBAAoB,CAAA;IAC7B,kDAAkD;IAClD,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,2DAA2D;IAC3D,UAAU,CAAC,EAAE,uBAAuB,EAAE,CAAA;IACtC;;;OAGG;IACH,cAAc,CAAC,EAAE,uBAAuB,CAAA;IACxC;;;;;;;;OAQG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;IACnC;;;OAGG;IACH,OAAO,CAAC,EAAE,iBAAiB,CAAA;CAC5B"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import type { IBlueprintCardProps, IBlueprintPort } from './BlueprintCard.types';
|
|
1
|
+
import type { IBlueprintCardProps, IBlueprintPort, TBlueprintCardStatus, TBlueprintDensity } from './BlueprintCard.types';
|
|
2
|
+
import type { IBlueprintCardPortEvent } from './Blueprint.types';
|
|
2
3
|
declare var __VLS_1: {};
|
|
3
4
|
type __VLS_Slots = {} & {
|
|
4
5
|
default?: (props: typeof __VLS_1) => any;
|
|
@@ -8,37 +9,22 @@ declare const __VLS_base: import("vue").DefineComponent<IBlueprintCardProps, {},
|
|
|
8
9
|
toggle: (id: string, enabled: boolean) => any;
|
|
9
10
|
remove: (id: string) => any;
|
|
10
11
|
"toggle-collapse": (id: string) => any;
|
|
11
|
-
"port-mousedown": (data:
|
|
12
|
-
|
|
13
|
-
portId: string;
|
|
14
|
-
type: "input" | "output";
|
|
15
|
-
}) => any;
|
|
16
|
-
"port-mouseup": (data: {
|
|
17
|
-
nodeId: string;
|
|
18
|
-
portId: string;
|
|
19
|
-
type: "input" | "output";
|
|
20
|
-
}) => any;
|
|
12
|
+
"port-mousedown": (data: IBlueprintCardPortEvent) => any;
|
|
13
|
+
"port-mouseup": (data: IBlueprintCardPortEvent) => any;
|
|
21
14
|
}, string, import("vue").PublicProps, Readonly<IBlueprintCardProps> & Readonly<{
|
|
22
15
|
onSelect?: ((id: string) => any) | undefined;
|
|
23
16
|
onToggle?: ((id: string, enabled: boolean) => any) | undefined;
|
|
24
17
|
onRemove?: ((id: string) => any) | undefined;
|
|
25
18
|
"onToggle-collapse"?: ((id: string) => any) | undefined;
|
|
26
|
-
"onPort-mousedown"?: ((data:
|
|
27
|
-
|
|
28
|
-
portId: string;
|
|
29
|
-
type: "input" | "output";
|
|
30
|
-
}) => any) | undefined;
|
|
31
|
-
"onPort-mouseup"?: ((data: {
|
|
32
|
-
nodeId: string;
|
|
33
|
-
portId: string;
|
|
34
|
-
type: "input" | "output";
|
|
35
|
-
}) => any) | undefined;
|
|
19
|
+
"onPort-mousedown"?: ((data: IBlueprintCardPortEvent) => any) | undefined;
|
|
20
|
+
"onPort-mouseup"?: ((data: IBlueprintCardPortEvent) => any) | undefined;
|
|
36
21
|
}>, {
|
|
37
22
|
color: string;
|
|
38
|
-
status:
|
|
23
|
+
status: TBlueprintCardStatus;
|
|
39
24
|
x: number;
|
|
40
25
|
y: number;
|
|
41
26
|
category: string;
|
|
27
|
+
density: TBlueprintDensity;
|
|
42
28
|
enabled: boolean;
|
|
43
29
|
selected: boolean;
|
|
44
30
|
ports: IBlueprintPort[];
|
|
@@ -49,6 +35,7 @@ declare const __VLS_base: import("vue").DefineComponent<IBlueprintCardProps, {},
|
|
|
49
35
|
preview: string;
|
|
50
36
|
parameters: import("./BlueprintCard.types").IBlueprintCardParameter[];
|
|
51
37
|
showPortLabels: import("./BlueprintCard.types").TBlueprintPortLabelMode;
|
|
38
|
+
portLevels: Record<string, number>;
|
|
52
39
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
53
40
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
54
41
|
declare const _default: typeof __VLS_export;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BlueprintCard.vue.d.ts","sourceRoot":"","sources":["../../src/components/BlueprintCard.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"BlueprintCard.vue.d.ts","sourceRoot":"","sources":["../../src/components/BlueprintCard.vue"],"names":[],"mappings":"AAylDA,OAAO,KAAK,EACV,mBAAmB,EACnB,cAAc,EAEd,oBAAoB,EACpB,iBAAiB,EAGlB,MAAM,uBAAuB,CAAA;AAC9B,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,mBAAmB,CAAA;AAqgChE,QAAA,IAAI,OAAO,IAAW,CAAE;AACxB,KAAK,WAAW,GAAG,EAAE,GACnB;IAAE,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,OAAO,KAAK,GAAG,CAAA;CAAE,CAAC;AAK/C,QAAA,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6EAId,CAAC;AACH,QAAA,MAAM,YAAY,EAAS,eAAe,CAAC,OAAO,UAAU,EAAE,WAAW,CAAC,CAAC;wBACtD,OAAO,YAAY;AAAxC,wBAAyC;AAWzC,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KACV,CAAA;CACD,CAAC"}
|
|
@@ -13,8 +13,8 @@ declare const __VLS_base: import("vue").DefineComponent<IButtonProps, {}, {}, {}
|
|
|
13
13
|
type: `${EButtonType}`;
|
|
14
14
|
icon: string;
|
|
15
15
|
to: string | Record<string, unknown>;
|
|
16
|
-
outlined: boolean;
|
|
17
16
|
disabled: boolean;
|
|
17
|
+
outlined: boolean;
|
|
18
18
|
loading: boolean;
|
|
19
19
|
href: string;
|
|
20
20
|
target: string;
|
|
@@ -26,9 +26,9 @@ declare const __VLS_base: import("vue").DefineComponent<ITreeProps, {
|
|
|
26
26
|
"onUpdate:modelValue"?: ((id: string) => any) | undefined;
|
|
27
27
|
}>, {
|
|
28
28
|
size: "sm" | "md";
|
|
29
|
+
compact: boolean;
|
|
29
30
|
draggable: boolean;
|
|
30
31
|
modelValue: string | null;
|
|
31
|
-
compact: boolean;
|
|
32
32
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
33
33
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
34
34
|
declare const _default: typeof __VLS_export;
|