@nubisco/ui 1.38.2 → 1.38.4
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.context.d.ts +1 -1
- package/dist/components/Blueprint.context.d.ts.map +1 -1
- package/dist/components/Blueprint.types.d.ts +131 -0
- package/dist/components/Blueprint.types.d.ts.map +1 -0
- package/dist/components/Blueprint.vue.d.ts +8 -4
- package/dist/components/Blueprint.vue.d.ts.map +1 -1
- package/dist/components/BlueprintCard.types.d.ts +150 -0
- package/dist/components/BlueprintCard.types.d.ts.map +1 -0
- package/dist/components/BlueprintCard.vue.d.ts +4 -4
- package/dist/components/BlueprintCard.vue.d.ts.map +1 -1
- package/dist/index.cjs +7 -7
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +4453 -4364
- package/dist/index.mjs.map +1 -1
- package/dist/main.d.ts +2 -2
- package/dist/main.d.ts.map +1 -1
- package/dist/ui.css +1 -1
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { InjectionKey } from 'vue';
|
|
2
|
-
import type { IBlueprintCardContext } from './Blueprint.
|
|
2
|
+
import type { IBlueprintCardContext } from './Blueprint.types';
|
|
3
3
|
/**
|
|
4
4
|
* Inject key NbBlueprint provides so its child cards can drive wire dragging
|
|
5
5
|
* without the parent app having to forward port events manually. Lives in a
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Blueprint.context.d.ts","sourceRoot":"","sources":["../../src/components/Blueprint.context.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,KAAK,CAAA;AACvC,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"Blueprint.context.d.ts","sourceRoot":"","sources":["../../src/components/Blueprint.context.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,KAAK,CAAA;AACvC,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,mBAAmB,CAAA;AAE9D;;;;GAIG;AACH,eAAO,MAAM,oBAAoB,EAAE,YAAY,CAAC,qBAAqB,CAEpE,CAAA"}
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
export interface IBlueprintConnection {
|
|
2
|
+
fromNode: string;
|
|
3
|
+
fromPort: string;
|
|
4
|
+
toNode: string;
|
|
5
|
+
toPort: string;
|
|
6
|
+
/**
|
|
7
|
+
* Whether signal can currently flow through this wire. When false, the
|
|
8
|
+
* wire still renders (the path stays visible) but the animated flow
|
|
9
|
+
* overlay is suppressed and the path is dimmed. Undefined = treated as
|
|
10
|
+
* active for back-compat with non-audio consumers.
|
|
11
|
+
*/
|
|
12
|
+
active?: boolean;
|
|
13
|
+
/**
|
|
14
|
+
* Linear amplitude (0..1) of audio flowing through this wire, used by
|
|
15
|
+
* the `'levels'` value of `animateConnections`. The stroke colour
|
|
16
|
+
* shifts green → yellow → red as `level` rises (anchored at 0.0 / 0.5
|
|
17
|
+
* / 1.0 respectively). Ignored when `animateConnections` is anything
|
|
18
|
+
* other than `'levels'`. MIDI wires (or wires whose `level` is
|
|
19
|
+
* undefined) keep their card-accent colour.
|
|
20
|
+
*/
|
|
21
|
+
level?: number;
|
|
22
|
+
}
|
|
23
|
+
export interface IBlueprintCardMove {
|
|
24
|
+
id: string;
|
|
25
|
+
y: number;
|
|
26
|
+
x: number;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Geometry for one card in the windowed (data-driven) rendering API.
|
|
30
|
+
*
|
|
31
|
+
* Pass an array of these as the `cards` prop and render each via the
|
|
32
|
+
* `#card` scoped slot; Blueprint then owns the `v-for` and the absolute
|
|
33
|
+
* position wrappers, and only mounts the cards whose box intersects the
|
|
34
|
+
* (padded) viewport. Off-screen cards are never instantiated, so a graph
|
|
35
|
+
* with thousands of nodes pays render cost only for what's on screen.
|
|
36
|
+
*
|
|
37
|
+
* Hosts typically pass their own richer card objects (extra fields are
|
|
38
|
+
* preserved and handed straight back through the `#card` slot); only
|
|
39
|
+
* `id`, `x`, and `y` are required.
|
|
40
|
+
*/
|
|
41
|
+
export interface IBlueprintCard {
|
|
42
|
+
/** Stable identity. Must match the `id` of the NbBlueprintCard rendered
|
|
43
|
+
* in the slot and the node ids used in `connections`. */
|
|
44
|
+
id: string;
|
|
45
|
+
/** Canvas-space left, in the same units as connection endpoints and the
|
|
46
|
+
* `move` event payload. */
|
|
47
|
+
x: number;
|
|
48
|
+
/** Canvas-space top. */
|
|
49
|
+
y: number;
|
|
50
|
+
/**
|
|
51
|
+
* Card box size in canvas units. Optional: when omitted the windowing
|
|
52
|
+
* test falls back to `cardSizeEstimate`. Providing real sizes makes the
|
|
53
|
+
* off-screen cull tighter (a tall card won't be dropped a frame early)
|
|
54
|
+
* but is not required (the overscan band absorbs estimate error).
|
|
55
|
+
*/
|
|
56
|
+
width?: number;
|
|
57
|
+
height?: number;
|
|
58
|
+
}
|
|
59
|
+
export interface IBlueprintProps {
|
|
60
|
+
/**
|
|
61
|
+
* Wire connections between card ports.
|
|
62
|
+
*/
|
|
63
|
+
connections?: IBlueprintConnection[];
|
|
64
|
+
/**
|
|
65
|
+
* Card geometry for the windowed rendering API. When provided, Blueprint
|
|
66
|
+
* owns the card `v-for` and position wrappers and renders each card
|
|
67
|
+
* through the `#card` scoped slot, mounting only the cards whose box (or
|
|
68
|
+
* a wire crossing the viewport) is on screen. When omitted, the default
|
|
69
|
+
* slot is rendered verbatim and the host owns card layout (legacy API,
|
|
70
|
+
* no windowing). The two modes are mutually exclusive: if `cards` is set,
|
|
71
|
+
* the default slot is ignored.
|
|
72
|
+
*/
|
|
73
|
+
cards?: IBlueprintCard[];
|
|
74
|
+
/**
|
|
75
|
+
* Fallback card box size (canvas units) for the windowing cull, used for
|
|
76
|
+
* any card whose `width`/`height` is not given. Defaults to roughly one
|
|
77
|
+
* standard card. Only affects how tightly off-screen cards are culled;
|
|
78
|
+
* the overscan band means a loose estimate just renders a few extra
|
|
79
|
+
* cards near the edges rather than dropping visible ones.
|
|
80
|
+
*/
|
|
81
|
+
cardSizeEstimate?: {
|
|
82
|
+
width: number;
|
|
83
|
+
height: number;
|
|
84
|
+
};
|
|
85
|
+
/**
|
|
86
|
+
* Wire animation policy.
|
|
87
|
+
*
|
|
88
|
+
* - `'never'` (default): static wires; no flow overlay, no colour
|
|
89
|
+
* shift. Cheapest path; right for non-signal-bearing graphs.
|
|
90
|
+
* - `'always'`: animate every wire continuously.
|
|
91
|
+
* - `'on-activity'`: animate iff `connection.active === true`. Wires
|
|
92
|
+
* with `active === false` render dimmed without flow.
|
|
93
|
+
* - `'levels'`: same activity gating as `'on-activity'`, plus audio
|
|
94
|
+
* wires colour-shift green → yellow → red based on
|
|
95
|
+
* `connection.level` (0..1). MIDI wires (and wires without a
|
|
96
|
+
* `level` field) keep their card-accent colour.
|
|
97
|
+
*/
|
|
98
|
+
animateConnections?: 'never' | 'always' | 'on-activity' | 'levels';
|
|
99
|
+
/**
|
|
100
|
+
* Wheel-event policy for the canvas:
|
|
101
|
+
*
|
|
102
|
+
* - `'auto'` (default): macOS pinch-to-zoom (`ctrlKey === true`)
|
|
103
|
+
* zooms cursor-anchored; plain two-finger / wheel scroll pans.
|
|
104
|
+
* Matches current behaviour, no breaking change.
|
|
105
|
+
* - `'zoom'`: every wheel event becomes a cursor-anchored zoom.
|
|
106
|
+
* Right for node editors where panning has its own gesture (e.g.
|
|
107
|
+
* space + drag) and the wheel is the natural zoom verb.
|
|
108
|
+
* - `'pan'`: every wheel event pans, never zooms.
|
|
109
|
+
*/
|
|
110
|
+
wheelMode?: 'auto' | 'zoom' | 'pan';
|
|
111
|
+
}
|
|
112
|
+
/**
|
|
113
|
+
* Payload of the port-mousedown / port-mouseup events emitted by
|
|
114
|
+
* NbBlueprintCard, and what NbBlueprint's injected port handlers expect.
|
|
115
|
+
*/
|
|
116
|
+
export interface IBlueprintCardPortEvent {
|
|
117
|
+
nodeId: string;
|
|
118
|
+
portId: string;
|
|
119
|
+
type: 'input' | 'output';
|
|
120
|
+
}
|
|
121
|
+
/**
|
|
122
|
+
* Shape NbBlueprint provides via inject so its child cards can drive wire
|
|
123
|
+
* dragging without the parent app forwarding port events manually. The
|
|
124
|
+
* runtime InjectionKey lives in `Blueprint.context.ts` (this file is an
|
|
125
|
+
* ambient `.d.ts` and can only carry types).
|
|
126
|
+
*/
|
|
127
|
+
export interface IBlueprintCardContext {
|
|
128
|
+
onPortDown: (event: IBlueprintCardPortEvent) => void;
|
|
129
|
+
onPortUp: (event: IBlueprintCardPortEvent) => void;
|
|
130
|
+
}
|
|
131
|
+
//# sourceMappingURL=Blueprint.types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Blueprint.types.d.ts","sourceRoot":"","sources":["../../src/components/Blueprint.types.ts"],"names":[],"mappings":"AAAA,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,CAAA;CACV;AAED;;;;;;;;;;;;GAYG;AACH,MAAM,WAAW,cAAc;IAC7B;8DAC0D;IAC1D,EAAE,EAAE,MAAM,CAAA;IACV;gCAC4B;IAC5B,CAAC,EAAE,MAAM,CAAA;IACT,wBAAwB;IACxB,CAAC,EAAE,MAAM,CAAA;IACT;;;;;OAKG;IACH,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,MAAM,CAAC,EAAE,MAAM,CAAA;CAChB;AAED,MAAM,WAAW,eAAe;IAC9B;;OAEG;IACH,WAAW,CAAC,EAAE,oBAAoB,EAAE,CAAA;IACpC;;;;;;;;OAQG;IACH,KAAK,CAAC,EAAE,cAAc,EAAE,CAAA;IACxB;;;;;;OAMG;IACH,gBAAgB,CAAC,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,CAAA;IACpD;;;;;;;;;;;;OAYG;IACH,kBAAkB,CAAC,EAAE,OAAO,GAAG,QAAQ,GAAG,aAAa,GAAG,QAAQ,CAAA;IAClE;;;;;;;;;;OAUG;IACH,SAAS,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,KAAK,CAAA;CACpC;AAED;;;GAGG;AACH,MAAM,WAAW,uBAAuB;IACtC,MAAM,EAAE,MAAM,CAAA;IACd,MAAM,EAAE,MAAM,CAAA;IACd,IAAI,EAAE,OAAO,GAAG,QAAQ,CAAA;CACzB;AAED;;;;;GAKG;AACH,MAAM,WAAW,qBAAqB;IACpC,UAAU,EAAE,CAAC,KAAK,EAAE,uBAAuB,KAAK,IAAI,CAAA;IACpD,QAAQ,EAAE,CAAC,KAAK,EAAE,uBAAuB,KAAK,IAAI,CAAA;CACnD"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { IBlueprintConnection, IBlueprintCardMove, IBlueprintProps } from './Blueprint.
|
|
1
|
+
import type { IBlueprintConnection, IBlueprintCard, IBlueprintCardMove, IBlueprintProps } from './Blueprint.types';
|
|
2
2
|
declare function selectAll(): void;
|
|
3
3
|
declare function deselectAll(): void;
|
|
4
4
|
declare function onPortMouseDown(data: {
|
|
@@ -28,7 +28,9 @@ declare function autoLayout(options?: {
|
|
|
28
28
|
gapY?: number;
|
|
29
29
|
padding?: number;
|
|
30
30
|
}): void;
|
|
31
|
-
declare var __VLS_1: {
|
|
31
|
+
declare var __VLS_1: {
|
|
32
|
+
card: IBlueprintCard;
|
|
33
|
+
}, __VLS_3: {}, __VLS_5: {
|
|
32
34
|
connection: {
|
|
33
35
|
fromNode: string;
|
|
34
36
|
fromPort: string;
|
|
@@ -41,9 +43,11 @@ declare var __VLS_1: {}, __VLS_3: {
|
|
|
41
43
|
disconnect: () => void;
|
|
42
44
|
};
|
|
43
45
|
type __VLS_Slots = {} & {
|
|
44
|
-
|
|
46
|
+
card?: (props: typeof __VLS_1) => any;
|
|
45
47
|
} & {
|
|
46
|
-
|
|
48
|
+
default?: (props: typeof __VLS_3) => any;
|
|
49
|
+
} & {
|
|
50
|
+
'wire-menu'?: (props: typeof __VLS_5) => any;
|
|
47
51
|
};
|
|
48
52
|
declare const __VLS_base: import("vue").DefineComponent<IBlueprintProps, {
|
|
49
53
|
centerView: typeof centerView;
|
|
@@ -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":"AAojEA,OAAO,KAAK,EACV,oBAAoB,EACpB,cAAc,EACd,kBAAkB,EAElB,eAAe,EAChB,MAAM,mBAAmB,CAAA;AAgK1B,iBAAS,SAAS,SAejB;AAED,iBAAS,WAAW,SAGnB;AA+lBD,iBAAS,eAAe,CAAC,IAAI,EAAE;IAC7B,MAAM,EAAE,MAAM,CAAA;IACd,MAAM,EAAE,MAAM,CAAA;IACd,IAAI,EAAE,MAAM,CAAA;CACb,QAKA;AA4FD,iBAAS,aAAa,SAErB;AAmDD,iBAAS,aAAa,CAAC,IAAI,EAAE;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,QAkC5E;AA+RD,iBAAS,UAAU,SAgBlB;AAED,iBAAS,SAAS,CAAC,OAAO,SAAK,QAiC9B;AAED,iBAAS,SAAS,SAIjB;AAsDD,iBAAS,SAAS,SAMjB;AAED,iBAAS,WAAW,SAOnB;AAED,iBAAS,UAAU,SAMlB;AAED,iBAAS,QAAQ,SAMhB;AAED,iBAAS,WAAW,SAOnB;AAED,iBAAS,WAAW,SAMnB;AAED,iBAAS,sBAAsB,SAe9B;AAED,iBAAS,oBAAoB,SAe5B;AAID,iBAAS,UAAU,CAAC,OAAO,CAAC,EAAE;IAC5B,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,OAAO,CAAC,EAAE,MAAM,CAAA;CACjB,QA4HA;AAkXD,QAAA,IAAI,OAAO;;CAAU,EAAE,OAAO,IAAU,EAAE,OAAO;;;;;;;;;;;CAAW,CAAE;AAC9D,KAAK,WAAW,GAAG,EAAE,GACnB;IAAE,IAAI,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,OAAO,KAAK,GAAG,CAAA;CAAE,GACzC;IAAE,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,OAAO,KAAK,GAAG,CAAA;CAAE,GAC5C;IAAE,WAAW,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,OAAO,KAAK,GAAG,CAAA;CAAE,CAAC;AAOnD,QAAA,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6EAKd,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"}
|
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
/** Data type for a pin (determines shape and color) */
|
|
2
|
+
export type TBlueprintPinDataType = 'geometry' | 'celestial' | 'lighting' | 'effect' | 'surface' | 'audio' | 'audio:mono' | 'audio:stereo' | 'audio:bus' | 'midi' | 'midi:rechannelized' | 'control' | 'entity' | 'number' | 'vector3' | 'color' | 'asset' | 'any';
|
|
3
|
+
/** A single sub-channel within a multi-channel bundle port. */
|
|
4
|
+
export interface IBlueprintPortChannel {
|
|
5
|
+
/**
|
|
6
|
+
* Unique within the parent port. When the port is expanded, the rendered
|
|
7
|
+
* pin's data-port attribute and emitted port id is `${port.id}/${channel.id}`.
|
|
8
|
+
*/
|
|
9
|
+
id: string;
|
|
10
|
+
/** Display label shown in the pin tooltip, e.g. "L", "R", "Ch 3". */
|
|
11
|
+
label: string;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Visual shape for a single pin. Independent of `dataType` so an
|
|
15
|
+
* `audio` port can render as a square (e.g. for an aux send) without
|
|
16
|
+
* forcing the dataType taxonomy to grow new variants. When unset, the
|
|
17
|
+
* shape is derived from `dataType` (see PIN_SHAPES inside
|
|
18
|
+
* BlueprintCard.vue).
|
|
19
|
+
*
|
|
20
|
+
* - `'pill'` (default for most dataTypes): a 6x14 rounded pill —
|
|
21
|
+
* the canonical Blueprint connector tab.
|
|
22
|
+
* - `'diamond'`: rotated square, ~10x10. Reads as "control / event"
|
|
23
|
+
* rather than "audio / signal flow". MIDI and `control` ports
|
|
24
|
+
* default to this.
|
|
25
|
+
* - `'square'`: sharp 10x10 box. Good for typed-data ports
|
|
26
|
+
* (`color`, `asset`).
|
|
27
|
+
* - `'circle'`: small 8x8 dot. Good for boolean / single-bit
|
|
28
|
+
* ports where the smaller hit area visually de-emphasises the
|
|
29
|
+
* port relative to audio pins.
|
|
30
|
+
*/
|
|
31
|
+
export type TBlueprintPortShape = 'pill' | 'diamond' | 'square' | 'circle';
|
|
32
|
+
/**
|
|
33
|
+
* Visual size for a single pin. Independent of shape. `'md'` is the
|
|
34
|
+
* default — `'sm'` shrinks the pin (good for secondary / metadata
|
|
35
|
+
* ports), `'lg'` enlarges (good for primary audio ins / outs that
|
|
36
|
+
* need to be visually emphasised).
|
|
37
|
+
*/
|
|
38
|
+
export type TBlueprintPortSize = 'sm' | 'md' | 'lg';
|
|
39
|
+
export interface IBlueprintPort {
|
|
40
|
+
/** Unique port identifier */
|
|
41
|
+
id: string;
|
|
42
|
+
/** Display label (shown in the tooltip and, when showLabel is true, inline) */
|
|
43
|
+
label: string;
|
|
44
|
+
/** Port direction */
|
|
45
|
+
type: 'input' | 'output';
|
|
46
|
+
/** Data type for type-checking and visual styling */
|
|
47
|
+
dataType?: TBlueprintPinDataType;
|
|
48
|
+
/** Whether this input is required for the node to be valid */
|
|
49
|
+
required?: boolean;
|
|
50
|
+
/**
|
|
51
|
+
* Optional list of sub-channels that make up a multi-channel port.
|
|
52
|
+
* When set, the port always renders as N discrete pins (one per channel),
|
|
53
|
+
* each addressable as `${port.id}/${channel.id}`. Useful as a declarative
|
|
54
|
+
* shorthand for stereo / multi-bus / multi-MIDI ports without writing N
|
|
55
|
+
* separate port entries by hand.
|
|
56
|
+
*
|
|
57
|
+
* The pin's tooltip combines the parent and channel labels
|
|
58
|
+
* (e.g. "Stereo Out . L"); when inline labels are enabled, the channel
|
|
59
|
+
* label is what appears next to the pin (e.g. "L").
|
|
60
|
+
*/
|
|
61
|
+
channels?: IBlueprintPortChannel[];
|
|
62
|
+
/**
|
|
63
|
+
* Whether the port's label is rendered inline next to the pin (in addition
|
|
64
|
+
* to the tooltip). Overrides the card-level `showPortLabels` default.
|
|
65
|
+
*/
|
|
66
|
+
showLabel?: boolean;
|
|
67
|
+
/**
|
|
68
|
+
* Explicit shape override. Beats the `dataType`-derived default.
|
|
69
|
+
* Use when two ports of the same dataType need to look different
|
|
70
|
+
* (e.g. a "trigger" output styled distinctly from a "value"
|
|
71
|
+
* output, both `dataType: 'control'`).
|
|
72
|
+
*/
|
|
73
|
+
shape?: TBlueprintPortShape;
|
|
74
|
+
/**
|
|
75
|
+
* Explicit color override (any CSS color). Beats the
|
|
76
|
+
* `dataType`-derived default. Use when a single card carries
|
|
77
|
+
* multiple ports of the same type that need to be told apart at
|
|
78
|
+
* a glance (e.g. red bypass-input vs green bypass-output).
|
|
79
|
+
*/
|
|
80
|
+
color?: string;
|
|
81
|
+
/**
|
|
82
|
+
* Explicit size override. Default `'md'`. Use `'sm'` to
|
|
83
|
+
* de-emphasise a metadata port; use `'lg'` to flag a primary
|
|
84
|
+
* connection.
|
|
85
|
+
*/
|
|
86
|
+
size?: TBlueprintPortSize;
|
|
87
|
+
}
|
|
88
|
+
/** Status indicator level */
|
|
89
|
+
export type TBlueprintCardStatus = 'valid' | 'warning' | 'error' | 'none';
|
|
90
|
+
/** Parameter row displayed inside the card body */
|
|
91
|
+
export interface IBlueprintCardParameter {
|
|
92
|
+
/** Parameter label */
|
|
93
|
+
label: string;
|
|
94
|
+
/** Display value */
|
|
95
|
+
value: string | number;
|
|
96
|
+
/** Optional unit suffix (e.g. "blocks", "ms") */
|
|
97
|
+
unit?: string;
|
|
98
|
+
/** Optional progress bar (0 to 100). When set, a thin bar renders below the row. */
|
|
99
|
+
bar?: number;
|
|
100
|
+
}
|
|
101
|
+
/**
|
|
102
|
+
* Card-level default for inline port labels. Individual ports can opt in/out
|
|
103
|
+
* via `IBlueprintPort.showLabel`. Use `'left'` for input-side labels (typical
|
|
104
|
+
* for an audio interface with named inputs), `'right'` for output-side, etc.
|
|
105
|
+
*/
|
|
106
|
+
export type TBlueprintPortLabelMode = 'left' | 'right' | 'both' | false;
|
|
107
|
+
export interface IBlueprintCardProps {
|
|
108
|
+
/** Unique card identifier */
|
|
109
|
+
id: string;
|
|
110
|
+
/** Card title */
|
|
111
|
+
title: string;
|
|
112
|
+
/** Card accent color (CSS color string) */
|
|
113
|
+
color?: string;
|
|
114
|
+
/** Whether the card is enabled (shows toggle) */
|
|
115
|
+
enabled?: boolean;
|
|
116
|
+
/** Whether the card is currently selected */
|
|
117
|
+
selected?: boolean;
|
|
118
|
+
/** Category label shown below the title */
|
|
119
|
+
category?: string;
|
|
120
|
+
/** Input/output port definitions */
|
|
121
|
+
ports?: IBlueprintPort[];
|
|
122
|
+
/** IDs of ports that are currently connected (filled style) */
|
|
123
|
+
connectedPorts?: string[];
|
|
124
|
+
/**
|
|
125
|
+
* IDs of ports currently carrying signal. Active pins keep their
|
|
126
|
+
* connected fill and add a subtle pulsing glow so the user can trace
|
|
127
|
+
* the live signal at a glance. Optional for non-audio consumers.
|
|
128
|
+
*/
|
|
129
|
+
activePorts?: string[];
|
|
130
|
+
/** Position X on the canvas (in canvas units) */
|
|
131
|
+
x?: number;
|
|
132
|
+
/** Position Y on the canvas (in canvas units) */
|
|
133
|
+
y?: number;
|
|
134
|
+
/** Whether the card can be removed */
|
|
135
|
+
removable?: boolean;
|
|
136
|
+
/** Whether the card is collapsed (shows only title bar) */
|
|
137
|
+
collapsed?: boolean;
|
|
138
|
+
/** Status indicator (valid, warning, error) */
|
|
139
|
+
status?: TBlueprintCardStatus;
|
|
140
|
+
/** Compact preview text shown on the card body */
|
|
141
|
+
preview?: string;
|
|
142
|
+
/** Structured parameter rows displayed in the card body */
|
|
143
|
+
parameters?: IBlueprintCardParameter[];
|
|
144
|
+
/**
|
|
145
|
+
* Default for inline port labels. Per-port `showLabel` always wins.
|
|
146
|
+
* Default: false (tooltip only).
|
|
147
|
+
*/
|
|
148
|
+
showPortLabels?: TBlueprintPortLabelMode;
|
|
149
|
+
}
|
|
150
|
+
//# sourceMappingURL=BlueprintCard.types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BlueprintCard.types.d.ts","sourceRoot":"","sources":["../../src/components/BlueprintCard.types.ts"],"names":[],"mappings":"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"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { IBlueprintCardProps, IBlueprintPort } from './BlueprintCard.
|
|
1
|
+
import type { IBlueprintCardProps, IBlueprintPort } from './BlueprintCard.types';
|
|
2
2
|
declare var __VLS_1: {};
|
|
3
3
|
type __VLS_Slots = {} & {
|
|
4
4
|
default?: (props: typeof __VLS_1) => any;
|
|
@@ -45,10 +45,10 @@ declare const __VLS_base: import("vue").DefineComponent<IBlueprintCardProps, {},
|
|
|
45
45
|
activePorts: string[];
|
|
46
46
|
removable: boolean;
|
|
47
47
|
collapsed: boolean;
|
|
48
|
-
status: import("./BlueprintCard.
|
|
48
|
+
status: import("./BlueprintCard.types").TBlueprintCardStatus;
|
|
49
49
|
preview: string;
|
|
50
|
-
parameters: import("./BlueprintCard.
|
|
51
|
-
showPortLabels: import("./BlueprintCard.
|
|
50
|
+
parameters: import("./BlueprintCard.types").IBlueprintCardParameter[];
|
|
51
|
+
showPortLabels: import("./BlueprintCard.types").TBlueprintPortLabelMode;
|
|
52
52
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
53
53
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
54
54
|
declare const _default: typeof __VLS_export;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BlueprintCard.vue.d.ts","sourceRoot":"","sources":["../../src/components/BlueprintCard.vue"],"names":[],"mappings":"AA+hCA,OAAO,KAAK,EACV,mBAAmB,EACnB,cAAc,EAIf,MAAM,
|
|
1
|
+
{"version":3,"file":"BlueprintCard.vue.d.ts","sourceRoot":"","sources":["../../src/components/BlueprintCard.vue"],"names":[],"mappings":"AA+hCA,OAAO,KAAK,EACV,mBAAmB,EACnB,cAAc,EAIf,MAAM,uBAAuB,CAAA;AA6oB9B,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;;;;;;gBAxnBI,MAAM;gBAAU,MAAM;cAAQ,OAAO,GAAG,QAAQ;;;gBAGhD,MAAM;gBAAU,MAAM;cAAQ,OAAO,GAAG,QAAQ;;;;;;;;gBAHhD,MAAM;gBAAU,MAAM;cAAQ,OAAO,GAAG,QAAQ;;;gBAGhD,MAAM;gBAAU,MAAM;cAAQ,OAAO,GAAG,QAAQ;;;;;;;;;;;;;;;;;;6EAynBlE,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"}
|