@inditextech/weave-sdk 0.27.0 → 0.27.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/dist/sdk.cjs CHANGED
@@ -18136,7 +18136,7 @@ var WeaveRegisterManager = class {
18136
18136
 
18137
18137
  //#endregion
18138
18138
  //#region package.json
18139
- var version = "0.27.0";
18139
+ var version = "0.27.1";
18140
18140
 
18141
18141
  //#endregion
18142
18142
  //#region src/managers/setup.ts
@@ -19259,7 +19259,7 @@ var WeaveTextNode = class extends WeaveNode {
19259
19259
  textAreaDomResize(textAreaContainer, textArea, textNode) {
19260
19260
  if (!textNode.getAttrs().layout || textNode.getAttrs().layout === TEXT_LAYOUT.AUTO_ALL) {
19261
19261
  const { width: textAreaWidth } = this.textRenderedSize(textArea.value, textNode);
19262
- textAreaContainer.style.width = textAreaWidth * textNode.getAbsoluteScale().x + 1 + "px";
19262
+ textAreaContainer.style.width = textAreaWidth * textNode.getAbsoluteScale().x + 2 + "px";
19263
19263
  }
19264
19264
  if (!textNode.getAttrs().layout || textNode.getAttrs().layout === TEXT_LAYOUT.AUTO_HEIGHT) textAreaContainer.style.height = "auto";
19265
19265
  if (!textNode.getAttrs().layout || textNode.getAttrs().layout === TEXT_LAYOUT.AUTO_ALL || textNode.getAttrs().layout === TEXT_LAYOUT.AUTO_HEIGHT) {
@@ -19350,6 +19350,7 @@ var WeaveTextNode = class extends WeaveNode {
19350
19350
  textArea.style.minHeight = "auto";
19351
19351
  textArea.style.margin = "0px";
19352
19352
  textArea.style.padding = "0px";
19353
+ textArea.style.boxSizing = "content-box";
19353
19354
  textArea.style.overflow = "hidden";
19354
19355
  textArea.style.background = "transparent";
19355
19356
  textArea.style.border = "none";
@@ -19399,8 +19400,9 @@ var WeaveTextNode = class extends WeaveNode {
19399
19400
  const rotation = textNode.rotation();
19400
19401
  let transform = "";
19401
19402
  if (rotation) transform += "rotateZ(" + rotation + "deg)";
19402
- const px = 0;
19403
- const py = -3 * stage.scaleY();
19403
+ const measures = textNode.measureSize(textNode.text());
19404
+ const px = 0 * stage.scaleX();
19405
+ const py = 2 * (measures.fontBoundingBoxAscent - measures.hangingBaseline - measures.fontBoundingBoxDescent) * stage.scaleY();
19404
19406
  transform += "translateX(" + px + "px)";
19405
19407
  transform += "translateY(" + py + "px)";
19406
19408
  textArea.style.transform = transform;
package/dist/sdk.js CHANGED
@@ -18136,7 +18136,7 @@ var WeaveRegisterManager = class {
18136
18136
 
18137
18137
  //#endregion
18138
18138
  //#region package.json
18139
- var version = "0.27.0";
18139
+ var version = "0.27.1";
18140
18140
 
18141
18141
  //#endregion
18142
18142
  //#region src/managers/setup.ts
@@ -19259,7 +19259,7 @@ var WeaveTextNode = class extends WeaveNode {
19259
19259
  textAreaDomResize(textAreaContainer, textArea, textNode) {
19260
19260
  if (!textNode.getAttrs().layout || textNode.getAttrs().layout === TEXT_LAYOUT.AUTO_ALL) {
19261
19261
  const { width: textAreaWidth } = this.textRenderedSize(textArea.value, textNode);
19262
- textAreaContainer.style.width = textAreaWidth * textNode.getAbsoluteScale().x + 1 + "px";
19262
+ textAreaContainer.style.width = textAreaWidth * textNode.getAbsoluteScale().x + 2 + "px";
19263
19263
  }
19264
19264
  if (!textNode.getAttrs().layout || textNode.getAttrs().layout === TEXT_LAYOUT.AUTO_HEIGHT) textAreaContainer.style.height = "auto";
19265
19265
  if (!textNode.getAttrs().layout || textNode.getAttrs().layout === TEXT_LAYOUT.AUTO_ALL || textNode.getAttrs().layout === TEXT_LAYOUT.AUTO_HEIGHT) {
@@ -19350,6 +19350,7 @@ var WeaveTextNode = class extends WeaveNode {
19350
19350
  textArea.style.minHeight = "auto";
19351
19351
  textArea.style.margin = "0px";
19352
19352
  textArea.style.padding = "0px";
19353
+ textArea.style.boxSizing = "content-box";
19353
19354
  textArea.style.overflow = "hidden";
19354
19355
  textArea.style.background = "transparent";
19355
19356
  textArea.style.border = "none";
@@ -19399,8 +19400,9 @@ var WeaveTextNode = class extends WeaveNode {
19399
19400
  const rotation = textNode.rotation();
19400
19401
  let transform = "";
19401
19402
  if (rotation) transform += "rotateZ(" + rotation + "deg)";
19402
- const px = 0;
19403
- const py = -3 * stage.scaleY();
19403
+ const measures = textNode.measureSize(textNode.text());
19404
+ const px = 0 * stage.scaleX();
19405
+ const py = 2 * (measures.fontBoundingBoxAscent - measures.hangingBaseline - measures.fontBoundingBoxDescent) * stage.scaleY();
19404
19406
  transform += "translateX(" + px + "px)";
19405
19407
  transform += "translateY(" + py + "px)";
19406
19408
  textArea.style.transform = transform;