@visactor/vrender-core 0.19.13 → 0.19.14

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.
Files changed (50) hide show
  1. package/cjs/animate/config.js +2 -1
  2. package/cjs/canvas/constants.js +1 -2
  3. package/cjs/graphic/config.js +1 -0
  4. package/cjs/graphic/config.js.map +1 -1
  5. package/cjs/graphic/graphic-service/graphic-service.js +2 -2
  6. package/cjs/graphic/graphic-service/graphic-service.js.map +1 -1
  7. package/cjs/graphic/richtext.d.ts +1 -1
  8. package/cjs/graphic/richtext.js +2 -2
  9. package/cjs/graphic/richtext.js.map +1 -1
  10. package/cjs/index.d.ts +1 -0
  11. package/cjs/index.js +1 -0
  12. package/cjs/index.js.map +1 -1
  13. package/cjs/interface/graphic/group.d.ts +1 -1
  14. package/cjs/interface/graphic/group.js.map +1 -1
  15. package/cjs/interface/graphic/richText.d.ts +1 -0
  16. package/cjs/interface/graphic/richText.js.map +1 -1
  17. package/cjs/plugins/builtin-plugin/edit-module.d.ts +22 -0
  18. package/cjs/plugins/builtin-plugin/edit-module.js +94 -0
  19. package/cjs/plugins/builtin-plugin/edit-module.js.map +1 -0
  20. package/cjs/plugins/builtin-plugin/richtext-edit-plugin.d.ts +76 -0
  21. package/cjs/plugins/builtin-plugin/richtext-edit-plugin.js +338 -0
  22. package/cjs/plugins/builtin-plugin/richtext-edit-plugin.js.map +1 -0
  23. package/cjs/render/contributions/render/draw-interceptor.js +2 -2
  24. package/cjs/render/contributions/render/draw-interceptor.js.map +1 -1
  25. package/dist/index.es.js +612 -9
  26. package/es/animate/config.js +2 -1
  27. package/es/canvas/constants.js +1 -2
  28. package/es/graphic/config.js +1 -0
  29. package/es/graphic/config.js.map +1 -1
  30. package/es/graphic/graphic-service/graphic-service.js +2 -2
  31. package/es/graphic/graphic-service/graphic-service.js.map +1 -1
  32. package/es/graphic/richtext.d.ts +1 -1
  33. package/es/graphic/richtext.js +2 -2
  34. package/es/graphic/richtext.js.map +1 -1
  35. package/es/index.d.ts +1 -0
  36. package/es/index.js +2 -0
  37. package/es/index.js.map +1 -1
  38. package/es/interface/graphic/group.d.ts +1 -1
  39. package/es/interface/graphic/group.js.map +1 -1
  40. package/es/interface/graphic/richText.d.ts +1 -0
  41. package/es/interface/graphic/richText.js.map +1 -1
  42. package/es/plugins/builtin-plugin/edit-module.d.ts +22 -0
  43. package/es/plugins/builtin-plugin/edit-module.js +86 -0
  44. package/es/plugins/builtin-plugin/edit-module.js.map +1 -0
  45. package/es/plugins/builtin-plugin/richtext-edit-plugin.d.ts +76 -0
  46. package/es/plugins/builtin-plugin/richtext-edit-plugin.js +334 -0
  47. package/es/plugins/builtin-plugin/richtext-edit-plugin.js.map +1 -0
  48. package/es/render/contributions/render/draw-interceptor.js +2 -2
  49. package/es/render/contributions/render/draw-interceptor.js.map +1 -1
  50. package/package.json +2 -2
package/dist/index.es.js CHANGED
@@ -1,4 +1,4 @@
1
- import { tau, halfPi as halfPi$1, AABBBounds, degreeToRadian, PointService, Point, abs, max, min, atan2, Matrix, pi2, Logger, pi, TextMeasure, EventEmitter, isBoolean, isObject, isFunction, isString, has, isUndefined, isArray, cos, sin, pointAt, isNumber, getDecimalPlaces, getAngleByPoint, isNumberClose, isNil, Bounds, getIntersectPoint, Color, DEFAULT_COLORS, normalTransform, isValidUrl, isBase64, epsilon, acos, sqrt, LRU, lowerCamelCaseToMiddle, clampAngleByRadian, asin, transformBoundsWithMatrix, arrayEqual, getRectIntersect, isRectIntersect, calculateAnchorOfBounds, styleStringToObject } from '@visactor/vutils';
1
+ import { tau, halfPi as halfPi$1, AABBBounds, degreeToRadian, PointService, Point, abs, max, min, atan2, Matrix, pi2, Logger, pi, TextMeasure, EventEmitter, isBoolean, isObject, isFunction, isString, has, isUndefined, isArray, cos, sin, pointAt, isNumber, getDecimalPlaces, getAngleByPoint, isNumberClose, isNil, Bounds, getIntersectPoint, Color, DEFAULT_COLORS, normalTransform, isValidUrl, isBase64, epsilon, acos, sqrt, LRU, lowerCamelCaseToMiddle, clampAngleByRadian, asin, transformBoundsWithMatrix, arrayEqual, getRectIntersect, isRectIntersect, calculateAnchorOfBounds, styleStringToObject, merge } from '@visactor/vutils';
2
2
 
3
3
  class Generator {
4
4
  static GenAutoIncrementId() {
@@ -3173,7 +3173,7 @@ const DefaultRectAttribute = Object.assign(Object.assign({}, DefaultAttribute),
3173
3173
  const DefaultRect3dAttribute = Object.assign(Object.assign({}, DefaultAttribute), { width: 0, height: 0, x1: 0, y1: 0, cornerRadius: 0, length: 0 });
3174
3174
  const DefaultSymbolAttribute = Object.assign(Object.assign({}, DefaultAttribute), { symbolType: 'circle', size: 10, keepDirIn3d: true });
3175
3175
  const DefaultTextAttribute = Object.assign(Object.assign(Object.assign({}, DefaultAttribute), DefaultTextStyle), { strokeBoundsBuffer: 0, keepDirIn3d: true });
3176
- const DefaultRichTextAttribute = Object.assign(Object.assign(Object.assign({}, DefaultAttribute), DefaultTextStyle), { width: 300, height: 300, ellipsis: true, wordBreak: 'break-word', verticalDirection: 'top', textAlign: 'left', textBaseline: 'top', layoutDirection: 'horizontal', textConfig: [], disableAutoWrapLine: false, maxHeight: undefined, maxWidth: undefined, singleLine: false });
3176
+ const DefaultRichTextAttribute = Object.assign(Object.assign(Object.assign({}, DefaultAttribute), DefaultTextStyle), { editable: false, width: 300, height: 300, ellipsis: true, wordBreak: 'break-word', verticalDirection: 'top', textAlign: 'left', textBaseline: 'top', layoutDirection: 'horizontal', textConfig: [], disableAutoWrapLine: false, maxHeight: undefined, maxWidth: undefined, singleLine: false });
3177
3177
  const DefaultImageAttribute = Object.assign(Object.assign({ repeatX: 'no-repeat', repeatY: 'no-repeat', image: '', width: 0, height: 0 }, DefaultAttribute), { fill: true, cornerRadius: 0 });
3178
3178
  const DefaultRichTextIconAttribute = Object.assign(Object.assign({}, DefaultImageAttribute), { backgroundShowMode: 'never', backgroundWidth: 0, backgroundHeight: 0, textAlign: 'left', textBaseline: 'middle', direction: 'horizontal', margin: 0, id: '', width: 20, height: 20, backgroundFill: 'rgba(101, 117, 168, 0.1)', backgroundFillOpacity: 1, backgroundStroke: false, backgroundStrokeOpacity: 1, backgroundRadius: 4, opacity: 1 });
3179
3179
 
@@ -16883,10 +16883,11 @@ class RichText extends Graphic {
16883
16883
  fillOpacity,
16884
16884
  strokeOpacity }, config);
16885
16885
  }
16886
- doUpdateFrameCache() {
16886
+ doUpdateFrameCache(tc) {
16887
16887
  var _a;
16888
- const { textConfig = [], maxWidth, maxHeight, width, height, ellipsis, wordBreak, verticalDirection, textAlign, textBaseline, layoutDirection, singleLine, disableAutoWrapLine } = this.attribute;
16888
+ const { textConfig: _tc = [], maxWidth, maxHeight, width, height, ellipsis, wordBreak, verticalDirection, textAlign, textBaseline, layoutDirection, singleLine, disableAutoWrapLine } = this.attribute;
16889
16889
  const paragraphs = [];
16890
+ const textConfig = tc !== null && tc !== void 0 ? tc : _tc;
16890
16891
  for (let i = 0; i < textConfig.length; i++) {
16891
16892
  if ('image' in textConfig[i]) {
16892
16893
  const config = this.combinedStyleToCharacter(textConfig[i]);
@@ -18339,7 +18340,9 @@ let DefaultGraphicService = class DefaultGraphicService {
18339
18340
  const { x1, y1, x, y } = attribute;
18340
18341
  width = width !== null && width !== void 0 ? width : x1 - x;
18341
18342
  height = height !== null && height !== void 0 ? height : y1 - y;
18342
- aabbBounds.set(0, 0, width || 0, height || 0);
18343
+ if (isFinite(width) || isFinite(height) || isFinite(x) || isFinite(y)) {
18344
+ aabbBounds.set(0, 0, width || 0, height || 0);
18345
+ }
18343
18346
  }
18344
18347
  const tb1 = this.tempAABBBounds1;
18345
18348
  const tb2 = this.tempAABBBounds2;
@@ -18357,7 +18360,7 @@ let DefaultGraphicService = class DefaultGraphicService {
18357
18360
  updateGroupAABBBounds(attribute, groupTheme, aabbBounds, graphic) {
18358
18361
  const originalAABBBounds = aabbBounds;
18359
18362
  aabbBounds = aabbBounds.clone();
18360
- const { width, height, path, clip = groupTheme.clip } = attribute;
18363
+ const { width, height, path, clip = groupTheme.clip, display } = attribute;
18361
18364
  if (path && path.length) {
18362
18365
  path.forEach(g => {
18363
18366
  aabbBounds.union(g.AABBBounds);
@@ -22819,13 +22822,25 @@ class ShadowRootDrawItemInterceptorContribution {
22819
22822
  this.order = 1;
22820
22823
  }
22821
22824
  afterDrawItem(graphic, renderService, drawContext, drawContribution, params) {
22822
- if (graphic.attribute.shadowRootIdx > 0 || !graphic.attribute.shadowRootIdx) {
22825
+ if (graphic.attribute.shadowRootIdx == null &&
22826
+ graphic.shadowRoot &&
22827
+ graphic.shadowRoot.attribute.shadowRootIdx < 0) {
22828
+ return false;
22829
+ }
22830
+ if (graphic.attribute.shadowRootIdx > 0 ||
22831
+ !graphic.attribute.shadowRootIdx ||
22832
+ (graphic.shadowRoot && graphic.shadowRoot.attribute.shadowRootIdx > 0)) {
22823
22833
  this.drawItem(graphic, renderService, drawContext, drawContribution, params);
22824
22834
  }
22825
22835
  return false;
22826
22836
  }
22827
22837
  beforeDrawItem(graphic, renderService, drawContext, drawContribution, params) {
22828
- if (graphic.attribute.shadowRootIdx < 0) {
22838
+ if (graphic.attribute.shadowRootIdx == null &&
22839
+ graphic.shadowRoot &&
22840
+ graphic.shadowRoot.attribute.shadowRootIdx > 0) {
22841
+ return false;
22842
+ }
22843
+ if (graphic.attribute.shadowRootIdx < 0 || (graphic.shadowRoot && graphic.shadowRoot.attribute.shadowRootIdx < 0)) {
22829
22844
  this.drawItem(graphic, renderService, drawContext, drawContribution, params);
22830
22845
  }
22831
22846
  return false;
@@ -27601,6 +27616,594 @@ function flatten_simplify(points, tolerance, highestQuality) {
27601
27616
  return points;
27602
27617
  }
27603
27618
 
27619
+ function findCursorIndexIgnoreLinebreak(textConfig, cursorIndex) {
27620
+ let index = 0;
27621
+ for (index = 0; index < textConfig.length; index++) {
27622
+ const c = textConfig[index];
27623
+ if (!(c.text && c.text === '\n')) {
27624
+ cursorIndex--;
27625
+ }
27626
+ if (cursorIndex < 0) {
27627
+ break;
27628
+ }
27629
+ }
27630
+ return index;
27631
+ }
27632
+ class EditModule {
27633
+ constructor(container) {
27634
+ this.handleKeyDown = (e) => {
27635
+ if (e.key === 'Delete' || e.key === 'Backspace') {
27636
+ this.handleInput({ data: null, type: 'Backspace' });
27637
+ }
27638
+ };
27639
+ this.handleCompositionStart = () => {
27640
+ const { textConfig = [] } = this.currRt.attribute;
27641
+ const cursorIndex = findCursorIndexIgnoreLinebreak(textConfig, this.cursorIndex);
27642
+ const lastConfig = textConfig[cursorIndex];
27643
+ textConfig.splice(cursorIndex + 1, 0, Object.assign(Object.assign({}, lastConfig), { text: '' }));
27644
+ this.isComposing = true;
27645
+ };
27646
+ this.handleCompositionEnd = () => {
27647
+ this.isComposing = false;
27648
+ const { textConfig = [] } = this.currRt.attribute;
27649
+ const curIdx = findCursorIndexIgnoreLinebreak(textConfig, this.cursorIndex + 1);
27650
+ const lastConfig = textConfig[curIdx];
27651
+ textConfig.splice(curIdx, 1);
27652
+ const text = lastConfig.text;
27653
+ const textList = Array.from(text.toString());
27654
+ for (let i = 0; i < textList.length; i++) {
27655
+ textConfig.splice(i + curIdx, 0, Object.assign(Object.assign({}, lastConfig), { text: textList[i] }));
27656
+ }
27657
+ this.currRt.setAttributes({ textConfig });
27658
+ this.onChangeCbList.forEach(cb => {
27659
+ cb(text, this.isComposing, this.cursorIndex + textList.length, this.currRt, 'right');
27660
+ });
27661
+ };
27662
+ this.handleInput = (ev) => {
27663
+ if (!this.currRt) {
27664
+ return;
27665
+ }
27666
+ let str = ev.data;
27667
+ if (ev.type !== 'Backspace' && !str) {
27668
+ str = '\n';
27669
+ }
27670
+ const { textConfig = [] } = this.currRt.attribute;
27671
+ let startIdx = this.selectionStartCursorIdx;
27672
+ let endIdx = this.cursorIndex;
27673
+ if (startIdx > endIdx) {
27674
+ [startIdx, endIdx] = [endIdx, startIdx];
27675
+ }
27676
+ this.selectionStartCursorIdx = startIdx;
27677
+ this.cursorIndex = startIdx;
27678
+ startIdx = findCursorIndexIgnoreLinebreak(textConfig, startIdx);
27679
+ const delta = this.selectionStartCursorIdx - startIdx;
27680
+ endIdx = findCursorIndexIgnoreLinebreak(textConfig, endIdx);
27681
+ const lastConfig = textConfig[startIdx + (this.isComposing ? 1 : 0)];
27682
+ let currConfig = lastConfig;
27683
+ if (ev.type === 'Backspace' && !this.isComposing) {
27684
+ if (startIdx !== endIdx) {
27685
+ textConfig.splice(startIdx + 1, endIdx - startIdx);
27686
+ }
27687
+ else {
27688
+ textConfig.splice(startIdx, 1);
27689
+ startIdx -= 1;
27690
+ }
27691
+ }
27692
+ else {
27693
+ if (startIdx !== endIdx) {
27694
+ textConfig.splice(startIdx + 1, endIdx - startIdx);
27695
+ }
27696
+ if (!this.isComposing) {
27697
+ currConfig = Object.assign(Object.assign({}, lastConfig), { text: '' });
27698
+ startIdx += 1;
27699
+ textConfig.splice(startIdx, 0, currConfig);
27700
+ }
27701
+ currConfig.text = str;
27702
+ }
27703
+ this.currRt.setAttributes({ textConfig });
27704
+ if (!this.isComposing) {
27705
+ this.onChangeCbList.forEach(cb => {
27706
+ cb(str, this.isComposing, startIdx + delta, this.currRt, str === '\n' ? 'left' : 'right');
27707
+ });
27708
+ }
27709
+ else {
27710
+ this.onInputCbList.forEach(cb => {
27711
+ cb(str, this.isComposing, startIdx + delta, this.currRt, str === '\n' ? 'left' : 'right');
27712
+ });
27713
+ }
27714
+ };
27715
+ this.container = container !== null && container !== void 0 ? container : document.body;
27716
+ const textAreaDom = document.createElement('textarea');
27717
+ textAreaDom.autocomplete = 'off';
27718
+ textAreaDom.innerText = '';
27719
+ this.applyStyle(textAreaDom);
27720
+ this.container.append(textAreaDom);
27721
+ this.textAreaDom = textAreaDom;
27722
+ this.isComposing = false;
27723
+ this.onInputCbList = [];
27724
+ this.onChangeCbList = [];
27725
+ }
27726
+ onInput(cb) {
27727
+ this.onInputCbList.push(cb);
27728
+ }
27729
+ onChange(cb) {
27730
+ this.onChangeCbList.push(cb);
27731
+ }
27732
+ applyStyle(textAreaDom) {
27733
+ textAreaDom.setAttribute('style', `width: 100px; height: 30px; left: 0; position: absolute; z-index: -1; outline: none; resize: none; border: none; overflow: hidden; color: transparent; user-select: none; caret-color: transparent;background-color: transparent;`);
27734
+ textAreaDom.addEventListener('input', this.handleInput);
27735
+ textAreaDom.addEventListener('compositionstart', this.handleCompositionStart);
27736
+ textAreaDom.addEventListener('compositionend', this.handleCompositionEnd);
27737
+ window.addEventListener('keydown', this.handleKeyDown);
27738
+ }
27739
+ moveTo(x, y, rt, cursorIndex, selectionStartCursorIdx) {
27740
+ this.textAreaDom.style.left = `${x}px`;
27741
+ this.textAreaDom.style.top = `${y}px`;
27742
+ setTimeout(() => {
27743
+ this.textAreaDom.focus();
27744
+ this.textAreaDom.setSelectionRange(0, 0);
27745
+ });
27746
+ this.currRt = rt;
27747
+ this.cursorIndex = cursorIndex;
27748
+ this.selectionStartCursorIdx = selectionStartCursorIdx;
27749
+ }
27750
+ release() {
27751
+ this.textAreaDom.removeEventListener('input', this.handleInput);
27752
+ this.textAreaDom.removeEventListener('compositionstart', this.handleCompositionStart);
27753
+ this.textAreaDom.removeEventListener('compositionend', this.handleCompositionEnd);
27754
+ window.removeEventListener('keydown', this.handleKeyDown);
27755
+ }
27756
+ }
27757
+
27758
+ class Selection {
27759
+ constructor(cacheSelectionStartCursorIdx, cacheCurCursorIdx, selectionStartCursorIdx, curCursorIdx, rt) {
27760
+ this.curCursorIdx = curCursorIdx;
27761
+ this.selectionStartCursorIdx = selectionStartCursorIdx;
27762
+ this.cacheCurCursorIdx = cacheCurCursorIdx;
27763
+ this.cacheSelectionStartCursorIdx = cacheSelectionStartCursorIdx;
27764
+ this.rt = rt;
27765
+ }
27766
+ hasFormat(key) {
27767
+ return this.getFormat(key) != null;
27768
+ }
27769
+ getFormat(key) {
27770
+ if (!this.rt) {
27771
+ return null;
27772
+ }
27773
+ const config = this.rt.attribute.textConfig;
27774
+ const val = config[this.selectionStartCursorIdx + 1][key];
27775
+ if (val == null) {
27776
+ return null;
27777
+ }
27778
+ for (let i = this.selectionStartCursorIdx + 2; i <= this.curCursorIdx; i++) {
27779
+ const item = config[i];
27780
+ if (val === item[key]) {
27781
+ continue;
27782
+ }
27783
+ return null;
27784
+ }
27785
+ return val;
27786
+ }
27787
+ getAllFormat(key) {
27788
+ if (!this.rt) {
27789
+ return [];
27790
+ }
27791
+ const config = this.rt.attribute.textConfig;
27792
+ const val = config[this.selectionStartCursorIdx + 1][key];
27793
+ const set = new Set();
27794
+ set.add(val);
27795
+ for (let i = this.selectionStartCursorIdx + 2; i <= this.curCursorIdx; i++) {
27796
+ const item = config[i];
27797
+ set.add(item[key]);
27798
+ }
27799
+ const list = Array.from(set.values());
27800
+ return list;
27801
+ }
27802
+ }
27803
+ const FORMAT_TEXT_COMMAND = 'FORMAT_TEXT_COMMAND';
27804
+ const FORMAT_ELEMENT_COMMAND = 'FORMAT_ELEMENT_COMMAND';
27805
+ class RichTextEditPlugin {
27806
+ constructor() {
27807
+ this.name = 'RichTextEditPlugin';
27808
+ this.activeEvent = 'onRegister';
27809
+ this._uid = Generator.GenAutoIncrementId();
27810
+ this.key = this.name + this._uid;
27811
+ this.editing = false;
27812
+ this.pointerDown = false;
27813
+ this.handleInput = (text, isComposing, cursorIdx, rt, orient) => {
27814
+ const p = this.getPointByColumnIdx(cursorIdx, rt, orient);
27815
+ this.hideSelection();
27816
+ this.setCursor(p.x, p.y1, p.y2);
27817
+ this.updateCbs.forEach(cb => cb('input', this));
27818
+ };
27819
+ this.handleChange = (text, isComposing, cursorIdx, rt, orient) => {
27820
+ const p = this.getPointByColumnIdx(cursorIdx, rt, orient);
27821
+ this.curCursorIdx = cursorIdx;
27822
+ this.selectionStartCursorIdx = cursorIdx;
27823
+ this.setCursorAndTextArea(p.x, p.y1, p.y2, rt);
27824
+ this.hideSelection();
27825
+ this.updateCbs.forEach(cb => cb('change', this));
27826
+ };
27827
+ this.handleMove = (e) => {
27828
+ if (!this.isRichtext(e)) {
27829
+ return;
27830
+ }
27831
+ this.currRt = e.target;
27832
+ this.handleEnter(e);
27833
+ e.target.once('pointerleave', this.handleLeave);
27834
+ this.showSelection(e);
27835
+ };
27836
+ this.handlePointerDown = (e) => {
27837
+ if (this.editing) {
27838
+ this.onFocus(e);
27839
+ }
27840
+ else {
27841
+ this.deFocus(e);
27842
+ }
27843
+ this.applyUpdate();
27844
+ this.pointerDown = true;
27845
+ this.updateCbs.forEach(cb => cb(this.editing ? 'onfocus' : 'defocus', this));
27846
+ };
27847
+ this.handlePointerUp = (e) => {
27848
+ this.pointerDown = false;
27849
+ };
27850
+ this.handleEnter = (e) => {
27851
+ this.editing = true;
27852
+ this.pluginService.stage.setCursor('text');
27853
+ };
27854
+ this.handleLeave = (e) => {
27855
+ this.editing = false;
27856
+ this.pluginService.stage.setCursor('default');
27857
+ };
27858
+ this.commandCbs = new Map();
27859
+ this.commandCbs.set(FORMAT_TEXT_COMMAND, [this.formatTextCommandCb]);
27860
+ this.updateCbs = [];
27861
+ }
27862
+ getSelection() {
27863
+ if (this.selectionStartCursorIdx &&
27864
+ this.curCursorIdx &&
27865
+ this.selectionStartCursorIdx !== this.curCursorIdx &&
27866
+ this.currRt) {
27867
+ return new Selection(this.selectionStartCursorIdx, this.curCursorIdx, findCursorIndexIgnoreLinebreak(this.currRt.attribute.textConfig, this.selectionStartCursorIdx), findCursorIndexIgnoreLinebreak(this.currRt.attribute.textConfig, this.curCursorIdx), this.currRt);
27868
+ }
27869
+ return null;
27870
+ }
27871
+ formatTextCommandCb(payload, p) {
27872
+ const rt = p.currRt;
27873
+ if (!rt) {
27874
+ return;
27875
+ }
27876
+ const selectionData = p.getSelection();
27877
+ if (!selectionData) {
27878
+ return;
27879
+ }
27880
+ const { selectionStartCursorIdx, curCursorIdx } = selectionData;
27881
+ const config = rt.attribute.textConfig.slice(selectionStartCursorIdx + 1, curCursorIdx + 1);
27882
+ if (payload === 'bold') {
27883
+ config.forEach((item) => (item.fontWeight = 'bold'));
27884
+ }
27885
+ else if (payload === 'italic') {
27886
+ config.forEach((item) => (item.fontStyle = 'italic'));
27887
+ }
27888
+ else if (payload === 'underline') {
27889
+ config.forEach((item) => (item.underline = true));
27890
+ }
27891
+ else if (payload === 'lineThrough') {
27892
+ config.forEach((item) => (item.lineThrough = true));
27893
+ }
27894
+ else if (isObject(payload)) {
27895
+ config.forEach((item) => merge(item, payload));
27896
+ }
27897
+ rt.setAttributes(rt.attribute);
27898
+ }
27899
+ dispatchCommand(command, payload) {
27900
+ const cbs = this.commandCbs.get(command);
27901
+ cbs && cbs.forEach(cb => cb(payload, this));
27902
+ this.updateCbs.forEach(cb => cb('dispatch', this));
27903
+ }
27904
+ registerCommand(command, cb) {
27905
+ const cbs = this.commandCbs.get(command) || [];
27906
+ cbs.push(cb);
27907
+ }
27908
+ registerUpdateListener(cb) {
27909
+ const cbs = this.updateCbs || [];
27910
+ cbs.push(cb);
27911
+ }
27912
+ activate(context) {
27913
+ this.pluginService = context;
27914
+ this.editModule = new EditModule();
27915
+ context.stage.on('pointermove', this.handleMove);
27916
+ context.stage.on('pointerdown', this.handlePointerDown);
27917
+ context.stage.on('pointerup', this.handlePointerUp);
27918
+ context.stage.on('pointerleave', this.handlePointerUp);
27919
+ this.editModule.onInput(this.handleInput);
27920
+ this.editModule.onChange(this.handleChange);
27921
+ }
27922
+ showSelection(e) {
27923
+ const cache = e.target.getFrameCache();
27924
+ if (!(cache && this.editBg)) {
27925
+ return;
27926
+ }
27927
+ if (this.pointerDown) {
27928
+ let p0 = this.lastPoint;
27929
+ let p1 = this.getEventPosition(e);
27930
+ let line1Info = this.getLineByPoint(cache, p1);
27931
+ const column1 = this.getColumnByLinePoint(line1Info, p1);
27932
+ const y1 = line1Info.top;
27933
+ const y2 = line1Info.top + line1Info.height;
27934
+ let x = column1.left + column1.width;
27935
+ let cursorIndex = this.getColumnIndex(cache, column1);
27936
+ if (p1.x < column1.left + column1.width / 2) {
27937
+ x = column1.left;
27938
+ cursorIndex -= 1;
27939
+ }
27940
+ p1.x = x;
27941
+ p1.y = (y1 + y2) / 2;
27942
+ let line0Info = this.getLineByPoint(cache, p0);
27943
+ if (p0.y > p1.y || (p0.y === p1.y && p0.x > p1.x)) {
27944
+ [p0, p1] = [p1, p0];
27945
+ [line1Info, line0Info] = [line0Info, line1Info];
27946
+ }
27947
+ this.editBg.removeAllChild();
27948
+ if (line0Info === line1Info) {
27949
+ const column0 = this.getColumnByLinePoint(line0Info, p0);
27950
+ this.editBg.setAttributes({
27951
+ x: p0.x,
27952
+ y: line0Info.top,
27953
+ width: p1.x - p0.x,
27954
+ height: column0.height,
27955
+ fill: '#336df4',
27956
+ fillOpacity: 0.2
27957
+ });
27958
+ }
27959
+ else {
27960
+ this.editBg.setAttributes({ x: 0, y: line0Info.top, width: 0, height: 0 });
27961
+ const startIdx = cache.lines.findIndex(item => item === line0Info);
27962
+ const endIdx = cache.lines.findIndex(item => item === line1Info);
27963
+ let y = 0;
27964
+ for (let i = startIdx; i <= endIdx; i++) {
27965
+ const line = cache.lines[i];
27966
+ if (i === startIdx) {
27967
+ const p = line.paragraphs[line.paragraphs.length - 1];
27968
+ this.editBg.add(createRect({
27969
+ x: p0.x,
27970
+ y,
27971
+ width: p.left + p.width - p0.x,
27972
+ height: line.height,
27973
+ fill: '#336df4',
27974
+ fillOpacity: 0.2
27975
+ }));
27976
+ }
27977
+ else if (i === endIdx) {
27978
+ const p = line.paragraphs[0];
27979
+ this.editBg.add(createRect({
27980
+ x: p.left,
27981
+ y,
27982
+ width: p1.x - p.left,
27983
+ height: line.height,
27984
+ fill: '#336df4',
27985
+ fillOpacity: 0.2
27986
+ }));
27987
+ }
27988
+ else {
27989
+ const p0 = line.paragraphs[0];
27990
+ const p1 = line.paragraphs[line.paragraphs.length - 1];
27991
+ this.editBg.add(createRect({
27992
+ x: p0.left,
27993
+ y,
27994
+ width: p1.left + p1.width - p0.left,
27995
+ height: line.height,
27996
+ fill: '#336df4',
27997
+ fillOpacity: 0.2
27998
+ }));
27999
+ }
28000
+ y += line.height;
28001
+ }
28002
+ }
28003
+ this.curCursorIdx = cursorIndex;
28004
+ this.setCursorAndTextArea(x, y1 + 2, y2 - 2, e.target);
28005
+ this.applyUpdate();
28006
+ this.updateCbs.forEach(cb => cb('selection', this));
28007
+ }
28008
+ }
28009
+ hideSelection() {
28010
+ if (this.editBg) {
28011
+ this.editBg.removeAllChild();
28012
+ this.editBg.setAttributes({ fill: 'transparent' });
28013
+ }
28014
+ }
28015
+ isRichtext(e) {
28016
+ return !!(e.target && e.target.type === 'richtext' && e.target.attribute.editable);
28017
+ }
28018
+ getEventPosition(e) {
28019
+ const p = this.pluginService.stage.eventPointTransform(e);
28020
+ const p1 = { x: 0, y: 0 };
28021
+ e.target.globalTransMatrix.transformPoint(p, p1);
28022
+ return p1;
28023
+ }
28024
+ getLineByPoint(cache, p1) {
28025
+ let lineInfo = cache.lines[0];
28026
+ for (let i = 0; i < cache.lines.length; i++) {
28027
+ if (lineInfo.top <= p1.y && lineInfo.top + lineInfo.height >= p1.y) {
28028
+ break;
28029
+ }
28030
+ lineInfo = cache.lines[i + 1];
28031
+ }
28032
+ return lineInfo;
28033
+ }
28034
+ getColumnByLinePoint(lineInfo, p1) {
28035
+ let columnInfo = lineInfo.paragraphs[0];
28036
+ for (let i = 0; i < lineInfo.paragraphs.length; i++) {
28037
+ if (columnInfo.left <= p1.x && columnInfo.left + columnInfo.width >= p1.x) {
28038
+ break;
28039
+ }
28040
+ columnInfo = lineInfo.paragraphs[i];
28041
+ }
28042
+ return columnInfo;
28043
+ }
28044
+ onFocus(e) {
28045
+ this.deFocus(e);
28046
+ const target = e.target;
28047
+ this.tryUpdateRichtext(target);
28048
+ const shadowRoot = target.attachShadow();
28049
+ shadowRoot.setAttributes({ shadowRootIdx: -1 });
28050
+ const cache = target.getFrameCache();
28051
+ if (!cache) {
28052
+ return;
28053
+ }
28054
+ if (!this.editLine) {
28055
+ const line = createLine({ x: 0, y: 0, lineWidth: 1, stroke: 'black' });
28056
+ line
28057
+ .animate()
28058
+ .to({ opacity: 1 }, 10, 'linear')
28059
+ .wait(700)
28060
+ .to({ opacity: 0 }, 10, 'linear')
28061
+ .wait(700)
28062
+ .loop(Infinity);
28063
+ this.editLine = line;
28064
+ const g = createGroup({ x: 0, y: 0, width: 0, height: 0 });
28065
+ this.editBg = g;
28066
+ shadowRoot.add(this.editLine);
28067
+ shadowRoot.add(this.editBg);
28068
+ }
28069
+ const p1 = this.getEventPosition(e);
28070
+ const lineInfo = this.getLineByPoint(cache, p1);
28071
+ if (lineInfo) {
28072
+ const columnInfo = this.getColumnByLinePoint(lineInfo, p1);
28073
+ if (!columnInfo) {
28074
+ return;
28075
+ }
28076
+ let y1 = lineInfo.top;
28077
+ let y2 = lineInfo.top + lineInfo.height;
28078
+ let x = columnInfo.left + columnInfo.width;
28079
+ y1 += 2;
28080
+ y2 -= 2;
28081
+ let cursorIndex = this.getColumnIndex(cache, columnInfo);
28082
+ if (p1.x < columnInfo.left + columnInfo.width / 2) {
28083
+ x = columnInfo.left;
28084
+ cursorIndex -= 1;
28085
+ }
28086
+ this.lastPoint = { x, y: (y1 + y2) / 2 };
28087
+ this.curCursorIdx = cursorIndex;
28088
+ this.selectionStartCursorIdx = cursorIndex;
28089
+ this.setCursorAndTextArea(x, y1, y2, target);
28090
+ }
28091
+ }
28092
+ getPointByColumnIdx(idx, rt, orient) {
28093
+ const cache = rt.getFrameCache();
28094
+ const { lineInfo, columnInfo } = this.getColumnByIndex(cache, idx);
28095
+ let y1 = lineInfo.top;
28096
+ let y2 = lineInfo.top + lineInfo.height;
28097
+ const x = columnInfo.left + (orient === 'left' ? 0 : columnInfo.width);
28098
+ y1 += 2;
28099
+ y2 -= 2;
28100
+ return { x, y1, y2 };
28101
+ }
28102
+ getColumnIndex(cache, cInfo) {
28103
+ let inputIndex = -1;
28104
+ for (let i = 0; i < cache.lines.length; i++) {
28105
+ const line = cache.lines[i];
28106
+ for (let j = 0; j < line.paragraphs.length; j++) {
28107
+ inputIndex++;
28108
+ if (cInfo === line.paragraphs[j]) {
28109
+ return inputIndex;
28110
+ }
28111
+ }
28112
+ }
28113
+ return -1;
28114
+ }
28115
+ getColumnByIndex(cache, index) {
28116
+ let inputIndex = -1;
28117
+ for (let i = 0; i < cache.lines.length; i++) {
28118
+ const lineInfo = cache.lines[i];
28119
+ for (let j = 0; j < lineInfo.paragraphs.length; j++) {
28120
+ const columnInfo = lineInfo.paragraphs[j];
28121
+ inputIndex++;
28122
+ if (inputIndex === index) {
28123
+ return {
28124
+ lineInfo,
28125
+ columnInfo
28126
+ };
28127
+ }
28128
+ }
28129
+ }
28130
+ return null;
28131
+ }
28132
+ setCursorAndTextArea(x, y1, y2, rt) {
28133
+ this.editLine.setAttributes({
28134
+ points: [
28135
+ { x, y: y1 },
28136
+ { x, y: y2 }
28137
+ ]
28138
+ });
28139
+ const out = { x: 0, y: 0 };
28140
+ rt.globalTransMatrix.getInverse().transformPoint({ x, y: y1 }, out);
28141
+ const { left, top } = this.pluginService.stage.window.getBoundingClientRect();
28142
+ out.x += left;
28143
+ out.y += top;
28144
+ this.editModule.moveTo(out.x, out.y, rt, this.curCursorIdx, this.selectionStartCursorIdx);
28145
+ }
28146
+ setCursor(x, y1, y2) {
28147
+ this.editLine.setAttributes({
28148
+ points: [
28149
+ { x, y: y1 },
28150
+ { x, y: y2 }
28151
+ ]
28152
+ });
28153
+ }
28154
+ applyUpdate() {
28155
+ this.pluginService.stage.renderNextFrame();
28156
+ }
28157
+ deFocus(e) {
28158
+ const target = e.target;
28159
+ target.detachShadow();
28160
+ this.currRt = null;
28161
+ if (this.editLine) {
28162
+ this.editLine.parent.removeChild(this.editLine);
28163
+ this.editLine.release();
28164
+ this.editLine = null;
28165
+ this.editBg.parent.removeChild(this.editBg);
28166
+ this.editBg.release();
28167
+ this.editBg = null;
28168
+ }
28169
+ }
28170
+ splitText(text) {
28171
+ return Array.from(text);
28172
+ }
28173
+ tryUpdateRichtext(richtext) {
28174
+ const cache = richtext.getFrameCache();
28175
+ if (!cache.lines.every(line => line.paragraphs.every(item => !(item.text && isString(item.text) && this.splitText(item.text).length > 1)))) {
28176
+ const tc = [];
28177
+ richtext.attribute.textConfig.forEach((item) => {
28178
+ const textList = this.splitText(item.text.toString());
28179
+ if (isString(item.text) && textList.length > 1) {
28180
+ for (let i = 0; i < textList.length; i++) {
28181
+ const t = textList[i];
28182
+ tc.push(Object.assign(Object.assign({}, item), { text: t }));
28183
+ }
28184
+ }
28185
+ else {
28186
+ tc.push(item);
28187
+ }
28188
+ });
28189
+ richtext.setAttributes({ textConfig: tc });
28190
+ richtext.doUpdateFrameCache(tc);
28191
+ }
28192
+ }
28193
+ onSelect() {
28194
+ return;
28195
+ }
28196
+ deactivate(context) {
28197
+ context.stage.off('pointermove', this.handleMove);
28198
+ context.stage.off('pointerdown', this.handlePointerDown);
28199
+ context.stage.off('pointerup', this.handlePointerUp);
28200
+ context.stage.off('pointerleave', this.handlePointerUp);
28201
+ }
28202
+ release() {
28203
+ this.editModule.release();
28204
+ }
28205
+ }
28206
+
27604
28207
  class DefaultGraphicAllocate {
27605
28208
  constructor() {
27606
28209
  this.pools = [];
@@ -28602,4 +29205,4 @@ function registerWrapTextGraphic() {
28602
29205
  graphicCreator.RegisterGraphicCreator('wrapText', createWrapText);
28603
29206
  }
28604
29207
 
28605
- export { ACustomAnimate, ARC3D_NUMBER_TYPE, ARC_NUMBER_TYPE, AREA_NUMBER_TYPE, AbstractGraphicRender, Animate, AnimateGroup, AnimateGroup1, AnimateMode, AnimateStatus, AnimateStepType, Application, Arc, Arc3d, Arc3dRender, ArcRender, ArcRenderContribution, Area, AreaRender, AreaRenderContribution, AttributeAnimate, AttributeUpdateType, AutoEnablePlugins, BaseCanvas, BaseEnvContribution, BaseRender, BaseRenderContributionTime, BaseWindowHandlerContribution, Basis, BeforeRenderConstribution, BoundsContext, BoundsPicker, CIRCLE_NUMBER_TYPE, Canvas3DDrawItemInterceptor, Canvas3DPickItemInterceptor, CanvasFactory, CanvasTextLayout, CbAnimate, Circle, CircleRender, CircleRenderContribution, ClipAngleAnimate, ClipDirectionAnimate, ClipGraphicAnimate, ClipRadiusAnimate, ColorInterpolate, ColorStore, ColorType, CommonDrawItemInterceptorContribution, CommonRenderContribution, Container, ContainerModule, Context2dFactory, ContributionProvider, CurveContext, CurveTypeEnum, CustomEvent, CustomPath2D, CustomSymbolClass, DebugDrawItemInterceptorContribution, DefaultArcAllocate, DefaultArcAttribute, DefaultArcRenderContribution, DefaultAreaAllocate, DefaultAreaAttribute, DefaultAreaTextureRenderContribution, DefaultAttribute, DefaultBaseBackgroundRenderContribution, DefaultBaseInteractiveRenderContribution, DefaultBaseTextureRenderContribution, DefaultCanvasAllocate, DefaultCanvasArcRender, DefaultCanvasAreaRender, DefaultCanvasCircleRender, DefaultCanvasImageRender, DefaultCanvasLineRender, DefaultCanvasPathRender, DefaultCanvasPolygonRender, DefaultCanvasRectRender, DefaultCanvasSymbolRender, DefaultCanvasTextRender, DefaultCircleAllocate, DefaultCircleAttribute, DefaultCircleRenderContribution, DefaultConnectAttribute, DefaultDebugAttribute, DefaultFillStyle, DefaultGlobal, DefaultGlobalPickerService, DefaultGlyphAttribute, DefaultGraphicAllocate, DefaultGraphicMemoryManager, DefaultGraphicService, DefaultGraphicUtil, DefaultGroupAttribute, DefaultGroupBackgroundRenderContribution, DefaultImageAttribute, DefaultImageBackgroundRenderContribution, DefaultImageRenderContribution, DefaultLayerService, DefaultLayout, DefaultLineAllocate, DefaultLineAttribute, DefaultMat4Allocate, DefaultMatrixAllocate, DefaultMorphingAnimateConfig, DefaultPathAllocate, DefaultPathAttribute, DefaultPickService, DefaultPickStyle, DefaultPolygonAttribute, DefaultRect3dAttribute, DefaultRectAllocate, DefaultRectAttribute, DefaultRectRenderContribution, DefaultRenderService, DefaultRichTextAttribute, DefaultRichTextIconAttribute, DefaultStateAnimateConfig, DefaultStrokeStyle, DefaultStyle, DefaultSymbolAllocate, DefaultSymbolAttribute, DefaultSymbolRenderContribution, DefaultTextAllocate, DefaultTextAttribute, DefaultTextMeasureContribution, DefaultTextStyle, DefaultTicker, DefaultTimeline, DefaultTransform, DefaultTransformUtil, DefaultWindow, Direction$1 as Direction, DrawContribution, DrawItemInterceptor, DynamicLayerHandlerContribution, Edge, EmptyContext2d, EnvContribution, EventManager, EventSystem, EventTarget, FadeInPlus, FederatedEvent, FederatedMouseEvent, FederatedPointerEvent, FederatedWheelEvent, GLYPH_NUMBER_TYPE, GRAPHIC_UPDATE_TAG_KEY, GROUP_NUMBER_TYPE, Generator, GlobalPickerService, Glyph, GlyphRender, Graphic, GraphicAnimate, GraphicCreator$1 as GraphicCreator, GraphicPicker, GraphicRender, GraphicService, GraphicUtil, Group, GroupFadeIn, GroupFadeOut, GroupRender, GroupRenderContribution, GroupUpdateAABBBoundsMode, HtmlAttributePlugin, IContainPointMode, IMAGE_NUMBER_TYPE, Image, ImageRender, ImageRenderContribution, IncreaseCount, IncrementalDrawContribution, InputText, InteractiveDrawItemInterceptorContribution, InteractivePickItemInterceptorContribution, InteractiveSubRenderContribution, LINE_NUMBER_TYPE, Layer, LayerService, Line$1 as Line, LineRender, Linear, LinearClosed, ManualTickHandler, ManualTicker, Mat4Allocate, MatrixAllocate, Meteor, MonotoneX, MonotoneY, MorphingPath, MotionPath, MultiToOneMorphingPath, NOWORK_ANIMATE_ATTR, Node, PATH_NUMBER_TYPE, POLYGON_NUMBER_TYPE, PURE_STYLE_KEY, PYRAMID3D_NUMBER_TYPE, Path, PathRender, PathRenderContribution, PickItemInterceptor, PickerService, PluginService, Polygon, PolygonRender, PolygonRenderContribution, Pyramid3d, Pyramid3dRender, RAFTickHandler, RECT3D_NUMBER_TYPE, RECT_NUMBER_TYPE, RICHTEXT_NUMBER_TYPE, RafBasedSTO, ReactAttributePlugin, Rect, Rect3DRender, Rect3d, RectRender, RectRenderContribution, ReflectSegContext, RenderSelector, RenderService, ResourceLoader, RichText, RichTextRender, RotateBySphereAnimate, SVG_ATTRIBUTE_MAP, SVG_ATTRIBUTE_MAP_KEYS, SVG_PARSE_ATTRIBUTE_MAP, SVG_PARSE_ATTRIBUTE_MAP_KEYS, SYMBOL_NUMBER_TYPE, SegContext, ShadowRoot, ShadowRootDrawItemInterceptorContribution, ShadowRootPickItemInterceptorContribution, SplitRectAfterRenderContribution, SplitRectBeforeRenderContribution, Stage, StaticLayerHandlerContribution, Step$1 as Step, StreamLight, SubAnimate, Symbol$1 as Symbol, SymbolRender, SymbolRenderContribution, TEXT_NUMBER_TYPE, TagPointsUpdate, Text, TextDirection, TextMeasureContribution, TextRender, TextRenderContribution, Theme, TimeOutTickHandler, TransformUtil, UpdateTag, VGlobal, VWindow, VirtualLayerHandlerContribution, WILDCARD, WindowHandlerContribution, WrapText, XMLParser, _interpolateColor, addArcToBezierPath, addAttributeToPrototype, alignBezierCurves, alignSubpath, application, applyTransformOnBezierCurves, arc3dModule, arcModule, areaModule, bezier, bezierCurversToPath, binarySplitPolygon, bindContributionProvider, bindContributionProviderNoSingletonScope, boundStroke, builtInSymbolStrMap, builtinSymbols, builtinSymbolsMap, calcLineCache$1 as calcLineCache, calculateLineHeight, canvasAllocate, centroidOfSubpath, circleBounds, circleModule, clock, cloneGraphic, colorEqual, colorStringInterpolationToStr, container, cornerTangents, createArc, createArc3d, createArea, createCircle, createColor, createConicalGradient, createGlyph, createGroup, createImage, createLine, createMat4, createPath, createPolygon, createPyramid3d, createRect, createRect3d, createRectPath, createRichText, createShadowRoot, createStage, createSymbol, createText, createWrapText, cubicCalc, cubicLength, cubicPointAt, cubicSubdivide, defaultArcAllocate, defaultArcBackgroundRenderContribution, defaultArcRenderContribution, defaultArcTextureRenderContribution, defaultAreaAllocate, defaultBaseBackgroundRenderContribution, defaultBaseTextureRenderContribution, defaultCircleAllocate, defaultCircleBackgroundRenderContribution, defaultCircleRenderContribution, defaultCircleTextureRenderContribution, defaultGraphicMemoryManager, defaultGroupBackgroundRenderContribution, defaultImageBackgroundRenderContribution, defaultImageRenderContribution, defaultLineAllocate, defaultPathAllocate, defaultRectAllocate, defaultRectBackgroundRenderContribution, defaultRectRenderContribution, defaultRectTextureRenderContribution, defaultSymbolAllocate, defaultSymbolBackgroundRenderContribution, defaultSymbolRenderContribution, defaultSymbolTextureRenderContribution, defaultTextAllocate, defaultTicker, defaultTimeline, drawArc, drawArcPath$1 as drawArcPath, drawAreaSegments, drawIncrementalAreaSegments, drawIncrementalSegments, drawPathProxy, drawSegments, enumCommandMap, fillVisible, findBestMorphingRotation, findNextGraphic, flatten_simplify, foreach, foreachAsync, genBasisSegments, genBasisTypeSegments, genLinearClosedSegments, genLinearClosedTypeSegments, genLinearSegments, genLinearTypeSegments, genMonotoneXSegments, genMonotoneXTypeSegments, genMonotoneYSegments, genMonotoneYTypeSegments, genNumberType, genStepSegments, genStepTypeSegments, getAttributeFromDefaultAttrList, getConicGradientAt, getContextFont, getCurrentEnv, getExtraModelMatrix, getModelMatrix, getRichTextBounds, getScaledStroke, getTextBounds, getTheme, getThemeFromGroup, globalTheme, glyphModule, graphicCreator, graphicService, graphicUtil, imageModule, incrementalAddTo, inject, injectable, interpolateColor, interpolateGradientConicalColor, interpolateGradientLinearColor, interpolateGradientRadialColor, interpolatePureColorArray, intersect, isBrowserEnv, isNodeEnv, isSvg, isTransformKey, isXML, layerService, lineModule, lookAt, mat3Tomat4, mat4Allocate, matrixAllocate, morphPath, multiInject, multiToOneMorph, multiply, multiplyMat4Mat3, multiplyMat4Mat4, named, newThemeObj, oneToMultiMorph, ortho, parsePadding, parseStroke, parseSvgPath, pathModule, pathToBezierCurves, point$2 as point, pointEqual, pointInterpolation, pointInterpolationHighPerformance, pointsEqual, pointsInterpolation, polygonModule, preLoadAllModule, pyramid3dModule, rafBasedSto, rect3dModule, rectFillVisible, rectModule, rectStrokeVisible, recursiveCallBinarySplit, registerArc3dGraphic, registerArcGraphic, registerAreaGraphic, registerCircleGraphic, registerGlyphGraphic, registerGroupGraphic, registerImageGraphic, registerLineGraphic, registerPathGraphic, registerPolygonGraphic, registerPyramid3dGraphic, registerRect3dGraphic, registerRectGraphic, registerRichtextGraphic, registerShadowRootGraphic, registerSymbolGraphic, registerTextGraphic, registerWrapTextGraphic, renderCommandList, rewriteProto, richtextModule, rotateX, rotateY, runFill, runStroke, segments, shouldUseMat4, snapLength, splitArc, splitArea, splitCircle, splitGraphic, splitLine, splitPath, splitPolygon, splitRect, splitToGrids, strCommandMap, strokeVisible, symbolModule, textAttributesToStyle, textDrawOffsetX, textDrawOffsetY, textLayoutOffsetY, textModule, transformKeys, transformMat4, transformUtil, translate, verticalLayout, vglobal, waitForAllSubLayers, wrapCanvas, wrapContext, xul };
29208
+ export { ACustomAnimate, ARC3D_NUMBER_TYPE, ARC_NUMBER_TYPE, AREA_NUMBER_TYPE, AbstractGraphicRender, Animate, AnimateGroup, AnimateGroup1, AnimateMode, AnimateStatus, AnimateStepType, Application, Arc, Arc3d, Arc3dRender, ArcRender, ArcRenderContribution, Area, AreaRender, AreaRenderContribution, AttributeAnimate, AttributeUpdateType, AutoEnablePlugins, BaseCanvas, BaseEnvContribution, BaseRender, BaseRenderContributionTime, BaseWindowHandlerContribution, Basis, BeforeRenderConstribution, BoundsContext, BoundsPicker, CIRCLE_NUMBER_TYPE, Canvas3DDrawItemInterceptor, Canvas3DPickItemInterceptor, CanvasFactory, CanvasTextLayout, CbAnimate, Circle, CircleRender, CircleRenderContribution, ClipAngleAnimate, ClipDirectionAnimate, ClipGraphicAnimate, ClipRadiusAnimate, ColorInterpolate, ColorStore, ColorType, CommonDrawItemInterceptorContribution, CommonRenderContribution, Container, ContainerModule, Context2dFactory, ContributionProvider, CurveContext, CurveTypeEnum, CustomEvent, CustomPath2D, CustomSymbolClass, DebugDrawItemInterceptorContribution, DefaultArcAllocate, DefaultArcAttribute, DefaultArcRenderContribution, DefaultAreaAllocate, DefaultAreaAttribute, DefaultAreaTextureRenderContribution, DefaultAttribute, DefaultBaseBackgroundRenderContribution, DefaultBaseInteractiveRenderContribution, DefaultBaseTextureRenderContribution, DefaultCanvasAllocate, DefaultCanvasArcRender, DefaultCanvasAreaRender, DefaultCanvasCircleRender, DefaultCanvasImageRender, DefaultCanvasLineRender, DefaultCanvasPathRender, DefaultCanvasPolygonRender, DefaultCanvasRectRender, DefaultCanvasSymbolRender, DefaultCanvasTextRender, DefaultCircleAllocate, DefaultCircleAttribute, DefaultCircleRenderContribution, DefaultConnectAttribute, DefaultDebugAttribute, DefaultFillStyle, DefaultGlobal, DefaultGlobalPickerService, DefaultGlyphAttribute, DefaultGraphicAllocate, DefaultGraphicMemoryManager, DefaultGraphicService, DefaultGraphicUtil, DefaultGroupAttribute, DefaultGroupBackgroundRenderContribution, DefaultImageAttribute, DefaultImageBackgroundRenderContribution, DefaultImageRenderContribution, DefaultLayerService, DefaultLayout, DefaultLineAllocate, DefaultLineAttribute, DefaultMat4Allocate, DefaultMatrixAllocate, DefaultMorphingAnimateConfig, DefaultPathAllocate, DefaultPathAttribute, DefaultPickService, DefaultPickStyle, DefaultPolygonAttribute, DefaultRect3dAttribute, DefaultRectAllocate, DefaultRectAttribute, DefaultRectRenderContribution, DefaultRenderService, DefaultRichTextAttribute, DefaultRichTextIconAttribute, DefaultStateAnimateConfig, DefaultStrokeStyle, DefaultStyle, DefaultSymbolAllocate, DefaultSymbolAttribute, DefaultSymbolRenderContribution, DefaultTextAllocate, DefaultTextAttribute, DefaultTextMeasureContribution, DefaultTextStyle, DefaultTicker, DefaultTimeline, DefaultTransform, DefaultTransformUtil, DefaultWindow, Direction$1 as Direction, DrawContribution, DrawItemInterceptor, DynamicLayerHandlerContribution, Edge, EmptyContext2d, EnvContribution, EventManager, EventSystem, EventTarget, FORMAT_ELEMENT_COMMAND, FORMAT_TEXT_COMMAND, FadeInPlus, FederatedEvent, FederatedMouseEvent, FederatedPointerEvent, FederatedWheelEvent, GLYPH_NUMBER_TYPE, GRAPHIC_UPDATE_TAG_KEY, GROUP_NUMBER_TYPE, Generator, GlobalPickerService, Glyph, GlyphRender, Graphic, GraphicAnimate, GraphicCreator$1 as GraphicCreator, GraphicPicker, GraphicRender, GraphicService, GraphicUtil, Group, GroupFadeIn, GroupFadeOut, GroupRender, GroupRenderContribution, GroupUpdateAABBBoundsMode, HtmlAttributePlugin, IContainPointMode, IMAGE_NUMBER_TYPE, Image, ImageRender, ImageRenderContribution, IncreaseCount, IncrementalDrawContribution, InputText, InteractiveDrawItemInterceptorContribution, InteractivePickItemInterceptorContribution, InteractiveSubRenderContribution, LINE_NUMBER_TYPE, Layer, LayerService, Line$1 as Line, LineRender, Linear, LinearClosed, ManualTickHandler, ManualTicker, Mat4Allocate, MatrixAllocate, Meteor, MonotoneX, MonotoneY, MorphingPath, MotionPath, MultiToOneMorphingPath, NOWORK_ANIMATE_ATTR, Node, PATH_NUMBER_TYPE, POLYGON_NUMBER_TYPE, PURE_STYLE_KEY, PYRAMID3D_NUMBER_TYPE, Path, PathRender, PathRenderContribution, PickItemInterceptor, PickerService, PluginService, Polygon, PolygonRender, PolygonRenderContribution, Pyramid3d, Pyramid3dRender, RAFTickHandler, RECT3D_NUMBER_TYPE, RECT_NUMBER_TYPE, RICHTEXT_NUMBER_TYPE, RafBasedSTO, ReactAttributePlugin, Rect, Rect3DRender, Rect3d, RectRender, RectRenderContribution, ReflectSegContext, RenderSelector, RenderService, ResourceLoader, RichText, RichTextEditPlugin, RichTextRender, RotateBySphereAnimate, SVG_ATTRIBUTE_MAP, SVG_ATTRIBUTE_MAP_KEYS, SVG_PARSE_ATTRIBUTE_MAP, SVG_PARSE_ATTRIBUTE_MAP_KEYS, SYMBOL_NUMBER_TYPE, SegContext, ShadowRoot, ShadowRootDrawItemInterceptorContribution, ShadowRootPickItemInterceptorContribution, SplitRectAfterRenderContribution, SplitRectBeforeRenderContribution, Stage, StaticLayerHandlerContribution, Step$1 as Step, StreamLight, SubAnimate, Symbol$1 as Symbol, SymbolRender, SymbolRenderContribution, TEXT_NUMBER_TYPE, TagPointsUpdate, Text, TextDirection, TextMeasureContribution, TextRender, TextRenderContribution, Theme, TimeOutTickHandler, TransformUtil, UpdateTag, VGlobal, VWindow, VirtualLayerHandlerContribution, WILDCARD, WindowHandlerContribution, WrapText, XMLParser, _interpolateColor, addArcToBezierPath, addAttributeToPrototype, alignBezierCurves, alignSubpath, application, applyTransformOnBezierCurves, arc3dModule, arcModule, areaModule, bezier, bezierCurversToPath, binarySplitPolygon, bindContributionProvider, bindContributionProviderNoSingletonScope, boundStroke, builtInSymbolStrMap, builtinSymbols, builtinSymbolsMap, calcLineCache$1 as calcLineCache, calculateLineHeight, canvasAllocate, centroidOfSubpath, circleBounds, circleModule, clock, cloneGraphic, colorEqual, colorStringInterpolationToStr, container, cornerTangents, createArc, createArc3d, createArea, createCircle, createColor, createConicalGradient, createGlyph, createGroup, createImage, createLine, createMat4, createPath, createPolygon, createPyramid3d, createRect, createRect3d, createRectPath, createRichText, createShadowRoot, createStage, createSymbol, createText, createWrapText, cubicCalc, cubicLength, cubicPointAt, cubicSubdivide, defaultArcAllocate, defaultArcBackgroundRenderContribution, defaultArcRenderContribution, defaultArcTextureRenderContribution, defaultAreaAllocate, defaultBaseBackgroundRenderContribution, defaultBaseTextureRenderContribution, defaultCircleAllocate, defaultCircleBackgroundRenderContribution, defaultCircleRenderContribution, defaultCircleTextureRenderContribution, defaultGraphicMemoryManager, defaultGroupBackgroundRenderContribution, defaultImageBackgroundRenderContribution, defaultImageRenderContribution, defaultLineAllocate, defaultPathAllocate, defaultRectAllocate, defaultRectBackgroundRenderContribution, defaultRectRenderContribution, defaultRectTextureRenderContribution, defaultSymbolAllocate, defaultSymbolBackgroundRenderContribution, defaultSymbolRenderContribution, defaultSymbolTextureRenderContribution, defaultTextAllocate, defaultTicker, defaultTimeline, drawArc, drawArcPath$1 as drawArcPath, drawAreaSegments, drawIncrementalAreaSegments, drawIncrementalSegments, drawPathProxy, drawSegments, enumCommandMap, fillVisible, findBestMorphingRotation, findNextGraphic, flatten_simplify, foreach, foreachAsync, genBasisSegments, genBasisTypeSegments, genLinearClosedSegments, genLinearClosedTypeSegments, genLinearSegments, genLinearTypeSegments, genMonotoneXSegments, genMonotoneXTypeSegments, genMonotoneYSegments, genMonotoneYTypeSegments, genNumberType, genStepSegments, genStepTypeSegments, getAttributeFromDefaultAttrList, getConicGradientAt, getContextFont, getCurrentEnv, getExtraModelMatrix, getModelMatrix, getRichTextBounds, getScaledStroke, getTextBounds, getTheme, getThemeFromGroup, globalTheme, glyphModule, graphicCreator, graphicService, graphicUtil, imageModule, incrementalAddTo, inject, injectable, interpolateColor, interpolateGradientConicalColor, interpolateGradientLinearColor, interpolateGradientRadialColor, interpolatePureColorArray, intersect, isBrowserEnv, isNodeEnv, isSvg, isTransformKey, isXML, layerService, lineModule, lookAt, mat3Tomat4, mat4Allocate, matrixAllocate, morphPath, multiInject, multiToOneMorph, multiply, multiplyMat4Mat3, multiplyMat4Mat4, named, newThemeObj, oneToMultiMorph, ortho, parsePadding, parseStroke, parseSvgPath, pathModule, pathToBezierCurves, point$2 as point, pointEqual, pointInterpolation, pointInterpolationHighPerformance, pointsEqual, pointsInterpolation, polygonModule, preLoadAllModule, pyramid3dModule, rafBasedSto, rect3dModule, rectFillVisible, rectModule, rectStrokeVisible, recursiveCallBinarySplit, registerArc3dGraphic, registerArcGraphic, registerAreaGraphic, registerCircleGraphic, registerGlyphGraphic, registerGroupGraphic, registerImageGraphic, registerLineGraphic, registerPathGraphic, registerPolygonGraphic, registerPyramid3dGraphic, registerRect3dGraphic, registerRectGraphic, registerRichtextGraphic, registerShadowRootGraphic, registerSymbolGraphic, registerTextGraphic, registerWrapTextGraphic, renderCommandList, rewriteProto, richtextModule, rotateX, rotateY, runFill, runStroke, segments, shouldUseMat4, snapLength, splitArc, splitArea, splitCircle, splitGraphic, splitLine, splitPath, splitPolygon, splitRect, splitToGrids, strCommandMap, strokeVisible, symbolModule, textAttributesToStyle, textDrawOffsetX, textDrawOffsetY, textLayoutOffsetY, textModule, transformKeys, transformMat4, transformUtil, translate, verticalLayout, vglobal, waitForAllSubLayers, wrapCanvas, wrapContext, xul };