@nubisco/ui 2.8.1 → 3.0.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.
@@ -11,30 +11,51 @@ export interface IBlueprintPortChannel {
11
11
  label: string;
12
12
  }
13
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).
14
+ * Visual shape for a single pin.
19
15
  *
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.
16
+ * Shape is the target a user aims a wire at, so it deliberately does NOT vary
17
+ * with `dataType`: a target that changes form per port is one they have to
18
+ * re-learn each time, and a rotated or shrunken silhouette converges with the
19
+ * default pill as soon as the canvas is zoomed out. What a port carries is
20
+ * expressed by `signal` (solid vs striped) and `color` instead, neither of
21
+ * which touches the pin's outline.
22
+ *
23
+ * - `'pill'` (default): the canonical connector tab, flat against the card
24
+ * and rounded on its outer end.
25
+ * - `'square'`: a sharp box, tangent to the card edge.
26
+ * - `'circle'`: a small dot. Its smaller target de-emphasises the port.
27
+ *
28
+ * Reach for a variant only when a port needs to be told apart from its
29
+ * immediate neighbours on the same card, never as a way to encode type.
30
30
  */
31
- export type TBlueprintPortShape = 'pill' | 'diamond' | 'square' | 'circle';
31
+ export type TBlueprintPortShape = 'pill' | 'square' | 'circle';
32
32
  /**
33
33
  * Visual size for a single pin. Independent of shape. `'md'` is the
34
34
  * default — `'sm'` shrinks the pin (good for secondary / metadata
35
35
  * ports), `'lg'` enlarges (good for primary audio ins / outs that
36
36
  * need to be visually emphasised).
37
37
  */
38
+ /**
39
+ * Whether a port carries a continuously varying quantity or discrete events.
40
+ *
41
+ * This is the library's own axis, deliberately independent of `dataType`,
42
+ * which is a domain taxonomy that will keep growing. Analog and digital is
43
+ * the distinction that changes how a port behaves rather than what it is
44
+ * called, and it drives two things:
45
+ *
46
+ * - **Decoration.** Digital pins are striped, analog pins are solid. Same
47
+ * silhouette either way: a pin is a target the user aims a wire at, and
48
+ * changing its shape by type makes that aim less predictable for no gain.
49
+ * Texture separates them without touching form or the colour channel,
50
+ * which `dataType` already spends.
51
+ * - **Activity.** An analog port shows a level, filling in proportion to
52
+ * what is flowing. A digital port has no meaningful level, so it pulses
53
+ * once per event instead. See `portLevels` and `activePorts`.
54
+ *
55
+ * Defaults are derived from `dataType`, so existing ports get the right
56
+ * behaviour without being touched. Set it explicitly to override.
57
+ */
58
+ export type TBlueprintPortSignal = 'analog' | 'digital';
38
59
  export type TBlueprintPortSize = 'sm' | 'md' | 'lg';
39
60
  /**
40
61
  * How tightly a card packs its chrome. Set once on `NbBlueprint` and every
@@ -97,6 +118,12 @@ export interface IBlueprintPort {
97
118
  * connection.
98
119
  */
99
120
  size?: TBlueprintPortSize;
121
+ /**
122
+ * Whether this port carries a continuous quantity or discrete events.
123
+ * Beats the `dataType`-derived default. Drives the pin's decoration and
124
+ * which activity treatment it uses.
125
+ */
126
+ signal?: TBlueprintPortSignal;
100
127
  }
101
128
  /** Status indicator level */
102
129
  export type TBlueprintCardStatus = 'valid' | 'warning' | 'error' | 'none';
@@ -160,10 +187,17 @@ export interface IBlueprintCardProps {
160
187
  */
161
188
  showPortLabels?: TBlueprintPortLabelMode;
162
189
  /**
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.
190
+ * Signal level per port id, **0 to 1** (not 0 to 100), clamped. A port
191
+ * present here fills from the bottom in proportion to its level, so a quiet
192
+ * port looks quiet and a hot one looks hot. Ports in `activePorts` but
193
+ * absent here render as a solid fill instead.
194
+ *
195
+ * The scale is normalised on purpose: the library has no opinion on what
196
+ * the quantity is. An audio host maps dBFS onto 0 to 1 with whatever curve
197
+ * suits its meters, which is a decision only it can make.
198
+ *
199
+ * Only meaningful for analog ports. A digital port has no level; it pulses
200
+ * per event instead, driven by `activePorts`.
167
201
  *
168
202
  * This replaces the old behaviour, where every active port ran the same
169
203
  * looping ring forever and carried no information beyond "wired and live".
@@ -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;;;;;;;;;;;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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AAoC;IACpC,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
+ {"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;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{"version":3,"file":"BlueprintCard.vue.d.ts","sourceRoot":"","sources":["../../src/components/BlueprintCard.vue"],"names":[],"mappings":"AA6nDA,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"}
1
+ {"version":3,"file":"BlueprintCard.vue.d.ts","sourceRoot":"","sources":["../../src/components/BlueprintCard.vue"],"names":[],"mappings":"AAsqDA,OAAO,KAAK,EACV,mBAAmB,EACnB,cAAc,EAEd,oBAAoB,EACpB,iBAAiB,EAIlB,MAAM,uBAAuB,CAAA;AAC9B,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,mBAAmB,CAAA;AAsiChE,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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