@cardenelabs/cdl 0.61.0 → 0.63.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/CHANGELOG.md +36 -1
- package/dist/index.cjs +156 -126
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +156 -126
- package/dist/index.js.map +1 -1
- package/dist/react.cjs +32 -5
- package/dist/react.cjs.map +1 -1
- package/dist/react.js +32 -5
- package/dist/react.js.map +1 -1
- package/package.json +1 -1
- package/src/lang.ts +18 -0
- package/src/presets.ts +13 -6
- package/src/render/interactive-panel.tsx +25 -4
package/dist/react.js
CHANGED
|
@@ -563,6 +563,18 @@ var en = {
|
|
|
563
563
|
"readout.kanban.inprogress": "In Progress",
|
|
564
564
|
/** `kanban-board` の列の見出し (値は `done` で読む) */
|
|
565
565
|
"readout.kanban.done": "Done",
|
|
566
|
+
/** `status-timeline` の区間の字 (値は `active` で読む) */
|
|
567
|
+
"readout.statusTimeline.active": "ACTIVE",
|
|
568
|
+
/** `status-timeline` の区間の字 (値は `idle` で読む) */
|
|
569
|
+
"readout.statusTimeline.idle": "IDLE",
|
|
570
|
+
/** `status-timeline` の区間の字 (値は `error` で読む) */
|
|
571
|
+
"readout.statusTimeline.error": "ERROR",
|
|
572
|
+
/** `user-presence` の状態の字 (値は `online` で読む) */
|
|
573
|
+
"readout.presence.online": "online",
|
|
574
|
+
/** `user-presence` の状態の字 (値は `away` で読む) */
|
|
575
|
+
"readout.presence.away": "away",
|
|
576
|
+
/** `user-presence` の状態の字 (値は `offline` で読む) */
|
|
577
|
+
"readout.presence.offline": "offline",
|
|
566
578
|
/** `traffic-light` の赤の灯の見出し (値は `red` で読む) */
|
|
567
579
|
"readout.trafficLight.red": "red",
|
|
568
580
|
/** `traffic-light` の黄の灯の見出し (値は `yellow` / `amber` で読む) */
|
|
@@ -671,6 +683,12 @@ var ja = {
|
|
|
671
683
|
"readout.kanban.todo": "\u672A\u7740\u624B",
|
|
672
684
|
"readout.kanban.inprogress": "\u9032\u884C\u4E2D",
|
|
673
685
|
"readout.kanban.done": "\u5B8C\u4E86",
|
|
686
|
+
"readout.statusTimeline.active": "\u7A3C\u50CD",
|
|
687
|
+
"readout.statusTimeline.idle": "\u5F85\u6A5F",
|
|
688
|
+
"readout.statusTimeline.error": "\u7570\u5E38",
|
|
689
|
+
"readout.presence.online": "\u30AA\u30F3\u30E9\u30A4\u30F3",
|
|
690
|
+
"readout.presence.away": "\u96E2\u5E2D",
|
|
691
|
+
"readout.presence.offline": "\u30AA\u30D5\u30E9\u30A4\u30F3",
|
|
674
692
|
"readout.trafficLight.red": "\u8D64",
|
|
675
693
|
"readout.trafficLight.yellow": "\u9EC4",
|
|
676
694
|
"readout.trafficLight.green": "\u7DD1"
|
|
@@ -26420,12 +26438,14 @@ function StatusTimelineReadout({
|
|
|
26420
26438
|
} catch {
|
|
26421
26439
|
}
|
|
26422
26440
|
}
|
|
26441
|
+
const \u5F15\u304F = use\u5B57\u5F15();
|
|
26423
26442
|
const colorLookup = new Map(colorMap.map((c) => [c.status.toLowerCase(), c.color]));
|
|
26424
26443
|
const shown = events.slice(0, max);
|
|
26425
26444
|
const stripHeight = 28;
|
|
26426
26445
|
const width = 320;
|
|
26427
26446
|
const cellW = shown.length > 0 ? (width - 20) / shown.length : 0;
|
|
26428
26447
|
const height = stripHeight + 40;
|
|
26448
|
+
const \u533A\u9593\u306E\u5B57 = (status) => status === "active" || status === "idle" || status === "error" ? \u5F15\u304F(`readout.statusTimeline.${status}`) : status.toUpperCase();
|
|
26429
26449
|
return /* @__PURE__ */ jsxs("div", { className: "cdl-ip-item cdl-ip-readout-status-timeline", "data-cdl-readout": id, children: [
|
|
26430
26450
|
/* @__PURE__ */ jsx("span", { className: "cdl-ip-label", children: label }),
|
|
26431
26451
|
/* @__PURE__ */ jsx(
|
|
@@ -26438,9 +26458,11 @@ function StatusTimelineReadout({
|
|
|
26438
26458
|
children: shown.map((ev, i) => {
|
|
26439
26459
|
const x = 10 + i * cellW;
|
|
26440
26460
|
const c = colorLookup.get(ev.status) ?? "#cbd5e1";
|
|
26441
|
-
|
|
26461
|
+
const \u5B572 = \u533A\u9593\u306E\u5B57(ev.status);
|
|
26462
|
+
const \u63CF\u304F\u5B57 = \u5E45\u3067\u5207\u308B(\u5B572, 10, cellW - 8);
|
|
26463
|
+
return /* @__PURE__ */ jsxs("g", { "data-cdl-status-event": i, "data-cdl-status": ev.status, children: [
|
|
26442
26464
|
/* @__PURE__ */ jsx("rect", { x, y: 10, width: cellW - 2, height: stripHeight, fill: c, rx: 2 }),
|
|
26443
|
-
/* @__PURE__ */
|
|
26465
|
+
/* @__PURE__ */ jsxs(
|
|
26444
26466
|
"text",
|
|
26445
26467
|
{
|
|
26446
26468
|
x: x + cellW / 2,
|
|
@@ -26450,7 +26472,10 @@ function StatusTimelineReadout({
|
|
|
26450
26472
|
fill: "#ffffff",
|
|
26451
26473
|
fontWeight: 600,
|
|
26452
26474
|
style: { userSelect: "none" },
|
|
26453
|
-
children:
|
|
26475
|
+
children: [
|
|
26476
|
+
\u63CF\u304F\u5B57 !== \u5B572 ? /* @__PURE__ */ jsx("title", { children: \u5B572 }) : null,
|
|
26477
|
+
\u63CF\u304F\u5B57
|
|
26478
|
+
]
|
|
26454
26479
|
}
|
|
26455
26480
|
),
|
|
26456
26481
|
/* @__PURE__ */ jsx(
|
|
@@ -26768,6 +26793,8 @@ function UserPresenceReadout({
|
|
|
26768
26793
|
const width = 260;
|
|
26769
26794
|
const height = shown.length * rowH + (overflow > 0 ? 20 : 0) + 8;
|
|
26770
26795
|
const statusColor = (s) => s === "online" ? "#22c55e" : s === "away" ? "#eab308" : "#94a3b8";
|
|
26796
|
+
const \u5F15\u304F = use\u5B57\u5F15();
|
|
26797
|
+
const \u72B6\u614B\u306E\u5B57 = (s) => s === "online" || s === "away" || s === "offline" ? \u5F15\u304F(`readout.presence.${s}`) : s;
|
|
26771
26798
|
return /* @__PURE__ */ jsxs("div", { className: "cdl-ip-item cdl-ip-readout-user-presence", "data-cdl-readout": id, children: [
|
|
26772
26799
|
/* @__PURE__ */ jsx("span", { className: "cdl-ip-label", children: label }),
|
|
26773
26800
|
/* @__PURE__ */ jsxs(
|
|
@@ -26780,7 +26807,7 @@ function UserPresenceReadout({
|
|
|
26780
26807
|
children: [
|
|
26781
26808
|
shown.map((u, i) => {
|
|
26782
26809
|
const y = 4 + i * rowH;
|
|
26783
|
-
return /* @__PURE__ */ jsxs("g", { "data-cdl-presence-user": i, children: [
|
|
26810
|
+
return /* @__PURE__ */ jsxs("g", { "data-cdl-presence-user": i, "data-cdl-presence-status": u.status, children: [
|
|
26784
26811
|
/* @__PURE__ */ jsx("circle", { cx: 12, cy: y + rowH / 2, r: 6, fill: statusColor(u.status) }),
|
|
26785
26812
|
/* @__PURE__ */ jsx(
|
|
26786
26813
|
"text",
|
|
@@ -26803,7 +26830,7 @@ function UserPresenceReadout({
|
|
|
26803
26830
|
textAnchor: "end",
|
|
26804
26831
|
fill: "#64748b",
|
|
26805
26832
|
style: { userSelect: "none" },
|
|
26806
|
-
children: u.status
|
|
26833
|
+
children: \u72B6\u614B\u306E\u5B57(u.status)
|
|
26807
26834
|
}
|
|
26808
26835
|
)
|
|
26809
26836
|
] }, i);
|