@visactor/vrender 0.20.9-alpha.2 → 0.21.0-alpha.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/cjs/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
1
  import '@visactor/vrender-core';
2
- export declare const version = "0.20.9-alpha.2";
2
+ export declare const version = "0.21.0-alpha.1";
3
3
  export * from '@visactor/vrender-core';
4
4
  export * from '@visactor/vrender-kits';
package/cjs/index.js CHANGED
@@ -21,7 +21,7 @@ Object.defineProperty(exports, "__esModule", {
21
21
 
22
22
  const vrender_core_1 = require("@visactor/vrender-core"), vrender_kits_1 = require("@visactor/vrender-kits"), vrender_kits_2 = require("@visactor/vrender-kits");
23
23
 
24
- exports.version = "0.20.9-alpha.2", (0, vrender_core_1.preLoadAllModule)(), (0,
24
+ exports.version = "0.21.0-alpha.1", (0, vrender_core_1.preLoadAllModule)(), (0,
25
25
  vrender_core_1.isBrowserEnv)() ? (0, vrender_kits_1.loadBrowserEnv)(vrender_core_1.container) : (0,
26
26
  vrender_core_1.isNodeEnv)() && (0, vrender_kits_1.loadNodeEnv)(vrender_core_1.container),
27
27
  (0, vrender_kits_2.registerArc)(), (0, vrender_kits_2.registerArc3d)(), (0, vrender_kits_2.registerArea)(),
package/cjs/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,kCAAgC;AAChC,yDAWgC;AAChC,yDAAqE;AACrE,yDAmBgC;AAEnB,QAAA,OAAO,GAAG,gBAAgB,CAAC;AAExC,IAAA,+BAAgB,GAAE,CAAC;AAEnB,IAAI,IAAA,2BAAY,GAAE,EAAE;IAClB,IAAA,6BAAc,EAAC,wBAAS,CAAC,CAAC;CAC3B;KAAM,IAAI,IAAA,wBAAS,GAAE,EAAE;IACtB,IAAA,0BAAW,EAAC,wBAAS,CAAC,CAAC;CACxB;AACD,IAAA,0BAAW,GAAE,CAAC;AACd,IAAA,4BAAa,GAAE,CAAC;AAChB,IAAA,2BAAY,GAAE,CAAC;AACf,IAAA,6BAAc,GAAE,CAAC;AACjB,IAAA,4BAAa,GAAE,CAAC;AAChB,IAAA,4BAAa,GAAE,CAAC;AAChB,IAAA,4BAAa,GAAE,CAAC;AAChB,IAAA,2BAAY,GAAE,CAAC;AACf,IAAA,2BAAY,GAAE,CAAC;AACf,IAAA,8BAAe,GAAE,CAAC;AAClB,IAAA,gCAAiB,GAAE,CAAC;AACpB,IAAA,2BAAY,GAAE,CAAC;AACf,IAAA,6BAAc,GAAE,CAAC;AACjB,IAAA,+BAAgB,GAAE,CAAC;AACnB,IAAA,iCAAkB,GAAE,CAAC;AACrB,IAAA,6BAAc,GAAE,CAAC;AACjB,IAAA,2BAAY,GAAE,CAAC;AACf,IAAA,+BAAgB,GAAE,CAAC;AAEnB,IAAA,uCAAwB,GAAE,CAAC;AAC3B,IAAA,4CAA6B,GAAE,CAAC;AAChC,IAAA,0CAA2B,GAAE,CAAC;AAC9B,IAAA,2CAA4B,GAAE,CAAC;AAC/B,IAAA,uCAAwB,GAAE,CAAC;AAC3B,IAAA,kCAAmB,GAAE,CAAC;AACtB,yDAAuC;AACvC,yDAAuC","file":"index.js","sourcesContent":["import '@visactor/vrender-core';\nimport {\n container,\n isBrowserEnv,\n isNodeEnv,\n preLoadAllModule,\n registerFlexLayoutPlugin,\n registerViewTransform3dPlugin,\n registerHtmlAttributePlugin,\n registerReactAttributePlugin,\n registerDirectionalLight,\n registerOrthoCamera\n} from '@visactor/vrender-core';\nimport { loadBrowserEnv, loadNodeEnv } from '@visactor/vrender-kits';\nimport {\n registerArc,\n registerArc3d,\n registerArea,\n registerCircle,\n registerGlyph,\n registerGroup,\n registerImage,\n registerLine,\n registerPath,\n registerPolygon,\n registerPyramid3d,\n registerRect,\n registerRect3d,\n registerRichtext,\n registerShadowRoot,\n registerSymbol,\n registerText,\n registerWrapText\n} from '@visactor/vrender-kits';\n// 导出版本号\nexport const version = \"0.20.9-alpha.2\";\n\npreLoadAllModule();\n\nif (isBrowserEnv()) {\n loadBrowserEnv(container);\n} else if (isNodeEnv()) {\n loadNodeEnv(container);\n}\nregisterArc();\nregisterArc3d();\nregisterArea();\nregisterCircle();\nregisterGlyph();\nregisterGroup();\nregisterImage();\nregisterLine();\nregisterPath();\nregisterPolygon();\nregisterPyramid3d();\nregisterRect();\nregisterRect3d();\nregisterRichtext();\nregisterShadowRoot();\nregisterSymbol();\nregisterText();\nregisterWrapText();\n\nregisterFlexLayoutPlugin();\nregisterViewTransform3dPlugin();\nregisterHtmlAttributePlugin();\nregisterReactAttributePlugin();\nregisterDirectionalLight();\nregisterOrthoCamera();\nexport * from '@visactor/vrender-core';\nexport * from '@visactor/vrender-kits';\n"]}
1
+ {"version":3,"sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,kCAAgC;AAChC,yDAWgC;AAChC,yDAAqE;AACrE,yDAmBgC;AAEnB,QAAA,OAAO,GAAG,gBAAgB,CAAC;AAExC,IAAA,+BAAgB,GAAE,CAAC;AAEnB,IAAI,IAAA,2BAAY,GAAE,EAAE;IAClB,IAAA,6BAAc,EAAC,wBAAS,CAAC,CAAC;CAC3B;KAAM,IAAI,IAAA,wBAAS,GAAE,EAAE;IACtB,IAAA,0BAAW,EAAC,wBAAS,CAAC,CAAC;CACxB;AACD,IAAA,0BAAW,GAAE,CAAC;AACd,IAAA,4BAAa,GAAE,CAAC;AAChB,IAAA,2BAAY,GAAE,CAAC;AACf,IAAA,6BAAc,GAAE,CAAC;AACjB,IAAA,4BAAa,GAAE,CAAC;AAChB,IAAA,4BAAa,GAAE,CAAC;AAChB,IAAA,4BAAa,GAAE,CAAC;AAChB,IAAA,2BAAY,GAAE,CAAC;AACf,IAAA,2BAAY,GAAE,CAAC;AACf,IAAA,8BAAe,GAAE,CAAC;AAClB,IAAA,gCAAiB,GAAE,CAAC;AACpB,IAAA,2BAAY,GAAE,CAAC;AACf,IAAA,6BAAc,GAAE,CAAC;AACjB,IAAA,+BAAgB,GAAE,CAAC;AACnB,IAAA,iCAAkB,GAAE,CAAC;AACrB,IAAA,6BAAc,GAAE,CAAC;AACjB,IAAA,2BAAY,GAAE,CAAC;AACf,IAAA,+BAAgB,GAAE,CAAC;AAEnB,IAAA,uCAAwB,GAAE,CAAC;AAC3B,IAAA,4CAA6B,GAAE,CAAC;AAChC,IAAA,0CAA2B,GAAE,CAAC;AAC9B,IAAA,2CAA4B,GAAE,CAAC;AAC/B,IAAA,uCAAwB,GAAE,CAAC;AAC3B,IAAA,kCAAmB,GAAE,CAAC;AACtB,yDAAuC;AACvC,yDAAuC","file":"index.js","sourcesContent":["import '@visactor/vrender-core';\nimport {\n container,\n isBrowserEnv,\n isNodeEnv,\n preLoadAllModule,\n registerFlexLayoutPlugin,\n registerViewTransform3dPlugin,\n registerHtmlAttributePlugin,\n registerReactAttributePlugin,\n registerDirectionalLight,\n registerOrthoCamera\n} from '@visactor/vrender-core';\nimport { loadBrowserEnv, loadNodeEnv } from '@visactor/vrender-kits';\nimport {\n registerArc,\n registerArc3d,\n registerArea,\n registerCircle,\n registerGlyph,\n registerGroup,\n registerImage,\n registerLine,\n registerPath,\n registerPolygon,\n registerPyramid3d,\n registerRect,\n registerRect3d,\n registerRichtext,\n registerShadowRoot,\n registerSymbol,\n registerText,\n registerWrapText\n} from '@visactor/vrender-kits';\n// 导出版本号\nexport const version = \"0.21.0-alpha.1\";\n\npreLoadAllModule();\n\nif (isBrowserEnv()) {\n loadBrowserEnv(container);\n} else if (isNodeEnv()) {\n loadNodeEnv(container);\n}\nregisterArc();\nregisterArc3d();\nregisterArea();\nregisterCircle();\nregisterGlyph();\nregisterGroup();\nregisterImage();\nregisterLine();\nregisterPath();\nregisterPolygon();\nregisterPyramid3d();\nregisterRect();\nregisterRect3d();\nregisterRichtext();\nregisterShadowRoot();\nregisterSymbol();\nregisterText();\nregisterWrapText();\n\nregisterFlexLayoutPlugin();\nregisterViewTransform3dPlugin();\nregisterHtmlAttributePlugin();\nregisterReactAttributePlugin();\nregisterDirectionalLight();\nregisterOrthoCamera();\nexport * from '@visactor/vrender-core';\nexport * from '@visactor/vrender-kits';\n"]}
package/dist/index.es.js CHANGED
@@ -4230,8 +4230,14 @@ function getStrByWithCanvas(desc, width, character, guessIndex, needTestLetter)
4230
4230
  return needTestLetter && (index = testLetter(desc, index)), index;
4231
4231
  }
4232
4232
  function testLetter(string, index) {
4233
+ let negativeWrongMatch = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : !1;
4233
4234
  let i = index;
4234
- for (; regLetter.test(string[i - 1]) && regLetter.test(string[i]) || regPunctuation.test(string[i]);) if (i--, i <= 0) return index;
4235
+ for (; regLetter.test(string[i - 1]) && regLetter.test(string[i]) || regPunctuation.test(string[i]);) if (i--, i <= 0) return negativeWrongMatch ? testLetter2(string, index) : index;
4236
+ return i;
4237
+ }
4238
+ function testLetter2(string, index) {
4239
+ let i = index;
4240
+ for (; regLetter.test(string[i - 1]) && regLetter.test(string[i]) || regPunctuation.test(string[i]);) if (i++, i >= string.length) return i;
4235
4241
  return i;
4236
4242
  }
4237
4243
  function measureTextCanvas(text, character) {
@@ -4329,7 +4335,7 @@ let ATextMeasure = class {
4329
4335
  width: length
4330
4336
  };
4331
4337
  }
4332
- clipText(text, options, width, wordBreak) {
4338
+ clipText(text, options, width, wordBreak, keepAllBreak) {
4333
4339
  if (0 === text.length) return {
4334
4340
  str: "",
4335
4341
  width: 0
@@ -4345,8 +4351,8 @@ let ATextMeasure = class {
4345
4351
  };
4346
4352
  const data = this._clipText(text, options, width, 0, text.length - 1, "end", !1);
4347
4353
  if (wordBreak && data.str !== text) {
4348
- const index = testLetter(text, data.str.length);
4349
- index !== data.str.length && (data.str = text.substring(0, index), data.width = this.measureTextWidth(data.str, options));
4354
+ let index = testLetter(text, data.str.length, keepAllBreak);
4355
+ index !== data.str.length && (index > data.str.length && (data.wordBreaked = index, index = data.str.length), data.str = text.substring(0, index), data.width = this.measureTextWidth(data.str, options));
4350
4356
  }
4351
4357
  return data;
4352
4358
  }
@@ -11256,7 +11262,8 @@ let DefaultGraphicService = class {
11256
11262
  onAddIncremental: new SyncHook(["graphic", "group", "stage"]),
11257
11263
  onClearIncremental: new SyncHook(["graphic", "group", "stage"]),
11258
11264
  beforeUpdateAABBBounds: new SyncHook(["graphic", "stage", "willUpdate", "aabbBounds"]),
11259
- afterUpdateAABBBounds: new SyncHook(["graphic", "stage", "aabbBounds", "globalAABBBounds", "selfChange"])
11265
+ afterUpdateAABBBounds: new SyncHook(["graphic", "stage", "aabbBounds", "globalAABBBounds", "selfChange"]),
11266
+ clearAABBBounds: new SyncHook(["graphic", "stage", "aabbBounds"])
11260
11267
  }, this.tempAABBBounds1 = new AABBBounds(), this.tempAABBBounds2 = new AABBBounds();
11261
11268
  }
11262
11269
  onAttributeUpdate(graphic) {
@@ -11283,6 +11290,9 @@ let DefaultGraphicService = class {
11283
11290
  afterUpdateAABBBounds(graphic, stage, bounds, params, selfChange) {
11284
11291
  this.hooks.afterUpdateAABBBounds.taps.length && this.hooks.afterUpdateAABBBounds.call(graphic, stage, bounds, params, selfChange);
11285
11292
  }
11293
+ clearAABBBounds(graphic, stage, b) {
11294
+ this.hooks.clearAABBBounds.taps.length && this.hooks.clearAABBBounds.call(graphic, stage, b);
11295
+ }
11286
11296
  updatePathProxyAABBBounds(aabbBounds, graphic) {
11287
11297
  const path = "function" == typeof graphic.pathProxy ? graphic.pathProxy(graphic.attribute) : graphic.pathProxy;
11288
11298
  if (!path) return !1;
@@ -11345,12 +11355,11 @@ let DefaultGraphicService = class {
11345
11355
  validCheck(attribute, theme, aabbBounds, graphic) {
11346
11356
  if (!graphic) return !0;
11347
11357
  if (null != attribute.forceBoundsHeight || null != attribute.forceBoundsWidth) return !0;
11348
- if (graphic.shadowRoot) return !0;
11349
- if (!graphic.valid) return aabbBounds.clear(), !1;
11358
+ if (graphic.shadowRoot || graphic.isContainer) return !0;
11350
11359
  const {
11351
11360
  visible = theme.visible
11352
11361
  } = attribute;
11353
- return !!visible || (aabbBounds.clear(), !1);
11362
+ return !(!graphic.valid || !visible) || (aabbBounds.empty() || (graphic.parent && aabbBounds.transformWithMatrix(graphic.parent.globalTransMatrix), application.graphicService.clearAABBBounds(graphic, graphic.stage, aabbBounds), aabbBounds.clear()), !1);
11354
11363
  }
11355
11364
  updateTempAABBBounds(aabbBounds) {
11356
11365
  const tb1 = this.tempAABBBounds1,
@@ -14637,20 +14646,22 @@ class Text extends Graphic {
14637
14646
  });
14638
14647
  break;
14639
14648
  }
14640
- const clip = layoutObj.textMeasure.clipText(str, layoutObj.textOptions, maxLineWidth, "break-word" === wordBreak);
14641
- if ("" !== str && "" === clip.str) {
14649
+ const clip = layoutObj.textMeasure.clipText(str, layoutObj.textOptions, maxLineWidth, "break-all" !== wordBreak, "keep-all" === wordBreak);
14650
+ if ("" !== str && "" === clip.str || clip.wordBreaked) {
14642
14651
  if (ellipsis) {
14643
14652
  const clipEllipsis = layoutObj.textMeasure.clipTextWithSuffix(str, layoutObj.textOptions, maxLineWidth, ellipsis, !1, suffixPosition);
14644
14653
  clip.str = null !== (_c = clipEllipsis.str) && void 0 !== _c ? _c : "", clip.width = null !== (_d = clipEllipsis.width) && void 0 !== _d ? _d : 0;
14645
14654
  } else clip.str = "", clip.width = 0;
14646
14655
  needCut = !1;
14647
14656
  }
14648
- if (linesLayout.push({
14657
+ linesLayout.push({
14649
14658
  str: clip.str,
14650
14659
  width: clip.width
14651
- }), clip.str.length === str.length) ;else if (needCut) {
14652
- const newStr = str.substring(clip.str.length);
14653
- lines.splice(i + 1, 0, newStr);
14660
+ });
14661
+ let cutLength = clip.str.length;
14662
+ if (!clip.wordBreaked || "" !== str && "" === clip.str || (needCut = !0, cutLength = clip.wordBreaked), clip.str.length === str.length) ;else if (needCut) {
14663
+ let newStr = str.substring(cutLength);
14664
+ "keep-all" === wordBreak && (newStr = newStr.replace(/^\s+/g, "")), lines.splice(i + 1, 0, newStr);
14654
14665
  }
14655
14666
  }
14656
14667
  let maxWidth = 0;
@@ -18313,13 +18324,15 @@ class DirtyBoundsPlugin {
18313
18324
  graphic.glyphHost && (graphic = graphic.glyphHost), stage && stage === this.pluginService.stage && stage.renderCount && (graphic.isContainer && !graphic.shouldSelfChangeUpdateAABBBounds() || willUpdate && (globalBounds.setValue(bounds.x1, bounds.y1, bounds.x2, bounds.y2), stage.dirty(globalBounds, graphic.parent && graphic.parent.globalTransMatrix)));
18314
18325
  }), application.graphicService.hooks.afterUpdateAABBBounds.tap(this.key, (graphic, stage, bounds, params, selfChange) => {
18315
18326
  stage && stage === this.pluginService.stage && stage.renderCount && (graphic.isContainer && !selfChange || stage.dirty(params.globalAABBBounds));
18327
+ }), application.graphicService.hooks.clearAABBBounds.tap(this.key, (graphic, stage, bounds) => {
18328
+ stage && stage === this.pluginService.stage && stage.renderCount && stage && stage.dirty(bounds);
18316
18329
  }), application.graphicService.hooks.onRemove.tap(this.key, graphic => {
18317
18330
  const stage = graphic.stage;
18318
18331
  stage && stage === this.pluginService.stage && stage.renderCount && stage && stage.dirty(graphic.globalAABBBounds);
18319
18332
  });
18320
18333
  }
18321
18334
  deactivate(context) {
18322
- application.graphicService.hooks.beforeUpdateAABBBounds.taps = application.graphicService.hooks.beforeUpdateAABBBounds.taps.filter(item => item.name !== this.key), application.graphicService.hooks.afterUpdateAABBBounds.taps = application.graphicService.hooks.afterUpdateAABBBounds.taps.filter(item => item.name !== this.key), context.stage.hooks.afterRender.taps = context.stage.hooks.afterRender.taps.filter(item => item.name !== this.key), application.graphicService.hooks.onRemove.taps = application.graphicService.hooks.onRemove.taps.filter(item => item.name !== this.key);
18335
+ application.graphicService.hooks.beforeUpdateAABBBounds.taps = application.graphicService.hooks.beforeUpdateAABBBounds.taps.filter(item => item.name !== this.key), application.graphicService.hooks.afterUpdateAABBBounds.taps = application.graphicService.hooks.afterUpdateAABBBounds.taps.filter(item => item.name !== this.key), application.graphicService.hooks.clearAABBBounds.taps = application.graphicService.hooks.clearAABBBounds.taps.filter(item => item.name !== this.key), context.stage.hooks.afterRender.taps = context.stage.hooks.afterRender.taps.filter(item => item.name !== this.key), application.graphicService.hooks.onRemove.taps = application.graphicService.hooks.onRemove.taps.filter(item => item.name !== this.key);
18323
18336
  }
18324
18337
  }
18325
18338
 
@@ -28464,7 +28477,7 @@ const registerWrapText = _registerWrapText;
28464
28477
 
28465
28478
  const roughModule = _roughModule;
28466
28479
 
28467
- const version = "0.20.9-alpha.2";
28480
+ const version = "0.21.0-alpha.1";
28468
28481
  preLoadAllModule();
28469
28482
  if (isBrowserEnv()) {
28470
28483
  loadBrowserEnv(container);
package/dist/index.js CHANGED
@@ -4236,8 +4236,14 @@
4236
4236
  return needTestLetter && (index = testLetter(desc, index)), index;
4237
4237
  }
4238
4238
  function testLetter(string, index) {
4239
+ let negativeWrongMatch = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : !1;
4239
4240
  let i = index;
4240
- for (; regLetter.test(string[i - 1]) && regLetter.test(string[i]) || regPunctuation.test(string[i]);) if (i--, i <= 0) return index;
4241
+ for (; regLetter.test(string[i - 1]) && regLetter.test(string[i]) || regPunctuation.test(string[i]);) if (i--, i <= 0) return negativeWrongMatch ? testLetter2(string, index) : index;
4242
+ return i;
4243
+ }
4244
+ function testLetter2(string, index) {
4245
+ let i = index;
4246
+ for (; regLetter.test(string[i - 1]) && regLetter.test(string[i]) || regPunctuation.test(string[i]);) if (i++, i >= string.length) return i;
4241
4247
  return i;
4242
4248
  }
4243
4249
  function measureTextCanvas(text, character) {
@@ -4335,7 +4341,7 @@
4335
4341
  width: length
4336
4342
  };
4337
4343
  }
4338
- clipText(text, options, width, wordBreak) {
4344
+ clipText(text, options, width, wordBreak, keepAllBreak) {
4339
4345
  if (0 === text.length) return {
4340
4346
  str: "",
4341
4347
  width: 0
@@ -4351,8 +4357,8 @@
4351
4357
  };
4352
4358
  const data = this._clipText(text, options, width, 0, text.length - 1, "end", !1);
4353
4359
  if (wordBreak && data.str !== text) {
4354
- const index = testLetter(text, data.str.length);
4355
- index !== data.str.length && (data.str = text.substring(0, index), data.width = this.measureTextWidth(data.str, options));
4360
+ let index = testLetter(text, data.str.length, keepAllBreak);
4361
+ index !== data.str.length && (index > data.str.length && (data.wordBreaked = index, index = data.str.length), data.str = text.substring(0, index), data.width = this.measureTextWidth(data.str, options));
4356
4362
  }
4357
4363
  return data;
4358
4364
  }
@@ -11262,7 +11268,8 @@
11262
11268
  onAddIncremental: new SyncHook(["graphic", "group", "stage"]),
11263
11269
  onClearIncremental: new SyncHook(["graphic", "group", "stage"]),
11264
11270
  beforeUpdateAABBBounds: new SyncHook(["graphic", "stage", "willUpdate", "aabbBounds"]),
11265
- afterUpdateAABBBounds: new SyncHook(["graphic", "stage", "aabbBounds", "globalAABBBounds", "selfChange"])
11271
+ afterUpdateAABBBounds: new SyncHook(["graphic", "stage", "aabbBounds", "globalAABBBounds", "selfChange"]),
11272
+ clearAABBBounds: new SyncHook(["graphic", "stage", "aabbBounds"])
11266
11273
  }, this.tempAABBBounds1 = new AABBBounds(), this.tempAABBBounds2 = new AABBBounds();
11267
11274
  }
11268
11275
  onAttributeUpdate(graphic) {
@@ -11289,6 +11296,9 @@
11289
11296
  afterUpdateAABBBounds(graphic, stage, bounds, params, selfChange) {
11290
11297
  this.hooks.afterUpdateAABBBounds.taps.length && this.hooks.afterUpdateAABBBounds.call(graphic, stage, bounds, params, selfChange);
11291
11298
  }
11299
+ clearAABBBounds(graphic, stage, b) {
11300
+ this.hooks.clearAABBBounds.taps.length && this.hooks.clearAABBBounds.call(graphic, stage, b);
11301
+ }
11292
11302
  updatePathProxyAABBBounds(aabbBounds, graphic) {
11293
11303
  const path = "function" == typeof graphic.pathProxy ? graphic.pathProxy(graphic.attribute) : graphic.pathProxy;
11294
11304
  if (!path) return !1;
@@ -11351,12 +11361,11 @@
11351
11361
  validCheck(attribute, theme, aabbBounds, graphic) {
11352
11362
  if (!graphic) return !0;
11353
11363
  if (null != attribute.forceBoundsHeight || null != attribute.forceBoundsWidth) return !0;
11354
- if (graphic.shadowRoot) return !0;
11355
- if (!graphic.valid) return aabbBounds.clear(), !1;
11364
+ if (graphic.shadowRoot || graphic.isContainer) return !0;
11356
11365
  const {
11357
11366
  visible = theme.visible
11358
11367
  } = attribute;
11359
- return !!visible || (aabbBounds.clear(), !1);
11368
+ return !(!graphic.valid || !visible) || (aabbBounds.empty() || (graphic.parent && aabbBounds.transformWithMatrix(graphic.parent.globalTransMatrix), application.graphicService.clearAABBBounds(graphic, graphic.stage, aabbBounds), aabbBounds.clear()), !1);
11360
11369
  }
11361
11370
  updateTempAABBBounds(aabbBounds) {
11362
11371
  const tb1 = this.tempAABBBounds1,
@@ -14643,20 +14652,22 @@
14643
14652
  });
14644
14653
  break;
14645
14654
  }
14646
- const clip = layoutObj.textMeasure.clipText(str, layoutObj.textOptions, maxLineWidth, "break-word" === wordBreak);
14647
- if ("" !== str && "" === clip.str) {
14655
+ const clip = layoutObj.textMeasure.clipText(str, layoutObj.textOptions, maxLineWidth, "break-all" !== wordBreak, "keep-all" === wordBreak);
14656
+ if ("" !== str && "" === clip.str || clip.wordBreaked) {
14648
14657
  if (ellipsis) {
14649
14658
  const clipEllipsis = layoutObj.textMeasure.clipTextWithSuffix(str, layoutObj.textOptions, maxLineWidth, ellipsis, !1, suffixPosition);
14650
14659
  clip.str = null !== (_c = clipEllipsis.str) && void 0 !== _c ? _c : "", clip.width = null !== (_d = clipEllipsis.width) && void 0 !== _d ? _d : 0;
14651
14660
  } else clip.str = "", clip.width = 0;
14652
14661
  needCut = !1;
14653
14662
  }
14654
- if (linesLayout.push({
14663
+ linesLayout.push({
14655
14664
  str: clip.str,
14656
14665
  width: clip.width
14657
- }), clip.str.length === str.length) ;else if (needCut) {
14658
- const newStr = str.substring(clip.str.length);
14659
- lines.splice(i + 1, 0, newStr);
14666
+ });
14667
+ let cutLength = clip.str.length;
14668
+ if (!clip.wordBreaked || "" !== str && "" === clip.str || (needCut = !0, cutLength = clip.wordBreaked), clip.str.length === str.length) ;else if (needCut) {
14669
+ let newStr = str.substring(cutLength);
14670
+ "keep-all" === wordBreak && (newStr = newStr.replace(/^\s+/g, "")), lines.splice(i + 1, 0, newStr);
14660
14671
  }
14661
14672
  }
14662
14673
  let maxWidth = 0;
@@ -18319,13 +18330,15 @@
18319
18330
  graphic.glyphHost && (graphic = graphic.glyphHost), stage && stage === this.pluginService.stage && stage.renderCount && (graphic.isContainer && !graphic.shouldSelfChangeUpdateAABBBounds() || willUpdate && (globalBounds.setValue(bounds.x1, bounds.y1, bounds.x2, bounds.y2), stage.dirty(globalBounds, graphic.parent && graphic.parent.globalTransMatrix)));
18320
18331
  }), application.graphicService.hooks.afterUpdateAABBBounds.tap(this.key, (graphic, stage, bounds, params, selfChange) => {
18321
18332
  stage && stage === this.pluginService.stage && stage.renderCount && (graphic.isContainer && !selfChange || stage.dirty(params.globalAABBBounds));
18333
+ }), application.graphicService.hooks.clearAABBBounds.tap(this.key, (graphic, stage, bounds) => {
18334
+ stage && stage === this.pluginService.stage && stage.renderCount && stage && stage.dirty(bounds);
18322
18335
  }), application.graphicService.hooks.onRemove.tap(this.key, graphic => {
18323
18336
  const stage = graphic.stage;
18324
18337
  stage && stage === this.pluginService.stage && stage.renderCount && stage && stage.dirty(graphic.globalAABBBounds);
18325
18338
  });
18326
18339
  }
18327
18340
  deactivate(context) {
18328
- application.graphicService.hooks.beforeUpdateAABBBounds.taps = application.graphicService.hooks.beforeUpdateAABBBounds.taps.filter(item => item.name !== this.key), application.graphicService.hooks.afterUpdateAABBBounds.taps = application.graphicService.hooks.afterUpdateAABBBounds.taps.filter(item => item.name !== this.key), context.stage.hooks.afterRender.taps = context.stage.hooks.afterRender.taps.filter(item => item.name !== this.key), application.graphicService.hooks.onRemove.taps = application.graphicService.hooks.onRemove.taps.filter(item => item.name !== this.key);
18341
+ application.graphicService.hooks.beforeUpdateAABBBounds.taps = application.graphicService.hooks.beforeUpdateAABBBounds.taps.filter(item => item.name !== this.key), application.graphicService.hooks.afterUpdateAABBBounds.taps = application.graphicService.hooks.afterUpdateAABBBounds.taps.filter(item => item.name !== this.key), application.graphicService.hooks.clearAABBBounds.taps = application.graphicService.hooks.clearAABBBounds.taps.filter(item => item.name !== this.key), context.stage.hooks.afterRender.taps = context.stage.hooks.afterRender.taps.filter(item => item.name !== this.key), application.graphicService.hooks.onRemove.taps = application.graphicService.hooks.onRemove.taps.filter(item => item.name !== this.key);
18329
18342
  }
18330
18343
  }
18331
18344
 
@@ -28470,7 +28483,7 @@
28470
28483
 
28471
28484
  const roughModule = _roughModule;
28472
28485
 
28473
- const version = "0.20.9-alpha.2";
28486
+ const version = "0.21.0-alpha.1";
28474
28487
  preLoadAllModule();
28475
28488
  if (isBrowserEnv()) {
28476
28489
  loadBrowserEnv(container);