@gamepark/react-game 7.6.3 → 7.6.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.
Files changed (38) hide show
  1. package/dist/components/GameProvider/GameErrorBoundary.js +108 -108
  2. package/dist/components/JournalTabs/History/SetupLogItem.js +19 -19
  3. package/dist/components/material/GameTable/DevToolsHub.d.ts +21 -4
  4. package/dist/components/material/GameTable/DevToolsHub.js +830 -24
  5. package/dist/components/material/GameTable/DevToolsHub.js.map +1 -1
  6. package/dist/components/material/Wheel/WheelContent.d.ts +13 -0
  7. package/dist/components/material/Wheel/WheelContent.js +37 -0
  8. package/dist/components/material/Wheel/WheelContent.js.map +1 -0
  9. package/dist/components/menus/BugReport/BugReportDialog.js +38 -38
  10. package/dist/components/menus/Menu/Menu.js +1 -1
  11. package/dist/components/menus/Menu/Menu.js.map +1 -1
  12. package/dist/css/backgroundCss.js +3 -3
  13. package/dist/css/cursorCss.js +6 -6
  14. package/dist/css/fadeIn.js +6 -6
  15. package/dist/css/shineEffect.js +28 -28
  16. package/dist/css/transformCss.js +4 -4
  17. package/dist/hooks/useFailures.d.ts +1 -0
  18. package/dist/hooks/useFailures.js +11 -0
  19. package/dist/hooks/useFailures.js.map +1 -0
  20. package/dist/hooks/useWebP.d.ts +1 -0
  21. package/dist/hooks/useWebP.js +13 -0
  22. package/dist/hooks/useWebP.js.map +1 -0
  23. package/package.json +3 -3
  24. package/dist/components/material/Dices/OctahedralDiceDescription.d.ts +0 -48
  25. package/dist/components/material/Dices/OctahedralDiceDescription.js +0 -142
  26. package/dist/components/material/Dices/OctahedralDiceDescription.js.map +0 -1
  27. package/dist/components/material/GameTable/DevToolEntry.d.ts +0 -17
  28. package/dist/components/material/GameTable/DevToolEntry.js +0 -13
  29. package/dist/components/material/GameTable/DevToolEntry.js.map +0 -1
  30. package/dist/components/material/GameTable/DevTools/DevToolsStyles.d.ts +0 -58
  31. package/dist/components/material/GameTable/DevTools/DevToolsStyles.js +0 -706
  32. package/dist/components/material/GameTable/DevTools/DevToolsStyles.js.map +0 -1
  33. package/dist/components/material/GameTable/DevToolsStyles.d.ts +0 -67
  34. package/dist/components/material/GameTable/DevToolsStyles.js +0 -752
  35. package/dist/components/material/GameTable/DevToolsStyles.js.map +0 -1
  36. package/dist/components/material/GameTable/JsonHighlighter.d.ts +0 -3
  37. package/dist/components/material/GameTable/JsonHighlighter.js +0 -37
  38. package/dist/components/material/GameTable/JsonHighlighter.js.map +0 -1
@@ -20,124 +20,124 @@ export class GameErrorBoundary extends Component {
20
20
  return (_jsx("div", { css: containerCss, children: _jsxs("div", { css: cardCss, children: [_jsx("div", { css: iconContainerCss, children: _jsx(FontAwesomeIcon, { icon: faTriangleExclamation, css: iconCss }) }), _jsx("p", { css: messageCss, children: _jsx(Trans, { defaults: "A technical error has occurred. The error has been sent to the Game Park team.", i18nKey: "error.crash", ns: "common" }) }), _jsx("p", { css: hintCss, children: _jsx(Trans, { defaults: "You can refresh the page to continue your game.", i18nKey: "error.refresh.hint", ns: "common" }) }), _jsx("button", { css: buttonCss, onClick: () => window.location.reload(), children: _jsx(Trans, { defaults: "Refresh the page", i18nKey: "error.refresh.button", ns: "common" }) }), _jsx("div", { css: dividerCss }), _jsx("p", { css: secondaryMessageCss, children: _jsx(Trans, { defaults: "If the problem persists despite refreshing and the game is corrupted, please let us know on Discord.", i18nKey: "error.discord.hint", ns: "common" }) }), _jsxs("a", { css: discordLinkCss, href: "https://discord.gg/ZMCX5reQm8", target: "_blank", rel: "noopener noreferrer", children: [_jsx("svg", { css: discordIconCss, viewBox: "0 0 127.14 96.36", fill: "currentColor", children: _jsx("path", { d: "M107.7 8.07A105.15 105.15 0 0 0 81.47 0a72.06 72.06 0 0 0-3.36 6.83 97.68 97.68 0 0 0-29.11 0A72.37 72.37 0 0 0 45.64 0a105.89 105.89 0 0 0-26.25 8.09C2.79 32.65-1.71 56.6.54 80.21a105.73 105.73 0 0 0 32.17 16.15 77.7 77.7 0 0 0 6.89-11.11 68.42 68.42 0 0 1-10.85-5.18c.91-.66 1.8-1.34 2.66-2.04a75.57 75.57 0 0 0 64.32 0c.87.71 1.76 1.39 2.66 2.04a68.68 68.68 0 0 1-10.87 5.19 77.28 77.28 0 0 0 6.89 11.1 105.45 105.45 0 0 0 32.19-16.14c2.64-27.38-4.51-51.11-18.9-72.15ZM42.45 65.69C36.18 65.69 31 60 31 53.05c0-6.94 5.04-12.67 11.45-12.67S53.99 46.1 53.9 53.05c0 6.94-5.08 12.64-11.45 12.64Zm42.24 0C78.41 65.69 73.25 60 73.25 53.05c0-6.94 5.04-12.67 11.44-12.67s11.51 5.73 11.44 12.67c0 6.94-5.04 12.64-11.44 12.64Z" }) }), _jsx(Trans, { defaults: "Join the Game Park Discord", i18nKey: "error.discord.button", ns: "common" })] })] }) }));
21
21
  }
22
22
  }
23
- const fadeIn = keyframes `
24
- from {
25
- opacity: 0;
26
- transform: translateY(16px);
27
- }
28
- to {
29
- opacity: 1;
30
- transform: translateY(0);
31
- }
23
+ const fadeIn = keyframes `
24
+ from {
25
+ opacity: 0;
26
+ transform: translateY(16px);
27
+ }
28
+ to {
29
+ opacity: 1;
30
+ transform: translateY(0);
31
+ }
32
32
  `;
33
- const containerCss = css `
34
- display: flex;
35
- align-items: center;
36
- justify-content: center;
37
- height: 100%;
38
- width: 100%;
39
- padding: 2em;
40
- box-sizing: border-box;
41
- font-family: "Mulish", sans-serif;
33
+ const containerCss = css `
34
+ display: flex;
35
+ align-items: center;
36
+ justify-content: center;
37
+ height: 100%;
38
+ width: 100%;
39
+ padding: 2em;
40
+ box-sizing: border-box;
41
+ font-family: "Mulish", sans-serif;
42
42
  `;
43
- const cardCss = css `
44
- display: flex;
45
- flex-direction: column;
46
- align-items: center;
47
- max-width: 460px;
48
- padding: 2.5em 2.5em 2em;
49
- border-radius: 1.2em;
50
- background: #002448;
51
- color: #eee;
52
- text-align: center;
53
- box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
54
- animation: ${fadeIn} 0.4s ease-out;
43
+ const cardCss = css `
44
+ display: flex;
45
+ flex-direction: column;
46
+ align-items: center;
47
+ max-width: 460px;
48
+ padding: 2.5em 2.5em 2em;
49
+ border-radius: 1.2em;
50
+ background: #002448;
51
+ color: #eee;
52
+ text-align: center;
53
+ box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
54
+ animation: ${fadeIn} 0.4s ease-out;
55
55
  `;
56
- const iconContainerCss = css `
57
- display: flex;
58
- align-items: center;
59
- justify-content: center;
60
- width: 64px;
61
- height: 64px;
62
- border-radius: 50%;
63
- background: rgba(40, 184, 206, 0.15);
64
- margin-bottom: 1.2em;
56
+ const iconContainerCss = css `
57
+ display: flex;
58
+ align-items: center;
59
+ justify-content: center;
60
+ width: 64px;
61
+ height: 64px;
62
+ border-radius: 50%;
63
+ background: rgba(40, 184, 206, 0.15);
64
+ margin-bottom: 1.2em;
65
65
  `;
66
- const iconCss = css `
67
- font-size: 32px;
68
- color: #28B8CE;
66
+ const iconCss = css `
67
+ font-size: 32px;
68
+ color: #28B8CE;
69
69
  `;
70
- const messageCss = css `
71
- font-size: 1.05em;
72
- font-weight: 600;
73
- line-height: 1.5;
74
- margin: 0 0 0.3em;
70
+ const messageCss = css `
71
+ font-size: 1.05em;
72
+ font-weight: 600;
73
+ line-height: 1.5;
74
+ margin: 0 0 0.3em;
75
75
  `;
76
- const hintCss = css `
77
- font-size: 0.95em;
78
- line-height: 1.5;
79
- margin: 0;
80
- opacity: 0.8;
76
+ const hintCss = css `
77
+ font-size: 0.95em;
78
+ line-height: 1.5;
79
+ margin: 0;
80
+ opacity: 0.8;
81
81
  `;
82
- const buttonCss = css `
83
- margin-top: 1.5em;
84
- padding: 0.65em 2.2em;
85
- font-size: 1em;
86
- font-family: inherit;
87
- font-weight: 700;
88
- border: none;
89
- border-radius: 0.6em;
90
- background: #28B8CE;
91
- color: white;
92
- cursor: pointer;
93
- transition: background 0.2s, transform 0.1s;
94
- letter-spacing: 0.02em;
95
-
96
- &:hover {
97
- background: #24a5b9;
98
- }
99
-
100
- &:active {
101
- background: #2092a3;
102
- transform: scale(0.97);
103
- }
82
+ const buttonCss = css `
83
+ margin-top: 1.5em;
84
+ padding: 0.65em 2.2em;
85
+ font-size: 1em;
86
+ font-family: inherit;
87
+ font-weight: 700;
88
+ border: none;
89
+ border-radius: 0.6em;
90
+ background: #28B8CE;
91
+ color: white;
92
+ cursor: pointer;
93
+ transition: background 0.2s, transform 0.1s;
94
+ letter-spacing: 0.02em;
95
+
96
+ &:hover {
97
+ background: #24a5b9;
98
+ }
99
+
100
+ &:active {
101
+ background: #2092a3;
102
+ transform: scale(0.97);
103
+ }
104
104
  `;
105
- const dividerCss = css `
106
- width: 60%;
107
- height: 1px;
108
- background: rgba(255, 255, 255, 0.12);
109
- margin: 1.8em 0 1.2em;
105
+ const dividerCss = css `
106
+ width: 60%;
107
+ height: 1px;
108
+ background: rgba(255, 255, 255, 0.12);
109
+ margin: 1.8em 0 1.2em;
110
110
  `;
111
- const secondaryMessageCss = css `
112
- font-size: 0.85em;
113
- line-height: 1.6;
114
- margin: 0 0 1em;
115
- opacity: 0.65;
111
+ const secondaryMessageCss = css `
112
+ font-size: 0.85em;
113
+ line-height: 1.6;
114
+ margin: 0 0 1em;
115
+ opacity: 0.65;
116
116
  `;
117
- const discordLinkCss = css `
118
- display: inline-flex;
119
- align-items: center;
120
- gap: 0.5em;
121
- padding: 0.5em 1.4em;
122
- font-size: 0.9em;
123
- font-family: inherit;
124
- font-weight: 600;
125
- color: white;
126
- background: #5865F2;
127
- border-radius: 0.5em;
128
- text-decoration: none;
129
- transition: background 0.2s, transform 0.1s;
130
-
131
- &:hover {
132
- background: #4752C4;
133
- }
134
-
135
- &:active {
136
- transform: scale(0.97);
137
- }
117
+ const discordLinkCss = css `
118
+ display: inline-flex;
119
+ align-items: center;
120
+ gap: 0.5em;
121
+ padding: 0.5em 1.4em;
122
+ font-size: 0.9em;
123
+ font-family: inherit;
124
+ font-weight: 600;
125
+ color: white;
126
+ background: #5865F2;
127
+ border-radius: 0.5em;
128
+ text-decoration: none;
129
+ transition: background 0.2s, transform 0.1s;
130
+
131
+ &:hover {
132
+ background: #4752C4;
133
+ }
134
+
135
+ &:active {
136
+ transform: scale(0.97);
137
+ }
138
138
  `;
139
- const discordIconCss = css `
140
- width: 20px;
141
- height: 20px;
139
+ const discordIconCss = css `
140
+ width: 20px;
141
+ height: 20px;
142
142
  `;
143
143
  //# sourceMappingURL=GameErrorBoundary.js.map
@@ -3,24 +3,24 @@ import { css } from '@emotion/react';
3
3
  export const SetupLogItem = ({ log, game, index, customEntryCss, ...rest }) => {
4
4
  return (_jsx("div", { ...rest, children: _jsx("div", { css: [entryCss, customEntryCss, log.css], children: _jsx("div", { children: _jsx(log.Component, { game: game, index: index }) }) }) }));
5
5
  };
6
- const entryCss = css `
7
- width: 100%;
8
- background-color: rgba(0, 0, 0, 0.7);
9
- border-radius: 1em;
10
- margin-bottom: 0.5em;
11
- min-height: 1em;
12
- padding-left: 1em;
13
- margin-left: 0.05em;
14
- margin-top: 0.05em;
15
- padding-top: 0.5em;
16
- padding-bottom: 0.5em;
17
- display: flex;
18
- align-items: center;
19
- font-size: 2em;
20
- white-space: pre-wrap;
21
-
22
- img, picture {
23
- vertical-align: middle;
24
- }
6
+ const entryCss = css `
7
+ width: 100%;
8
+ background-color: rgba(0, 0, 0, 0.7);
9
+ border-radius: 1em;
10
+ margin-bottom: 0.5em;
11
+ min-height: 1em;
12
+ padding-left: 1em;
13
+ margin-left: 0.05em;
14
+ margin-top: 0.05em;
15
+ padding-top: 0.5em;
16
+ padding-bottom: 0.5em;
17
+ display: flex;
18
+ align-items: center;
19
+ font-size: 2em;
20
+ white-space: pre-wrap;
21
+
22
+ img, picture {
23
+ vertical-align: middle;
24
+ }
25
25
  `;
26
26
  //# sourceMappingURL=SetupLogItem.js.map
@@ -1,14 +1,31 @@
1
- /** @jsxImportSource @emotion/react */
2
- import { FC, PropsWithChildren } from 'react';
3
- export { DevToolEntry } from './DevToolEntry';
4
- export { devToolBtnCss, devToolIconCss, devToolLabelCss, devToolDescCss } from './DevToolsStyles';
1
+ import { FC, PropsWithChildren, ReactNode } from 'react';
5
2
  export type GameOption = {
6
3
  key: string;
7
4
  label: string;
8
5
  type: 'boolean';
9
6
  };
7
+ /**
8
+ * A single entry in the DevToolsHub panel.
9
+ * Use this instead of raw `<button>` when adding custom tools via `children`.
10
+ *
11
+ * @example
12
+ * <DevToolsHub>
13
+ * <DevToolEntry icon="✦" label="Card Viewer" desc="Browse agents" onClick={() => setShowCards(true)} />
14
+ * </DevToolsHub>
15
+ */
16
+ export declare const DevToolEntry: FC<{
17
+ icon: ReactNode;
18
+ label: string;
19
+ desc?: string;
20
+ onClick?: () => void;
21
+ }>;
10
22
  type DevToolsHubProps = PropsWithChildren<{
11
23
  fabBottom?: string;
12
24
  gameOptions?: GameOption[];
13
25
  }>;
14
26
  export declare const DevToolsHub: FC<DevToolsHubProps>;
27
+ export declare const devToolBtnCss: import("@emotion/utils").SerializedStyles;
28
+ export declare const devToolIconCss: import("@emotion/utils").SerializedStyles;
29
+ export declare const devToolLabelCss: import("@emotion/utils").SerializedStyles;
30
+ export declare const devToolDescCss: import("@emotion/utils").SerializedStyles;
31
+ export {};