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