@wcardinal/wcardinal-ui 0.322.0 → 0.324.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 (27) hide show
  1. package/dist/types/wcardinal/ui/shape/e-shape-acceptor-edge-type.d.ts +6 -0
  2. package/dist/types/wcardinal/ui/shape/e-shape-acceptor-edge.d.ts +2 -2
  3. package/dist/types/wcardinal/ui/shape/e-shape-acceptor-impl.d.ts +6 -5
  4. package/dist/types/wcardinal/ui/shape/e-shape-acceptor-type.d.ts +6 -0
  5. package/dist/types/wcardinal/ui/shape/index.d.ts +1 -0
  6. package/dist/wcardinal/ui/shape/e-shape-acceptor-edge-type.js +10 -0
  7. package/dist/wcardinal/ui/shape/e-shape-acceptor-edge-type.js.map +1 -0
  8. package/dist/wcardinal/ui/shape/e-shape-acceptor-edge.js.map +1 -1
  9. package/dist/wcardinal/ui/shape/e-shape-acceptor-impl.js +24 -2
  10. package/dist/wcardinal/ui/shape/e-shape-acceptor-impl.js.map +1 -1
  11. package/dist/wcardinal/ui/shape/e-shape-acceptor-type.js +5 -5
  12. package/dist/wcardinal/ui/shape/e-shape-acceptor-type.js.map +1 -1
  13. package/dist/wcardinal/ui/shape/e-shape-acceptors.js +10 -10
  14. package/dist/wcardinal/ui/shape/e-shape-acceptors.js.map +1 -1
  15. package/dist/wcardinal/ui/shape/index.js +1 -0
  16. package/dist/wcardinal/ui/shape/index.js.map +1 -1
  17. package/dist/wcardinal/ui/shape/variant/e-shape-connector-elbow-points-filler.js +10 -10
  18. package/dist/wcardinal/ui/shape/variant/e-shape-connector-elbow-points-filler.js.map +1 -1
  19. package/dist/wcardinal-ui-theme-dark.js +1 -1
  20. package/dist/wcardinal-ui-theme-dark.min.js +1 -1
  21. package/dist/wcardinal-ui-theme-white.js +1 -1
  22. package/dist/wcardinal-ui-theme-white.min.js +1 -1
  23. package/dist/wcardinal-ui.cjs.js +60 -32
  24. package/dist/wcardinal-ui.js +60 -32
  25. package/dist/wcardinal-ui.min.js +2 -2
  26. package/dist/wcardinal-ui.min.js.map +1 -1
  27. package/package.json +1 -1
@@ -1,5 +1,5 @@
1
1
  /*
2
- Winter Cardinal UI v0.322.0
2
+ Winter Cardinal UI v0.324.0
3
3
  Copyright (C) 2019 Toshiba Corporation
4
4
  SPDX-License-Identifier: Apache-2.0
5
5
 
@@ -17614,6 +17614,16 @@ var EShapeEmbeddedDatum = /** @class */ (function () {
17614
17614
  return EShapeEmbeddedDatum;
17615
17615
  }());
17616
17616
 
17617
+ /*
17618
+ * Copyright (C) 2019 Toshiba Corporation
17619
+ * SPDX-License-Identifier: Apache-2.0
17620
+ */
17621
+ var EShapeAcceptorEdgeType = {
17622
+ TAIL: 1,
17623
+ HEAD: 2,
17624
+ ALL: 3
17625
+ };
17626
+
17617
17627
  /*
17618
17628
  * Copyright (C) 2019 Toshiba Corporation
17619
17629
  * SPDX-License-Identifier: Apache-2.0
@@ -17637,7 +17647,7 @@ var EShapeAcceptorImpl = /** @class */ (function () {
17637
17647
  }
17638
17648
  EShapeAcceptorImpl.prototype.add = function (id, type, x, y, nx, ny, sx, sy, side) {
17639
17649
  this._edges.set(id, {
17640
- type: type,
17650
+ type: toEnum(type, EShapeAcceptorEdgeType),
17641
17651
  x: x,
17642
17652
  y: y,
17643
17653
  normal: this.toNormal(x, y, nx, ny),
@@ -17645,7 +17655,7 @@ var EShapeAcceptorImpl = /** @class */ (function () {
17645
17655
  x: sx !== null && sx !== void 0 ? sx : 0,
17646
17656
  y: sy !== null && sy !== void 0 ? sy : 0
17647
17657
  },
17648
- side: side !== null && side !== void 0 ? side : EShapeAcceptorEdgeSide.TOP
17658
+ side: this.toSide(side)
17649
17659
  });
17650
17660
  return true;
17651
17661
  };
@@ -17673,6 +17683,24 @@ var EShapeAcceptorImpl = /** @class */ (function () {
17673
17683
  }
17674
17684
  }
17675
17685
  };
17686
+ EShapeAcceptorImpl.prototype.toSide = function (side) {
17687
+ if (side == null) {
17688
+ return EShapeAcceptorEdgeSide.TOP;
17689
+ }
17690
+ else if (isNumber(side)) {
17691
+ return side;
17692
+ }
17693
+ else if (isString(side)) {
17694
+ return toEnum(side, EShapeAcceptorEdgeSide);
17695
+ }
17696
+ else {
17697
+ var result = EShapeAcceptorEdgeSide.NONE;
17698
+ for (var i = 0, imax = side.length; i < imax; ++i) {
17699
+ result |= toEnum(side[i], EShapeAcceptorEdgeSide);
17700
+ }
17701
+ return result;
17702
+ }
17703
+ };
17676
17704
  EShapeAcceptorImpl.prototype.remove = function (id) {
17677
17705
  var edges = this._edges;
17678
17706
  var result = edges.get(id);
@@ -17706,16 +17734,6 @@ var EShapeAcceptorImpl = /** @class */ (function () {
17706
17734
  return EShapeAcceptorImpl;
17707
17735
  }());
17708
17736
 
17709
- /*
17710
- * Copyright (C) 2019 Toshiba Corporation
17711
- * SPDX-License-Identifier: Apache-2.0
17712
- */
17713
- var EShapeAcceptorType = {
17714
- TAIL: 1,
17715
- HEAD: 2,
17716
- ALL: 3
17717
- };
17718
-
17719
17737
  /*
17720
17738
  * Copyright (C) 2019 Toshiba Corporation
17721
17739
  * SPDX-License-Identifier: Apache-2.0
@@ -17746,15 +17764,15 @@ var EShapeAcceptors = /** @class */ (function () {
17746
17764
  EShapeAcceptors.newDefault = function () {
17747
17765
  var result = new EShapeAcceptorImpl();
17748
17766
  var s = 1 / Math.sqrt(2);
17749
- result.add("TOP", EShapeAcceptorType.ALL, 0, -0.5, 0, -1);
17750
- result.add("LEFT", EShapeAcceptorType.ALL, -0.5, 0, -1, 0);
17751
- result.add("RIGHT", EShapeAcceptorType.ALL, 0.5, 0, 1, 0);
17752
- result.add("BOTTOM", EShapeAcceptorType.ALL, 0, 0.5, 0, 1);
17753
- result.add("CENTER", EShapeAcceptorType.ALL, 0, 0, 0, 0);
17754
- result.add("TOP_LEFT", EShapeAcceptorType.ALL, -0.5, -0.5, -s, -s);
17755
- result.add("TOP_RIGHT", EShapeAcceptorType.ALL, 0.5, -0.5, s, -s);
17756
- result.add("BOTTOM_LEFT", EShapeAcceptorType.ALL, -0.5, 0.5, -s, s);
17757
- result.add("BOTTOM_RIGHT", EShapeAcceptorType.ALL, 0.5, 0.5, s, s);
17767
+ result.add("TOP", EShapeAcceptorEdgeType.ALL, 0, -0.5, 0, -1);
17768
+ result.add("LEFT", EShapeAcceptorEdgeType.ALL, -0.5, 0, -1, 0);
17769
+ result.add("RIGHT", EShapeAcceptorEdgeType.ALL, 0.5, 0, 1, 0);
17770
+ result.add("BOTTOM", EShapeAcceptorEdgeType.ALL, 0, 0.5, 0, 1);
17771
+ result.add("CENTER", EShapeAcceptorEdgeType.ALL, 0, 0, 0, 0);
17772
+ result.add("TOP_LEFT", EShapeAcceptorEdgeType.ALL, -0.5, -0.5, -s, -s);
17773
+ result.add("TOP_RIGHT", EShapeAcceptorEdgeType.ALL, 0.5, -0.5, s, -s);
17774
+ result.add("BOTTOM_LEFT", EShapeAcceptorEdgeType.ALL, -0.5, 0.5, -s, s);
17775
+ result.add("BOTTOM_RIGHT", EShapeAcceptorEdgeType.ALL, 0.5, 0.5, s, s);
17758
17776
  return result;
17759
17777
  };
17760
17778
  return EShapeAcceptors;
@@ -37870,17 +37888,17 @@ var EShapeConnectorElbowPointsFiller = /** @class */ (function () {
37870
37888
  var d = null;
37871
37889
  var result = 0;
37872
37890
  // 0 := (0, -1)
37873
- // | ny, nx | 0 |
37874
- // | nx, -ny | -1 |
37875
- if (side & this.toSide(-nx, ny)) {
37891
+ // | ny, -nx | 0 |
37892
+ // | nx, ny | -1 |
37893
+ if (side & this.toSide(nx, -ny)) {
37876
37894
  if (d == null || d < -dy) {
37877
37895
  d = -dy;
37878
37896
  result = 0;
37879
37897
  }
37880
37898
  }
37881
37899
  // 1 := (1, 0)
37882
- // | ny, nx | 1 |
37883
- // | nx, -ny | 0 |
37900
+ // | ny, -nx | 1 |
37901
+ // | nx, ny | 0 |
37884
37902
  if (side & this.toSide(ny, nx)) {
37885
37903
  if (d == null || d < dx) {
37886
37904
  d = dx;
@@ -37888,17 +37906,17 @@ var EShapeConnectorElbowPointsFiller = /** @class */ (function () {
37888
37906
  }
37889
37907
  }
37890
37908
  // 2 := (0, 1)
37891
- // | ny, nx | 0 |
37892
- // | nx, -ny | 1 |
37893
- if (side & this.toSide(nx, -ny)) {
37909
+ // | ny, -nx | 0 |
37910
+ // | nx, ny | 1 |
37911
+ if (side & this.toSide(-nx, ny)) {
37894
37912
  if (d == null || d < dy) {
37895
37913
  d = dy;
37896
37914
  result = 2;
37897
37915
  }
37898
37916
  }
37899
37917
  // 3 := (-1, 0)
37900
- // | ny, nx | -1 |
37901
- // | nx, -ny | 0 |
37918
+ // | ny, -nx | -1 |
37919
+ // | nx, ny | 0 |
37902
37920
  if (side & this.toSide(-ny, -nx)) {
37903
37921
  if (d == null || d < -dx) {
37904
37922
  d = -dx;
@@ -45108,6 +45126,15 @@ var toResized = function (shape, from, to, centerMode, isPerfect) {
45108
45126
  shape.allowUploadedUpdate();
45109
45127
  };
45110
45128
 
45129
+ /*
45130
+ * Copyright (C) 2019 Toshiba Corporation
45131
+ * SPDX-License-Identifier: Apache-2.0
45132
+ */
45133
+ /**
45134
+ * @deprecated in favor of {@link EShapeAcceptorEdgeType}.
45135
+ */
45136
+ var EShapeAcceptorType = EShapeAcceptorEdgeType;
45137
+
45111
45138
  /*
45112
45139
  * Copyright (C) 2019 Toshiba Corporation
45113
45140
  * SPDX-License-Identifier: Apache-2.0
@@ -93773,6 +93800,7 @@ exports.DynamicSDFFontAtlas = DynamicSDFFontAtlas;
93773
93800
  exports.DynamicSDFFontAtlases = DynamicSDFFontAtlases;
93774
93801
  exports.DynamicSDFFontGenerator = DynamicSDFFontGenerator;
93775
93802
  exports.EShapeAcceptorEdgeSide = EShapeAcceptorEdgeSide;
93803
+ exports.EShapeAcceptorEdgeType = EShapeAcceptorEdgeType;
93776
93804
  exports.EShapeAcceptorImpl = EShapeAcceptorImpl;
93777
93805
  exports.EShapeAcceptorType = EShapeAcceptorType;
93778
93806
  exports.EShapeAcceptors = EShapeAcceptors;
@@ -1,5 +1,5 @@
1
1
  /*
2
- Winter Cardinal UI v0.322.0
2
+ Winter Cardinal UI v0.324.0
3
3
  Copyright (C) 2019 Toshiba Corporation
4
4
  SPDX-License-Identifier: Apache-2.0
5
5
 
@@ -17611,6 +17611,16 @@
17611
17611
  return EShapeEmbeddedDatum;
17612
17612
  }());
17613
17613
 
17614
+ /*
17615
+ * Copyright (C) 2019 Toshiba Corporation
17616
+ * SPDX-License-Identifier: Apache-2.0
17617
+ */
17618
+ var EShapeAcceptorEdgeType = {
17619
+ TAIL: 1,
17620
+ HEAD: 2,
17621
+ ALL: 3
17622
+ };
17623
+
17614
17624
  /*
17615
17625
  * Copyright (C) 2019 Toshiba Corporation
17616
17626
  * SPDX-License-Identifier: Apache-2.0
@@ -17634,7 +17644,7 @@
17634
17644
  }
17635
17645
  EShapeAcceptorImpl.prototype.add = function (id, type, x, y, nx, ny, sx, sy, side) {
17636
17646
  this._edges.set(id, {
17637
- type: type,
17647
+ type: toEnum(type, EShapeAcceptorEdgeType),
17638
17648
  x: x,
17639
17649
  y: y,
17640
17650
  normal: this.toNormal(x, y, nx, ny),
@@ -17642,7 +17652,7 @@
17642
17652
  x: sx !== null && sx !== void 0 ? sx : 0,
17643
17653
  y: sy !== null && sy !== void 0 ? sy : 0
17644
17654
  },
17645
- side: side !== null && side !== void 0 ? side : EShapeAcceptorEdgeSide.TOP
17655
+ side: this.toSide(side)
17646
17656
  });
17647
17657
  return true;
17648
17658
  };
@@ -17670,6 +17680,24 @@
17670
17680
  }
17671
17681
  }
17672
17682
  };
17683
+ EShapeAcceptorImpl.prototype.toSide = function (side) {
17684
+ if (side == null) {
17685
+ return EShapeAcceptorEdgeSide.TOP;
17686
+ }
17687
+ else if (isNumber(side)) {
17688
+ return side;
17689
+ }
17690
+ else if (isString(side)) {
17691
+ return toEnum(side, EShapeAcceptorEdgeSide);
17692
+ }
17693
+ else {
17694
+ var result = EShapeAcceptorEdgeSide.NONE;
17695
+ for (var i = 0, imax = side.length; i < imax; ++i) {
17696
+ result |= toEnum(side[i], EShapeAcceptorEdgeSide);
17697
+ }
17698
+ return result;
17699
+ }
17700
+ };
17673
17701
  EShapeAcceptorImpl.prototype.remove = function (id) {
17674
17702
  var edges = this._edges;
17675
17703
  var result = edges.get(id);
@@ -17703,16 +17731,6 @@
17703
17731
  return EShapeAcceptorImpl;
17704
17732
  }());
17705
17733
 
17706
- /*
17707
- * Copyright (C) 2019 Toshiba Corporation
17708
- * SPDX-License-Identifier: Apache-2.0
17709
- */
17710
- var EShapeAcceptorType = {
17711
- TAIL: 1,
17712
- HEAD: 2,
17713
- ALL: 3
17714
- };
17715
-
17716
17734
  /*
17717
17735
  * Copyright (C) 2019 Toshiba Corporation
17718
17736
  * SPDX-License-Identifier: Apache-2.0
@@ -17743,15 +17761,15 @@
17743
17761
  EShapeAcceptors.newDefault = function () {
17744
17762
  var result = new EShapeAcceptorImpl();
17745
17763
  var s = 1 / Math.sqrt(2);
17746
- result.add("TOP", EShapeAcceptorType.ALL, 0, -0.5, 0, -1);
17747
- result.add("LEFT", EShapeAcceptorType.ALL, -0.5, 0, -1, 0);
17748
- result.add("RIGHT", EShapeAcceptorType.ALL, 0.5, 0, 1, 0);
17749
- result.add("BOTTOM", EShapeAcceptorType.ALL, 0, 0.5, 0, 1);
17750
- result.add("CENTER", EShapeAcceptorType.ALL, 0, 0, 0, 0);
17751
- result.add("TOP_LEFT", EShapeAcceptorType.ALL, -0.5, -0.5, -s, -s);
17752
- result.add("TOP_RIGHT", EShapeAcceptorType.ALL, 0.5, -0.5, s, -s);
17753
- result.add("BOTTOM_LEFT", EShapeAcceptorType.ALL, -0.5, 0.5, -s, s);
17754
- result.add("BOTTOM_RIGHT", EShapeAcceptorType.ALL, 0.5, 0.5, s, s);
17764
+ result.add("TOP", EShapeAcceptorEdgeType.ALL, 0, -0.5, 0, -1);
17765
+ result.add("LEFT", EShapeAcceptorEdgeType.ALL, -0.5, 0, -1, 0);
17766
+ result.add("RIGHT", EShapeAcceptorEdgeType.ALL, 0.5, 0, 1, 0);
17767
+ result.add("BOTTOM", EShapeAcceptorEdgeType.ALL, 0, 0.5, 0, 1);
17768
+ result.add("CENTER", EShapeAcceptorEdgeType.ALL, 0, 0, 0, 0);
17769
+ result.add("TOP_LEFT", EShapeAcceptorEdgeType.ALL, -0.5, -0.5, -s, -s);
17770
+ result.add("TOP_RIGHT", EShapeAcceptorEdgeType.ALL, 0.5, -0.5, s, -s);
17771
+ result.add("BOTTOM_LEFT", EShapeAcceptorEdgeType.ALL, -0.5, 0.5, -s, s);
17772
+ result.add("BOTTOM_RIGHT", EShapeAcceptorEdgeType.ALL, 0.5, 0.5, s, s);
17755
17773
  return result;
17756
17774
  };
17757
17775
  return EShapeAcceptors;
@@ -37867,17 +37885,17 @@
37867
37885
  var d = null;
37868
37886
  var result = 0;
37869
37887
  // 0 := (0, -1)
37870
- // | ny, nx | 0 |
37871
- // | nx, -ny | -1 |
37872
- if (side & this.toSide(-nx, ny)) {
37888
+ // | ny, -nx | 0 |
37889
+ // | nx, ny | -1 |
37890
+ if (side & this.toSide(nx, -ny)) {
37873
37891
  if (d == null || d < -dy) {
37874
37892
  d = -dy;
37875
37893
  result = 0;
37876
37894
  }
37877
37895
  }
37878
37896
  // 1 := (1, 0)
37879
- // | ny, nx | 1 |
37880
- // | nx, -ny | 0 |
37897
+ // | ny, -nx | 1 |
37898
+ // | nx, ny | 0 |
37881
37899
  if (side & this.toSide(ny, nx)) {
37882
37900
  if (d == null || d < dx) {
37883
37901
  d = dx;
@@ -37885,17 +37903,17 @@
37885
37903
  }
37886
37904
  }
37887
37905
  // 2 := (0, 1)
37888
- // | ny, nx | 0 |
37889
- // | nx, -ny | 1 |
37890
- if (side & this.toSide(nx, -ny)) {
37906
+ // | ny, -nx | 0 |
37907
+ // | nx, ny | 1 |
37908
+ if (side & this.toSide(-nx, ny)) {
37891
37909
  if (d == null || d < dy) {
37892
37910
  d = dy;
37893
37911
  result = 2;
37894
37912
  }
37895
37913
  }
37896
37914
  // 3 := (-1, 0)
37897
- // | ny, nx | -1 |
37898
- // | nx, -ny | 0 |
37915
+ // | ny, -nx | -1 |
37916
+ // | nx, ny | 0 |
37899
37917
  if (side & this.toSide(-ny, -nx)) {
37900
37918
  if (d == null || d < -dx) {
37901
37919
  d = -dx;
@@ -45105,6 +45123,15 @@
45105
45123
  shape.allowUploadedUpdate();
45106
45124
  };
45107
45125
 
45126
+ /*
45127
+ * Copyright (C) 2019 Toshiba Corporation
45128
+ * SPDX-License-Identifier: Apache-2.0
45129
+ */
45130
+ /**
45131
+ * @deprecated in favor of {@link EShapeAcceptorEdgeType}.
45132
+ */
45133
+ var EShapeAcceptorType = EShapeAcceptorEdgeType;
45134
+
45108
45135
  /*
45109
45136
  * Copyright (C) 2019 Toshiba Corporation
45110
45137
  * SPDX-License-Identifier: Apache-2.0
@@ -74996,6 +75023,7 @@
74996
75023
  toSizeRounded: toSizeRounded,
74997
75024
  toThresholdDefault: toThresholdDefault,
74998
75025
  EShapeAcceptorEdgeSide: EShapeAcceptorEdgeSide,
75026
+ EShapeAcceptorEdgeType: EShapeAcceptorEdgeType,
74999
75027
  EShapeAcceptorImpl: EShapeAcceptorImpl,
75000
75028
  EShapeAcceptorType: EShapeAcceptorType,
75001
75029
  EShapeAcceptors: EShapeAcceptors,