@cardenelabs/cdl 0.62.0 → 0.64.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 +39 -1
- package/dist/index.cjs +17 -17
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +17 -17
- package/dist/index.js.map +1 -1
- package/dist/react.cjs +8 -11
- package/dist/react.cjs.map +1 -1
- package/dist/react.d.cts +1 -1
- package/dist/react.d.ts +1 -1
- package/dist/react.js +8 -11
- package/dist/react.js.map +1 -1
- package/dist/{render-Dk8_6ua6.d.cts → render-DfXCs3Eh.d.cts} +4 -1
- package/dist/{render-Dk8_6ua6.d.ts → render-DfXCs3Eh.d.ts} +4 -1
- package/package.json +12 -9
- package/src/presets.ts +13 -6
- package/src/render/interactive-panel.tsx +14 -10
- package/src/types.ts +4 -1
package/dist/index.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { C as CdlDiagram, S as Signal, a as CdlInput, b as CdlLane, c as CdlNode, T as Tone, d as Side, E as EdgeStyle, e as EdgeRole, f as EdgeHead, g as EdgeHeadFill, h as CdlState, i as CdlInputOption, j as CdlEventTarget, k as CdlLang, l as Computed, m as CdlDerivedValue, n as CdlScrollTrigger, L as LaidDiagram, o as CdlDiagramViewProps, p as LaidEdge, q as LaidNode, r as CdlEdge, B as BBox, R as RowMark, N as NodeKind, J as JourneyEmotion, Q as QuadrantKey } from './render-
|
|
2
|
-
export { s as CdlDiagramView, t as CdlEventBinding, u as CdlEventKind, v as CdlFormula, w as CdlPhase, x as ChartPieForm, y as ChartSlopeForm, z as EDGE_HEADS, A as EDGE_HEAD_DEFAULT, D as EDGE_HEAD_FILLS, F as EDGE_HEAD_FILL_DEFAULT, G as EDGE_REVEALS, H as EDGE_REVEAL_DEFAULT, I as EDGE_STYLES, K as EdgeReveal, M as InteractiveHandlerMap, O as InteractiveSignalsAccessor, P as LaidLane, U as NODE_KINDS, V as RELATION_FOCUSES, W as RELATION_FOCUS_DEFAULT, X as RelationFocus, Y as ScrollProgressHandle, Z as TONES, _ as computeEventBindingKey, $ as computeFormulaKey, a0 as computeInputSignalKey, a1 as computeScrollTriggerKey, a2 as computed, a3 as createInteractiveSignalsAccessor, a4 as createScrollProgressHandle, a5 as createScrollProgressSignals, a6 as hasInteractivePrimitives, a7 as resolveLang, a8 as sequenceBoardMetrics, a9 as sequenceStepId, aa as signal } from './render-
|
|
1
|
+
import { C as CdlDiagram, S as Signal, a as CdlInput, b as CdlLane, c as CdlNode, T as Tone, d as Side, E as EdgeStyle, e as EdgeRole, f as EdgeHead, g as EdgeHeadFill, h as CdlState, i as CdlInputOption, j as CdlEventTarget, k as CdlLang, l as Computed, m as CdlDerivedValue, n as CdlScrollTrigger, L as LaidDiagram, o as CdlDiagramViewProps, p as LaidEdge, q as LaidNode, r as CdlEdge, B as BBox, R as RowMark, N as NodeKind, J as JourneyEmotion, Q as QuadrantKey } from './render-DfXCs3Eh.cjs';
|
|
2
|
+
export { s as CdlDiagramView, t as CdlEventBinding, u as CdlEventKind, v as CdlFormula, w as CdlPhase, x as ChartPieForm, y as ChartSlopeForm, z as EDGE_HEADS, A as EDGE_HEAD_DEFAULT, D as EDGE_HEAD_FILLS, F as EDGE_HEAD_FILL_DEFAULT, G as EDGE_REVEALS, H as EDGE_REVEAL_DEFAULT, I as EDGE_STYLES, K as EdgeReveal, M as InteractiveHandlerMap, O as InteractiveSignalsAccessor, P as LaidLane, U as NODE_KINDS, V as RELATION_FOCUSES, W as RELATION_FOCUS_DEFAULT, X as RelationFocus, Y as ScrollProgressHandle, Z as TONES, _ as computeEventBindingKey, $ as computeFormulaKey, a0 as computeInputSignalKey, a1 as computeScrollTriggerKey, a2 as computed, a3 as createInteractiveSignalsAccessor, a4 as createScrollProgressHandle, a5 as createScrollProgressSignals, a6 as hasInteractivePrimitives, a7 as resolveLang, a8 as sequenceBoardMetrics, a9 as sequenceStepId, aa as signal } from './render-DfXCs3Eh.cjs';
|
|
3
3
|
import { JSX } from 'react';
|
|
4
4
|
|
|
5
5
|
declare function effect(fn: () => void | (() => void)): () => void;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { C as CdlDiagram, S as Signal, a as CdlInput, b as CdlLane, c as CdlNode, T as Tone, d as Side, E as EdgeStyle, e as EdgeRole, f as EdgeHead, g as EdgeHeadFill, h as CdlState, i as CdlInputOption, j as CdlEventTarget, k as CdlLang, l as Computed, m as CdlDerivedValue, n as CdlScrollTrigger, L as LaidDiagram, o as CdlDiagramViewProps, p as LaidEdge, q as LaidNode, r as CdlEdge, B as BBox, R as RowMark, N as NodeKind, J as JourneyEmotion, Q as QuadrantKey } from './render-
|
|
2
|
-
export { s as CdlDiagramView, t as CdlEventBinding, u as CdlEventKind, v as CdlFormula, w as CdlPhase, x as ChartPieForm, y as ChartSlopeForm, z as EDGE_HEADS, A as EDGE_HEAD_DEFAULT, D as EDGE_HEAD_FILLS, F as EDGE_HEAD_FILL_DEFAULT, G as EDGE_REVEALS, H as EDGE_REVEAL_DEFAULT, I as EDGE_STYLES, K as EdgeReveal, M as InteractiveHandlerMap, O as InteractiveSignalsAccessor, P as LaidLane, U as NODE_KINDS, V as RELATION_FOCUSES, W as RELATION_FOCUS_DEFAULT, X as RelationFocus, Y as ScrollProgressHandle, Z as TONES, _ as computeEventBindingKey, $ as computeFormulaKey, a0 as computeInputSignalKey, a1 as computeScrollTriggerKey, a2 as computed, a3 as createInteractiveSignalsAccessor, a4 as createScrollProgressHandle, a5 as createScrollProgressSignals, a6 as hasInteractivePrimitives, a7 as resolveLang, a8 as sequenceBoardMetrics, a9 as sequenceStepId, aa as signal } from './render-
|
|
1
|
+
import { C as CdlDiagram, S as Signal, a as CdlInput, b as CdlLane, c as CdlNode, T as Tone, d as Side, E as EdgeStyle, e as EdgeRole, f as EdgeHead, g as EdgeHeadFill, h as CdlState, i as CdlInputOption, j as CdlEventTarget, k as CdlLang, l as Computed, m as CdlDerivedValue, n as CdlScrollTrigger, L as LaidDiagram, o as CdlDiagramViewProps, p as LaidEdge, q as LaidNode, r as CdlEdge, B as BBox, R as RowMark, N as NodeKind, J as JourneyEmotion, Q as QuadrantKey } from './render-DfXCs3Eh.js';
|
|
2
|
+
export { s as CdlDiagramView, t as CdlEventBinding, u as CdlEventKind, v as CdlFormula, w as CdlPhase, x as ChartPieForm, y as ChartSlopeForm, z as EDGE_HEADS, A as EDGE_HEAD_DEFAULT, D as EDGE_HEAD_FILLS, F as EDGE_HEAD_FILL_DEFAULT, G as EDGE_REVEALS, H as EDGE_REVEAL_DEFAULT, I as EDGE_STYLES, K as EdgeReveal, M as InteractiveHandlerMap, O as InteractiveSignalsAccessor, P as LaidLane, U as NODE_KINDS, V as RELATION_FOCUSES, W as RELATION_FOCUS_DEFAULT, X as RelationFocus, Y as ScrollProgressHandle, Z as TONES, _ as computeEventBindingKey, $ as computeFormulaKey, a0 as computeInputSignalKey, a1 as computeScrollTriggerKey, a2 as computed, a3 as createInteractiveSignalsAccessor, a4 as createScrollProgressHandle, a5 as createScrollProgressSignals, a6 as hasInteractivePrimitives, a7 as resolveLang, a8 as sequenceBoardMetrics, a9 as sequenceStepId, aa as signal } from './render-DfXCs3Eh.js';
|
|
3
3
|
import { JSX } from 'react';
|
|
4
4
|
|
|
5
5
|
declare function effect(fn: () => void | (() => void)): () => void;
|
package/dist/index.js
CHANGED
|
@@ -2695,16 +2695,12 @@ function ReadoutWidget({
|
|
|
2695
2695
|
colors: readout.colors ?? ["#e0e6ef", "#2d6a8f"]
|
|
2696
2696
|
}
|
|
2697
2697
|
);
|
|
2698
|
-
case "badge":
|
|
2699
|
-
|
|
2700
|
-
|
|
2701
|
-
|
|
2702
|
-
|
|
2703
|
-
|
|
2704
|
-
value: typeof rawValue === "string" ? rawValue : String(rawValue ?? ""),
|
|
2705
|
-
map: readout.map
|
|
2706
|
-
}
|
|
2707
|
-
);
|
|
2698
|
+
case "badge": {
|
|
2699
|
+
const value = typeof rawValue === "string" ? rawValue : String(rawValue ?? "");
|
|
2700
|
+
const colorRaw = readout.colorSource === void 0 ? void 0 : stateOverrides[readout.colorSource];
|
|
2701
|
+
const colorKey = readout.colorSource === void 0 ? value : colorRaw === void 0 ? void 0 : String(colorRaw);
|
|
2702
|
+
return /* @__PURE__ */ jsx(BadgeReadout, { id: readout.id, label, value, colorKey, map: readout.map });
|
|
2703
|
+
}
|
|
2708
2704
|
case "status-dot":
|
|
2709
2705
|
return /* @__PURE__ */ jsx(
|
|
2710
2706
|
StatusDotReadout,
|
|
@@ -4426,9 +4422,10 @@ function BadgeReadout({
|
|
|
4426
4422
|
id,
|
|
4427
4423
|
label,
|
|
4428
4424
|
value,
|
|
4425
|
+
colorKey,
|
|
4429
4426
|
map
|
|
4430
4427
|
}) {
|
|
4431
|
-
const entry = map?.find((m) => m.value ===
|
|
4428
|
+
const entry = colorKey === void 0 ? void 0 : map?.find((m) => m.value === colorKey);
|
|
4432
4429
|
const color = entry?.color;
|
|
4433
4430
|
return /* @__PURE__ */ jsxs("div", { className: "cdl-ip-item cdl-ip-readout-badge", "data-cdl-readout": id, children: [
|
|
4434
4431
|
/* @__PURE__ */ jsx("span", { className: "cdl-ip-label", children: label }),
|
|
@@ -32927,7 +32924,8 @@ var FSM_ACTION_MARK = {
|
|
|
32927
32924
|
function stateMachine(preset) {
|
|
32928
32925
|
const stateW = resolveStateW(preset.stateWidth, "stateMachine");
|
|
32929
32926
|
const tone = preset.defaultTone ?? "accent";
|
|
32930
|
-
const
|
|
32927
|
+
const diagramType = "state";
|
|
32928
|
+
const b = diagram(preset.id, { topic: preset.topic, type: diagramType });
|
|
32931
32929
|
const phaseActivate = [];
|
|
32932
32930
|
const stateOrder = /* @__PURE__ */ new Map();
|
|
32933
32931
|
const \u72B6\u614B = [];
|
|
@@ -33028,7 +33026,7 @@ function stateMachine(preset) {
|
|
|
33028
33026
|
b.phase(
|
|
33029
33027
|
"fsm",
|
|
33030
33028
|
{ duration: 2400, title: preset.topic, body: "\u3059\u3079\u3066\u306E\u72B6\u614B\u3068\u9077\u79FB\u3092\u4E26\u3079\u305F\u59FF\u3002" },
|
|
33031
|
-
(p) => p.activate(...phaseActivate).badge(
|
|
33029
|
+
(p) => p.activate(...phaseActivate).badge(diagramType)
|
|
33032
33030
|
);
|
|
33033
33031
|
return b.build();
|
|
33034
33032
|
}
|
|
@@ -33287,7 +33285,8 @@ function userJourney(preset) {
|
|
|
33287
33285
|
function mindMap(preset) {
|
|
33288
33286
|
const canvasW = preset.branchWidth ? preset.branchWidth * 2 : 720;
|
|
33289
33287
|
const canvasH = 480;
|
|
33290
|
-
const
|
|
33288
|
+
const diagramType = "mind";
|
|
33289
|
+
const b = diagram(preset.id, { topic: preset.topic, type: diagramType });
|
|
33291
33290
|
const branches = [];
|
|
33292
33291
|
const api = {
|
|
33293
33292
|
branch(br) {
|
|
@@ -33321,7 +33320,7 @@ function mindMap(preset) {
|
|
|
33321
33320
|
b.phase(
|
|
33322
33321
|
"mindmap",
|
|
33323
33322
|
{ duration: 2400, title: preset.topic, body: "\u4E2D\u5FC3\u306E\u4E3B\u984C\u304B\u3089\u3001\u3059\u3079\u3066\u306E\u679D\u3092\u653E\u5C04\u72B6\u306B\u5E83\u3052\u305F\u59FF\u3002" },
|
|
33324
|
-
(p) => p.activate(nodeId).badge(
|
|
33323
|
+
(p) => p.activate(nodeId).badge(diagramType)
|
|
33325
33324
|
);
|
|
33326
33325
|
return b.build();
|
|
33327
33326
|
}
|
|
@@ -33654,7 +33653,8 @@ function stateMachine2(preset) {
|
|
|
33654
33653
|
const stateW = resolveStateW(preset.stateWidth, "stateMachine2");
|
|
33655
33654
|
const laneW = boxLaneW(stateW);
|
|
33656
33655
|
const tone = preset.defaultTone ?? "accent";
|
|
33657
|
-
const
|
|
33656
|
+
const diagramType = "state";
|
|
33657
|
+
const b = diagram(preset.id, { topic: preset.topic, type: diagramType });
|
|
33658
33658
|
const stateOrder = /* @__PURE__ */ new Map();
|
|
33659
33659
|
const phaseActivate = [];
|
|
33660
33660
|
let transIdx = 0;
|
|
@@ -33710,7 +33710,7 @@ function stateMachine2(preset) {
|
|
|
33710
33710
|
title: preset.topic,
|
|
33711
33711
|
body: "\u5165\u308C\u5B50\u306E\u72B6\u614B\u3068\u3001\u5165\u308B\u6642\u30FB\u51FA\u308B\u6642\u306E\u51E6\u7406\u3092\u542B\u3081\u305F\u3001\u3059\u3079\u3066\u306E\u72B6\u614B\u3068\u9077\u79FB\u3002"
|
|
33712
33712
|
},
|
|
33713
|
-
(p) => p.activate(...phaseActivate).badge(
|
|
33713
|
+
(p) => p.activate(...phaseActivate).badge(diagramType)
|
|
33714
33714
|
);
|
|
33715
33715
|
const d = b.build();
|
|
33716
33716
|
return {
|