@wcardinal/wcardinal-ui 0.378.0 → 0.381.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (32) hide show
  1. package/dist/types/wcardinal/ui/d-diagram-canvas-base.d.ts +6 -1
  2. package/dist/types/wcardinal/ui/theme/dark/d-theme-dark-diagram-canvas-base.d.ts +1 -0
  3. package/dist/types/wcardinal/ui/theme/dark/d-theme-dark-diagram-canvas-editor.d.ts +1 -0
  4. package/dist/types/wcardinal/ui/theme/white/d-theme-white-diagram-canvas-base.d.ts +1 -0
  5. package/dist/types/wcardinal/ui/theme/white/d-theme-white-diagram-canvas-editor.d.ts +1 -0
  6. package/dist/wcardinal/ui/d-diagram-canvas-base.js +72 -0
  7. package/dist/wcardinal/ui/d-diagram-canvas-base.js.map +1 -1
  8. package/dist/wcardinal/ui/theme/dark/d-theme-dark-atlas.js +1 -1
  9. package/dist/wcardinal/ui/theme/dark/d-theme-dark-atlas.js.map +1 -1
  10. package/dist/wcardinal/ui/theme/dark/d-theme-dark-diagram-canvas-base.js +3 -0
  11. package/dist/wcardinal/ui/theme/dark/d-theme-dark-diagram-canvas-base.js.map +1 -1
  12. package/dist/wcardinal/ui/theme/dark/d-theme-dark-diagram-canvas-editor.js +3 -0
  13. package/dist/wcardinal/ui/theme/dark/d-theme-dark-diagram-canvas-editor.js.map +1 -1
  14. package/dist/wcardinal/ui/theme/white/d-theme-white-atlas.js +1 -1
  15. package/dist/wcardinal/ui/theme/white/d-theme-white-atlas.js.map +1 -1
  16. package/dist/wcardinal/ui/theme/white/d-theme-white-diagram-canvas-base.js +3 -0
  17. package/dist/wcardinal/ui/theme/white/d-theme-white-diagram-canvas-base.js.map +1 -1
  18. package/dist/wcardinal/ui/theme/white/d-theme-white-diagram-canvas-editor.js +3 -0
  19. package/dist/wcardinal/ui/theme/white/d-theme-white-diagram-canvas-editor.js.map +1 -1
  20. package/dist/wcardinal/ui/util/dynamic-atlas.js +1 -1
  21. package/dist/wcardinal/ui/util/dynamic-atlas.js.map +1 -1
  22. package/dist/wcardinal-ui-theme-dark.js +8 -2
  23. package/dist/wcardinal-ui-theme-dark.min.js +2 -2
  24. package/dist/wcardinal-ui-theme-dark.min.js.map +1 -1
  25. package/dist/wcardinal-ui-theme-white.js +8 -2
  26. package/dist/wcardinal-ui-theme-white.min.js +2 -2
  27. package/dist/wcardinal-ui-theme-white.min.js.map +1 -1
  28. package/dist/wcardinal-ui.cjs.js +87 -4
  29. package/dist/wcardinal-ui.js +73 -2
  30. package/dist/wcardinal-ui.min.js +2 -2
  31. package/dist/wcardinal-ui.min.js.map +1 -1
  32. package/package.json +1 -1
@@ -1,5 +1,5 @@
1
1
  /*
2
- Winter Cardinal UI v0.378.0
2
+ Winter Cardinal UI v0.381.0
3
3
  Copyright (C) 2019 Toshiba Corporation
4
4
  SPDX-License-Identifier: Apache-2.0
5
5
 
@@ -20526,7 +20526,7 @@ var DynamicAtlas = /** @class */ (function () {
20526
20526
  }
20527
20527
  };
20528
20528
  DynamicAtlas.prototype.calcCanvasWidth = function (data) {
20529
- var result = 128;
20529
+ var result = 512;
20530
20530
  for (var i = data.length - 1; 0 <= i; --i) {
20531
20531
  var datum = data[i];
20532
20532
  var size = Math.max(datum.frame.width, datum.frame.height);
@@ -46585,7 +46585,7 @@ var UtilSvgAtlasBuilder = /** @class */ (function () {
46585
46585
  * Copyright (C) 2019 Toshiba Corporation
46586
46586
  * SPDX-License-Identifier: Apache-2.0
46587
46587
  */
46588
- var DThemeWhiteAtlas = new UtilSvgAtlasBuilder(512, 1, 3);
46588
+ var DThemeWhiteAtlas = new UtilSvgAtlasBuilder(1024, 1, 3);
46589
46589
 
46590
46590
  /*
46591
46591
  * Copyright (C) 2019 Toshiba Corporation
@@ -50619,6 +50619,9 @@ var DThemeWhiteDiagramCanvasBase = /** @class */ (function (_super) {
50619
50619
  DThemeWhiteDiagramCanvasBase.prototype.getBackgroundBase = function () {
50620
50620
  return 0xeeeeee;
50621
50621
  };
50622
+ DThemeWhiteDiagramCanvasBase.prototype.getLocalBoundsLimit = function () {
50623
+ return 0;
50624
+ };
50622
50625
  return DThemeWhiteDiagramCanvasBase;
50623
50626
  }(DThemeWhiteCanvas));
50624
50627
 
@@ -50741,6 +50744,9 @@ var DThemeWhiteDiagramCanvasEditor = /** @class */ (function (_super) {
50741
50744
  DThemeWhiteDiagramCanvasEditor.prototype.isAmbient = function () {
50742
50745
  return false;
50743
50746
  };
50747
+ DThemeWhiteDiagramCanvasEditor.prototype.getLocalBoundsLimit = function () {
50748
+ return 1000;
50749
+ };
50744
50750
  DThemeWhiteDiagramCanvasEditor.prototype.getOutlineColor = function (state) {
50745
50751
  return null;
50746
50752
  };
@@ -56520,7 +56526,7 @@ var loadThemeWhiteAll = function () {
56520
56526
  * Copyright (C) 2019 Toshiba Corporation
56521
56527
  * SPDX-License-Identifier: Apache-2.0
56522
56528
  */
56523
- var DThemeDarkAtlas = new UtilSvgAtlasBuilder(512, 1, 3);
56529
+ var DThemeDarkAtlas = new UtilSvgAtlasBuilder(1024, 1, 3);
56524
56530
 
56525
56531
  /*
56526
56532
  * Copyright (C) 2019 Toshiba Corporation
@@ -59956,6 +59962,9 @@ var DThemeDarkDiagramCanvasBase = /** @class */ (function (_super) {
59956
59962
  DThemeDarkDiagramCanvasBase.prototype.getBackgroundBase = function () {
59957
59963
  return DThemeDarkConstants.BACKGROUND_COLOR;
59958
59964
  };
59965
+ DThemeDarkDiagramCanvasBase.prototype.getLocalBoundsLimit = function () {
59966
+ return 0;
59967
+ };
59959
59968
  return DThemeDarkDiagramCanvasBase;
59960
59969
  }(DThemeDarkCanvas));
59961
59970
 
@@ -60082,6 +60091,9 @@ var DThemeDarkDiagramCanvasEditor = /** @class */ (function (_super) {
60082
60091
  DThemeDarkDiagramCanvasEditor.prototype.isAmbient = function () {
60083
60092
  return false;
60084
60093
  };
60094
+ DThemeDarkDiagramCanvasEditor.prototype.getLocalBoundsLimit = function () {
60095
+ return 1000;
60096
+ };
60085
60097
  DThemeDarkDiagramCanvasEditor.prototype.getOutlineColor = function (state) {
60086
60098
  return null;
60087
60099
  };
@@ -81032,6 +81044,8 @@ var DDiagramCanvasBase = /** @class */ (function (_super) {
81032
81044
  var tile = new DDiagramCanvasTile(_this, options === null || options === void 0 ? void 0 : options.tile);
81033
81045
  _this._tile = tile;
81034
81046
  tile.init();
81047
+ // Local bounds limit
81048
+ _this._localBoundsLimit = theme.getLocalBoundsLimit();
81035
81049
  return _this;
81036
81050
  }
81037
81051
  DDiagramCanvasBase.prototype.isAmbient = function (theme, options) {
@@ -81122,6 +81136,75 @@ var DDiagramCanvasBase = /** @class */ (function (_super) {
81122
81136
  }
81123
81137
  return null;
81124
81138
  };
81139
+ DDiagramCanvasBase.prototype.getLocalBounds = function (result) {
81140
+ var _a, _b;
81141
+ if (result == null) {
81142
+ result = (_a = this._localBoundsRect) !== null && _a !== void 0 ? _a : (this._localBoundsRect = new pixi_js.Rectangle());
81143
+ }
81144
+ result.x = 0;
81145
+ result.y = 0;
81146
+ result.width = this.width;
81147
+ result.height = this.height;
81148
+ var limit = this._localBoundsLimit;
81149
+ if (limit === 0) {
81150
+ return result;
81151
+ }
81152
+ var layers = this.layer.children;
81153
+ var layersLength = layers.length;
81154
+ var work = ((_b = DDiagramCanvasBase.WORK_LOCAL_BOUNDS) !== null && _b !== void 0 ? _b : (DDiagramCanvasBase.WORK_LOCAL_BOUNDS = new pixi_js.Rectangle()));
81155
+ if (0 < limit) {
81156
+ var shapeCount = 0;
81157
+ for (var i = 0; i < layersLength; ++i) {
81158
+ var layer = layers[i];
81159
+ var p = layer.transform.position;
81160
+ work.x = p.x;
81161
+ work.y = p.y;
81162
+ work.width = layer.width;
81163
+ work.height = layer.height;
81164
+ result.enlarge(work);
81165
+ shapeCount += layer.children.length;
81166
+ }
81167
+ if (limit < shapeCount) {
81168
+ return result;
81169
+ }
81170
+ for (var i = 0; i < layersLength; ++i) {
81171
+ var layer = layers[i];
81172
+ var p = layer.transform.position;
81173
+ var px = p.x;
81174
+ var py = p.y;
81175
+ var shapes = layer.children;
81176
+ for (var j = 0, jmax = shapes.length; j < jmax; ++j) {
81177
+ var shape = shapes[j];
81178
+ shape.getBoundsInternal(true, work);
81179
+ work.x += px;
81180
+ work.y += py;
81181
+ result.enlarge(work);
81182
+ }
81183
+ }
81184
+ }
81185
+ else {
81186
+ for (var i = 0; i < layersLength; ++i) {
81187
+ var layer = layers[i];
81188
+ var p = layer.transform.position;
81189
+ var px = p.x;
81190
+ var py = p.y;
81191
+ work.x = px;
81192
+ work.y = py;
81193
+ work.width = layer.width;
81194
+ work.height = layer.height;
81195
+ result.enlarge(work);
81196
+ var shapes = layer.children;
81197
+ for (var j = 0, jmax = shapes.length; j < jmax; ++j) {
81198
+ var shape = shapes[j];
81199
+ shape.getBoundsInternal(true, work);
81200
+ work.x += px;
81201
+ work.y += py;
81202
+ result.enlarge(work);
81203
+ }
81204
+ }
81205
+ }
81206
+ return result;
81207
+ };
81125
81208
  DDiagramCanvasBase.prototype.getType = function () {
81126
81209
  return "DDiagramCanvasBase";
81127
81210
  };
@@ -1,5 +1,5 @@
1
1
  /*
2
- Winter Cardinal UI v0.378.0
2
+ Winter Cardinal UI v0.381.0
3
3
  Copyright (C) 2019 Toshiba Corporation
4
4
  SPDX-License-Identifier: Apache-2.0
5
5
 
@@ -20523,7 +20523,7 @@
20523
20523
  }
20524
20524
  };
20525
20525
  DynamicAtlas.prototype.calcCanvasWidth = function (data) {
20526
- var result = 128;
20526
+ var result = 512;
20527
20527
  for (var i = data.length - 1; 0 <= i; --i) {
20528
20528
  var datum = data[i];
20529
20529
  var size = Math.max(datum.frame.width, datum.frame.height);
@@ -62362,6 +62362,8 @@
62362
62362
  var tile = new DDiagramCanvasTile(_this, options === null || options === void 0 ? void 0 : options.tile);
62363
62363
  _this._tile = tile;
62364
62364
  tile.init();
62365
+ // Local bounds limit
62366
+ _this._localBoundsLimit = theme.getLocalBoundsLimit();
62365
62367
  return _this;
62366
62368
  }
62367
62369
  DDiagramCanvasBase.prototype.isAmbient = function (theme, options) {
@@ -62452,6 +62454,75 @@
62452
62454
  }
62453
62455
  return null;
62454
62456
  };
62457
+ DDiagramCanvasBase.prototype.getLocalBounds = function (result) {
62458
+ var _a, _b;
62459
+ if (result == null) {
62460
+ result = (_a = this._localBoundsRect) !== null && _a !== void 0 ? _a : (this._localBoundsRect = new pixi_js.Rectangle());
62461
+ }
62462
+ result.x = 0;
62463
+ result.y = 0;
62464
+ result.width = this.width;
62465
+ result.height = this.height;
62466
+ var limit = this._localBoundsLimit;
62467
+ if (limit === 0) {
62468
+ return result;
62469
+ }
62470
+ var layers = this.layer.children;
62471
+ var layersLength = layers.length;
62472
+ var work = ((_b = DDiagramCanvasBase.WORK_LOCAL_BOUNDS) !== null && _b !== void 0 ? _b : (DDiagramCanvasBase.WORK_LOCAL_BOUNDS = new pixi_js.Rectangle()));
62473
+ if (0 < limit) {
62474
+ var shapeCount = 0;
62475
+ for (var i = 0; i < layersLength; ++i) {
62476
+ var layer = layers[i];
62477
+ var p = layer.transform.position;
62478
+ work.x = p.x;
62479
+ work.y = p.y;
62480
+ work.width = layer.width;
62481
+ work.height = layer.height;
62482
+ result.enlarge(work);
62483
+ shapeCount += layer.children.length;
62484
+ }
62485
+ if (limit < shapeCount) {
62486
+ return result;
62487
+ }
62488
+ for (var i = 0; i < layersLength; ++i) {
62489
+ var layer = layers[i];
62490
+ var p = layer.transform.position;
62491
+ var px = p.x;
62492
+ var py = p.y;
62493
+ var shapes = layer.children;
62494
+ for (var j = 0, jmax = shapes.length; j < jmax; ++j) {
62495
+ var shape = shapes[j];
62496
+ shape.getBoundsInternal(true, work);
62497
+ work.x += px;
62498
+ work.y += py;
62499
+ result.enlarge(work);
62500
+ }
62501
+ }
62502
+ }
62503
+ else {
62504
+ for (var i = 0; i < layersLength; ++i) {
62505
+ var layer = layers[i];
62506
+ var p = layer.transform.position;
62507
+ var px = p.x;
62508
+ var py = p.y;
62509
+ work.x = px;
62510
+ work.y = py;
62511
+ work.width = layer.width;
62512
+ work.height = layer.height;
62513
+ result.enlarge(work);
62514
+ var shapes = layer.children;
62515
+ for (var j = 0, jmax = shapes.length; j < jmax; ++j) {
62516
+ var shape = shapes[j];
62517
+ shape.getBoundsInternal(true, work);
62518
+ work.x += px;
62519
+ work.y += py;
62520
+ result.enlarge(work);
62521
+ }
62522
+ }
62523
+ }
62524
+ return result;
62525
+ };
62455
62526
  DDiagramCanvasBase.prototype.getType = function () {
62456
62527
  return "DDiagramCanvasBase";
62457
62528
  };