@mim/histui 0.2.0 → 0.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -157,7 +157,7 @@ createHistuiTimeline({
157
157
  measurement: {
158
158
  enabled: true,
159
159
  transient: true,
160
- fadeOutMs: 3000
160
+ fadeOutMs: 1200
161
161
  },
162
162
  explode: {
163
163
  maxVisible: 42,
@@ -169,7 +169,7 @@ createHistuiTimeline({
169
169
  });
170
170
  ```
171
171
 
172
- `timeline.measurement.enabled` draws a dimension-style line across the currently visible timeline span and labels it with the visible year count. Set `timeline.measurement.transient` to `true` to show it only after the viewport changes; it fades out after `fadeOutMs` milliseconds, defaulting to `3000`.
172
+ `timeline.measurement.enabled` draws a dimension-style line across the currently visible timeline span and labels it with the visible year count. Set `timeline.measurement.transient` to `true` to show it only after the viewport changes; it fades out after `fadeOutMs` milliseconds, defaulting to `1200`.
173
173
 
174
174
  ## Check
175
175
 
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "publishConfig": {
4
4
  "access": "public"
5
5
  },
6
- "version": "0.2.0",
6
+ "version": "0.2.1",
7
7
  "description": "Reusable Histui interactive timeline package for PastStruct and normalized historical records.",
8
8
  "type": "module",
9
9
  "main": "./src/index.js",
@@ -32,7 +32,7 @@ export const DEFAULT_HISTUI_CONFIG = {
32
32
  measurement: {
33
33
  enabled: false,
34
34
  transient: false,
35
- fadeOutMs: 3000
35
+ fadeOutMs: 1200
36
36
  },
37
37
  lod: {
38
38
  enabled: true,
package/src/styles.css CHANGED
@@ -169,7 +169,7 @@
169
169
 
170
170
  .histui-measurement-line {
171
171
  position: absolute;
172
- z-index: 6;
172
+ z-index: 240;
173
173
  opacity: 0;
174
174
  pointer-events: none;
175
175
  transform: translateY(-4px);
@@ -1575,13 +1575,13 @@ export class TimelineView {
1575
1575
 
1576
1576
  getMeasurementConfig() {
1577
1577
  const measurement = this.config.timeline?.measurement || {};
1578
- const fadeOutMs = Number(measurement.fadeOutMs ?? measurement.hideAfterMs ?? 3000);
1578
+ const fadeOutMs = Number(measurement.fadeOutMs ?? measurement.hideAfterMs ?? 1200);
1579
1579
  return {
1580
1580
  enabled: measurement.enabled === true,
1581
1581
  transient: measurement.transient === true ||
1582
1582
  measurement.showOnChangeOnly === true ||
1583
1583
  measurement.visibleOnChangeOnly === true,
1584
- fadeOutMs: Number.isFinite(fadeOutMs) ? Math.max(0, fadeOutMs) : 3000,
1584
+ fadeOutMs: Number.isFinite(fadeOutMs) ? Math.max(0, fadeOutMs) : 1200,
1585
1585
  offsetPx: Number.isFinite(Number(measurement.offsetPx)) ? Number(measurement.offsetPx) : null
1586
1586
  };
1587
1587
  }
@@ -1602,7 +1602,7 @@ export class TimelineView {
1602
1602
  return clamp(metrics.axisCoordinate + side * offset, 18, metrics.width - 18);
1603
1603
  }
1604
1604
 
1605
- showMeasurementLine({ persistent = false, fadeOutMs = 3000 } = {}) {
1605
+ showMeasurementLine({ persistent = false, fadeOutMs = 1200 } = {}) {
1606
1606
  if (!this.measurementLine) return;
1607
1607
  const wasHidden = this.measurementLine.hidden;
1608
1608
  this.measurementLine.hidden = false;