@jbrowse/display-ui 5.0.0-beta.10 → 5.0.0-beta.11

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.
@@ -37,20 +37,9 @@ const useStyles = makeStyles()(theme => ({
37
37
  // rendered inline, where events already pass through)
38
38
  pointerEvents: 'auto',
39
39
  },
40
- // A plain <button>, not MUI's IconButton, and the glyph is `×` rather than
41
- // the Material Close icon.
42
- //
43
- // This component is rendered by canvas, alignments, variants and multi-wiggle
44
- // displays *directly*, behind neither bring-your-own seam, so a Material
45
- // widget here reaches an embedder who has opted out of both — and the
46
- // build-your-own site's zero-MUI census, which no page currently trips only
47
- // because no page turns on a colorBy that raises a legend. Same call
48
- // `BaseTooltip` made in 2026-08: what it needed was colors, and colors have a
49
- // toolkit-free home already. See DISPLAYCHROME.md, "a third seam was
50
- // considered for the tooltip and rejected".
51
- //
52
- // `×` is what `SvgColorLegend` already draws for this control, so the
53
- // exported legend and the on-screen one now agree.
40
+ // A plain <button> with a `×` glyph, not MUI: displays render this legend
41
+ // directly, behind neither bring-your-own seam. See DISPLAYCHROME.md, "The
42
+ // bring-your-own seams".
54
43
  closeButton: {
55
44
  position: 'absolute',
56
45
  top: 0,
@@ -29,6 +29,12 @@ export declare function axisCaptionY(axis: Pick<YAxis, 'ticks'>, bandTops: numbe
29
29
  * beside the spine.
30
30
  */
31
31
  export declare function axisGutterWidth(axis: Pick<YAxis, 'ticks' | 'caption'>): number;
32
+ /**
33
+ * Px the export's left margin holds for these axes: the widest left-side axis
34
+ * that draws, 0 when none does. A sidebar the export parks left of the figure
35
+ * sits past this strip so the scalebars stay beside the plot.
36
+ */
37
+ export declare function leftAxisGutterWidth(axes: readonly Pick<YAxis, 'side' | 'ticks' | 'caption' | 'height' | 'bandTops'>[]): number;
32
38
  /** How far in from the plot's right edge a right-side gutter ends in an export. */
33
39
  export declare const AXIS_RIGHT_INSET_PX = 4;
34
40
  /**
@@ -47,6 +47,16 @@ export function axisGutterWidth(axis) {
47
47
  }
48
48
  return Math.max(AXIS_GUTTER_WIDTH_PX, Math.ceil(CAPTION_BAND_PX + widest + TICK_LABEL_X_PX));
49
49
  }
50
+ /**
51
+ * Px the export's left margin holds for these axes: the widest left-side axis
52
+ * that draws, 0 when none does. A sidebar the export parks left of the figure
53
+ * sits past this strip so the scalebars stay beside the plot.
54
+ */
55
+ export function leftAxisGutterWidth(axes) {
56
+ return Math.max(0, ...axes
57
+ .filter(axis => axis.side !== 'right' && axisDrawn(axis))
58
+ .map(axisGutterWidth));
59
+ }
50
60
  /** How far in from the plot's right edge a right-side gutter ends in an export. */
51
61
  export const AXIS_RIGHT_INSET_PX = 4;
52
62
  /**
package/esm/index.d.ts CHANGED
@@ -29,7 +29,7 @@ export type { AxisSide, ValueScale, ValueScaleRule, YAxis, } from './valueScale.
29
29
  export { AXIS_GUTTER_WIDTH_PX, axisPlotBox, clampStrokeInsideAxis, scoreToAxisY, } from './yScaleTicks.ts';
30
30
  export type { YScaleTicks } from './yScaleTicks.ts';
31
31
  export { DEFAULT_RULE_COLOR, SCORE_CAPTION_HEIGHT, YSCALEBAR_LABEL_OFFSET, } from './yAxisConstants.ts';
32
- export { AXIS_RIGHT_INSET_PX, COMPACT_AXIS_HEIGHT, axisDrawn, axisGutterLeft, axisGutterWidth, } from './axisPlacement.ts';
32
+ export { AXIS_RIGHT_INSET_PX, COMPACT_AXIS_HEIGHT, axisDrawn, axisGutterLeft, axisGutterWidth, leftAxisGutterWidth, } from './axisPlacement.ts';
33
33
  export { default as AxisGutter } from './AxisGutter.tsx';
34
34
  export { AxisCaptionOverlay, default as AxisCaption } from './AxisCaption.tsx';
35
35
  export { default as YScaleBar } from './YScaleBar.tsx';
package/esm/index.js CHANGED
@@ -64,7 +64,7 @@ export { isLiveModel } from './isLiveModel.js';
64
64
  export { BOTTOM_RIGHT_CONTROLS_ORDER, BottomRightCornerContext, } from './bottomRightCorner.js';
65
65
  export { AXIS_GUTTER_WIDTH_PX, axisPlotBox, clampStrokeInsideAxis, scoreToAxisY, } from './yScaleTicks.js';
66
66
  export { DEFAULT_RULE_COLOR, SCORE_CAPTION_HEIGHT, YSCALEBAR_LABEL_OFFSET, } from './yAxisConstants.js';
67
- export { AXIS_RIGHT_INSET_PX, COMPACT_AXIS_HEIGHT, axisDrawn, axisGutterLeft, axisGutterWidth, } from './axisPlacement.js';
67
+ export { AXIS_RIGHT_INSET_PX, COMPACT_AXIS_HEIGHT, axisDrawn, axisGutterLeft, axisGutterWidth, leftAxisGutterWidth, } from './axisPlacement.js';
68
68
  export { default as AxisGutter } from './AxisGutter.js';
69
69
  export { AxisCaptionOverlay, default as AxisCaption } from './AxisCaption.js';
70
70
  export { default as YScaleBar } from './YScaleBar.js';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jbrowse/display-ui",
3
- "version": "5.0.0-beta.10",
3
+ "version": "5.0.0-beta.11",
4
4
  "type": "module",
5
5
  "description": "The UI a display draws that is not data: the swappable chrome contract, its toolkit-free implementations, and the track overlay layer",
6
6
  "keywords": [
@@ -29,9 +29,10 @@
29
29
  "esm"
30
30
  ],
31
31
  "dependencies": {
32
- "@jbrowse/mobx-state-tree": "^6.6.1",
32
+ "@jbrowse/mobx-state-tree": "^6.7.0",
33
+ "mobx": "^7.0.5",
33
34
  "mobx-react": "^10.0.2",
34
- "@jbrowse/core": "^5.0.0-beta.10"
35
+ "@jbrowse/core": "^5.0.0-beta.11"
35
36
  },
36
37
  "peerDependencies": {
37
38
  "react": ">=19.0.0",