@croct/plug-react 0.12.0 → 0.13.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.
- package/README.md +2 -1
- package/package.json +7 -7
- package/ssr-polyfills.cjs +3 -3
- package/ssr-polyfills.js +3 -3
package/README.md
CHANGED
|
@@ -18,7 +18,8 @@
|
|
|
18
18
|
<br/>
|
|
19
19
|
<p align="center">
|
|
20
20
|
<a href="https://www.npmjs.com/package/@croct/plug-react"><img alt="Version" src="https://img.shields.io/npm/v/@croct/plug-react"/></a>
|
|
21
|
-
<a href="https://
|
|
21
|
+
<a href="https://qlty.sh/gh/croct-tech/projects/plug-react"><img src="https://qlty.sh/badges/bc10f271-37b3-45e8-9e10-e7148e83cea7/coverage.svg" alt="Code Coverage" /></a>
|
|
22
|
+
<a href="https://qlty.sh/gh/croct-tech/projects/plug-react"><img src="https://qlty.sh/badges/bc10f271-37b3-45e8-9e10-e7148e83cea7/maintainability.svg" alt="Maintainability" /></a>
|
|
22
23
|
</p>
|
|
23
24
|
|
|
24
25
|
## Introduction
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@croct/plug-react",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.13.0",
|
|
4
4
|
"description": "React components and hooks to plug your React applications into Croct.",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Croct",
|
|
@@ -62,8 +62,8 @@
|
|
|
62
62
|
"react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0"
|
|
63
63
|
},
|
|
64
64
|
"dependencies": {
|
|
65
|
-
"@croct/plug": "^0.
|
|
66
|
-
"@croct/sdk": "^0.18.
|
|
65
|
+
"@croct/plug": "^0.19.0",
|
|
66
|
+
"@croct/sdk": "^0.18.2"
|
|
67
67
|
},
|
|
68
68
|
"devDependencies": {
|
|
69
69
|
"@babel/core": "^7.25.2",
|
|
@@ -72,7 +72,7 @@
|
|
|
72
72
|
"@croct/eslint-plugin": "^0.7.1",
|
|
73
73
|
"@testing-library/jest-dom": "^6.6.3",
|
|
74
74
|
"@testing-library/react": "^16.1.0",
|
|
75
|
-
"@types/jest": "^
|
|
75
|
+
"@types/jest": "^30.0.0",
|
|
76
76
|
"@types/node": "^22.5.4",
|
|
77
77
|
"@types/react": "^19.0.0",
|
|
78
78
|
"@types/react-dom": "^19.0.0",
|
|
@@ -80,9 +80,9 @@
|
|
|
80
80
|
"@typescript-eslint/parser": "^6.21.0",
|
|
81
81
|
"esbuild-fix-imports-plugin": "^1.0.19",
|
|
82
82
|
"eslint": "^8.57.0",
|
|
83
|
-
"jest": "^
|
|
84
|
-
"jest-environment-jsdom": "^
|
|
85
|
-
"jest-environment-node": "^
|
|
83
|
+
"jest": "^30.0.0",
|
|
84
|
+
"jest-environment-jsdom": "^30.0.0",
|
|
85
|
+
"jest-environment-node": "^30.0.0",
|
|
86
86
|
"react": "^19.0.0",
|
|
87
87
|
"react-dom": "^19.0.0",
|
|
88
88
|
"ts-jest": "^29.0.3",
|
package/ssr-polyfills.cjs
CHANGED
|
@@ -22,7 +22,7 @@ __export(ssr_polyfills_exports, {
|
|
|
22
22
|
isSsr: () => isSsr
|
|
23
23
|
});
|
|
24
24
|
module.exports = __toCommonJS(ssr_polyfills_exports);
|
|
25
|
-
var import_plug = require("@croct/plug");
|
|
25
|
+
var import_plug = require("@croct/plug/plug");
|
|
26
26
|
function isSsr() {
|
|
27
27
|
return globalThis.window?.document?.createElement === void 0;
|
|
28
28
|
}
|
|
@@ -30,7 +30,7 @@ const croct = !isSsr() ? function factory() {
|
|
|
30
30
|
let timeoutId = null;
|
|
31
31
|
let resolveCallback;
|
|
32
32
|
let rejectCallback;
|
|
33
|
-
return new Proxy(import_plug.
|
|
33
|
+
return new Proxy(import_plug.GlobalPlug.GLOBAL, {
|
|
34
34
|
get: function getProperty2(target, property) {
|
|
35
35
|
switch (property) {
|
|
36
36
|
case "plug":
|
|
@@ -52,7 +52,7 @@ const croct = !isSsr() ? function factory() {
|
|
|
52
52
|
return target[property];
|
|
53
53
|
}
|
|
54
54
|
});
|
|
55
|
-
}() : new Proxy(import_plug.
|
|
55
|
+
}() : new Proxy(import_plug.GlobalPlug.GLOBAL, {
|
|
56
56
|
get: function getProperty(_, property) {
|
|
57
57
|
switch (property) {
|
|
58
58
|
case "initialized":
|
package/ssr-polyfills.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { GlobalPlug } from "@croct/plug/plug";
|
|
2
2
|
function isSsr() {
|
|
3
3
|
return globalThis.window?.document?.createElement === void 0;
|
|
4
4
|
}
|
|
@@ -6,7 +6,7 @@ const croct = !isSsr() ? function factory() {
|
|
|
6
6
|
let timeoutId = null;
|
|
7
7
|
let resolveCallback;
|
|
8
8
|
let rejectCallback;
|
|
9
|
-
return new Proxy(
|
|
9
|
+
return new Proxy(GlobalPlug.GLOBAL, {
|
|
10
10
|
get: function getProperty2(target, property) {
|
|
11
11
|
switch (property) {
|
|
12
12
|
case "plug":
|
|
@@ -28,7 +28,7 @@ const croct = !isSsr() ? function factory() {
|
|
|
28
28
|
return target[property];
|
|
29
29
|
}
|
|
30
30
|
});
|
|
31
|
-
}() : new Proxy(
|
|
31
|
+
}() : new Proxy(GlobalPlug.GLOBAL, {
|
|
32
32
|
get: function getProperty(_, property) {
|
|
33
33
|
switch (property) {
|
|
34
34
|
case "initialized":
|