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
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "semiotic",
|
|
3
|
-
"version": "3.8.
|
|
3
|
+
"version": "3.8.2",
|
|
4
4
|
"mcpName": "io.github.nteract/semiotic",
|
|
5
5
|
"description": "Verified generative visualization for React and agents, with deterministic chart validation, repair, rendering evidence, and MCP.",
|
|
6
6
|
"main": "dist/semiotic.min.js",
|
|
@@ -114,6 +114,12 @@
|
|
|
114
114
|
"require": "./dist/geo.min.js",
|
|
115
115
|
"default": "./dist/geo.module.min.js"
|
|
116
116
|
},
|
|
117
|
+
"./rough": {
|
|
118
|
+
"types": "./dist/semiotic-rough.d.ts",
|
|
119
|
+
"import": "./dist/rough.module.min.js",
|
|
120
|
+
"require": "./dist/rough.min.js",
|
|
121
|
+
"default": "./dist/rough.module.min.js"
|
|
122
|
+
},
|
|
117
123
|
"./controls": {
|
|
118
124
|
"types": "./dist/semiotic-controls.d.ts",
|
|
119
125
|
"import": "./dist/controls.module.min.js",
|
|
@@ -191,8 +197,6 @@
|
|
|
191
197
|
},
|
|
192
198
|
"files": [
|
|
193
199
|
"dist/*.min.js",
|
|
194
|
-
"dist/*-semiotic-*.js",
|
|
195
|
-
"dist/*-statisticalOverlays-*.js",
|
|
196
200
|
"dist/**/*.d.ts",
|
|
197
201
|
"dist/forceLayoutWorker.js",
|
|
198
202
|
"dist/physicsWorker.js",
|
|
@@ -240,6 +244,9 @@
|
|
|
240
244
|
"check:browser-baseline": "node scripts/browser-baseline.mjs --check",
|
|
241
245
|
"print:browser-baseline": "node scripts/browser-baseline.mjs --print",
|
|
242
246
|
"test:browser-baseline": "node --test scripts/browser-baseline.test.mjs",
|
|
247
|
+
"baseline:stream-file-sizes": "node scripts/stream-file-size-ratchet.mjs --write",
|
|
248
|
+
"report:stream-file-sizes": "node scripts/stream-file-size-ratchet.mjs",
|
|
249
|
+
"test:stream-file-size-ratchet": "node --test scripts/stream-file-size-ratchet.test.mjs",
|
|
243
250
|
"serve-examples": "npm run dist && vite --config vite.integration.config.mjs --host 127.0.0.1 --port 1234",
|
|
244
251
|
"serve-examples:ci": "vite --config vite.integration.config.mjs --host 127.0.0.1 --port 1234",
|
|
245
252
|
"dist": "node scripts/build.mjs",
|
|
@@ -263,7 +270,8 @@
|
|
|
263
270
|
"generate:blog-og-cards": "node scripts/generate-blog-og-cards.mjs",
|
|
264
271
|
"generate:example-og-cards": "node scripts/generate-example-og-cards.mjs",
|
|
265
272
|
"generate:blog-rss": "node scripts/generate-blog-rss.mjs",
|
|
266
|
-
"website:build": "npm run check:ai-instructions && npm run dist:prod && npm run docs:api:json && npm run docs:llms && npm run generate:ssr-gallery && npm run generate:demo-gifs && npm run check:blog-entries && npm run generate:blog-og-cards && npm run generate:example-og-cards && npm run generate:blog-rss && vite build --config vite.docs.config.mjs && node scripts/prerender.mjs && npm run check:docs-routes",
|
|
273
|
+
"website:build": "npm run check:router-alignment && npm run check:ai-instructions && npm run dist:prod && npm run docs:api:json && npm run docs:llms && npm run generate:ssr-gallery && npm run generate:demo-gifs && npm run check:blog-entries && npm run generate:blog-og-cards && npm run generate:example-og-cards && npm run generate:blog-rss && vite build --config vite.docs.config.mjs && node scripts/prerender.mjs && npm run check:docs-routes",
|
|
274
|
+
"check:website-build": "npm run website:build",
|
|
267
275
|
"build:mcp": "node scripts/build-mcp.mjs",
|
|
268
276
|
"docs:api": "typedoc",
|
|
269
277
|
"docs:api:json": "typedoc --json docs/public/api/api.json && node scripts/generate-component-descriptions.mjs",
|
|
@@ -272,7 +280,8 @@
|
|
|
272
280
|
"typescript:tests": "node scripts/check-test-types.mjs",
|
|
273
281
|
"typescript:tests:raw": "tsc -p tsconfig.tests.json --noEmit --pretty false",
|
|
274
282
|
"typescript:mcp": "tsc -p tsconfig.mcp.json --noEmit",
|
|
275
|
-
"size": "size-limit",
|
|
283
|
+
"size": "size-limit && node scripts/check-multi-import-size.mjs",
|
|
284
|
+
"check:multi-import-size": "node scripts/check-multi-import-size.mjs",
|
|
276
285
|
"check:pack": "node scripts/smoke-pack.mjs",
|
|
277
286
|
"check:api-surface": "node scripts/check-api-surface.mjs",
|
|
278
287
|
"docs:api-surface": "node scripts/generate-api-surface.mjs",
|
|
@@ -298,11 +307,15 @@
|
|
|
298
307
|
"docs:capabilities": "node scripts/generate-capabilities-md.mjs && node scripts/generate-capabilities-json.mjs",
|
|
299
308
|
"check:chart-specs": "npx tsx scripts/check-chart-specs.ts",
|
|
300
309
|
"check:cloud-run-manifest": "node scripts/check-cloud-run-manifest.mjs",
|
|
310
|
+
"check:cloud-run-nightly": "node scripts/check-cloud-run-nightly.mjs",
|
|
301
311
|
"check:cloud-run-lock": "node scripts/check-cloud-run-manifest.mjs --require-lockfile",
|
|
312
|
+
"check:cloud-run-release": "node scripts/check-cloud-run-manifest.mjs --require-lockfile --require-root-version",
|
|
302
313
|
"check:ai-schema": "node scripts/check-ai-schema-valid.mjs",
|
|
303
314
|
"docs:chart-specs:schema": "npx tsx scripts/regenerate-schema.ts",
|
|
304
315
|
"check:test-quality": "node scripts/check-test-quality-gate.mjs",
|
|
305
316
|
"test:cloud-run-manifest": "node --test scripts/cloud-run-manifest.test.mjs",
|
|
317
|
+
"test:cloud-run-nightly": "node --test scripts/cloud-run-nightly-manifest.test.mjs",
|
|
318
|
+
"test:smoke-hosted-mcp": "node --test scripts/smoke-hosted-mcp.test.mjs",
|
|
306
319
|
"check:file-size": "node scripts/check-file-size.mjs",
|
|
307
320
|
"check:jsdoc-coverage": "node scripts/check-jsdoc-coverage.mjs",
|
|
308
321
|
"check:ai-examples-coverage": "node scripts/check-ai-examples-coverage.mjs",
|
|
@@ -317,12 +330,14 @@
|
|
|
317
330
|
"check:blog-entries": "node scripts/check-blog-entry-sync.mjs",
|
|
318
331
|
"check:bundle-sizes": "node scripts/sync-bundle-sizes.mjs --check",
|
|
319
332
|
"check:cold-consumer": "node scripts/measure-cold-consumer.mjs --check",
|
|
333
|
+
"check:fast": "npm run check:router-alignment && npm run lint && npm run check:file-size && npm run check:test-quality && npm run check:ai-contracts && npm run check:ai-instructions && npm run dist:prod && npm run check:bundle-sizes && npm run check:cold-consumer && npm run size",
|
|
320
334
|
"docs:bundle-sizes": "node scripts/sync-bundle-sizes.mjs",
|
|
321
335
|
"docs:cold-consumer": "node scripts/measure-cold-consumer.mjs --write",
|
|
322
336
|
"docs:readme-dashboard": "npx tsx scripts/generate-readme-dashboard.tsx",
|
|
323
337
|
"check:readme-dashboard": "npx tsx scripts/generate-readme-dashboard.tsx --check",
|
|
324
|
-
"release:check": "npm run lint && npm run check:file-size && npm run typescript && npm run typescript:tests && npm run typescript:mcp && npm run build:mcp && npm run test && npm run check:chart-specs && npm run check:ai-schema && npm run check:capabilities && npm run check:visual-baseline-capabilities && npm run check:capability-coverage && npm run check:docs-coverage && npm run check:docs-example-integrity && npm run check:docs-prop-tables && npm run check:docs-playground-controls && npm run check:llms && npm run check:blog-entries && npm run check:claude-md-coverage && npm run check:context7 && npm run check:mcp-registry && npm run check:surface && npm run check:ai-surface && npm run check:agent-skill && npm run check:ai-contracts && npm run check:ai-instructions && npm run check:ssr && npm run check:test-quality && npm run check:jsdoc-coverage && npm run check:ai-examples-coverage && npm run
|
|
325
|
-
"prepublishOnly": "npm run lint && npm run check:file-size && npm run typescript && npm run typescript:tests && npm run typescript:mcp && npm run build:mcp && npm run test && npm run check:chart-specs && npm run check:ai-schema && npm run check:capabilities && npm run check:visual-baseline-capabilities && npm run check:capability-coverage && npm run check:docs-coverage && npm run check:docs-example-integrity && npm run check:docs-prop-tables && npm run check:docs-playground-controls && npm run check:llms && npm run check:blog-entries && npm run check:claude-md-coverage && npm run check:context7 && npm run check:mcp-registry && npm run check:surface && npm run check:ai-surface && npm run check:agent-skill && npm run check:ai-contracts && npm run check:ai-instructions && npm run check:ssr && npm run check:test-quality && npm run check:jsdoc-coverage && npm run check:ai-examples-coverage && rm -rf dist && npm run
|
|
338
|
+
"release:check": "npm run lint && npm run check:file-size && npm run typescript && npm run typescript:tests && npm run typescript:mcp && npm run build:mcp && npm run test && npm run check:chart-specs && npm run check:ai-schema && npm run check:capabilities && npm run check:visual-baseline-capabilities && npm run check:capability-coverage && npm run check:docs-coverage && npm run check:docs-example-integrity && npm run check:docs-prop-tables && npm run check:docs-playground-controls && npm run check:llms && npm run check:blog-entries && npm run check:claude-md-coverage && npm run check:context7 && npm run check:mcp-registry && npm run check:surface && npm run check:ai-surface && npm run check:agent-skill && npm run check:ai-contracts && npm run check:ai-instructions && npm run check:ssr && npm run check:test-quality && npm run check:jsdoc-coverage && npm run check:ai-examples-coverage && npm run check:website-build && npm run check:api-surface && npm run check:readme-dashboard && npm run check:bundle-sizes && npm run check:cold-consumer && npm run size && npm run check:pack && npm pack --dry-run",
|
|
339
|
+
"prepublishOnly": "npm run lint && npm run check:file-size && npm run typescript && npm run typescript:tests && npm run typescript:mcp && npm run build:mcp && npm run test && npm run check:chart-specs && npm run check:ai-schema && npm run check:capabilities && npm run check:visual-baseline-capabilities && npm run check:capability-coverage && npm run check:docs-coverage && npm run check:docs-example-integrity && npm run check:docs-prop-tables && npm run check:docs-playground-controls && npm run check:llms && npm run check:blog-entries && npm run check:claude-md-coverage && npm run check:context7 && npm run check:mcp-registry && npm run check:surface && npm run check:ai-surface && npm run check:agent-skill && npm run check:ai-contracts && npm run check:ai-instructions && npm run check:ssr && npm run check:test-quality && npm run check:jsdoc-coverage && npm run check:ai-examples-coverage && rm -rf dist && npm run check:website-build && npm run check:api-surface && npm run check:readme-dashboard && npm run check:bundle-sizes && npm run size",
|
|
340
|
+
"check:router-alignment": "node scripts/check-router-alignment.mjs"
|
|
326
341
|
},
|
|
327
342
|
"repository": {
|
|
328
343
|
"type": "git",
|
|
@@ -439,7 +454,7 @@
|
|
|
439
454
|
"@vitejs/plugin-react": "^6.0.3",
|
|
440
455
|
"@vitest/coverage-v8": "^4.1.10",
|
|
441
456
|
"@vitest/ui": "^4.1.10",
|
|
442
|
-
"ajv": "^8.
|
|
457
|
+
"ajv": "^8.20.0",
|
|
443
458
|
"d3-dsv": "^3.0.1",
|
|
444
459
|
"d3-flextree-v4": "^1.0.1",
|
|
445
460
|
"esbuild": "0.28.1",
|
|
@@ -457,11 +472,12 @@
|
|
|
457
472
|
"react-dom": "^19.2.7",
|
|
458
473
|
"react-router": "^7.18.1",
|
|
459
474
|
"react-router-dom": "^7.18.1",
|
|
475
|
+
"roughjs": "^4.6.6",
|
|
460
476
|
"seedrandom": "^3.0.5",
|
|
461
477
|
"size-limit": "^12.1.0",
|
|
462
478
|
"terser": "^5.49.0",
|
|
463
479
|
"tsup": "^8.5.1",
|
|
464
|
-
"tsx": "^4.23.
|
|
480
|
+
"tsx": "^4.23.1",
|
|
465
481
|
"typedoc": "^0.28.20",
|
|
466
482
|
"typescript": "~6.0.3",
|
|
467
483
|
"typescript-eslint": "^8.63.0",
|
|
@@ -474,6 +490,7 @@
|
|
|
474
490
|
"matter-js": "^0.20.0",
|
|
475
491
|
"react": "^18.1.0 || ^19.0.0",
|
|
476
492
|
"react-dom": "^18.1.0 || ^19.0.0",
|
|
493
|
+
"roughjs": "^4.6.6",
|
|
477
494
|
"world-atlas": "^2.0.2"
|
|
478
495
|
},
|
|
479
496
|
"peerDependenciesMeta": {
|
|
@@ -483,6 +500,9 @@
|
|
|
483
500
|
"matter-js": {
|
|
484
501
|
"optional": true
|
|
485
502
|
},
|
|
503
|
+
"roughjs": {
|
|
504
|
+
"optional": true
|
|
505
|
+
},
|
|
486
506
|
"world-atlas": {
|
|
487
507
|
"optional": true
|
|
488
508
|
}
|
|
@@ -505,7 +525,6 @@
|
|
|
505
525
|
"d3-selection": "^3.0.0",
|
|
506
526
|
"d3-shape": "^3.2.0",
|
|
507
527
|
"d3-zoom": "^3.0.0",
|
|
508
|
-
"regression": "^2.0.1",
|
|
509
528
|
"topojson-client": "^3.1.0"
|
|
510
529
|
},
|
|
511
530
|
"browserslist": {
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import{getMax as t,getMinMax as n}from"./semiotic-ai-chunk-OG7BQUUW.module.min.js";function o(t,n=.5){const o=/^#?([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})$/i.exec(t);if(!o)return t;const e=Math.round(parseInt(o[1],16)*(1-n)),r=Math.round(parseInt(o[2],16)*(1-n)),a=Math.round(parseInt(o[3],16)*(1-n));return`#${e.toString(16).padStart(2,"0")}${r.toString(16).padStart(2,"0")}${a.toString(16).padStart(2,"0")}`}function e(t,n=.5){const o=/^#?([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})$/i.exec(t);if(!o)return t;const e=Math.round(parseInt(o[1],16)+(255-parseInt(o[1],16))*n),r=Math.round(parseInt(o[2],16)+(255-parseInt(o[2],16))*n),a=Math.round(parseInt(o[3],16)+(255-parseInt(o[3],16))*n);return`#${e.toString(16).padStart(2,"0")}${r.toString(16).padStart(2,"0")}${a.toString(16).padStart(2,"0")}`}var r="__forecastSegment",a="__forecastOpacity";function s(t,o,e,r){const s=o.uncertaintyOpacity,i=o.confidenceAccessor;if(!s&&!i)return;const l="object"==typeof s?s:{},c=l.min??.15,f=l.max??1;if(i){const n="function"==typeof i?i:t=>t[i];for(const o of t){const t=n(o);null!=t&&Number.isFinite(t)&&(o[a]=c+Math.max(0,Math.min(1,t))*(f-c))}return}const p=t.map(t=>{const n=e(t),o=r(t);return null!=n&&null!=o&&Number.isFinite(n)&&Number.isFinite(o)?Math.abs(n-o):NaN}),u=p.filter(t=>Number.isFinite(t));if(0===u.length)return;const[h,y]=n(u),d=y-h;t.forEach((t,n)=>{const o=p[n];Number.isFinite(o)&&(t[a]=f-(d>0?(o-h)/d:0)*(f-c))})}function i(t,n){return"function"==typeof n?n(t):!!t[n]}function l(t){return[{type:"anomaly-band",threshold:t.threshold??2,showBand:!1!==t.showBand,fill:t.bandColor||"#6366f1",fillOpacity:t.bandOpacity??.1,anomalyColor:t.anomalyColor||"#ef4444",anomalyRadius:t.anomalyRadius??6,label:t.label}]}function c(n,o,e,a,l){return(c=a).isTraining||c.isForecast||c.isAnomaly||c.upperBounds||c.lowerBounds?function(t,n,o,e,a){const{isTraining:l,isForecast:c,isAnomaly:f,upperBounds:p,lowerBounds:u,color:h="#6366f1",bandOpacity:y=.15,anomalyColor:d="#ef4444",anomalyRadius:m=6,label:b}=e,g=t.map(t=>{let n="observed";return c&&i(t,c)?n="forecast":l&&i(t,l)&&(n="training"),{...t,[r]:n}}),_=e._groupBy,k=[];if(_){const t=new Map;for(const n of g){const o=n[_]??"__default";t.has(o)||t.set(o,[]),t.get(o).push(n)}const n=[];for(const[,o]of t)for(let t=0;o.length-1>t;t++)o[t][r]!==o[t+1][r]&&(n.push({...o[t+1],[r]:o[t][r]}),n.push({...o[t],[r]:o[t+1][r]}));k.push(...g,...n)}else for(let t=0;g.length>t;t++)k.push(g[t]),g.length-1>t&&g[t][r]!==g[t+1][r]&&(k.push({...g[t+1],[r]:g[t][r]}),k.push({...g[t],[r]:g[t+1][r]}));if(e.trainUnderline){const t=[];for(const n of k)"training"===n[r]&&t.push({...n,[r]:"training-base"});k.unshift(...t)}const O=[];if(p&&u){const t="string"==typeof p?p:"__envUpper",n="string"==typeof u?u:"__envLower";if("function"==typeof p||"function"==typeof u)for(const o of k)"function"==typeof p&&(o[t]=p(o)),"function"==typeof u&&(o[n]=u(o));O.push({type:"envelope",upperAccessor:t,lowerAccessor:n,fill:h,fillOpacity:y,label:b})}if(e.uncertaintyOpacity||e.confidenceAccessor){const t=p?"function"==typeof p?p:t=>t[p]:()=>{},n=u?"function"==typeof u?u:t=>t[u]:()=>{};s(k.filter(t=>"forecast"===t[r]),e,t,n)}if(f){const t=e.anomalyStyle,n={type:"highlight",filter:t=>i(t,f)};t?(n.style=t,n.r=m):"function"==typeof d?(n.style=t=>{const n=d(t);return{stroke:n,strokeWidth:1.5,fill:n,fillOpacity:.7}},n.r=m):(n.color=d,n.r=m,n.style={stroke:d,strokeWidth:1.5,fill:d,fillOpacity:.7}),O.push(n)}return a&&O.push({type:"anomaly-band",threshold:a.threshold??2,showBand:!1!==a.showBand,fill:a.bandColor||"#6366f1",fillOpacity:a.bandOpacity??.1,anomalyColor:a.anomalyColor||"#ef4444",anomalyRadius:a.anomalyRadius??6,label:a.label}),{processedData:k,annotations:O}}(n,0,0,a,l):function(n,o,e,a,i){const{trainEnd:l,steps:c=10,confidence:f=.95,color:p="#6366f1",bandOpacity:u=.15,label:h}=a;if(null==l)return{processedData:n,annotations:[]};const y=[],d=[];for(const t of n)t[o]>l?d.push({...t,[r]:"observed"}):y.push({...t,[r]:"training"});const m=y.map(t=>[t[o],t[e]]).filter(t=>null!=t[0]&&null!=t[1]&&isFinite(t[0])&&isFinite(t[1])).sort((t,n)=>t[0]-n[0]),b=[],g=[];if(m.length>=3){const i=m.length;let l=0,y=0,d=0,_=0;for(const[t,n]of m)l+=t,y+=n,d+=t*t,_+=t*n;const k=i*d-l*l;if(Math.abs(k)>1e-12){const d=(i*_-l*y)/k,O=(y-d*l)/i,w=t=>O+d*t,S=m.map(([t,n])=>n-w(t)).reduce((t,n)=>t+n*n,0),M=Math.sqrt(S/Math.max(i-2,1)),B=m.reduce((t,n)=>t+n[0],0)/i,F=m.reduce((t,n)=>t+(n[0]-B)**2,0),v=.99>f?.95>f?.9>f?1:1.645:1.96:2.576,C=n.map(t=>t[o]).filter(t=>null!=t&&isFinite(t)),D=t(C),I=m.length>1?(m[i-1][0]-m[0][0])/(i-1):1;for(let t=1;c>=t;t++){const n=D+t*I,a=w(n),s=M*Math.sqrt(1+1/i+(F>0?(n-B)**2/F:0))*v;g.push({[o]:n,[e]:a,[r]:"forecast",__forecastUpper:a+s,__forecastLower:a-s})}s(g,a,t=>t.__forecastUpper,t=>t.__forecastLower),b.push({type:"envelope",upperAccessor:"__forecastUpper",lowerAccessor:"__forecastLower",fill:p,fillOpacity:u,label:h})}}b.push({type:"x-threshold",x:l,color:"#94a3b8",strokeWidth:1,strokeDasharray:"4,2",label:"Train / Forecast"}),i&&b.push({type:"anomaly-band",threshold:i.threshold??2,showBand:!1!==i.showBand,fill:i.bandColor||"#6366f1",fillOpacity:i.bandOpacity??.1,anomalyColor:i.anomalyColor||"#ef4444",anomalyRadius:i.anomalyRadius??6,label:i.label});const _=[];if(_.push(...y),y.length>0&&d.length>0&&_.push({...y[y.length-1],[r]:"observed"}),_.push(...d),g.length>0){const t=d.length>0?d[d.length-1]:y[y.length-1];t&&_.push({...t,[r]:"forecast"}),_.push(...g)}return{processedData:_,annotations:b}}(n,o,e,a,l);var c}function f(t,n){const s=n.trainDasharray??"8,4",i=n.forecastDasharray??"4,4",l=n.color||"#6366f1",c=n.trainOpacity,f=n.forecastOpacity,p=n.trainStroke,u=n.trainLinecap,h=n.trainUnderline;return n=>{const y=t(n),d=n[r];if("training"===d){let t=y.stroke;return"darken"===p?t=o(y.stroke||"#666",.5):p&&(t=p),{...y,stroke:t,strokeDasharray:s,...u&&{strokeLinecap:u},...null!=c&&{strokeOpacity:c}}}if("training-base"===d){let t=y.stroke||"#666";return"lighten"===h&&(t=e(t,.4)),{...y,stroke:t,strokeDasharray:void 0}}if("forecast"===d){const t=n[a],o=null!=t?t:f;return{...y,stroke:l,strokeDasharray:i,...null!=o&&{strokeOpacity:o}}}return y}}export{a as FORECAST_OPACITY_FIELD,r as SEGMENT_FIELD,l as buildAnomalyAnnotations,c as buildForecast,f as createSegmentLineStyle,o as darkenColor,e as lightenColor,s as stampForecastOpacity};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
function t(t){let n=1/0,r=-1/0;for(const a of t)n>a&&(n=a),a>r&&(r=a);return[n,r]}function n(t,n=1/0){let r=n;for(const n of t)r>n&&(r=n);return r}function r(t,n=-1/0){let r=n;for(const n of t)n>r&&(r=n);return r}function a(t,n=.5){const r=/^#?([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})$/i.exec(t);if(!r)return t;const a=Math.round(parseInt(r[1],16)*(1-n)),o=Math.round(parseInt(r[2],16)*(1-n)),e=Math.round(parseInt(r[3],16)*(1-n));return`#${a.toString(16).padStart(2,"0")}${o.toString(16).padStart(2,"0")}${e.toString(16).padStart(2,"0")}`}function o(t,n=.5){const r=/^#?([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})$/i.exec(t);if(!r)return t;const a=Math.round(parseInt(r[1],16)+(255-parseInt(r[1],16))*n),o=Math.round(parseInt(r[2],16)+(255-parseInt(r[2],16))*n),e=Math.round(parseInt(r[3],16)+(255-parseInt(r[3],16))*n);return`#${a.toString(16).padStart(2,"0")}${o.toString(16).padStart(2,"0")}${e.toString(16).padStart(2,"0")}`}export{t as getMinMax,n as getMin,r as getMax,a as darkenColor,o as lightenColor};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import{darkenColor as t,getMax as o,getMinMax as n,lightenColor as e}from"./semiotic-chunk-3FSVZ46U.module.min.js";var r="__forecastSegment",a="__forecastOpacity";function s(t,o,e,r){const s=o.uncertaintyOpacity,i=o.confidenceAccessor;if(!s&&!i)return;const l="object"==typeof s?s:{},c=l.min??.15,f=l.max??1;if(i){const o="function"==typeof i?i:t=>t[i];for(const n of t){const t=o(n);null!=t&&Number.isFinite(t)&&(n[a]=c+Math.max(0,Math.min(1,t))*(f-c))}return}const u=t.map(t=>{const o=e(t),n=r(t);return null!=o&&null!=n&&Number.isFinite(o)&&Number.isFinite(n)?Math.abs(o-n):NaN}),p=u.filter(t=>Number.isFinite(t));if(0===p.length)return;const[h,y]=n(p),d=y-h;t.forEach((t,o)=>{const n=u[o];Number.isFinite(n)&&(t[a]=f-(d>0?(n-h)/d:0)*(f-c))})}function i(t,o){return"function"==typeof o?o(t):!!t[o]}function l(t){return[{type:"anomaly-band",threshold:t.threshold??2,showBand:!1!==t.showBand,fill:t.bandColor||"#6366f1",fillOpacity:t.bandOpacity??.1,anomalyColor:t.anomalyColor||"#ef4444",anomalyRadius:t.anomalyRadius??6,label:t.label}]}function c(t,n,e,a,l){return(c=a).isTraining||c.isForecast||c.isAnomaly||c.upperBounds||c.lowerBounds?function(t,o,n,e,a){const{isTraining:l,isForecast:c,isAnomaly:f,upperBounds:u,lowerBounds:p,color:h="#6366f1",bandOpacity:y=.15,anomalyColor:d="#ef4444",anomalyRadius:m=6,label:b}=e,g=t.map(t=>{let o="observed";return c&&i(t,c)?o="forecast":l&&i(t,l)&&(o="training"),{...t,[r]:o}}),_=e._groupBy,k=[];if(_){const t=new Map;for(const o of g){const n=o[_]??"__default";t.has(n)||t.set(n,[]),t.get(n).push(o)}const o=[];for(const[,n]of t)for(let t=0;n.length-1>t;t++)n[t][r]!==n[t+1][r]&&(o.push({...n[t+1],[r]:n[t][r]}),o.push({...n[t],[r]:n[t+1][r]}));k.push(...g,...o)}else for(let t=0;g.length>t;t++)k.push(g[t]),g.length-1>t&&g[t][r]!==g[t+1][r]&&(k.push({...g[t+1],[r]:g[t][r]}),k.push({...g[t],[r]:g[t+1][r]}));if(e.trainUnderline){const t=[];for(const o of k)"training"===o[r]&&t.push({...o,[r]:"training-base"});k.unshift(...t)}const O=[];if(u&&p){const t="string"==typeof u?u:"__envUpper",o="string"==typeof p?p:"__envLower";if("function"==typeof u||"function"==typeof p)for(const n of k)"function"==typeof u&&(n[t]=u(n)),"function"==typeof p&&(n[o]=p(n));O.push({type:"envelope",upperAccessor:t,lowerAccessor:o,fill:h,fillOpacity:y,label:b})}if(e.uncertaintyOpacity||e.confidenceAccessor){const t=u?"function"==typeof u?u:t=>t[u]:()=>{},o=p?"function"==typeof p?p:t=>t[p]:()=>{};s(k.filter(t=>"forecast"===t[r]),e,t,o)}if(f){const t=e.anomalyStyle,o={type:"highlight",filter:t=>i(t,f)};t?(o.style=t,o.r=m):"function"==typeof d?(o.style=t=>{const o=d(t);return{stroke:o,strokeWidth:1.5,fill:o,fillOpacity:.7}},o.r=m):(o.color=d,o.r=m,o.style={stroke:d,strokeWidth:1.5,fill:d,fillOpacity:.7}),O.push(o)}return a&&O.push({type:"anomaly-band",threshold:a.threshold??2,showBand:!1!==a.showBand,fill:a.bandColor||"#6366f1",fillOpacity:a.bandOpacity??.1,anomalyColor:a.anomalyColor||"#ef4444",anomalyRadius:a.anomalyRadius??6,label:a.label}),{processedData:k,annotations:O}}(t,0,0,a,l):function(t,n,e,a,i){const{trainEnd:l,steps:c=10,confidence:f=.95,color:u="#6366f1",bandOpacity:p=.15,label:h}=a;if(null==l)return{processedData:t,annotations:[]};const y=[],d=[];for(const o of t)o[n]>l?d.push({...o,[r]:"observed"}):y.push({...o,[r]:"training"});const m=y.map(t=>[t[n],t[e]]).filter(t=>null!=t[0]&&null!=t[1]&&isFinite(t[0])&&isFinite(t[1])).sort((t,o)=>t[0]-o[0]),b=[],g=[];if(m.length>=3){const i=m.length;let l=0,y=0,d=0,_=0;for(const[t,o]of m)l+=t,y+=o,d+=t*t,_+=t*o;const k=i*d-l*l;if(Math.abs(k)>1e-12){const d=(i*_-l*y)/k,O=(y-d*l)/i,w=t=>O+d*t,F=m.map(([t,o])=>o-w(t)).reduce((t,o)=>t+o*o,0),B=Math.sqrt(F/Math.max(i-2,1)),v=m.reduce((t,o)=>t+o[0],0)/i,C=m.reduce((t,o)=>t+(o[0]-v)**2,0),D=.99>f?.95>f?.9>f?1:1.645:1.96:2.576,A=t.map(t=>t[n]).filter(t=>null!=t&&isFinite(t)),M=o(A),N=m.length>1?(m[i-1][0]-m[0][0])/(i-1):1;for(let t=1;c>=t;t++){const o=M+t*N,a=w(o),s=B*Math.sqrt(1+1/i+(C>0?(o-v)**2/C:0))*D;g.push({[n]:o,[e]:a,[r]:"forecast",__forecastUpper:a+s,__forecastLower:a-s})}s(g,a,t=>t.__forecastUpper,t=>t.__forecastLower),b.push({type:"envelope",upperAccessor:"__forecastUpper",lowerAccessor:"__forecastLower",fill:u,fillOpacity:p,label:h})}}b.push({type:"x-threshold",x:l,color:"#94a3b8",strokeWidth:1,strokeDasharray:"4,2",label:"Train / Forecast"}),i&&b.push({type:"anomaly-band",threshold:i.threshold??2,showBand:!1!==i.showBand,fill:i.bandColor||"#6366f1",fillOpacity:i.bandOpacity??.1,anomalyColor:i.anomalyColor||"#ef4444",anomalyRadius:i.anomalyRadius??6,label:i.label});const _=[];if(_.push(...y),y.length>0&&d.length>0&&_.push({...y[y.length-1],[r]:"observed"}),_.push(...d),g.length>0){const t=d.length>0?d[d.length-1]:y[y.length-1];t&&_.push({...t,[r]:"forecast"}),_.push(...g)}return{processedData:_,annotations:b}}(t,n,e,a,l);var c}function f(o,n){const s=n.trainDasharray??"8,4",i=n.forecastDasharray??"4,4",l=n.color||"#6366f1",c=n.trainOpacity,f=n.forecastOpacity,u=n.trainStroke,p=n.trainLinecap,h=n.trainUnderline;return n=>{const y=o(n),d=n[r];if("training"===d){let o=y.stroke;return"darken"===u?o=t(y.stroke||"#666",.5):u&&(o=u),{...y,stroke:o,strokeDasharray:s,...p&&{strokeLinecap:p},...null!=c&&{strokeOpacity:c}}}if("training-base"===d){let t=y.stroke||"#666";return"lighten"===h&&(t=e(t,.4)),{...y,stroke:t,strokeDasharray:void 0}}if("forecast"===d){const t=n[a],o=null!=t?t:f;return{...y,stroke:l,strokeDasharray:i,...null!=o&&{strokeOpacity:o}}}return y}}export{a as FORECAST_OPACITY_FIELD,r as SEGMENT_FIELD,l as buildAnomalyAnnotations,c as buildForecast,f as createSegmentLineStyle,t as darkenColor,e as lightenColor,s as stampForecastOpacity};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import{getMax as t,getMinMax as n}from"./xy-chunk-IWD6IB6V.module.min.js";function o(t,n=.5){const o=/^#?([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})$/i.exec(t);if(!o)return t;const e=Math.round(parseInt(o[1],16)*(1-n)),r=Math.round(parseInt(o[2],16)*(1-n)),a=Math.round(parseInt(o[3],16)*(1-n));return`#${e.toString(16).padStart(2,"0")}${r.toString(16).padStart(2,"0")}${a.toString(16).padStart(2,"0")}`}function e(t,n=.5){const o=/^#?([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})$/i.exec(t);if(!o)return t;const e=Math.round(parseInt(o[1],16)+(255-parseInt(o[1],16))*n),r=Math.round(parseInt(o[2],16)+(255-parseInt(o[2],16))*n),a=Math.round(parseInt(o[3],16)+(255-parseInt(o[3],16))*n);return`#${e.toString(16).padStart(2,"0")}${r.toString(16).padStart(2,"0")}${a.toString(16).padStart(2,"0")}`}var r="__forecastSegment",a="__forecastOpacity";function s(t,o,e,r){const s=o.uncertaintyOpacity,i=o.confidenceAccessor;if(!s&&!i)return;const l="object"==typeof s?s:{},c=l.min??.15,f=l.max??1;if(i){const n="function"==typeof i?i:t=>t[i];for(const o of t){const t=n(o);null!=t&&Number.isFinite(t)&&(o[a]=c+Math.max(0,Math.min(1,t))*(f-c))}return}const p=t.map(t=>{const n=e(t),o=r(t);return null!=n&&null!=o&&Number.isFinite(n)&&Number.isFinite(o)?Math.abs(n-o):NaN}),u=p.filter(t=>Number.isFinite(t));if(0===u.length)return;const[h,y]=n(u),d=y-h;t.forEach((t,n)=>{const o=p[n];Number.isFinite(o)&&(t[a]=f-(d>0?(o-h)/d:0)*(f-c))})}function i(t,n){return"function"==typeof n?n(t):!!t[n]}function l(t){return[{type:"anomaly-band",threshold:t.threshold??2,showBand:!1!==t.showBand,fill:t.bandColor||"#6366f1",fillOpacity:t.bandOpacity??.1,anomalyColor:t.anomalyColor||"#ef4444",anomalyRadius:t.anomalyRadius??6,label:t.label}]}function c(n,o,e,a,l){return(c=a).isTraining||c.isForecast||c.isAnomaly||c.upperBounds||c.lowerBounds?function(t,n,o,e,a){const{isTraining:l,isForecast:c,isAnomaly:f,upperBounds:p,lowerBounds:u,color:h="#6366f1",bandOpacity:y=.15,anomalyColor:d="#ef4444",anomalyRadius:m=6,label:b}=e,g=t.map(t=>{let n="observed";return c&&i(t,c)?n="forecast":l&&i(t,l)&&(n="training"),{...t,[r]:n}}),_=e._groupBy,k=[];if(_){const t=new Map;for(const n of g){const o=n[_]??"__default";t.has(o)||t.set(o,[]),t.get(o).push(n)}const n=[];for(const[,o]of t)for(let t=0;o.length-1>t;t++)o[t][r]!==o[t+1][r]&&(n.push({...o[t+1],[r]:o[t][r]}),n.push({...o[t],[r]:o[t+1][r]}));k.push(...g,...n)}else for(let t=0;g.length>t;t++)k.push(g[t]),g.length-1>t&&g[t][r]!==g[t+1][r]&&(k.push({...g[t+1],[r]:g[t][r]}),k.push({...g[t],[r]:g[t+1][r]}));if(e.trainUnderline){const t=[];for(const n of k)"training"===n[r]&&t.push({...n,[r]:"training-base"});k.unshift(...t)}const O=[];if(p&&u){const t="string"==typeof p?p:"__envUpper",n="string"==typeof u?u:"__envLower";if("function"==typeof p||"function"==typeof u)for(const o of k)"function"==typeof p&&(o[t]=p(o)),"function"==typeof u&&(o[n]=u(o));O.push({type:"envelope",upperAccessor:t,lowerAccessor:n,fill:h,fillOpacity:y,label:b})}if(e.uncertaintyOpacity||e.confidenceAccessor){const t=p?"function"==typeof p?p:t=>t[p]:()=>{},n=u?"function"==typeof u?u:t=>t[u]:()=>{};s(k.filter(t=>"forecast"===t[r]),e,t,n)}if(f){const t=e.anomalyStyle,n={type:"highlight",filter:t=>i(t,f)};t?(n.style=t,n.r=m):"function"==typeof d?(n.style=t=>{const n=d(t);return{stroke:n,strokeWidth:1.5,fill:n,fillOpacity:.7}},n.r=m):(n.color=d,n.r=m,n.style={stroke:d,strokeWidth:1.5,fill:d,fillOpacity:.7}),O.push(n)}return a&&O.push({type:"anomaly-band",threshold:a.threshold??2,showBand:!1!==a.showBand,fill:a.bandColor||"#6366f1",fillOpacity:a.bandOpacity??.1,anomalyColor:a.anomalyColor||"#ef4444",anomalyRadius:a.anomalyRadius??6,label:a.label}),{processedData:k,annotations:O}}(n,0,0,a,l):function(n,o,e,a,i){const{trainEnd:l,steps:c=10,confidence:f=.95,color:p="#6366f1",bandOpacity:u=.15,label:h}=a;if(null==l)return{processedData:n,annotations:[]};const y=[],d=[];for(const t of n)t[o]>l?d.push({...t,[r]:"observed"}):y.push({...t,[r]:"training"});const m=y.map(t=>[t[o],t[e]]).filter(t=>null!=t[0]&&null!=t[1]&&isFinite(t[0])&&isFinite(t[1])).sort((t,n)=>t[0]-n[0]),b=[],g=[];if(m.length>=3){const i=m.length;let l=0,y=0,d=0,_=0;for(const[t,n]of m)l+=t,y+=n,d+=t*t,_+=t*n;const k=i*d-l*l;if(Math.abs(k)>1e-12){const d=(i*_-l*y)/k,O=(y-d*l)/i,w=t=>O+d*t,S=m.map(([t,n])=>n-w(t)).reduce((t,n)=>t+n*n,0),M=Math.sqrt(S/Math.max(i-2,1)),B=m.reduce((t,n)=>t+n[0],0)/i,F=m.reduce((t,n)=>t+(n[0]-B)**2,0),I=.99>f?.95>f?.9>f?1:1.645:1.96:2.576,v=n.map(t=>t[o]).filter(t=>null!=t&&isFinite(t)),C=t(v),D=m.length>1?(m[i-1][0]-m[0][0])/(i-1):1;for(let t=1;c>=t;t++){const n=C+t*D,a=w(n),s=M*Math.sqrt(1+1/i+(F>0?(n-B)**2/F:0))*I;g.push({[o]:n,[e]:a,[r]:"forecast",__forecastUpper:a+s,__forecastLower:a-s})}s(g,a,t=>t.__forecastUpper,t=>t.__forecastLower),b.push({type:"envelope",upperAccessor:"__forecastUpper",lowerAccessor:"__forecastLower",fill:p,fillOpacity:u,label:h})}}b.push({type:"x-threshold",x:l,color:"#94a3b8",strokeWidth:1,strokeDasharray:"4,2",label:"Train / Forecast"}),i&&b.push({type:"anomaly-band",threshold:i.threshold??2,showBand:!1!==i.showBand,fill:i.bandColor||"#6366f1",fillOpacity:i.bandOpacity??.1,anomalyColor:i.anomalyColor||"#ef4444",anomalyRadius:i.anomalyRadius??6,label:i.label});const _=[];if(_.push(...y),y.length>0&&d.length>0&&_.push({...y[y.length-1],[r]:"observed"}),_.push(...d),g.length>0){const t=d.length>0?d[d.length-1]:y[y.length-1];t&&_.push({...t,[r]:"forecast"}),_.push(...g)}return{processedData:_,annotations:b}}(n,o,e,a,l);var c}function f(t,n){const s=n.trainDasharray??"8,4",i=n.forecastDasharray??"4,4",l=n.color||"#6366f1",c=n.trainOpacity,f=n.forecastOpacity,p=n.trainStroke,u=n.trainLinecap,h=n.trainUnderline;return n=>{const y=t(n),d=n[r];if("training"===d){let t=y.stroke;return"darken"===p?t=o(y.stroke||"#666",.5):p&&(t=p),{...y,stroke:t,strokeDasharray:s,...u&&{strokeLinecap:u},...null!=c&&{strokeOpacity:c}}}if("training-base"===d){let t=y.stroke||"#666";return"lighten"===h&&(t=e(t,.4)),{...y,stroke:t,strokeDasharray:void 0}}if("forecast"===d){const t=n[a],o=null!=t?t:f;return{...y,stroke:l,strokeDasharray:i,...null!=o&&{strokeOpacity:o}}}return y}}export{a as FORECAST_OPACITY_FIELD,r as SEGMENT_FIELD,l as buildAnomalyAnnotations,c as buildForecast,f as createSegmentLineStyle,o as darkenColor,e as lightenColor,s as stampForecastOpacity};
|