semiotic 3.8.9 → 3.9.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/README.md +83 -67
- package/agent-skill/semiotic-charts/SKILL.md +11 -2
- package/ai/behaviorContracts.cjs +33 -3
- package/ai/cli.js +53 -2
- package/ai/componentMetadata.cjs +15 -0
- package/ai/dist/mcp-server.js +1530 -611
- package/ai/examples.md +48 -42
- package/{CLAUDE.md → ai/reference.md} +43 -22
- package/ai/schema.json +10603 -986
- package/ai/surface-manifest.json +643 -2
- package/ai/system-prompt.md +83 -130
- package/dist/c-3BLJEQNG.min.js +1 -0
- package/dist/c-3KZD6AXJ.min.js +1 -0
- package/dist/c-4TWEX5HG.min.js +1 -0
- package/dist/c-52TEGIUJ.min.js +1 -0
- package/dist/c-5YCIX3VZ.min.js +1 -0
- package/dist/c-6FEKTA3U.min.js +1 -0
- package/dist/c-6O5EVOPH.min.js +1 -0
- package/dist/c-74HEEZGK.min.js +1 -0
- package/dist/c-AKAF6JAD.min.js +1 -0
- package/dist/c-BBKITSXB.min.js +1 -0
- package/dist/c-BWNB6USU.min.js +1 -0
- package/dist/c-C25ENHIK.min.js +1 -0
- package/dist/c-CDR5AO3R.min.js +1 -0
- package/dist/c-COHXCW3Q.min.js +1 -0
- package/dist/{chunk-scatterplotMatrixBrushOverlay-SDIZSN66.module.min.js → c-DADXPJXV.min.js} +0 -1
- package/dist/c-E3JFRRMI.min.js +1 -0
- package/dist/c-EBFPQHHO.min.js +1 -0
- package/dist/c-G36WS6LN.min.js +1 -0
- package/dist/c-GIKRQI4X.min.js +1 -0
- package/dist/c-GPYOFETM.min.js +1 -0
- package/dist/c-IDUHYYSI.min.js +1 -0
- package/dist/{chunk-chunk-FQPKOAIH.module.min.js → c-IUHFPMHD.min.js} +0 -1
- package/dist/c-J5G56TUH.min.js +1 -0
- package/dist/c-JAZ73J32.min.js +1 -0
- package/dist/c-KG3NXHAL.min.js +1 -0
- package/dist/c-KII3PLZE.min.js +1 -0
- package/dist/c-LIXGXMNS.min.js +1 -0
- package/dist/c-LVEY6D6B.min.js +1 -0
- package/dist/c-M4Y3BHFR.min.js +1 -0
- package/dist/c-MAIICR2Z.min.js +1 -0
- package/dist/c-MG5DM6VE.min.js +1 -0
- package/dist/{chunk-minimapBrushOverlay-JU57U7NM.module.min.js → c-MNF2S4AA.min.js} +0 -1
- package/dist/c-MT3WBK7M.min.js +1 -0
- package/dist/c-NY3JWV2K.min.js +1 -0
- package/dist/c-O6U6K4CW.min.js +1 -0
- package/dist/c-OCI56QF2.min.js +1 -0
- package/dist/c-OQ7M4AGV.min.js +1 -0
- package/dist/c-OXYMVK7Q.min.js +1 -0
- package/dist/c-PPWDL5ZI.min.js +1 -0
- package/dist/c-QHF5YON3.min.js +1 -0
- package/dist/c-RR3GO5SW.min.js +1 -0
- package/dist/{chunk-chunk-J5QD4RAM.module.min.js → c-RSVIHIQ4.min.js} +0 -1
- package/dist/{chunk-chunk-EMO5NUGE.module.min.js → c-S2BXNNJN.min.js} +0 -1
- package/dist/{chunk-chunk-YCQYG6J5.module.min.js → c-SLGMUBUL.min.js} +0 -1
- package/dist/c-SUILCHWU.min.js +1 -0
- package/dist/c-TZW3JGJ5.min.js +1 -0
- package/dist/c-US5ZFT6E.min.js +1 -0
- package/dist/{chunk-chunk-RZH7VZYS.module.min.js → c-USFMFKIH.min.js} +0 -1
- package/dist/c-UUKVD4WB.min.js +1 -0
- package/dist/{chunk-chunk-SV4XAZ3Q.module.min.js → c-VGW3VG3I.min.js} +0 -1
- package/dist/c-W3CE4A4S.min.js +1 -0
- package/dist/{chunk-chunk-2NVFEB7P.module.min.js → c-WJCD5EUY.min.js} +0 -1
- package/dist/{chunk-chunk-2JGJ5GUG.module.min.js → c-X5UBGU2V.min.js} +0 -1
- package/dist/c-YDAY2WFR.min.js +1 -0
- package/dist/c-ZOWWU34K.min.js +1 -0
- package/dist/components/AccessibleNavTree.d.ts +1 -1
- package/dist/components/CategoryColors.d.ts +1 -1
- package/dist/components/GradientLegend.d.ts +14 -0
- package/dist/components/Legend.d.ts +2 -7
- package/dist/components/LinkedCharts.d.ts +1 -1
- package/dist/components/MobileAnnotationCalloutList.d.ts +1 -1
- package/dist/components/ObservationReadout.d.ts +45 -0
- package/dist/components/ThemeProvider.d.ts +4 -4
- package/dist/components/Tooltip/FlippingTooltip.d.ts +5 -7
- package/dist/components/Tooltip/Tooltip.d.ts +30 -5
- package/dist/components/Tooltip/tooltipChrome.d.ts +43 -0
- package/dist/components/ai/chartCapabilityTypes.d.ts +86 -2
- package/dist/components/ai/chartClinic.d.ts +2 -0
- package/dist/components/ai/deriveProfileFields.d.ts +40 -0
- package/dist/components/ai/evaluateChart.d.ts +85 -0
- package/dist/components/ai/fieldPolicy.d.ts +7 -0
- package/dist/components/ai/fieldRoles.d.ts +24 -0
- package/dist/components/ai/generativeChart.d.ts +18 -2
- package/dist/components/ai/inferIntent.d.ts +26 -2
- package/dist/components/ai/intents.d.ts +35 -0
- package/dist/components/ai/navigationTree.d.ts +2 -2
- package/dist/components/ai/observedSceneAudit.d.ts +2 -1
- package/dist/components/ai/profileData.d.ts +11 -0
- package/dist/components/ai/repairChartConfig.d.ts +2 -3
- package/dist/components/ai/semanticEvidence.d.ts +4 -0
- package/dist/components/ai/semanticViability.d.ts +11 -0
- package/dist/components/ai/semanticViabilityRegistry.d.ts +5 -0
- package/dist/components/ai/streamingTypes.d.ts +4 -0
- package/dist/components/ai/suggestCharts.d.ts +5 -6
- package/dist/components/ai/suggestDashboard.d.ts +2 -3
- package/dist/components/ai/suggestStreamCharts.d.ts +1 -1
- package/dist/components/ai/suggestStretchCharts.d.ts +2 -3
- package/dist/components/ai/suggestionPropContracts.d.ts +20 -0
- package/dist/components/ai/variantDiscovery.d.ts +3 -1
- package/dist/components/charts/custom/NetworkCustomChart.d.ts +3 -0
- package/dist/components/charts/custom/OrdinalCustomChart.d.ts +3 -0
- package/dist/components/charts/custom/XYCustomChart.d.ts +1 -1
- package/dist/components/charts/geo/ChoroplethMap.d.ts +3 -1
- package/dist/components/charts/geo/DistanceCartogram.d.ts +2 -7
- package/dist/components/charts/geo/cartogramOverlay.d.ts +28 -0
- package/dist/components/charts/index.d.ts +4 -3
- package/dist/components/charts/network/ProcessSankey.d.ts +2 -136
- package/dist/components/charts/network/ProcessSankeyProps.d.ts +139 -0
- package/dist/components/charts/network/Treemap.d.ts +2 -1
- package/dist/components/charts/network/processSankey/boundaryHubOrdering.d.ts +23 -0
- package/dist/components/charts/network/processSankey/layoutGeometry.d.ts +2 -0
- package/dist/components/charts/network/processSankey/ordering.d.ts +3 -41
- package/dist/components/charts/network/processSankey/orderingTypes.d.ts +32 -0
- package/dist/components/charts/network/processSankey/packing.d.ts +1 -1
- package/dist/components/charts/network/processSankey/packingCache.d.ts +1 -1
- package/dist/components/charts/network/processSankey/packingOptimization.d.ts +72 -0
- package/dist/components/charts/ordinal/BarChart.d.ts +4 -3
- package/dist/components/charts/ordinal/FunnelChart.d.ts +2 -0
- package/dist/components/charts/ordinal/GroupedBarChart.d.ts +3 -2
- package/dist/components/charts/ordinal/StackedBarChart.d.ts +4 -3
- package/dist/components/charts/ordinal/SwimlaneChart.d.ts +2 -2
- package/dist/components/charts/physics/GaltonBoardChart.d.ts +2 -9
- package/dist/components/charts/physics/GauntletChart.d.ts +10 -41
- package/dist/components/charts/physics/ProcessFlowChart.d.ts +1 -1
- package/dist/components/charts/physics/chainReactionAccessibleTable.d.ts +9 -0
- package/dist/components/charts/physics/chainReactionRuntime.d.ts +2 -1
- package/dist/components/charts/physics/chainReactionTypes.d.ts +5 -1
- package/dist/components/charts/physics/crucibleBodyRenderers.d.ts +2 -2
- package/dist/components/charts/physics/crucibleClone.d.ts +6 -0
- package/dist/components/charts/physics/crucibleEffects.d.ts +1 -2
- package/dist/components/charts/physics/crucibleRecord.d.ts +7 -0
- package/dist/components/charts/physics/gauntletChrome.d.ts +4 -4
- package/dist/components/charts/physics/gauntletPhysics.d.ts +1 -0
- package/dist/components/charts/physics/gauntletPublic.d.ts +4 -0
- package/dist/components/charts/physics/packetFlowOverlay.d.ts +7 -0
- package/dist/components/charts/physics/physicsChartLayout.d.ts +8 -0
- package/dist/components/charts/physics/physicsChartShared.d.ts +3 -1
- package/dist/components/charts/physics/physicsChartUtils.d.ts +1 -1
- package/dist/components/charts/physics/physicsHocUtils.d.ts +25 -12
- package/dist/components/charts/physics/physicsProjectionOverlays.d.ts +24 -0
- package/dist/components/charts/physics/processFlowOverlays.d.ts +9 -0
- package/dist/components/charts/realtime/RealtimeHeatmap.d.ts +15 -12
- package/dist/components/charts/realtime/RealtimeHistogram.d.ts +10 -7
- package/dist/components/charts/realtime/RealtimeLineChart.d.ts +35 -14
- package/dist/components/charts/realtime/RealtimeSwarmChart.d.ts +21 -14
- package/dist/components/charts/realtime/RealtimeWaterfallChart.d.ts +20 -13
- package/dist/components/charts/realtime/aggregate.d.ts +4 -1
- package/dist/components/charts/realtime/eventTime.d.ts +4 -0
- package/dist/components/charts/realtime/realtimeChartRuntime.d.ts +27 -0
- package/dist/components/charts/realtime/realtimeChartTypes.d.ts +30 -0
- package/dist/components/charts/realtime/useRealtimeCategoryColors.d.ts +30 -0
- package/dist/components/charts/shared/FrameTextAnnotationSVG.d.ts +10 -0
- package/dist/components/charts/shared/annotationActivation.d.ts +3 -7
- package/dist/components/charts/shared/annotationBandFill.d.ts +6 -0
- package/dist/components/charts/shared/annotationDispatch.d.ts +31 -0
- package/dist/components/charts/shared/annotationIdentity.d.ts +8 -0
- package/dist/components/charts/shared/annotationRules.d.ts +1 -15
- package/dist/components/charts/shared/boundedCategoryRegistry.d.ts +8 -0
- package/dist/components/charts/shared/chainReactionChartSpec.d.ts +3 -0
- package/dist/components/charts/shared/chartMode.d.ts +3 -2
- package/dist/components/charts/shared/chartSpecCore.d.ts +1 -0
- package/dist/components/charts/shared/frameTextAnnotation.d.ts +63 -0
- package/dist/components/charts/shared/gradient.d.ts +16 -0
- package/dist/components/charts/shared/hatchFill.d.ts +15 -0
- package/dist/components/charts/shared/hooks.d.ts +4 -4
- package/dist/components/charts/shared/legendUtils.d.ts +1 -0
- package/dist/components/charts/shared/streamPropsHelpers.d.ts +2 -1
- package/dist/components/charts/shared/styleRules.d.ts +9 -2
- package/dist/components/charts/shared/styleRulesWireSchema.d.ts +353 -0
- package/dist/components/charts/shared/types.d.ts +18 -9
- package/dist/components/charts/shared/useChartLegend.d.ts +43 -9
- package/dist/components/charts/shared/useChartSetup.d.ts +3 -1
- package/dist/components/charts/shared/useCustomChartSetup.d.ts +5 -2
- package/dist/components/charts/shared/useNetworkChartSetup.d.ts +5 -1
- package/dist/components/charts/shared/useOrdinalBrush.d.ts +3 -3
- package/dist/components/charts/shared/useStreamingLegend.d.ts +6 -1
- package/dist/components/charts/value/types.d.ts +1 -1
- package/dist/components/charts/xy/BubbleChart.d.ts +1 -1
- package/dist/components/charts/xy/BumpChart.capability.d.ts +14 -1
- package/dist/components/charts/xy/BumpChart.d.ts +13 -73
- package/dist/components/charts/xy/BumpChart.semanticViability.d.ts +5 -0
- package/dist/components/charts/xy/CandlestickChart.d.ts +2 -2
- package/dist/components/charts/xy/LineChart.d.ts +2 -2
- package/dist/components/charts/xy/Scatterplot.d.ts +1 -1
- package/dist/components/charts/xy/bumpData.d.ts +44 -0
- package/dist/components/charts/xy/bumpIdentity.d.ts +2 -0
- package/dist/components/charts/xy/bumpLayout.d.ts +45 -0
- package/dist/components/charts/xy/bumpTooltip.d.ts +20 -0
- package/dist/components/legendLayout.d.ts +131 -4
- package/dist/components/realtime/ReorderBuffer.d.ts +2 -0
- package/dist/components/realtime/types.d.ts +10 -1
- package/dist/components/recipes/balanceSnapshotsToFlows.d.ts +42 -0
- package/dist/components/recipes/directedReachability.d.ts +14 -0
- package/dist/components/recipes/gofishDisplayListFixtures.generated.d.ts +6 -6
- package/dist/components/recipes/gridObservatory.d.ts +1 -1
- package/dist/components/recipes/networkAnalysis.d.ts +1 -18
- package/dist/components/recipes/physics.d.ts +7 -4
- package/dist/components/recipes/processPhysics.d.ts +0 -1
- package/dist/components/recipes/waffle.d.ts +7 -4
- package/dist/components/semiotic-ai-core.d.ts +13 -4
- package/dist/components/semiotic-ai-observations.d.ts +3 -0
- package/dist/components/semiotic-ai.d.ts +16 -9
- package/dist/components/semiotic-client-shared.d.ts +10 -0
- package/dist/components/semiotic-experimental.d.ts +1 -1
- package/dist/components/semiotic-geo.d.ts +4 -1
- package/dist/components/semiotic-network.d.ts +7 -4
- package/dist/components/semiotic-ordinal.d.ts +4 -1
- package/dist/components/semiotic-physics.d.ts +11 -4
- package/dist/components/semiotic-realtime-core.d.ts +11 -4
- package/dist/components/semiotic-realtime-react.d.ts +4 -3
- package/dist/components/semiotic-realtime.d.ts +3 -1
- package/dist/components/semiotic-recipes-core.d.ts +7 -5
- package/dist/components/semiotic-server-edge.d.ts +3 -2
- package/dist/components/semiotic-server.d.ts +3 -2
- package/dist/components/semiotic-themes-core.d.ts +5 -48
- package/dist/components/semiotic-utils-core.d.ts +10 -5
- package/dist/components/semiotic-utils-react.d.ts +2 -0
- package/dist/components/semiotic-xy.d.ts +4 -1
- package/dist/components/semiotic.d.ts +68 -26
- package/dist/components/server/animatedGif.d.ts +1 -1
- package/dist/components/server/renderEvidence.d.ts +25 -2
- package/dist/components/server/renderToStaticSVG.d.ts +15 -7
- package/dist/components/server/serverChartConfigShared.d.ts +8 -1
- package/dist/components/server/serverChartConfigs.d.ts +1 -0
- package/dist/components/server/serverChartConfigsNetwork.d.ts +3 -3
- package/dist/components/server/serverChartConfigsNetworkChord.d.ts +2 -0
- package/dist/components/server/serverChartConfigsNetworkForce.d.ts +2 -0
- package/dist/components/server/serverChartConfigsNetworkHierarchy.d.ts +3 -0
- package/dist/components/server/serverChartConfigsXY.d.ts +3 -3
- package/dist/components/server/serverChartConfigsXYBubble.d.ts +5 -0
- package/dist/components/server/serverChartConfigsXYBump.d.ts +7 -0
- package/dist/components/server/serverChartConfigsXYScatter.d.ts +5 -0
- package/dist/components/server/staticAnnotationFallbacks.d.ts +10 -0
- package/dist/components/server/staticAnnotations.d.ts +28 -1
- package/dist/components/server/staticAxisTickLabel.d.ts +13 -0
- package/dist/components/server/staticLegend.d.ts +1 -1
- package/dist/components/server/staticLegendMargin.d.ts +41 -0
- package/dist/components/server/staticOrdinal.d.ts +8 -2
- package/dist/components/server/staticPhysics.d.ts +13 -1
- package/dist/components/server/staticPhysicsChrome.d.ts +20 -0
- package/dist/components/server/staticRawLegend.d.ts +15 -0
- package/dist/components/server/staticSVGChrome.d.ts +16 -55
- package/dist/components/server/staticXYAxes.d.ts +27 -0
- package/dist/components/server/staticXYAxisTicks.d.ts +39 -0
- package/dist/components/server/staticXYGrid.d.ts +11 -0
- package/dist/components/server/themeResolver.d.ts +5 -1
- package/dist/components/store/ThemeStore.d.ts +2 -98
- package/dist/components/store/designTokens.d.ts +1 -1
- package/dist/components/store/themeCSSVariables.d.ts +10 -0
- package/dist/components/store/themeCore.d.ts +91 -0
- package/dist/components/store/themePresets.d.ts +81 -0
- package/dist/components/store/themeSerialization.d.ts +2 -1
- package/dist/components/stream/AccessibleDataTable.d.ts +12 -14
- package/dist/components/stream/AccessibleTablePortalImpl.d.ts +6 -0
- package/dist/components/stream/GeoTileRenderer.d.ts +2 -0
- package/dist/components/stream/NetworkCanvasHitTester.d.ts +3 -1
- package/dist/components/stream/NetworkSSRFrame.d.ts +2 -1
- package/dist/components/stream/NetworkSVGOverlay.d.ts +3 -31
- package/dist/components/stream/OrdinalCanvasHitTester.d.ts +2 -0
- package/dist/components/stream/SVGChartTitle.d.ts +9 -0
- package/dist/components/stream/SVGOverlay.d.ts +1 -21
- package/dist/components/stream/SVGUnderlay.d.ts +24 -0
- package/dist/components/stream/SceneToSVG.d.ts +1 -1
- package/dist/components/stream/StreamGeoFrame.d.ts +1 -1
- package/dist/components/stream/StreamOrdinalFrame.d.ts +1 -1
- package/dist/components/stream/StreamXYFrame.d.ts +1 -1
- package/dist/components/stream/accessibleDataRows.d.ts +11 -0
- package/dist/components/stream/accessibleDataTableModel.d.ts +40 -0
- package/dist/components/stream/accessibleTableTypes.d.ts +11 -0
- package/dist/components/stream/axisTickUtils.d.ts +19 -0
- package/dist/components/stream/canvasBackground.d.ts +10 -0
- package/dist/components/stream/canvasSetup.d.ts +9 -0
- package/dist/components/stream/frameCursorInteraction.d.ts +25 -0
- package/dist/components/stream/frameDefaultMargins.d.ts +37 -0
- package/dist/components/stream/frameGraphics.d.ts +18 -0
- package/dist/components/stream/frameGraphicsSubscription.d.ts +26 -0
- package/dist/components/stream/frameLegendOptions.d.ts +18 -0
- package/dist/components/stream/geoFrameCursorInteraction.d.ts +9 -0
- package/dist/components/stream/geoFrameHelpers.d.ts +29 -1
- package/dist/components/stream/geoTypes.d.ts +10 -11
- package/dist/components/stream/hitTarget.d.ts +61 -2
- package/dist/components/stream/moduleWorkerSession.d.ts +6 -0
- package/dist/components/stream/networkAnnotationAnchors.d.ts +37 -0
- package/dist/components/stream/networkCustomLayout.d.ts +2 -2
- package/dist/components/stream/networkFrameCursorInteraction.d.ts +12 -0
- package/dist/components/stream/networkFrameInteraction.d.ts +2 -0
- package/dist/components/stream/networkFramePaint.d.ts +7 -0
- package/dist/components/stream/networkPipelineConfig.d.ts +1 -1
- package/dist/components/stream/networkTypes.d.ts +30 -32
- package/dist/components/stream/normalizeXYData.d.ts +7 -0
- package/dist/components/stream/ordinalFrameCursorInteraction.d.ts +7 -0
- package/dist/components/stream/ordinalFrameInteraction.d.ts +29 -0
- package/dist/components/stream/ordinalSceneSVG.d.ts +10 -0
- package/dist/components/stream/ordinalTypes.d.ts +10 -4
- package/dist/components/stream/physics/PhysicsBodySpatialIndex.d.ts +9 -1
- package/dist/components/stream/physics/PhysicsCanvasTheme.d.ts +25 -0
- package/dist/components/stream/physics/PhysicsControllers.d.ts +0 -3
- package/dist/components/stream/physics/PhysicsPipelineStore.d.ts +4 -1
- package/dist/components/stream/physics/PhysicsSVGOverlay.d.ts +3 -24
- package/dist/components/stream/physics/PhysicsSettledSVG.d.ts +9 -21
- package/dist/components/stream/physics/PhysicsSettledSVGElement.d.ts +37 -0
- package/dist/components/stream/physics/PhysicsSettledScene.d.ts +7 -3
- package/dist/components/stream/physics/StreamPhysicsFrame.d.ts +1 -1
- package/dist/components/stream/physics/StreamPhysicsTypes.d.ts +23 -4
- package/dist/components/stream/physics/physicsAnnotationContext.d.ts +19 -0
- package/dist/components/stream/physics/physicsBodyCanvas.d.ts +4 -0
- package/dist/components/stream/physics/physicsSettledChrome.d.ts +7 -0
- package/dist/components/stream/physics/usePhysicsCanvasPointer.d.ts +32 -0
- package/dist/components/stream/physics/usePhysicsSemanticNavigation.d.ts +36 -0
- package/dist/components/stream/pipelineConfig.d.ts +6 -17
- package/dist/components/stream/pipelineDomainResolution.d.ts +1 -1
- package/dist/components/stream/renderBackend.d.ts +2 -0
- package/dist/components/stream/renderers/canvasRenderHelpers.d.ts +13 -2
- package/dist/components/stream/renderers/resolveCSSColor.d.ts +7 -0
- package/dist/components/stream/responsiveSize.d.ts +17 -0
- package/dist/components/stream/sceneCursor.d.ts +41 -0
- package/dist/components/stream/sceneRevisionDiagnostics.d.ts +1 -1
- package/dist/components/stream/svgOverlayUtils.d.ts +22 -1
- package/dist/components/stream/types.d.ts +25 -12
- package/dist/components/stream/useCanvasFrameHost.d.ts +3 -1
- package/dist/components/stream/useFrame.d.ts +24 -1
- package/dist/components/stream/useResponsiveSize.d.ts +6 -1
- package/dist/components/stream/useStalenessCheck.d.ts +1 -1
- package/dist/components/stream/xyFrameAxisTypes.d.ts +15 -4
- package/dist/components/stream/xyFrameCursorInteraction.d.ts +6 -0
- package/dist/components/stream/xySceneBuilders/swarmScene.d.ts +1 -1
- package/dist/components/stream/xySceneBuilders/types.d.ts +6 -26
- package/dist/components/types/legendTypes.d.ts +6 -0
- package/dist/components/types/marginType.d.ts +7 -8
- package/dist/controls.min.js +1 -1
- package/dist/controls.module.min.js +1 -1
- package/dist/forceLayoutWorker.js +1 -1
- 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.module.min.js +1 -1
- package/dist/physics-rapier.module.min.js +1 -1
- package/dist/physics.min.js +1 -1
- package/dist/physics.module.min.js +1 -1
- package/dist/physicsWorker.js +1 -1
- package/dist/processSankeyLayoutWorker.js +1 -1
- package/dist/realtime.min.js +1 -1
- package/dist/realtime.module.min.js +1 -1
- package/dist/rough.min.js +1 -1
- package/dist/rough.module.min.js +1 -1
- package/dist/semiotic-ai-core.d.ts +13 -4
- package/dist/semiotic-ai-core.min.js +1 -1
- package/dist/semiotic-ai-core.module.min.js +1 -1
- package/dist/semiotic-ai.d.ts +16 -9
- package/dist/semiotic-ai.min.js +1 -1
- package/dist/semiotic-ai.module.min.js +1 -1
- package/dist/semiotic-client-cjs-shared.min.js +1 -0
- package/dist/semiotic-client-glyph.module.min.js +2 -0
- package/dist/semiotic-client-responsive.module.min.js +2 -0
- package/dist/semiotic-client-shared.module.min.js +2 -0
- package/dist/semiotic-custom-layout-selection-cjs-shared.min.js +2 -0
- package/dist/semiotic-data.min.js +1 -1
- package/dist/semiotic-data.module.min.js +1 -1
- package/dist/semiotic-experimental-auxiliary.module.min.js +2 -0
- package/dist/semiotic-experimental-node-auxiliary.module.min.js +2 -0
- package/dist/semiotic-experimental-node.module.min.js +2 -0
- package/dist/semiotic-experimental-react-shared.module.min.js +2 -0
- package/dist/semiotic-experimental-vacp.min.js +1 -1
- package/dist/semiotic-experimental-vacp.module.min.js +1 -1
- package/dist/semiotic-experimental.d.ts +1 -1
- package/dist/semiotic-experimental.min.js +1 -1
- package/dist/semiotic-experimental.module.min.js +1 -1
- package/dist/semiotic-geo.d.ts +4 -1
- package/dist/semiotic-network.d.ts +7 -4
- package/dist/semiotic-ordinal.d.ts +4 -1
- package/dist/semiotic-physics.d.ts +11 -4
- package/dist/semiotic-realtime-core.d.ts +11 -4
- package/dist/semiotic-realtime-core.min.js +2 -1
- package/dist/semiotic-realtime-core.module.min.js +2 -1
- package/dist/semiotic-realtime-react.d.ts +4 -3
- package/dist/semiotic-realtime-react.min.js +1 -1
- package/dist/semiotic-realtime-react.module.min.js +1 -1
- package/dist/semiotic-realtime.d.ts +3 -1
- package/dist/semiotic-recipes-core-cjs-base.min.js +1 -0
- package/dist/semiotic-recipes-core.d.ts +7 -5
- package/dist/semiotic-recipes-core.min.js +9 -1
- package/dist/semiotic-recipes-core.module.min.js +1 -1
- package/dist/semiotic-recipes-geo-cjs.min.js +1 -0
- package/dist/semiotic-recipes-react.min.js +1 -1
- package/dist/semiotic-recipes-react.module.min.js +1 -1
- package/dist/semiotic-recipes.min.js +7 -1
- package/dist/semiotic-recipes.module.min.js +2 -1
- package/dist/semiotic-server-edge-node.module.min.js +1 -0
- package/dist/semiotic-server-edge.d.ts +3 -2
- package/dist/semiotic-server-edge.min.js +1 -1
- package/dist/semiotic-server-edge.module.min.js +1 -1
- package/dist/semiotic-server-node.min.js +1 -1
- package/dist/semiotic-server-node.module.min.js +1 -1
- package/dist/semiotic-server.d.ts +3 -2
- package/dist/semiotic-themes-core.d.ts +5 -48
- package/dist/semiotic-themes-core.min.js +1 -1
- package/dist/semiotic-themes-core.module.min.js +1 -1
- package/dist/semiotic-themes-react.min.js +1 -1
- package/dist/semiotic-themes-react.module.min.js +1 -1
- package/dist/semiotic-themes.min.js +1 -1
- package/dist/semiotic-themes.module.min.js +1 -1
- package/dist/semiotic-utils-core.d.ts +10 -5
- package/dist/semiotic-utils-core.min.js +1 -1
- package/dist/semiotic-utils-core.module.min.js +1 -1
- package/dist/semiotic-utils-react.d.ts +2 -0
- package/dist/semiotic-utils-react.min.js +1 -1
- package/dist/semiotic-utils-react.module.min.js +1 -1
- package/dist/semiotic-utils.min.js +2 -1
- package/dist/semiotic-utils.module.min.js +2 -1
- package/dist/semiotic-value.min.js +1 -1
- package/dist/semiotic-value.module.min.js +1 -1
- package/dist/semiotic-xy.d.ts +4 -1
- package/dist/semiotic.d.ts +68 -26
- package/dist/semiotic.min.js +1 -1
- package/dist/semiotic.module.min.js +1 -1
- package/dist/server.min.js +1 -1
- package/dist/server.module.min.js +1 -1
- package/dist/xy.min.js +1 -1
- package/dist/xy.module.min.js +1 -1
- package/package.json +53 -19
- package/dist/__tests__/scenarios/mcpProtocolTypes.d.ts +0 -20
- package/dist/chunk-OrdinalBrushOverlay-PXHQYDB2.module.min.js +0 -2
- package/dist/chunk-XYBrushOverlay-ECZJJLAJ.module.min.js +0 -1
- package/dist/chunk-XYBrushOverlay-EP2SV3UI.module.min.js +0 -2
- package/dist/chunk-chartContainerDataAudit-IQ3NBN3Q.module.min.js +0 -2
- package/dist/chunk-chunk-2B3AIKUZ.module.min.js +0 -2
- package/dist/chunk-chunk-2CXCXRB4.module.min.js +0 -1
- package/dist/chunk-chunk-2X3FJCME.module.min.js +0 -1
- package/dist/chunk-chunk-2ZHHWZQM.module.min.js +0 -2
- package/dist/chunk-chunk-4ITOQRXM.module.min.js +0 -2
- package/dist/chunk-chunk-5UKL5W76.module.min.js +0 -2
- package/dist/chunk-chunk-5VVNW5AZ.module.min.js +0 -1
- package/dist/chunk-chunk-5ZON5NMV.module.min.js +0 -2
- package/dist/chunk-chunk-66PCWJUG.module.min.js +0 -1
- package/dist/chunk-chunk-6S3YGYW7.module.min.js +0 -1
- package/dist/chunk-chunk-6V5VQVCT.module.min.js +0 -2
- package/dist/chunk-chunk-7C5EDZ3Z.module.min.js +0 -2
- package/dist/chunk-chunk-A3I4HBD5.module.min.js +0 -1
- package/dist/chunk-chunk-ACLDBMRH.module.min.js +0 -2
- package/dist/chunk-chunk-AFQHURLO.module.min.js +0 -2
- package/dist/chunk-chunk-DDB4TLQG.module.min.js +0 -2
- package/dist/chunk-chunk-DTH3SUOU.module.min.js +0 -2
- package/dist/chunk-chunk-DTSNLGRK.module.min.js +0 -2
- package/dist/chunk-chunk-DVCWU7MT.module.min.js +0 -2
- package/dist/chunk-chunk-FEPXDKJP.module.min.js +0 -1
- package/dist/chunk-chunk-FJ76HWQZ.module.min.js +0 -1
- package/dist/chunk-chunk-FSIHAW6L.module.min.js +0 -2
- package/dist/chunk-chunk-G2RGVEYY.module.min.js +0 -2
- package/dist/chunk-chunk-G75OPF5N.module.min.js +0 -2
- package/dist/chunk-chunk-HADHLMY5.module.min.js +0 -1
- package/dist/chunk-chunk-HAJVODLO.module.min.js +0 -2
- package/dist/chunk-chunk-HBFA4NN6.module.min.js +0 -1
- package/dist/chunk-chunk-HIV7AW2V.module.min.js +0 -2
- package/dist/chunk-chunk-IY7RYD4S.module.min.js +0 -1
- package/dist/chunk-chunk-J3QOW4OE.module.min.js +0 -0
- package/dist/chunk-chunk-J3XWETBJ.module.min.js +0 -2
- package/dist/chunk-chunk-JZAMMSQQ.module.min.js +0 -2
- package/dist/chunk-chunk-KTWEBFMX.module.min.js +0 -2
- package/dist/chunk-chunk-LSJUXBMF.module.min.js +0 -1
- package/dist/chunk-chunk-MXMRXSCI.module.min.js +0 -2
- package/dist/chunk-chunk-MXVBXFKW.module.min.js +0 -2
- package/dist/chunk-chunk-NWIGA3UK.module.min.js +0 -1
- package/dist/chunk-chunk-OFAP623Y.module.min.js +0 -2
- package/dist/chunk-chunk-OHLRAEQZ.module.min.js +0 -2
- package/dist/chunk-chunk-OZK46A5U.module.min.js +0 -1
- package/dist/chunk-chunk-PMR47KRY.module.min.js +0 -2
- package/dist/chunk-chunk-PRNXOCYZ.module.min.js +0 -2
- package/dist/chunk-chunk-Q2YADC2V.module.min.js +0 -2
- package/dist/chunk-chunk-RLKZVJMQ.module.min.js +0 -2
- package/dist/chunk-chunk-ROP4HI7H.module.min.js +0 -2
- package/dist/chunk-chunk-SK2TQMG4.module.min.js +0 -2
- package/dist/chunk-chunk-SKLYXNYW.module.min.js +0 -2
- package/dist/chunk-chunk-TCMHJWFJ.module.min.js +0 -1
- package/dist/chunk-chunk-TSCFL235.module.min.js +0 -1
- package/dist/chunk-chunk-U4NZCU5T.module.min.js +0 -2
- package/dist/chunk-chunk-U66USBWU.module.min.js +0 -1
- package/dist/chunk-chunk-UOQRPGPK.module.min.js +0 -2
- package/dist/chunk-chunk-VKL6DI43.module.min.js +0 -2
- package/dist/chunk-chunk-W62673ZE.module.min.js +0 -1
- package/dist/chunk-chunk-WFHZHWT7.module.min.js +0 -1
- package/dist/chunk-chunk-XCC25CZZ.module.min.js +0 -2
- package/dist/chunk-chunk-XECNOUZY.module.min.js +0 -2
- package/dist/chunk-chunk-XYZDTYAF.module.min.js +0 -2
- package/dist/chunk-chunk-YHNZCPOZ.module.min.js +0 -2
- package/dist/chunk-chunk-YWZB3KPI.module.min.js +0 -2
- package/dist/chunk-statisticalOverlays-HMYYSGPE.module.min.js +0 -2
- package/dist/components/stream/test-utils/frameScheduler.d.ts +0 -12
- package/dist/components/stream/test-utils/revisionConsumption.d.ts +0 -13
- package/dist/test-utils/canvasMock.d.ts +0 -86
- package/dist/test-utils/capturedFrameProps.d.ts +0 -67
- package/dist/test-utils/frameMock.d.ts +0 -81
- package/dist/test-utils/ordinalFixtures.d.ts +0 -48
- /package/dist/{chunk-chunk-JJ2OOIET.module.min.js → c-GGISSW5E.min.js} +0 -0
- /package/dist/{chunk-chunk-SIRIJ3DY.module.min.js → c-N4G2L7ID.min.js} +0 -0
- /package/dist/{chunk-chunk-CA3YDW6F.module.min.js → c-S6U5CGT5.min.js} +0 -0
- /package/dist/components/recipes/{mobileAnnotationStrategy.d.ts → mobileAnnotationBehavior.d.ts} +0 -0
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import type { Accessor } from "../charts/shared/types";
|
|
3
3
|
import type { Datum } from "../charts/shared/datumTypes";
|
|
4
|
+
import type { HoverData } from "../realtime/types";
|
|
5
|
+
export { TooltipRoot, defaultTooltipStyle, hasOwnTooltipChrome, markTooltipChrome, } from "./tooltipChrome";
|
|
6
|
+
export type { TooltipRootProps, TooltipChromeMode } from "./tooltipChrome";
|
|
4
7
|
/**
|
|
5
8
|
* Configuration for a single tooltip field
|
|
6
9
|
*/
|
|
@@ -62,10 +65,6 @@ export interface MultiLineTooltipConfig extends TooltipConfig {
|
|
|
62
65
|
*/
|
|
63
66
|
separator?: string;
|
|
64
67
|
}
|
|
65
|
-
/**
|
|
66
|
-
* Default tooltip styles following best practices
|
|
67
|
-
*/
|
|
68
|
-
export declare const defaultTooltipStyle: React.CSSProperties;
|
|
69
68
|
/**
|
|
70
69
|
* Create a simple tooltip that displays a single value or title
|
|
71
70
|
*
|
|
@@ -165,6 +164,11 @@ export interface MultiTooltipConfig {
|
|
|
165
164
|
* Type for tooltip prop that chart components accept
|
|
166
165
|
*/
|
|
167
166
|
export type TooltipProp = boolean | "multi" | MultiTooltipConfig | ((data: Record<string, unknown>) => React.ReactNode) | ReturnType<typeof Tooltip> | ReturnType<typeof MultiLineTooltip> | TooltipConfig;
|
|
167
|
+
/**
|
|
168
|
+
* Backward-compatible tooltip input for charts that historically supplied the
|
|
169
|
+
* complete HoverData wrapper to a plain callback.
|
|
170
|
+
*/
|
|
171
|
+
export type TooltipPropWithHoverCallback = TooltipProp | ((data: HoverData) => React.ReactNode);
|
|
168
172
|
/**
|
|
169
173
|
* The function signature that Stream Frames expect for tooltipContent.
|
|
170
174
|
* Compatible with HoverData and any Record-based hover object.
|
|
@@ -186,14 +190,35 @@ export declare function isMultiTooltipConfig(tooltip: TooltipProp | undefined):
|
|
|
186
190
|
* spread onto Stream frame props.
|
|
187
191
|
*/
|
|
188
192
|
export declare function resolveMultiCapableTooltip(input: {
|
|
189
|
-
tooltip:
|
|
193
|
+
tooltip: TooltipPropWithHoverCallback | undefined;
|
|
190
194
|
defaultTooltipContent: (d: any) => React.ReactNode;
|
|
191
195
|
/** Used when multi mode is on and no custom content was provided. */
|
|
192
196
|
multiDefaultContent?: (d: any) => React.ReactNode;
|
|
197
|
+
/**
|
|
198
|
+
* Preserve a legacy HOC contract whose plain function receives the full
|
|
199
|
+
* HoverData wrapper. Multi config `content` always receives the normalized
|
|
200
|
+
* raw datum plus `allSeries` / `xValue` as documented.
|
|
201
|
+
* @default "datum"
|
|
202
|
+
*/
|
|
203
|
+
customFunctionContext?: "datum" | "hover";
|
|
193
204
|
}): {
|
|
194
205
|
tooltipContent: (d: any) => React.ReactNode;
|
|
195
206
|
tooltipMode?: "multi";
|
|
196
207
|
};
|
|
208
|
+
/**
|
|
209
|
+
* Resolve the default/custom/disabled contract for chart families whose frame
|
|
210
|
+
* only supports single-datum hover. This is the single-mode counterpart to
|
|
211
|
+
* `resolveMultiCapableTooltip` and is useful for legacy wrappers that expose a
|
|
212
|
+
* raw HoverData callback while also accepting the shared config/boolean API.
|
|
213
|
+
*/
|
|
214
|
+
export declare function resolveTooltipContent(input: {
|
|
215
|
+
tooltip: TooltipPropWithHoverCallback | undefined;
|
|
216
|
+
defaultTooltipContent: (d: any) => React.ReactNode;
|
|
217
|
+
/** @default "datum" */
|
|
218
|
+
customFunctionContext?: "datum" | "hover";
|
|
219
|
+
}): {
|
|
220
|
+
tooltipContent: (d: any) => React.ReactNode;
|
|
221
|
+
};
|
|
197
222
|
/**
|
|
198
223
|
* Multi-point tooltip: shows all series values at the hovered X position
|
|
199
224
|
* with color swatches (legend-style). Used when tooltipMode="multi".
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
/**
|
|
3
|
+
* Canonical tooltip chrome. Every value is expressed through a Semiotic CSS
|
|
4
|
+
* variable first so a ThemeProvider (or a consumer-owned variable scope) can
|
|
5
|
+
* switch the tooltip without rebuilding chart-specific content.
|
|
6
|
+
*/
|
|
7
|
+
export declare const defaultTooltipStyle: React.CSSProperties;
|
|
8
|
+
export type TooltipChromeMode = "default" | "css";
|
|
9
|
+
export interface TooltipRootProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
10
|
+
/**
|
|
11
|
+
* `"default"` applies Semiotic's theme-aware chrome. Use `"css"` when the
|
|
12
|
+
* supplied class owns background, text color, border, padding, and shadow.
|
|
13
|
+
* In both modes the root is marked so FlippingTooltip never adds a second
|
|
14
|
+
* box around it.
|
|
15
|
+
* @default "default"
|
|
16
|
+
*/
|
|
17
|
+
chrome?: TooltipChromeMode;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Public tooltip root for custom renderers.
|
|
21
|
+
*
|
|
22
|
+
* @example
|
|
23
|
+
* ```tsx
|
|
24
|
+
* tooltip={d => (
|
|
25
|
+
* <TooltipRoot chrome="css" className="my-tooltip">
|
|
26
|
+
* {d.label}
|
|
27
|
+
* </TooltipRoot>
|
|
28
|
+
* )}
|
|
29
|
+
* ```
|
|
30
|
+
*/
|
|
31
|
+
export declare function TooltipRoot({ chrome, className, style, children, ...rest }: TooltipRootProps): React.JSX.Element;
|
|
32
|
+
/**
|
|
33
|
+
* Mark a wrapper component whose rendered root owns tooltip chrome. This is
|
|
34
|
+
* useful when a tooltip callback returns `<MyTooltip />`: FlippingTooltip can
|
|
35
|
+
* inspect the component type before React renders its inner TooltipRoot.
|
|
36
|
+
*/
|
|
37
|
+
export declare function markTooltipChrome<T>(component: T): T;
|
|
38
|
+
/**
|
|
39
|
+
* Whether the immediate tooltip content explicitly owns its visual chrome.
|
|
40
|
+
* A class name alone is deliberately not enough: many callbacks use a class
|
|
41
|
+
* only for internal layout and would otherwise become transparent.
|
|
42
|
+
*/
|
|
43
|
+
export declare function hasOwnTooltipChrome(node: React.ReactNode): boolean;
|
|
@@ -3,6 +3,8 @@ import type { DataSummary } from "../data/DataSummarizer";
|
|
|
3
3
|
import type { NumericContracts } from "../data/numericContracts";
|
|
4
4
|
import type { NumericFieldProfile } from "../data/auditData";
|
|
5
5
|
import type { IntentId } from "./intents";
|
|
6
|
+
import type { NormalizedProfileFieldRoles } from "./fieldRoles";
|
|
7
|
+
import type { SuggestionPropContract } from "./suggestionPropContracts";
|
|
6
8
|
import type { ChartRecipe, ChartRecipeFrameFamily, MobileDesignDefinition } from "./chartRecipes";
|
|
7
9
|
import type { ScaleFitFn, QualityFitFn, ScaleBand, CardinalityBand, EffectiveScale } from "./dataScaleProfile";
|
|
8
10
|
/**
|
|
@@ -46,6 +48,8 @@ export interface FieldCandidate {
|
|
|
46
48
|
distinctCount?: number;
|
|
47
49
|
/** True if the field's values are strictly increasing in row order. */
|
|
48
50
|
monotonic?: boolean;
|
|
51
|
+
/** True when an explicit semantic or encoding role boosted this candidate. */
|
|
52
|
+
hinted?: boolean;
|
|
49
53
|
}
|
|
50
54
|
/**
|
|
51
55
|
* Profile of a dataset for chart-fitness scoring. Extends DataSummary with
|
|
@@ -60,6 +64,10 @@ export interface ChartDataProfile extends DataSummary {
|
|
|
60
64
|
* visible here as `nonNumericCount` rather than being silently discarded.
|
|
61
65
|
*/
|
|
62
66
|
numericFields?: Readonly<Record<string, NumericFieldProfile>>;
|
|
67
|
+
/** Normalized caller-supplied semantic/encoding roles keyed by field. */
|
|
68
|
+
fieldRoles?: NormalizedProfileFieldRoles;
|
|
69
|
+
/** Identifier fields, also represented by the `identifier` field role. */
|
|
70
|
+
identifiers?: ReadonlyArray<string>;
|
|
63
71
|
/** Candidate fields per role, sorted best-first. */
|
|
64
72
|
candidates: {
|
|
65
73
|
x: FieldCandidate[];
|
|
@@ -168,6 +176,54 @@ export interface ChartVariant {
|
|
|
168
176
|
/** Caveats specific to this variant — surfaced in suggestion.caveats. */
|
|
169
177
|
caveats?: ReadonlyArray<string>;
|
|
170
178
|
}
|
|
179
|
+
/**
|
|
180
|
+
* Capability-owned enforcement for quantitative fields emitted by buildProps.
|
|
181
|
+
* The engine also recognizes conventional measure accessor names, while this
|
|
182
|
+
* hook covers custom prop vocabularies and direct/computed value components.
|
|
183
|
+
*/
|
|
184
|
+
export interface ChartFieldPolicy {
|
|
185
|
+
/** Field-valued buildProps keys that encode quantitative measures. */
|
|
186
|
+
measureAccessorProps?: ReadonlyArray<string>;
|
|
187
|
+
/**
|
|
188
|
+
* Resolve source fields for direct or computed measure props. This is needed
|
|
189
|
+
* when buildProps emits a number rather than an accessor string.
|
|
190
|
+
*/
|
|
191
|
+
measureFields?: (profile: ChartDataProfile, props: Readonly<Record<string, unknown>>, variant?: ChartVariant) => ReadonlyArray<string>;
|
|
192
|
+
/** Explicit escape hatch; omitted/false means identifiers are forbidden. */
|
|
193
|
+
allowIdentifierMeasures?: boolean;
|
|
194
|
+
}
|
|
195
|
+
/** The scene-derived evidence exposed to capability-owned semantic checks. */
|
|
196
|
+
export interface SemanticRenderEvidence {
|
|
197
|
+
readonly component: string;
|
|
198
|
+
readonly frameType: "xy" | "ordinal" | "network" | "geo" | "physics" | "value";
|
|
199
|
+
readonly empty: boolean;
|
|
200
|
+
readonly markCount: number;
|
|
201
|
+
readonly markCountByType: Readonly<Record<string, number>>;
|
|
202
|
+
readonly xDomain?: readonly [number, number];
|
|
203
|
+
readonly yDomain?: readonly [number, number];
|
|
204
|
+
readonly categories?: ReadonlyArray<string>;
|
|
205
|
+
readonly nodeCount?: number;
|
|
206
|
+
readonly edgeCount?: number;
|
|
207
|
+
}
|
|
208
|
+
/**
|
|
209
|
+
* A chart-specific semantic problem found after marks rendered. Errors mean
|
|
210
|
+
* the encoding is degenerate for its stated purpose; warnings mean it remains
|
|
211
|
+
* usable but materially weakened.
|
|
212
|
+
*/
|
|
213
|
+
export interface SemanticViabilityDiagnostic {
|
|
214
|
+
readonly code: string;
|
|
215
|
+
readonly severity: "warning" | "error";
|
|
216
|
+
readonly message: string;
|
|
217
|
+
readonly fix?: string;
|
|
218
|
+
/** Small aggregate values only; never copy source rows into evidence. */
|
|
219
|
+
readonly metrics?: Readonly<Record<string, string | number | boolean>>;
|
|
220
|
+
}
|
|
221
|
+
export type SemanticViabilityCallback = (props: Readonly<Datum>, evidence: SemanticRenderEvidence) => ReadonlyArray<SemanticViabilityDiagnostic>;
|
|
222
|
+
/** Built-in, JSON-safe semantic rule kinds evaluated by static rendering. */
|
|
223
|
+
export interface SemanticViabilityRule {
|
|
224
|
+
readonly kind: "rank-competition";
|
|
225
|
+
}
|
|
226
|
+
export type SemanticViabilityCheck = SemanticViabilityCallback | SemanticViabilityRule;
|
|
171
227
|
/**
|
|
172
228
|
* Result of a capability's `fits()` gate. `null` means the chart fits. A string
|
|
173
229
|
* is the human-readable reason it doesn't, used for diagnostics and reasoning.
|
|
@@ -207,14 +263,23 @@ export interface ChartCapability {
|
|
|
207
263
|
* Values may be functions for profile-aware scoring.
|
|
208
264
|
*/
|
|
209
265
|
intentScores: Partial<Record<IntentId, IntentScorer>>;
|
|
266
|
+
/** Prop-envelope metadata copied onto every suggestion for generic renderers. */
|
|
267
|
+
suggestionPropContract?: SuggestionPropContract;
|
|
268
|
+
/** Enforces identifier exclusions across capability-owned buildProps. */
|
|
269
|
+
fieldPolicy?: ChartFieldPolicy;
|
|
270
|
+
/**
|
|
271
|
+
* Optional post-render check for encodings that paint marks but cannot carry
|
|
272
|
+
* their intended semantics (for example a bump chart with no rank competition).
|
|
273
|
+
*/
|
|
274
|
+
semanticViability?: SemanticViabilityCheck;
|
|
210
275
|
/**
|
|
211
276
|
* Variants — different settings that change what the chart is useful for.
|
|
212
277
|
* Suggestion engine emits one suggestion per (capability × variant) pair.
|
|
213
278
|
* If empty, the engine still emits a base suggestion.
|
|
214
279
|
*/
|
|
215
280
|
variants?: ReadonlyArray<ChartVariant>;
|
|
216
|
-
/** Caveats
|
|
217
|
-
caveats?: (profile: ChartDataProfile) => ReadonlyArray<string>;
|
|
281
|
+
/** Caveats that may inspect the active variant (e.g. "log scale skipped for negative values"). */
|
|
282
|
+
caveats?: (profile: ChartDataProfile, variant?: ChartVariant) => ReadonlyArray<string>;
|
|
218
283
|
/**
|
|
219
284
|
* Build the props you'd pass to this chart for this dataset. Should produce
|
|
220
285
|
* a runnable config (accessor names, etc.) so consumers can `<Component {...props}>`.
|
|
@@ -285,6 +350,12 @@ export interface Suggestion {
|
|
|
285
350
|
caveats: ReadonlyArray<string>;
|
|
286
351
|
/** Ready-to-spread props. */
|
|
287
352
|
props: Record<string, unknown>;
|
|
353
|
+
/**
|
|
354
|
+
* Machine-readable rules for augmenting and rendering `props`. Present on
|
|
355
|
+
* suggestions returned by current versions; optional for compatibility with
|
|
356
|
+
* the original public suggestion shape.
|
|
357
|
+
*/
|
|
358
|
+
propContract?: SuggestionPropContract;
|
|
288
359
|
whyCustom?: WhyCustomExplanation;
|
|
289
360
|
/**
|
|
290
361
|
* Scale tag — present when scale/quality information is available, either
|
|
@@ -294,6 +365,19 @@ export interface Suggestion {
|
|
|
294
365
|
*/
|
|
295
366
|
scaleRange?: SuggestionScaleRange;
|
|
296
367
|
}
|
|
368
|
+
/** A successful `scoreChart` result. The shared `Suggestion` shape remains
|
|
369
|
+
* compatible with existing literals; this result-specific status is required
|
|
370
|
+
* so callers can discriminate it from a rejected score. */
|
|
371
|
+
export type ScoreChartSuggestion = Suggestion & {
|
|
372
|
+
status: "ok";
|
|
373
|
+
};
|
|
374
|
+
/** A requested chart could not be scored against the supplied data. */
|
|
375
|
+
export interface ScoreChartRejected {
|
|
376
|
+
status: "rejected";
|
|
377
|
+
reason: string;
|
|
378
|
+
}
|
|
379
|
+
/** Discriminated result returned by `scoreChart`. */
|
|
380
|
+
export type ScoreChartResult = ScoreChartSuggestion | ScoreChartRejected;
|
|
297
381
|
/**
|
|
298
382
|
* Multi-tier grouping of suggestions by scale band. Returned by
|
|
299
383
|
* `suggestChartsGrouped()`.
|
|
@@ -43,6 +43,7 @@ export interface ChartClinicOptions {
|
|
|
43
43
|
}
|
|
44
44
|
export interface ChartClinicSceneSummary {
|
|
45
45
|
readonly status: RenderEvidence["status"];
|
|
46
|
+
readonly semanticStatus?: RenderEvidence["semanticStatus"];
|
|
46
47
|
readonly frameType: RenderEvidence["frameType"];
|
|
47
48
|
readonly markCount: number;
|
|
48
49
|
readonly markCountByType: Readonly<Record<string, number>>;
|
|
@@ -51,6 +52,7 @@ export interface ChartClinicSceneSummary {
|
|
|
51
52
|
readonly categories?: readonly string[];
|
|
52
53
|
readonly nodeCount?: number;
|
|
53
54
|
readonly edgeCount?: number;
|
|
55
|
+
readonly semanticDiagnostics?: RenderEvidence["semanticDiagnostics"];
|
|
54
56
|
}
|
|
55
57
|
export interface ChartClinicRevisionStatus {
|
|
56
58
|
readonly state: "not-observed" | "fully-consumed" | "pending-consumption";
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import type { Datum } from "../charts/shared/datumTypes";
|
|
2
|
+
import type { ChartDataProfile } from "./chartCapabilityTypes";
|
|
3
|
+
import { type NormalizedProfileFieldRoles } from "./fieldRoles";
|
|
4
|
+
export interface ProfilePrimaryFields {
|
|
5
|
+
x?: string;
|
|
6
|
+
y?: string;
|
|
7
|
+
size?: string;
|
|
8
|
+
category?: string;
|
|
9
|
+
series?: string;
|
|
10
|
+
time?: string;
|
|
11
|
+
}
|
|
12
|
+
export interface ReprofileFieldsOptions {
|
|
13
|
+
/**
|
|
14
|
+
* Explicit primary assignments to apply after candidate selection. A field
|
|
15
|
+
* must remain a candidate for that role; identifiers and ignored fields can
|
|
16
|
+
* never be assigned. Passing an explicit `undefined` clears a role.
|
|
17
|
+
*/
|
|
18
|
+
primary?: Partial<ProfilePrimaryFields>;
|
|
19
|
+
}
|
|
20
|
+
export interface DerivedProfileFields {
|
|
21
|
+
primary: ProfilePrimaryFields;
|
|
22
|
+
categoryCount?: number;
|
|
23
|
+
seriesCount?: number;
|
|
24
|
+
uniqueXCount?: number;
|
|
25
|
+
hasRepeatedX: boolean;
|
|
26
|
+
monotonicX: boolean;
|
|
27
|
+
hasTimeAxis: boolean;
|
|
28
|
+
xProvenance: ChartDataProfile["xProvenance"];
|
|
29
|
+
stackability?: ChartDataProfile["stackability"];
|
|
30
|
+
}
|
|
31
|
+
type FieldCandidates = ChartDataProfile["candidates"];
|
|
32
|
+
/**
|
|
33
|
+
* Derive primary roles and every dependent count from candidate lists.
|
|
34
|
+
* Exported separately so callers that reorder/filter candidates can restore a
|
|
35
|
+
* coherent profile without mutating stale `primary` or cardinality fields.
|
|
36
|
+
*/
|
|
37
|
+
export declare function deriveProfileFields(data: ReadonlyArray<Datum>, candidates: FieldCandidates, roles: NormalizedProfileFieldRoles, options?: ReprofileFieldsOptions): DerivedProfileFields;
|
|
38
|
+
/** Return a new profile whose derived fields match its current candidates. */
|
|
39
|
+
export declare function rederiveProfile(profile: ChartDataProfile, options?: ReprofileFieldsOptions): ChartDataProfile;
|
|
40
|
+
export {};
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Unified, deterministic chart evaluation for agent and application callers.
|
|
3
|
+
*
|
|
4
|
+
* This is intentionally a composition point rather than a second diagnostic
|
|
5
|
+
* engine. The individual audits remain useful on their own; this module gives
|
|
6
|
+
* callers one ranked finding list and one notification feed for the checks
|
|
7
|
+
* that should happen before a chart is shown to a reader.
|
|
8
|
+
*/
|
|
9
|
+
import type { Datum } from "../charts/shared/datumTypes";
|
|
10
|
+
import type { A11yFinding, AccessibilityAuditResult, AuditAccessibilityOptions } from "../charts/shared/auditAccessibility";
|
|
11
|
+
import type { Diagnosis } from "../charts/shared/diagnoseTypes";
|
|
12
|
+
import type { ValidationResult } from "../charts/shared/validateProps";
|
|
13
|
+
import { type AuditDataOptions, type DataAuditResult } from "../data/auditData";
|
|
14
|
+
import type { RenderEvidence } from "../server/renderEvidence";
|
|
15
|
+
import type { RenderFn } from "./generativeChart";
|
|
16
|
+
export type EvaluateChartStage = "data" | "deception" | "accessibility" | "render";
|
|
17
|
+
export type EvaluateChartSeverity = "error" | "warning" | "manual";
|
|
18
|
+
export interface EvaluateChartFinding {
|
|
19
|
+
readonly id: string;
|
|
20
|
+
/** One-based position in the stable, severity-ranked findings list. */
|
|
21
|
+
readonly rank: number;
|
|
22
|
+
readonly stage: EvaluateChartStage;
|
|
23
|
+
readonly severity: EvaluateChartSeverity;
|
|
24
|
+
readonly code: string;
|
|
25
|
+
readonly message: string;
|
|
26
|
+
readonly fix?: string;
|
|
27
|
+
readonly source: string;
|
|
28
|
+
readonly critical?: boolean;
|
|
29
|
+
readonly principle?: A11yFinding["principle"];
|
|
30
|
+
readonly heuristic?: string;
|
|
31
|
+
readonly field?: string;
|
|
32
|
+
readonly role?: string;
|
|
33
|
+
readonly rows?: ReadonlyArray<number>;
|
|
34
|
+
readonly count?: number;
|
|
35
|
+
}
|
|
36
|
+
export interface EvaluateChartNotification {
|
|
37
|
+
readonly id: string;
|
|
38
|
+
readonly level: "warning" | "error";
|
|
39
|
+
readonly title: string;
|
|
40
|
+
readonly message: string;
|
|
41
|
+
readonly source: "Semiotic chart evaluation";
|
|
42
|
+
readonly dismissible: true;
|
|
43
|
+
}
|
|
44
|
+
export interface EvaluateChartOptions extends AuditAccessibilityOptions {
|
|
45
|
+
/** Overrides or extends the built-in numeric data contracts. */
|
|
46
|
+
readonly dataAudit?: AuditDataOptions;
|
|
47
|
+
/** Optionally prove the configuration against a server or custom renderer. */
|
|
48
|
+
readonly render?: RenderFn;
|
|
49
|
+
/** Maximum number of findings shown in the notification feed. */
|
|
50
|
+
readonly notificationMax?: number;
|
|
51
|
+
}
|
|
52
|
+
export interface EvaluateChartSummary {
|
|
53
|
+
readonly errors: number;
|
|
54
|
+
readonly warnings: number;
|
|
55
|
+
readonly manual: number;
|
|
56
|
+
readonly findings: number;
|
|
57
|
+
readonly notifications: number;
|
|
58
|
+
}
|
|
59
|
+
export interface EvaluateChartResult {
|
|
60
|
+
readonly component: string;
|
|
61
|
+
/** The independent validation result, retained for callers that need it. */
|
|
62
|
+
readonly validation: ValidationResult;
|
|
63
|
+
/** Numeric/domain audit results. */
|
|
64
|
+
readonly data: DataAuditResult;
|
|
65
|
+
/** Non-data configuration and representation diagnoses. */
|
|
66
|
+
readonly deception: ReadonlyArray<Diagnosis>;
|
|
67
|
+
/** Static Chartability accessibility audit. */
|
|
68
|
+
readonly accessibility: AccessibilityAuditResult;
|
|
69
|
+
/** Present only when a renderer was injected. */
|
|
70
|
+
readonly evidence?: RenderEvidence;
|
|
71
|
+
readonly ok: boolean;
|
|
72
|
+
readonly summary: EvaluateChartSummary;
|
|
73
|
+
readonly findings: ReadonlyArray<EvaluateChartFinding>;
|
|
74
|
+
readonly notifications: ReadonlyArray<EvaluateChartNotification>;
|
|
75
|
+
}
|
|
76
|
+
/** Convert a unified evaluation into a compact human-readable report. */
|
|
77
|
+
export declare function formatEvaluateChart(result: EvaluateChartResult): string;
|
|
78
|
+
/**
|
|
79
|
+
* Evaluate a chart through the roadmap's data → deception → accessibility
|
|
80
|
+
* triad. `data` is explicit so callers can evaluate a config without mutating
|
|
81
|
+
* it; when supplied, it is also used as the effective `props.data` input for
|
|
82
|
+
* validation and configuration checks.
|
|
83
|
+
*/
|
|
84
|
+
export declare function evaluateChart(component: string, props?: Datum, data?: ReadonlyArray<Datum>, options?: EvaluateChartOptions): EvaluateChartResult;
|
|
85
|
+
export declare function toEvaluateChartNotifications(findings: ReadonlyArray<EvaluateChartFinding>, max?: number): EvaluateChartNotification[];
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { ChartCapability, ChartDataProfile, ChartVariant } from "./chartCapabilityTypes";
|
|
2
|
+
/**
|
|
3
|
+
* Return a diagnostic when a capability proposal treats an identifier as a
|
|
4
|
+
* quantitative measure. This is shared by every AI proposal/evaluation path
|
|
5
|
+
* so a variant cannot bypass the policy that ordinary suggestions enforce.
|
|
6
|
+
*/
|
|
7
|
+
export declare function identifierMeasureViolation(capability: ChartCapability, profile: ChartDataProfile, props: Readonly<Record<string, unknown>>, variant?: ChartVariant): string | null;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Semantic and encoding roles callers can assign to fields before profiling.
|
|
3
|
+
*
|
|
4
|
+
* Semantic roles (`measure`, `dimension`, `temporal`) constrain a field to the
|
|
5
|
+
* compatible encoding candidates. Exact roles (`x`, `y`, etc.) additionally
|
|
6
|
+
* boost that candidate and are useful when the normal type/name heuristics are
|
|
7
|
+
* insufficient. `identifier` and `ignore` always win over positive roles.
|
|
8
|
+
*/
|
|
9
|
+
export type ProfileFieldRole = "identifier" | "measure" | "dimension" | "temporal" | "x" | "y" | "size" | "category" | "series" | "time" | "ignore";
|
|
10
|
+
export type ProfileFieldRoleHint = ProfileFieldRole | ReadonlyArray<ProfileFieldRole>;
|
|
11
|
+
export type ProfileFieldRoleHints = Readonly<Record<string, ProfileFieldRoleHint>>;
|
|
12
|
+
export type NormalizedProfileFieldRoles = Readonly<Record<string, ReadonlyArray<ProfileFieldRole>>>;
|
|
13
|
+
export type CandidateFieldRole = "x" | "y" | "size" | "category" | "series" | "time";
|
|
14
|
+
export declare const PROFILE_X_FIELD_HINT: RegExp;
|
|
15
|
+
/** Normalize the two public hint forms into one immutable role map. */
|
|
16
|
+
export declare function normalizeProfileFieldRoles(fieldRoles: ProfileFieldRoleHints | undefined, identifiers: ReadonlyArray<string> | undefined, seriesField?: string): NormalizedProfileFieldRoles;
|
|
17
|
+
export declare function fieldHasRole(roles: NormalizedProfileFieldRoles, field: string, role: ProfileFieldRole): boolean;
|
|
18
|
+
export declare function identifierFields(roles: NormalizedProfileFieldRoles): string[];
|
|
19
|
+
/**
|
|
20
|
+
* Whether a field may participate in a candidate list:
|
|
21
|
+
* 0 = excluded, 1 = native heuristic, 2 = explicitly hinted. Exact roles can
|
|
22
|
+
* opt atypical x/category/series fields into their corresponding list.
|
|
23
|
+
*/
|
|
24
|
+
export declare function fieldRoleCandidateMatch(roles: NormalizedProfileFieldRoles, field: string, candidateRole: CandidateFieldRole, nativeTypeAllowed: boolean): 0 | 1 | 2;
|
|
@@ -35,6 +35,14 @@ export type RenderFn = (component: string, props: Datum) => {
|
|
|
35
35
|
svg: string;
|
|
36
36
|
evidence: RenderEvidence;
|
|
37
37
|
};
|
|
38
|
+
/** A bounded cache for injected render-evidence oracles. */
|
|
39
|
+
export interface RenderEvidenceMemo {
|
|
40
|
+
/** Pass this function as `PrepareChartOptions.render` or `EvaluateChartOptions.render`. */
|
|
41
|
+
render: RenderFn;
|
|
42
|
+
/** Invalidate every cached result after mutable data or external state changes. */
|
|
43
|
+
clear: () => void;
|
|
44
|
+
}
|
|
45
|
+
export declare function createRenderEvidenceMemo(render: RenderFn): RenderEvidenceMemo;
|
|
38
46
|
export interface PrepareChartInput {
|
|
39
47
|
/** Chart component name the model proposed (e.g. "LineChart"). */
|
|
40
48
|
component: string;
|
|
@@ -51,6 +59,12 @@ export interface PrepareChartOptions {
|
|
|
51
59
|
intent?: IntentId | IntentId[];
|
|
52
60
|
/** Run `diagnoseConfig` anti-pattern checks (default true). */
|
|
53
61
|
diagnose?: boolean;
|
|
62
|
+
/**
|
|
63
|
+
* Narration authored after chart selection. It is merged before validation
|
|
64
|
+
* and diagnosis, so `MISSING_DESCRIPTION` cannot linger from an earlier
|
|
65
|
+
* proposal after a caller supplies generated title/description/summary text.
|
|
66
|
+
*/
|
|
67
|
+
narration?: Partial<Pick<Datum, "title" | "description" | "summary">>;
|
|
54
68
|
/**
|
|
55
69
|
* Run repair routing (fit check + ranked alternatives). Default: true when
|
|
56
70
|
* `data` is provided, false otherwise (repair needs the data to profile).
|
|
@@ -72,8 +86,8 @@ export interface PrepareChartResult {
|
|
|
72
86
|
/**
|
|
73
87
|
* True only when the proposal is trustworthy: it validates, carries no
|
|
74
88
|
* error-severity diagnostics, and — if a renderer was injected — produced a
|
|
75
|
-
* non-empty scene. A `false` result is the signal to retry
|
|
76
|
-
* `repair.alternatives`, never to paint.
|
|
89
|
+
* non-empty, non-degenerate scene. A `false` result is the signal to retry
|
|
90
|
+
* with `reasons` and `repair.alternatives`, never to paint.
|
|
77
91
|
*/
|
|
78
92
|
ok: boolean;
|
|
79
93
|
component: string;
|
|
@@ -95,6 +109,8 @@ export interface PrepareChartResult {
|
|
|
95
109
|
/** Human-readable reasons the proposal is not `ok` (empty when `ok`). */
|
|
96
110
|
reasons: string[];
|
|
97
111
|
}
|
|
112
|
+
/** Re-run only the inexpensive configuration diagnosis after props change. */
|
|
113
|
+
export declare function refreshChartDiagnostics(component: string, props: Datum): Diagnosis[];
|
|
98
114
|
/**
|
|
99
115
|
* Run an LLM chart proposal through the trust loop. Pure except for any side
|
|
100
116
|
* effects of an injected `render` function.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type IntentFieldKind, type IntentId } from "./intents";
|
|
2
2
|
export interface InferIntentResult {
|
|
3
3
|
intent: IntentId;
|
|
4
4
|
/** 1..5 score for ranking ties. Higher = stronger match. */
|
|
@@ -8,6 +8,30 @@ export interface InferIntentResult {
|
|
|
8
8
|
intent: IntentId;
|
|
9
9
|
confidence: number;
|
|
10
10
|
}>;
|
|
11
|
+
/**
|
|
12
|
+
* Which inference channel supported the winning intent. Present on results
|
|
13
|
+
* returned by current versions; optional for source compatibility with the
|
|
14
|
+
* original public result shape.
|
|
15
|
+
*/
|
|
16
|
+
source?: "prose" | "field-name" | "data-shape" | "combined";
|
|
17
|
+
}
|
|
18
|
+
export interface InferIntentField {
|
|
19
|
+
name: string;
|
|
20
|
+
/** Common schema aliases such as `number`, `integer`, and `datetime` are normalized. */
|
|
21
|
+
kind?: IntentFieldKind | (string & {});
|
|
22
|
+
/** Optional schema role; retained for forward-compatible registered schemas. */
|
|
23
|
+
role?: string;
|
|
24
|
+
}
|
|
25
|
+
export interface InferIntentOptions {
|
|
26
|
+
/**
|
|
27
|
+
* `prose` preserves the original natural-language behavior. `schema` uses
|
|
28
|
+
* only field-name/data-shape signals. `combined` considers both channels.
|
|
29
|
+
*/
|
|
30
|
+
mode?: "prose" | "schema" | "combined";
|
|
31
|
+
/** Schema fields. Strings are shorthand for `{ name }`. */
|
|
32
|
+
fields?: ReadonlyArray<string | InferIntentField>;
|
|
33
|
+
/** Minimum winning score. Schema inference defaults to 3 to limit weak guesses. */
|
|
34
|
+
minimumConfidence?: number;
|
|
11
35
|
}
|
|
12
36
|
/**
|
|
13
37
|
* Map a natural-language query to a built-in intent. Returns `null` when no
|
|
@@ -21,4 +45,4 @@ export interface InferIntentResult {
|
|
|
21
45
|
* inferIntent("hello")
|
|
22
46
|
* // → null
|
|
23
47
|
*/
|
|
24
|
-
export declare function inferIntent(query: string): InferIntentResult | null;
|
|
48
|
+
export declare function inferIntent(query: string, options?: InferIntentOptions): InferIntentResult | null;
|
|
@@ -14,12 +14,41 @@ export type BuiltInIntentId = "trend" | "compare-series" | "compare-categories"
|
|
|
14
14
|
* Any intent — built-in or user-registered. Custom intents are plain strings.
|
|
15
15
|
*/
|
|
16
16
|
export type IntentId = BuiltInIntentId | (string & {});
|
|
17
|
+
export type IntentFieldKind = "numeric" | "categorical" | "date" | "boolean" | "unknown";
|
|
18
|
+
/**
|
|
19
|
+
* Declarative, JSON-safe signals used by `inferIntent(..., { mode: "schema" })`.
|
|
20
|
+
* Field names are matched as normalized whole tokens, never substrings. The
|
|
21
|
+
* default `minimumFieldMatches` is two (or one when only one signal exists),
|
|
22
|
+
* which keeps a single generic column name from becoming an intent by accident.
|
|
23
|
+
*/
|
|
24
|
+
export interface IntentSignals {
|
|
25
|
+
fieldNames?: ReadonlyArray<string>;
|
|
26
|
+
minimumFieldMatches?: number;
|
|
27
|
+
dataShape?: {
|
|
28
|
+
minNumericFields?: number;
|
|
29
|
+
minCategoricalFields?: number;
|
|
30
|
+
minDateFields?: number;
|
|
31
|
+
minBooleanFields?: number;
|
|
32
|
+
/** Schema-mode confidence for a matching shape (default 3). */
|
|
33
|
+
confidence?: number;
|
|
34
|
+
};
|
|
35
|
+
}
|
|
17
36
|
export interface IntentDescriptor {
|
|
18
37
|
id: IntentId;
|
|
19
38
|
label: string;
|
|
20
39
|
description: string;
|
|
21
40
|
/** Soft hint of which chart family typically serves this intent. */
|
|
22
41
|
familyHint?: "time-series" | "categorical" | "distribution" | "relationship" | "flow" | "network" | "hierarchy" | "geo";
|
|
42
|
+
/**
|
|
43
|
+
* Existing intents whose capability scores should be blended when this
|
|
44
|
+
* intent is requested. This lets a registered intent rank immediately,
|
|
45
|
+
* without modifying every capability descriptor.
|
|
46
|
+
*/
|
|
47
|
+
composes?: ReadonlyArray<IntentId>;
|
|
48
|
+
/** Optional non-negative weights keyed by the ids in `composes` (default 1). */
|
|
49
|
+
weights?: Readonly<Partial<Record<IntentId, number>>>;
|
|
50
|
+
/** Opt-in field-name and data-shape inference signals. */
|
|
51
|
+
signals?: IntentSignals;
|
|
23
52
|
}
|
|
24
53
|
/** Get an intent descriptor by id, or undefined if not registered. */
|
|
25
54
|
export declare function getIntent(id: IntentId): IntentDescriptor | undefined;
|
|
@@ -30,5 +59,11 @@ export declare function listIntents(): IntentDescriptor[];
|
|
|
30
59
|
* replaces the descriptor.
|
|
31
60
|
*/
|
|
32
61
|
export declare function registerIntent(intent: IntentDescriptor): void;
|
|
62
|
+
/**
|
|
63
|
+
* Materialize requested composed intent scores over a capability's existing
|
|
64
|
+
* scores. Only requested ids are added: registering an intent cannot silently
|
|
65
|
+
* change no-intent/default ranking by adding another value to its mean.
|
|
66
|
+
*/
|
|
67
|
+
export declare function expandComposedIntentScores(scores: Readonly<Partial<Record<IntentId, number>>>, requested: ReadonlyArray<IntentId>): Partial<Record<IntentId, number>>;
|
|
33
68
|
/** Sentinel set used by capability authors to opt out of an intent without misspelling. */
|
|
34
69
|
export declare const BUILT_IN_INTENT_IDS: ReadonlySet<BuiltInIntentId>;
|
|
@@ -36,8 +36,8 @@ export interface BuildNavigationTreeOptions {
|
|
|
36
36
|
}
|
|
37
37
|
/**
|
|
38
38
|
* Build a structured navigation tree for a chart config. Full trees for XY,
|
|
39
|
-
* bar, part-to-whole,
|
|
40
|
-
*
|
|
39
|
+
* bar, part-to-whole, distribution, network, hierarchy, and geo families;
|
|
40
|
+
* unknown or single-value components retain a concise root-level description
|
|
41
41
|
* rather than inventing a structure.
|
|
42
42
|
*/
|
|
43
43
|
export declare function buildNavigationTree(component: string, props: Datum, options?: BuildNavigationTreeOptions): NavTreeNode;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { Datum } from "../charts/shared/datumTypes";
|
|
2
|
+
import type { AccessibleTableProp } from "../stream/accessibleTableTypes";
|
|
2
3
|
import type { NavTreeNode } from "./navigationTree";
|
|
3
4
|
import type { ChartRecipe } from "./chartRecipes";
|
|
4
5
|
export type ObservedAuditStatus = "pass" | "warn" | "fail" | "manual" | "not-applicable";
|
|
@@ -46,7 +47,7 @@ export interface AuditObservedSceneInput {
|
|
|
46
47
|
title?: string;
|
|
47
48
|
summary?: string;
|
|
48
49
|
description?: string;
|
|
49
|
-
accessibleTable?:
|
|
50
|
+
accessibleTable?: AccessibleTableProp;
|
|
50
51
|
navigationTree?: NavTreeNode;
|
|
51
52
|
selectedIds?: ReadonlyArray<string>;
|
|
52
53
|
};
|
|
@@ -1,10 +1,21 @@
|
|
|
1
1
|
import type { Datum } from "../charts/shared/datumTypes";
|
|
2
2
|
import type { ChartDataProfile } from "./chartCapabilityTypes";
|
|
3
|
+
import { type ProfileFieldRoleHints } from "./fieldRoles";
|
|
3
4
|
export interface ProfileDataOptions {
|
|
4
5
|
/** If you have access to the raw input (which might be {nodes, edges} or GeoJSON), pass it for structure detection. */
|
|
5
6
|
rawInput?: unknown;
|
|
6
7
|
/** Override the field used as the primary series, useful when the heuristic guesses wrong. */
|
|
7
8
|
seriesField?: string;
|
|
9
|
+
/**
|
|
10
|
+
* Fields that identify records rather than encode values. Identifier fields
|
|
11
|
+
* are excluded from every x/y/size/category/series/time candidate list.
|
|
12
|
+
*/
|
|
13
|
+
identifiers?: ReadonlyArray<string>;
|
|
14
|
+
/**
|
|
15
|
+
* Per-field semantic or exact encoding roles. `identifier` and `ignore`
|
|
16
|
+
* always take precedence; exact roles boost that candidate deterministically.
|
|
17
|
+
*/
|
|
18
|
+
fieldRoles?: ProfileFieldRoleHints;
|
|
8
19
|
}
|
|
9
20
|
/**
|
|
10
21
|
* Build a ChartDataProfile from row data. Extends DataSummary with shape inference —
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { Datum } from "../charts/shared/datumTypes";
|
|
2
|
+
import { type ProfileDataOptions } from "./profileData";
|
|
2
3
|
import type { ChartDataProfile, Suggestion } from "./chartCapabilityTypes";
|
|
3
4
|
import type { IntentId } from "./intents";
|
|
4
5
|
import type { ObservedSceneAuditResult } from "./observedSceneAudit";
|
|
@@ -41,11 +42,9 @@ export interface RepairUnknownResult {
|
|
|
41
42
|
repairs?: string[];
|
|
42
43
|
}
|
|
43
44
|
export type RepairResult = RepairOkResult | RepairAlternativeResult | RepairUnknownResult;
|
|
44
|
-
export interface RepairOptions {
|
|
45
|
+
export interface RepairOptions extends ProfileDataOptions {
|
|
45
46
|
/** Caller's intent — informs ranking of alternatives when the chart doesn't fit. */
|
|
46
47
|
intent?: IntentId | IntentId[];
|
|
47
|
-
/** Non-tabular payload (network/hierarchy/GeoJSON). Forwarded to profileData. */
|
|
48
|
-
rawInput?: unknown;
|
|
49
48
|
/** Limit number of alternatives returned (default 3). */
|
|
50
49
|
maxAlternatives?: number;
|
|
51
50
|
/** Pre-computed profile, avoids recomputation. */
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { SemanticViabilityDiagnostic } from "./chartCapabilityTypes";
|
|
2
|
+
import type { RenderEvidence } from "../server/renderEvidence";
|
|
3
|
+
export declare function semanticEvidenceDiagnostics(evidence: RenderEvidence): ReadonlyArray<SemanticViabilityDiagnostic>;
|
|
4
|
+
export declare function semanticFailureReasons(evidence: RenderEvidence): string[];
|