@visactor/react-vtable 1.13.1-alpha.7 → 1.13.1-alpha.8
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 +1 -1
- package/cjs/index.js +1 -1
- package/cjs/index.js.map +1 -1
- package/dist/react-vtable.js +18 -13
- package/dist/react-vtable.min.js +2 -2
- package/es/index.d.ts +1 -1
- package/es/index.js +1 -1
- package/es/index.js.map +1 -1
- package/package.json +4 -4
package/cjs/index.d.ts
CHANGED
package/cjs/index.js
CHANGED
|
@@ -18,5 +18,5 @@ var __createBinding = this && this.__createBinding || (Object.create ? function(
|
|
|
18
18
|
Object.defineProperty(exports, "__esModule", {
|
|
19
19
|
value: !0
|
|
20
20
|
}), exports.version = void 0, __exportStar(require("./tables"), exports), __exportStar(require("./table-components"), exports),
|
|
21
|
-
__exportStar(require("./components"), exports), exports.version = "1.13.1-alpha.
|
|
21
|
+
__exportStar(require("./components"), exports), exports.version = "1.13.1-alpha.8";
|
|
22
22
|
//# sourceMappingURL=index.js.map
|
package/cjs/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,2CAAyB;AACzB,qDAAmC;AACnC,+CAA6B;AAEhB,QAAA,OAAO,GAAG,gBAAgB,CAAC","file":"index.js","sourcesContent":["export * from './tables';\nexport * from './table-components';\nexport * from './components';\n\nexport const version = \"1.13.1-alpha.
|
|
1
|
+
{"version":3,"sources":["index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,2CAAyB;AACzB,qDAAmC;AACnC,+CAA6B;AAEhB,QAAA,OAAO,GAAG,gBAAgB,CAAC","file":"index.js","sourcesContent":["export * from './tables';\nexport * from './table-components';\nexport * from './components';\n\nexport const version = \"1.13.1-alpha.8\";\n"]}
|
package/dist/react-vtable.js
CHANGED
|
@@ -1732,19 +1732,10 @@
|
|
|
1732
1732
|
}
|
|
1733
1733
|
function isRotateAABBIntersect(box1, box2) {
|
|
1734
1734
|
let isDeg = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : !1;
|
|
1735
|
-
let ctx = arguments.length > 3 ? arguments[3] : undefined;
|
|
1736
1735
|
const rect1 = toRect(box1, isDeg),
|
|
1737
1736
|
rect2 = toRect(box2, isDeg),
|
|
1738
|
-
vector = (start, end) => [end.x - start.x, end.y - start.y]
|
|
1739
|
-
|
|
1740
|
-
0 === index ? ctx.moveTo(item.x, item.y) : ctx.lineTo(item.x, item.y);
|
|
1741
|
-
}), ctx.fill(), ctx.restore(), ctx.save(), ctx.fillStyle = "green", ctx.globalAlpha = .6, rect2.forEach((item, index) => {
|
|
1742
|
-
0 === index ? ctx.moveTo(item.x, item.y) : ctx.lineTo(item.x, item.y);
|
|
1743
|
-
}), ctx.fill(), ctx.restore());
|
|
1744
|
-
const p1 = getCenterPoint(box1),
|
|
1745
|
-
p2 = getCenterPoint(box2);
|
|
1746
|
-
ctx && ctx.fillRect(p1.x, p1.y, 2, 2), ctx && ctx.fillRect(p2.x, p2.y, 2, 2);
|
|
1747
|
-
const vp1p2 = vector(p1, p2),
|
|
1737
|
+
vector = (start, end) => [end.x - start.x, end.y - start.y],
|
|
1738
|
+
vp1p2 = vector(getCenterPoint(box1), getCenterPoint(box2)),
|
|
1748
1739
|
AB = vector(rect1[0], rect1[1]),
|
|
1749
1740
|
BC = vector(rect1[1], rect1[2]),
|
|
1750
1741
|
A1B1 = vector(rect2[0], rect2[1]),
|
|
@@ -1964,7 +1955,8 @@
|
|
|
1964
1955
|
class OBBBounds extends Bounds {
|
|
1965
1956
|
constructor(bounds) {
|
|
1966
1957
|
let angle = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
|
|
1967
|
-
|
|
1958
|
+
var _a;
|
|
1959
|
+
super(bounds), bounds && (this.angle = null !== (_a = bounds.angle) && void 0 !== _a ? _a : angle);
|
|
1968
1960
|
}
|
|
1969
1961
|
intersects(b) {
|
|
1970
1962
|
return isRotateAABBIntersect(this, b);
|
|
@@ -1977,6 +1969,9 @@
|
|
|
1977
1969
|
let angle = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 0;
|
|
1978
1970
|
return super.setValue(x1, y1, x2, y2), this.angle = angle, this;
|
|
1979
1971
|
}
|
|
1972
|
+
clone() {
|
|
1973
|
+
return new OBBBounds(this);
|
|
1974
|
+
}
|
|
1980
1975
|
}
|
|
1981
1976
|
|
|
1982
1977
|
class Matrix {
|
|
@@ -2379,6 +2374,8 @@
|
|
|
2379
2374
|
return color.getLuminance2();
|
|
2380
2375
|
case "lum3":
|
|
2381
2376
|
return color.getLuminance3();
|
|
2377
|
+
case "wcag":
|
|
2378
|
+
return color.getLuminanceWCAG();
|
|
2382
2379
|
}
|
|
2383
2380
|
}
|
|
2384
2381
|
static parseColorString(value) {
|
|
@@ -2480,6 +2477,14 @@
|
|
|
2480
2477
|
getLuminance3() {
|
|
2481
2478
|
return (.299 * this.color.r + .587 * this.color.g + .114 * this.color.b) / 255;
|
|
2482
2479
|
}
|
|
2480
|
+
getLuminanceWCAG() {
|
|
2481
|
+
const RsRGB = this.color.r / 255,
|
|
2482
|
+
GsRGB = this.color.g / 255,
|
|
2483
|
+
BsRGB = this.color.b / 255;
|
|
2484
|
+
let R, G, B;
|
|
2485
|
+
R = RsRGB <= .03928 ? RsRGB / 12.92 : Math.pow((RsRGB + .055) / 1.055, 2.4), G = GsRGB <= .03928 ? GsRGB / 12.92 : Math.pow((GsRGB + .055) / 1.055, 2.4), B = BsRGB <= .03928 ? BsRGB / 12.92 : Math.pow((BsRGB + .055) / 1.055, 2.4);
|
|
2486
|
+
return .2126 * R + .7152 * G + .0722 * B;
|
|
2487
|
+
}
|
|
2483
2488
|
clone() {
|
|
2484
2489
|
return new Color(this.color.toString());
|
|
2485
2490
|
}
|
|
@@ -19578,7 +19583,7 @@
|
|
|
19578
19583
|
const Checkbox = React.forwardRef(CheckboxComponent);
|
|
19579
19584
|
Checkbox.displayName = 'Checkbox';
|
|
19580
19585
|
|
|
19581
|
-
const version = "1.13.1-alpha.
|
|
19586
|
+
const version = "1.13.1-alpha.8";
|
|
19582
19587
|
|
|
19583
19588
|
Object.defineProperty(exports, 'register', {
|
|
19584
19589
|
enumerable: true,
|