@opexa/portal-components 0.0.990 → 0.0.991

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.
@@ -1 +1,5 @@
1
- export declare function GameLaunch(): import("react/jsx-runtime").JSX.Element | undefined;
1
+ interface GameLaunchProps {
2
+ locale?: 'international' | 'local';
3
+ }
4
+ export declare function GameLaunch({ locale }: GameLaunchProps): import("react/jsx-runtime").JSX.Element | undefined;
5
+ export {};
@@ -7,8 +7,8 @@ const Component = dynamic(() => import('./GameLaunch.lazy.js').then((m) => m.Gam
7
7
  ssr: false,
8
8
  loading: () => null,
9
9
  });
10
- export function GameLaunch() {
10
+ export function GameLaunch({ locale = 'local' }) {
11
11
  const touched = useGlobalStore(useShallow((ctx) => ctx.gameLaunch['~touched']));
12
12
  if (touched)
13
- return _jsx(Component, {});
13
+ return _jsx(Component, { locale: locale });
14
14
  }
@@ -1,5 +1,5 @@
1
1
  interface GameLaunchProps {
2
- currencyFormat?: 'international' | 'local';
2
+ locale?: 'international' | 'local';
3
3
  }
4
- export declare function GameLaunch({ currencyFormat }: GameLaunchProps): import("react/jsx-runtime").JSX.Element;
4
+ export declare function GameLaunch({ locale }: GameLaunchProps): import("react/jsx-runtime").JSX.Element;
5
5
  export {};
@@ -24,7 +24,7 @@ import { Button } from '../../ui/Button/index.js';
24
24
  import { IconButton } from '../../ui/IconButton/index.js';
25
25
  import { Portal } from '../../ui/Portal/index.js';
26
26
  import { Presence } from '../../ui/Presence/index.js';
27
- export function GameLaunch({ currencyFormat = 'local' }) {
27
+ export function GameLaunch({ locale = 'local' }) {
28
28
  const globalStore = useGlobalStore(useShallow((ctx) => ({
29
29
  gameLaunch: ctx.gameLaunch,
30
30
  depositWithdrawal: ctx.depositWithdrawal,
@@ -104,7 +104,7 @@ export function GameLaunch({ currencyFormat = 'local' }) {
104
104
  ? 'fill-yellow-400 text-yellow-400'
105
105
  : 'text-inherit') }) }), _jsx(IconButton, { size: "xs", variant: "outline", onClick: () => maximizeDisclosure.setOpen(true), children: _jsx(Expand03Icon, { className: "size-5" }) }), _jsx(IconButton, { size: "xs", fullWidth: false, onClick: () => {
106
106
  globalStore.depositWithdrawal.setOpen(true);
107
- }, children: currencyFormat === 'local' ? (_jsx("span", { children: _jsx(PhilippinePesoIcon, { className: "size-5" }) })) : (_jsx(CoinsHandIcon, { className: "size-5" })) })] }) }), _jsx(Presence, { asChild: true, lazyMount: true, unmountOnExit: true, present: maximizeDisclosure.open, children: _jsx("button", { type: "button", onClick: () => maximizeDisclosure.setOpen(false), className: "-translate-x-1/2 absolute top-safe-area-inset-top left-1/2 z-1 flex h-7.5 w-[4.5rem] ui-closed:animate-slide-out-down ui-open:animate-slide-in-down items-center justify-center rounded-b-md bg-white/30 shadow-xs backdrop-blur-sm", children: _jsx(ChevronDownIcon, {}) }) }), _jsxs("section", { className: "size-full", children: [globalStore.gameLaunch.details.status === 'LOADING' && (_jsx("div", { className: "flex size-full items-center justify-center", children: _jsx(SpinnerIcon, { className: "size-8" }) })), globalStore.gameLaunch.details.status === 'FAILED' && (_jsx("div", {})), globalStore.gameLaunch.details.status === 'PLAYING' && (_jsx("iframe", { src: globalStore.gameLaunch.details.session.launchUrl ?? '', title: "Game Launch", className: "size-full" }))] })] }) }) }) }), _jsx(AlertDialog.Root, { role: "alertdialog", open: cancelDisclosure.open, onOpenChange: (details) => {
107
+ }, children: locale === 'local' ? (_jsx("span", { children: _jsx(PhilippinePesoIcon, { className: "size-5" }) })) : (_jsx(CoinsHandIcon, { className: "size-5" })) })] }) }), _jsx(Presence, { asChild: true, lazyMount: true, unmountOnExit: true, present: maximizeDisclosure.open, children: _jsx("button", { type: "button", onClick: () => maximizeDisclosure.setOpen(false), className: "-translate-x-1/2 absolute top-safe-area-inset-top left-1/2 z-1 flex h-7.5 w-[4.5rem] ui-closed:animate-slide-out-down ui-open:animate-slide-in-down items-center justify-center rounded-b-md bg-white/30 shadow-xs backdrop-blur-sm", children: _jsx(ChevronDownIcon, {}) }) }), _jsxs("section", { className: "size-full", children: [globalStore.gameLaunch.details.status === 'LOADING' && (_jsx("div", { className: "flex size-full items-center justify-center", children: _jsx(SpinnerIcon, { className: "size-8" }) })), globalStore.gameLaunch.details.status === 'FAILED' && (_jsx("div", {})), globalStore.gameLaunch.details.status === 'PLAYING' && (_jsx("iframe", { src: globalStore.gameLaunch.details.session.launchUrl ?? '', title: "Game Launch", className: "size-full" }))] })] }) }) }) }), _jsx(AlertDialog.Root, { role: "alertdialog", open: cancelDisclosure.open, onOpenChange: (details) => {
108
108
  cancelDisclosure.setOpen(details.open);
109
109
  }, lazyMount: true, closeOnEscape: false, closeOnInteractOutside: false, children: _jsxs(Portal, { children: [_jsx(AlertDialog.Backdrop, {}), _jsx(AlertDialog.Positioner, { children: _jsxs(AlertDialog.Content, { children: [_jsx(AlertDialog.CloseTrigger, { children: _jsx(XIcon, {}) }), _jsx(AlertDialog.Header, { children: _jsx("div", { className: "flex size-12 items-center justify-center rounded-full bg-bg-error-secondary text-text-featured-icon-light-error", children: _jsx(AlertCircleIcon, { className: "size-6" }) }) }), _jsxs(AlertDialog.Body, { children: [_jsx(AlertDialog.Title, { children: "Quit Game" }), _jsx(AlertDialog.Description, { children: "Are you sure you want to quit?" })] }), _jsx(AlertDialog.Context, { children: (api) => (_jsxs(AlertDialog.Footer, { children: [_jsx(Button, { variant: "outline", colorScheme: "gray", disabled: endGameSessionMutation.isPending, onClick: () => {
110
110
  api.setOpen(false);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opexa/portal-components",
3
- "version": "0.0.990",
3
+ "version": "0.0.991",
4
4
  "exports": {
5
5
  "./ui/*": {
6
6
  "types": "./dist/ui/*/index.d.ts",