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.
- package/CLAUDE.md +192 -228
- package/README.md +70 -17
- package/ai/cli.js +41 -0
- package/ai/componentMetadata.cjs +11 -2
- package/ai/dist/mcp-server.js +625 -10
- package/ai/examples.md +98 -0
- package/ai/schema.json +581 -1
- package/ai/system-prompt.md +7 -4
- package/dist/components/AccessibleNavTree.d.ts +26 -0
- package/dist/components/Annotation.d.ts +41 -15
- package/dist/components/CategoryColors.d.ts +1 -1
- package/dist/components/ChartContainer.d.ts +32 -2
- package/dist/components/ChartGrid.d.ts +1 -1
- package/dist/components/ContextLayout.d.ts +1 -1
- package/dist/components/DataSummaryContext.d.ts +1 -1
- package/dist/components/DetailsPanel.d.ts +1 -1
- package/dist/components/Legend.d.ts +3 -2
- package/dist/components/LinkedCharts.d.ts +1 -1
- package/dist/components/ThemeProvider.d.ts +1 -1
- package/dist/components/Tooltip/FlippingTooltip.d.ts +1 -1
- package/dist/components/Tooltip/Tooltip.d.ts +2 -2
- package/dist/components/ai/annotationProvenance.d.ts +349 -0
- package/dist/components/ai/audienceProfile.d.ts +60 -3
- package/dist/components/ai/chartCapabilityTypes.d.ts +60 -2
- package/dist/components/ai/chartRoles.d.ts +27 -0
- package/dist/components/ai/conversationArc.d.ts +379 -0
- package/dist/components/ai/dataScaleProfile.d.ts +320 -0
- package/dist/components/ai/describeChart.d.ts +114 -0
- package/dist/components/ai/navigationTree.d.ts +45 -0
- package/dist/components/ai/qualityScorecard.d.ts +11 -0
- package/dist/components/ai/readerGrounding.d.ts +70 -0
- package/dist/components/ai/suggestCharts.d.ts +34 -1
- package/dist/components/ai/useConversationArc.d.ts +89 -0
- package/dist/components/ai/useNavigationSync.d.ts +61 -0
- package/dist/components/ai/variantDiscovery.d.ts +168 -0
- package/dist/components/charts/geo/ChoroplethMap.d.ts +2 -1
- package/dist/components/charts/network/CirclePack.d.ts +2 -1
- package/dist/components/charts/network/OrbitDiagram.d.ts +1 -1
- package/dist/components/charts/network/TreeDiagram.d.ts +2 -1
- package/dist/components/charts/network/Treemap.d.ts +2 -1
- package/dist/components/charts/realtime/RealtimeHeatmap.d.ts +3 -0
- package/dist/components/charts/realtime/RealtimeHistogram.d.ts +4 -1
- package/dist/components/charts/realtime/RealtimeLineChart.d.ts +3 -0
- package/dist/components/charts/realtime/RealtimeSwarmChart.d.ts +3 -0
- package/dist/components/charts/realtime/RealtimeWaterfallChart.d.ts +3 -0
- package/dist/components/charts/shared/ChartError.d.ts +2 -1
- package/dist/components/charts/shared/annotationHierarchy.d.ts +42 -0
- package/dist/components/charts/shared/annotationResolvers.d.ts +3 -2
- package/dist/components/charts/shared/annotationRules.d.ts +16 -0
- package/dist/components/charts/shared/annotationTypes.d.ts +14 -0
- package/dist/components/charts/shared/auditAccessibility.d.ts +90 -0
- package/dist/components/charts/shared/chartSpecs.d.ts +2 -3
- package/dist/components/charts/shared/diagnoseConfig.d.ts +4 -6
- package/dist/components/charts/shared/selectionUtils.d.ts +5 -2
- package/dist/components/charts/shared/streamPropsHelpers.d.ts +2 -0
- package/dist/components/charts/shared/types.d.ts +5 -1
- package/dist/components/charts/shared/withChartWrapper.d.ts +1 -1
- package/dist/components/charts/value/BigNumber.capability.d.ts +13 -0
- package/dist/components/charts/value/BigNumber.d.ts +14 -0
- package/dist/components/charts/value/formatting.d.ts +40 -0
- package/dist/components/charts/value/thresholdSparkline.d.ts +40 -0
- package/dist/components/charts/value/types.d.ts +292 -0
- package/dist/components/charts/xy/MinimapChart.d.ts +2 -1
- package/dist/components/charts/xy/ScatterplotMatrix.d.ts +2 -1
- package/dist/components/realtime/lifecycleBands.d.ts +44 -0
- package/dist/components/realtime/types.d.ts +23 -8
- package/dist/components/recipes/annotationDensity.d.ts +69 -0
- package/dist/components/recipes/annotationLayout.d.ts +93 -0
- package/dist/components/semiotic-ai.d.ts +38 -15
- package/dist/components/semiotic-realtime.d.ts +2 -0
- package/dist/components/semiotic-recipes.d.ts +4 -0
- package/dist/components/semiotic-server.d.ts +2 -1
- package/dist/components/semiotic-utils.d.ts +8 -0
- package/dist/components/semiotic-value.d.ts +55 -0
- package/dist/components/semiotic.d.ts +7 -0
- package/dist/components/server/renderEvidence.d.ts +92 -0
- package/dist/components/server/renderToStaticSVG.d.ts +14 -1
- package/dist/components/server/staticAnnotations.d.ts +2 -0
- package/dist/components/stream/AccessibleDataTable.d.ts +15 -6
- package/dist/components/stream/FocusRing.d.ts +2 -1
- package/dist/components/stream/MarginalGraphics.d.ts +2 -1
- package/dist/components/stream/NetworkSVGOverlay.d.ts +13 -6
- package/dist/components/stream/OrdinalBrushOverlay.d.ts +19 -1
- package/dist/components/stream/OrdinalSVGOverlay.d.ts +4 -2
- package/dist/components/stream/SVGOverlay.d.ts +5 -2
- package/dist/components/stream/XYBrushOverlay.d.ts +21 -1
- package/dist/components/stream/geoTypes.d.ts +3 -0
- package/dist/components/stream/networkTypes.d.ts +2 -0
- package/dist/components/stream/ordinalTypes.d.ts +2 -0
- package/dist/components/stream/types.d.ts +2 -0
- package/dist/geo.min.js +1 -1
- package/dist/geo.module.min.js +1 -1
- package/dist/network.min.js +1 -1
- package/dist/network.module.min.js +1 -1
- package/dist/ordinal.min.js +1 -1
- package/dist/ordinal.module.min.js +1 -1
- package/dist/realtime.min.js +1 -1
- package/dist/realtime.module.min.js +1 -1
- package/dist/semiotic-ai.d.ts +38 -15
- package/dist/semiotic-ai.min.js +1 -1
- package/dist/semiotic-ai.module.min.js +1 -1
- package/dist/semiotic-realtime.d.ts +2 -0
- package/dist/semiotic-recipes.d.ts +4 -0
- package/dist/semiotic-recipes.min.js +1 -1
- package/dist/semiotic-recipes.module.min.js +1 -1
- package/dist/semiotic-server.d.ts +2 -1
- package/dist/semiotic-themes.min.js +1 -1
- package/dist/semiotic-themes.module.min.js +1 -1
- package/dist/semiotic-utils.d.ts +8 -0
- package/dist/semiotic-utils.min.js +1 -1
- package/dist/semiotic-utils.module.min.js +1 -1
- package/dist/semiotic-value.d.ts +55 -0
- package/dist/semiotic-value.min.js +2 -0
- package/dist/semiotic-value.module.min.js +2 -0
- package/dist/semiotic.d.ts +7 -0
- package/dist/semiotic.min.js +1 -1
- package/dist/semiotic.module.min.js +1 -1
- package/dist/server.min.js +1 -1
- package/dist/server.module.min.js +1 -1
- package/dist/xy.min.js +1 -1
- package/dist/xy.module.min.js +1 -1
- 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.
|