semiotic 3.7.5 → 3.8.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 +63 -18
- package/README.md +121 -27
- package/agent-skill/semiotic-charts/SKILL.md +146 -0
- package/ai/cli.js +133 -45
- package/ai/componentMetadata.cjs +6 -1
- package/ai/dist/mcp-server.js +1741 -163
- package/ai/examples.md +174 -0
- package/ai/schema.json +2733 -536
- package/ai/surface-manifest.json +201 -0
- package/ai/system-prompt.md +20 -4
- package/dist/__tests__/scenarios/mcpProtocolTypes.d.ts +20 -0
- package/dist/components/AccessibleNavTree.d.ts +7 -1
- package/dist/components/CategoryColors.d.ts +1 -1
- package/dist/components/ChartContainer.d.ts +91 -0
- package/dist/components/ChartGrid.d.ts +11 -1
- package/dist/components/CircularBrush.d.ts +61 -0
- package/dist/components/ContextLayout.d.ts +5 -1
- package/dist/components/DirectManipulationControl.d.ts +63 -0
- package/dist/components/LinkedCharts.d.ts +3 -1
- package/dist/components/MobileAnnotationCalloutList.d.ts +13 -0
- package/dist/components/MobileChartContainer.d.ts +51 -0
- package/dist/components/MobileStandardControls.d.ts +68 -0
- package/dist/components/SmallMultipleChart.d.ts +84 -0
- package/dist/components/Tooltip/FlippingTooltip.d.ts +21 -0
- package/dist/components/ai/ChartRecipe.d.ts +16 -0
- package/dist/components/ai/IntentMark.d.ts +15 -0
- package/dist/components/ai/chartCapabilities.d.ts +8 -1
- package/dist/components/ai/chartCapabilityTypes.d.ts +26 -1
- package/dist/components/ai/chartClinic.d.ts +91 -0
- package/dist/components/ai/chartClinicMetadata.generated.d.ts +15 -0
- package/dist/components/ai/chartRecipeRegistry.d.ts +14 -0
- package/dist/components/ai/chartRecipes.d.ts +278 -0
- package/dist/components/ai/dataPitfallsBridge.d.ts +102 -0
- package/dist/components/ai/describeChart.d.ts +7 -0
- package/dist/components/ai/describeRecipeChart.d.ts +16 -0
- package/dist/components/ai/generativeChart.d.ts +28 -3
- package/dist/components/ai/intentManifest.d.ts +62 -0
- package/dist/components/ai/navigationTree.d.ts +3 -0
- package/dist/components/ai/observedSceneAudit.d.ts +72 -0
- package/dist/components/ai/readerGrounding.d.ts +83 -0
- package/dist/components/ai/recipeCapability.d.ts +8 -0
- package/dist/components/ai/recipeNavigation.d.ts +13 -0
- package/dist/components/ai/recipeSemantics.d.ts +11 -0
- package/dist/components/ai/repairChartConfig.d.ts +9 -0
- package/dist/components/ai/suggestCharts.d.ts +11 -1
- package/dist/components/ai/useNavigationSync.d.ts +17 -2
- package/dist/components/chartContainerMobile.d.ts +9 -0
- package/dist/components/charts/custom/GeoCustomChart.d.ts +48 -0
- package/dist/components/charts/custom/NetworkCustomChart.d.ts +8 -2
- package/dist/components/charts/custom/OrdinalCustomChart.d.ts +8 -2
- package/dist/components/charts/custom/XYCustomChart.d.ts +11 -2
- package/dist/components/charts/geo/ChoroplethMap.d.ts +19 -2
- package/dist/components/charts/geo/DistanceCartogram.d.ts +15 -3
- package/dist/components/charts/geo/FlowMap.d.ts +11 -7
- package/dist/components/charts/geo/ProportionalSymbolMap.d.ts +15 -3
- package/dist/components/charts/geo/index.d.ts +2 -0
- package/dist/components/charts/index.d.ts +35 -1
- package/dist/components/charts/network/ChordDiagram.d.ts +10 -2
- package/dist/components/charts/network/CirclePack.d.ts +1 -1
- package/dist/components/charts/network/ForceDirectedGraph.d.ts +26 -5
- package/dist/components/charts/network/OrbitDiagram.d.ts +1 -1
- package/dist/components/charts/network/ProcessSankey.d.ts +1 -1
- package/dist/components/charts/network/SankeyDiagram.d.ts +10 -2
- package/dist/components/charts/network/TreeDiagram.d.ts +1 -1
- package/dist/components/charts/network/Treemap.d.ts +1 -1
- package/dist/components/charts/network/useForceLayout.d.ts +17 -0
- package/dist/components/charts/ordinal/BarChart.d.ts +22 -1
- package/dist/components/charts/ordinal/BoxPlot.d.ts +1 -1
- package/dist/components/charts/ordinal/DonutChart.d.ts +1 -1
- package/dist/components/charts/ordinal/DotPlot.d.ts +1 -1
- package/dist/components/charts/ordinal/FunnelChart.d.ts +1 -1
- package/dist/components/charts/ordinal/GroupedBarChart.d.ts +12 -1
- package/dist/components/charts/ordinal/Histogram.d.ts +1 -1
- package/dist/components/charts/ordinal/PieChart.d.ts +1 -1
- package/dist/components/charts/ordinal/RidgelinePlot.d.ts +1 -1
- package/dist/components/charts/ordinal/StackedBarChart.d.ts +12 -1
- package/dist/components/charts/ordinal/SwarmPlot.d.ts +1 -1
- package/dist/components/charts/ordinal/SwimlaneChart.d.ts +1 -1
- package/dist/components/charts/ordinal/ViolinPlot.d.ts +1 -1
- package/dist/components/charts/physics/ChainReactionChart.d.ts +9 -0
- package/dist/components/charts/physics/CollisionSwarmChart.capability.d.ts +2 -0
- package/dist/components/charts/physics/CollisionSwarmChart.d.ts +54 -0
- package/dist/components/charts/physics/EventDropChart.capability.d.ts +2 -0
- package/dist/components/charts/physics/EventDropChart.d.ts +60 -0
- package/dist/components/charts/physics/GaltonBoardChart.capability.d.ts +2 -0
- package/dist/components/charts/physics/GaltonBoardChart.d.ts +74 -0
- package/dist/components/charts/physics/GauntletChart.capability.d.ts +2 -0
- package/dist/components/charts/physics/GauntletChart.d.ts +73 -0
- package/dist/components/charts/physics/PhysicalFlowChart.capability.d.ts +2 -0
- package/dist/components/charts/physics/PhysicalFlowChart.d.ts +63 -0
- package/dist/components/charts/physics/PhysicsCustomChart.d.ts +99 -0
- package/dist/components/charts/physics/PhysicsPileChart.capability.d.ts +2 -0
- package/dist/components/charts/physics/PhysicsPileChart.d.ts +60 -0
- package/dist/components/charts/physics/ProcessFlowChart.capability.d.ts +2 -0
- package/dist/components/charts/physics/ProcessFlowChart.d.ts +96 -0
- package/dist/components/charts/physics/chainReactionOverlay.d.ts +22 -0
- package/dist/components/charts/physics/chainReactionRuntime.d.ts +37 -0
- package/dist/components/charts/physics/chainReactionTypes.d.ts +97 -0
- package/dist/components/charts/physics/collisionSwarmPhysics.d.ts +27 -0
- package/dist/components/charts/physics/dependencyMachine.d.ts +188 -0
- package/dist/components/charts/physics/eventDropPhysics.d.ts +64 -0
- package/dist/components/charts/physics/galtonBoardPhysics.d.ts +28 -0
- package/dist/components/charts/physics/gauntletChartProps.d.ts +67 -0
- package/dist/components/charts/physics/gauntletChrome.d.ts +33 -0
- package/dist/components/charts/physics/gauntletController.d.ts +73 -0
- package/dist/components/charts/physics/gauntletEffects.d.ts +36 -0
- package/dist/components/charts/physics/gauntletPhysics.d.ts +71 -0
- package/dist/components/charts/physics/gauntletRuntime.d.ts +42 -0
- package/dist/components/charts/physics/gauntletTypes.d.ts +213 -0
- package/dist/components/charts/physics/physicalFlowPhysics.d.ts +57 -0
- package/dist/components/charts/physics/physicsChartShared.d.ts +57 -0
- package/dist/components/charts/physics/physicsChartUtils.d.ts +18 -0
- package/dist/components/charts/physics/physicsCustomLayout.d.ts +32 -0
- package/dist/components/charts/physics/physicsEncoding.d.ts +142 -0
- package/dist/components/charts/physics/physicsHocHandle.d.ts +53 -0
- package/dist/components/charts/physics/physicsHocUtils.d.ts +128 -0
- package/dist/components/charts/physics/physicsPilePhysics.d.ts +41 -0
- package/dist/components/charts/physics/physicsProcessPrimitives.d.ts +38 -0
- package/dist/components/charts/physics/processFlowPhysics.d.ts +97 -0
- package/dist/components/charts/realtime/RealtimeHeatmap.d.ts +9 -1
- package/dist/components/charts/realtime/RealtimeHistogram.d.ts +9 -1
- package/dist/components/charts/realtime/RealtimeLineChart.d.ts +9 -1
- package/dist/components/charts/realtime/RealtimeSwarmChart.d.ts +16 -2
- package/dist/components/charts/realtime/RealtimeWaterfallChart.d.ts +9 -1
- package/dist/components/charts/shared/AnnotationLabel.d.ts +88 -0
- package/dist/components/charts/shared/annotationActivation.d.ts +35 -0
- package/dist/components/charts/shared/annotationLabelLayout.d.ts +5 -0
- package/dist/components/charts/shared/annotationRules.d.ts +2 -1
- package/dist/components/charts/shared/auditMobileVisualization.d.ts +91 -0
- package/dist/components/charts/shared/chartDefinitionPilot.d.ts +145 -0
- package/dist/components/charts/shared/chartFamilySets.d.ts +20 -0
- package/dist/components/charts/shared/chartSelectionUtils.d.ts +4 -0
- package/dist/components/charts/shared/chartSpecCore.d.ts +165 -0
- package/dist/components/charts/shared/chartSpecs.d.ts +8 -127
- package/dist/components/charts/shared/chartSpecsGeo.d.ts +2 -0
- package/dist/components/charts/shared/chartSpecsNetwork.d.ts +2 -0
- package/dist/components/charts/shared/chartSpecsOrdinal.d.ts +2 -0
- package/dist/components/charts/shared/chartSpecsPhysics.d.ts +2 -0
- package/dist/components/charts/shared/chartSpecsRealtime.d.ts +2 -0
- package/dist/components/charts/shared/chartSpecsValue.d.ts +2 -0
- package/dist/components/charts/shared/chartSpecsXY.d.ts +2 -0
- package/dist/components/charts/shared/colorContrast.d.ts +3 -0
- package/dist/components/charts/shared/colorUtils.d.ts +16 -1
- package/dist/components/charts/shared/datumTypes.d.ts +2 -0
- package/dist/components/charts/shared/diagnoseAnnotationChecks.d.ts +6 -0
- package/dist/components/charts/shared/diagnoseConfig.d.ts +9 -14
- package/dist/components/charts/shared/diagnoseMisleadingChecks.d.ts +9 -0
- package/dist/components/charts/shared/diagnosePhysicsChecks.d.ts +3 -0
- package/dist/components/charts/shared/diagnoseTypes.d.ts +10 -0
- package/dist/components/charts/shared/formatUtils.d.ts +3 -3
- package/dist/components/charts/shared/hatchFill.d.ts +87 -0
- package/dist/components/charts/shared/hooks.d.ts +34 -10
- package/dist/components/charts/shared/knownChartComponents.d.ts +9 -0
- package/dist/components/charts/shared/leastSquaresRegression.d.ts +16 -0
- package/dist/components/charts/shared/mergeShapeStyle.d.ts +3 -2
- package/dist/components/charts/shared/motionEncoding.d.ts +145 -0
- package/dist/components/charts/shared/responsiveRules.d.ts +56 -0
- package/dist/components/charts/shared/semanticInteractions.d.ts +42 -0
- package/dist/components/charts/shared/sparseArray.d.ts +1 -1
- package/dist/components/charts/shared/streamPropsHelpers.d.ts +17 -5
- package/dist/components/charts/shared/styleRules.d.ts +205 -0
- package/dist/components/charts/shared/temporalStrings.d.ts +7 -0
- package/dist/components/charts/shared/tooltipUtils.d.ts +22 -9
- package/dist/components/charts/shared/types.d.ts +58 -7
- package/dist/components/charts/shared/useAreaSeriesSetup.d.ts +16 -2
- package/dist/components/charts/shared/useChartSetup.d.ts +11 -4
- package/dist/components/charts/shared/useCustomChartSetup.d.ts +17 -5
- package/dist/components/charts/shared/useFrameImperativeHandle.d.ts +1 -2
- package/dist/components/charts/shared/useLikertAggregation.d.ts +4 -4
- package/dist/components/charts/shared/useNetworkChartSetup.d.ts +6 -2
- package/dist/components/charts/shared/useOrdinalBrush.d.ts +2 -1
- package/dist/components/charts/shared/useOrdinalPieceStyle.d.ts +25 -2
- package/dist/components/charts/shared/useStreamingLegend.d.ts +2 -2
- package/dist/components/charts/shared/useSyncedPushData.d.ts +49 -0
- package/dist/components/charts/shared/useXYLineStyle.d.ts +10 -0
- package/dist/components/charts/shared/useXYPointStyle.d.ts +19 -1
- package/dist/components/charts/shared/validateChartData.d.ts +7 -5
- package/dist/components/charts/shared/validationMap.d.ts +7 -9
- package/dist/components/charts/shared/validationMap.generated.d.ts +6 -0
- package/dist/components/charts/shared/withChartWrapper.d.ts +4 -3
- package/dist/components/charts/value/targetPresentation.d.ts +22 -0
- package/dist/components/charts/value/types.d.ts +5 -6
- package/dist/components/charts/xy/AreaChart.d.ts +9 -1
- package/dist/components/charts/xy/BubbleChart.d.ts +10 -1
- package/dist/components/charts/xy/ConnectedScatterplot.d.ts +7 -0
- package/dist/components/charts/xy/DifferenceChart.d.ts +1 -52
- package/dist/components/charts/xy/Heatmap.d.ts +2 -2
- package/dist/components/charts/xy/LineChart.d.ts +12 -1
- package/dist/components/charts/xy/MinimapChart.d.ts +1 -1
- package/dist/components/charts/xy/MultiAxisLineChart.d.ts +2 -2
- package/dist/components/charts/xy/QuadrantChart.d.ts +8 -1
- package/dist/components/charts/xy/Scatterplot.d.ts +11 -1
- package/dist/components/charts/xy/ScatterplotMatrix.d.ts +11 -1
- package/dist/components/charts/xy/StackedAreaChart.d.ts +16 -4
- package/dist/components/charts/xy/differenceSegments.d.ts +49 -0
- package/dist/components/charts/xy/scatterplotMatrixInteractionTypes.d.ts +12 -0
- package/dist/components/controls/SentenceFilter.d.ts +97 -0
- package/dist/components/controls/controlAudit.d.ts +24 -0
- package/dist/components/controls/controlContract.d.ts +57 -0
- package/dist/components/data/fromFlintChart.d.ts +74 -0
- package/dist/components/data/fromVegaLite.d.ts +46 -9
- package/dist/components/data/portability/index.d.ts +6 -3
- package/dist/components/data/portability/result.d.ts +52 -0
- package/dist/components/data/portability/spec.d.ts +31 -0
- package/dist/components/data/portability/vegaLite.d.ts +24 -6
- package/dist/components/export/chartConfig.d.ts +11 -0
- package/dist/components/realtime/types.d.ts +11 -0
- package/dist/components/recipes/annotationLayout.d.ts +29 -0
- package/dist/components/recipes/axisFixedForce.d.ts +119 -0
- package/dist/components/recipes/{gofishBoba.d.ts → boba.d.ts} +2 -2
- package/dist/components/recipes/cyclical.d.ts +39 -0
- package/dist/components/recipes/edgeRouter.d.ts +103 -0
- package/dist/components/recipes/forceLayout.d.ts +48 -0
- package/dist/components/recipes/forceLayoutAsync.d.ts +17 -0
- package/dist/components/recipes/gofishBobaHandwritten.d.ts +3 -0
- package/dist/components/recipes/gofishDisplayListFixtures.generated.d.ts +37 -0
- package/dist/components/recipes/gofishIR.d.ts +178 -132
- package/dist/components/recipes/gofishIRExamples.d.ts +30 -81
- package/dist/components/recipes/intervalLanes.d.ts +87 -0
- package/dist/components/recipes/intervals.d.ts +80 -0
- package/dist/components/recipes/isometricLandmarks.d.ts +88 -0
- package/dist/components/recipes/isotypeGlyphs.d.ts +17 -0
- package/dist/components/recipes/mobileAnnotationStrategy.d.ts +48 -0
- package/dist/components/recipes/mobileChartFamilyRecipes.d.ts +59 -0
- package/dist/components/recipes/networkAnalysis.d.ts +102 -0
- package/dist/components/recipes/networkLayouts.d.ts +83 -0
- package/dist/components/recipes/physics.d.ts +122 -0
- package/dist/components/recipes/physicsReference.d.ts +102 -0
- package/dist/components/recipes/processAggregates.d.ts +32 -0
- package/dist/components/recipes/processChrome.d.ts +67 -0
- package/dist/components/recipes/processJourney.d.ts +54 -0
- package/dist/components/recipes/processPhysics.d.ts +300 -0
- package/dist/components/recipes/processVolumeGeometry.d.ts +28 -0
- package/dist/components/recipes/radialCoords.d.ts +69 -0
- package/dist/components/recipes/random.d.ts +2 -0
- package/dist/components/recipes/recipeChrome.d.ts +91 -0
- package/dist/components/recipes/recipeGlyph.d.ts +42 -0
- package/dist/components/recipes/recipeLegend.d.ts +53 -1
- package/dist/components/recipes/recipeUtils.d.ts +52 -0
- package/dist/components/recipes/runs.d.ts +59 -0
- package/dist/components/recipes/tokenEncoding.d.ts +157 -0
- package/dist/components/recipes/tokenLayer.d.ts +79 -0
- package/dist/components/recipes/unitize.d.ts +108 -0
- package/dist/components/recipes/vector.d.ts +28 -0
- package/dist/components/recipes/waffle.d.ts +43 -0
- package/dist/components/rough/createRoughRenderMode.d.ts +46 -0
- package/dist/components/semiotic-ai-core.d.ts +47 -0
- package/dist/components/semiotic-ai.d.ts +53 -9
- package/dist/components/semiotic-controls.d.ts +20 -0
- package/dist/components/semiotic-experimental.d.ts +38 -9
- package/dist/components/semiotic-geo.d.ts +15 -0
- package/dist/components/semiotic-network.d.ts +15 -0
- package/dist/components/semiotic-ordinal.d.ts +14 -0
- package/dist/components/semiotic-physics-matter.d.ts +10 -0
- package/dist/components/semiotic-physics-rapier.d.ts +9 -0
- package/dist/components/semiotic-physics.d.ts +60 -0
- package/dist/components/semiotic-realtime-core.d.ts +34 -0
- package/dist/components/semiotic-realtime-react.d.ts +10 -0
- package/dist/components/semiotic-realtime.d.ts +4 -30
- package/dist/components/semiotic-recipes-core.d.ts +92 -0
- package/dist/components/semiotic-recipes-react.d.ts +7 -0
- package/dist/components/semiotic-recipes.d.ts +4 -43
- package/dist/components/semiotic-rough.d.ts +4 -0
- package/dist/components/semiotic-server-edge.d.ts +8 -0
- package/dist/components/semiotic-server-node.d.ts +5 -0
- package/dist/components/semiotic-server.d.ts +2 -2
- package/dist/components/semiotic-themes-core.d.ts +53 -0
- package/dist/components/semiotic-themes-react.d.ts +4 -0
- package/dist/components/semiotic-themes.d.ts +6 -76
- package/dist/components/semiotic-utils-core.d.ts +50 -0
- package/dist/components/semiotic-utils-react.d.ts +5 -0
- package/dist/components/semiotic-utils.d.ts +3 -39
- package/dist/components/semiotic-xy.d.ts +12 -0
- package/dist/components/semiotic.d.ts +44 -8
- package/dist/components/server/animatedGif.d.ts +36 -0
- package/dist/components/server/optionalImageTypes.d.ts +37 -0
- package/dist/components/server/renderEvidence.d.ts +1 -1
- package/dist/components/server/renderToStaticSVG.d.ts +3 -35
- package/dist/components/server/serverChartConfigShared.d.ts +21 -0
- package/dist/components/server/serverChartConfigs.d.ts +22 -12
- package/dist/components/server/serverChartConfigsCustom.d.ts +5 -0
- package/dist/components/server/serverChartConfigsGeo.d.ts +9 -0
- package/dist/components/server/serverChartConfigsNetwork.d.ts +8 -0
- package/dist/components/server/serverChartConfigsOrdinal.d.ts +16 -0
- package/dist/components/server/serverChartConfigsPhysics.d.ts +9 -0
- package/dist/components/server/serverChartConfigsXY.d.ts +11 -0
- package/dist/components/server/staticAnnotations.d.ts +6 -3
- package/dist/components/server/staticGeo.d.ts +4 -0
- package/dist/components/server/staticLegend.d.ts +2 -2
- package/dist/components/server/staticNetwork.d.ts +8 -0
- package/dist/components/server/staticOrdinal.d.ts +11 -0
- package/dist/components/server/staticPhysics.d.ts +3 -0
- package/dist/components/server/staticSVGChrome.d.ts +110 -0
- package/dist/components/server/staticXY.d.ts +4 -0
- package/dist/components/store/ObservationStore.d.ts +23 -2
- package/dist/components/store/themeSerialization.d.ts +32 -0
- package/dist/components/store/useChartInterrogation.d.ts +9 -0
- package/dist/components/stream/AccessibleDataTable.d.ts +7 -23
- package/dist/components/stream/AriaLiveTooltip.d.ts +9 -0
- package/dist/components/stream/CanvasHitTester.d.ts +4 -4
- package/dist/components/stream/DataSourceAdapter.d.ts +1 -1
- package/dist/components/stream/FocusRing.d.ts +4 -2
- package/dist/components/stream/FrameRuntime.d.ts +57 -0
- package/dist/components/stream/GeoCanvasHitTester.d.ts +1 -1
- package/dist/components/stream/GeoParticlePool.d.ts +1 -1
- package/dist/components/stream/GeoPipelineStore.d.ts +62 -3
- package/dist/components/stream/GeoSVGOverlay.d.ts +64 -0
- package/dist/components/stream/NetworkCanvasHitTester.d.ts +2 -1
- package/dist/components/stream/NetworkPipelineStore.d.ts +44 -36
- package/dist/components/stream/NetworkSSRFrame.d.ts +17 -0
- package/dist/components/stream/NetworkSVGOverlay.d.ts +10 -1
- package/dist/components/stream/OrdinalCanvasHitTester.d.ts +2 -2
- package/dist/components/stream/OrdinalPipelineStore.d.ts +55 -11
- package/dist/components/stream/OrdinalSVGOverlay.d.ts +9 -1
- package/dist/components/stream/OrdinalStyleResolver.d.ts +12 -0
- package/dist/components/stream/ParticlePool.d.ts +1 -1
- package/dist/components/stream/PipelineStore.d.ts +81 -174
- package/dist/components/stream/SVGOverlay.d.ts +6 -0
- package/dist/components/stream/SceneGraph.d.ts +12 -4
- package/dist/components/stream/StreamGeoFrame.d.ts +1 -1
- package/dist/components/stream/StreamNetworkFrame.d.ts +1 -1
- package/dist/components/stream/StreamOrdinalFrame.d.ts +1 -1
- package/dist/components/stream/StreamXYFrame.d.ts +2 -18
- package/dist/components/stream/accessibleDataRows.d.ts +33 -0
- package/dist/components/stream/accessorUtils.d.ts +25 -12
- package/dist/components/stream/annotationAccessorResolver.d.ts +2 -2
- package/dist/components/stream/brushAccessibility.d.ts +25 -0
- package/dist/components/stream/canvasBackground.d.ts +24 -0
- package/dist/components/stream/canvasSetup.d.ts +4 -1
- package/dist/components/stream/customLayoutFailure.d.ts +33 -0
- package/dist/components/stream/customLayoutPalette.d.ts +19 -9
- package/dist/components/stream/frameGraphics.d.ts +4 -0
- package/dist/components/stream/frameKeyboardNavigation.d.ts +45 -0
- package/dist/components/stream/frameThemeColors.d.ts +24 -0
- package/dist/components/stream/geoAnnotationAnchors.d.ts +14 -0
- package/dist/components/stream/geoCartogram.d.ts +17 -0
- package/dist/components/stream/geoCustomLayout.d.ts +59 -0
- package/dist/components/stream/geoDefaultTooltip.d.ts +11 -0
- package/dist/components/stream/geoFrameHelpers.d.ts +34 -0
- package/dist/components/stream/geoPipelineHelpers.d.ts +46 -0
- package/dist/components/stream/geoPipelineUpdateResults.d.ts +34 -0
- package/dist/components/stream/geoSceneBuilder.d.ts +16 -0
- package/dist/components/stream/geoTypes.d.ts +97 -15
- package/dist/components/stream/glyphDef.d.ts +98 -0
- package/dist/components/stream/hitTarget.d.ts +170 -0
- package/dist/components/stream/hitTestUtils.d.ts +2 -2
- package/dist/components/stream/hoverUtils.d.ts +7 -2
- package/dist/components/stream/keyboardNav.d.ts +4 -1
- package/dist/components/stream/layouts/forceLayoutPlugin.d.ts +9 -1
- package/dist/components/stream/layouts/forceLayoutWorkerClient.d.ts +58 -0
- package/dist/components/stream/layouts/hierarchyUtils.d.ts +2 -2
- package/dist/components/stream/networkBezier.d.ts +10 -0
- package/dist/components/stream/networkColorAccessors.d.ts +49 -0
- package/dist/components/stream/networkCustomLayoutRunner.d.ts +23 -0
- package/dist/components/stream/networkCustomRestyle.d.ts +15 -0
- package/dist/components/stream/networkDefaultTooltip.d.ts +10 -0
- package/dist/components/stream/networkFrameAnimation.d.ts +7 -0
- package/dist/components/stream/networkFrameHandleTypes.d.ts +39 -0
- package/dist/components/stream/networkFrameInteraction.d.ts +37 -0
- package/dist/components/stream/networkFrameObservations.d.ts +15 -0
- package/dist/components/stream/networkFramePaint.d.ts +52 -0
- package/dist/components/stream/networkInteractionTypes.d.ts +26 -0
- package/dist/components/stream/networkPipelineConfig.d.ts +22 -0
- package/dist/components/stream/networkPipelineHelpers.d.ts +12 -0
- package/dist/components/stream/networkPipelineUpdateResults.d.ts +38 -0
- package/dist/components/stream/networkRealtimeEncoding.d.ts +41 -0
- package/dist/components/stream/networkTypes.d.ts +103 -51
- package/dist/components/stream/ordinalCanvasRenderers.d.ts +7 -0
- package/dist/components/stream/ordinalDataIndex.d.ts +5 -0
- package/dist/components/stream/ordinalDefaultTooltip.d.ts +10 -0
- package/dist/components/stream/ordinalDomain.d.ts +38 -0
- package/dist/components/stream/ordinalPipelineUpdateResults.d.ts +31 -0
- package/dist/components/stream/ordinalPulse.d.ts +10 -0
- package/dist/components/stream/ordinalPulseResources.d.ts +3 -0
- package/dist/components/stream/ordinalSceneBuilders/sceneBuilderMap.d.ts +5 -0
- package/dist/components/stream/ordinalSceneBuilders/types.d.ts +2 -2
- package/dist/components/stream/ordinalSpatialIndex.d.ts +9 -0
- package/dist/components/stream/ordinalTypes.d.ts +68 -9
- package/dist/components/stream/paintNeeds.d.ts +31 -0
- package/dist/components/stream/physics/CapacityQueueController.d.ts +5 -0
- package/dist/components/stream/physics/CapacityQueueTypes.d.ts +134 -0
- package/dist/components/stream/physics/MatterPhysicsEngineAdapter.d.ts +42 -0
- package/dist/components/stream/physics/PhysicsAccessibility.d.ts +48 -0
- package/dist/components/stream/physics/PhysicsAnnotations.d.ts +58 -0
- package/dist/components/stream/physics/PhysicsBodyBudget.d.ts +26 -0
- package/dist/components/stream/physics/PhysicsBodySpatialIndex.d.ts +10 -0
- package/dist/components/stream/physics/PhysicsCanvasTheme.d.ts +26 -0
- package/dist/components/stream/physics/PhysicsControllers.d.ts +75 -0
- package/dist/components/stream/physics/PhysicsEngineAdapter.d.ts +59 -0
- package/dist/components/stream/physics/PhysicsEngineConformance.d.ts +23 -0
- package/dist/components/stream/physics/PhysicsEvidence.d.ts +25 -0
- package/dist/components/stream/physics/PhysicsKernel.d.ts +207 -0
- package/dist/components/stream/physics/PhysicsOptionalEngineAdapters.d.ts +12 -0
- package/dist/components/stream/physics/PhysicsPipelineStore.d.ts +86 -0
- package/dist/components/stream/physics/PhysicsPipelineTypes.d.ts +181 -0
- package/dist/components/stream/physics/PhysicsSVGOverlay.d.ts +78 -0
- package/dist/components/stream/physics/PhysicsSediment.d.ts +69 -0
- package/dist/components/stream/physics/PhysicsSettledSVG.d.ts +18 -0
- package/dist/components/stream/physics/PhysicsSettledScene.d.ts +21 -0
- package/dist/components/stream/physics/PhysicsWorkerClient.d.ts +24 -0
- package/dist/components/stream/physics/PhysicsWorkerProtocol.d.ts +101 -0
- package/dist/components/stream/physics/PhysicsWorkerRuntime.d.ts +5 -0
- package/dist/components/stream/physics/RapierPhysicsEngineAdapter.d.ts +18 -0
- package/dist/components/stream/physics/ServiceOperationsControllers.d.ts +27 -0
- package/dist/components/stream/physics/ServiceOperationsTypes.d.ts +89 -0
- package/dist/components/stream/physics/StreamPhysicsFrame.d.ts +6 -0
- package/dist/components/stream/physics/StreamPhysicsTypes.d.ts +317 -0
- package/dist/components/stream/physics/physicsBodyCanvas.d.ts +27 -0
- package/dist/components/stream/physics/physicsFrameObservations.d.ts +19 -0
- package/dist/components/stream/physics/physicsFrameSetup.d.ts +4 -0
- package/dist/components/stream/physics/physicsPipelineControls.d.ts +4 -0
- package/dist/components/stream/physics/physicsPipelineHelpers.d.ts +41 -0
- package/dist/components/stream/physics/physicsPipelineObservations.d.ts +14 -0
- package/dist/components/stream/physics/physicsPipelineUpdateResults.d.ts +27 -0
- package/dist/components/stream/physics/physicsRegionRuntime.d.ts +54 -0
- package/dist/components/stream/physics/physicsSemanticUI.d.ts +20 -0
- package/dist/components/stream/physics/usePhysicsFrameLifecyclePolicy.d.ts +18 -0
- package/dist/components/stream/pipelineBufferUtils.d.ts +26 -0
- package/dist/components/stream/pipelineConfig.d.ts +179 -0
- package/dist/components/stream/pipelineDecay.d.ts +21 -3
- package/dist/components/stream/pipelineDomainResolution.d.ts +62 -0
- package/dist/components/stream/pipelineIdentityOps.d.ts +26 -0
- package/dist/components/stream/pipelinePulse.d.ts +17 -3
- package/dist/components/stream/pipelineRibbons.d.ts +41 -0
- package/dist/components/stream/pipelineSpatialIndex.d.ts +12 -0
- package/dist/components/stream/pipelineStoreUpdateResults.d.ts +33 -0
- package/dist/components/stream/pipelineStyleResolvers.d.ts +46 -0
- package/dist/components/stream/pipelineTransitions.d.ts +3 -1
- package/dist/components/stream/pipelineUpdateContract.d.ts +69 -0
- package/dist/components/stream/pipelineUpdateStore.d.ts +21 -0
- package/dist/components/stream/pulseFrameRefresh.d.ts +22 -0
- package/dist/components/stream/renderBackend.d.ts +27 -0
- package/dist/components/stream/renderers/canvasRenderHelpers.d.ts +15 -1
- package/dist/components/stream/renderers/geoCanvasRenderer.d.ts +3 -2
- package/dist/components/stream/renderers/glyphCanvasRenderer.d.ts +6 -0
- package/dist/components/stream/renderers/networkParticleRenderer.d.ts +1 -1
- package/dist/components/stream/renderers/resolveCSSColor.d.ts +6 -0
- package/dist/components/stream/sceneRenderBackendTypes.d.ts +28 -0
- package/dist/components/stream/sceneRevisionDiagnostics.d.ts +45 -0
- package/dist/components/stream/streamSemanticTypes.d.ts +16 -0
- package/dist/components/stream/streamStoreSync.d.ts +37 -0
- package/dist/components/stream/streamThemeTypes.d.ts +14 -0
- package/dist/components/stream/svgOverlayUtils.d.ts +10 -0
- package/dist/components/stream/test-utils/frameScheduler.d.ts +12 -0
- package/dist/components/stream/test-utils/revisionConsumption.d.ts +13 -0
- package/dist/components/stream/titleLayout.d.ts +31 -0
- package/dist/components/stream/types.d.ts +165 -72
- package/dist/components/stream/useCanvasFrameHost.d.ts +71 -0
- package/dist/components/stream/useFrame.d.ts +44 -2
- package/dist/components/stream/useHydration.d.ts +6 -0
- package/dist/components/stream/useLegendCategoryEmission.d.ts +5 -0
- package/dist/components/stream/useSemanticFrameInteractions.d.ts +22 -0
- package/dist/components/stream/useUpdateResultSnapshot.d.ts +7 -0
- package/dist/components/stream/workerModuleUrl.d.ts +10 -0
- package/dist/components/stream/xyAnnotationAnchors.d.ts +13 -0
- package/dist/components/stream/xyCanvasRenderers.d.ts +7 -0
- package/dist/components/stream/xyCrosshair.d.ts +11 -0
- package/dist/components/stream/xyDateTicks.d.ts +9 -0
- package/dist/components/stream/xyDefaultTooltip.d.ts +10 -0
- package/dist/components/stream/xyFrameAxisTypes.d.ts +50 -0
- package/dist/components/stream/xySceneBuilders/types.d.ts +10 -9
- package/dist/controls.min.js +2 -0
- package/dist/controls.module.min.js +2 -0
- package/dist/forceLayoutWorker.js +1 -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/physics-matter.min.js +1 -0
- package/dist/physics-matter.module.min.js +1 -0
- package/dist/physics-rapier.min.js +1 -0
- package/dist/physics-rapier.module.min.js +1 -0
- package/dist/physics.min.js +2 -0
- package/dist/physics.module.min.js +2 -0
- package/dist/physicsWorker.js +1 -0
- package/dist/realtime.min.js +1 -1
- package/dist/realtime.module.min.js +1 -1
- package/dist/rough.min.js +1 -0
- package/dist/rough.module.min.js +1 -0
- package/dist/semiotic-ai-chunk-OG7BQUUW.module.min.js +2 -0
- package/dist/semiotic-ai-core.d.ts +47 -0
- package/dist/semiotic-ai-core.min.js +1 -0
- package/dist/semiotic-ai-core.module.min.js +1 -0
- package/dist/semiotic-ai-statisticalOverlays-CY4WKR4A.module.min.js +2 -0
- package/dist/semiotic-ai.d.ts +53 -9
- package/dist/semiotic-ai.min.js +1 -1
- package/dist/semiotic-ai.module.min.js +1 -1
- package/dist/semiotic-chunk-3FSVZ46U.module.min.js +2 -0
- package/dist/semiotic-controls.d.ts +20 -0
- package/dist/semiotic-data.min.js +1 -1
- package/dist/semiotic-data.module.min.js +1 -1
- package/dist/semiotic-experimental.d.ts +38 -9
- package/dist/semiotic-experimental.min.js +1 -1
- package/dist/semiotic-experimental.module.min.js +1 -1
- package/dist/semiotic-geo.d.ts +15 -0
- package/dist/semiotic-network.d.ts +15 -0
- package/dist/semiotic-ordinal.d.ts +14 -0
- package/dist/semiotic-physics-matter.d.ts +10 -0
- package/dist/semiotic-physics-rapier.d.ts +9 -0
- package/dist/semiotic-physics.d.ts +60 -0
- package/dist/semiotic-realtime-core.d.ts +34 -0
- package/dist/semiotic-realtime-core.min.js +1 -0
- package/dist/semiotic-realtime-core.module.min.js +1 -0
- package/dist/semiotic-realtime-react.d.ts +10 -0
- package/dist/semiotic-realtime-react.min.js +2 -0
- package/dist/semiotic-realtime-react.module.min.js +2 -0
- package/dist/semiotic-realtime.d.ts +4 -30
- package/dist/semiotic-recipes-core.d.ts +92 -0
- package/dist/semiotic-recipes-core.min.js +1 -0
- package/dist/semiotic-recipes-core.module.min.js +1 -0
- package/dist/semiotic-recipes-react.d.ts +7 -0
- package/dist/semiotic-recipes-react.min.js +2 -0
- package/dist/semiotic-recipes-react.module.min.js +2 -0
- package/dist/semiotic-recipes.d.ts +4 -43
- package/dist/semiotic-recipes.min.js +1 -1
- package/dist/semiotic-recipes.module.min.js +1 -1
- package/dist/semiotic-rough.d.ts +4 -0
- package/dist/semiotic-server-edge.d.ts +8 -0
- package/dist/semiotic-server-edge.min.js +1 -0
- package/dist/semiotic-server-edge.module.min.js +1 -0
- package/dist/semiotic-server-node.d.ts +5 -0
- package/dist/semiotic-server-node.min.js +1 -0
- package/dist/semiotic-server-node.module.min.js +1 -0
- package/dist/semiotic-server.d.ts +2 -2
- package/dist/semiotic-statisticalOverlays-UOMSFKVJ.module.min.js +2 -0
- package/dist/semiotic-themes-core.d.ts +53 -0
- package/dist/semiotic-themes-core.min.js +1 -0
- package/dist/semiotic-themes-core.module.min.js +1 -0
- package/dist/semiotic-themes-react.d.ts +4 -0
- package/dist/semiotic-themes-react.min.js +2 -0
- package/dist/semiotic-themes-react.module.min.js +2 -0
- package/dist/semiotic-themes.d.ts +6 -76
- package/dist/semiotic-themes.min.js +1 -2
- package/dist/semiotic-themes.module.min.js +1 -2
- package/dist/semiotic-utils-core.d.ts +50 -0
- package/dist/semiotic-utils-core.min.js +1 -0
- package/dist/semiotic-utils-core.module.min.js +1 -0
- package/dist/semiotic-utils-react.d.ts +5 -0
- package/dist/semiotic-utils-react.min.js +2 -0
- package/dist/semiotic-utils-react.module.min.js +2 -0
- package/dist/semiotic-utils.d.ts +3 -39
- package/dist/semiotic-utils.min.js +1 -2
- package/dist/semiotic-utils.module.min.js +1 -2
- package/dist/semiotic-value.min.js +1 -1
- package/dist/semiotic-value.module.min.js +1 -1
- package/dist/semiotic-xy.d.ts +12 -0
- package/dist/semiotic.d.ts +44 -8
- 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/test-utils/capturedFrameProps.d.ts +67 -0
- package/dist/test-utils/frameMock.d.ts +12 -9
- package/dist/xy-chunk-IWD6IB6V.module.min.js +2 -0
- package/dist/xy-statisticalOverlays-7RWG6LJT.module.min.js +2 -0
- package/dist/xy.min.js +1 -1
- package/dist/xy.module.min.js +1 -1
- package/package.json +259 -88
- package/spec/README.md +152 -0
- package/spec/bindings/README.md +35 -0
- package/spec/bindings/vega-lite.mjs +112 -0
- package/spec/v0.1/annotation-provenance.schema.json +127 -0
- package/spec/v0.1/audience-profile.schema.json +67 -0
- package/spec/v0.1/chart-capability.schema.json +186 -0
- package/dist/components/recipes/gofish.d.ts +0 -207
- package/dist/components/recipes/gofishInterpreter.d.ts +0 -52
- package/dist/components/recipes/gofishLambdas.d.ts +0 -145
- package/dist/semiotic-ai-semiotic-ai-u954ylUn.js +0 -2
- package/dist/semiotic-ai-statisticalOverlays-CU7jW05Q.js +0 -1
- package/dist/semiotic-semiotic-BmrYbi99.js +0 -2
- package/dist/semiotic-statisticalOverlays-IjZw8Lsu.js +0 -1
- package/dist/xy-semiotic-xy-Dufu3D0-.js +0 -2
- package/dist/xy-statisticalOverlays-3Ni9bRph.js +0 -1
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import type { Datum } from "../charts/shared/datumTypes";
|
|
2
2
|
import type { SemioticTheme } from "../store/ThemeStore";
|
|
3
|
+
import { type PhysicsPipelineConfig, type PhysicsQueuedSpawn, type PhysicsSpawnPacingOptions } from "../stream/physics/PhysicsPipelineStore";
|
|
4
|
+
import { type PhysicsSettledSceneOptions } from "../stream/physics/PhysicsSettledScene";
|
|
3
5
|
export interface AnimatedGifOptions {
|
|
4
6
|
/** Frames per second (default 12) */
|
|
5
7
|
fps?: number;
|
|
@@ -38,6 +40,30 @@ export interface AnimatedGifFrameConfig {
|
|
|
38
40
|
/** Theme for styling */
|
|
39
41
|
theme: SemioticTheme;
|
|
40
42
|
}
|
|
43
|
+
export interface PhysicsGifFrameProps extends Pick<PhysicsSettledSceneOptions, "bodyStyle" | "getBodyLabel"> {
|
|
44
|
+
config?: PhysicsPipelineConfig;
|
|
45
|
+
initialSpawns?: PhysicsQueuedSpawn[];
|
|
46
|
+
initialSpawnPacing?: PhysicsSpawnPacingOptions;
|
|
47
|
+
width?: number;
|
|
48
|
+
height?: number;
|
|
49
|
+
size?: [number, number];
|
|
50
|
+
theme?: SemioticTheme | string;
|
|
51
|
+
title?: string;
|
|
52
|
+
description?: string;
|
|
53
|
+
background?: string;
|
|
54
|
+
className?: string;
|
|
55
|
+
idPrefix?: string;
|
|
56
|
+
}
|
|
57
|
+
export interface PhysicsGifOptions extends Pick<AnimatedGifOptions, "fps" | "frameCount" | "loop" | "scale" | "background"> {
|
|
58
|
+
/** Total simulated seconds to render. Used when `frameCount` is omitted. */
|
|
59
|
+
durationSeconds?: number;
|
|
60
|
+
/** Fixed simulation steps advanced between rendered frames. Defaults to about `1 / fps`. */
|
|
61
|
+
stepsPerFrame?: number;
|
|
62
|
+
/** Fixed timestep used for each simulation step. Defaults to `config.fixedDt` or 1/120. */
|
|
63
|
+
stepDt?: number;
|
|
64
|
+
/** Include a frame after spawning at t=0 before advancing the simulation. */
|
|
65
|
+
includeInitialFrame?: boolean;
|
|
66
|
+
}
|
|
41
67
|
/**
|
|
42
68
|
* Generate SVG strings for each animation frame.
|
|
43
69
|
* This is the core logic shared between GIF export and client-side preview.
|
|
@@ -54,6 +80,15 @@ export declare function generateFrameSVGs(chartType: string, data: Datum[], prop
|
|
|
54
80
|
* Each snapshot is passed directly to `renderChart()`.
|
|
55
81
|
*/
|
|
56
82
|
export declare function generateFrameSequence(component: string, snapshots: Datum[], baseProps?: Datum): string[];
|
|
83
|
+
/**
|
|
84
|
+
* Generate SVG frames by stepping a `PhysicsPipelineStore`.
|
|
85
|
+
*
|
|
86
|
+
* Unlike `generateFrameSVGs`, this does not slice data. It enqueues the supplied
|
|
87
|
+
* physics bodies once, advances the deterministic fixed-step simulation, and
|
|
88
|
+
* serializes each live snapshot. Use this for Galton boards, event-drop replay,
|
|
89
|
+
* piles, and custom physics scenes where sim time is the animation axis.
|
|
90
|
+
*/
|
|
91
|
+
export declare function generatePhysicsFrameSVGs(props: PhysicsGifFrameProps, options?: PhysicsGifOptions): string[];
|
|
57
92
|
/**
|
|
58
93
|
* Render a chart as an animated GIF.
|
|
59
94
|
*
|
|
@@ -62,3 +97,4 @@ export declare function generateFrameSequence(component: string, snapshots: Datu
|
|
|
62
97
|
* @returns Buffer containing the animated GIF
|
|
63
98
|
*/
|
|
64
99
|
export declare function renderToAnimatedGif(chartType: string, data: Datum[], props: Datum, options?: AnimatedGifOptions): Promise<Buffer>;
|
|
100
|
+
export declare function renderPhysicsToAnimatedGif(props: PhysicsGifFrameProps, options?: PhysicsGifOptions): Promise<Buffer>;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
export interface SharpPipeline {
|
|
2
|
+
resize(width: number, height: number): SharpPipeline;
|
|
3
|
+
ensureAlpha(): SharpPipeline;
|
|
4
|
+
raw(): SharpPipeline;
|
|
5
|
+
jpeg(options: {
|
|
6
|
+
quality: number;
|
|
7
|
+
}): SharpPipeline;
|
|
8
|
+
png(): SharpPipeline;
|
|
9
|
+
toBuffer(): Promise<Buffer>;
|
|
10
|
+
}
|
|
11
|
+
export type SharpFactory = (input: Uint8Array, options?: {
|
|
12
|
+
density: number;
|
|
13
|
+
}) => SharpPipeline;
|
|
14
|
+
export type SharpModule = SharpFactory & {
|
|
15
|
+
default?: SharpFactory;
|
|
16
|
+
};
|
|
17
|
+
export type GifPalette = number[][] | Uint8Array;
|
|
18
|
+
export interface GifEncoder {
|
|
19
|
+
writeFrame(indexedPixels: Uint8Array, width: number, height: number, options: {
|
|
20
|
+
palette: GifPalette;
|
|
21
|
+
delay: number;
|
|
22
|
+
repeat: number;
|
|
23
|
+
}): void;
|
|
24
|
+
finish(): void;
|
|
25
|
+
bytes(): Uint8Array;
|
|
26
|
+
}
|
|
27
|
+
export interface GifencExports {
|
|
28
|
+
GIFEncoder?: () => GifEncoder;
|
|
29
|
+
quantize?: (pixels: Uint8Array, maxColors: number) => GifPalette;
|
|
30
|
+
applyPalette?: (pixels: Uint8Array, palette: GifPalette) => Uint8Array;
|
|
31
|
+
default?: GifencExports;
|
|
32
|
+
}
|
|
33
|
+
export interface GifencRuntimeExports extends GifencExports {
|
|
34
|
+
GIFEncoder: () => GifEncoder;
|
|
35
|
+
quantize: (pixels: Uint8Array, maxColors: number) => GifPalette;
|
|
36
|
+
applyPalette: (pixels: Uint8Array, palette: GifPalette) => Uint8Array;
|
|
37
|
+
}
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
export interface RenderEvidence {
|
|
19
19
|
/** HOC component name as passed to renderChart. */
|
|
20
20
|
component: string;
|
|
21
|
-
frameType: "xy" | "ordinal" | "network" | "geo";
|
|
21
|
+
frameType: "xy" | "ordinal" | "network" | "geo" | "physics";
|
|
22
22
|
/** "ok" when the scene produced data marks; "empty" when it did not. */
|
|
23
23
|
status: "ok" | "empty";
|
|
24
24
|
/** True when zero data marks rendered. */
|
|
@@ -1,44 +1,12 @@
|
|
|
1
1
|
import type { Datum } from "../charts/shared/datumTypes";
|
|
2
|
-
import type { LegendLayout } from "../types/legendTypes";
|
|
3
|
-
/**
|
|
4
|
-
* Server-side rendering of Semiotic charts to standalone SVG strings.
|
|
5
|
-
*
|
|
6
|
-
* Uses the shared SceneToSVG converters (same code used by Stream Frames
|
|
7
|
-
* for SSR) plus PipelineStore / OrdinalPipelineStore / NetworkPipelineStore
|
|
8
|
-
* for scene graph computation.
|
|
9
|
-
*
|
|
10
|
-
* Features:
|
|
11
|
-
* - Theme inlining (resolve presets to concrete SVG styles)
|
|
12
|
-
* - Legend rendering (categorical color swatches)
|
|
13
|
-
* - Accessibility (title, desc, role="img")
|
|
14
|
-
* - Grid lines
|
|
15
|
-
* - Annotations (y-threshold, x-threshold, band, label, text, category-highlight)
|
|
16
|
-
* - renderChart HOC-level API
|
|
17
|
-
*/
|
|
18
|
-
import * as React from "react";
|
|
19
2
|
import type { StreamXYFrameProps } from "../stream/types";
|
|
20
3
|
import type { StreamNetworkFrameProps } from "../stream/networkTypes";
|
|
21
4
|
import type { StreamOrdinalFrameProps } from "../stream/ordinalTypes";
|
|
22
5
|
import type { StreamGeoFrameProps } from "../stream/geoTypes";
|
|
23
|
-
import { type RenderEvidence } from "./renderEvidence";
|
|
24
|
-
import { type ThemeInput } from "./themeResolver";
|
|
25
6
|
import { CHART_CONFIGS } from "./serverChartConfigs";
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
theme?: ThemeInput;
|
|
30
|
-
showLegend?: boolean;
|
|
31
|
-
showGrid?: boolean;
|
|
32
|
-
annotations?: Datum[];
|
|
33
|
-
title?: string | React.ReactNode;
|
|
34
|
-
description?: string;
|
|
35
|
-
background?: string;
|
|
36
|
-
className?: string;
|
|
37
|
-
legendPosition?: "right" | "left" | "top" | "bottom";
|
|
38
|
-
legendLayout?: LegendLayout;
|
|
39
|
-
/** Prefix for SVG element IDs — used by renderDashboard to avoid collisions */
|
|
40
|
-
_idPrefix?: string;
|
|
41
|
-
}
|
|
7
|
+
import { type ThemeInput } from "./themeResolver";
|
|
8
|
+
import { type RenderEvidence } from "./renderEvidence";
|
|
9
|
+
import { type ThemeAwareProps, type StaticFrameProps, type FrameType } from "./staticSVGChrome";
|
|
42
10
|
export declare function renderToStaticSVG(frameType: FrameType, props: StaticFrameProps): string;
|
|
43
11
|
export declare function renderXYToStaticSVG(props: StreamXYFrameProps & ThemeAwareProps): string;
|
|
44
12
|
export declare function renderOrdinalToStaticSVG(props: StreamOrdinalFrameProps & ThemeAwareProps): string;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { Datum } from "../charts/shared/datumTypes";
|
|
2
|
+
export type FrameType = "xy" | "ordinal" | "network" | "geo" | "physics";
|
|
3
|
+
export type ServerAccessorValue = string | number | boolean | Date | null | undefined;
|
|
4
|
+
export type ServerAccessor = string | ((datum: Datum) => ServerAccessorValue);
|
|
5
|
+
export type ServerColorScheme = string | string[] | Record<string, string> | undefined;
|
|
6
|
+
export type ServerChartData = Datum | Datum[] | null | undefined;
|
|
7
|
+
export interface ChartConfig {
|
|
8
|
+
frameType: FrameType;
|
|
9
|
+
/** Build frame props from HOC-level props */
|
|
10
|
+
buildProps: (data: ServerChartData, colorBy: ServerAccessor | undefined, colorScheme: ServerColorScheme, common: Datum, rest: Datum) => Datum;
|
|
11
|
+
}
|
|
12
|
+
export declare function accessorValue(accessor: ServerAccessor | undefined, fallback: string, d: Datum): ServerAccessorValue;
|
|
13
|
+
export declare function numericValue(value: ServerAccessorValue): number;
|
|
14
|
+
export declare function viridisColor(i: number, n: number): string;
|
|
15
|
+
export declare function prepareConnectedScatterplotData(data: ServerChartData, rest: Datum): {
|
|
16
|
+
data: ServerChartData;
|
|
17
|
+
orderMap: WeakMap<Datum, {
|
|
18
|
+
idx: number;
|
|
19
|
+
total: number;
|
|
20
|
+
}>;
|
|
21
|
+
};
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
}
|
|
1
|
+
/**
|
|
2
|
+
* Chart-specific prop mapping for renderChart().
|
|
3
|
+
*
|
|
4
|
+
* Family implementations live in serverChartConfigs{XY,Ordinal,Network,Geo,Custom,Physics}.ts.
|
|
5
|
+
*/
|
|
6
|
+
import type { ChartConfig } from "./serverChartConfigShared";
|
|
8
7
|
export declare const CHART_CONFIGS: {
|
|
9
8
|
Sparkline: ChartConfig;
|
|
10
9
|
LineChart: ChartConfig;
|
|
@@ -15,20 +14,21 @@ export declare const CHART_CONFIGS: {
|
|
|
15
14
|
CandlestickChart: ChartConfig;
|
|
16
15
|
BubbleChart: {
|
|
17
16
|
frameType: "xy";
|
|
18
|
-
buildProps: (data:
|
|
17
|
+
buildProps: (data: import("./serverChartConfigShared").ServerChartData, colorBy: import("./serverChartConfigShared").ServerAccessor | undefined, colorScheme: import("./serverChartConfigShared").ServerColorScheme, common: import("../stream/networkColorAccessors").Datum, rest: import("../stream/networkColorAccessors").Datum) => {
|
|
19
18
|
chartType: string;
|
|
20
|
-
data:
|
|
19
|
+
data: import("./serverChartConfigShared").ServerChartData;
|
|
21
20
|
xAccessor: any;
|
|
22
21
|
yAccessor: any;
|
|
23
|
-
colorAccessor:
|
|
22
|
+
colorAccessor: import("./serverChartConfigShared").ServerAccessor | undefined;
|
|
24
23
|
sizeAccessor: any;
|
|
25
24
|
sizeRange: any;
|
|
26
|
-
colorScheme:
|
|
25
|
+
colorScheme: import("./serverChartConfigShared").ServerColorScheme;
|
|
27
26
|
};
|
|
28
27
|
};
|
|
29
28
|
ConnectedScatterplot: ChartConfig;
|
|
30
29
|
QuadrantChart: ChartConfig;
|
|
31
30
|
Heatmap: ChartConfig;
|
|
31
|
+
XYCustomChart: ChartConfig;
|
|
32
32
|
BarChart: ChartConfig;
|
|
33
33
|
StackedBarChart: ChartConfig;
|
|
34
34
|
GroupedBarChart: ChartConfig;
|
|
@@ -44,7 +44,9 @@ export declare const CHART_CONFIGS: {
|
|
|
44
44
|
LikertChart: ChartConfig;
|
|
45
45
|
FunnelChart: ChartConfig;
|
|
46
46
|
GaugeChart: ChartConfig;
|
|
47
|
+
OrdinalCustomChart: ChartConfig;
|
|
47
48
|
ForceDirectedGraph: ChartConfig;
|
|
49
|
+
NetworkCustomChart: ChartConfig;
|
|
48
50
|
SankeyDiagram: ChartConfig;
|
|
49
51
|
ProcessSankey: ChartConfig;
|
|
50
52
|
ChordDiagram: ChartConfig;
|
|
@@ -54,5 +56,13 @@ export declare const CHART_CONFIGS: {
|
|
|
54
56
|
ChoroplethMap: ChartConfig;
|
|
55
57
|
ProportionalSymbolMap: ChartConfig;
|
|
56
58
|
FlowMap: ChartConfig;
|
|
59
|
+
GeoCustomChart: ChartConfig;
|
|
60
|
+
GaltonBoardChart: ChartConfig;
|
|
61
|
+
EventDropChart: ChartConfig;
|
|
62
|
+
PhysicsPileChart: ChartConfig;
|
|
63
|
+
CollisionSwarmChart: ChartConfig;
|
|
64
|
+
ProcessFlowChart: ChartConfig;
|
|
65
|
+
GauntletChart: ChartConfig;
|
|
66
|
+
PhysicalFlowChart: ChartConfig;
|
|
67
|
+
PhysicsCustomChart: ChartConfig;
|
|
57
68
|
};
|
|
58
|
-
export {};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { type ChartConfig } from "./serverChartConfigShared";
|
|
2
|
+
export declare const xyCustomChart: ChartConfig;
|
|
3
|
+
export declare const ordinalCustomChart: ChartConfig;
|
|
4
|
+
export declare const networkCustomChart: ChartConfig;
|
|
5
|
+
export declare const geoCustomChart: ChartConfig;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { type ChartConfig } from "./serverChartConfigShared";
|
|
2
|
+
export declare const choroplethMap: ChartConfig;
|
|
3
|
+
export declare const proportionalSymbolMap: ChartConfig;
|
|
4
|
+
/**
|
|
5
|
+
* FlowMap expands `flows` (edges with source/target ids) + `nodes` (points
|
|
6
|
+
* with coordinates) into the `lines` shape StreamGeoFrame expects, where
|
|
7
|
+
* each line carries a `coordinates` array of two {x,y} endpoints.
|
|
8
|
+
*/
|
|
9
|
+
export declare const flowMap: ChartConfig;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { type ChartConfig } from "./serverChartConfigShared";
|
|
2
|
+
export declare const forceDirectedGraph: ChartConfig;
|
|
3
|
+
export declare const processSankey: ChartConfig;
|
|
4
|
+
export declare const sankeyDiagram: ChartConfig;
|
|
5
|
+
export declare const chordDiagram: ChartConfig;
|
|
6
|
+
export declare const treeDiagram: ChartConfig;
|
|
7
|
+
export declare const treemap: ChartConfig;
|
|
8
|
+
export declare const circlePack: ChartConfig;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { type ChartConfig } from "./serverChartConfigShared";
|
|
2
|
+
export declare const barChart: ChartConfig;
|
|
3
|
+
export declare const stackedBarChart: ChartConfig;
|
|
4
|
+
export declare const groupedBarChart: ChartConfig;
|
|
5
|
+
export declare const pieChart: ChartConfig;
|
|
6
|
+
export declare const donutChart: ChartConfig;
|
|
7
|
+
export declare const histogram: ChartConfig;
|
|
8
|
+
export declare const boxPlot: ChartConfig;
|
|
9
|
+
export declare const violinPlot: ChartConfig;
|
|
10
|
+
export declare const swarmPlot: ChartConfig;
|
|
11
|
+
export declare const dotPlot: ChartConfig;
|
|
12
|
+
export declare const swimlaneChart: ChartConfig;
|
|
13
|
+
export declare const ridgelinePlot: ChartConfig;
|
|
14
|
+
export declare const likertChart: ChartConfig;
|
|
15
|
+
export declare const funnelChart: ChartConfig;
|
|
16
|
+
export declare const gaugeChart: ChartConfig;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { type ChartConfig } from "./serverChartConfigShared";
|
|
2
|
+
export declare const galtonBoardChart: ChartConfig;
|
|
3
|
+
export declare const eventDropChart: ChartConfig;
|
|
4
|
+
export declare const physicsPileChart: ChartConfig;
|
|
5
|
+
export declare const collisionSwarmChart: ChartConfig;
|
|
6
|
+
export declare const processFlowChart: ChartConfig;
|
|
7
|
+
export declare const gauntletChart: ChartConfig;
|
|
8
|
+
export declare const physicalFlowChart: ChartConfig;
|
|
9
|
+
export declare const physicsCustomChart: ChartConfig;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { type ChartConfig } from "./serverChartConfigShared";
|
|
2
|
+
export declare const sparkline: ChartConfig;
|
|
3
|
+
export declare const lineChart: ChartConfig;
|
|
4
|
+
export declare const areaChart: ChartConfig;
|
|
5
|
+
export declare const differenceChart: ChartConfig;
|
|
6
|
+
export declare const stackedAreaChart: ChartConfig;
|
|
7
|
+
export declare const candlestickChart: ChartConfig;
|
|
8
|
+
export declare const scatterplot: ChartConfig;
|
|
9
|
+
export declare const quadrantChart: ChartConfig;
|
|
10
|
+
export declare const connectedScatterplot: ChartConfig;
|
|
11
|
+
export declare const heatmap: ChartConfig;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { Datum } from "../charts/shared/datumTypes";
|
|
1
|
+
import type { Datum, DatumValue } from "../charts/shared/datumTypes";
|
|
2
2
|
/**
|
|
3
3
|
* Static annotation rendering for server-side SVG.
|
|
4
4
|
*
|
|
@@ -9,8 +9,8 @@ import * as React from "react";
|
|
|
9
9
|
import type { SemioticTheme } from "../store/ThemeStore";
|
|
10
10
|
import { type AutoPlaceAnnotations } from "../recipes/annotationLayout";
|
|
11
11
|
interface AnnotationScales {
|
|
12
|
-
x?:
|
|
13
|
-
y?:
|
|
12
|
+
x?: AnnotationScale;
|
|
13
|
+
y?: AnnotationScale;
|
|
14
14
|
/** For ordinal charts: band scale */
|
|
15
15
|
o?: {
|
|
16
16
|
(v: string): number | undefined;
|
|
@@ -25,6 +25,9 @@ interface AnnotationScales {
|
|
|
25
25
|
*/
|
|
26
26
|
geoProjection?: (coords: [number, number]) => [number, number] | null;
|
|
27
27
|
}
|
|
28
|
+
type AnnotationScale = {
|
|
29
|
+
bivarianceHack(value: DatumValue): number;
|
|
30
|
+
}["bivarianceHack"];
|
|
28
31
|
interface AnnotationLayout {
|
|
29
32
|
width: number;
|
|
30
33
|
height: number;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { StreamGeoFrameProps } from "../stream/geoTypes";
|
|
2
|
+
import { type EvidenceSink } from "./renderEvidence";
|
|
3
|
+
import type { ThemeAwareProps } from "./staticSVGChrome";
|
|
4
|
+
export declare function renderGeoFrame(props: StreamGeoFrameProps & ThemeAwareProps, sink?: EvidenceSink): string;
|
|
@@ -26,7 +26,7 @@ export interface StaticLegendConfig {
|
|
|
26
26
|
/** Category labels to show in legend */
|
|
27
27
|
categories: string[];
|
|
28
28
|
/** Color scheme — array of colors or d3-scale-chromatic name */
|
|
29
|
-
colorScheme?: string | string[]
|
|
29
|
+
colorScheme?: string | string[] | Record<string, string>;
|
|
30
30
|
/** Theme for text/font colors */
|
|
31
31
|
theme: SemioticTheme;
|
|
32
32
|
/** Legend position */
|
|
@@ -71,5 +71,5 @@ export declare function renderStaticGradientLegend(config: StaticGradientLegendC
|
|
|
71
71
|
/**
|
|
72
72
|
* Extract unique categories from data using an accessor.
|
|
73
73
|
*/
|
|
74
|
-
export declare function extractCategories(data:
|
|
74
|
+
export declare function extractCategories(data: Datum[], accessor: string | ((d: Datum) => string) | undefined): string[];
|
|
75
75
|
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { Datum, DatumValue } from "../charts/shared/datumTypes";
|
|
2
|
+
import type { NetworkPipelineConfig, RealtimeNode, RealtimeEdge, StreamNetworkFrameProps } from "../stream/networkTypes";
|
|
3
|
+
import { type EvidenceSink } from "./renderEvidence";
|
|
4
|
+
import type { ThemeAwareProps } from "./staticSVGChrome";
|
|
5
|
+
export declare function resolveAccessor(accessor: string | ((d: Datum) => DatumValue) | undefined, defaultKey: string): (d: Datum) => DatumValue;
|
|
6
|
+
export declare function buildRealtimeNodes(propsNodes: Datum[], config: NetworkPipelineConfig): RealtimeNode[];
|
|
7
|
+
export declare function buildRealtimeEdges(propsEdges: Datum[], config: NetworkPipelineConfig): RealtimeEdge[];
|
|
8
|
+
export declare function renderNetworkFrame(props: StreamNetworkFrameProps & ThemeAwareProps, sink?: EvidenceSink): string;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { OrdinalPipelineStore } from "../stream/OrdinalPipelineStore";
|
|
3
|
+
import type { StreamOrdinalFrameProps } from "../stream/ordinalTypes";
|
|
4
|
+
import { type EvidenceSink } from "./renderEvidence";
|
|
5
|
+
import type { SemioticTheme } from "../store/ThemeStore";
|
|
6
|
+
import type { ThemeAwareProps } from "./staticSVGChrome";
|
|
7
|
+
export declare function generateOrdinalAxesSVG(store: OrdinalPipelineStore, layout: {
|
|
8
|
+
width: number;
|
|
9
|
+
height: number;
|
|
10
|
+
}, props: StreamOrdinalFrameProps, theme: SemioticTheme, idPrefix?: string): React.ReactNode;
|
|
11
|
+
export declare function renderOrdinalFrame(props: StreamOrdinalFrameProps & ThemeAwareProps, sink?: EvidenceSink): string;
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
import type { Datum } from "../charts/shared/datumTypes";
|
|
2
|
+
import type { LegendLayout } from "../types/legendTypes";
|
|
3
|
+
import type { StreamXYFrameProps, StreamScales, StreamLayout } from "../stream/types";
|
|
4
|
+
import type { StreamNetworkFrameProps, RealtimeEdge } from "../stream/networkTypes";
|
|
5
|
+
import type { StreamOrdinalFrameProps } from "../stream/ordinalTypes";
|
|
6
|
+
import type { StreamGeoFrameProps } from "../stream/geoTypes";
|
|
7
|
+
import type { PhysicsSettledSVGOptions } from "../stream/physics/PhysicsSettledSVG";
|
|
8
|
+
import type { PhysicsPipelineStore, PhysicsQueuedSpawn } from "../stream/physics/PhysicsPipelineStore";
|
|
9
|
+
import type { OrdinalPipelineStore } from "../stream/OrdinalPipelineStore";
|
|
10
|
+
import type { RenderEvidence } from "./renderEvidence";
|
|
11
|
+
import { resolveTheme, type ThemeInput } from "./themeResolver";
|
|
12
|
+
import type { SemioticTheme } from "../store/ThemeStore";
|
|
13
|
+
import * as React from "react";
|
|
14
|
+
export type FrameType = RenderEvidence["frameType"];
|
|
15
|
+
export type StaticPhysicsFrameProps = PhysicsSettledSVGOptions & {
|
|
16
|
+
config?: ConstructorParameters<typeof PhysicsPipelineStore>[0];
|
|
17
|
+
initialSpawns?: PhysicsQueuedSpawn[];
|
|
18
|
+
projectionRows?: PhysicsSettledSVGOptions["projectionRows"];
|
|
19
|
+
size?: [number, number];
|
|
20
|
+
_idPrefix?: string;
|
|
21
|
+
};
|
|
22
|
+
export type StaticFrameProps = (StreamXYFrameProps | StreamNetworkFrameProps | StreamOrdinalFrameProps | StreamGeoFrameProps | StaticPhysicsFrameProps) & ThemeAwareProps;
|
|
23
|
+
export type CategoricalAccessor = string | ((d: Datum) => string);
|
|
24
|
+
type EdgeEndpoint = RealtimeEdge["source"] | RealtimeEdge["target"] | null | undefined;
|
|
25
|
+
export declare function edgeEndpointId(endpoint: EdgeEndpoint): string | null;
|
|
26
|
+
/** Generate a short stable ID from chart props for unique SVG element IDs */
|
|
27
|
+
export declare function chartUID(props: Datum): string;
|
|
28
|
+
export interface ThemeAwareProps {
|
|
29
|
+
theme?: ThemeInput;
|
|
30
|
+
showLegend?: boolean;
|
|
31
|
+
showGrid?: boolean;
|
|
32
|
+
annotations?: Datum[];
|
|
33
|
+
title?: string | React.ReactNode;
|
|
34
|
+
description?: string;
|
|
35
|
+
background?: string;
|
|
36
|
+
className?: string;
|
|
37
|
+
legendPosition?: "right" | "left" | "top" | "bottom";
|
|
38
|
+
legendLayout?: LegendLayout;
|
|
39
|
+
/** Prefix for SVG element IDs — used by renderDashboard to avoid collisions */
|
|
40
|
+
_idPrefix?: string;
|
|
41
|
+
}
|
|
42
|
+
export declare function reserveStaticLegendMargin(margin: {
|
|
43
|
+
top: number;
|
|
44
|
+
right: number;
|
|
45
|
+
bottom: number;
|
|
46
|
+
left: number;
|
|
47
|
+
}, options: {
|
|
48
|
+
categories: string[];
|
|
49
|
+
colorScheme?: string | string[] | Record<string, string>;
|
|
50
|
+
theme: ReturnType<typeof resolveTheme>;
|
|
51
|
+
position?: "right" | "left" | "top" | "bottom";
|
|
52
|
+
size: [number, number];
|
|
53
|
+
hasTitle?: boolean;
|
|
54
|
+
legendLayout?: LegendLayout;
|
|
55
|
+
}): void;
|
|
56
|
+
export declare function reserveLegendConfigMargin(margin: {
|
|
57
|
+
top: number;
|
|
58
|
+
right: number;
|
|
59
|
+
bottom: number;
|
|
60
|
+
left: number;
|
|
61
|
+
}, options: {
|
|
62
|
+
legend: unknown;
|
|
63
|
+
theme: ReturnType<typeof resolveTheme>;
|
|
64
|
+
position?: "right" | "left" | "top" | "bottom";
|
|
65
|
+
size: [number, number];
|
|
66
|
+
hasTitle?: boolean;
|
|
67
|
+
legendLayout?: LegendLayout;
|
|
68
|
+
}): void;
|
|
69
|
+
export declare function renderLegendConfig(legend: unknown, options: {
|
|
70
|
+
theme: ReturnType<typeof resolveTheme>;
|
|
71
|
+
position?: "right" | "left" | "top" | "bottom";
|
|
72
|
+
size: [number, number];
|
|
73
|
+
margin: {
|
|
74
|
+
top: number;
|
|
75
|
+
right: number;
|
|
76
|
+
bottom: number;
|
|
77
|
+
left: number;
|
|
78
|
+
};
|
|
79
|
+
hasTitle?: boolean;
|
|
80
|
+
legendLayout?: LegendLayout;
|
|
81
|
+
idPrefix?: string;
|
|
82
|
+
}): React.ReactNode;
|
|
83
|
+
export declare function defaultTickFormat(v: number): string;
|
|
84
|
+
/** Render grid lines for XY charts */
|
|
85
|
+
export declare function renderGridSVG(scales: StreamScales, layout: StreamLayout, theme: SemioticTheme, idPrefix?: string): React.ReactNode;
|
|
86
|
+
/** Render grid lines for ordinal charts */
|
|
87
|
+
export declare function renderOrdinalGridSVG(store: OrdinalPipelineStore, layout: {
|
|
88
|
+
width: number;
|
|
89
|
+
height: number;
|
|
90
|
+
}, theme: SemioticTheme, idPrefix?: string): React.ReactNode;
|
|
91
|
+
/** Wrap SVG content with accessibility attributes */
|
|
92
|
+
export declare function wrapSVG(content: React.ReactNode, opts: {
|
|
93
|
+
width: number;
|
|
94
|
+
height: number;
|
|
95
|
+
className: string;
|
|
96
|
+
title?: string | React.ReactNode;
|
|
97
|
+
description?: string;
|
|
98
|
+
background?: string;
|
|
99
|
+
theme: SemioticTheme;
|
|
100
|
+
innerTransform: string;
|
|
101
|
+
innerWidth: number;
|
|
102
|
+
innerHeight: number;
|
|
103
|
+
legend?: React.ReactNode;
|
|
104
|
+
outerElements?: React.ReactNode;
|
|
105
|
+
defs?: React.ReactNode;
|
|
106
|
+
/** Prefix for SVG element IDs to avoid collisions in multi-chart documents */
|
|
107
|
+
idPrefix?: string;
|
|
108
|
+
}): React.ReactElement;
|
|
109
|
+
export declare function generateAxesSVG(scales: StreamScales, layout: StreamLayout, props: StreamXYFrameProps, theme: SemioticTheme, idPrefix?: string): React.ReactNode;
|
|
110
|
+
export {};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { StreamXYFrameProps } from "../stream/types";
|
|
2
|
+
import { type EvidenceSink } from "./renderEvidence";
|
|
3
|
+
import type { ThemeAwareProps } from "./staticSVGChrome";
|
|
4
|
+
export declare function renderStreamXYFrame(props: StreamXYFrameProps & ThemeAwareProps, sink?: EvidenceSink): string;
|
|
@@ -1,9 +1,13 @@
|
|
|
1
1
|
import type { Datum } from "../charts/shared/datumTypes";
|
|
2
|
+
import type { ControlObservation } from "../controls/controlContract";
|
|
3
|
+
export type { ControlObservation } from "../controls/controlContract";
|
|
2
4
|
interface ObservationBase {
|
|
3
5
|
timestamp: number;
|
|
4
6
|
chartType: string;
|
|
5
7
|
chartId?: string;
|
|
6
8
|
}
|
|
9
|
+
/** Input channel that produced a semantic chart interaction. */
|
|
10
|
+
export type ObservationInputType = "keyboard" | "pointer" | "touch" | "navigation-tree";
|
|
7
11
|
export interface HoverObservation extends ObservationBase {
|
|
8
12
|
type: "hover";
|
|
9
13
|
datum: Datum;
|
|
@@ -45,6 +49,24 @@ export interface ClickObservation extends ObservationBase {
|
|
|
45
49
|
export interface ClickEndObservation extends ObservationBase {
|
|
46
50
|
type: "click-end";
|
|
47
51
|
}
|
|
52
|
+
/** A datum became the reader's active focus target. */
|
|
53
|
+
export interface FocusObservation extends ObservationBase {
|
|
54
|
+
type: "focus";
|
|
55
|
+
datum: Datum;
|
|
56
|
+
inputType: Exclude<ObservationInputType, "touch">;
|
|
57
|
+
}
|
|
58
|
+
/** A datum was deliberately activated, independent of input modality. */
|
|
59
|
+
export interface ActivateObservation extends ObservationBase {
|
|
60
|
+
type: "activate";
|
|
61
|
+
datum: Datum;
|
|
62
|
+
inputType: ObservationInputType;
|
|
63
|
+
}
|
|
64
|
+
/** A stable, interactive annotation was deliberately activated. */
|
|
65
|
+
export interface AnnotationActivateObservation extends ObservationBase {
|
|
66
|
+
type: "annotation-activate";
|
|
67
|
+
annotationId: string;
|
|
68
|
+
inputType: ObservationInputType;
|
|
69
|
+
}
|
|
48
70
|
/**
|
|
49
71
|
* Emitted when an event-time stream receives a record outside its
|
|
50
72
|
* lateness/grace window (see `ReorderBuffer`). Surfaces lateness as an
|
|
@@ -64,7 +86,7 @@ export interface LateDataObservation extends ObservationBase {
|
|
|
64
86
|
/** Running total of late events seen on this chart. */
|
|
65
87
|
lateCount: number;
|
|
66
88
|
}
|
|
67
|
-
export type ChartObservation = HoverObservation | HoverEndObservation | BrushObservation | BrushEndObservation | SelectionObservation | SelectionEndObservation | ClickObservation | ClickEndObservation | LateDataObservation;
|
|
89
|
+
export type ChartObservation = HoverObservation | HoverEndObservation | BrushObservation | BrushEndObservation | SelectionObservation | SelectionEndObservation | ClickObservation | ClickEndObservation | FocusObservation | ActivateObservation | AnnotationActivateObservation | ControlObservation | LateDataObservation;
|
|
68
90
|
export type OnObservationCallback = (observation: ChartObservation) => void;
|
|
69
91
|
export interface ObservationStoreState {
|
|
70
92
|
/** Ring buffer of recent observations (newest last). Mutated in place for perf. */
|
|
@@ -76,4 +98,3 @@ export interface ObservationStoreState {
|
|
|
76
98
|
clearObservations: () => void;
|
|
77
99
|
}
|
|
78
100
|
export declare const ObservationProvider: import("react").FC<import("./createStore").StoreProviderProps<ObservationStoreState>>, useObservationSelector: <R>(selector: (state: ObservationStoreState) => R, equalityFn?: ((a: R, b: R) => boolean) | undefined) => R;
|
|
79
|
-
export {};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import type { Datum } from "../charts/shared/datumTypes";
|
|
2
|
+
import type { SemioticTheme } from "./ThemeStore";
|
|
3
|
+
/**
|
|
4
|
+
* Convert a SemioticTheme to a CSS custom properties string.
|
|
5
|
+
* Useful for SSR or generating stylesheet content.
|
|
6
|
+
*
|
|
7
|
+
* @param theme - A SemioticTheme object
|
|
8
|
+
* @param selector - CSS selector to scope the variables (default: `:root`)
|
|
9
|
+
* @returns CSS string with custom properties
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* ```ts
|
|
13
|
+
* const css = themeToCSS(TUFTE_LIGHT, ".my-charts")
|
|
14
|
+
* // .my-charts {
|
|
15
|
+
* // --semiotic-bg: #fffff8;
|
|
16
|
+
* // --semiotic-text: #111111;
|
|
17
|
+
* // ...
|
|
18
|
+
* // }
|
|
19
|
+
* ```
|
|
20
|
+
*/
|
|
21
|
+
export declare function themeToCSS(theme: SemioticTheme, selector?: string): string;
|
|
22
|
+
/**
|
|
23
|
+
* Convert a SemioticTheme to a design tokens JSON object.
|
|
24
|
+
* Compatible with Style Dictionary / Design Token Community Group format.
|
|
25
|
+
*
|
|
26
|
+
* @example
|
|
27
|
+
* ```ts
|
|
28
|
+
* const tokens = themeToTokens(TUFTE_LIGHT)
|
|
29
|
+
* // { semiotic: { bg: { $value: "#fffff8", $type: "color" }, ... } }
|
|
30
|
+
* ```
|
|
31
|
+
*/
|
|
32
|
+
export declare function themeToTokens(theme: SemioticTheme): Datum;
|
|
@@ -2,6 +2,7 @@ import type { Datum } from "../charts/shared/datumTypes";
|
|
|
2
2
|
import { type DataSummary } from "../data/DataSummarizer";
|
|
3
3
|
import type { ChartDataProfile, Suggestion } from "../ai/chartCapabilityTypes";
|
|
4
4
|
import type { IntentId } from "../ai/intents";
|
|
5
|
+
import { type ChartReaderGrounding, type ChartReaderGroundingOptions } from "../ai/readerGrounding";
|
|
5
6
|
/**
|
|
6
7
|
* Identifies a single point of interest on the chart — typically the datum
|
|
7
8
|
* the user is currently hovering, clicked, or otherwise focused on. When
|
|
@@ -31,6 +32,8 @@ export interface InterrogationContext {
|
|
|
31
32
|
componentName?: string;
|
|
32
33
|
/** Optional caller-supplied chart props (accessor names, scales, etc.). */
|
|
33
34
|
props?: Record<string, unknown>;
|
|
35
|
+
/** Optional reader-grounding payload for faithful chart interpretation. */
|
|
36
|
+
grounding?: ChartReaderGrounding;
|
|
34
37
|
/**
|
|
35
38
|
* The current focused datum — what the user is interactively pointing at.
|
|
36
39
|
* Lets the LLM tailor responses to a specific point ("why is *this* one
|
|
@@ -82,6 +85,12 @@ export interface UseChartInterrogationOptions {
|
|
|
82
85
|
* `onObservation` callback or the convenience `useChartFocus` hook.
|
|
83
86
|
*/
|
|
84
87
|
focus?: InterrogationFocus | null;
|
|
88
|
+
/**
|
|
89
|
+
* Include `buildReaderGrounding()` in the interrogation context. Pass true
|
|
90
|
+
* for default grounding, or an options object for capability/audience,
|
|
91
|
+
* structure, and physics runtime grounding controls.
|
|
92
|
+
*/
|
|
93
|
+
includeGrounding?: boolean | ChartReaderGroundingOptions;
|
|
85
94
|
}
|
|
86
95
|
export interface UseChartInterrogationResult {
|
|
87
96
|
/** Ask a question. Updates history, annotations, loading, and error. */
|