@visactor/vrender-components 1.0.13 → 1.0.14-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 +1 -1
- package/cjs/index.js.map +1 -1
- package/dist/index.es.js +26 -15
- 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
|
@@ -17,7 +17,7 @@ var __createBinding = this && this.__createBinding || (Object.create ? function(
|
|
|
17
17
|
|
|
18
18
|
Object.defineProperty(exports, "__esModule", {
|
|
19
19
|
value: !0
|
|
20
|
-
}), exports.version = void 0, exports.version = "1.0.
|
|
20
|
+
}), exports.version = void 0, exports.version = "1.0.14-alpha.0", __exportStar(require("./core/base"), exports),
|
|
21
21
|
__exportStar(require("./core/type"), exports), __exportStar(require("./scrollbar"), exports),
|
|
22
22
|
__exportStar(require("./tag"), exports), __exportStar(require("./poptip"), exports),
|
|
23
23
|
__exportStar(require("./crosshair"), exports), __exportStar(require("./label"), exports),
|
package/cjs/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AACa,QAAA,OAAO,GAAG,
|
|
1
|
+
{"version":3,"sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AACa,QAAA,OAAO,GAAG,gBAAgB,CAAC;AAExC,8CAA4B;AAC5B,8CAA4B;AAC5B,8CAA4B;AAC5B,wCAAsB;AACtB,2CAAyB;AACzB,8CAA4B;AAC5B,0CAAwB;AACxB,yCAAuB;AACvB,8CAA4B;AAC5B,4CAA0B;AAC1B,8CAA4B;AAC5B,2CAAyB;AACzB,0CAAwB;AACxB,2CAAyB;AACzB,0CAAwB;AACxB,8CAA4B;AAC5B,2CAAyB;AACzB,8CAA4B;AAC5B,2CAAyB;AACzB,0CAAwB;AACxB,4CAA0B;AAC1B,6CAA2B;AAC3B,8CAA4B;AAC5B,wCAAsB;AACtB,6CAA2B;AAC3B,0CAAwB;AACxB,8CAA4B;AAC5B,4CAA0B;AAC1B,yCAAuB;AACvB,2CAAyB;AACzB,+CAA6B","file":"index.js","sourcesContent":["// 导出版本号\nexport const version = \"1.0.14-alpha.0\";\n\nexport * from './core/base';\nexport * from './core/type';\nexport * from './scrollbar';\nexport * from './tag';\nexport * from './poptip';\nexport * from './crosshair';\nexport * from './label';\nexport * from './axis';\nexport * from './axis/grid';\nexport * from './segment';\nexport * from './data-zoom';\nexport * from './marker';\nexport * from './pager';\nexport * from './legend';\nexport * from './title';\nexport * from './indicator';\nexport * from './slider';\nexport * from './link-path';\nexport * from './player';\nexport * from './brush';\nexport * from './tooltip';\nexport * from './timeline';\nexport * from './interface';\nexport * from './jsx';\nexport * from './checkbox';\nexport * from './radio';\nexport * from './empty-tip';\nexport * from './weather';\nexport * from './util';\nexport * from './switch';\nexport * from './label-item';\n"]}
|
package/dist/index.es.js
CHANGED
|
@@ -3008,6 +3008,9 @@ var __decorate$P = undefined && undefined.__decorate || function (decorators, ta
|
|
|
3008
3008
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
3009
3009
|
};
|
|
3010
3010
|
let ATextMeasure = class {
|
|
3011
|
+
constructor() {
|
|
3012
|
+
this.id = "ATextMeasure";
|
|
3013
|
+
}
|
|
3011
3014
|
configure(service, env) {
|
|
3012
3015
|
this.canvas = service.canvas, this.context = service.context, service.bindTextMeasure(this);
|
|
3013
3016
|
}
|
|
@@ -3400,7 +3403,11 @@ var __decorate$O = undefined && undefined.__decorate || function (decorators, ta
|
|
|
3400
3403
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
3401
3404
|
};
|
|
3402
3405
|
const TextMeasureContribution = Symbol.for("TextMeasureContribution");
|
|
3403
|
-
let DefaultTextMeasureContribution = class extends ATextMeasure {
|
|
3406
|
+
let DefaultTextMeasureContribution = class extends ATextMeasure {
|
|
3407
|
+
constructor() {
|
|
3408
|
+
super(...arguments), this.id = "DefaultTextMeasureContribution";
|
|
3409
|
+
}
|
|
3410
|
+
};
|
|
3404
3411
|
DefaultTextMeasureContribution = __decorate$O([injectable()], DefaultTextMeasureContribution);
|
|
3405
3412
|
|
|
3406
3413
|
const container = new Container();
|
|
@@ -3980,13 +3987,17 @@ let DefaultGraphicUtil = class {
|
|
|
3980
3987
|
return this.tryInitCanvas(), this._context;
|
|
3981
3988
|
}
|
|
3982
3989
|
constructor(contributions) {
|
|
3983
|
-
this.contributions = contributions, this.configured = !1, this.global = application.global, this.global.hooks.onSetEnv.tap("graphic-util", (lastEnv, env, global) => {
|
|
3990
|
+
this.contributions = contributions, this.configured = !1, this.global = application.global, this._textMeasureMap = new Map(), this.global.hooks.onSetEnv.tap("graphic-util", (lastEnv, env, global) => {
|
|
3984
3991
|
this.configured = !1, this.configure(global, env);
|
|
3985
3992
|
});
|
|
3986
3993
|
}
|
|
3987
3994
|
get textMeasure() {
|
|
3988
3995
|
return this._textMeasure || this.configure(this.global, this.global.env), this._textMeasure;
|
|
3989
3996
|
}
|
|
3997
|
+
getTextMeasureInstance(textMeasureId) {
|
|
3998
|
+
if (!textMeasureId) return this.textMeasure;
|
|
3999
|
+
return this._textMeasureMap.get(textMeasureId) || this.textMeasure;
|
|
4000
|
+
}
|
|
3990
4001
|
configure(global, env) {
|
|
3991
4002
|
this.configured || (this.contributions.getContributions().forEach(contribution => {
|
|
3992
4003
|
contribution.configure(this, env);
|
|
@@ -3999,7 +4010,7 @@ let DefaultGraphicUtil = class {
|
|
|
3999
4010
|
}
|
|
4000
4011
|
}
|
|
4001
4012
|
bindTextMeasure(tm) {
|
|
4002
|
-
this._textMeasure = tm;
|
|
4013
|
+
this._textMeasure && "DefaultTextMeasureContribution" !== tm.id || (this._textMeasure = tm), this._textMeasureMap.has(tm.id) || this._textMeasureMap.set(tm.id, tm);
|
|
4003
4014
|
}
|
|
4004
4015
|
measureText(text, tc, method = "native") {
|
|
4005
4016
|
var _a;
|
|
@@ -7936,7 +7947,7 @@ class Text extends Graphic {
|
|
|
7936
7947
|
return fontSize ? .1 * fontSize : 0;
|
|
7937
7948
|
}
|
|
7938
7949
|
updateHorizontalMultilineAABBBounds(text) {
|
|
7939
|
-
var _a;
|
|
7950
|
+
var _a, _b;
|
|
7940
7951
|
const textTheme = this.getGraphicTheme(),
|
|
7941
7952
|
attribute = this.attribute,
|
|
7942
7953
|
{
|
|
@@ -7963,7 +7974,7 @@ class Text extends Graphic {
|
|
|
7963
7974
|
const bbox = this.cache.layoutData.bbox;
|
|
7964
7975
|
return this._AABBBounds.set(bbox.xOffset, bbox.yOffset, bbox.xOffset + bbox.width, bbox.yOffset + bbox.height), stroke && this._AABBBounds.expand(lineWidth / 2), this._AABBBounds;
|
|
7965
7976
|
}
|
|
7966
|
-
const textMeasure = application.graphicUtil.
|
|
7977
|
+
const textMeasure = application.graphicUtil.getTextMeasureInstance(this.textMeasureId || (null === (_b = this.stage) || void 0 === _b ? void 0 : _b.textMeasureId)),
|
|
7967
7978
|
layoutData = new CanvasTextLayout(fontFamily, {
|
|
7968
7979
|
fontSize: fontSize,
|
|
7969
7980
|
fontWeight: fontWeight,
|
|
@@ -7981,7 +7992,7 @@ class Text extends Graphic {
|
|
|
7981
7992
|
return this.cache.layoutData = layoutData, this.clearUpdateShapeTag(), this._AABBBounds.set(bbox.xOffset, bbox.yOffset, bbox.xOffset + bbox.width, bbox.yOffset + bbox.height), stroke && this._AABBBounds.expand(lineWidth / 2), this._AABBBounds;
|
|
7982
7993
|
}
|
|
7983
7994
|
updateWrapAABBBounds(text) {
|
|
7984
|
-
var _a, _b, _c;
|
|
7995
|
+
var _a, _b, _c, _d;
|
|
7985
7996
|
const textTheme = this.getGraphicTheme(),
|
|
7986
7997
|
{
|
|
7987
7998
|
fontFamily = textTheme.fontFamily,
|
|
@@ -8007,7 +8018,7 @@ class Text extends Graphic {
|
|
|
8007
8018
|
const bbox = this.cache.layoutData.bbox;
|
|
8008
8019
|
return this._AABBBounds.set(bbox.xOffset, bbox.yOffset, bbox.xOffset + bbox.width, bbox.yOffset + bbox.height), stroke && this._AABBBounds.expand(lineWidth / 2), this._AABBBounds;
|
|
8009
8020
|
}
|
|
8010
|
-
const textMeasure = application.graphicUtil.
|
|
8021
|
+
const textMeasure = application.graphicUtil.getTextMeasureInstance(this.textMeasureId || (null === (_b = this.stage) || void 0 === _b ? void 0 : _b.textMeasureId)),
|
|
8011
8022
|
textOptions = {
|
|
8012
8023
|
fontSize: fontSize,
|
|
8013
8024
|
fontWeight: fontWeight,
|
|
@@ -8039,7 +8050,7 @@ class Text extends Graphic {
|
|
|
8039
8050
|
if ("" !== str && "" === clip.str || clip.wordBreaked) {
|
|
8040
8051
|
if (ellipsis) {
|
|
8041
8052
|
const clipEllipsis = textMeasure.clipTextWithSuffix(str, textOptions, maxLineWidth, ellipsis, !1, suffixPosition);
|
|
8042
|
-
clip.str = null !== (
|
|
8053
|
+
clip.str = null !== (_c = clipEllipsis.str) && void 0 !== _c ? _c : "", clip.width = null !== (_d = clipEllipsis.width) && void 0 !== _d ? _d : 0;
|
|
8043
8054
|
} else clip.str = "", clip.width = 0;
|
|
8044
8055
|
needCut = !1;
|
|
8045
8056
|
}
|
|
@@ -8102,9 +8113,9 @@ class Text extends Graphic {
|
|
|
8102
8113
|
return this.cache.layoutData = layoutData, this.clearUpdateShapeTag(), this._AABBBounds.set(bbox.xOffset, bbox.yOffset, bbox.xOffset + bbox.width, bbox.yOffset + bbox.height), stroke && this._AABBBounds.expand(lineWidth / 2), this._AABBBounds;
|
|
8103
8114
|
}
|
|
8104
8115
|
updateVerticalMultilineAABBBounds(text) {
|
|
8105
|
-
var _a, _b;
|
|
8116
|
+
var _a, _b, _c;
|
|
8106
8117
|
const textTheme = this.getGraphicTheme(),
|
|
8107
|
-
textMeasure = application.graphicUtil.
|
|
8118
|
+
textMeasure = application.graphicUtil.getTextMeasureInstance(this.textMeasureId || (null === (_a = this.stage) || void 0 === _a ? void 0 : _a.textMeasureId));
|
|
8108
8119
|
let width;
|
|
8109
8120
|
const attribute = this.attribute,
|
|
8110
8121
|
{
|
|
@@ -8125,7 +8136,7 @@ class Text extends Graphic {
|
|
|
8125
8136
|
} = attribute;
|
|
8126
8137
|
if (!verticalMode) {
|
|
8127
8138
|
const t = textAlign;
|
|
8128
|
-
textAlign = null !== (
|
|
8139
|
+
textAlign = null !== (_b = Text.baselineMapAlign[textBaseline]) && void 0 !== _b ? _b : "left", textBaseline = null !== (_c = Text.alignMapBaseline[t]) && void 0 !== _c ? _c : "top";
|
|
8129
8140
|
}
|
|
8130
8141
|
if (width = 0, !this.shouldUpdateShape() && this.cache) {
|
|
8131
8142
|
this.cache.verticalList.forEach(item => {
|
|
@@ -8239,7 +8250,7 @@ class WrapText extends Text {
|
|
|
8239
8250
|
return isArray(text) ? !text.every(t => null == t || "" === t) : null != text && "" !== text;
|
|
8240
8251
|
}
|
|
8241
8252
|
updateMultilineAABBBounds(text) {
|
|
8242
|
-
var _a, _b, _c, _d;
|
|
8253
|
+
var _a, _b, _c, _d, _e;
|
|
8243
8254
|
const textTheme = this.getGraphicTheme(),
|
|
8244
8255
|
{
|
|
8245
8256
|
fontFamily = textTheme.fontFamily,
|
|
@@ -8263,7 +8274,7 @@ class WrapText extends Text {
|
|
|
8263
8274
|
const bbox = this.cache.layoutData.bbox;
|
|
8264
8275
|
return this._AABBBounds.set(bbox.xOffset, bbox.yOffset, bbox.xOffset + bbox.width, bbox.yOffset + bbox.height), stroke && this._AABBBounds.expand(lineWidth / 2), this._AABBBounds;
|
|
8265
8276
|
}
|
|
8266
|
-
const textMeasure = application.graphicUtil.
|
|
8277
|
+
const textMeasure = application.graphicUtil.getTextMeasureInstance(this.textMeasureId || (null === (_c = this.stage) || void 0 === _c ? void 0 : _c.textMeasureId)),
|
|
8267
8278
|
layoutObj = new CanvasTextLayout(fontFamily, {
|
|
8268
8279
|
fontSize: fontSize,
|
|
8269
8280
|
fontWeight: fontWeight,
|
|
@@ -8292,7 +8303,7 @@ class WrapText extends Text {
|
|
|
8292
8303
|
if ("" !== str && "" === clip.str) {
|
|
8293
8304
|
if (ellipsis) {
|
|
8294
8305
|
const clipEllipsis = layoutObj.textMeasure.clipTextWithSuffix(str, layoutObj.textOptions, maxLineWidth, ellipsis, !1, suffixPosition);
|
|
8295
|
-
clip.str = null !== (
|
|
8306
|
+
clip.str = null !== (_d = clipEllipsis.str) && void 0 !== _d ? _d : "", clip.width = null !== (_e = clipEllipsis.width) && void 0 !== _e ? _e : 0;
|
|
8296
8307
|
} else clip.str = "", clip.width = 0;
|
|
8297
8308
|
needCut = !1;
|
|
8298
8309
|
}
|
|
@@ -33184,6 +33195,6 @@ StoryLabelItem.defaultAttributes = {
|
|
|
33184
33195
|
theme: 'default'
|
|
33185
33196
|
};
|
|
33186
33197
|
|
|
33187
|
-
const version = "1.0.
|
|
33198
|
+
const version = "1.0.14-alpha.0";
|
|
33188
33199
|
|
|
33189
33200
|
export { AXIS_ELEMENT_NAME, AbstractComponent, ArcInfo, ArcLabel, ArcSegment, AxisStateValue, BasePlayer, Brush, CheckBox, CircleAxis, CircleAxisGrid, CircleCrosshair, ColorContinuousLegend, ContinuousPlayer, DEFAULT_ITEM_SPACE_COL, DEFAULT_ITEM_SPACE_ROW, DEFAULT_LABEL_SPACE, DEFAULT_PAGER_SPACE, DEFAULT_SHAPE_SIZE, DEFAULT_SHAPE_SPACE, DEFAULT_STATES$1 as DEFAULT_STATES, DEFAULT_TITLE_SPACE, DEFAULT_VALUE_SPACE, DataLabel, DataZoom, DataZoomActiveTag, DirectionEnum, DiscreteLegend, DiscretePlayer, EmptyTip, GroupTransition, IMarkAreaLabelPosition, IMarkCommonArcLabelPosition, IMarkLineLabelPosition, IMarkPointItemPosition, IOperateType, Indicator, LEGEND_ELEMENT_NAME, LabelBase, LegendEvent, LegendStateValue, LineAxis, LineAxisGrid, LineCrosshair, LineLabel, LinkPath, MarkArcArea, MarkArcLine, MarkArea, MarkLine, MarkPoint, Pager, PlayerEventEnum, PolygonCrosshair, PolygonSectorCrosshair, PopTip, Radio, RectCrosshair, RectLabel, SLIDER_ELEMENT_NAME, ScrollBar, SectorCrosshair, Segment, SizeContinuousLegend, Slider, StoryLabelItem, Switch, SymbolLabel, Tag, Timeline, Title, Tooltip, TopZIndex, VTag, WeatherBox, alignTextInLine, angle, angleLabelOrientAttribute, angleTo, cartesianTicks, clampRadian, computeOffsetForlimit, continuousTicks, contrastAccessibilityChecker, convertDomainToTickData, createTextGraphicByType, deltaXYToAngle, fuzzyEqualNumber, getAxisBreakSymbolAttrs, getCircleLabelPosition, getCirclePoints, getCircleVerticalVector, getElMap, getHorizontalPath, getMarksByName, getNoneGroupMarksByName, getPolarAngleLabelPosition, getPolygonPath, getSizeHandlerPath, getTextAlignAttrOfVerticalDir, getTextType, getVerticalCoord, getVerticalPath, hasOverlap, htmlAttributeTransform, initTextMeasure, isInRange, isPostiveXAxis, isRichText, isVisible, labelSmartInvert, length, limitShapeInBounds, linearDiscreteTicks, loadPoptip, loadScrollbar, measureTextSize, normalize, polarAngleAxisDiscreteTicks, polarTicks, reactAttributeTransform, registerArcDataLabel, registerLineDataLabel, registerMarkArcAreaAnimate, registerMarkArcLineAnimate, registerMarkAreaAnimate, registerMarkLineAnimate, registerMarkPointAnimate, registerRectDataLabel, registerSymbolDataLabel, removeRepeatPoint, richTextAttributeTransform, scale, scrollbarModule, setPoptipTheme, smartInvertStrategy, tan2AngleToAngle, textIntersect, ticks, traverseGroup, version };
|
package/es/index.d.ts
CHANGED
package/es/index.js
CHANGED
package/es/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/index.ts"],"names":[],"mappings":"AACA,MAAM,CAAC,MAAM,OAAO,GAAG,
|
|
1
|
+
{"version":3,"sources":["../src/index.ts"],"names":[],"mappings":"AACA,MAAM,CAAC,MAAM,OAAO,GAAG,gBAAgB,CAAC;AAExC,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,OAAO,CAAC;AACtB,cAAc,UAAU,CAAC;AACzB,cAAc,aAAa,CAAC;AAC5B,cAAc,SAAS,CAAC;AACxB,cAAc,QAAQ,CAAC;AACvB,cAAc,aAAa,CAAC;AAC5B,cAAc,WAAW,CAAC;AAC1B,cAAc,aAAa,CAAC;AAC5B,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,aAAa,CAAC;AAC5B,cAAc,UAAU,CAAC;AACzB,cAAc,aAAa,CAAC;AAC5B,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC;AAC5B,cAAc,OAAO,CAAC;AACtB,cAAc,YAAY,CAAC;AAC3B,cAAc,SAAS,CAAC;AACxB,cAAc,aAAa,CAAC;AAC5B,cAAc,WAAW,CAAC;AAC1B,cAAc,QAAQ,CAAC;AACvB,cAAc,UAAU,CAAC;AACzB,cAAc,cAAc,CAAC","file":"index.js","sourcesContent":["// 导出版本号\nexport const version = \"1.0.14-alpha.0\";\n\nexport * from './core/base';\nexport * from './core/type';\nexport * from './scrollbar';\nexport * from './tag';\nexport * from './poptip';\nexport * from './crosshair';\nexport * from './label';\nexport * from './axis';\nexport * from './axis/grid';\nexport * from './segment';\nexport * from './data-zoom';\nexport * from './marker';\nexport * from './pager';\nexport * from './legend';\nexport * from './title';\nexport * from './indicator';\nexport * from './slider';\nexport * from './link-path';\nexport * from './player';\nexport * from './brush';\nexport * from './tooltip';\nexport * from './timeline';\nexport * from './interface';\nexport * from './jsx';\nexport * from './checkbox';\nexport * from './radio';\nexport * from './empty-tip';\nexport * from './weather';\nexport * from './util';\nexport * from './switch';\nexport * from './label-item';\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@visactor/vrender-components",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.14-alpha.0",
|
|
4
4
|
"description": "components library for dp visualization",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"main": "cjs/index.js",
|
|
@@ -14,9 +14,9 @@
|
|
|
14
14
|
"dependencies": {
|
|
15
15
|
"@visactor/vutils": "1.0.6",
|
|
16
16
|
"@visactor/vscale": "1.0.6",
|
|
17
|
-
"@visactor/vrender-core": "1.0.
|
|
18
|
-
"@visactor/vrender-kits": "1.0.
|
|
19
|
-
"@visactor/vrender-animate": "1.0.
|
|
17
|
+
"@visactor/vrender-core": "1.0.14-alpha.0",
|
|
18
|
+
"@visactor/vrender-kits": "1.0.14-alpha.0",
|
|
19
|
+
"@visactor/vrender-animate": "1.0.14-alpha.0"
|
|
20
20
|
},
|
|
21
21
|
"devDependencies": {
|
|
22
22
|
"@rushstack/eslint-patch": "~1.1.4",
|
|
@@ -31,8 +31,8 @@
|
|
|
31
31
|
"typescript": "4.9.5",
|
|
32
32
|
"cross-env": "^7.0.3",
|
|
33
33
|
"@internal/bundler": "0.0.1",
|
|
34
|
-
"@internal/
|
|
35
|
-
"@internal/
|
|
34
|
+
"@internal/ts-config": "0.0.1",
|
|
35
|
+
"@internal/eslint-config": "0.0.1"
|
|
36
36
|
},
|
|
37
37
|
"keywords": [
|
|
38
38
|
"VisActor",
|