@visactor/vrender 0.21.0-alpha.6 → 0.21.0-alpha.7
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/cjs/index.d.ts +1 -1
- package/cjs/index.js +1 -1
- package/cjs/index.js.map +1 -1
- package/dist/index.es.js +11 -5
- package/dist/index.js +11 -5
- package/dist/index.min.js +1 -1
- package/es/index.d.ts +1 -1
- package/es/index.js +1 -1
- package/es/index.js.map +1 -1
- package/package.json +4 -4
package/cjs/index.d.ts
CHANGED
package/cjs/index.js
CHANGED
|
@@ -21,7 +21,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
21
21
|
|
|
22
22
|
const vrender_core_1 = require("@visactor/vrender-core"), vrender_kits_1 = require("@visactor/vrender-kits"), vrender_kits_2 = require("@visactor/vrender-kits");
|
|
23
23
|
|
|
24
|
-
exports.version = "0.21.0-alpha.
|
|
24
|
+
exports.version = "0.21.0-alpha.7", (0, vrender_core_1.preLoadAllModule)(), (0,
|
|
25
25
|
vrender_core_1.isBrowserEnv)() ? (0, vrender_kits_1.loadBrowserEnv)(vrender_core_1.container) : (0,
|
|
26
26
|
vrender_core_1.isNodeEnv)() && (0, vrender_kits_1.loadNodeEnv)(vrender_core_1.container),
|
|
27
27
|
(0, vrender_kits_2.registerArc)(), (0, vrender_kits_2.registerArc3d)(), (0, vrender_kits_2.registerArea)(),
|
package/cjs/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,kCAAgC;AAChC,yDAWgC;AAChC,yDAAqE;AACrE,yDAmBgC;AAEnB,QAAA,OAAO,GAAG,gBAAgB,CAAC;AAExC,IAAA,+BAAgB,GAAE,CAAC;AAEnB,IAAI,IAAA,2BAAY,GAAE,EAAE;IAClB,IAAA,6BAAc,EAAC,wBAAS,CAAC,CAAC;CAC3B;KAAM,IAAI,IAAA,wBAAS,GAAE,EAAE;IACtB,IAAA,0BAAW,EAAC,wBAAS,CAAC,CAAC;CACxB;AACD,IAAA,0BAAW,GAAE,CAAC;AACd,IAAA,4BAAa,GAAE,CAAC;AAChB,IAAA,2BAAY,GAAE,CAAC;AACf,IAAA,6BAAc,GAAE,CAAC;AACjB,IAAA,4BAAa,GAAE,CAAC;AAChB,IAAA,4BAAa,GAAE,CAAC;AAChB,IAAA,4BAAa,GAAE,CAAC;AAChB,IAAA,2BAAY,GAAE,CAAC;AACf,IAAA,2BAAY,GAAE,CAAC;AACf,IAAA,8BAAe,GAAE,CAAC;AAClB,IAAA,gCAAiB,GAAE,CAAC;AACpB,IAAA,2BAAY,GAAE,CAAC;AACf,IAAA,6BAAc,GAAE,CAAC;AACjB,IAAA,+BAAgB,GAAE,CAAC;AACnB,IAAA,iCAAkB,GAAE,CAAC;AACrB,IAAA,6BAAc,GAAE,CAAC;AACjB,IAAA,2BAAY,GAAE,CAAC;AACf,IAAA,+BAAgB,GAAE,CAAC;AAEnB,IAAA,uCAAwB,GAAE,CAAC;AAC3B,IAAA,4CAA6B,GAAE,CAAC;AAChC,IAAA,0CAA2B,GAAE,CAAC;AAC9B,IAAA,2CAA4B,GAAE,CAAC;AAC/B,IAAA,uCAAwB,GAAE,CAAC;AAC3B,IAAA,kCAAmB,GAAE,CAAC;AACtB,yDAAuC;AACvC,yDAAuC","file":"index.js","sourcesContent":["import '@visactor/vrender-core';\nimport {\n container,\n isBrowserEnv,\n isNodeEnv,\n preLoadAllModule,\n registerFlexLayoutPlugin,\n registerViewTransform3dPlugin,\n registerHtmlAttributePlugin,\n registerReactAttributePlugin,\n registerDirectionalLight,\n registerOrthoCamera\n} from '@visactor/vrender-core';\nimport { loadBrowserEnv, loadNodeEnv } from '@visactor/vrender-kits';\nimport {\n registerArc,\n registerArc3d,\n registerArea,\n registerCircle,\n registerGlyph,\n registerGroup,\n registerImage,\n registerLine,\n registerPath,\n registerPolygon,\n registerPyramid3d,\n registerRect,\n registerRect3d,\n registerRichtext,\n registerShadowRoot,\n registerSymbol,\n registerText,\n registerWrapText\n} from '@visactor/vrender-kits';\n// 导出版本号\nexport const version = \"0.21.0-alpha.
|
|
1
|
+
{"version":3,"sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,kCAAgC;AAChC,yDAWgC;AAChC,yDAAqE;AACrE,yDAmBgC;AAEnB,QAAA,OAAO,GAAG,gBAAgB,CAAC;AAExC,IAAA,+BAAgB,GAAE,CAAC;AAEnB,IAAI,IAAA,2BAAY,GAAE,EAAE;IAClB,IAAA,6BAAc,EAAC,wBAAS,CAAC,CAAC;CAC3B;KAAM,IAAI,IAAA,wBAAS,GAAE,EAAE;IACtB,IAAA,0BAAW,EAAC,wBAAS,CAAC,CAAC;CACxB;AACD,IAAA,0BAAW,GAAE,CAAC;AACd,IAAA,4BAAa,GAAE,CAAC;AAChB,IAAA,2BAAY,GAAE,CAAC;AACf,IAAA,6BAAc,GAAE,CAAC;AACjB,IAAA,4BAAa,GAAE,CAAC;AAChB,IAAA,4BAAa,GAAE,CAAC;AAChB,IAAA,4BAAa,GAAE,CAAC;AAChB,IAAA,2BAAY,GAAE,CAAC;AACf,IAAA,2BAAY,GAAE,CAAC;AACf,IAAA,8BAAe,GAAE,CAAC;AAClB,IAAA,gCAAiB,GAAE,CAAC;AACpB,IAAA,2BAAY,GAAE,CAAC;AACf,IAAA,6BAAc,GAAE,CAAC;AACjB,IAAA,+BAAgB,GAAE,CAAC;AACnB,IAAA,iCAAkB,GAAE,CAAC;AACrB,IAAA,6BAAc,GAAE,CAAC;AACjB,IAAA,2BAAY,GAAE,CAAC;AACf,IAAA,+BAAgB,GAAE,CAAC;AAEnB,IAAA,uCAAwB,GAAE,CAAC;AAC3B,IAAA,4CAA6B,GAAE,CAAC;AAChC,IAAA,0CAA2B,GAAE,CAAC;AAC9B,IAAA,2CAA4B,GAAE,CAAC;AAC/B,IAAA,uCAAwB,GAAE,CAAC;AAC3B,IAAA,kCAAmB,GAAE,CAAC;AACtB,yDAAuC;AACvC,yDAAuC","file":"index.js","sourcesContent":["import '@visactor/vrender-core';\nimport {\n container,\n isBrowserEnv,\n isNodeEnv,\n preLoadAllModule,\n registerFlexLayoutPlugin,\n registerViewTransform3dPlugin,\n registerHtmlAttributePlugin,\n registerReactAttributePlugin,\n registerDirectionalLight,\n registerOrthoCamera\n} from '@visactor/vrender-core';\nimport { loadBrowserEnv, loadNodeEnv } from '@visactor/vrender-kits';\nimport {\n registerArc,\n registerArc3d,\n registerArea,\n registerCircle,\n registerGlyph,\n registerGroup,\n registerImage,\n registerLine,\n registerPath,\n registerPolygon,\n registerPyramid3d,\n registerRect,\n registerRect3d,\n registerRichtext,\n registerShadowRoot,\n registerSymbol,\n registerText,\n registerWrapText\n} from '@visactor/vrender-kits';\n// 导出版本号\nexport const version = \"0.21.0-alpha.7\";\n\npreLoadAllModule();\n\nif (isBrowserEnv()) {\n loadBrowserEnv(container);\n} else if (isNodeEnv()) {\n loadNodeEnv(container);\n}\nregisterArc();\nregisterArc3d();\nregisterArea();\nregisterCircle();\nregisterGlyph();\nregisterGroup();\nregisterImage();\nregisterLine();\nregisterPath();\nregisterPolygon();\nregisterPyramid3d();\nregisterRect();\nregisterRect3d();\nregisterRichtext();\nregisterShadowRoot();\nregisterSymbol();\nregisterText();\nregisterWrapText();\n\nregisterFlexLayoutPlugin();\nregisterViewTransform3dPlugin();\nregisterHtmlAttributePlugin();\nregisterReactAttributePlugin();\nregisterDirectionalLight();\nregisterOrthoCamera();\nexport * from '@visactor/vrender-core';\nexport * from '@visactor/vrender-kits';\n"]}
|
package/dist/index.es.js
CHANGED
|
@@ -1703,7 +1703,9 @@ class TextMeasure {
|
|
|
1703
1703
|
} = this.textSpec;
|
|
1704
1704
|
return {
|
|
1705
1705
|
width: metrics.width,
|
|
1706
|
-
height: null !== (_a = lineHeight) && void 0 !== _a ? _a : fontSize
|
|
1706
|
+
height: null !== (_a = lineHeight) && void 0 !== _a ? _a : fontSize,
|
|
1707
|
+
fontBoundingBoxAscent: metrics.fontBoundingBoxAscent,
|
|
1708
|
+
fontBoundingBoxDescent: metrics.fontBoundingBoxDescent
|
|
1707
1709
|
};
|
|
1708
1710
|
}
|
|
1709
1711
|
quickMeasure(text) {
|
|
@@ -1717,7 +1719,7 @@ class TextMeasure {
|
|
|
1717
1719
|
for (let i = 0; i < text.length; i++) {
|
|
1718
1720
|
const char = text[i];
|
|
1719
1721
|
let size = this._measureSpecialChar(char);
|
|
1720
|
-
isNil$1(size) && TextMeasure.NUMBERS_CHAR_SET.includes(char) && (size = this._measureNumberChar()), isNil$1(size) && ["F", "W"].includes(eastAsianCharacterInfo(char)) && (size = this._measureFullSizeChar()), isNil$1(size) && (size = this._measureLetterChar()), totalSize.width += size.width, totalSize.height = Math.max(totalSize.height, size.height);
|
|
1722
|
+
isNil$1(size) && TextMeasure.NUMBERS_CHAR_SET.includes(char) && (size = this._measureNumberChar()), isNil$1(size) && ["F", "W"].includes(eastAsianCharacterInfo(char)) && (size = this._measureFullSizeChar()), isNil$1(size) && (size = this._measureLetterChar()), totalSize.width += size.width, totalSize.height = Math.max(totalSize.height, size.height), !isNil$1(size.fontBoundingBoxAscent) && (totalSize.fontBoundingBoxAscent = size.fontBoundingBoxAscent), !isNil$1(size.fontBoundingBoxDescent) && (totalSize.fontBoundingBoxDescent = size.fontBoundingBoxDescent);
|
|
1721
1723
|
}
|
|
1722
1724
|
return totalSize;
|
|
1723
1725
|
}
|
|
@@ -1766,7 +1768,9 @@ class TextMeasure {
|
|
|
1766
1768
|
const numberBounds = this._standardMethod(TextMeasure.NUMBERS_CHAR_SET);
|
|
1767
1769
|
this._numberCharSize = {
|
|
1768
1770
|
width: numberBounds.width / TextMeasure.NUMBERS_CHAR_SET.length,
|
|
1769
|
-
height: numberBounds.height
|
|
1771
|
+
height: numberBounds.height,
|
|
1772
|
+
fontBoundingBoxAscent: numberBounds.fontBoundingBoxAscent,
|
|
1773
|
+
fontBoundingBoxDescent: numberBounds.fontBoundingBoxDescent
|
|
1770
1774
|
};
|
|
1771
1775
|
}
|
|
1772
1776
|
return this._numberCharSize;
|
|
@@ -1779,7 +1783,9 @@ class TextMeasure {
|
|
|
1779
1783
|
const alphabetBounds = this._standardMethod(TextMeasure.ALPHABET_CHAR_SET);
|
|
1780
1784
|
this._letterCharSize = {
|
|
1781
1785
|
width: alphabetBounds.width / TextMeasure.ALPHABET_CHAR_SET.length,
|
|
1782
|
-
height: alphabetBounds.height
|
|
1786
|
+
height: alphabetBounds.height,
|
|
1787
|
+
fontBoundingBoxAscent: alphabetBounds.fontBoundingBoxAscent,
|
|
1788
|
+
fontBoundingBoxDescent: alphabetBounds.fontBoundingBoxDescent
|
|
1783
1789
|
};
|
|
1784
1790
|
}
|
|
1785
1791
|
return this._letterCharSize;
|
|
@@ -28612,7 +28618,7 @@ const registerWrapText = _registerWrapText;
|
|
|
28612
28618
|
|
|
28613
28619
|
const roughModule = _roughModule;
|
|
28614
28620
|
|
|
28615
|
-
const version = "0.21.0-alpha.
|
|
28621
|
+
const version = "0.21.0-alpha.7";
|
|
28616
28622
|
preLoadAllModule();
|
|
28617
28623
|
if (isBrowserEnv()) {
|
|
28618
28624
|
loadBrowserEnv(container);
|
package/dist/index.js
CHANGED
|
@@ -1709,7 +1709,9 @@
|
|
|
1709
1709
|
} = this.textSpec;
|
|
1710
1710
|
return {
|
|
1711
1711
|
width: metrics.width,
|
|
1712
|
-
height: null !== (_a = lineHeight) && void 0 !== _a ? _a : fontSize
|
|
1712
|
+
height: null !== (_a = lineHeight) && void 0 !== _a ? _a : fontSize,
|
|
1713
|
+
fontBoundingBoxAscent: metrics.fontBoundingBoxAscent,
|
|
1714
|
+
fontBoundingBoxDescent: metrics.fontBoundingBoxDescent
|
|
1713
1715
|
};
|
|
1714
1716
|
}
|
|
1715
1717
|
quickMeasure(text) {
|
|
@@ -1723,7 +1725,7 @@
|
|
|
1723
1725
|
for (let i = 0; i < text.length; i++) {
|
|
1724
1726
|
const char = text[i];
|
|
1725
1727
|
let size = this._measureSpecialChar(char);
|
|
1726
|
-
isNil$1(size) && TextMeasure.NUMBERS_CHAR_SET.includes(char) && (size = this._measureNumberChar()), isNil$1(size) && ["F", "W"].includes(eastAsianCharacterInfo(char)) && (size = this._measureFullSizeChar()), isNil$1(size) && (size = this._measureLetterChar()), totalSize.width += size.width, totalSize.height = Math.max(totalSize.height, size.height);
|
|
1728
|
+
isNil$1(size) && TextMeasure.NUMBERS_CHAR_SET.includes(char) && (size = this._measureNumberChar()), isNil$1(size) && ["F", "W"].includes(eastAsianCharacterInfo(char)) && (size = this._measureFullSizeChar()), isNil$1(size) && (size = this._measureLetterChar()), totalSize.width += size.width, totalSize.height = Math.max(totalSize.height, size.height), !isNil$1(size.fontBoundingBoxAscent) && (totalSize.fontBoundingBoxAscent = size.fontBoundingBoxAscent), !isNil$1(size.fontBoundingBoxDescent) && (totalSize.fontBoundingBoxDescent = size.fontBoundingBoxDescent);
|
|
1727
1729
|
}
|
|
1728
1730
|
return totalSize;
|
|
1729
1731
|
}
|
|
@@ -1772,7 +1774,9 @@
|
|
|
1772
1774
|
const numberBounds = this._standardMethod(TextMeasure.NUMBERS_CHAR_SET);
|
|
1773
1775
|
this._numberCharSize = {
|
|
1774
1776
|
width: numberBounds.width / TextMeasure.NUMBERS_CHAR_SET.length,
|
|
1775
|
-
height: numberBounds.height
|
|
1777
|
+
height: numberBounds.height,
|
|
1778
|
+
fontBoundingBoxAscent: numberBounds.fontBoundingBoxAscent,
|
|
1779
|
+
fontBoundingBoxDescent: numberBounds.fontBoundingBoxDescent
|
|
1776
1780
|
};
|
|
1777
1781
|
}
|
|
1778
1782
|
return this._numberCharSize;
|
|
@@ -1785,7 +1789,9 @@
|
|
|
1785
1789
|
const alphabetBounds = this._standardMethod(TextMeasure.ALPHABET_CHAR_SET);
|
|
1786
1790
|
this._letterCharSize = {
|
|
1787
1791
|
width: alphabetBounds.width / TextMeasure.ALPHABET_CHAR_SET.length,
|
|
1788
|
-
height: alphabetBounds.height
|
|
1792
|
+
height: alphabetBounds.height,
|
|
1793
|
+
fontBoundingBoxAscent: alphabetBounds.fontBoundingBoxAscent,
|
|
1794
|
+
fontBoundingBoxDescent: alphabetBounds.fontBoundingBoxDescent
|
|
1789
1795
|
};
|
|
1790
1796
|
}
|
|
1791
1797
|
return this._letterCharSize;
|
|
@@ -28618,7 +28624,7 @@
|
|
|
28618
28624
|
|
|
28619
28625
|
const roughModule = _roughModule;
|
|
28620
28626
|
|
|
28621
|
-
const version = "0.21.0-alpha.
|
|
28627
|
+
const version = "0.21.0-alpha.7";
|
|
28622
28628
|
preLoadAllModule();
|
|
28623
28629
|
if (isBrowserEnv()) {
|
|
28624
28630
|
loadBrowserEnv(container);
|