semiotic 3.8.0 → 3.8.2
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 +14 -9
- package/README.md +56 -55
- package/ai/behaviorContracts.cjs +9 -0
- package/ai/dist/mcp-server.js +240 -30
- package/ai/schema.json +616 -42
- package/ai/surface-manifest.json +3 -2
- package/ai/system-prompt.md +7 -3
- package/dist/__tests__/scenarios/mcpProtocolTypes.d.ts +20 -0
- package/dist/chunk-OrdinalBrushOverlay-PXHQYDB2.module.min.js +2 -0
- package/dist/chunk-XYBrushOverlay-ECZJJLAJ.module.min.js +1 -0
- package/dist/chunk-XYBrushOverlay-EP2SV3UI.module.min.js +2 -0
- package/dist/chunk-chunk-255KDHW5.module.min.js +1 -0
- package/dist/chunk-chunk-27HVVXS6.module.min.js +1 -0
- package/dist/chunk-chunk-2CXCXRB4.module.min.js +1 -0
- package/dist/chunk-chunk-2JGJ5GUG.module.min.js +2 -0
- package/dist/chunk-chunk-2UN3ANRN.module.min.js +2 -0
- package/dist/chunk-chunk-2VUEY5TH.module.min.js +1 -0
- package/dist/chunk-chunk-2WVCH4PL.module.min.js +1 -0
- package/dist/chunk-chunk-5UKL5W76.module.min.js +2 -0
- package/dist/chunk-chunk-5WEFWNUW.module.min.js +2 -0
- package/dist/chunk-chunk-6F6GEAQU.module.min.js +1 -0
- package/dist/chunk-chunk-7LHMKRKE.module.min.js +2 -0
- package/dist/chunk-chunk-BHYTYMY2.module.min.js +2 -0
- package/dist/chunk-chunk-C6EJ4IOD.module.min.js +2 -0
- package/dist/chunk-chunk-CA3YDW6F.module.min.js +1 -0
- package/dist/chunk-chunk-CP3EN6KZ.module.min.js +1 -0
- package/dist/chunk-chunk-CYIML3AV.module.min.js +2 -0
- package/dist/chunk-chunk-DNY43POY.module.min.js +1 -0
- package/dist/chunk-chunk-DSNGDNJY.module.min.js +1 -0
- package/dist/chunk-chunk-E7MIQX7D.module.min.js +2 -0
- package/dist/chunk-chunk-EMO5NUGE.module.min.js +1 -0
- package/dist/chunk-chunk-ES4DCG3L.module.min.js +1 -0
- package/dist/chunk-chunk-FAKO3RGQ.module.min.js +2 -0
- package/dist/chunk-chunk-FYY2ACNJ.module.min.js +2 -0
- package/dist/chunk-chunk-G7WFWHAD.module.min.js +2 -0
- package/dist/chunk-chunk-GMQ5AYTD.module.min.js +1 -0
- package/dist/chunk-chunk-H4PPRW6N.module.min.js +1 -0
- package/dist/chunk-chunk-IFYPMWKY.module.min.js +1 -0
- package/dist/chunk-chunk-J3ELI22J.module.min.js +1 -0
- package/dist/chunk-chunk-J3QOW4OE.module.min.js +0 -0
- package/dist/chunk-chunk-J3XWETBJ.module.min.js +2 -0
- package/dist/chunk-chunk-JCG72SGW.module.min.js +2 -0
- package/dist/{semiotic-ai-chunk-OG7BQUUW.module.min.js → chunk-chunk-JJ2OOIET.module.min.js} +0 -1
- package/dist/chunk-chunk-KTWEBFMX.module.min.js +2 -0
- package/dist/chunk-chunk-L6D3I3V7.module.min.js +2 -0
- package/dist/chunk-chunk-M337NY6L.module.min.js +1 -0
- package/dist/chunk-chunk-NO4MCQVD.module.min.js +1 -0
- package/dist/chunk-chunk-ODUZEEBH.module.min.js +2 -0
- package/dist/chunk-chunk-P6UBCMSQ.module.min.js +2 -0
- package/dist/chunk-chunk-Q2YADC2V.module.min.js +2 -0
- package/dist/chunk-chunk-QRIBHZYW.module.min.js +1 -0
- package/dist/chunk-chunk-QSQVBIJA.module.min.js +1 -0
- package/dist/chunk-chunk-RCF52Z42.module.min.js +2 -0
- package/dist/chunk-chunk-RH5TSQPH.module.min.js +1 -0
- package/dist/chunk-chunk-ROP4HI7H.module.min.js +2 -0
- package/dist/chunk-chunk-RZH7VZYS.module.min.js +2 -0
- package/dist/chunk-chunk-SIRIJ3DY.module.min.js +1 -0
- package/dist/chunk-chunk-STZFFTAN.module.min.js +2 -0
- package/dist/chunk-chunk-SV4XAZ3Q.module.min.js +1 -0
- package/dist/chunk-chunk-T27ZEV6A.module.min.js +1 -0
- package/dist/chunk-chunk-U3AGQ5EF.module.min.js +2 -0
- package/dist/chunk-chunk-U66USBWU.module.min.js +1 -0
- package/dist/chunk-chunk-VVCA3DB7.module.min.js +1 -0
- package/dist/chunk-chunk-W3DB2MN4.module.min.js +2 -0
- package/dist/chunk-chunk-WCX6U47H.module.min.js +2 -0
- package/dist/chunk-chunk-WDIN4LRC.module.min.js +1 -0
- package/dist/chunk-chunk-XEVJDUTH.module.min.js +1 -0
- package/dist/chunk-chunk-XOYX77KF.module.min.js +2 -0
- package/dist/chunk-chunk-YCQYG6J5.module.min.js +2 -0
- package/dist/chunk-chunk-YHNZCPOZ.module.min.js +2 -0
- package/dist/chunk-chunk-YWZB3KPI.module.min.js +2 -0
- package/dist/chunk-chunk-Z5KXAVQD.module.min.js +2 -0
- package/dist/chunk-chunk-ZCNBUZPL.module.min.js +2 -0
- package/dist/chunk-chunk-ZLKRTF5N.module.min.js +2 -0
- package/dist/chunk-chunk-ZTNVDWAK.module.min.js +2 -0
- package/dist/chunk-statisticalOverlays-6MVAK5RW.module.min.js +2 -0
- package/dist/components/AccessibleNavTree.d.ts +7 -1
- package/dist/components/ai/chartClinicMetadata.generated.d.ts +15 -0
- package/dist/components/ai/useNavigationSync.d.ts +17 -2
- package/dist/components/chartContainerMobile.d.ts +9 -0
- package/dist/components/charts/geo/ChoroplethMap.d.ts +19 -2
- package/dist/components/charts/geo/DistanceCartogram.d.ts +14 -2
- package/dist/components/charts/geo/FlowMap.d.ts +10 -6
- package/dist/components/charts/geo/ProportionalSymbolMap.d.ts +14 -2
- package/dist/components/charts/index.d.ts +6 -0
- package/dist/components/charts/network/ChordDiagram.d.ts +9 -1
- package/dist/components/charts/network/ForceDirectedGraph.d.ts +11 -0
- package/dist/components/charts/network/SankeyDiagram.d.ts +9 -1
- package/dist/components/charts/ordinal/BarChart.d.ts +21 -0
- package/dist/components/charts/ordinal/GroupedBarChart.d.ts +11 -0
- package/dist/components/charts/ordinal/StackedBarChart.d.ts +11 -0
- package/dist/components/charts/physics/CollisionSwarmChart.d.ts +7 -0
- package/dist/components/charts/physics/EventDropChart.d.ts +7 -0
- package/dist/components/charts/physics/GaltonBoardChart.d.ts +8 -0
- package/dist/components/charts/physics/PhysicalFlowChart.d.ts +7 -0
- package/dist/components/charts/physics/PhysicsCustomChart.d.ts +4 -25
- package/dist/components/charts/physics/PhysicsPileChart.d.ts +7 -0
- package/dist/components/charts/physics/physicsChartShared.d.ts +17 -1
- package/dist/components/charts/physics/physicsCustomLayout.d.ts +32 -0
- package/dist/components/charts/shared/AnnotationLabel.d.ts +88 -0
- package/dist/components/charts/shared/annotationActivation.d.ts +35 -0
- package/dist/components/charts/shared/annotationLabelLayout.d.ts +5 -0
- package/dist/components/charts/shared/annotationRules.d.ts +2 -1
- package/dist/components/charts/shared/auditAccessibilityText.d.ts +13 -0
- package/dist/components/charts/shared/chartSelectionUtils.d.ts +4 -0
- package/dist/components/charts/shared/chartSpecCore.d.ts +3 -3
- package/dist/components/charts/shared/datumTypes.d.ts +2 -0
- package/dist/components/charts/shared/diagnoseAnnotationChecks.d.ts +2 -0
- package/dist/components/charts/shared/formatUtils.d.ts +3 -3
- package/dist/components/charts/shared/hatchFill.d.ts +87 -0
- package/dist/components/charts/shared/hooks.d.ts +7 -6
- package/dist/components/charts/shared/knownChartComponents.d.ts +9 -0
- package/dist/components/charts/shared/leastSquaresRegression.d.ts +16 -0
- package/dist/components/charts/shared/mergeShapeStyle.d.ts +3 -2
- package/dist/components/charts/shared/semanticInteractions.d.ts +42 -0
- package/dist/components/charts/shared/sparseArray.d.ts +1 -1
- package/dist/components/charts/shared/streamPropsHelpers.d.ts +6 -4
- package/dist/components/charts/shared/styleRules.d.ts +205 -0
- package/dist/components/charts/shared/tooltipUtils.d.ts +22 -9
- package/dist/components/charts/shared/types.d.ts +9 -6
- package/dist/components/charts/shared/useAreaSeriesSetup.d.ts +16 -2
- package/dist/components/charts/shared/useChartSetup.d.ts +2 -2
- package/dist/components/charts/shared/useCustomChartSetup.d.ts +3 -0
- package/dist/components/charts/shared/useFrameImperativeHandle.d.ts +1 -2
- package/dist/components/charts/shared/useLikertAggregation.d.ts +4 -4
- package/dist/components/charts/shared/useOrdinalBrush.d.ts +2 -1
- package/dist/components/charts/shared/useOrdinalPieceStyle.d.ts +24 -1
- package/dist/components/charts/shared/useStreamingLegend.d.ts +1 -1
- package/dist/components/charts/shared/useXYLineStyle.d.ts +10 -0
- package/dist/components/charts/shared/useXYPointStyle.d.ts +19 -1
- package/dist/components/charts/shared/validateChartData.d.ts +7 -5
- package/dist/components/charts/shared/validationMap.d.ts +11 -2
- package/dist/components/charts/shared/validationMap.generated.d.ts +6 -0
- package/dist/components/charts/shared/withChartWrapper.d.ts +4 -3
- package/dist/components/charts/value/targetPresentation.d.ts +22 -0
- package/dist/components/charts/value/types.d.ts +5 -6
- package/dist/components/charts/xy/AreaChart.d.ts +8 -0
- package/dist/components/charts/xy/BubbleChart.d.ts +9 -0
- package/dist/components/charts/xy/ConnectedScatterplot.d.ts +7 -0
- package/dist/components/charts/xy/DifferenceChart.d.ts +1 -52
- package/dist/components/charts/xy/Heatmap.d.ts +2 -2
- package/dist/components/charts/xy/LineChart.d.ts +11 -0
- package/dist/components/charts/xy/QuadrantChart.d.ts +7 -0
- package/dist/components/charts/xy/Scatterplot.d.ts +10 -0
- package/dist/components/charts/xy/StackedAreaChart.d.ts +7 -0
- package/dist/components/charts/xy/differenceSegments.d.ts +49 -0
- package/dist/components/charts/xy/scatterplotMatrixInteractionTypes.d.ts +12 -0
- package/dist/components/controls/SentenceFilter.d.ts +97 -0
- package/dist/components/data/fromVegaLite.d.ts +19 -9
- package/dist/components/rough/createRoughRenderMode.d.ts +46 -0
- package/dist/components/semiotic-ai.d.ts +3 -1
- package/dist/components/semiotic-controls.d.ts +2 -0
- package/dist/components/semiotic-geo.d.ts +4 -0
- package/dist/components/semiotic-network.d.ts +4 -0
- package/dist/components/semiotic-ordinal.d.ts +6 -0
- package/dist/components/semiotic-physics.d.ts +4 -0
- package/dist/components/semiotic-rough.d.ts +4 -0
- package/dist/components/semiotic-utils-core.d.ts +4 -0
- package/dist/components/semiotic-xy.d.ts +4 -0
- package/dist/components/semiotic.d.ts +9 -1
- package/dist/components/server/optionalImageTypes.d.ts +37 -0
- package/dist/components/server/serverChartConfigShared.d.ts +9 -5
- package/dist/components/server/serverChartConfigs.d.ts +4 -4
- package/dist/components/server/staticAnnotations.d.ts +6 -3
- package/dist/components/server/staticLegend.d.ts +1 -1
- package/dist/components/server/staticNetwork.d.ts +4 -4
- package/dist/components/server/staticSVGChrome.d.ts +5 -4
- package/dist/components/store/ObservationStore.d.ts +21 -1
- package/dist/components/stream/AccessibleDataTable.d.ts +4 -10
- package/dist/components/stream/AriaLiveTooltip.d.ts +9 -0
- package/dist/components/stream/CanvasHitTester.d.ts +4 -4
- package/dist/components/stream/DataSourceAdapter.d.ts +1 -1
- package/dist/components/stream/FrameRuntime.d.ts +57 -0
- package/dist/components/stream/GeoParticlePool.d.ts +1 -1
- package/dist/components/stream/GeoPipelineStore.d.ts +43 -12
- package/dist/components/stream/GeoSVGOverlay.d.ts +64 -0
- package/dist/components/stream/NetworkCanvasHitTester.d.ts +2 -1
- package/dist/components/stream/NetworkPipelineStore.d.ts +24 -21
- package/dist/components/stream/NetworkSSRFrame.d.ts +17 -0
- package/dist/components/stream/NetworkSVGOverlay.d.ts +6 -0
- package/dist/components/stream/OrdinalBrushOverlay.d.ts +1 -2
- package/dist/components/stream/OrdinalBrushOverlayLazy.d.ts +9 -0
- package/dist/components/stream/OrdinalCanvasHitTester.d.ts +2 -2
- package/dist/components/stream/OrdinalPipelineStore.d.ts +13 -13
- package/dist/components/stream/OrdinalSVGOverlay.d.ts +9 -1
- package/dist/components/stream/OrdinalStyleResolver.d.ts +12 -0
- package/dist/components/stream/ParticlePool.d.ts +1 -1
- package/dist/components/stream/PipelineStore.d.ts +12 -16
- package/dist/components/stream/SVGOverlay.d.ts +6 -0
- package/dist/components/stream/SceneGraph.d.ts +3 -3
- package/dist/components/stream/XYBrushOverlayLazy.d.ts +17 -0
- package/dist/components/stream/accessorUtils.d.ts +2 -2
- package/dist/components/stream/annotationAccessorResolver.d.ts +2 -2
- package/dist/components/stream/frameGraphics.d.ts +4 -0
- package/dist/components/stream/frameKeyboardNavigation.d.ts +45 -0
- package/dist/components/stream/geoPipelineHelpers.d.ts +3 -3
- package/dist/components/stream/geoPipelineUpdateResults.d.ts +34 -0
- package/dist/components/stream/geoSceneBuilder.d.ts +16 -0
- package/dist/components/stream/geoTypes.d.ts +48 -15
- package/dist/components/stream/hitTestUtils.d.ts +2 -2
- package/dist/components/stream/hoverUtils.d.ts +4 -2
- package/dist/components/stream/layouts/forceLayoutWorkerClient.d.ts +1 -0
- package/dist/components/stream/layouts/hierarchyUtils.d.ts +2 -2
- package/dist/components/stream/networkCustomLayoutRunner.d.ts +23 -0
- package/dist/components/stream/networkCustomRestyle.d.ts +15 -0
- package/dist/components/stream/networkFrameAnimation.d.ts +7 -0
- package/dist/components/stream/networkFrameHandleTypes.d.ts +39 -0
- package/dist/components/stream/networkFrameObservations.d.ts +15 -0
- package/dist/components/stream/networkFramePaint.d.ts +11 -2
- package/dist/components/stream/networkInteractionTypes.d.ts +26 -0
- package/dist/components/stream/networkPipelineConfig.d.ts +2 -2
- package/dist/components/stream/networkPipelineUpdateResults.d.ts +38 -0
- package/dist/components/stream/networkTypes.d.ts +37 -56
- package/dist/components/stream/ordinalCanvasRenderers.d.ts +2 -2
- package/dist/components/stream/ordinalPipelineUpdateResults.d.ts +20 -1
- package/dist/components/stream/ordinalSceneBuilders/types.d.ts +2 -2
- package/dist/components/stream/ordinalTypes.d.ts +30 -3
- package/dist/components/stream/physics/PhysicsPipelineStore.d.ts +2 -0
- package/dist/components/stream/physics/PhysicsSVGOverlay.d.ts +6 -0
- package/dist/components/stream/physics/StreamPhysicsTypes.d.ts +21 -6
- package/dist/components/stream/physics/physicsFrameObservations.d.ts +19 -0
- package/dist/components/stream/physics/physicsFrameSetup.d.ts +4 -0
- package/dist/components/stream/physics/physicsPipelineUpdateResults.d.ts +19 -1
- package/dist/components/stream/physics/usePhysicsFrameLifecyclePolicy.d.ts +3 -1
- package/dist/components/stream/pipelineConfig.d.ts +4 -2
- package/dist/components/stream/pipelineDecay.d.ts +2 -2
- package/dist/components/stream/pipelinePulse.d.ts +2 -2
- package/dist/components/stream/pipelineStoreUpdateResults.d.ts +23 -2
- package/dist/components/stream/pipelineTransitions.d.ts +1 -1
- package/dist/components/stream/pipelineUpdateContract.d.ts +7 -0
- package/dist/components/stream/pipelineUpdateStore.d.ts +21 -0
- package/dist/components/stream/renderBackend.d.ts +27 -0
- package/dist/components/stream/renderers/canvasRenderHelpers.d.ts +15 -1
- package/dist/components/stream/renderers/geoCanvasRenderer.d.ts +3 -2
- package/dist/components/stream/renderers/networkParticleRenderer.d.ts +1 -1
- package/dist/components/stream/sceneRenderBackendTypes.d.ts +28 -0
- package/dist/components/stream/sceneRevisionDiagnostics.d.ts +31 -4
- package/dist/components/stream/streamSemanticTypes.d.ts +16 -0
- package/dist/components/stream/streamThemeTypes.d.ts +14 -0
- package/dist/components/stream/svgOverlayUtils.d.ts +10 -0
- package/dist/components/stream/test-utils/frameScheduler.d.ts +12 -0
- package/dist/components/stream/test-utils/revisionConsumption.d.ts +13 -0
- package/dist/components/stream/titleLayout.d.ts +31 -0
- package/dist/components/stream/types.d.ts +30 -65
- package/dist/components/stream/useCanvasFrameHost.d.ts +71 -0
- package/dist/components/stream/useFrame.d.ts +23 -0
- package/dist/components/stream/useLegendCategoryEmission.d.ts +3 -3
- package/dist/components/stream/useSemanticFrameInteractions.d.ts +22 -0
- package/dist/components/stream/useUpdateResultSnapshot.d.ts +7 -0
- package/dist/components/stream/xyFrameAxisTypes.d.ts +50 -0
- package/dist/components/stream/xySceneBuilders/types.d.ts +6 -5
- 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.min.js +1 -1
- package/dist/physics-matter.module.min.js +1 -1
- package/dist/physics-rapier.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/realtime.min.js +1 -1
- package/dist/realtime.module.min.js +1 -1
- package/dist/rough.min.js +1 -0
- package/dist/rough.module.min.js +1 -0
- package/dist/semiotic-ai-core.min.js +1 -1
- package/dist/semiotic-ai-core.module.min.js +1 -1
- package/dist/semiotic-ai.d.ts +3 -1
- package/dist/semiotic-ai.min.js +1 -1
- package/dist/semiotic-ai.module.min.js +1 -1
- package/dist/semiotic-controls.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.min.js +1 -1
- package/dist/semiotic-experimental.module.min.js +1 -1
- package/dist/semiotic-geo.d.ts +4 -0
- package/dist/semiotic-network.d.ts +4 -0
- package/dist/semiotic-ordinal.d.ts +6 -0
- package/dist/semiotic-physics.d.ts +4 -0
- package/dist/semiotic-realtime-core.min.js +1 -1
- package/dist/semiotic-realtime-core.module.min.js +1 -1
- package/dist/semiotic-realtime-react.min.js +1 -1
- package/dist/semiotic-realtime-react.module.min.js +1 -1
- package/dist/semiotic-recipes-core.min.js +1 -1
- package/dist/semiotic-recipes-core.module.min.js +1 -1
- 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 +1 -1
- package/dist/semiotic-recipes.module.min.js +1 -1
- package/dist/semiotic-rough.d.ts +4 -0
- 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-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 +4 -0
- package/dist/semiotic-utils-core.min.js +1 -1
- package/dist/semiotic-utils-core.module.min.js +1 -1
- 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 +1 -1
- package/dist/semiotic-utils.module.min.js +1 -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 -0
- package/dist/semiotic.d.ts +9 -1
- package/dist/semiotic.min.js +1 -1
- package/dist/semiotic.module.min.js +1 -1
- package/dist/server.min.js +1 -1
- package/dist/server.module.min.js +1 -1
- package/dist/test-utils/capturedFrameProps.d.ts +67 -0
- package/dist/test-utils/frameMock.d.ts +12 -9
- package/dist/xy.min.js +1 -1
- package/dist/xy.module.min.js +1 -1
- package/package.json +29 -10
- package/dist/semiotic-ai-statisticalOverlays-CY4WKR4A.module.min.js +0 -2
- package/dist/semiotic-chunk-3FSVZ46U.module.min.js +0 -2
- package/dist/semiotic-statisticalOverlays-UOMSFKVJ.module.min.js +0 -2
- package/dist/xy-chunk-IWD6IB6V.module.min.js +0 -2
- package/dist/xy-statisticalOverlays-7RWG6LJT.module.min.js +0 -2
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import { ParticlePool } from "./ParticlePool";
|
|
2
2
|
import type { NetworkLayoutResult, NetworkHtmlMark } from "./networkCustomLayout";
|
|
3
3
|
import type { CustomLayoutSelection } from "./customLayoutSelection";
|
|
4
|
-
import {
|
|
4
|
+
import type { CustomLayoutFailureDiagnostic } from "./customLayoutFailure";
|
|
5
5
|
import type { ActiveTransition } from "./pipelineTransitionUtils";
|
|
6
6
|
import { type Quadtree } from "d3-quadtree";
|
|
7
7
|
import type { NetworkPipelineConfig, NetworkSceneNode, NetworkSceneEdge, NetworkCircleNode, NetworkLabel, RealtimeNode, RealtimeEdge, EdgePush } from "./networkTypes";
|
|
8
8
|
import type { Datum } from "../charts/shared/datumTypes";
|
|
9
|
+
import { NetworkPipelineUpdateResults } from "./networkPipelineUpdateResults";
|
|
10
|
+
import { type UpdateResult, type UpdateResultStore } from "./pipelineUpdateStore";
|
|
9
11
|
/**
|
|
10
12
|
* NetworkPipelineStore — stateful store for the StreamNetworkFrame.
|
|
11
13
|
*
|
|
@@ -15,7 +17,13 @@ import type { Datum } from "../charts/shared/datumTypes";
|
|
|
15
17
|
* For bounded data: ingests nodes/edges arrays, runs layout once, builds scene.
|
|
16
18
|
* For streaming data: ingests edge pushes, tracks tension, relayouts on threshold.
|
|
17
19
|
*/
|
|
18
|
-
export declare class NetworkPipelineStore {
|
|
20
|
+
export declare class NetworkPipelineStore implements UpdateResultStore {
|
|
21
|
+
getLastUpdateResult: () => UpdateResult;
|
|
22
|
+
getUpdateSnapshot: () => UpdateResult;
|
|
23
|
+
subscribeUpdateResult: (listener: () => void) => () => void;
|
|
24
|
+
setLayoutSelection: (selection: CustomLayoutSelection | null) => void;
|
|
25
|
+
markStylePaintPending: () => void;
|
|
26
|
+
consumeStylePaintPending: () => boolean;
|
|
19
27
|
nodes: Map<string, RealtimeNode>;
|
|
20
28
|
edges: Map<string, RealtimeEdge>;
|
|
21
29
|
tension: number;
|
|
@@ -65,6 +73,9 @@ export declare class NetworkPipelineStore {
|
|
|
65
73
|
particlePool: ParticlePool | null;
|
|
66
74
|
private config;
|
|
67
75
|
private tensionConfig;
|
|
76
|
+
protected updateResults: NetworkPipelineUpdateResults;
|
|
77
|
+
/** Keep ingest, live encodings, staleness, and transitions on one clock. */
|
|
78
|
+
private currentTime;
|
|
68
79
|
transition: ActiveTransition | null;
|
|
69
80
|
private _hasRenderedOnce;
|
|
70
81
|
/** Snapshot of node positions from before bounded re-ingestion cleared the maps */
|
|
@@ -97,19 +108,25 @@ export declare class NetworkPipelineStore {
|
|
|
97
108
|
y: number;
|
|
98
109
|
}> | null;
|
|
99
110
|
constructor(config: NetworkPipelineConfig);
|
|
100
|
-
updateConfig(config: NetworkPipelineConfig): void;
|
|
111
|
+
updateConfig(config: Partial<NetworkPipelineConfig>): void;
|
|
112
|
+
/** Additive explicit-result form of {@link updateConfig}. */
|
|
113
|
+
updateConfigWithResult(config: Partial<NetworkPipelineConfig>): UpdateResult;
|
|
101
114
|
/**
|
|
102
115
|
* Ingest hierarchy root data for tree/treemap/circlepack/partition layouts.
|
|
103
116
|
* The hierarchy root is passed to the layout plugin via config.__hierarchyRoot.
|
|
104
117
|
*/
|
|
105
|
-
ingestHierarchy(rootData:
|
|
118
|
+
ingestHierarchy(rootData: Datum, size: [number, number]): void;
|
|
106
119
|
/**
|
|
107
120
|
* Ingest bounded node/edge arrays (from props).
|
|
108
121
|
* Clears existing topology and rebuilds from scratch.
|
|
109
122
|
*/
|
|
110
|
-
ingestBounded(rawNodes:
|
|
123
|
+
ingestBounded(rawNodes: Datum[], rawEdges: Datum[], size: [number, number], options?: {
|
|
111
124
|
deferLayout?: boolean;
|
|
112
125
|
}): void;
|
|
126
|
+
/** Additive explicit-result form of {@link ingestBounded}. */
|
|
127
|
+
ingestBoundedWithResult(rawNodes: Datum[], rawEdges: Datum[], size: [number, number], options?: {
|
|
128
|
+
deferLayout?: boolean;
|
|
129
|
+
}): UpdateResult;
|
|
113
130
|
/**
|
|
114
131
|
* Apply worker-computed force positions through the normal layout finalizer.
|
|
115
132
|
* The force plugin still resolves edge endpoints, clamps bounds, records
|
|
@@ -129,6 +146,8 @@ export declare class NetworkPipelineStore {
|
|
|
129
146
|
* Returns true if a relayout is needed.
|
|
130
147
|
*/
|
|
131
148
|
ingestEdge(push: EdgePush): boolean;
|
|
149
|
+
/** Additive explicit-result form of {@link ingestEdge}. */
|
|
150
|
+
ingestEdgeWithResult(push: EdgePush): UpdateResult;
|
|
132
151
|
/**
|
|
133
152
|
* Run the layout algorithm via the appropriate plugin.
|
|
134
153
|
*/
|
|
@@ -145,13 +164,6 @@ export declare class NetworkPipelineStore {
|
|
|
145
164
|
/**
|
|
146
165
|
* Build the scene graph from current layout positions.
|
|
147
166
|
*/
|
|
148
|
-
/** Update the selection the layout reads at the next `buildScene`, without
|
|
149
|
-
* triggering a rebuild. The frame calls this on selection change; whether it
|
|
150
|
-
* then repaints (restyle) or rebuilds is the frame's decision. */
|
|
151
|
-
setLayoutSelection(selection: CustomLayoutSelection | null): void;
|
|
152
|
-
/** Snapshot each mark's as-emitted style so {@link restyleScene} can re-apply
|
|
153
|
-
* patches from the original rather than compounding. */
|
|
154
|
-
private snapshotBaseStyles;
|
|
155
167
|
/**
|
|
156
168
|
* Re-apply the custom layout's `restyle`/`restyleEdge` to the existing scene
|
|
157
169
|
* for `selection`, mutating styles **in place** off each mark's base style.
|
|
@@ -159,15 +171,6 @@ export declare class NetworkPipelineStore {
|
|
|
159
171
|
* stays valid and no relayout/repack happens. The frame repaints the canvas
|
|
160
172
|
* after calling this. No-op when the layout supplied no restyle callbacks.
|
|
161
173
|
*/
|
|
162
|
-
/**
|
|
163
|
-
* "Styles changed, repaint the data canvas without rebuilding the scene."
|
|
164
|
-
* Set by {@link restyleScene}; consumed once per frame by the paint loop.
|
|
165
|
-
* Deliberately separate from `_sceneNodesRevision` (the quadtree-invalidation
|
|
166
|
-
* counter) so a style-only selection change repaints without a relayout.
|
|
167
|
-
*/
|
|
168
|
-
private _stylePaintPending;
|
|
169
|
-
/** Consume the style-only repaint signal (see {@link _stylePaintPending}). */
|
|
170
|
-
consumeStylePaintPending(): boolean;
|
|
171
174
|
restyleScene(selection: CustomLayoutSelection | null): void;
|
|
172
175
|
buildScene(size: [number, number]): void;
|
|
173
176
|
/**
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import type { StreamNetworkFrameProps } from "./networkTypes";
|
|
3
|
+
import { NetworkPipelineStore } from "./NetworkPipelineStore";
|
|
4
|
+
import { NetworkSVGOverlay } from "./NetworkSVGOverlay";
|
|
5
|
+
interface NetworkSSRFrameProps {
|
|
6
|
+
props: StreamNetworkFrameProps;
|
|
7
|
+
store: NetworkPipelineStore | null;
|
|
8
|
+
responsiveRef: React.Ref<HTMLDivElement>;
|
|
9
|
+
size: [number, number];
|
|
10
|
+
margin: React.ComponentProps<typeof NetworkSVGOverlay>["margin"];
|
|
11
|
+
adjustedWidth: number;
|
|
12
|
+
adjustedHeight: number;
|
|
13
|
+
resolvedBackground: React.ReactNode;
|
|
14
|
+
resolvedForeground: React.ReactNode;
|
|
15
|
+
}
|
|
16
|
+
export declare function NetworkSSRFrame({ props, store, responsiveRef, size, margin, adjustedWidth, adjustedHeight, resolvedBackground, resolvedForeground }: NetworkSSRFrameProps): React.JSX.Element;
|
|
17
|
+
export {};
|
|
@@ -6,6 +6,8 @@ import type { LegendGroup, GradientLegendConfig, LegendLayout } from "../types/l
|
|
|
6
6
|
import { type AutoPlaceAnnotations } from "../recipes/annotationLayout";
|
|
7
7
|
import type { AnnotationContext } from "../realtime/types";
|
|
8
8
|
import { type GlyphDef } from "./glyphDef";
|
|
9
|
+
import type { OnObservationCallback } from "../store/ObservationStore";
|
|
10
|
+
import { type OnAnnotationActivateCallback } from "../charts/shared/annotationActivation";
|
|
9
11
|
type AnnotationAnchorNode = {
|
|
10
12
|
type: string;
|
|
11
13
|
datum: Datum | null;
|
|
@@ -75,6 +77,10 @@ export interface NetworkSVGOverlayProps {
|
|
|
75
77
|
sceneNodes?: AnnotationAnchorNode[];
|
|
76
78
|
/** Annotations */
|
|
77
79
|
annotations?: Datum[];
|
|
80
|
+
onAnnotationActivate?: OnAnnotationActivateCallback;
|
|
81
|
+
onObservation?: OnObservationCallback;
|
|
82
|
+
chartId?: string;
|
|
83
|
+
chartType?: string;
|
|
78
84
|
autoPlaceAnnotations?: AutoPlaceAnnotations;
|
|
79
85
|
svgAnnotationRules?: (annotation: Datum, index: number, context: NetworkAnnotationContext) => ReactNode;
|
|
80
86
|
annotationFrame?: number;
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
*/
|
|
18
18
|
import * as React from "react";
|
|
19
19
|
import type { OrdinalScales } from "./ordinalTypes";
|
|
20
|
-
interface OrdinalBrushOverlayProps {
|
|
20
|
+
export interface OrdinalBrushOverlayProps {
|
|
21
21
|
width: number;
|
|
22
22
|
height: number;
|
|
23
23
|
totalWidth: number;
|
|
@@ -40,4 +40,3 @@ interface OrdinalBrushOverlayProps {
|
|
|
40
40
|
* In vertical projection, r maps to y-pixels → uses brushY.
|
|
41
41
|
*/
|
|
42
42
|
export declare function OrdinalBrushOverlay({ width, height, totalWidth, totalHeight, margin, scales, onBrush }: OrdinalBrushOverlayProps): React.JSX.Element;
|
|
43
|
-
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Lazy-loaded wrapper for OrdinalBrushOverlay.
|
|
3
|
+
*
|
|
4
|
+
* Same rationale as XYBrushOverlayLazy: d3-brush is only needed when brushing
|
|
5
|
+
* is enabled. Keep it off the default ordinal cold path (BarChart, PieChart…).
|
|
6
|
+
*/
|
|
7
|
+
import * as React from "react";
|
|
8
|
+
import type { OrdinalBrushOverlayProps } from "./OrdinalBrushOverlay";
|
|
9
|
+
export declare function OrdinalBrushOverlayLazy(props: OrdinalBrushOverlayProps): React.JSX.Element | null;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { OrdinalSceneNode } from "./ordinalTypes";
|
|
2
|
-
import type { PointSceneNode } from "./types";
|
|
2
|
+
import type { SceneDatum, PointSceneNode } from "./types";
|
|
3
3
|
import type { Quadtree } from "d3-quadtree";
|
|
4
4
|
export interface OrdinalHitResult {
|
|
5
|
-
datum:
|
|
5
|
+
datum: SceneDatum;
|
|
6
6
|
x: number;
|
|
7
7
|
y: number;
|
|
8
8
|
distance: number;
|
|
@@ -23,15 +23,22 @@ import type { ActiveTransition } from "./pipelineTransitionUtils";
|
|
|
23
23
|
import type { OrdinalLayoutResult } from "./ordinalCustomLayout";
|
|
24
24
|
import type { CustomLayoutSelection } from "./customLayoutSelection";
|
|
25
25
|
import { type CustomLayoutFailureDiagnostic } from "./customLayoutFailure";
|
|
26
|
-
import type
|
|
27
|
-
|
|
26
|
+
import { type UpdateResult, type UpdateResultStore } from "./pipelineUpdateStore";
|
|
27
|
+
import { OrdinalPipelineUpdateResults } from "./ordinalPipelineUpdateResults";
|
|
28
|
+
export declare class OrdinalPipelineStore implements UpdateResultStore {
|
|
29
|
+
getLastUpdateResult: () => UpdateResult;
|
|
30
|
+
getUpdateSnapshot: () => UpdateResult;
|
|
31
|
+
subscribeUpdateResult: (listener: () => void) => () => void;
|
|
32
|
+
setLayoutSelection: (selection: CustomLayoutSelection | null) => void;
|
|
33
|
+
markStylePaintPending: () => void;
|
|
34
|
+
consumeStylePaintPending: () => boolean;
|
|
28
35
|
private buffer;
|
|
29
36
|
private rExtent;
|
|
30
37
|
/** Per-accessor extents for multiAxis mode */
|
|
31
38
|
private rExtents;
|
|
32
39
|
private config;
|
|
33
40
|
private windowSizeWarned;
|
|
34
|
-
|
|
41
|
+
protected updateResults: OrdinalPipelineUpdateResults;
|
|
35
42
|
private getO;
|
|
36
43
|
private getR;
|
|
37
44
|
/** All resolved rAccessors (length > 1 when multiAxis) */
|
|
@@ -46,9 +53,7 @@ export declare class OrdinalPipelineStore {
|
|
|
46
53
|
private categories;
|
|
47
54
|
/** True once a non-bounded (push) changeset has been ingested */
|
|
48
55
|
private _hasStreamingData;
|
|
49
|
-
|
|
50
|
-
private _colorSchemeMap;
|
|
51
|
-
private _colorSchemeIndex;
|
|
56
|
+
private styleResolver;
|
|
52
57
|
private timestampBuffer;
|
|
53
58
|
activeTransition: ActiveTransition | null;
|
|
54
59
|
private prevPositionMap;
|
|
@@ -98,6 +103,8 @@ export declare class OrdinalPipelineStore {
|
|
|
98
103
|
* empty ring would associate later timestamps with the wrong datum index.
|
|
99
104
|
*/
|
|
100
105
|
private syncPulseTimestampBuffer;
|
|
106
|
+
/** Keep ingest, pulse, staleness, and transition timestamps on one clock. */
|
|
107
|
+
private currentTime;
|
|
101
108
|
ingest(changeset: Changeset): boolean;
|
|
102
109
|
ingestWithResult(changeset: Changeset): UpdateResult;
|
|
103
110
|
private pushValueExtent;
|
|
@@ -112,9 +119,6 @@ export declare class OrdinalPipelineStore {
|
|
|
112
119
|
private getSceneContext;
|
|
113
120
|
private buildSceneNodes;
|
|
114
121
|
private buildLayoutContext;
|
|
115
|
-
private resolvePieceStyle;
|
|
116
|
-
private getColorFromScheme;
|
|
117
|
-
private resolveSummaryStyle;
|
|
118
122
|
computeDecayOpacity(bufferIndex: number, bufferSize: number): number;
|
|
119
123
|
/**
|
|
120
124
|
* Build (or return cached) datum→buffer-index map. Cached against
|
|
@@ -171,8 +175,6 @@ export declare class OrdinalPipelineStore {
|
|
|
171
175
|
*/
|
|
172
176
|
private getBufferArray;
|
|
173
177
|
getData(): Datum[];
|
|
174
|
-
/** Most recent additive update result for revision-aware hosts and tests. */
|
|
175
|
-
getLastUpdateResult(): UpdateResult;
|
|
176
178
|
/**
|
|
177
179
|
* Remove data items by ID. Requires dataIdAccessor to be configured.
|
|
178
180
|
* Returns the removed items. Marks the store dirty for scene rebuild.
|
|
@@ -187,8 +189,6 @@ export declare class OrdinalPipelineStore {
|
|
|
187
189
|
get size(): number;
|
|
188
190
|
getOAccessor(): (d: Datum) => string;
|
|
189
191
|
getRAccessor(): (d: Datum) => number;
|
|
190
|
-
/** Update the selection the layout reads at the next rebuild, without one. */
|
|
191
|
-
setLayoutSelection(selection: CustomLayoutSelection | null): void;
|
|
192
192
|
private applyCustomRestyle;
|
|
193
193
|
/**
|
|
194
194
|
* Re-apply the custom layout's `restyle` to the existing scene for
|
|
@@ -4,6 +4,8 @@ import type { OrdinalScales } from "./ordinalTypes";
|
|
|
4
4
|
import type { AnnotationContext } from "../realtime/types";
|
|
5
5
|
import type { ReactNode } from "react";
|
|
6
6
|
import type { LegendGroup, GradientLegendConfig, LegendLayout } from "../types/legendTypes";
|
|
7
|
+
import type { OnObservationCallback } from "../store/ObservationStore";
|
|
8
|
+
import { type OnAnnotationActivateCallback } from "../charts/shared/annotationActivation";
|
|
7
9
|
import { type AutoPlaceAnnotations } from "../recipes/annotationLayout";
|
|
8
10
|
import { type AxisExtentMode } from "../charts/shared/axisExtent";
|
|
9
11
|
interface OrdinalSVGOverlayProps {
|
|
@@ -53,14 +55,20 @@ interface OrdinalSVGOverlayProps {
|
|
|
53
55
|
legendLayout?: LegendLayout;
|
|
54
56
|
foregroundGraphics?: ReactNode;
|
|
55
57
|
annotations?: Datum[];
|
|
58
|
+
onAnnotationActivate?: OnAnnotationActivateCallback;
|
|
59
|
+
onObservation?: OnObservationCallback;
|
|
60
|
+
chartId?: string;
|
|
61
|
+
chartType?: string;
|
|
56
62
|
autoPlaceAnnotations?: AutoPlaceAnnotations;
|
|
57
63
|
svgAnnotationRules?: (annotation: Datum, index: number, context: AnnotationContext) => ReactNode;
|
|
58
64
|
annotationFrame?: number;
|
|
59
65
|
xAccessor?: string;
|
|
60
66
|
yAccessor?: string;
|
|
61
67
|
annotationData?: Datum[];
|
|
62
|
-
/** When true, grid lines and axis baselines are
|
|
68
|
+
/** When true, grid lines and axis baselines are also rendered by OrdinalSVGUnderlay. */
|
|
63
69
|
underlayRendered?: boolean;
|
|
70
|
+
/** Whether an opaque canvas hides the SVG underlay and needs an overlay copy. */
|
|
71
|
+
canvasObscuresUnderlay?: boolean;
|
|
64
72
|
children?: ReactNode;
|
|
65
73
|
}
|
|
66
74
|
interface OrdinalSVGUnderlayProps {
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { Datum } from "../charts/shared/datumTypes";
|
|
2
|
+
import type { OrdinalPipelineConfig } from "./ordinalTypes";
|
|
3
|
+
import type { Style } from "./types";
|
|
4
|
+
/** Resolves ordinal mark styles while retaining stable category colors. */
|
|
5
|
+
export declare class OrdinalStyleResolver {
|
|
6
|
+
private colorSchemeMap;
|
|
7
|
+
private colorSchemeIndex;
|
|
8
|
+
resetColors(): void;
|
|
9
|
+
resolvePieceStyle(config: OrdinalPipelineConfig, datum: Datum | null, category?: string): Style;
|
|
10
|
+
resolveSummaryStyle(config: OrdinalPipelineConfig, datum: Datum | null, category?: string): Style;
|
|
11
|
+
private getColorFromScheme;
|
|
12
|
+
}
|
|
@@ -17,7 +17,7 @@ export declare class ParticlePool {
|
|
|
17
17
|
* Spawn a new particle on the given edge.
|
|
18
18
|
* Returns the particle if a free slot was found, null otherwise.
|
|
19
19
|
*/
|
|
20
|
-
spawn(edgeIndex: number): Particle | null;
|
|
20
|
+
spawn(edgeIndex: number, random?: () => number): Particle | null;
|
|
21
21
|
/**
|
|
22
22
|
* Advance all active particles by deltaTime.
|
|
23
23
|
* Recycles particles that have completed their journey (t >= 1).
|
|
@@ -26,10 +26,18 @@ import type { CustomLayoutSelection } from "./customLayoutSelection";
|
|
|
26
26
|
import { type CustomLayoutFailureDiagnostic } from "./customLayoutFailure";
|
|
27
27
|
import { type PipelineConfig } from "./pipelineConfig";
|
|
28
28
|
import type { UpdateResult } from "./pipelineUpdateContract";
|
|
29
|
+
import { type UpdateResultStore } from "./pipelineUpdateStore";
|
|
30
|
+
import { PipelineStoreUpdateResults } from "./pipelineStoreUpdateResults";
|
|
29
31
|
export type { PipelineConfig } from "./pipelineConfig";
|
|
30
32
|
export type { ChangeSet, Invalidation, RevisionSet, UpdateResult, } from "./pipelineUpdateContract";
|
|
31
33
|
export { DEFAULT_GROWING_MAX_CAPACITY, GROWING_CAPACITY_WARN_THRESHOLD } from "./pipelineConfig";
|
|
32
|
-
export declare class PipelineStore {
|
|
34
|
+
export declare class PipelineStore implements UpdateResultStore {
|
|
35
|
+
getLastUpdateResult: () => UpdateResult;
|
|
36
|
+
getUpdateSnapshot: () => UpdateResult;
|
|
37
|
+
subscribeUpdateResult: (listener: () => void) => () => void;
|
|
38
|
+
setLayoutSelection: (selection: CustomLayoutSelection | null) => void;
|
|
39
|
+
markStylePaintPending: () => void;
|
|
40
|
+
consumeStylePaintPending: () => boolean;
|
|
33
41
|
private buffer;
|
|
34
42
|
private xExtent;
|
|
35
43
|
private yExtent;
|
|
@@ -64,6 +72,8 @@ export declare class PipelineStore {
|
|
|
64
72
|
/** Exit nodes awaiting fade-out removal */
|
|
65
73
|
exitNodes: SceneNode[];
|
|
66
74
|
lastIngestTime: number;
|
|
75
|
+
/** Keep ingest, pulse, staleness, and transition timestamps on one clock. */
|
|
76
|
+
private currentTime;
|
|
67
77
|
/** Unified color map cache keyed by sorted category set — shared across point, swarm, etc. */
|
|
68
78
|
private _colorMapCache;
|
|
69
79
|
/** groupData() result cache. The line/area/stacked-area builders all re-bucket
|
|
@@ -96,7 +106,7 @@ export declare class PipelineStore {
|
|
|
96
106
|
private _bufferDirty;
|
|
97
107
|
private needsFullRebuild;
|
|
98
108
|
private lastLayout;
|
|
99
|
-
|
|
109
|
+
protected updateResults: PipelineStoreUpdateResults;
|
|
100
110
|
scales: StreamScales | null;
|
|
101
111
|
scene: SceneNode[];
|
|
102
112
|
version: number;
|
|
@@ -230,8 +240,6 @@ export declare class PipelineStore {
|
|
|
230
240
|
*/
|
|
231
241
|
private getBufferArray;
|
|
232
242
|
getData(): Datum[];
|
|
233
|
-
/** Most recent additive update result for revision-aware hosts and tests. */
|
|
234
|
-
getLastUpdateResult(): UpdateResult;
|
|
235
243
|
/**
|
|
236
244
|
* Remove data points by ID. Requires pointIdAccessor to be configured.
|
|
237
245
|
* Returns the removed items. Marks the store dirty for scene rebuild.
|
|
@@ -255,19 +263,7 @@ export declare class PipelineStore {
|
|
|
255
263
|
getXAccessor(): (d: Datum) => number;
|
|
256
264
|
getYAccessor(): (d: Datum) => number;
|
|
257
265
|
getCategoryAccessor(): ((d: Datum) => string) | undefined;
|
|
258
|
-
/** Update the selection the layout reads at the next rebuild, without
|
|
259
|
-
* triggering one. The frame then either repaints (restyle) or rebuilds. */
|
|
260
|
-
setLayoutSelection(selection: CustomLayoutSelection | null): void;
|
|
261
266
|
private applyCustomRestyle;
|
|
262
|
-
/**
|
|
263
|
-
* "Styles changed, repaint the data canvas without rebuilding the scene."
|
|
264
|
-
* Set by {@link restyleScene}; consumed once per frame by the render loop.
|
|
265
|
-
* Kept separate from the dirty flag so a style-only selection change repaints
|
|
266
|
-
* without forcing a layout/scene rebuild (the point of the restyle fast path).
|
|
267
|
-
*/
|
|
268
|
-
private _stylePaintPending;
|
|
269
|
-
/** Consume the style-only repaint signal (see {@link _stylePaintPending}). */
|
|
270
|
-
consumeStylePaintPending(): boolean;
|
|
271
267
|
/**
|
|
272
268
|
* Re-apply the custom layout's `restyle` to the existing scene for
|
|
273
269
|
* `selection`, off each node's base style — no relayout, no quadtree rebuild
|
|
@@ -5,6 +5,8 @@ import type { AnnotationContext } from "../realtime/types";
|
|
|
5
5
|
import type { ReactNode } from "react";
|
|
6
6
|
import type { LegendGroup, GradientLegendConfig, LegendLayout } from "../types/legendTypes";
|
|
7
7
|
import { type AutoPlaceAnnotations } from "../recipes/annotationLayout";
|
|
8
|
+
import type { OnObservationCallback } from "../store/ObservationStore";
|
|
9
|
+
import { type OnAnnotationActivateCallback } from "../charts/shared/annotationActivation";
|
|
8
10
|
export type AxisConfig = XYFrameAxisConfig;
|
|
9
11
|
interface SVGOverlayProps {
|
|
10
12
|
width: number;
|
|
@@ -59,6 +61,10 @@ interface SVGOverlayProps {
|
|
|
59
61
|
xValues?: number[];
|
|
60
62
|
yValues?: number[];
|
|
61
63
|
annotations?: Datum[];
|
|
64
|
+
onAnnotationActivate?: OnAnnotationActivateCallback;
|
|
65
|
+
onObservation?: OnObservationCallback;
|
|
66
|
+
chartId?: string;
|
|
67
|
+
chartType?: string;
|
|
62
68
|
autoPlaceAnnotations?: AutoPlaceAnnotations;
|
|
63
69
|
svgAnnotationRules?: (annotation: Datum, index: number, context: AnnotationContext) => ReactNode;
|
|
64
70
|
annotationFrame?: number;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { SceneNode, LineSceneNode, AreaSceneNode, PointSceneNode, SymbolSceneNode, RectSceneNode, HeatcellSceneNode, Style, StreamScales, CurveType } from "./types";
|
|
1
|
+
import type { SceneNode, SceneDatum, LineSceneNode, AreaSceneNode, PointSceneNode, SymbolSceneNode, RectSceneNode, HeatcellSceneNode, Style, StreamScales, CurveType } from "./types";
|
|
2
2
|
import type { SymbolName } from "./symbolPath";
|
|
3
3
|
import type { Datum } from "../charts/shared/datumTypes";
|
|
4
4
|
export declare function buildLineNode(data: Datum[], scales: StreamScales, xGet: (d: Datum) => number, yGet: (d: Datum) => number, style: Style, group?: string): LineSceneNode;
|
|
@@ -38,8 +38,8 @@ export declare function buildPointNode(datum: Datum, scales: StreamScales, xGet:
|
|
|
38
38
|
/** Build a {@link SymbolSceneNode} — the glyph sibling of {@link buildPointNode}.
|
|
39
39
|
* `size` is the d3-symbol area (px²); convert from a target radius with πr². */
|
|
40
40
|
export declare function buildSymbolNode(datum: Datum, scales: StreamScales, xGet: (d: Datum) => number, yGet: (d: Datum) => number, size: number, symbolType: SymbolName, style: Style, pointId?: string): SymbolSceneNode | null;
|
|
41
|
-
export declare function buildRectNode(x: number, y: number, w: number, h: number, style: Style, datum:
|
|
42
|
-
export declare function buildHeatcellNode(x: number, y: number, w: number, h: number, fill: string, datum:
|
|
41
|
+
export declare function buildRectNode(x: number, y: number, w: number, h: number, style: Style, datum: SceneDatum, group?: string): RectSceneNode;
|
|
42
|
+
export declare function buildHeatcellNode(x: number, y: number, w: number, h: number, fill: string, datum: Datum, options?: {
|
|
43
43
|
value?: number;
|
|
44
44
|
showValues?: boolean;
|
|
45
45
|
valueFormat?: (v: number) => string;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Lazy-loaded wrapper for XYBrushOverlay.
|
|
3
|
+
*
|
|
4
|
+
* d3-brush pulls d3-selection + d3-drag + d3-transition (~14 KB gz). Most XY
|
|
5
|
+
* charts never enable brushing, so keep that graph out of the default cold path
|
|
6
|
+
* and only load it when `brush` / `onBrush` is actually used.
|
|
7
|
+
*
|
|
8
|
+
* Pattern mirrors `statisticalOverlaysLazy.ts`.
|
|
9
|
+
*/
|
|
10
|
+
import * as React from "react";
|
|
11
|
+
import type { XYBrushOverlayProps } from "./XYBrushOverlay";
|
|
12
|
+
/**
|
|
13
|
+
* Renders nothing until the brush module resolves, then mounts the real overlay.
|
|
14
|
+
* Acceptable: brush is interaction-driven; the first paint of the SVG layer can
|
|
15
|
+
* lag one tick without affecting chart layout or data marks.
|
|
16
|
+
*/
|
|
17
|
+
export declare function XYBrushOverlayLazy(props: XYBrushOverlayProps): React.JSX.Element | null;
|
|
@@ -24,8 +24,8 @@
|
|
|
24
24
|
* its identity changing, bump the pipeline config's `accessorRevision` to force
|
|
25
25
|
* re-derivation.
|
|
26
26
|
*/
|
|
27
|
-
export declare function accessorsEquivalent(a: string | ((
|
|
27
|
+
export declare function accessorsEquivalent<TDatum, TResult>(a: string | ((datum: TDatum, index?: number) => TResult) | undefined, b: string | ((datum: TDatum, index?: number) => TResult) | undefined): boolean;
|
|
28
28
|
export type CoercibleNumber = number | Date | string;
|
|
29
29
|
export declare function resolveAccessor<T extends Record<string, unknown>>(accessor: string | ((d: T) => CoercibleNumber) | undefined, fallback: string): (d: T) => number;
|
|
30
|
-
export declare function resolveRawAccessor<T extends Record<string, unknown
|
|
30
|
+
export declare function resolveRawAccessor<T extends Record<string, unknown>, TResult>(accessor: string | ((d: T) => TResult) | undefined, fallback: string): (d: T) => TResult;
|
|
31
31
|
export declare function resolveStringAccessor<T extends Record<string, unknown>>(accessor: string | ((d: T) => string) | undefined, fallback?: string): ((d: T) => string) | undefined;
|
|
@@ -9,14 +9,14 @@
|
|
|
9
9
|
* `StreamOrdinalFrame` (and any future frame with the same need)
|
|
10
10
|
* can share the same plumbing rather than re-implementing it.
|
|
11
11
|
*/
|
|
12
|
-
import type { Datum } from "../charts/shared/datumTypes";
|
|
12
|
+
import type { Datum, DatumValue } from "../charts/shared/datumTypes";
|
|
13
13
|
export interface ResolvedAnnotationAccessor {
|
|
14
14
|
/** String key the annotation context will read on each datum. */
|
|
15
15
|
key: string | undefined;
|
|
16
16
|
/** Accessor function when the user supplied one (synthetic key
|
|
17
17
|
* gets baked from this); `null` when the user supplied a string
|
|
18
18
|
* or nothing. */
|
|
19
|
-
fn: ((d: Datum) =>
|
|
19
|
+
fn: ((d: Datum) => DatumValue) | null;
|
|
20
20
|
}
|
|
21
21
|
/**
|
|
22
22
|
* Resolve an accessor pair to the (key, fn) shape the annotation
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { ReactNode } from "react";
|
|
2
|
+
import type { FrameGraphicsContext, FrameGraphicsProp } from "./types";
|
|
3
|
+
/** Resolve a static or scale-aware SVG graphics layer for a frame family. */
|
|
4
|
+
export declare function resolveFrameGraphics<S>(graphics: FrameGraphicsProp<S> | undefined, size: number[], margin: FrameGraphicsContext<S>["margin"], scales: S | null): ReactNode;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import type { Dispatch, KeyboardEvent, SetStateAction } from "react";
|
|
2
|
+
import type { HoverData } from "../realtime/types";
|
|
3
|
+
import type { SemanticClickBehavior, SemanticHoverBehavior } from "../charts/shared/semanticInteractions";
|
|
4
|
+
import type { PipelineStore } from "./PipelineStore";
|
|
5
|
+
import type { OrdinalPipelineStore } from "./OrdinalPipelineStore";
|
|
6
|
+
import type { GeoPipelineStore } from "./GeoPipelineStore";
|
|
7
|
+
import type { SceneNode } from "./types";
|
|
8
|
+
import type { OrdinalSceneNode } from "./ordinalTypes";
|
|
9
|
+
import type { GeoSceneNode } from "./geoTypes";
|
|
10
|
+
import { type NavPoint } from "./keyboardNav";
|
|
11
|
+
type RefValue<Value> = {
|
|
12
|
+
current: Value;
|
|
13
|
+
};
|
|
14
|
+
type SetHoverPoint = Dispatch<SetStateAction<HoverData | null>>;
|
|
15
|
+
type FocusedNavPoint = Pick<NavPoint, "shape" | "w" | "h" | "pathData">;
|
|
16
|
+
interface KeyboardInteractionParams<Store, Node = unknown> {
|
|
17
|
+
storeRef: RefValue<Store | null>;
|
|
18
|
+
hoverRef: RefValue<HoverData | null>;
|
|
19
|
+
hoveredNodeRef?: RefValue<Node | null>;
|
|
20
|
+
setHoverPoint: SetHoverPoint;
|
|
21
|
+
customHoverBehavior: SemanticHoverBehavior<HoverData>;
|
|
22
|
+
customClickBehavior: SemanticClickBehavior<HoverData>;
|
|
23
|
+
scheduleRender: () => void;
|
|
24
|
+
}
|
|
25
|
+
export declare function useXYKeyboardNavigation(params: KeyboardInteractionParams<PipelineStore, SceneNode>): {
|
|
26
|
+
kbFocusIndexRef: import("react").RefObject<number>;
|
|
27
|
+
focusedNavPointRef: import("react").RefObject<FocusedNavPoint | null>;
|
|
28
|
+
onKeyDown: (event: KeyboardEvent) => void;
|
|
29
|
+
};
|
|
30
|
+
interface OrdinalKeyboardParams extends KeyboardInteractionParams<OrdinalPipelineStore, OrdinalSceneNode> {
|
|
31
|
+
chartType: string;
|
|
32
|
+
oAccessor: unknown;
|
|
33
|
+
rAccessor: unknown;
|
|
34
|
+
}
|
|
35
|
+
export declare function useOrdinalKeyboardNavigation({ chartType, oAccessor, rAccessor, ...params }: OrdinalKeyboardParams): {
|
|
36
|
+
kbFocusIndexRef: import("react").RefObject<number>;
|
|
37
|
+
focusedNavPointRef: import("react").RefObject<FocusedNavPoint | null>;
|
|
38
|
+
onKeyDown: (event: KeyboardEvent) => void;
|
|
39
|
+
};
|
|
40
|
+
export declare function useGeoKeyboardNavigation({ storeRef, hoverRef, hoveredNodeRef, setHoverPoint, customHoverBehavior, customClickBehavior, scheduleRender }: KeyboardInteractionParams<GeoPipelineStore, GeoSceneNode>): {
|
|
41
|
+
kbFocusIndexRef: import("react").RefObject<number>;
|
|
42
|
+
focusedNavPointRef: import("react").RefObject<FocusedNavPoint | null>;
|
|
43
|
+
onKeyDown: (event: KeyboardEvent) => void;
|
|
44
|
+
};
|
|
45
|
+
export {};
|
|
@@ -9,8 +9,8 @@ import type { Style } from "./types";
|
|
|
9
9
|
import type { Datum } from "../charts/shared/datumTypes";
|
|
10
10
|
export declare function resolveProjection(prop: ProjectionProp | undefined): GeoProjection;
|
|
11
11
|
export declare function makeGeoNumericAccessor(acc: string | ((d: Datum) => number) | undefined, fallback: string): (d: Datum) => number;
|
|
12
|
-
export declare function makeLineDataAccessor(acc: string | ((d: Datum) =>
|
|
13
|
-
export declare function resolveGeoStyle(styleProp: Style | ((d:
|
|
12
|
+
export declare function makeLineDataAccessor(acc: string | ((d: Datum) => Datum[]) | undefined): (d: Datum) => Datum[];
|
|
13
|
+
export declare function resolveGeoStyle<TDatum extends object>(styleProp: Style | ((d: TDatum) => Style) | undefined, datum: TDatum, defaults: Style): Style;
|
|
14
14
|
export declare function themedDefaultArea(config: GeoPipelineConfig): Style;
|
|
15
15
|
export declare function themedDefaultPoint(config: GeoPipelineConfig): Style & {
|
|
16
16
|
r?: number;
|
|
@@ -43,4 +43,4 @@ export declare function buildOffsetGeoPath(screenPath: [number, number][], strok
|
|
|
43
43
|
* Bidirectional pairs (A->B and B->A) naturally separate because their
|
|
44
44
|
* left-hand normals point to opposite sides.
|
|
45
45
|
*/
|
|
46
|
-
export declare function buildOffsetPath(start: [number, number], end: [number, number], _flow:
|
|
46
|
+
export declare function buildOffsetPath(start: [number, number], end: [number, number], _flow: Datum, _allFlows: Datum[], strokeWidth: number): [number, number][];
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { type ChangeSet, type Invalidation, type UpdateResult } from "./pipelineUpdateContract";
|
|
2
|
+
/** Whether a config patch must re-derive its retained Geo data resources. */
|
|
3
|
+
export type GeoRetainedDataEffect = "preserve" | "rebuild";
|
|
4
|
+
export interface GeoConfigPatchDependency {
|
|
5
|
+
readonly retainedData: GeoRetainedDataEffect;
|
|
6
|
+
readonly invalidations: readonly Invalidation[];
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Geo's key-level config-patch dependency table. `windowSize` is a retained
|
|
10
|
+
* resource rebuild: its `data` revision is added only when an active stream
|
|
11
|
+
* actually resizes, so a bounded config-only patch is never reported as an
|
|
12
|
+
* ingest.
|
|
13
|
+
*/
|
|
14
|
+
export declare const GEO_CONFIG_PATCH_DEPENDENCIES: Readonly<Record<string, GeoConfigPatchDependency>>;
|
|
15
|
+
export interface GeoConfigPatchClassification {
|
|
16
|
+
readonly retainedData: GeoRetainedDataEffect;
|
|
17
|
+
readonly invalidations: ReadonlySet<Invalidation>;
|
|
18
|
+
}
|
|
19
|
+
/** Union the declared effects for a patch after its effective keys are known. */
|
|
20
|
+
export declare function classifyGeoConfigPatch(keys: readonly string[]): GeoConfigPatchClassification;
|
|
21
|
+
type DataChangeKind = Extract<ChangeSet["kind"], "ingest" | "replace" | "remove" | "update" | "clear">;
|
|
22
|
+
/** Result bookkeeping and explicit config-patch dependency policy for Geo. */
|
|
23
|
+
export declare class GeoPipelineUpdateResults {
|
|
24
|
+
private tracker;
|
|
25
|
+
get last(): UpdateResult;
|
|
26
|
+
subscribe(listener: () => void): () => void;
|
|
27
|
+
recordData(kind: DataChangeKind, count?: number): UpdateResult;
|
|
28
|
+
recordNoop(kind: DataChangeKind | "restyle"): UpdateResult;
|
|
29
|
+
recordRestyle(hasCustomRestyle: boolean): UpdateResult;
|
|
30
|
+
recordConfig(keys: readonly string[], options?: {
|
|
31
|
+
retainedDataChanged?: boolean;
|
|
32
|
+
}): UpdateResult;
|
|
33
|
+
}
|
|
34
|
+
export {};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { GeoPath, GeoPermissibleObjects, GeoProjection } from "d3-geo";
|
|
2
|
+
import type { GeoPipelineConfig, GeoSceneNode } from "./geoTypes";
|
|
3
|
+
import type { StreamLayout } from "./types";
|
|
4
|
+
import type { Datum } from "../charts/shared/datumTypes";
|
|
5
|
+
interface GeoSceneBuildInput {
|
|
6
|
+
config: GeoPipelineConfig;
|
|
7
|
+
projection: GeoProjection;
|
|
8
|
+
path: GeoPath<void, GeoPermissibleObjects>;
|
|
9
|
+
areas: GeoJSON.Feature[];
|
|
10
|
+
points: Datum[];
|
|
11
|
+
lines: Datum[];
|
|
12
|
+
layout: StreamLayout;
|
|
13
|
+
}
|
|
14
|
+
/** Builds the built-in geo scene independently of store-owned custom layout state. */
|
|
15
|
+
export declare function buildBuiltInGeoScene({ config, projection, path, areas, points, lines, layout }: GeoSceneBuildInput): GeoSceneNode[];
|
|
16
|
+
export {};
|