@gamepark/react-game 7.7.26 → 7.7.28
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 +41 -41
- package/dist/components/GameProvider/GameErrorBoundary.js +108 -108
- package/dist/components/GameProvider/GameLoadingErrorScreen.d.ts +1 -0
- package/dist/components/GameProvider/GameLoadingErrorScreen.js +82 -0
- package/dist/components/GameProvider/GameLoadingErrorScreen.js.map +1 -0
- package/dist/components/JournalTabs/History/SetupLogItem.js +19 -19
- package/dist/components/dialogs/FailuresDialog.js +11 -11
- package/dist/components/dialogs/ResultDialog/RematchDisplay.js +0 -1
- package/dist/components/dialogs/ResultDialog/RematchDisplay.js.map +1 -1
- package/dist/components/dialogs/ResultDialog/ResultDialog.js +25 -23
- package/dist/components/dialogs/ResultDialog/ResultDialog.js.map +1 -1
- package/dist/components/material/GameTable/DevToolsHub.d.ts +21 -4
- package/dist/components/material/GameTable/DevToolsHub.js +830 -24
- package/dist/components/material/GameTable/DevToolsHub.js.map +1 -1
- package/dist/components/material/GameTable/ItemDisplay.js +9 -1
- package/dist/components/material/GameTable/ItemDisplay.js.map +1 -1
- package/dist/components/material/Wheel/WheelContent.d.ts +13 -0
- package/dist/components/material/Wheel/WheelContent.js +37 -0
- package/dist/components/material/Wheel/WheelContent.js.map +1 -0
- package/dist/components/material/animations/ItemAnimations.js +75 -17
- package/dist/components/material/animations/ItemAnimations.js.map +1 -1
- package/dist/components/material/animations/Trajectory.d.ts +18 -2
- package/dist/components/material/animations/Trajectory.js +34 -4
- package/dist/components/material/animations/Trajectory.js.map +1 -1
- 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/useFailures.d.ts +1 -0
- package/dist/hooks/useFailures.js +11 -0
- package/dist/hooks/useFailures.js.map +1 -0
- package/dist/hooks/useWebP.d.ts +1 -0
- package/dist/hooks/useWebP.js +13 -0
- package/dist/hooks/useWebP.js.map +1 -0
- package/dist/vite.d.ts +3 -0
- package/dist/vite.js +34 -0
- package/dist/vite.js.map +1 -0
- package/package.json +1 -1
- package/dist/components/GameProvider/GameInternalProviders.d.ts +0 -6
- package/dist/components/GameProvider/GameInternalProviders.js +0 -10
- package/dist/components/GameProvider/GameInternalProviders.js.map +0 -1
- package/dist/components/GameProvider/LogHistoryBridge.d.ts +0 -7
- package/dist/components/GameProvider/LogHistoryBridge.js +0 -23
- package/dist/components/GameProvider/LogHistoryBridge.js.map +0 -1
- package/dist/components/JournalTabs/History/VirtualizedLogItem.d.ts +0 -12
- package/dist/components/JournalTabs/History/VirtualizedLogItem.js +0 -6
- package/dist/components/JournalTabs/History/VirtualizedLogItem.js.map +0 -1
- package/dist/components/Log/LogHistoryProvider.d.ts +0 -7
- package/dist/components/Log/LogHistoryProvider.js +0 -22
- package/dist/components/Log/LogHistoryProvider.js.map +0 -1
- package/dist/components/material/Dices/OctahedralDiceDescription.d.ts +0 -48
- package/dist/components/material/Dices/OctahedralDiceDescription.js +0 -142
- package/dist/components/material/Dices/OctahedralDiceDescription.js.map +0 -1
- package/dist/components/material/GameTable/DevToolEntry.d.ts +0 -17
- package/dist/components/material/GameTable/DevToolEntry.js +0 -13
- package/dist/components/material/GameTable/DevToolEntry.js.map +0 -1
- package/dist/components/material/GameTable/DevTools/DevToolsStyles.d.ts +0 -58
- package/dist/components/material/GameTable/DevTools/DevToolsStyles.js +0 -706
- package/dist/components/material/GameTable/DevTools/DevToolsStyles.js.map +0 -1
- package/dist/components/material/GameTable/DevToolsStyles.d.ts +0 -67
- package/dist/components/material/GameTable/DevToolsStyles.js +0 -752
- package/dist/components/material/GameTable/DevToolsStyles.js.map +0 -1
- package/dist/components/material/GameTable/JsonHighlighter.d.ts +0 -3
- package/dist/components/material/GameTable/JsonHighlighter.js +0 -37
- package/dist/components/material/GameTable/JsonHighlighter.js.map +0 -1
- package/dist/components/material/sound/bellSound.d.ts +0 -1
- package/dist/components/material/sound/bellSound.js +0 -2
- package/dist/components/material/sound/bellSound.js.map +0 -1
- package/dist/hooks/LogHistoryContext.d.ts +0 -6
- package/dist/hooks/LogHistoryContext.js +0 -4
- package/dist/hooks/LogHistoryContext.js.map +0 -1
- package/dist/hooks/useBackgroundTabHandler.d.ts +0 -1
- package/dist/hooks/useBackgroundTabHandler.js +0 -38
- package/dist/hooks/useBackgroundTabHandler.js.map +0 -1
- package/dist/hooks/useFastAnimationsOnReturn.d.ts +0 -1
- package/dist/hooks/useFastAnimationsOnReturn.js +0 -38
- package/dist/hooks/useFastAnimationsOnReturn.js.map +0 -1
package/dist/css/transformCss.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { css } from '@emotion/react';
|
|
2
|
-
export const transformCss = (...transformations) => css `
|
|
3
|
-
transform: ${transformations.filter(t => !!t).join(' ')};
|
|
2
|
+
export const transformCss = (...transformations) => css `
|
|
3
|
+
transform: ${transformations.filter(t => !!t).join(' ')};
|
|
4
4
|
`;
|
|
5
|
-
export const preserve3d = css `
|
|
6
|
-
transform-style: preserve-3d;
|
|
5
|
+
export const preserve3d = css `
|
|
6
|
+
transform-style: preserve-3d;
|
|
7
7
|
`;
|
|
8
8
|
//# sourceMappingURL=transformCss.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const useFailures: <Move = any>() => [string[], () => {}];
|
|
@@ -0,0 +1,11 @@
|
|
|
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
|
|
@@ -0,0 +1 @@
|
|
|
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"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const useWebP: () => boolean | undefined;
|
|
@@ -0,0 +1,13 @@
|
|
|
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
|
|
@@ -0,0 +1 @@
|
|
|
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"}
|
package/dist/vite.d.ts
ADDED
package/dist/vite.js
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import path from 'path';
|
|
2
|
+
export function translationHmrPlugin() {
|
|
3
|
+
return {
|
|
4
|
+
name: 'gamepark-translation-hmr',
|
|
5
|
+
configureServer(server) {
|
|
6
|
+
const translationDir = path.resolve(server.config.root, 'public/translation');
|
|
7
|
+
let timeout;
|
|
8
|
+
server.watcher.on('change', (file) => {
|
|
9
|
+
if (file.startsWith(translationDir) && file.endsWith('.json')) {
|
|
10
|
+
clearTimeout(timeout);
|
|
11
|
+
timeout = setTimeout(() => {
|
|
12
|
+
server.ws.send({ type: 'custom', event: 'translation-update' });
|
|
13
|
+
}, 100);
|
|
14
|
+
}
|
|
15
|
+
});
|
|
16
|
+
}
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
export function localeUrlPlugin() {
|
|
20
|
+
return {
|
|
21
|
+
name: 'gamepark-locale-url',
|
|
22
|
+
configureServer(server) {
|
|
23
|
+
const locale = Intl.DateTimeFormat().resolvedOptions().locale.split('-')[0];
|
|
24
|
+
server.printUrls = () => {
|
|
25
|
+
const address = server.resolvedUrls;
|
|
26
|
+
if (address) {
|
|
27
|
+
const url = address.local[0] ?? `http://localhost:3000/`;
|
|
28
|
+
console.log(` ➜ Game: \x1b[36m${url}?locale=${locale}\x1b[0m`);
|
|
29
|
+
}
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
//# sourceMappingURL=vite.js.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O,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,wBAAwB,CAAA;oBACxD,OAAO,CAAC,GAAG,CAAC,sBAAsB,GAAG,WAAW,MAAM,SAAS,CAAC,CAAA;gBAClE,CAAC;YACH,CAAC,CAAA;QACH,CAAC;KACF,CAAA;AACH,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gamepark/react-game",
|
|
3
|
-
"version": "7.7.
|
|
3
|
+
"version": "7.7.28",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "React components & tools to create a Board Game user interface for Game Park",
|
|
6
6
|
"author": "Romain Fromi <romain@game-park.com> (https://game-park.com/)",
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { FC, PropsWithChildren } from 'react';
|
|
2
|
-
/**
|
|
3
|
-
* Internal providers that need access to the Redux store (i.e. must be inside Remote/LocalGameProvider).
|
|
4
|
-
* Keeps GameProvider clean — add future internal providers here.
|
|
5
|
-
*/
|
|
6
|
-
export declare const GameInternalProviders: FC<PropsWithChildren>;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "@emotion/react/jsx-runtime";
|
|
2
|
-
import { LogHistoryProvider } from '../Log/LogHistoryProvider';
|
|
3
|
-
/**
|
|
4
|
-
* Internal providers that need access to the Redux store (i.e. must be inside Remote/LocalGameProvider).
|
|
5
|
-
* Keeps GameProvider clean — add future internal providers here.
|
|
6
|
-
*/
|
|
7
|
-
export const GameInternalProviders = ({ children }) => {
|
|
8
|
-
return (_jsx(LogHistoryProvider, { children: children }));
|
|
9
|
-
};
|
|
10
|
-
//# sourceMappingURL=GameInternalProviders.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"GameInternalProviders.js","sourceRoot":"","sources":["../../../src/components/GameProvider/GameInternalProviders.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAA;AAE9D;;;GAGG;AACH,MAAM,CAAC,MAAM,qBAAqB,GAA0B,CAAC,EAAE,QAAQ,EAAE,EAAE,EAAE;IAC3E,OAAO,CACL,KAAC,kBAAkB,cAChB,QAAQ,GACU,CACtB,CAAA;AACH,CAAC,CAAA"}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { FC, PropsWithChildren } from 'react';
|
|
2
|
-
/**
|
|
3
|
-
* Bridge component that computes the log history and injects it into the existing gameContext.
|
|
4
|
-
* Only activates when logs are configured. Sits inside Remote/LocalGameProvider
|
|
5
|
-
* so it has access to the Redux store.
|
|
6
|
-
*/
|
|
7
|
-
export declare const LogHistoryBridge: FC<PropsWithChildren>;
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { Fragment as _Fragment, jsx as _jsx } from "@emotion/react/jsx-runtime";
|
|
2
|
-
import { useContext, useMemo } from 'react';
|
|
3
|
-
import { useLogHistoryProvider } from '../../hooks/useFlatHistory';
|
|
4
|
-
import { gameContext } from './GameContext';
|
|
5
|
-
/**
|
|
6
|
-
* Bridge component that computes the log history and injects it into the existing gameContext.
|
|
7
|
-
* Only activates when logs are configured. Sits inside Remote/LocalGameProvider
|
|
8
|
-
* so it has access to the Redux store.
|
|
9
|
-
*/
|
|
10
|
-
export const LogHistoryBridge = ({ children }) => {
|
|
11
|
-
const parentContext = useContext(gameContext);
|
|
12
|
-
if (!parentContext.logs) {
|
|
13
|
-
return _jsx(_Fragment, { children: children });
|
|
14
|
-
}
|
|
15
|
-
return _jsx(LogHistoryBridgeInternal, { children: children });
|
|
16
|
-
};
|
|
17
|
-
const LogHistoryBridgeInternal = ({ children }) => {
|
|
18
|
-
const parentContext = useContext(gameContext);
|
|
19
|
-
const logHistory = useLogHistoryProvider();
|
|
20
|
-
const enrichedContext = useMemo(() => ({ ...parentContext, logHistory }), [parentContext, logHistory]);
|
|
21
|
-
return (_jsx(gameContext.Provider, { value: enrichedContext, children: children }));
|
|
22
|
-
};
|
|
23
|
-
//# sourceMappingURL=LogHistoryBridge.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"LogHistoryBridge.js","sourceRoot":"","sources":["../../../src/components/GameProvider/LogHistoryBridge.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAyB,UAAU,EAAE,OAAO,EAAE,MAAM,OAAO,CAAA;AAClE,OAAO,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAA;AAClE,OAAO,EAAe,WAAW,EAAE,MAAM,eAAe,CAAA;AAExD;;;;GAIG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAA0B,CAAC,EAAE,QAAQ,EAAE,EAAE,EAAE;IACtE,MAAM,aAAa,GAAG,UAAU,CAAC,WAAW,CAAC,CAAA;IAC7C,IAAI,CAAC,aAAa,CAAC,IAAI,EAAE,CAAC;QACxB,OAAO,4BAAG,QAAQ,GAAI,CAAA;IACxB,CAAC;IACD,OAAO,KAAC,wBAAwB,cAAE,QAAQ,GAA4B,CAAA;AACxE,CAAC,CAAA;AAED,MAAM,wBAAwB,GAA0B,CAAC,EAAE,QAAQ,EAAE,EAAE,EAAE;IACvE,MAAM,aAAa,GAAG,UAAU,CAAC,WAAW,CAAC,CAAA;IAC7C,MAAM,UAAU,GAAG,qBAAqB,EAAE,CAAA;IAE1C,MAAM,eAAe,GAAG,OAAO,CAC7B,GAAG,EAAE,CAAC,CAAC,EAAE,GAAG,aAAa,EAAE,UAAU,EAAE,CAAC,EACxC,CAAC,aAAa,EAAE,UAAU,CAAC,CAC5B,CAAA;IAED,OAAO,CACL,KAAC,WAAW,CAAC,QAAQ,IAAC,KAAK,EAAE,eAAe,YACzC,QAAQ,GACY,CACxB,CAAA;AACH,CAAC,CAAA"}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { Interpolation, Theme } from '@emotion/react';
|
|
2
|
-
import { CSSProperties, FC } from 'react';
|
|
3
|
-
import { MoveHistory } from '../../../hooks/useFlatHistory';
|
|
4
|
-
export type VirtualizedLogItemProps = {
|
|
5
|
-
history: MoveHistory;
|
|
6
|
-
itemCss: Interpolation<Theme>;
|
|
7
|
-
customEntryCss: Interpolation<Theme>[];
|
|
8
|
-
};
|
|
9
|
-
export declare const VirtualizedLogItem: FC<VirtualizedLogItemProps & {
|
|
10
|
-
index: number;
|
|
11
|
-
style: CSSProperties;
|
|
12
|
-
}>;
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "@emotion/react/jsx-runtime";
|
|
2
|
-
import { LogItem } from '../../Log';
|
|
3
|
-
export const VirtualizedLogItem = ({ history, itemCss, customEntryCss, style }) => {
|
|
4
|
-
return (_jsx("div", { style: style, children: _jsx(LogItem, { history: history, css: itemCss, customEntryCss: customEntryCss }) }));
|
|
5
|
-
};
|
|
6
|
-
//# sourceMappingURL=VirtualizedLogItem.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"VirtualizedLogItem.js","sourceRoot":"","sources":["../../../../src/components/JournalTabs/History/VirtualizedLogItem.tsx"],"names":[],"mappings":";AAGA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AAQnC,MAAM,CAAC,MAAM,kBAAkB,GAA0E,CAAC,EAAE,OAAO,EAAE,OAAO,EAAE,cAAc,EAAE,KAAK,EAAE,EAAE,EAAE;IACvJ,OAAO,CACL,cAAK,KAAK,EAAE,KAAK,YACf,KAAC,OAAO,IAAC,OAAO,EAAE,OAAO,EAAE,GAAG,EAAE,OAAO,EAAE,cAAc,EAAE,cAAc,GAAG,GACtE,CACP,CAAA;AACH,CAAC,CAAA"}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { FC, PropsWithChildren } from 'react';
|
|
2
|
-
/**
|
|
3
|
-
* Provides log history via a dedicated context, isolated from gameContext.
|
|
4
|
-
* Only mounts the history processing when logs are configured.
|
|
5
|
-
* Changes to the log history only re-render components that consume logHistoryContext.
|
|
6
|
-
*/
|
|
7
|
-
export declare const LogHistoryProvider: FC<PropsWithChildren>;
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, Fragment as _Fragment } from "@emotion/react/jsx-runtime";
|
|
2
|
-
import { useContext } from 'react';
|
|
3
|
-
import { logHistoryContext } from '../../hooks/LogHistoryContext';
|
|
4
|
-
import { useLogHistoryProvider } from '../../hooks/useFlatHistory';
|
|
5
|
-
import { gameContext } from '../GameProvider';
|
|
6
|
-
const LogHistoryProviderInternal = ({ children }) => {
|
|
7
|
-
const state = useLogHistoryProvider();
|
|
8
|
-
return (_jsx(logHistoryContext.Provider, { value: state, children: children }));
|
|
9
|
-
};
|
|
10
|
-
/**
|
|
11
|
-
* Provides log history via a dedicated context, isolated from gameContext.
|
|
12
|
-
* Only mounts the history processing when logs are configured.
|
|
13
|
-
* Changes to the log history only re-render components that consume logHistoryContext.
|
|
14
|
-
*/
|
|
15
|
-
export const LogHistoryProvider = ({ children }) => {
|
|
16
|
-
const context = useContext(gameContext);
|
|
17
|
-
if (!context.logs) {
|
|
18
|
-
return _jsx(_Fragment, { children: children });
|
|
19
|
-
}
|
|
20
|
-
return (_jsx(LogHistoryProviderInternal, { children: children }));
|
|
21
|
-
};
|
|
22
|
-
//# sourceMappingURL=LogHistoryProvider.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"LogHistoryProvider.js","sourceRoot":"","sources":["../../../src/components/Log/LogHistoryProvider.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAyB,UAAU,EAAE,MAAM,OAAO,CAAA;AACzD,OAAO,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAA;AACjE,OAAO,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAA;AAClE,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAA;AAE7C,MAAM,0BAA0B,GAA0B,CAAC,EAAE,QAAQ,EAAE,EAAE,EAAE;IACzE,MAAM,KAAK,GAAG,qBAAqB,EAAE,CAAA;IACrC,OAAO,CACL,KAAC,iBAAiB,CAAC,QAAQ,IAAC,KAAK,EAAE,KAAK,YACrC,QAAQ,GACkB,CAC9B,CAAA;AACH,CAAC,CAAA;AAED;;;;GAIG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAA0B,CAAC,EAAE,QAAQ,EAAE,EAAE,EAAE;IACxE,MAAM,OAAO,GAAG,UAAU,CAAC,WAAW,CAAC,CAAA;IACvC,IAAI,CAAC,OAAO,CAAC,IAAI,EAAE,CAAC;QAClB,OAAO,4BAAG,QAAQ,GAAI,CAAA;IACxB,CAAC;IACD,OAAO,CACL,KAAC,0BAA0B,cACxB,QAAQ,GACkB,CAC9B,CAAA;AACH,CAAC,CAAA"}
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
/** @jsxImportSource @emotion/react */
|
|
2
|
-
import { Interpolation, Theme } from '@emotion/react';
|
|
3
|
-
import { MaterialItem } from '@gamepark/rules-api';
|
|
4
|
-
import { ItemContext } from '../../../locators';
|
|
5
|
-
import { MaterialContentProps } from '../MaterialDescription';
|
|
6
|
-
import { MobileMaterialDescription } from '../MobileMaterialDescription';
|
|
7
|
-
/**
|
|
8
|
-
* 8-faced (octahedral) dice with CSS 3D transforms.
|
|
9
|
-
*
|
|
10
|
-
* The `images` array must contain exactly 8 images, one per face:
|
|
11
|
-
*
|
|
12
|
-
* - **images[0–3]**: top faces (triangles pointing up)
|
|
13
|
-
* - **images[4–7]**: bottom faces (triangles pointing down)
|
|
14
|
-
*
|
|
15
|
-
* Within each half, faces are arranged by cardinal direction:
|
|
16
|
-
*
|
|
17
|
-
* | Index | Half | Direction |
|
|
18
|
-
* |-------|--------|-----------|
|
|
19
|
-
* | 0 | top | front |
|
|
20
|
-
* | 1 | top | right |
|
|
21
|
-
* | 2 | top | back |
|
|
22
|
-
* | 3 | top | left |
|
|
23
|
-
* | 4 | bottom | front |
|
|
24
|
-
* | 5 | bottom | right |
|
|
25
|
-
* | 6 | bottom | back |
|
|
26
|
-
* | 7 | bottom | left |
|
|
27
|
-
*
|
|
28
|
-
* `location.rotation` (0–7) selects which face is shown on top.
|
|
29
|
-
* Top face images should have their symbol shifted toward the base of the triangle (centroid offset).
|
|
30
|
-
* Bottom face images should be rotated 180° with the symbol shifted the opposite way.
|
|
31
|
-
*/
|
|
32
|
-
export declare abstract class OctahedralDiceDescription<P extends number = number, M extends number = number, L extends number = number, ItemId = any> extends MobileMaterialDescription<P, M, L, ItemId> {
|
|
33
|
-
width: number;
|
|
34
|
-
ratio: number;
|
|
35
|
-
borderRadius: number;
|
|
36
|
-
color: string;
|
|
37
|
-
abstract images: string[] | Record<any, string[]>;
|
|
38
|
-
/** Set to true to display face index labels (0-7) for debugging */
|
|
39
|
-
debugFaceLabels: boolean;
|
|
40
|
-
private get tz();
|
|
41
|
-
getImages(): string[];
|
|
42
|
-
getDiceImages(itemId: ItemId): string[];
|
|
43
|
-
getColor(_itemId: ItemId): string;
|
|
44
|
-
content: ({ itemId, highlight, preview, playDown }: MaterialContentProps<ItemId>) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
45
|
-
getItemTransform(item: MaterialItem<P, L>, context: ItemContext<P, M, L>): string[];
|
|
46
|
-
getRotations(item: MaterialItem<P, L>, _context: ItemContext<P, M, L>): string[];
|
|
47
|
-
getHelpDisplayExtraCss(item: Partial<MaterialItem<P, L>>, context: ItemContext<P, M, L>): Interpolation<Theme>;
|
|
48
|
-
}
|
|
@@ -1,142 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, Fragment as _Fragment } from "@emotion/react/jsx-runtime";
|
|
2
|
-
/** @jsxImportSource @emotion/react */
|
|
3
|
-
import { css } from '@emotion/react';
|
|
4
|
-
import { range } from 'es-toolkit';
|
|
5
|
-
import { backgroundCss, shadowEffect, shineEffect, transformCss } from '../../../css';
|
|
6
|
-
import { MobileMaterialDescription } from '../MobileMaterialDescription';
|
|
7
|
-
const TILT = 35.26; // 90 - arctan(sqrt(2)) in degrees
|
|
8
|
-
const TZ_RATIO = 0.2562; // translateZ / width ratio for octahedron
|
|
9
|
-
/**
|
|
10
|
-
* 8-faced (octahedral) dice with CSS 3D transforms.
|
|
11
|
-
*
|
|
12
|
-
* The `images` array must contain exactly 8 images, one per face:
|
|
13
|
-
*
|
|
14
|
-
* - **images[0–3]**: top faces (triangles pointing up)
|
|
15
|
-
* - **images[4–7]**: bottom faces (triangles pointing down)
|
|
16
|
-
*
|
|
17
|
-
* Within each half, faces are arranged by cardinal direction:
|
|
18
|
-
*
|
|
19
|
-
* | Index | Half | Direction |
|
|
20
|
-
* |-------|--------|-----------|
|
|
21
|
-
* | 0 | top | front |
|
|
22
|
-
* | 1 | top | right |
|
|
23
|
-
* | 2 | top | back |
|
|
24
|
-
* | 3 | top | left |
|
|
25
|
-
* | 4 | bottom | front |
|
|
26
|
-
* | 5 | bottom | right |
|
|
27
|
-
* | 6 | bottom | back |
|
|
28
|
-
* | 7 | bottom | left |
|
|
29
|
-
*
|
|
30
|
-
* `location.rotation` (0–7) selects which face is shown on top.
|
|
31
|
-
* Top face images should have their symbol shifted toward the base of the triangle (centroid offset).
|
|
32
|
-
* Bottom face images should be rotated 180° with the symbol shifted the opposite way.
|
|
33
|
-
*/
|
|
34
|
-
export class OctahedralDiceDescription extends MobileMaterialDescription {
|
|
35
|
-
width = 2;
|
|
36
|
-
ratio = 1;
|
|
37
|
-
borderRadius = 0;
|
|
38
|
-
color = '#222222';
|
|
39
|
-
/** Set to true to display face index labels (0-7) for debugging */
|
|
40
|
-
debugFaceLabels = false;
|
|
41
|
-
get tz() { return this.width * TZ_RATIO; }
|
|
42
|
-
getImages() {
|
|
43
|
-
return Array.isArray(this.images) ? this.images : Object.values(this.images).flat();
|
|
44
|
-
}
|
|
45
|
-
getDiceImages(itemId) {
|
|
46
|
-
return Array.isArray(this.images) ? this.images : this.images[itemId];
|
|
47
|
-
}
|
|
48
|
-
getColor(_itemId) {
|
|
49
|
-
return this.color;
|
|
50
|
-
}
|
|
51
|
-
content = ({ itemId, highlight, preview, playDown = preview }) => {
|
|
52
|
-
const images = this.getDiceImages(itemId);
|
|
53
|
-
const w = this.width;
|
|
54
|
-
const tz = this.tz;
|
|
55
|
-
const sideCss = css `
|
|
56
|
-
position: absolute;
|
|
57
|
-
width: ${w}em;
|
|
58
|
-
height: ${w}em;
|
|
59
|
-
backface-visibility: hidden;
|
|
60
|
-
`;
|
|
61
|
-
const diamondTopCss = css `
|
|
62
|
-
display: block;
|
|
63
|
-
width: 100%;
|
|
64
|
-
height: 100%;
|
|
65
|
-
overflow: hidden;
|
|
66
|
-
backface-visibility: hidden;
|
|
67
|
-
transform: translateY(50%) rotate(30deg) skewY(30deg) scaleX(0.866);
|
|
68
|
-
filter: drop-shadow(0 0 0.03em rgba(0, 0, 0, 0.5));
|
|
69
|
-
`;
|
|
70
|
-
const diamondBottomCss = css `
|
|
71
|
-
display: block;
|
|
72
|
-
width: 100%;
|
|
73
|
-
height: 100%;
|
|
74
|
-
overflow: hidden;
|
|
75
|
-
backface-visibility: hidden;
|
|
76
|
-
transform: translateY(-50%) rotate(30deg) skewY(30deg) scaleX(0.866);
|
|
77
|
-
filter: drop-shadow(0 0 0.03em rgba(0, 0, 0, 0.5));
|
|
78
|
-
`;
|
|
79
|
-
const contentTopCss = css `
|
|
80
|
-
display: block;
|
|
81
|
-
width: 100%;
|
|
82
|
-
height: 100%;
|
|
83
|
-
backface-visibility: hidden;
|
|
84
|
-
background-color: ${this.getColor(itemId)};
|
|
85
|
-
transform: scaleX(1.155) skewY(-30deg) rotate(-30deg) translateY(-50%);
|
|
86
|
-
`;
|
|
87
|
-
const contentBottomCss = css `
|
|
88
|
-
display: block;
|
|
89
|
-
width: 100%;
|
|
90
|
-
height: 100%;
|
|
91
|
-
backface-visibility: hidden;
|
|
92
|
-
background-color: ${this.getColor(itemId)};
|
|
93
|
-
transform: scaleX(1.155) skewY(-30deg) rotate(-30deg) translateY(50%);
|
|
94
|
-
`;
|
|
95
|
-
const faceLabelCss = this.debugFaceLabels ? css `
|
|
96
|
-
position: absolute;
|
|
97
|
-
top: 50%;
|
|
98
|
-
left: 50%;
|
|
99
|
-
transform: translate(-50%, -50%);
|
|
100
|
-
font-size: ${w * 0.3}em;
|
|
101
|
-
font-weight: bold;
|
|
102
|
-
color: red;
|
|
103
|
-
pointer-events: none;
|
|
104
|
-
z-index: 1;
|
|
105
|
-
` : undefined;
|
|
106
|
-
return _jsx(_Fragment, { children: range(8).map((_, index) => {
|
|
107
|
-
const yRot = (index % 4) * 90;
|
|
108
|
-
// Bottom faces are offset by 180° so that rotateX(180deg) brings face N to the top
|
|
109
|
-
const bottomYRot = ((index % 4) * 90 + 180) % 360;
|
|
110
|
-
const sideTransform = index < 4
|
|
111
|
-
? transformCss(index > 0 ? `rotateY(${yRot}deg)` : undefined, `rotateX(${TILT}deg)`, `translateZ(${tz}em)`)
|
|
112
|
-
: transformCss(`translateY(52%)`, bottomYRot > 0 ? `rotateY(${bottomYRot}deg)` : undefined, `rotateX(${-TILT}deg)`, `translateZ(${tz}em)`);
|
|
113
|
-
return _jsx("div", { css: [sideCss, sideTransform], children: _jsx("div", { css: index < 4 ? diamondTopCss : diamondBottomCss, children: _jsx("div", { css: [
|
|
114
|
-
index < 4 ? contentTopCss : contentBottomCss,
|
|
115
|
-
backgroundCss(images[index]),
|
|
116
|
-
highlight ? shineEffect : playDown && shadowEffect
|
|
117
|
-
], children: faceLabelCss && _jsx("span", { css: faceLabelCss, children: index }) }) }) }, index);
|
|
118
|
-
}) });
|
|
119
|
-
};
|
|
120
|
-
getItemTransform(item, context) {
|
|
121
|
-
return super.getItemTransform(item, context).concat(`translateZ(${this.tz}em)`, ...this.getRotations(item, context));
|
|
122
|
-
}
|
|
123
|
-
getRotations(item, _context) {
|
|
124
|
-
switch (item.location.rotation) {
|
|
125
|
-
case 0: return [];
|
|
126
|
-
case 1: return ['rotateY(-90deg)'];
|
|
127
|
-
case 2: return ['rotateY(-180deg)'];
|
|
128
|
-
case 3: return ['rotateY(90deg)'];
|
|
129
|
-
case 4: return ['rotateX(180deg)'];
|
|
130
|
-
case 5: return ['rotateX(180deg)', 'rotateY(90deg)'];
|
|
131
|
-
case 6: return ['rotateX(180deg)', 'rotateY(180deg)'];
|
|
132
|
-
case 7: return ['rotateX(180deg)', 'rotateY(-90deg)'];
|
|
133
|
-
default: return [];
|
|
134
|
-
}
|
|
135
|
-
}
|
|
136
|
-
getHelpDisplayExtraCss(item, context) {
|
|
137
|
-
return item.location && [transformCss(...this.getRotations(item, context)), css `
|
|
138
|
-
margin: ${this.width / 4}em;
|
|
139
|
-
`];
|
|
140
|
-
}
|
|
141
|
-
}
|
|
142
|
-
//# sourceMappingURL=OctahedralDiceDescription.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"OctahedralDiceDescription.js","sourceRoot":"","sources":["../../../../src/components/material/Dices/OctahedralDiceDescription.tsx"],"names":[],"mappings":";AAAA,sCAAsC;AACtC,OAAO,EAAE,GAAG,EAAwB,MAAM,gBAAgB,CAAA;AAE1D,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAA;AAClC,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,cAAc,CAAA;AAGrF,OAAO,EAAE,yBAAyB,EAAE,MAAM,8BAA8B,CAAA;AAExE,MAAM,IAAI,GAAG,KAAK,CAAA,CAAC,kCAAkC;AACrD,MAAM,QAAQ,GAAG,MAAM,CAAA,CAAC,0CAA0C;AAElE;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,MAAM,OAAgB,yBACpB,SAAQ,yBAA0C;IAClD,KAAK,GAAG,CAAC,CAAA;IACT,KAAK,GAAG,CAAC,CAAA;IACT,YAAY,GAAG,CAAC,CAAA;IAChB,KAAK,GAAG,SAAS,CAAA;IAEjB,mEAAmE;IACnE,eAAe,GAAG,KAAK,CAAA;IAEvB,IAAY,EAAE,KAAK,OAAO,IAAI,CAAC,KAAK,GAAG,QAAQ,CAAA,CAAC,CAAC;IAEjD,SAAS;QACP,OAAO,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ImportSource @emotion/react */
|
|
2
|
-
import { FC, ReactNode } from 'react';
|
|
3
|
-
/**
|
|
4
|
-
* A single entry in the DevToolsHub panel.
|
|
5
|
-
* Use this instead of raw `<button>` when adding custom tools via `children`.
|
|
6
|
-
*
|
|
7
|
-
* @example
|
|
8
|
-
* <DevToolsHub>
|
|
9
|
-
* <DevToolEntry icon="✦" label="Card Viewer" desc="Browse agents" onClick={() => setShowCards(true)} />
|
|
10
|
-
* </DevToolsHub>
|
|
11
|
-
*/
|
|
12
|
-
export declare const DevToolEntry: FC<{
|
|
13
|
-
icon: ReactNode;
|
|
14
|
-
label: string;
|
|
15
|
-
desc?: string;
|
|
16
|
-
onClick?: () => void;
|
|
17
|
-
}>;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "@emotion/react/jsx-runtime";
|
|
2
|
-
import { devToolBtnCss, devToolIconCss, devToolLabelCss, devToolDescCss } from './DevToolsStyles';
|
|
3
|
-
/**
|
|
4
|
-
* A single entry in the DevToolsHub panel.
|
|
5
|
-
* Use this instead of raw `<button>` when adding custom tools via `children`.
|
|
6
|
-
*
|
|
7
|
-
* @example
|
|
8
|
-
* <DevToolsHub>
|
|
9
|
-
* <DevToolEntry icon="✦" label="Card Viewer" desc="Browse agents" onClick={() => setShowCards(true)} />
|
|
10
|
-
* </DevToolsHub>
|
|
11
|
-
*/
|
|
12
|
-
export const DevToolEntry = ({ icon, label, desc, onClick }) => (_jsxs("button", { css: devToolBtnCss, onClick: onClick, children: [_jsx("span", { css: devToolIconCss, children: icon }), _jsx("span", { css: devToolLabelCss, children: label }), desc && _jsx("span", { css: devToolDescCss, children: desc })] }));
|
|
13
|
-
//# sourceMappingURL=DevToolEntry.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"DevToolEntry.js","sourceRoot":"","sources":["../../../../src/components/material/GameTable/DevToolEntry.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAA;AAEjG;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,YAAY,GAKpB,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC,CACvC,kBAAQ,GAAG,EAAE,aAAa,EAAE,OAAO,EAAE,OAAO,aAC1C,eAAM,GAAG,EAAE,cAAc,YAAG,IAAI,GAAQ,EACxC,eAAM,GAAG,EAAE,eAAe,YAAG,KAAK,GAAQ,EACzC,IAAI,IAAI,eAAM,GAAG,EAAE,cAAc,YAAG,IAAI,GAAQ,IAC1C,CACV,CAAA"}
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
export declare const GP_PRIMARY = "#28B8CE";
|
|
2
|
-
export declare const GP_DARK = "#002448";
|
|
3
|
-
export declare const GP_SURFACE = "#0a1929";
|
|
4
|
-
export declare const GP_ACCENT = "#9fe2f7";
|
|
5
|
-
export declare const fabCss: import("@emotion/utils").SerializedStyles;
|
|
6
|
-
export declare const logoCss: import("@emotion/utils").SerializedStyles;
|
|
7
|
-
export declare const hubContainerCss: import("@emotion/utils").SerializedStyles;
|
|
8
|
-
export declare const mainMenuCss: import("@emotion/utils").SerializedStyles;
|
|
9
|
-
export declare const subPanelCss: import("@emotion/utils").SerializedStyles;
|
|
10
|
-
export declare const subPanelHeaderCss: import("@emotion/utils").SerializedStyles;
|
|
11
|
-
export declare const subPanelTitleCss: import("@emotion/utils").SerializedStyles;
|
|
12
|
-
export declare const subPanelContentCss: import("@emotion/utils").SerializedStyles;
|
|
13
|
-
export declare const panelHeaderCss: import("@emotion/utils").SerializedStyles;
|
|
14
|
-
export declare const headerLogoCss: import("@emotion/utils").SerializedStyles;
|
|
15
|
-
export declare const panelTitleCss: import("@emotion/utils").SerializedStyles;
|
|
16
|
-
export declare const panelBadgeCss: import("@emotion/utils").SerializedStyles;
|
|
17
|
-
export declare const menuListCss: import("@emotion/utils").SerializedStyles;
|
|
18
|
-
export declare const menuItemCss: import("@emotion/utils").SerializedStyles;
|
|
19
|
-
export declare const menuItemActiveCss: import("@emotion/utils").SerializedStyles;
|
|
20
|
-
export declare const menuItemIconCss: import("@emotion/utils").SerializedStyles;
|
|
21
|
-
export declare const menuItemLabelCss: import("@emotion/utils").SerializedStyles;
|
|
22
|
-
export declare const menuChevronCss: import("@emotion/utils").SerializedStyles;
|
|
23
|
-
export declare const devToolBtnCss: import("@emotion/utils").SerializedStyles;
|
|
24
|
-
export declare const toolBtnActiveCss: import("@emotion/utils").SerializedStyles;
|
|
25
|
-
export declare const devToolIconCss: import("@emotion/utils").SerializedStyles;
|
|
26
|
-
export declare const devToolLabelCss: import("@emotion/utils").SerializedStyles;
|
|
27
|
-
export declare const devToolDescCss: import("@emotion/utils").SerializedStyles;
|
|
28
|
-
export declare const activeIndicatorCss: import("@emotion/utils").SerializedStyles;
|
|
29
|
-
export declare const dividerCss: import("@emotion/utils").SerializedStyles;
|
|
30
|
-
export declare const inlineRowCss: import("@emotion/utils").SerializedStyles;
|
|
31
|
-
export declare const stepBtnCss: import("@emotion/utils").SerializedStyles;
|
|
32
|
-
export declare const numberInputCss: import("@emotion/utils").SerializedStyles;
|
|
33
|
-
export declare const textInputCss: import("@emotion/utils").SerializedStyles;
|
|
34
|
-
export declare const goBtnCss: import("@emotion/utils").SerializedStyles;
|
|
35
|
-
export declare const playerBtnCss: import("@emotion/utils").SerializedStyles;
|
|
36
|
-
export declare const playerBtnActiveCss: import("@emotion/utils").SerializedStyles;
|
|
37
|
-
export declare const savedListCss: import("@emotion/utils").SerializedStyles;
|
|
38
|
-
export declare const savedEntryCss: import("@emotion/utils").SerializedStyles;
|
|
39
|
-
export declare const savedLabelCss: import("@emotion/utils").SerializedStyles;
|
|
40
|
-
export declare const savedActionsCss: import("@emotion/utils").SerializedStyles;
|
|
41
|
-
export declare const smallBtnCss: import("@emotion/utils").SerializedStyles;
|
|
42
|
-
export declare const smallBtnDangerCss: import("@emotion/utils").SerializedStyles;
|
|
43
|
-
export declare const backdropCss: import("@emotion/utils").SerializedStyles;
|
|
44
|
-
export declare const modalBackdropCss: import("@emotion/utils").SerializedStyles;
|
|
45
|
-
export declare const modalCss: import("@emotion/utils").SerializedStyles;
|
|
46
|
-
export declare const modalHeaderCss: import("@emotion/utils").SerializedStyles;
|
|
47
|
-
export declare const modalTitleCss: import("@emotion/utils").SerializedStyles;
|
|
48
|
-
export declare const modalCloseBtnCss: import("@emotion/utils").SerializedStyles;
|
|
49
|
-
export declare const modalBodyCss: import("@emotion/utils").SerializedStyles;
|
|
50
|
-
export declare const modalTextareaCss: import("@emotion/utils").SerializedStyles;
|
|
51
|
-
export declare const pasteErrorCss: import("@emotion/utils").SerializedStyles;
|
|
52
|
-
export declare const modalFooterCss: import("@emotion/utils").SerializedStyles;
|
|
53
|
-
export declare const modalCancelBtnCss: import("@emotion/utils").SerializedStyles;
|
|
54
|
-
export declare const modalLoadBtnCss: import("@emotion/utils").SerializedStyles;
|
|
55
|
-
export declare const flashCss: import("@emotion/utils").SerializedStyles;
|
|
56
|
-
export declare const toggleRowCss: import("@emotion/utils").SerializedStyles;
|
|
57
|
-
export declare const checkboxCss: import("@emotion/utils").SerializedStyles;
|
|
58
|
-
export declare const toggleLabelCss: import("@emotion/utils").SerializedStyles;
|