semiotic 3.7.4 → 3.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CLAUDE.md +60 -15
- package/README.md +135 -24
- 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 +1651 -154
- package/ai/examples.md +174 -0
- package/ai/schema.json +2934 -517
- package/ai/surface-manifest.json +200 -0
- package/ai/system-prompt.md +19 -3
- package/dist/components/Annotation.d.ts +4 -0
- 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/DataSummaryContext.d.ts +1 -0
- 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 +42 -1
- package/dist/components/ai/chartClinic.d.ts +91 -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 +203 -0
- package/dist/components/ai/dataQualityBridge.d.ts +201 -0
- package/dist/components/ai/describeChart.d.ts +9 -0
- package/dist/components/ai/describeRecipeChart.d.ts +16 -0
- package/dist/components/ai/generativeChart.d.ts +170 -0
- 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/charts/custom/GeoCustomChart.d.ts +48 -0
- package/dist/components/charts/custom/NetworkCustomChart.d.ts +22 -3
- 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/DistanceCartogram.d.ts +1 -1
- package/dist/components/charts/geo/FlowMap.d.ts +1 -1
- package/dist/components/charts/geo/ProportionalSymbolMap.d.ts +1 -1
- package/dist/components/charts/geo/index.d.ts +2 -0
- package/dist/components/charts/index.d.ts +29 -1
- package/dist/components/charts/network/ChordDiagram.d.ts +1 -1
- package/dist/components/charts/network/CirclePack.d.ts +1 -1
- package/dist/components/charts/network/ForceDirectedGraph.d.ts +15 -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 +1 -1
- 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 +1 -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 +1 -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 +1 -1
- package/dist/components/charts/ordinal/SwarmPlot.d.ts +8 -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 +47 -0
- package/dist/components/charts/physics/EventDropChart.capability.d.ts +2 -0
- package/dist/components/charts/physics/EventDropChart.d.ts +53 -0
- package/dist/components/charts/physics/GaltonBoardChart.capability.d.ts +2 -0
- package/dist/components/charts/physics/GaltonBoardChart.d.ts +66 -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 +120 -0
- package/dist/components/charts/physics/PhysicsPileChart.capability.d.ts +2 -0
- package/dist/components/charts/physics/PhysicsPileChart.d.ts +53 -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 +41 -0
- package/dist/components/charts/physics/physicsChartUtils.d.ts +18 -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 +30 -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/realtime/aggregate.d.ts +51 -0
- package/dist/components/charts/realtime/eventTime.d.ts +26 -0
- 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/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/colorPalettes.d.ts +2 -0
- package/dist/components/charts/shared/colorUtils.d.ts +17 -13
- package/dist/components/charts/shared/diagnoseAnnotationChecks.d.ts +4 -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/hooks.d.ts +28 -5
- package/dist/components/charts/shared/minMax.d.ts +3 -0
- package/dist/components/charts/shared/motionEncoding.d.ts +145 -0
- package/dist/components/charts/shared/radialGeometry.d.ts +0 -18
- package/dist/components/charts/shared/responsiveRules.d.ts +56 -0
- package/dist/components/charts/shared/smartTooltip.d.ts +27 -0
- package/dist/components/charts/shared/statisticalOverlays.d.ts +35 -0
- package/dist/components/charts/shared/streamPropsHelpers.d.ts +12 -2
- package/dist/components/charts/shared/temporalStrings.d.ts +7 -0
- package/dist/components/charts/shared/tooltipUtils.d.ts +2 -0
- package/dist/components/charts/shared/types.d.ts +49 -1
- package/dist/components/charts/shared/useChartSetup.d.ts +10 -3
- package/dist/components/charts/shared/useCustomChartSetup.d.ts +15 -6
- package/dist/components/charts/shared/useNetworkChartSetup.d.ts +6 -2
- package/dist/components/charts/shared/useOrdinalPieceStyle.d.ts +1 -1
- package/dist/components/charts/shared/useStreamingLegend.d.ts +1 -1
- package/dist/components/charts/shared/useSyncedPushData.d.ts +49 -0
- package/dist/components/charts/shared/validateChartData.d.ts +1 -1
- package/dist/components/charts/shared/validationMap.d.ts +0 -11
- package/dist/components/charts/xy/AreaChart.d.ts +1 -1
- package/dist/components/charts/xy/BubbleChart.d.ts +1 -1
- package/dist/components/charts/xy/LineChart.d.ts +1 -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 +1 -1
- package/dist/components/charts/xy/Scatterplot.d.ts +10 -1
- package/dist/components/charts/xy/ScatterplotMatrix.d.ts +11 -1
- package/dist/components/charts/xy/StackedAreaChart.d.ts +9 -4
- package/dist/components/controls/controlAudit.d.ts +24 -0
- package/dist/components/controls/controlContract.d.ts +57 -0
- package/dist/components/data/fromArrow.d.ts +54 -0
- package/dist/components/data/fromFlintChart.d.ts +74 -0
- package/dist/components/data/fromMermaid.d.ts +47 -0
- package/dist/components/data/fromObservablePlot.d.ts +69 -0
- package/dist/components/data/fromVegaLite.d.ts +27 -0
- package/dist/components/data/portability/index.d.ts +17 -0
- package/dist/components/data/portability/result.d.ts +52 -0
- package/dist/components/data/portability/spec.d.ts +160 -0
- package/dist/components/data/portability/vegaLite.d.ts +80 -0
- package/dist/components/export/chartConfig.d.ts +11 -0
- package/dist/components/realtime/ReorderBuffer.d.ts +54 -0
- package/dist/components/realtime/RunningStats.d.ts +66 -0
- package/dist/components/realtime/WindowAccumulator.d.ts +105 -0
- package/dist/components/realtime/parseWindowDuration.d.ts +12 -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/boba.d.ts +23 -0
- package/dist/components/recipes/customTooltip.d.ts +31 -0
- 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 +215 -0
- package/dist/components/recipes/gofishIRExamples.d.ts +38 -0
- 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/mermaidDag.d.ts +44 -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/packedClusterMatrix.d.ts +166 -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 +191 -0
- package/dist/components/recipes/recipeGlyph.d.ts +42 -0
- package/dist/components/recipes/recipeLegend.d.ts +109 -0
- package/dist/components/recipes/recipeUtils.d.ts +157 -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/semiotic-ai-core.d.ts +47 -0
- package/dist/components/semiotic-ai.d.ts +52 -4
- package/dist/components/semiotic-controls.d.ts +18 -0
- package/dist/components/semiotic-data.d.ts +2 -0
- package/dist/components/semiotic-experimental.d.ts +49 -0
- package/dist/components/semiotic-geo.d.ts +11 -0
- package/dist/components/semiotic-network.d.ts +14 -1
- package/dist/components/semiotic-ordinal.d.ts +10 -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 +56 -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 -22
- 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 -26
- 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 -74
- package/dist/components/semiotic-utils-core.d.ts +46 -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 +10 -0
- package/dist/components/semiotic.d.ts +39 -7
- package/dist/components/server/animatedGif.d.ts +36 -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 +17 -0
- package/dist/components/server/serverChartConfigs.d.ts +19 -9
- 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/staticGeo.d.ts +4 -0
- package/dist/components/server/staticLegend.d.ts +1 -1
- 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 -3
- package/dist/components/store/SelectionStore.d.ts +1 -1
- package/dist/components/store/ThemeStore.d.ts +1 -1
- package/dist/components/store/TooltipStore.d.ts +1 -1
- package/dist/components/store/createStore.d.ts +1 -1
- package/dist/components/store/designTokens.d.ts +15 -0
- 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 +3 -13
- package/dist/components/stream/FocusRing.d.ts +4 -2
- package/dist/components/stream/GeoCanvasHitTester.d.ts +1 -1
- package/dist/components/stream/GeoPipelineStore.d.ts +28 -0
- package/dist/components/stream/NetworkHtmlMarksLayer.d.ts +44 -0
- package/dist/components/stream/NetworkPipelineStore.d.ts +62 -25
- package/dist/components/stream/NetworkSVGOverlay.d.ts +15 -0
- package/dist/components/stream/OrdinalPipelineStore.d.ts +64 -2
- package/dist/components/stream/PipelineStore.d.ts +100 -162
- package/dist/components/stream/SceneGraph.d.ts +14 -2
- 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 +23 -10
- 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/customLayout.d.ts +20 -0
- package/dist/components/stream/customLayoutDiagnostics.d.ts +11 -0
- package/dist/components/stream/customLayoutFailure.d.ts +33 -0
- package/dist/components/stream/customLayoutPalette.d.ts +19 -9
- package/dist/components/stream/customLayoutSelection.d.ts +52 -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/geoTypes.d.ts +56 -7
- package/dist/components/stream/glyphDef.d.ts +98 -0
- package/dist/components/stream/hitTarget.d.ts +170 -0
- package/dist/components/stream/hoverUtils.d.ts +3 -0
- 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 +57 -0
- package/dist/components/stream/networkBezier.d.ts +10 -0
- package/dist/components/stream/networkColorAccessors.d.ts +49 -0
- package/dist/components/stream/networkCustomLayout.d.ts +66 -1
- package/dist/components/stream/networkDefaultTooltip.d.ts +10 -0
- package/dist/components/stream/networkFrameInteraction.d.ts +37 -0
- package/dist/components/stream/networkFramePaint.d.ts +43 -0
- package/dist/components/stream/networkPipelineConfig.d.ts +22 -0
- package/dist/components/stream/networkPipelineHelpers.d.ts +12 -0
- package/dist/components/stream/networkRealtimeEncoding.d.ts +41 -0
- package/dist/components/stream/networkTypes.d.ts +104 -5
- package/dist/components/stream/ordinalCanvasRenderers.d.ts +7 -0
- package/dist/components/stream/ordinalCustomLayout.d.ts +17 -1
- 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 +12 -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 -0
- package/dist/components/stream/ordinalSpatialIndex.d.ts +9 -0
- package/dist/components/stream/ordinalTypes.d.ts +56 -8
- 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 +84 -0
- package/dist/components/stream/physics/PhysicsPipelineTypes.d.ts +181 -0
- package/dist/components/stream/physics/PhysicsSVGOverlay.d.ts +72 -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 +302 -0
- package/dist/components/stream/physics/physicsBodyCanvas.d.ts +27 -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 +9 -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 +16 -0
- package/dist/components/stream/pipelineBufferUtils.d.ts +26 -0
- package/dist/components/stream/pipelineConfig.d.ts +177 -0
- package/dist/components/stream/pipelineDecay.d.ts +20 -2
- 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 +16 -2
- 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 +12 -0
- package/dist/components/stream/pipelineStyleResolvers.d.ts +46 -0
- package/dist/components/stream/pipelineTransitions.d.ts +2 -0
- package/dist/components/stream/pipelineUpdateContract.d.ts +62 -0
- package/dist/components/stream/pulseFrameRefresh.d.ts +22 -0
- package/dist/components/stream/renderers/glyphCanvasRenderer.d.ts +6 -0
- package/dist/components/stream/renderers/networkSymbolRenderer.d.ts +2 -0
- package/dist/components/stream/renderers/resolveCSSColor.d.ts +6 -0
- package/dist/components/stream/renderers/symbolCanvasRenderer.d.ts +2 -0
- package/dist/components/stream/sceneRevisionDiagnostics.d.ts +18 -0
- package/dist/components/stream/stalenessBands.d.ts +28 -0
- package/dist/components/stream/streamStoreSync.d.ts +37 -0
- package/dist/components/stream/symbolPath.d.ts +24 -0
- package/dist/components/stream/types.d.ts +206 -9
- package/dist/components/stream/useFrame.d.ts +21 -2
- package/dist/components/stream/useHydration.d.ts +6 -0
- package/dist/components/stream/useLegendCategoryEmission.d.ts +5 -0
- package/dist/components/stream/useStalenessCheck.d.ts +6 -1
- 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/xySceneBuilders/pointScene.d.ts +2 -2
- package/dist/components/stream/xySceneBuilders/types.d.ts +9 -4
- 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/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 +52 -4
- 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 +18 -0
- package/dist/semiotic-data.d.ts +2 -0
- package/dist/semiotic-data.min.js +1 -1
- package/dist/semiotic-data.module.min.js +1 -1
- package/dist/semiotic-experimental.d.ts +49 -0
- package/dist/semiotic-experimental.min.js +1 -0
- package/dist/semiotic-experimental.module.min.js +1 -0
- package/dist/semiotic-geo.d.ts +11 -0
- package/dist/semiotic-network.d.ts +14 -1
- package/dist/semiotic-ordinal.d.ts +10 -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 +56 -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 -22
- 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 -26
- package/dist/semiotic-recipes.min.js +1 -1
- package/dist/semiotic-recipes.module.min.js +1 -1
- 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 -74
- package/dist/semiotic-themes.min.js +1 -2
- package/dist/semiotic-themes.module.min.js +1 -2
- package/dist/semiotic-utils-core.d.ts +46 -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 +10 -0
- package/dist/semiotic.d.ts +39 -7
- 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-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 +246 -86
- 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/semiotic-ai-statisticalOverlays-C2PPlmXv.js +0 -1
- package/dist/semiotic-statisticalOverlays-C3DsOgr_.js +0 -1
- package/dist/xy-statisticalOverlays-C2PPlmXv.js +0 -1
|
@@ -0,0 +1,278 @@
|
|
|
1
|
+
import type { Datum } from "../charts/shared/datumTypes";
|
|
2
|
+
import type { CustomLayout } from "../stream/customLayout";
|
|
3
|
+
import type { GeoCustomLayout } from "../stream/geoCustomLayout";
|
|
4
|
+
import type { NetworkCustomLayout } from "../stream/networkCustomLayout";
|
|
5
|
+
import type { OrdinalCustomLayout } from "../stream/ordinalCustomLayout";
|
|
6
|
+
import type { NavTreeNode } from "./navigationTree";
|
|
7
|
+
import type { IntentId } from "./intents";
|
|
8
|
+
import type { VisualizationControlDefinition } from "../controls/controlContract";
|
|
9
|
+
/**
|
|
10
|
+
* A frame identifies the rendering/runtime substrate a recipe expects. It does
|
|
11
|
+
* not identify the recipe's analytical meaning — that lives in dataRoles,
|
|
12
|
+
* encodings, intents, and designContract.
|
|
13
|
+
*/
|
|
14
|
+
export type ChartRecipeFrameFamily = "XYFrame" | "OrdinalFrame" | "NetworkFrame" | "GeoFrame" | "XYCustomChart" | "NetworkCustomChart" | "OrdinalCustomChart" | "GeoCustomChart" | "Other";
|
|
15
|
+
export type ChartRecipePortability = "portable" | "local";
|
|
16
|
+
/**
|
|
17
|
+
* JSON-schema-compatible metadata for serializable recipe configuration.
|
|
18
|
+
* Kept structurally open in v0 so callers can use JSON Schema, Zod-emitted
|
|
19
|
+
* schema, or another serializable schema vocabulary without an adapter.
|
|
20
|
+
*/
|
|
21
|
+
export type SerializableSchema = Record<string, unknown>;
|
|
22
|
+
interface RecipeDatumMarker<TDatum> {
|
|
23
|
+
/** Type-only marker; never required on a runtime layout function. */
|
|
24
|
+
readonly __chartRecipeDatumType?: TDatum;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Any of Semiotic's four custom-layout contracts. The datum marker preserves a
|
|
28
|
+
* recipe author's datum generic without changing the established layout APIs.
|
|
29
|
+
*/
|
|
30
|
+
export type CustomLayoutFunction<TDatum extends Datum = Datum, TConfig extends object = Record<string, unknown>> = (CustomLayout<TConfig> | OrdinalCustomLayout<TConfig> | NetworkCustomLayout<TConfig> | GeoCustomLayout<TConfig>) & RecipeDatumMarker<TDatum>;
|
|
31
|
+
/**
|
|
32
|
+
* Serializable reference used by portable recipes. A host registry resolves
|
|
33
|
+
* the id to executable layout code; local recipes may carry the function
|
|
34
|
+
* directly instead.
|
|
35
|
+
*/
|
|
36
|
+
export interface RegisteredRecipeLayout {
|
|
37
|
+
id: string;
|
|
38
|
+
importPath?: string;
|
|
39
|
+
exportName?: string;
|
|
40
|
+
}
|
|
41
|
+
export type DataSemanticType = "nominal" | "ordinal" | "quantitative" | "temporal" | "identifier" | "boolean" | "geographic" | "unknown";
|
|
42
|
+
export interface DataRoleDefinition {
|
|
43
|
+
/** Open role vocabulary: category/value, node-id, edge-source, longitude, etc. */
|
|
44
|
+
role: string;
|
|
45
|
+
/** Concrete/default field used by this recipe/example. May be omitted for computed roles. */
|
|
46
|
+
field?: string;
|
|
47
|
+
/** Recipe config key that can bind this role to a different concrete field. */
|
|
48
|
+
accessor?: string;
|
|
49
|
+
required?: boolean;
|
|
50
|
+
semanticType: DataSemanticType;
|
|
51
|
+
description?: string;
|
|
52
|
+
/** Which input collection owns the field for multi-table/network/geo recipes. */
|
|
53
|
+
source?: "data" | "nodes" | "edges" | "areas" | "points" | "lines" | string;
|
|
54
|
+
}
|
|
55
|
+
export type EncodingChannel = "position" | "count" | "color" | "size" | "shape" | "length" | "area" | "angle" | "connection" | "order" | "texture" | "motion" | "label" | string;
|
|
56
|
+
export interface EncodingDefinition {
|
|
57
|
+
channel: EncodingChannel;
|
|
58
|
+
/** One role or a relationship among several roles. */
|
|
59
|
+
role: string | string[];
|
|
60
|
+
meaning: string;
|
|
61
|
+
/** Other channels that preserve this meaning when the primary channel fails. */
|
|
62
|
+
redundantWith?: string[];
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* String shorthand keeps v0 manifests approachable. The object form adds the
|
|
66
|
+
* rationale/strength needed by suggestion and explanation surfaces.
|
|
67
|
+
*/
|
|
68
|
+
export type IntentDefinition = IntentId | {
|
|
69
|
+
/** Canonical intent id. `name` is accepted as an author-friendly alias. */
|
|
70
|
+
id?: IntentId;
|
|
71
|
+
name?: IntentId;
|
|
72
|
+
strength?: "primary" | "secondary" | "supporting";
|
|
73
|
+
score?: number;
|
|
74
|
+
rationale?: string;
|
|
75
|
+
};
|
|
76
|
+
export interface AudienceFitDefinition {
|
|
77
|
+
audience: string;
|
|
78
|
+
fit: "strong" | "moderate" | "weak" | "avoid";
|
|
79
|
+
rationale?: string;
|
|
80
|
+
}
|
|
81
|
+
export interface LiteracyTargetDefinition {
|
|
82
|
+
concept: string;
|
|
83
|
+
rationale: string;
|
|
84
|
+
}
|
|
85
|
+
/**
|
|
86
|
+
* Example-local audience vocabulary. This mirrors the seed manifests used in
|
|
87
|
+
* the docs while audienceFit supports a compact list for ranking systems.
|
|
88
|
+
*/
|
|
89
|
+
export interface RecipeAudienceDefinition {
|
|
90
|
+
primary?: string;
|
|
91
|
+
familiarity?: Record<string, string | number>;
|
|
92
|
+
literacyTargets?: LiteracyTargetDefinition[];
|
|
93
|
+
}
|
|
94
|
+
export interface ReceptionDefinition {
|
|
95
|
+
channels: string[];
|
|
96
|
+
strengths?: string[];
|
|
97
|
+
risks?: string[];
|
|
98
|
+
scaffolds?: string[];
|
|
99
|
+
/** Whether distinct form/memorability is an intentional reception benefit. */
|
|
100
|
+
memorableForm?: boolean;
|
|
101
|
+
}
|
|
102
|
+
export interface DesignContractDefinition {
|
|
103
|
+
whyCustom: string;
|
|
104
|
+
/** Alias used by Intent Mark / portable manifests. */
|
|
105
|
+
whyThisForm?: string;
|
|
106
|
+
whyNotDefault?: string;
|
|
107
|
+
defaultAlternative?: string;
|
|
108
|
+
tradeoff?: string;
|
|
109
|
+
caveats?: string[];
|
|
110
|
+
misuse?: string[];
|
|
111
|
+
}
|
|
112
|
+
export interface RecipeStrategyContext<TDatum extends Datum = Datum, TConfig extends object = Record<string, unknown>> {
|
|
113
|
+
data: ReadonlyArray<TDatum>;
|
|
114
|
+
config: TConfig;
|
|
115
|
+
locale?: string;
|
|
116
|
+
}
|
|
117
|
+
export interface RecipeDescription {
|
|
118
|
+
text: string;
|
|
119
|
+
levels?: {
|
|
120
|
+
l1?: string;
|
|
121
|
+
l2?: string;
|
|
122
|
+
l3?: string;
|
|
123
|
+
l4?: string;
|
|
124
|
+
};
|
|
125
|
+
}
|
|
126
|
+
export type DescriptionStrategy<TDatum extends Datum = Datum, TConfig extends object = Record<string, unknown>> = (context: RecipeStrategyContext<TDatum, TConfig>) => RecipeDescription;
|
|
127
|
+
export type NavigationStrategy<TDatum extends Datum = Datum, TConfig extends object = Record<string, unknown>> = (context: RecipeStrategyContext<TDatum, TConfig>) => NavTreeNode;
|
|
128
|
+
/**
|
|
129
|
+
* JSON-safe navigation contract for portable recipes. Role names resolve
|
|
130
|
+
* through `dataRoles`; templates use `{field}`, `{role}`, and `{count}` tokens.
|
|
131
|
+
*/
|
|
132
|
+
export interface PortableNavigationStrategy {
|
|
133
|
+
groupByRole?: string;
|
|
134
|
+
groupBy?: string[];
|
|
135
|
+
itemLabelTemplate?: string;
|
|
136
|
+
summaryTemplate?: string;
|
|
137
|
+
idRole?: string;
|
|
138
|
+
}
|
|
139
|
+
export interface AccessibilityTableField {
|
|
140
|
+
role?: string;
|
|
141
|
+
field?: string;
|
|
142
|
+
label: string;
|
|
143
|
+
format?: "number" | "percent" | "date" | string;
|
|
144
|
+
}
|
|
145
|
+
export interface AccessibilityExpectations {
|
|
146
|
+
keyboardNavigation?: "required" | "recommended" | "not-applicable";
|
|
147
|
+
accessibleTable?: "required" | "recommended" | "not-applicable";
|
|
148
|
+
description?: "required" | "recommended" | "not-applicable";
|
|
149
|
+
/** The semantic unit readers should traverse instead of raw visual primitives. */
|
|
150
|
+
navigationGranularity?: "datum" | "category" | "group" | "node" | "edge" | "summary" | string;
|
|
151
|
+
dataBearingSceneNodes?: "required" | "recommended" | "not-applicable";
|
|
152
|
+
fallbackTable?: boolean;
|
|
153
|
+
redundantEncodings?: string[];
|
|
154
|
+
requirements?: string[];
|
|
155
|
+
/** Fields the scene-backed accessible table must preserve. */
|
|
156
|
+
tableFields?: AccessibilityTableField[];
|
|
157
|
+
/** Author-friendly aliases used by portable manifests. */
|
|
158
|
+
requiresTitle?: boolean;
|
|
159
|
+
requiresSummary?: boolean;
|
|
160
|
+
requiresAccessibleTable?: boolean;
|
|
161
|
+
minimumHitTarget?: number;
|
|
162
|
+
tableRoles?: string[];
|
|
163
|
+
}
|
|
164
|
+
export interface MobileInteractionDefinition {
|
|
165
|
+
/** Primary phone interaction, e.g. "tap", "button", "drag", "none". */
|
|
166
|
+
primary?: string;
|
|
167
|
+
/** Standard non-hover alternatives available to the reader. */
|
|
168
|
+
alternatives?: string[];
|
|
169
|
+
/** How hover detail is recovered on touch devices, e.g. "tap-to-lock". */
|
|
170
|
+
hoverFallback?: string;
|
|
171
|
+
/** Comfortable pointer target in CSS pixels. */
|
|
172
|
+
targetSize?: number;
|
|
173
|
+
}
|
|
174
|
+
export interface MobileLabelDefinition {
|
|
175
|
+
/** Label strategy at phone width, e.g. "direct", "inline", "external", "legend". */
|
|
176
|
+
strategy?: string;
|
|
177
|
+
/** Minimum resolved label font size in CSS pixels. */
|
|
178
|
+
minFontSize?: number;
|
|
179
|
+
}
|
|
180
|
+
export interface MobileCustomSemanticsDefinition {
|
|
181
|
+
/** Whether emitted scene nodes retain data semantics for audit/grounding. */
|
|
182
|
+
dataBearingSceneNodes?: boolean;
|
|
183
|
+
/** Whether emitted scene nodes use stable ids across renders. */
|
|
184
|
+
stableIds?: boolean;
|
|
185
|
+
/** Semantic unit readers should traverse on a phone. */
|
|
186
|
+
navigationGranularity?: string;
|
|
187
|
+
}
|
|
188
|
+
export interface MobileDesignDefinition {
|
|
189
|
+
/** Overall mobile design strategy, e.g. "responsive", "small-multiples", "summary-cards". */
|
|
190
|
+
strategy?: string;
|
|
191
|
+
/** True when the layout intentionally recomputes for narrow viewports. */
|
|
192
|
+
responsive?: boolean;
|
|
193
|
+
/** Alias for responsive, friendlier in portable manifests. */
|
|
194
|
+
supportsResponsiveLayout?: boolean;
|
|
195
|
+
/** Widths this recipe/adapter has designed variants for. */
|
|
196
|
+
breakpoints?: number[];
|
|
197
|
+
/** Minimum CSS viewport width the authored design supports. */
|
|
198
|
+
minViewportWidth?: number;
|
|
199
|
+
/** Mobile mark budget before aggregation/faceting/progressive disclosure. */
|
|
200
|
+
maxMarks?: number;
|
|
201
|
+
/** Mobile annotation budget before collapsing notes out of the plot. */
|
|
202
|
+
maxAnnotations?: number;
|
|
203
|
+
/** Minimum pointer target the recipe/adapter provides. */
|
|
204
|
+
minimumHitTarget?: number;
|
|
205
|
+
/** Whether the mobile view provides a title/summary/card before the visual. */
|
|
206
|
+
summary?: boolean | string;
|
|
207
|
+
interaction?: MobileInteractionDefinition;
|
|
208
|
+
labels?: MobileLabelDefinition;
|
|
209
|
+
custom?: MobileCustomSemanticsDefinition;
|
|
210
|
+
}
|
|
211
|
+
export interface RecipeAuditExpectations {
|
|
212
|
+
maxCategories?: number;
|
|
213
|
+
maxMarks?: number;
|
|
214
|
+
minimumHitTargetSize?: number;
|
|
215
|
+
requireStableIds?: boolean;
|
|
216
|
+
requireDatumCoverage?: boolean;
|
|
217
|
+
expectedSceneNodeTypes?: string[];
|
|
218
|
+
checks?: string[];
|
|
219
|
+
}
|
|
220
|
+
export interface RecipeExample<TDatum extends Datum = Datum, TConfig extends object = Record<string, unknown>> {
|
|
221
|
+
name: string;
|
|
222
|
+
description?: string;
|
|
223
|
+
data?: ReadonlyArray<TDatum>;
|
|
224
|
+
config?: TConfig;
|
|
225
|
+
path?: string;
|
|
226
|
+
}
|
|
227
|
+
export interface RecipePortabilityConfig {
|
|
228
|
+
schema: SerializableSchema;
|
|
229
|
+
}
|
|
230
|
+
/**
|
|
231
|
+
* Declarative identity/meaning contract for a custom chart recipe.
|
|
232
|
+
*
|
|
233
|
+
* Required v0 fields intentionally stay small. A recipe can participate before
|
|
234
|
+
* it has a schema, generated description, custom navigation tree, or detailed
|
|
235
|
+
* audit expectations; those layers can be added without changing its identity.
|
|
236
|
+
*/
|
|
237
|
+
export interface ChartRecipe<TDatum extends Datum = Datum, TConfig extends object = Record<string, unknown>> {
|
|
238
|
+
id: string;
|
|
239
|
+
name: string;
|
|
240
|
+
version?: string;
|
|
241
|
+
frameFamily: ChartRecipeFrameFamily;
|
|
242
|
+
portability: ChartRecipePortability;
|
|
243
|
+
layout?: CustomLayoutFunction<TDatum, TConfig> | RegisteredRecipeLayout;
|
|
244
|
+
layoutConfigSchema?: SerializableSchema;
|
|
245
|
+
portabilityConfig?: RecipePortabilityConfig;
|
|
246
|
+
dataRoles: DataRoleDefinition[];
|
|
247
|
+
encodings?: EncodingDefinition[];
|
|
248
|
+
intents: IntentDefinition[];
|
|
249
|
+
audience?: RecipeAudienceDefinition;
|
|
250
|
+
audienceFit?: AudienceFitDefinition[];
|
|
251
|
+
reception?: ReceptionDefinition;
|
|
252
|
+
designContract: DesignContractDefinition;
|
|
253
|
+
accessibility: AccessibilityExpectations;
|
|
254
|
+
/** Phone-specific contract consumed by audits, agents, and portable adapters. */
|
|
255
|
+
mobile?: MobileDesignDefinition;
|
|
256
|
+
/** Portable controls expose state semantics, never frame-specific handlers. */
|
|
257
|
+
controls?: ReadonlyArray<VisualizationControlDefinition>;
|
|
258
|
+
description?: DescriptionStrategy<TDatum, TConfig>;
|
|
259
|
+
navigation?: NavigationStrategy<TDatum, TConfig> | PortableNavigationStrategy;
|
|
260
|
+
audit?: RecipeAuditExpectations;
|
|
261
|
+
caveats?: string[];
|
|
262
|
+
examples?: RecipeExample<TDatum, TConfig>[];
|
|
263
|
+
}
|
|
264
|
+
/**
|
|
265
|
+
* Define a chart recipe with full generic inference. Intentionally an identity
|
|
266
|
+
* function in v0: the value is the shared, inspectable shape rather than hidden
|
|
267
|
+
* registration or runtime behavior.
|
|
268
|
+
*/
|
|
269
|
+
export declare function defineChartRecipe<TDatum extends Datum = Datum, TConfig extends object = Record<string, unknown>>(recipe: ChartRecipe<TDatum, TConfig>): ChartRecipe<TDatum, TConfig>;
|
|
270
|
+
/**
|
|
271
|
+
* Runtime validation is intentionally limited to contract integrity. It does
|
|
272
|
+
* not try to validate a recipe's domain-specific layout configuration.
|
|
273
|
+
*/
|
|
274
|
+
export declare function validateChartRecipe<TDatum extends Datum = Datum, TConfig extends object = Record<string, unknown>>(recipe: ChartRecipe<TDatum, TConfig>): void;
|
|
275
|
+
export declare function isRegisteredRecipeLayout(layout: unknown): layout is RegisteredRecipeLayout;
|
|
276
|
+
/** True when a value can cross JSON/CLI/MCP boundaries without data loss. */
|
|
277
|
+
export declare function isJsonSafe(value: unknown, seen?: Set<object>): boolean;
|
|
278
|
+
export {};
|
|
@@ -0,0 +1,203 @@
|
|
|
1
|
+
import type { Datum } from "../charts/shared/datumTypes";
|
|
2
|
+
import { type AccessibilityAuditResult, type AuditAccessibilityOptions } from "../charts/shared/auditAccessibility";
|
|
3
|
+
import { type DiagnosisResult } from "../charts/shared/diagnoseConfig";
|
|
4
|
+
import { type ChartConfig, type ToConfigOptions } from "../export/chartConfig";
|
|
5
|
+
import { type ChartReaderGrounding, type ChartReaderGroundingOptions } from "./readerGrounding";
|
|
6
|
+
export type DataPitfallsImageMediaType = "image/png" | "image/jpeg" | "image/gif" | "image/webp";
|
|
7
|
+
export interface DataPitfallsImageSource {
|
|
8
|
+
content: string;
|
|
9
|
+
mediaType: DataPitfallsImageMediaType;
|
|
10
|
+
filename?: string;
|
|
11
|
+
}
|
|
12
|
+
export interface DataPitfallsTextInput {
|
|
13
|
+
kind: "code" | "text";
|
|
14
|
+
content: string;
|
|
15
|
+
language?: string;
|
|
16
|
+
filename?: string;
|
|
17
|
+
}
|
|
18
|
+
export interface DataPitfallsImageInput {
|
|
19
|
+
kind: "image";
|
|
20
|
+
images: DataPitfallsImageSource[];
|
|
21
|
+
}
|
|
22
|
+
export interface DataPitfallsDocumentInput {
|
|
23
|
+
kind: "document";
|
|
24
|
+
content: string;
|
|
25
|
+
mediaType: "application/pdf";
|
|
26
|
+
filename?: string;
|
|
27
|
+
}
|
|
28
|
+
export interface DataPitfallsSlideContent {
|
|
29
|
+
text: string;
|
|
30
|
+
images: DataPitfallsImageSource[];
|
|
31
|
+
}
|
|
32
|
+
export interface DataPitfallsSlidesInput {
|
|
33
|
+
kind: "slides";
|
|
34
|
+
slides: DataPitfallsSlideContent[];
|
|
35
|
+
filename?: string;
|
|
36
|
+
}
|
|
37
|
+
export type DataPitfallsSingleArtifactInput = DataPitfallsTextInput | DataPitfallsImageInput | DataPitfallsDocumentInput | DataPitfallsSlidesInput;
|
|
38
|
+
export interface DataPitfallsChainStage {
|
|
39
|
+
role: string;
|
|
40
|
+
artifact: DataPitfallsSingleArtifactInput;
|
|
41
|
+
}
|
|
42
|
+
export interface DataPitfallsChainInput {
|
|
43
|
+
kind: "chain";
|
|
44
|
+
stages: DataPitfallsChainStage[];
|
|
45
|
+
}
|
|
46
|
+
export interface DataPitfallsRenderedChart {
|
|
47
|
+
/** SVG markup from `semiotic/server` renderChart/renderChartWithEvidence or MCP renderChart. */
|
|
48
|
+
svg?: string;
|
|
49
|
+
/** Render evidence from `renderChartWithEvidence` or MCP renderChart. */
|
|
50
|
+
evidence?: unknown;
|
|
51
|
+
/** Optional rendered chart image for Data Pitfalls' Vision path. */
|
|
52
|
+
image?: DataPitfallsImageSource | DataPitfallsImageSource[];
|
|
53
|
+
}
|
|
54
|
+
export interface DataPitfallsBridgeOptions {
|
|
55
|
+
/** Default true. Include the serializable Semiotic chart config as JSON. */
|
|
56
|
+
includeConfig?: boolean;
|
|
57
|
+
/** Default true. Include JSX reconstructed from the serializable chart config. */
|
|
58
|
+
includeJSX?: boolean;
|
|
59
|
+
/** Default true. Include describeChart/buildReaderGrounding text and structure. */
|
|
60
|
+
includeGrounding?: boolean;
|
|
61
|
+
/** Default true. Include diagnoseConfig output. */
|
|
62
|
+
includeDiagnostics?: boolean;
|
|
63
|
+
/** Default true. Include auditAccessibility output. */
|
|
64
|
+
includeAccessibility?: boolean;
|
|
65
|
+
/** Optional author or app context, such as the analytical question or intended claim. */
|
|
66
|
+
context?: string;
|
|
67
|
+
/** Optional narrative/caption/claim that will be reviewed alongside the chart. */
|
|
68
|
+
narrative?: string;
|
|
69
|
+
/** Optional output from a render path. */
|
|
70
|
+
rendered?: DataPitfallsRenderedChart;
|
|
71
|
+
/** Forwarded to toConfig. Use includeData: false to omit raw rows from config/JSX stages; other stages may still summarize data. */
|
|
72
|
+
config?: ToConfigOptions;
|
|
73
|
+
/** Forwarded to buildReaderGrounding. */
|
|
74
|
+
grounding?: ChartReaderGroundingOptions;
|
|
75
|
+
/** Forwarded to auditAccessibility. */
|
|
76
|
+
accessibility?: AuditAccessibilityOptions;
|
|
77
|
+
/** Prefix used for generated filenames. Default: component name. */
|
|
78
|
+
filenamePrefix?: string;
|
|
79
|
+
/** Extra caller-supplied chain stages, appended last. */
|
|
80
|
+
additionalStages?: DataPitfallsChainStage[];
|
|
81
|
+
}
|
|
82
|
+
export interface DataPitfallsBridgeResult {
|
|
83
|
+
input: DataPitfallsChainInput;
|
|
84
|
+
config: ChartConfig;
|
|
85
|
+
grounding?: ChartReaderGrounding;
|
|
86
|
+
diagnosis?: DiagnosisResult;
|
|
87
|
+
accessibility?: AccessibilityAuditResult;
|
|
88
|
+
}
|
|
89
|
+
export type DataPitfallsSeverity = "info" | "warning" | "error" | (string & {});
|
|
90
|
+
export type DataPitfallsInputKind = "text" | "code" | "image" | "document" | "slides" | "chain" | (string & {});
|
|
91
|
+
export interface DataPitfallsFinding {
|
|
92
|
+
ruleId: string;
|
|
93
|
+
name: string;
|
|
94
|
+
domain: string;
|
|
95
|
+
severity: DataPitfallsSeverity;
|
|
96
|
+
evidence?: string;
|
|
97
|
+
remediation?: string;
|
|
98
|
+
explanation?: string;
|
|
99
|
+
condition?: string;
|
|
100
|
+
[key: string]: unknown;
|
|
101
|
+
}
|
|
102
|
+
export interface DataPitfallsReport {
|
|
103
|
+
kind: DataPitfallsInputKind;
|
|
104
|
+
findings: DataPitfallsFinding[];
|
|
105
|
+
[key: string]: unknown;
|
|
106
|
+
}
|
|
107
|
+
export type DataPitfallsNotificationLevel = "info" | "warning" | "error" | "neutral";
|
|
108
|
+
export interface DataPitfallsChartNotification {
|
|
109
|
+
id?: string;
|
|
110
|
+
level?: DataPitfallsNotificationLevel;
|
|
111
|
+
title?: string;
|
|
112
|
+
message: string;
|
|
113
|
+
source?: string;
|
|
114
|
+
dismissible?: boolean;
|
|
115
|
+
}
|
|
116
|
+
export type DataPitfallsNotificationMessage = (finding: DataPitfallsFinding, index: number, report: DataPitfallsReport) => string;
|
|
117
|
+
export interface DataPitfallsNotificationBridgeOptions {
|
|
118
|
+
/** Cap emitted notifications. `meta.count` keeps the uncapped finding count. */
|
|
119
|
+
max?: number;
|
|
120
|
+
/** Prefix for the source tag. Default: "datapitfalls". */
|
|
121
|
+
sourcePrefix?: string;
|
|
122
|
+
/** Passed through to ChartContainer notifications when set. */
|
|
123
|
+
dismissible?: boolean;
|
|
124
|
+
/** Custom message mapper. Defaults to remediation, explanation, evidence, then condition. */
|
|
125
|
+
message?: DataPitfallsNotificationMessage;
|
|
126
|
+
}
|
|
127
|
+
export interface DataPitfallsNotificationBridge {
|
|
128
|
+
notifications: DataPitfallsChartNotification[];
|
|
129
|
+
meta: {
|
|
130
|
+
count: number;
|
|
131
|
+
kind: DataPitfallsInputKind;
|
|
132
|
+
};
|
|
133
|
+
}
|
|
134
|
+
export type DataPitfallsAnnotationType = "label" | "text";
|
|
135
|
+
export interface DataPitfallsSemioticAnnotation {
|
|
136
|
+
type: DataPitfallsAnnotationType;
|
|
137
|
+
title: string;
|
|
138
|
+
label: string;
|
|
139
|
+
wrap: number;
|
|
140
|
+
color: string;
|
|
141
|
+
className: string;
|
|
142
|
+
emphasis: "primary" | "secondary";
|
|
143
|
+
provenance: {
|
|
144
|
+
author: "datapitfalls";
|
|
145
|
+
authorKind: "watcher";
|
|
146
|
+
source: "computed";
|
|
147
|
+
basis: "llm-inference";
|
|
148
|
+
stableId: string;
|
|
149
|
+
};
|
|
150
|
+
dataPitfall: {
|
|
151
|
+
ruleId: string;
|
|
152
|
+
domain: string;
|
|
153
|
+
severity: DataPitfallsSeverity;
|
|
154
|
+
evidence: string;
|
|
155
|
+
};
|
|
156
|
+
[key: string]: unknown;
|
|
157
|
+
}
|
|
158
|
+
export interface DataPitfallsAnnotationBridgeOptions {
|
|
159
|
+
/** Override severity colors. Merged over the defaults. */
|
|
160
|
+
palette?: Partial<Record<string, string>>;
|
|
161
|
+
/** Cap emitted annotations. `meta.count` keeps the uncapped finding count. */
|
|
162
|
+
max?: number;
|
|
163
|
+
/** Text wrap width passed through to Semiotic v3 annotations. Default: 240. */
|
|
164
|
+
wrap?: number;
|
|
165
|
+
/** Semiotic v3 annotation type. Default: "label". */
|
|
166
|
+
type?: DataPitfallsAnnotationType;
|
|
167
|
+
/**
|
|
168
|
+
* Optional host-owned anchoring. Return `{ x, y }`, data accessors, or any
|
|
169
|
+
* other Semiotic annotation fields for findings you can position.
|
|
170
|
+
*/
|
|
171
|
+
anchorFor?: (finding: DataPitfallsFinding, index: number, report: DataPitfallsReport) => Record<string, unknown> | null | undefined;
|
|
172
|
+
}
|
|
173
|
+
export interface DataPitfallsAnnotationBridge {
|
|
174
|
+
annotations: DataPitfallsSemioticAnnotation[];
|
|
175
|
+
meta: {
|
|
176
|
+
count: number;
|
|
177
|
+
kind: DataPitfallsInputKind;
|
|
178
|
+
};
|
|
179
|
+
}
|
|
180
|
+
export declare const DEFAULT_DATA_PITFALLS_ANNOTATION_PALETTE: {
|
|
181
|
+
readonly info: "#2563eb";
|
|
182
|
+
readonly warning: "#d97706";
|
|
183
|
+
readonly error: "#dc2626";
|
|
184
|
+
};
|
|
185
|
+
export declare function dataPitfallsFindingToNotification(finding: DataPitfallsFinding, options?: DataPitfallsNotificationBridgeOptions, index?: number, report?: DataPitfallsReport): DataPitfallsChartNotification;
|
|
186
|
+
export declare function toDataPitfallsNotifications(report: DataPitfallsReport, options?: DataPitfallsNotificationBridgeOptions): DataPitfallsChartNotification[];
|
|
187
|
+
export declare function buildDataPitfallsNotificationBridge(report: DataPitfallsReport, options?: DataPitfallsNotificationBridgeOptions): DataPitfallsNotificationBridge;
|
|
188
|
+
export declare function dataPitfallsFindingToAnnotation(finding: DataPitfallsFinding, options?: DataPitfallsAnnotationBridgeOptions, index?: number, report?: DataPitfallsReport): DataPitfallsSemioticAnnotation;
|
|
189
|
+
export declare function toDataPitfallsAnnotations(report: DataPitfallsReport, options?: DataPitfallsAnnotationBridgeOptions): DataPitfallsSemioticAnnotation[];
|
|
190
|
+
export declare function buildDataPitfallsAnnotationBridge(report: DataPitfallsReport, options?: DataPitfallsAnnotationBridgeOptions): DataPitfallsAnnotationBridge;
|
|
191
|
+
/**
|
|
192
|
+
* Build a Data Pitfalls-compatible chain input from a Semiotic chart config.
|
|
193
|
+
*
|
|
194
|
+
* The returned `input` is intentionally dependency-free: pass it to
|
|
195
|
+
* `detectPitfalls(input, options)` from the `datapitfalls` package in your app,
|
|
196
|
+
* CI job, or research harness. Semiotic contributes the chart config,
|
|
197
|
+
* reader-grounding payload, config diagnostics, accessibility audit, and
|
|
198
|
+
* optional rendered output; Data Pitfalls remains responsible for model-backed
|
|
199
|
+
* pitfall detection.
|
|
200
|
+
*/
|
|
201
|
+
export declare function buildDataPitfallsBridge(component: string, props: Datum, options?: DataPitfallsBridgeOptions): DataPitfallsBridgeResult;
|
|
202
|
+
/** Convenience wrapper when you only need the Data Pitfalls input object. */
|
|
203
|
+
export declare function toDataPitfallsChain(component: string, props: Datum, options?: DataPitfallsBridgeOptions): DataPitfallsChainInput;
|
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Data-quality → provenanced-annotation bridge.
|
|
3
|
+
*
|
|
4
|
+
* Ingests data-quality results — dbt source-freshness + test artifacts, Great
|
|
5
|
+
* Expectations validation results, or a normalized form anyone can hand-build —
|
|
6
|
+
* and maps them to **provenanced, lifecycled chart annotations**. A failed dbt
|
|
7
|
+
* freshness check becomes a danger threshold on the chart that says *who* found
|
|
8
|
+
* it (a system rule), *how* (a freshness rule), *when*, and against *which data
|
|
9
|
+
* snapshot* — so the chart's communicative act flips from report to alert,
|
|
10
|
+
* driven entirely by external metadata.
|
|
11
|
+
*
|
|
12
|
+
* Doctrine this module honors:
|
|
13
|
+
* - Pure, no React, no new dependencies — it shapes plain JSON into the
|
|
14
|
+
* `Annotated[]` surface that already ships (`withProvenance` + the lifecycle
|
|
15
|
+
* helpers do the rest).
|
|
16
|
+
* - **Read-only overlay.** It consumes a data-quality system's output and never
|
|
17
|
+
* writes back into it. Clicking the chart does not trigger a dbt run.
|
|
18
|
+
* - **Refuse rather than mistranslate.** A check with no faithful chart
|
|
19
|
+
* coordinate (a `not_null` test, a uniqueness expectation) is NOT given a
|
|
20
|
+
* fabricated position — it is returned in `unplaced[]` with a reason, so the
|
|
21
|
+
* 30% an adapter can't place is announced rather than hidden.
|
|
22
|
+
*
|
|
23
|
+
* The data-quality system owns query execution, governance, and the test
|
|
24
|
+
* definitions; this bridge owns only the visual overlay and its provenance.
|
|
25
|
+
*/
|
|
26
|
+
import type { Datum } from "../charts/shared/datumTypes";
|
|
27
|
+
import type { AnnotationAnchor, AnnotationBasis, AnnotationStatus, Annotated } from "./annotationProvenance";
|
|
28
|
+
export type DataQualityStatus = "pass" | "fail" | "warn" | "error";
|
|
29
|
+
/**
|
|
30
|
+
* How a check relates to a chart. Only the kinds with a clear visual analog
|
|
31
|
+
* produce an annotation; the rest are reported as `unplaced`.
|
|
32
|
+
*/
|
|
33
|
+
export type DataQualityCheckKind = "range" | "min" | "max" | "threshold" | "freshness" | "not-null" | "unique" | "accepted-values" | "row-condition" | "custom";
|
|
34
|
+
/**
|
|
35
|
+
* A single data-quality result, normalized across source systems. The dbt and
|
|
36
|
+
* Great-Expectations parsers produce these; consumers can also hand-build them
|
|
37
|
+
* (e.g. to bridge Monte Carlo or a bespoke checker).
|
|
38
|
+
*/
|
|
39
|
+
export interface DataQualityResult {
|
|
40
|
+
/** Stable id of the check (test/expectation id). Becomes provenance.stableId. */
|
|
41
|
+
id: string;
|
|
42
|
+
/** Human-readable check name; falls back to id. Doubles as the provenance author. */
|
|
43
|
+
name?: string;
|
|
44
|
+
/** Concise phrase drawn on the chart. Falls back to `name`. Keep it short. */
|
|
45
|
+
label?: string;
|
|
46
|
+
status: DataQualityStatus;
|
|
47
|
+
kind: DataQualityCheckKind;
|
|
48
|
+
/** Column/field the check applies to (mapped through `fieldMap`). */
|
|
49
|
+
column?: string;
|
|
50
|
+
/** Lower bound (range/min). */
|
|
51
|
+
min?: number;
|
|
52
|
+
/** Upper bound (range/max). */
|
|
53
|
+
max?: number;
|
|
54
|
+
/** Single reference value (threshold/min/max). */
|
|
55
|
+
value?: number;
|
|
56
|
+
/** Freshness deadline or observed event time (ISO string or epoch ms). */
|
|
57
|
+
at?: string | number;
|
|
58
|
+
/** Free-form detail surfaced in the label. */
|
|
59
|
+
message?: string;
|
|
60
|
+
/** Source system. */
|
|
61
|
+
source?: "dbt" | "great-expectations" | (string & {});
|
|
62
|
+
/** Evidence type. Defaults to "rule" (deterministic constraint). */
|
|
63
|
+
basis?: AnnotationBasis;
|
|
64
|
+
/** 0–1; surfaced in the label only when < 1 (a hard rule needs no percent). */
|
|
65
|
+
confidence?: number;
|
|
66
|
+
/** ISO timestamp the check ran. */
|
|
67
|
+
createdAt?: string;
|
|
68
|
+
/** Data snapshot id (dbt invocation_id, GE run id). */
|
|
69
|
+
dataVersion?: string;
|
|
70
|
+
/** Failing-row count etc., surfaced in the label. */
|
|
71
|
+
observedCount?: number;
|
|
72
|
+
}
|
|
73
|
+
export interface DataQualityAnnotationOptions {
|
|
74
|
+
/** Map normalized column names → chart accessor field names. */
|
|
75
|
+
fieldMap?: Record<string, string>;
|
|
76
|
+
/** Which axis numeric thresholds map onto. Default "y". (Ranges always band on y.) */
|
|
77
|
+
valueAxis?: "x" | "y";
|
|
78
|
+
/** TTL applied to every generated annotation's lifecycle — drives freshness decay. */
|
|
79
|
+
ttlHint?: string | number;
|
|
80
|
+
/** Surface passing checks too (default false — only failures/warnings overlay). */
|
|
81
|
+
includePassed?: boolean;
|
|
82
|
+
/** Editorial status stamped on generated notes. Default "proposed". */
|
|
83
|
+
status?: AnnotationStatus;
|
|
84
|
+
/** Anchor mode. Default "semantic" so notes re-resolve through stableId on refresh. */
|
|
85
|
+
anchor?: AnnotationAnchor;
|
|
86
|
+
/** Color for failing/erroring checks. Default CSS var --semiotic-danger. */
|
|
87
|
+
failColor?: string;
|
|
88
|
+
/** Color for warnings. Default CSS var --semiotic-warning. */
|
|
89
|
+
warnColor?: string;
|
|
90
|
+
/** Color for passing checks (only used when includePassed). Default --semiotic-success. */
|
|
91
|
+
passColor?: string;
|
|
92
|
+
}
|
|
93
|
+
/** A result the bridge declined to place, with the reason (the D7 honesty surface). */
|
|
94
|
+
export interface UnplacedDataQualityResult {
|
|
95
|
+
result: DataQualityResult;
|
|
96
|
+
reason: string;
|
|
97
|
+
}
|
|
98
|
+
export interface DataQualityAnnotationsResult {
|
|
99
|
+
/** Annotations ready to pass to a chart's `annotations` prop. */
|
|
100
|
+
annotations: Annotated<Datum>[];
|
|
101
|
+
/** Results with no faithful chart coordinate, each with a reason. */
|
|
102
|
+
unplaced: UnplacedDataQualityResult[];
|
|
103
|
+
}
|
|
104
|
+
/**
|
|
105
|
+
* Map normalized data-quality results to provenanced annotations. The pure core
|
|
106
|
+
* both the dbt and Great-Expectations parsers funnel through; call it directly
|
|
107
|
+
* to bridge any other checker.
|
|
108
|
+
*/
|
|
109
|
+
export declare function dataQualityToAnnotations(results: ReadonlyArray<DataQualityResult>, options?: DataQualityAnnotationOptions): DataQualityAnnotationsResult;
|
|
110
|
+
/** Subset of a dbt artifact's `metadata` block we read. */
|
|
111
|
+
interface DbtMetadata {
|
|
112
|
+
generated_at?: string;
|
|
113
|
+
invocation_id?: string;
|
|
114
|
+
}
|
|
115
|
+
/** A `sources.json` (source-freshness) result entry. */
|
|
116
|
+
interface DbtFreshnessResult {
|
|
117
|
+
unique_id?: string;
|
|
118
|
+
status?: string;
|
|
119
|
+
max_loaded_at?: string;
|
|
120
|
+
snapshotted_at?: string;
|
|
121
|
+
criteria?: {
|
|
122
|
+
warn_after?: {
|
|
123
|
+
count?: number;
|
|
124
|
+
period?: string;
|
|
125
|
+
};
|
|
126
|
+
error_after?: {
|
|
127
|
+
count?: number;
|
|
128
|
+
period?: string;
|
|
129
|
+
};
|
|
130
|
+
};
|
|
131
|
+
}
|
|
132
|
+
/** A `run_results.json` result entry (we read the test-relevant fields). */
|
|
133
|
+
interface DbtRunResult {
|
|
134
|
+
unique_id?: string;
|
|
135
|
+
status?: string;
|
|
136
|
+
failures?: number | null;
|
|
137
|
+
message?: string | null;
|
|
138
|
+
}
|
|
139
|
+
export interface DbtArtifacts {
|
|
140
|
+
/** Parsed `sources.json` (dbt source freshness). */
|
|
141
|
+
sources?: {
|
|
142
|
+
metadata?: DbtMetadata;
|
|
143
|
+
results?: ReadonlyArray<DbtFreshnessResult>;
|
|
144
|
+
};
|
|
145
|
+
/** Parsed `run_results.json`. */
|
|
146
|
+
runResults?: {
|
|
147
|
+
metadata?: DbtMetadata;
|
|
148
|
+
results?: ReadonlyArray<DbtRunResult>;
|
|
149
|
+
};
|
|
150
|
+
}
|
|
151
|
+
/**
|
|
152
|
+
* Map dbt artifacts to provenanced annotations. The strongest mapping is source
|
|
153
|
+
* freshness (`sources.json`) — a real timestamp + status becomes a time
|
|
154
|
+
* threshold. Test results (`run_results.json`) carry pass/fail but not, without
|
|
155
|
+
* `manifest.json`, the column/range semantics needed to place them; those land
|
|
156
|
+
* in `unplaced[]` with a reason (D7).
|
|
157
|
+
*/
|
|
158
|
+
export declare function fromDbtArtifacts(artifacts: DbtArtifacts, options?: DataQualityAnnotationOptions): DataQualityAnnotationsResult;
|
|
159
|
+
interface GEExpectationConfig {
|
|
160
|
+
expectation_type?: string;
|
|
161
|
+
kwargs?: {
|
|
162
|
+
column?: string;
|
|
163
|
+
min_value?: number | null;
|
|
164
|
+
max_value?: number | null;
|
|
165
|
+
value?: number | null;
|
|
166
|
+
[key: string]: unknown;
|
|
167
|
+
};
|
|
168
|
+
}
|
|
169
|
+
interface GEResultEntry {
|
|
170
|
+
success?: boolean;
|
|
171
|
+
expectation_config?: GEExpectationConfig;
|
|
172
|
+
result?: {
|
|
173
|
+
observed_value?: number | string;
|
|
174
|
+
element_count?: number;
|
|
175
|
+
unexpected_count?: number;
|
|
176
|
+
};
|
|
177
|
+
}
|
|
178
|
+
export interface GEValidationResult {
|
|
179
|
+
success?: boolean;
|
|
180
|
+
results?: ReadonlyArray<GEResultEntry>;
|
|
181
|
+
meta?: {
|
|
182
|
+
run_id?: {
|
|
183
|
+
run_name?: string;
|
|
184
|
+
run_time?: string;
|
|
185
|
+
} | string;
|
|
186
|
+
[key: string]: unknown;
|
|
187
|
+
};
|
|
188
|
+
statistics?: {
|
|
189
|
+
evaluated_expectations?: number;
|
|
190
|
+
successful_expectations?: number;
|
|
191
|
+
};
|
|
192
|
+
}
|
|
193
|
+
/**
|
|
194
|
+
* Map a Great Expectations validation result to provenanced annotations.
|
|
195
|
+
* Range expectations (`expect_*_to_be_between`) become bands; single-bound
|
|
196
|
+
* expectations become thresholds. Set/uniqueness/null expectations have no
|
|
197
|
+
* single chart coordinate and are returned in `unplaced[]`. GE expectations are
|
|
198
|
+
* statistical assertions, so `basis` defaults to "statistical-test".
|
|
199
|
+
*/
|
|
200
|
+
export declare function fromGreatExpectations(validation: GEValidationResult, options?: DataQualityAnnotationOptions): DataQualityAnnotationsResult;
|
|
201
|
+
export {};
|