@graphysdk/react 1.9.0-beta.1791527697963 → 1.9.0-beta.1791533454856

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.
@@ -18825,13 +18825,13 @@ var dj = (e) => {
18825
18825
  }, uE = {
18826
18826
  outer: ia,
18827
18827
  inner: ia
18828
- }, gj = (e, t, r, n = ia, i = uE, o = jm, a) => {
18829
- const s = {
18828
+ }, gj = (e, t, r, n = ia, i = uE, o = jm, a, s) => {
18829
+ const l = {
18830
18830
  top: i.inner.top + n.top,
18831
18831
  right: i.inner.right + n.right,
18832
18832
  bottom: i.inner.bottom + n.bottom,
18833
18833
  left: i.inner.left + n.left
18834
- }, l = r.axes.top > 0 || r.axesLabels.top > 0 ? r.axesLabels.top : Math.max(r.axesLabels.top, r.axesLabels.left, r.axesLabels.right), c = [
18834
+ }, c = r.axes.top > 0 || r.axesLabels.top > 0 ? r.axesLabels.top : Math.max(r.axesLabels.top, r.axesLabels.left, r.axesLabels.right), u = [
18835
18835
  {
18836
18836
  name: "header",
18837
18837
  size: t.headerSize.height,
@@ -18849,7 +18849,7 @@ var dj = (e) => {
18849
18849
  },
18850
18850
  {
18851
18851
  name: "topAxisLabel",
18852
- size: l,
18852
+ size: c,
18853
18853
  gaps: fn(a.axisLabel.top)
18854
18854
  },
18855
18855
  {
@@ -18863,7 +18863,7 @@ var dj = (e) => {
18863
18863
  },
18864
18864
  {
18865
18865
  name: "topPanelInner",
18866
- size: s.top
18866
+ size: l.top
18867
18867
  },
18868
18868
  {
18869
18869
  name: "panel",
@@ -18871,7 +18871,7 @@ var dj = (e) => {
18871
18871
  },
18872
18872
  {
18873
18873
  name: "bottomPanelInner",
18874
- size: s.bottom
18874
+ size: l.bottom
18875
18875
  },
18876
18876
  {
18877
18877
  name: "bottomPanelOuter",
@@ -18897,7 +18897,7 @@ var dj = (e) => {
18897
18897
  size: t.footerSize.height,
18898
18898
  gaps: fn(a.footer)
18899
18899
  }
18900
- ], u = [
18900
+ ], d = [
18901
18901
  {
18902
18902
  name: "leftLegend",
18903
18903
  size: r.legends.left,
@@ -18914,7 +18914,7 @@ var dj = (e) => {
18914
18914
  },
18915
18915
  {
18916
18916
  name: "leftPanelInner",
18917
- size: s.left
18917
+ size: l.left
18918
18918
  },
18919
18919
  {
18920
18920
  name: "panel",
@@ -18922,7 +18922,7 @@ var dj = (e) => {
18922
18922
  },
18923
18923
  {
18924
18924
  name: "rightPanelInner",
18925
- size: s.right
18925
+ size: l.right
18926
18926
  },
18927
18927
  {
18928
18928
  name: "rightPanelOuter",
@@ -18938,10 +18938,10 @@ var dj = (e) => {
18938
18938
  size: r.legends.right,
18939
18939
  gaps: $l(a.legend.right)
18940
18940
  }
18941
- ], d = tb(c, o.top, o.bottom), h = tb(u, o.left, o.right);
18941
+ ], h = tb(u, o.top, o.bottom), f = tb(d, o.left, o.right);
18942
18942
  return dj({
18943
- rows: c,
18944
- cols: u,
18943
+ rows: u,
18944
+ cols: d,
18945
18945
  placements: [
18946
18946
  {
18947
18947
  name: "header",
@@ -18982,14 +18982,14 @@ var dj = (e) => {
18982
18982
  },
18983
18983
  ...yj(r.axes),
18984
18984
  ...bj(r.axesLabels, r.axes),
18985
- ...xj(r.legends)
18985
+ ...xj(r.legends, s)
18986
18986
  ],
18987
18987
  containerSize: e,
18988
18988
  padding: {
18989
- top: d.start,
18990
- bottom: d.end,
18991
- left: h.start,
18992
- right: h.end
18989
+ top: h.start,
18990
+ bottom: h.end,
18991
+ left: f.start,
18992
+ right: f.end
18993
18993
  }
18994
18994
  });
18995
18995
  }, fn = (e) => ({
@@ -19050,27 +19050,28 @@ var dj = (e) => {
19050
19050
  row: "bottomAxisLabel",
19051
19051
  col: "panel"
19052
19052
  }), r;
19053
- }, xj = (e) => {
19054
- const t = [];
19055
- return e.top > 0 && t.push({
19056
- name: "topLegend",
19057
- row: "topLegend",
19053
+ }, xj = (e, t) => {
19054
+ const r = [], n = t === "center" ? { col: "panel" } : {
19058
19055
  col: "leftAxis",
19059
19056
  colEnd: "rightAxis"
19060
- }), e.bottom > 0 && t.push({
19057
+ };
19058
+ return e.top > 0 && r.push({
19059
+ name: "topLegend",
19060
+ row: "topLegend",
19061
+ ...n
19062
+ }), e.bottom > 0 && r.push({
19061
19063
  name: "bottomLegend",
19062
19064
  row: "bottomLegend",
19063
- col: "leftAxis",
19064
- colEnd: "rightAxis"
19065
- }), e.left > 0 && t.push({
19065
+ ...n
19066
+ }), e.left > 0 && r.push({
19066
19067
  name: "leftLegend",
19067
19068
  row: "panel",
19068
19069
  col: "leftLegend"
19069
- }), e.right > 0 && t.push({
19070
+ }), e.right > 0 && r.push({
19070
19071
  name: "rightLegend",
19071
19072
  row: "panel",
19072
19073
  col: "rightLegend"
19073
- }), t;
19074
+ }), r;
19074
19075
  };
19075
19076
  var wj = class {
19076
19077
  constructor(e) {
@@ -19370,7 +19371,7 @@ var vf = [
19370
19371
  }) : c;
19371
19372
  }
19372
19373
  resolveLayout({ axes: e, formattedLegends: t, containerSize: r, externalMeasurements: n, panelOverflow: i, panelBorder: o, headline: a, padding: s, margins: l }) {
19373
- const c = hj(gj(r, n, this.measureGuides(e, t, a, r), o, i, s, Oj(l, t)));
19374
+ const c = hj(gj(r, n, this.measureGuides(e, t, a, r), o, i, s, Oj(l, t), t[0]?.align));
19374
19375
  return {
19375
19376
  header: c.get("header") ?? bo,
19376
19377
  headline: c.get("headline") ?? bo,
package/package.json CHANGED
@@ -11,7 +11,7 @@
11
11
  "visualization",
12
12
  "grammar-of-graphics"
13
13
  ],
14
- "version": "1.9.0-beta.1791527697963",
14
+ "version": "1.9.0-beta.1791533454856",
15
15
  "type": "module",
16
16
  "sideEffects": false,
17
17
  "types": "./dist/index.d.ts",
@@ -35,8 +35,8 @@
35
35
  }
36
36
  },
37
37
  "dependencies": {
38
- "@graphysdk/react-renderer": "1.9.0-beta.1791527697963",
39
- "@graphysdk/viz-engine": "1.9.0-beta.1791527697963"
38
+ "@graphysdk/react-renderer": "1.9.0-beta.1791533454856",
39
+ "@graphysdk/viz-engine": "1.9.0-beta.1791533454856"
40
40
  },
41
41
  "peerDependencies": {
42
42
  "@tiptap/core": "^3.0.0",
@@ -133,10 +133,10 @@
133
133
  "vite-plugin-css-injected-by-js": "^3.5.2",
134
134
  "vite-plugin-dts": "^4.5.4",
135
135
  "vitest": "^4.1.11",
136
+ "@graphytools/eslint-config": "0.0.1",
136
137
  "@graphytools/eslint-plugin-graphy": "1.0.0",
137
138
  "@graphytools/typescript-config": "0.0.1",
138
- "@graphytools/vitest-config": "1.0.0",
139
- "@graphytools/eslint-config": "0.0.1"
139
+ "@graphytools/vitest-config": "1.0.0"
140
140
  },
141
141
  "publishConfig": {
142
142
  "access": "public"