@loadmap/react 0.31.0 → 0.32.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.
|
@@ -211,7 +211,7 @@ function stepDetail(a, b, components) {
|
|
|
211
211
|
}).filter(Boolean).join(" · ");
|
|
212
212
|
}
|
|
213
213
|
// src/Diagram.tsx
|
|
214
|
-
const Detail = lazy(() => import("./later-
|
|
214
|
+
const Detail = lazy(() => import("./later-Dxo79dBg.js").then((m) => ({ default: m.Detail })));
|
|
215
215
|
const STATE_STROKE = {
|
|
216
216
|
off: "var(--lm-line)",
|
|
217
217
|
ok: "var(--lm-ok)",
|
|
@@ -864,6 +864,8 @@ function Node({ n, state, title, sub, lm, focused, selected, handlers }) {
|
|
|
864
864
|
const st = n.kind === "pool" ? lm.ev.stages[n.stages[0] ?? ""] : void 0;
|
|
865
865
|
const running = st?.kind === "workers" ? st.running : n.members.length;
|
|
866
866
|
const idle = (i) => i >= running && i < (st?.kind === "workers" ? st.pods : n.members.length);
|
|
867
|
+
const a = st?.kind === "workers" ? st.assignment : void 0;
|
|
868
|
+
const unassigned = (i) => a != null && i < a.weights.length && a.weights[i] === 0;
|
|
867
869
|
const e = 6;
|
|
868
870
|
const grow = n.fade == null ? void 0 : `translate(${n.x + n.w / 2} ${n.y + n.h / 2}) scale(${.92 + .08 * n.fade}) translate(${-n.x - n.w / 2} ${-n.y - n.h / 2})`;
|
|
869
871
|
return /* @__PURE__ */ jsxs("g", {
|
|
@@ -951,7 +953,9 @@ function Node({ n, state, title, sub, lm, focused, selected, handlers }) {
|
|
|
951
953
|
rx: "2",
|
|
952
954
|
fill: "var(--lm-surface)",
|
|
953
955
|
stroke: "currentColor",
|
|
954
|
-
strokeOpacity: ".45"
|
|
956
|
+
strokeOpacity: unassigned(s.index) ? ".3" : ".45",
|
|
957
|
+
strokeDasharray: unassigned(s.index) ? "2 2" : void 0,
|
|
958
|
+
"data-unassigned": unassigned(s.index) || void 0
|
|
955
959
|
}), /* @__PURE__ */ jsx("rect", {
|
|
956
960
|
"data-slot": s.index,
|
|
957
961
|
"data-stage": n.stages[0],
|
|
@@ -1889,18 +1893,25 @@ function Limits({ lm, title = "Where it runs out, in order" }) {
|
|
|
1889
1893
|
className: "lm-lim",
|
|
1890
1894
|
"data-component": c.id,
|
|
1891
1895
|
children: [
|
|
1892
|
-
/* @__PURE__ */ jsxs("div", { children: [
|
|
1893
|
-
|
|
1894
|
-
|
|
1895
|
-
|
|
1896
|
-
|
|
1897
|
-
|
|
1896
|
+
/* @__PURE__ */ jsxs("div", { children: [
|
|
1897
|
+
/* @__PURE__ */ jsxs("b", { children: [
|
|
1898
|
+
c.name,
|
|
1899
|
+
c === ev.firstLimit && /* @__PURE__ */ jsx("span", {
|
|
1900
|
+
className: "lm-tag",
|
|
1901
|
+
"data-kind": "first",
|
|
1902
|
+
children: "limit"
|
|
1903
|
+
}),
|
|
1904
|
+
/* @__PURE__ */ jsx(CapTag, { c: c.capacity })
|
|
1905
|
+
] }),
|
|
1906
|
+
/* @__PURE__ */ jsx("span", {
|
|
1907
|
+
className: "lm-sub",
|
|
1908
|
+
children: c.missing != null ? `No published benchmark ${c.missing}.` : c.describe ?? (c.capacity ? `${fmt(c.capacity.value)} ${c.capacity.unit}` : "switched off")
|
|
1898
1909
|
}),
|
|
1899
|
-
/* @__PURE__ */ jsx(
|
|
1900
|
-
|
|
1901
|
-
|
|
1902
|
-
|
|
1903
|
-
|
|
1910
|
+
c.spread && c.util != null && /* @__PURE__ */ jsx("span", {
|
|
1911
|
+
className: "lm-sub lm-spread",
|
|
1912
|
+
children: c.spread.text
|
|
1913
|
+
})
|
|
1914
|
+
] }),
|
|
1904
1915
|
/* @__PURE__ */ jsxs("div", {
|
|
1905
1916
|
className: "lm-track",
|
|
1906
1917
|
role: "img",
|
|
@@ -2239,7 +2250,7 @@ function Assumptions({ lm, extra = [] }) {
|
|
|
2239
2250
|
className: "lm-card",
|
|
2240
2251
|
children: [/* @__PURE__ */ jsx("h3", { children: "What this assumes" }), /* @__PURE__ */ jsxs("ul", {
|
|
2241
2252
|
className: "lm-facts",
|
|
2242
|
-
children: [extra.map((x, i) => /* @__PURE__ */ jsx("li", { children: x }, i)), lm.ev.assumptions.map((a) => /* @__PURE__ */ jsx("li", { children: describe(a) }, a.kind === "capacity" ? `c:${a.component}` : `${a.kind
|
|
2253
|
+
children: [extra.map((x, i) => /* @__PURE__ */ jsx("li", { children: x }, i)), lm.ev.assumptions.map((a) => /* @__PURE__ */ jsx("li", { children: describe(a) }, a.kind === "capacity" ? `c:${a.component}` : `${a.kind}:${a.name}`))]
|
|
2243
2254
|
})]
|
|
2244
2255
|
});
|
|
2245
2256
|
}
|
|
@@ -2281,6 +2292,11 @@ function describe(a) {
|
|
|
2281
2292
|
unread(c.unread)
|
|
2282
2293
|
] });
|
|
2283
2294
|
}
|
|
2295
|
+
if (a.kind === "connection") return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
2296
|
+
/* @__PURE__ */ jsxs("b", { children: [a.name, ":"] }),
|
|
2297
|
+
" ",
|
|
2298
|
+
a.text
|
|
2299
|
+
] });
|
|
2284
2300
|
if (a.kind === "measurement") {
|
|
2285
2301
|
const { label, unit, value, missing, source } = a.measurement;
|
|
2286
2302
|
const name = label ?? a.name;
|
|
@@ -3753,8 +3769,8 @@ function canvasMeasure(fontFamily) {
|
|
|
3753
3769
|
};
|
|
3754
3770
|
}
|
|
3755
3771
|
// src/Loadmap.tsx
|
|
3756
|
-
const Dock = lazy(() => import("./later-
|
|
3757
|
-
const VerdictLine = lazy(() => import("./later-
|
|
3772
|
+
const Dock = lazy(() => import("./later-Dxo79dBg.js").then((m) => ({ default: m.Dock })));
|
|
3773
|
+
const VerdictLine = lazy(() => import("./later-Dxo79dBg.js").then((m) => ({ default: m.VerdictLine })));
|
|
3758
3774
|
/** What the page's own switch says, on `<html>`: `data-theme`, or a `dark` or `light` class; null when it says nothing. */
|
|
3759
3775
|
function pageTheme() {
|
|
3760
3776
|
if (typeof document === "undefined") return null;
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { C as useComparison, D as workerElk, O as Diagram, S as scenarioColor, _ as Verdict, a as usePageTheme, b as HeadroomChart, c as injectStyles, f as Controls, g as Meters, h as LoadRange, i as handleOf, l as Story, m as LoadBar, n as Loadmap, o as useLoadmap, p as Limits, r as LoadmapRoot, s as LOADMAP_CSS, t as LOADMAP_PANELS, u as Assumptions, x as Scenarios, y as Compare } from "./Loadmap-
|
|
1
|
+
import { C as useComparison, D as workerElk, O as Diagram, S as scenarioColor, _ as Verdict, a as usePageTheme, b as HeadroomChart, c as injectStyles, f as Controls, g as Meters, h as LoadRange, i as handleOf, l as Story, m as LoadBar, n as Loadmap, o as useLoadmap, p as Limits, r as LoadmapRoot, s as LOADMAP_CSS, t as LOADMAP_PANELS, u as Assumptions, x as Scenarios, y as Compare } from "./Loadmap-CoaUFl5d.js";
|
|
2
2
|
import { fitLinear } from "@loadmap/core/calibrate";
|
|
3
3
|
import { compact, fmt, multiple, pct, secs } from "@loadmap/core/format";
|
|
4
4
|
import { MEASURES, fromSnapshot, originText, parseSnapshot, summarize } from "@loadmap/core/measure";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A as rankLabels, C as useComparison, E as whenRange, S as scenarioColor, T as useSize, d as CapTag, f as Controls, g as Meters, k as boxComponent, v as plusMinus, w as useHeadroom, y as Compare } from "./Loadmap-
|
|
1
|
+
import { A as rankLabels, C as useComparison, E as whenRange, S as scenarioColor, T as useSize, d as CapTag, f as Controls, g as Meters, k as boxComponent, v as plusMinus, w as useHeadroom, y as Compare } from "./Loadmap-CoaUFl5d.js";
|
|
2
2
|
import { reach } from "@loadmap/core";
|
|
3
3
|
import { compact, fmt, multiple, multiples, pct } from "@loadmap/core/format";
|
|
4
4
|
import { useEffect, useLayoutEffect, useRef, useState } from "react";
|
package/dist/source.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as usePageTheme, c as injectStyles, n as Loadmap } from "./Loadmap-
|
|
1
|
+
import { a as usePageTheme, c as injectStyles, n as Loadmap } from "./Loadmap-CoaUFl5d.js";
|
|
2
2
|
import { useCallback, useEffect, useMemo, useRef, useState } from "react";
|
|
3
3
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
4
4
|
import { compile, formatDiagnostic, loadCatalogFor, loadedCatalog, needsCatalog, sharedValues } from "@loadmap/dsl";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@loadmap/react",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.32.0",
|
|
4
4
|
"description": "Interactive capacity models for React: an architecture diagram with moving dots, the limits ranked, the verdict, scenarios and headroom.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"loadmap",
|
|
@@ -39,10 +39,10 @@
|
|
|
39
39
|
"dist"
|
|
40
40
|
],
|
|
41
41
|
"dependencies": {
|
|
42
|
-
"@loadmap/core": "0.
|
|
43
|
-
"@loadmap/dsl": "0.
|
|
44
|
-
"@loadmap/sim": "0.
|
|
45
|
-
"@loadmap/layout": "0.
|
|
42
|
+
"@loadmap/core": "0.32.0",
|
|
43
|
+
"@loadmap/dsl": "0.32.0",
|
|
44
|
+
"@loadmap/sim": "0.32.0",
|
|
45
|
+
"@loadmap/layout": "0.32.0",
|
|
46
46
|
"elkjs": "^0.12.1"
|
|
47
47
|
},
|
|
48
48
|
"peerDependencies": {
|