@visactor/vrender-components 0.22.0-vstory.6 → 0.22.0-vstory.8

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 CHANGED
@@ -1,4 +1,4 @@
1
- export declare const version = "0.22.0-vstory.6";
1
+ export declare const version = "0.22.0-vstory.8";
2
2
  export * from './core/base';
3
3
  export * from './core/type';
4
4
  export * from './scrollbar';
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 = "0.22.0-vstory.6", __exportStar(require("./core/base"), exports),
20
+ }), exports.version = void 0, exports.version = "0.22.0-vstory.8", __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,iBAAiB,CAAC;AAEzC,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 = \"0.22.0-vstory.6\";\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"]}
1
+ {"version":3,"sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AACa,QAAA,OAAO,GAAG,iBAAiB,CAAC;AAEzC,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 = \"0.22.0-vstory.8\";\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
@@ -6158,7 +6158,7 @@ class Group extends Graphic {
6158
6158
  application.graphicService.beforeUpdateAABBBounds(this, this.stage, !0, this._AABBBounds);
6159
6159
  const selfChange = this.shouldSelfChangeUpdateAABBBounds(),
6160
6160
  bounds = this.doUpdateAABBBounds();
6161
- return this.addUpdateLayoutTag(), application.graphicService.afterUpdateAABBBounds(this, this.stage, this._AABBBounds, this, selfChange), bounds;
6161
+ return this.addUpdateLayoutTag(), application.graphicService.afterUpdateAABBBounds(this, this.stage, this._AABBBounds, this, selfChange), "empty" === this.attribute.boundsMode && bounds.clear(), bounds;
6162
6162
  }
6163
6163
  doUpdateLocalMatrix() {
6164
6164
  const {
@@ -8746,15 +8746,11 @@ class Frame {
8746
8746
  }
8747
8747
 
8748
8748
  function getFixedLRTB(left, right, top, bottom) {
8749
- const leftInt = Math.round(left),
8750
- topInt = Math.round(top),
8751
- rightInt = Math.round(right),
8752
- bottomInt = Math.round(bottom);
8753
8749
  return {
8754
- left: left > leftInt ? leftInt : leftInt - .5,
8755
- top: top > topInt ? topInt : topInt - .5,
8756
- right: rightInt > right ? rightInt : rightInt + .5,
8757
- bottom: bottomInt > bottom ? bottomInt : bottomInt + .5
8750
+ left: Math.round(left),
8751
+ top: Math.round(top),
8752
+ right: Math.round(right),
8753
+ bottom: Math.round(bottom)
8758
8754
  };
8759
8755
  }
8760
8756
  class Paragraph {
@@ -8798,19 +8794,11 @@ class Paragraph {
8798
8794
  }
8799
8795
  }
8800
8796
  }
8801
- switch (this.character.script) {
8802
- case "super":
8803
- baseline -= this.ascent * (1 / 3);
8804
- break;
8805
- case "sub":
8806
- baseline += this.descent / 2;
8807
- }
8808
- "vertical" === direction && (ctx.save(), ctx.rotateAbout(Math.PI / 2, left, baseline), ctx.translate(-this.heightOrigin || -this.lineHeight / 2, -this.descent / 2), ctx.translate(left, baseline), left = 0, baseline = 0);
8809
- const fillStyle = ctx.fillStyle,
8810
- globalAlpha = ctx.globalAlpha;
8811
- ctx.fillStyle = this.character.background, void 0 !== this.character.backgroundOpacity && (ctx.globalAlpha = this.character.backgroundOpacity);
8812
8797
  const lrtb = getFixedLRTB(left, left + (this.widthOrigin || this.width), top, top + lineHeight);
8813
- ctx.fillRect(lrtb.left, lrtb.top, lrtb.right - lrtb.left, lrtb.bottom - lrtb.top), ctx.fillStyle = fillStyle, ctx.globalAlpha = globalAlpha;
8798
+ return Object.assign(Object.assign({}, lrtb), {
8799
+ fillStyle: this.character.background,
8800
+ globalAlpha: this.character.backgroundOpacity
8801
+ });
8814
8802
  }
8815
8803
  draw(ctx, top, ascent, deltaLeft, isLineFirst, textAlign, lineHeight) {
8816
8804
  let baseline = top + ascent,
@@ -9084,8 +9072,19 @@ class Line {
9084
9072
  paragraph.ellipsis = "hide", otherParagraphWidth += paragraph.width;
9085
9073
  }
9086
9074
  }
9075
+ let fillStyle = "",
9076
+ globalAlpha = -1,
9077
+ currBgList = [];
9078
+ const bgList = [currBgList];
9087
9079
  this.paragraphs.forEach((paragraph, index) => {
9088
- paragraph instanceof RichTextIcon || paragraph.drawBackground(ctx, y, this.ascent, x, 0 === index, this.textAlign, this.height);
9080
+ if (paragraph instanceof RichTextIcon) return;
9081
+ const data = paragraph.drawBackground(ctx, y, this.ascent, x, 0 === index, this.textAlign, this.height);
9082
+ data && (fillStyle === data.fillStyle && globalAlpha === data.globalAlpha || (currBgList = [], bgList.push(currBgList), fillStyle = data.fillStyle, globalAlpha = data.globalAlpha), currBgList.push(data));
9083
+ }), bgList.forEach(bg => {
9084
+ if (0 === bg.length) return;
9085
+ const data = bg[0],
9086
+ end = bg[bg.length - 1];
9087
+ ctx.fillStyle = data.fillStyle, ctx.globalAlpha = data.globalAlpha, ctx.fillRect(data.left, data.top, end.right - data.left, end.bottom - data.top);
9089
9088
  }), this.paragraphs.forEach((paragraph, index) => {
9090
9089
  if (paragraph instanceof RichTextIcon) return paragraph.setAttributes({
9091
9090
  x: x + paragraph._x,
@@ -9248,7 +9247,13 @@ class RichText extends Graphic {
9248
9247
  }
9249
9248
  return cache.every(item => item.isComposing || !(item.text && isString(item.text) && RichText.splitText(item.text).length > 1));
9250
9249
  }
9250
+ static splitEmoji(text) {
9251
+ return [...new Intl.Segmenter().segment(text)].map(x => x.segment);
9252
+ }
9251
9253
  static splitText(text) {
9254
+ try {
9255
+ return this.splitEmoji(text);
9256
+ } catch (e) {}
9252
9257
  return Array.from(text);
9253
9258
  }
9254
9259
  static TransformTextConfig2SingleCharacter(textConfig) {
@@ -13120,7 +13125,7 @@ let DefaultDrawContribution = class {
13120
13125
  renderGroup(group, drawContext, parentMatrix, skipSort) {
13121
13126
  if (drawContext.break || !1 === group.attribute.visibleAll) return;
13122
13127
  if (group.incremental && (null == drawContext.startAtId || drawContext.startAtId === group._uid)) return drawContext.break = !0, void this._increaseRender(group, drawContext);
13123
- if (this.useDirtyBounds && !isRectIntersect(group.AABBBounds, this.dirtyBounds, !1)) return;
13128
+ if (this.useDirtyBounds && !isRectIntersect(group.AABBBounds, this.dirtyBounds, !1) && "empty" !== group.attribute.boundsMode) return;
13124
13129
  let tempBounds,
13125
13130
  nextM = parentMatrix;
13126
13131
  if (this.useDirtyBounds) {
@@ -31296,6 +31301,6 @@ StoryLabelItem.defaultAttributes = {
31296
31301
  theme: 'default'
31297
31302
  };
31298
31303
 
31299
- const version = "0.22.0-vstory.6";
31304
+ const version = "0.22.0-vstory.8";
31300
31305
 
31301
31306
  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
@@ -1,4 +1,4 @@
1
- export declare const version = "0.22.0-vstory.6";
1
+ export declare const version = "0.22.0-vstory.8";
2
2
  export * from './core/base';
3
3
  export * from './core/type';
4
4
  export * from './scrollbar';
package/es/index.js CHANGED
@@ -1,4 +1,4 @@
1
- export const version = "0.22.0-vstory.6";
1
+ export const version = "0.22.0-vstory.8";
2
2
 
3
3
  export * from "./core/base";
4
4
 
package/es/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/index.ts"],"names":[],"mappings":"AACA,MAAM,CAAC,MAAM,OAAO,GAAG,iBAAiB,CAAC;AAEzC,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 = \"0.22.0-vstory.6\";\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"]}
1
+ {"version":3,"sources":["../src/index.ts"],"names":[],"mappings":"AACA,MAAM,CAAC,MAAM,OAAO,GAAG,iBAAiB,CAAC;AAEzC,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 = \"0.22.0-vstory.8\";\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": "0.22.0-vstory.6",
3
+ "version": "0.22.0-vstory.8",
4
4
  "description": "components library for dp visualization",
5
5
  "sideEffects": false,
6
6
  "main": "cjs/index.js",
@@ -14,8 +14,8 @@
14
14
  "dependencies": {
15
15
  "@visactor/vutils": "~0.19.3",
16
16
  "@visactor/vscale": "~0.19.3",
17
- "@visactor/vrender-core": "0.22.0-vstory.6",
18
- "@visactor/vrender-kits": "0.22.0-vstory.6"
17
+ "@visactor/vrender-core": "0.22.0-vstory.8",
18
+ "@visactor/vrender-kits": "0.22.0-vstory.8"
19
19
  },
20
20
  "devDependencies": {
21
21
  "@rushstack/eslint-patch": "~1.1.4",