@cardenelabs/cdl 0.108.0 → 0.109.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 +26 -1
- package/dist/index.cjs +10 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +10 -3
- package/dist/index.js.map +1 -1
- package/dist/react.cjs +10 -3
- package/dist/react.cjs.map +1 -1
- package/dist/react.js +10 -3
- package/dist/react.js.map +1 -1
- package/package.json +1 -1
- package/src/render/header.tsx +10 -1
- package/src/render.tsx +17 -0
package/dist/react.js
CHANGED
|
@@ -10913,12 +10913,13 @@ function CdlHeader({
|
|
|
10913
10913
|
stateValues,
|
|
10914
10914
|
states,
|
|
10915
10915
|
onJumpPhase,
|
|
10916
|
-
headingLevel = 3
|
|
10916
|
+
headingLevel = 3,
|
|
10917
|
+
showTopic = true
|
|
10917
10918
|
}) {
|
|
10918
10919
|
const HeadingTag = `h${headingLevel}`;
|
|
10919
10920
|
return /* @__PURE__ */ jsxs("div", { className: "border-b border-[var(--cdl-divider,#d4d4d8)]/35 px-7 py-6", children: [
|
|
10920
10921
|
/* @__PURE__ */ jsxs("div", { className: "mb-5 flex items-center gap-3", children: [
|
|
10921
|
-
/* @__PURE__ */ jsx("div", { className: "text-[10px] font-bold uppercase tracking-[0.2em]", style: { color: "var(--cdl-text-accent, #2d6a8f)" }, children: topic }),
|
|
10922
|
+
showTopic && /* @__PURE__ */ jsx("div", { className: "text-[10px] font-bold uppercase tracking-[0.2em]", style: { color: "var(--cdl-text-accent, #2d6a8f)" }, children: topic }),
|
|
10922
10923
|
/* @__PURE__ */ jsxs("div", { className: "ml-auto flex items-center gap-1.5", children: [
|
|
10923
10924
|
phases.map((p, idx) => {
|
|
10924
10925
|
const active = idx === phaseIdx;
|
|
@@ -29631,6 +29632,11 @@ function CdlDiagramView({ diagram, laid: laidProp, hideHeader = false, hideMiniP
|
|
|
29631
29632
|
return mergeStateValues(baseStateValues, interactive.stateOverrides);
|
|
29632
29633
|
}, [isInteractive, baseStateValues, interactive.stateOverrides]);
|
|
29633
29634
|
const \u5024\u306E\u540D\u524D = useMemo(() => \u5024\u306E\u540D\u524D\u306E\u8868\u3092\u4F5C\u308B(diagram.inputs), [diagram.inputs]);
|
|
29635
|
+
const \u56F3\u304C\u8A71\u984C\u3092\u63CF\u304F = useMemo(() => {
|
|
29636
|
+
const \u8A71\u984C = laid.topic.trim();
|
|
29637
|
+
if (\u8A71\u984C === "") return false;
|
|
29638
|
+
return laid.nodes.some((n) => drawsFigureTitle(n.kind) && (n.title ?? "").trim() === \u8A71\u984C);
|
|
29639
|
+
}, [laid.nodes, laid.topic]);
|
|
29634
29640
|
return /* @__PURE__ */ jsxs(
|
|
29635
29641
|
"div",
|
|
29636
29642
|
{
|
|
@@ -29655,7 +29661,8 @@ function CdlDiagramView({ diagram, laid: laidProp, hideHeader = false, hideMiniP
|
|
|
29655
29661
|
timeline.goto(idx);
|
|
29656
29662
|
timeline.play();
|
|
29657
29663
|
},
|
|
29658
|
-
headingLevel
|
|
29664
|
+
headingLevel,
|
|
29665
|
+
showTopic: !\u56F3\u304C\u8A71\u984C\u3092\u63CF\u304F
|
|
29659
29666
|
}
|
|
29660
29667
|
),
|
|
29661
29668
|
isInteractive && interactive.panel,
|