@spider-analyzer/timeline 5.0.1 → 5.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 CHANGED
@@ -1,3 +1,13 @@
1
+ ## 5.0.2
2
+
3
+ - Fix: apply the `xAxis` / `yAxis` / `margin` defaults inside the outer
4
+ TimeLine wrapper before passing props to the inner component. Previously
5
+ the defaults existed only as local destructuring fallbacks, so
6
+ ref-path accesses inside `useEffect` bodies (e.g.
7
+ `propsRef.current.xAxis.spaceBetweenTicks`) threw when a consumer
8
+ omitted these props. Affects any host that relied on the v4 defaults
9
+ rather than passing `xAxis` explicitly.
10
+
1
11
  ## 5.0.1
2
12
 
3
13
  - Expose the stylesheets through the `exports` map so consumers can
package/dist/index.js CHANGED
@@ -2770,6 +2770,9 @@ var TimeLine2 = react.forwardRef(function TimeLineWrapper(props, ref) {
2770
2770
  }, [props.onLoadDefaultDomain, props.onDomainChange, zone]);
2771
2771
  const innerProps = {
2772
2772
  ...props,
2773
+ xAxis: { ...xAxisDefault, ...props.xAxis ?? {} },
2774
+ yAxis: props.yAxis ?? {},
2775
+ margin: { ...marginDefault, ...props.margin ?? {} },
2773
2776
  domains: stack,
2774
2777
  timeSpan: props.timeSpan ? timeSpanToMoments(props.timeSpan, zone) : void 0,
2775
2778
  maxDomain: props.maxDomain ? domainToMoments(props.maxDomain, zone) : void 0,