@visactor/vrender 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.
package/dist/index.es.js CHANGED
@@ -1293,6 +1293,18 @@ const isObject = value => {
1293
1293
  };
1294
1294
  var isObject$1 = isObject;
1295
1295
 
1296
+ const isObjectLike = value => "object" == typeof value && null !== value;
1297
+ var isObjectLike$1 = isObjectLike;
1298
+
1299
+ const isPlainObject = function (value) {
1300
+ if (!isObjectLike$1(value) || !isType$1(value, "Object")) return !1;
1301
+ if (null === Object.getPrototypeOf(value)) return !0;
1302
+ let proto = value;
1303
+ for (; null !== Object.getPrototypeOf(proto);) proto = Object.getPrototypeOf(proto);
1304
+ return Object.getPrototypeOf(value) === proto;
1305
+ };
1306
+ var isPlainObject$1 = isPlainObject;
1307
+
1296
1308
  const isUndefined = value => void 0 === value;
1297
1309
  var isUndefined$1 = isUndefined;
1298
1310
 
@@ -1306,6 +1318,11 @@ var isString$1 = isString;
1306
1318
  const isArray = value => Array.isArray ? Array.isArray(value) : isType$1(value, "Array");
1307
1319
  var isArray$1 = isArray;
1308
1320
 
1321
+ const isArrayLike = function (value) {
1322
+ return null !== value && "function" != typeof value && Number.isFinite(value.length);
1323
+ };
1324
+ var isArrayLike$1 = isArrayLike;
1325
+
1309
1326
  const isNumber = function (value) {
1310
1327
  let fuzzy = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : !1;
1311
1328
  const type = typeof value;
@@ -1326,6 +1343,56 @@ const hasOwnProperty = Object.prototype.hasOwnProperty,
1326
1343
  has = (object, key) => null != object && hasOwnProperty.call(object, key);
1327
1344
  var has$1 = has;
1328
1345
 
1346
+ function baseMerge(target, source) {
1347
+ let shallowArray = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : !1;
1348
+ if (source) {
1349
+ if (target === source) return;
1350
+ if (isValid$1(source) && "object" == typeof source) {
1351
+ const iterable = Object(source),
1352
+ props = [];
1353
+ for (const key in iterable) props.push(key);
1354
+ let {
1355
+ length: length
1356
+ } = props,
1357
+ propIndex = -1;
1358
+ for (; length--;) {
1359
+ const key = props[++propIndex];
1360
+ isValid$1(iterable[key]) && "object" == typeof iterable[key] ? baseMergeDeep(target, source, key, shallowArray) : assignMergeValue(target, key, iterable[key]);
1361
+ }
1362
+ }
1363
+ }
1364
+ }
1365
+ function baseMergeDeep(target, source, key) {
1366
+ let shallowArray = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : !1;
1367
+ const objValue = target[key],
1368
+ srcValue = source[key];
1369
+ let newValue = source[key],
1370
+ isCommon = !0;
1371
+ if (isArray$1(srcValue)) {
1372
+ if (shallowArray) newValue = [];else if (isArray$1(objValue)) newValue = objValue;else if (isArrayLike$1(objValue)) {
1373
+ newValue = new Array(objValue.length);
1374
+ let index = -1;
1375
+ const length = objValue.length;
1376
+ for (; ++index < length;) newValue[index] = objValue[index];
1377
+ }
1378
+ } else isPlainObject$1(srcValue) ? (newValue = objValue, "function" != typeof objValue && "object" == typeof objValue || (newValue = {})) : isCommon = !1;
1379
+ isCommon && baseMerge(newValue, srcValue, shallowArray), assignMergeValue(target, key, newValue);
1380
+ }
1381
+ function assignMergeValue(target, key, value) {
1382
+ (void 0 !== value && !eq(target[key], value) || void 0 === value && !(key in target)) && (target[key] = value);
1383
+ }
1384
+ function eq(value, other) {
1385
+ return value === other || Number.isNaN(value) && Number.isNaN(other);
1386
+ }
1387
+ function merge(target) {
1388
+ let sourceIndex = -1;
1389
+ const length = arguments.length <= 1 ? 0 : arguments.length - 1;
1390
+ for (; ++sourceIndex < length;) {
1391
+ baseMerge(target, sourceIndex + 1 < 1 || arguments.length <= sourceIndex + 1 ? undefined : arguments[sourceIndex + 1], !0);
1392
+ }
1393
+ return target;
1394
+ }
1395
+
1329
1396
  function arrayEqual(a, b) {
1330
1397
  if (!isArray$1(a) || !isArray$1(b)) return !1;
1331
1398
  if (a.length !== b.length) return !1;
@@ -1451,7 +1518,8 @@ function asin(x) {
1451
1518
  return x >= 1 ? halfPi$1 : x <= -1 ? -halfPi$1 : Math.asin(x);
1452
1519
  }
1453
1520
  function pointAt(x1, y1, x2, y2, t) {
1454
- let x, y;
1521
+ let x = x2,
1522
+ y = y2;
1455
1523
  return "number" == typeof x1 && "number" == typeof x2 && (x = (1 - t) * x1 + t * x2), "number" == typeof y1 && "number" == typeof y2 && (y = (1 - t) * y1 + t * y2), {
1456
1524
  x: x,
1457
1525
  y: y
@@ -3913,6 +3981,7 @@ const DefaultTextAttribute = Object.assign(Object.assign(Object.assign({}, Defau
3913
3981
  keepDirIn3d: !0
3914
3982
  });
3915
3983
  const DefaultRichTextAttribute = Object.assign(Object.assign(Object.assign({}, DefaultAttribute), DefaultTextStyle), {
3984
+ editable: !1,
3916
3985
  width: 300,
3917
3986
  height: 300,
3918
3987
  ellipsis: !0,
@@ -12914,10 +12983,10 @@ class RichText extends Graphic {
12914
12983
  strokeOpacity: strokeOpacity
12915
12984
  }, config);
12916
12985
  }
12917
- doUpdateFrameCache() {
12986
+ doUpdateFrameCache(tc) {
12918
12987
  var _a;
12919
12988
  const {
12920
- textConfig = [],
12989
+ textConfig: _tc = [],
12921
12990
  maxWidth: maxWidth,
12922
12991
  maxHeight: maxHeight,
12923
12992
  width: width,
@@ -12931,7 +13000,8 @@ class RichText extends Graphic {
12931
13000
  singleLine: singleLine,
12932
13001
  disableAutoWrapLine: disableAutoWrapLine
12933
13002
  } = this.attribute,
12934
- paragraphs = [];
13003
+ paragraphs = [],
13004
+ textConfig = null != tc ? tc : _tc;
12935
13005
  for (let i = 0; i < textConfig.length; i++) if ("image" in textConfig[i]) {
12936
13006
  const config = this.combinedStyleToCharacter(textConfig[i]),
12937
13007
  iconCache = config.id && this._frameCache && this._frameCache.icons && this._frameCache.icons.get(config.id);
@@ -13923,7 +13993,7 @@ let DefaultGraphicService = class {
13923
13993
  x: x,
13924
13994
  y: y
13925
13995
  } = attribute;
13926
- width = null != width ? width : x1 - x, height = null != height ? height : y1 - y, aabbBounds.set(0, 0, width || 0, height || 0);
13996
+ width = null != width ? width : x1 - x, height = null != height ? height : y1 - y, (isFinite(width) || isFinite(height) || isFinite(x) || isFinite(y)) && aabbBounds.set(0, 0, width || 0, height || 0);
13927
13997
  }
13928
13998
  const tb1 = this.tempAABBBounds1,
13929
13999
  tb2 = this.tempAABBBounds2;
@@ -13938,7 +14008,8 @@ let DefaultGraphicService = class {
13938
14008
  width: width,
13939
14009
  height: height,
13940
14010
  path: path,
13941
- clip = groupTheme.clip
14011
+ clip = groupTheme.clip,
14012
+ display: display
13942
14013
  } = attribute;
13943
14014
  path && path.length ? path.forEach(g => {
13944
14015
  aabbBounds.union(g.AABBBounds);
@@ -17064,10 +17135,10 @@ class ShadowRootDrawItemInterceptorContribution {
17064
17135
  this.order = 1;
17065
17136
  }
17066
17137
  afterDrawItem(graphic, renderService, drawContext, drawContribution, params) {
17067
- return (graphic.attribute.shadowRootIdx > 0 || !graphic.attribute.shadowRootIdx) && this.drawItem(graphic, renderService, drawContext, drawContribution, params), !1;
17138
+ return null == graphic.attribute.shadowRootIdx && graphic.shadowRoot && graphic.shadowRoot.attribute.shadowRootIdx < 0 || (graphic.attribute.shadowRootIdx > 0 || !graphic.attribute.shadowRootIdx || graphic.shadowRoot && graphic.shadowRoot.attribute.shadowRootIdx > 0) && this.drawItem(graphic, renderService, drawContext, drawContribution, params), !1;
17068
17139
  }
17069
17140
  beforeDrawItem(graphic, renderService, drawContext, drawContribution, params) {
17070
- return graphic.attribute.shadowRootIdx < 0 && this.drawItem(graphic, renderService, drawContext, drawContribution, params), !1;
17141
+ return null == graphic.attribute.shadowRootIdx && graphic.shadowRoot && graphic.shadowRoot.attribute.shadowRootIdx > 0 || (graphic.attribute.shadowRootIdx < 0 || graphic.shadowRoot && graphic.shadowRoot.attribute.shadowRootIdx < 0) && this.drawItem(graphic, renderService, drawContext, drawContribution, params), !1;
17071
17142
  }
17072
17143
  drawItem(graphic, renderService, drawContext, drawContribution, params) {
17073
17144
  if (!graphic.shadowRoot) return !1;
@@ -20284,6 +20355,424 @@ function flatten_simplify(points, tolerance, highestQuality) {
20284
20355
  return points = simplifyDouglasPeucker(points = highestQuality ? points : simplifyRadialDist(points, sqTolerance), sqTolerance);
20285
20356
  }
20286
20357
 
20358
+ function findCursorIndexIgnoreLinebreak(textConfig, cursorIndex) {
20359
+ let index = 0;
20360
+ for (index = 0; index < textConfig.length; index++) {
20361
+ const c = textConfig[index];
20362
+ if (c.text && "\n" === c.text || cursorIndex--, cursorIndex < 0) break;
20363
+ }
20364
+ return index;
20365
+ }
20366
+ class EditModule {
20367
+ constructor(container) {
20368
+ this.handleKeyDown = e => {
20369
+ "Delete" !== e.key && "Backspace" !== e.key || this.handleInput({
20370
+ data: null,
20371
+ type: "Backspace"
20372
+ });
20373
+ }, this.handleCompositionStart = () => {
20374
+ const {
20375
+ textConfig = []
20376
+ } = this.currRt.attribute,
20377
+ cursorIndex = findCursorIndexIgnoreLinebreak(textConfig, this.cursorIndex),
20378
+ lastConfig = textConfig[cursorIndex];
20379
+ textConfig.splice(cursorIndex + 1, 0, Object.assign(Object.assign({}, lastConfig), {
20380
+ text: ""
20381
+ })), this.isComposing = !0;
20382
+ }, this.handleCompositionEnd = () => {
20383
+ this.isComposing = !1;
20384
+ const {
20385
+ textConfig = []
20386
+ } = this.currRt.attribute,
20387
+ curIdx = findCursorIndexIgnoreLinebreak(textConfig, this.cursorIndex + 1),
20388
+ lastConfig = textConfig[curIdx];
20389
+ textConfig.splice(curIdx, 1);
20390
+ const text = lastConfig.text,
20391
+ textList = Array.from(text.toString());
20392
+ for (let i = 0; i < textList.length; i++) textConfig.splice(i + curIdx, 0, Object.assign(Object.assign({}, lastConfig), {
20393
+ text: textList[i]
20394
+ }));
20395
+ this.currRt.setAttributes({
20396
+ textConfig: textConfig
20397
+ }), this.onChangeCbList.forEach(cb => {
20398
+ cb(text, this.isComposing, this.cursorIndex + textList.length, this.currRt, "right");
20399
+ });
20400
+ }, this.handleInput = ev => {
20401
+ if (!this.currRt) return;
20402
+ let str = ev.data;
20403
+ "Backspace" === ev.type || str || (str = "\n");
20404
+ const {
20405
+ textConfig = []
20406
+ } = this.currRt.attribute;
20407
+ let startIdx = this.selectionStartCursorIdx,
20408
+ endIdx = this.cursorIndex;
20409
+ startIdx > endIdx && ([startIdx, endIdx] = [endIdx, startIdx]), this.selectionStartCursorIdx = startIdx, this.cursorIndex = startIdx, startIdx = findCursorIndexIgnoreLinebreak(textConfig, startIdx);
20410
+ const delta = this.selectionStartCursorIdx - startIdx;
20411
+ endIdx = findCursorIndexIgnoreLinebreak(textConfig, endIdx);
20412
+ const lastConfig = textConfig[startIdx + (this.isComposing ? 1 : 0)];
20413
+ let currConfig = lastConfig;
20414
+ "Backspace" !== ev.type || this.isComposing ? (startIdx !== endIdx && textConfig.splice(startIdx + 1, endIdx - startIdx), this.isComposing || (currConfig = Object.assign(Object.assign({}, lastConfig), {
20415
+ text: ""
20416
+ }), startIdx += 1, textConfig.splice(startIdx, 0, currConfig)), currConfig.text = str) : startIdx !== endIdx ? textConfig.splice(startIdx + 1, endIdx - startIdx) : (textConfig.splice(startIdx, 1), startIdx -= 1), this.currRt.setAttributes({
20417
+ textConfig: textConfig
20418
+ }), this.isComposing ? this.onInputCbList.forEach(cb => {
20419
+ cb(str, this.isComposing, startIdx + delta, this.currRt, "\n" === str ? "left" : "right");
20420
+ }) : this.onChangeCbList.forEach(cb => {
20421
+ cb(str, this.isComposing, startIdx + delta, this.currRt, "\n" === str ? "left" : "right");
20422
+ });
20423
+ }, this.container = null != container ? container : document.body;
20424
+ const textAreaDom = document.createElement("textarea");
20425
+ textAreaDom.autocomplete = "off", textAreaDom.innerText = "", this.applyStyle(textAreaDom), this.container.append(textAreaDom), this.textAreaDom = textAreaDom, this.isComposing = !1, this.onInputCbList = [], this.onChangeCbList = [];
20426
+ }
20427
+ onInput(cb) {
20428
+ this.onInputCbList.push(cb);
20429
+ }
20430
+ onChange(cb) {
20431
+ this.onChangeCbList.push(cb);
20432
+ }
20433
+ applyStyle(textAreaDom) {
20434
+ 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;"), textAreaDom.addEventListener("input", this.handleInput), textAreaDom.addEventListener("compositionstart", this.handleCompositionStart), textAreaDom.addEventListener("compositionend", this.handleCompositionEnd), window.addEventListener("keydown", this.handleKeyDown);
20435
+ }
20436
+ moveTo(x, y, rt, cursorIndex, selectionStartCursorIdx) {
20437
+ this.textAreaDom.style.left = `${x}px`, this.textAreaDom.style.top = `${y}px`, setTimeout(() => {
20438
+ this.textAreaDom.focus(), this.textAreaDom.setSelectionRange(0, 0);
20439
+ }), this.currRt = rt, this.cursorIndex = cursorIndex, this.selectionStartCursorIdx = selectionStartCursorIdx;
20440
+ }
20441
+ release() {
20442
+ this.textAreaDom.removeEventListener("input", this.handleInput), this.textAreaDom.removeEventListener("compositionstart", this.handleCompositionStart), this.textAreaDom.removeEventListener("compositionend", this.handleCompositionEnd), window.removeEventListener("keydown", this.handleKeyDown);
20443
+ }
20444
+ }
20445
+
20446
+ class Selection {
20447
+ constructor(cacheSelectionStartCursorIdx, cacheCurCursorIdx, selectionStartCursorIdx, curCursorIdx, rt) {
20448
+ this.curCursorIdx = curCursorIdx, this.selectionStartCursorIdx = selectionStartCursorIdx, this.cacheCurCursorIdx = cacheCurCursorIdx, this.cacheSelectionStartCursorIdx = cacheSelectionStartCursorIdx, this.rt = rt;
20449
+ }
20450
+ hasFormat(key) {
20451
+ return null != this.getFormat(key);
20452
+ }
20453
+ getFormat(key) {
20454
+ if (!this.rt) return null;
20455
+ const config = this.rt.attribute.textConfig,
20456
+ val = config[this.selectionStartCursorIdx + 1][key];
20457
+ if (null == val) return null;
20458
+ for (let i = this.selectionStartCursorIdx + 2; i <= this.curCursorIdx; i++) {
20459
+ if (val !== config[i][key]) return null;
20460
+ }
20461
+ return val;
20462
+ }
20463
+ getAllFormat(key) {
20464
+ if (!this.rt) return [];
20465
+ const config = this.rt.attribute.textConfig,
20466
+ val = config[this.selectionStartCursorIdx + 1][key],
20467
+ set = new Set();
20468
+ set.add(val);
20469
+ for (let i = this.selectionStartCursorIdx + 2; i <= this.curCursorIdx; i++) {
20470
+ const item = config[i];
20471
+ set.add(item[key]);
20472
+ }
20473
+ return Array.from(set.values());
20474
+ }
20475
+ }
20476
+ const FORMAT_TEXT_COMMAND = "FORMAT_TEXT_COMMAND";
20477
+ const FORMAT_ELEMENT_COMMAND = "FORMAT_ELEMENT_COMMAND";
20478
+ class RichTextEditPlugin {
20479
+ constructor() {
20480
+ this.name = "RichTextEditPlugin", this.activeEvent = "onRegister", this._uid = Generator.GenAutoIncrementId(), this.key = this.name + this._uid, this.editing = !1, this.pointerDown = !1, this.handleInput = (text, isComposing, cursorIdx, rt, orient) => {
20481
+ const p = this.getPointByColumnIdx(cursorIdx, rt, orient);
20482
+ this.hideSelection(), this.setCursor(p.x, p.y1, p.y2), this.updateCbs.forEach(cb => cb("input", this));
20483
+ }, this.handleChange = (text, isComposing, cursorIdx, rt, orient) => {
20484
+ const p = this.getPointByColumnIdx(cursorIdx, rt, orient);
20485
+ this.curCursorIdx = cursorIdx, this.selectionStartCursorIdx = cursorIdx, this.setCursorAndTextArea(p.x, p.y1, p.y2, rt), this.hideSelection(), this.updateCbs.forEach(cb => cb("change", this));
20486
+ }, this.handleMove = e => {
20487
+ this.isRichtext(e) && (this.currRt = e.target, this.handleEnter(e), e.target.once("pointerleave", this.handleLeave), this.showSelection(e));
20488
+ }, this.handlePointerDown = e => {
20489
+ this.editing ? this.onFocus(e) : this.deFocus(e), this.applyUpdate(), this.pointerDown = !0, this.updateCbs.forEach(cb => cb(this.editing ? "onfocus" : "defocus", this));
20490
+ }, this.handlePointerUp = e => {
20491
+ this.pointerDown = !1;
20492
+ }, this.handleEnter = e => {
20493
+ this.editing = !0, this.pluginService.stage.setCursor("text");
20494
+ }, this.handleLeave = e => {
20495
+ this.editing = !1, this.pluginService.stage.setCursor("default");
20496
+ }, this.commandCbs = new Map(), this.commandCbs.set(FORMAT_TEXT_COMMAND, [this.formatTextCommandCb]), this.updateCbs = [];
20497
+ }
20498
+ getSelection() {
20499
+ return this.selectionStartCursorIdx && this.curCursorIdx && this.selectionStartCursorIdx !== this.curCursorIdx && this.currRt ? new Selection(this.selectionStartCursorIdx, this.curCursorIdx, findCursorIndexIgnoreLinebreak(this.currRt.attribute.textConfig, this.selectionStartCursorIdx), findCursorIndexIgnoreLinebreak(this.currRt.attribute.textConfig, this.curCursorIdx), this.currRt) : null;
20500
+ }
20501
+ formatTextCommandCb(payload, p) {
20502
+ const rt = p.currRt;
20503
+ if (!rt) return;
20504
+ const selectionData = p.getSelection();
20505
+ if (!selectionData) return;
20506
+ const {
20507
+ selectionStartCursorIdx: selectionStartCursorIdx,
20508
+ curCursorIdx: curCursorIdx
20509
+ } = selectionData,
20510
+ config = rt.attribute.textConfig.slice(selectionStartCursorIdx + 1, curCursorIdx + 1);
20511
+ "bold" === payload ? config.forEach(item => item.fontWeight = "bold") : "italic" === payload ? config.forEach(item => item.fontStyle = "italic") : "underline" === payload ? config.forEach(item => item.underline = !0) : "lineThrough" === payload ? config.forEach(item => item.lineThrough = !0) : isObject$1(payload) && config.forEach(item => merge(item, payload)), rt.setAttributes(rt.attribute);
20512
+ }
20513
+ dispatchCommand(command, payload) {
20514
+ const cbs = this.commandCbs.get(command);
20515
+ cbs && cbs.forEach(cb => cb(payload, this)), this.updateCbs.forEach(cb => cb("dispatch", this));
20516
+ }
20517
+ registerCommand(command, cb) {
20518
+ (this.commandCbs.get(command) || []).push(cb);
20519
+ }
20520
+ registerUpdateListener(cb) {
20521
+ (this.updateCbs || []).push(cb);
20522
+ }
20523
+ activate(context) {
20524
+ this.pluginService = context, this.editModule = new EditModule(), context.stage.on("pointermove", this.handleMove), context.stage.on("pointerdown", this.handlePointerDown), context.stage.on("pointerup", this.handlePointerUp), context.stage.on("pointerleave", this.handlePointerUp), this.editModule.onInput(this.handleInput), this.editModule.onChange(this.handleChange);
20525
+ }
20526
+ showSelection(e) {
20527
+ const cache = e.target.getFrameCache();
20528
+ if (cache && this.editBg && this.pointerDown) {
20529
+ let p0 = this.lastPoint,
20530
+ p1 = this.getEventPosition(e),
20531
+ line1Info = this.getLineByPoint(cache, p1);
20532
+ const column1 = this.getColumnByLinePoint(line1Info, p1),
20533
+ y1 = line1Info.top,
20534
+ y2 = line1Info.top + line1Info.height;
20535
+ let x = column1.left + column1.width,
20536
+ cursorIndex = this.getColumnIndex(cache, column1);
20537
+ p1.x < column1.left + column1.width / 2 && (x = column1.left, cursorIndex -= 1), p1.x = x, p1.y = (y1 + y2) / 2;
20538
+ let line0Info = this.getLineByPoint(cache, p0);
20539
+ if ((p0.y > p1.y || p0.y === p1.y && p0.x > p1.x) && ([p0, p1] = [p1, p0], [line1Info, line0Info] = [line0Info, line1Info]), this.editBg.removeAllChild(), line0Info === line1Info) {
20540
+ const column0 = this.getColumnByLinePoint(line0Info, p0);
20541
+ this.editBg.setAttributes({
20542
+ x: p0.x,
20543
+ y: line0Info.top,
20544
+ width: p1.x - p0.x,
20545
+ height: column0.height,
20546
+ fill: "#336df4",
20547
+ fillOpacity: .2
20548
+ });
20549
+ } else {
20550
+ this.editBg.setAttributes({
20551
+ x: 0,
20552
+ y: line0Info.top,
20553
+ width: 0,
20554
+ height: 0
20555
+ });
20556
+ const startIdx = cache.lines.findIndex(item => item === line0Info),
20557
+ endIdx = cache.lines.findIndex(item => item === line1Info);
20558
+ let y = 0;
20559
+ for (let i = startIdx; i <= endIdx; i++) {
20560
+ const line = cache.lines[i];
20561
+ if (i === startIdx) {
20562
+ const p = line.paragraphs[line.paragraphs.length - 1];
20563
+ this.editBg.add(createRect({
20564
+ x: p0.x,
20565
+ y: y,
20566
+ width: p.left + p.width - p0.x,
20567
+ height: line.height,
20568
+ fill: "#336df4",
20569
+ fillOpacity: .2
20570
+ }));
20571
+ } else if (i === endIdx) {
20572
+ const p = line.paragraphs[0];
20573
+ this.editBg.add(createRect({
20574
+ x: p.left,
20575
+ y: y,
20576
+ width: p1.x - p.left,
20577
+ height: line.height,
20578
+ fill: "#336df4",
20579
+ fillOpacity: .2
20580
+ }));
20581
+ } else {
20582
+ const p0 = line.paragraphs[0],
20583
+ p1 = line.paragraphs[line.paragraphs.length - 1];
20584
+ this.editBg.add(createRect({
20585
+ x: p0.left,
20586
+ y: y,
20587
+ width: p1.left + p1.width - p0.left,
20588
+ height: line.height,
20589
+ fill: "#336df4",
20590
+ fillOpacity: .2
20591
+ }));
20592
+ }
20593
+ y += line.height;
20594
+ }
20595
+ }
20596
+ this.curCursorIdx = cursorIndex, this.setCursorAndTextArea(x, y1 + 2, y2 - 2, e.target), this.applyUpdate(), this.updateCbs.forEach(cb => cb("selection", this));
20597
+ }
20598
+ }
20599
+ hideSelection() {
20600
+ this.editBg && (this.editBg.removeAllChild(), this.editBg.setAttributes({
20601
+ fill: "transparent"
20602
+ }));
20603
+ }
20604
+ isRichtext(e) {
20605
+ return !(!e.target || "richtext" !== e.target.type || !e.target.attribute.editable);
20606
+ }
20607
+ getEventPosition(e) {
20608
+ const p = this.pluginService.stage.eventPointTransform(e),
20609
+ p1 = {
20610
+ x: 0,
20611
+ y: 0
20612
+ };
20613
+ return e.target.globalTransMatrix.transformPoint(p, p1), p1;
20614
+ }
20615
+ getLineByPoint(cache, p1) {
20616
+ let lineInfo = cache.lines[0];
20617
+ for (let i = 0; i < cache.lines.length && !(lineInfo.top <= p1.y && lineInfo.top + lineInfo.height >= p1.y); i++) lineInfo = cache.lines[i + 1];
20618
+ return lineInfo;
20619
+ }
20620
+ getColumnByLinePoint(lineInfo, p1) {
20621
+ let columnInfo = lineInfo.paragraphs[0];
20622
+ for (let i = 0; i < lineInfo.paragraphs.length && !(columnInfo.left <= p1.x && columnInfo.left + columnInfo.width >= p1.x); i++) columnInfo = lineInfo.paragraphs[i];
20623
+ return columnInfo;
20624
+ }
20625
+ onFocus(e) {
20626
+ this.deFocus(e);
20627
+ const target = e.target;
20628
+ this.tryUpdateRichtext(target);
20629
+ const shadowRoot = target.attachShadow();
20630
+ shadowRoot.setAttributes({
20631
+ shadowRootIdx: -1
20632
+ });
20633
+ const cache = target.getFrameCache();
20634
+ if (!cache) return;
20635
+ if (!this.editLine) {
20636
+ const line = createLine({
20637
+ x: 0,
20638
+ y: 0,
20639
+ lineWidth: 1,
20640
+ stroke: "black"
20641
+ });
20642
+ line.animate().to({
20643
+ opacity: 1
20644
+ }, 10, "linear").wait(700).to({
20645
+ opacity: 0
20646
+ }, 10, "linear").wait(700).loop(1 / 0), this.editLine = line;
20647
+ const g = createGroup({
20648
+ x: 0,
20649
+ y: 0,
20650
+ width: 0,
20651
+ height: 0
20652
+ });
20653
+ this.editBg = g, shadowRoot.add(this.editLine), shadowRoot.add(this.editBg);
20654
+ }
20655
+ const p1 = this.getEventPosition(e),
20656
+ lineInfo = this.getLineByPoint(cache, p1);
20657
+ if (lineInfo) {
20658
+ const columnInfo = this.getColumnByLinePoint(lineInfo, p1);
20659
+ if (!columnInfo) return;
20660
+ let y1 = lineInfo.top,
20661
+ y2 = lineInfo.top + lineInfo.height,
20662
+ x = columnInfo.left + columnInfo.width;
20663
+ y1 += 2, y2 -= 2;
20664
+ let cursorIndex = this.getColumnIndex(cache, columnInfo);
20665
+ p1.x < columnInfo.left + columnInfo.width / 2 && (x = columnInfo.left, cursorIndex -= 1), this.lastPoint = {
20666
+ x: x,
20667
+ y: (y1 + y2) / 2
20668
+ }, this.curCursorIdx = cursorIndex, this.selectionStartCursorIdx = cursorIndex, this.setCursorAndTextArea(x, y1, y2, target);
20669
+ }
20670
+ }
20671
+ getPointByColumnIdx(idx, rt, orient) {
20672
+ const cache = rt.getFrameCache(),
20673
+ {
20674
+ lineInfo: lineInfo,
20675
+ columnInfo: columnInfo
20676
+ } = this.getColumnByIndex(cache, idx);
20677
+ let y1 = lineInfo.top,
20678
+ y2 = lineInfo.top + lineInfo.height;
20679
+ return y1 += 2, y2 -= 2, {
20680
+ x: columnInfo.left + ("left" === orient ? 0 : columnInfo.width),
20681
+ y1: y1,
20682
+ y2: y2
20683
+ };
20684
+ }
20685
+ getColumnIndex(cache, cInfo) {
20686
+ let inputIndex = -1;
20687
+ for (let i = 0; i < cache.lines.length; i++) {
20688
+ const line = cache.lines[i];
20689
+ for (let j = 0; j < line.paragraphs.length; j++) if (inputIndex++, cInfo === line.paragraphs[j]) return inputIndex;
20690
+ }
20691
+ return -1;
20692
+ }
20693
+ getColumnByIndex(cache, index) {
20694
+ let inputIndex = -1;
20695
+ for (let i = 0; i < cache.lines.length; i++) {
20696
+ const lineInfo = cache.lines[i];
20697
+ for (let j = 0; j < lineInfo.paragraphs.length; j++) {
20698
+ const columnInfo = lineInfo.paragraphs[j];
20699
+ if (inputIndex++, inputIndex === index) return {
20700
+ lineInfo: lineInfo,
20701
+ columnInfo: columnInfo
20702
+ };
20703
+ }
20704
+ }
20705
+ return null;
20706
+ }
20707
+ setCursorAndTextArea(x, y1, y2, rt) {
20708
+ this.editLine.setAttributes({
20709
+ points: [{
20710
+ x: x,
20711
+ y: y1
20712
+ }, {
20713
+ x: x,
20714
+ y: y2
20715
+ }]
20716
+ });
20717
+ const out = {
20718
+ x: 0,
20719
+ y: 0
20720
+ };
20721
+ rt.globalTransMatrix.getInverse().transformPoint({
20722
+ x: x,
20723
+ y: y1
20724
+ }, out);
20725
+ const {
20726
+ left: left,
20727
+ top: top
20728
+ } = this.pluginService.stage.window.getBoundingClientRect();
20729
+ out.x += left, out.y += top, this.editModule.moveTo(out.x, out.y, rt, this.curCursorIdx, this.selectionStartCursorIdx);
20730
+ }
20731
+ setCursor(x, y1, y2) {
20732
+ this.editLine.setAttributes({
20733
+ points: [{
20734
+ x: x,
20735
+ y: y1
20736
+ }, {
20737
+ x: x,
20738
+ y: y2
20739
+ }]
20740
+ });
20741
+ }
20742
+ applyUpdate() {
20743
+ this.pluginService.stage.renderNextFrame();
20744
+ }
20745
+ deFocus(e) {
20746
+ e.target.detachShadow(), this.currRt = null, this.editLine && (this.editLine.parent.removeChild(this.editLine), this.editLine.release(), this.editLine = null, this.editBg.parent.removeChild(this.editBg), this.editBg.release(), this.editBg = null);
20747
+ }
20748
+ splitText(text) {
20749
+ return Array.from(text);
20750
+ }
20751
+ tryUpdateRichtext(richtext) {
20752
+ if (!richtext.getFrameCache().lines.every(line => line.paragraphs.every(item => !(item.text && isString$1(item.text) && this.splitText(item.text).length > 1)))) {
20753
+ const tc = [];
20754
+ richtext.attribute.textConfig.forEach(item => {
20755
+ const textList = this.splitText(item.text.toString());
20756
+ if (isString$1(item.text) && textList.length > 1) for (let i = 0; i < textList.length; i++) {
20757
+ const t = textList[i];
20758
+ tc.push(Object.assign(Object.assign({}, item), {
20759
+ text: t
20760
+ }));
20761
+ } else tc.push(item);
20762
+ }), richtext.setAttributes({
20763
+ textConfig: tc
20764
+ }), richtext.doUpdateFrameCache(tc);
20765
+ }
20766
+ }
20767
+ onSelect() {}
20768
+ deactivate(context) {
20769
+ context.stage.off("pointermove", this.handleMove), context.stage.off("pointerdown", this.handlePointerDown), context.stage.off("pointerup", this.handlePointerUp), context.stage.off("pointerleave", this.handlePointerUp);
20770
+ }
20771
+ release() {
20772
+ this.editModule.release();
20773
+ }
20774
+ }
20775
+
20287
20776
  class DefaultGraphicAllocate {
20288
20777
  constructor() {
20289
20778
  this.pools = [];
@@ -25921,13 +26410,20 @@ try {
25921
26410
  } catch (err) {}
25922
26411
  function makeUpCanvas$3(domref, canvasIdLists, canvasMap, freeCanvasIdx, freeCanvasList, offscreen, pixelRatio) {
25923
26412
  const dpr = null != pixelRatio ? pixelRatio : SystemInfo.pixelRatio;
25924
- canvasIdLists.forEach((id, i) => {
26413
+ if (canvasIdLists.forEach((id, i) => {
25925
26414
  let _canvas;
25926
26415
  offscreen ? _canvas = lynx.createOffscreenCanvas() : (_canvas = ng ? lynx.createCanvasNG(id) : lynx.createCanvas(id), ng && _canvas.attachToCanvasView(id)), _canvas.width = domref.width * dpr, _canvas.height = domref.height * dpr;
25927
26416
  const ctx = _canvas.getContext("2d"),
25928
26417
  canvas = new CanvasWrapEnableWH(_canvas, ctx, dpr, domref.width, domref.height, id);
25929
- canvasMap.set(id, canvas), i >= freeCanvasIdx && freeCanvasList.push(canvas);
25930
- });
26418
+ canvasMap.set(id, canvas), i > freeCanvasIdx && freeCanvasList.push(canvas);
26419
+ }), !freeCanvasList.length && lynx.createOffscreenCanvas) {
26420
+ const _canvas = lynx.createOffscreenCanvas();
26421
+ _canvas.width = domref.width * dpr, _canvas.height = domref.height * dpr;
26422
+ const ctx = _canvas.getContext("2d"),
26423
+ id = Math.random().toString(),
26424
+ canvas = new CanvasWrapEnableWH(_canvas, ctx, dpr, domref.width, domref.height, id);
26425
+ canvasMap.set(id, canvas), freeCanvasList.push(canvas);
26426
+ }
25931
26427
  }
25932
26428
  function createImageElement(src) {
25933
26429
  let isSvg = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : !1;
@@ -28594,7 +29090,7 @@ const registerWrapText = _registerWrapText;
28594
29090
 
28595
29091
  const roughModule = _roughModule;
28596
29092
 
28597
- const version = "0.19.13";
29093
+ const version = "0.19.14";
28598
29094
  preLoadAllModule();
28599
29095
  if (isBrowserEnv()) {
28600
29096
  loadBrowserEnv(container);
@@ -28621,4 +29117,4 @@ registerSymbol();
28621
29117
  registerText();
28622
29118
  registerWrapText();
28623
29119
 
28624
- 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, BrowserEnvContribution, CIRCLE_NUMBER_TYPE, Canvas3DDrawItemInterceptor, Canvas3DPickItemInterceptor, CanvasArc3dPicker, CanvasArcPicker, CanvasAreaPicker, CanvasCirclePicker, CanvasFactory, CanvasGlyphPicker, CanvasGroupPicker, CanvasImagePicker, CanvasLinePicker, CanvasPathPicker, CanvasPickerContribution, CanvasPolygonPicker, CanvasPyramid3dPicker, CanvasRect3dPicker, CanvasRectPicker, CanvasRichTextPicker, CanvasSymbolPicker, CanvasTextLayout, CanvasTextPicker, 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, DragNDrop, DrawContribution, DrawItemInterceptor, DynamicLayerHandlerContribution, Edge, EmptyContext2d, EnvContribution, EventManager, EventSystem, EventTarget, FadeInPlus, FederatedEvent, FederatedMouseEvent, FederatedPointerEvent, FederatedWheelEvent, Fragment, GLYPH_NUMBER_TYPE, GRAPHIC_UPDATE_TAG_KEY, GROUP_NUMBER_TYPE, Generator, Gesture, 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, MathArcPicker, MathAreaPicker, MathCirclePicker, MathGlyphPicker, MathImagePicker, MathLinePicker, MathPathPicker, MathPickerContribution, MathPolygonPicker, MathRectPicker, MathSymbolPicker, MathTextPicker, 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, REACT_TO_CANOPUS_EVENTS, REACT_TO_CANOPUS_EVENTS_LIST, 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, VArc, VArc3d, VArea, VCircle, VGlobal, VGlyph, VGroup, VImage, VLine, VPath, VPolygon, VPyramid3d, VRect, VRect3d, VRichText, VSymbol, VText, VWindow, VirtualLayerHandlerContribution, WILDCARD, WindowHandlerContribution, WrapText, XMLParser, _interpolateColor, _registerArc, addArcToBezierPath$1 as addArcToBezierPath, addAttributeToPrototype, alignBezierCurves, alignSubpath, application, applyTransformOnBezierCurves, arc3dCanvasPickModule, arc3dModule, arcCanvasPickModule, arcMathPickModule, arcModule, areaCanvasPickModule, areaMathPickModule, areaModule, bezier, bezierCurversToPath, binarySplitPolygon, bindContributionProvider, bindContributionProviderNoSingletonScope, boundStroke, browserEnvModule, builtInSymbolStrMap, builtinSymbols, builtinSymbolsMap, calcLineCache$1 as calcLineCache, calculateLineHeight, canvasAllocate, centroidOfSubpath, circleBounds, circleCanvasPickModule, circleMathPickModule, circleModule, clock, cloneGraphic, colorEqual, colorStringInterpolationToStr, container, cornerTangents, createArc, createArc3d, createArea, createCircle, createColor, createConicalGradient, createGlyph, createGroup, createImage, createImageElement$1 as createImageElement, createLine, createMat4, createPath, createPolygon, createPyramid3d, createRect, createRect3d, createRectPath, createRichText, createShadowRoot, createStage, createSymbol, createText, createWrapText, cubicCalc, cubicLength, cubicPointAt, cubicSubdivide, decodeReactDom, 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, feishuEnvModule, 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, glyphCanvasPickModule, glyphMathPickModule, glyphModule, graphicCreator, graphicService, graphicUtil, harmonyEnvModule, imageCanvasPickModule, imageMathPickModule, imageModule, incrementalAddTo, initAllEnv, initBrowserEnv, initFeishuEnv, initHarmonyEnv, initLynxEnv, initNodeEnv, initTTEnv, initTaroEnv, initWxEnv, inject, injectable, interpolateColor, interpolateGradientConicalColor, interpolateGradientLinearColor, interpolateGradientRadialColor, interpolatePureColorArray, intersect, isBrowserEnv, isNodeEnv, isSvg, isTransformKey, isXML, jsx, layerService, lineCanvasPickModule, lineMathPickModule, lineModule, loadAllEnv, loadAllModule, loadBrowserEnv, loadFeishuEnv, loadHarmonyEnv, loadLynxEnv, loadNodeEnv, loadTTEnv, loadTaroEnv, loadWxEnv, lookAt, lynxEnvModule, mat3Tomat4, mat4Allocate, matrixAllocate, morphPath, multiInject, multiToOneMorph, multiply, multiplyMat4Mat3, multiplyMat4Mat4, named, newThemeObj, nodeEnvModule, oneToMultiMorph, ortho, parsePadding, parseStroke, parseSvgPath, pathCanvasPickModule, pathMathPickModule, pathModule, pathToBezierCurves, point$2 as point, pointEqual, pointInterpolation, pointInterpolationHighPerformance, pointsEqual, pointsInterpolation, polygonCanvasPickModule, polygonMathPickModule, polygonModule, preLoadAllModule, pyramid3dCanvasPickModule, pyramid3dModule, rafBasedSto, rect3dCanvasPickModule, rect3dModule, rectCanvasPickModule, rectFillVisible, rectMathPickModule, rectModule, rectStrokeVisible, recursiveCallBinarySplit, registerArc, registerArc3d, registerArc3dGraphic, registerArcGraphic, registerArea, registerAreaGraphic, registerCircle, registerCircleGraphic, registerGlyph, registerGlyphGraphic, registerGroup, registerGroupGraphic, registerImage, registerImageGraphic, registerLine, registerLineGraphic, registerPath, registerPathGraphic, registerPolygon, registerPolygonGraphic, registerPyramid3d, registerPyramid3dGraphic, registerRect, registerRect3d, registerRect3dGraphic, registerRectGraphic, registerRichtext, registerRichtextGraphic, registerShadowRoot, registerShadowRootGraphic, registerSymbol, registerSymbolGraphic, registerText, registerTextGraphic, registerWrapText, registerWrapTextGraphic, renderCommandList, rewriteProto, richTextMathPickModule, richtextCanvasPickModule, richtextModule, rotateX, rotateY, roughModule, runFill, runStroke, segments, shouldUseMat4, snapLength, splitArc, splitArea, splitCircle, splitGraphic, splitLine, splitPath, splitPolygon, splitRect, splitToGrids, strCommandMap, strokeVisible, symbolCanvasPickModule, symbolMathPickModule, symbolModule, taroEnvModule, textAttributesToStyle, textCanvasPickModule, textDrawOffsetX, textDrawOffsetY, textLayoutOffsetY, textMathPickModule, textModule, transformKeys, transformMat4, transformUtil, translate, ttEnvModule, version, verticalLayout, vglobal, waitForAllSubLayers, wrapCanvas, wrapContext, wxEnvModule, xul };
29120
+ 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, BrowserEnvContribution, CIRCLE_NUMBER_TYPE, Canvas3DDrawItemInterceptor, Canvas3DPickItemInterceptor, CanvasArc3dPicker, CanvasArcPicker, CanvasAreaPicker, CanvasCirclePicker, CanvasFactory, CanvasGlyphPicker, CanvasGroupPicker, CanvasImagePicker, CanvasLinePicker, CanvasPathPicker, CanvasPickerContribution, CanvasPolygonPicker, CanvasPyramid3dPicker, CanvasRect3dPicker, CanvasRectPicker, CanvasRichTextPicker, CanvasSymbolPicker, CanvasTextLayout, CanvasTextPicker, 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, DragNDrop, DrawContribution, DrawItemInterceptor, DynamicLayerHandlerContribution, Edge, EmptyContext2d, EnvContribution, EventManager, EventSystem, EventTarget, FORMAT_ELEMENT_COMMAND, FORMAT_TEXT_COMMAND, FadeInPlus, FederatedEvent, FederatedMouseEvent, FederatedPointerEvent, FederatedWheelEvent, Fragment, GLYPH_NUMBER_TYPE, GRAPHIC_UPDATE_TAG_KEY, GROUP_NUMBER_TYPE, Generator, Gesture, 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, MathArcPicker, MathAreaPicker, MathCirclePicker, MathGlyphPicker, MathImagePicker, MathLinePicker, MathPathPicker, MathPickerContribution, MathPolygonPicker, MathRectPicker, MathSymbolPicker, MathTextPicker, 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, REACT_TO_CANOPUS_EVENTS, REACT_TO_CANOPUS_EVENTS_LIST, 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, VArc, VArc3d, VArea, VCircle, VGlobal, VGlyph, VGroup, VImage, VLine, VPath, VPolygon, VPyramid3d, VRect, VRect3d, VRichText, VSymbol, VText, VWindow, VirtualLayerHandlerContribution, WILDCARD, WindowHandlerContribution, WrapText, XMLParser, _interpolateColor, _registerArc, addArcToBezierPath$1 as addArcToBezierPath, addAttributeToPrototype, alignBezierCurves, alignSubpath, application, applyTransformOnBezierCurves, arc3dCanvasPickModule, arc3dModule, arcCanvasPickModule, arcMathPickModule, arcModule, areaCanvasPickModule, areaMathPickModule, areaModule, bezier, bezierCurversToPath, binarySplitPolygon, bindContributionProvider, bindContributionProviderNoSingletonScope, boundStroke, browserEnvModule, builtInSymbolStrMap, builtinSymbols, builtinSymbolsMap, calcLineCache$1 as calcLineCache, calculateLineHeight, canvasAllocate, centroidOfSubpath, circleBounds, circleCanvasPickModule, circleMathPickModule, circleModule, clock, cloneGraphic, colorEqual, colorStringInterpolationToStr, container, cornerTangents, createArc, createArc3d, createArea, createCircle, createColor, createConicalGradient, createGlyph, createGroup, createImage, createImageElement$1 as createImageElement, createLine, createMat4, createPath, createPolygon, createPyramid3d, createRect, createRect3d, createRectPath, createRichText, createShadowRoot, createStage, createSymbol, createText, createWrapText, cubicCalc, cubicLength, cubicPointAt, cubicSubdivide, decodeReactDom, 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, feishuEnvModule, 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, glyphCanvasPickModule, glyphMathPickModule, glyphModule, graphicCreator, graphicService, graphicUtil, harmonyEnvModule, imageCanvasPickModule, imageMathPickModule, imageModule, incrementalAddTo, initAllEnv, initBrowserEnv, initFeishuEnv, initHarmonyEnv, initLynxEnv, initNodeEnv, initTTEnv, initTaroEnv, initWxEnv, inject, injectable, interpolateColor, interpolateGradientConicalColor, interpolateGradientLinearColor, interpolateGradientRadialColor, interpolatePureColorArray, intersect, isBrowserEnv, isNodeEnv, isSvg, isTransformKey, isXML, jsx, layerService, lineCanvasPickModule, lineMathPickModule, lineModule, loadAllEnv, loadAllModule, loadBrowserEnv, loadFeishuEnv, loadHarmonyEnv, loadLynxEnv, loadNodeEnv, loadTTEnv, loadTaroEnv, loadWxEnv, lookAt, lynxEnvModule, mat3Tomat4, mat4Allocate, matrixAllocate, morphPath, multiInject, multiToOneMorph, multiply, multiplyMat4Mat3, multiplyMat4Mat4, named, newThemeObj, nodeEnvModule, oneToMultiMorph, ortho, parsePadding, parseStroke, parseSvgPath, pathCanvasPickModule, pathMathPickModule, pathModule, pathToBezierCurves, point$2 as point, pointEqual, pointInterpolation, pointInterpolationHighPerformance, pointsEqual, pointsInterpolation, polygonCanvasPickModule, polygonMathPickModule, polygonModule, preLoadAllModule, pyramid3dCanvasPickModule, pyramid3dModule, rafBasedSto, rect3dCanvasPickModule, rect3dModule, rectCanvasPickModule, rectFillVisible, rectMathPickModule, rectModule, rectStrokeVisible, recursiveCallBinarySplit, registerArc, registerArc3d, registerArc3dGraphic, registerArcGraphic, registerArea, registerAreaGraphic, registerCircle, registerCircleGraphic, registerGlyph, registerGlyphGraphic, registerGroup, registerGroupGraphic, registerImage, registerImageGraphic, registerLine, registerLineGraphic, registerPath, registerPathGraphic, registerPolygon, registerPolygonGraphic, registerPyramid3d, registerPyramid3dGraphic, registerRect, registerRect3d, registerRect3dGraphic, registerRectGraphic, registerRichtext, registerRichtextGraphic, registerShadowRoot, registerShadowRootGraphic, registerSymbol, registerSymbolGraphic, registerText, registerTextGraphic, registerWrapText, registerWrapTextGraphic, renderCommandList, rewriteProto, richTextMathPickModule, richtextCanvasPickModule, richtextModule, rotateX, rotateY, roughModule, runFill, runStroke, segments, shouldUseMat4, snapLength, splitArc, splitArea, splitCircle, splitGraphic, splitLine, splitPath, splitPolygon, splitRect, splitToGrids, strCommandMap, strokeVisible, symbolCanvasPickModule, symbolMathPickModule, symbolModule, taroEnvModule, textAttributesToStyle, textCanvasPickModule, textDrawOffsetX, textDrawOffsetY, textLayoutOffsetY, textMathPickModule, textModule, transformKeys, transformMat4, transformUtil, translate, ttEnvModule, version, verticalLayout, vglobal, waitForAllSubLayers, wrapCanvas, wrapContext, wxEnvModule, xul };