@wcardinal/wcardinal-ui 0.467.0 → 0.467.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.
Files changed (31) hide show
  1. package/dist/types/wcardinal/ui/shape/variant/hit-test-fill.d.ts +2 -0
  2. package/dist/types/wcardinal/ui/shape/variant/hit-test-rectangle-rounded.d.ts +1 -0
  3. package/dist/wcardinal/ui/shape/variant/e-shape-rectangle-rounded-legacy.js +2 -2
  4. package/dist/wcardinal/ui/shape/variant/e-shape-rectangle-rounded-legacy.js.map +1 -1
  5. package/dist/wcardinal/ui/shape/variant/hit-test-circle.js +3 -29
  6. package/dist/wcardinal/ui/shape/variant/hit-test-circle.js.map +1 -1
  7. package/dist/wcardinal/ui/shape/variant/hit-test-fill.js +33 -0
  8. package/dist/wcardinal/ui/shape/variant/hit-test-fill.js.map +1 -0
  9. package/dist/wcardinal/ui/shape/variant/hit-test-rectangle-rounded.js +120 -97
  10. package/dist/wcardinal/ui/shape/variant/hit-test-rectangle-rounded.js.map +1 -1
  11. package/dist/wcardinal/ui/shape/variant/hit-test-rectangle.js +3 -29
  12. package/dist/wcardinal/ui/shape/variant/hit-test-rectangle.js.map +1 -1
  13. package/dist/wcardinal/ui/shape/variant/hit-test-triangle.js +3 -29
  14. package/dist/wcardinal/ui/shape/variant/hit-test-triangle.js.map +1 -1
  15. package/dist/wcardinal-ui-theme-dark-en-us.js +1 -1
  16. package/dist/wcardinal-ui-theme-dark-en-us.min.js +1 -1
  17. package/dist/wcardinal-ui-theme-dark-ja-jp.js +1 -1
  18. package/dist/wcardinal-ui-theme-dark-ja-jp.min.js +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-en-us.js +1 -1
  22. package/dist/wcardinal-ui-theme-white-en-us.min.js +1 -1
  23. package/dist/wcardinal-ui-theme-white-ja-jp.js +1 -1
  24. package/dist/wcardinal-ui-theme-white-ja-jp.min.js +1 -1
  25. package/dist/wcardinal-ui-theme-white.js +1 -1
  26. package/dist/wcardinal-ui-theme-white.min.js +1 -1
  27. package/dist/wcardinal-ui.cjs.js +160 -183
  28. package/dist/wcardinal-ui.js +160 -183
  29. package/dist/wcardinal-ui.min.js +2 -2
  30. package/dist/wcardinal-ui.min.js.map +1 -1
  31. package/package.json +1 -1
@@ -1,5 +1,5 @@
1
1
  /*!
2
- Winter Cardinal UI v0.467.0
2
+ Winter Cardinal UI v0.467.1
3
3
  Copyright (C) 2019-2026 Toshiba Corporation
4
4
  SPDX-License-Identifier: Apache-2.0
5
5
 
@@ -1,5 +1,5 @@
1
1
  /*!
2
- Winter Cardinal UI v0.467.0
2
+ Winter Cardinal UI v0.467.1
3
3
  Copyright (C) 2019-2026 Toshiba Corporation
4
4
  SPDX-License-Identifier: Apache-2.0
5
5
 
@@ -1,5 +1,5 @@
1
1
  /*!
2
- Winter Cardinal UI v0.467.0
2
+ Winter Cardinal UI v0.467.1
3
3
  Copyright (C) 2019-2026 Toshiba Corporation
4
4
  SPDX-License-Identifier: Apache-2.0
5
5
 
@@ -1,5 +1,5 @@
1
1
  /*!
2
- Winter Cardinal UI v0.467.0
2
+ Winter Cardinal UI v0.467.1
3
3
  Copyright (C) 2019-2026 Toshiba Corporation
4
4
  SPDX-License-Identifier: Apache-2.0
5
5
 
@@ -1,5 +1,5 @@
1
1
  /*!
2
- Winter Cardinal UI v0.467.0
2
+ Winter Cardinal UI v0.467.1
3
3
  Copyright (C) 2019-2026 Toshiba Corporation
4
4
  SPDX-License-Identifier: Apache-2.0
5
5
 
@@ -1,5 +1,5 @@
1
1
  /*!
2
- Winter Cardinal UI v0.467.0
2
+ Winter Cardinal UI v0.467.1
3
3
  Copyright (C) 2019-2026 Toshiba Corporation
4
4
  SPDX-License-Identifier: Apache-2.0
5
5
 
@@ -1,5 +1,5 @@
1
1
  /*!
2
- Winter Cardinal UI v0.467.0
2
+ Winter Cardinal UI v0.467.1
3
3
  Copyright (C) 2019-2026 Toshiba Corporation
4
4
  SPDX-License-Identifier: Apache-2.0
5
5
 
@@ -1,5 +1,5 @@
1
1
  /*!
2
- Winter Cardinal UI v0.467.0
2
+ Winter Cardinal UI v0.467.1
3
3
  Copyright (C) 2019-2026 Toshiba Corporation
4
4
  SPDX-License-Identifier: Apache-2.0
5
5
 
@@ -1,5 +1,5 @@
1
1
  /*!
2
- Winter Cardinal UI v0.467.0
2
+ Winter Cardinal UI v0.467.1
3
3
  Copyright (C) 2019-2026 Toshiba Corporation
4
4
  SPDX-License-Identifier: Apache-2.0
5
5
 
@@ -8473,6 +8473,38 @@ var EShapePrimitive = /** @class */ (function (_super) {
8473
8473
  return EShapePrimitive;
8474
8474
  }(EShapeBase));
8475
8475
 
8476
+ var hitTestFill = function (x, y, ax, ay, fill) {
8477
+ if (fill.enable) {
8478
+ var percent = Math.max(0, Math.min(1, fill.percent));
8479
+ if (1 <= percent) {
8480
+ return true;
8481
+ }
8482
+ switch (fill.direction) {
8483
+ case EShapeFillDirection.TOP:
8484
+ if (y + ay <= percent * (2 * ay)) {
8485
+ return true;
8486
+ }
8487
+ break;
8488
+ case EShapeFillDirection.RIGHT:
8489
+ if ((1 - percent) * (2 * ax) <= x + ax) {
8490
+ return true;
8491
+ }
8492
+ break;
8493
+ case EShapeFillDirection.BOTTOM:
8494
+ if ((1 - percent) * (2 * ay) <= y + ay) {
8495
+ return true;
8496
+ }
8497
+ break;
8498
+ case EShapeFillDirection.LEFT:
8499
+ if (x + ax <= percent * (2 * ax)) {
8500
+ return true;
8501
+ }
8502
+ break;
8503
+ }
8504
+ }
8505
+ return false;
8506
+ };
8507
+
8476
8508
  /*
8477
8509
  * Copyright (C) 2019 Toshiba Corporation
8478
8510
  * SPDX-License-Identifier: Apache-2.0
@@ -8510,34 +8542,8 @@ var hitTestCircle = function (shape, x, y, ax, ay, sw, ss) {
8510
8542
  if (!hitTestCircleFilled(x, y, ax, ay)) {
8511
8543
  return false;
8512
8544
  }
8513
- var fill = shape.fill;
8514
- if (fill.enable) {
8515
- var percent = Math.max(0, Math.min(1, fill.percent));
8516
- if (1 <= percent) {
8517
- return true;
8518
- }
8519
- switch (fill.direction) {
8520
- case EShapeFillDirection.TOP:
8521
- if (y + ay <= percent * (2 * ay)) {
8522
- return true;
8523
- }
8524
- break;
8525
- case EShapeFillDirection.RIGHT:
8526
- if ((1 - percent) * (2 * ax) <= x + ax) {
8527
- return true;
8528
- }
8529
- break;
8530
- case EShapeFillDirection.BOTTOM:
8531
- if ((1 - percent) * (2 * ay) <= y + ay) {
8532
- return true;
8533
- }
8534
- break;
8535
- case EShapeFillDirection.LEFT:
8536
- if (x + ax <= percent * (2 * ax)) {
8537
- return true;
8538
- }
8539
- break;
8540
- }
8545
+ if (hitTestFill(x, y, ax, ay, shape.fill)) {
8546
+ return true;
8541
8547
  }
8542
8548
  return hitTestCircleStroke(x, y, ax, ay, sw, ss);
8543
8549
  };
@@ -8611,34 +8617,8 @@ var hitTestRectangle = function (shape, x, y, ax, ay, sw, ss) {
8611
8617
  if (!hitTestBBox(x, y, ax, ay)) {
8612
8618
  return false;
8613
8619
  }
8614
- var fill = shape.fill;
8615
- if (fill.enable) {
8616
- var percent = Math.max(0, Math.min(1, fill.percent));
8617
- if (1 <= percent) {
8618
- return true;
8619
- }
8620
- switch (fill.direction) {
8621
- case EShapeFillDirection.TOP:
8622
- if (y + ay <= percent * (2 * ay)) {
8623
- return true;
8624
- }
8625
- break;
8626
- case EShapeFillDirection.RIGHT:
8627
- if ((1 - percent) * (2 * ax) <= x + ax) {
8628
- return true;
8629
- }
8630
- break;
8631
- case EShapeFillDirection.BOTTOM:
8632
- if ((1 - percent) * (2 * ay) <= y + ay) {
8633
- return true;
8634
- }
8635
- break;
8636
- case EShapeFillDirection.LEFT:
8637
- if (x + ax <= percent * (2 * ax)) {
8638
- return true;
8639
- }
8640
- break;
8641
- }
8620
+ if (hitTestFill(x, y, ax, ay, shape.fill)) {
8621
+ return true;
8642
8622
  }
8643
8623
  return hitTestRectangleStroke(shape, x, y, ax, ay, sw, ss);
8644
8624
  };
@@ -8688,34 +8668,8 @@ var hitTestTriangle = function (shape, x, y, ax, ay, sw, ss) {
8688
8668
  if (!hitTestTriangleFilled(x, y, a, -ay, +ay)) {
8689
8669
  return false;
8690
8670
  }
8691
- var fill = shape.fill;
8692
- if (fill.enable) {
8693
- var percent = Math.max(0, Math.min(1, fill.percent));
8694
- if (1 <= percent) {
8695
- return true;
8696
- }
8697
- switch (fill.direction) {
8698
- case EShapeFillDirection.TOP:
8699
- if (y + ay <= percent * (2 * ay)) {
8700
- return true;
8701
- }
8702
- break;
8703
- case EShapeFillDirection.RIGHT:
8704
- if ((1 - percent) * (2 * ax) <= x + ax) {
8705
- return true;
8706
- }
8707
- break;
8708
- case EShapeFillDirection.BOTTOM:
8709
- if ((1 - percent) * (2 * ay) <= y + ay) {
8710
- return true;
8711
- }
8712
- break;
8713
- case EShapeFillDirection.LEFT:
8714
- if (x + ax <= percent * (2 * ax)) {
8715
- return true;
8716
- }
8717
- break;
8718
- }
8671
+ if (hitTestFill(x, y, ax, ay, shape.fill)) {
8672
+ return true;
8719
8673
  }
8720
8674
  return hitTestTriangleStroke(x, y, a, ax, ay, sw, ss);
8721
8675
  };
@@ -65903,7 +65857,7 @@ var EShapeRectangleRoundedTriangulatedImpl = /** @class */ (function () {
65903
65857
  * Copyright (C) 2019 Toshiba Corporation
65904
65858
  * SPDX-License-Identifier: Apache-2.0
65905
65859
  */
65906
- var hitTestRectangleRounded_ = function (x, y, ax, ay, r, corner) {
65860
+ var hitTestRectangleRoundedFilled = function (x, y, ax, ay, r, corner) {
65907
65861
  var bx0 = -ax + r;
65908
65862
  if (x <= bx0) {
65909
65863
  var by0 = -ay + r;
@@ -65956,116 +65910,138 @@ var hitTestRectangleRounded_ = function (x, y, ax, ay, r, corner) {
65956
65910
  }
65957
65911
  }
65958
65912
  };
65959
- var hitTestRectangleRounded = function (shape, x, y, ax, ay, sw, ss) {
65913
+ var hitTestRectangleRoundedStroke = function (shape, x, y, ax, ay, sw, ss, r, corner) {
65914
+ var s = sw * ss;
65915
+ var wx = Math.max(0.0, ax - s);
65916
+ var wy = Math.max(0.0, ay - s);
65917
+ var wr = Math.max(0.0, r - s);
65918
+ if (!hitTestRectangleRoundedFilled(x, y, wx, wy, wr, corner)) {
65919
+ var strokeSide = shape.stroke.side;
65920
+ if (strokeSide === EShapeStrokeSide.ALL) {
65921
+ return true;
65922
+ }
65923
+ else {
65924
+ if (x <= -wx + wr) {
65925
+ var hasLeftSide = !!(strokeSide & EShapeStrokeSide.LEFT);
65926
+ if (y <= -wy + wr) {
65927
+ var hasTopSide = !!(strokeSide & EShapeStrokeSide.TOP);
65928
+ if (hasTopSide && hasLeftSide) {
65929
+ return true;
65930
+ }
65931
+ else if (hasTopSide) {
65932
+ return -wx <= y;
65933
+ }
65934
+ else if (hasLeftSide) {
65935
+ return x <= -wx;
65936
+ }
65937
+ else {
65938
+ return false;
65939
+ }
65940
+ }
65941
+ else if (+wy - wr <= y) {
65942
+ var hasBottomSide = !!(strokeSide & EShapeStrokeSide.BOTTOM);
65943
+ if (hasBottomSide && hasLeftSide) {
65944
+ return true;
65945
+ }
65946
+ else if (hasBottomSide) {
65947
+ return +wx <= y;
65948
+ }
65949
+ else if (hasLeftSide) {
65950
+ return x <= -wx;
65951
+ }
65952
+ else {
65953
+ return false;
65954
+ }
65955
+ }
65956
+ else {
65957
+ return hasLeftSide;
65958
+ }
65959
+ }
65960
+ else if (+wx - wr <= x) {
65961
+ var hasRightSide = !!(strokeSide & EShapeStrokeSide.RIGHT);
65962
+ if (y <= -wy + wr) {
65963
+ var hasTopSide = !!(strokeSide & EShapeStrokeSide.TOP);
65964
+ if (hasTopSide && hasRightSide) {
65965
+ return true;
65966
+ }
65967
+ else if (hasTopSide) {
65968
+ return -wx <= y;
65969
+ }
65970
+ else if (hasRightSide) {
65971
+ return +wx <= x;
65972
+ }
65973
+ else {
65974
+ return false;
65975
+ }
65976
+ }
65977
+ else if (+wy - wr <= y) {
65978
+ var hasBottomSide = !!(strokeSide & EShapeStrokeSide.BOTTOM);
65979
+ if (hasBottomSide && hasRightSide) {
65980
+ return true;
65981
+ }
65982
+ else if (hasBottomSide) {
65983
+ return +wx <= y;
65984
+ }
65985
+ else if (hasRightSide) {
65986
+ return +wx <= x;
65987
+ }
65988
+ else {
65989
+ return false;
65990
+ }
65991
+ }
65992
+ else {
65993
+ return hasRightSide;
65994
+ }
65995
+ }
65996
+ else {
65997
+ if (y <= -wy + wr) {
65998
+ return !!(strokeSide & EShapeStrokeSide.TOP);
65999
+ }
66000
+ else if (+wy - wr <= y) {
66001
+ return !!(strokeSide & EShapeStrokeSide.BOTTOM);
66002
+ }
66003
+ else {
66004
+ return false;
66005
+ }
66006
+ }
66007
+ }
66008
+ }
66009
+ return false;
66010
+ };
66011
+ var hitTestRectangleRoundedLegacy = function (shape, x, y, ax, ay, sw, ss) {
65960
66012
  var fill = shape.fill;
65961
66013
  if (fill.enable || 0 < sw) {
65962
66014
  var r = shape.radius * Math.min(ax, ay);
65963
66015
  var corner = shape.corner;
65964
- if (hitTestRectangleRounded_(x, y, ax, ay, r, corner)) {
66016
+ if (hitTestRectangleRoundedFilled(x, y, ax, ay, r, corner)) {
65965
66017
  if (fill.enable) {
65966
66018
  return true;
65967
66019
  }
65968
66020
  else {
65969
- var s = sw * ss;
65970
- var wx = Math.max(0.0, ax - s);
65971
- var wy = Math.max(0.0, ay - s);
65972
- var wr = Math.max(0.0, r - s);
65973
- if (!hitTestRectangleRounded_(x, y, wx, wy, wr, corner)) {
65974
- var strokeSide = shape.stroke.side;
65975
- if (strokeSide === EShapeStrokeSide.ALL) {
65976
- return true;
65977
- }
65978
- else {
65979
- if (x <= -wx + wr) {
65980
- var hasLeftSide = !!(strokeSide & EShapeStrokeSide.LEFT);
65981
- if (y <= -wy + wr) {
65982
- var hasTopSide = !!(strokeSide & EShapeStrokeSide.TOP);
65983
- if (hasTopSide && hasLeftSide) {
65984
- return true;
65985
- }
65986
- else if (hasTopSide) {
65987
- return -wx <= y;
65988
- }
65989
- else if (hasLeftSide) {
65990
- return x <= -wx;
65991
- }
65992
- else {
65993
- return false;
65994
- }
65995
- }
65996
- else if (+wy - wr <= y) {
65997
- var hasBottomSide = !!(strokeSide & EShapeStrokeSide.BOTTOM);
65998
- if (hasBottomSide && hasLeftSide) {
65999
- return true;
66000
- }
66001
- else if (hasBottomSide) {
66002
- return +wx <= y;
66003
- }
66004
- else if (hasLeftSide) {
66005
- return x <= -wx;
66006
- }
66007
- else {
66008
- return false;
66009
- }
66010
- }
66011
- else {
66012
- return hasLeftSide;
66013
- }
66014
- }
66015
- else if (+wx - wr <= x) {
66016
- var hasRightSide = !!(strokeSide & EShapeStrokeSide.RIGHT);
66017
- if (y <= -wy + wr) {
66018
- var hasTopSide = !!(strokeSide & EShapeStrokeSide.TOP);
66019
- if (hasTopSide && hasRightSide) {
66020
- return true;
66021
- }
66022
- else if (hasTopSide) {
66023
- return -wx <= y;
66024
- }
66025
- else if (hasRightSide) {
66026
- return +wx <= x;
66027
- }
66028
- else {
66029
- return false;
66030
- }
66031
- }
66032
- else if (+wy - wr <= y) {
66033
- var hasBottomSide = !!(strokeSide & EShapeStrokeSide.BOTTOM);
66034
- if (hasBottomSide && hasRightSide) {
66035
- return true;
66036
- }
66037
- else if (hasBottomSide) {
66038
- return +wx <= y;
66039
- }
66040
- else if (hasRightSide) {
66041
- return +wx <= x;
66042
- }
66043
- else {
66044
- return false;
66045
- }
66046
- }
66047
- else {
66048
- return hasRightSide;
66049
- }
66050
- }
66051
- else {
66052
- if (y <= -wy + wr) {
66053
- return !!(strokeSide & EShapeStrokeSide.TOP);
66054
- }
66055
- else if (+wy - wr <= y) {
66056
- return !!(strokeSide & EShapeStrokeSide.BOTTOM);
66057
- }
66058
- else {
66059
- return false;
66060
- }
66061
- }
66062
- }
66021
+ if (hitTestRectangleRoundedStroke(shape, x, y, ax, ay, sw, ss, r, corner)) {
66022
+ return true;
66063
66023
  }
66064
66024
  }
66065
66025
  }
66066
66026
  }
66067
66027
  return false;
66068
66028
  };
66029
+ var hitTestRectangleRounded = function (shape, x, y, ax, ay, sw, ss) {
66030
+ var fill = shape.fill;
66031
+ if (fill.enable || 0 < sw) {
66032
+ var r = shape.radius * Math.min(ax, ay);
66033
+ var corner = shape.corner;
66034
+ if (hitTestRectangleRoundedFilled(x, y, ax, ay, r, corner)) {
66035
+ if (hitTestFill(x, y, ax, ay, fill)) {
66036
+ return true;
66037
+ }
66038
+ if (hitTestRectangleRoundedStroke(shape, x, y, ax, ay, sw, ss, r, corner)) {
66039
+ return true;
66040
+ }
66041
+ }
66042
+ }
66043
+ return false;
66044
+ };
66069
66045
 
66070
66046
  /*
66071
66047
  * Copyright (C) 2019 Toshiba Corporation
@@ -73976,7 +73952,7 @@ var EShapeRectangleRoundedLegacy = /** @class */ (function (_super) {
73976
73952
  };
73977
73953
  EShapeRectangleRoundedLegacy.prototype.containsAbs = function (x, y, ax, ay, sw, ss, sa) {
73978
73954
  if (_super.prototype.containsAbsBBox.call(this, x, y, ax, ay)) {
73979
- return hitTestRectangleRounded(this, x, y, ax, ay, sw, ss);
73955
+ return hitTestRectangleRoundedLegacy(this, x, y, ax, ay, sw, ss);
73980
73956
  }
73981
73957
  return false;
73982
73958
  };
@@ -111239,6 +111215,7 @@ exports.hitTestCircleLegacy = hitTestCircleLegacy;
111239
111215
  exports.hitTestRectangle = hitTestRectangle;
111240
111216
  exports.hitTestRectangleLegacy = hitTestRectangleLegacy;
111241
111217
  exports.hitTestRectangleRounded = hitTestRectangleRounded;
111218
+ exports.hitTestRectangleRoundedLegacy = hitTestRectangleRoundedLegacy;
111242
111219
  exports.hitTestSemicircle = hitTestSemicircle;
111243
111220
  exports.hitTestTriangle = hitTestTriangle;
111244
111221
  exports.hitTestTriangleFilled = hitTestTriangleFilled;