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
package/spec/README.md
ADDED
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
# The IDID Portability Spec
|
|
2
|
+
|
|
3
|
+
**Version 0.1 — library-neutral JSON Schemas for three chart-metadata primitives.**
|
|
4
|
+
|
|
5
|
+
These schemas describe three pieces of metadata that make a chart *legible to an agent* and
|
|
6
|
+
*receivable by a real audience*, independent of any rendering library:
|
|
7
|
+
|
|
8
|
+
| Primitive | Schema | Answers |
|
|
9
|
+
|---|---|---|
|
|
10
|
+
| **Chart Capability** | [`v0.1/chart-capability.schema.json`](./v0.1/chart-capability.schema.json) | *What is this chart good at, and how does it survive mobile?* — declaratively, so a heuristic or an LLM can rank it against a dataset, goal, audience, and phone viewport without running a chart library. |
|
|
11
|
+
| **Audience Profile** | [`v0.1/audience-profile.schema.json`](./v0.1/audience-profile.schema.json) | *Who is reading, and what is the org trying to grow?* — so a suggestion is calibrated to a real audience, not a generic baseline. |
|
|
12
|
+
| **Annotation Provenance & Lifecycle** | [`v0.1/annotation-provenance.schema.json`](./v0.1/annotation-provenance.schema.json) | *Where did this note come from, how much do we trust it, and how does it age?* — so a claim *on* a chart carries its own evidence and expiry. |
|
|
13
|
+
|
|
14
|
+
## Why a spec, and not just a library API
|
|
15
|
+
|
|
16
|
+
A chart that an AI can pick correctly, that a screen-reader user can receive, and that carries
|
|
17
|
+
its own provenance is more useful than one that only looks right. Those three properties are
|
|
18
|
+
*metadata*, not pixels — and metadata is portable in a way a rendering engine is not. The value
|
|
19
|
+
of writing them down as **library-neutral schemas** is that the ideas can travel: a Python
|
|
20
|
+
notebook, a Vega-Lite spec, a BI tool, or a competing chart library can attach a capability
|
|
21
|
+
descriptor, calibrate to an audience profile, or stamp an annotation with provenance *without
|
|
22
|
+
depending on any particular renderer*. The schema is the contract; the renderer is one
|
|
23
|
+
implementation of it.
|
|
24
|
+
|
|
25
|
+
A practical consequence: a format adapter (Vega-Lite → chart, Mermaid → chart, dbt test →
|
|
26
|
+
annotation) becomes an *export of these ideas* rather than just a parser. It does not merely
|
|
27
|
+
reproduce a source format's appearance — it carries the capability/audience/provenance metadata
|
|
28
|
+
the source never had. That is the difference between a chart that renders and a chart that
|
|
29
|
+
*communicates*.
|
|
30
|
+
|
|
31
|
+
## The `x-idid-status` field convention
|
|
32
|
+
|
|
33
|
+
Public domain properties carry an `x-idid-status` annotation so a reader can tell what is real
|
|
34
|
+
today from what the spec reserves for the future:
|
|
35
|
+
|
|
36
|
+
- **`shipped`** — the field exists in a reference implementation's runtime types today
|
|
37
|
+
(Semiotic ships all v0.1 fields). Safe to depend on.
|
|
38
|
+
- **`proposed`** — reserved by the program but not yet a runtime field. May change before it
|
|
39
|
+
ships. *(No v0.1 fields carry this status yet; the marker exists so additions are honestly
|
|
40
|
+
labeled rather than silently mixed in.)*
|
|
41
|
+
- **`spec`** — a spec-housekeeping field (e.g. `specVersion`), not a domain field.
|
|
42
|
+
|
|
43
|
+
Open string unions in the source types (e.g. `provenance.source`, which recognizes
|
|
44
|
+
`user`/`ai`/`agent`/… but accepts any string) are expressed as `{ "type": "string" }` with an
|
|
45
|
+
`x-idid-recognized-values` list and matching `examples`, rather than a closed `enum`. This is
|
|
46
|
+
faithful to the runtime contract — recognized values are documented, but a consumer may pass its
|
|
47
|
+
own label and it is preserved. Genuinely closed unions (`lifecycle.freshness`, `lifecycle.status`,
|
|
48
|
+
`lifecycle.anchor`) use a strict `enum`.
|
|
49
|
+
|
|
50
|
+
Chart capabilities may also include a `mobile` block. This is intentionally part of capability,
|
|
51
|
+
not rendering props: it lets a custom chart, Vega-Lite binding, or recipe adapter state its mobile
|
|
52
|
+
strategy, breakpoints, mark budget, touch target, label plan, and custom scene semantics without
|
|
53
|
+
requiring the receiving library to execute the renderer.
|
|
54
|
+
|
|
55
|
+
## Versioning
|
|
56
|
+
|
|
57
|
+
The spec is versioned by directory (`v0.1/`). A `0.x` line may add `proposed` fields and tighten
|
|
58
|
+
descriptions, but will not remove or repurpose a `shipped` field within the line. Breaking
|
|
59
|
+
changes bump the minor (pre-1.0) or major (post-1.0) version into a new directory; old versions
|
|
60
|
+
remain resolvable by their `$id`. A document may declare the version it targets via the optional
|
|
61
|
+
`specVersion: "0.1"` property.
|
|
62
|
+
|
|
63
|
+
The `$id` URIs (`https://semiotic.dev/spec/v0.1/…`) are stable identifiers, not fetch targets.
|
|
64
|
+
The canonical files ship in the `semiotic` npm tarball and are exposed as
|
|
65
|
+
`semiotic/spec/v0.1/<schema-name>` resource paths; they also remain available in this directory
|
|
66
|
+
for repository consumers.
|
|
67
|
+
|
|
68
|
+
## Validation
|
|
69
|
+
|
|
70
|
+
These are plain [JSON Schema 2020-12](https://json-schema.org/draft/2020-12) documents. Validate
|
|
71
|
+
with any compliant validator (ajv, `jsonschema`, etc.) — no library dependency is required, which
|
|
72
|
+
is the point. A reference implementation also ships small dependency-free structural validators
|
|
73
|
+
(see *The Vega-Lite binding*, below) for hosts that do not want to pull in a full schema engine.
|
|
74
|
+
|
|
75
|
+
## The Vega-Lite binding (carrying IDID metadata on a portable spec)
|
|
76
|
+
|
|
77
|
+
Vega-Lite is the closest thing the ecosystem has to a neutral chart-interchange format, but it has
|
|
78
|
+
no place for capability, audience, or provenance metadata. The binding convention defines where
|
|
79
|
+
IDID metadata rides on a Vega-Lite spec so the two travel together:
|
|
80
|
+
|
|
81
|
+
### Capability and audience → `usermeta.idid`
|
|
82
|
+
|
|
83
|
+
Vega-Lite reserves [`usermeta`](https://vega.github.io/vega-lite/docs/spec.html#top-level) for
|
|
84
|
+
arbitrary application metadata that validators ignore. IDID metadata lives under a single
|
|
85
|
+
namespaced key:
|
|
86
|
+
|
|
87
|
+
```jsonc
|
|
88
|
+
{
|
|
89
|
+
"mark": "bar",
|
|
90
|
+
"encoding": { /* … */ },
|
|
91
|
+
"usermeta": {
|
|
92
|
+
"idid": {
|
|
93
|
+
"specVersion": "0.1",
|
|
94
|
+
"capability": { "component": "BarChart", "rubric": { "familiarity": 5, "accuracy": 5, "precision": 4 }, "intentScores": { "compare-categories": 5, "rank": 4 } },
|
|
95
|
+
"audience": { "name": "Exec review", "receptionModality": "visual", "familiarity": { "BoxPlot": 2 } }
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
A consumer reads `spec.usermeta.idid.capability` and routes it straight into a chart-suggestion
|
|
102
|
+
engine; the spec still renders as ordinary Vega-Lite everywhere else.
|
|
103
|
+
|
|
104
|
+
### Provenanced annotations → `usermeta.idid.annotations`
|
|
105
|
+
|
|
106
|
+
Annotations ride verbatim — with their provenance/lifecycle blocks — under the same
|
|
107
|
+
`usermeta.idid` key, composing with capability/audience. As a courtesy, any annotation with a
|
|
108
|
+
representable shape (a threshold, a labelled callout) also emits a best-effort `rule`/`text` mark
|
|
109
|
+
in an appended layer, so a plain Vega-Lite renderer still draws something:
|
|
110
|
+
|
|
111
|
+
```jsonc
|
|
112
|
+
{
|
|
113
|
+
"usermeta": {
|
|
114
|
+
"idid": {
|
|
115
|
+
"specVersion": "0.1",
|
|
116
|
+
"annotations": [
|
|
117
|
+
{
|
|
118
|
+
"type": "y-threshold",
|
|
119
|
+
"value": 1000,
|
|
120
|
+
"label": "SLA floor",
|
|
121
|
+
"provenance": { "source": "ai", "basis": "statistical-test", "confidence": 0.7, "createdAt": "2026-06-20T14:00:00Z" },
|
|
122
|
+
"lifecycle": { "ttlHint": "P7D", "status": "proposed", "anchor": "semantic" }
|
|
123
|
+
}
|
|
124
|
+
]
|
|
125
|
+
}
|
|
126
|
+
},
|
|
127
|
+
"layer": [
|
|
128
|
+
{ "mark": "line", "encoding": { /* the data */ } },
|
|
129
|
+
{ "mark": "rule", "encoding": { "y": { "datum": 1000 } }, "usermeta": { "idid": { "role": "annotation-layer" } } }
|
|
130
|
+
]
|
|
131
|
+
}
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
A non-IDID Vega-Lite renderer draws the rule and ignores the metadata; an IDID-aware host reads
|
|
135
|
+
the provenance/lifecycle off `usermeta.idid.annotations` and can dim a stale note, badge an
|
|
136
|
+
AI-authored one with its confidence, or surface it in an accessible navigation tree. When no
|
|
137
|
+
annotation is representable as a mark, the metadata still rides on `usermeta` and no empty layer
|
|
138
|
+
is added.
|
|
139
|
+
|
|
140
|
+
### Round-tripping
|
|
141
|
+
|
|
142
|
+
The binding is designed for a tested supported single-view subset: a chart → Vega-Lite spec (with
|
|
143
|
+
IDID metadata in `usermeta`) → back to a chart preserves the supported mark, data, and encoding
|
|
144
|
+
semantics. Unsupported composition or chart semantics must return a typed refusal rather than a
|
|
145
|
+
plausible fallback. IDID-enriched annotation layers recover their one base view, while arbitrary
|
|
146
|
+
Vega-Lite layer composition remains deliberately unsupported.
|
|
147
|
+
|
|
148
|
+
---
|
|
149
|
+
|
|
150
|
+
*This directory is the canonical published copy of the schemas and is packed unchanged into npm.
|
|
151
|
+
A reference implementation may embed copies for its own validators; those copies are kept
|
|
152
|
+
byte-for-byte in sync with these files by a test, so this directory is always authoritative.*
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# IDID spec bindings
|
|
2
|
+
|
|
3
|
+
Reference implementations of the [IDID portability spec](../README.md) for
|
|
4
|
+
specific host formats. **These are zero-dependency, library-neutral, and free to
|
|
5
|
+
copy.** They exist to prove the spec is implementable without the reference
|
|
6
|
+
library — the leading indicator that a standard is actually portable is someone
|
|
7
|
+
implementing it in a stack that isn't the original.
|
|
8
|
+
|
|
9
|
+
## `vega-lite.mjs`
|
|
10
|
+
|
|
11
|
+
The IDID-over-Vega-Lite binding: carries chart capability, audience profile, and
|
|
12
|
+
provenanced/lifecycled annotations on an ordinary Vega-Lite spec under
|
|
13
|
+
`usermeta.idid` (which every Vega-Lite renderer ignores), so the spec and its
|
|
14
|
+
meaning travel together.
|
|
15
|
+
|
|
16
|
+
```js
|
|
17
|
+
import {
|
|
18
|
+
attachIdid, readIdid, attachIdidAnnotations, readIdidAnnotations,
|
|
19
|
+
suggestionInputFromSpec,
|
|
20
|
+
} from "./vega-lite.mjs"
|
|
21
|
+
|
|
22
|
+
let spec = { mark: "bar", encoding: { /* … */ } }
|
|
23
|
+
spec = attachIdid(spec, { capability, audience }) // ride under usermeta.idid
|
|
24
|
+
spec = attachIdidAnnotations(spec, [provenancedNote]) // + a note with its evidence
|
|
25
|
+
|
|
26
|
+
// An IDID-aware host reads it back and acts on it — e.g. routes the carried
|
|
27
|
+
// capability + audience through any chart-suggestion engine:
|
|
28
|
+
const input = suggestionInputFromSpec(spec) // { capability, audience } | null
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
The output is byte-compatible with Semiotic's TypeScript binding
|
|
32
|
+
(`semiotic/experimental`: `unstable_attachIDID`, `unstable_readIDID`,
|
|
33
|
+
`unstable_attachIDIDAnnotations`, …), so a spec enriched in one can be read in
|
|
34
|
+
the other. Validate the carried metadata against the published
|
|
35
|
+
[JSON Schemas](../v0.1).
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* IDID-over-Vega-Lite binding — standalone reference implementation.
|
|
3
|
+
*
|
|
4
|
+
* Zero dependencies, zero Semiotic imports. This is the proof that the IDID
|
|
5
|
+
* portability spec (../README.md, ../v0.1/*.schema.json) is implementable in
|
|
6
|
+
* any stack: it carries the three IDID primitives — chart capability, audience
|
|
7
|
+
* profile, and provenanced/lifecycled annotations — on an ordinary Vega-Lite
|
|
8
|
+
* spec, so the spec and its meaning travel together.
|
|
9
|
+
*
|
|
10
|
+
* Copy this file into your codebase and use it directly; it does not depend on
|
|
11
|
+
* Semiotic and never will. Semiotic ships a TypeScript equivalent
|
|
12
|
+
* (`semiotic/experimental`) that produces byte-compatible output, so a spec
|
|
13
|
+
* enriched here is read correctly there and vice versa.
|
|
14
|
+
*
|
|
15
|
+
* Convention (see ../README.md):
|
|
16
|
+
* - capability + audience ride under `usermeta.idid.{capability,audience}`
|
|
17
|
+
* - annotations ride verbatim under `usermeta.idid.annotations`, with
|
|
18
|
+
* best-effort `rule`/`text` courtesy marks appended so a plain Vega-Lite
|
|
19
|
+
* renderer still draws something.
|
|
20
|
+
*/
|
|
21
|
+
|
|
22
|
+
export const IDID_SPEC_VERSION = "0.1"
|
|
23
|
+
const ANNOTATION_LAYER_ROLE = "annotation-layer"
|
|
24
|
+
|
|
25
|
+
/** Read the IDID metadata block off a Vega-Lite spec, or undefined. */
|
|
26
|
+
export function readIdid(spec) {
|
|
27
|
+
return spec && spec.usermeta ? spec.usermeta.idid : undefined
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* Attach a chart capability and/or an audience profile under `usermeta.idid`.
|
|
32
|
+
* Returns a new spec; the input is not mutated.
|
|
33
|
+
*/
|
|
34
|
+
export function attachIdid(spec, { capability, audience } = {}) {
|
|
35
|
+
const idid = { ...readIdid(spec), specVersion: IDID_SPEC_VERSION }
|
|
36
|
+
if (capability) idid.capability = capability
|
|
37
|
+
if (audience) idid.audience = audience
|
|
38
|
+
return { ...spec, usermeta: { ...(spec && spec.usermeta), idid } }
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* Carry provenanced/lifecycled annotations on the spec. They are stored
|
|
43
|
+
* verbatim under `usermeta.idid.annotations`; any annotation with a
|
|
44
|
+
* representable shape also emits a best-effort mark in an appended layer.
|
|
45
|
+
* Returns a new spec; the input is not mutated.
|
|
46
|
+
*/
|
|
47
|
+
export function attachIdidAnnotations(spec, annotations = []) {
|
|
48
|
+
const idid = { ...readIdid(spec), specVersion: IDID_SPEC_VERSION, annotations: [...annotations] }
|
|
49
|
+
|
|
50
|
+
const courtesy = annotations.map(annotationToMark).filter(Boolean)
|
|
51
|
+
if (courtesy.length === 0) {
|
|
52
|
+
return { ...spec, usermeta: { ...(spec && spec.usermeta), idid } }
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
const baseLayers = Array.isArray(spec && spec.layer) ? spec.layer : [viewOf(spec)]
|
|
56
|
+
const { mark, encoding, data, transform, usermeta, ...top } = spec || {}
|
|
57
|
+
return {
|
|
58
|
+
...top,
|
|
59
|
+
usermeta: { ...(spec && spec.usermeta), idid },
|
|
60
|
+
layer: [...baseLayers, ...courtesy],
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
/** Read provenanced annotations back off a Vega-Lite spec. */
|
|
65
|
+
export function readIdidAnnotations(spec) {
|
|
66
|
+
const idid = readIdid(spec)
|
|
67
|
+
return idid && Array.isArray(idid.annotations) ? idid.annotations : []
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
* Extract the inputs an IDID-aware host routes through a chart-suggestion
|
|
72
|
+
* engine. Library-neutral: pass the result to whatever ranker you use
|
|
73
|
+
* (Semiotic's `suggestCharts`, your own heuristic, an LLM call). Returns null
|
|
74
|
+
* when the spec carries no IDID metadata.
|
|
75
|
+
*/
|
|
76
|
+
export function suggestionInputFromSpec(spec) {
|
|
77
|
+
const idid = readIdid(spec)
|
|
78
|
+
if (!idid) return null
|
|
79
|
+
return { capability: idid.capability, audience: idid.audience }
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
// ── helpers ──────────────────────────────────────────────────────────────────
|
|
83
|
+
|
|
84
|
+
/** The view-level fields of a single-view spec, for use as a layer entry. */
|
|
85
|
+
function viewOf(spec) {
|
|
86
|
+
const out = {}
|
|
87
|
+
if (!spec) return out
|
|
88
|
+
if (spec.mark) out.mark = spec.mark
|
|
89
|
+
if (spec.encoding) out.encoding = spec.encoding
|
|
90
|
+
if (spec.data) out.data = spec.data
|
|
91
|
+
if (spec.transform) out.transform = spec.transform
|
|
92
|
+
return out
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
/** Best-effort Vega-Lite mark for a representable annotation, else null. */
|
|
96
|
+
function annotationToMark(annotation) {
|
|
97
|
+
const tag = { usermeta: { idid: { role: ANNOTATION_LAYER_ROLE } } }
|
|
98
|
+
switch (annotation && annotation.type) {
|
|
99
|
+
case "y-threshold":
|
|
100
|
+
return { mark: "rule", encoding: { y: { datum: annotation.value } }, ...tag }
|
|
101
|
+
case "x-threshold":
|
|
102
|
+
return { mark: "rule", encoding: { x: { datum: annotation.value } }, ...tag }
|
|
103
|
+
case "callout":
|
|
104
|
+
case "label":
|
|
105
|
+
case "text":
|
|
106
|
+
return typeof annotation.label === "string"
|
|
107
|
+
? { mark: { type: "text", text: annotation.label }, ...tag }
|
|
108
|
+
: null
|
|
109
|
+
default:
|
|
110
|
+
return null
|
|
111
|
+
}
|
|
112
|
+
}
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://semiotic.dev/spec/v0.1/annotation-provenance.schema.json",
|
|
4
|
+
"title": "IDID Annotation Provenance & Lifecycle",
|
|
5
|
+
"description": "Two orthogonal metadata blocks that attach to any chart annotation: WHERE it came from and how much to trust it (provenance), and HOW it ages and stands editorially (lifecycle). This is the primitive that distinguishes 'insight text beside a chart' from a provenance-tracked claim ON the chart — and the one that must survive being carried into another tool's annotation model. See ./README.md for the x-idid-status convention. Open string unions are expressed as type:string with a recognized-values list rather than a closed enum, faithful to the runtime types; closed unions use enum.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"$ref": "#/$defs/annotated",
|
|
8
|
+
"$defs": {
|
|
9
|
+
"annotated": {
|
|
10
|
+
"title": "Annotated",
|
|
11
|
+
"type": "object",
|
|
12
|
+
"description": "Wrapper concept: any annotation MAY carry an optional provenance block and an optional lifecycle block. Attaching neither leaves an annotation unchanged.",
|
|
13
|
+
"additionalProperties": true,
|
|
14
|
+
"properties": {
|
|
15
|
+
"provenance": { "$ref": "#/$defs/provenance" },
|
|
16
|
+
"lifecycle": { "$ref": "#/$defs/lifecycle" }
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
"provenance": {
|
|
20
|
+
"title": "Annotation Provenance",
|
|
21
|
+
"type": "object",
|
|
22
|
+
"description": "Where an annotation came from and how confident we should be in it.",
|
|
23
|
+
"additionalProperties": true,
|
|
24
|
+
"properties": {
|
|
25
|
+
"author": {
|
|
26
|
+
"type": "string",
|
|
27
|
+
"description": "Display name or stable id of who created the annotation — a person, agent, or watcher. Together with authorKind this expresses a structured author { kind, id }.",
|
|
28
|
+
"x-idid-status": "shipped"
|
|
29
|
+
},
|
|
30
|
+
"authorKind": {
|
|
31
|
+
"type": "string",
|
|
32
|
+
"description": "Actor category — WHO created the annotation. Distinct from basis (HOW it was derived) and the coarser source. Open string; recognized values below.",
|
|
33
|
+
"x-idid-recognized-values": ["human", "agent", "watcher", "system"],
|
|
34
|
+
"examples": ["human", "agent", "watcher", "system"],
|
|
35
|
+
"x-idid-status": "shipped"
|
|
36
|
+
},
|
|
37
|
+
"source": {
|
|
38
|
+
"type": "string",
|
|
39
|
+
"description": "Coarse origin label, kept as a single convenience field when the finer authorKind/basis split is not needed. Open string; recognized values below.",
|
|
40
|
+
"x-idid-recognized-values": ["user", "ai", "agent", "import", "computed", "system"],
|
|
41
|
+
"examples": ["user", "ai", "agent", "import", "computed", "system"],
|
|
42
|
+
"x-idid-status": "shipped"
|
|
43
|
+
},
|
|
44
|
+
"basis": {
|
|
45
|
+
"type": "string",
|
|
46
|
+
"description": "Evidence type — HOW the claim was derived (a hand note, a statistical test, a rule, an LLM inference, an external source). Distinct from authorKind: a human author can relay a statistical-test basis. Lets a reader weight a note by the strength of its evidence, not just who left it. Open string; recognized values below.",
|
|
47
|
+
"x-idid-recognized-values": ["human-note", "statistical-test", "rule", "llm-inference", "external-source", "computed"],
|
|
48
|
+
"examples": ["human-note", "statistical-test", "rule", "llm-inference", "external-source", "computed"],
|
|
49
|
+
"x-idid-status": "shipped"
|
|
50
|
+
},
|
|
51
|
+
"confidence": {
|
|
52
|
+
"type": "number",
|
|
53
|
+
"minimum": 0,
|
|
54
|
+
"maximum": 1,
|
|
55
|
+
"description": "Confidence in the assertion, 0–1. 1 is a hand-placed user annotation; LLM-suggested annotations typically land below 0.8.",
|
|
56
|
+
"x-idid-status": "shipped"
|
|
57
|
+
},
|
|
58
|
+
"createdAt": {
|
|
59
|
+
"type": "string",
|
|
60
|
+
"format": "date-time",
|
|
61
|
+
"description": "ISO 8601 timestamp marking when the annotation was created. Drives lifecycle.freshness together with lifecycle.ttlHint.",
|
|
62
|
+
"x-idid-status": "shipped"
|
|
63
|
+
},
|
|
64
|
+
"dataVersion": {
|
|
65
|
+
"type": "string",
|
|
66
|
+
"description": "Identifier of the data snapshot the annotation was made against. Lets a consumer distinguish 'written about last week's data' from 'still tracks current data', independent of wall-clock freshness.",
|
|
67
|
+
"x-idid-status": "shipped"
|
|
68
|
+
},
|
|
69
|
+
"stableId": {
|
|
70
|
+
"type": "string",
|
|
71
|
+
"description": "Stable, opaque identifier that survives data refresh and chart recreation. Used to re-locate 'the Q3 spike' after new data arrives (semantic anchoring), and as the target of another annotation's lifecycle.supersedes.",
|
|
72
|
+
"x-idid-status": "shipped"
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
},
|
|
76
|
+
"lifecycle": {
|
|
77
|
+
"title": "Annotation Lifecycle",
|
|
78
|
+
"type": "object",
|
|
79
|
+
"description": "Two orthogonal axes: the TEMPORAL band (freshness, derived from createdAt + ttlHint) and the EDITORIAL state (status, driven by an accept/dispute/retract flow). A note can be fresh-but-disputed or stale-but-accepted.",
|
|
80
|
+
"additionalProperties": true,
|
|
81
|
+
"properties": {
|
|
82
|
+
"freshness": {
|
|
83
|
+
"type": "string",
|
|
84
|
+
"enum": ["fresh", "aging", "stale", "expired"],
|
|
85
|
+
"description": "Temporal band. When omitted, a host derives it from ttlHint and the data's current temporal extent. Closed union.",
|
|
86
|
+
"x-idid-status": "shipped"
|
|
87
|
+
},
|
|
88
|
+
"status": {
|
|
89
|
+
"type": "string",
|
|
90
|
+
"enum": ["proposed", "accepted", "disputed", "retracted"],
|
|
91
|
+
"description": "Editorial standing, orthogonal to freshness. proposed = placed but unreviewed; accepted = confirmed; disputed = contested; retracted = withdrawn (treat like an expired note). Closed union.",
|
|
92
|
+
"x-idid-status": "shipped"
|
|
93
|
+
},
|
|
94
|
+
"supersedes": {
|
|
95
|
+
"type": "string",
|
|
96
|
+
"description": "provenance.stableId of the annotation this one replaces. Forms a revision chain; the superseded note is typically hidden once its replacement is accepted.",
|
|
97
|
+
"x-idid-status": "shipped"
|
|
98
|
+
},
|
|
99
|
+
"ttlHint": {
|
|
100
|
+
"description": "How long this annotation should be considered fresh. Either an ISO 8601 duration string (\"PT24H\", \"P7D\") or a number of milliseconds. Freshness walks fresh → aging → stale → expired as 'now' advances past createdAt + ttlHint.",
|
|
101
|
+
"oneOf": [
|
|
102
|
+
{ "type": "string", "description": "ISO 8601 duration" },
|
|
103
|
+
{ "type": "number", "description": "milliseconds" }
|
|
104
|
+
],
|
|
105
|
+
"x-idid-status": "shipped"
|
|
106
|
+
},
|
|
107
|
+
"anchor": {
|
|
108
|
+
"type": "string",
|
|
109
|
+
"enum": ["fixed", "latest", "sticky", "semantic"],
|
|
110
|
+
"description": "Anchor resolution strategy across renders. fixed (default) = pinned to datum coordinates; latest = re-pins to the most recent datum each frame; sticky = stays at last known pixel position after the target scrolls off; semantic = re-resolves via provenance.stableId when new data arrives. Closed union.",
|
|
111
|
+
"x-idid-status": "shipped"
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
},
|
|
115
|
+
"lifecycleBandThresholds": {
|
|
116
|
+
"title": "Lifecycle Band Thresholds",
|
|
117
|
+
"type": "object",
|
|
118
|
+
"description": "Multipliers of ttl that mark the upper edge of each band. Defaults: fresh < 1.0×ttl, aging < 1.5×ttl, stale < 3.0×ttl, expired ≥ 3.0×ttl. The shared age→band classifier (bandFromAge) reads these.",
|
|
119
|
+
"additionalProperties": false,
|
|
120
|
+
"properties": {
|
|
121
|
+
"fresh": { "type": "number", "description": "Upper edge of fresh, ×ttl. Default 1.0." },
|
|
122
|
+
"aging": { "type": "number", "description": "Upper edge of aging, ×ttl. Default 1.5." },
|
|
123
|
+
"stale": { "type": "number", "description": "Upper edge of stale, ×ttl. Default 3.0." }
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://semiotic.dev/spec/v0.1/audience-profile.schema.json",
|
|
4
|
+
"title": "IDID Audience Profile",
|
|
5
|
+
"description": "A serializable description of WHO is reading the charts and what the organization is trying to grow. The library never measures familiarity — it consumes a profile produced however the org sees fit (surveys, telemetry, manager judgment) and biases its ranking accordingly. Carrying this profile across tools is what lets a suggestion be calibrated to a real audience instead of a generic data-literate baseline. See ./README.md for the x-idid-status convention.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"additionalProperties": true,
|
|
8
|
+
"properties": {
|
|
9
|
+
"specVersion": {
|
|
10
|
+
"type": "string",
|
|
11
|
+
"const": "0.1",
|
|
12
|
+
"x-idid-status": "spec"
|
|
13
|
+
},
|
|
14
|
+
"name": {
|
|
15
|
+
"type": "string",
|
|
16
|
+
"description": "Display name. A ranking engine may surface this in its reasons so a reader can see whose policy shaped the result.",
|
|
17
|
+
"x-idid-status": "shipped"
|
|
18
|
+
},
|
|
19
|
+
"familiarity": {
|
|
20
|
+
"type": "object",
|
|
21
|
+
"description": "Per-chart familiarity override, 1–5, keyed by component name. Replaces the chart capability's rubric.familiarity for listed charts; unlisted charts fall back to the descriptor.",
|
|
22
|
+
"propertyNames": { "type": "string" },
|
|
23
|
+
"additionalProperties": { "type": "integer", "minimum": 1, "maximum": 5 },
|
|
24
|
+
"x-idid-status": "shipped"
|
|
25
|
+
},
|
|
26
|
+
"targets": {
|
|
27
|
+
"type": "object",
|
|
28
|
+
"description": "Adoption targets — which charts the org wants to grow or reduce. A ranking engine applies a score bias so growth targets win close calls and reduce targets fall back unless they are the only fit.",
|
|
29
|
+
"propertyNames": { "type": "string" },
|
|
30
|
+
"additionalProperties": { "$ref": "#/$defs/target" },
|
|
31
|
+
"x-idid-status": "shipped"
|
|
32
|
+
},
|
|
33
|
+
"exposureLevel": {
|
|
34
|
+
"type": "integer",
|
|
35
|
+
"enum": [0, 1, 2],
|
|
36
|
+
"description": "Controls visibility of stretch picks (unfamiliar-but-relevant charts). 0 = never surface stretches; 1 = surface in a separate stretch list (default when an audience is set); 2 = same as 1 but lowers the familiarity threshold for what counts as a stretch, widening the menu.",
|
|
37
|
+
"x-idid-status": "shipped"
|
|
38
|
+
},
|
|
39
|
+
"receptionModality": {
|
|
40
|
+
"type": "string",
|
|
41
|
+
"enum": ["visual", "screen-reader", "sonified", "agent"],
|
|
42
|
+
"description": "The channel this audience receives charts through. Orthogonal to familiarity: a reader can be highly familiar with a chart yet unable to RECEIVE it in their channel (an 8-slice pie is familiar but illegible to a screen reader). A non-visual modality instructs a host to down-rank charts whose meaning does not survive that channel. Defaults to \"visual\" (no receivability bias).",
|
|
43
|
+
"x-idid-status": "shipped"
|
|
44
|
+
}
|
|
45
|
+
},
|
|
46
|
+
"$defs": {
|
|
47
|
+
"target": {
|
|
48
|
+
"type": "object",
|
|
49
|
+
"title": "Audience Target",
|
|
50
|
+
"required": ["direction"],
|
|
51
|
+
"additionalProperties": false,
|
|
52
|
+
"properties": {
|
|
53
|
+
"direction": { "type": "string", "enum": ["increase", "decrease"] },
|
|
54
|
+
"weight": {
|
|
55
|
+
"type": "integer",
|
|
56
|
+
"minimum": 1,
|
|
57
|
+
"maximum": 3,
|
|
58
|
+
"description": "Controls bias magnitude. Default 1."
|
|
59
|
+
},
|
|
60
|
+
"reason": {
|
|
61
|
+
"type": "string",
|
|
62
|
+
"description": "Human-readable rationale; a ranking engine may surface it in its reasons when the target fires."
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
}
|