semiotic 3.8.8 → 3.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +82 -66
- package/agent-skill/semiotic-charts/SKILL.md +11 -2
- package/ai/behaviorContracts.cjs +33 -3
- package/ai/cli.js +53 -2
- package/ai/componentMetadata.cjs +15 -0
- package/ai/dist/mcp-server.js +1530 -611
- package/ai/examples.md +48 -42
- package/{CLAUDE.md → ai/reference.md} +46 -24
- package/ai/schema.json +10704 -825
- package/ai/surface-manifest.json +643 -2
- package/ai/system-prompt.md +83 -130
- package/dist/c-3BLJEQNG.min.js +1 -0
- package/dist/c-3KZD6AXJ.min.js +1 -0
- package/dist/c-4TWEX5HG.min.js +1 -0
- package/dist/c-52TEGIUJ.min.js +1 -0
- package/dist/c-5YCIX3VZ.min.js +1 -0
- package/dist/c-6FEKTA3U.min.js +1 -0
- package/dist/c-6O5EVOPH.min.js +1 -0
- package/dist/c-74HEEZGK.min.js +1 -0
- package/dist/c-AKAF6JAD.min.js +1 -0
- package/dist/c-BBKITSXB.min.js +1 -0
- package/dist/c-BWNB6USU.min.js +1 -0
- package/dist/c-C25ENHIK.min.js +1 -0
- package/dist/c-CDR5AO3R.min.js +1 -0
- package/dist/c-COHXCW3Q.min.js +1 -0
- package/dist/{chunk-scatterplotMatrixBrushOverlay-SDIZSN66.module.min.js → c-DADXPJXV.min.js} +0 -1
- package/dist/c-E3JFRRMI.min.js +1 -0
- package/dist/c-EBFPQHHO.min.js +1 -0
- package/dist/c-G36WS6LN.min.js +1 -0
- package/dist/c-GIKRQI4X.min.js +1 -0
- package/dist/c-GPYOFETM.min.js +1 -0
- package/dist/c-IDUHYYSI.min.js +1 -0
- package/dist/{chunk-chunk-FQPKOAIH.module.min.js → c-IUHFPMHD.min.js} +0 -1
- package/dist/c-J5G56TUH.min.js +1 -0
- package/dist/c-JAZ73J32.min.js +1 -0
- package/dist/c-KG3NXHAL.min.js +1 -0
- package/dist/c-KII3PLZE.min.js +1 -0
- package/dist/c-LIXGXMNS.min.js +1 -0
- package/dist/c-LVEY6D6B.min.js +1 -0
- package/dist/c-M4Y3BHFR.min.js +1 -0
- package/dist/c-MAIICR2Z.min.js +1 -0
- package/dist/c-MG5DM6VE.min.js +1 -0
- package/dist/{chunk-minimapBrushOverlay-JU57U7NM.module.min.js → c-MNF2S4AA.min.js} +0 -1
- package/dist/c-MT3WBK7M.min.js +1 -0
- package/dist/c-NY3JWV2K.min.js +1 -0
- package/dist/c-O6U6K4CW.min.js +1 -0
- package/dist/c-OCI56QF2.min.js +1 -0
- package/dist/c-OQ7M4AGV.min.js +1 -0
- package/dist/c-OXYMVK7Q.min.js +1 -0
- package/dist/c-PPWDL5ZI.min.js +1 -0
- package/dist/c-QHF5YON3.min.js +1 -0
- package/dist/c-RR3GO5SW.min.js +1 -0
- package/dist/{chunk-chunk-J5QD4RAM.module.min.js → c-RSVIHIQ4.min.js} +0 -1
- package/dist/{chunk-chunk-EMO5NUGE.module.min.js → c-S2BXNNJN.min.js} +0 -1
- package/dist/{chunk-chunk-YCQYG6J5.module.min.js → c-SLGMUBUL.min.js} +0 -1
- package/dist/c-SUILCHWU.min.js +1 -0
- package/dist/c-TZW3JGJ5.min.js +1 -0
- package/dist/c-US5ZFT6E.min.js +1 -0
- package/dist/{chunk-chunk-RZH7VZYS.module.min.js → c-USFMFKIH.min.js} +0 -1
- package/dist/c-UUKVD4WB.min.js +1 -0
- package/dist/{chunk-chunk-SV4XAZ3Q.module.min.js → c-VGW3VG3I.min.js} +0 -1
- package/dist/c-W3CE4A4S.min.js +1 -0
- package/dist/{chunk-chunk-2NVFEB7P.module.min.js → c-WJCD5EUY.min.js} +0 -1
- package/dist/{chunk-chunk-2JGJ5GUG.module.min.js → c-X5UBGU2V.min.js} +0 -1
- package/dist/c-YDAY2WFR.min.js +1 -0
- package/dist/c-ZOWWU34K.min.js +1 -0
- package/dist/components/AccessibleNavTree.d.ts +1 -1
- package/dist/components/CategoryColors.d.ts +1 -1
- package/dist/components/GradientLegend.d.ts +14 -0
- package/dist/components/Legend.d.ts +2 -7
- package/dist/components/LinkedCharts.d.ts +1 -1
- package/dist/components/MobileAnnotationCalloutList.d.ts +1 -1
- package/dist/components/ObservationReadout.d.ts +45 -0
- package/dist/components/ThemeProvider.d.ts +4 -4
- package/dist/components/Tooltip/FlippingTooltip.d.ts +5 -7
- package/dist/components/Tooltip/Tooltip.d.ts +83 -5
- package/dist/components/Tooltip/tooltipChrome.d.ts +43 -0
- package/dist/components/ai/chartCapabilityTypes.d.ts +86 -2
- package/dist/components/ai/chartClinic.d.ts +2 -0
- package/dist/components/ai/deriveProfileFields.d.ts +40 -0
- package/dist/components/ai/evaluateChart.d.ts +85 -0
- package/dist/components/ai/fieldPolicy.d.ts +7 -0
- package/dist/components/ai/fieldRoles.d.ts +24 -0
- package/dist/components/ai/generativeChart.d.ts +18 -2
- package/dist/components/ai/inferIntent.d.ts +26 -2
- package/dist/components/ai/intents.d.ts +35 -0
- package/dist/components/ai/navigationTree.d.ts +2 -2
- package/dist/components/ai/observedSceneAudit.d.ts +2 -1
- package/dist/components/ai/profileData.d.ts +11 -0
- package/dist/components/ai/repairChartConfig.d.ts +2 -3
- package/dist/components/ai/semanticEvidence.d.ts +4 -0
- package/dist/components/ai/semanticViability.d.ts +11 -0
- package/dist/components/ai/semanticViabilityRegistry.d.ts +5 -0
- package/dist/components/ai/streamingTypes.d.ts +4 -0
- package/dist/components/ai/suggestCharts.d.ts +5 -6
- package/dist/components/ai/suggestDashboard.d.ts +2 -3
- package/dist/components/ai/suggestStreamCharts.d.ts +1 -1
- package/dist/components/ai/suggestStretchCharts.d.ts +2 -3
- package/dist/components/ai/suggestionPropContracts.d.ts +20 -0
- package/dist/components/ai/variantDiscovery.d.ts +3 -1
- package/dist/components/charts/custom/NetworkCustomChart.d.ts +3 -0
- package/dist/components/charts/custom/OrdinalCustomChart.d.ts +3 -0
- package/dist/components/charts/custom/XYCustomChart.d.ts +1 -1
- package/dist/components/charts/geo/ChoroplethMap.d.ts +3 -1
- package/dist/components/charts/geo/DistanceCartogram.d.ts +2 -7
- package/dist/components/charts/geo/cartogramOverlay.d.ts +28 -0
- package/dist/components/charts/index.d.ts +4 -3
- package/dist/components/charts/network/ProcessSankey.d.ts +2 -136
- package/dist/components/charts/network/ProcessSankeyProps.d.ts +139 -0
- package/dist/components/charts/network/Treemap.d.ts +2 -1
- package/dist/components/charts/network/processSankey/boundaryHubOrdering.d.ts +23 -0
- package/dist/components/charts/network/processSankey/layoutGeometry.d.ts +2 -0
- package/dist/components/charts/network/processSankey/ordering.d.ts +3 -41
- package/dist/components/charts/network/processSankey/orderingTypes.d.ts +32 -0
- package/dist/components/charts/network/processSankey/packing.d.ts +1 -1
- package/dist/components/charts/network/processSankey/packingCache.d.ts +1 -1
- package/dist/components/charts/network/processSankey/packingOptimization.d.ts +72 -0
- package/dist/components/charts/ordinal/BarChart.d.ts +4 -3
- package/dist/components/charts/ordinal/FunnelChart.d.ts +2 -0
- package/dist/components/charts/ordinal/GroupedBarChart.d.ts +3 -2
- package/dist/components/charts/ordinal/StackedBarChart.d.ts +4 -3
- package/dist/components/charts/ordinal/SwimlaneChart.d.ts +2 -2
- package/dist/components/charts/physics/GaltonBoardChart.d.ts +2 -9
- package/dist/components/charts/physics/GauntletChart.d.ts +10 -41
- package/dist/components/charts/physics/ProcessFlowChart.d.ts +1 -1
- package/dist/components/charts/physics/chainReactionAccessibleTable.d.ts +9 -0
- package/dist/components/charts/physics/chainReactionRuntime.d.ts +2 -1
- package/dist/components/charts/physics/chainReactionTypes.d.ts +6 -1
- package/dist/components/charts/physics/crucibleBodyRenderers.d.ts +2 -2
- package/dist/components/charts/physics/crucibleClone.d.ts +6 -0
- package/dist/components/charts/physics/crucibleEffects.d.ts +1 -2
- package/dist/components/charts/physics/crucibleRecord.d.ts +7 -0
- package/dist/components/charts/physics/gauntletChrome.d.ts +4 -4
- package/dist/components/charts/physics/gauntletPhysics.d.ts +1 -0
- package/dist/components/charts/physics/gauntletPublic.d.ts +4 -0
- package/dist/components/charts/physics/packetFlowOverlay.d.ts +7 -0
- package/dist/components/charts/physics/physicsChartLayout.d.ts +8 -0
- package/dist/components/charts/physics/physicsChartShared.d.ts +3 -1
- package/dist/components/charts/physics/physicsChartUtils.d.ts +1 -1
- package/dist/components/charts/physics/physicsHocUtils.d.ts +26 -13
- package/dist/components/charts/physics/physicsProjectionOverlays.d.ts +24 -0
- package/dist/components/charts/physics/processFlowOverlays.d.ts +9 -0
- package/dist/components/charts/realtime/RealtimeHeatmap.d.ts +17 -12
- package/dist/components/charts/realtime/RealtimeHistogram.d.ts +12 -7
- package/dist/components/charts/realtime/RealtimeLineChart.d.ts +37 -14
- package/dist/components/charts/realtime/RealtimeSwarmChart.d.ts +23 -14
- package/dist/components/charts/realtime/RealtimeWaterfallChart.d.ts +22 -13
- package/dist/components/charts/realtime/aggregate.d.ts +4 -1
- package/dist/components/charts/realtime/eventTime.d.ts +4 -0
- package/dist/components/charts/realtime/realtimeChartRuntime.d.ts +27 -0
- package/dist/components/charts/realtime/realtimeChartTypes.d.ts +30 -0
- package/dist/components/charts/realtime/useRealtimeCategoryColors.d.ts +30 -0
- package/dist/components/charts/shared/FrameTextAnnotationSVG.d.ts +10 -0
- package/dist/components/charts/shared/annotationActivation.d.ts +3 -7
- package/dist/components/charts/shared/annotationBandFill.d.ts +6 -0
- package/dist/components/charts/shared/annotationDispatch.d.ts +31 -0
- package/dist/components/charts/shared/annotationIdentity.d.ts +8 -0
- package/dist/components/charts/shared/annotationRules.d.ts +1 -15
- package/dist/components/charts/shared/boundedCategoryRegistry.d.ts +8 -0
- package/dist/components/charts/shared/chainReactionChartSpec.d.ts +3 -0
- package/dist/components/charts/shared/chartMode.d.ts +3 -2
- package/dist/components/charts/shared/chartSpecCore.d.ts +1 -0
- package/dist/components/charts/shared/formatUtils.d.ts +40 -9
- package/dist/components/charts/shared/frameTextAnnotation.d.ts +63 -0
- package/dist/components/charts/shared/gradient.d.ts +16 -0
- package/dist/components/charts/shared/hatchFill.d.ts +15 -0
- package/dist/components/charts/shared/hooks.d.ts +4 -4
- package/dist/components/charts/shared/legendUtils.d.ts +1 -0
- package/dist/components/charts/shared/streamPropsHelpers.d.ts +3 -1
- package/dist/components/charts/shared/styleRules.d.ts +9 -2
- package/dist/components/charts/shared/styleRulesWireSchema.d.ts +353 -0
- package/dist/components/charts/shared/types.d.ts +26 -10
- package/dist/components/charts/shared/useChartLegend.d.ts +43 -9
- package/dist/components/charts/shared/useChartSetup.d.ts +3 -1
- package/dist/components/charts/shared/useCustomChartSetup.d.ts +5 -2
- package/dist/components/charts/shared/useNetworkChartSetup.d.ts +5 -1
- package/dist/components/charts/shared/useOrdinalBrush.d.ts +3 -3
- package/dist/components/charts/shared/useStreamingLegend.d.ts +6 -1
- package/dist/components/charts/value/types.d.ts +1 -1
- package/dist/components/charts/xy/BubbleChart.d.ts +1 -1
- package/dist/components/charts/xy/BumpChart.capability.d.ts +14 -1
- package/dist/components/charts/xy/BumpChart.d.ts +13 -73
- package/dist/components/charts/xy/BumpChart.semanticViability.d.ts +5 -0
- package/dist/components/charts/xy/CandlestickChart.d.ts +2 -2
- package/dist/components/charts/xy/LineChart.d.ts +2 -2
- package/dist/components/charts/xy/Scatterplot.d.ts +1 -1
- package/dist/components/charts/xy/bumpData.d.ts +44 -0
- package/dist/components/charts/xy/bumpIdentity.d.ts +2 -0
- package/dist/components/charts/xy/bumpLayout.d.ts +45 -0
- package/dist/components/charts/xy/bumpTooltip.d.ts +20 -0
- package/dist/components/legendLayout.d.ts +131 -4
- package/dist/components/realtime/ReorderBuffer.d.ts +2 -0
- package/dist/components/realtime/types.d.ts +10 -1
- package/dist/components/recipes/balanceSnapshotsToFlows.d.ts +42 -0
- package/dist/components/recipes/directedReachability.d.ts +14 -0
- package/dist/components/recipes/gofishDisplayListFixtures.generated.d.ts +6 -6
- package/dist/components/recipes/gridObservatory.d.ts +1 -1
- package/dist/components/recipes/networkAnalysis.d.ts +1 -18
- package/dist/components/recipes/physics.d.ts +7 -4
- package/dist/components/recipes/processPhysics.d.ts +0 -1
- package/dist/components/recipes/waffle.d.ts +7 -4
- package/dist/components/semiotic-ai-core.d.ts +13 -4
- package/dist/components/semiotic-ai-observations.d.ts +3 -0
- package/dist/components/semiotic-ai.d.ts +16 -9
- package/dist/components/semiotic-client-shared.d.ts +10 -0
- package/dist/components/semiotic-experimental.d.ts +1 -1
- package/dist/components/semiotic-geo.d.ts +4 -1
- package/dist/components/semiotic-network.d.ts +7 -4
- package/dist/components/semiotic-ordinal.d.ts +4 -1
- package/dist/components/semiotic-physics.d.ts +11 -4
- package/dist/components/semiotic-realtime-core.d.ts +11 -4
- package/dist/components/semiotic-realtime-react.d.ts +4 -3
- package/dist/components/semiotic-realtime.d.ts +3 -1
- package/dist/components/semiotic-recipes-core.d.ts +7 -5
- package/dist/components/semiotic-server-edge.d.ts +3 -2
- package/dist/components/semiotic-server.d.ts +3 -2
- package/dist/components/semiotic-themes-core.d.ts +5 -48
- package/dist/components/semiotic-utils-core.d.ts +11 -5
- package/dist/components/semiotic-utils-react.d.ts +2 -0
- package/dist/components/semiotic-xy.d.ts +4 -1
- package/dist/components/semiotic.d.ts +68 -25
- package/dist/components/server/animatedGif.d.ts +1 -1
- package/dist/components/server/renderEvidence.d.ts +25 -2
- package/dist/components/server/renderToStaticSVG.d.ts +15 -7
- package/dist/components/server/serverChartConfigShared.d.ts +8 -1
- package/dist/components/server/serverChartConfigs.d.ts +1 -0
- package/dist/components/server/serverChartConfigsNetwork.d.ts +3 -3
- package/dist/components/server/serverChartConfigsNetworkChord.d.ts +2 -0
- package/dist/components/server/serverChartConfigsNetworkForce.d.ts +2 -0
- package/dist/components/server/serverChartConfigsNetworkHierarchy.d.ts +3 -0
- package/dist/components/server/serverChartConfigsXY.d.ts +3 -3
- package/dist/components/server/serverChartConfigsXYBubble.d.ts +5 -0
- package/dist/components/server/serverChartConfigsXYBump.d.ts +7 -0
- package/dist/components/server/serverChartConfigsXYScatter.d.ts +5 -0
- package/dist/components/server/staticAnnotationFallbacks.d.ts +10 -0
- package/dist/components/server/staticAnnotations.d.ts +28 -1
- package/dist/components/server/staticAxisTickLabel.d.ts +13 -0
- package/dist/components/server/staticLegend.d.ts +1 -1
- package/dist/components/server/staticLegendMargin.d.ts +41 -0
- package/dist/components/server/staticOrdinal.d.ts +8 -2
- package/dist/components/server/staticPhysics.d.ts +13 -1
- package/dist/components/server/staticPhysicsChrome.d.ts +20 -0
- package/dist/components/server/staticRawLegend.d.ts +15 -0
- package/dist/components/server/staticSVGChrome.d.ts +16 -55
- package/dist/components/server/staticXYAxes.d.ts +27 -0
- package/dist/components/server/staticXYAxisTicks.d.ts +39 -0
- package/dist/components/server/staticXYGrid.d.ts +11 -0
- package/dist/components/server/themeResolver.d.ts +5 -1
- package/dist/components/store/ThemeStore.d.ts +2 -98
- package/dist/components/store/designTokens.d.ts +1 -1
- package/dist/components/store/themeCSSVariables.d.ts +10 -0
- package/dist/components/store/themeCore.d.ts +91 -0
- package/dist/components/store/themePresets.d.ts +81 -0
- package/dist/components/store/themeSerialization.d.ts +2 -1
- package/dist/components/stream/AccessibleDataTable.d.ts +12 -14
- package/dist/components/stream/AccessibleTablePortalImpl.d.ts +6 -0
- package/dist/components/stream/GeoTileRenderer.d.ts +3 -0
- package/dist/components/stream/NetworkCanvasHitTester.d.ts +3 -1
- package/dist/components/stream/NetworkSSRFrame.d.ts +2 -1
- package/dist/components/stream/NetworkSVGOverlay.d.ts +3 -31
- package/dist/components/stream/OrdinalCanvasHitTester.d.ts +2 -0
- package/dist/components/stream/SVGChartTitle.d.ts +9 -0
- package/dist/components/stream/SVGOverlay.d.ts +1 -21
- package/dist/components/stream/SVGUnderlay.d.ts +24 -0
- package/dist/components/stream/SceneToSVG.d.ts +1 -1
- package/dist/components/stream/StreamGeoFrame.d.ts +1 -1
- package/dist/components/stream/StreamOrdinalFrame.d.ts +1 -1
- package/dist/components/stream/StreamXYFrame.d.ts +1 -1
- package/dist/components/stream/accessibleDataRows.d.ts +11 -0
- package/dist/components/stream/accessibleDataTableModel.d.ts +40 -0
- package/dist/components/stream/accessibleTableTypes.d.ts +11 -0
- package/dist/components/stream/axisTickUtils.d.ts +19 -0
- package/dist/components/stream/canvasBackground.d.ts +10 -0
- package/dist/components/stream/canvasSetup.d.ts +24 -4
- package/dist/components/stream/frameCursorInteraction.d.ts +25 -0
- package/dist/components/stream/frameDefaultMargins.d.ts +37 -0
- package/dist/components/stream/frameGraphics.d.ts +18 -0
- package/dist/components/stream/frameGraphicsSubscription.d.ts +26 -0
- package/dist/components/stream/frameLegendOptions.d.ts +18 -0
- package/dist/components/stream/geoFrameCursorInteraction.d.ts +9 -0
- package/dist/components/stream/geoFrameHelpers.d.ts +29 -1
- package/dist/components/stream/geoTypes.d.ts +12 -11
- package/dist/components/stream/hitTarget.d.ts +61 -2
- package/dist/components/stream/moduleWorkerSession.d.ts +6 -0
- package/dist/components/stream/networkAnnotationAnchors.d.ts +37 -0
- package/dist/components/stream/networkCustomLayout.d.ts +2 -2
- package/dist/components/stream/networkFrameCursorInteraction.d.ts +12 -0
- package/dist/components/stream/networkFrameInteraction.d.ts +2 -0
- package/dist/components/stream/networkFramePaint.d.ts +15 -0
- package/dist/components/stream/networkPipelineConfig.d.ts +1 -1
- package/dist/components/stream/networkTypes.d.ts +32 -32
- package/dist/components/stream/normalizeXYData.d.ts +7 -0
- package/dist/components/stream/ordinalFrameCursorInteraction.d.ts +7 -0
- package/dist/components/stream/ordinalFrameInteraction.d.ts +29 -0
- package/dist/components/stream/ordinalSceneSVG.d.ts +10 -0
- package/dist/components/stream/ordinalTypes.d.ts +12 -4
- package/dist/components/stream/physics/PhysicsBodySpatialIndex.d.ts +9 -1
- package/dist/components/stream/physics/PhysicsCanvasTheme.d.ts +25 -0
- package/dist/components/stream/physics/PhysicsControllers.d.ts +0 -3
- package/dist/components/stream/physics/PhysicsPipelineStore.d.ts +4 -1
- package/dist/components/stream/physics/PhysicsSVGOverlay.d.ts +3 -24
- package/dist/components/stream/physics/PhysicsSettledSVG.d.ts +9 -21
- package/dist/components/stream/physics/PhysicsSettledSVGElement.d.ts +37 -0
- package/dist/components/stream/physics/PhysicsSettledScene.d.ts +7 -3
- package/dist/components/stream/physics/StreamPhysicsFrame.d.ts +1 -1
- package/dist/components/stream/physics/StreamPhysicsTypes.d.ts +25 -4
- package/dist/components/stream/physics/physicsAnnotationContext.d.ts +19 -0
- package/dist/components/stream/physics/physicsBodyCanvas.d.ts +4 -0
- package/dist/components/stream/physics/physicsSettledChrome.d.ts +7 -0
- package/dist/components/stream/physics/usePhysicsCanvasPointer.d.ts +32 -0
- package/dist/components/stream/physics/usePhysicsSemanticNavigation.d.ts +36 -0
- package/dist/components/stream/pipelineConfig.d.ts +8 -17
- package/dist/components/stream/pipelineDomainResolution.d.ts +2 -2
- package/dist/components/stream/renderBackend.d.ts +2 -0
- package/dist/components/stream/renderers/canvasRenderHelpers.d.ts +13 -2
- package/dist/components/stream/renderers/resolveCSSColor.d.ts +7 -0
- package/dist/components/stream/responsiveSize.d.ts +17 -0
- package/dist/components/stream/sceneCursor.d.ts +41 -0
- package/dist/components/stream/sceneRevisionDiagnostics.d.ts +1 -1
- package/dist/components/stream/svgOverlayUtils.d.ts +22 -1
- package/dist/components/stream/types.d.ts +33 -13
- package/dist/components/stream/useCanvasFrameHost.d.ts +12 -1
- package/dist/components/stream/useFrame.d.ts +24 -1
- package/dist/components/stream/useResponsiveSize.d.ts +6 -1
- package/dist/components/stream/useStalenessCheck.d.ts +1 -1
- package/dist/components/stream/xyFrameAxisTypes.d.ts +20 -4
- package/dist/components/stream/xyFrameCursorInteraction.d.ts +6 -0
- package/dist/components/stream/xySceneBuilders/swarmScene.d.ts +1 -1
- package/dist/components/stream/xySceneBuilders/types.d.ts +6 -26
- package/dist/components/types/legendTypes.d.ts +6 -0
- package/dist/components/types/marginType.d.ts +7 -8
- package/dist/controls.min.js +1 -1
- package/dist/controls.module.min.js +1 -1
- package/dist/forceLayoutWorker.js +1 -1
- package/dist/geo.min.js +1 -1
- package/dist/geo.module.min.js +1 -1
- package/dist/network.min.js +1 -1
- package/dist/network.module.min.js +1 -1
- package/dist/ordinal.min.js +1 -1
- package/dist/ordinal.module.min.js +1 -1
- package/dist/physics-matter.module.min.js +1 -1
- package/dist/physics-rapier.module.min.js +1 -1
- package/dist/physics.min.js +1 -1
- package/dist/physics.module.min.js +1 -1
- package/dist/physicsWorker.js +1 -1
- package/dist/processSankeyLayoutWorker.js +1 -1
- package/dist/realtime.min.js +1 -1
- package/dist/realtime.module.min.js +1 -1
- package/dist/rough.min.js +1 -1
- package/dist/rough.module.min.js +1 -1
- package/dist/semiotic-ai-core.d.ts +13 -4
- package/dist/semiotic-ai-core.min.js +1 -1
- package/dist/semiotic-ai-core.module.min.js +1 -1
- package/dist/semiotic-ai.d.ts +16 -9
- package/dist/semiotic-ai.min.js +1 -1
- package/dist/semiotic-ai.module.min.js +1 -1
- package/dist/semiotic-client-cjs-shared.min.js +1 -0
- package/dist/semiotic-client-glyph.module.min.js +2 -0
- package/dist/semiotic-client-responsive.module.min.js +2 -0
- package/dist/semiotic-client-shared.module.min.js +2 -0
- package/dist/semiotic-custom-layout-selection-cjs-shared.min.js +2 -0
- package/dist/semiotic-data.min.js +1 -1
- package/dist/semiotic-data.module.min.js +1 -1
- package/dist/semiotic-experimental-auxiliary.module.min.js +2 -0
- package/dist/semiotic-experimental-node-auxiliary.module.min.js +2 -0
- package/dist/semiotic-experimental-node.module.min.js +2 -0
- package/dist/semiotic-experimental-react-shared.module.min.js +2 -0
- package/dist/semiotic-experimental-vacp.min.js +1 -1
- package/dist/semiotic-experimental-vacp.module.min.js +1 -1
- package/dist/semiotic-experimental.d.ts +1 -1
- package/dist/semiotic-experimental.min.js +1 -1
- package/dist/semiotic-experimental.module.min.js +1 -1
- package/dist/semiotic-geo.d.ts +4 -1
- package/dist/semiotic-network.d.ts +7 -4
- package/dist/semiotic-ordinal.d.ts +4 -1
- package/dist/semiotic-physics.d.ts +11 -4
- package/dist/semiotic-realtime-core.d.ts +11 -4
- package/dist/semiotic-realtime-core.min.js +2 -1
- package/dist/semiotic-realtime-core.module.min.js +2 -1
- package/dist/semiotic-realtime-react.d.ts +4 -3
- package/dist/semiotic-realtime-react.min.js +1 -1
- package/dist/semiotic-realtime-react.module.min.js +1 -1
- package/dist/semiotic-realtime.d.ts +3 -1
- package/dist/semiotic-recipes-core-cjs-base.min.js +1 -0
- package/dist/semiotic-recipes-core.d.ts +7 -5
- package/dist/semiotic-recipes-core.min.js +9 -1
- package/dist/semiotic-recipes-core.module.min.js +1 -1
- package/dist/semiotic-recipes-geo-cjs.min.js +1 -0
- package/dist/semiotic-recipes-react.min.js +1 -1
- package/dist/semiotic-recipes-react.module.min.js +1 -1
- package/dist/semiotic-recipes.min.js +7 -1
- package/dist/semiotic-recipes.module.min.js +2 -1
- package/dist/semiotic-server-edge-node.module.min.js +1 -0
- package/dist/semiotic-server-edge.d.ts +3 -2
- package/dist/semiotic-server-edge.min.js +1 -1
- package/dist/semiotic-server-edge.module.min.js +1 -1
- package/dist/semiotic-server-node.min.js +1 -1
- package/dist/semiotic-server-node.module.min.js +1 -1
- package/dist/semiotic-server.d.ts +3 -2
- package/dist/semiotic-themes-core.d.ts +5 -48
- package/dist/semiotic-themes-core.min.js +1 -1
- package/dist/semiotic-themes-core.module.min.js +1 -1
- package/dist/semiotic-themes-react.min.js +1 -1
- package/dist/semiotic-themes-react.module.min.js +1 -1
- package/dist/semiotic-themes.min.js +1 -1
- package/dist/semiotic-themes.module.min.js +1 -1
- package/dist/semiotic-utils-core.d.ts +11 -5
- package/dist/semiotic-utils-core.min.js +1 -1
- package/dist/semiotic-utils-core.module.min.js +1 -1
- package/dist/semiotic-utils-react.d.ts +2 -0
- package/dist/semiotic-utils-react.min.js +1 -1
- package/dist/semiotic-utils-react.module.min.js +1 -1
- package/dist/semiotic-utils.min.js +2 -1
- package/dist/semiotic-utils.module.min.js +2 -1
- package/dist/semiotic-value.min.js +1 -1
- package/dist/semiotic-value.module.min.js +1 -1
- package/dist/semiotic-xy.d.ts +4 -1
- package/dist/semiotic.d.ts +68 -25
- package/dist/semiotic.min.js +1 -1
- package/dist/semiotic.module.min.js +1 -1
- package/dist/server.min.js +1 -1
- package/dist/server.module.min.js +1 -1
- package/dist/xy.min.js +1 -1
- package/dist/xy.module.min.js +1 -1
- package/package.json +53 -19
- package/dist/__tests__/scenarios/mcpProtocolTypes.d.ts +0 -20
- package/dist/chunk-OrdinalBrushOverlay-PXHQYDB2.module.min.js +0 -2
- package/dist/chunk-XYBrushOverlay-ECZJJLAJ.module.min.js +0 -1
- package/dist/chunk-XYBrushOverlay-EP2SV3UI.module.min.js +0 -2
- package/dist/chunk-chartContainerDataAudit-IQ3NBN3Q.module.min.js +0 -2
- package/dist/chunk-chunk-2B3AIKUZ.module.min.js +0 -2
- package/dist/chunk-chunk-2CXCXRB4.module.min.js +0 -1
- package/dist/chunk-chunk-3GCILWPB.module.min.js +0 -2
- package/dist/chunk-chunk-46KRGJQP.module.min.js +0 -1
- package/dist/chunk-chunk-4ITOQRXM.module.min.js +0 -2
- package/dist/chunk-chunk-4MLLQUGW.module.min.js +0 -2
- package/dist/chunk-chunk-57RBPDBQ.module.min.js +0 -2
- package/dist/chunk-chunk-5UKL5W76.module.min.js +0 -2
- package/dist/chunk-chunk-5VVNW5AZ.module.min.js +0 -1
- package/dist/chunk-chunk-66PCWJUG.module.min.js +0 -1
- package/dist/chunk-chunk-6V5VQVCT.module.min.js +0 -2
- package/dist/chunk-chunk-7LE56WAE.module.min.js +0 -2
- package/dist/chunk-chunk-7T25U75Z.module.min.js +0 -2
- package/dist/chunk-chunk-ACLDBMRH.module.min.js +0 -2
- package/dist/chunk-chunk-AF53TBSN.module.min.js +0 -2
- package/dist/chunk-chunk-BTZYH2IE.module.min.js +0 -1
- package/dist/chunk-chunk-BWV55BZK.module.min.js +0 -2
- package/dist/chunk-chunk-BZNOAHJV.module.min.js +0 -2
- package/dist/chunk-chunk-CD6PVVS3.module.min.js +0 -2
- package/dist/chunk-chunk-DTSNLGRK.module.min.js +0 -2
- package/dist/chunk-chunk-FC3NZWYR.module.min.js +0 -2
- package/dist/chunk-chunk-FEPXDKJP.module.min.js +0 -1
- package/dist/chunk-chunk-FJ76HWQZ.module.min.js +0 -1
- package/dist/chunk-chunk-FRGBMTZR.module.min.js +0 -1
- package/dist/chunk-chunk-G75OPF5N.module.min.js +0 -2
- package/dist/chunk-chunk-H5IFO6CU.module.min.js +0 -2
- package/dist/chunk-chunk-HADHLMY5.module.min.js +0 -1
- package/dist/chunk-chunk-HBFA4NN6.module.min.js +0 -1
- package/dist/chunk-chunk-HCNDE26Q.module.min.js +0 -2
- package/dist/chunk-chunk-IY7RYD4S.module.min.js +0 -1
- package/dist/chunk-chunk-J3QOW4OE.module.min.js +0 -0
- package/dist/chunk-chunk-J3XWETBJ.module.min.js +0 -2
- package/dist/chunk-chunk-JJ4BSUYL.module.min.js +0 -2
- package/dist/chunk-chunk-JRHXQGEV.module.min.js +0 -2
- package/dist/chunk-chunk-KTWEBFMX.module.min.js +0 -2
- package/dist/chunk-chunk-L6FFYGYS.module.min.js +0 -1
- package/dist/chunk-chunk-LJDH3WV3.module.min.js +0 -2
- package/dist/chunk-chunk-LSJUXBMF.module.min.js +0 -1
- package/dist/chunk-chunk-N3Q33XCB.module.min.js +0 -2
- package/dist/chunk-chunk-NWIGA3UK.module.min.js +0 -1
- package/dist/chunk-chunk-OG3TTJGJ.module.min.js +0 -2
- package/dist/chunk-chunk-OZK46A5U.module.min.js +0 -1
- package/dist/chunk-chunk-PMR47KRY.module.min.js +0 -2
- package/dist/chunk-chunk-Q2YADC2V.module.min.js +0 -2
- package/dist/chunk-chunk-QQJNG23C.module.min.js +0 -2
- package/dist/chunk-chunk-RGJ6TKAH.module.min.js +0 -2
- package/dist/chunk-chunk-ROP4HI7H.module.min.js +0 -2
- package/dist/chunk-chunk-SFLUSZ73.module.min.js +0 -2
- package/dist/chunk-chunk-TCMHJWFJ.module.min.js +0 -1
- package/dist/chunk-chunk-TSCFL235.module.min.js +0 -1
- package/dist/chunk-chunk-U66USBWU.module.min.js +0 -1
- package/dist/chunk-chunk-UEZ6SHW5.module.min.js +0 -2
- package/dist/chunk-chunk-UOQRPGPK.module.min.js +0 -2
- package/dist/chunk-chunk-VUWYT7DY.module.min.js +0 -2
- package/dist/chunk-chunk-W5HWGQMD.module.min.js +0 -2
- package/dist/chunk-chunk-WFHZHWT7.module.min.js +0 -1
- package/dist/chunk-chunk-WGROBM3I.module.min.js +0 -2
- package/dist/chunk-chunk-WSDJFBKX.module.min.js +0 -2
- package/dist/chunk-chunk-YHNZCPOZ.module.min.js +0 -2
- package/dist/chunk-chunk-YWZB3KPI.module.min.js +0 -2
- package/dist/chunk-statisticalOverlays-HMYYSGPE.module.min.js +0 -2
- package/dist/components/stream/test-utils/frameScheduler.d.ts +0 -12
- package/dist/components/stream/test-utils/revisionConsumption.d.ts +0 -13
- package/dist/test-utils/canvasMock.d.ts +0 -86
- package/dist/test-utils/capturedFrameProps.d.ts +0 -67
- package/dist/test-utils/frameMock.d.ts +0 -81
- package/dist/test-utils/ordinalFixtures.d.ts +0 -48
- /package/dist/{chunk-chunk-JJ2OOIET.module.min.js → c-GGISSW5E.min.js} +0 -0
- /package/dist/{chunk-chunk-SIRIJ3DY.module.min.js → c-N4G2L7ID.min.js} +0 -0
- /package/dist/{chunk-chunk-CA3YDW6F.module.min.js → c-S6U5CGT5.min.js} +0 -0
- /package/dist/components/recipes/{mobileAnnotationStrategy.d.ts → mobileAnnotationBehavior.d.ts} +0 -0
package/dist/xy.module.min.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import{
|
|
2
|
+
import{AreaChart as m,BubbleChart as i,BumpChart as r,CandlestickChart as o,ConnectedScatterplot as t,DifferenceChart as p,Heatmap as s,LineChart as c,MinimapChart as j,MultiAxisLineChart as n,QuadrantChart as I,Scatterplot as W,ScatterplotMatrix as E,StackedAreaChart as G,XYCustomChart as S,rankBumpData as f}from"./c-KII3PLZE.min.js";import"./c-SLGMUBUL.min.js";import"./c-RSVIHIQ4.min.js";import{StreamXYFrame_default as K}from"./c-UUKVD4WB.min.js";import"./c-W3CE4A4S.min.js";import"./c-C25ENHIK.min.js";import"./c-RR3GO5SW.min.js";import{DEFAULT_HIT_RADIUS as N,hitTargetPoint as U,hitTargetRect as D}from"./c-3BLJEQNG.min.js";import"./c-3KZD6AXJ.min.js";import"./c-ZOWWU34K.min.js";import"./c-MG5DM6VE.min.js";import"./c-OCI56QF2.min.js";import"./c-GPYOFETM.min.js";import{useCustomLayoutSelection as L}from"./c-G36WS6LN.min.js";import{composeStyleRules as R,makeRuleValueResolver as Y,makeXYRuleContext as B,matchesThreshold as C,resolveStyleRules as F,ruleMatches as J}from"./c-S2BXNNJN.min.js";import{MultiLineTooltip as M,MultiPointTooltip as O,Tooltip as Q,TooltipRoot as X,glyphExtent as a,glyphPlacement as e,hatchFillId as A,hatchPatternDef as V,isHatchFill as Z,markTooltipChrome as H,resolveResponsiveRules as P,resolveSvgFill as x,responsiveRuleMatches as T}from"./c-GIKRQI4X.min.js";import"./c-YDAY2WFR.min.js";import"./c-WJCD5EUY.min.js";export{m as AreaChart,i as BubbleChart,r as BumpChart,o as CandlestickChart,t as ConnectedScatterplot,N as DEFAULT_HIT_RADIUS,p as DifferenceChart,s as Heatmap,c as LineChart,j as MinimapChart,n as MultiAxisLineChart,M as MultiLineTooltip,O as MultiPointTooltip,I as QuadrantChart,W as Scatterplot,E as ScatterplotMatrix,G as StackedAreaChart,K as StreamXYFrame,Q as Tooltip,X as TooltipRoot,S as XYCustomChart,R as composeStyleRules,a as glyphExtent,e as glyphPlacement,A as hatchFillId,V as hatchPatternDef,U as hitTargetPoint,D as hitTargetRect,Z as isHatchFill,Y as makeRuleValueResolver,B as makeXYRuleContext,H as markTooltipChrome,C as matchesThreshold,f as rankBumpData,P as resolveResponsiveRules,F as resolveStyleRules,x as resolveSvgFill,T as responsiveRuleMatches,J as ruleMatches,L as useCustomLayoutSelection};
|
package/package.json
CHANGED
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "semiotic",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.9.0",
|
|
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",
|
|
7
7
|
"module": "dist/semiotic.module.min.js",
|
|
8
|
+
"browser": {
|
|
9
|
+
"react-dom/server": "react-dom/server.browser"
|
|
10
|
+
},
|
|
8
11
|
"types": "dist/semiotic.d.ts",
|
|
9
12
|
"sideEffects": false,
|
|
10
13
|
"bin": {
|
|
@@ -86,6 +89,10 @@
|
|
|
86
89
|
},
|
|
87
90
|
"./server/edge": {
|
|
88
91
|
"types": "./dist/semiotic-server-edge.d.ts",
|
|
92
|
+
"node": {
|
|
93
|
+
"import": "./dist/semiotic-server-edge-node.module.min.js",
|
|
94
|
+
"require": "./dist/semiotic-server-edge.min.js"
|
|
95
|
+
},
|
|
89
96
|
"import": "./dist/semiotic-server-edge.module.min.js",
|
|
90
97
|
"require": "./dist/semiotic-server-edge.min.js",
|
|
91
98
|
"default": "./dist/semiotic-server-edge.module.min.js"
|
|
@@ -182,6 +189,10 @@
|
|
|
182
189
|
},
|
|
183
190
|
"./experimental": {
|
|
184
191
|
"types": "./dist/semiotic-experimental.d.ts",
|
|
192
|
+
"node": {
|
|
193
|
+
"import": "./dist/semiotic-experimental-node.module.min.js",
|
|
194
|
+
"require": "./dist/semiotic-experimental.min.js"
|
|
195
|
+
},
|
|
185
196
|
"import": "./dist/semiotic-experimental.module.min.js",
|
|
186
197
|
"require": "./dist/semiotic-experimental.min.js",
|
|
187
198
|
"default": "./dist/semiotic-experimental.module.min.js"
|
|
@@ -209,6 +220,7 @@
|
|
|
209
220
|
"dist/processSankeyLayoutWorker.js",
|
|
210
221
|
"ai/schema.json",
|
|
211
222
|
"ai/surface-manifest.json",
|
|
223
|
+
"ai/reference.md",
|
|
212
224
|
"ai/system-prompt.md",
|
|
213
225
|
"ai/examples.md",
|
|
214
226
|
"ai/componentMetadata.cjs",
|
|
@@ -218,7 +230,6 @@
|
|
|
218
230
|
"ai/dist/*.js",
|
|
219
231
|
"agent-skill/semiotic-charts/SKILL.md",
|
|
220
232
|
"spec/**/*",
|
|
221
|
-
"CLAUDE.md",
|
|
222
233
|
"README.md",
|
|
223
234
|
"LICENSE"
|
|
224
235
|
],
|
|
@@ -228,6 +239,7 @@
|
|
|
228
239
|
"build:analyze": "node scripts/build.mjs --analyze",
|
|
229
240
|
"build:prod": "node scripts/build.mjs --production",
|
|
230
241
|
"test": "vitest run",
|
|
242
|
+
"pretest:coverage": "npm run dist:prod",
|
|
231
243
|
"test:coverage": "vitest run --coverage && node scripts/check-risk-weighted-coverage.mjs",
|
|
232
244
|
"check:coverage-risk": "node scripts/check-risk-weighted-coverage.mjs",
|
|
233
245
|
"test:coverage-risk": "node --test scripts/risk-weighted-coverage.test.mjs",
|
|
@@ -241,16 +253,22 @@
|
|
|
241
253
|
"bench": "vitest bench",
|
|
242
254
|
"bench:ui": "vitest bench --ui",
|
|
243
255
|
"bench:baseline": "node scripts/save-bench-baseline.mjs",
|
|
244
|
-
"bench:compare": "node scripts/
|
|
256
|
+
"bench:compare": "node scripts/bench-pr-vs-main.mjs --previous-tag",
|
|
257
|
+
"bench:compare:committed": "node scripts/compare-bench-baseline.mjs",
|
|
245
258
|
"bench:pr-vs-main": "node scripts/bench-pr-vs-main.mjs",
|
|
259
|
+
"bench:release-vs-previous": "node scripts/bench-pr-vs-main.mjs --previous-tag",
|
|
246
260
|
"baseline:machine": "node scripts/machine-baseline.mjs --write",
|
|
261
|
+
"compare:machine-baseline": "node scripts/machine-baseline.mjs --compare",
|
|
247
262
|
"check:machine-baseline": "node scripts/machine-baseline.mjs --check",
|
|
263
|
+
"precheck:machine-baseline": "npm run check:mcp-bundle",
|
|
248
264
|
"print:machine-baseline": "node scripts/machine-baseline.mjs --print",
|
|
249
265
|
"test:machine-baseline": "node --test scripts/machine-baseline.test.mjs",
|
|
250
266
|
"baseline:browser": "node scripts/browser-baseline.mjs --write",
|
|
267
|
+
"compare:browser-baseline": "node scripts/browser-baseline.mjs --compare",
|
|
251
268
|
"check:browser-baseline": "node scripts/browser-baseline.mjs --check",
|
|
252
269
|
"print:browser-baseline": "node scripts/browser-baseline.mjs --print",
|
|
253
270
|
"test:browser-baseline": "node --test scripts/browser-baseline.test.mjs",
|
|
271
|
+
"test:release-infrastructure": "node --test scripts/bench-manifest.test.mjs scripts/bench-results.test.mjs scripts/browser-baseline.test.mjs scripts/machine-baseline.test.mjs scripts/prerender-determinism.test.mjs scripts/risk-weighted-coverage.test.mjs",
|
|
254
272
|
"baseline:stream-file-sizes": "node scripts/stream-file-size-ratchet.mjs --write",
|
|
255
273
|
"report:stream-file-sizes": "node scripts/stream-file-size-ratchet.mjs",
|
|
256
274
|
"test:stream-file-size-ratchet": "node --test scripts/stream-file-size-ratchet.test.mjs",
|
|
@@ -260,6 +278,9 @@
|
|
|
260
278
|
"dist:prod": "node scripts/build.mjs --production",
|
|
261
279
|
"lint": "eslint src",
|
|
262
280
|
"lint:fix": "eslint src --fix",
|
|
281
|
+
"check:custom-lints": "node --test scripts/custom-lint/*.test.mjs && node scripts/check-custom-lints.mjs",
|
|
282
|
+
"lint:custom:sync-fixes": "node scripts/check-custom-lints.mjs --sync-baseline=bug-fix",
|
|
283
|
+
"lint:custom:sync-rule-change": "node scripts/check-custom-lints.mjs --sync-baseline=rule-change",
|
|
263
284
|
"create-release-branch": "sh ./scripts/create-release-branch.sh",
|
|
264
285
|
"publish-release": "sh ./scripts/publish-release.sh",
|
|
265
286
|
"release:artifact": "node scripts/create-release-artifact.mjs",
|
|
@@ -282,10 +303,11 @@
|
|
|
282
303
|
"generate:example-og-cards": "node scripts/generate-example-og-cards.mjs",
|
|
283
304
|
"generate:blog-rss": "node scripts/generate-blog-rss.mjs",
|
|
284
305
|
"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",
|
|
285
|
-
"check:website-build": "npm run website:build",
|
|
306
|
+
"check:website-build": "npm run website:build && npm run check:docs-asset-sizes && npm run check:protected-doc-boundaries",
|
|
286
307
|
"build:mcp": "node scripts/build-mcp.mjs",
|
|
287
|
-
"
|
|
288
|
-
"docs:api
|
|
308
|
+
"check:mcp-bundle": "node scripts/check-mcp-bundle.mjs",
|
|
309
|
+
"docs:api": "typedoc --gitRevision \"v$npm_package_version\"",
|
|
310
|
+
"docs:api:json": "typedoc --gitRevision \"v$npm_package_version\" --json docs/public/api/api.json && node scripts/generate-component-descriptions.mjs",
|
|
289
311
|
"docs:descriptions:json": "node scripts/generate-component-descriptions.mjs",
|
|
290
312
|
"typescript": "tsc --noEmit",
|
|
291
313
|
"typescript:tests": "node scripts/check-test-types.mjs",
|
|
@@ -296,17 +318,23 @@
|
|
|
296
318
|
"check:multi-import-size": "node scripts/check-multi-import-size.mjs",
|
|
297
319
|
"check:pack": "node scripts/smoke-pack.mjs",
|
|
298
320
|
"check:api-surface": "node scripts/check-api-surface.mjs",
|
|
321
|
+
"check:api-compat": "npm run test:api-compatibility && node scripts/check-api-compatibility.mjs",
|
|
322
|
+
"build:declarations": "node scripts/build.mjs --declarations-only",
|
|
323
|
+
"test:api-compatibility": "npm run build:declarations && node --test scripts/api-compatibility.test.mjs",
|
|
324
|
+
"check:protected-doc-boundaries": "node scripts/check-protected-doc-boundaries.mjs",
|
|
325
|
+
"test:protected-doc-boundaries": "node --test scripts/check-protected-doc-boundaries.test.mjs",
|
|
299
326
|
"docs:api-surface": "node scripts/generate-api-surface.mjs",
|
|
300
327
|
"docs:package-surface": "node scripts/generate-package-surface-manifest.mjs",
|
|
301
328
|
"docs:ai-contracts": "node scripts/generate-ai-behavior-contracts.mjs",
|
|
302
329
|
"docs:ai-instructions": "node scripts/sync-ai-instructions.mjs",
|
|
303
330
|
"docs:ai-surface": "node scripts/generate-ai-surface-manifest.mjs",
|
|
304
|
-
"check:
|
|
331
|
+
"check:ai-reference-coverage": "node scripts/check-ai-reference-coverage.js",
|
|
305
332
|
"check:context7": "node scripts/check-context7.mjs",
|
|
306
333
|
"check:mcp-registry": "node scripts/check-mcp-registry.mjs",
|
|
334
|
+
"check:mcp-registry-live": "node scripts/check-mcp-registry-live.mjs",
|
|
307
335
|
"check:surface": "node scripts/check-surface-parity.js",
|
|
308
|
-
"check:package-surface": "node scripts/generate-package-surface-manifest.mjs --check",
|
|
309
|
-
"check:ai-surface": "node scripts/generate-ai-surface-manifest.mjs --check",
|
|
336
|
+
"check:package-surface": "node scripts/generate-package-surface-manifest.mjs --check && node --test scripts/public-entrypoints.test.mjs && node scripts/check-public-entrypoints.mjs",
|
|
337
|
+
"check:ai-surface": "node scripts/generate-ai-surface-manifest.mjs --check && node --test scripts/ai-surface-manifest.test.mjs",
|
|
310
338
|
"check:agent-skill": "node scripts/check-agent-skill.mjs",
|
|
311
339
|
"eval:ai": "node scripts/run-ai-evals.mjs",
|
|
312
340
|
"eval:ai:openai": "node scripts/run-openai-ai-evals.mjs",
|
|
@@ -319,6 +347,7 @@
|
|
|
319
347
|
"check:ssr": "node scripts/check-ssr-alignment.js",
|
|
320
348
|
"check:capabilities": "node scripts/check-capabilities.mjs",
|
|
321
349
|
"check:visual-baseline-capabilities": "node scripts/check-visual-baseline-capabilities.mjs",
|
|
350
|
+
"check:playwright-alignment": "node scripts/check-playwright-version-alignment.mjs",
|
|
322
351
|
"check:capability-coverage": "node scripts/check-capability-coverage.mjs",
|
|
323
352
|
"scorecard": "node scripts/run-capability-scorecard.mjs",
|
|
324
353
|
"docs:capabilities": "node scripts/generate-capabilities-md.mjs && node scripts/generate-capabilities-json.mjs",
|
|
@@ -327,12 +356,14 @@
|
|
|
327
356
|
"check:cloud-run-nightly": "node scripts/check-cloud-run-nightly.mjs",
|
|
328
357
|
"check:cloud-run-lock": "node scripts/check-cloud-run-manifest.mjs --require-lockfile",
|
|
329
358
|
"check:cloud-run-release": "node scripts/check-cloud-run-manifest.mjs --require-lockfile --require-root-version",
|
|
359
|
+
"prepare:cloud-run-release": "node scripts/prepare-cloud-run-release.mjs",
|
|
330
360
|
"check:ai-schema": "node scripts/check-ai-schema-valid.mjs",
|
|
331
361
|
"docs:chart-specs:schema": "npx tsx scripts/regenerate-schema.ts",
|
|
332
362
|
"check:test-quality": "node scripts/check-test-quality-gate.mjs",
|
|
333
363
|
"test:cloud-run-manifest": "node --test scripts/cloud-run-manifest.test.mjs",
|
|
334
364
|
"test:cloud-run-nightly": "node --test scripts/cloud-run-nightly-manifest.test.mjs",
|
|
335
365
|
"test:smoke-hosted-mcp": "node --test scripts/smoke-hosted-mcp.test.mjs",
|
|
366
|
+
"test:mcp-registry-live": "node --test scripts/mcp-registry-live.test.mjs",
|
|
336
367
|
"check:file-size": "node scripts/check-file-size.mjs",
|
|
337
368
|
"check:jsdoc-coverage": "node scripts/check-jsdoc-coverage.mjs",
|
|
338
369
|
"check:ai-examples-coverage": "node scripts/check-ai-examples-coverage.mjs",
|
|
@@ -341,19 +372,22 @@
|
|
|
341
372
|
"check:docs-example-integrity": "node scripts/check-docs-example-integrity.mjs",
|
|
342
373
|
"check:docs-prop-tables": "npx tsx scripts/check-docs-prop-tables.ts",
|
|
343
374
|
"check:docs-playground-controls": "npx tsx scripts/check-docs-playground-controls.ts",
|
|
375
|
+
"check:docs-asset-sizes": "node scripts/check-docs-asset-sizes.mjs",
|
|
344
376
|
"check:mobile-visualization": "npm run dist && playwright test integration-tests/mobile-visualization-harness.spec.ts --project=chromium",
|
|
345
377
|
"docs:llms": "npx tsx scripts/generate-llms-txt.mjs",
|
|
346
378
|
"check:llms": "npx tsx scripts/generate-llms-txt.mjs --check",
|
|
347
379
|
"check:blog-entries": "node scripts/check-blog-entry-sync.mjs",
|
|
348
380
|
"check:bundle-sizes": "node scripts/sync-bundle-sizes.mjs --check",
|
|
349
381
|
"check:cold-consumer": "node scripts/measure-cold-consumer.mjs --check",
|
|
350
|
-
"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",
|
|
382
|
+
"check:fast": "npm run check:router-alignment && npm run check:playwright-alignment && npm run lint && npm run check:custom-lints && 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:protected-doc-boundaries && npm run check:package-surface && npm run check:bundle-sizes && npm run check:cold-consumer && npm run size",
|
|
351
383
|
"docs:bundle-sizes": "node scripts/sync-bundle-sizes.mjs",
|
|
352
384
|
"docs:cold-consumer": "node scripts/measure-cold-consumer.mjs --write",
|
|
353
385
|
"docs:readme-dashboard": "npx tsx scripts/generate-readme-dashboard.tsx",
|
|
354
386
|
"check:readme-dashboard": "npx tsx scripts/generate-readme-dashboard.tsx --check",
|
|
355
|
-
"
|
|
356
|
-
"
|
|
387
|
+
"check:release-version-alignment": "node scripts/check-release-version-alignment.mjs",
|
|
388
|
+
"check:typedoc": "typedoc --emit none",
|
|
389
|
+
"release:check": "npm run test:examples:source && npm run check:release-version-alignment && npm run check:playwright-alignment && npm run lint && npm run check:file-size && npm run typescript && npm run typescript:tests && npm run build:declarations && npm run typescript:mcp && npm run check:mcp-bundle && npm run build:mcp && npm run test:coverage && npm run test:protected-doc-boundaries && npm run test:release-infrastructure && 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:ai-reference-coverage && npm run check:context7 && npm run check:mcp-registry && npm run test:mcp-registry-live && 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:typedoc && npm run check:website-build && npm run check:package-surface && npm run check:api-surface && npm run check:api-compat && npm run check:protected-doc-boundaries && npm run check:readme-dashboard && npm run check:bundle-sizes && npm run check:cold-consumer && npm run size && npm run check:pack && npm run check:machine-baseline && npm run check:browser-baseline && npm pack --dry-run",
|
|
390
|
+
"prepublishOnly": "npm run test:examples:source && npm run check:release-version-alignment && npm run check:playwright-alignment && npm run lint && npm run check:file-size && npm run typescript && npm run typescript:tests && npm run build:declarations && npm run typescript:mcp && npm run check:mcp-bundle && npm run build:mcp && npm run test:coverage && npm run test:protected-doc-boundaries && npm run test:release-infrastructure && 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:llms && npm run check:blog-entries && npm run check:ai-reference-coverage && npm run check:context7 && npm run check:mcp-registry && npm run test:mcp-registry-live && 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:typedoc && rm -rf dist && npm run check:website-build && npm run check:package-surface && npm run check:api-surface && npm run check:api-compat && npm run check:protected-doc-boundaries && npm run check:readme-dashboard && npm run check:bundle-sizes && npm run size && npm run check:machine-baseline && npm run check:browser-baseline",
|
|
357
391
|
"check:router-alignment": "node scripts/check-router-alignment.mjs"
|
|
358
392
|
},
|
|
359
393
|
"repository": {
|
|
@@ -442,10 +476,10 @@
|
|
|
442
476
|
"devDependencies": {
|
|
443
477
|
"@axe-core/playwright": "^4.12.1",
|
|
444
478
|
"@eslint/compat": "^2.1.0",
|
|
445
|
-
"@eslint/js": "^
|
|
446
|
-
"@modelcontextprotocol/sdk": "^1.
|
|
447
|
-
"@playwright/test": "
|
|
448
|
-
"@size-limit/file": "^
|
|
479
|
+
"@eslint/js": "^9.39.5",
|
|
480
|
+
"@modelcontextprotocol/sdk": "^1.30.0",
|
|
481
|
+
"@playwright/test": "1.61.1",
|
|
482
|
+
"@size-limit/file": "^12.1.0",
|
|
449
483
|
"@testing-library/dom": "^10.4.1",
|
|
450
484
|
"@testing-library/jest-dom": "^7.0.0",
|
|
451
485
|
"@testing-library/react": "^16.3.2",
|
|
@@ -475,7 +509,7 @@
|
|
|
475
509
|
"d3-dsv": "^3.0.1",
|
|
476
510
|
"d3-flextree-v4": "^1.0.1",
|
|
477
511
|
"esbuild": "0.28.1",
|
|
478
|
-
"eslint": "^10.
|
|
512
|
+
"eslint": "^10.8.1",
|
|
479
513
|
"eslint-plugin-react": "^7.37.5",
|
|
480
514
|
"eslint-plugin-react-hooks": "^7.1.1",
|
|
481
515
|
"ffmpeg-static": "^5.3.0",
|
|
@@ -484,7 +518,7 @@
|
|
|
484
518
|
"gofish-ir": "^0.1.0-nightly.20260624",
|
|
485
519
|
"marked": "^18.0.6",
|
|
486
520
|
"marked-gfm-heading-id": "^4.1.4",
|
|
487
|
-
"playwright-chromium": "
|
|
521
|
+
"playwright-chromium": "1.61.1",
|
|
488
522
|
"prettier": "^3.9.5",
|
|
489
523
|
"react": "^19.2.7",
|
|
490
524
|
"react-dom": "^19.2.7",
|
|
@@ -559,7 +593,7 @@
|
|
|
559
593
|
]
|
|
560
594
|
},
|
|
561
595
|
"engines": {
|
|
562
|
-
"node": "
|
|
596
|
+
"node": ">=22.12.0"
|
|
563
597
|
},
|
|
564
598
|
"volta": {
|
|
565
599
|
"node": "22.22.1"
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import type { Datum } from "../../components/charts/shared/datumTypes";
|
|
2
|
-
export interface JsonRpcResponse {
|
|
3
|
-
jsonrpc: "2.0";
|
|
4
|
-
id: string | number;
|
|
5
|
-
result: Datum;
|
|
6
|
-
error?: Datum;
|
|
7
|
-
}
|
|
8
|
-
export interface ListedMcpTool {
|
|
9
|
-
name: string;
|
|
10
|
-
_meta?: {
|
|
11
|
-
ui?: {
|
|
12
|
-
resourceUri: string;
|
|
13
|
-
};
|
|
14
|
-
"openai/outputTemplate"?: string;
|
|
15
|
-
};
|
|
16
|
-
annotations?: {
|
|
17
|
-
readOnlyHint?: boolean;
|
|
18
|
-
destructiveHint?: boolean;
|
|
19
|
-
};
|
|
20
|
-
}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import{useBrushAccessibility as r}from"./chunk-chunk-RZH7VZYS.module.min.js";import{useRef as t,useEffect as e}from"react";import{select as n}from"d3-selection";import{brushX as c,brushY as u}from"d3-brush";import{jsx as l,jsxs as i}from"react/jsx-runtime";function o({width:o,height:s,totalWidth:a,totalHeight:h,margin:m,scales:d,onBrush:f}){const p=t(null),v=t(null),b=t(f);b.current=f;const g=t(d);g.current=d;const x=t(!1),M=t(null),k="horizontal"===d?.projection,w=t(k);w.current=k;const y=r({label:"Ordinal value range brush",onAction:r=>{const t=g.current,e=v.current;if(!t||!e||!p.current)return;const c=n(p.current).select(".brush-g");if("clear"===r.type)return x.current=!0,c.call(e.move,null),x.current=!1,M.current=null,void b.current(null);if(("left"===r.direction||"right"===r.direction)!=!!w.current)return;const u=t.r.domain(),[l,i]=[Math.min(...u),Math.max(...u)],o=(i-l)/20,s=M.current?.r??[l+.4*(i-l),l+.6*(i-l)],a="left"===r.direction||"down"===r.direction?-1:1;let[h,m]=s;if(r.resize)0>a?h=Math.max(l,h-o):m=Math.min(i,m+o);else{const r=m-h;h=Math.max(l,Math.min(i-r,h+a*o)),m=h+r}const d={r:[h,m]};x.current=!0,c.call(e.move,w.current?[t.r(h),t.r(m)]:[t.r(m),t.r(h)]),x.current=!1,M.current=d,b.current(d)}});return e(()=>{if(!p.current)return;const r=n(p.current).select(".brush-g"),t=k?c():u();return t.extent([[0,0],[o,s]]),t.on("brush end",r=>{if(x.current)return;const t=g.current;if(!t)return;if(!r.selection)return M.current=null,void b.current(null);const[e,n]=r.selection;let c;c=w.current?[t.r.invert(e),t.r.invert(n)]:[t.r.invert(n),t.r.invert(e)];const u={r:c};M.current=u,b.current(u)}),r.call(t),v.current=t,r.select(".selection").attr("fill","steelblue").attr("fill-opacity",.15).attr("stroke","steelblue").attr("stroke-width",1),()=>{t.on("brush end",null),v.current=null}},[o,s,k]),e(()=>{if(!d||!v.current||!M.current)return;if(!p.current)return;const r=M.current,t=n(p.current).select(".brush-g"),e=d.r(r.r[0]),c=d.r(r.r[1]);k?(x.current=!0,t.call(v.current.move,[e,c]),x.current=!1):(x.current=!0,t.call(v.current.move,[c,e]),x.current=!1)},[d,k]),i("svg",{ref:p,width:a,height:h,...y.svgProps,style:{position:"absolute",top:0,left:0,pointerEvents:"none"},children:[l("title",{children:y.svgProps["aria-label"]}),l("desc",{id:y.descriptionId,children:y.description}),l("g",{className:"brush-g",transform:`translate(${m.left},${m.top})`,style:{pointerEvents:"all"}})]})}export{o as OrdinalBrushOverlay};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{useRef as e,useEffect as r,useMemo as t}from"react";import{select as n}from"d3-selection";import{brush as i,brushX as c,brushY as o}from"d3-brush";import*as s from"react";import{jsx as u,jsxs as l}from"react/jsx-runtime";function a(e,r,t,n){const[i,c]=[Math.min(...r),Math.max(...r)],o=(c-i)/20;let[s,u]=e;if(n)0>t?s=Math.max(i,s-o):u=Math.min(c,u+o);else{const e=u-s;s=Math.max(i,Math.min(c-e,s+t*o)),u=s+e}return[s,u]}function d(e,r){let t=0,n=r.length-1;for(;n>t;){const i=t+n+1>>1;r[i]>e?n=i-1:t=i}return r[t]}function f(e,r){let t=0,n=r.length-1;for(;n>t;){const i=t+n>>1;e>r[i]?t=i+1:n=i}return r[t]}function h({width:h,height:y,totalWidth:x,totalHeight:p,margin:m,dimension:g,scales:v,onBrush:b,binSize:w,snap:k,binBoundaries:M,snapDuring:z,streaming:A}){const D=e(null),K=e(null),I=e(b);I.current=b;const E=e(v);E.current=v;const P=t(()=>M?[...M].sort((e,r)=>e-r):void 0,[M]),R=e(P);R.current=P;const U=e(!1),B=e(null),C=function({label:e="Data range brush",description:r="Use arrow keys to move the selected range, Shift plus an arrow key to resize it, and Escape to clear it.",onAction:t}={}){const n=s.useId().replace(/:/g,""),i=s.useRef(t);return i.current=t,{description:r,descriptionId:"semiotic-brush-description-"+n,svgProps:{role:"region",tabIndex:0,"aria-label":e,"aria-describedby":"semiotic-brush-description-"+n,onKeyDown:s.useCallback(e=>{const r=function(e){return"Escape"===e.key?{type:"clear"}:"ArrowLeft"===e.key?{type:"nudge",direction:"left",resize:e.shiftKey}:"ArrowRight"===e.key?{type:"nudge",direction:"right",resize:e.shiftKey}:"ArrowUp"===e.key?{type:"nudge",direction:"up",resize:e.shiftKey}:"ArrowDown"===e.key?{type:"nudge",direction:"down",resize:e.shiftKey}:null}(e);r&&(e.preventDefault(),i.current?.(r))},[])}}}({label:"xy"===g?"Two-dimensional data range brush":g.toUpperCase()+" data range brush",onAction:e=>{const r=E.current,t=K.current;if(!r||!t||!D.current)return;const i=n(D.current).select(".brush-g");if("clear"===e.type)return U.current=!0,i.call(t.move,null),U.current=!1,B.current=null,void I.current(null);const c=r.x.domain(),o=r.y.domain(),s=B.current;let u=s?.x??[c[0]+.4*(c[1]-c[0]),c[0]+.6*(c[1]-c[0])],l=s?.y??[o[0]+.4*(o[1]-o[0]),o[0]+.6*(o[1]-o[0])];const d="left"===e.direction||"right"===e.direction,f="left"===e.direction||"down"===e.direction?-1:1;if(d&&"y"!==g&&(u=a(u,c,f,e.resize)),d||"x"===g||(l=a(l,o,f,e.resize)),d&&"y"===g||!d&&"x"===g)return;const h={x:u,y:l};U.current=!0,i.call(t.move,"x"===g?[r.x(u[0]),r.x(u[1])]:"y"===g?[r.y(l[1]),r.y(l[0])]:[[r.x(u[0]),r.y(l[1])],[r.x(u[1]),r.y(l[0])]]),U.current=!1,B.current=h,I.current(h)}});return r(()=>{if(!D.current)return;const e=n(D.current).select(".brush-g"),r="x"===g?c():"y"===g?o():i();return r.extent([[0,0],[h,y]]),r.on("brush end",t=>{if(U.current)return;const n=E.current;if(!n)return;if(!t.selection)return B.current=null,void I.current(null);let i,c;if("x"===g){const[e,r]=t.selection;i=[n.x.invert(e),n.x.invert(r)],c=[n.y.invert(y),n.y.invert(0)]}else if("y"===g){const[e,r]=t.selection;i=[n.x.invert(0),n.x.invert(h)],c=[n.y.invert(r),n.y.invert(e)]}else{const[[e,r],[o,s]]=t.selection;i=[n.x.invert(e),n.x.invert(o)],c=[n.y.invert(s),n.y.invert(r)]}if("bin"===k&&"y"!==g&&("end"===t.type||"brush"===t.type&&z)){const c=R.current;c&&c.length>0?i=function(e,r){return 0===r.length?e:[d(e[0],r),f(e[1],r)]}(i,c):w&&w>0&&(i=[Math.floor(i[0]/w)*w,Math.ceil(i[1]/w)*w]);const o=n.x(i[0]),s=n.x(i[1]);if(U.current=!0,"x"===g)e.call(r.move,[o,s]);else if("xy"===g){const n=t.selection;e.call(r.move,[[o,n[0][1]],[s,n[1][1]]])}U.current=!1}const o={x:i,y:c};B.current=o,I.current(o)}),e.call(r),K.current=r,e.select(".selection").attr("fill","steelblue").attr("fill-opacity",.15).attr("stroke","steelblue").attr("stroke-width",1),()=>{r.on("brush end",null),K.current=null}},[h,y,g,k,w,z]),r(()=>{if(!(A&&v&&K.current&&B.current))return;if(!D.current)return;if("y"===g)return;const e=B.current,r=v.x.domain()[0],t=n(D.current).select(".brush-g");if(r>=e.x[1])return U.current=!0,t.call(K.current.move,null),U.current=!1,B.current=null,void I.current(null);let i=e.x[0],c=!1;if(r>e.x[0]){if(i=r,"bin"===k){const e=R.current;e&&e.length>0?i=f(r,e):w&&w>0&&(i=Math.ceil(r/w)*w)}if(i>=e.x[1])return U.current=!0,t.call(K.current.move,null),U.current=!1,B.current=null,void I.current(null);c=!0}const o=v.x(i),s=v.x(e.x[1]);if(U.current=!0,"x"===g)t.call(K.current.move,[o,s]);else{const r=v.y(e.y[1]),n=v.y(e.y[0]);t.call(K.current.move,[[o,r],[s,n]])}if(U.current=!1,c){const r={x:[i,e.x[1]],y:e.y};B.current=r,I.current(r)}},[v,A,g,k,w]),l("svg",{ref:D,width:x,height:p,...C.svgProps,style:{position:"absolute",top:0,left:0,pointerEvents:"all"},children:[u("title",{children:C.svgProps["aria-label"]}),u("desc",{id:C.descriptionId,children:C.description}),u("g",{className:"brush-g",transform:`translate(${m.left},${m.top})`})]})}export{h as XYBrushOverlay};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import{useBrushAccessibility as r}from"./chunk-chunk-RZH7VZYS.module.min.js";import{useRef as t,useEffect as e,useMemo as n}from"react";import{select as c}from"d3-selection";import{brush as i,brushX as l,brushY as u}from"d3-brush";import{jsx as o,jsxs as s}from"react/jsx-runtime";function a(r,t,e,n){const[c,i]=[Math.min(...t),Math.max(...t)],l=(i-c)/20;let[u,o]=r;if(n)0>e?u=Math.max(c,u-l):o=Math.min(i,o+l);else{const r=o-u;u=Math.max(c,Math.min(i-r,u+e*l)),o=u+r}return[u,o]}function f(r,t){let e=0,n=t.length-1;for(;n>e;){const c=e+n+1>>1;t[c]>r?n=c-1:e=c}return t[e]}function h(r,t){let e=0,n=t.length-1;for(;n>e;){const c=e+n>>1;r>t[c]?e=c+1:n=c}return t[e]}function x({width:x,height:d,totalWidth:m,totalHeight:y,margin:v,dimension:b,scales:g,onBrush:p,binSize:M,snap:w,binBoundaries:k,snapDuring:z,streaming:j}){const B=t(null),H=t(null),P=t(p);P.current=p;const S=t(g);S.current=g;const Y=n(()=>k?[...k].sort((r,t)=>r-t):void 0,[k]),Z=t(Y);Z.current=Y;const $=t(!1),A=t(null),C=r({label:"xy"===b?"Two-dimensional data range brush":b.toUpperCase()+" data range brush",onAction:r=>{const t=S.current,e=H.current;if(!t||!e||!B.current)return;const n=c(B.current).select(".brush-g");if("clear"===r.type)return $.current=!0,n.call(e.move,null),$.current=!1,A.current=null,void P.current(null);const i=t.x.domain(),l=t.y.domain(),u=A.current;let o=u?.x??[i[0]+.4*(i[1]-i[0]),i[0]+.6*(i[1]-i[0])],s=u?.y??[l[0]+.4*(l[1]-l[0]),l[0]+.6*(l[1]-l[0])];const f="left"===r.direction||"right"===r.direction,h="left"===r.direction||"down"===r.direction?-1:1;if(f&&"y"!==b&&(o=a(o,i,h,r.resize)),f||"x"===b||(s=a(s,l,h,r.resize)),f&&"y"===b||!f&&"x"===b)return;const x={x:o,y:s};$.current=!0,n.call(e.move,"x"===b?[t.x(o[0]),t.x(o[1])]:"y"===b?[t.y(s[1]),t.y(s[0])]:[[t.x(o[0]),t.y(s[1])],[t.x(o[1]),t.y(s[0])]]),$.current=!1,A.current=x,P.current(x)}});return e(()=>{if(!B.current)return;const r=c(B.current).select(".brush-g"),t="x"===b?l():"y"===b?u():i();return t.extent([[0,0],[x,d]]),t.on("brush end",e=>{if($.current)return;const n=S.current;if(!n)return;if(!e.selection)return A.current=null,void P.current(null);let c,i;if("x"===b){const[r,t]=e.selection;c=[n.x.invert(r),n.x.invert(t)],i=[n.y.invert(d),n.y.invert(0)]}else if("y"===b){const[r,t]=e.selection;c=[n.x.invert(0),n.x.invert(x)],i=[n.y.invert(t),n.y.invert(r)]}else{const[[r,t],[l,u]]=e.selection;c=[n.x.invert(r),n.x.invert(l)],i=[n.y.invert(u),n.y.invert(t)]}if("bin"===w&&"y"!==b&&("end"===e.type||"brush"===e.type&&z)){const i=Z.current;i&&i.length>0?c=function(r,t){return 0===t.length?r:[f(r[0],t),h(r[1],t)]}(c,i):M&&M>0&&(c=[Math.floor(c[0]/M)*M,Math.ceil(c[1]/M)*M]);const l=n.x(c[0]),u=n.x(c[1]);if($.current=!0,"x"===b)r.call(t.move,[l,u]);else if("xy"===b){const n=e.selection;r.call(t.move,[[l,n[0][1]],[u,n[1][1]]])}$.current=!1}const l={x:c,y:i};A.current=l,P.current(l)}),r.call(t),H.current=t,r.select(".selection").attr("fill","steelblue").attr("fill-opacity",.15).attr("stroke","steelblue").attr("stroke-width",1),()=>{t.on("brush end",null),H.current=null}},[x,d,b,w,M,z]),e(()=>{if(!(j&&g&&H.current&&A.current))return;if(!B.current)return;if("y"===b)return;const r=A.current,t=g.x.domain()[0],e=c(B.current).select(".brush-g");if(t>=r.x[1])return $.current=!0,e.call(H.current.move,null),$.current=!1,A.current=null,void P.current(null);let n=r.x[0],i=!1;if(t>r.x[0]){if(n=t,"bin"===w){const r=Z.current;r&&r.length>0?n=h(t,r):M&&M>0&&(n=Math.ceil(t/M)*M)}if(n>=r.x[1])return $.current=!0,e.call(H.current.move,null),$.current=!1,A.current=null,void P.current(null);i=!0}const l=g.x(n),u=g.x(r.x[1]);if($.current=!0,"x"===b)e.call(H.current.move,[l,u]);else{const t=g.y(r.y[1]),n=g.y(r.y[0]);e.call(H.current.move,[[l,t],[u,n]])}if($.current=!1,i){const t={x:[n,r.x[1]],y:r.y};A.current=t,P.current(t)}},[g,j,b,w,M]),s("svg",{ref:B,width:m,height:y,...C.svgProps,style:{position:"absolute",top:0,left:0,pointerEvents:"all"},children:[o("title",{children:C.svgProps["aria-label"]}),o("desc",{id:C.descriptionId,children:C.description}),o("g",{className:"brush-g",transform:`translate(${v.left},${v.top})`})]})}export{x as XYBrushOverlay};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import{auditData as r,toDataAuditNotifications as o}from"./chunk-chunk-2B3AIKUZ.module.min.js";import"./chunk-chunk-6V5VQVCT.module.min.js";function n(n,t){if(!t||!n?.component||!n.props)return[];const c="object"==typeof t?t:{};try{const t=r(n.component,n.props,void 0,{checkOutliers:c.checkOutliers});return o(t,{max:c.max,errorsOnly:c.errorsOnly})}catch{return[]}}export{n as buildChartDataAuditNotifications};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import{parseDateLikeString as e}from"./chunk-chunk-6V5VQVCT.module.min.js";function o(e,o){const s={numbers:[],missing:0,nonFinite:0,nonNumeric:0,zero:0,negative:0,fractional:0};for(const n of e){const e=n?.[o];if(null==e||""===e){s.missing++;continue}let t;if("number"==typeof e)t=e;else if("string"==typeof e){const o=e.trim();if(""===o){s.missing++;continue}const n=Number(o);Number.isNaN(n)?/^[+-]?nan$/i.test(o)&&(t=n):t=n}void 0!==t?Number.isFinite(t)?(s.numbers.push(t),0===t&&s.zero++,0>t&&s.negative++,Number.isInteger(t)||s.fractional++):s.nonFinite++:s.nonNumeric++}return s}function s(e,o){if(0===e.length)return;const s=(e.length-1)*o,n=Math.floor(s),t=Math.ceil(s);if(n===t)return e[n];const r=s-n;return e[n]*(1-r)+e[t]*r}function n(e,n={}){if(!Array.isArray(e)||0===e.length)return{};const t=new Set;for(const o of e)if(o&&"object"==typeof o)for(const e of Object.keys(o))t.add(e);const r={};for(const i of t){const t=o(e,i);let a=1/0,c=-1/0;for(const e of t.numbers)a>e&&(a=e),e>c&&(c=e);const l=!1===n.quantiles?void 0:[...t.numbers].sort((e,o)=>e-o);r[i]={field:i,observedCount:e.length-t.missing,finiteCount:t.numbers.length,missingCount:t.missing,nonFiniteCount:t.nonFinite,nonNumericCount:t.nonNumeric,zeroCount:t.zero,negativeCount:t.negative,fractionalCount:t.fractional,...t.numbers.length>0?{min:a,...l?{q1:s(l,.25),median:s(l,.5),q3:s(l,.75)}:{},max:c}:{}}}return r}function t(e){const o=[`${e.component}: ${e.ok?"✓ numerically safe":"✗ numeric hazards found"}`,`${e.rowCount} rows · ${e.summary.fieldsChecked} numeric fields · ${e.summary.errors} errors · ${e.summary.warnings} warnings`];for(const s of e.diagnoses)o.push(`${"error"===s.severity?"ERROR":"WARN"} ${s.code}${s.field?` [${s.field}]`:""}: ${s.message}`),s.fix&&o.push(" Fix: "+s.fix);return o.join("\n")}function r(e){return e.code.toLowerCase().split("_").map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(" ")}function i(e,o={}){const s=Number.isFinite(o.max)?Math.max(0,Math.floor(o.max)):6,n=e.diagnoses.map((e,o)=>({item:e,diagnosisIndex:o})).filter(({item:e})=>!o.errorsOnly||"error"===e.severity),t=n.slice(0,s).map(({item:e,diagnosisIndex:o})=>({id:`data-audit:${e.code}:${e.role??"chart"}:${e.field??"chart"}:${o}`,level:e.severity,title:e.field?`${r(e)} · ${e.field}`:r(e),message:e.fix?`${e.message} ${e.fix}`:e.message,source:"Semiotic data audit",dismissible:!0}));return n.length>s&&t.push({id:"data-audit:overflow:chart",level:n.slice(s).some(({item:e})=>"error"===e.severity)?"error":"warning",title:`${n.length-s} more numeric finding${n.length-s===1?"":"s"}`,message:"Run auditData() or diagnoseConfig() to inspect the complete report.",source:"Semiotic data audit",dismissible:!0}),t}function a(e,o){const s=e.nestedDataAccessorProp?o[e.nestedDataAccessorProp]:void 0;return"string"==typeof s?s:e.defaultNestedDataAccessor}function c(e,o,s){const n=e.dataProp??"data",t=o[n],r=s??(Array.isArray(t)?t:[]),i=a(e,o);if(!i)return{dataProp:n,rows:r};const c=[];let l=!1;for(const e of r){const o=e?.[i];if(Array.isArray(o)){l=!0;for(const e of o)e&&"object"==typeof e&&c.push(e)}}return{dataProp:n,rows:l?c:r}}var l=[{role:"x",accessor:"xAccessor",defaultAccessor:"x",temporalValues:"date-like",domain:!0},{role:"y",accessor:"yAccessor",defaultAccessor:"y",domain:!0}],u={fields:l},f=[{...l[0],nestedDataAccessorProp:"lineDataAccessor",defaultNestedDataAccessor:"coordinates"},{...l[1],nestedDataAccessorProp:"lineDataAccessor",defaultNestedDataAccessor:"coordinates",allowMissing:!0}],g={fields:f},d={role:"value",accessor:"valueAccessor",defaultAccessor:"value"},m={...d,domain:!0},h={fields:[{...d,requirements:["finite","non-negative"]}],aggregates:[{kind:"positive-total",role:"value"}]},p={fields:[d],aggregates:[{kind:"normalized-total",role:"value",groupAccessor:"categoryAccessor",defaultGroupAccessor:"category",whenProp:"normalize"}]},v={fields:f,aggregates:[{kind:"normalized-total",role:"y",groupAccessor:"xAccessor",defaultGroupAccessor:"x",whenProp:"normalize"}]},w={fields:[...l,{role:"size",accessor:"sizeBy",requirements:["finite","non-negative"]}]},y={fields:[...l,{role:"size",accessor:"sizeBy",requirements:["finite","non-negative"]}]},A={fields:[d]},b={fields:[{...d,dataProp:"edges",requirements:["finite","non-negative"],missingValue:1}]},$={LineChart:g,AreaChart:g,BumpChart:g,Scatterplot:y,ConnectedScatterplot:u,QuadrantChart:y,MinimapChart:g,BubbleChart:w,StackedAreaChart:v,DifferenceChart:{fields:[{role:"x",accessor:"xAccessor",defaultAccessor:"x",temporalValues:"date",domain:!0},{role:"value",accessor:"seriesAAccessor",defaultAccessor:"a"},{role:"value",accessor:"seriesBAccessor",defaultAccessor:"b"}]},CandlestickChart:{fields:[{role:"x",accessor:"xAccessor",defaultAccessor:"x",temporalValues:"date-like",domain:!0},{role:"high",accessor:"highAccessor",defaultAccessor:"high",requirements:["finite"]},{role:"low",accessor:"lowAccessor",defaultAccessor:"low",requirements:["finite"]},{role:"open",accessor:"openAccessor",whenProps:["openAccessor","closeAccessor"],requirements:["finite"]},{role:"close",accessor:"closeAccessor",whenProps:["openAccessor","closeAccessor"],requirements:["finite"]}]},Heatmap:A,BarChart:{fields:[d]},GroupedBarChart:{fields:[d]},StackedBarChart:p,DotPlot:{fields:[m]},Histogram:{fields:[m]},BoxPlot:{fields:[m]},SwarmPlot:{fields:[m,{role:"size",accessor:"sizeBy",requirements:["finite","non-negative"]}]},ViolinPlot:{fields:[m]},RidgelinePlot:{fields:[m]},PieChart:h,DonutChart:h,FunnelChart:h,SankeyDiagram:b,ChordDiagram:b,ProportionalSymbolMap:{fields:[{role:"x",accessor:"xAccessor",defaultAccessor:"lon",dataProp:"points",requirements:["finite"]},{role:"y",accessor:"yAccessor",defaultAccessor:"lat",dataProp:"points",requirements:["finite"]},{role:"size",accessor:"sizeBy",dataProp:"points",requirements:["finite","non-negative"]}]}},R=Symbol.for("semiotic.numericContractRegistry");function N(){const e=globalThis;return e[R]??(e[R]={contracts:new Map}),e[R]}function x(e,o){o?N().contracts.set(e,o):N().contracts.delete(e)}function z(e){N().contracts.delete(e)}var E={xAccessor:"x",yAccessor:"y",valueAccessor:"value",sizeBy:"size",sizeAccessor:"size",radiusAccessor:"size",countAccessor:"count",amountAccessor:"value",highAccessor:"high",lowAccessor:"low",openAccessor:"open",closeAccessor:"close",lowerAccessor:"lower",upperAccessor:"upper",positiveAccessor:"value",negativeAccessor:"value",progressAccessor:"value",confidenceAccessor:"value",costAccessor:"value",throughputAccessor:"value"};function P(e,o,s){return"function"==typeof e?e(o,s):o[e]}function I(o,s){if("number"==typeof o)return Number.isFinite(o)?o:null;if(o instanceof Date){const e=o.getTime();return s&&Number.isFinite(e)?e:null}if("string"==typeof o){const n=o.trim(),t=Number(n);if(n&&Number.isFinite(t))return t;if("date-like"===s){const o=e(n);return Number.isFinite(o)?o:null}}return null}function C(e){return"number"==typeof e&&!Number.isFinite(e)}function _(e,o,s,n,t){const r={field:s,numbers:[],finiteRows:[],missingRows:[],nonFiniteRows:[],nonNumericRows:[],accessorErrorRows:[],zeroRows:[],negativeRows:[],fractionalRows:[]};for(let s=0;e.length>s;s++){let i;try{i=P(o,e[s],s)}catch{r.accessorErrorRows.push(s);continue}if(null==i||""===i){if(void 0!==t){r.numbers.push(t),r.finiteRows.push(s),0===t&&r.zeroRows.push(s),0>t&&r.negativeRows.push(s),Number.isInteger(t)||r.fractionalRows.push(s);continue}r.missingRows.push(s);continue}const a=I(i,n);null!=a?(r.numbers.push(a),r.finiteRows.push(s),0===a&&r.zeroRows.push(s),0>a&&r.negativeRows.push(s),Number.isInteger(a)||r.fractionalRows.push(s)):C(i)?r.nonFiniteRows.push(s):r.nonNumericRows.push(s)}return r}function S(e,o){const s=new Set(e.requirements??["finite"]);return s.add("finite"),("x"===e.role&&"log"===o.xScaleType||"y"===e.role&&"log"===o.yScaleType)&&s.add("positive"),[...s]}function T(e){return e.slice(0,5)}function M(e){return{domain:"data",...e}}function O(e,o){const n=[],{observation:t,contract:r,accessorLabel:i,requirements:a}=e,c={field:i,role:r.role},l=[...t.nonFiniteRows,...t.nonNumericRows,...t.accessorErrorRows].sort((e,o)=>e-o);if(0===t.numbers.length)return n.push(M({severity:"error",code:"DEGENERATE_EXTENT",message:`${r.accessor}="${i}" produces no finite numeric values; the chart cannot resolve its ${r.role} input.`,fix:`Ensure ${i} contains finite numbers${"x"===r.role?" (or valid dates for a time scale)":""}.`,...c,...l.length>0?{rows:T(l),count:l.length}:{}})),n;t.nonFiniteRows.length>0&&n.push(M({severity:"error",code:"NON_FINITE_VALUE",message:`${i} contains ${t.nonFiniteRows.length} NaN or infinite value${1===t.nonFiniteRows.length?"":"s"}; scale and layout math require finite numbers.`,fix:`Filter or replace NaN/Infinity in ${i} before rendering.`,...c,rows:T(t.nonFiniteRows),count:t.nonFiniteRows.length})),!r.allowMissing&&t.missingRows.length>0&&n.push(M({severity:"error",code:"MISSING_NUMERIC_VALUE",message:`${i} is missing for ${t.missingRows.length} row${1===t.missingRows.length?"":"s"}; the ${r.role} role requires an explicit numeric value.`,fix:`Fill or filter missing ${i} values before rendering.`,...c,rows:T(t.missingRows),count:t.missingRows.length}));const u=[...t.nonNumericRows,...t.accessorErrorRows].sort((e,o)=>e-o);if(u.length>0&&n.push(M({severity:"error",code:"NON_NUMERIC_VALUE",message:`${i} produces ${u.length} non-numeric value${1===u.length?"":"s"} for the ${r.role} role.`,fix:`Bind ${r.accessor} to a numeric field or return finite numbers from the accessor.`,...c,rows:T(u),count:u.length})),r.domain&&t.numbers.length>=2){const[e,o]=function(e){let o=1/0,s=-1/0;for(const n of e)o>n&&(o=n),n>s&&(s=n);return[o,s]}(t.numbers);e===o&&n.push(M({severity:"warning",code:"ZERO_SPAN_DOMAIN",message:`${i} is constant at ${e}; its ${r.role} scale has a zero-span data domain.`,fix:`Provide varying ${r.role} values, set an explicit extent around ${e}, or use a single-value display.`,...c,rows:T(t.finiteRows),count:t.finiteRows.length}))}if(a.includes("positive")){const o=t.numbers.map((e,o)=>({number:e,row:t.finiteRows[o]})).filter(({number:e})=>0>=e).map(({row:e})=>e);if(o.length>0){const s=e.logScale;n.push(M({severity:"error",code:s?"LOG_NON_POSITIVE":"NON_POSITIVE_VALUE",message:`${i} contains ${o.length} non-positive value${1===o.length?"":"s"}, which ${s?"cannot be represented on a log scale":"violate the positive-value contract"}.`,fix:s?"Remove or transform values ≤ 0, or use a linear/symlog scale.":"Provide values greater than zero.",...c,rows:T(o),count:o.length}))}}if(a.includes("non-negative")&&t.negativeRows.length>0&&n.push(M({severity:"error",code:"size"===r.role?"NEGATIVE_SIZE":"NEGATIVE_VALUE",message:`${i} contains ${t.negativeRows.length} negative ${r.role} value${1===t.negativeRows.length?"":"s"}; the chart maps this role to non-negative geometry.`,fix:"Use a non-negative measure, clamp intentionally, or encode sign with position/color instead.",...c,rows:T(t.negativeRows),count:t.negativeRows.length})),a.includes("integer")){const e=[...new Set([...t.negativeRows,...t.zeroRows,...t.fractionalRows])].sort((e,o)=>e-o);e.length>0&&n.push(M({severity:"error",code:"INVALID_COUNT",message:`${i} contains ${e.length} value${1===e.length?"":"s"} that are not positive integers.`,fix:"Counts must be integers ≥ 1; aggregate, round intentionally, or use a continuous-value encoding.",...c,rows:T(e),count:e.length}))}if(a.includes("unit-interval")){const e=t.numbers.map((e,o)=>({number:e,row:t.finiteRows[o]})).filter(({number:e})=>0>e||e>1).map(({row:e})=>e);e.length>0&&n.push(M({severity:"error",code:"OUTSIDE_UNIT_INTERVAL",message:`${i} contains ${e.length} value${1===e.length?"":"s"} outside [0, 1].`,fix:`Normalize ${i} to [0, 1] before using it as ${r.role}.`,...c,rows:T(e),count:e.length}))}if(o&&r.domain){const o=function(e){const o=e.observation.numbers.map((o,s)=>({value:o,row:e.observation.finiteRows[s]})).sort((e,o)=>e.value-o.value);if(8>o.length)return[];const n=o.map(e=>e.value),t=s(n,.25),r=s(n,.75),i=s(n,.5),a=r-t;if(a>0){const e=t-10*a,s=r+10*a;return o.filter(o=>e>o.value||o.value>s).map(e=>e.row)}const c=100*Math.max(1,Math.abs(i));return o.filter(e=>Math.abs(e.value-i)>c).map(e=>e.row)}(e);o.length>0&&n.push(M({severity:"warning",code:"OUTLIER_DOMINATED_DOMAIN",message:`${i} has ${o.length} extreme value${1===o.length?"":"s"} beyond the 10×IQR guardrail; the main distribution may collapse visually.`,fix:"Verify the extreme values, then consider a log scale, robust extent, inset, or explicit annotation rather than silently clipping them.",...c,rows:T(o),count:o.length}))}return n}function k(e,o,s){if(!e)return"__all__";try{return P(e,o,s)+""}catch{return"__accessor_error__"}}function D(e,o,s){if(e.whenProp&&!0!==s[e.whenProp])return[];const n=o.find(o=>o.contract.role===e.role);if(!n||0===n.observation.numbers.length)return[];const t=e.groupAccessor?s[e.groupAccessor]:void 0,r="string"==typeof t||"function"==typeof t?t:e.defaultGroupAccessor,i=new Map;for(let e=0;n.rows.length>e;e++){let o;try{o=P(n.accessor,n.rows[e],e)}catch{continue}const s=I(o,void 0);if(null==s)continue;const t=k(r,n.rows[e],e),a=i.get(t)??{sum:0,magnitude:0,positive:!1,negative:!1,rows:[],negativeRows:[]};a.sum+=s,a.magnitude+=Math.abs(s),a.positive||(a.positive=s>0),a.negative||(a.negative=0>s),a.rows.push(e),0>s&&a.negativeRows.push(e),i.set(t,a)}const a=[],c=[],l=[],u=[],f=[],g=[];for(const[o,s]of i)("positive-total"===e.kind&&0>=s.sum||"normalized-total"===e.kind&&Number.EPSILON*Math.max(1,s.magnitude)*10>=Math.abs(s.sum))&&(a.push(o),u.push(...s.rows)),"normalized-total"===e.kind&&s.positive&&s.negative&&(c.push(o),f.push(...s.rows)),"normalized-total"===e.kind&&s.negative&&(l.push(o),g.push(...s.negativeRows));const d=[];return a.length>0&&d.push(M({severity:"error",code:"normalized-total"===e.kind?"ZERO_NORMALIZED_TOTAL":"NON_POSITIVE_TOTAL",message:"normalized-total"===e.kind?`${a.length} normalization group${1===a.length?" has":"s have"} a zero total, so division would be undefined.`:"The part-to-whole total is not positive, so meaningful shares cannot be computed.",fix:"normalized-total"===e.kind?"Remove empty/zero-sum groups or disable normalization.":"Provide at least one positive value and ensure the total is greater than zero.",field:n.accessorLabel,role:e.role,rows:T([...new Set(u)].sort((e,o)=>e-o)),count:a.length})),l.length>0&&d.push(M({severity:"error",code:"NEGATIVE_NORMALIZED_VALUE",message:`${l.length} normalization group${1===l.length?" contains":"s contain"} negative contributions, so conventional percentage shares are not defined.`,fix:"Use non-negative contributions, a diverging stack, or disable normalization.",field:n.accessorLabel,role:e.role,rows:T([...new Set(g)].sort((e,o)=>e-o)),count:g.length})),c.length>0&&d.push(M({severity:"warning",code:"MIXED_SIGN_NORMALIZATION",message:`${c.length} normalization group${1===c.length?" mixes":"s mix"} positive and negative contributions; percentage shares may be unstable or misleading.`,fix:"Separate positive and negative contributions, use diverging stacks, or disable normalization.",field:n.accessorLabel,role:e.role,rows:T([...new Set(f)].sort((e,o)=>e-o)),count:c.length})),d}function V(e,o,s,n={}){const t=n.contracts??function(e){return N().contracts.get(e)??$[e]}(e)??function(e){const o=[];for(const[s,n]of Object.entries(E))"string"!=typeof e[s]&&"function"!=typeof e[s]||o.push({role:n,accessor:s,..."size"===n?{requirements:["finite","non-negative"]}:{},..."x"===n||"y"===n?{domain:!0}:{}});return o.length>0?{fields:o}:void 0}(o);if(!t)return{component:e,ok:!0,rowCount:s?.length??(Array.isArray(o.data)?o.data.length:0),summary:{fieldsChecked:0,errors:0,warnings:0},contracts:[],diagnoses:[]};const r=function(e,o,s){const n=[],t=new Set;for(const r of e.fields){if(r.whenProps?.some(e=>null==o[e]))continue;const e=o[r.accessor],i="string"==typeof e||"function"==typeof e?e:r.defaultAccessor;if("string"!=typeof i&&"function"!=typeof i)continue;const{dataProp:a,rows:l}=c(r,o,s);if(0===l.length)continue;const u="string"==typeof i?i:r.accessor+"()",f=`${a}:${r.role}:${u}`;if(t.has(f))continue;t.add(f);const g=r.temporalValues??("time"===r.role||"x"===r.role&&"time"===o.xScaleType?"date-like":void 0),d="x"===r.role&&"log"===o.xScaleType||"y"===r.role&&"log"===o.yScaleType,m=S(r,o);n.push({contract:r,accessor:i,accessorLabel:u,dataProp:a,rows:l,requirements:m,logScale:d,observation:_(l,i,u,g,r.missingValue)})}return n}(t,o,s),i=[],l=!1!==n.checkOutliers;for(const e of function(e,o,s){const n=new Set;for(const t of e.fields){const e=t.dataProp??"data",r=s??o[e];if(!Array.isArray(r))continue;if(0===r.length){n.add(e);continue}const i=a(t,o);if(!i)continue;const c=r.map(e=>e?.[i]).filter(Array.isArray);c.length>0&&c.every(e=>0===e.length)&&n.add(`${e}.${i}`)}return[...n]}(t,o,s))i.push(M({severity:"error",code:"EMPTY_DATA",message:e+" is an explicitly empty array; there are no numeric inputs to render.",fix:`Provide at least one valid row, render an intentional empty state, or omit ${e} when using the ref push API.`,count:0,rows:[]}));const u=new Set(r.filter(e=>e.contract.domain&&1===e.rows.length).map(e=>e.dataProp));for(const e of u)i.push(M({severity:"warning",code:"SINGLE_ROW_DOMAIN",message:e+" has one row; a quantitative scale cannot establish variation from a single observation.",fix:"Provide at least two observations or use a single-value display such as BigNumber.",count:1,rows:[0]}));for(const e of r)i.push(...O(e,l));for(const e of t.aggregates??[])i.push(...D(e,r,o));const f=i.filter(e=>"error"===e.severity).length,g=i.length-f;return{component:e,ok:0===f,rowCount:r.reduce((e,o)=>Math.max(e,o.rows.length),s?.length??(Array.isArray(o.data)?o.data.length:0)),summary:{fieldsChecked:r.length,errors:f,warnings:g},contracts:r.map(e=>({role:e.contract.role,accessor:e.accessorLabel,dataProp:e.dataProp,requirements:e.requirements,allowMissing:!0===e.contract.allowMissing,...void 0!==e.contract.missingValue?{missingValue:e.contract.missingValue}:{},domain:!0===e.contract.domain})),diagnoses:i}}export{$ as BUILT_IN_NUMERIC_CONTRACTS,x as registerNumericContracts,z as unregisterNumericContracts,n as profileNumericFields,t as formatDataAudit,i as toDataAuditNotifications,V as auditData};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{mulberry32 as t}from"./chunk-chunk-SIRIJ3DY.module.min.js";import{forceCenter as e,forceCollide as n,forceLink as o,forceManyBody as i,forceSimulation as r,forceX as a,forceY as s}from"d3-force";function u(u,c,l={}){const d=l.iterations??260,m=l.repulsion??5200,h=l.linkDistance??165,f=l.linkStrength??.045,g=l.centerStrength??.018,p=l.damping??.84,y=l.nodeRadius??12,k=l.nodePadding??3,b=l.inset??.06,M=t(l.seed??1),v=new Map;for(const t of u)v.set(t.id,0);for(const t of c)v.set(t.source,(v.get(t.source)??0)+1),v.set(t.target,(v.get(t.target)??0)+1);const x=500,w=u.map(t=>({id:t.id,data:t,x:200+600*M(),y:200+600*M()})),T=new Set(u.map(t=>t.id)),S=c.filter(t=>T.has(t.source)&&T.has(t.target)).map(t=>({source:t.source,target:t.target}));if(d>0){const t=r(w).randomSource(M).alphaDecay(1-Math.pow(.001,1/d)).velocityDecay(Math.max(0,Math.min(1,1-p))).force("charge",i().strength(t=>{const e=v.get(t.id)??0;return 2.5*-Math.sqrt(m)*Math.sqrt(e+1)})).force("collide",n(t=>(t=>"function"==typeof y?y(t.data):y)(t)+k).strength(.9).iterations(2)).force("center",e(x,x).strength(.8)).force("x",a(x).strength(g)).force("y",s(x).strength(g));S.length>0&&t.force("link",o(S).id(t=>t.id).distance(h).strength(t=>{const e="string"==typeof t.target?t.target:t.target.id,n=Math.max(1,Math.min(v.get("string"==typeof t.source?t.source:t.source.id)??1,v.get(e)??1));return f/.045/n})),t.stop();for(let e=0;d>e;e+=1)t.tick()}let E=1/0,A=1/0,z=-1/0,N=-1/0;for(const t of w){const e=t.x??x,n=t.y??x;E>e&&(E=e),A>n&&(A=n),e>z&&(z=e),n>N&&(N=n)}const I=z-E,_=N-A,V={};for(const t of w)V[t.id]={x:0===I?.5:b+((t.x??x)-E)/I*(1-2*b),y:0===_?.5:b+((t.y??x)-A)/_*(1-2*b)};return V}import{interpolateLab as c}from"d3-interpolate";function l(t){return"function"==typeof t?t:e=>e[t]}function d(t,e,n){const o=t?.data,i=o?o[e]:void 0;if(null!=i)return i;const r=t?.[e];return null==r?n:r}function m(t){return null==t?null:t.data??t.datum??t}function h(t,e){const n=new Map;for(const o of t){const t=e(o),i=n.get(t);i?i.push(o):n.set(t,[o])}return n}function f(t){const e=Object.create(null);return t((t,n)=>{e[t]=n}),e}function g(t,e){if(!e)return!0;const n=Array.isArray(e)?e:[e],o=t;for(const t of n)if(null!=t.value&&o[t.field]+""!=t.value+"")return!1;return!0}function p(t,e={}){const n=e.baseOpacity??1;return e.highlight||e.predicate?!g(t,e.highlight)||e.predicate&&!e.predicate(t)?e.dimOpacity??.16:Math.min(1,n+(e.brighten??0)):n}function y(t){return t.join("|")}var k=class{constructor(t=12){this.maxSize=t,this.store=new Map}get(t){return this.store.get(t)}set(t,e){this.maxSize>this.store.size||this.store.clear(),this.store.set(t,e)}getOrCompute(t,e){const n=this.store.get(t);if(void 0!==n)return n;const o=e();return this.set(t,o),o}clear(){this.store.clear()}get size(){return this.store.size}};function b(t,e=.72){const n=c(t,"#ffffff"),o=c(t,"#000000"),i=c(t,t)(0);return t=>{const r=0>t?0:t>1?1:t;return.5===r?i:.5>r?n(2*(.5-r)*e):o(2*(r-.5)*e)}}function M(t,e,n=.72){return b(t,n)(e)}function v(t){return f(e=>{for(const[n,o]of Object.entries(t))e(n,o)})}function x(t){return t.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-|-$/g,"")||"item"}function w(t,e,n){return Math.max(e,Math.min(n,t))}function T(t){const e=Number(t);return Number.isFinite(e)?Math.max(0,e):0}function S(t){if(0===t.length)return 0;let e=0;for(const n of t)e+=n;return e/t.length}function E(t,e){const n=w(e,0,1),o=t.trim().replace(/^#/,""),i=3===o.length?o.split("").map(t=>t+t).join(""):o;return/^[0-9a-fA-F]{6}$/.test(i)?`rgba(${parseInt(i.slice(0,2),16)}, ${parseInt(i.slice(2,4),16)}, ${parseInt(i.slice(4,6),16)}, ${n})`:t}var A=1e-6;function z(t){return Number.isFinite(t)?Math.max(0,t):0}function N(t,e){const n=Number(e.unit),o=z(t),i=e.maxUnits??1/0,r=e.minFraction??0;if(0>=n||0>=i||0>=o)return{units:[],unit:n>0?n:0,total:o,shown:0,overflow:o>0&&!(i>0)};const a=Math.ceil(o/n-A),s=Math.min(i,a),u=a>i,c=[];for(let t=0;s>t;t+=1){const e=t*n;let i=Math.min(1,Math.max(0,(Math.min(o,e+n)-e)/n));A>1-i&&(i=1),c.push({index:t,fraction:i,start:e,end:e+i*n,value:i*n})}const l=c[c.length-1];l&&r>l.fraction&&1>l.fraction&&c.pop();const d=c.reduce((t,e)=>t+e.value,0);return{units:c,unit:n,total:o,shown:d,overflow:u}}function I(t,e,n){const o=N(t,n),i=Math.max(z(e),o.total);if(o.total>=i)return{...o,rangeUnits:[],rangeTotal:o.total};const r=N(i,{unit:n.unit,maxUnits:n.maxUnits}),a=r.unit>0?o.total/r.unit:0,s=Math.floor(a+A);let u=Math.min(1,Math.max(0,a-s));A>u&&(u=0);const c=[];for(const t of r.units)s>t.index||(t.index===s&&u>0?t.fraction-u>A&&c.push({...t,startFraction:u,start:t.index*r.unit+u*r.unit,value:(t.fraction-u)*r.unit}):c.push({...t,startFraction:0}));return{...o,overflow:o.overflow||r.overflow,rangeUnits:c,rangeTotal:i}}function _(t){return t?t.map(Number).filter(Number.isFinite):[]}function V(t){if("fixed-denominator"===t.countStrategy)return 1/0;const e=t.maxTokens??1/0;return e>0?Math.floor(e):0}function O(t){const e=t.unitValue??t.unit,n=t.icon??t.token;return{...t,...null!=e&&{unitValue:e},...null!=n&&{icon:n}}}function q(t){if(t.samples)return _(t.samples);if(!t.data||!t.valueAccessor)return[];const e=t.valueAccessor;return t.data.map(t=>"function"==typeof e?e(t):Number(t[e])).filter(Number.isFinite)}function U(t,e,n,o={}){return{index:e,tokenType:t.tokenType,tokenSemantics:t.tokenSemantics,countStrategy:t.countStrategy,fraction:1,startFraction:0,value:n,start:e,end:e+n,unitValue:t.unitValue,unitMeaning:t.unitMeaning,...o}}function C(e,n){const o=O(n),i=function(t){return"number"==typeof t?{value:t}:Array.isArray(t)?{samples:_(t),data:t}:t}(e);let r,a,s,u,c,l,d,m=0,h=!1;if("unitized"===o.countStrategy){c=o.unitValue??1;const t={unit:c,maxUnits:o.maxTokens,minFraction:o.minFraction},e=null==i.rangeValue?N(T(i.value),t):I(T(i.value),T(i.rangeValue),t);r=e.units.map(t=>U(o,t.index,t.value,{fraction:t.fraction,start:t.start,end:t.end,unitValue:e.unit})),a=e.total,m=e.shown,h=e.overflow,null!=i.rangeValue&&(l=e.rangeTotal,d=e.rangeUnits.map(t=>U(o,t.index,t.value,{fraction:t.fraction,startFraction:t.startFraction,start:t.start,end:t.end,unitValue:e.unit,range:"scenario"})))}else if("fixed-denominator"===o.countStrategy){u=Math.floor(T(i.denominator??o.denominator)),s=T(i.numerator??o.numerator??i.value);const t=Math.min(u,Math.max(0,Math.round(s)));r=Array.from({length:u},(e,n)=>U(o,n,1,{highlighted:t>n,start:n,end:n+1})),a=u,m=r.length,h=!1}else if("quantile"===o.countStrategy){const t=q(i).sort((t,e)=>t-e),e=Math.max(0,Math.floor(o.tokenCount??50)),n=t.length>0?Math.min(e,V(o)):0;r=Array.from({length:n},(e,i)=>{const r=(i+.5)/n,a=function(t,e){const n=t.length;if(0===n)return 0;if(1===n)return t[0];const o=(n-1)*Math.min(1,Math.max(0,e)),i=Math.floor(o),r=o-i;return t[i]*(1-r)+t[Math.ceil(o)]*r}(t,r);return U(o,i,a,{sample:a,quantile:r,start:a,end:a})}),a=t.length,m=r.length,h=t.length>0&&e>r.length}else if("sample"===o.countStrategy||"posterior-sample"===o.countStrategy||"random-sample"===o.countStrategy){const e=q(i),n=Math.min(e.length,Math.max(0,Math.floor(o.tokenCount??e.length))),s=Math.min(n,V(o));r=("random-sample"===o.countStrategy?function(e,n=1){const o=Array.from({length:e},(t,e)=>e),i=t(Math.floor(n)||1);for(let t=o.length-1;t>0;t-=1){const e=Math.floor(i()*(t+1)),n=o[t];o[t]=o[e],o[e]=n}return o}(e.length,o.seed).slice(0,s):Array.from({length:s},(t,n)=>Math.floor(n/Math.max(1,s-1)*(e.length-1)))).map((t,n)=>{const i=e[t];return U(o,n,i,{sample:i,start:i,end:i})}),a=e.length,m=r.length,h=n>r.length}else{const t=i.data;if(t&&null==i.value)r=t.map((t,e)=>U(o,e,1,{datum:t})),a=t.length;else{const t=N(T(i.value),{unit:1,maxUnits:o.maxTokens,minFraction:o.minFraction});r=t.units.map(t=>U(o,t.index,t.value,{fraction:t.fraction,start:t.start,end:t.end,unitValue:1})),a=t.total,m=t.shown,h=t.overflow}if(t&&null==i.value){const t=function(t,e){const n=V(e);return t.length>n?{tokens:t.slice(0,n),overflow:!0}:{tokens:t,overflow:!1}}(r,o);r=t.tokens,m=r.length,h=t.overflow}}return{tokens:r,encoding:o,total:a,shown:m,overflow:h,numerator:s,denominator:u,unitValue:c,rangeTotal:l,rangeTokens:d,diagnostics:R(o,{visibleTokens:r.length+(d?.length??0)})}}function F(t,e={}){const n=Array.isArray(t)?t:t.tokens,o=n.length;if(0===o)return[];const i=e.flow??"row",r=e.cellWidth??16,a=e.cellHeight??r,s=e.gutter??2,u=e.anchor??[.5,.5],c=Math.max(1,Math.floor(e.columns??Math.ceil(e.rows?o/e.rows:Math.sqrt(o)))),l=Math.max(1,Math.floor(e.rows??Math.ceil(o/c))),d="row"===i?Math.max(l,Math.ceil(o/c)):l,m="column"===i?Math.max(c,Math.ceil(o/l)):c,h=e.x??0,f=e.y??0;return n.map((t,n)=>{let o,g;return"column"===i?(g=Math.floor(n/l),o=n%l):(o=Math.floor(n/c),g=n%c),"left"===e.columnDirection&&(g=m-1-g),"up"===e.rowDirection&&(o=d-1-o),{...t,row:o,column:g,x:h+g*(r+s)+u[0]*r,y:f+o*(a+s)+u[1]*a}})}function R(t,e={}){const n=[],o=t.tokenSemantics,i=t.countStrategy,r=e.maxRecommendedTokens??("fixed-denominator"!==i||T(t.denominator)>100?80:100);return o||n.push({code:"TOKEN_SEMANTICS_UNCLEAR",severity:"warning",message:"Every tokenized encoding should state what one token represents."}),i||n.push({code:"MISSING_COUNT_STRATEGY",severity:"warning",message:"Every tokenized encoding should state how token counts are produced."}),"icon"!==t.tokenType&&"glyph"!==t.tokenType||"icon-only"!==t.labelPolicy&&"token-only"!==t.labelPolicy||n.push({code:"ICON_ONLY_LABELS",severity:"warning",message:"Icons should supplement text labels, not replace them."}),null!=e.visibleTokens&&e.visibleTokens>r&&n.push({code:"TOO_MANY_VISIBLE_TOKENS",severity:"warning",message:`This encoding renders ${e.visibleTokens} visible tokens. Consider unitizing, sampling, or a hybrid bar/token view.`}),"decorative"!==o||"icon"!==t.tokenType&&"glyph"!==t.tokenType||n.push({code:"DECORATIVE_PICTOGRAPHS",severity:"warning",message:"Decorative pictographs can harm recall and speed when they do not clarify the data."}),"unitized-measure"===o&&i&&"unitized"!==i&&n.push({code:"TOKEN_STRATEGY_MISMATCH",severity:"warning",message:"Unitized measures should use the unitized count strategy so each token has a stable value."}),"risk-case"===o&&i&&"fixed-denominator"!==i&&n.push({code:"TOKEN_STRATEGY_MISMATCH",severity:"warning",message:"Risk cases are usually clearest as a fixed-denominator natural frequency."}),"possible-outcome"!==o&&"posterior-sample"!==o&&"hypothetical-case"!==o||!i||"quantile"===i||"sample"===i||"posterior-sample"===i||"random-sample"===i||n.push({code:"TOKEN_STRATEGY_MISMATCH",severity:"warning",message:"Outcome/sample tokens should come from quantiles or samples, not from a unitized magnitude."}),"unitized-measure"===o&&"unitized"===i&&null==t.unitValue&&null==t.unit&&n.push({code:"MISSING_UNIT_VALUE",severity:"warning",message:"Unitized measures should set unitValue so each token has a declared value."}),"unitized-measure"!==o||"unitized"!==i||t.unitMeaning||n.push({code:"MISSING_UNIT_MEANING",severity:"info",message:"Add unitMeaning so readers know what one full token represents."}),n}function G(t){return"measure"===t?"precise-comparison":"estimate probability"===t?"probability-estimation":"understand risk"===t?"risk-communication":"remember"===t?"memory":"decide"===t?"support-decision":t}function P(t){const e=G(t);return"precise-comparison"===e?["compare-categories","rank"]:"probability-estimation"===e?["distribution"]:"risk-communication"===e?["part-to-whole","distribution"]:"frequency-reasoning"===e?["distribution","compare-categories"]:"memory"===e||"editorial-engagement"===e?["compare-categories"]:"public-explanation"===e||"support-decision"===e?["distribution","compare-categories"]:["compare-categories"]}function D(t){const e=G(t.taskIntent),n="small"===(o=t.availableSpace)?25:"large"===o?100:50;var o;if("precise-comparison"===e)return{recommendedEncoding:"bar-or-line",rationale:"Use continuous position/length encodings when precise magnitude comparison is the primary task.",warnings:[],alternatives:["hybrid-bar-token","unitized-measure"]};if("probability-estimation"===e){const t={tokenType:"dot",tokenSemantics:"possible-outcome",countStrategy:"quantile",tokenCount:n,layout:"dotplot",labelPolicy:"text-plus-token"};return{recommendedEncoding:"quantile-dotplot",tokenEncoding:t,rationale:"This task asks readers to estimate probability from a distribution. Quantile tokens turn probability mass into countable possible outcomes.",warnings:R(t),alternatives:["cdf-with-threshold","density-with-threshold"]}}if("risk-communication"===e){const e={tokenType:t.concreteEntity?"icon":"dot",icon:t.concreteEntity,tokenSemantics:"risk-case",countStrategy:"fixed-denominator",denominator:100,layout:"waffle",labelPolicy:"text-plus-token"};return{recommendedEncoding:"fixed-denominator-icon-array",tokenEncoding:e,rationale:"Risk is often clearer as natural frequency: highlighted cases out of a fixed denominator.",warnings:R(e,{visibleTokens:100,maxRecommendedTokens:100}),alternatives:["labeled-percent","bar-with-risk-threshold"]}}if("memory"===e||"editorial-engagement"===e){const e={tokenType:t.concreteEntity?"glyph":"icon",icon:t.concreteEntity,tokenSemantics:"unitized-measure",countStrategy:"unitized",unitValue:1,layout:"grid",labelPolicy:"text-plus-token",unitMeaning:t.concreteEntity?"one token represents a unit of "+t.concreteEntity:"one token represents one unit"};return{recommendedEncoding:"semantic-isotype",tokenEncoding:e,rationale:"Semantic tokens are useful when the chart needs to make a topic concrete and memorable.",warnings:R(e),alternatives:["labeled-bar","hybrid-bar-token"]}}if("frequency-reasoning"===e||"public-explanation"===e||"support-decision"===e){const e={tokenType:t.concreteEntity?"icon":"dot",icon:t.concreteEntity,tokenSemantics:"distribution"===t.dataType?"possible-outcome":"unitized-measure",countStrategy:"distribution"===t.dataType?"quantile":"unitized",unitValue:"distribution"===t.dataType?void 0:1,tokenCount:n,layout:"distribution"===t.dataType?"dotplot":"bar-segment",labelPolicy:"text-plus-token",unitMeaning:"distribution"===t.dataType?void 0:"one token represents one unit interval"};return{recommendedEncoding:"hybrid-continuous-token",tokenEncoding:e,rationale:"A hybrid view preserves measurement while adding countable tokens for explanation and decisions.",warnings:R(e),alternatives:["bar-or-line","quantile-dotplot","fixed-denominator-icon-array"]}}return{recommendedEncoding:"bar-or-line",rationale:"Use continuous encodings unless the task needs frequency, risk, memory, or outcome reasoning.",warnings:[],alternatives:["unitized-measure","quantile-dotplot","fixed-denominator-icon-array"]}}export{u as forceLayout,l as resolveAccessor,d as readField,m as unwrapDatum,h as groupBy,f as createSafeDatum,g as matchesHighlight,p as dimFor,y as signatureKey,k as LayoutCache,b as makeShade,M as shade,v as datumFromFields,x as stableGlyphId,w as clamp,T as nonNegativeFinite,S as mean,E as withAlpha,N as unitize,I as unitizeRange,O as normalizeTokenEncoding,C as generateTokens,F as layoutTokenGrid,R as diagnoseTokenEncoding,P as tokenTaskIntentToCapabilityIntents,D as suggestTokenEncoding};
|