@spider-analyzer/timeline 5.0.0 → 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,23 @@
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
+
11
+ ## 5.0.1
12
+
13
+ - Expose the stylesheets through the `exports` map so consumers can
14
+ import them without tripping Node/webpack's ESM resolver:
15
+ - `@spider-analyzer/timeline/timeline.css`
16
+ - `@spider-analyzer/timeline/tipDark.css`
17
+ - `@spider-analyzer/timeline/dist/{timeline,tipDark}.css` (backcompat)
18
+ - Stabilize the emitted CSS filenames (no more content hash) so those
19
+ import paths are durable across builds.
20
+
1
21
  ## 5.0.0
2
22
 
3
23
  First v5 release on npm. Major rework focused on decoupling consumers
package/dist/index.js CHANGED
@@ -10,9 +10,9 @@ var d3Selection = require('d3-selection');
10
10
  var d3Drag = require('d3-drag');
11
11
  var jsxRuntime = require('react/jsx-runtime');
12
12
  var clsx3 = require('clsx');
13
- require('./timeline-EX2XZ6IP.css');
13
+ require('./timeline.css');
14
14
  var ToolTipBase = require('rc-tooltip');
15
- require('./tipDark-BQEJ43KY.css');
15
+ require('./tipDark.css');
16
16
  var d3Time = require('d3-time');
17
17
 
18
18
  function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
@@ -426,8 +426,8 @@ var defaultLabels = {
426
426
  var defaultQualityScale = d3Scale.scaleLinear().domain([0, 0.9, 1]).range(["#ff3724", "rgba(255,0,0,0.09)", "rgba(155,249,135,0.94)"]).clamp(true);
427
427
  function ToolTip({ overlay, placement = "top", mouseEnterDelay = 0.5, prefixCls, align, visible, hidden, children }) {
428
428
  const extraProps = {};
429
- if (visible) extraProps.open = true;
430
- if (hidden) extraProps.open = false;
429
+ if (visible) extraProps.visible = true;
430
+ if (hidden) extraProps.visible = false;
431
431
  return /* @__PURE__ */ jsxRuntime.jsx(
432
432
  ToolTipBase__default.default,
433
433
  {
@@ -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,