@semcore/d3-chart 3.0.0 → 3.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +13 -1
- package/lib/cjs/Area.js +9 -9
- package/lib/cjs/Axis.js +14 -14
- package/lib/cjs/Bar.js +8 -8
- package/lib/cjs/Bubble.js +10 -10
- package/lib/cjs/Donut.js +7 -7
- package/lib/cjs/Dots.js +9 -9
- package/lib/cjs/HorizontalBar.js +8 -8
- package/lib/cjs/Hover.js +3 -3
- package/lib/cjs/Line.js +8 -8
- package/lib/cjs/Plot.js +3 -3
- package/lib/cjs/Radar.js +17 -17
- package/lib/cjs/RadialTree.js +12 -12
- package/lib/cjs/ReferenceLine.js +9 -9
- package/lib/cjs/ResponsiveContainer.js +8 -3
- package/lib/cjs/ResponsiveContainer.js.map +1 -1
- package/lib/cjs/ScatterPlot.js +7 -7
- package/lib/cjs/Tooltip.js +12 -8
- package/lib/cjs/Tooltip.js.map +1 -1
- package/lib/cjs/Venn.js +7 -7
- package/lib/cjs/a11y/PlotA11yModule.js +2 -2
- package/lib/cjs/a11y/PlotA11yView.js +3 -3
- package/lib/cjs/style/tooltip.shadow.css +3 -5
- package/lib/cjs/types/Donut.d.js.map +1 -1
- package/lib/cjs/types/Hover.d.js.map +1 -1
- package/lib/es6/Area.js +9 -9
- package/lib/es6/Axis.js +14 -14
- package/lib/es6/Bar.js +8 -8
- package/lib/es6/Bubble.js +10 -10
- package/lib/es6/Donut.js +7 -7
- package/lib/es6/Dots.js +9 -9
- package/lib/es6/HorizontalBar.js +8 -8
- package/lib/es6/Hover.js +3 -3
- package/lib/es6/Line.js +8 -8
- package/lib/es6/Plot.js +3 -3
- package/lib/es6/Radar.js +17 -17
- package/lib/es6/RadialTree.js +12 -12
- package/lib/es6/ReferenceLine.js +9 -9
- package/lib/es6/ResponsiveContainer.js +8 -3
- package/lib/es6/ResponsiveContainer.js.map +1 -1
- package/lib/es6/ScatterPlot.js +7 -7
- package/lib/es6/Tooltip.js +12 -8
- package/lib/es6/Tooltip.js.map +1 -1
- package/lib/es6/Venn.js +7 -7
- package/lib/es6/a11y/PlotA11yModule.js +2 -2
- package/lib/es6/a11y/PlotA11yView.js +3 -3
- package/lib/es6/style/tooltip.shadow.css +3 -5
- package/lib/es6/types/Donut.d.js.map +1 -1
- package/lib/es6/types/Hover.d.js.map +1 -1
- package/lib/types/Donut.d.ts +1 -1
- package/lib/types/Hover.d.ts +2 -2
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ResponsiveContainer.js","names":["React","createComponent","Component","Root","sstyled","Box","trottle","fire","getOriginChildren","ResponsiveContainerRoot","_Component","_inherits","_super","_createSuper","props","_this","_classCallCheck","call","_defineProperty","_assertThisInitialized","createRef","entries","_this$asProps","asProps","Children","aspect","$container","_this$$container","width","clientWidth","height","clientHeight","style","window","getComputedStyle","minHeight","Number","parseInt","getPropertyValue","maxHeight","size","forceUpdate","observer","ResizeObserver","handleResize","_createClass","key","get","containerRef","current","value","setContext","_this$size","_slicedToArray","componentDidMount","observe","componentWillUnmount","disconnect","render","_ref","_ref2","SResponsiveContainer","styles","createElement","cn","_objectSpread","_assignProps","ResponsiveContainer"],"sources":["../../src/ResponsiveContainer.jsx"],"sourcesContent":["import React from 'react';\nimport createComponent, { Component, Root, sstyled } from '@semcore/core';\nimport { Box } from '@semcore/flex-box';\nimport trottle from '@semcore/utils/lib/rafTrottle';\nimport fire from '@semcore/utils/lib/fire';\nimport getOriginChildren from '@semcore/utils/lib/getOriginChildren';\n\nclass ResponsiveContainerRoot extends Component {\n static displayName = 'ResponsiveContainer';\n\n containerRef = React.createRef();\n size = [0, 0];\n\n constructor(props) {\n super(props);\n this.observer = new ResizeObserver(this.handleResize);\n }\n\n get $container() {\n return this.containerRef.current;\n }\n\n handleResize = trottle((entries) => {\n const { Children, aspect } = this.asProps;\n\n if (!this.$container) return;\n\n let { clientWidth: width, clientHeight: height } = this.$container;\n\n if (aspect) {\n const style = window.getComputedStyle(this.$container);\n const minHeight = Number.parseInt(style.getPropertyValue('min-height'));\n const maxHeight = Number.parseInt(style.getPropertyValue('max-height'));\n height = width * aspect;\n\n if (height < minHeight) {\n height = minHeight;\n }\n if (height > maxHeight) {\n height = maxHeight;\n }\n }\n\n if (this.size[0] === width && this.size[1] === height) return;\n\n this.size = [width, height];\n\n fire(this, 'onResize', this.size, entries);\n\n if (typeof getOriginChildren(Children) === 'function') {\n this.forceUpdate();\n }\n });\n\n setContext() {\n const [width, height] = this.size;\n return {\n width,\n height,\n };\n }\n\n componentDidMount() {\n if (this.$container) {\n // TODO: may be we can increase perfomance here? (by lsroman)\n this.observer
|
|
1
|
+
{"version":3,"file":"ResponsiveContainer.js","names":["React","createComponent","Component","Root","sstyled","Box","trottle","fire","getOriginChildren","canUseDOM","ResponsiveContainerRoot","_Component","_inherits","_super","_createSuper","props","_this","_classCallCheck","call","_defineProperty","_assertThisInitialized","createRef","entries","_this$asProps","asProps","Children","aspect","$container","_this$$container","width","clientWidth","height","clientHeight","style","window","getComputedStyle","minHeight","Number","parseInt","getPropertyValue","maxHeight","size","forceUpdate","observer","ResizeObserver","handleResize","_createClass","key","get","containerRef","current","value","setContext","_this$size","_slicedToArray","componentDidMount","_this$observer","observe","componentWillUnmount","_this$observer2","disconnect","render","_ref","_ref2","SResponsiveContainer","styles","createElement","cn","_objectSpread","_assignProps","ResponsiveContainer"],"sources":["../../src/ResponsiveContainer.jsx"],"sourcesContent":["import React from 'react';\nimport createComponent, { Component, Root, sstyled } from '@semcore/core';\nimport { Box } from '@semcore/flex-box';\nimport trottle from '@semcore/utils/lib/rafTrottle';\nimport fire from '@semcore/utils/lib/fire';\nimport getOriginChildren from '@semcore/utils/lib/getOriginChildren';\nimport canUseDOM from '@semcore/utils/lib/canUseDOM';\n\nclass ResponsiveContainerRoot extends Component {\n static displayName = 'ResponsiveContainer';\n\n containerRef = React.createRef();\n size = [0, 0];\n\n constructor(props) {\n super(props);\n if (canUseDOM()) {\n this.observer = new ResizeObserver(this.handleResize);\n }\n }\n\n get $container() {\n return this.containerRef.current;\n }\n\n handleResize = trottle((entries) => {\n const { Children, aspect } = this.asProps;\n\n if (!this.$container) return;\n\n let { clientWidth: width, clientHeight: height } = this.$container;\n\n if (aspect) {\n const style = window.getComputedStyle(this.$container);\n const minHeight = Number.parseInt(style.getPropertyValue('min-height'));\n const maxHeight = Number.parseInt(style.getPropertyValue('max-height'));\n height = width * aspect;\n\n if (height < minHeight) {\n height = minHeight;\n }\n if (height > maxHeight) {\n height = maxHeight;\n }\n }\n\n if (this.size[0] === width && this.size[1] === height) return;\n\n this.size = [width, height];\n\n fire(this, 'onResize', this.size, entries);\n\n if (typeof getOriginChildren(Children) === 'function') {\n this.forceUpdate();\n }\n });\n\n setContext() {\n const [width, height] = this.size;\n return {\n width,\n height,\n };\n }\n\n componentDidMount() {\n if (this.$container) {\n // TODO: may be we can increase perfomance here? (by lsroman)\n this.observer?.observe(this.$container);\n }\n }\n\n // TODO component did update ref?\n\n componentWillUnmount() {\n this.observer?.disconnect();\n }\n\n render() {\n const SResponsiveContainer = Root;\n const { styles } = this.asProps;\n return sstyled(styles)(<SResponsiveContainer render={Box} ref={this.containerRef} />);\n }\n}\n\nconst ResponsiveContainer = createComponent(ResponsiveContainerRoot);\n\nexport default ResponsiveContainer;\n"],"mappings":";;;;;;;;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,OAAOC,eAAe,IAAIC,SAAS,EAAEC,IAAI,EAAEC,OAAO,QAAQ,eAAe;AACzE,SAASC,GAAG,QAAQ,mBAAmB;AACvC,OAAOC,OAAO,MAAM,+BAA+B;AACnD,OAAOC,IAAI,MAAM,yBAAyB;AAC1C,OAAOC,iBAAiB,MAAM,sCAAsC;AACpE,OAAOC,SAAS,MAAM,8BAA8B;AAAC,IAE/CC,uBAAuB,0BAAAC,UAAA;EAAAC,SAAA,CAAAF,uBAAA,EAAAC,UAAA;EAAA,IAAAE,MAA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IAAAC,eAAA;MACrB,CAAAA,eAAA,OAAI,CAAChB,QAAQ,cAAAgB,eAAA,uBAAbA,eAAA,CAAeC,UAAU,EAAE;IAC7B;EAAC;IAAAb,GAAA;IAAAI,KAAA,EAED,SAAAU,OAAA,EAAS;MAAA,IAAAC,IAAA,QAAAtC,OAAA;QAAAuC,KAAA;MACP,IAAMC,oBAAoB,GAE2B3D,GAAG;MADxD,IAAQ4D,MAAM,GAAK,IAAI,CAACzC,OAAO,CAAvByC,MAAM;MACd,OAAAF,KAAA,GAAO3D,OAAO,CAAC6D,MAAM,CAAC,eAACjE,KAAA,CAAAkE,aAAA,CAACF,oBAAoB,EAAAD,KAAA,CAAAI,EAAA,yBAAAC,aAAA,KAAAC,YAAA;QAAA,OAAmB,IAAI,CAACpB;MAAY,GAAAa,IAAA,IAAI;IACtF;EAAC;EAAA,OAAApD,uBAAA;AAAA,EA1EmCR,SAAS;AAAAiB,eAAA,CAAzCT,uBAAuB,iBACN,qBAAqB;AA4E5C,IAAM4D,mBAAmB,GAAGrE,eAAe,CAACS,uBAAuB,CAAC;AAEpE,eAAe4D,mBAAmB"}
|
package/lib/es6/ScatterPlot.js
CHANGED
|
@@ -18,13 +18,13 @@ import { CONSTANT } from './utils';
|
|
|
18
18
|
import ClipPath from './ClipPath';
|
|
19
19
|
import Tooltip from './Tooltip';
|
|
20
20
|
/*__reshadow-styles__:"./style/scatterplot.shadow.css"*/
|
|
21
|
-
var style = ( /*__reshadow_css_start__*/_sstyled.insert( /*__inner_css_start__*/".
|
|
22
|
-
"__SScatterPlot": "
|
|
23
|
-
"--duration": "--
|
|
24
|
-
"_color": "
|
|
25
|
-
"--color": "--
|
|
26
|
-
"_transparent": "
|
|
27
|
-
"__SValue": "
|
|
21
|
+
var style = ( /*__reshadow_css_start__*/_sstyled.insert( /*__inner_css_start__*/".___SScatterPlot_fhnc6_gg_{fill:var(--intergalactic-chart-palette-order-1, #2bb3ff);transition-property:cx,cy;transition-duration:var(--duration_fhnc6);transition-timing-function:ease-in-out;opacity:.5}@media (hover:hover){.___SScatterPlot_fhnc6_gg_:hover{opacity:.8}}.___SScatterPlot_fhnc6_gg_.__color_fhnc6_gg_{fill:var(--color_fhnc6)}.___SScatterPlot_fhnc6_gg_.__transparent_fhnc6_gg_{opacity:.3}.___SValue_fhnc6_gg_{text-anchor:middle;font-size:var(--intergalactic-fs-50, 10px);stroke:var(--intergalactic-chart-palette-order-9, #008ff8)}.___SValue_fhnc6_gg_.__color_fhnc6_gg_{stroke:var(--color_fhnc6)}.___SValue_fhnc6_gg_.__transparent_fhnc6_gg_{opacity:.3}" /*__inner_css_end__*/, "fhnc6_gg_") /*__reshadow_css_end__*/, {
|
|
22
|
+
"__SScatterPlot": "___SScatterPlot_fhnc6_gg_",
|
|
23
|
+
"--duration": "--duration_fhnc6",
|
|
24
|
+
"_color": "__color_fhnc6_gg_",
|
|
25
|
+
"--color": "--color_fhnc6",
|
|
26
|
+
"_transparent": "__transparent_fhnc6_gg_",
|
|
27
|
+
"__SValue": "___SValue_fhnc6_gg_"
|
|
28
28
|
});
|
|
29
29
|
var ScatterPlotRoot = /*#__PURE__*/function (_Component) {
|
|
30
30
|
_inherits(ScatterPlotRoot, _Component);
|
package/lib/es6/Tooltip.js
CHANGED
|
@@ -21,14 +21,14 @@ import resolveColor from '@semcore/utils/lib/color';
|
|
|
21
21
|
import createElement from './createElement';
|
|
22
22
|
import { CONSTANT } from './utils';
|
|
23
23
|
/*__reshadow-styles__:"./style/tooltip.shadow.css"*/
|
|
24
|
-
var style = ( /*__reshadow_css_start__*/_sstyled.insert( /*__inner_css_start__*/".
|
|
25
|
-
"__STooltip": "
|
|
26
|
-
"__STitle": "
|
|
27
|
-
"__SDotGroup": "
|
|
28
|
-
"__SDot": "
|
|
29
|
-
"_color": "
|
|
30
|
-
"--color": "--
|
|
31
|
-
"__SFooter": "
|
|
24
|
+
var style = ( /*__reshadow_css_start__*/_sstyled.insert( /*__inner_css_start__*/".___STooltip_15l59_gg_{font-size:var(--intergalactic-fs-100, 12px);line-height:var(--intergalactic-lh-100, 133%);position:relative;background-color:var(--intergalactic-bg-primary-neutral, #ffffff);border-radius:var(--intergalactic-popper-rounded, 6px);border:1px solid var(--intergalactic-border-secondary, #e0e1e9);box-sizing:border-box;box-shadow:var(--intergalactic-box-shadow-popper, 0px 1px 12px 0px rgba(25, 27, 35, 0.15));padding:var(--intergalactic-spacing-3x, 12px)}.___STitle_15l59_gg_{color:var(--intergalactic-text-secondary, #6c6e79);margin-bottom:var(--intergalactic-spacing-2x, 8px)}.___SDotGroup_15l59_gg_{display:flex;align-items:center}.___SDot_15l59_gg_{width:8px;height:8px;border-radius:50%;margin-right:var(--intergalactic-spacing-2x, 8px);background:var(--intergalactic-icon-secondary-info, #2bb3ff)}.___SDot_15l59_gg_.__color_15l59_gg_{background:var(--color_15l59)}.___SFooter_15l59_gg_{background:var(--intergalactic-bg-secondary-neutral, #f4f5f9);padding:var(--intergalactic-spacing-1x, 4px) var(--intergalactic-spacing-3x, 12px);border-radius:0 0 var(--intergalactic-rounded-medium, 6px) var(--intergalactic-rounded-medium, 6px);margin:var(--intergalactic-spacing-3x, 12px) calc(-1*var(--intergalactic-spacing-3x, 12px)) calc(-1*var(--intergalactic-spacing-3x, 12px))}" /*__inner_css_end__*/, "15l59_gg_") /*__reshadow_css_end__*/, {
|
|
25
|
+
"__STooltip": "___STooltip_15l59_gg_",
|
|
26
|
+
"__STitle": "___STitle_15l59_gg_",
|
|
27
|
+
"__SDotGroup": "___SDotGroup_15l59_gg_",
|
|
28
|
+
"__SDot": "___SDot_15l59_gg_",
|
|
29
|
+
"_color": "__color_15l59_gg_",
|
|
30
|
+
"--color": "--color_15l59",
|
|
31
|
+
"__SFooter": "___SFooter_15l59_gg_"
|
|
32
32
|
});
|
|
33
33
|
var TooltipRoot = /*#__PURE__*/function (_Component) {
|
|
34
34
|
_inherits(TooltipRoot, _Component);
|
|
@@ -158,6 +158,7 @@ function PopperPopper(props) {
|
|
|
158
158
|
"y": y
|
|
159
159
|
}));
|
|
160
160
|
}
|
|
161
|
+
PopperPopper.style = style;
|
|
161
162
|
function Title(props) {
|
|
162
163
|
var _ref2 = arguments[0],
|
|
163
164
|
_ref6;
|
|
@@ -167,6 +168,7 @@ function Title(props) {
|
|
|
167
168
|
"__excludeProps": ['data', 'scale']
|
|
168
169
|
}, _ref2))));
|
|
169
170
|
}
|
|
171
|
+
Title.style = style;
|
|
170
172
|
function Dot(props) {
|
|
171
173
|
var _ref3 = arguments[0],
|
|
172
174
|
_ref7;
|
|
@@ -181,6 +183,7 @@ function Dot(props) {
|
|
|
181
183
|
"color": resolveColor(color)
|
|
182
184
|
})), /*#__PURE__*/React.createElement(Children, _ref7.cn("Children", {})));
|
|
183
185
|
}
|
|
186
|
+
Dot.style = style;
|
|
184
187
|
function Footer(props) {
|
|
185
188
|
var _ref4 = arguments[0],
|
|
186
189
|
_ref8;
|
|
@@ -190,6 +193,7 @@ function Footer(props) {
|
|
|
190
193
|
"__excludeProps": ['data', 'scale']
|
|
191
194
|
}, _ref4))));
|
|
192
195
|
}
|
|
196
|
+
Footer.style = style;
|
|
193
197
|
var Tooltip = createElement(TooltipRoot, {
|
|
194
198
|
Trigger: Popper.Trigger,
|
|
195
199
|
Popper: PopperPopper,
|
package/lib/es6/Tooltip.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Tooltip.js","names":["React","useCallback","Component","Root","sstyled","Popper","Box","findComponent","resolveColor","createElement","CONSTANT","style","_sstyled","insert","TooltipRoot","_Component","_inherits","_super","_createSuper","_this","_classCallCheck","_len","arguments","length","args","Array","_key","call","apply","concat","_defineProperty","_assertThisInitialized","$visible","anchorProps","tooltipProps","_createClass","key","value","getTriggerProps","_this$asProps","asProps","x","y","getPopperProps","excludeAnchorProps","_objectSpread","state","componentDidMount","_this2","_this$asProps2","eventEmitter","rootRef","unsubscribeTooltipVisible","subscribe","visible","node","setState","VIRTUAL_ELEMENT","current","contains","_this2$popper$current","setPopperTrigger","popper","update","componentWillUnmount","render","_ref","_this3","_this$asProps3","Children","children","tag","other","_objectWithoutProperties","_excluded","advanceMode","Tooltip","Trigger","displayName","_assignProps","handlerCancel","allowedAutoPlacements","_ref9","_this3$popper$current","setTrigger","Fragment","PopperPopper","props","_ref5","STooltip","Element","styles","cn","Title","_ref2","arguments[0]","_ref6","STitle","_assignProps2","Dot","_ref3","_ref7","color","SDotGroup","SDot","_assignProps3","Footer","_ref4","_ref8","SFooter","_assignProps4"],"sources":["../../src/Tooltip.jsx"],"sourcesContent":["import React, { useCallback } from 'react';\nimport { Component, Root, sstyled } from '@semcore/core';\nimport Popper from '@semcore/popper';\nimport { Box } from '@semcore/flex-box';\nimport findComponent from '@semcore/utils/lib/findComponent';\nimport resolveColor from '@semcore/utils/lib/color';\nimport createElement from './createElement';\nimport { CONSTANT } from './utils';\n\nimport style from './style/tooltip.shadow.css';\n\nclass TooltipRoot extends Component {\n static displayName = 'Tooltip';\n\n static style = style;\n\n state = {\n $visible: false,\n anchorProps: {},\n tooltipProps: {},\n };\n\n handlerCancel = () => false;\n\n getTriggerProps() {\n // TODO: как то убрать\n const { x, y } = this.asProps;\n return { x, y };\n }\n\n getPopperProps() {\n if (this.asProps.excludeAnchorProps) {\n return {\n $visible: this.state.$visible,\n ...this.state.tooltipProps,\n };\n }\n\n return {\n $visible: this.state.$visible,\n ...this.state.anchorProps,\n ...this.state.tooltipProps,\n };\n }\n\n componentDidMount() {\n const { eventEmitter, rootRef } = this.asProps;\n this.unsubscribeTooltipVisible = eventEmitter.subscribe(\n 'onTooltipVisible',\n (visible, anchorProps, tooltipProps, node) => {\n this.setState(\n {\n anchorProps,\n tooltipProps,\n $visible: visible,\n },\n () => {\n if (node && (node[CONSTANT.VIRTUAL_ELEMENT] || rootRef.current.contains(node))) {\n this?.setPopperTrigger(node);\n this.popper.current?.update();\n }\n },\n );\n },\n );\n }\n\n componentWillUnmount() {\n if (this.unsubscribeTooltipVisible) {\n this.unsubscribeTooltipVisible();\n }\n }\n\n render() {\n const { Children, children, tag, ...other } = this.asProps;\n\n const advanceMode = !!findComponent(Children, [\n Tooltip.Trigger.displayName,\n Tooltip.Popper.displayName,\n ]);\n return (\n <Root\n render={Popper}\n visible={this.state.$visible}\n onFirstUpdate={this.handlerCancel}\n onOutsideClick={this.handlerCancel}\n interaction='none'\n offset={8}\n flip={{ allowedAutoPlacements: ['left', 'right'] }}\n >\n {({ popper, setTrigger }) => {\n this.setPopperTrigger = setTrigger;\n this.popper = popper;\n this.popper.current?.update();\n return advanceMode ? (\n <Children />\n ) : (\n <>\n {tag && <Tooltip.Trigger tag={tag} />}\n <Tooltip.Popper {...other}>{children}</Tooltip.Popper>\n </>\n );\n }}\n </Root>\n );\n }\n}\n\nfunction PopperPopper(props) {\n const { Element: STooltip, styles, $visible, x, y } = props;\n\n const handlerCancel = useCallback(() => false, []);\n\n if (!$visible) return null;\n\n return sstyled(styles)(\n <STooltip\n render={Popper.Popper}\n childrenPosition='inside'\n onMouseMove={handlerCancel}\n x={x}\n y={y}\n />,\n );\n}\n\nfunction Title(props) {\n const STitle = Root;\n const { styles } = props;\n return sstyled(styles)(<STitle render={Box} __excludeProps={['data', 'scale']} />);\n}\n\nfunction Dot(props) {\n const { styles, color, Children } = props;\n const SDotGroup = Root;\n const SDot = Box;\n return sstyled(styles)(\n <SDotGroup render={Box} __excludeProps={['data', 'scale']}>\n <SDot color={resolveColor(color)} />\n <Children />\n </SDotGroup>,\n );\n}\n\nfunction Footer(props) {\n const { styles } = props;\n const SFooter = Root;\n return sstyled(styles)(<SFooter render={Box} __excludeProps={['data', 'scale']} />);\n}\n\nconst Tooltip = createElement(TooltipRoot, {\n Trigger: Popper.Trigger,\n Popper: PopperPopper,\n Title,\n Footer,\n Dot,\n});\n\nexport default Tooltip;\n"],"mappings":";;;;;;;;;;;;;;AAAA,OAAOA,KAAK,IAAIC,WAAW,QAAQ,OAAO;AAC1C,SAASC,SAAS,EAAEC,IAAI,EAAEC,OAAO,QAAQ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AM,GAAKJ,KAAK,CAAhBI,MAAM;EACd,IAAMkB,OAAO,GAC2BvG,GAAG;EAA3C,OAAAsG,KAAA,GAAOxG,OAAO,CAACuF,MAAM,CAAC,eAAC3F,KAAA,CAAAS,aAAA,CAACoG,OAAO,EAAAD,KAAA,CAAAhB,EAAA,YAAA/C,aAAA,KAAAiE,aAAA;IAAA,kBAA8B,CAAC,MAAM,EAAE,OAAO;EAAC,GAAAH,KAAA,IAAI;AACpF;AAEA,IAAM/B,OAAO,GAAGnE,aAAa,CAACK,WAAW,EAAE;EACzC+D,OAAO,EAAExE,MAAM,CAACwE,OAAO;EACvBxE,MAAM,EAAEiF,YAAY;EACpBO,KAAK,EAALA,KAAK;EACLa,MAAM,EAANA,MAAM;EACNP,GAAG,EAAHA;AACF,CAAC,CAAC;AAEF,eAAevB,OAAO"}
|
|
1
|
+
{"version":3,"file":"Tooltip.js","names":["React","useCallback","Component","Root","sstyled","Popper","Box","findComponent","resolveColor","createElement","CONSTANT","style","_sstyled","insert","TooltipRoot","_Component","_inherits","_super","_createSuper","_this","_classCallCheck","_len","arguments","length","args","Array","_key","call","apply","concat","_defineProperty","_assertThisInitialized","$visible","anchorProps","tooltipProps","_createClass","key","value","getTriggerProps","_this$asProps","asProps","x","y","getPopperProps","excludeAnchorProps","_objectSpread","state","componentDidMount","_this2","_this$asProps2","eventEmitter","rootRef","unsubscribeTooltipVisible","subscribe","visible","node","setState","VIRTUAL_ELEMENT","current","contains","_this2$popper$current","setPopperTrigger","popper","update","componentWillUnmount","render","_ref","_this3","_this$asProps3","Children","children","tag","other","_objectWithoutProperties","_excluded","advanceMode","Tooltip","Trigger","displayName","_assignProps","handlerCancel","allowedAutoPlacements","_ref9","_this3$popper$current","setTrigger","Fragment","PopperPopper","props","_ref5","STooltip","Element","styles","cn","Title","_ref2","arguments[0]","_ref6","STitle","_assignProps2","Dot","_ref3","_ref7","color","SDotGroup","SDot","_assignProps3","Footer","_ref4","_ref8","SFooter","_assignProps4"],"sources":["../../src/Tooltip.jsx"],"sourcesContent":["import React, { useCallback } from 'react';\nimport { Component, Root, sstyled } from '@semcore/core';\nimport Popper from '@semcore/popper';\nimport { Box } from '@semcore/flex-box';\nimport findComponent from '@semcore/utils/lib/findComponent';\nimport resolveColor from '@semcore/utils/lib/color';\nimport createElement from './createElement';\nimport { CONSTANT } from './utils';\n\nimport style from './style/tooltip.shadow.css';\n\nclass TooltipRoot extends Component {\n static displayName = 'Tooltip';\n\n static style = style;\n\n state = {\n $visible: false,\n anchorProps: {},\n tooltipProps: {},\n };\n\n handlerCancel = () => false;\n\n getTriggerProps() {\n // TODO: как то убрать\n const { x, y } = this.asProps;\n return { x, y };\n }\n\n getPopperProps() {\n if (this.asProps.excludeAnchorProps) {\n return {\n $visible: this.state.$visible,\n ...this.state.tooltipProps,\n };\n }\n\n return {\n $visible: this.state.$visible,\n ...this.state.anchorProps,\n ...this.state.tooltipProps,\n };\n }\n\n componentDidMount() {\n const { eventEmitter, rootRef } = this.asProps;\n this.unsubscribeTooltipVisible = eventEmitter.subscribe(\n 'onTooltipVisible',\n (visible, anchorProps, tooltipProps, node) => {\n this.setState(\n {\n anchorProps,\n tooltipProps,\n $visible: visible,\n },\n () => {\n if (node && (node[CONSTANT.VIRTUAL_ELEMENT] || rootRef.current.contains(node))) {\n this?.setPopperTrigger(node);\n this.popper.current?.update();\n }\n },\n );\n },\n );\n }\n\n componentWillUnmount() {\n if (this.unsubscribeTooltipVisible) {\n this.unsubscribeTooltipVisible();\n }\n }\n\n render() {\n const { Children, children, tag, ...other } = this.asProps;\n\n const advanceMode = !!findComponent(Children, [\n Tooltip.Trigger.displayName,\n Tooltip.Popper.displayName,\n ]);\n return (\n <Root\n render={Popper}\n visible={this.state.$visible}\n onFirstUpdate={this.handlerCancel}\n onOutsideClick={this.handlerCancel}\n interaction='none'\n offset={8}\n flip={{ allowedAutoPlacements: ['left', 'right'] }}\n >\n {({ popper, setTrigger }) => {\n this.setPopperTrigger = setTrigger;\n this.popper = popper;\n this.popper.current?.update();\n return advanceMode ? (\n <Children />\n ) : (\n <>\n {tag && <Tooltip.Trigger tag={tag} />}\n <Tooltip.Popper {...other}>{children}</Tooltip.Popper>\n </>\n );\n }}\n </Root>\n );\n }\n}\n\nfunction PopperPopper(props) {\n const { Element: STooltip, styles, $visible, x, y } = props;\n\n const handlerCancel = useCallback(() => false, []);\n\n if (!$visible) return null;\n\n return sstyled(styles)(\n <STooltip\n render={Popper.Popper}\n childrenPosition='inside'\n onMouseMove={handlerCancel}\n x={x}\n y={y}\n />,\n );\n}\nPopperPopper.style = style;\n\nfunction Title(props) {\n const STitle = Root;\n const { styles } = props;\n return sstyled(styles)(<STitle render={Box} __excludeProps={['data', 'scale']} />);\n}\nTitle.style = style;\n\nfunction Dot(props) {\n const { styles, color, Children } = props;\n const SDotGroup = Root;\n const SDot = Box;\n return sstyled(styles)(\n <SDotGroup render={Box} __excludeProps={['data', 'scale']}>\n <SDot color={resolveColor(color)} />\n <Children />\n </SDotGroup>,\n );\n}\nDot.style = style;\n\nfunction Footer(props) {\n const { styles } = props;\n const SFooter = Root;\n return sstyled(styles)(<SFooter render={Box} __excludeProps={['data', 'scale']} />);\n}\nFooter.style = style;\n\nconst Tooltip = createElement(TooltipRoot, {\n Trigger: Popper.Trigger,\n Popper: PopperPopper,\n Title,\n Footer,\n Dot,\n});\n\nexport default Tooltip;\n"],"mappings":";;;;;;;;;;;;;;AAAA,OAAOA,KAAK,IAAIC,WAAW,QAAQ,OAAO;AAC1C,SAASC,SAAS,EAAEC,IAAI,EAAEC,OAAO,QAAQ,eAAe;AACxD,OAAOC,MAAM,MAAM,iBAAiB;AACpC,SAASC,GAAG,QAAQ,mBAAmB;AACvC,OAAOC,aAAa,MAAM,kCAAkC;AAC5D,OAAOC,YAAY,MAAM,0BAA0B;AACnD,OAAOC,aAAa,MAAM,iBAAiB;AAC3C,SAASC,QAAQ,QAAQ,SAAS;AAAC;AAAA,IAAAC,KAAA,+BAAAC,QAAA,CAAAC,MAAA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CAAAS,aAAA,CAACoG,OAAO,EAAAD,KAAA,CAAAhB,EAAA,YAAA/C,aAAA,KAAAiE,aAAA;IAAA,kBAA8B,CAAC,MAAM,EAAE,OAAO;EAAC,GAAAH,KAAA,IAAI;AACpF;AACAD,MAAM,CAAC/F,KAAK,GAAGA,KAAK;AAEpB,IAAMiE,OAAO,GAAGnE,aAAa,CAACK,WAAW,EAAE;EACzC+D,OAAO,EAAExE,MAAM,CAACwE,OAAO;EACvBxE,MAAM,EAAEiF,YAAY;EACpBO,KAAK,EAALA,KAAK;EACLa,MAAM,EAANA,MAAM;EACNP,GAAG,EAAHA;AACF,CAAC,CAAC;AAEF,eAAevB,OAAO"}
|
package/lib/es6/Venn.js
CHANGED
|
@@ -18,13 +18,13 @@ import createElement from './createElement';
|
|
|
18
18
|
import { CONSTANT } from './utils';
|
|
19
19
|
import Tooltip from './Tooltip';
|
|
20
20
|
/*__reshadow-styles__:"./style/venn.shadow.css"*/
|
|
21
|
-
var style = ( /*__reshadow_css_start__*/_sstyled.insert( /*__inner_css_start__*/".
|
|
22
|
-
"__SCircle": "
|
|
23
|
-
"--duration": "--
|
|
24
|
-
"_color": "
|
|
25
|
-
"--color": "--
|
|
26
|
-
"_transparent": "
|
|
27
|
-
"__SIntersection": "
|
|
21
|
+
var style = ( /*__reshadow_css_start__*/_sstyled.insert( /*__inner_css_start__*/".___SCircle_1mkv1_gg_,.___SIntersection_1mkv1_gg_{stroke:var(--intergalactic-chart-grid-border, #ffffff);stroke-width:2px}.___SCircle_1mkv1_gg_{fill:var(--intergalactic-chart-palette-order-2, #59ddaa);fill-opacity:.5;transition-property:cx,cy;transition-duration:var(--duration_1mkv1);transition-timing-function:ease-in-out}@media (hover:hover){.___SCircle_1mkv1_gg_:hover{fill-opacity:.7}}.___SCircle_1mkv1_gg_.__color_1mkv1_gg_{fill:var(--color_1mkv1)}.___SCircle_1mkv1_gg_.__transparent_1mkv1_gg_{opacity:.3}.___SIntersection_1mkv1_gg_{fill-opacity:0}@media (hover:hover){.___SIntersection_1mkv1_gg_:hover{fill-opacity:.1}}.___SIntersection_1mkv1_gg_.__transparent_1mkv1_gg_{opacity:.3}" /*__inner_css_end__*/, "1mkv1_gg_") /*__reshadow_css_end__*/, {
|
|
22
|
+
"__SCircle": "___SCircle_1mkv1_gg_",
|
|
23
|
+
"--duration": "--duration_1mkv1",
|
|
24
|
+
"_color": "__color_1mkv1_gg_",
|
|
25
|
+
"--color": "--color_1mkv1",
|
|
26
|
+
"_transparent": "__transparent_1mkv1_gg_",
|
|
27
|
+
"__SIntersection": "___SIntersection_1mkv1_gg_"
|
|
28
28
|
});
|
|
29
29
|
var VennRoot = /*#__PURE__*/function (_Component) {
|
|
30
30
|
_inherits(VennRoot, _Component);
|
|
@@ -10,8 +10,8 @@ import { normalizeLocale } from './locale';
|
|
|
10
10
|
import { localizedMessages } from './translations/module/__intergalactic-dynamic-locales';
|
|
11
11
|
import { Root, sstyled } from '@semcore/core';
|
|
12
12
|
/*__reshadow-styles__:"../style/plotA11yModule.shadow.css"*/
|
|
13
|
-
var styles = ( /*__reshadow_css_start__*/_sstyled.insert( /*__inner_css_start__*/".
|
|
14
|
-
"__SPlotA11yModule": "
|
|
13
|
+
var styles = ( /*__reshadow_css_start__*/_sstyled.insert( /*__inner_css_start__*/".___SPlotA11yModule_1ehnu_gg_{-webkit-user-select:none;-moz-user-select:none;user-select:none;pointer-events:none;opacity:0}.___SPlotA11yModule_1ehnu_gg_:focus{-webkit-user-select:all;-moz-user-select:all;user-select:all;pointer-events:all;opacity:1}" /*__inner_css_end__*/, "1ehnu_gg_") /*__reshadow_css_end__*/, {
|
|
14
|
+
"__SPlotA11yModule": "___SPlotA11yModule_1ehnu_gg_"
|
|
15
15
|
});
|
|
16
16
|
import { Context as I18nContext, useI18n } from '@semcore/utils/lib/enhances/WithI18n';
|
|
17
17
|
import { Box } from '@semcore/flex-box';
|
|
@@ -12,9 +12,9 @@ import { getIntl } from './intl';
|
|
|
12
12
|
import { summarize } from './summarize';
|
|
13
13
|
import { Root, sstyled } from '@semcore/core';
|
|
14
14
|
/*__reshadow-styles__:"../style/plotA11yView.shadow.css"*/
|
|
15
|
-
var styles = ( /*__reshadow_css_start__*/_sstyled.insert( /*__inner_css_start__*/".
|
|
16
|
-
"__SPlotA11yView": "
|
|
17
|
-
"_focus-within": "__focus-
|
|
15
|
+
var styles = ( /*__reshadow_css_start__*/_sstyled.insert( /*__inner_css_start__*/".___SPlotA11yView_2dcrc_gg_{-webkit-user-select:none;-moz-user-select:none;user-select:none;pointer-events:none;opacity:0;background-color:var(--intergalactic-bg-primary-neutral, #ffffff);color:var(--intergalactic-text-primary, #191b23);border:3px solid var(--intergalactic-border-primary, #c4c7cf);font-size:var(--intergalactic-fs-50, 10px);padding:2px;width:200px;height:200px;max-width:80%;max-height:80%;overflow:auto}.___SPlotA11yView_2dcrc_gg_.__focus-within_2dcrc_gg_,.___SPlotA11yView_2dcrc_gg_:focus{-webkit-user-select:all;-moz-user-select:all;user-select:all;pointer-events:all;opacity:1;z-index:var(--intergalactic-z-index-overlay, 500);position:relative;display:block}.___SPlotA11yView_2dcrc_gg_:focus,.___SPlotA11yView_2dcrc_gg_:focus-within{-webkit-user-select:all;-moz-user-select:all;user-select:all;pointer-events:all;opacity:1;z-index:var(--intergalactic-z-index-overlay, 500);position:relative;display:block}.___SPlotA11yView_2dcrc_gg_ a{cursor:pointer;text-decoration:underline;margin-bottom:var(--intergalactic-spacing-2x, 8px);display:block}.___SPlotA11yView_2dcrc_gg_ table,.___SPlotA11yView_2dcrc_gg_ td,.___SPlotA11yView_2dcrc_gg_ th{border:1px solid var(--intergalactic-border-primary, #c4c7cf)}" /*__inner_css_end__*/, "2dcrc_gg_") /*__reshadow_css_end__*/, {
|
|
16
|
+
"__SPlotA11yView": "___SPlotA11yView_2dcrc_gg_",
|
|
17
|
+
"_focus-within": "__focus-within_2dcrc_gg_"
|
|
18
18
|
});
|
|
19
19
|
import { Box } from '@semcore/flex-box';
|
|
20
20
|
import { useAsyncI18nMessages } from '@semcore/utils/lib/enhances/i18nEnhance';
|
|
@@ -37,8 +37,6 @@ SDot[color] {
|
|
|
37
37
|
SFooter {
|
|
38
38
|
background: var(--intergalactic-bg-secondary-neutral, #f4f5f9);
|
|
39
39
|
padding: var(--intergalactic-spacing-1x, 4px) var(--intergalactic-spacing-3x, 12px);
|
|
40
|
-
border-radius: 0 0 var(--intergalactic-rounded-medium, 6px)
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
calc(-1 * var(--intergalactic-spacing-3x, 12px));
|
|
44
|
-
}
|
|
40
|
+
border-radius: 0 0 var(--intergalactic-rounded-medium, 6px) var(--intergalactic-rounded-medium, 6px);
|
|
41
|
+
margin: var(--intergalactic-spacing-3x, 12px) calc(-1 * var(--intergalactic-spacing-3x, 12px)) calc(-1 * var(--intergalactic-spacing-3x, 12px));
|
|
42
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Donut.d.js","names":[],"sources":["../../../src/types/Donut.d.ts"],"sourcesContent":["import { UnknownProperties } from '@semcore/core';\nimport { Context } from './context';\nimport { TooltipType } from './Tooltip';\nimport { IntergalacticD3Component } from './Plot';\n\n/** @deprecated */\nexport interface IDonutProps extends DonutProps, UnknownProperties {}\nexport type DonutProps = Context & {\n /** Inner radius\n * @default 0\n * */\n innerRadius?: number;\n /** Outer radius\n * @default calculated by the formula from width, height\n * */\n outerRadius?: number;\n /** Semi donut */\n halfsize?: boolean;\n /** Animation duration in ms\n * @default 500\n */\n duration?: number;\n};\n\n/** @deprecated */\nexport interface IPieProps extends PieProps, UnknownProperties {}\nexport type PieProps = Context & {\n /**\n * Name of the field in the data\n * */\n dataKey: string;\n /**\n * Human readable name of the segment\n * */\n name: string;\n /** Color pie\n @default #50aef4\n **/\n color?: string;\n /**\n * Active sector\n * */\n active?: boolean;\n /** Enables element transparency */\n transparent?: boolean;\n};\n\n/** @deprecated */\nexport interface IEmptyDataProps extends EmptyDataProps, UnknownProperties {}\nexport type EmptyDataProps = Context & {};\n\n/** @deprecated */\nexport interface ILabelProps extends LabelProps, UnknownProperties {}\nexport type LabelProps = Context & {\n label?: string;\n};\n\ndeclare const Donut: IntergalacticD3Component<'g', DonutProps> & {\n Pie: IntergalacticD3Component<'path', PieProps>;\n EmptyData: IntergalacticD3Component<'path',
|
|
1
|
+
{"version":3,"file":"Donut.d.js","names":[],"sources":["../../../src/types/Donut.d.ts"],"sourcesContent":["import { UnknownProperties } from '@semcore/core';\nimport { Context } from './context';\nimport { TooltipType } from './Tooltip';\nimport { IntergalacticD3Component } from './Plot';\n\n/** @deprecated */\nexport interface IDonutProps extends DonutProps, UnknownProperties {}\nexport type DonutProps = Context & {\n /** Inner radius\n * @default 0\n * */\n innerRadius?: number;\n /** Outer radius\n * @default calculated by the formula from width, height\n * */\n outerRadius?: number;\n /** Semi donut */\n halfsize?: boolean;\n /** Animation duration in ms\n * @default 500\n */\n duration?: number;\n};\n\n/** @deprecated */\nexport interface IPieProps extends PieProps, UnknownProperties {}\nexport type PieProps = Context & {\n /**\n * Name of the field in the data\n * */\n dataKey: string;\n /**\n * Human readable name of the segment\n * */\n name: string;\n /** Color pie\n @default #50aef4\n **/\n color?: string;\n /**\n * Active sector\n * */\n active?: boolean;\n /** Enables element transparency */\n transparent?: boolean;\n};\n\n/** @deprecated */\nexport interface IEmptyDataProps extends EmptyDataProps, UnknownProperties {}\nexport type EmptyDataProps = Context & {};\n\n/** @deprecated */\nexport interface ILabelProps extends LabelProps, UnknownProperties {}\nexport type LabelProps = Context & {\n label?: string;\n};\n\ndeclare const Donut: IntergalacticD3Component<'g', DonutProps> & {\n Pie: IntergalacticD3Component<'path', PieProps>;\n EmptyData: IntergalacticD3Component<'path', EmptyDataProps>;\n Label: IntergalacticD3Component<'text', LabelProps>;\n Tooltip: TooltipType<PieProps>;\n};\n\nexport default Donut;\n"],"mappings":""}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Hover.d.js","names":[],"sources":["../../../src/types/Hover.d.ts"],"sourcesContent":["import { UnknownProperties } from '@semcore/core';\nimport { Context } from './context';\nimport { ReturnEl } from '@semcore/core';\nimport { TooltipTypeBase } from './Tooltip';\nimport {
|
|
1
|
+
{"version":3,"file":"Hover.d.js","names":[],"sources":["../../../src/types/Hover.d.ts"],"sourcesContent":["import { UnknownProperties } from '@semcore/core';\nimport { Context } from './context';\nimport { ReturnEl } from '@semcore/core';\nimport { TooltipTypeBase } from './Tooltip';\nimport { BoxProps } from '@semcore/flex-box';\nimport { IntergalacticD3Component } from './Plot';\n\n/** @deprecated */\nexport interface IHoverProps extends HoverProps, UnknownProperties {}\nexport type HoverProps = Context & {\n /** Field name from `data` array item for the XAxis */\n x?: string;\n /** Field name from `data` array item for the YAxis */\n y?: string;\n};\n\ntype HoverTooltip = (<X, Y>(\n props: {\n /** Field name from `data` array item for the XAxis */\n x?: X;\n /** Field name from `data` array item for the YAxis */\n y?: Y;\n children: (props: {\n /** Index in `data` array of the current item */\n xIndex: X extends string ? string : never;\n /** Index in `data` array of the current item */\n yIndex: Y extends string ? string : never;\n }) => { children: ReturnEl };\n } & Omit<BoxProps, 'children'>,\n) => ReturnEl) &\n TooltipTypeBase;\n\ndeclare const HoverLine: IntergalacticD3Component<'g', HoverProps> & {\n Tooltip: HoverTooltip;\n};\n\ndeclare const HoverRect: IntergalacticD3Component<'g', HoverProps> & {\n Tooltip: HoverTooltip;\n};\nexport { HoverLine, HoverRect };\n"],"mappings":""}
|
package/lib/types/Donut.d.ts
CHANGED
|
@@ -57,7 +57,7 @@ export type LabelProps = Context & {
|
|
|
57
57
|
|
|
58
58
|
declare const Donut: IntergalacticD3Component<'g', DonutProps> & {
|
|
59
59
|
Pie: IntergalacticD3Component<'path', PieProps>;
|
|
60
|
-
EmptyData: IntergalacticD3Component<'path',
|
|
60
|
+
EmptyData: IntergalacticD3Component<'path', EmptyDataProps>;
|
|
61
61
|
Label: IntergalacticD3Component<'text', LabelProps>;
|
|
62
62
|
Tooltip: TooltipType<PieProps>;
|
|
63
63
|
};
|
package/lib/types/Hover.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import { UnknownProperties } from '@semcore/core';
|
|
|
2
2
|
import { Context } from './context';
|
|
3
3
|
import { ReturnEl } from '@semcore/core';
|
|
4
4
|
import { TooltipTypeBase } from './Tooltip';
|
|
5
|
-
import {
|
|
5
|
+
import { BoxProps } from '@semcore/flex-box';
|
|
6
6
|
import { IntergalacticD3Component } from './Plot';
|
|
7
7
|
|
|
8
8
|
/** @deprecated */
|
|
@@ -26,7 +26,7 @@ type HoverTooltip = (<X, Y>(
|
|
|
26
26
|
/** Index in `data` array of the current item */
|
|
27
27
|
yIndex: Y extends string ? string : never;
|
|
28
28
|
}) => { children: ReturnEl };
|
|
29
|
-
} & Omit<
|
|
29
|
+
} & Omit<BoxProps, 'children'>,
|
|
30
30
|
) => ReturnEl) &
|
|
31
31
|
TooltipTypeBase;
|
|
32
32
|
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@semcore/d3-chart",
|
|
3
3
|
"description": "Semrush D3 Chart Component",
|
|
4
|
-
"version": "3.0.
|
|
4
|
+
"version": "3.0.2",
|
|
5
5
|
"main": "lib/cjs/index.js",
|
|
6
6
|
"module": "lib/es6/index.js",
|
|
7
7
|
"typings": "lib/types/index.d.ts",
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
"@formatjs/intl": "2.3.0",
|
|
13
13
|
"@semcore/animation": "2.0.0",
|
|
14
14
|
"@semcore/flex-box": "5.0.0",
|
|
15
|
-
"@semcore/popper": "5.0.
|
|
15
|
+
"@semcore/popper": "5.0.2",
|
|
16
16
|
"@semcore/utils": "4.0.0",
|
|
17
17
|
"@types/d3-shape": "^3.1.0",
|
|
18
18
|
"@upsetjs/venn.js": "1.4.1",
|