@croct/plug-react 0.15.0 → 0.16.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/CroctProvider.d.cts +2 -2
- package/CroctProvider.d.ts +2 -2
- package/CroctProvider.js +1 -7
- package/hooks/useLoader.cjs +1 -1
- package/hooks/useLoader.js +1 -1
- package/package.json +7 -7
package/CroctProvider.d.cts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import { FunctionComponent, PropsWithChildren } from 'react';
|
|
3
|
+
import { Plug, Configuration } from '@croct/plug';
|
|
4
4
|
|
|
5
5
|
type CroctProviderProps = PropsWithChildren<Configuration & Required<Pick<Configuration, 'appId'>>>;
|
|
6
6
|
declare const CroctContext: react.Context<{
|
package/CroctProvider.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import { FunctionComponent, PropsWithChildren } from 'react';
|
|
3
|
+
import { Plug, Configuration } from '@croct/plug';
|
|
4
4
|
|
|
5
5
|
type CroctProviderProps = PropsWithChildren<Configuration & Required<Pick<Configuration, 'appId'>>>;
|
|
6
6
|
declare const CroctContext: react.Context<{
|
package/CroctProvider.js
CHANGED
|
@@ -1,12 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx } from "react/jsx-runtime";
|
|
3
|
-
import {
|
|
4
|
-
createContext,
|
|
5
|
-
useContext,
|
|
6
|
-
useEffect,
|
|
7
|
-
useMemo,
|
|
8
|
-
useRef
|
|
9
|
-
} from "react";
|
|
3
|
+
import { createContext, useContext, useEffect, useMemo, useRef } from "react";
|
|
10
4
|
import { croct } from "./ssr-polyfills.js";
|
|
11
5
|
const CroctContext = createContext(null);
|
|
12
6
|
CroctContext.displayName = "CroctContext";
|
package/hooks/useLoader.cjs
CHANGED
|
@@ -34,7 +34,7 @@ function useLoader({ initial, ...currentOptions }) {
|
|
|
34
34
|
setValue(cache.load(options));
|
|
35
35
|
} catch (result) {
|
|
36
36
|
if (result instanceof Promise) {
|
|
37
|
-
result.then((resolvedValue) => {
|
|
37
|
+
void result.then((resolvedValue) => {
|
|
38
38
|
if (mountedRef.current) {
|
|
39
39
|
setValue(resolvedValue);
|
|
40
40
|
}
|
package/hooks/useLoader.js
CHANGED
|
@@ -11,7 +11,7 @@ function useLoader({ initial, ...currentOptions }) {
|
|
|
11
11
|
setValue(cache.load(options));
|
|
12
12
|
} catch (result) {
|
|
13
13
|
if (result instanceof Promise) {
|
|
14
|
-
result.then((resolvedValue) => {
|
|
14
|
+
void result.then((resolvedValue) => {
|
|
15
15
|
if (mountedRef.current) {
|
|
16
16
|
setValue(resolvedValue);
|
|
17
17
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@croct/plug-react",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.16.0",
|
|
4
4
|
"description": "React components and hooks to plug your React applications into Croct.",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Croct",
|
|
@@ -62,24 +62,24 @@
|
|
|
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.
|
|
65
|
+
"@croct/plug": "^0.22.0",
|
|
66
|
+
"@croct/sdk": "^0.21.0"
|
|
67
67
|
},
|
|
68
68
|
"devDependencies": {
|
|
69
69
|
"@babel/core": "^7.25.2",
|
|
70
70
|
"@babel/preset-react": "^7.24.7",
|
|
71
71
|
"@babel/preset-typescript": "^7.24.7",
|
|
72
|
-
"@croct/eslint-plugin": "^0.
|
|
72
|
+
"@croct/eslint-plugin": "^0.8.3",
|
|
73
73
|
"@testing-library/jest-dom": "^6.6.3",
|
|
74
74
|
"@testing-library/react": "^16.1.0",
|
|
75
75
|
"@types/jest": "^30.0.0",
|
|
76
76
|
"@types/node": "^24.0.0",
|
|
77
77
|
"@types/react": "^19.0.0",
|
|
78
78
|
"@types/react-dom": "^19.0.0",
|
|
79
|
-
"@typescript-eslint/eslint-plugin": "^
|
|
80
|
-
"@typescript-eslint/parser": "^
|
|
79
|
+
"@typescript-eslint/eslint-plugin": "^8.54.0",
|
|
80
|
+
"@typescript-eslint/parser": "^8.54.0",
|
|
81
81
|
"esbuild-fix-imports-plugin": "^1.0.19",
|
|
82
|
-
"eslint": "^
|
|
82
|
+
"eslint": "^9.39.2",
|
|
83
83
|
"jest": "^30.0.0",
|
|
84
84
|
"jest-environment-jsdom": "^30.0.0",
|
|
85
85
|
"jest-environment-node": "^30.0.0",
|