@visactor/vrender 1.1.0-alpha.22 → 1.1.0-alpha.23

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
@@ -163,7 +163,7 @@ class EventListenerManager {
163
163
  }
164
164
  }
165
165
 
166
- var __awaiter$a = undefined && undefined.__awaiter || function (thisArg, _arguments, P, generator) {
166
+ var __awaiter$8 = undefined && undefined.__awaiter || function (thisArg, _arguments, P, generator) {
167
167
  return new (P || (P = Promise))(function (resolve, reject) {
168
168
  function fulfilled(value) {
169
169
  try {
@@ -332,7 +332,7 @@ class DefaultGlobal extends EventListenerManager {
332
332
  return this._env || this.setEnv("browser"), this.envContribution.loadBlob(url);
333
333
  }
334
334
  loadFont(name, source, descriptors) {
335
- return __awaiter$a(this, void 0, void 0, function* () {
335
+ return __awaiter$8(this, void 0, void 0, function* () {
336
336
  return this._env || this.setEnv("browser"), this.envContribution.loadFont(name, source, descriptors);
337
337
  });
338
338
  }
@@ -2662,7 +2662,7 @@ const styleStringToObject = (styleStr = "") => {
2662
2662
  };
2663
2663
  const lowerCamelCaseToMiddle = str => str.replace(/([A-Z])/g, "-$1").toLowerCase();
2664
2664
 
2665
- var __awaiter$9 = undefined && undefined.__awaiter || function (thisArg, _arguments, P, generator) {
2665
+ var __awaiter$7 = undefined && undefined.__awaiter || function (thisArg, _arguments, P, generator) {
2666
2666
  return new (P || (P = Promise))(function (resolve, reject) {
2667
2667
  function fulfilled(value) {
2668
2668
  try {
@@ -2730,7 +2730,7 @@ class Node extends EventEmitter {
2730
2730
  }
2731
2731
  }
2732
2732
  forEachChildrenAsync(cb, reverse = !1) {
2733
- return __awaiter$9(this, void 0, void 0, function* () {
2733
+ return __awaiter$7(this, void 0, void 0, function* () {
2734
2734
  if (reverse) {
2735
2735
  let child = this._lastChild,
2736
2736
  i = 0;
@@ -6286,7 +6286,7 @@ function isXML(str) {
6286
6286
  return str.startsWith("<");
6287
6287
  }
6288
6288
 
6289
- var __awaiter$8 = undefined && undefined.__awaiter || function (thisArg, _arguments, P, generator) {
6289
+ var __awaiter$6 = undefined && undefined.__awaiter || function (thisArg, _arguments, P, generator) {
6290
6290
  return new (P || (P = Promise))(function (resolve, reject) {
6291
6291
  function fulfilled(value) {
6292
6292
  try {
@@ -6315,7 +6315,7 @@ function incrementalAddTo(group, graphic) {
6315
6315
  group.incrementalAppendChild(graphic);
6316
6316
  }
6317
6317
  function waitForAllSubLayers(stage) {
6318
- return __awaiter$8(this, void 0, void 0, function* () {
6318
+ return __awaiter$6(this, void 0, void 0, function* () {
6319
6319
  const promiseList = [],
6320
6320
  layers = stage.getChildren();
6321
6321
  yield new Promise(resolve => {
@@ -14298,7 +14298,7 @@ class DefaultGlobalPickerService {
14298
14298
  }
14299
14299
  }
14300
14300
 
14301
- var __awaiter$7 = undefined && undefined.__awaiter || function (thisArg, _arguments, P, generator) {
14301
+ var __awaiter$5 = undefined && undefined.__awaiter || function (thisArg, _arguments, P, generator) {
14302
14302
  return new (P || (P = Promise))(function (resolve, reject) {
14303
14303
  function fulfilled(value) {
14304
14304
  try {
@@ -14368,7 +14368,7 @@ function foreach(graphic, defaultZIndex, cb, reverse = !1, sort3d = !1) {
14368
14368
  } else graphic.forEachChildren(cb, reverse);
14369
14369
  }
14370
14370
  function foreachAsync(graphic, defaultZIndex, cb, reverse = !1) {
14371
- return __awaiter$7(this, void 0, void 0, function* () {
14371
+ return __awaiter$5(this, void 0, void 0, function* () {
14372
14372
  yield graphic.forEachChildrenAsync(cb, reverse);
14373
14373
  });
14374
14374
  }
@@ -15255,7 +15255,7 @@ function getCurrentEnv() {
15255
15255
  return isBrowserEnv() ? "browser" : "node";
15256
15256
  }
15257
15257
 
15258
- var __awaiter$6 = undefined && undefined.__awaiter || function (thisArg, _arguments, P, generator) {
15258
+ var __awaiter$4 = undefined && undefined.__awaiter || function (thisArg, _arguments, P, generator) {
15259
15259
  return new (P || (P = Promise))(function (resolve, reject) {
15260
15260
  function fulfilled(value) {
15261
15261
  try {
@@ -15452,7 +15452,7 @@ class StateBatchScheduler {
15452
15452
  }
15453
15453
  runJob(job) {
15454
15454
  var _a, _b, _c, _d, _e, _f, _g, _h, _j;
15455
- return __awaiter$6(this, void 0, void 0, function* () {
15455
+ return __awaiter$4(this, void 0, void 0, function* () {
15456
15456
  if ("cancelled" === job.status) return;
15457
15457
  if (yield this.waitForNextFrame(), "cancelled" === job.status) return;
15458
15458
  job.status = "running", null === (_a = this.perfMonitor) || void 0 === _a || _a.recordEvent("deferred-job-start", {
@@ -17937,7 +17937,7 @@ class DefaultCanvasGroupRender {
17937
17937
  }
17938
17938
 
17939
17939
  var STATUS,
17940
- __awaiter$5 = undefined && undefined.__awaiter || function (thisArg, _arguments, P, generator) {
17940
+ __awaiter$3 = undefined && undefined.__awaiter || function (thisArg, _arguments, P, generator) {
17941
17941
  return new (P || (P = Promise))(function (resolve, reject) {
17942
17942
  function fulfilled(value) {
17943
17943
  try {
@@ -17972,7 +17972,7 @@ class DefaultIncrementalDrawContribution extends DefaultDrawContribution {
17972
17972
  }, this.defaultRenderMap.set(this.lineRender.numberType, this.lineRender), this.defaultRenderMap.set(this.areaRender.numberType, this.areaRender);
17973
17973
  }
17974
17974
  draw(renderService, drawContext) {
17975
- return __awaiter$5(this, void 0, void 0, function* () {
17975
+ return __awaiter$3(this, void 0, void 0, function* () {
17976
17976
  if (this.checkingForDrawPromise) return;
17977
17977
  this.lastRenderService = renderService, this.lastDrawContext = drawContext, this.checkingForDrawPromise = this.checkForDraw(drawContext);
17978
17978
  const skipDraw = yield this.checkingForDrawPromise;
@@ -17993,15 +17993,15 @@ class DefaultIncrementalDrawContribution extends DefaultDrawContribution {
17993
17993
  });
17994
17994
  }
17995
17995
  _increaseRender(group, drawContext) {
17996
- return __awaiter$5(this, void 0, void 0, function* () {
17996
+ return __awaiter$3(this, void 0, void 0, function* () {
17997
17997
  this.rendering = !0, yield this._renderIncrementalGroup(group, drawContext);
17998
17998
  });
17999
17999
  }
18000
18000
  _renderIncrementalGroup(group, drawContext) {
18001
- return __awaiter$5(this, void 0, void 0, function* () {
18001
+ return __awaiter$3(this, void 0, void 0, function* () {
18002
18002
  this.count = group.count, yield new Promise(resolve => {
18003
18003
  this.renderItem(group, drawContext, {
18004
- drawingCb: () => __awaiter$5(this, void 0, void 0, function* () {
18004
+ drawingCb: () => __awaiter$3(this, void 0, void 0, function* () {
18005
18005
  if (2 !== group.count) yield foreachAsync(group, DefaultAttribute.zIndex, (item, i) => {
18006
18006
  if (this.status === STATUS.STOP) return !0;
18007
18007
  if (item.isContainer) return !1;
@@ -18022,7 +18022,7 @@ class DefaultIncrementalDrawContribution extends DefaultDrawContribution {
18022
18022
  });
18023
18023
  }
18024
18024
  waitToNextFrame() {
18025
- return __awaiter$5(this, void 0, void 0, function* () {
18025
+ return __awaiter$3(this, void 0, void 0, function* () {
18026
18026
  return new Promise(resolve => {
18027
18027
  this.global.getRequestAnimationFrame()(() => {
18028
18028
  resolve(!1);
@@ -18031,13 +18031,13 @@ class DefaultIncrementalDrawContribution extends DefaultDrawContribution {
18031
18031
  });
18032
18032
  }
18033
18033
  checkForDraw(drawContext) {
18034
- return __awaiter$5(this, void 0, void 0, function* () {
18034
+ return __awaiter$3(this, void 0, void 0, function* () {
18035
18035
  let skip = this.rendering;
18036
18036
  return drawContext.restartIncremental && (skip = !1, yield this.forceStop(), this.resetToInit()), skip;
18037
18037
  });
18038
18038
  }
18039
18039
  forceStop() {
18040
- return __awaiter$5(this, void 0, void 0, function* () {
18040
+ return __awaiter$3(this, void 0, void 0, function* () {
18041
18041
  this.rendering && (this.status = STATUS.STOP, yield new Promise(resolve => {
18042
18042
  this.hooks.completeDraw.tap("stopCb", () => {
18043
18043
  this.status = STATUS.NORMAL, this.hooks.completeDraw.taps = this.hooks.completeDraw.taps.filter(item => "stopCb" !== item.name), resolve(!1);
@@ -18049,11 +18049,11 @@ class DefaultIncrementalDrawContribution extends DefaultDrawContribution {
18049
18049
  this.currFrameStartAt = 0, this.currentIdx = 0;
18050
18050
  }
18051
18051
  renderGroup(group, drawContext) {
18052
- return __awaiter$5(this, void 0, void 0, function* () {
18052
+ return __awaiter$3(this, void 0, void 0, function* () {
18053
18053
  if (!drawContext.break && !1 !== group.attribute.visibleAll) return group.incremental && drawContext.startAtId === group._uid ? (yield this._increaseRender(group, drawContext), void (drawContext.break = !0)) : void (yield new Promise(resolve => {
18054
18054
  this.renderItem(group, drawContext, {
18055
- drawingCb: () => __awaiter$5(this, void 0, void 0, function* () {
18056
- yield foreachAsync(group, DefaultAttribute.zIndex, item => __awaiter$5(this, void 0, void 0, function* () {
18055
+ drawingCb: () => __awaiter$3(this, void 0, void 0, function* () {
18056
+ yield foreachAsync(group, DefaultAttribute.zIndex, item => __awaiter$3(this, void 0, void 0, function* () {
18057
18057
  drawContext.break || item.isContainer && (yield this.renderGroup(item, drawContext));
18058
18058
  })), resolve(!1);
18059
18059
  })
@@ -19931,7 +19931,7 @@ class DefaultCanvasImageRender extends BaseRender {
19931
19931
  }
19932
19932
  }
19933
19933
 
19934
- var __awaiter$4 = undefined && undefined.__awaiter || function (thisArg, _arguments, P, generator) {
19934
+ var __awaiter$2 = undefined && undefined.__awaiter || function (thisArg, _arguments, P, generator) {
19935
19935
  return new (P || (P = Promise))(function (resolve, reject) {
19936
19936
  function fulfilled(value) {
19937
19937
  try {
@@ -20025,7 +20025,7 @@ class BaseEnvContribution {
20025
20025
  };
20026
20026
  }
20027
20027
  loadFont(font, source, descriptors) {
20028
- return __awaiter$4(this, void 0, void 0, function* () {
20028
+ return __awaiter$2(this, void 0, void 0, function* () {
20029
20029
  return {
20030
20030
  loadState: "fail"
20031
20031
  };
@@ -27091,7 +27091,9 @@ class HarmonyCanvas extends BaseCanvas {
27091
27091
  init() {
27092
27092
  this._context = new HarmonyContext2d(this, this._dpr);
27093
27093
  }
27094
- resize(width, height) {}
27094
+ resize(width, height) {
27095
+ this.controled && (this._pixelWidth = width * this._dpr, this._pixelHeight = height * this._dpr, this._displayWidth = width, this._displayHeight = height, this._nativeCanvas.width = this._pixelWidth, this._nativeCanvas.height = this._pixelHeight, this._context.dpr = this._dpr);
27096
+ }
27095
27097
  release(...params) {}
27096
27098
  }
27097
27099
  HarmonyCanvas.env = "harmony";
@@ -28022,7 +28024,7 @@ function bindBrowserWindowContribution(container) {
28022
28024
  (null === (_a = container.isBound) || void 0 === _a ? void 0 : _a.call(container, BrowserWindowHandlerContribution)) || container.bind(BrowserWindowHandlerContribution).toSelf(), (null === (_b = container.getNamed) || void 0 === _b ? void 0 : _b.call(container, WindowHandlerContribution, BrowserWindowHandlerContribution.env)) || container.bind(WindowHandlerContribution).toService(BrowserWindowHandlerContribution).whenTargetNamed(BrowserWindowHandlerContribution.env);
28023
28025
  }
28024
28026
 
28025
- var __awaiter$3 = undefined && undefined.__awaiter || function (thisArg, _arguments, P, generator) {
28027
+ var __awaiter$1 = undefined && undefined.__awaiter || function (thisArg, _arguments, P, generator) {
28026
28028
  return new (P || (P = Promise))(function (resolve, reject) {
28027
28029
  function fulfilled(value) {
28028
28030
  try {
@@ -28241,7 +28243,7 @@ class BrowserEnvContribution extends BaseEnvContribution {
28241
28243
  };
28242
28244
  }
28243
28245
  loadFont(font, source, descriptors) {
28244
- return __awaiter$3(this, void 0, void 0, function* () {
28246
+ return __awaiter$1(this, void 0, void 0, function* () {
28245
28247
  return new FontFace(font, isString$1(source) ? `url(${source})` : source, descriptors).load().then(function (loadedFont) {
28246
28248
  return document.fonts.add(loadedFont), {
28247
28249
  loadState: "success"
@@ -28340,7 +28342,12 @@ class FeishuWindowHandlerContribution extends BaseWindowHandlerContribution {
28340
28342
  createWindowByCanvas(params) {
28341
28343
  let canvas;
28342
28344
  if ("string" == typeof params.canvas) {
28343
- if (canvas = this.global.getElementById(params.canvas), !canvas) throw new Error("canvasId 参数不正确,请确认canvas存在并插入dom");
28345
+ if (canvas = this.global.getElementById(params.canvas), canvas || (canvas = this.global.createCanvas({
28346
+ id: params.canvas,
28347
+ width: params.width,
28348
+ height: params.height,
28349
+ dpr: params.dpr
28350
+ })), !canvas) throw new Error("canvasId 参数不正确,请确认canvas存在并插入dom");
28344
28351
  } else canvas = params.canvas;
28345
28352
  let width = params.width,
28346
28353
  height = params.height;
@@ -28667,17 +28674,55 @@ class CanvasWrapEnableWH {
28667
28674
  }
28668
28675
  }
28669
28676
 
28670
- function makeUpCanvas$4(domref, canvasIdLists, canvasMap, freeCanvasIdx, freeCanvasList, pixelRatio) {
28671
- const dpr = null != pixelRatio ? pixelRatio : tt.getSystemInfoSync().pixelRatio;
28672
- canvasIdLists.forEach((id, i) => {
28673
- const ctx = tt.createCanvasContext(id),
28674
- canvas = new CanvasWrapDisableWH(ctx.canvas || {}, ctx, dpr, domref.width, domref.height, id);
28675
- ctx.canvas = canvas, canvasMap.set(id, canvas), i >= freeCanvasIdx && freeCanvasList.push(canvas);
28676
- });
28677
+ function getMiniAppCanvasOptions(params, pixelRatio, offscreen = null == params.id) {
28678
+ var _a, _b, _c;
28679
+ return {
28680
+ id: null == params.id ? void 0 : String(params.id),
28681
+ width: null !== (_a = params.width) && void 0 !== _a ? _a : 0,
28682
+ height: null !== (_b = params.height) && void 0 !== _b ? _b : 0,
28683
+ dpr: null !== (_c = params.dpr) && void 0 !== _c ? _c : pixelRatio,
28684
+ offscreen: offscreen
28685
+ };
28686
+ }
28687
+ function wrapMiniAppNativeCanvas(nativeCanvas, options) {
28688
+ var _a;
28689
+ const ctx = null === (_a = null == nativeCanvas ? void 0 : nativeCanvas.getContext) || void 0 === _a ? void 0 : _a.call(nativeCanvas, "2d");
28690
+ if (!ctx) throw new Error('MiniApp canvas bridge returned a canvas without getContext("2d").');
28691
+ return new CanvasWrapEnableWH(nativeCanvas, ctx, options.dpr, options.width, options.height, options.id);
28692
+ }
28693
+ function wrapMiniAppContextCanvas(ctx, options) {
28694
+ if (!ctx) throw new Error("MiniApp canvas bridge returned an empty 2d context.");
28695
+ const canvas = new CanvasWrapDisableWH(ctx.canvas || {}, ctx, options.dpr, options.width, options.height, options.id);
28696
+ return ctx.canvas = canvas, canvas;
28697
+ }
28698
+ function createCanvasWithFactory(params, pixelRatio, canvasMap, factory) {
28699
+ const options = getMiniAppCanvasOptions(params, pixelRatio),
28700
+ id = options.id;
28701
+ if (null != id) {
28702
+ const existing = canvasMap.get(id);
28703
+ if (existing) return existing;
28704
+ }
28705
+ if (!factory) return null;
28706
+ const canvas = wrapMiniAppNativeCanvas(factory(options), options);
28707
+ return null != id && canvasMap.set(id, canvas), canvas;
28708
+ }
28709
+
28710
+ const FEISHU_CANVAS_BRIDGE_ERROR = "Feishu canvas bridge is unavailable. VRender feishu env requires envParams.canvasFactory, a Stage canvas object, or a feishu/tt runtime that exposes createCanvasContext(id).";
28711
+ function getFeishuRuntime(params) {
28712
+ var _a, _b, _c, _d, _e;
28713
+ try {
28714
+ return null !== (_c = null !== (_b = null !== (_a = null == params ? void 0 : params.feishu) && void 0 !== _a ? _a : null == params ? void 0 : params.tt) && void 0 !== _b ? _b : null == params ? void 0 : params.runtime) && void 0 !== _c ? _c : "undefined" != typeof tt ? tt : void 0;
28715
+ } catch (_f) {
28716
+ return null !== (_e = null !== (_d = null == params ? void 0 : params.feishu) && void 0 !== _d ? _d : null == params ? void 0 : params.tt) && void 0 !== _e ? _e : null == params ? void 0 : params.runtime;
28717
+ }
28718
+ }
28719
+ function getFeishuPixelRatio(params, runtime = getFeishuRuntime(params)) {
28720
+ var _a, _b, _c, _d;
28721
+ return null !== (_d = null !== (_a = null == params ? void 0 : params.pixelRatio) && void 0 !== _a ? _a : null === (_c = null === (_b = null == runtime ? void 0 : runtime.getSystemInfoSync) || void 0 === _b ? void 0 : _b.call(runtime)) || void 0 === _c ? void 0 : _c.pixelRatio) && void 0 !== _d ? _d : 1;
28677
28722
  }
28678
28723
  class FeishuEnvContribution extends BaseEnvContribution {
28679
28724
  constructor() {
28680
- super(), this.type = "feishu", this.supportEvent = !0, this.canvasMap = new Map(), this.freeCanvasList = [], this.canvasIdx = 0, this.supportsTouchEvents = !0;
28725
+ super(), this.type = "feishu", this.supportEvent = !0, this.canvasMap = new Map(), this.feishuEnvParams = {}, this.supportsTouchEvents = !0;
28681
28726
  try {
28682
28727
  this.supportsPointerEvents = !!globalThis.PointerEvent, this.supportsMouseEvents = !!globalThis.MouseEvent;
28683
28728
  } catch (err) {
@@ -28686,13 +28731,13 @@ class FeishuEnvContribution extends BaseEnvContribution {
28686
28731
  this.applyStyles = !0;
28687
28732
  }
28688
28733
  getDynamicCanvasCount() {
28689
- return this.freeCanvasList.length;
28734
+ return 0;
28690
28735
  }
28691
28736
  getStaticCanvasCount() {
28692
28737
  return 9999;
28693
28738
  }
28694
- configure(service, params) {
28695
- service.env === this.type && (service.setActiveEnvContribution(this), makeUpCanvas$4(params.domref, params.canvasIdLists, this.canvasMap, params.freeCanvasIdx, this.freeCanvasList, params.pixelRatio));
28739
+ configure(service, params = {}) {
28740
+ service.env === this.type && (service.setActiveEnvContribution(this), this.feishuEnvParams = params);
28696
28741
  }
28697
28742
  loadImage(url) {
28698
28743
  return Promise.resolve({
@@ -28704,13 +28749,21 @@ class FeishuEnvContribution extends BaseEnvContribution {
28704
28749
  return Promise.reject();
28705
28750
  }
28706
28751
  createCanvas(params) {
28707
- const result = this.freeCanvasList[this.canvasIdx] || this.freeCanvasList[this.freeCanvasList.length - 1];
28708
- return this.canvasIdx++, result;
28752
+ var _a;
28753
+ const envParams = this.feishuEnvParams,
28754
+ runtime = getFeishuRuntime(envParams),
28755
+ dpr = null !== (_a = params.dpr) && void 0 !== _a ? _a : getFeishuPixelRatio(envParams, runtime),
28756
+ factoryCanvas = createCanvasWithFactory(params, dpr, this.canvasMap, envParams.canvasFactory);
28757
+ if (factoryCanvas) return factoryCanvas;
28758
+ const options = getMiniAppCanvasOptions(params, dpr, !1);
28759
+ if (null == options.id || "function" != typeof (null == runtime ? void 0 : runtime.createCanvasContext)) throw new Error(FEISHU_CANVAS_BRIDGE_ERROR);
28760
+ const canvas = wrapMiniAppContextCanvas(runtime.createCanvasContext(options.id), options);
28761
+ return this.canvasMap.set(options.id, canvas), canvas;
28709
28762
  }
28710
28763
  createOffscreenCanvas(params) {}
28711
28764
  releaseCanvas(canvas) {}
28712
28765
  getDevicePixelRatio() {
28713
- return tt.getSystemInfoSync().pixelRatio;
28766
+ return getFeishuPixelRatio(this.feishuEnvParams);
28714
28767
  }
28715
28768
  getRequestAnimationFrame() {
28716
28769
  return function (callback) {
@@ -28778,6 +28831,40 @@ let MiniAppEventManager$4 = class MiniAppEventManager {
28778
28831
  this.cache = {};
28779
28832
  }
28780
28833
  };
28834
+ function setMiniAppEventTarget$2(event, key, value) {
28835
+ if (event && value) try {
28836
+ event[key] = value;
28837
+ } catch (_a) {
28838
+ Object.defineProperty(event, key, {
28839
+ configurable: !0,
28840
+ value: value
28841
+ });
28842
+ }
28843
+ }
28844
+ function isValidCoordinate$3(value) {
28845
+ return "number" == typeof value && Number.isFinite(value);
28846
+ }
28847
+ function pickCoordinate$3(...values) {
28848
+ for (let i = 0; i < values.length; i++) if (isValidCoordinate$3(values[i])) return values[i];
28849
+ }
28850
+ function setHarmonyEventValue(event, key, value) {
28851
+ try {
28852
+ event[key] = value;
28853
+ } catch (_a) {
28854
+ Object.defineProperty(event, key, {
28855
+ configurable: !0,
28856
+ value: value
28857
+ });
28858
+ }
28859
+ }
28860
+ function normalizeHarmonyTouchEventPoint(event) {
28861
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s;
28862
+ const touch = null !== (_b = null === (_a = null == event ? void 0 : event.changedTouches) || void 0 === _a ? void 0 : _a[0]) && void 0 !== _b ? _b : null === (_c = null == event ? void 0 : event.touches) || void 0 === _c ? void 0 : _c[0];
28863
+ if (!touch) return;
28864
+ const x = pickCoordinate$3(event.x, event.offsetX, event.clientX, event.pageX, touch.x, touch.offsetX, touch.clientX, touch.pageX),
28865
+ y = pickCoordinate$3(event.y, event.offsetY, event.clientY, event.pageY, touch.y, touch.offsetY, touch.clientY, touch.pageY);
28866
+ null != x && null != y && (!event.touches && event.changedTouches && setHarmonyEventValue(event, "touches", "touchend" === event.type || "touchcancel" === event.type ? [] : event.changedTouches), setHarmonyEventValue(event, "x", x), setHarmonyEventValue(event, "y", y), setHarmonyEventValue(event, "offsetX", null !== (_d = event.offsetX) && void 0 !== _d ? _d : x), setHarmonyEventValue(event, "offsetY", null !== (_e = event.offsetY) && void 0 !== _e ? _e : y), setHarmonyEventValue(event, "clientX", null !== (_f = event.clientX) && void 0 !== _f ? _f : x), setHarmonyEventValue(event, "clientY", null !== (_g = event.clientY) && void 0 !== _g ? _g : y), setHarmonyEventValue(event, "pageX", null !== (_h = event.pageX) && void 0 !== _h ? _h : x), setHarmonyEventValue(event, "pageY", null !== (_j = event.pageY) && void 0 !== _j ? _j : y), touch.x = null !== (_k = touch.x) && void 0 !== _k ? _k : x, touch.y = null !== (_l = touch.y) && void 0 !== _l ? _l : y, touch.offsetX = null !== (_m = touch.offsetX) && void 0 !== _m ? _m : x, touch.offsetY = null !== (_o = touch.offsetY) && void 0 !== _o ? _o : y, touch.clientX = null !== (_p = touch.clientX) && void 0 !== _p ? _p : x, touch.clientY = null !== (_q = touch.clientY) && void 0 !== _q ? _q : y, touch.pageX = null !== (_r = touch.pageX) && void 0 !== _r ? _r : x, touch.pageY = null !== (_s = touch.pageY) && void 0 !== _s ? _s : y);
28867
+ }
28781
28868
  class HarmonyWindowHandlerContribution extends BaseWindowHandlerContribution {
28782
28869
  get container() {
28783
28870
  return null;
@@ -28806,7 +28893,8 @@ class HarmonyWindowHandlerContribution extends BaseWindowHandlerContribution {
28806
28893
  createWindowByConfig(params) {
28807
28894
  const nativeCanvas = this.global.createCanvas({
28808
28895
  width: params.width,
28809
- height: params.height
28896
+ height: params.height,
28897
+ dpr: params.dpr
28810
28898
  }),
28811
28899
  options = {
28812
28900
  width: params.width,
@@ -28821,7 +28909,12 @@ class HarmonyWindowHandlerContribution extends BaseWindowHandlerContribution {
28821
28909
  createWindowByCanvas(params) {
28822
28910
  let canvas;
28823
28911
  if ("string" == typeof params.canvas) {
28824
- if (canvas = this.global.getElementById(params.canvas), !canvas) throw new Error("canvasId 参数不正确,请确认canvas存在并插入dom");
28912
+ if (canvas = this.global.getElementById(params.canvas), canvas || (canvas = this.global.createCanvas({
28913
+ id: params.canvas,
28914
+ width: params.width,
28915
+ height: params.height,
28916
+ dpr: params.dpr
28917
+ })), !canvas) throw new Error("canvasId 参数不正确,请确认canvas存在并插入dom");
28825
28918
  } else canvas = params.canvas;
28826
28919
  let width = params.width,
28827
28920
  height = params.height;
@@ -28829,15 +28922,19 @@ class HarmonyWindowHandlerContribution extends BaseWindowHandlerContribution {
28829
28922
  const data = canvas.getBoundingClientRect();
28830
28923
  width = data.width, height = data.height;
28831
28924
  }
28832
- this.canvas = new HarmonyCanvas({
28925
+ let dpr = params.dpr;
28926
+ null == dpr && (dpr = canvas.width / width), this.canvas = new HarmonyCanvas({
28833
28927
  width: width,
28834
28928
  height: height,
28835
- dpr: 1,
28929
+ dpr: dpr,
28836
28930
  nativeCanvas: canvas,
28837
28931
  canvasControled: params.canvasControled
28838
28932
  });
28839
28933
  }
28840
- releaseWindow() {}
28934
+ releaseWindow() {
28935
+ var _a, _b;
28936
+ this.eventManager.cleanEvent(), null === (_b = null === (_a = this.canvas) || void 0 === _a ? void 0 : _a.release) || void 0 === _b || _b.call(_a);
28937
+ }
28841
28938
  resizeWindow(width, height) {
28842
28939
  this.canvas.resize(width, height);
28843
28940
  }
@@ -28860,12 +28957,15 @@ class HarmonyWindowHandlerContribution extends BaseWindowHandlerContribution {
28860
28957
  this.eventManager.removeEventListener(type, listener);
28861
28958
  }
28862
28959
  dispatchEvent(event) {
28960
+ var _a;
28863
28961
  const {
28864
28962
  type: type
28865
28963
  } = event;
28866
- return !!this.eventManager.cache[type] && (event.changedTouches && event.changedTouches[0] && (event.offsetX = event.changedTouches[0].x, event.changedTouches[0].offsetX = event.changedTouches[0].x, event.changedTouches[0].clientX = event.changedTouches[0].x, event.offsetY = event.changedTouches[0].y, event.changedTouches[0].offsetY = event.changedTouches[0].y, event.changedTouches[0].clientY = event.changedTouches[0].y), event.preventDefault = () => {}, event.stopPropagation = () => {}, this.eventManager.cache[type].listener && this.eventManager.cache[type].listener.forEach(f => {
28964
+ if (!this.eventManager.cache[type]) return !1;
28965
+ const nativeCanvas = null === (_a = this.canvas) || void 0 === _a ? void 0 : _a.nativeCanvas;
28966
+ return setMiniAppEventTarget$2(event, "target", nativeCanvas), setMiniAppEventTarget$2(event, "currentTarget", nativeCanvas), normalizeHarmonyTouchEventPoint(event), event.preventDefault = () => {}, event.stopPropagation = () => {}, this.eventManager.cache[type].listener && this.eventManager.cache[type].listener.forEach(f => {
28867
28967
  f(event);
28868
- }), !0);
28968
+ }), !0;
28869
28969
  }
28870
28970
  getStyle() {
28871
28971
  return {};
@@ -28897,24 +28997,89 @@ function bindHarmonyWindowContribution(container) {
28897
28997
  (null === (_a = container.isBound) || void 0 === _a ? void 0 : _a.call(container, HarmonyWindowHandlerContribution)) || container.bind(HarmonyWindowHandlerContribution).toSelf(), (null === (_b = container.getNamed) || void 0 === _b ? void 0 : _b.call(container, WindowHandlerContribution, HarmonyWindowHandlerContribution.env)) || container.bind(WindowHandlerContribution).toService(HarmonyWindowHandlerContribution).whenTargetNamed(HarmonyWindowHandlerContribution.env);
28898
28998
  }
28899
28999
 
28900
- function createCanvas(width, height, id) {
28901
- const _c = new OffscreenCanvas(width, height),
28902
- context = _c.getContext("2d");
28903
- return new CanvasWrapDisableWH({
29000
+ const HARMONY_CANVAS_BRIDGE_ERROR = "Harmony canvas bridge is unavailable. VRender Harmony env requires envParams.canvasFactory or a Harmony runtime that exposes a global createCanvas/createOffscreenCanvas capability.",
29001
+ HARMONY_CANVAS_SIZE_ERROR = "Harmony canvas size is unavailable. Pass stage width/height when creating a Harmony stage canvas.";
29002
+ function isValidCoordinate$2(value) {
29003
+ return "number" == typeof value && Number.isFinite(value);
29004
+ }
29005
+ function pickCoordinate$2(...values) {
29006
+ for (let i = 0; i < values.length; i++) if (isValidCoordinate$2(values[i])) return values[i];
29007
+ }
29008
+ function getPrimaryTouch$1(event) {
29009
+ var _a, _b, _c;
29010
+ return null !== (_b = null === (_a = null == event ? void 0 : event.changedTouches) || void 0 === _a ? void 0 : _a[0]) && void 0 !== _b ? _b : null === (_c = null == event ? void 0 : event.touches) || void 0 === _c ? void 0 : _c[0];
29011
+ }
29012
+ function getHarmonyEventPoint(event) {
29013
+ const touch = getPrimaryTouch$1(event),
29014
+ x = pickCoordinate$2(null == event ? void 0 : event.x, null == event ? void 0 : event.offsetX, null == event ? void 0 : event.clientX, null == event ? void 0 : event.pageX, null == touch ? void 0 : touch.x, null == touch ? void 0 : touch.offsetX, null == touch ? void 0 : touch.clientX, null == touch ? void 0 : touch.pageX),
29015
+ y = pickCoordinate$2(null == event ? void 0 : event.y, null == event ? void 0 : event.offsetY, null == event ? void 0 : event.clientY, null == event ? void 0 : event.pageY, null == touch ? void 0 : touch.y, null == touch ? void 0 : touch.offsetY, null == touch ? void 0 : touch.clientY, null == touch ? void 0 : touch.pageY);
29016
+ return null == x || null == y ? null : {
29017
+ x: x,
29018
+ y: y
29019
+ };
29020
+ }
29021
+ function getHarmonyRuntime(params) {
29022
+ var _a;
29023
+ return null !== (_a = null == params ? void 0 : params.harmony) && void 0 !== _a ? _a : null == params ? void 0 : params.runtime;
29024
+ }
29025
+ function getHarmonyPixelRatio(params) {
29026
+ var _a;
29027
+ return null !== (_a = null == params ? void 0 : params.pixelRatio) && void 0 !== _a ? _a : 1;
29028
+ }
29029
+ function getCanvasSize$1(width, height) {
29030
+ if (!isValidCoordinate$2(width) || !isValidCoordinate$2(height)) throw new Error(HARMONY_CANVAS_SIZE_ERROR);
29031
+ return {
29032
+ width: width,
29033
+ height: height
29034
+ };
29035
+ }
29036
+ function getGlobalOffscreenCanvasCtor() {
29037
+ try {
29038
+ return "undefined" != typeof OffscreenCanvas ? OffscreenCanvas : void 0;
29039
+ } catch (err) {
29040
+ return;
29041
+ }
29042
+ }
29043
+ function createFallbackOffscreenCanvas(width, height) {
29044
+ const OffscreenCanvasCtor = getGlobalOffscreenCanvasCtor();
29045
+ return "function" != typeof OffscreenCanvasCtor ? null : new OffscreenCanvasCtor(width, height);
29046
+ }
29047
+ function wrapHarmonyNativeCanvas(nativeCanvas, id, width, height, dpr) {
29048
+ var _a, _b, _c;
29049
+ nativeCanvas.width = width * dpr, nativeCanvas.height = height * dpr;
29050
+ const context = null !== (_b = null === (_a = nativeCanvas.getContext) || void 0 === _a ? void 0 : _a.call(nativeCanvas, "2d")) && void 0 !== _b ? _b : null === (_c = nativeCanvas.getContext) || void 0 === _c ? void 0 : _c.call(nativeCanvas);
29051
+ if (!context) throw new Error(HARMONY_CANVAS_BRIDGE_ERROR);
29052
+ return "function" != typeof nativeCanvas.getBoundingClientRect && (nativeCanvas.getBoundingClientRect = () => ({
29053
+ width: width,
29054
+ height: height
29055
+ })), new CanvasWrapEnableWH(nativeCanvas, context, dpr, width, height, id);
29056
+ }
29057
+ function createHarmonyNativeCanvas(id, width, height, dpr, offscreen, params, runtime) {
29058
+ const options = {
29059
+ id: id,
28904
29060
  width: width,
28905
29061
  height: height,
28906
- context: context,
28907
- _c: _c,
28908
- getBoundingClientRect: () => ({
28909
- width: width,
28910
- height: height
28911
- }),
28912
- getContext: () => context
28913
- }, context, 1, width, height, id);
29062
+ dpr: dpr,
29063
+ offscreen: offscreen
29064
+ };
29065
+ if (params.canvasFactory) return params.canvasFactory(options);
29066
+ if (offscreen && "function" == typeof (null == runtime ? void 0 : runtime.createOffscreenCanvas)) {
29067
+ const canvas = runtime.createOffscreenCanvas(options);
29068
+ if (canvas) return canvas;
29069
+ }
29070
+ if (!offscreen && "function" == typeof (null == runtime ? void 0 : runtime.createCanvas)) {
29071
+ const canvas = runtime.createCanvas(options);
29072
+ if (canvas) return canvas;
29073
+ }
29074
+ if (offscreen) {
29075
+ const canvas = createFallbackOffscreenCanvas(width * dpr, height * dpr);
29076
+ if (canvas) return canvas;
29077
+ }
29078
+ throw new Error(HARMONY_CANVAS_BRIDGE_ERROR);
28914
29079
  }
28915
29080
  class HarmonyEnvContribution extends BaseEnvContribution {
28916
29081
  constructor() {
28917
- super(), this.type = "harmony", this.supportEvent = !0, this.supportsTouchEvents = !0;
29082
+ super(), this.type = "harmony", this.supportEvent = !0, this.canvasMap = new Map(), this.freeCanvasList = [], this.canvasIdx = 0, this.supportsTouchEvents = !0;
28918
29083
  try {
28919
29084
  this.supportsPointerEvents = !!globalThis.PointerEvent, this.supportsMouseEvents = !!globalThis.MouseEvent;
28920
29085
  } catch (err) {
@@ -28922,8 +29087,8 @@ class HarmonyEnvContribution extends BaseEnvContribution {
28922
29087
  }
28923
29088
  this.applyStyles = !0, this.rafSTO = new RafBasedSTO(0);
28924
29089
  }
28925
- configure(service, params) {
28926
- service.env === this.type && service.setActiveEnvContribution(this);
29090
+ configure(service, params = {}) {
29091
+ service.env === this.type && (service.setActiveEnvContribution(this), this.harmonyEnvParams = params, this.harmonyRuntime = getHarmonyRuntime(params));
28927
29092
  }
28928
29093
  getDynamicCanvasCount() {
28929
29094
  return 9999;
@@ -28931,17 +29096,56 @@ class HarmonyEnvContribution extends BaseEnvContribution {
28931
29096
  getStaticCanvasCount() {
28932
29097
  return 9999;
28933
29098
  }
28934
- loadImage(url) {}
29099
+ loadImage(url) {
29100
+ var _a;
29101
+ if ("function" != typeof (null === (_a = this.harmonyRuntime) || void 0 === _a ? void 0 : _a.createImage)) return Promise.resolve({
29102
+ data: null,
29103
+ loadState: "fail"
29104
+ });
29105
+ const img = this.harmonyRuntime.createImage(url);
29106
+ return new Promise(resolve => {
29107
+ img.onload = () => {
29108
+ resolve({
29109
+ data: img,
29110
+ loadState: "success"
29111
+ });
29112
+ }, img.onerror = () => {
29113
+ resolve({
29114
+ data: null,
29115
+ loadState: "fail"
29116
+ });
29117
+ };
29118
+ });
29119
+ }
28935
29120
  loadSvg(url) {
28936
- return Promise.reject();
29121
+ return Promise.resolve({
29122
+ data: null,
29123
+ loadState: "fail"
29124
+ });
28937
29125
  }
28938
29126
  createCanvas(params) {
28939
- return createCanvas(params.width, params.height, params.id);
29127
+ var _a, _b;
29128
+ const envParams = null !== (_a = this.harmonyEnvParams) && void 0 !== _a ? _a : {},
29129
+ runtime = getHarmonyRuntime(envParams),
29130
+ dpr = null !== (_b = params.dpr) && void 0 !== _b ? _b : getHarmonyPixelRatio(envParams),
29131
+ size = getCanvasSize$1(params.width, params.height);
29132
+ if (null != params.id) {
29133
+ const id = String(params.id),
29134
+ existing = this.canvasMap.get(id);
29135
+ if (existing) return existing;
29136
+ const canvas = wrapHarmonyNativeCanvas(createHarmonyNativeCanvas(id, size.width, size.height, dpr, !1, envParams, runtime), id, size.width, size.height, dpr);
29137
+ return this.canvasMap.set(id, canvas), canvas;
29138
+ }
29139
+ const result = this.freeCanvasList[this.canvasIdx] || this.freeCanvasList[this.freeCanvasList.length - 1];
29140
+ if (this.canvasIdx++, result) return result;
29141
+ const id = Math.random().toString(),
29142
+ canvas = wrapHarmonyNativeCanvas(createHarmonyNativeCanvas(id, size.width, size.height, dpr, !0, envParams, runtime), id, size.width, size.height, dpr);
29143
+ return this.canvasMap.set(id, canvas), this.freeCanvasList.push(canvas), canvas;
28940
29144
  }
28941
29145
  createOffscreenCanvas(params) {}
28942
29146
  releaseCanvas(canvas) {}
28943
29147
  getDevicePixelRatio() {
28944
- return 1;
29148
+ return getHarmonyPixelRatio(this.harmonyEnvParams);
28945
29149
  }
28946
29150
  getRequestAnimationFrame() {
28947
29151
  return callback => this.rafSTO.call(callback);
@@ -28953,7 +29157,7 @@ class HarmonyEnvContribution extends BaseEnvContribution {
28953
29157
  }
28954
29158
  mapToCanvasPoint(event) {
28955
29159
  var _a;
28956
- return null === (_a = null == event ? void 0 : event.type) || void 0 === _a || _a.startsWith("mouse"), event;
29160
+ return null !== (_a = getHarmonyEventPoint(event)) && void 0 !== _a ? _a : event;
28957
29161
  }
28958
29162
  addEventListener(type, listener, options) {
28959
29163
  return null;
@@ -28965,7 +29169,8 @@ class HarmonyEnvContribution extends BaseEnvContribution {
28965
29169
  return null;
28966
29170
  }
28967
29171
  getElementById(str) {
28968
- return null;
29172
+ var _a;
29173
+ return null !== (_a = this.canvasMap.get(str)) && void 0 !== _a ? _a : null;
28969
29174
  }
28970
29175
  getRootElement() {
28971
29176
  return null;
@@ -29237,13 +29442,11 @@ function createBoundLynxCanvas(id, runtime) {
29237
29442
  }
29238
29443
  return null;
29239
29444
  }
29240
- function getCanvasSize(domref, width, height) {
29241
- const resolvedWidth = null != width ? width : null == domref ? void 0 : domref.width,
29242
- resolvedHeight = null != height ? height : null == domref ? void 0 : domref.height;
29243
- if (!isValidCoordinate(resolvedWidth) || !isValidCoordinate(resolvedHeight)) throw new Error(LYNX_CANVAS_SIZE_ERROR);
29445
+ function getCanvasSize(width, height) {
29446
+ if (!isValidCoordinate(width) || !isValidCoordinate(height)) throw new Error(LYNX_CANVAS_SIZE_ERROR);
29244
29447
  return {
29245
- width: resolvedWidth,
29246
- height: resolvedHeight
29448
+ width: width,
29449
+ height: height
29247
29450
  };
29248
29451
  }
29249
29452
  function wrapLynxNativeCanvas(nativeCanvas, id, width, height, dpr) {
@@ -29267,29 +29470,6 @@ function createLynxNativeCanvas(id, width, height, dpr, offscreen, params, runti
29267
29470
  }
29268
29471
  throw new Error(LYNX_CANVAS_BRIDGE_ERROR);
29269
29472
  }
29270
- function makeUpCanvas$3(params = {}, canvasMap, freeCanvasList) {
29271
- const runtime = getLynxRuntime(params),
29272
- {
29273
- domref: domref,
29274
- canvasIdLists = [],
29275
- freeCanvasIdx = 0
29276
- } = params,
29277
- offscreen = !!params.offscreen,
29278
- dpr = getLynxPixelRatio(params, runtime);
29279
- if (canvasIdLists.forEach((id, i) => {
29280
- const size = getCanvasSize(domref),
29281
- canvas = wrapLynxNativeCanvas(createLynxNativeCanvas(id, size.width, size.height, dpr, offscreen, params, runtime), id, size.width, size.height, dpr);
29282
- canvasMap.set(id, canvas), i > freeCanvasIdx && freeCanvasList.push(canvas);
29283
- }), !freeCanvasList.length && domref && "function" == typeof (null == runtime ? void 0 : runtime.createOffscreenCanvas)) {
29284
- const size = getCanvasSize(domref),
29285
- _canvas = runtime.createOffscreenCanvas();
29286
- _canvas.width = size.width * dpr, _canvas.height = size.height * dpr;
29287
- const ctx = _canvas.getContext("2d"),
29288
- id = Math.random().toString(),
29289
- canvas = new CanvasWrapEnableWH(_canvas, ctx, dpr, size.width, size.height, id);
29290
- canvasMap.set(id, canvas), freeCanvasList.push(canvas);
29291
- }
29292
- }
29293
29473
  function createImageElement(src, isSvg = !1, runtime = getGlobalLynxRuntime()) {
29294
29474
  if (isSvg) return Promise.reject();
29295
29475
  if ("function" != typeof (null == runtime ? void 0 : runtime.createImage)) return Promise.reject(new Error("Lynx image bridge is unavailable."));
@@ -29313,7 +29493,7 @@ class LynxEnvContribution extends BaseEnvContribution {
29313
29493
  this.applyStyles = !0;
29314
29494
  }
29315
29495
  configure(service, params = {}) {
29316
- service.env === this.type && (service.setActiveEnvContribution(this), this.lynxEnvParams = params, this.lynxRuntime = getLynxRuntime(params), makeUpCanvas$3(params, this.canvasMap, this.freeCanvasList));
29496
+ service.env === this.type && (service.setActiveEnvContribution(this), this.lynxEnvParams = params, this.lynxRuntime = getLynxRuntime(params));
29317
29497
  }
29318
29498
  getDynamicCanvasCount() {
29319
29499
  return this.freeCanvasList.length;
@@ -29345,7 +29525,7 @@ class LynxEnvContribution extends BaseEnvContribution {
29345
29525
  const envParams = null !== (_a = this.lynxEnvParams) && void 0 !== _a ? _a : {},
29346
29526
  runtime = getLynxRuntime(envParams),
29347
29527
  dpr = null !== (_b = params.dpr) && void 0 !== _b ? _b : getLynxPixelRatio(envParams, runtime),
29348
- size = getCanvasSize(envParams.domref, params.width, params.height),
29528
+ size = getCanvasSize(params.width, params.height),
29349
29529
  canvas = wrapLynxNativeCanvas(createLynxNativeCanvas(id, size.width, size.height, dpr, !1, envParams, runtime), id, size.width, size.height, dpr);
29350
29530
  return this.canvasMap.set(id, canvas), canvas;
29351
29531
  }
@@ -29354,7 +29534,7 @@ class LynxEnvContribution extends BaseEnvContribution {
29354
29534
  const envParams = null !== (_c = this.lynxEnvParams) && void 0 !== _c ? _c : {},
29355
29535
  runtime = getLynxRuntime(envParams),
29356
29536
  dpr = null !== (_d = params.dpr) && void 0 !== _d ? _d : getLynxPixelRatio(envParams, runtime),
29357
- size = getCanvasSize(envParams.domref, params.width, params.height),
29537
+ size = getCanvasSize(params.width, params.height),
29358
29538
  id = Math.random().toString(),
29359
29539
  canvas = wrapLynxNativeCanvas(createLynxNativeCanvas(id, size.width, size.height, dpr, !0, envParams, runtime), id, size.width, size.height, dpr);
29360
29540
  return this.canvasMap.set(id, canvas), this.freeCanvasList.push(canvas), canvas;
@@ -29665,7 +29845,12 @@ class TaroWindowHandlerContribution extends BaseWindowHandlerContribution {
29665
29845
  createWindowByCanvas(params) {
29666
29846
  let canvas;
29667
29847
  if ("string" == typeof params.canvas) {
29668
- if (canvas = this.global.getElementById(params.canvas), !canvas) throw new Error("canvasId 参数不正确,请确认canvas存在并插入dom");
29848
+ if (canvas = this.global.getElementById(params.canvas), canvas || (canvas = this.global.createCanvas({
29849
+ id: params.canvas,
29850
+ width: params.width,
29851
+ height: params.height,
29852
+ dpr: params.dpr
29853
+ })), !canvas) throw new Error("canvasId 参数不正确,请确认canvas存在并插入dom");
29669
29854
  } else canvas = params.canvas;
29670
29855
  let width = params.width,
29671
29856
  height = params.height;
@@ -29750,16 +29935,10 @@ function bindTaroWindowContribution(container) {
29750
29935
  (null === (_a = container.isBound) || void 0 === _a ? void 0 : _a.call(container, TaroWindowHandlerContribution)) || container.bind(TaroWindowHandlerContribution).toSelf(), (null === (_b = container.getNamed) || void 0 === _b ? void 0 : _b.call(container, WindowHandlerContribution, TaroWindowHandlerContribution.env)) || container.bind(WindowHandlerContribution).toService(TaroWindowHandlerContribution).whenTargetNamed(TaroWindowHandlerContribution.env);
29751
29936
  }
29752
29937
 
29753
- function makeUpCanvas$2(domref, canvasIdLists, canvasMap, freeCanvasIdx, freeCanvasList, taro, dpr) {
29754
- canvasIdLists.forEach((id, i) => {
29755
- const ctx = taro.createCanvasContext(id),
29756
- canvas = new CanvasWrapDisableWH(ctx.canvas || {}, ctx, dpr, domref.width, domref.height, id);
29757
- return ctx.canvas = canvas, canvasMap.set(id, canvas), i >= freeCanvasIdx && freeCanvasList.push(canvas), canvas;
29758
- });
29759
- }
29938
+ const TARO_CANVAS_BRIDGE_ERROR = "Taro canvas bridge is unavailable. VRender taro env requires envParams.canvasFactory, a Stage canvas object, or envParams.taro.createCanvasContext(id).";
29760
29939
  class TaroEnvContribution extends BaseEnvContribution {
29761
29940
  constructor() {
29762
- super(), this.type = "taro", this.supportEvent = !0, this.canvasMap = new Map(), this.freeCanvasList = [], this.canvasIdx = 0, this.supportsTouchEvents = !0;
29941
+ super(), this.type = "taro", this.supportEvent = !0, this.canvasMap = new Map(), this.pixelRatio = 1, this.taroEnvParams = {}, this.supportsTouchEvents = !0;
29763
29942
  try {
29764
29943
  this.supportsPointerEvents = !!globalThis.PointerEvent, this.supportsMouseEvents = !!globalThis.MouseEvent;
29765
29944
  } catch (err) {
@@ -29768,7 +29947,7 @@ class TaroEnvContribution extends BaseEnvContribution {
29768
29947
  this.applyStyles = !0;
29769
29948
  }
29770
29949
  getDynamicCanvasCount() {
29771
- return this.freeCanvasList.length;
29950
+ return 0;
29772
29951
  }
29773
29952
  getStaticCanvasCount() {
29774
29953
  return 9999;
@@ -29777,8 +29956,9 @@ class TaroEnvContribution extends BaseEnvContribution {
29777
29956
  var _a;
29778
29957
  return null === (_a = null == event ? void 0 : event.type) || void 0 === _a || _a.startsWith("mouse"), event;
29779
29958
  }
29780
- configure(service, params) {
29781
- service.env === this.type && (service.setActiveEnvContribution(this), makeUpCanvas$2(params.domref, params.canvasIdLists, this.canvasMap, params.freeCanvasIdx, this.freeCanvasList, params.taro, params.pixelRatio), this.taro = params.taro, this.pixelRatio = params.pixelRatio);
29959
+ configure(service, params = {}) {
29960
+ var _a;
29961
+ service.env === this.type && (service.setActiveEnvContribution(this), this.taroEnvParams = params, this.taro = params.taro, this.pixelRatio = null !== (_a = params.pixelRatio) && void 0 !== _a ? _a : 1);
29782
29962
  }
29783
29963
  loadImage(url) {
29784
29964
  return Promise.resolve({
@@ -29787,7 +29967,7 @@ class TaroEnvContribution extends BaseEnvContribution {
29787
29967
  });
29788
29968
  }
29789
29969
  loadSvg(svgStr) {
29790
- const _window = window || globalThis;
29970
+ const _window = "undefined" != typeof window ? window : globalThis;
29791
29971
  if (_window.DOMParser) {
29792
29972
  const svg = new _window.DOMParser().parseFromString(svgStr, "image/svg+xml").children[0],
29793
29973
  data = new XMLSerializer().serializeToString(svg),
@@ -29810,8 +29990,15 @@ class TaroEnvContribution extends BaseEnvContribution {
29810
29990
  return Promise.reject();
29811
29991
  }
29812
29992
  createCanvas(params) {
29813
- const result = this.freeCanvasList[this.canvasIdx] || this.freeCanvasList[this.freeCanvasList.length - 1];
29814
- return this.canvasIdx++, result;
29993
+ var _a, _b;
29994
+ const envParams = this.taroEnvParams,
29995
+ dpr = null !== (_a = params.dpr) && void 0 !== _a ? _a : this.getDevicePixelRatio(),
29996
+ factoryCanvas = createCanvasWithFactory(params, dpr, this.canvasMap, envParams.canvasFactory);
29997
+ if (factoryCanvas) return factoryCanvas;
29998
+ const options = getMiniAppCanvasOptions(params, dpr, !1);
29999
+ if (null == options.id || "function" != typeof (null === (_b = envParams.taro) || void 0 === _b ? void 0 : _b.createCanvasContext)) throw new Error(TARO_CANVAS_BRIDGE_ERROR);
30000
+ const canvas = wrapMiniAppContextCanvas(envParams.taro.createCanvasContext(options.id), options);
30001
+ return this.canvasMap.set(options.id, canvas), canvas;
29815
30002
  }
29816
30003
  createOffscreenCanvas(params) {}
29817
30004
  releaseCanvas(canvas) {}
@@ -29919,7 +30106,12 @@ class TTWindowHandlerContribution extends BaseWindowHandlerContribution {
29919
30106
  createWindowByCanvas(params) {
29920
30107
  let canvas;
29921
30108
  if ("string" == typeof params.canvas) {
29922
- if (canvas = this.global.getElementById(params.canvas), !canvas) throw new Error("canvasId 参数不正确,请确认canvas存在并插入dom");
30109
+ if (canvas = this.global.getElementById(params.canvas), canvas || (canvas = this.global.createCanvas({
30110
+ id: params.canvas,
30111
+ width: params.width,
30112
+ height: params.height,
30113
+ dpr: params.dpr
30114
+ })), !canvas) throw new Error("canvasId 参数不正确,请确认canvas存在并插入dom");
29923
30115
  } else canvas = params.canvas;
29924
30116
  let width = params.width,
29925
30117
  height = params.height;
@@ -29994,51 +30186,22 @@ function bindTTWindowContribution(container) {
29994
30186
  (null === (_a = container.isBound) || void 0 === _a ? void 0 : _a.call(container, TTWindowHandlerContribution)) || container.bind(TTWindowHandlerContribution).toSelf(), (null === (_b = container.getNamed) || void 0 === _b ? void 0 : _b.call(container, WindowHandlerContribution, TTWindowHandlerContribution.env)) || container.bind(WindowHandlerContribution).toService(TTWindowHandlerContribution).whenTargetNamed(TTWindowHandlerContribution.env);
29995
30187
  }
29996
30188
 
29997
- var __awaiter$2 = undefined && undefined.__awaiter || function (thisArg, _arguments, P, generator) {
29998
- return new (P || (P = Promise))(function (resolve, reject) {
29999
- function fulfilled(value) {
30000
- try {
30001
- step(generator.next(value));
30002
- } catch (e) {
30003
- reject(e);
30004
- }
30005
- }
30006
- function rejected(value) {
30007
- try {
30008
- step(generator.throw(value));
30009
- } catch (e) {
30010
- reject(e);
30011
- }
30012
- }
30013
- function step(result) {
30014
- var value;
30015
- result.done ? resolve(result.value) : (value = result.value, value instanceof P ? value : new P(function (resolve) {
30016
- resolve(value);
30017
- })).then(fulfilled, rejected);
30018
- }
30019
- step((generator = generator.apply(thisArg, _arguments || [])).next());
30020
- });
30021
- };
30022
- function makeUpCanvas$1(domref, canvasIdLists, canvasMap, freeCanvasIdx, freeCanvasList, component) {
30023
- return __awaiter$2(this, void 0, void 0, function* () {
30024
- const dpr = tt.getSystemInfoSync().pixelRatio;
30025
- for (let i = 0; i < canvasIdLists.length; i++) {
30026
- const id = canvasIdLists[i];
30027
- yield new Promise(resolve => {
30028
- let data = tt.createSelectorQuery();
30029
- component && (data = data.in(component)), data.select(`#${id}`).node().exec(res => {
30030
- const canvas = res[0].node,
30031
- width = canvas.width,
30032
- height = canvas.height;
30033
- canvas.width = width * dpr, canvas.height = height * dpr, canvasMap.set(id, canvas), i >= freeCanvasIdx && freeCanvasList.push(canvas), resolve(null);
30034
- });
30035
- });
30036
- }
30037
- });
30189
+ const TT_CANVAS_BRIDGE_ERROR = "TT canvas bridge is unavailable. VRender tt env requires envParams.canvasFactory, a Stage canvas object, or a tt runtime that exposes createCanvasContext(id).";
30190
+ function getTTRuntime(params) {
30191
+ var _a, _b, _c;
30192
+ try {
30193
+ return null !== (_b = null !== (_a = null == params ? void 0 : params.tt) && void 0 !== _a ? _a : null == params ? void 0 : params.runtime) && void 0 !== _b ? _b : "undefined" != typeof tt ? tt : void 0;
30194
+ } catch (_d) {
30195
+ return null !== (_c = null == params ? void 0 : params.tt) && void 0 !== _c ? _c : null == params ? void 0 : params.runtime;
30196
+ }
30197
+ }
30198
+ function getTTPixelRatio(params, runtime = getTTRuntime(params)) {
30199
+ var _a, _b, _c, _d;
30200
+ return null !== (_d = null !== (_a = null == params ? void 0 : params.pixelRatio) && void 0 !== _a ? _a : null === (_c = null === (_b = null == runtime ? void 0 : runtime.getSystemInfoSync) || void 0 === _b ? void 0 : _b.call(runtime)) || void 0 === _c ? void 0 : _c.pixelRatio) && void 0 !== _d ? _d : 1;
30038
30201
  }
30039
30202
  class TTEnvContribution extends BaseEnvContribution {
30040
30203
  constructor() {
30041
- super(), this.type = "tt", this.supportEvent = !0, this.canvasMap = new Map(), this.freeCanvasList = [], this.canvasIdx = 0, this.supportsTouchEvents = !0;
30204
+ super(), this.type = "tt", this.supportEvent = !0, this.canvasMap = new Map(), this.ttEnvParams = {}, this.supportsTouchEvents = !0;
30042
30205
  try {
30043
30206
  this.supportsPointerEvents = !!globalThis.PointerEvent, this.supportsMouseEvents = !!globalThis.MouseEvent;
30044
30207
  } catch (err) {
@@ -30046,8 +30209,8 @@ class TTEnvContribution extends BaseEnvContribution {
30046
30209
  }
30047
30210
  this.applyStyles = !0;
30048
30211
  }
30049
- configure(service, params) {
30050
- if (service.env === this.type) return service.setActiveEnvContribution(this), makeUpCanvas$1(params.domref, params.canvasIdLists, this.canvasMap, params.freeCanvasIdx, this.freeCanvasList, params.component).then(() => {});
30212
+ configure(service, params = {}) {
30213
+ service.env === this.type && (service.setActiveEnvContribution(this), this.ttEnvParams = params);
30051
30214
  }
30052
30215
  loadImage(url) {
30053
30216
  return Promise.resolve({
@@ -30059,13 +30222,21 @@ class TTEnvContribution extends BaseEnvContribution {
30059
30222
  return Promise.reject();
30060
30223
  }
30061
30224
  createCanvas(params) {
30062
- const result = this.freeCanvasList[this.canvasIdx] || this.freeCanvasList[this.freeCanvasList.length - 1];
30063
- return this.canvasIdx++, result;
30225
+ var _a;
30226
+ const envParams = this.ttEnvParams,
30227
+ runtime = getTTRuntime(envParams),
30228
+ dpr = null !== (_a = params.dpr) && void 0 !== _a ? _a : getTTPixelRatio(envParams, runtime),
30229
+ factoryCanvas = createCanvasWithFactory(params, dpr, this.canvasMap, envParams.canvasFactory);
30230
+ if (factoryCanvas) return factoryCanvas;
30231
+ const options = getMiniAppCanvasOptions(params, dpr, !1);
30232
+ if (null == options.id || "function" != typeof (null == runtime ? void 0 : runtime.createCanvasContext)) throw new Error(TT_CANVAS_BRIDGE_ERROR);
30233
+ const canvas = wrapMiniAppContextCanvas(runtime.createCanvasContext(options.id), options);
30234
+ return this.canvasMap.set(options.id, canvas), canvas;
30064
30235
  }
30065
30236
  createOffscreenCanvas(params) {}
30066
30237
  releaseCanvas(canvas) {}
30067
30238
  getDevicePixelRatio() {
30068
- return tt.getSystemInfoSync().pixelRatio;
30239
+ return getTTPixelRatio(this.ttEnvParams);
30069
30240
  }
30070
30241
  getRequestAnimationFrame() {
30071
30242
  return function (callback) {
@@ -30186,7 +30357,12 @@ class WxWindowHandlerContribution extends BaseWindowHandlerContribution {
30186
30357
  createWindowByCanvas(params) {
30187
30358
  let canvas;
30188
30359
  if ("string" == typeof params.canvas) {
30189
- if (canvas = this.global.getElementById(params.canvas), !canvas) throw new Error("canvasId 参数不正确,请确认canvas存在并插入dom");
30360
+ if (canvas = this.global.getElementById(params.canvas), canvas || (canvas = this.global.createCanvas({
30361
+ id: params.canvas,
30362
+ width: params.width,
30363
+ height: params.height,
30364
+ dpr: params.dpr
30365
+ })), !canvas) throw new Error("canvasId 参数不正确,请确认canvas存在并插入dom");
30190
30366
  } else canvas = params.canvas;
30191
30367
  let width = params.width,
30192
30368
  height = params.height;
@@ -30264,55 +30440,22 @@ function bindWxWindowContribution(container) {
30264
30440
  (null === (_a = container.isBound) || void 0 === _a ? void 0 : _a.call(container, WxWindowHandlerContribution)) || container.bind(WxWindowHandlerContribution).toSelf(), (null === (_b = container.getNamed) || void 0 === _b ? void 0 : _b.call(container, WindowHandlerContribution, WxWindowHandlerContribution.env)) || container.bind(WindowHandlerContribution).toService(WxWindowHandlerContribution).whenTargetNamed(WxWindowHandlerContribution.env);
30265
30441
  }
30266
30442
 
30267
- var __awaiter$1 = undefined && undefined.__awaiter || function (thisArg, _arguments, P, generator) {
30268
- return new (P || (P = Promise))(function (resolve, reject) {
30269
- function fulfilled(value) {
30270
- try {
30271
- step(generator.next(value));
30272
- } catch (e) {
30273
- reject(e);
30274
- }
30275
- }
30276
- function rejected(value) {
30277
- try {
30278
- step(generator.throw(value));
30279
- } catch (e) {
30280
- reject(e);
30281
- }
30282
- }
30283
- function step(result) {
30284
- var value;
30285
- result.done ? resolve(result.value) : (value = result.value, value instanceof P ? value : new P(function (resolve) {
30286
- resolve(value);
30287
- })).then(fulfilled, rejected);
30288
- }
30289
- step((generator = generator.apply(thisArg, _arguments || [])).next());
30290
- });
30291
- };
30292
- function makeUpCanvas(domref, canvasIdLists, canvasMap, freeCanvasIdx, freeCanvasList, component, forceUpdate) {
30293
- return __awaiter$1(this, void 0, void 0, function* () {
30294
- const dpr = wx.getSystemInfoSync().pixelRatio;
30295
- for (let i = 0; i < canvasIdLists.length; i++) {
30296
- const id = canvasIdLists[i];
30297
- !forceUpdate && canvasMap.has(id) || (yield new Promise(resolve => {
30298
- let data = wx.createSelectorQuery();
30299
- component && (data = data.in(component)), data.select(`#${id}`).fields({
30300
- node: !0,
30301
- size: !0
30302
- }).exec(res => {
30303
- if (!res[0]) return;
30304
- const canvas = res[0].node,
30305
- width = res[0].width,
30306
- height = res[0].height;
30307
- canvas.width = width * dpr, canvas.height = height * dpr, canvasMap.set(id, canvas), i >= freeCanvasIdx && freeCanvasList.push(canvas), resolve(null);
30308
- });
30309
- }));
30310
- }
30311
- });
30443
+ const WX_CANVAS_BRIDGE_ERROR = "Wx canvas bridge is unavailable. VRender wx env requires envParams.canvasFactory, a Stage canvas object, or a wx runtime that exposes createCanvasContext(id).";
30444
+ function getWxRuntime(params) {
30445
+ var _a, _b, _c;
30446
+ try {
30447
+ return null !== (_b = null !== (_a = null == params ? void 0 : params.wx) && void 0 !== _a ? _a : null == params ? void 0 : params.runtime) && void 0 !== _b ? _b : "undefined" != typeof wx ? wx : void 0;
30448
+ } catch (_d) {
30449
+ return null !== (_c = null == params ? void 0 : params.wx) && void 0 !== _c ? _c : null == params ? void 0 : params.runtime;
30450
+ }
30451
+ }
30452
+ function getWxPixelRatio(params, runtime = getWxRuntime(params)) {
30453
+ var _a, _b, _c, _d;
30454
+ return null !== (_d = null !== (_a = null == params ? void 0 : params.pixelRatio) && void 0 !== _a ? _a : null === (_c = null === (_b = null == runtime ? void 0 : runtime.getSystemInfoSync) || void 0 === _b ? void 0 : _b.call(runtime)) || void 0 === _c ? void 0 : _c.pixelRatio) && void 0 !== _d ? _d : 1;
30312
30455
  }
30313
30456
  class WxEnvContribution extends BaseEnvContribution {
30314
30457
  constructor() {
30315
- super(), this.type = "wx", this.supportEvent = !0, this.canvasMap = new Map(), this.freeCanvasList = [], this.canvasIdx = 0, this.supportsTouchEvents = !0;
30458
+ super(), this.type = "wx", this.supportEvent = !0, this.canvasMap = new Map(), this.wxEnvParams = {}, this.supportsTouchEvents = !0;
30316
30459
  try {
30317
30460
  this.supportsPointerEvents = !!globalThis.PointerEvent, this.supportsMouseEvents = !!globalThis.MouseEvent;
30318
30461
  } catch (err) {
@@ -30320,8 +30463,8 @@ class WxEnvContribution extends BaseEnvContribution {
30320
30463
  }
30321
30464
  this.applyStyles = !0;
30322
30465
  }
30323
- configure(service, params) {
30324
- if (service.env === this.type) return service.setActiveEnvContribution(this), makeUpCanvas(params.domref, params.canvasIdLists, this.canvasMap, params.freeCanvasIdx, this.freeCanvasList, params.component, params.forceUpdate).then(() => {});
30466
+ configure(service, params = {}) {
30467
+ service.env === this.type && (service.setActiveEnvContribution(this), this.wxEnvParams = params);
30325
30468
  }
30326
30469
  loadImage(url) {
30327
30470
  return Promise.resolve({
@@ -30336,13 +30479,21 @@ class WxEnvContribution extends BaseEnvContribution {
30336
30479
  });
30337
30480
  }
30338
30481
  createCanvas(params) {
30339
- const result = this.freeCanvasList[this.canvasIdx] || this.freeCanvasList[this.freeCanvasList.length - 1];
30340
- return this.canvasIdx++, result;
30482
+ var _a;
30483
+ const envParams = this.wxEnvParams,
30484
+ runtime = getWxRuntime(envParams),
30485
+ dpr = null !== (_a = params.dpr) && void 0 !== _a ? _a : getWxPixelRatio(envParams, runtime),
30486
+ factoryCanvas = createCanvasWithFactory(params, dpr, this.canvasMap, envParams.canvasFactory);
30487
+ if (factoryCanvas) return factoryCanvas;
30488
+ const options = getMiniAppCanvasOptions(params, dpr, !1);
30489
+ if (null == options.id || "function" != typeof (null == runtime ? void 0 : runtime.createCanvasContext)) throw new Error(WX_CANVAS_BRIDGE_ERROR);
30490
+ const canvas = wrapMiniAppContextCanvas(runtime.createCanvasContext(options.id), options);
30491
+ return this.canvasMap.set(options.id, canvas), canvas;
30341
30492
  }
30342
30493
  createOffscreenCanvas(params) {}
30343
30494
  releaseCanvas(canvas) {}
30344
30495
  getDevicePixelRatio() {
30345
- return wx.getSystemInfoSync().pixelRatio;
30496
+ return getWxPixelRatio(this.wxEnvParams);
30346
30497
  }
30347
30498
  getRequestAnimationFrame() {
30348
30499
  return function (callback) {
@@ -45363,14 +45514,6 @@ var __rest$9 = undefined && undefined.__rest || function (s, e) {
45363
45514
  }
45364
45515
  return t;
45365
45516
  };
45366
- function cloneAttributeSnapshot(value) {
45367
- if (!isObject$1(value) || isArray$1(value)) return value;
45368
- const snapshot = {};
45369
- return Object.keys(value).forEach(key => {
45370
- const nextValue = value[key];
45371
- snapshot[key] = isObject$1(nextValue) && !isArray$1(nextValue) ? cloneAttributeSnapshot(nextValue) : nextValue;
45372
- }), snapshot;
45373
- }
45374
45517
  loadLabelComponent();
45375
45518
  class LabelBase extends AnimateComponent {
45376
45519
  setBitmap(bitmap) {
@@ -45414,7 +45557,7 @@ class LabelBase extends AnimateComponent {
45414
45557
  }
45415
45558
  labeling(textBounds, graphicBounds, position, offset) {}
45416
45559
  _getLabelLinePoints(text, baseMark) {
45417
- return connectLineBetweenBounds(text.AABBBounds, null == baseMark ? void 0 : baseMark.AABBBounds);
45560
+ return connectLineBetweenBounds(text.AABBBounds, this.getGraphicFinalLayoutBounds(baseMark));
45418
45561
  }
45419
45562
  _createLabelLine(text, baseMark) {
45420
45563
  const points = this._getLabelLinePoints(text, baseMark);
@@ -45482,11 +45625,8 @@ class LabelBase extends AnimateComponent {
45482
45625
  }
45483
45626
  render() {
45484
45627
  if (this._exitReleaseState) return;
45485
- if (this._prepare(), isNil$1(this._idToGraphic) || this._isCollectionBase && isNil$1(this._idToPoint)) return;
45486
- const markAttributeList = [];
45487
- !1 !== this._enableAnimation && this._baseMarks.forEach(mark => {
45488
- markAttributeList.push(cloneAttributeSnapshot(mark.attribute)), mark.initAttributes(this.getGraphicFinalLayoutAttributes(mark));
45489
- });
45628
+ if (this._finalLayoutBoundsCache = void 0, this._prepare(), isNil$1(this._idToGraphic) || this._isCollectionBase && isNil$1(this._idToPoint)) return;
45629
+ this._finalLayoutBoundsCache = new Map();
45490
45630
  const {
45491
45631
  overlap: overlap,
45492
45632
  smartInvert: smartInvert,
@@ -45511,9 +45651,7 @@ class LabelBase extends AnimateComponent {
45511
45651
  }
45512
45652
  isFunction$1(customOverlapFunc) ? labels = customOverlapFunc(overlapLabels, this.getRelatedGraphic.bind(this), this._isCollectionBase ? d => this._idToPoint.get(d.id) : null, this).concat(filteredLabels) : !1 !== overlap && (labels = this._overlapping(overlapLabels).concat(filteredLabels)), isFunction$1(this.attribute.onAfterOverlapping) && this.attribute.onAfterOverlapping(labels, this.getRelatedGraphic.bind(this), this._isCollectionBase ? d => this._idToPoint.get(d.id) : null, this), labels && labels.length && labels.forEach(label => {
45513
45653
  this._bindEvent(label), this._setStatesOfText(label);
45514
- }), !1 !== smartInvert && this._smartInvert(labels), this._renderLabels(labels), !1 !== this._enableAnimation && this._baseMarks.forEach((mark, index) => {
45515
- mark.initAttributes(markAttributeList[index]);
45516
- });
45654
+ }), !1 !== smartInvert && this._smartInvert(labels), this._renderLabels(labels), this._finalLayoutBoundsCache = void 0;
45517
45655
  }
45518
45656
  _bindEvent(target) {
45519
45657
  if (this.attribute.disableTriggerEvent) return;
@@ -45580,6 +45718,24 @@ class LabelBase extends AnimateComponent {
45580
45718
  var _a;
45581
45719
  return !!(null === (_a = null == graphic ? void 0 : graphic.context) || void 0 === _a ? void 0 : _a.finalAttrs);
45582
45720
  }
45721
+ shouldUseGraphicFinalLayoutAttributes(graphic) {
45722
+ var _a;
45723
+ return !!graphic && (!!(null === (_a = graphic.context) || void 0 === _a ? void 0 : _a.animationState) || this.hasGraphicContextFinalLayoutAttributes(graphic));
45724
+ }
45725
+ getGraphicFinalLayoutBounds(graphic) {
45726
+ var _a, _b;
45727
+ if (!graphic) return;
45728
+ const useFinalAttrs = this.shouldUseGraphicFinalLayoutAttributes(graphic),
45729
+ graphicAttrs = useFinalAttrs ? this.getGraphicFinalLayoutAttributes(graphic) : graphic.attribute;
45730
+ if (!1 === (null == graphicAttrs ? void 0 : graphicAttrs.visible)) return;
45731
+ if (!useFinalAttrs) return graphic.AABBBounds;
45732
+ const cachedBounds = null === (_a = this._finalLayoutBoundsCache) || void 0 === _a ? void 0 : _a.get(graphic);
45733
+ if (cachedBounds) return cachedBounds;
45734
+ const clonedGraphic = graphic.clone();
45735
+ clonedGraphic.initAttributes(Object.assign(Object.assign({}, clonedGraphic.attribute), graphicAttrs));
45736
+ const bounds = clonedGraphic.AABBBounds;
45737
+ return null === (_b = this._finalLayoutBoundsCache) || void 0 === _b || _b.set(graphic, bounds), bounds;
45738
+ }
45583
45739
  _initText(data = []) {
45584
45740
  const {
45585
45741
  textStyle = {}
@@ -45727,7 +45883,8 @@ class LabelBase extends AnimateComponent {
45727
45883
  result = [],
45728
45884
  checkBounds = strategy.some(s => "bound" === s.type);
45729
45885
  avoidBaseMark && (null === (_a = this._baseMarks) || void 0 === _a || _a.forEach(mark => {
45730
- mark.AABBBounds && bitmap.setRange(boundToRange(bmpTool, mark.AABBBounds, !0));
45886
+ const markBounds = this.getGraphicFinalLayoutBounds(mark);
45887
+ markBounds && bitmap.setRange(boundToRange(bmpTool, markBounds, !0));
45731
45888
  })), avoidMarks.length > 0 && avoidMarks.forEach(avoid => {
45732
45889
  isString$1(avoid) ? getNoneGroupMarksByName(this.getRootNode(), avoid).forEach(avoidMark => {
45733
45890
  avoidMark.AABBBounds && bitmap.setRange(boundToRange(bmpTool, avoidMark.AABBBounds, !0));
@@ -45743,7 +45900,7 @@ class LabelBase extends AnimateComponent {
45743
45900
  bitmap.setRange(boundToRange(bmpTool, text.AABBBounds, !0)), result.push(text);
45744
45901
  continue;
45745
45902
  }
45746
- if (checkBounds && baseMark && baseMark.AABBBounds && this._canPlaceInside(text.AABBBounds, baseMark.AABBBounds)) {
45903
+ if (checkBounds && baseMark && this._canPlaceInside(text.AABBBounds, this.getGraphicFinalLayoutBounds(baseMark))) {
45747
45904
  bitmap.setRange(boundToRange(bmpTool, text.AABBBounds, !0)), result.push(text);
45748
45905
  continue;
45749
45906
  }
@@ -45768,6 +45925,7 @@ class LabelBase extends AnimateComponent {
45768
45925
  return result;
45769
45926
  }
45770
45927
  isMarkInsideRect(baseMark, bmpTool) {
45928
+ if (!baseMark) return !1;
45771
45929
  const {
45772
45930
  left: left,
45773
45931
  right: right,
@@ -45780,11 +45938,9 @@ class LabelBase extends AnimateComponent {
45780
45938
  y1: -top,
45781
45939
  y2: bmpTool.height + bottom
45782
45940
  },
45783
- bounds = baseMark.AABBBounds;
45784
- if (0 !== bounds.width() && 0 !== bounds.height()) return isRectIntersect(baseMark.AABBBounds, rect, !0);
45785
- const {
45786
- attribute: attribute
45787
- } = baseMark;
45941
+ bounds = this.getGraphicFinalLayoutBounds(baseMark);
45942
+ if (bounds && 0 !== bounds.width() && 0 !== bounds.height()) return isRectIntersect(bounds, rect, !0);
45943
+ const attribute = this.shouldUseGraphicFinalLayoutAttributes(baseMark) ? this.getGraphicFinalLayoutAttributes(baseMark) : baseMark.attribute;
45788
45944
  if ("rect" === baseMark.type) {
45789
45945
  const {
45790
45946
  x: x,
@@ -45809,19 +45965,13 @@ class LabelBase extends AnimateComponent {
45809
45965
  if (baseMarkGroupName) return this.getRootNode().find(node => node.name === baseMarkGroupName, !0);
45810
45966
  }
45811
45967
  getGraphicBounds(graphic, point = {}, position) {
45812
- var _a;
45813
45968
  if (graphic) {
45814
- if (!1 !== graphic.attribute.visible) {
45815
- if ((null === (_a = graphic.context) || void 0 === _a ? void 0 : _a.animationState) || this.hasGraphicContextFinalLayoutAttributes(graphic)) {
45816
- const clonedGraphic = graphic.clone();
45817
- return Object.assign(clonedGraphic.attribute, this.getGraphicFinalLayoutAttributes(graphic)), clonedGraphic.AABBBounds;
45818
- }
45819
- return graphic.AABBBounds;
45820
- }
45969
+ const graphicAttrs = this.shouldUseGraphicFinalLayoutAttributes(graphic) ? this.getGraphicFinalLayoutAttributes(graphic) : graphic.attribute;
45970
+ if (!1 !== graphicAttrs.visible) return this.getGraphicFinalLayoutBounds(graphic);
45821
45971
  const {
45822
45972
  x: x,
45823
45973
  y: y
45824
- } = graphic.attribute;
45974
+ } = graphicAttrs;
45825
45975
  return {
45826
45976
  x1: x,
45827
45977
  x2: x,
@@ -46009,8 +46159,9 @@ class LabelBase extends AnimateComponent {
46009
46159
  }
46010
46160
  const invertColor = labelSmartInvert(foregroundColor, backgroundColor, textType, contrastRatiosThreshold, alternativeColors, mode),
46011
46161
  similarColor = contrastAccessibilityChecker(invertColor, brightColor) ? brightColor : darkColor,
46012
- isInside = this._canPlaceInside(label.AABBBounds, baseMark.AABBBounds),
46013
- isIntersect = !isInside && label.AABBBounds && baseMark.AABBBounds && baseMark.AABBBounds.intersects(label.AABBBounds);
46162
+ baseMarkBounds = this.getGraphicFinalLayoutBounds(baseMark),
46163
+ isInside = this._canPlaceInside(label.AABBBounds, baseMarkBounds),
46164
+ isIntersect = !isInside && label.AABBBounds && baseMarkBounds && baseMarkBounds.intersects(label.AABBBounds);
46014
46165
  if (isInside || outsideEnable || isIntersect && "inside" === interactInvertType) {
46015
46166
  const fill = smartInvertStrategy(fillStrategy, backgroundColor, invertColor, similarColor);
46016
46167
  if (fill && label.setAttributes({
@@ -56107,6 +56258,6 @@ function createStage(params) {
56107
56258
  return resolveLegacyApp().createStage(params);
56108
56259
  }
56109
56260
 
56110
- const version = "1.1.0-alpha.22";
56261
+ const version = "1.1.0-alpha.23";
56111
56262
 
56112
56263
  export { AComponentAnimate, ACustomAnimate, ARC3D_NUMBER_TYPE, ARC_NUMBER_TYPE, AREA_NUMBER_TYPE, AStageAnimate, AXIS_ELEMENT_NAME, AbstractComponent, AbstractGraphicRender, Animate, AnimateExecutor, AnimateMode, AnimateStatus, Step as AnimateStep, AnimateStepType, AnimationStateManager, AnimationStateStore, AnimationStates, AnimationTransitionRegistry, AppContext, Application, Arc, Arc3d, Arc3dRender, ArcInfo, ArcLabel, ArcRender, ArcRenderContribution, ArcSegment, Area, AreaRender, AreaRenderContribution, AttributeUpdateType, AutoEnablePlugins, AxisStateValue, BaseCanvas, BaseEnvContribution, BasePlayer, BaseRender, BaseRenderContributionTime, BaseWindowHandlerContribution, Basis, BeforeRenderConstribution, BoundsContext, BoundsPicker, BrowserEntry, BrowserEnvContribution, Brush, CIRCLE_NUMBER_TYPE, Canvas3DDrawItemInterceptor, Canvas3DPickItemInterceptor, CanvasArc3dPicker, CanvasArcPicker, CanvasAreaPicker, CanvasCirclePicker, CanvasFactory, CanvasGifImagePicker, CanvasGlyphPicker, CanvasGroupPicker, CanvasImagePicker, CanvasLinePicker, CanvasLottiePicker, CanvasPathPicker, CanvasPickerContribution, CanvasPolygonPicker, CanvasPyramid3dPicker, CanvasRect3dPicker, CanvasRectPicker, CanvasRichTextPicker, CanvasStarPicker, CanvasSymbolPicker, CanvasTextLayout, CanvasTextPicker, CheckBox, Circle, CircleAxis, CircleAxisGrid, CircleCrosshair, CircleRender, CircleRenderContribution, ClipAngleAnimate, ClipDirectionAnimate, ClipGraphicAnimate, ClipIn, ClipOut, ClipRadiusAnimate, ColorContinuousLegend, ColorInterpolate, ColorStore, ColorType, CommonDrawItemInterceptorContribution, CommonRenderContribution, ComponentAnimator, Context2dFactory, ContinuousPlayer, ContributionProvider, ContributionRegistry, ContributionStore, CubicBezierCurve, CurveContext, CurveTypeEnum, CustomEvent, CustomPath2D, CustomSymbolClass, DEFAULT_ITEM_SPACE_COL, DEFAULT_ITEM_SPACE_ROW, DEFAULT_LABEL_SPACE, DEFAULT_PAGER_SPACE, DEFAULT_SHAPE_SIZE, DEFAULT_SHAPE_SPACE, DEFAULT_STATES$1 as DEFAULT_STATES, DEFAULT_TEXT_FONT_FAMILY$1 as DEFAULT_TEXT_FONT_FAMILY, DEFAULT_TITLE_SPACE, DEFAULT_VALUE_SPACE, DataLabel, DataZoom, DataZoomActiveTag, DebugDrawItemInterceptorContribution, DefaultArcAllocate, DefaultArcAttribute, DefaultArcRenderContribution, DefaultAreaAllocate, DefaultAreaAttribute, DefaultAreaTextureRenderContribution, DefaultAttribute, DefaultBaseBackgroundRenderContribution, DefaultBaseClipRenderAfterContribution, DefaultBaseClipRenderBeforeContribution, DefaultBaseInteractiveRenderContribution, DefaultBaseTextureRenderContribution, DefaultCanvasAllocate, DefaultCanvasArcRender, DefaultCanvasAreaRender, DefaultCanvasCircleRender, DefaultCanvasGroupRender, DefaultCanvasImageRender, DefaultCanvasLineRender, DefaultCanvasPathRender, DefaultCanvasPolygonRender, DefaultCanvasRectRender, DefaultCanvasSymbolRender, DefaultCanvasTextRender, DefaultCircleAllocate, DefaultCircleAttribute, DefaultCircleRenderContribution, DefaultConnectAttribute, DefaultDebugAttribute, DefaultFillStyle, DefaultGlobal, DefaultGlobalPickerService, DefaultGlyphAttribute, DefaultGraphicAllocate, DefaultGraphicMemoryManager, DefaultGraphicService, DefaultGraphicUtil, DefaultGroupAttribute, DefaultGroupBackgroundRenderContribution, DefaultImageAttribute, DefaultImageRenderContribution, DefaultLayerService, DefaultLayout, DefaultLineAllocate, DefaultLineAttribute, DefaultMat4Allocate, DefaultMatrixAllocate, DefaultPathAllocate, DefaultPathAttribute, DefaultPickService, DefaultPickStyle, DefaultPolygonAttribute, DefaultRect3dAttribute, DefaultRectAllocate, DefaultRectAttribute, DefaultRectRenderContribution, DefaultRenderService, DefaultRichTextAttribute, DefaultRichTextIconAttribute, DefaultStarAttribute, DefaultStrokeStyle, DefaultStyle, DefaultSymbolAllocate, DefaultSymbolAttribute, DefaultSymbolClipRangeStrokeRenderContribution, DefaultSymbolRenderContribution, DefaultTextAllocate, DefaultTextAttribute, DefaultTextMeasureContribution, DefaultTextStyle, DefaultTicker, DefaultTimeline, DefaultTransform, DefaultTransformUtil, DefaultWindow, Direction, DirectionEnum, DirectionalLight, DiscreteLegend, DiscretePlayer, Dissolve, Distortion, DragNDrop, DrawContribution, DrawItemInterceptor, DynamicLayerHandlerContribution, Easing, Edge, EditModule, EmptyContext2d, EmptyTip, EnvContribution, EventManager, EventSystem, EventTarget, FORMAT_ALL_TEXT_COMMAND, FORMAT_ELEMENT_COMMAND, FORMAT_TEXT_COMMAND, Factory, FadeIn, FadeOut, FederatedEvent, FederatedMouseEvent, FederatedPointerEvent, FederatedWheelEvent, FlexLayoutPlugin, Fragment, FromTo, GLYPH_NUMBER_TYPE, GRAPHIC_UPDATE_TAG_KEY, GROUP_NUMBER_TYPE, GaussianBlur, Generator, Gesture, GifImage, Glitch, GlobalPickerService, Glyph, GlyphRender, GradientParser, Graphic, GraphicCreator$1 as GraphicCreator, GraphicFactory, GraphicPicker, GraphicRender, GraphicService, GraphicStateExtension, GraphicUtil, Grayscale, Group, GroupFadeIn, GroupFadeOut, GroupRender, GroupRenderContribution, GroupTransition, GroupUpdateAABBBoundsMode, GrowAngleIn, GrowAngleOut, GrowCenterIn, GrowCenterOut, GrowHeightIn, GrowHeightOut, GrowIn, GrowOut, GrowPointsIn, GrowPointsOut, GrowPointsXIn, GrowPointsXOut, GrowPointsYIn, GrowPointsYOut, GrowRadiusIn, GrowRadiusOut, GrowWidthIn, GrowWidthOut, HtmlAttributePlugin, IContainPointMode, IDataZoomEvent, IDataZoomInteractiveEvent, IMAGE_NUMBER_TYPE, IMarkAreaLabelPosition, IMarkCommonArcLabelPosition, IMarkLineLabelPosition, IMarkPointItemPosition, IOperateType, Image$1 as Image, ImageRender, ImageRenderContribution, IncreaseCount, IncrementalDrawContribution, Indicator, InputRichText, InputText, InteractiveDrawItemInterceptorContribution, InteractivePickItemInterceptorContribution, InteractiveSubRenderContribution, LEGEND_ELEMENT_NAME, LINE_NUMBER_TYPE, LabelBase, LabelItemAppear, LabelItemDisappear, Layer, LayerFactory, LayerService, LegendEvent, LegendStateValue, Line$1 as Line, LineAxis, LineAxisGrid, LineCrosshair, LineLabel, LineRender, Linear, LinearClosed, LinkPath, Lottie, ManualTicker, MarkArcArea, MarkArcLine, MarkArea, MarkLine, MarkPoint, Mat4Allocate, MathArcPicker, MathAreaPicker, MathCirclePicker, MathGlyphPicker, MathImagePicker, MathLinePicker, MathPathPicker, MathPickerContribution, MathPolygonPicker, MathRectPicker, MathRichTextPicker, MathSymbolPicker, MathTextPicker, MatrixAllocate, MeasureModeEnum, MiniappEntry, MonotoneX, MonotoneY, MorphingPath, MotionPath, MoveIn, MoveOut, MoveRotateIn, MoveRotateOut, MoveScaleIn, MoveScaleOut, MultiToOneMorphingPath, NOWORK_ANIMATE_ATTR, Node, NodeEntry, OrthoCamera, OutputRichText, PATH_NUMBER_TYPE, POLYGON_NUMBER_TYPE, PURE_STYLE_KEY, PYRAMID3D_NUMBER_TYPE, Pager, Particle, Path, PathRender, PathRenderContribution, PerformanceRAF, PickItemInterceptor, PickServiceInterceptor, PickerRegistry, PickerService, Pixelation, PlayerEventEnum, PluginRegistry, PluginService, Polygon, PolygonCrosshair, PolygonRender, PolygonRenderContribution, PolygonSectorCrosshair, PopTip, PoptipAppear, PoptipDisappear, PulseAnimate, Pyramid3d, Pyramid3dRender, REACT_TO_CANOPUS_EVENTS, REACT_TO_CANOPUS_EVENTS_LIST, RECT3D_NUMBER_TYPE, RECT_NUMBER_TYPE, RICHTEXT_NUMBER_TYPE, Radio, RafBasedSTO, ReactAttributePlugin, Rect, Rect3DRender, Rect3d, RectCrosshair, RectLabel, RectRender, RectRenderContribution, ReflectSegContext, RenderSelector, RenderService, RendererRegistry, ResourceLoader, RichText, RichTextEditPlugin, RichTextRender, RotateBySphereAnimate, RotateIn, RotateOut, SLIDER_ELEMENT_NAME, STAR_NUMBER_TYPE, STATUS$1 as STATUS, SVG_ATTRIBUTE_MAP, SVG_ATTRIBUTE_MAP_KEYS, SVG_PARSE_ATTRIBUTE_MAP, SVG_PARSE_ATTRIBUTE_MAP_KEYS, SYMBOL_NUMBER_TYPE, ScaleIn, ScaleOut, ScrollBar, SectorCrosshair, SegContext, Segment, SeriesNumberCellStateValue, SeriesNumberEvent, ShadowPickServiceInterceptorContribution, ShadowRoot, ShadowRootDrawItemInterceptorContribution, ShadowRootPickItemInterceptorContribution, SizeContinuousLegend, SlideIn, SlideOut, SlideOutRichText, SlideRichText, Slider, SpinIn, SpinOut, SplitRectAfterRenderContribution, SplitRectBeforeRenderContribution, Stage, StageFactory, Star, StarRender, StarRenderContribution, State, StateDefinitionCompiler, StateEngine, StaticLayerHandlerContribution, Step$1 as Step, StepClosed, StoryLabelItem, StreamLight, StrokeIn, StrokeOut, Switch, Symbol$1 as Symbol, SymbolLabel, SymbolRender, SymbolRenderContribution, TEXT_NUMBER_TYPE, TableSeriesNumber, Tag, TagPointsUpdate, Text, TextDirection, TextMeasureContribution, TextRender, TextRenderContribution, Theme, Timeline, Title, Tooltip, TopZIndex, TransformUtil, Update, UpdateTag, VArc, VArc3d, VArea, VCircle, VGlobal, VGlyph, VGroup, VImage, VLine, VPath, VPolygon, VPyramid3d, VRect, VRect3d, VRichText, VSymbol, VTag, VText, VWindow, ViewTransform3dPlugin, VirtualLayerHandlerContribution, WILDCARD, WeatherBox, WindowHandlerContribution, WrapText, XMLParser, _calculateLineHeight, _interpolateColor, _registerArc, acquireSharedVRenderApp, addArcToBezierPath$1 as addArcToBezierPath, addAttributeToPrototype, alignBezierCurves, alignSubpath, alignTextInLine, alternatingWave, angle, angleLabelOrientAttribute, angleTo, application, applyTransformOnBezierCurves, arc3dModule, arcModule, areaModule, bezier, bezierCurversToPath, binarySplitPolygon, bindArc3dCanvasPickerContribution, bindArc3dRenderModule, bindArcCanvasPickerContribution, bindArcMathPickerContribution, bindArcRenderModule, bindAreaCanvasPickerContribution, bindAreaMathPickerContribution, bindAreaRenderModule, bindBrowserEnv, bindCircleCanvasPickerContribution, bindCircleMathPickerContribution, bindCircleRenderModule, bindContributionProvider, bindContributionProviderNoSingletonScope, bindFeishuEnv, bindGifImageCanvasPickerContribution, bindGifImageRenderContribution, bindGlyphCanvasPickerContribution, bindGlyphMathPickerContribution, bindGlyphRenderModule, bindHarmonyEnv, bindImageCanvasPickerContribution, bindImageMathPickerContribution, bindImageRenderModule, bindLineCanvasPickerContribution, bindLineMathPickerContribution, bindLineRenderModule, bindLottieCanvasPickerContribution, bindLottieRenderContribution, bindLynxEnv, bindMathPicker, bindNodeEnv, bindPathCanvasPickerContribution, bindPathMathPickerContribution, bindPathRenderModule, bindPolygonCanvasPickerContribution, bindPolygonMathPickerContribution, bindPolygonRenderModule, bindPyramid3dCanvasPickerContribution, bindPyramid3dRenderModule, bindRect3dCanvasPickerContribution, bindRect3dRenderModule, bindRectCanvasPickerContribution, bindRectMathPickerContribution, bindRectRenderModule, bindRichTextMathPickerContribution, bindRichtextCanvasPickerContribution, bindRichtextRenderModule, bindStarRenderModule, bindSymbolCanvasPickerContribution, bindSymbolMathPickerContribution, bindSymbolRenderModule, bindTTEnv, bindTaroEnv, bindTextCanvasPickerContribution, bindTextMathPickerContribution, bindTextRenderModule, bindWxEnv, bootstrapLegacyVRenderRuntime, bootstrapVRenderBrowserApp, bootstrapVRenderMiniApp, bootstrapVRenderNodeApp, boundStroke, builtInSymbolStrMap, builtinSymbols, builtinSymbolsMap, calcLineCache, calculateArcCornerRadius, calculateLineHeight, canvasAllocate, cartesianTicks, centerToCorner, centroidOfSubpath, circleBounds, circleModule, clampRadian, clock, colorEqual, colorStringInterpolationToStr, columnCenterToEdge, columnEdgeToCenter, columnLeftToRight, columnRightToLeft, computeOffsetForlimit, configureRuntimeApplicationForApp, container, continuousTicks, contrastAccessibilityChecker, convertDomainToTickData, cornerTangents, cornerToCenter, createBrowserApp$1 as createApp, createArc, createArc3d, createArea, createBrowserApp$1 as createBrowserApp, createBrowserVRenderApp, createCanvasEventTransformer, createCircle, createColor, createComponentAnimator, createConicalGradient, createContributionProvider$1 as createContributionProvider, createEventTransformer, createFeishuVRenderApp, createGifImage, createGlyph, createGraphic$1 as createGraphic, createGroup, createHarmonyVRenderApp, createImage, createImageElement$1 as createImageElement, createLine, createLottie, createLynxVRenderApp, createMat4, createMiniappApp$1 as createMiniappApp, createNodeApp$1 as createNodeApp, createNodeVRenderApp, createPath, createPolygon, createPyramid3d, createRect, createRect3d, createRectPath, createRichText, createShadowRoot, createStage, createStar, createSymbol, createTTVRenderApp, createTaroVRenderApp, createText, createTextGraphicByType, createWrapText, createWxVRenderApp, cubicCalc, cubicLength, cubicPointAt, cubicSubdivide, decodeReactDom, defaultArcAllocate, defaultArcBackgroundRenderContribution, defaultArcRenderContribution, defaultArcTextureRenderContribution, defaultAreaAllocate, defaultBaseBackgroundRenderContribution, defaultBaseClipRenderAfterContribution, defaultBaseClipRenderBeforeContribution, defaultBaseTextureRenderContribution, defaultCircleAllocate, defaultCircleBackgroundRenderContribution, defaultCircleRenderContribution, defaultCircleTextureRenderContribution, defaultGraphicMemoryManager, defaultGroupBackgroundRenderContribution, defaultImageBackgroundRenderContribution, defaultImageRenderContribution, defaultLineAllocate, defaultPathAllocate, defaultRectAllocate, defaultRectBackgroundRenderContribution, defaultRectRenderContribution, defaultRectTextureRenderContribution, defaultStarBackgroundRenderContribution, defaultStarTextureRenderContribution, defaultSymbolAllocate, defaultSymbolBackgroundRenderContribution, defaultSymbolClipRangeStrokeRenderContribution, defaultSymbolRenderContribution, defaultSymbolTextureRenderContribution, defaultTextAllocate, defaultTicker, defaultTimeline, deltaXYToAngle, diagonalCenterToEdge, diagonalTopLeftToBottomRight, diff, divideCubic, drawArc, drawArcPath$1 as drawArcPath, drawAreaSegments, drawBackgroundImage, drawImageWithLayout, drawIncrementalAreaSegments, drawIncrementalSegments, drawSegments, enumCommandMap, fillVisible, findBestMorphingRotation, findConfigIndexByCursorIdx, findCursorIdxByConfigIndex, findNextGraphic, flatten_simplify, foreach, foreachAsync, fuzzyEqualNumber, genBasisSegments, genBasisTypeSegments, genLinearClosedSegments, genLinearClosedTypeSegments, genLinearSegments, genLinearTypeSegments, genMonotoneXSegments, genMonotoneXTypeSegments, genMonotoneYSegments, genMonotoneYTypeSegments, genNumberType, genStepClosedSegments, genStepSegments, genStepTypeSegments, generatorPathEasingFunc, getAttributeFromDefaultAttrList, getAxisBreakSymbolAttrs, getBackgroundImage, getCircleLabelPosition, getCirclePoints, getCircleVerticalVector, getConicGradientAt, getCurrentEnv, getDefaultCharacterConfig, getElMap, getExtraModelMatrix, getHorizontalPath, getLegacyBindingContext, getMarksByName, getModelMatrix, getNoneGroupMarksByName, getPolarAngleLabelPosition, getPolygonPath, getRichTextBounds, getRuntimeInstallerBindingContext, getRuntimeInstallerGlobal, getScaledStroke, getSharedVRenderApp, getSizeHandlerPath, getTextAlignAttrOfVerticalDir, getTextBounds, getTextType, getTheme, getThemeFromGroup, getVerticalCoord, getVerticalPath, globalTheme, glyphModule, graphicCreator$1 as graphicCreator, graphicService, graphicUtil, hasOverlap, htmlAttributeTransform, identityMat4, imageModule, incrementalAddTo, initAllEnv, initBrowserEnv, initFeishuEnv, initHarmonyEnv, initLynxEnv, initNodeEnv, initTTEnv, initTaroEnv, initTextMeasure, initWxEnv, installBrowserEnvToApp, installBrowserPickersToApp, installDefaultGraphicsToApp, installFeishuEnvToApp, installHarmonyEnvToApp, installLynxEnvToApp, installMathPickersToApp, installNodeEnvToApp, installNodePickersToApp, installPoptipToApp, installRuntimeDrawContributionsToApp, installRuntimeGraphicRenderersToApp, installRuntimePickersToApp, installScrollbarToApp, installTTEnvToApp, installTaroEnvToApp, installWxEnvToApp, interpolateColor, interpolateGradientConicalColor, interpolateGradientLinearColor, interpolateGradientRadialColor, interpolatePureColorArray, interpolatePureColorArrayToStr, intersect, isBrowserEnv, isInRange, isNoRepeatSizingMode, isNodeEnv, isPostiveXAxis, isRichText, isSvg, isVisible, isXML, jsx, labelSmartInvert, layerService, length, limitShapeInBounds, lineModule, linearDiscreteTicks, loadAllEnv, loadAllModule, loadBrowserEnv, loadFeishuEnv, loadHarmonyEnv, loadLynxEnv, loadMathPicker, loadNodeEnv, loadPoptip, loadScrollbar, loadTTEnv, loadTaroEnv, loadWxEnv, lookAt, mapToCanvasPointForCanvas, mat3Tomat4, mat4Allocate, matrixAllocate, measureTextSize, morphPath, multiToOneMorph, multiplyMat4Mat3, multiplyMat4Mat4, newThemeObj, normalize$1 as normalize, oneToMultiMorph, ortho, parsePadding, parseStroke, parseSvgPath, particleEffect, pathModule, pathToBezierCurves, point$3 as point, pointEqual, pointInterpolation, pointInterpolationHighPerformance, pointsEqual, pointsInterpolation, polarAngleAxisDiscreteTicks, polarTicks, polygonModule, preLoadAllModule, pulseWave, pyramid3dModule, quadCalc, quadLength, quadPointAt, rafBasedSto, randomOpacity, reactAttributeTransform, rect3dModule, rectFillVisible, rectModule, rectStrokeVisible, recursiveCallBinarySplit, refreshRuntimeInstallerContributions, registerAnimate, registerArc, registerArc3d, registerArc3dGraphic, registerArcDataLabel, registerArcGraphic, registerArea, registerAreaGraphic, registerCircle, registerCircleGraphic, registerCustomAnimate, registerDirectionalLight, registerFlexLayoutPlugin, registerGifGraphic, registerGifImage, registerGlobalEventTransformer, registerGlyph, registerGlyphGraphic, registerGraphic, registerGroup, registerGroupGraphic, registerHtmlAttributePlugin, registerImage, registerImageGraphic, registerLine, registerLineDataLabel, registerLineGraphic, registerMarkArcAreaAnimate, registerMarkArcLineAnimate, registerMarkAreaAnimate, registerMarkLineAnimate, registerMarkPointAnimate, registerOrthoCamera, registerPath, registerPathGraphic, registerPolygon, registerPolygonGraphic, registerPyramid3d, registerPyramid3dGraphic, registerReactAttributePlugin, registerRect, registerRect3d, registerRect3dGraphic, registerRectDataLabel, registerRectGraphic, registerRichtext, registerRichtextGraphic, registerShadowRoot, registerShadowRootGraphic, registerStar, registerStarGraphic, registerSymbol, registerSymbolDataLabel, registerSymbolGraphic, registerText, registerTextGraphic, registerViewTransform3dPlugin, registerWindowEventTransformer, registerWrapText, registerWrapTextGraphic, releaseSharedVRenderApp, removeRepeatPoint, renderCommandList, resolveBackgroundDrawMode, resolveBackgroundParamsByImageSizing, resolveBackgroundPosition, resolveBackgroundSizing, resolveContainerBinding$1 as resolveContainerBinding, resolveImageMode, resolveImageRepeatMode, resolveRenderableImageSize, rewriteProto, richTextAttributeTransform, richtextModule, rippleEffect, rotateX, rotateY, rotateZ, rotationScan, roughModule, rowBottomToTop, rowCenterToEdge, rowEdgeToCenter, rowTopToBottom, runFill, runStroke, scale, scaleMat4, segments, setPoptipTheme, shouldClipImageByLayout, shouldUseMat4, smartInvertStrategy, snakeWave, snapLength, spiralEffect, splitArc, splitArea, splitCircle, splitLine, splitPath, splitPolygon, splitRect, splitToGrids, starModule, strCommandMap, strokeVisible, symbolModule, tan2AngleToAngle, textAttributesToStyle, textDrawOffsetX, textDrawOffsetY, textIntersect, textLayoutOffsetY, textModule, ticks, transformMat4, transformPointForCanvas, transformUtil, transitionRegistry, translate, traverseGroup, version, verticalLayout, vglobal, waitForAllSubLayers, wrapCanvas, wrapContext, xul };