@gamepark/react-game 7.7.4 → 7.7.6
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/components/GameProvider/GameErrorBoundary.js +108 -108
- package/dist/components/GameProvider/GameInternalProviders.d.ts +6 -0
- package/dist/components/GameProvider/GameInternalProviders.js +10 -0
- package/dist/components/GameProvider/GameInternalProviders.js.map +1 -0
- package/dist/components/GameProvider/LogHistoryBridge.d.ts +7 -0
- package/dist/components/GameProvider/LogHistoryBridge.js +23 -0
- package/dist/components/GameProvider/LogHistoryBridge.js.map +1 -0
- package/dist/components/JournalTabs/History/History.js +52 -13
- package/dist/components/JournalTabs/History/History.js.map +1 -1
- package/dist/components/JournalTabs/History/LazyLogItem.d.ts +10 -0
- package/dist/components/JournalTabs/History/LazyLogItem.js +35 -0
- package/dist/components/JournalTabs/History/LazyLogItem.js.map +1 -0
- package/dist/components/JournalTabs/History/SetupLogItem.js +19 -19
- package/dist/components/JournalTabs/History/SharedIntersectionContext.d.ts +9 -0
- package/dist/components/JournalTabs/History/SharedIntersectionContext.js +36 -0
- package/dist/components/JournalTabs/History/SharedIntersectionContext.js.map +1 -0
- package/dist/components/JournalTabs/History/VirtualizedLogItem.d.ts +12 -0
- package/dist/components/JournalTabs/History/VirtualizedLogItem.js +6 -0
- package/dist/components/JournalTabs/History/VirtualizedLogItem.js.map +1 -0
- package/dist/components/Log/LogHistoryProvider.d.ts +7 -0
- package/dist/components/Log/LogHistoryProvider.js +22 -0
- package/dist/components/Log/LogHistoryProvider.js.map +1 -0
- package/dist/components/material/Dices/OctahedralDiceDescription.d.ts +48 -0
- package/dist/components/material/Dices/OctahedralDiceDescription.js +142 -0
- package/dist/components/material/Dices/OctahedralDiceDescription.js.map +1 -0
- package/dist/components/material/GameTable/DevToolEntry.d.ts +17 -0
- package/dist/components/material/GameTable/DevToolEntry.js +13 -0
- package/dist/components/material/GameTable/DevToolEntry.js.map +1 -0
- package/dist/components/material/GameTable/DevTools/BotTool.d.ts +8 -0
- package/dist/components/material/GameTable/DevTools/BotTool.js +13 -0
- package/dist/components/material/GameTable/DevTools/BotTool.js.map +1 -0
- package/dist/components/material/GameTable/DevTools/DevToolsStyles.d.ts +58 -0
- package/dist/components/material/GameTable/DevTools/DevToolsStyles.js +706 -0
- package/dist/components/material/GameTable/DevTools/DevToolsStyles.js.map +1 -0
- package/dist/components/material/GameTable/DevTools/GamePanel.d.ts +1 -0
- package/dist/components/material/GameTable/DevTools/GamePanel.js +7 -179
- package/dist/components/material/GameTable/DevTools/GamePanel.js.map +1 -1
- package/dist/components/material/GameTable/DevTools/NewGameTool.d.ts +9 -0
- package/dist/components/material/GameTable/DevTools/NewGameTool.js +64 -0
- package/dist/components/material/GameTable/DevTools/NewGameTool.js.map +1 -0
- package/dist/components/material/GameTable/DevTools/SwitchPlayerTool.d.ts +8 -0
- package/dist/components/material/GameTable/DevTools/SwitchPlayerTool.js +9 -0
- package/dist/components/material/GameTable/DevTools/SwitchPlayerTool.js.map +1 -0
- package/dist/components/material/GameTable/DevTools/TutorialTool.d.ts +8 -0
- package/dist/components/material/GameTable/DevTools/TutorialTool.js +4 -0
- package/dist/components/material/GameTable/DevTools/TutorialTool.js.map +1 -0
- package/dist/components/material/GameTable/DevTools/UndoTool.d.ts +8 -0
- package/dist/components/material/GameTable/DevTools/UndoTool.js +9 -0
- package/dist/components/material/GameTable/DevTools/UndoTool.js.map +1 -0
- package/dist/components/material/GameTable/DevTools/devtools.css.d.ts +24 -0
- package/dist/components/material/GameTable/DevTools/devtools.css.js +183 -0
- package/dist/components/material/GameTable/DevTools/devtools.css.js.map +1 -0
- package/dist/components/material/GameTable/DevToolsHub.d.ts +4 -21
- package/dist/components/material/GameTable/DevToolsHub.js +24 -830
- package/dist/components/material/GameTable/DevToolsHub.js.map +1 -1
- package/dist/components/material/GameTable/DevToolsStyles.d.ts +67 -0
- package/dist/components/material/GameTable/DevToolsStyles.js +752 -0
- package/dist/components/material/GameTable/DevToolsStyles.js.map +1 -0
- package/dist/components/material/GameTable/JsonHighlighter.d.ts +3 -0
- package/dist/components/material/GameTable/JsonHighlighter.js +37 -0
- package/dist/components/material/GameTable/JsonHighlighter.js.map +1 -0
- package/dist/components/material/sound/bellSound.d.ts +1 -0
- package/dist/components/material/sound/bellSound.js +2 -0
- package/dist/components/material/sound/bellSound.js.map +1 -0
- package/dist/components/material/sound/useYourTurnSound.d.ts +4 -0
- package/dist/components/material/sound/useYourTurnSound.js +34 -0
- package/dist/components/material/sound/useYourTurnSound.js.map +1 -0
- package/dist/css/backgroundCss.js +3 -3
- package/dist/css/cursorCss.js +6 -6
- package/dist/css/fadeIn.js +6 -6
- package/dist/css/shineEffect.js +28 -28
- package/dist/css/transformCss.js +4 -4
- package/dist/hooks/LogHistoryContext.d.ts +6 -0
- package/dist/hooks/LogHistoryContext.js +4 -0
- package/dist/hooks/LogHistoryContext.js.map +1 -0
- package/dist/hooks/flatHistoryEngine.d.ts +37 -0
- package/dist/hooks/flatHistoryEngine.js +101 -0
- package/dist/hooks/flatHistoryEngine.js.map +1 -0
- package/dist/hooks/useBackgroundTabHandler.d.ts +1 -0
- package/dist/hooks/useBackgroundTabHandler.js +38 -0
- package/dist/hooks/useBackgroundTabHandler.js.map +1 -0
- package/dist/hooks/useFastAnimationsOnReturn.d.ts +1 -0
- package/dist/hooks/useFastAnimationsOnReturn.js +38 -0
- package/dist/hooks/useFastAnimationsOnReturn.js.map +1 -0
- package/dist/hooks/useFlatHistory.js +120 -44
- package/dist/hooks/useFlatHistory.js.map +1 -1
- package/dist/locators/PileLocator.d.ts +5 -0
- package/dist/locators/PileLocator.js +9 -1
- package/dist/locators/PileLocator.js.map +1 -1
- package/package.json +80 -79
- package/dist/components/material/Wheel/WheelContent.d.ts +0 -13
- package/dist/components/material/Wheel/WheelContent.js +0 -37
- package/dist/components/material/Wheel/WheelContent.js.map +0 -1
- package/dist/hooks/useFailures.d.ts +0 -1
- package/dist/hooks/useFailures.js +0 -11
- package/dist/hooks/useFailures.js.map +0 -1
- package/dist/hooks/useWebP.d.ts +0 -1
- package/dist/hooks/useWebP.js +0 -13
- package/dist/hooks/useWebP.js.map +0 -1
package/package.json
CHANGED
|
@@ -1,79 +1,80 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@gamepark/react-game",
|
|
3
|
-
"version": "7.7.
|
|
4
|
-
"type": "module",
|
|
5
|
-
"description": "React components & tools to create a Board Game user interface for Game Park",
|
|
6
|
-
"author": "Romain Fromi <romain@game-park.com> (https://game-park.com/)",
|
|
7
|
-
"license": "ISC",
|
|
8
|
-
"main": "dist/index.js",
|
|
9
|
-
"types": "dist/index.d.ts",
|
|
10
|
-
"files": [
|
|
11
|
-
"dist"
|
|
12
|
-
],
|
|
13
|
-
"publishConfig": {
|
|
14
|
-
"access": "public"
|
|
15
|
-
},
|
|
16
|
-
"scripts": {
|
|
17
|
-
"build": "tsc",
|
|
18
|
-
"prepack": "yarn build",
|
|
19
|
-
"linkgp": "yarn link ../rules-api ../react-client -r && git update-index --skip-worktree package.json yarn.lock",
|
|
20
|
-
"unlinkgp": "git update-index --no-skip-worktree package.json yarn.lock && yarn unlink ../react-client ../rules-api",
|
|
21
|
-
"publish": "npm version ${0:-patch} && yarn npm publish && git push && git push --tags"
|
|
22
|
-
},
|
|
23
|
-
"dependencies": {
|
|
24
|
-
"@datadog/browser-logs": "^6.28.1",
|
|
25
|
-
"@dnd-kit/modifiers": "^9.0.0",
|
|
26
|
-
"@gamepark/api-types": "^1.0.1",
|
|
27
|
-
"@gamepark/avataaars": "^3.0.0",
|
|
28
|
-
"@gamepark/react-client": "^7.6.4",
|
|
29
|
-
"dayjs": "^1.11.19",
|
|
30
|
-
"fscreen": "^1.2.0",
|
|
31
|
-
"i18next-http-backend": "^3.0.2",
|
|
32
|
-
"i18next-icu": "^2.4.3",
|
|
33
|
-
"immer": "^11.1.4",
|
|
34
|
-
"intl-messageformat": "^11.1.2",
|
|
35
|
-
"nosleep.js": "^0.12.0",
|
|
36
|
-
"o9n": "^2.1.1",
|
|
37
|
-
"react-infinite-scroll-component": "^6.1.1",
|
|
38
|
-
"react-merge-refs": "^3.0.2",
|
|
39
|
-
"react-zoom-pan-pinch": "^3.7.0",
|
|
40
|
-
"rxjs": "^7.8.2",
|
|
41
|
-
"use-long-press": "^3.3.0"
|
|
42
|
-
},
|
|
43
|
-
"devDependencies": {
|
|
44
|
-
"@dnd-kit/core": "^6.3.1",
|
|
45
|
-
"@emotion/react": "^11.14.0",
|
|
46
|
-
"@fortawesome/fontawesome-svg-core": "^7.2.0",
|
|
47
|
-
"@fortawesome/free-regular-svg-icons": "^7.2.0",
|
|
48
|
-
"@fortawesome/free-solid-svg-icons": "^7.2.0",
|
|
49
|
-
"@fortawesome/react-fontawesome": "^3.2.0",
|
|
50
|
-
"@gamepark/rules-api": "^7.6.1",
|
|
51
|
-
"@types/fscreen": "^1.0.4",
|
|
52
|
-
"@types/node": "^25.3.1",
|
|
53
|
-
"@types/react": "^19.2.14",
|
|
54
|
-
"@types/react-dom": "^19.2.3",
|
|
55
|
-
"es-toolkit": "^1.44.0",
|
|
56
|
-
"i18next": "^25.10.9",
|
|
57
|
-
"react": "^19.2.4",
|
|
58
|
-
"react-dom": "^19.2.4",
|
|
59
|
-
"react-i18next": "^16.5.4",
|
|
60
|
-
"react-redux": "^9.2.0",
|
|
61
|
-
"typescript": "^5.9.3"
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
"@
|
|
66
|
-
"@
|
|
67
|
-
"@fortawesome/
|
|
68
|
-
"@fortawesome/free-
|
|
69
|
-
"@fortawesome/
|
|
70
|
-
"@
|
|
71
|
-
"
|
|
72
|
-
"
|
|
73
|
-
"
|
|
74
|
-
"react
|
|
75
|
-
"react-
|
|
76
|
-
"react-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
1
|
+
{
|
|
2
|
+
"name": "@gamepark/react-game",
|
|
3
|
+
"version": "7.7.6",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"description": "React components & tools to create a Board Game user interface for Game Park",
|
|
6
|
+
"author": "Romain Fromi <romain@game-park.com> (https://game-park.com/)",
|
|
7
|
+
"license": "ISC",
|
|
8
|
+
"main": "dist/index.js",
|
|
9
|
+
"types": "dist/index.d.ts",
|
|
10
|
+
"files": [
|
|
11
|
+
"dist"
|
|
12
|
+
],
|
|
13
|
+
"publishConfig": {
|
|
14
|
+
"access": "public"
|
|
15
|
+
},
|
|
16
|
+
"scripts": {
|
|
17
|
+
"build": "tsc",
|
|
18
|
+
"prepack": "yarn build",
|
|
19
|
+
"linkgp": "yarn link ../rules-api ../react-client -r && git update-index --skip-worktree package.json yarn.lock",
|
|
20
|
+
"unlinkgp": "git update-index --no-skip-worktree package.json yarn.lock && yarn unlink ../react-client ../rules-api",
|
|
21
|
+
"publish": "npm version ${0:-patch} && yarn npm publish && git push && git push --tags"
|
|
22
|
+
},
|
|
23
|
+
"dependencies": {
|
|
24
|
+
"@datadog/browser-logs": "^6.28.1",
|
|
25
|
+
"@dnd-kit/modifiers": "^9.0.0",
|
|
26
|
+
"@gamepark/api-types": "^1.0.1",
|
|
27
|
+
"@gamepark/avataaars": "^3.0.0",
|
|
28
|
+
"@gamepark/react-client": "^7.6.4",
|
|
29
|
+
"dayjs": "^1.11.19",
|
|
30
|
+
"fscreen": "^1.2.0",
|
|
31
|
+
"i18next-http-backend": "^3.0.2",
|
|
32
|
+
"i18next-icu": "^2.4.3",
|
|
33
|
+
"immer": "^11.1.4",
|
|
34
|
+
"intl-messageformat": "^11.1.2",
|
|
35
|
+
"nosleep.js": "^0.12.0",
|
|
36
|
+
"o9n": "^2.1.1",
|
|
37
|
+
"react-infinite-scroll-component": "^6.1.1",
|
|
38
|
+
"react-merge-refs": "^3.0.2",
|
|
39
|
+
"react-zoom-pan-pinch": "^3.7.0",
|
|
40
|
+
"rxjs": "^7.8.2",
|
|
41
|
+
"use-long-press": "^3.3.0"
|
|
42
|
+
},
|
|
43
|
+
"devDependencies": {
|
|
44
|
+
"@dnd-kit/core": "^6.3.1",
|
|
45
|
+
"@emotion/react": "^11.14.0",
|
|
46
|
+
"@fortawesome/fontawesome-svg-core": "^7.2.0",
|
|
47
|
+
"@fortawesome/free-regular-svg-icons": "^7.2.0",
|
|
48
|
+
"@fortawesome/free-solid-svg-icons": "^7.2.0",
|
|
49
|
+
"@fortawesome/react-fontawesome": "^3.2.0",
|
|
50
|
+
"@gamepark/rules-api": "^7.6.1",
|
|
51
|
+
"@types/fscreen": "^1.0.4",
|
|
52
|
+
"@types/node": "^25.3.1",
|
|
53
|
+
"@types/react": "^19.2.14",
|
|
54
|
+
"@types/react-dom": "^19.2.3",
|
|
55
|
+
"es-toolkit": "^1.44.0",
|
|
56
|
+
"i18next": "^25.10.9",
|
|
57
|
+
"react": "^19.2.4",
|
|
58
|
+
"react-dom": "^19.2.4",
|
|
59
|
+
"react-i18next": "^16.5.4",
|
|
60
|
+
"react-redux": "^9.2.0",
|
|
61
|
+
"typescript": "^5.9.3",
|
|
62
|
+
"vitest": "^4.1.2"
|
|
63
|
+
},
|
|
64
|
+
"peerDependencies": {
|
|
65
|
+
"@dnd-kit/core": "6.x",
|
|
66
|
+
"@emotion/react": "11.x",
|
|
67
|
+
"@fortawesome/fontawesome-svg-core": "7.x",
|
|
68
|
+
"@fortawesome/free-regular-svg-icons": "7.x",
|
|
69
|
+
"@fortawesome/free-solid-svg-icons": "7.x",
|
|
70
|
+
"@fortawesome/react-fontawesome": "3.x",
|
|
71
|
+
"@gamepark/rules-api": "7.x",
|
|
72
|
+
"es-toolkit": "1.x",
|
|
73
|
+
"i18next": "25.x",
|
|
74
|
+
"react": "19.x",
|
|
75
|
+
"react-dom": "19.x",
|
|
76
|
+
"react-i18next": "16.x",
|
|
77
|
+
"react-redux": "9.x"
|
|
78
|
+
},
|
|
79
|
+
"packageManager": "yarn@4.9.4"
|
|
80
|
+
}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { Interpolation, Theme } from '@emotion/react';
|
|
2
|
-
import { FC } from 'react';
|
|
3
|
-
import { MaterialContentProps } from '../MaterialDescription';
|
|
4
|
-
import { ComponentSize } from '../ComponentDescription';
|
|
5
|
-
export type WheelContentProps = {
|
|
6
|
-
size: ComponentSize;
|
|
7
|
-
image?: string;
|
|
8
|
-
wheelImage?: string;
|
|
9
|
-
borderRadius?: number;
|
|
10
|
-
extraCss?: Interpolation<Theme>;
|
|
11
|
-
wheelExtraCss?: Interpolation<Theme>;
|
|
12
|
-
} & MaterialContentProps;
|
|
13
|
-
export declare const WheelContent: FC<WheelContentProps>;
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "@emotion/react/jsx-runtime";
|
|
2
|
-
import { css } from '@emotion/react';
|
|
3
|
-
import { backgroundCss, borderRadiusCss, shadowCss, shadowEffect, shineEffect, sizeCss } from '../../../css';
|
|
4
|
-
export const WheelContent = (props) => {
|
|
5
|
-
const { playDown, highlight, size, image, wheelImage, borderRadius, extraCss, wheelExtraCss, children } = props;
|
|
6
|
-
return _jsxs(_Fragment, { children: [_jsx("div", { css: [
|
|
7
|
-
faceCss,
|
|
8
|
-
extraCss,
|
|
9
|
-
sizeCss(size.width, size.height),
|
|
10
|
-
wheelImage && [backgroundCss(wheelImage), shadowCss(wheelImage)],
|
|
11
|
-
borderRadius && borderRadiusCss(borderRadius),
|
|
12
|
-
highlight ? shineEffect : (playDown && playDownCss(image))
|
|
13
|
-
], children: children }), image && _jsx("div", { css: [
|
|
14
|
-
faceCss,
|
|
15
|
-
wheelExtraCss,
|
|
16
|
-
sizeCss(size.width, size.height),
|
|
17
|
-
backgroundCss(image),
|
|
18
|
-
borderRadius && borderRadiusCss(borderRadius),
|
|
19
|
-
highlight ? shineEffect : (playDown && playDownCss(image))
|
|
20
|
-
] })] });
|
|
21
|
-
};
|
|
22
|
-
const faceCss = css `
|
|
23
|
-
position: absolute;
|
|
24
|
-
transform-style: preserve-3d;
|
|
25
|
-
backface-visibility: hidden;
|
|
26
|
-
`;
|
|
27
|
-
const playDownCss = (image) => {
|
|
28
|
-
if (image?.endsWith('.jpg')) {
|
|
29
|
-
return shadowEffect;
|
|
30
|
-
}
|
|
31
|
-
else {
|
|
32
|
-
return css `
|
|
33
|
-
filter: brightness(0.5);
|
|
34
|
-
`;
|
|
35
|
-
}
|
|
36
|
-
};
|
|
37
|
-
//# sourceMappingURL=WheelContent.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"WheelContent.js","sourceRoot":"","sources":["../../../../src/components/material/Wheel/WheelContent.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAwB,MAAM,gBAAgB,CAAA;AAC1D,OAAO,EAAE,aAAa,EAAE,eAAe,EAAE,SAAS,EAAE,YAAY,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,cAAc,CAAA;AAc5G,MAAM,CAAC,MAAM,YAAY,GAA0B,CAAC,KAAK,EAAE,EAAE;IAC3D,MAAM,EAAE,QAAQ,EAAE,SAAS,EAAE,IAAI,EAAE,KAAK,EAAE,UAAU,EAAE,YAAY,EAAE,QAAQ,EAAE,aAAa,EAAE,QAAQ,EAAE,GAAG,KAAK,CAAA;IAC/G,OAAO,8BACL,cAAK,GAAG,EAAE;oBACR,OAAO;oBACP,QAAQ;oBACR,OAAO,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,MAAM,CAAC;oBAChC,UAAU,IAAI,CAAC,aAAa,CAAC,UAAU,CAAC,EAAE,SAAS,CAAC,UAAU,CAAC,CAAC;oBAChE,YAAY,IAAI,eAAe,CAAC,YAAY,CAAC;oBAC7C,SAAS,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,QAAQ,IAAI,WAAW,CAAC,KAAK,CAAC,CAAC;iBAC3D,YACE,QAAQ,GACL,EACL,KAAK,IAAI,cAAK,GAAG,EAAE;oBAClB,OAAO;oBACP,aAAa;oBACb,OAAO,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,MAAM,CAAC;oBAChC,aAAa,CAAC,KAAK,CAAC;oBACpB,YAAY,IAAI,eAAe,CAAC,YAAY,CAAC;oBAC7C,SAAS,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,QAAQ,IAAI,WAAW,CAAC,KAAK,CAAC,CAAC;iBAC3D,GAAG,IACH,CAAA;AACL,CAAC,CAAA;AAED,MAAM,OAAO,GAAG,GAAG,CAAA;;;;CAIlB,CAAA;AAED,MAAM,WAAW,GAAG,CAAC,KAAc,EAAE,EAAE;IACrC,IAAI,KAAK,EAAE,QAAQ,CAAC,MAAM,CAAC,EAAE,CAAC;QAC5B,OAAO,YAAY,CAAA;IACrB,CAAC;SAAM,CAAC;QACN,OAAO,GAAG,CAAA;;KAET,CAAA;IACH,CAAC;AACH,CAAC,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const useFailures: <Move = any>() => [string[], () => {}];
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.useFailures = void 0;
|
|
4
|
-
var react_client_1 = require("@gamepark/react-client");
|
|
5
|
-
var react_redux_1 = require("react-redux");
|
|
6
|
-
var useFailures = function () {
|
|
7
|
-
var dispatch = (0, react_redux_1.useDispatch)();
|
|
8
|
-
return [(0, react_redux_1.useSelector)(function (state) { return state.failures; }), function () { return dispatch((0, react_client_1.clearFailures)()); }];
|
|
9
|
-
};
|
|
10
|
-
exports.useFailures = useFailures;
|
|
11
|
-
//# sourceMappingURL=useFailures.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useFailures.js","sourceRoot":"","sources":["../../src/hooks/useFailures.ts"],"names":[],"mappings":";;;AAAA,uDAAqE;AACrE,2CAAsD;AAE/C,IAAM,WAAW,GAAG;IACzB,IAAM,QAAQ,GAAG,IAAA,yBAAW,GAAE,CAAA;IAC9B,OAAO,CAAC,IAAA,yBAAW,EAAC,UAAC,KAA+B,IAAK,OAAA,KAAK,CAAC,QAAQ,EAAd,CAAc,CAAC,EAAE,cAAM,OAAA,QAAQ,CAAC,IAAA,4BAAa,GAAE,CAAC,EAAzB,CAAyB,CAAC,CAAA;AAC5G,CAAC,CAAA;AAHY,QAAA,WAAW,eAGvB"}
|
package/dist/hooks/useWebP.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const useWebP: () => boolean | undefined;
|
package/dist/hooks/useWebP.js
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { useEffect, useState } from 'react';
|
|
2
|
-
import webPCheck from 'supports-webp';
|
|
3
|
-
export const useWebP = () => {
|
|
4
|
-
const [webP, setWebP] = useState();
|
|
5
|
-
useEffect(() => {
|
|
6
|
-
(async () => {
|
|
7
|
-
const webP = await webPCheck;
|
|
8
|
-
setWebP(webP);
|
|
9
|
-
})();
|
|
10
|
-
}, [webPCheck, setWebP]);
|
|
11
|
-
return webP;
|
|
12
|
-
};
|
|
13
|
-
//# sourceMappingURL=useWebP.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useWebP.js","sourceRoot":"","sources":["../../src/hooks/useWebP.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AAC3C,OAAO,SAAS,MAAM,eAAe,CAAA;AAErC,MAAM,CAAC,MAAM,OAAO,GAAG,GAAwB,EAAE;IAC/C,MAAM,CAAC,IAAI,EAAE,OAAO,CAAC,GAAG,QAAQ,EAAW,CAAA;IAE3C,SAAS,CAAC,GAAG,EAAE;QACb,CAAC,KAAK,IAAI,EAAE;YACV,MAAM,IAAI,GAAG,MAAM,SAAS,CAAA;YAC5B,OAAO,CAAC,IAAI,CAAC,CAAA;QACf,CAAC,CAAC,EAAE,CAAA;IACN,CAAC,EAAE,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC,CAAA;IAExB,OAAO,IAAI,CAAA;AACb,CAAC,CAAA"}
|