semiotic 3.8.0 → 3.8.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (331) hide show
  1. package/CLAUDE.md +14 -9
  2. package/README.md +56 -55
  3. package/ai/behaviorContracts.cjs +9 -0
  4. package/ai/dist/mcp-server.js +240 -30
  5. package/ai/schema.json +616 -42
  6. package/ai/surface-manifest.json +3 -2
  7. package/ai/system-prompt.md +7 -3
  8. package/dist/__tests__/scenarios/mcpProtocolTypes.d.ts +20 -0
  9. package/dist/chunk-OrdinalBrushOverlay-PXHQYDB2.module.min.js +2 -0
  10. package/dist/chunk-XYBrushOverlay-ECZJJLAJ.module.min.js +1 -0
  11. package/dist/chunk-XYBrushOverlay-EP2SV3UI.module.min.js +2 -0
  12. package/dist/chunk-chunk-255KDHW5.module.min.js +1 -0
  13. package/dist/chunk-chunk-27HVVXS6.module.min.js +1 -0
  14. package/dist/chunk-chunk-2CXCXRB4.module.min.js +1 -0
  15. package/dist/chunk-chunk-2JGJ5GUG.module.min.js +2 -0
  16. package/dist/chunk-chunk-2UN3ANRN.module.min.js +2 -0
  17. package/dist/chunk-chunk-2VUEY5TH.module.min.js +1 -0
  18. package/dist/chunk-chunk-2WVCH4PL.module.min.js +1 -0
  19. package/dist/chunk-chunk-5UKL5W76.module.min.js +2 -0
  20. package/dist/chunk-chunk-5WEFWNUW.module.min.js +2 -0
  21. package/dist/chunk-chunk-6F6GEAQU.module.min.js +1 -0
  22. package/dist/chunk-chunk-7LHMKRKE.module.min.js +2 -0
  23. package/dist/chunk-chunk-BHYTYMY2.module.min.js +2 -0
  24. package/dist/chunk-chunk-C6EJ4IOD.module.min.js +2 -0
  25. package/dist/chunk-chunk-CA3YDW6F.module.min.js +1 -0
  26. package/dist/chunk-chunk-CP3EN6KZ.module.min.js +1 -0
  27. package/dist/chunk-chunk-CYIML3AV.module.min.js +2 -0
  28. package/dist/chunk-chunk-DNY43POY.module.min.js +1 -0
  29. package/dist/chunk-chunk-DSNGDNJY.module.min.js +1 -0
  30. package/dist/chunk-chunk-E7MIQX7D.module.min.js +2 -0
  31. package/dist/chunk-chunk-EMO5NUGE.module.min.js +1 -0
  32. package/dist/chunk-chunk-ES4DCG3L.module.min.js +1 -0
  33. package/dist/chunk-chunk-FAKO3RGQ.module.min.js +2 -0
  34. package/dist/chunk-chunk-FYY2ACNJ.module.min.js +2 -0
  35. package/dist/chunk-chunk-G7WFWHAD.module.min.js +2 -0
  36. package/dist/chunk-chunk-GMQ5AYTD.module.min.js +1 -0
  37. package/dist/chunk-chunk-H4PPRW6N.module.min.js +1 -0
  38. package/dist/chunk-chunk-IFYPMWKY.module.min.js +1 -0
  39. package/dist/chunk-chunk-J3ELI22J.module.min.js +1 -0
  40. package/dist/chunk-chunk-J3QOW4OE.module.min.js +0 -0
  41. package/dist/chunk-chunk-J3XWETBJ.module.min.js +2 -0
  42. package/dist/chunk-chunk-JCG72SGW.module.min.js +2 -0
  43. package/dist/{semiotic-ai-chunk-OG7BQUUW.module.min.js → chunk-chunk-JJ2OOIET.module.min.js} +0 -1
  44. package/dist/chunk-chunk-KTWEBFMX.module.min.js +2 -0
  45. package/dist/chunk-chunk-L6D3I3V7.module.min.js +2 -0
  46. package/dist/chunk-chunk-M337NY6L.module.min.js +1 -0
  47. package/dist/chunk-chunk-NO4MCQVD.module.min.js +1 -0
  48. package/dist/chunk-chunk-ODUZEEBH.module.min.js +2 -0
  49. package/dist/chunk-chunk-P6UBCMSQ.module.min.js +2 -0
  50. package/dist/chunk-chunk-Q2YADC2V.module.min.js +2 -0
  51. package/dist/chunk-chunk-QRIBHZYW.module.min.js +1 -0
  52. package/dist/chunk-chunk-QSQVBIJA.module.min.js +1 -0
  53. package/dist/chunk-chunk-RCF52Z42.module.min.js +2 -0
  54. package/dist/chunk-chunk-RH5TSQPH.module.min.js +1 -0
  55. package/dist/chunk-chunk-ROP4HI7H.module.min.js +2 -0
  56. package/dist/chunk-chunk-RZH7VZYS.module.min.js +2 -0
  57. package/dist/chunk-chunk-SIRIJ3DY.module.min.js +1 -0
  58. package/dist/chunk-chunk-STZFFTAN.module.min.js +2 -0
  59. package/dist/chunk-chunk-SV4XAZ3Q.module.min.js +1 -0
  60. package/dist/chunk-chunk-T27ZEV6A.module.min.js +1 -0
  61. package/dist/chunk-chunk-U3AGQ5EF.module.min.js +2 -0
  62. package/dist/chunk-chunk-U66USBWU.module.min.js +1 -0
  63. package/dist/chunk-chunk-VVCA3DB7.module.min.js +1 -0
  64. package/dist/chunk-chunk-W3DB2MN4.module.min.js +2 -0
  65. package/dist/chunk-chunk-WCX6U47H.module.min.js +2 -0
  66. package/dist/chunk-chunk-WDIN4LRC.module.min.js +1 -0
  67. package/dist/chunk-chunk-XEVJDUTH.module.min.js +1 -0
  68. package/dist/chunk-chunk-XOYX77KF.module.min.js +2 -0
  69. package/dist/chunk-chunk-YCQYG6J5.module.min.js +2 -0
  70. package/dist/chunk-chunk-YHNZCPOZ.module.min.js +2 -0
  71. package/dist/chunk-chunk-YWZB3KPI.module.min.js +2 -0
  72. package/dist/chunk-chunk-Z5KXAVQD.module.min.js +2 -0
  73. package/dist/chunk-chunk-ZCNBUZPL.module.min.js +2 -0
  74. package/dist/chunk-chunk-ZLKRTF5N.module.min.js +2 -0
  75. package/dist/chunk-chunk-ZTNVDWAK.module.min.js +2 -0
  76. package/dist/chunk-statisticalOverlays-6MVAK5RW.module.min.js +2 -0
  77. package/dist/components/AccessibleNavTree.d.ts +7 -1
  78. package/dist/components/ai/chartClinicMetadata.generated.d.ts +15 -0
  79. package/dist/components/ai/useNavigationSync.d.ts +17 -2
  80. package/dist/components/chartContainerMobile.d.ts +9 -0
  81. package/dist/components/charts/geo/ChoroplethMap.d.ts +19 -2
  82. package/dist/components/charts/geo/DistanceCartogram.d.ts +14 -2
  83. package/dist/components/charts/geo/FlowMap.d.ts +10 -6
  84. package/dist/components/charts/geo/ProportionalSymbolMap.d.ts +14 -2
  85. package/dist/components/charts/index.d.ts +6 -0
  86. package/dist/components/charts/network/ChordDiagram.d.ts +9 -1
  87. package/dist/components/charts/network/ForceDirectedGraph.d.ts +11 -0
  88. package/dist/components/charts/network/SankeyDiagram.d.ts +9 -1
  89. package/dist/components/charts/ordinal/BarChart.d.ts +21 -0
  90. package/dist/components/charts/ordinal/GroupedBarChart.d.ts +11 -0
  91. package/dist/components/charts/ordinal/StackedBarChart.d.ts +11 -0
  92. package/dist/components/charts/physics/CollisionSwarmChart.d.ts +7 -0
  93. package/dist/components/charts/physics/EventDropChart.d.ts +7 -0
  94. package/dist/components/charts/physics/GaltonBoardChart.d.ts +8 -0
  95. package/dist/components/charts/physics/PhysicalFlowChart.d.ts +7 -0
  96. package/dist/components/charts/physics/PhysicsCustomChart.d.ts +4 -25
  97. package/dist/components/charts/physics/PhysicsPileChart.d.ts +7 -0
  98. package/dist/components/charts/physics/physicsChartShared.d.ts +17 -1
  99. package/dist/components/charts/physics/physicsCustomLayout.d.ts +32 -0
  100. package/dist/components/charts/shared/AnnotationLabel.d.ts +88 -0
  101. package/dist/components/charts/shared/annotationActivation.d.ts +35 -0
  102. package/dist/components/charts/shared/annotationLabelLayout.d.ts +5 -0
  103. package/dist/components/charts/shared/annotationRules.d.ts +2 -1
  104. package/dist/components/charts/shared/auditAccessibilityText.d.ts +13 -0
  105. package/dist/components/charts/shared/chartSelectionUtils.d.ts +4 -0
  106. package/dist/components/charts/shared/chartSpecCore.d.ts +3 -3
  107. package/dist/components/charts/shared/datumTypes.d.ts +2 -0
  108. package/dist/components/charts/shared/diagnoseAnnotationChecks.d.ts +2 -0
  109. package/dist/components/charts/shared/formatUtils.d.ts +3 -3
  110. package/dist/components/charts/shared/hatchFill.d.ts +87 -0
  111. package/dist/components/charts/shared/hooks.d.ts +7 -6
  112. package/dist/components/charts/shared/knownChartComponents.d.ts +9 -0
  113. package/dist/components/charts/shared/leastSquaresRegression.d.ts +16 -0
  114. package/dist/components/charts/shared/mergeShapeStyle.d.ts +3 -2
  115. package/dist/components/charts/shared/semanticInteractions.d.ts +42 -0
  116. package/dist/components/charts/shared/sparseArray.d.ts +1 -1
  117. package/dist/components/charts/shared/streamPropsHelpers.d.ts +6 -4
  118. package/dist/components/charts/shared/styleRules.d.ts +205 -0
  119. package/dist/components/charts/shared/tooltipUtils.d.ts +22 -9
  120. package/dist/components/charts/shared/types.d.ts +9 -6
  121. package/dist/components/charts/shared/useAreaSeriesSetup.d.ts +16 -2
  122. package/dist/components/charts/shared/useChartSetup.d.ts +2 -2
  123. package/dist/components/charts/shared/useCustomChartSetup.d.ts +3 -0
  124. package/dist/components/charts/shared/useFrameImperativeHandle.d.ts +1 -2
  125. package/dist/components/charts/shared/useLikertAggregation.d.ts +4 -4
  126. package/dist/components/charts/shared/useOrdinalBrush.d.ts +2 -1
  127. package/dist/components/charts/shared/useOrdinalPieceStyle.d.ts +24 -1
  128. package/dist/components/charts/shared/useStreamingLegend.d.ts +1 -1
  129. package/dist/components/charts/shared/useXYLineStyle.d.ts +10 -0
  130. package/dist/components/charts/shared/useXYPointStyle.d.ts +19 -1
  131. package/dist/components/charts/shared/validateChartData.d.ts +7 -5
  132. package/dist/components/charts/shared/validationMap.d.ts +11 -2
  133. package/dist/components/charts/shared/validationMap.generated.d.ts +6 -0
  134. package/dist/components/charts/shared/withChartWrapper.d.ts +4 -3
  135. package/dist/components/charts/value/targetPresentation.d.ts +22 -0
  136. package/dist/components/charts/value/types.d.ts +5 -6
  137. package/dist/components/charts/xy/AreaChart.d.ts +8 -0
  138. package/dist/components/charts/xy/BubbleChart.d.ts +9 -0
  139. package/dist/components/charts/xy/ConnectedScatterplot.d.ts +7 -0
  140. package/dist/components/charts/xy/DifferenceChart.d.ts +1 -52
  141. package/dist/components/charts/xy/Heatmap.d.ts +2 -2
  142. package/dist/components/charts/xy/LineChart.d.ts +11 -0
  143. package/dist/components/charts/xy/QuadrantChart.d.ts +7 -0
  144. package/dist/components/charts/xy/Scatterplot.d.ts +10 -0
  145. package/dist/components/charts/xy/StackedAreaChart.d.ts +7 -0
  146. package/dist/components/charts/xy/differenceSegments.d.ts +49 -0
  147. package/dist/components/charts/xy/scatterplotMatrixInteractionTypes.d.ts +12 -0
  148. package/dist/components/controls/SentenceFilter.d.ts +97 -0
  149. package/dist/components/data/fromVegaLite.d.ts +19 -9
  150. package/dist/components/rough/createRoughRenderMode.d.ts +46 -0
  151. package/dist/components/semiotic-ai.d.ts +3 -1
  152. package/dist/components/semiotic-controls.d.ts +2 -0
  153. package/dist/components/semiotic-geo.d.ts +4 -0
  154. package/dist/components/semiotic-network.d.ts +4 -0
  155. package/dist/components/semiotic-ordinal.d.ts +6 -0
  156. package/dist/components/semiotic-physics.d.ts +4 -0
  157. package/dist/components/semiotic-rough.d.ts +4 -0
  158. package/dist/components/semiotic-utils-core.d.ts +4 -0
  159. package/dist/components/semiotic-xy.d.ts +4 -0
  160. package/dist/components/semiotic.d.ts +9 -1
  161. package/dist/components/server/optionalImageTypes.d.ts +37 -0
  162. package/dist/components/server/serverChartConfigShared.d.ts +9 -5
  163. package/dist/components/server/serverChartConfigs.d.ts +4 -4
  164. package/dist/components/server/staticAnnotations.d.ts +6 -3
  165. package/dist/components/server/staticLegend.d.ts +1 -1
  166. package/dist/components/server/staticNetwork.d.ts +4 -4
  167. package/dist/components/server/staticSVGChrome.d.ts +5 -4
  168. package/dist/components/store/ObservationStore.d.ts +21 -1
  169. package/dist/components/stream/AccessibleDataTable.d.ts +4 -10
  170. package/dist/components/stream/AriaLiveTooltip.d.ts +9 -0
  171. package/dist/components/stream/CanvasHitTester.d.ts +4 -4
  172. package/dist/components/stream/DataSourceAdapter.d.ts +1 -1
  173. package/dist/components/stream/FrameRuntime.d.ts +57 -0
  174. package/dist/components/stream/GeoParticlePool.d.ts +1 -1
  175. package/dist/components/stream/GeoPipelineStore.d.ts +43 -12
  176. package/dist/components/stream/GeoSVGOverlay.d.ts +64 -0
  177. package/dist/components/stream/NetworkCanvasHitTester.d.ts +2 -1
  178. package/dist/components/stream/NetworkPipelineStore.d.ts +24 -21
  179. package/dist/components/stream/NetworkSSRFrame.d.ts +17 -0
  180. package/dist/components/stream/NetworkSVGOverlay.d.ts +6 -0
  181. package/dist/components/stream/OrdinalBrushOverlay.d.ts +1 -2
  182. package/dist/components/stream/OrdinalBrushOverlayLazy.d.ts +9 -0
  183. package/dist/components/stream/OrdinalCanvasHitTester.d.ts +2 -2
  184. package/dist/components/stream/OrdinalPipelineStore.d.ts +13 -13
  185. package/dist/components/stream/OrdinalSVGOverlay.d.ts +9 -1
  186. package/dist/components/stream/OrdinalStyleResolver.d.ts +12 -0
  187. package/dist/components/stream/ParticlePool.d.ts +1 -1
  188. package/dist/components/stream/PipelineStore.d.ts +12 -16
  189. package/dist/components/stream/SVGOverlay.d.ts +6 -0
  190. package/dist/components/stream/SceneGraph.d.ts +3 -3
  191. package/dist/components/stream/XYBrushOverlayLazy.d.ts +17 -0
  192. package/dist/components/stream/accessorUtils.d.ts +2 -2
  193. package/dist/components/stream/annotationAccessorResolver.d.ts +2 -2
  194. package/dist/components/stream/frameGraphics.d.ts +4 -0
  195. package/dist/components/stream/frameKeyboardNavigation.d.ts +45 -0
  196. package/dist/components/stream/geoPipelineHelpers.d.ts +3 -3
  197. package/dist/components/stream/geoPipelineUpdateResults.d.ts +34 -0
  198. package/dist/components/stream/geoSceneBuilder.d.ts +16 -0
  199. package/dist/components/stream/geoTypes.d.ts +48 -15
  200. package/dist/components/stream/hitTestUtils.d.ts +2 -2
  201. package/dist/components/stream/hoverUtils.d.ts +4 -2
  202. package/dist/components/stream/layouts/forceLayoutWorkerClient.d.ts +1 -0
  203. package/dist/components/stream/layouts/hierarchyUtils.d.ts +2 -2
  204. package/dist/components/stream/networkCustomLayoutRunner.d.ts +23 -0
  205. package/dist/components/stream/networkCustomRestyle.d.ts +15 -0
  206. package/dist/components/stream/networkFrameAnimation.d.ts +7 -0
  207. package/dist/components/stream/networkFrameHandleTypes.d.ts +39 -0
  208. package/dist/components/stream/networkFrameObservations.d.ts +15 -0
  209. package/dist/components/stream/networkFramePaint.d.ts +11 -2
  210. package/dist/components/stream/networkInteractionTypes.d.ts +26 -0
  211. package/dist/components/stream/networkPipelineConfig.d.ts +2 -2
  212. package/dist/components/stream/networkPipelineUpdateResults.d.ts +38 -0
  213. package/dist/components/stream/networkTypes.d.ts +37 -56
  214. package/dist/components/stream/ordinalCanvasRenderers.d.ts +2 -2
  215. package/dist/components/stream/ordinalPipelineUpdateResults.d.ts +20 -1
  216. package/dist/components/stream/ordinalSceneBuilders/types.d.ts +2 -2
  217. package/dist/components/stream/ordinalTypes.d.ts +30 -3
  218. package/dist/components/stream/physics/PhysicsPipelineStore.d.ts +2 -0
  219. package/dist/components/stream/physics/PhysicsSVGOverlay.d.ts +6 -0
  220. package/dist/components/stream/physics/StreamPhysicsTypes.d.ts +21 -6
  221. package/dist/components/stream/physics/physicsFrameObservations.d.ts +19 -0
  222. package/dist/components/stream/physics/physicsFrameSetup.d.ts +4 -0
  223. package/dist/components/stream/physics/physicsPipelineUpdateResults.d.ts +19 -1
  224. package/dist/components/stream/physics/usePhysicsFrameLifecyclePolicy.d.ts +3 -1
  225. package/dist/components/stream/pipelineConfig.d.ts +4 -2
  226. package/dist/components/stream/pipelineDecay.d.ts +2 -2
  227. package/dist/components/stream/pipelinePulse.d.ts +2 -2
  228. package/dist/components/stream/pipelineStoreUpdateResults.d.ts +23 -2
  229. package/dist/components/stream/pipelineTransitions.d.ts +1 -1
  230. package/dist/components/stream/pipelineUpdateContract.d.ts +7 -0
  231. package/dist/components/stream/pipelineUpdateStore.d.ts +21 -0
  232. package/dist/components/stream/renderBackend.d.ts +27 -0
  233. package/dist/components/stream/renderers/canvasRenderHelpers.d.ts +15 -1
  234. package/dist/components/stream/renderers/geoCanvasRenderer.d.ts +3 -2
  235. package/dist/components/stream/renderers/networkParticleRenderer.d.ts +1 -1
  236. package/dist/components/stream/sceneRenderBackendTypes.d.ts +28 -0
  237. package/dist/components/stream/sceneRevisionDiagnostics.d.ts +31 -4
  238. package/dist/components/stream/streamSemanticTypes.d.ts +16 -0
  239. package/dist/components/stream/streamThemeTypes.d.ts +14 -0
  240. package/dist/components/stream/svgOverlayUtils.d.ts +10 -0
  241. package/dist/components/stream/test-utils/frameScheduler.d.ts +12 -0
  242. package/dist/components/stream/test-utils/revisionConsumption.d.ts +13 -0
  243. package/dist/components/stream/titleLayout.d.ts +31 -0
  244. package/dist/components/stream/types.d.ts +30 -65
  245. package/dist/components/stream/useCanvasFrameHost.d.ts +71 -0
  246. package/dist/components/stream/useFrame.d.ts +23 -0
  247. package/dist/components/stream/useLegendCategoryEmission.d.ts +3 -3
  248. package/dist/components/stream/useSemanticFrameInteractions.d.ts +22 -0
  249. package/dist/components/stream/useUpdateResultSnapshot.d.ts +7 -0
  250. package/dist/components/stream/xyFrameAxisTypes.d.ts +50 -0
  251. package/dist/components/stream/xySceneBuilders/types.d.ts +6 -5
  252. package/dist/controls.min.js +1 -1
  253. package/dist/controls.module.min.js +1 -1
  254. package/dist/forceLayoutWorker.js +1 -1
  255. package/dist/geo.min.js +1 -1
  256. package/dist/geo.module.min.js +1 -1
  257. package/dist/network.min.js +1 -1
  258. package/dist/network.module.min.js +1 -1
  259. package/dist/ordinal.min.js +1 -1
  260. package/dist/ordinal.module.min.js +1 -1
  261. package/dist/physics-matter.min.js +1 -1
  262. package/dist/physics-matter.module.min.js +1 -1
  263. package/dist/physics-rapier.min.js +1 -1
  264. package/dist/physics-rapier.module.min.js +1 -1
  265. package/dist/physics.min.js +1 -1
  266. package/dist/physics.module.min.js +1 -1
  267. package/dist/physicsWorker.js +1 -1
  268. package/dist/realtime.min.js +1 -1
  269. package/dist/realtime.module.min.js +1 -1
  270. package/dist/rough.min.js +1 -0
  271. package/dist/rough.module.min.js +1 -0
  272. package/dist/semiotic-ai-core.min.js +1 -1
  273. package/dist/semiotic-ai-core.module.min.js +1 -1
  274. package/dist/semiotic-ai.d.ts +3 -1
  275. package/dist/semiotic-ai.min.js +1 -1
  276. package/dist/semiotic-ai.module.min.js +1 -1
  277. package/dist/semiotic-controls.d.ts +2 -0
  278. package/dist/semiotic-data.min.js +1 -1
  279. package/dist/semiotic-data.module.min.js +1 -1
  280. package/dist/semiotic-experimental.min.js +1 -1
  281. package/dist/semiotic-experimental.module.min.js +1 -1
  282. package/dist/semiotic-geo.d.ts +4 -0
  283. package/dist/semiotic-network.d.ts +4 -0
  284. package/dist/semiotic-ordinal.d.ts +6 -0
  285. package/dist/semiotic-physics.d.ts +4 -0
  286. package/dist/semiotic-realtime-core.min.js +1 -1
  287. package/dist/semiotic-realtime-core.module.min.js +1 -1
  288. package/dist/semiotic-realtime-react.min.js +1 -1
  289. package/dist/semiotic-realtime-react.module.min.js +1 -1
  290. package/dist/semiotic-recipes-core.min.js +1 -1
  291. package/dist/semiotic-recipes-core.module.min.js +1 -1
  292. package/dist/semiotic-recipes-react.min.js +1 -1
  293. package/dist/semiotic-recipes-react.module.min.js +1 -1
  294. package/dist/semiotic-recipes.min.js +1 -1
  295. package/dist/semiotic-recipes.module.min.js +1 -1
  296. package/dist/semiotic-rough.d.ts +4 -0
  297. package/dist/semiotic-server-edge.min.js +1 -1
  298. package/dist/semiotic-server-edge.module.min.js +1 -1
  299. package/dist/semiotic-server-node.min.js +1 -1
  300. package/dist/semiotic-server-node.module.min.js +1 -1
  301. package/dist/semiotic-themes-core.min.js +1 -1
  302. package/dist/semiotic-themes-core.module.min.js +1 -1
  303. package/dist/semiotic-themes-react.min.js +1 -1
  304. package/dist/semiotic-themes-react.module.min.js +1 -1
  305. package/dist/semiotic-themes.min.js +1 -1
  306. package/dist/semiotic-themes.module.min.js +1 -1
  307. package/dist/semiotic-utils-core.d.ts +4 -0
  308. package/dist/semiotic-utils-core.min.js +1 -1
  309. package/dist/semiotic-utils-core.module.min.js +1 -1
  310. package/dist/semiotic-utils-react.min.js +1 -1
  311. package/dist/semiotic-utils-react.module.min.js +1 -1
  312. package/dist/semiotic-utils.min.js +1 -1
  313. package/dist/semiotic-utils.module.min.js +1 -1
  314. package/dist/semiotic-value.min.js +1 -1
  315. package/dist/semiotic-value.module.min.js +1 -1
  316. package/dist/semiotic-xy.d.ts +4 -0
  317. package/dist/semiotic.d.ts +9 -1
  318. package/dist/semiotic.min.js +1 -1
  319. package/dist/semiotic.module.min.js +1 -1
  320. package/dist/server.min.js +1 -1
  321. package/dist/server.module.min.js +1 -1
  322. package/dist/test-utils/capturedFrameProps.d.ts +67 -0
  323. package/dist/test-utils/frameMock.d.ts +12 -9
  324. package/dist/xy.min.js +1 -1
  325. package/dist/xy.module.min.js +1 -1
  326. package/package.json +29 -10
  327. package/dist/semiotic-ai-statisticalOverlays-CY4WKR4A.module.min.js +0 -2
  328. package/dist/semiotic-chunk-3FSVZ46U.module.min.js +0 -2
  329. package/dist/semiotic-statisticalOverlays-UOMSFKVJ.module.min.js +0 -2
  330. package/dist/xy-chunk-IWD6IB6V.module.min.js +0 -2
  331. package/dist/xy-statisticalOverlays-7RWG6LJT.module.min.js +0 -2
@@ -8,6 +8,8 @@
8
8
  */
9
9
  export { DirectManipulationControl, } from "./components/DirectManipulationControl";
10
10
  export type { DirectManipulationControlProps, } from "./components/DirectManipulationControl";
11
+ export { SentenceFilter } from "./components/controls/SentenceFilter";
12
+ export type { SentenceFilterBaseDefinition, SentenceFilterChangeMeta, SentenceFilterDefinition, SentenceFilterMultiSelectDefinition, SentenceFilterNumberDefinition, SentenceFilterOption, SentenceFilterPrimitive, SentenceFilterProps, SentenceFilterRangeDefinition, SentenceFilterRenderContext, SentenceFilterSelectDefinition, SentenceFilterTextDefinition, SentenceFilterToggleDefinition, SentenceFilterValue, } from "./components/controls/SentenceFilter";
11
13
  export { createControlObservationAdapter, VISUALIZATION_CONTROL_TYPES, } from "./components/controls/controlContract";
12
14
  export type { ControlInputSource, ControlObservation, ControlObservationAdapterOptions, ControlObservationCallback, ControlObservationPhase, VisualizationControlDefinition, VisualizationControlType, VisualizationControlValue, } from "./components/controls/controlContract";
13
15
  export { auditVisualizationControls } from "./components/controls/controlAudit";
@@ -1 +1 @@
1
- "use strict";var e,t=Object.defineProperty,a=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,o=Object.prototype.hasOwnProperty,i={};function n(e){let t=1/0,a=-1/0;for(const r of e)t>r&&(t=r),r>a&&(a=r);return[t,a]}function s(e,t){const{field:a,bins:r=10}=t,o=e.map(e=>Number(e[a])).filter(e=>!isNaN(e));if(0===o.length)return[];const[i,s]=n(o),l=t.domain?t.domain[0]:i,c=t.domain?t.domain[1]:s;if(l===c)return[{category:`${l}-${c}`,value:o.length}];const u=(c-l)/r,d=Array(r).fill(0);for(const e of o){let t=Math.floor((e-l)/u);t===r&&(t=r-1),t>=0&&r>t&&d[t]++}return d.map((e,t)=>{const a=l+t*u,r=a+u;return{category:`${f(a)}-${f(r)}`,value:e}})}function l(e,t){const{groupBy:a,value:r,agg:o="sum"}=t,i=new Map;for(const t of e){const e=t[a]+"";i.has(e)||i.set(e,[]),i.get(e).push(Number(t[r]))}const s=[];for(const[e,t]of i){let r;switch(o){case"count":r=t.length;break;case"mean":r=t.reduce((e,t)=>e+t,0)/t.length;break;case"min":r=n(t)[0];break;case"max":r=n(t)[1];break;default:r=t.reduce((e,t)=>e+t,0)}s.push({[a]:e,value:r})}return s}function c(e,t){const{key:a,fields:r}=t,o=new Map;for(const t of e){const e=t[a]+"";if(o.has(e)||o.set(e,[]),r){const a={};for(const e of r)e in t&&(a[e]=t[e]);o.get(e).push(a)}else o.get(e).push({...t})}const i=[];for(const[e,t]of o)i.push({id:e,coordinates:t});return i}function u(e,t){const{columns:a,nameField:r="name",valueField:o="value"}=t,i=new Set(a),n=[];for(const t of e){const e={};for(const a of Object.keys(t))i.has(a)||(e[a]=t[a]);for(const i of a)n.push({...e,[r]:i,[o]:t[i]})}return n}function f(e){return Math.round(1e3*e)/1e3+""}function d(e){return"nominal"===e||"ordinal"===e}function p(e){return"quantitative"===e||"temporal"===e}function m(e){return"object"==typeof e&&null!==e&&!Array.isArray(e)}((e,a)=>{for(var r in a)t(e,r,{get:a[r],enumerable:!0})})(i,{bin:()=>s,fromArrow:()=>x,fromVegaLite:()=>h,groupBy:()=>c,mergeData:()=>k,pivot:()=>u,rollup:()=>l}),module.exports=(e=i,((e,i,n,s)=>{if(i)for(let n of r(i))o.call(e,n)||void 0===n||t(e,n,{get:()=>i[n],enumerable:!(s=a(i,n))||s.enumerable});return e})(t({},"__esModule",{value:!0}),e));var y={category10:"category10",category20:"category20",category20b:"category20",category20c:"category20",accent:"accent",dark2:"dark2",paired:"paired",pastel1:"pastel1",pastel2:"pastel2",set1:"set1",set2:"set2",set3:"set3",tableau10:"category10",tableau20:"category20"},g={linear:"linear","monotone-x":"monotoneX","monotone-y":"monotoneY",monotone:"monotoneX",step:"step","step-after":"stepAfter","step-before":"stepBefore",basis:"basis",cardinal:"cardinal","catmull-rom":"catmullRom"},b={sum:"sum",mean:"mean",average:"mean",count:"count",min:"min",max:"max",median:"mean"};function h(e){e=function(e){const t=e;if(!function(e){const t=e.usermeta;if(m(t)&&m(t.idid))return t.idid}(e)||!Array.isArray(t.layer))return e;const a=t.layer.filter(e=>m(e)&&!function(e){return!!(m(e)&&m(e.usermeta)&&m(e.usermeta.idid))&&"annotation-layer"===e.usermeta.idid.role}(e));if(1!==a.length||void 0===a[0].mark)return e;const{layer:r,...o}=t,{usermeta:i,...n}=a[0];return{...o,...n}}(e);const t=[],{type:a,markProps:r}=function(e){if(!e)return{type:"",markProps:{}};if("string"==typeof e)return{type:e,markProps:{}};const{type:t,...a}=e;return{type:t,markProps:a}}(e.mark),o=e.encoding||{},i=o.x,n=o.y,s=o.color,c=o.size,u=o.theta,f=o.opacity;let h;e.data?.values?h=e.data.values:e.data?.url&&t.push("data.url is not supported — only inline data.values can be translated. Provide data manually."),e.transform&&e.transform.length>0&&t.push("Vega-Lite transforms are not supported. Pre-transform your data before passing to fromVegaLite()."),e.layer&&t.push('Layered specs ("layer") are not supported. Only single-mark specs can be translated.'),(e.hconcat||e.vconcat||e.concat)&&t.push('Concatenated views ("hconcat"/"vconcat"/"concat") are not supported. Translate each sub-spec individually.'),(e.facet||o.facet||o.row||o.column)&&t.push("Faceted views are not supported. Use Semiotic's LinkedCharts or render multiple charts manually."),e.repeat&&t.push('Repeated views ("repeat") are not supported. Translate each field combination individually.'),(e.params||e.selection)&&t.push("Selections/params are not supported. Use Semiotic's LinkedCharts and selection props for interactivity.");const x={};e.width&&(x.width=e.width),e.height&&(x.height=e.height);const k=function(e){if(e)return"string"==typeof e?e:e.text}(e.title);if(k&&(x.title=k),s?.field&&(x.colorBy=s.field,s.scale?.scheme)){const e=y[s.scale.scheme];e&&(x.colorScheme=e)}void 0!==f?.value&&(x.pointOpacity=f.value);const w=i?.aggregate,L=n?.aggregate;if(h&&(w||L)){const e=L?n:i,t=L?i:n,a=b[e.aggregate];if(a&&t?.field&&e.field)h=l(h,{groupBy:t.field,value:e.field,agg:a});else if(("count"===a||"count"===e.aggregate)&&t?.field&&h){const e=new Map;for(const a of h){const r=a[t.field]+"";e.set(r,(e.get(r)||0)+1)}h=Array.from(e,([e,a])=>({[t.field]:e,value:a}))}}if(i?.bin||n?.bin){const e="Histogram";h&&(x.data=h),i?.bin?(x.valueAccessor=i.field,n?.field&&(x.categoryAccessor=n.field),i.axis?.title&&(x.valueLabel=i.axis.title)):n?.bin&&(x.valueAccessor=n.field,i?.field&&(x.categoryAccessor=i.field),n.axis?.title&&(x.valueLabel=n.axis.title));const a=i?.bin||n?.bin,r="object"==typeof a?a.maxbins:void 0;return r&&(x.bins=r),A(e,x,t)}let B;switch(a){case"bar":B=function(e,t,a,r,o,i,n){let s;return a?.field&&!1!==e?.stack&&!1!==t?.stack&&null!==e?.stack&&null!==t?.stack?(s="StackedBarChart",r.stackBy=a.field):s="BarChart",d(e?.type)&&p(t?.type)?(r.categoryAccessor=e.field,r.valueAccessor=n?"value":t.field,e?.axis?.title&&(r.categoryLabel=e.axis.title),t?.axis?.title&&(r.valueLabel=t.axis.title)):p(e?.type)&&d(t?.type)?(r.categoryAccessor=t.field,r.valueAccessor=i?"value":e.field,r.orientation="horizontal",t?.axis?.title&&(r.categoryLabel=t.axis.title),e?.axis?.title&&(r.valueLabel=e.axis.title)):(e?.field&&(r.categoryAccessor=e.field),t?.field&&(r.valueAccessor=n?"value":t.field),e?.axis?.title&&(r.categoryLabel=e.axis.title),t?.axis?.title&&(r.valueLabel=t.axis.title)),o&&(r.data=o),s}(i,n,s,x,h,w,L);break;case"line":if(B="LineChart",v(i,n,x,w,L),s?.field&&(x.lineBy=s.field),r.interpolate){const e=g[r.interpolate];e&&(x.curve=e)}!0===r.point&&(x.showPoints=!0),h&&(x.data=h);break;case"area":if(s?.field?(B="StackedAreaChart",x.areaBy=s.field):B="AreaChart",v(i,n,x,w,L),r.interpolate){const e=g[r.interpolate];e&&(x.curve=e)}void 0!==r.opacity&&(x.areaOpacity=r.opacity),h&&(x.data=h);break;case"point":case"circle":case"square":c?.field?(B="BubbleChart",x.sizeBy=c.field,c.scale?.range&&(x.sizeRange=c.scale.range)):B="Scatterplot",v(i,n,x,w,L),h&&(x.data=h);break;case"rect":B="Heatmap",i?.field&&(x.xAccessor=i.field),n?.field&&(x.yAccessor=n.field),s?.field&&(x.valueAccessor=s.field,delete x.colorBy),i?.axis?.title&&(x.xLabel=i.axis.title),n?.axis?.title&&(x.yLabel=n.axis.title),h&&(x.data=h);break;case"arc":r.innerRadius&&r.innerRadius>0?(B="DonutChart",x.innerRadius=r.innerRadius):B="PieChart",u?.field?x.valueAccessor=u.field:n?.field&&(x.valueAccessor=L?"value":n.field),s?.field&&(x.categoryAccessor=s.field),i?.field&&!u?.field&&(x.categoryAccessor=i.field),h&&(x.data=h);break;case"tick":B="DotPlot",d(i?.type)?(x.categoryAccessor=i.field,n?.field&&(x.valueAccessor=L?"value":n.field),i?.axis?.title&&(x.categoryLabel=i.axis.title),n?.axis?.title&&(x.valueLabel=n.axis.title)):d(n?.type)?(x.categoryAccessor=n.field,i?.field&&(x.valueAccessor=w?"value":i.field),x.orientation="horizontal",n?.axis?.title&&(x.categoryLabel=n.axis.title),i?.axis?.title&&(x.valueLabel=i.axis.title)):(i?.field&&(x.categoryAccessor=i.field),n?.field&&(x.valueAccessor=L?"value":n.field)),h&&(x.data=h);break;default:t.push(`Unsupported mark type "${a}". Defaulting to Scatterplot.`),B="Scatterplot",v(i,n,x,w,L),h&&(x.data=h)}return A(B,x,t)}function v(e,t,a,r,o){e?.field&&(a.xAccessor=r?"value":e.field),t?.field&&(a.yAccessor=o?"value":t.field),e?.axis?.title&&(a.xLabel=e.axis.title),t?.axis?.title&&(a.yLabel=t.axis.title)}function A(e,t,a){const r={component:e,props:t,version:"1",createdAt:(new Date).toISOString()};if(a.length>0){r.warnings=a;for(const e of a)console.warn("[semiotic/fromVegaLite] "+e)}return r}function x(e,t={}){if(!e||"number"!=typeof e.numRows||!e.schema)return console.warn("[semiotic/fromArrow] Expected an Arrow table with `numRows` and `schema`. Returning []."),[];const a=!1!==t.coerceBigInt,r=e.schema.fields.map(e=>e.name),o=t.fields??r,i=[];for(const t of o){const a=e.getChild(t);a?i.push({name:t,column:a}):console.warn(`[semiotic/fromArrow] Column "${t}" is not in the table schema; skipping it.`)}let n=!1;const s=Array(e.numRows);for(let t=0;e.numRows>t;t++){const e={};for(const{name:r,column:o}of i){let i=o.get(t);a&&"bigint"==typeof i&&(i<BigInt(Number.MIN_SAFE_INTEGER)||i>BigInt(Number.MAX_SAFE_INTEGER)?n||(n=!0,console.warn("[semiotic/fromArrow] A 64-bit integer exceeds Number.MAX_SAFE_INTEGER; left as bigint to avoid precision loss.")):i=Number(i)),e[r]=i}s[t]=e}return s}function k(e,t,a){const{featureKey:r,dataKey:o}=a,i=new Map;for(const e of t)i.set(e[o]+"",e);return e.map(e=>{const t=(e=>{const t=r.split(".");let a=e;for(const e of t)a=a?.[e];return(a??"")+""})(e),a=i.get(t);return a?{...e,properties:{...e.properties,...a}}:e})}
1
+ var e,t=Object.defineProperty,a=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,r=Object.prototype.hasOwnProperty,i={};function n(e){let t=1/0,a=-1/0;for(const o of e)t>o&&(t=o),o>a&&(a=o);return[t,a]}function s(e,t){const{field:a,bins:o=10}=t,r=e.map(e=>Number(e[a])).filter(e=>!isNaN(e));if(0===r.length)return[];const[i,s]=n(r),l=t.domain?t.domain[0]:i,c=t.domain?t.domain[1]:s;if(l===c)return[{category:`${l}-${c}`,value:r.length}];const u=(c-l)/o,d=Array(o).fill(0);for(const e of r){let t=Math.floor((e-l)/u);t===o&&(t=o-1),t>=0&&o>t&&d[t]++}return d.map((e,t)=>{const a=l+t*u,o=a+u;return{category:`${f(a)}-${f(o)}`,value:e}})}function l(e,t){const{groupBy:a,value:o,agg:r="sum"}=t,i=new Map;for(const t of e){const e=t[a]+"";i.has(e)||i.set(e,[]),i.get(e).push(Number(t[o]))}const s=[];for(const[e,t]of i){let o;switch(r){case"count":o=t.length;break;case"mean":o=t.reduce((e,t)=>e+t,0)/t.length;break;case"min":o=n(t)[0];break;case"max":o=n(t)[1];break;default:o=t.reduce((e,t)=>e+t,0)}s.push({[a]:e,value:o})}return s}function c(e,t){const{key:a,fields:o}=t,r=new Map;for(const t of e){const e=t[a]+"";if(r.has(e)||r.set(e,[]),o){const a={};for(const e of o)e in t&&(a[e]=t[e]);r.get(e).push(a)}else r.get(e).push({...t})}const i=[];for(const[e,t]of r)i.push({id:e,coordinates:t});return i}function u(e,t){const{columns:a,nameField:o="name",valueField:r="value"}=t,i=new Set(a),n=[];for(const t of e){const e={};for(const a of Object.keys(t))i.has(a)||(e[a]=t[a]);for(const i of a)n.push({...e,[o]:i,[r]:t[i]})}return n}function f(e){return Math.round(1e3*e)/1e3+""}function d(e){return"nominal"===e||"ordinal"===e}function p(e){return"quantitative"===e||"temporal"===e}((e,a)=>{for(var o in a)t(e,o,{get:a[o],enumerable:!0})})(i,{bin:()=>s,fromArrow:()=>x,fromVegaLite:()=>b,groupBy:()=>c,mergeData:()=>A,pivot:()=>u,rollup:()=>l}),module.exports=(e=i,((e,i,n,s)=>{if(i)for(let n of o(i))r.call(e,n)||void 0===n||t(e,n,{get:()=>i[n],enumerable:!(s=a(i,n))||s.enumerable});return e})(t({},"__esModule",{value:!0}),e));var m={category10:"category10",category20:"category20",category20b:"category20",category20c:"category20",accent:"accent",dark2:"dark2",paired:"paired",pastel1:"pastel1",pastel2:"pastel2",set1:"set1",set2:"set2",set3:"set3",tableau10:"category10",tableau20:"category20"},y={linear:"linear","monotone-x":"monotoneX","monotone-y":"monotoneY",monotone:"monotoneX",step:"step","step-after":"stepAfter","step-before":"stepBefore",basis:"basis",cardinal:"cardinal","catmull-rom":"catmullRom"},g={sum:"sum",mean:"mean",average:"mean",count:"count",min:"min",max:"max",median:"mean"};function b(e){e=function(e){if(!function(e){return e.usermeta?.idid}(e)||!Array.isArray(e.layer))return e;const t=e.layer.filter(e=>!function(e){return"annotation-layer"===e.usermeta?.idid?.role}(e));if(1!==t.length)return e;const{layer:a,...o}=e,{usermeta:r,...i}=t[0];return{...o,...i}}(e);const t=[],{type:a,markProps:o}=function(e){if(!e)return{type:"",markProps:{}};if("string"==typeof e)return{type:e,markProps:{}};const{type:t,...a}=e;return{type:t,markProps:a}}(e.mark),r=e.encoding||{},i=r.x,n=r.y,s=r.color,c=r.size,u=r.theta,f=r.opacity;let b;e.data?.values?b=e.data.values:e.data?.url&&t.push("data.url is not supported — only inline data.values can be translated. Provide data manually."),e.transform&&e.transform.length>0&&t.push("Vega-Lite transforms are not supported. Pre-transform your data before passing to fromVegaLite()."),e.layer&&t.push('Layered specs ("layer") are not supported. Only single-mark specs can be translated.'),(e.hconcat||e.vconcat||e.concat)&&t.push('Concatenated views ("hconcat"/"vconcat"/"concat") are not supported. Translate each sub-spec individually.'),(e.facet||r.facet||r.row||r.column)&&t.push("Faceted views are not supported. Use Semiotic's LinkedCharts or render multiple charts manually."),e.repeat&&t.push('Repeated views ("repeat") are not supported. Translate each field combination individually.'),(e.params||e.selection)&&t.push("Selections/params are not supported. Use Semiotic's LinkedCharts and selection props for interactivity.");const x={};e.width&&(x.width=e.width),e.height&&(x.height=e.height);const A=function(e){if(e)return"string"==typeof e?e:e.text}(e.title);if(A&&(x.title=A),s?.field&&(x.colorBy=s.field,s.scale?.scheme)){const e=m[s.scale.scheme];e&&(x.colorScheme=e)}void 0!==f?.value&&(x.pointOpacity=f.value);const w=i?.aggregate,k=n?.aggregate;if(b&&(w||k)){const e=k?n:i,t=k?i:n,a=g[e.aggregate];if(a&&t?.field&&e.field)b=l(b,{groupBy:t.field,value:e.field,agg:a});else if(("count"===a||"count"===e.aggregate)&&t?.field&&b){const e=new Map;for(const a of b){const o=a[t.field]+"";e.set(o,(e.get(o)||0)+1)}b=Array.from(e,([e,a])=>({[t.field]:e,value:a}))}}if(i?.bin||n?.bin){const e="Histogram";b&&(x.data=b),i?.bin?(x.valueAccessor=i.field,n?.field&&(x.categoryAccessor=n.field),i.axis?.title&&(x.valueLabel=i.axis.title)):n?.bin&&(x.valueAccessor=n.field,i?.field&&(x.categoryAccessor=i.field),n.axis?.title&&(x.valueLabel=n.axis.title));const a=i?.bin||n?.bin,o="object"==typeof a?a.maxbins:void 0;return o&&(x.bins=o),v(e,x,t)}let L;switch(a){case"bar":L=function(e,t,a,o,r,i,n){let s;return a?.field&&!1!==e?.stack&&!1!==t?.stack&&null!==e?.stack&&null!==t?.stack?(s="StackedBarChart",o.stackBy=a.field):s="BarChart",d(e?.type)&&p(t?.type)?(o.categoryAccessor=e.field,o.valueAccessor=n?"value":t.field,e?.axis?.title&&(o.categoryLabel=e.axis.title),t?.axis?.title&&(o.valueLabel=t.axis.title)):p(e?.type)&&d(t?.type)?(o.categoryAccessor=t.field,o.valueAccessor=i?"value":e.field,o.orientation="horizontal",t?.axis?.title&&(o.categoryLabel=t.axis.title),e?.axis?.title&&(o.valueLabel=e.axis.title)):(e?.field&&(o.categoryAccessor=e.field),t?.field&&(o.valueAccessor=n?"value":t.field),e?.axis?.title&&(o.categoryLabel=e.axis.title),t?.axis?.title&&(o.valueLabel=t.axis.title)),r&&(o.data=r),s}(i,n,s,x,b,w,k);break;case"line":if(L="LineChart",h(i,n,x,w,k),s?.field&&(x.lineBy=s.field),o.interpolate){const e=y[o.interpolate];e&&(x.curve=e)}!0===o.point&&(x.showPoints=!0),b&&(x.data=b);break;case"area":if(s?.field?(L="StackedAreaChart",x.areaBy=s.field):L="AreaChart",h(i,n,x,w,k),o.interpolate){const e=y[o.interpolate];e&&(x.curve=e)}void 0!==o.opacity&&(x.areaOpacity=o.opacity),b&&(x.data=b);break;case"point":case"circle":case"square":c?.field?(L="BubbleChart",x.sizeBy=c.field,c.scale?.range&&(x.sizeRange=c.scale.range)):L="Scatterplot",h(i,n,x,w,k),b&&(x.data=b);break;case"rect":L="Heatmap",i?.field&&(x.xAccessor=i.field),n?.field&&(x.yAccessor=n.field),s?.field&&(x.valueAccessor=s.field,delete x.colorBy),i?.axis?.title&&(x.xLabel=i.axis.title),n?.axis?.title&&(x.yLabel=n.axis.title),b&&(x.data=b);break;case"arc":o.innerRadius&&o.innerRadius>0?(L="DonutChart",x.innerRadius=o.innerRadius):L="PieChart",u?.field?x.valueAccessor=u.field:n?.field&&(x.valueAccessor=k?"value":n.field),s?.field&&(x.categoryAccessor=s.field),i?.field&&!u?.field&&(x.categoryAccessor=i.field),b&&(x.data=b);break;case"tick":L="DotPlot",d(i?.type)?(x.categoryAccessor=i.field,n?.field&&(x.valueAccessor=k?"value":n.field),i?.axis?.title&&(x.categoryLabel=i.axis.title),n?.axis?.title&&(x.valueLabel=n.axis.title)):d(n?.type)?(x.categoryAccessor=n.field,i?.field&&(x.valueAccessor=w?"value":i.field),x.orientation="horizontal",n?.axis?.title&&(x.categoryLabel=n.axis.title),i?.axis?.title&&(x.valueLabel=i.axis.title)):(i?.field&&(x.categoryAccessor=i.field),n?.field&&(x.valueAccessor=k?"value":n.field)),b&&(x.data=b);break;default:t.push(`Unsupported mark type "${a}". Defaulting to Scatterplot.`),L="Scatterplot",h(i,n,x,w,k),b&&(x.data=b)}return v(L,x,t)}function h(e,t,a,o,r){e?.field&&(a.xAccessor=o?"value":e.field),t?.field&&(a.yAccessor=r?"value":t.field),e?.axis?.title&&(a.xLabel=e.axis.title),t?.axis?.title&&(a.yLabel=t.axis.title)}function v(e,t,a){const o={component:e,props:t,version:"1",createdAt:(new Date).toISOString()};if(a.length>0){o.warnings=a;for(const e of a)console.warn("[semiotic/fromVegaLite] "+e)}return o}function x(e,t={}){if(!e||"number"!=typeof e.numRows||!e.schema)return console.warn("[semiotic/fromArrow] Expected an Arrow table with `numRows` and `schema`. Returning []."),[];const a=!1!==t.coerceBigInt,o=e.schema.fields.map(e=>e.name),r=t.fields??o,i=[];for(const t of r){const a=e.getChild(t);a?i.push({name:t,column:a}):console.warn(`[semiotic/fromArrow] Column "${t}" is not in the table schema; skipping it.`)}let n=!1;const s=Array(e.numRows);for(let t=0;e.numRows>t;t++){const e={};for(const{name:o,column:r}of i){let i=r.get(t);a&&"bigint"==typeof i&&(i<BigInt(Number.MIN_SAFE_INTEGER)||i>BigInt(Number.MAX_SAFE_INTEGER)?n||(n=!0,console.warn("[semiotic/fromArrow] A 64-bit integer exceeds Number.MAX_SAFE_INTEGER; left as bigint to avoid precision loss.")):i=Number(i)),e[o]=i}s[t]=e}return s}function A(e,t,a){const{featureKey:o,dataKey:r}=a,i=new Map;for(const e of t)i.set(e[r]+"",e);return e.map(e=>{const t=(e=>{const t=o.split(".");let a=e;for(const e of t)a=null!==a&&"object"==typeof a?a[e]:void 0;return(a??"")+""})(e),a=i.get(t);return a?{...e,properties:{...e.properties,...a}}:e})}
@@ -1 +1 @@
1
- function e(e){let t=1/0,a=-1/0;for(const o of e)t>o&&(t=o),o>a&&(a=o);return[t,a]}function t(t,a){const{field:o,bins:r=10}=a,n=t.map(e=>Number(e[o])).filter(e=>!isNaN(e));if(0===n.length)return[];const[s,l]=e(n),c=a.domain?a.domain[0]:s,u=a.domain?a.domain[1]:l;if(c===u)return[{category:`${c}-${u}`,value:n.length}];const f=(u-c)/r,d=Array(r).fill(0);for(const e of n){let t=Math.floor((e-c)/f);t===r&&(t=r-1),t>=0&&r>t&&d[t]++}return d.map((e,t)=>{const a=c+t*f,o=a+f;return{category:`${i(a)}-${i(o)}`,value:e}})}function a(t,a){const{groupBy:o,value:r,agg:i="sum"}=a,n=new Map;for(const e of t){const t=e[o]+"";n.has(t)||n.set(t,[]),n.get(t).push(Number(e[r]))}const s=[];for(const[t,a]of n){let r;switch(i){case"count":r=a.length;break;case"mean":r=a.reduce((e,t)=>e+t,0)/a.length;break;case"min":r=e(a)[0];break;case"max":r=e(a)[1];break;default:r=a.reduce((e,t)=>e+t,0)}s.push({[o]:t,value:r})}return s}function o(e,t){const{key:a,fields:o}=t,r=new Map;for(const t of e){const e=t[a]+"";if(r.has(e)||r.set(e,[]),o){const a={};for(const e of o)e in t&&(a[e]=t[e]);r.get(e).push(a)}else r.get(e).push({...t})}const i=[];for(const[e,t]of r)i.push({id:e,coordinates:t});return i}function r(e,t){const{columns:a,nameField:o="name",valueField:r="value"}=t,i=new Set(a),n=[];for(const t of e){const e={};for(const a of Object.keys(t))i.has(a)||(e[a]=t[a]);for(const i of a)n.push({...e,[o]:i,[r]:t[i]})}return n}function i(e){return Math.round(1e3*e)/1e3+""}function n(e){return"nominal"===e||"ordinal"===e}function s(e){return"quantitative"===e||"temporal"===e}function l(e){return"object"==typeof e&&null!==e&&!Array.isArray(e)}var c={category10:"category10",category20:"category20",category20b:"category20",category20c:"category20",accent:"accent",dark2:"dark2",paired:"paired",pastel1:"pastel1",pastel2:"pastel2",set1:"set1",set2:"set2",set3:"set3",tableau10:"category10",tableau20:"category20"},u={linear:"linear","monotone-x":"monotoneX","monotone-y":"monotoneY",monotone:"monotoneX",step:"step","step-after":"stepAfter","step-before":"stepBefore",basis:"basis",cardinal:"cardinal","catmull-rom":"catmullRom"},f={sum:"sum",mean:"mean",average:"mean",count:"count",min:"min",max:"max",median:"mean"};function d(e){e=function(e){const t=e;if(!function(e){const t=e.usermeta;if(l(t)&&l(t.idid))return t.idid}(e)||!Array.isArray(t.layer))return e;const a=t.layer.filter(e=>l(e)&&!function(e){return!!(l(e)&&l(e.usermeta)&&l(e.usermeta.idid))&&"annotation-layer"===e.usermeta.idid.role}(e));if(1!==a.length||void 0===a[0].mark)return e;const{layer:o,...r}=t,{usermeta:i,...n}=a[0];return{...r,...n}}(e);const t=[],{type:o,markProps:r}=function(e){if(!e)return{type:"",markProps:{}};if("string"==typeof e)return{type:e,markProps:{}};const{type:t,...a}=e;return{type:t,markProps:a}}(e.mark),i=e.encoding||{},d=i.x,y=i.y,g=i.color,h=i.size,b=i.theta,v=i.opacity;let x;e.data?.values?x=e.data.values:e.data?.url&&t.push("data.url is not supported — only inline data.values can be translated. Provide data manually."),e.transform&&e.transform.length>0&&t.push("Vega-Lite transforms are not supported. Pre-transform your data before passing to fromVegaLite()."),e.layer&&t.push('Layered specs ("layer") are not supported. Only single-mark specs can be translated.'),(e.hconcat||e.vconcat||e.concat)&&t.push('Concatenated views ("hconcat"/"vconcat"/"concat") are not supported. Translate each sub-spec individually.'),(e.facet||i.facet||i.row||i.column)&&t.push("Faceted views are not supported. Use Semiotic's LinkedCharts or render multiple charts manually."),e.repeat&&t.push('Repeated views ("repeat") are not supported. Translate each field combination individually.'),(e.params||e.selection)&&t.push("Selections/params are not supported. Use Semiotic's LinkedCharts and selection props for interactivity.");const A={};e.width&&(A.width=e.width),e.height&&(A.height=e.height);const k=function(e){if(e)return"string"==typeof e?e:e.text}(e.title);if(k&&(A.title=k),g?.field&&(A.colorBy=g.field,g.scale?.scheme)){const e=c[g.scale.scheme];e&&(A.colorScheme=e)}void 0!==v?.value&&(A.pointOpacity=v.value);const w=d?.aggregate,L=y?.aggregate;if(x&&(w||L)){const e=L?y:d,t=L?d:y,o=f[e.aggregate];if(o&&t?.field&&e.field)x=a(x,{groupBy:t.field,value:e.field,agg:o});else if(("count"===o||"count"===e.aggregate)&&t?.field&&x){const e=new Map;for(const a of x){const o=a[t.field]+"";e.set(o,(e.get(o)||0)+1)}x=Array.from(e,([e,a])=>({[t.field]:e,value:a}))}}if(d?.bin||y?.bin){const e="Histogram";x&&(A.data=x),d?.bin?(A.valueAccessor=d.field,y?.field&&(A.categoryAccessor=y.field),d.axis?.title&&(A.valueLabel=d.axis.title)):y?.bin&&(A.valueAccessor=y.field,d?.field&&(A.categoryAccessor=d.field),y.axis?.title&&(A.valueLabel=y.axis.title));const a=d?.bin||y?.bin,o="object"==typeof a?a.maxbins:void 0;return o&&(A.bins=o),m(e,A,t)}let B;switch(o){case"bar":B=function(e,t,a,o,r,i,l){let c;return a?.field&&!1!==e?.stack&&!1!==t?.stack&&null!==e?.stack&&null!==t?.stack?(c="StackedBarChart",o.stackBy=a.field):c="BarChart",n(e?.type)&&s(t?.type)?(o.categoryAccessor=e.field,o.valueAccessor=l?"value":t.field,e?.axis?.title&&(o.categoryLabel=e.axis.title),t?.axis?.title&&(o.valueLabel=t.axis.title)):s(e?.type)&&n(t?.type)?(o.categoryAccessor=t.field,o.valueAccessor=i?"value":e.field,o.orientation="horizontal",t?.axis?.title&&(o.categoryLabel=t.axis.title),e?.axis?.title&&(o.valueLabel=e.axis.title)):(e?.field&&(o.categoryAccessor=e.field),t?.field&&(o.valueAccessor=l?"value":t.field),e?.axis?.title&&(o.categoryLabel=e.axis.title),t?.axis?.title&&(o.valueLabel=t.axis.title)),r&&(o.data=r),c}(d,y,g,A,x,w,L);break;case"line":if(B="LineChart",p(d,y,A,w,L),g?.field&&(A.lineBy=g.field),r.interpolate){const e=u[r.interpolate];e&&(A.curve=e)}!0===r.point&&(A.showPoints=!0),x&&(A.data=x);break;case"area":if(g?.field?(B="StackedAreaChart",A.areaBy=g.field):B="AreaChart",p(d,y,A,w,L),r.interpolate){const e=u[r.interpolate];e&&(A.curve=e)}void 0!==r.opacity&&(A.areaOpacity=r.opacity),x&&(A.data=x);break;case"point":case"circle":case"square":h?.field?(B="BubbleChart",A.sizeBy=h.field,h.scale?.range&&(A.sizeRange=h.scale.range)):B="Scatterplot",p(d,y,A,w,L),x&&(A.data=x);break;case"rect":B="Heatmap",d?.field&&(A.xAccessor=d.field),y?.field&&(A.yAccessor=y.field),g?.field&&(A.valueAccessor=g.field,delete A.colorBy),d?.axis?.title&&(A.xLabel=d.axis.title),y?.axis?.title&&(A.yLabel=y.axis.title),x&&(A.data=x);break;case"arc":r.innerRadius&&r.innerRadius>0?(B="DonutChart",A.innerRadius=r.innerRadius):B="PieChart",b?.field?A.valueAccessor=b.field:y?.field&&(A.valueAccessor=L?"value":y.field),g?.field&&(A.categoryAccessor=g.field),d?.field&&!b?.field&&(A.categoryAccessor=d.field),x&&(A.data=x);break;case"tick":B="DotPlot",n(d?.type)?(A.categoryAccessor=d.field,y?.field&&(A.valueAccessor=L?"value":y.field),d?.axis?.title&&(A.categoryLabel=d.axis.title),y?.axis?.title&&(A.valueLabel=y.axis.title)):n(y?.type)?(A.categoryAccessor=y.field,d?.field&&(A.valueAccessor=w?"value":d.field),A.orientation="horizontal",y?.axis?.title&&(A.categoryLabel=y.axis.title),d?.axis?.title&&(A.valueLabel=d.axis.title)):(d?.field&&(A.categoryAccessor=d.field),y?.field&&(A.valueAccessor=L?"value":y.field)),x&&(A.data=x);break;default:t.push(`Unsupported mark type "${o}". Defaulting to Scatterplot.`),B="Scatterplot",p(d,y,A,w,L),x&&(A.data=x)}return m(B,A,t)}function p(e,t,a,o,r){e?.field&&(a.xAccessor=o?"value":e.field),t?.field&&(a.yAccessor=r?"value":t.field),e?.axis?.title&&(a.xLabel=e.axis.title),t?.axis?.title&&(a.yLabel=t.axis.title)}function m(e,t,a){const o={component:e,props:t,version:"1",createdAt:(new Date).toISOString()};if(a.length>0){o.warnings=a;for(const e of a)console.warn("[semiotic/fromVegaLite] "+e)}return o}function y(e,t={}){if(!e||"number"!=typeof e.numRows||!e.schema)return console.warn("[semiotic/fromArrow] Expected an Arrow table with `numRows` and `schema`. Returning []."),[];const a=!1!==t.coerceBigInt,o=e.schema.fields.map(e=>e.name),r=t.fields??o,i=[];for(const t of r){const a=e.getChild(t);a?i.push({name:t,column:a}):console.warn(`[semiotic/fromArrow] Column "${t}" is not in the table schema; skipping it.`)}let n=!1;const s=Array(e.numRows);for(let t=0;e.numRows>t;t++){const e={};for(const{name:o,column:r}of i){let i=r.get(t);a&&"bigint"==typeof i&&(i<BigInt(Number.MIN_SAFE_INTEGER)||i>BigInt(Number.MAX_SAFE_INTEGER)?n||(n=!0,console.warn("[semiotic/fromArrow] A 64-bit integer exceeds Number.MAX_SAFE_INTEGER; left as bigint to avoid precision loss.")):i=Number(i)),e[o]=i}s[t]=e}return s}function g(e,t,a){const{featureKey:o,dataKey:r}=a,i=new Map;for(const e of t)i.set(e[r]+"",e);return e.map(e=>{const t=(e=>{const t=o.split(".");let a=e;for(const e of t)a=a?.[e];return(a??"")+""})(e),a=i.get(t);return a?{...e,properties:{...e.properties,...a}}:e})}export{t as bin,y as fromArrow,d as fromVegaLite,o as groupBy,g as mergeData,r as pivot,a as rollup};
1
+ import{bin as e,fromVegaLite as o,groupBy as n,pivot as t,rollup as r}from"./chunk-chunk-QSQVBIJA.module.min.js";import"./chunk-chunk-JJ2OOIET.module.min.js";function s(e,o={}){if(!e||"number"!=typeof e.numRows||!e.schema)return console.warn("[semiotic/fromArrow] Expected an Arrow table with `numRows` and `schema`. Returning []."),[];const n=!1!==o.coerceBigInt,t=e.schema.fields.map(e=>e.name),r=o.fields??t,s=[];for(const o of r){const n=e.getChild(o);n?s.push({name:o,column:n}):console.warn(`[semiotic/fromArrow] Column "${o}" is not in the table schema; skipping it.`)}let i=!1;const c=Array(e.numRows);for(let o=0;e.numRows>o;o++){const e={};for(const{name:t,column:r}of s){let s=r.get(o);n&&"bigint"==typeof s&&(s<BigInt(Number.MIN_SAFE_INTEGER)||s>BigInt(Number.MAX_SAFE_INTEGER)?i||(i=!0,console.warn("[semiotic/fromArrow] A 64-bit integer exceeds Number.MAX_SAFE_INTEGER; left as bigint to avoid precision loss.")):s=Number(s)),e[t]=s}c[o]=e}return c}function i(e,o,n){const{featureKey:t,dataKey:r}=n,s=new Map;for(const e of o)s.set(e[r]+"",e);return e.map(e=>{const o=(e=>{const o=t.split(".");let n=e;for(const e of o)n=null!==n&&"object"==typeof n?n[e]:void 0;return(n??"")+""})(e),n=s.get(o);return n?{...e,properties:{...e.properties,...n}}:e})}export{e as bin,s as fromArrow,o as fromVegaLite,n as groupBy,i as mergeData,t as pivot,r as rollup};