semiotic 3.6.0 → 3.7.1

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 (122) hide show
  1. package/CLAUDE.md +192 -228
  2. package/README.md +70 -17
  3. package/ai/cli.js +41 -0
  4. package/ai/componentMetadata.cjs +11 -2
  5. package/ai/dist/mcp-server.js +625 -10
  6. package/ai/examples.md +98 -0
  7. package/ai/schema.json +581 -1
  8. package/ai/system-prompt.md +7 -4
  9. package/dist/components/AccessibleNavTree.d.ts +26 -0
  10. package/dist/components/Annotation.d.ts +41 -15
  11. package/dist/components/CategoryColors.d.ts +1 -1
  12. package/dist/components/ChartContainer.d.ts +32 -2
  13. package/dist/components/ChartGrid.d.ts +1 -1
  14. package/dist/components/ContextLayout.d.ts +1 -1
  15. package/dist/components/DataSummaryContext.d.ts +1 -1
  16. package/dist/components/DetailsPanel.d.ts +1 -1
  17. package/dist/components/Legend.d.ts +3 -2
  18. package/dist/components/LinkedCharts.d.ts +1 -1
  19. package/dist/components/ThemeProvider.d.ts +1 -1
  20. package/dist/components/Tooltip/FlippingTooltip.d.ts +1 -1
  21. package/dist/components/Tooltip/Tooltip.d.ts +2 -2
  22. package/dist/components/ai/annotationProvenance.d.ts +349 -0
  23. package/dist/components/ai/audienceProfile.d.ts +60 -3
  24. package/dist/components/ai/chartCapabilityTypes.d.ts +60 -2
  25. package/dist/components/ai/chartRoles.d.ts +27 -0
  26. package/dist/components/ai/conversationArc.d.ts +379 -0
  27. package/dist/components/ai/dataScaleProfile.d.ts +320 -0
  28. package/dist/components/ai/describeChart.d.ts +114 -0
  29. package/dist/components/ai/navigationTree.d.ts +45 -0
  30. package/dist/components/ai/qualityScorecard.d.ts +11 -0
  31. package/dist/components/ai/readerGrounding.d.ts +70 -0
  32. package/dist/components/ai/suggestCharts.d.ts +34 -1
  33. package/dist/components/ai/useConversationArc.d.ts +89 -0
  34. package/dist/components/ai/useNavigationSync.d.ts +61 -0
  35. package/dist/components/ai/variantDiscovery.d.ts +168 -0
  36. package/dist/components/charts/geo/ChoroplethMap.d.ts +2 -1
  37. package/dist/components/charts/network/CirclePack.d.ts +2 -1
  38. package/dist/components/charts/network/OrbitDiagram.d.ts +1 -1
  39. package/dist/components/charts/network/TreeDiagram.d.ts +2 -1
  40. package/dist/components/charts/network/Treemap.d.ts +2 -1
  41. package/dist/components/charts/realtime/RealtimeHeatmap.d.ts +3 -0
  42. package/dist/components/charts/realtime/RealtimeHistogram.d.ts +4 -1
  43. package/dist/components/charts/realtime/RealtimeLineChart.d.ts +3 -0
  44. package/dist/components/charts/realtime/RealtimeSwarmChart.d.ts +3 -0
  45. package/dist/components/charts/realtime/RealtimeWaterfallChart.d.ts +3 -0
  46. package/dist/components/charts/shared/ChartError.d.ts +2 -1
  47. package/dist/components/charts/shared/annotationHierarchy.d.ts +42 -0
  48. package/dist/components/charts/shared/annotationResolvers.d.ts +3 -2
  49. package/dist/components/charts/shared/annotationRules.d.ts +16 -0
  50. package/dist/components/charts/shared/annotationTypes.d.ts +14 -0
  51. package/dist/components/charts/shared/auditAccessibility.d.ts +90 -0
  52. package/dist/components/charts/shared/chartSpecs.d.ts +2 -3
  53. package/dist/components/charts/shared/diagnoseConfig.d.ts +4 -6
  54. package/dist/components/charts/shared/selectionUtils.d.ts +5 -2
  55. package/dist/components/charts/shared/streamPropsHelpers.d.ts +2 -0
  56. package/dist/components/charts/shared/types.d.ts +5 -1
  57. package/dist/components/charts/shared/withChartWrapper.d.ts +1 -1
  58. package/dist/components/charts/value/BigNumber.capability.d.ts +13 -0
  59. package/dist/components/charts/value/BigNumber.d.ts +14 -0
  60. package/dist/components/charts/value/formatting.d.ts +40 -0
  61. package/dist/components/charts/value/thresholdSparkline.d.ts +40 -0
  62. package/dist/components/charts/value/types.d.ts +292 -0
  63. package/dist/components/charts/xy/MinimapChart.d.ts +2 -1
  64. package/dist/components/charts/xy/ScatterplotMatrix.d.ts +2 -1
  65. package/dist/components/realtime/lifecycleBands.d.ts +44 -0
  66. package/dist/components/realtime/types.d.ts +23 -8
  67. package/dist/components/recipes/annotationDensity.d.ts +69 -0
  68. package/dist/components/recipes/annotationLayout.d.ts +93 -0
  69. package/dist/components/semiotic-ai.d.ts +38 -15
  70. package/dist/components/semiotic-realtime.d.ts +2 -0
  71. package/dist/components/semiotic-recipes.d.ts +4 -0
  72. package/dist/components/semiotic-server.d.ts +2 -1
  73. package/dist/components/semiotic-utils.d.ts +8 -0
  74. package/dist/components/semiotic-value.d.ts +55 -0
  75. package/dist/components/semiotic.d.ts +7 -0
  76. package/dist/components/server/renderEvidence.d.ts +92 -0
  77. package/dist/components/server/renderToStaticSVG.d.ts +14 -1
  78. package/dist/components/server/staticAnnotations.d.ts +2 -0
  79. package/dist/components/stream/AccessibleDataTable.d.ts +15 -6
  80. package/dist/components/stream/FocusRing.d.ts +2 -1
  81. package/dist/components/stream/MarginalGraphics.d.ts +2 -1
  82. package/dist/components/stream/NetworkSVGOverlay.d.ts +13 -6
  83. package/dist/components/stream/OrdinalBrushOverlay.d.ts +19 -1
  84. package/dist/components/stream/OrdinalSVGOverlay.d.ts +4 -2
  85. package/dist/components/stream/SVGOverlay.d.ts +5 -2
  86. package/dist/components/stream/XYBrushOverlay.d.ts +21 -1
  87. package/dist/components/stream/geoTypes.d.ts +3 -0
  88. package/dist/components/stream/networkTypes.d.ts +2 -0
  89. package/dist/components/stream/ordinalTypes.d.ts +2 -0
  90. package/dist/components/stream/types.d.ts +2 -0
  91. package/dist/geo.min.js +1 -1
  92. package/dist/geo.module.min.js +1 -1
  93. package/dist/network.min.js +1 -1
  94. package/dist/network.module.min.js +1 -1
  95. package/dist/ordinal.min.js +1 -1
  96. package/dist/ordinal.module.min.js +1 -1
  97. package/dist/realtime.min.js +1 -1
  98. package/dist/realtime.module.min.js +1 -1
  99. package/dist/semiotic-ai.d.ts +38 -15
  100. package/dist/semiotic-ai.min.js +1 -1
  101. package/dist/semiotic-ai.module.min.js +1 -1
  102. package/dist/semiotic-realtime.d.ts +2 -0
  103. package/dist/semiotic-recipes.d.ts +4 -0
  104. package/dist/semiotic-recipes.min.js +1 -1
  105. package/dist/semiotic-recipes.module.min.js +1 -1
  106. package/dist/semiotic-server.d.ts +2 -1
  107. package/dist/semiotic-themes.min.js +1 -1
  108. package/dist/semiotic-themes.module.min.js +1 -1
  109. package/dist/semiotic-utils.d.ts +8 -0
  110. package/dist/semiotic-utils.min.js +1 -1
  111. package/dist/semiotic-utils.module.min.js +1 -1
  112. package/dist/semiotic-value.d.ts +55 -0
  113. package/dist/semiotic-value.min.js +2 -0
  114. package/dist/semiotic-value.module.min.js +2 -0
  115. package/dist/semiotic.d.ts +7 -0
  116. package/dist/semiotic.min.js +1 -1
  117. package/dist/semiotic.module.min.js +1 -1
  118. package/dist/server.min.js +1 -1
  119. package/dist/server.module.min.js +1 -1
  120. package/dist/xy.min.js +1 -1
  121. package/dist/xy.module.min.js +1 -1
  122. package/package.json +19 -5
package/ai/examples.md CHANGED
@@ -1181,3 +1181,101 @@ import { BarChart } from "semiotic/ai"
1181
1181
  ```
1182
1182
 
1183
1183
  Key props: `y-threshold` works on vertical ordinal charts. `category-highlight` highlights a category column. `labelPosition` controls label placement.
1184
+
1185
+ ---
1186
+
1187
+ ## Value Charts — One Number Is The Visualization
1188
+
1189
+ ### BigNumber (KPI tile — comparison + target + threshold zones)
1190
+
1191
+ ```jsx
1192
+ import { BigNumber } from "semiotic/value"
1193
+
1194
+ <BigNumber
1195
+ value={1284900}
1196
+ label="Q3 Revenue"
1197
+ caption="Year-to-date bookings"
1198
+ format="currency"
1199
+ precision={0}
1200
+ comparison={{ value: 980000, label: "vs Q2" }}
1201
+ target={{ value: 1500000, label: "Q3 plan" }}
1202
+ thresholds={[
1203
+ { at: -Infinity, level: "danger" },
1204
+ { at: 1000000, level: "warning" },
1205
+ { at: 1300000, level: "success" },
1206
+ ]}
1207
+ />
1208
+ ```
1209
+
1210
+ Key props: `value` (the one number), `format` ("number"|"currency"|"percent"|"compact"|"duration"|fn), `comparison` derives a delta with auto-sentiment, `target` renders "X% of goal", `thresholds` map value to a semantic theme role (`--semiotic-{success|warning|danger|info}`). Suppress chrome via `mode="thumbnail"` for dense grids or `mode="inline"` for prose. Stream via `ref.current.push({ value, time })` — pair with `stalenessThreshold` to dim the card when updates stop.
1211
+
1212
+ ### BigNumber with a Semiotic chart embedded via `trendSlot` (wide / rectangular)
1213
+
1214
+ ```jsx
1215
+ import { BigNumber } from "semiotic/value"
1216
+ import { LineChart } from "semiotic/xy"
1217
+
1218
+ <BigNumber
1219
+ value={1284900}
1220
+ label="Q3 Revenue"
1221
+ format="currency"
1222
+ comparison={{ value: 980000, label: "vs Q2" }}
1223
+ trendSlot={(ctx) => (
1224
+ <LineChart
1225
+ data={[820000, 870000, 920000, 1010000, 1120000, 1284900].map((y, x) => ({ x, y }))}
1226
+ xAccessor="x"
1227
+ yAccessor="y"
1228
+ mode="sparkline"
1229
+ width={260}
1230
+ height={32}
1231
+ color={ctx.color}
1232
+ />
1233
+ )}
1234
+ />
1235
+ ```
1236
+
1237
+ Key props: BigNumber ships NO built-in chart renderer. `trendSlot` accepts any ReactNode (or `(ctx) => ReactNode`); pass a `LineChart`/`AreaChart` in `mode="sparkline"` for wide / rectangular charts. The slot context exposes `ctx.color` (resolved threshold colour) so the embedded chart picks up the BigNumber's level for cohesive theming.
1238
+
1239
+ ### BigNumber with a square Semiotic chart via `chartSlot`
1240
+
1241
+ ```jsx
1242
+ import { BigNumber } from "semiotic/value"
1243
+ import { DonutChart } from "semiotic/ordinal"
1244
+
1245
+ <BigNumber
1246
+ value={1284900}
1247
+ label="Q3 Revenue by region"
1248
+ format="currency"
1249
+ chartSlot={
1250
+ <DonutChart
1251
+ data={[
1252
+ { region: "NA", revenue: 540000 },
1253
+ { region: "EU", revenue: 420000 },
1254
+ { region: "APAC", revenue: 324900 },
1255
+ ]}
1256
+ categoryAccessor="region"
1257
+ valueAccessor="revenue"
1258
+ width={120}
1259
+ height={120}
1260
+ innerRadius={32}
1261
+ />
1262
+ }
1263
+ />
1264
+ ```
1265
+
1266
+ Key props: `chartSlot` is the square-aspect counterpart to `trendSlot`. The card splits horizontally — text content on the left, square chart on the right (DonutChart / PieChart / Scatterplot / Treemap / CirclePack). Pass both `trendSlot` and `chartSlot` to get the square chart on the right and the wide sparkline at the bottom.
1267
+
1268
+ ### BigNumber (inverted direction — lower is better)
1269
+
1270
+ ```jsx
1271
+ import { BigNumber } from "semiotic/value"
1272
+
1273
+ <BigNumber
1274
+ value={486}
1275
+ label="P99 latency"
1276
+ suffix=" ms"
1277
+ comparison={{ value: 410, label: "vs last week", direction: "lower-is-better" }}
1278
+ />
1279
+ ```
1280
+
1281
+ Key props: `direction: "lower-is-better"` flips sentiment colouring — a value that went UP now reads as negative (danger). Same pattern for error rate, churn, complaint count, etc.