@cardenelabs/cdl 0.82.0 → 0.102.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.
Files changed (43) hide show
  1. package/CHANGELOG.md +874 -1
  2. package/dist/index.cjs +882 -187
  3. package/dist/index.cjs.map +1 -1
  4. package/dist/index.d.cts +17 -3
  5. package/dist/index.d.ts +17 -3
  6. package/dist/index.js +882 -187
  7. package/dist/index.js.map +1 -1
  8. package/dist/react.cjs +869 -178
  9. package/dist/react.cjs.map +1 -1
  10. package/dist/react.d.cts +1 -1
  11. package/dist/react.d.ts +1 -1
  12. package/dist/react.js +869 -178
  13. package/dist/react.js.map +1 -1
  14. package/dist/{render-DfXCs3Eh.d.cts → render-oEmwYN-q.d.cts} +21 -3
  15. package/dist/{render-DfXCs3Eh.d.ts → render-oEmwYN-q.d.ts} +21 -3
  16. package/package.json +1 -1
  17. package/src/kinds/chart-gauge.tsx +20 -3
  18. package/src/kinds/chart-legend-number.tsx +33 -0
  19. package/src/kinds/chart-number.ts +33 -0
  20. package/src/kinds/chart-radial.tsx +24 -7
  21. package/src/kinds/chart-stat.tsx +35 -5
  22. package/src/kinds/chart-waffle.tsx +25 -7
  23. package/src/kinds/dyn-shape.tsx +72 -12
  24. package/src/kinds/funnel.tsx +50 -2
  25. package/src/kinds/mind-map.tsx +206 -64
  26. package/src/kinds/quadrant.tsx +318 -45
  27. package/src/kinds/shape-blockchain.tsx +50 -18
  28. package/src/kinds/shape-commerce.tsx +27 -4
  29. package/src/kinds/shape-region.tsx +42 -1
  30. package/src/kinds/shape-software.tsx +51 -12
  31. package/src/kinds/storage.tsx +16 -8
  32. package/src/kinds/tree.tsx +46 -10
  33. package/src/lang.ts +5 -5
  34. package/src/layout/nodes.ts +3 -1
  35. package/src/layout/spec.ts +154 -25
  36. package/src/layout/text-width.ts +25 -0
  37. package/src/layout/viewbox.ts +32 -0
  38. package/src/presets.ts +24 -7
  39. package/src/render/nodes.tsx +77 -0
  40. package/src/render/payload-binding.ts +108 -25
  41. package/src/render/stage.tsx +24 -2
  42. package/src/types.ts +117 -38
  43. package/src/visual-validate.ts +61 -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-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';
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-oEmwYN-q.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-oEmwYN-q.cjs';
3
3
  import { JSX } from 'react';
4
4
 
5
5
  declare function effect(fn: () => void | (() => void)): () => void;
@@ -1611,7 +1611,7 @@ interface Violation {
1611
1611
  */
1612
1612
  reason?: string;
1613
1613
  }
1614
- type VisualAxis = "node-visibility" | "edge-label-overlap" | "edge-label-proximity" | "text-readability" | "row-format" | "alignment" | "clearance" | "arrow-endpoint-anchoring" | "label-char-range" | "node-overlap" | "edge-crossing" | "edge-node-cross" | "edge-segment-orthogonality" | "label-inside-viewbox" | "lane-cx-consistency" | "row-vertical-spacing" | "group-boundary-clearance" | "node-vertical-clearance" | "lane-lane-gap" | "arrow-marker-clearance" | "grid-alignment" | "phase-layout-stability" | "responsive-viewport" | "accessibility-basics" | "animation-frame-integrity" | "i18n-cjk-detection" | "contrast-basics" | "print-media-compat" | "color-blind-safety" | "marker-gradient-def-integrity" | "dom-complexity-budget" | "reduced-motion-compat" | "touch-target-size" | "row-content-typing" | "terminal-safe-text" | "gpu-layer-efficiency" | "svg-injection-safety" | "seo-metadata-quality" | "bidi-hyphenation" | "structured-data-extraction" | "diagram-version-semver" | "migration-path-consistency" | "axis-coverage-meta" | "axis-documentation-completeness" | "fixture-drift-detection" | "locale-parity" | "validate-performance-budget" | "node-inside-viewbox" | "shape-label-dropped" | "box-line-dropped" | "node-inside-lane" | "edge-inside-viewbox" | "lane-label-inside-viewbox" | "lane-label-overlap" | "row-alignment" | "column-alignment" | "edge-stubout-min" | "fan-origin-single-point" | "detour-slot-distinct" | "arrow-endpoint-center" | "lane-border-clearance" | "row-gap-uniform" | "column-gap-uniform" | "rows-not-rendered" | "title-row-overlap" | "malformed-input" | "validation-interrupted";
1614
+ type VisualAxis = "node-visibility" | "edge-label-overlap" | "edge-label-proximity" | "text-readability" | "row-format" | "alignment" | "clearance" | "arrow-endpoint-anchoring" | "label-char-range" | "node-overlap" | "edge-crossing" | "edge-node-cross" | "edge-segment-orthogonality" | "label-inside-viewbox" | "lane-cx-consistency" | "row-vertical-spacing" | "group-boundary-clearance" | "node-vertical-clearance" | "lane-lane-gap" | "arrow-marker-clearance" | "grid-alignment" | "phase-layout-stability" | "responsive-viewport" | "accessibility-basics" | "animation-frame-integrity" | "i18n-cjk-detection" | "contrast-basics" | "print-media-compat" | "color-blind-safety" | "marker-gradient-def-integrity" | "dom-complexity-budget" | "reduced-motion-compat" | "touch-target-size" | "row-content-typing" | "terminal-safe-text" | "gpu-layer-efficiency" | "svg-injection-safety" | "seo-metadata-quality" | "bidi-hyphenation" | "structured-data-extraction" | "diagram-version-semver" | "migration-path-consistency" | "axis-coverage-meta" | "axis-documentation-completeness" | "fixture-drift-detection" | "locale-parity" | "validate-performance-budget" | "node-inside-viewbox" | "shape-label-dropped" | "box-line-dropped" | "node-field-unsupported" | "node-inside-lane" | "edge-inside-viewbox" | "lane-label-inside-viewbox" | "lane-label-overlap" | "row-alignment" | "column-alignment" | "edge-stubout-min" | "fan-origin-single-point" | "detour-slot-distinct" | "arrow-endpoint-center" | "lane-border-clearance" | "row-gap-uniform" | "column-gap-uniform" | "rows-not-rendered" | "title-row-overlap" | "malformed-input" | "validation-interrupted";
1615
1615
  /**
1616
1616
  * 検査の用途。 用途によって見るべき軸が違う。
1617
1617
  *
@@ -3523,6 +3523,8 @@ type TreeNode = {
3523
3523
  type TreePreset = {
3524
3524
  id: string;
3525
3525
  topic: string;
3526
+ /** 図の題の上に出す小見出し (#939)。 書かなければ何も出ない */
3527
+ eyebrow?: string;
3526
3528
  defaultTone?: Tone;
3527
3529
  /** depth ごとの lane width (default 320) */
3528
3530
  nodeWidth?: number;
@@ -3559,6 +3561,8 @@ type JourneyStep = {
3559
3561
  type UserJourneyPreset = {
3560
3562
  id: string;
3561
3563
  topic: string;
3564
+ /** 図の題の上に出す小見出し (#939)。 書かなければ何も出ない */
3565
+ eyebrow?: string;
3562
3566
  defaultTone?: Tone;
3563
3567
  stepWidth?: number;
3564
3568
  };
@@ -3591,6 +3595,8 @@ type MindBranch = {
3591
3595
  type MindMapPreset = {
3592
3596
  id: string;
3593
3597
  topic: string;
3598
+ /** 図の題の上に出す小見出し (#939)。 書かなければ何も出ない */
3599
+ eyebrow?: string;
3594
3600
  /** 中心 topic ID + label */
3595
3601
  rootId: string;
3596
3602
  rootTitle: string;
@@ -3626,6 +3632,8 @@ type FunnelStage = {
3626
3632
  type FunnelPreset = {
3627
3633
  id: string;
3628
3634
  topic: string;
3635
+ /** 図の題の上に出す小見出し (#939)。 書かなければ何も出ない */
3636
+ eyebrow?: string;
3629
3637
  defaultTone?: Tone;
3630
3638
  stageWidth?: number;
3631
3639
  };
@@ -3657,6 +3665,8 @@ type QuadrantItem = {
3657
3665
  type QuadrantPreset = {
3658
3666
  id: string;
3659
3667
  topic: string;
3668
+ /** 図の題の上に出す小見出し (#939)。 書かなければ何も出ない */
3669
+ eyebrow?: string;
3660
3670
  /** x 軸 label (left / right) */
3661
3671
  xAxis: {
3662
3672
  left: string;
@@ -3705,6 +3715,8 @@ type ChartDatum = {
3705
3715
  type ChartPreset = {
3706
3716
  id: string;
3707
3717
  topic: string;
3718
+ /** 図の題の上に出す小見出し (#939)。 書かなければ何も出ない */
3719
+ eyebrow?: string;
3708
3720
  type: ChartType;
3709
3721
  defaultTone?: Tone;
3710
3722
  itemWidth?: number;
@@ -3749,6 +3761,8 @@ type GanttTask = {
3749
3761
  type GanttPreset = {
3750
3762
  id: string;
3751
3763
  topic: string;
3764
+ /** 図の題の上に出す小見出し (#939)。 書かなければ何も出ない */
3765
+ eyebrow?: string;
3752
3766
  defaultTone?: Tone;
3753
3767
  laneWidth?: number;
3754
3768
  /**
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-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';
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-oEmwYN-q.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-oEmwYN-q.js';
3
3
  import { JSX } from 'react';
4
4
 
5
5
  declare function effect(fn: () => void | (() => void)): () => void;
@@ -1611,7 +1611,7 @@ interface Violation {
1611
1611
  */
1612
1612
  reason?: string;
1613
1613
  }
1614
- type VisualAxis = "node-visibility" | "edge-label-overlap" | "edge-label-proximity" | "text-readability" | "row-format" | "alignment" | "clearance" | "arrow-endpoint-anchoring" | "label-char-range" | "node-overlap" | "edge-crossing" | "edge-node-cross" | "edge-segment-orthogonality" | "label-inside-viewbox" | "lane-cx-consistency" | "row-vertical-spacing" | "group-boundary-clearance" | "node-vertical-clearance" | "lane-lane-gap" | "arrow-marker-clearance" | "grid-alignment" | "phase-layout-stability" | "responsive-viewport" | "accessibility-basics" | "animation-frame-integrity" | "i18n-cjk-detection" | "contrast-basics" | "print-media-compat" | "color-blind-safety" | "marker-gradient-def-integrity" | "dom-complexity-budget" | "reduced-motion-compat" | "touch-target-size" | "row-content-typing" | "terminal-safe-text" | "gpu-layer-efficiency" | "svg-injection-safety" | "seo-metadata-quality" | "bidi-hyphenation" | "structured-data-extraction" | "diagram-version-semver" | "migration-path-consistency" | "axis-coverage-meta" | "axis-documentation-completeness" | "fixture-drift-detection" | "locale-parity" | "validate-performance-budget" | "node-inside-viewbox" | "shape-label-dropped" | "box-line-dropped" | "node-inside-lane" | "edge-inside-viewbox" | "lane-label-inside-viewbox" | "lane-label-overlap" | "row-alignment" | "column-alignment" | "edge-stubout-min" | "fan-origin-single-point" | "detour-slot-distinct" | "arrow-endpoint-center" | "lane-border-clearance" | "row-gap-uniform" | "column-gap-uniform" | "rows-not-rendered" | "title-row-overlap" | "malformed-input" | "validation-interrupted";
1614
+ type VisualAxis = "node-visibility" | "edge-label-overlap" | "edge-label-proximity" | "text-readability" | "row-format" | "alignment" | "clearance" | "arrow-endpoint-anchoring" | "label-char-range" | "node-overlap" | "edge-crossing" | "edge-node-cross" | "edge-segment-orthogonality" | "label-inside-viewbox" | "lane-cx-consistency" | "row-vertical-spacing" | "group-boundary-clearance" | "node-vertical-clearance" | "lane-lane-gap" | "arrow-marker-clearance" | "grid-alignment" | "phase-layout-stability" | "responsive-viewport" | "accessibility-basics" | "animation-frame-integrity" | "i18n-cjk-detection" | "contrast-basics" | "print-media-compat" | "color-blind-safety" | "marker-gradient-def-integrity" | "dom-complexity-budget" | "reduced-motion-compat" | "touch-target-size" | "row-content-typing" | "terminal-safe-text" | "gpu-layer-efficiency" | "svg-injection-safety" | "seo-metadata-quality" | "bidi-hyphenation" | "structured-data-extraction" | "diagram-version-semver" | "migration-path-consistency" | "axis-coverage-meta" | "axis-documentation-completeness" | "fixture-drift-detection" | "locale-parity" | "validate-performance-budget" | "node-inside-viewbox" | "shape-label-dropped" | "box-line-dropped" | "node-field-unsupported" | "node-inside-lane" | "edge-inside-viewbox" | "lane-label-inside-viewbox" | "lane-label-overlap" | "row-alignment" | "column-alignment" | "edge-stubout-min" | "fan-origin-single-point" | "detour-slot-distinct" | "arrow-endpoint-center" | "lane-border-clearance" | "row-gap-uniform" | "column-gap-uniform" | "rows-not-rendered" | "title-row-overlap" | "malformed-input" | "validation-interrupted";
1615
1615
  /**
1616
1616
  * 検査の用途。 用途によって見るべき軸が違う。
1617
1617
  *
@@ -3523,6 +3523,8 @@ type TreeNode = {
3523
3523
  type TreePreset = {
3524
3524
  id: string;
3525
3525
  topic: string;
3526
+ /** 図の題の上に出す小見出し (#939)。 書かなければ何も出ない */
3527
+ eyebrow?: string;
3526
3528
  defaultTone?: Tone;
3527
3529
  /** depth ごとの lane width (default 320) */
3528
3530
  nodeWidth?: number;
@@ -3559,6 +3561,8 @@ type JourneyStep = {
3559
3561
  type UserJourneyPreset = {
3560
3562
  id: string;
3561
3563
  topic: string;
3564
+ /** 図の題の上に出す小見出し (#939)。 書かなければ何も出ない */
3565
+ eyebrow?: string;
3562
3566
  defaultTone?: Tone;
3563
3567
  stepWidth?: number;
3564
3568
  };
@@ -3591,6 +3595,8 @@ type MindBranch = {
3591
3595
  type MindMapPreset = {
3592
3596
  id: string;
3593
3597
  topic: string;
3598
+ /** 図の題の上に出す小見出し (#939)。 書かなければ何も出ない */
3599
+ eyebrow?: string;
3594
3600
  /** 中心 topic ID + label */
3595
3601
  rootId: string;
3596
3602
  rootTitle: string;
@@ -3626,6 +3632,8 @@ type FunnelStage = {
3626
3632
  type FunnelPreset = {
3627
3633
  id: string;
3628
3634
  topic: string;
3635
+ /** 図の題の上に出す小見出し (#939)。 書かなければ何も出ない */
3636
+ eyebrow?: string;
3629
3637
  defaultTone?: Tone;
3630
3638
  stageWidth?: number;
3631
3639
  };
@@ -3657,6 +3665,8 @@ type QuadrantItem = {
3657
3665
  type QuadrantPreset = {
3658
3666
  id: string;
3659
3667
  topic: string;
3668
+ /** 図の題の上に出す小見出し (#939)。 書かなければ何も出ない */
3669
+ eyebrow?: string;
3660
3670
  /** x 軸 label (left / right) */
3661
3671
  xAxis: {
3662
3672
  left: string;
@@ -3705,6 +3715,8 @@ type ChartDatum = {
3705
3715
  type ChartPreset = {
3706
3716
  id: string;
3707
3717
  topic: string;
3718
+ /** 図の題の上に出す小見出し (#939)。 書かなければ何も出ない */
3719
+ eyebrow?: string;
3708
3720
  type: ChartType;
3709
3721
  defaultTone?: Tone;
3710
3722
  itemWidth?: number;
@@ -3749,6 +3761,8 @@ type GanttTask = {
3749
3761
  type GanttPreset = {
3750
3762
  id: string;
3751
3763
  topic: string;
3764
+ /** 図の題の上に出す小見出し (#939)。 書かなければ何も出ない */
3765
+ eyebrow?: string;
3752
3766
  defaultTone?: Tone;
3753
3767
  laneWidth?: number;
3754
3768
  /**