semiotic 3.6.0 → 3.7.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 (94) hide show
  1. package/CLAUDE.md +190 -227
  2. package/README.md +44 -14
  3. package/ai/cli.js +41 -0
  4. package/ai/componentMetadata.cjs +11 -2
  5. package/ai/dist/mcp-server.js +209 -6
  6. package/ai/examples.md +98 -0
  7. package/ai/schema.json +581 -1
  8. package/ai/system-prompt.md +5 -2
  9. package/dist/components/AccessibleNavTree.d.ts +25 -0
  10. package/dist/components/Annotation.d.ts +40 -14
  11. package/dist/components/ChartContainer.d.ts +32 -2
  12. package/dist/components/ai/annotationProvenance.d.ts +349 -0
  13. package/dist/components/ai/audienceProfile.d.ts +60 -3
  14. package/dist/components/ai/chartCapabilityTypes.d.ts +60 -2
  15. package/dist/components/ai/chartRoles.d.ts +27 -0
  16. package/dist/components/ai/conversationArc.d.ts +379 -0
  17. package/dist/components/ai/dataScaleProfile.d.ts +320 -0
  18. package/dist/components/ai/describeChart.d.ts +114 -0
  19. package/dist/components/ai/navigationTree.d.ts +45 -0
  20. package/dist/components/ai/readerGrounding.d.ts +70 -0
  21. package/dist/components/ai/suggestCharts.d.ts +34 -1
  22. package/dist/components/ai/useConversationArc.d.ts +89 -0
  23. package/dist/components/ai/useNavigationSync.d.ts +61 -0
  24. package/dist/components/ai/variantDiscovery.d.ts +168 -0
  25. package/dist/components/charts/realtime/RealtimeHeatmap.d.ts +3 -0
  26. package/dist/components/charts/realtime/RealtimeHistogram.d.ts +3 -0
  27. package/dist/components/charts/realtime/RealtimeLineChart.d.ts +3 -0
  28. package/dist/components/charts/realtime/RealtimeSwarmChart.d.ts +3 -0
  29. package/dist/components/charts/realtime/RealtimeWaterfallChart.d.ts +3 -0
  30. package/dist/components/charts/shared/annotationHierarchy.d.ts +42 -0
  31. package/dist/components/charts/shared/annotationResolvers.d.ts +3 -2
  32. package/dist/components/charts/shared/annotationRules.d.ts +16 -0
  33. package/dist/components/charts/shared/annotationTypes.d.ts +14 -0
  34. package/dist/components/charts/shared/auditAccessibility.d.ts +90 -0
  35. package/dist/components/charts/shared/chartSpecs.d.ts +2 -3
  36. package/dist/components/charts/shared/diagnoseConfig.d.ts +4 -6
  37. package/dist/components/charts/shared/selectionUtils.d.ts +5 -2
  38. package/dist/components/charts/shared/streamPropsHelpers.d.ts +2 -0
  39. package/dist/components/charts/shared/types.d.ts +5 -1
  40. package/dist/components/charts/value/BigNumber.capability.d.ts +13 -0
  41. package/dist/components/charts/value/BigNumber.d.ts +14 -0
  42. package/dist/components/charts/value/formatting.d.ts +40 -0
  43. package/dist/components/charts/value/thresholdSparkline.d.ts +40 -0
  44. package/dist/components/charts/value/types.d.ts +292 -0
  45. package/dist/components/realtime/lifecycleBands.d.ts +44 -0
  46. package/dist/components/realtime/types.d.ts +23 -8
  47. package/dist/components/recipes/annotationDensity.d.ts +69 -0
  48. package/dist/components/recipes/annotationLayout.d.ts +93 -0
  49. package/dist/components/semiotic-ai.d.ts +38 -15
  50. package/dist/components/semiotic-realtime.d.ts +2 -0
  51. package/dist/components/semiotic-recipes.d.ts +4 -0
  52. package/dist/components/semiotic-utils.d.ts +8 -0
  53. package/dist/components/semiotic-value.d.ts +55 -0
  54. package/dist/components/semiotic.d.ts +7 -0
  55. package/dist/components/server/staticAnnotations.d.ts +2 -0
  56. package/dist/components/stream/AccessibleDataTable.d.ts +10 -1
  57. package/dist/components/stream/NetworkSVGOverlay.d.ts +11 -5
  58. package/dist/components/stream/OrdinalSVGOverlay.d.ts +2 -0
  59. package/dist/components/stream/SVGOverlay.d.ts +2 -0
  60. package/dist/components/stream/geoTypes.d.ts +3 -0
  61. package/dist/components/stream/networkTypes.d.ts +2 -0
  62. package/dist/components/stream/ordinalTypes.d.ts +2 -0
  63. package/dist/components/stream/types.d.ts +2 -0
  64. package/dist/geo.min.js +1 -1
  65. package/dist/geo.module.min.js +1 -1
  66. package/dist/network.min.js +1 -1
  67. package/dist/network.module.min.js +1 -1
  68. package/dist/ordinal.min.js +1 -1
  69. package/dist/ordinal.module.min.js +1 -1
  70. package/dist/realtime.min.js +1 -1
  71. package/dist/realtime.module.min.js +1 -1
  72. package/dist/semiotic-ai.d.ts +38 -15
  73. package/dist/semiotic-ai.min.js +1 -1
  74. package/dist/semiotic-ai.module.min.js +1 -1
  75. package/dist/semiotic-realtime.d.ts +2 -0
  76. package/dist/semiotic-recipes.d.ts +4 -0
  77. package/dist/semiotic-recipes.min.js +1 -1
  78. package/dist/semiotic-recipes.module.min.js +1 -1
  79. package/dist/semiotic-themes.min.js +1 -1
  80. package/dist/semiotic-themes.module.min.js +1 -1
  81. package/dist/semiotic-utils.d.ts +8 -0
  82. package/dist/semiotic-utils.min.js +1 -1
  83. package/dist/semiotic-utils.module.min.js +1 -1
  84. package/dist/semiotic-value.d.ts +55 -0
  85. package/dist/semiotic-value.min.js +2 -0
  86. package/dist/semiotic-value.module.min.js +2 -0
  87. package/dist/semiotic.d.ts +7 -0
  88. package/dist/semiotic.min.js +1 -1
  89. package/dist/semiotic.module.min.js +1 -1
  90. package/dist/server.min.js +1 -1
  91. package/dist/server.module.min.js +1 -1
  92. package/dist/xy.min.js +1 -1
  93. package/dist/xy.module.min.js +1 -1
  94. package/package.json +18 -4
@@ -0,0 +1,93 @@
1
+ import type { AnnotationContext } from "../realtime/types";
2
+ import type { Datum } from "../charts/shared/datumTypes";
3
+ import { type AnnotationDensityConfig } from "./annotationDensity";
4
+ export interface AnnotationLayoutConfig {
5
+ /** Distance from the anchor for the first candidate ring. */
6
+ defaultOffset?: number;
7
+ /** Gap around note boxes when testing note-note collisions. */
8
+ notePadding?: number;
9
+ /** Gap around point marks when testing note-mark collisions. */
10
+ markPadding?: number;
11
+ /** Gap from the plot edge, used as a cheap axis-occlusion proxy. */
12
+ edgePadding?: number;
13
+ /** Preserve annotations that already declare either dx or dy. Default true. */
14
+ preserveManualOffsets?: boolean;
15
+ /** Use a curved connector when auto-placement has to route far from the target. */
16
+ routeLongConnectors?: boolean;
17
+ /** Distance threshold for routeLongConnectors. */
18
+ connectorThreshold?: number;
19
+ /**
20
+ * M3 — amount & density management. When set, after placement the lowest-
21
+ * priority note-like annotations are shed so the plot is not over-crowded
22
+ * (`true` uses the area-derived default budget; an object tunes it). Reference
23
+ * lines, bands and overlays are never shed. Off by default.
24
+ */
25
+ density?: boolean | AnnotationDensityConfig;
26
+ /**
27
+ * M3 — progressive disclosure. When `true`, notes shed by `density` (M3) or
28
+ * the `responsive` breakpoint (M5) are kept in the output tagged
29
+ * `_annotationDeferred` (hidden by default, revealed on chart hover/focus)
30
+ * instead of dropped. The persistent set is always rendered, so a non-hover
31
+ * reader still sees the core notes. No effect unless a shedding pass is on.
32
+ */
33
+ progressiveDisclosure?: boolean;
34
+ /**
35
+ * M4 — redundant-cue default (Rahman et al.'s "Association"). A colored
36
+ * `text` note is the one note type that never draws a connector, so it ties
37
+ * to its target by color alone — invisible to a color-blind or non-visual
38
+ * reader. When `true`, an offset colored `text` note is flagged
39
+ * `_redundantConnector` so the renderer adds a faint leader line from the
40
+ * anchor to the text: a spatial cue, not another color. Off by default.
41
+ */
42
+ redundantCues?: boolean;
43
+ /**
44
+ * M5 — responsive annotation behavior. As the plot narrows past `minWidth`
45
+ * (default 480px), `secondary`-emphasis notes are shed by *importance* — a
46
+ * complement to `density`'s count budget. Pass `true` for the default
47
+ * breakpoint or `{ minWidth }` to tune it. With `progressiveDisclosure`,
48
+ * shed notes are deferred (revealable) rather than dropped. Primary and
49
+ * unmarked notes are always kept. Off by default.
50
+ */
51
+ responsive?: boolean | {
52
+ minWidth?: number;
53
+ };
54
+ /**
55
+ * M5 — cohesion mode (Rahman et al.'s "Cohesion"). `"blended"` lets notes
56
+ * adopt the chart's visual language (mark colors / chart typography — the
57
+ * default look); `"layer"` presents them as a distinct editorial layer
58
+ * (annotation-color, italic editorial type). Stamped onto note-like
59
+ * annotations that don't set their own `cohesion`; a per-annotation
60
+ * `cohesion` always wins. Off (inherit) by default.
61
+ */
62
+ cohesion?: AnnotationCohesion;
63
+ /**
64
+ * M6 — audience adaptation. An `AudienceProfile` (structurally, anything with
65
+ * a `familiarity` map) biases annotation *amount*: a low-familiarity audience
66
+ * keeps more notes (orienting context), an expert audience fewer. It scales
67
+ * the `density` budget, so it only takes effect when `density` is engaged.
68
+ */
69
+ audience?: AnnotationAudience;
70
+ }
71
+ export type AnnotationCohesion = "blended" | "layer";
72
+ /** Structural subset of `AudienceProfile` the annotation layer reads — anything
73
+ * with a per-chart `familiarity` map satisfies it, so a real `AudienceProfile`
74
+ * can be passed directly without coupling `recipes` to the `ai` module. */
75
+ export interface AnnotationAudience {
76
+ name?: string;
77
+ familiarity?: Partial<Record<string, number>>;
78
+ }
79
+ export type AutoPlaceAnnotationsConfig = AnnotationLayoutConfig;
80
+ export type AutoPlaceAnnotations = boolean | AutoPlaceAnnotationsConfig;
81
+ export interface AnnotationLayoutOptions extends AnnotationLayoutConfig {
82
+ annotations: ReadonlyArray<Datum>;
83
+ context: AnnotationContext;
84
+ }
85
+ /**
86
+ * Pure annotation placement recipe.
87
+ *
88
+ * It clones note-like annotations that do not already declare `dx`/`dy`, picks
89
+ * an adjacent candidate offset, and leaves every other annotation untouched.
90
+ * The pass is deterministic and geometry-only; renderers still own the actual
91
+ * SVG/HTML annotation drawing.
92
+ */
93
+ export declare function annotationLayout(options: AnnotationLayoutOptions): Datum[];
@@ -41,6 +41,7 @@ export { RealtimeHistogram, TemporalHistogram } from "./charts/realtime/Realtime
41
41
  export { RealtimeSwarmChart } from "./charts/realtime/RealtimeSwarmChart";
42
42
  export { RealtimeWaterfallChart } from "./charts/realtime/RealtimeWaterfallChart";
43
43
  export { RealtimeHeatmap } from "./charts/realtime/RealtimeHeatmap";
44
+ export { BigNumber } from "./charts/value/BigNumber";
44
45
  export { TooltipProvider } from "./store/TooltipStore";
45
46
  export { MultiLineTooltip } from "./Tooltip/Tooltip";
46
47
  export { ThemeProvider, useTheme } from "./ThemeProvider";
@@ -59,6 +60,8 @@ export { validateProps } from "./charts/shared/validateProps";
59
60
  export type { ValidationResult } from "./charts/shared/validateProps";
60
61
  export { diagnoseConfig } from "./charts/shared/diagnoseConfig";
61
62
  export type { Diagnosis, DiagnosisResult } from "./charts/shared/diagnoseConfig";
63
+ export { auditAccessibility, formatAccessibilityAudit, accessibilityCaveats } from "./charts/shared/auditAccessibility";
64
+ export type { A11yPrinciple, A11yStatus, A11yFinding, AccessibilityAuditResult, AuditAccessibilityOptions } from "./charts/shared/auditAccessibility";
62
65
  export type { AnomalyConfig, ForecastConfig } from "./charts/shared/statisticalOverlays";
63
66
  export { toConfig, fromConfig, toURL, fromURL, copyConfig, configToJSX } from "./export/chartConfig";
64
67
  export type { ChartConfig, ToConfigOptions, CopyFormat } from "./export/chartConfig";
@@ -67,40 +70,60 @@ export type { SerializedSelections, SerializedSelection, SerializedFieldSelectio
67
70
  export { fromVegaLite } from "./data/fromVegaLite";
68
71
  export type { VegaLiteSpec, VegaLiteEncoding } from "./data/fromVegaLite";
69
72
  export { useChartInterrogation } from "./store/useChartInterrogation";
70
- export type { UseChartInterrogationOptions, UseChartInterrogationResult, InterrogationContext, InterrogationFocus, InterrogationResult, InterrogationQuery, InterrogationMessage, } from "./store/useChartInterrogation";
73
+ export type { UseChartInterrogationOptions, UseChartInterrogationResult, InterrogationContext, InterrogationFocus, InterrogationResult, InterrogationQuery, InterrogationMessage } from "./store/useChartInterrogation";
71
74
  export { useChartFocus } from "./store/useChartFocus";
72
75
  export type { UseChartFocusOptions } from "./store/useChartFocus";
73
76
  export { summarizeData } from "./data/DataSummarizer";
74
- export type { DataSummary, FieldSummary, FieldType, NumericFieldSummary, DateFieldSummary, CategoricalFieldSummary, UnknownFieldSummary, SummarizeOptions, } from "./data/DataSummarizer";
77
+ export { describeChart, resolveCommunicativeAct, communicativeActForIntent } from "./ai/describeChart";
78
+ export type { DescribeChartResult, DescribeChartOptions, DescribeLevel, CommunicativeAct, DescribeCapabilityContext } from "./ai/describeChart";
79
+ export { buildReaderGrounding } from "./ai/readerGrounding";
80
+ export type { ChartReaderGrounding, ChartReaderGroundingOptions, ChartReaderGroundingIntent } from "./ai/readerGrounding";
81
+ export { buildNavigationTree, flattenVisible, countNodes } from "./ai/navigationTree";
82
+ export type { NavTreeNode, NavTreeRole, BuildNavigationTreeOptions } from "./ai/navigationTree";
83
+ export { AccessibleNavTree } from "./AccessibleNavTree";
84
+ export type { AccessibleNavTreeProps } from "./AccessibleNavTree";
85
+ export { useNavigationSync } from "./ai/useNavigationSync";
86
+ export type { UseNavigationSyncOptions, UseNavigationSyncResult } from "./ai/useNavigationSync";
87
+ export type { DataSummary, FieldSummary, FieldType, NumericFieldSummary, DateFieldSummary, CategoricalFieldSummary, UnknownFieldSummary, SummarizeOptions } from "./data/DataSummarizer";
75
88
  export { profileData } from "./ai/profileData";
76
89
  export type { ProfileDataOptions } from "./ai/profileData";
77
- export { suggestCharts, scoreChart, explainCapabilityFit } from "./ai/suggestCharts";
78
- export type { SuggestChartsOptions, RejectedCapability, ExplainCapabilityFitResult, } from "./ai/suggestCharts";
90
+ export { suggestCharts, suggestChartsGrouped, scoreChart, explainCapabilityFit } from "./ai/suggestCharts";
91
+ export type { SuggestChartsOptions, RejectedCapability, ExplainCapabilityFitResult } from "./ai/suggestCharts";
92
+ export { DEFAULT_SCALE_THRESHOLDS, applyScaleBias, classifyRowBand, classifyCardinalityBand, classifyFieldBand, compareBands, computeEffectiveScale, resolveRowsToNumber, resolveCardinalityToNumber, scaleHints } from "./ai/dataScaleProfile";
93
+ export type { DataScaleProfile, DataQualityProfile, ScaleBand, CardinalityBand, FieldBand, ScaleThresholds, ChartScalePreference, EffectiveScale, ScaleBiasResult, ScaleFitFn, ScaleFitResult, QualityFitFn, ScaleHintInput } from "./ai/dataScaleProfile";
79
94
  export { inferIntent } from "./ai/inferIntent";
80
95
  export type { InferIntentResult } from "./ai/inferIntent";
81
96
  export { suggestDashboard } from "./ai/suggestDashboard";
82
- export type { DashboardPanel, DashboardSuggestion, SuggestDashboardOptions, } from "./ai/suggestDashboard";
83
- export { applyAudienceBias, effectiveFamiliarity, stretchFamiliarityCeiling, } from "./ai/audienceProfile";
84
- export type { AudienceProfile, AudienceTarget, AudienceBiasResult, } from "./ai/audienceProfile";
85
- export { executivePersona, analystPersona, dataScientistPersona, BUILT_IN_AUDIENCES, } from "./ai/audiences";
97
+ export type { DashboardPanel, DashboardSuggestion, SuggestDashboardOptions } from "./ai/suggestDashboard";
98
+ export { applyAudienceBias, effectiveFamiliarity, stretchFamiliarityCeiling, receivabilityBias } from "./ai/audienceProfile";
99
+ export type { AudienceProfile, AudienceTarget, AudienceBiasResult, ReceptionModality, ReceivabilitySignal } from "./ai/audienceProfile";
100
+ export { executivePersona, analystPersona, dataScientistPersona, BUILT_IN_AUDIENCES } from "./ai/audiences";
86
101
  export { suggestStretchCharts } from "./ai/suggestStretchCharts";
87
- export type { StretchSuggestion, SuggestStretchChartsOptions, } from "./ai/suggestStretchCharts";
88
- export { suggestStreamCharts, registerStreamChartCapability, unregisterStreamChartCapability, getStreamCapabilities, } from "./ai/suggestStreamCharts";
102
+ export type { StretchSuggestion, SuggestStretchChartsOptions } from "./ai/suggestStretchCharts";
103
+ export { suggestStreamCharts, registerStreamChartCapability, unregisterStreamChartCapability, getStreamCapabilities } from "./ai/suggestStreamCharts";
89
104
  export type { SuggestStreamChartsOptions } from "./ai/suggestStreamCharts";
90
- export type { StreamSchema, StreamFieldSchema, StreamFieldKind, StreamChartCapability, StreamIntentScorer, StreamSuggestion, } from "./ai/streamingTypes";
105
+ export type { StreamSchema, StreamFieldSchema, StreamFieldKind, StreamChartCapability, StreamIntentScorer, StreamSuggestion } from "./ai/streamingTypes";
91
106
  export { diffProfile } from "./ai/diffProfile";
92
107
  export type { ProfileDiff, FieldTypeChange, PrimaryRoleChange, PrimaryRole } from "./ai/diffProfile";
93
108
  export { repairChartConfig } from "./ai/repairChartConfig";
94
- export type { RepairResult, RepairOkResult, RepairAlternativeResult, RepairUnknownResult, RepairOptions, } from "./ai/repairChartConfig";
109
+ export type { RepairResult, RepairOkResult, RepairAlternativeResult, RepairUnknownResult, RepairOptions } from "./ai/repairChartConfig";
95
110
  export { runQualityScorecard } from "./ai/qualityScorecard";
96
- export type { ScorecardFixture, ScorecardReport, PerCapabilityScore, PerFixtureScore, } from "./ai/qualityScorecard";
111
+ export type { ScorecardFixture, ScorecardReport, PerCapabilityScore, PerFixtureScore } from "./ai/qualityScorecard";
97
112
  export { CANONICAL_FIXTURES } from "./ai/qualityFixtures";
98
113
  export { useChartSuggestions } from "./ai/useChartSuggestions";
99
114
  export type { UseChartSuggestionsOptions, UseChartSuggestionsResult } from "./ai/useChartSuggestions";
100
- export { getCapabilities, getCapability, registerChartCapability, unregisterChartCapability, LineChartCapability, AreaChartCapability, StackedAreaChartCapability, ScatterplotCapability, ConnectedScatterplotCapability, BubbleChartCapability, QuadrantChartCapability, MultiAxisLineChartCapability, MinimapChartCapability, DifferenceChartCapability, CandlestickChartCapability, HeatmapCapability, BarChartCapability, GroupedBarChartCapability, StackedBarChartCapability, DotPlotCapability, PieChartCapability, DonutChartCapability, FunnelChartCapability, GaugeChartCapability, LikertChartCapability, SwimlaneChartCapability, HistogramCapability, BoxPlotCapability, SwarmPlotCapability, ViolinPlotCapability, RidgelinePlotCapability, ForceDirectedGraphCapability, SankeyDiagramCapability, ChordDiagramCapability, ProcessSankeyCapability, TreeDiagramCapability, TreemapCapability, CirclePackCapability, OrbitDiagramCapability, ChoroplethMapCapability, ProportionalSymbolMapCapability, FlowMapCapability, DistanceCartogramCapability, } from "./ai/chartCapabilities";
101
- export type { ChartCapability, ChartDataProfile, ChartFamily, ChartImportPath, ChartRubric, ChartVariant, FieldCandidate, FieldKind, FitResult, IntentScorer, Suggestion, } from "./ai/chartCapabilityTypes";
115
+ export { getCapabilities, getCapability, registerChartCapability, unregisterChartCapability, LineChartCapability, AreaChartCapability, StackedAreaChartCapability, ScatterplotCapability, ConnectedScatterplotCapability, BubbleChartCapability, QuadrantChartCapability, MultiAxisLineChartCapability, MinimapChartCapability, DifferenceChartCapability, CandlestickChartCapability, HeatmapCapability, BarChartCapability, GroupedBarChartCapability, StackedBarChartCapability, DotPlotCapability, PieChartCapability, DonutChartCapability, FunnelChartCapability, GaugeChartCapability, LikertChartCapability, SwimlaneChartCapability, HistogramCapability, BoxPlotCapability, SwarmPlotCapability, ViolinPlotCapability, RidgelinePlotCapability, ForceDirectedGraphCapability, SankeyDiagramCapability, ChordDiagramCapability, ProcessSankeyCapability, TreeDiagramCapability, TreemapCapability, CirclePackCapability, OrbitDiagramCapability, ChoroplethMapCapability, ProportionalSymbolMapCapability, FlowMapCapability, DistanceCartogramCapability } from "./ai/chartCapabilities";
116
+ export type { ChartCapability, ChartDataProfile, ChartFamily, ChartImportPath, ChartRubric, ChartVariant, FieldCandidate, FieldKind, FitResult, IntentScorer, ScaledSuggestionGroups, Suggestion, SuggestionScaleRange } from "./ai/chartCapabilityTypes";
102
117
  export { listIntents, getIntent, registerIntent, BUILT_IN_INTENT_IDS } from "./ai/intents";
103
118
  export type { BuiltInIntentId, IntentId, IntentDescriptor } from "./ai/intents";
119
+ export { proposeVariant, evaluateVariantProposal, registerVariantDiscovery, getRegisteredVariantDiscovery, clearVariantDiscovery } from "./ai/variantDiscovery";
120
+ export type { VariantProposal, VariantProposalSource, VariantScore, VariantRejectionReason, VariantDiscoveryContext, EvaluateVariantProposalOptions, ProposeVariantFn, EvaluateVariantProposalFn } from "./ai/variantDiscovery";
121
+ export { withProvenance, withCurrentProvenance, currentTimestamp, computeAnnotationFreshness, applyAnnotationLifecycle, applyAnnotationStatus, filterAnnotationsByStatus, annotationFreshnessFor, bandFromAge, DEFAULT_LIFECYCLE_THRESHOLDS } from "./ai/annotationProvenance";
122
+ export type { AnnotationProvenance, AnnotationSource, AnnotationActorKind, AnnotationBasis, AnnotationLifecycle, AnnotationFreshness, AnnotationStatus, AnnotationAnchor, Annotated, ComputeAnnotationFreshnessOptions, AnnotationLifecycleTreatment, ApplyAnnotationLifecycleOptions, AnnotationStatusTreatment, AnnotationStatusVisibility, LifecycleBand, LifecycleBandThresholds } from "./ai/annotationProvenance";
123
+ export { useConversationArc, summarizeArc } from "./ai/useConversationArc";
124
+ export type { UseConversationArcOptions, UseConversationArcResult, ConversationArcSummary } from "./ai/useConversationArc";
125
+ export { enableConversationArc, disableConversationArc, getConversationArcStore, subscribeToConversationArcChange, registerConversationArcSink, createLocalStorageConversationArcSink, createIndexedDBConversationArcSink, createWebhookConversationArcSink, loadConversationArc, replayConversationArc, recordAudienceChange, recordAnnotationStatusChange } from "./ai/conversationArc";
126
+ export type { ConversationArcEvent, ConversationArcEventType, ConversationArcEventInput, ConversationArcStore, ConversationArcListener, ConversationArcSink, ConversationArcStorageLike, EnableConversationArcOptions, LoadConversationArcOptions, LocalStorageConversationArcSinkOptions, IndexedDBConversationArcSinkOptions, ConversationArcWebhookFetch, WebhookConversationArcSinkOptions, SuggestionShownEvent, SuggestionChosenEvent, AudienceSetEvent, ChartRenderedEvent, ChartEditedEvent, ChartReplacedEvent, ChartExportedEvent, ChartAbandonedEvent, InterrogationAskedEvent, InterrogationAnsweredEvent, NavNodeFocusedEvent, NavBranchExpandedEvent, AnnotationStatusChangedEvent } from "./ai/conversationArc";
104
127
  export { useChartObserver } from "./store/useObservation";
105
128
  export type { UseChartObserverOptions, UseChartObserverResult } from "./store/useObservation";
106
129
  export type { ChartObservation, OnObservationCallback, HoverObservation, HoverEndObservation, BrushObservation, BrushEndObservation, SelectionObservation, SelectionEndObservation, ClickObservation, ClickEndObservation } from "./store/ObservationStore";
@@ -22,3 +22,5 @@ export type { StreamXYFrameProps, StreamXYFrameHandle, StreamChartType } from ".
22
22
  export type { StreamNetworkFrameProps, StreamNetworkFrameHandle, NetworkChartType } from "./stream/networkTypes";
23
23
  export { useStreamStatus } from "./charts/shared/useStreamStatus";
24
24
  export type { StreamStatus, StreamStatusOptions, StreamStatusResult, } from "./charts/shared/useStreamStatus";
25
+ export { bandFromAge, DEFAULT_LIFECYCLE_THRESHOLDS } from "./realtime/lifecycleBands";
26
+ export type { LifecycleBand, LifecycleBandThresholds } from "./realtime/lifecycleBands";
@@ -19,6 +19,10 @@ export { bulletLayout } from "./recipes/bullet";
19
19
  export type { BulletConfig } from "./recipes/bullet";
20
20
  export { parallelCoordinatesLayout } from "./recipes/parallelCoordinates";
21
21
  export type { ParallelCoordinatesConfig } from "./recipes/parallelCoordinates";
22
+ export { annotationLayout } from "./recipes/annotationLayout";
23
+ export type { AnnotationLayoutConfig, AnnotationLayoutOptions, AutoPlaceAnnotations, AutoPlaceAnnotationsConfig, AnnotationCohesion, AnnotationAudience, } from "./recipes/annotationLayout";
24
+ export { annotationDensity, annotationBudget, DEFAULT_AREA_PER_ANNOTATION } from "./recipes/annotationDensity";
25
+ export type { AnnotationDensityConfig, AnnotationDensityOptions, AnnotationDensityResult, } from "./recipes/annotationDensity";
22
26
  export type { CustomLayout, LayoutContext, LayoutResult, } from "./stream/customLayout";
23
27
  export type { NetworkCustomLayout, NetworkLayoutContext, NetworkLayoutResult, } from "./stream/networkCustomLayout";
24
28
  export type { OrdinalCustomLayout, OrdinalLayoutContext, OrdinalLayoutResult, } from "./stream/ordinalCustomLayout";
@@ -17,6 +17,14 @@ export { createHatchPattern } from "./charts/shared/hatchPattern";
17
17
  export type { HatchPatternOptions } from "./charts/shared/hatchPattern";
18
18
  export { validateProps } from "./charts/shared/validateProps";
19
19
  export { diagnoseConfig } from "./charts/shared/diagnoseConfig";
20
+ export { auditAccessibility, formatAccessibilityAudit, accessibilityCaveats } from "./charts/shared/auditAccessibility";
21
+ export { describeChart, resolveCommunicativeAct, communicativeActForIntent } from "./ai/describeChart";
22
+ export type { DescribeChartResult, DescribeChartOptions, DescribeLevel, CommunicativeAct, DescribeCapabilityContext } from "./ai/describeChart";
23
+ export { buildNavigationTree, flattenVisible, countNodes } from "./ai/navigationTree";
24
+ export type { NavTreeNode, NavTreeRole, BuildNavigationTreeOptions } from "./ai/navigationTree";
25
+ export { buildReaderGrounding } from "./ai/readerGrounding";
26
+ export type { ChartReaderGrounding, ChartReaderGroundingOptions, ChartReaderGroundingIntent } from "./ai/readerGrounding";
27
+ export type { A11yPrinciple, A11yStatus, A11yFinding, AccessibilityAuditResult, AuditAccessibilityOptions } from "./charts/shared/auditAccessibility";
20
28
  export { getHitRadius } from "./stream/hitTestUtils";
21
29
  export { toConfig, fromConfig, toURL, fromURL, copyConfig, configToJSX } from "./export/chartConfig";
22
30
  export type { ChartConfig, ToConfigOptions, CopyFormat } from "./export/chartConfig";
@@ -0,0 +1,55 @@
1
+ /**
2
+ * semiotic/value — Focal-value visualizations.
3
+ *
4
+ * Charts that render *one* number rather than a coordinate space. At
5
+ * row counts of 1–3, a chart is usually the wrong abstraction — the
6
+ * scale-aware suggestion engine routes those datasets here.
7
+ *
8
+ * v1 ships `BigNumber` as a plain React component. The component is
9
+ * deliberately chart-dependency-free: consumers compose their own
10
+ * Semiotic chart (or any ReactNode) into the `trendSlot` (wide /
11
+ * rectangular charts, e.g. LineChart / AreaChart in sparkline mode) or
12
+ * `chartSlot` (square charts, e.g. DonutChart / PieChart / Scatterplot
13
+ * / Treemap). The slot context exposes the resolved threshold colour
14
+ * + sentiment + push buffer so embedded charts can theme-link.
15
+ *
16
+ * @example
17
+ * ```tsx
18
+ * import { BigNumber } from "semiotic/value"
19
+ * import { LineChart } from "semiotic/xy"
20
+ * import { DonutChart } from "semiotic/ordinal"
21
+ *
22
+ * <BigNumber
23
+ * value={1284900}
24
+ * label="Q3 Revenue"
25
+ * format="currency"
26
+ * comparison={{ value: 980000, label: "vs Q2" }}
27
+ * target={{ value: 1500000, label: "Q3 plan" }}
28
+ * thresholds={[
29
+ * { at: -Infinity, level: "danger" },
30
+ * { at: 1_000_000, level: "warning" },
31
+ * { at: 1_300_000, level: "success" },
32
+ * ]}
33
+ * trendSlot={(ctx) => (
34
+ * <LineChart
35
+ * data={recentMonths.map((y, x) => ({ x, y }))}
36
+ * xAccessor="x" yAccessor="y"
37
+ * mode="sparkline"
38
+ * width={260} height={32}
39
+ * color={ctx.color}
40
+ * />
41
+ * )}
42
+ * chartSlot={(ctx) => (
43
+ * <DonutChart
44
+ * data={revenueByRegion}
45
+ * categoryAccessor="region" valueAccessor="revenue"
46
+ * width={120} height={120}
47
+ * />
48
+ * )}
49
+ * />
50
+ * ```
51
+ */
52
+ export { BigNumber, default as BigNumberDefault } from "./charts/value/BigNumber";
53
+ export type { BigNumberProps, BigNumberHandle, BigNumberMode, BigNumberLevel, BigNumberDirection, BigNumberSentiment, BigNumberFormat, BigNumberThreshold, BigNumberComparison, BigNumberTarget, BigNumberPushInput, BigNumberSlot, BigNumberSlotContext } from "./charts/value/types";
54
+ export { buildFormatter, formatSignedDelta, formatDeltaPercent, formatDuration } from "./charts/value/formatting";
55
+ export { resolveThreshold, colorForLevel, buildSparklinePath } from "./charts/value/thresholdSparkline";
@@ -44,6 +44,12 @@ export { COLOR_BLIND_SAFE_CATEGORICAL } from "./store/ThemeStore";
44
44
  export { themeToCSS, themeToTokens, resolveThemePreset, THEME_PRESETS, CARBON_CATEGORICAL_14, CARBON_ALERT } from "./semiotic-themes";
45
45
  export type { ThemePresetName } from "./semiotic-themes";
46
46
  export type { ChartErrorBoundaryProps } from "./ChartErrorBoundary";
47
+ export { AccessibleNavTree } from "./AccessibleNavTree";
48
+ export type { AccessibleNavTreeProps } from "./AccessibleNavTree";
49
+ export { buildNavigationTree } from "./ai/navigationTree";
50
+ export type { NavTreeNode, NavTreeRole, BuildNavigationTreeOptions } from "./ai/navigationTree";
51
+ export { useNavigationSync } from "./ai/useNavigationSync";
52
+ export type { UseNavigationSyncOptions, UseNavigationSyncResult } from "./ai/useNavigationSync";
47
53
  export type { ChartContainerProps, ChartContainerHandle } from "./ChartContainer";
48
54
  export type { ChartGridProps } from "./ChartGrid";
49
55
  export type { CategoryColorMap, CategoryColorProviderProps } from "./CategoryColors";
@@ -62,3 +68,4 @@ export type { RealtimeTemporalHistogramProps, RealtimeHistogramProps, TemporalHi
62
68
  export type { RealtimeSwarmChartProps } from "./charts/realtime/RealtimeSwarmChart";
63
69
  export type { RealtimeWaterfallChartProps } from "./charts/realtime/RealtimeWaterfallChart";
64
70
  export type { RealtimeHeatmapProps } from "./charts/realtime/RealtimeHeatmap";
71
+ export type { AnnotationProvenance, AnnotationSource, AnnotationActorKind, AnnotationBasis, AnnotationLifecycle, AnnotationFreshness, AnnotationStatus, AnnotationAnchor, Annotated, } from "./ai/annotationProvenance";
@@ -7,6 +7,7 @@ import type { Datum } from "../charts/shared/datumTypes";
7
7
  */
8
8
  import * as React from "react";
9
9
  import type { SemioticTheme } from "../store/ThemeStore";
10
+ import { type AutoPlaceAnnotations } from "../recipes/annotationLayout";
10
11
  interface AnnotationScales {
11
12
  x?: (v: any) => number;
12
13
  y?: (v: any) => number;
@@ -30,6 +31,7 @@ interface AnnotationLayout {
30
31
  }
31
32
  export interface StaticAnnotationConfig {
32
33
  annotations?: Datum[];
34
+ autoPlaceAnnotations?: AutoPlaceAnnotations;
33
35
  scales: AnnotationScales;
34
36
  layout: AnnotationLayout;
35
37
  theme: SemioticTheme;
@@ -13,6 +13,14 @@ export declare function computeCanvasAriaLabel(scene: AnySceneNode[] | null | un
13
13
  * Compute an aria-label for network charts from scene nodes and edges.
14
14
  */
15
15
  export declare function computeNetworkAriaLabel(nodeCount: number, edgeCount: number, chartType: string): string;
16
+ interface DataRow {
17
+ label: string;
18
+ values: Record<string, string | number>;
19
+ }
20
+ /** Extract a flat list of typed rows from scene nodes, surfacing the raw datum
21
+ * fields (not pixel coordinates). Defensively handles missing/malformed data —
22
+ * never throws. Exported for direct testing. */
23
+ export declare function extractAllRows(scene: AnySceneNode[]): DataRow[];
16
24
  interface AccessibleDataTableProps {
17
25
  scene: AnySceneNode[];
18
26
  chartType: string;
@@ -24,7 +32,8 @@ interface AccessibleDataTableProps {
24
32
  /**
25
33
  * JIT accessible data summary. Renders a lightweight sr-only button by default.
26
34
  * On activation (or when ChartContainer's dataSummary action is toggled),
27
- * computes a statistical summary (.describe()-style) and shows 5 sample rows.
35
+ * computes a statistical summary (.describe()-style) and shows a sample of rows
36
+ * (5 to start), pageable to the full dataset via "Show more".
28
37
  */
29
38
  export declare function AccessibleDataTable({ scene, chartType, tableId, chartTitle }: AccessibleDataTableProps): import("react/jsx-runtime").JSX.Element | null;
30
39
  interface NetworkAccessibleDataTableProps {
@@ -2,6 +2,8 @@ import type { Datum } from "../charts/shared/datumTypes";
2
2
  import type { ReactNode } from "react";
3
3
  import type { NetworkLabel } from "./networkTypes";
4
4
  import type { LegendGroup, GradientLegendConfig, LegendLayout } from "../types/legendTypes";
5
+ import { type AutoPlaceAnnotations } from "../recipes/annotationLayout";
6
+ import type { AnnotationContext } from "../realtime/types";
5
7
  type AnnotationAnchorNode = {
6
8
  type: string;
7
9
  datum: Datum | null;
@@ -12,6 +14,13 @@ type AnnotationAnchorNode = {
12
14
  cy?: number;
13
15
  w?: number;
14
16
  h?: number;
17
+ /** Circle nodes (NetworkCircleNode, force/tree/orbit marks) carry an explicit radius. */
18
+ r?: number;
19
+ /** Arc nodes (chord, radial) carry an outer radius. */
20
+ outerR?: number;
21
+ };
22
+ type NetworkAnnotationContext = AnnotationContext & {
23
+ sceneNodes?: AnnotationAnchorNode[];
15
24
  };
16
25
  export interface NetworkSVGOverlayProps {
17
26
  width: number;
@@ -50,11 +59,8 @@ export interface NetworkSVGOverlayProps {
50
59
  sceneNodes?: AnnotationAnchorNode[];
51
60
  /** Annotations */
52
61
  annotations?: Datum[];
53
- svgAnnotationRules?: (annotation: Datum, index: number, context: {
54
- width: number;
55
- height: number;
56
- sceneNodes?: AnnotationAnchorNode[];
57
- }) => ReactNode;
62
+ autoPlaceAnnotations?: AutoPlaceAnnotations;
63
+ svgAnnotationRules?: (annotation: Datum, index: number, context: NetworkAnnotationContext) => ReactNode;
58
64
  annotationFrame?: number;
59
65
  }
60
66
  /**
@@ -4,6 +4,7 @@ import type { OrdinalScales } from "./ordinalTypes";
4
4
  import type { AnnotationContext } from "../realtime/types";
5
5
  import type { ReactNode } from "react";
6
6
  import type { LegendGroup, GradientLegendConfig, LegendLayout } from "../types/legendTypes";
7
+ import { type AutoPlaceAnnotations } from "../recipes/annotationLayout";
7
8
  import { type AxisExtentMode } from "../charts/shared/axisExtent";
8
9
  interface OrdinalSVGOverlayProps {
9
10
  width: number;
@@ -52,6 +53,7 @@ interface OrdinalSVGOverlayProps {
52
53
  legendLayout?: LegendLayout;
53
54
  foregroundGraphics?: ReactNode;
54
55
  annotations?: Datum[];
56
+ autoPlaceAnnotations?: AutoPlaceAnnotations;
55
57
  svgAnnotationRules?: (annotation: Datum, index: number, context: AnnotationContext) => ReactNode;
56
58
  annotationFrame?: number;
57
59
  xAccessor?: string;
@@ -3,6 +3,7 @@ import type { StreamScales, MarginalGraphicsConfig, XYFrameAxisConfig } from "./
3
3
  import type { AnnotationContext } from "../realtime/types";
4
4
  import type { ReactNode } from "react";
5
5
  import type { LegendGroup, GradientLegendConfig, LegendLayout } from "../types/legendTypes";
6
+ import { type AutoPlaceAnnotations } from "../recipes/annotationLayout";
6
7
  export type AxisConfig = XYFrameAxisConfig;
7
8
  interface SVGOverlayProps {
8
9
  width: number;
@@ -57,6 +58,7 @@ interface SVGOverlayProps {
57
58
  xValues?: number[];
58
59
  yValues?: number[];
59
60
  annotations?: Datum[];
61
+ autoPlaceAnnotations?: AutoPlaceAnnotations;
60
62
  svgAnnotationRules?: (annotation: Datum, index: number, context: AnnotationContext) => ReactNode;
61
63
  annotationFrame?: number;
62
64
  xAccessor?: string;
@@ -6,6 +6,7 @@ import type { AnimateProp } from "./pipelineTransitionUtils";
6
6
  import type { HoverAnnotationConfig, HoverData } from "../realtime/types";
7
7
  import type { GeoParticleStyle } from "./GeoParticlePool";
8
8
  import type { Datum } from "../charts/shared/datumTypes";
9
+ import type { AutoPlaceAnnotations } from "../recipes/annotationLayout";
9
10
  export type ProjectionProp = GeoProjection | ProjectionName | ProjectionConfig;
10
11
  export type ProjectionName = "mercator" | "equalEarth" | "albersUsa" | "orthographic" | "naturalEarth" | "equirectangular";
11
12
  export interface ProjectionConfig {
@@ -94,6 +95,7 @@ export interface GeoPipelineConfig {
94
95
  /** Whether to animate elements on first render */
95
96
  introAnimation?: boolean;
96
97
  annotations?: Datum[];
98
+ autoPlaceAnnotations?: AutoPlaceAnnotations;
97
99
  pointIdAccessor?: string | ((d: Datum) => string);
98
100
  /** ID accessor on line data — required for `removeLine` by id. */
99
101
  lineIdAccessor?: string | ((d: Datum) => string);
@@ -174,6 +176,7 @@ export interface StreamGeoFrameProps<T = Datum> {
174
176
  customClickBehavior?: (d: HoverData | null) => void;
175
177
  customHoverBehavior?: (d: HoverData | null) => void;
176
178
  annotations?: Datum[];
179
+ autoPlaceAnnotations?: AutoPlaceAnnotations;
177
180
  decay?: DecayConfig;
178
181
  pulse?: PulseConfig;
179
182
  transition?: TransitionConfig;
@@ -5,6 +5,7 @@ import type { LegendGroup, LegendLayout } from "../types/legendTypes";
5
5
  import type { Style, DecayConfig, PulseConfig, TransitionConfig, StalenessConfig, ThemeSemanticColors, SceneDatum } from "./types";
6
6
  import type { AnimateProp } from "./pipelineTransitionUtils";
7
7
  import type { Datum } from "../charts/shared/datumTypes";
8
+ import type { AutoPlaceAnnotations } from "../recipes/annotationLayout";
8
9
  export interface TensionConfig {
9
10
  weightChange: number;
10
11
  newEdge: number;
@@ -518,6 +519,7 @@ export interface StreamNetworkFrameProps<T = Datum> {
518
519
  chartId?: string;
519
520
  onTopologyChange?: (nodes: RealtimeNode[], edges: RealtimeEdge[]) => void;
520
521
  annotations?: Datum[];
522
+ autoPlaceAnnotations?: AutoPlaceAnnotations;
521
523
  svgAnnotationRules?: (annotation: Datum, index: number, context: AnnotationContext) => ReactNode;
522
524
  legend?: ReactNode | {
523
525
  legendGroups: LegendGroup[];
@@ -1,6 +1,7 @@
1
1
  import type { ReactNode } from "react";
2
2
  import type { ScaleLinear, ScaleBand } from "d3-scale";
3
3
  import type { WindowMode, HoverAnnotationConfig, HoverData, AnnotationContext } from "../realtime/types";
4
+ import type { AutoPlaceAnnotations } from "../recipes/annotationLayout";
4
5
  import type { Style, SceneDatum, DecayConfig, PulseConfig, TransitionConfig, StalenessConfig, ThemeSemanticColors } from "./types";
5
6
  import type { AnimateProp } from "./pipelineTransitionUtils";
6
7
  import type { GradientLegendConfig, LegendGroup, LegendLayout } from "../types/legendTypes";
@@ -381,6 +382,7 @@ export interface StreamOrdinalFrameProps<T = Datum> {
381
382
  tooltipContent?: (d: HoverData) => ReactNode;
382
383
  customHoverBehavior?: (d: HoverData | null) => void;
383
384
  annotations?: Datum[];
385
+ autoPlaceAnnotations?: AutoPlaceAnnotations;
384
386
  svgAnnotationRules?: (annotation: Datum, index: number, context: AnnotationContext) => ReactNode;
385
387
  showGrid?: boolean;
386
388
  legend?: ReactNode | {
@@ -5,6 +5,7 @@ import type { LegendGroup, GradientLegendConfig, LegendLayout } from "../types/l
5
5
  import type { ArrowOfTime, WindowMode, LineStyle, BarStyle, WaterfallStyle, SwarmStyle, HoverAnnotationConfig, HoverData, AnnotationContext, AnnotationAnchorMode } from "../realtime/types";
6
6
  import type { Datum } from "../charts/shared/datumTypes";
7
7
  import type { CoercibleNumber } from "./accessorUtils";
8
+ import type { AutoPlaceAnnotations } from "../recipes/annotationLayout";
8
9
  export type SceneDatum = Datum | null;
9
10
  export type SeriesDatum = Datum[] | null;
10
11
  export type AxisTickFormat = ((d: number, index?: number, allTicks?: number[]) => string) | ((d: string, index?: number, allTicks?: number[]) => string) | ((d: Date, index?: number, allTicks?: number[]) => string);
@@ -635,6 +636,7 @@ export interface StreamXYFrameProps<T = Datum> {
635
636
  /** Accessor for unique point IDs used by point-anchored annotations */
636
637
  pointIdAccessor?: string | ((d: T) => string);
637
638
  annotations?: Datum[];
639
+ autoPlaceAnnotations?: AutoPlaceAnnotations;
638
640
  svgAnnotationRules?: (annotation: Datum, index: number, context: AnnotationContext) => ReactNode;
639
641
  showGrid?: boolean;
640
642
  legend?: ReactNode | {