semiotic 3.5.3 → 3.5.4
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 +2 -2
- package/README.md +5 -5
- package/ai/componentMetadata.cjs +9 -2
- package/ai/dist/mcp-server.js +4 -1
- package/ai/examples.md +27 -0
- package/ai/schema.json +286 -41
- package/ai/system-prompt.md +1 -1
- package/dist/components/charts/index.d.ts +3 -3
- package/dist/components/charts/network/Treemap.d.ts +8 -0
- package/dist/components/charts/ordinal/GaugeChart.d.ts +10 -0
- package/dist/components/charts/realtime/RealtimeHistogram.d.ts +22 -0
- package/dist/components/charts/shared/gaugeGradient.d.ts +62 -0
- package/dist/components/charts/shared/hooks.d.ts +2 -2
- package/dist/components/charts/shared/streamPropsHelpers.d.ts +2 -2
- package/dist/components/charts/shared/types.d.ts +11 -2
- package/dist/components/charts/shared/useChartSetup.d.ts +2 -2
- package/dist/components/charts/shared/useCustomChartSetup.d.ts +1 -1
- package/dist/components/charts/xy/AreaChart.d.ts +15 -0
- package/dist/components/semiotic-ai.d.ts +1 -1
- package/dist/components/semiotic-realtime.d.ts +3 -3
- package/dist/components/semiotic-server.d.ts +1 -0
- package/dist/components/semiotic-xy.d.ts +1 -1
- package/dist/components/semiotic.d.ts +5 -4
- package/dist/components/server/renderToStaticSVG.d.ts +2 -0
- package/dist/components/server/staticLegend.d.ts +35 -0
- package/dist/components/store/ThemeStore.d.ts +2 -0
- package/dist/components/stream/NetworkSVGOverlay.d.ts +2 -1
- package/dist/components/stream/OrdinalSVGOverlay.d.ts +2 -1
- package/dist/components/stream/SVGOverlay.d.ts +2 -1
- package/dist/components/stream/SceneToSVG.d.ts +1 -1
- package/dist/components/stream/geoTypes.d.ts +2 -1
- package/dist/components/stream/hoverUtils.d.ts +1 -0
- package/dist/components/stream/legendRenderer.d.ts +2 -1
- package/dist/components/stream/networkTypes.d.ts +2 -1
- package/dist/components/stream/ordinalTypes.d.ts +16 -2
- package/dist/components/stream/renderers/wedgePathBuilder.d.ts +31 -0
- package/dist/components/stream/types.d.ts +2 -1
- package/dist/components/types/legendTypes.d.ts +15 -0
- package/dist/components/types/marginType.d.ts +17 -3
- 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 +1 -1
- package/dist/semiotic-ai.min.js +1 -1
- package/dist/semiotic-ai.module.min.js +1 -1
- package/dist/semiotic-realtime.d.ts +3 -3
- package/dist/semiotic-server.d.ts +1 -0
- package/dist/semiotic-utils.min.js +1 -1
- package/dist/semiotic-utils.module.min.js +1 -1
- package/dist/semiotic-xy.d.ts +1 -1
- package/dist/semiotic.d.ts +5 -4
- 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 +13 -21
package/CLAUDE.md
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
- Install: `npm install semiotic`
|
|
5
5
|
<!-- semiotic-bundle-sizes:start -->
|
|
6
6
|
<!-- Auto-generated by scripts/sync-bundle-sizes.mjs — do not edit by hand. -->
|
|
7
|
-
- **Use sub-path imports** — `semiotic/xy` (85KB gz), `semiotic/ordinal` (
|
|
7
|
+
- **Use sub-path imports** — `semiotic/xy` (85KB gz), `semiotic/ordinal` (69KB gz), `semiotic/network` (63KB gz), `semiotic/geo` (52KB gz), `semiotic/realtime` (90KB gz), `semiotic/server` (122KB gz), `semiotic/utils` (22KB gz), `semiotic/recipes` (5KB gz), `semiotic/themes` (4KB gz), `semiotic/data` (3KB gz), `semiotic/ai` (189KB gz). Full `semiotic` is 188KB gz.
|
|
8
8
|
<!-- semiotic-bundle-sizes:end -->
|
|
9
9
|
- CLI: `npx semiotic-ai [--schema|--compact|--examples|--doctor]`
|
|
10
10
|
- MCP: `npx semiotic-mcp`
|
|
@@ -84,7 +84,7 @@ Helpers: `resolveReferenceGeography("world-110m"|"world-50m")`, `mergeData(featu
|
|
|
84
84
|
|
|
85
85
|
Push API: `ref.current.push({ time, value })`. All pushed data **must** include a time field.
|
|
86
86
|
|
|
87
|
-
**RealtimeLineChart**, **RealtimeHistogram** (+ `brush`, `onBrush`, `linkedBrush`), **RealtimeSwarmChart**, **RealtimeWaterfallChart**, **RealtimeHeatmap**, **Streaming Sankey** (StreamNetworkFrame + `showParticles`)
|
|
87
|
+
**RealtimeLineChart**, **RealtimeHistogram** (+ `brush`, `onBrush`, `linkedBrush`, `direction`), **TemporalHistogram** (static-data sibling of RealtimeHistogram — same props minus `windowSize`/`windowMode`; takes a bounded `data` array), **RealtimeSwarmChart**, **RealtimeWaterfallChart**, **RealtimeHeatmap**, **Streaming Sankey** (StreamNetworkFrame + `showParticles`)
|
|
88
88
|
|
|
89
89
|
Encoding: `decay`, `pulse`, `transition`, `staleness` — compose freely.
|
|
90
90
|
|
package/README.md
CHANGED
|
@@ -288,17 +288,17 @@ Semiotic ships 12 entry points. **Don't import from `"semiotic"` unless you need
|
|
|
288
288
|
| Entry Point | gzip | What's inside |
|
|
289
289
|
|---|---|---|
|
|
290
290
|
| `semiotic/xy` | **85 KB** | LineChart, AreaChart, Scatterplot, Heatmap, + 8 more XY charts |
|
|
291
|
-
| `semiotic/ordinal` | **
|
|
291
|
+
| `semiotic/ordinal` | **69 KB** | BarChart, PieChart, BoxPlot, Histogram, + 11 more categorical charts |
|
|
292
292
|
| `semiotic/network` | **63 KB** | ForceDirectedGraph, SankeyDiagram, ProcessSankey, Treemap, + 4 more |
|
|
293
|
-
| `semiotic/geo` | **
|
|
293
|
+
| `semiotic/geo` | **52 KB** | ChoroplethMap, FlowMap, DistanceCartogram, ProportionalSymbolMap |
|
|
294
294
|
| `semiotic/realtime` | **90 KB** | RealtimeLineChart, RealtimeHistogram, + 3 streaming charts |
|
|
295
|
-
| `semiotic/server` | **
|
|
295
|
+
| `semiotic/server` | **122 KB** | renderChart, renderDashboard, renderToImage, renderToAnimatedGif |
|
|
296
296
|
| `semiotic/utils` | **22 KB** | ThemeProvider, validators, serialization — no chart components |
|
|
297
297
|
| `semiotic/recipes` | **5 KB** | Pure layout functions (waffle, marimekko, flextree, dagre, …) |
|
|
298
298
|
| `semiotic/themes` | **4 KB** | Theme presets only (tufte, carbon, etc.) |
|
|
299
299
|
| `semiotic/data` | **3 KB** | bin, rollup, groupBy, pivot, fromVegaLite |
|
|
300
|
-
| `semiotic/ai` | **
|
|
301
|
-
| `semiotic` | **
|
|
300
|
+
| `semiotic/ai` | **189 KB** | All 41 HOCs + validation — optimized for LLM code generation |
|
|
301
|
+
| `semiotic` | **188 KB** | Everything below (full bundle) |
|
|
302
302
|
|
|
303
303
|
<!-- semiotic-bundle-sizes:end -->
|
|
304
304
|
|
package/ai/componentMetadata.cjs
CHANGED
|
@@ -21,7 +21,7 @@ const COMPONENTS_BY_CATEGORY = {
|
|
|
21
21
|
"ChoroplethMap", "ProportionalSymbolMap", "FlowMap", "DistanceCartogram",
|
|
22
22
|
],
|
|
23
23
|
realtime: [
|
|
24
|
-
"RealtimeLineChart", "RealtimeHistogram", "RealtimeSwarmChart",
|
|
24
|
+
"RealtimeLineChart", "RealtimeHistogram", "TemporalHistogram", "RealtimeSwarmChart",
|
|
25
25
|
"RealtimeWaterfallChart", "RealtimeHeatmap",
|
|
26
26
|
],
|
|
27
27
|
}
|
|
@@ -52,11 +52,18 @@ function importPathForCategory(category) {
|
|
|
52
52
|
function metadataForComponent(entryOrName) {
|
|
53
53
|
const name = typeof entryOrName === "string" ? entryOrName : entryOrName.name
|
|
54
54
|
const category = categoryForComponent(name)
|
|
55
|
+
// Realtime push-streaming charts are browser-only by design.
|
|
56
|
+
// TemporalHistogram is the static-data sibling living in the
|
|
57
|
+
// "realtime" category for documentation grouping — it accepts a
|
|
58
|
+
// bounded data array and is renderable through the SSR path like
|
|
59
|
+
// any other static HOC. Matches the name-prefix exclusion the
|
|
60
|
+
// check-surface-parity script applies.
|
|
61
|
+
const isPushOnly = category === "realtime" && name.startsWith("Realtime")
|
|
55
62
|
return {
|
|
56
63
|
name,
|
|
57
64
|
category,
|
|
58
65
|
importPath: importPathForCategory(category),
|
|
59
|
-
renderable:
|
|
66
|
+
renderable: !isPushOnly,
|
|
60
67
|
description: typeof entryOrName === "string" ? undefined : entryOrName.description,
|
|
61
68
|
}
|
|
62
69
|
}
|
package/ai/dist/mcp-server.js
CHANGED
|
@@ -6943,6 +6943,7 @@ var require_componentMetadata = __commonJS({
|
|
|
6943
6943
|
realtime: [
|
|
6944
6944
|
"RealtimeLineChart",
|
|
6945
6945
|
"RealtimeHistogram",
|
|
6946
|
+
"TemporalHistogram",
|
|
6946
6947
|
"RealtimeSwarmChart",
|
|
6947
6948
|
"RealtimeWaterfallChart",
|
|
6948
6949
|
"RealtimeHeatmap"
|
|
@@ -6970,11 +6971,12 @@ var require_componentMetadata = __commonJS({
|
|
|
6970
6971
|
function metadataForComponent2(entryOrName) {
|
|
6971
6972
|
const name = typeof entryOrName === "string" ? entryOrName : entryOrName.name;
|
|
6972
6973
|
const category = categoryForComponent(name);
|
|
6974
|
+
const isPushOnly = category === "realtime" && name.startsWith("Realtime");
|
|
6973
6975
|
return {
|
|
6974
6976
|
name,
|
|
6975
6977
|
category,
|
|
6976
6978
|
importPath: importPathForCategory(category),
|
|
6977
|
-
renderable:
|
|
6979
|
+
renderable: !isPushOnly,
|
|
6978
6980
|
description: typeof entryOrName === "string" ? void 0 : entryOrName.description
|
|
6979
6981
|
};
|
|
6980
6982
|
}
|
|
@@ -32363,6 +32365,7 @@ var COMPONENT_REGISTRY = {
|
|
|
32363
32365
|
QuadrantChart: { component: import_ai.QuadrantChart, category: "xy" },
|
|
32364
32366
|
MultiAxisLineChart: { component: import_ai.MultiAxisLineChart, category: "xy" },
|
|
32365
32367
|
CandlestickChart: { component: import_ai.CandlestickChart, category: "xy" },
|
|
32368
|
+
TemporalHistogram: { component: import_ai.TemporalHistogram, category: "xy" },
|
|
32366
32369
|
BarChart: { component: import_ai.BarChart, category: "ordinal" },
|
|
32367
32370
|
StackedBarChart: { component: import_ai.StackedBarChart, category: "ordinal" },
|
|
32368
32371
|
GroupedBarChart: { component: import_ai.GroupedBarChart, category: "ordinal" },
|
package/ai/examples.md
CHANGED
|
@@ -292,6 +292,33 @@ const data = [
|
|
|
292
292
|
|
|
293
293
|
Key props: `orderAccessor` sequences points along the path, Viridis gradient from start→end
|
|
294
294
|
|
|
295
|
+
### TemporalHistogram
|
|
296
|
+
|
|
297
|
+
```jsx
|
|
298
|
+
import { TemporalHistogram } from "semiotic/ai"
|
|
299
|
+
|
|
300
|
+
// One row per event; the chart bins events into `binSize` time buckets.
|
|
301
|
+
const events = [
|
|
302
|
+
{ time: 1700000000000, value: 1, category: "errors" },
|
|
303
|
+
{ time: 1700000005000, value: 1, category: "warnings" },
|
|
304
|
+
{ time: 1700000007000, value: 1, category: "errors" },
|
|
305
|
+
{ time: 1700000020000, value: 1, category: "info" },
|
|
306
|
+
{ time: 1700000022000, value: 1, category: "info" },
|
|
307
|
+
{ time: 1700000040000, value: 1, category: "errors" },
|
|
308
|
+
{ time: 1700000045000, value: 1, category: "warnings" }
|
|
309
|
+
]
|
|
310
|
+
|
|
311
|
+
<TemporalHistogram
|
|
312
|
+
data={events}
|
|
313
|
+
binSize={15000}
|
|
314
|
+
categoryAccessor="category"
|
|
315
|
+
colors={{ errors: "#dc3545", warnings: "#fd7e14", info: "#007bff" }}
|
|
316
|
+
enableHover
|
|
317
|
+
/>
|
|
318
|
+
```
|
|
319
|
+
|
|
320
|
+
Static-data sibling of `RealtimeHistogram` — accepts a bounded `data` array instead of a push-mode ref. Same props minus `windowSize` / `windowMode`. Use for backfilled or historical temporal histograms where the time range is fixed; reach for `RealtimeHistogram` when events arrive over time and you want a sliding window.
|
|
321
|
+
|
|
295
322
|
---
|
|
296
323
|
|
|
297
324
|
## Flat Array — Ordinal Charts
|