@oicl/openbridge-webcomponents-full-bundle 2.2.0-next.23 → 2.2.0-next.24
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/bundle/openbridge-webcomponents.bundle.js +10 -4
- package/bundle/openbridge-webcomponents.bundle.js.map +1 -1
- package/dist/svghelpers/advice-linear.d.ts.map +1 -1
- package/dist/svghelpers/advice-linear.js +10 -4
- package/dist/svghelpers/advice-linear.js.map +1 -1
- package/llms/docs/building-blocks-advice.md +1 -0
- package/llms/llms-full.txt +1 -0
- package/package.json +1 -1
- package/src/building-blocks/advice/advice.stories.ts +34 -0
- package/src/building-blocks/external-scale/external-scale.spec.ts +15 -0
- package/src/svghelpers/advice-linear.ts +16 -4
|
@@ -35533,6 +35533,11 @@ var point = (vertical, main, perp) => vertical ? `${perp} ${main}` : `${main} ${
|
|
|
35533
35533
|
* coordinate is the advice's start cap when `mainStart <= mainEnd`, as on a
|
|
35534
35534
|
* horizontal scale, and its end cap otherwise, as on a vertical scale whose
|
|
35535
35535
|
* values grow upward.
|
|
35536
|
+
*
|
|
35537
|
+
* TODO(designer): the sets draw no go-to range shorter than the pill and its
|
|
35538
|
+
* two tip insets, 16 px. The code keeps the pill's round ends down to 8 px
|
|
35539
|
+
* so a short range on a small tank stays marked, and drops the band below
|
|
35540
|
+
* that. The ring drops a range of 16 or less.
|
|
35536
35541
|
*/
|
|
35537
35542
|
function bandPath$1(o, advice) {
|
|
35538
35543
|
const t = o.thickness ?? 8;
|
|
@@ -35543,13 +35548,14 @@ function bandPath$1(o, advice) {
|
|
|
35543
35548
|
const capLo = ascending ? caps.start : caps.end;
|
|
35544
35549
|
const capHi = ascending ? caps.end : caps.start;
|
|
35545
35550
|
const u = o.unitsPerPx ?? 1;
|
|
35546
|
-
const inset = 4 * u;
|
|
35547
|
-
const edgeLo = capLo === AdviceCap.pill ? lo + inset : lo;
|
|
35548
|
-
const edgeHi = capHi === AdviceCap.pill ? hi - inset : hi;
|
|
35549
35551
|
const radius = (cap) => cap === AdviceCap.pill ? t / 2 : cap === AdviceCap.square ? 2 * u : 0;
|
|
35550
35552
|
const rLo = radius(capLo);
|
|
35551
35553
|
const rHi = radius(capHi);
|
|
35552
|
-
if (
|
|
35554
|
+
if (hi - lo < rLo + rHi) return null;
|
|
35555
|
+
const pills = Number(capLo === AdviceCap.pill) + Number(capHi === AdviceCap.pill);
|
|
35556
|
+
const inset = pills ? Math.min(4 * u, (hi - lo - rLo - rHi) / pills) : 0;
|
|
35557
|
+
const edgeLo = capLo === AdviceCap.pill ? lo + inset : lo;
|
|
35558
|
+
const edgeHi = capHi === AdviceCap.pill ? hi - inset : hi;
|
|
35553
35559
|
const p0 = o.perpStart;
|
|
35554
35560
|
const p1 = o.perpStart + t;
|
|
35555
35561
|
const v = o.vertical;
|