@cardenelabs/cdl 0.12.1 → 0.13.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 +17 -1
- package/dist/index.cjs +13 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +4 -2
- package/dist/index.d.ts +4 -2
- package/dist/index.js +13 -3
- package/dist/index.js.map +1 -1
- package/dist/react.cjs +12 -3
- 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 +12 -3
- package/dist/react.js.map +1 -1
- package/dist/{render-C7FKvMqq.d.cts → render-B5JHcUrb.d.cts} +8 -0
- package/dist/{render-C7FKvMqq.d.ts → render-B5JHcUrb.d.ts} +8 -0
- package/package.json +1 -1
- package/src/kinds/mind-map.tsx +4 -2
- package/src/presets.ts +3 -0
- package/src/render/payload-binding.ts +14 -4
- package/src/render/template-fields.ts +1 -0
- package/src/types.ts +8 -0
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 CdlState, f as CdlEventTarget, g as Computed, h as CdlDerivedValue, i as CdlScrollTrigger, L as LaidDiagram, j as CdlDiagramViewProps, k as LaidEdge, l as LaidNode, m as CdlEdge, B as BBox, N as NodeKind, J as JourneyEmotion, Q as QuadrantKey } from './render-
|
|
2
|
-
export { n as CdlDiagramView, o as CdlEventBinding, p as CdlEventKind, q as CdlFormula, r as CdlPhase, I as InteractiveHandlerMap, s as InteractiveSignalsAccessor, t as LaidLane, u as NODE_KINDS, v as ScrollProgressHandle, w as TONES, x as computeEventBindingKey, y as computeFormulaKey, z as computeInputSignalKey, A as computeScrollTriggerKey, D as computed, F as createInteractiveSignalsAccessor, G as createScrollProgressHandle, H as createScrollProgressSignals, K as hasInteractivePrimitives, M 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 CdlState, f as CdlEventTarget, g as Computed, h as CdlDerivedValue, i as CdlScrollTrigger, L as LaidDiagram, j as CdlDiagramViewProps, k as LaidEdge, l as LaidNode, m as CdlEdge, B as BBox, N as NodeKind, J as JourneyEmotion, Q as QuadrantKey } from './render-B5JHcUrb.cjs';
|
|
2
|
+
export { n as CdlDiagramView, o as CdlEventBinding, p as CdlEventKind, q as CdlFormula, r as CdlPhase, I as InteractiveHandlerMap, s as InteractiveSignalsAccessor, t as LaidLane, u as NODE_KINDS, v as ScrollProgressHandle, w as TONES, x as computeEventBindingKey, y as computeFormulaKey, z as computeInputSignalKey, A as computeScrollTriggerKey, D as computed, F as createInteractiveSignalsAccessor, G as createScrollProgressHandle, H as createScrollProgressSignals, K as hasInteractivePrimitives, M as signal } from './render-B5JHcUrb.cjs';
|
|
3
3
|
import { JSX } from 'react';
|
|
4
4
|
|
|
5
5
|
declare function effect(fn: () => void | (() => void)): () => void;
|
|
@@ -3137,6 +3137,8 @@ type MindMapPreset = {
|
|
|
3137
3137
|
/** 中心 topic ID + label */
|
|
3138
3138
|
rootId: string;
|
|
3139
3139
|
rootTitle: string;
|
|
3140
|
+
/** 中心の箱の 2 行目に出す補足 (#530)。 枝の `subtitle` と同じ扱い */
|
|
3141
|
+
rootSubtitle?: string;
|
|
3140
3142
|
branchWidth?: number;
|
|
3141
3143
|
defaultTone?: Tone;
|
|
3142
3144
|
};
|
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 CdlState, f as CdlEventTarget, g as Computed, h as CdlDerivedValue, i as CdlScrollTrigger, L as LaidDiagram, j as CdlDiagramViewProps, k as LaidEdge, l as LaidNode, m as CdlEdge, B as BBox, N as NodeKind, J as JourneyEmotion, Q as QuadrantKey } from './render-
|
|
2
|
-
export { n as CdlDiagramView, o as CdlEventBinding, p as CdlEventKind, q as CdlFormula, r as CdlPhase, I as InteractiveHandlerMap, s as InteractiveSignalsAccessor, t as LaidLane, u as NODE_KINDS, v as ScrollProgressHandle, w as TONES, x as computeEventBindingKey, y as computeFormulaKey, z as computeInputSignalKey, A as computeScrollTriggerKey, D as computed, F as createInteractiveSignalsAccessor, G as createScrollProgressHandle, H as createScrollProgressSignals, K as hasInteractivePrimitives, M 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 CdlState, f as CdlEventTarget, g as Computed, h as CdlDerivedValue, i as CdlScrollTrigger, L as LaidDiagram, j as CdlDiagramViewProps, k as LaidEdge, l as LaidNode, m as CdlEdge, B as BBox, N as NodeKind, J as JourneyEmotion, Q as QuadrantKey } from './render-B5JHcUrb.js';
|
|
2
|
+
export { n as CdlDiagramView, o as CdlEventBinding, p as CdlEventKind, q as CdlFormula, r as CdlPhase, I as InteractiveHandlerMap, s as InteractiveSignalsAccessor, t as LaidLane, u as NODE_KINDS, v as ScrollProgressHandle, w as TONES, x as computeEventBindingKey, y as computeFormulaKey, z as computeInputSignalKey, A as computeScrollTriggerKey, D as computed, F as createInteractiveSignalsAccessor, G as createScrollProgressHandle, H as createScrollProgressSignals, K as hasInteractivePrimitives, M as signal } from './render-B5JHcUrb.js';
|
|
3
3
|
import { JSX } from 'react';
|
|
4
4
|
|
|
5
5
|
declare function effect(fn: () => void | (() => void)): () => void;
|
|
@@ -3137,6 +3137,8 @@ type MindMapPreset = {
|
|
|
3137
3137
|
/** 中心 topic ID + label */
|
|
3138
3138
|
rootId: string;
|
|
3139
3139
|
rootTitle: string;
|
|
3140
|
+
/** 中心の箱の 2 行目に出す補足 (#530)。 枝の `subtitle` と同じ扱い */
|
|
3141
|
+
rootSubtitle?: string;
|
|
3140
3142
|
branchWidth?: number;
|
|
3141
3143
|
defaultTone?: Tone;
|
|
3142
3144
|
};
|
package/dist/index.js
CHANGED
|
@@ -15835,6 +15835,7 @@ function payloadTexts(node) {
|
|
|
15835
15835
|
}
|
|
15836
15836
|
if (node.mindData) {
|
|
15837
15837
|
\u8DB3\u3059(node.mindData.rootTitle);
|
|
15838
|
+
\u8DB3\u3059(node.mindData.rootSubtitle);
|
|
15838
15839
|
for (const b of node.mindData.branches) {
|
|
15839
15840
|
\u8DB3\u3059(b.title);
|
|
15840
15841
|
\u8DB3\u3059(b.subtitle);
|
|
@@ -21273,9 +21274,10 @@ function resolveTreeData(nodes, values) {
|
|
|
21273
21274
|
});
|
|
21274
21275
|
}
|
|
21275
21276
|
function resolveMindData(data, values) {
|
|
21276
|
-
const \u8AAD\u3080 = data.rootTitle.includes("{") || data.branches.some((b) => b.title.includes("{") || (b.subtitle?.includes("{") ?? false));
|
|
21277
|
+
const \u8AAD\u3080 = data.rootTitle.includes("{") || (data.rootSubtitle?.includes("{") ?? false) || data.branches.some((b) => b.title.includes("{") || (b.subtitle?.includes("{") ?? false));
|
|
21277
21278
|
if (!\u8AAD\u3080) return data;
|
|
21278
21279
|
const root = resolveBoundText(data.rootTitle, values);
|
|
21280
|
+
const rootSubtitle = data.rootSubtitle === void 0 ? void 0 : resolveBoundText(data.rootSubtitle, values);
|
|
21279
21281
|
const branches = data.branches.map((b) => {
|
|
21280
21282
|
const title = resolveBoundText(b.title, values);
|
|
21281
21283
|
const subtitle = b.subtitle === void 0 ? void 0 : resolveBoundText(b.subtitle, values);
|
|
@@ -21286,8 +21288,13 @@ function resolveMindData(data, values) {
|
|
|
21286
21288
|
};
|
|
21287
21289
|
return title.ok && (subtitle?.ok ?? true) ? \u89E3\u6C7A\u5F8C2 : { ...\u89E3\u6C7A\u5F8C2, unresolved: true };
|
|
21288
21290
|
});
|
|
21289
|
-
const \u89E3\u6C7A\u5F8C = {
|
|
21290
|
-
|
|
21291
|
+
const \u89E3\u6C7A\u5F8C = {
|
|
21292
|
+
...data,
|
|
21293
|
+
rootTitle: root.value,
|
|
21294
|
+
...rootSubtitle ? { rootSubtitle: rootSubtitle.value } : {},
|
|
21295
|
+
branches
|
|
21296
|
+
};
|
|
21297
|
+
return root.ok && (rootSubtitle?.ok ?? true) ? \u89E3\u6C7A\u5F8C : { ...\u89E3\u6C7A\u5F8C, unresolved: true };
|
|
21291
21298
|
}
|
|
21292
21299
|
|
|
21293
21300
|
// src/kinds/draw-progress.ts
|
|
@@ -22161,6 +22168,8 @@ function computeMindMapLayout(mindData, cx, cy, canvasW, canvasH) {
|
|
|
22161
22168
|
nodes.push({
|
|
22162
22169
|
id: mindData.rootId,
|
|
22163
22170
|
title: mindData.rootTitle,
|
|
22171
|
+
// 中心も枝と同じく 2 行に積める (#530)。 高さ 52 に 15px + 9px の 2 行が入る
|
|
22172
|
+
...mindData.rootSubtitle === void 0 ? {} : { subtitle: mindData.rootSubtitle },
|
|
22164
22173
|
x: cx,
|
|
22165
22174
|
y: cy,
|
|
22166
22175
|
w: rootW,
|
|
@@ -28401,6 +28410,7 @@ function mindMap(preset) {
|
|
|
28401
28410
|
mindData: {
|
|
28402
28411
|
rootId: preset.rootId,
|
|
28403
28412
|
rootTitle: preset.rootTitle,
|
|
28413
|
+
...preset.rootSubtitle === void 0 ? {} : { rootSubtitle: preset.rootSubtitle },
|
|
28404
28414
|
branches: branches.map((br) => ({
|
|
28405
28415
|
id: br.id,
|
|
28406
28416
|
title: br.title,
|