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