@visactor/vrender 0.17.25 → 0.17.27-alpha.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/cjs/index.d.ts +1 -1
- package/cjs/index.js +11 -10
- package/cjs/index.js.map +1 -1
- package/dist/index.js +40 -19
- 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 +6 -6
package/cjs/index.d.ts
CHANGED
package/cjs/index.js
CHANGED
|
@@ -21,13 +21,14 @@ 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.17.
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
(0, vrender_kits_2.
|
|
28
|
-
(0, vrender_kits_2.
|
|
29
|
-
(0, vrender_kits_2.
|
|
30
|
-
(0, vrender_kits_2.
|
|
31
|
-
vrender_kits_2.
|
|
32
|
-
(0, vrender_kits_2.
|
|
33
|
-
|
|
24
|
+
exports.version = "0.17.27-alpha.0", (0, vrender_core_1.preLoadAllModule)(), (0,
|
|
25
|
+
vrender_core_1.isBrowserEnv)() ? (0, vrender_kits_1.loadBrowserEnv)(vrender_core_1.container) : (0,
|
|
26
|
+
vrender_core_1.isNodeEnv)() && (0, vrender_kits_1.loadNodeEnv)(vrender_core_1.container),
|
|
27
|
+
(0, vrender_kits_2.registerArc)(), (0, vrender_kits_2.registerArc3d)(), (0, vrender_kits_2.registerArea)(),
|
|
28
|
+
(0, vrender_kits_2.registerCircle)(), (0, vrender_kits_2.registerGlyph)(), (0, vrender_kits_2.registerGroup)(),
|
|
29
|
+
(0, vrender_kits_2.registerImage)(), (0, vrender_kits_2.registerLine)(), (0, vrender_kits_2.registerPath)(),
|
|
30
|
+
(0, vrender_kits_2.registerPolygon)(), (0, vrender_kits_2.registerPyramid3d)(),
|
|
31
|
+
(0, vrender_kits_2.registerRect)(), (0, vrender_kits_2.registerRect3d)(), (0, vrender_kits_2.registerRichtext)(),
|
|
32
|
+
(0, vrender_kits_2.registerShadowRoot)(), (0, vrender_kits_2.registerSymbol)(),
|
|
33
|
+
(0, vrender_kits_2.registerText)(), (0, vrender_kits_2.registerWrapText)(), __exportStar(require("@visactor/vrender-core"), exports),
|
|
34
|
+
__exportStar(require("@visactor/vrender-kits"), exports);
|
package/cjs/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,kCAAgC;AAChC,yDAA8F;AAC9F,yDAAqE;AACrE,yDAmBgC;AAEnB,QAAA,OAAO,GAAG,
|
|
1
|
+
{"version":3,"sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,kCAAgC;AAChC,yDAA8F;AAC9F,yDAAqE;AACrE,yDAmBgC;AAEnB,QAAA,OAAO,GAAG,iBAAiB,CAAC;AAEzC,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;AACnB,yDAAuC;AACvC,yDAAuC","file":"index.js","sourcesContent":["import '@visactor/vrender-core';\nimport { container, isBrowserEnv, isNodeEnv, preLoadAllModule } 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.17.27-alpha.0\";\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();\nexport * from '@visactor/vrender-core';\nexport * from '@visactor/vrender-kits';\n"]}
|
package/dist/index.js
CHANGED
|
@@ -5157,6 +5157,8 @@
|
|
|
5157
5157
|
heightLimit: 1 / 0,
|
|
5158
5158
|
lineClamp: 1 / 0,
|
|
5159
5159
|
suffixPosition: "end",
|
|
5160
|
+
underlineDash: [],
|
|
5161
|
+
underlineOffset: 0,
|
|
5160
5162
|
disableAutoClipedPoptip: void 0
|
|
5161
5163
|
};
|
|
5162
5164
|
var DefaultPickStyle = {
|
|
@@ -11378,9 +11380,7 @@
|
|
|
11378
11380
|
var data = ResourceLoader.cache.get(svgStr);
|
|
11379
11381
|
data ? "fail" === data.loadState ? application.global.getRequestAnimationFrame()(function () {
|
|
11380
11382
|
mark.imageLoadFail(svgStr);
|
|
11381
|
-
}) : "init" === data.loadState || "loading" === data.loadState ? null === (_a = data.waitingMark) || void 0 === _a || _a.push(mark) : mark &&
|
|
11382
|
-
mark.imageLoadSuccess(svgStr, data.data);
|
|
11383
|
-
}) : (data = {
|
|
11383
|
+
}) : "init" === data.loadState || "loading" === data.loadState ? null === (_a = data.waitingMark) || void 0 === _a || _a.push(mark) : mark && mark.imageLoadSuccess(svgStr, data.data) : (data = {
|
|
11384
11384
|
type: "image",
|
|
11385
11385
|
loadState: "init"
|
|
11386
11386
|
}, ResourceLoader.cache.set(svgStr, data), data.dataPromise = application.global.loadSvg(svgStr), data.dataPromise ? (data.waitingMark = [mark], data.dataPromise.then(function (res) {
|
|
@@ -11831,7 +11831,7 @@
|
|
|
11831
11831
|
value: function animate(params) {
|
|
11832
11832
|
var _this2 = this;
|
|
11833
11833
|
this.animates || (this.animates = new Map());
|
|
11834
|
-
var animate = new Animate(null == params ? void 0 : params.id).bind(this);
|
|
11834
|
+
var animate = new Animate(null == params ? void 0 : params.id, this.stage && this.stage.getTimeline()).bind(this);
|
|
11835
11835
|
if (params) {
|
|
11836
11836
|
var onStart = params.onStart,
|
|
11837
11837
|
onFrame = params.onFrame,
|
|
@@ -14040,17 +14040,25 @@
|
|
|
14040
14040
|
key: "updateSingallineAABBBounds",
|
|
14041
14041
|
value: function updateSingallineAABBBounds(text) {
|
|
14042
14042
|
var textTheme = getTheme(this).text,
|
|
14043
|
-
_this$
|
|
14044
|
-
|
|
14045
|
-
|
|
14043
|
+
_this$attribute2 = this.attribute,
|
|
14044
|
+
_this$attribute2$dire = _this$attribute2.direction,
|
|
14045
|
+
direction = _this$attribute2$dire === void 0 ? textTheme.direction : _this$attribute2$dire,
|
|
14046
|
+
_this$attribute2$unde = _this$attribute2.underlineOffset,
|
|
14047
|
+
underlineOffset = _this$attribute2$unde === void 0 ? textTheme.underlineOffset : _this$attribute2$unde,
|
|
14048
|
+
b = "horizontal" === direction ? this.updateHorizontalSinglelineAABBBounds(text) : this.updateVerticalSinglelineAABBBounds(text);
|
|
14049
|
+
return "horizontal" === direction && underlineOffset && this._AABBBounds.add(this._AABBBounds.x1, this._AABBBounds.y2 + underlineOffset), b;
|
|
14046
14050
|
}
|
|
14047
14051
|
}, {
|
|
14048
14052
|
key: "updateMultilineAABBBounds",
|
|
14049
14053
|
value: function updateMultilineAABBBounds(text) {
|
|
14050
14054
|
var textTheme = getTheme(this).text,
|
|
14051
|
-
_this$
|
|
14052
|
-
|
|
14053
|
-
|
|
14055
|
+
_this$attribute3 = this.attribute,
|
|
14056
|
+
_this$attribute3$dire = _this$attribute3.direction,
|
|
14057
|
+
direction = _this$attribute3$dire === void 0 ? textTheme.direction : _this$attribute3$dire,
|
|
14058
|
+
_this$attribute3$unde = _this$attribute3.underlineOffset,
|
|
14059
|
+
underlineOffset = _this$attribute3$unde === void 0 ? textTheme.underlineOffset : _this$attribute3$unde,
|
|
14060
|
+
b = "horizontal" === direction ? this.updateHorizontalMultilineAABBBounds(text) : this.updateVerticalMultilineAABBBounds(text);
|
|
14061
|
+
return "horizontal" === direction && underlineOffset && this._AABBBounds.add(this._AABBBounds.x1, this._AABBBounds.y2 + underlineOffset), b;
|
|
14054
14062
|
}
|
|
14055
14063
|
}, {
|
|
14056
14064
|
key: "updateHorizontalSinglelineAABBBounds",
|
|
@@ -20993,6 +21001,10 @@
|
|
|
20993
21001
|
fill = _text$attribute3$fill === void 0 ? textAttribute.fill : _text$attribute3$fill,
|
|
20994
21002
|
_text$attribute3$opac = _text$attribute3.opacity,
|
|
20995
21003
|
opacity = _text$attribute3$opac === void 0 ? textAttribute.opacity : _text$attribute3$opac,
|
|
21004
|
+
_text$attribute3$unde = _text$attribute3.underlineOffset,
|
|
21005
|
+
underlineOffset = _text$attribute3$unde === void 0 ? textAttribute.underlineOffset : _text$attribute3$unde,
|
|
21006
|
+
_text$attribute3$unde2 = _text$attribute3.underlineDash,
|
|
21007
|
+
underlineDash = _text$attribute3$unde2 === void 0 ? textAttribute.underlineDash : _text$attribute3$unde2,
|
|
20996
21008
|
_text$attribute3$fill2 = _text$attribute3.fillOpacity,
|
|
20997
21009
|
fillOpacity = _text$attribute3$fill2 === void 0 ? textAttribute.fillOpacity : _text$attribute3$fill2,
|
|
20998
21010
|
w = text.clipedWidth,
|
|
@@ -21005,8 +21017,8 @@
|
|
|
21005
21017
|
strokeOpacity: fillOpacity
|
|
21006
21018
|
};
|
|
21007
21019
|
if (underline) {
|
|
21008
|
-
attribute.lineWidth = underline, context.setStrokeStyle(text, attribute, x, y, textAttribute), context.beginPath();
|
|
21009
|
-
var dy = y + offsetY + fontSize;
|
|
21020
|
+
attribute.lineWidth = underline, context.setStrokeStyle(text, attribute, x, y, textAttribute), context.setLineDash(underlineDash), context.beginPath();
|
|
21021
|
+
var dy = y + offsetY + fontSize + underlineOffset;
|
|
21010
21022
|
context.moveTo(x + offsetX, dy, z), context.lineTo(x + offsetX + w, dy, z), context.stroke();
|
|
21011
21023
|
}
|
|
21012
21024
|
if (lineThrough) {
|
|
@@ -21028,6 +21040,10 @@
|
|
|
21028
21040
|
fill = _text$attribute4$fill === void 0 ? textAttribute.fill : _text$attribute4$fill,
|
|
21029
21041
|
_text$attribute4$opac = _text$attribute4.opacity,
|
|
21030
21042
|
opacity = _text$attribute4$opac === void 0 ? textAttribute.opacity : _text$attribute4$opac,
|
|
21043
|
+
_text$attribute4$unde = _text$attribute4.underlineOffset,
|
|
21044
|
+
underlineOffset = _text$attribute4$unde === void 0 ? textAttribute.underlineOffset : _text$attribute4$unde,
|
|
21045
|
+
_text$attribute4$unde2 = _text$attribute4.underlineDash,
|
|
21046
|
+
underlineDash = _text$attribute4$unde2 === void 0 ? textAttribute.underlineDash : _text$attribute4$unde2,
|
|
21031
21047
|
_text$attribute4$fill2 = _text$attribute4.fillOpacity,
|
|
21032
21048
|
fillOpacity = _text$attribute4$fill2 === void 0 ? textAttribute.fillOpacity : _text$attribute4$fill2,
|
|
21033
21049
|
offsetX = textDrawOffsetX(textAlign, w),
|
|
@@ -21040,8 +21056,8 @@
|
|
|
21040
21056
|
};
|
|
21041
21057
|
var deltaY = -3;
|
|
21042
21058
|
if (underline) {
|
|
21043
|
-
attribute.lineWidth = underline, context.setStrokeStyle(text, attribute, x, y, textAttribute), context.beginPath();
|
|
21044
|
-
var dy = y + offsetY + fontSize + deltaY;
|
|
21059
|
+
attribute.lineWidth = underline, context.setStrokeStyle(text, attribute, x, y, textAttribute), context.setLineDash(underlineDash), context.beginPath();
|
|
21060
|
+
var dy = y + offsetY + fontSize + deltaY + underlineOffset;
|
|
21045
21061
|
context.moveTo(x + offsetX, dy, z), context.lineTo(x + offsetX + w, dy, z), context.stroke();
|
|
21046
21062
|
}
|
|
21047
21063
|
if (deltaY = -1, lineThrough) {
|
|
@@ -29173,10 +29189,15 @@
|
|
|
29173
29189
|
attribute: attribute
|
|
29174
29190
|
}),
|
|
29175
29191
|
out = parseToGraphic(g, dom.props, children);
|
|
29176
|
-
return out || (stateProxy && (g.stateProxy = stateProxy), g.id = id, g.name = name,
|
|
29177
|
-
|
|
29178
|
-
|
|
29179
|
-
|
|
29192
|
+
return out || (stateProxy && (g.stateProxy = stateProxy), g.id = id, g.name = name, parseChildren(children, g), g);
|
|
29193
|
+
}
|
|
29194
|
+
function parseChildren(children, g) {
|
|
29195
|
+
isArray$1(children) ? children.forEach(function (item) {
|
|
29196
|
+
if (isArray$1(item)) parseChildren(item, g);else {
|
|
29197
|
+
var c = decodeReactDom(item);
|
|
29198
|
+
c && c.type && g.add(c);
|
|
29199
|
+
}
|
|
29200
|
+
}) : children && g.add(decodeReactDom(children));
|
|
29180
29201
|
}
|
|
29181
29202
|
function parseToGraphic(g, props, childrenList) {
|
|
29182
29203
|
var out,
|
|
@@ -35099,7 +35120,7 @@
|
|
|
35099
35120
|
|
|
35100
35121
|
var roughModule = _roughModule;
|
|
35101
35122
|
|
|
35102
|
-
const version = "0.17.
|
|
35123
|
+
const version = "0.17.27-alpha.0";
|
|
35103
35124
|
preLoadAllModule();
|
|
35104
35125
|
if (isBrowserEnv()) {
|
|
35105
35126
|
loadBrowserEnv(container);
|