@univerjs/engine-render 0.6.10 → 0.7.0-beta.0

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/lib/es/index.js CHANGED
@@ -35514,7 +35514,7 @@ class y0 {
35514
35514
  k(this, "_context");
35515
35515
  k(this, "_width", 0);
35516
35516
  k(this, "_height", 0);
35517
- t = t || {}, this._canvasEle = v7(), this._canvasEle.style.padding = "0", this._canvasEle.style.margin = "0", this._canvasEle.style.border = "0", this._canvasEle.style.background = "transparent", this._canvasEle.style.position = "absolute", this._canvasEle.style.top = "0", this._canvasEle.style.left = "0", this._canvasEle.style.zIndex = "8", this._canvasEle.className = "univer-render-canvas", this._canvasEle.tabIndex = 1, this._canvasEle.style.touchAction = "none", this._canvasEle.style.outline = "0";
35517
+ t = t || {}, this._canvasEle = v7(), this._canvasEle.style.padding = "0", this._canvasEle.style.margin = "0", this._canvasEle.style.border = "0", this._canvasEle.style.background = "transparent", this._canvasEle.style.position = "absolute", this._canvasEle.style.top = "0", this._canvasEle.style.left = "0", this._canvasEle.style.zIndex = "8", this._canvasEle.dataset.uComp = "render-canvas", this._canvasEle.tabIndex = 1, this._canvasEle.style.touchAction = "none", this._canvasEle.style.outline = "0";
35518
35518
  const e = this._canvasEle.getContext("2d");
35519
35519
  if (e == null)
35520
35520
  throw new Error("context is not support");
@@ -56155,36 +56155,36 @@ let X5 = class extends X8 {
56155
56155
  * In Excel, for the border rendering of merged cells to take effect, the outermost cells need to have the same border style.
56156
56156
  */
56157
56157
  _setMergeBorderProps(t, e, a) {
56158
- var u;
56158
+ var u, d, g;
56159
56159
  if (!this.worksheet || !e.border) return;
56160
56160
  const s = [];
56161
56161
  let n = a.startRow, i = a.endRow, o = a.startRow, l = a.startColumn;
56162
56162
  t === K.TOP ? (o = a.startRow, n = a.startColumn, i = a.endColumn) : t === K.BOTTOM ? (o = a.endRow, n = a.startColumn, i = a.endColumn) : t === K.LEFT ? (l = a.startColumn, n = a.startRow, i = a.endRow) : t === K.RIGHT && (l = a.endColumn, n = a.startRow, i = a.endRow);
56163
- for (let d = n; d <= i; d++) {
56164
- t === K.TOP || t === K.BOTTOM ? l = d : (t === K.LEFT || t === K.RIGHT) && (o = d);
56165
- const g = this.worksheet.getCell(o, l);
56166
- if (!g)
56163
+ for (let c = n; c <= i; c++) {
56164
+ t === K.TOP || t === K.BOTTOM ? l = c : (t === K.LEFT || t === K.RIGHT) && (o = c);
56165
+ const h = this.worksheet.getCell(o, l);
56166
+ if (!h)
56167
56167
  break;
56168
- const c = this._styles.getStyleByCell(g);
56169
- if (!c)
56168
+ const p = (u = h.themeStyle) == null ? void 0 : u.bd, f = this._styles.getStyleByCell(h);
56169
+ if (!f && !p)
56170
56170
  break;
56171
- const h = (u = c.bd) == null ? void 0 : u[t];
56172
- if (h) {
56173
- const p = b3(h.cl) || L3;
56171
+ const m = (g = (d = f == null ? void 0 : f.bd) == null ? void 0 : d[t]) != null ? g : p == null ? void 0 : p[t];
56172
+ if (m) {
56173
+ const v = b3(m.cl) || L3;
56174
56174
  s.push({
56175
56175
  r: o,
56176
56176
  c: l,
56177
- style: h.s,
56178
- color: p
56177
+ style: m.s,
56178
+ color: v
56179
56179
  });
56180
56180
  }
56181
56181
  }
56182
- s.forEach((d) => {
56183
- const { r: g, c, style: h, color: p } = d;
56184
- e.border.getValue(g, c) || e.border.setValue(g, c, {}), e.border.getValue(g, c)[t] = {
56182
+ s.forEach((c) => {
56183
+ const { r: h, c: p, style: f, color: m } = c;
56184
+ e.border.getValue(h, p) || e.border.setValue(h, p, {}), e.border.getValue(h, p)[t] = {
56185
56185
  type: t,
56186
- style: h,
56187
- color: p
56186
+ style: f,
56187
+ color: m
56188
56188
  };
56189
56189
  });
56190
56190
  }
package/lib/index.js CHANGED
@@ -35514,7 +35514,7 @@ class y0 {
35514
35514
  k(this, "_context");
35515
35515
  k(this, "_width", 0);
35516
35516
  k(this, "_height", 0);
35517
- t = t || {}, this._canvasEle = v7(), this._canvasEle.style.padding = "0", this._canvasEle.style.margin = "0", this._canvasEle.style.border = "0", this._canvasEle.style.background = "transparent", this._canvasEle.style.position = "absolute", this._canvasEle.style.top = "0", this._canvasEle.style.left = "0", this._canvasEle.style.zIndex = "8", this._canvasEle.className = "univer-render-canvas", this._canvasEle.tabIndex = 1, this._canvasEle.style.touchAction = "none", this._canvasEle.style.outline = "0";
35517
+ t = t || {}, this._canvasEle = v7(), this._canvasEle.style.padding = "0", this._canvasEle.style.margin = "0", this._canvasEle.style.border = "0", this._canvasEle.style.background = "transparent", this._canvasEle.style.position = "absolute", this._canvasEle.style.top = "0", this._canvasEle.style.left = "0", this._canvasEle.style.zIndex = "8", this._canvasEle.dataset.uComp = "render-canvas", this._canvasEle.tabIndex = 1, this._canvasEle.style.touchAction = "none", this._canvasEle.style.outline = "0";
35518
35518
  const e = this._canvasEle.getContext("2d");
35519
35519
  if (e == null)
35520
35520
  throw new Error("context is not support");
@@ -56155,36 +56155,36 @@ let X5 = class extends X8 {
56155
56155
  * In Excel, for the border rendering of merged cells to take effect, the outermost cells need to have the same border style.
56156
56156
  */
56157
56157
  _setMergeBorderProps(t, e, a) {
56158
- var u;
56158
+ var u, d, g;
56159
56159
  if (!this.worksheet || !e.border) return;
56160
56160
  const s = [];
56161
56161
  let n = a.startRow, i = a.endRow, o = a.startRow, l = a.startColumn;
56162
56162
  t === K.TOP ? (o = a.startRow, n = a.startColumn, i = a.endColumn) : t === K.BOTTOM ? (o = a.endRow, n = a.startColumn, i = a.endColumn) : t === K.LEFT ? (l = a.startColumn, n = a.startRow, i = a.endRow) : t === K.RIGHT && (l = a.endColumn, n = a.startRow, i = a.endRow);
56163
- for (let d = n; d <= i; d++) {
56164
- t === K.TOP || t === K.BOTTOM ? l = d : (t === K.LEFT || t === K.RIGHT) && (o = d);
56165
- const g = this.worksheet.getCell(o, l);
56166
- if (!g)
56163
+ for (let c = n; c <= i; c++) {
56164
+ t === K.TOP || t === K.BOTTOM ? l = c : (t === K.LEFT || t === K.RIGHT) && (o = c);
56165
+ const h = this.worksheet.getCell(o, l);
56166
+ if (!h)
56167
56167
  break;
56168
- const c = this._styles.getStyleByCell(g);
56169
- if (!c)
56168
+ const p = (u = h.themeStyle) == null ? void 0 : u.bd, f = this._styles.getStyleByCell(h);
56169
+ if (!f && !p)
56170
56170
  break;
56171
- const h = (u = c.bd) == null ? void 0 : u[t];
56172
- if (h) {
56173
- const p = b3(h.cl) || L3;
56171
+ const m = (g = (d = f == null ? void 0 : f.bd) == null ? void 0 : d[t]) != null ? g : p == null ? void 0 : p[t];
56172
+ if (m) {
56173
+ const v = b3(m.cl) || L3;
56174
56174
  s.push({
56175
56175
  r: o,
56176
56176
  c: l,
56177
- style: h.s,
56178
- color: p
56177
+ style: m.s,
56178
+ color: v
56179
56179
  });
56180
56180
  }
56181
56181
  }
56182
- s.forEach((d) => {
56183
- const { r: g, c, style: h, color: p } = d;
56184
- e.border.getValue(g, c) || e.border.setValue(g, c, {}), e.border.getValue(g, c)[t] = {
56182
+ s.forEach((c) => {
56183
+ const { r: h, c: p, style: f, color: m } = c;
56184
+ e.border.getValue(h, p) || e.border.setValue(h, p, {}), e.border.getValue(h, p)[t] = {
56185
56185
  type: t,
56186
- style: h,
56187
- color: p
56186
+ style: f,
56187
+ color: m
56188
56188
  };
56189
56189
  });
56190
56190
  }