@sigmacomputing/plugin 1.0.3 → 1.0.5
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/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -0
- package/dist/utils/polyfillRequestAnimationFrame.d.ts +8 -0
- package/dist/utils/polyfillRequestAnimationFrame.d.ts.map +1 -0
- package/dist/utils/polyfillRequestAnimationFrame.js +16 -0
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AAEzB,OAAO,EAAC,6BAA6B,EAAC,MAAM,uCAAuC,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -14,6 +14,9 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
exports.polyfillRequestAnimationFrame = void 0;
|
|
17
18
|
__exportStar(require("./types"), exports);
|
|
18
19
|
__exportStar(require("./react"), exports);
|
|
19
20
|
__exportStar(require("./client"), exports);
|
|
21
|
+
var polyfillRequestAnimationFrame_1 = require("./utils/polyfillRequestAnimationFrame");
|
|
22
|
+
Object.defineProperty(exports, "polyfillRequestAnimationFrame", { enumerable: true, get: function () { return polyfillRequestAnimationFrame_1.polyfillRequestAnimationFrame; } });
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* requestAnimationFrame() calls are paused in most browsers when running in background tabs or hidden <iframe>s in order to improve performance and battery life
|
|
3
|
+
*
|
|
4
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/window/requestAnimationFrame
|
|
5
|
+
* @param w Window Object
|
|
6
|
+
*/
|
|
7
|
+
export declare function polyfillRequestAnimationFrame(w: Window): void;
|
|
8
|
+
//# sourceMappingURL=polyfillRequestAnimationFrame.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"polyfillRequestAnimationFrame.d.ts","sourceRoot":"","sources":["../../src/utils/polyfillRequestAnimationFrame.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,wBAAgB,6BAA6B,CAAC,CAAC,EAAE,MAAM,QAKtD"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.polyfillRequestAnimationFrame = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* requestAnimationFrame() calls are paused in most browsers when running in background tabs or hidden <iframe>s in order to improve performance and battery life
|
|
6
|
+
*
|
|
7
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/window/requestAnimationFrame
|
|
8
|
+
* @param w Window Object
|
|
9
|
+
*/
|
|
10
|
+
function polyfillRequestAnimationFrame(w) {
|
|
11
|
+
if ('requestAnimationFrame' in w) {
|
|
12
|
+
w.requestAnimationFrame = cb => w.setTimeout(cb, 1000 / 60);
|
|
13
|
+
w.cancelAnimationFrame = id => w.clearTimeout(id);
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
exports.polyfillRequestAnimationFrame = polyfillRequestAnimationFrame;
|