@almadar/mobile 1.2.6 → 1.6.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/dist/chunk-4GLV4XIP.js +140 -0
- package/dist/chunk-4GLV4XIP.js.map +1 -0
- package/dist/{chunk-QUFLYKWA.js → chunk-A6AK75GP.js} +43 -554
- package/dist/chunk-A6AK75GP.js.map +1 -0
- package/dist/chunk-BUN5QD6C.js +525 -0
- package/dist/chunk-BUN5QD6C.js.map +1 -0
- package/dist/{chunk-PBO6ZN2M.js → chunk-C3USTXJ7.js} +1372 -2255
- package/dist/chunk-C3USTXJ7.js.map +1 -0
- package/dist/{chunk-5U5Z65ZO.js → chunk-DNC6CO6E.js} +58 -187
- package/dist/chunk-DNC6CO6E.js.map +1 -0
- package/dist/chunk-I6UYSB5R.js +935 -0
- package/dist/chunk-I6UYSB5R.js.map +1 -0
- package/dist/{chunk-ETD72PHO.js → chunk-SLYJ52HW.js} +30 -21
- package/dist/chunk-SLYJ52HW.js.map +1 -0
- package/dist/chunk-UIU7NWN2.js +924 -0
- package/dist/chunk-UIU7NWN2.js.map +1 -0
- package/dist/{chunk-BFRVXKSP.js → chunk-VNRKHWR7.js} +87 -4
- package/dist/chunk-VNRKHWR7.js.map +1 -0
- package/dist/{chunk-CA6Z3OTE.js → chunk-WHAG42QJ.js} +1 -1
- package/dist/chunk-WHAG42QJ.js.map +1 -0
- package/dist/{chunk-GMR5FKKB.js → chunk-XWPR5FXS.js} +2 -2
- package/dist/chunk-XWPR5FXS.js.map +1 -0
- package/dist/{chunk-MLTSQPVN.js → chunk-YWQRLHTP.js} +2 -2
- package/dist/chunk-YWQRLHTP.js.map +1 -0
- package/dist/components/atoms/Button.d.ts +3 -2
- package/dist/components/atoms/Button.d.ts.map +1 -1
- package/dist/components/atoms/Card.d.ts +3 -2
- package/dist/components/atoms/Card.d.ts.map +1 -1
- package/dist/components/atoms/Checkbox.d.ts +3 -2
- package/dist/components/atoms/Checkbox.d.ts.map +1 -1
- package/dist/components/atoms/DayCell.d.ts +3 -2
- package/dist/components/atoms/DayCell.d.ts.map +1 -1
- package/dist/components/atoms/InfiniteScrollSentinel.d.ts +3 -2
- package/dist/components/atoms/InfiniteScrollSentinel.d.ts.map +1 -1
- package/dist/components/atoms/Radio.d.ts +3 -2
- package/dist/components/atoms/Radio.d.ts.map +1 -1
- package/dist/components/atoms/RangeSlider.d.ts +3 -2
- package/dist/components/atoms/RangeSlider.d.ts.map +1 -1
- package/dist/components/atoms/Select.d.ts +3 -2
- package/dist/components/atoms/Select.d.ts.map +1 -1
- package/dist/components/atoms/Switch.d.ts +3 -2
- package/dist/components/atoms/Switch.d.ts.map +1 -1
- package/dist/components/atoms/TextHighlight.d.ts +3 -2
- package/dist/components/atoms/TextHighlight.d.ts.map +1 -1
- package/dist/components/atoms/game/OrbitalGameCanvas.d.ts +25 -0
- package/dist/components/atoms/game/OrbitalGameCanvas.d.ts.map +1 -0
- package/dist/components/atoms/game/index.d.ts +2 -0
- package/dist/components/atoms/game/index.d.ts.map +1 -1
- package/dist/components/atoms/index.d.ts +4 -4
- package/dist/components/atoms/index.d.ts.map +1 -1
- package/dist/components/atoms/index.js +14 -9
- package/dist/components/index.d.ts +1 -0
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/index.js +47 -20
- package/dist/components/molecules/Alert.d.ts +3 -2
- package/dist/components/molecules/Alert.d.ts.map +1 -1
- package/dist/components/molecules/DataGrid.d.ts +6 -5
- package/dist/components/molecules/DataGrid.d.ts.map +1 -1
- package/dist/components/molecules/DataList.d.ts +5 -4
- package/dist/components/molecules/DataList.d.ts.map +1 -1
- package/dist/components/molecules/NumberStepper.d.ts +3 -2
- package/dist/components/molecules/NumberStepper.d.ts.map +1 -1
- package/dist/components/molecules/PullToRefresh.d.ts +3 -2
- package/dist/components/molecules/PullToRefresh.d.ts.map +1 -1
- package/dist/components/molecules/RelationSelect.d.ts +3 -2
- package/dist/components/molecules/RelationSelect.d.ts.map +1 -1
- package/dist/components/molecules/RepeatableFormSection.d.ts +6 -5
- package/dist/components/molecules/RepeatableFormSection.d.ts.map +1 -1
- package/dist/components/molecules/SortableList.d.ts +2 -1
- package/dist/components/molecules/SortableList.d.ts.map +1 -1
- package/dist/components/molecules/StarRating.d.ts +3 -2
- package/dist/components/molecules/StarRating.d.ts.map +1 -1
- package/dist/components/molecules/SwipeableRow.d.ts +3 -2
- package/dist/components/molecules/SwipeableRow.d.ts.map +1 -1
- package/dist/components/molecules/Toast.d.ts +3 -2
- package/dist/components/molecules/Toast.d.ts.map +1 -1
- package/dist/components/molecules/index.js +9 -6
- package/dist/components/organisms/CardGrid.d.ts +6 -5
- package/dist/components/organisms/CardGrid.d.ts.map +1 -1
- package/dist/components/organisms/ComponentPatterns.d.ts.map +1 -1
- package/dist/components/organisms/ContentRenderer.d.ts.map +1 -1
- package/dist/components/organisms/DataTable.d.ts +2 -4
- package/dist/components/organisms/DataTable.d.ts.map +1 -1
- package/dist/components/organisms/DocumentViewer.d.ts.map +1 -1
- package/dist/components/organisms/DrawerSlot.d.ts +5 -4
- package/dist/components/organisms/DrawerSlot.d.ts.map +1 -1
- package/dist/components/organisms/FormSection.d.ts +8 -1
- package/dist/components/organisms/FormSection.d.ts.map +1 -1
- package/dist/components/organisms/Header.d.ts +3 -2
- package/dist/components/organisms/Header.d.ts.map +1 -1
- package/dist/components/organisms/LayoutPatterns.d.ts.map +1 -1
- package/dist/components/organisms/MasterDetail.d.ts.map +1 -1
- package/dist/components/organisms/MediaGallery.d.ts +2 -1
- package/dist/components/organisms/MediaGallery.d.ts.map +1 -1
- package/dist/components/organisms/ModalSlot.d.ts +5 -4
- package/dist/components/organisms/ModalSlot.d.ts.map +1 -1
- package/dist/components/organisms/PageHeader.d.ts +7 -0
- package/dist/components/organisms/PageHeader.d.ts.map +1 -1
- package/dist/components/organisms/SignaturePad.d.ts.map +1 -1
- package/dist/components/organisms/StatCard.d.ts +3 -2
- package/dist/components/organisms/StatCard.d.ts.map +1 -1
- package/dist/components/organisms/StateMachineView.d.ts.map +1 -1
- package/dist/components/organisms/Table.d.ts.map +1 -1
- package/dist/components/organisms/ToastSlot.d.ts +6 -5
- package/dist/components/organisms/ToastSlot.d.ts.map +1 -1
- package/dist/components/organisms/UISlotRenderer.d.ts +2 -1
- package/dist/components/organisms/UISlotRenderer.d.ts.map +1 -1
- package/dist/components/organisms/book/BookChapterView.d.ts +2 -1
- package/dist/components/organisms/book/BookChapterView.d.ts.map +1 -1
- package/dist/components/organisms/book/BookCoverPage.d.ts +2 -1
- package/dist/components/organisms/book/BookCoverPage.d.ts.map +1 -1
- package/dist/components/organisms/book/BookNavBar.d.ts +2 -1
- package/dist/components/organisms/book/BookNavBar.d.ts.map +1 -1
- package/dist/components/organisms/book/BookTableOfContents.d.ts +2 -1
- package/dist/components/organisms/book/BookTableOfContents.d.ts.map +1 -1
- package/dist/components/organisms/book/BookViewer.d.ts +2 -1
- package/dist/components/organisms/book/BookViewer.d.ts.map +1 -1
- package/dist/components/organisms/game/DialogueBox.d.ts.map +1 -1
- package/dist/components/organisms/game/InventoryPanel.d.ts.map +1 -1
- package/dist/components/organisms/game/physics-sim/SimulationCanvas.d.ts.map +1 -1
- package/dist/components/organisms/game/puzzles/sequencer/ActionPalette.d.ts.map +1 -1
- package/dist/components/organisms/game/puzzles/sequencer/ActionTile.d.ts.map +1 -1
- package/dist/components/organisms/game/puzzles/sequencer/SequenceBar.d.ts.map +1 -1
- package/dist/components/organisms/game/puzzles/state-architect/CodeView.d.ts.map +1 -1
- package/dist/components/organisms/game/puzzles/state-architect/StateArchitectBoard.d.ts.map +1 -1
- package/dist/components/organisms/game/puzzles/state-architect/StateNode.d.ts.map +1 -1
- package/dist/components/organisms/game/puzzles/state-architect/TransitionArrow.d.ts.map +1 -1
- package/dist/components/organisms/game/puzzles/state-architect/VariablePanel.d.ts.map +1 -1
- package/dist/components/organisms/index.d.ts +1 -1
- package/dist/components/organisms/index.d.ts.map +1 -1
- package/dist/components/organisms/index.js +14 -10
- package/dist/components/organisms/layout/DashboardGrid.d.ts +3 -2
- package/dist/components/organisms/layout/DashboardGrid.d.ts.map +1 -1
- package/dist/components/templates/BattleTemplate.d.ts.map +1 -1
- package/dist/components/templates/index.js +26 -0
- package/dist/components/templates/index.js.map +1 -0
- package/dist/hooks/index.js +1 -1
- package/dist/hooks/useTraitState.d.ts +3 -3
- package/dist/hooks/useTraitState.d.ts.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +43 -910
- package/dist/index.js.map +1 -1
- package/dist/types/index.d.ts +7 -0
- package/dist/types/index.d.ts.map +1 -0
- package/package.json +14 -16
- package/dist/chunk-5U5Z65ZO.js.map +0 -1
- package/dist/chunk-BFRVXKSP.js.map +0 -1
- package/dist/chunk-CA6Z3OTE.js.map +0 -1
- package/dist/chunk-ETD72PHO.js.map +0 -1
- package/dist/chunk-GMR5FKKB.js.map +0 -1
- package/dist/chunk-MLTSQPVN.js.map +0 -1
- package/dist/chunk-PBO6ZN2M.js.map +0 -1
- package/dist/chunk-QUFLYKWA.js.map +0 -1
package/dist/index.js
CHANGED
|
@@ -1,3 +1,13 @@
|
|
|
1
|
+
import {
|
|
2
|
+
AuthLayout,
|
|
3
|
+
BattleTemplate,
|
|
4
|
+
CastleTemplate,
|
|
5
|
+
CounterTemplate,
|
|
6
|
+
DashboardLayout,
|
|
7
|
+
GameShell,
|
|
8
|
+
GameTemplate,
|
|
9
|
+
WorldMapTemplate
|
|
10
|
+
} from "./chunk-UIU7NWN2.js";
|
|
1
11
|
import {
|
|
2
12
|
useInfiniteScroll,
|
|
3
13
|
useKeyboard,
|
|
@@ -11,20 +21,21 @@ import {
|
|
|
11
21
|
useThemeValue,
|
|
12
22
|
useTraitState,
|
|
13
23
|
useUIEvents
|
|
14
|
-
} from "./chunk-
|
|
15
|
-
import {
|
|
16
|
-
EventBusProvider
|
|
17
|
-
} from "./chunk-TRYFJDL3.js";
|
|
24
|
+
} from "./chunk-WHAG42QJ.js";
|
|
18
25
|
import {
|
|
19
26
|
cn,
|
|
20
27
|
convertThemeToRN,
|
|
21
28
|
defaultRNTheme
|
|
22
29
|
} from "./chunk-5JVEVV74.js";
|
|
30
|
+
import {
|
|
31
|
+
EventBusProvider
|
|
32
|
+
} from "./chunk-TRYFJDL3.js";
|
|
23
33
|
import {
|
|
24
34
|
AnimatedCounter,
|
|
25
35
|
Avatar,
|
|
26
36
|
Center,
|
|
27
37
|
ConditionalWrapper,
|
|
38
|
+
OrbitalGameCanvas,
|
|
28
39
|
Overlay,
|
|
29
40
|
Radio,
|
|
30
41
|
RangeSlider,
|
|
@@ -38,7 +49,7 @@ import {
|
|
|
38
49
|
ThemeToggle,
|
|
39
50
|
TrendIndicator,
|
|
40
51
|
TypewriterText
|
|
41
|
-
} from "./chunk-
|
|
52
|
+
} from "./chunk-VNRKHWR7.js";
|
|
42
53
|
import {
|
|
43
54
|
ThemeProvider,
|
|
44
55
|
useThemeMode
|
|
@@ -92,7 +103,7 @@ import {
|
|
|
92
103
|
Tooltip,
|
|
93
104
|
WizardNavigation,
|
|
94
105
|
WizardProgress
|
|
95
|
-
} from "./chunk-
|
|
106
|
+
} from "./chunk-SLYJ52HW.js";
|
|
96
107
|
import {
|
|
97
108
|
getNestedValue
|
|
98
109
|
} from "./chunk-K2JGK2QD.js";
|
|
@@ -102,11 +113,10 @@ import {
|
|
|
102
113
|
InfiniteScrollSentinel,
|
|
103
114
|
Label,
|
|
104
115
|
Spinner
|
|
105
|
-
} from "./chunk-
|
|
116
|
+
} from "./chunk-YWQRLHTP.js";
|
|
106
117
|
import {
|
|
107
118
|
ActionPalette,
|
|
108
119
|
ActionTile,
|
|
109
|
-
BattleBoard,
|
|
110
120
|
BookChapterView,
|
|
111
121
|
BookCoverPage,
|
|
112
122
|
BookNavBar,
|
|
@@ -115,7 +125,6 @@ import {
|
|
|
115
125
|
BuilderBoard,
|
|
116
126
|
CanvasEffect,
|
|
117
127
|
CardGrid,
|
|
118
|
-
CastleBoard,
|
|
119
128
|
Chart,
|
|
120
129
|
ClassifierBoard,
|
|
121
130
|
CodeView,
|
|
@@ -139,10 +148,7 @@ import {
|
|
|
139
148
|
GameAudioProvider,
|
|
140
149
|
GameAudioToggle,
|
|
141
150
|
GameCanvas3D,
|
|
142
|
-
GameHud,
|
|
143
|
-
GameMenu,
|
|
144
151
|
GameOverScreen,
|
|
145
|
-
Header,
|
|
146
152
|
InventoryPanel,
|
|
147
153
|
IsometricCanvas,
|
|
148
154
|
LayoutPatterns,
|
|
@@ -179,932 +185,57 @@ import {
|
|
|
179
185
|
UncontrolledBattleBoard,
|
|
180
186
|
VariablePanel,
|
|
181
187
|
WizardContainer,
|
|
182
|
-
WorldMapBoard,
|
|
183
188
|
useGameAudio
|
|
184
|
-
} from "./chunk-
|
|
189
|
+
} from "./chunk-C3USTXJ7.js";
|
|
190
|
+
import {
|
|
191
|
+
BattleBoard,
|
|
192
|
+
CastleBoard,
|
|
193
|
+
GameHud,
|
|
194
|
+
GameMenu,
|
|
195
|
+
Header,
|
|
196
|
+
WorldMapBoard
|
|
197
|
+
} from "./chunk-I6UYSB5R.js";
|
|
185
198
|
import {
|
|
186
199
|
Checkbox
|
|
187
|
-
} from "./chunk-
|
|
200
|
+
} from "./chunk-XWPR5FXS.js";
|
|
188
201
|
import {
|
|
189
202
|
CodeBlock,
|
|
190
203
|
ConfirmModal,
|
|
191
204
|
Drawer,
|
|
192
|
-
EmptyState,
|
|
193
205
|
Modal,
|
|
194
|
-
StatBadge,
|
|
195
206
|
Tabs,
|
|
196
207
|
Toast
|
|
197
|
-
} from "./chunk-
|
|
208
|
+
} from "./chunk-DNC6CO6E.js";
|
|
209
|
+
import {
|
|
210
|
+
EmptyState,
|
|
211
|
+
StatBadge
|
|
212
|
+
} from "./chunk-4GLV4XIP.js";
|
|
198
213
|
import {
|
|
199
214
|
Badge,
|
|
215
|
+
Divider,
|
|
216
|
+
Icon,
|
|
217
|
+
Input,
|
|
218
|
+
ProgressBar,
|
|
219
|
+
Select
|
|
220
|
+
} from "./chunk-BUN5QD6C.js";
|
|
221
|
+
import {
|
|
200
222
|
Box,
|
|
201
223
|
Button,
|
|
202
224
|
Card,
|
|
203
|
-
Divider,
|
|
204
225
|
ErrorState,
|
|
205
226
|
HStack,
|
|
206
227
|
HealthBar,
|
|
207
|
-
Icon,
|
|
208
|
-
Input,
|
|
209
228
|
LoadingState,
|
|
210
|
-
ProgressBar,
|
|
211
229
|
ScoreDisplay,
|
|
212
|
-
Select,
|
|
213
230
|
Typography,
|
|
214
231
|
VStack
|
|
215
|
-
} from "./chunk-
|
|
232
|
+
} from "./chunk-A6AK75GP.js";
|
|
216
233
|
import {
|
|
217
234
|
useEventBus
|
|
218
235
|
} from "./chunk-YTVYMEKU.js";
|
|
219
236
|
import {
|
|
220
237
|
useTheme
|
|
221
238
|
} from "./chunk-CUAWHLEK.js";
|
|
222
|
-
|
|
223
|
-
// src/components/templates/DashboardLayout.tsx
|
|
224
|
-
import React from "react";
|
|
225
|
-
import {
|
|
226
|
-
View,
|
|
227
|
-
StyleSheet,
|
|
228
|
-
ScrollView,
|
|
229
|
-
SafeAreaView
|
|
230
|
-
} from "react-native";
|
|
231
|
-
var DashboardLayout = ({
|
|
232
|
-
children,
|
|
233
|
-
headerTitle,
|
|
234
|
-
headerActions = [],
|
|
235
|
-
showHeader = true,
|
|
236
|
-
style,
|
|
237
|
-
contentStyle,
|
|
238
|
-
scrollable = true,
|
|
239
|
-
isLoading,
|
|
240
|
-
error
|
|
241
|
-
}) => {
|
|
242
|
-
const theme = useTheme();
|
|
243
|
-
const Content = scrollable ? ScrollView : View;
|
|
244
|
-
if (isLoading) {
|
|
245
|
-
return /* @__PURE__ */ React.createElement(SafeAreaView, { style: [styles.container, { backgroundColor: theme.colors.background }, style] }, showHeader && /* @__PURE__ */ React.createElement(Header, { title: headerTitle, rightActions: headerActions }), /* @__PURE__ */ React.createElement(LoadingState, { message: "Loading..." }));
|
|
246
|
-
}
|
|
247
|
-
if (error) {
|
|
248
|
-
return /* @__PURE__ */ React.createElement(SafeAreaView, { style: [styles.container, { backgroundColor: theme.colors.background }, style] }, showHeader && /* @__PURE__ */ React.createElement(Header, { title: headerTitle, rightActions: headerActions }), /* @__PURE__ */ React.createElement(ErrorState, { message: error.message }));
|
|
249
|
-
}
|
|
250
|
-
return /* @__PURE__ */ React.createElement(SafeAreaView, { style: [styles.container, { backgroundColor: theme.colors.background }, style] }, showHeader && /* @__PURE__ */ React.createElement(Header, { title: headerTitle, rightActions: headerActions }), /* @__PURE__ */ React.createElement(
|
|
251
|
-
Content,
|
|
252
|
-
{
|
|
253
|
-
style: [styles.content, contentStyle],
|
|
254
|
-
contentContainerStyle: scrollable ? styles.scrollContent : void 0
|
|
255
|
-
},
|
|
256
|
-
children
|
|
257
|
-
));
|
|
258
|
-
};
|
|
259
|
-
var styles = StyleSheet.create({
|
|
260
|
-
container: {
|
|
261
|
-
flex: 1
|
|
262
|
-
},
|
|
263
|
-
content: {
|
|
264
|
-
flex: 1
|
|
265
|
-
},
|
|
266
|
-
scrollContent: {
|
|
267
|
-
flexGrow: 1,
|
|
268
|
-
padding: 16
|
|
269
|
-
}
|
|
270
|
-
});
|
|
271
|
-
DashboardLayout.displayName = "DashboardLayout";
|
|
272
|
-
|
|
273
|
-
// src/components/templates/AuthLayout.tsx
|
|
274
|
-
import React2 from "react";
|
|
275
|
-
import {
|
|
276
|
-
View as View2,
|
|
277
|
-
StyleSheet as StyleSheet2,
|
|
278
|
-
ScrollView as ScrollView2,
|
|
279
|
-
SafeAreaView as SafeAreaView2,
|
|
280
|
-
KeyboardAvoidingView,
|
|
281
|
-
Platform,
|
|
282
|
-
TouchableOpacity
|
|
283
|
-
} from "react-native";
|
|
284
|
-
var AuthLayout = ({
|
|
285
|
-
children,
|
|
286
|
-
title,
|
|
287
|
-
subtitle,
|
|
288
|
-
footer,
|
|
289
|
-
showBackButton = false,
|
|
290
|
-
onBack,
|
|
291
|
-
backAction,
|
|
292
|
-
style,
|
|
293
|
-
isLoading,
|
|
294
|
-
error
|
|
295
|
-
}) => {
|
|
296
|
-
const theme = useTheme();
|
|
297
|
-
const eventBus = useEventBus();
|
|
298
|
-
const handleBack = () => {
|
|
299
|
-
if (backAction) {
|
|
300
|
-
eventBus.emit(`UI:${backAction}`);
|
|
301
|
-
}
|
|
302
|
-
onBack?.();
|
|
303
|
-
};
|
|
304
|
-
if (isLoading) {
|
|
305
|
-
return /* @__PURE__ */ React2.createElement(SafeAreaView2, { style: [styles2.container, { backgroundColor: theme.colors.background }, style] }, /* @__PURE__ */ React2.createElement(LoadingState, { message: "Loading..." }));
|
|
306
|
-
}
|
|
307
|
-
if (error) {
|
|
308
|
-
return /* @__PURE__ */ React2.createElement(SafeAreaView2, { style: [styles2.container, { backgroundColor: theme.colors.background }, style] }, /* @__PURE__ */ React2.createElement(ErrorState, { message: error.message }));
|
|
309
|
-
}
|
|
310
|
-
return /* @__PURE__ */ React2.createElement(SafeAreaView2, { style: [styles2.container, { backgroundColor: theme.colors.background }, style] }, /* @__PURE__ */ React2.createElement(
|
|
311
|
-
KeyboardAvoidingView,
|
|
312
|
-
{
|
|
313
|
-
behavior: Platform.OS === "ios" ? "padding" : "height",
|
|
314
|
-
style: styles2.keyboardView
|
|
315
|
-
},
|
|
316
|
-
/* @__PURE__ */ React2.createElement(
|
|
317
|
-
ScrollView2,
|
|
318
|
-
{
|
|
319
|
-
contentContainerStyle: styles2.scrollContent,
|
|
320
|
-
keyboardShouldPersistTaps: "handled"
|
|
321
|
-
},
|
|
322
|
-
/* @__PURE__ */ React2.createElement(VStack, { spacing: 24, style: styles2.content }, showBackButton && /* @__PURE__ */ React2.createElement(TouchableOpacity, { onPress: handleBack, style: styles2.backButton }, /* @__PURE__ */ React2.createElement(Typography, { variant: "h4", style: { color: theme.colors.primary } }, "\u2190 Back")), /* @__PURE__ */ React2.createElement(VStack, { spacing: 8, align: "center" }, /* @__PURE__ */ React2.createElement(Typography, { variant: "h1", style: { color: theme.colors.foreground, textAlign: "center" } }, title), subtitle && /* @__PURE__ */ React2.createElement(Typography, { variant: "body", style: { color: theme.colors["muted-foreground"], textAlign: "center" } }, subtitle)), /* @__PURE__ */ React2.createElement(View2, { style: styles2.form }, children), footer && /* @__PURE__ */ React2.createElement(View2, { style: styles2.footer }, footer))
|
|
323
|
-
)
|
|
324
|
-
));
|
|
325
|
-
};
|
|
326
|
-
var styles2 = StyleSheet2.create({
|
|
327
|
-
container: {
|
|
328
|
-
flex: 1
|
|
329
|
-
},
|
|
330
|
-
keyboardView: {
|
|
331
|
-
flex: 1
|
|
332
|
-
},
|
|
333
|
-
scrollContent: {
|
|
334
|
-
flexGrow: 1,
|
|
335
|
-
justifyContent: "center"
|
|
336
|
-
},
|
|
337
|
-
content: {
|
|
338
|
-
padding: 24,
|
|
339
|
-
paddingTop: 40,
|
|
340
|
-
paddingBottom: 40
|
|
341
|
-
},
|
|
342
|
-
backButton: {
|
|
343
|
-
alignSelf: "flex-start"
|
|
344
|
-
},
|
|
345
|
-
form: {
|
|
346
|
-
width: "100%"
|
|
347
|
-
},
|
|
348
|
-
footer: {
|
|
349
|
-
marginTop: 16
|
|
350
|
-
}
|
|
351
|
-
});
|
|
352
|
-
AuthLayout.displayName = "AuthLayout";
|
|
353
|
-
|
|
354
|
-
// src/components/templates/GameShell.tsx
|
|
355
|
-
import React3 from "react";
|
|
356
|
-
import {
|
|
357
|
-
View as View3,
|
|
358
|
-
StyleSheet as StyleSheet3,
|
|
359
|
-
SafeAreaView as SafeAreaView3,
|
|
360
|
-
StatusBar
|
|
361
|
-
} from "react-native";
|
|
362
|
-
var GameShell = ({
|
|
363
|
-
children,
|
|
364
|
-
hud,
|
|
365
|
-
showHud = true,
|
|
366
|
-
header,
|
|
367
|
-
footer,
|
|
368
|
-
style,
|
|
369
|
-
gameAreaStyle,
|
|
370
|
-
backgroundColor,
|
|
371
|
-
isLoading,
|
|
372
|
-
error
|
|
373
|
-
}) => {
|
|
374
|
-
const theme = useTheme();
|
|
375
|
-
const eventBus = useEventBus();
|
|
376
|
-
if (isLoading) {
|
|
377
|
-
return /* @__PURE__ */ React3.createElement(
|
|
378
|
-
SafeAreaView3,
|
|
379
|
-
{
|
|
380
|
-
style: [
|
|
381
|
-
styles3.container,
|
|
382
|
-
{ backgroundColor: backgroundColor || theme.colors.background },
|
|
383
|
-
style
|
|
384
|
-
]
|
|
385
|
-
},
|
|
386
|
-
/* @__PURE__ */ React3.createElement(StatusBar, { barStyle: "light-content" }),
|
|
387
|
-
header,
|
|
388
|
-
/* @__PURE__ */ React3.createElement(View3, { style: styles3.loadingContainer }, /* @__PURE__ */ React3.createElement(LoadingState, { message: "Loading game..." }))
|
|
389
|
-
);
|
|
390
|
-
}
|
|
391
|
-
if (error) {
|
|
392
|
-
return /* @__PURE__ */ React3.createElement(
|
|
393
|
-
SafeAreaView3,
|
|
394
|
-
{
|
|
395
|
-
style: [
|
|
396
|
-
styles3.container,
|
|
397
|
-
{ backgroundColor: backgroundColor || theme.colors.background },
|
|
398
|
-
style
|
|
399
|
-
]
|
|
400
|
-
},
|
|
401
|
-
/* @__PURE__ */ React3.createElement(StatusBar, { barStyle: "light-content" }),
|
|
402
|
-
header,
|
|
403
|
-
/* @__PURE__ */ React3.createElement(View3, { style: styles3.loadingContainer }, /* @__PURE__ */ React3.createElement(
|
|
404
|
-
ErrorState,
|
|
405
|
-
{
|
|
406
|
-
message: error.message,
|
|
407
|
-
onRetry: () => eventBus.emit("UI:GAME_RETRY", {})
|
|
408
|
-
}
|
|
409
|
-
))
|
|
410
|
-
);
|
|
411
|
-
}
|
|
412
|
-
return /* @__PURE__ */ React3.createElement(
|
|
413
|
-
SafeAreaView3,
|
|
414
|
-
{
|
|
415
|
-
style: [
|
|
416
|
-
styles3.container,
|
|
417
|
-
{ backgroundColor: backgroundColor || theme.colors.background },
|
|
418
|
-
style
|
|
419
|
-
]
|
|
420
|
-
},
|
|
421
|
-
/* @__PURE__ */ React3.createElement(StatusBar, { barStyle: "light-content" }),
|
|
422
|
-
header && /* @__PURE__ */ React3.createElement(View3, { style: styles3.header }, header),
|
|
423
|
-
/* @__PURE__ */ React3.createElement(View3, { style: [styles3.gameArea, gameAreaStyle] }, children, showHud && hud && /* @__PURE__ */ React3.createElement(View3, { style: styles3.hudContainer }, /* @__PURE__ */ React3.createElement(
|
|
424
|
-
GameHud,
|
|
425
|
-
{
|
|
426
|
-
...hud,
|
|
427
|
-
style: { ...styles3.hud, ...hud.style }
|
|
428
|
-
}
|
|
429
|
-
))),
|
|
430
|
-
footer && /* @__PURE__ */ React3.createElement(View3, { style: styles3.footer }, footer)
|
|
431
|
-
);
|
|
432
|
-
};
|
|
433
|
-
var styles3 = StyleSheet3.create({
|
|
434
|
-
container: {
|
|
435
|
-
flex: 1
|
|
436
|
-
},
|
|
437
|
-
header: {
|
|
438
|
-
zIndex: 20
|
|
439
|
-
},
|
|
440
|
-
gameArea: {
|
|
441
|
-
flex: 1,
|
|
442
|
-
position: "relative"
|
|
443
|
-
},
|
|
444
|
-
hudContainer: {
|
|
445
|
-
position: "absolute",
|
|
446
|
-
top: 0,
|
|
447
|
-
left: 0,
|
|
448
|
-
right: 0,
|
|
449
|
-
bottom: 0,
|
|
450
|
-
pointerEvents: "box-none"
|
|
451
|
-
},
|
|
452
|
-
hud: {
|
|
453
|
-
pointerEvents: "auto"
|
|
454
|
-
},
|
|
455
|
-
footer: {
|
|
456
|
-
zIndex: 20
|
|
457
|
-
},
|
|
458
|
-
loadingContainer: {
|
|
459
|
-
flex: 1,
|
|
460
|
-
justifyContent: "center",
|
|
461
|
-
alignItems: "center"
|
|
462
|
-
}
|
|
463
|
-
});
|
|
464
|
-
GameShell.displayName = "GameShell";
|
|
465
|
-
|
|
466
|
-
// src/components/templates/BattleTemplate.tsx
|
|
467
|
-
import React4 from "react";
|
|
468
|
-
import {
|
|
469
|
-
View as View4,
|
|
470
|
-
StyleSheet as StyleSheet4
|
|
471
|
-
} from "react-native";
|
|
472
|
-
var BattleTemplate = ({
|
|
473
|
-
battleBoard,
|
|
474
|
-
hudStats,
|
|
475
|
-
menuOptions,
|
|
476
|
-
title,
|
|
477
|
-
showMenu = false,
|
|
478
|
-
style,
|
|
479
|
-
isLoading,
|
|
480
|
-
error,
|
|
481
|
-
entity,
|
|
482
|
-
onBattleAction,
|
|
483
|
-
onBattleEnd
|
|
484
|
-
}) => {
|
|
485
|
-
const theme = useTheme();
|
|
486
|
-
const eventBus = useEventBus();
|
|
487
|
-
const handleBattleAction = (action) => {
|
|
488
|
-
eventBus.emit("UI:BATTLE_ACTION", { action, entity });
|
|
489
|
-
onBattleAction?.(action);
|
|
490
|
-
};
|
|
491
|
-
const handleBattleEnd = (result) => {
|
|
492
|
-
eventBus.emit("UI:BATTLE_END", { result, entity });
|
|
493
|
-
onBattleEnd?.(result);
|
|
494
|
-
};
|
|
495
|
-
const handleMenuSelect = (option) => {
|
|
496
|
-
if (option.event) {
|
|
497
|
-
eventBus.emit(`UI:${option.event}`, { option, entity });
|
|
498
|
-
}
|
|
499
|
-
if (option.navigatesTo) {
|
|
500
|
-
eventBus.emit("UI:navigate", { to: option.navigatesTo });
|
|
501
|
-
}
|
|
502
|
-
};
|
|
503
|
-
if (isLoading) {
|
|
504
|
-
return /* @__PURE__ */ React4.createElement(View4, { style: [styles4.container, { backgroundColor: theme.colors.background }, style] }, /* @__PURE__ */ React4.createElement(LoadingState, { message: "Loading battle..." }));
|
|
505
|
-
}
|
|
506
|
-
if (error) {
|
|
507
|
-
return /* @__PURE__ */ React4.createElement(View4, { style: [styles4.container, { backgroundColor: theme.colors.background }, style] }, /* @__PURE__ */ React4.createElement(
|
|
508
|
-
ErrorState,
|
|
509
|
-
{
|
|
510
|
-
message: error.message,
|
|
511
|
-
onRetry: () => eventBus.emit("UI:BATTLE_RETRY", { entity })
|
|
512
|
-
}
|
|
513
|
-
));
|
|
514
|
-
}
|
|
515
|
-
const hasUnits = battleBoard.units && battleBoard.units.length > 0;
|
|
516
|
-
return /* @__PURE__ */ React4.createElement(View4, { style: [styles4.container, { backgroundColor: "#0f172a" }, style] }, title && /* @__PURE__ */ React4.createElement(View4, { style: styles4.header }, /* @__PURE__ */ React4.createElement(Typography, { variant: "h2", style: { color: "#fff" } }, title)), hudStats && hudStats.length > 0 && /* @__PURE__ */ React4.createElement(View4, { style: styles4.hudContainer }, /* @__PURE__ */ React4.createElement(GameHud, { stats: hudStats, position: "corners", transparent: true })), /* @__PURE__ */ React4.createElement(View4, { style: styles4.boardContainer }, hasUnits ? /* @__PURE__ */ React4.createElement(
|
|
517
|
-
BattleBoard,
|
|
518
|
-
{
|
|
519
|
-
...battleBoard,
|
|
520
|
-
onAction: handleBattleAction
|
|
521
|
-
}
|
|
522
|
-
) : /* @__PURE__ */ React4.createElement(
|
|
523
|
-
EmptyState,
|
|
524
|
-
{
|
|
525
|
-
message: "No battle units available",
|
|
526
|
-
icon: /* @__PURE__ */ React4.createElement(Typography, { variant: "h1" }, "\u2694\uFE0F")
|
|
527
|
-
}
|
|
528
|
-
)), /* @__PURE__ */ React4.createElement(View4, { style: styles4.controls }, /* @__PURE__ */ React4.createElement(HStack, { spacing: 8, justify: "center" }, /* @__PURE__ */ React4.createElement(
|
|
529
|
-
Button,
|
|
530
|
-
{
|
|
531
|
-
variant: "primary",
|
|
532
|
-
action: "BATTLE_ATTACK",
|
|
533
|
-
actionPayload: { entity },
|
|
534
|
-
onPress: () => handleBattleAction("attack")
|
|
535
|
-
},
|
|
536
|
-
"Attack"
|
|
537
|
-
), /* @__PURE__ */ React4.createElement(
|
|
538
|
-
Button,
|
|
539
|
-
{
|
|
540
|
-
variant: "secondary",
|
|
541
|
-
action: "BATTLE_DEFEND",
|
|
542
|
-
actionPayload: { entity },
|
|
543
|
-
onPress: () => handleBattleAction("defend")
|
|
544
|
-
},
|
|
545
|
-
"Defend"
|
|
546
|
-
), /* @__PURE__ */ React4.createElement(
|
|
547
|
-
Button,
|
|
548
|
-
{
|
|
549
|
-
variant: "ghost",
|
|
550
|
-
action: "BATTLE_FLEE",
|
|
551
|
-
actionPayload: { entity },
|
|
552
|
-
onPress: () => handleBattleEnd("flee")
|
|
553
|
-
},
|
|
554
|
-
"Flee"
|
|
555
|
-
))), showMenu && menuOptions && /* @__PURE__ */ React4.createElement(View4, { style: styles4.menuOverlay }, /* @__PURE__ */ React4.createElement(
|
|
556
|
-
GameMenu,
|
|
557
|
-
{
|
|
558
|
-
title: "Battle Menu",
|
|
559
|
-
options: menuOptions,
|
|
560
|
-
onSelect: handleMenuSelect
|
|
561
|
-
}
|
|
562
|
-
)));
|
|
563
|
-
};
|
|
564
|
-
var styles4 = StyleSheet4.create({
|
|
565
|
-
container: {
|
|
566
|
-
flex: 1
|
|
567
|
-
},
|
|
568
|
-
header: {
|
|
569
|
-
padding: 16,
|
|
570
|
-
alignItems: "center"
|
|
571
|
-
},
|
|
572
|
-
hudContainer: {
|
|
573
|
-
position: "absolute",
|
|
574
|
-
top: 60,
|
|
575
|
-
left: 0,
|
|
576
|
-
right: 0,
|
|
577
|
-
height: 80,
|
|
578
|
-
zIndex: 10,
|
|
579
|
-
pointerEvents: "none"
|
|
580
|
-
},
|
|
581
|
-
boardContainer: {
|
|
582
|
-
flex: 1,
|
|
583
|
-
padding: 16,
|
|
584
|
-
justifyContent: "center"
|
|
585
|
-
},
|
|
586
|
-
controls: {
|
|
587
|
-
padding: 16,
|
|
588
|
-
backgroundColor: "rgba(0,0,0,0.5)"
|
|
589
|
-
},
|
|
590
|
-
menuOverlay: {
|
|
591
|
-
position: "absolute",
|
|
592
|
-
top: 0,
|
|
593
|
-
left: 0,
|
|
594
|
-
right: 0,
|
|
595
|
-
bottom: 0,
|
|
596
|
-
zIndex: 100
|
|
597
|
-
}
|
|
598
|
-
});
|
|
599
|
-
BattleTemplate.displayName = "BattleTemplate";
|
|
600
|
-
|
|
601
|
-
// src/components/templates/CastleTemplate.tsx
|
|
602
|
-
import React5 from "react";
|
|
603
|
-
import {
|
|
604
|
-
View as View5,
|
|
605
|
-
StyleSheet as StyleSheet5,
|
|
606
|
-
ScrollView as ScrollView3
|
|
607
|
-
} from "react-native";
|
|
608
|
-
var CastleTemplate = ({
|
|
609
|
-
castleBoard,
|
|
610
|
-
hudStats,
|
|
611
|
-
actions,
|
|
612
|
-
title,
|
|
613
|
-
style,
|
|
614
|
-
isLoading,
|
|
615
|
-
error,
|
|
616
|
-
entity,
|
|
617
|
-
onEnterRoom,
|
|
618
|
-
onCastleAction
|
|
619
|
-
}) => {
|
|
620
|
-
const theme = useTheme();
|
|
621
|
-
const eventBus = useEventBus();
|
|
622
|
-
const handleEnterRoom = (roomId) => {
|
|
623
|
-
eventBus.emit("UI:CASTLE_ENTER_ROOM", { roomId, entity });
|
|
624
|
-
onEnterRoom?.(roomId);
|
|
625
|
-
};
|
|
626
|
-
const handleAction = (action) => {
|
|
627
|
-
eventBus.emit("UI:CASTLE_ACTION", { action, entity });
|
|
628
|
-
onCastleAction?.(action);
|
|
629
|
-
};
|
|
630
|
-
if (isLoading) {
|
|
631
|
-
return /* @__PURE__ */ React5.createElement(View5, { style: [styles5.container, { backgroundColor: theme.colors.background }, style] }, /* @__PURE__ */ React5.createElement(LoadingState, { message: "Loading castle..." }));
|
|
632
|
-
}
|
|
633
|
-
if (error) {
|
|
634
|
-
return /* @__PURE__ */ React5.createElement(View5, { style: [styles5.container, { backgroundColor: theme.colors.background }, style] }, /* @__PURE__ */ React5.createElement(
|
|
635
|
-
ErrorState,
|
|
636
|
-
{
|
|
637
|
-
message: error.message,
|
|
638
|
-
onRetry: () => eventBus.emit("UI:CASTLE_RETRY", { entity })
|
|
639
|
-
}
|
|
640
|
-
));
|
|
641
|
-
}
|
|
642
|
-
const hasRooms = castleBoard.rooms && castleBoard.rooms.length > 0;
|
|
643
|
-
return /* @__PURE__ */ React5.createElement(View5, { style: [styles5.container, { backgroundColor: "#1e293b" }, style] }, hudStats && hudStats.length > 0 && /* @__PURE__ */ React5.createElement(View5, { style: styles5.hudContainer }, /* @__PURE__ */ React5.createElement(GameHud, { stats: hudStats, position: "top", transparent: true })), /* @__PURE__ */ React5.createElement(
|
|
644
|
-
ScrollView3,
|
|
645
|
-
{
|
|
646
|
-
style: styles5.scrollView,
|
|
647
|
-
contentContainerStyle: styles5.scrollContent,
|
|
648
|
-
showsVerticalScrollIndicator: false
|
|
649
|
-
},
|
|
650
|
-
title && /* @__PURE__ */ React5.createElement(View5, { style: styles5.header }, /* @__PURE__ */ React5.createElement(Typography, { variant: "h2", style: { color: "#fbbf24" } }, title)),
|
|
651
|
-
/* @__PURE__ */ React5.createElement(View5, { style: styles5.boardContainer }, hasRooms ? /* @__PURE__ */ React5.createElement(
|
|
652
|
-
CastleBoard,
|
|
653
|
-
{
|
|
654
|
-
...castleBoard,
|
|
655
|
-
onSelectRoom: handleEnterRoom
|
|
656
|
-
}
|
|
657
|
-
) : /* @__PURE__ */ React5.createElement(
|
|
658
|
-
EmptyState,
|
|
659
|
-
{
|
|
660
|
-
message: "No castle rooms available",
|
|
661
|
-
icon: /* @__PURE__ */ React5.createElement(Typography, { variant: "h1" }, "\u{1F3F0}")
|
|
662
|
-
}
|
|
663
|
-
)),
|
|
664
|
-
actions && actions.length > 0 && /* @__PURE__ */ React5.createElement(View5, { style: styles5.actionsContainer }, /* @__PURE__ */ React5.createElement(HStack, { spacing: 8, justify: "center", style: styles5.actions }, actions.map((action, index) => /* @__PURE__ */ React5.createElement(
|
|
665
|
-
Button,
|
|
666
|
-
{
|
|
667
|
-
key: index,
|
|
668
|
-
variant: action.variant || "default",
|
|
669
|
-
action: action.event,
|
|
670
|
-
actionPayload: { entity },
|
|
671
|
-
onPress: () => handleAction(action.event)
|
|
672
|
-
},
|
|
673
|
-
action.label
|
|
674
|
-
))))
|
|
675
|
-
));
|
|
676
|
-
};
|
|
677
|
-
var styles5 = StyleSheet5.create({
|
|
678
|
-
container: {
|
|
679
|
-
flex: 1
|
|
680
|
-
},
|
|
681
|
-
hudContainer: {
|
|
682
|
-
position: "absolute",
|
|
683
|
-
top: 0,
|
|
684
|
-
left: 0,
|
|
685
|
-
right: 0,
|
|
686
|
-
zIndex: 10
|
|
687
|
-
},
|
|
688
|
-
scrollView: {
|
|
689
|
-
flex: 1
|
|
690
|
-
},
|
|
691
|
-
scrollContent: {
|
|
692
|
-
paddingTop: 80,
|
|
693
|
-
paddingBottom: 24
|
|
694
|
-
},
|
|
695
|
-
header: {
|
|
696
|
-
padding: 16,
|
|
697
|
-
alignItems: "center"
|
|
698
|
-
},
|
|
699
|
-
boardContainer: {
|
|
700
|
-
padding: 16
|
|
701
|
-
},
|
|
702
|
-
actionsContainer: {
|
|
703
|
-
padding: 16
|
|
704
|
-
},
|
|
705
|
-
actions: {
|
|
706
|
-
flexWrap: "wrap"
|
|
707
|
-
}
|
|
708
|
-
});
|
|
709
|
-
CastleTemplate.displayName = "CastleTemplate";
|
|
710
|
-
|
|
711
|
-
// src/components/templates/WorldMapTemplate.tsx
|
|
712
|
-
import React6 from "react";
|
|
713
|
-
import {
|
|
714
|
-
View as View6,
|
|
715
|
-
StyleSheet as StyleSheet6
|
|
716
|
-
} from "react-native";
|
|
717
|
-
var WorldMapTemplate = ({
|
|
718
|
-
worldMapBoard,
|
|
719
|
-
hudStats,
|
|
720
|
-
navigationActions,
|
|
721
|
-
title,
|
|
722
|
-
act,
|
|
723
|
-
style,
|
|
724
|
-
isLoading,
|
|
725
|
-
error,
|
|
726
|
-
entity,
|
|
727
|
-
onSelectNode,
|
|
728
|
-
onMapAction
|
|
729
|
-
}) => {
|
|
730
|
-
const theme = useTheme();
|
|
731
|
-
const eventBus = useEventBus();
|
|
732
|
-
const handleSelectNode = (nodeId) => {
|
|
733
|
-
eventBus.emit("UI:MAP_SELECT_NODE", { nodeId, entity });
|
|
734
|
-
onSelectNode?.(nodeId);
|
|
735
|
-
};
|
|
736
|
-
const handleMapAction = (action, targetNodeId) => {
|
|
737
|
-
eventBus.emit("UI:MAP_ACTION", { action, targetNodeId, entity });
|
|
738
|
-
onMapAction?.(action, targetNodeId);
|
|
739
|
-
};
|
|
740
|
-
if (isLoading) {
|
|
741
|
-
return /* @__PURE__ */ React6.createElement(View6, { style: [styles6.container, { backgroundColor: theme.colors.background }, style] }, /* @__PURE__ */ React6.createElement(LoadingState, { message: "Loading world map..." }));
|
|
742
|
-
}
|
|
743
|
-
if (error) {
|
|
744
|
-
return /* @__PURE__ */ React6.createElement(View6, { style: [styles6.container, { backgroundColor: theme.colors.background }, style] }, /* @__PURE__ */ React6.createElement(
|
|
745
|
-
ErrorState,
|
|
746
|
-
{
|
|
747
|
-
message: error.message,
|
|
748
|
-
onRetry: () => eventBus.emit("UI:MAP_RETRY", { entity })
|
|
749
|
-
}
|
|
750
|
-
));
|
|
751
|
-
}
|
|
752
|
-
const hasNodes = worldMapBoard.nodes && worldMapBoard.nodes.length > 0;
|
|
753
|
-
return /* @__PURE__ */ React6.createElement(View6, { style: [styles6.container, { backgroundColor: "#0f172a" }, style] }, hudStats && hudStats.length > 0 && /* @__PURE__ */ React6.createElement(View6, { style: styles6.hudContainer }, /* @__PURE__ */ React6.createElement(GameHud, { stats: hudStats, position: "corners", transparent: true })), (title || act) && /* @__PURE__ */ React6.createElement(View6, { style: styles6.header }, title && /* @__PURE__ */ React6.createElement(Typography, { variant: "h2", style: { color: "#fff" } }, title), act && /* @__PURE__ */ React6.createElement(Typography, { variant: "caption", style: { color: "#9ca3af" } }, act)), /* @__PURE__ */ React6.createElement(View6, { style: styles6.mapContainer }, hasNodes ? /* @__PURE__ */ React6.createElement(
|
|
754
|
-
WorldMapBoard,
|
|
755
|
-
{
|
|
756
|
-
...worldMapBoard,
|
|
757
|
-
title: worldMapBoard.title || title,
|
|
758
|
-
act: worldMapBoard.act || act,
|
|
759
|
-
onSelectNode: handleSelectNode
|
|
760
|
-
}
|
|
761
|
-
) : /* @__PURE__ */ React6.createElement(
|
|
762
|
-
EmptyState,
|
|
763
|
-
{
|
|
764
|
-
message: "No map locations available",
|
|
765
|
-
icon: /* @__PURE__ */ React6.createElement(Typography, { variant: "h1" }, "\u{1F5FA}\uFE0F")
|
|
766
|
-
}
|
|
767
|
-
)), navigationActions && navigationActions.length > 0 && /* @__PURE__ */ React6.createElement(View6, { style: styles6.actionsContainer }, /* @__PURE__ */ React6.createElement(HStack, { spacing: 8, justify: "center", style: styles6.actions }, navigationActions.map((action, index) => /* @__PURE__ */ React6.createElement(
|
|
768
|
-
Button,
|
|
769
|
-
{
|
|
770
|
-
key: index,
|
|
771
|
-
variant: action.variant || "default",
|
|
772
|
-
action: action.event,
|
|
773
|
-
actionPayload: { entity, targetNodeId: action.targetNodeId },
|
|
774
|
-
onPress: () => handleMapAction(action.event, action.targetNodeId)
|
|
775
|
-
},
|
|
776
|
-
action.label
|
|
777
|
-
)))));
|
|
778
|
-
};
|
|
779
|
-
var styles6 = StyleSheet6.create({
|
|
780
|
-
container: {
|
|
781
|
-
flex: 1
|
|
782
|
-
},
|
|
783
|
-
hudContainer: {
|
|
784
|
-
position: "absolute",
|
|
785
|
-
top: 0,
|
|
786
|
-
left: 0,
|
|
787
|
-
right: 0,
|
|
788
|
-
bottom: 0,
|
|
789
|
-
pointerEvents: "none",
|
|
790
|
-
zIndex: 10
|
|
791
|
-
},
|
|
792
|
-
header: {
|
|
793
|
-
padding: 16,
|
|
794
|
-
alignItems: "center",
|
|
795
|
-
zIndex: 20
|
|
796
|
-
},
|
|
797
|
-
mapContainer: {
|
|
798
|
-
flex: 1,
|
|
799
|
-
padding: 16
|
|
800
|
-
},
|
|
801
|
-
actionsContainer: {
|
|
802
|
-
padding: 16,
|
|
803
|
-
backgroundColor: "rgba(0,0,0,0.5)",
|
|
804
|
-
zIndex: 20
|
|
805
|
-
},
|
|
806
|
-
actions: {
|
|
807
|
-
flexWrap: "wrap"
|
|
808
|
-
}
|
|
809
|
-
});
|
|
810
|
-
WorldMapTemplate.displayName = "WorldMapTemplate";
|
|
811
|
-
|
|
812
|
-
// src/components/templates/CounterTemplate.tsx
|
|
813
|
-
import React7, { useState, useCallback } from "react";
|
|
814
|
-
import {
|
|
815
|
-
View as View7,
|
|
816
|
-
StyleSheet as StyleSheet7
|
|
817
|
-
} from "react-native";
|
|
818
|
-
var CounterTemplate = ({
|
|
819
|
-
initialCount = 0,
|
|
820
|
-
step = 1,
|
|
821
|
-
min = Number.MIN_SAFE_INTEGER,
|
|
822
|
-
max = Number.MAX_SAFE_INTEGER,
|
|
823
|
-
title = "Counter",
|
|
824
|
-
showReset = true,
|
|
825
|
-
style,
|
|
826
|
-
cardStyle,
|
|
827
|
-
isLoading,
|
|
828
|
-
error,
|
|
829
|
-
entity,
|
|
830
|
-
onCountChange,
|
|
831
|
-
onReset
|
|
832
|
-
}) => {
|
|
833
|
-
const theme = useTheme();
|
|
834
|
-
const eventBus = useEventBus();
|
|
835
|
-
const [count, setCount] = useState(initialCount);
|
|
836
|
-
const handleIncrement = useCallback(() => {
|
|
837
|
-
setCount((prev) => {
|
|
838
|
-
const newCount = Math.min(prev + step, max);
|
|
839
|
-
eventBus.emit("UI:COUNTER_INCREMENT", { count: newCount, entity });
|
|
840
|
-
onCountChange?.(newCount);
|
|
841
|
-
return newCount;
|
|
842
|
-
});
|
|
843
|
-
}, [step, max, entity, onCountChange, eventBus]);
|
|
844
|
-
const handleDecrement = useCallback(() => {
|
|
845
|
-
setCount((prev) => {
|
|
846
|
-
const newCount = Math.max(prev - step, min);
|
|
847
|
-
eventBus.emit("UI:COUNTER_DECREMENT", { count: newCount, entity });
|
|
848
|
-
onCountChange?.(newCount);
|
|
849
|
-
return newCount;
|
|
850
|
-
});
|
|
851
|
-
}, [step, min, entity, onCountChange, eventBus]);
|
|
852
|
-
const handleReset = useCallback(() => {
|
|
853
|
-
setCount(initialCount);
|
|
854
|
-
eventBus.emit("UI:COUNTER_RESET", { count: initialCount, entity });
|
|
855
|
-
onReset?.();
|
|
856
|
-
onCountChange?.(initialCount);
|
|
857
|
-
}, [initialCount, entity, onReset, onCountChange, eventBus]);
|
|
858
|
-
if (isLoading) {
|
|
859
|
-
return /* @__PURE__ */ React7.createElement(View7, { style: [styles7.container, style] }, /* @__PURE__ */ React7.createElement(LoadingState, { message: "Loading counter..." }));
|
|
860
|
-
}
|
|
861
|
-
if (error) {
|
|
862
|
-
return /* @__PURE__ */ React7.createElement(View7, { style: [styles7.container, style] }, /* @__PURE__ */ React7.createElement(
|
|
863
|
-
ErrorState,
|
|
864
|
-
{
|
|
865
|
-
message: error.message,
|
|
866
|
-
onRetry: () => eventBus.emit("UI:COUNTER_RETRY", { entity })
|
|
867
|
-
}
|
|
868
|
-
));
|
|
869
|
-
}
|
|
870
|
-
const isAtMin = count <= min;
|
|
871
|
-
const isAtMax = count >= max;
|
|
872
|
-
return /* @__PURE__ */ React7.createElement(View7, { style: [styles7.container, { backgroundColor: theme.colors.background }, style] }, /* @__PURE__ */ React7.createElement(Card, { style: [styles7.card, cardStyle || {}] }, /* @__PURE__ */ React7.createElement(VStack, { spacing: 24, align: "center" }, /* @__PURE__ */ React7.createElement(Typography, { variant: "h3" }, title), /* @__PURE__ */ React7.createElement(View7, { style: styles7.countDisplay }, /* @__PURE__ */ React7.createElement(
|
|
873
|
-
Typography,
|
|
874
|
-
{
|
|
875
|
-
variant: "h1",
|
|
876
|
-
style: [
|
|
877
|
-
styles7.countText,
|
|
878
|
-
{ color: count > 0 ? theme.colors.success : count < 0 ? theme.colors.error : theme.colors.foreground }
|
|
879
|
-
]
|
|
880
|
-
},
|
|
881
|
-
count
|
|
882
|
-
)), /* @__PURE__ */ React7.createElement(HStack, { spacing: 16, align: "center" }, /* @__PURE__ */ React7.createElement(
|
|
883
|
-
Button,
|
|
884
|
-
{
|
|
885
|
-
variant: "secondary",
|
|
886
|
-
action: "COUNTER_DECREMENT",
|
|
887
|
-
actionPayload: { entity, step },
|
|
888
|
-
onPress: handleDecrement,
|
|
889
|
-
disabled: isAtMin
|
|
890
|
-
},
|
|
891
|
-
"-",
|
|
892
|
-
step
|
|
893
|
-
), showReset && /* @__PURE__ */ React7.createElement(
|
|
894
|
-
Button,
|
|
895
|
-
{
|
|
896
|
-
variant: "ghost",
|
|
897
|
-
action: "COUNTER_RESET",
|
|
898
|
-
actionPayload: { entity },
|
|
899
|
-
onPress: handleReset,
|
|
900
|
-
disabled: count === initialCount
|
|
901
|
-
},
|
|
902
|
-
"Reset"
|
|
903
|
-
), /* @__PURE__ */ React7.createElement(
|
|
904
|
-
Button,
|
|
905
|
-
{
|
|
906
|
-
variant: "primary",
|
|
907
|
-
action: "COUNTER_INCREMENT",
|
|
908
|
-
actionPayload: { entity, step },
|
|
909
|
-
onPress: handleIncrement,
|
|
910
|
-
disabled: isAtMax
|
|
911
|
-
},
|
|
912
|
-
"+",
|
|
913
|
-
step
|
|
914
|
-
)), /* @__PURE__ */ React7.createElement(Typography, { variant: "caption", color: theme.colors["muted-foreground"] }, "Min: ", min, " | Max: ", max, " | Step: ", step))));
|
|
915
|
-
};
|
|
916
|
-
var styles7 = StyleSheet7.create({
|
|
917
|
-
container: {
|
|
918
|
-
flex: 1,
|
|
919
|
-
justifyContent: "center",
|
|
920
|
-
alignItems: "center",
|
|
921
|
-
padding: 16
|
|
922
|
-
},
|
|
923
|
-
card: {
|
|
924
|
-
padding: 32,
|
|
925
|
-
minWidth: 280,
|
|
926
|
-
maxWidth: 400,
|
|
927
|
-
width: "100%"
|
|
928
|
-
},
|
|
929
|
-
countDisplay: {
|
|
930
|
-
paddingVertical: 24,
|
|
931
|
-
paddingHorizontal: 48,
|
|
932
|
-
backgroundColor: "rgba(0,0,0,0.05)",
|
|
933
|
-
borderRadius: 12
|
|
934
|
-
},
|
|
935
|
-
countText: {
|
|
936
|
-
fontSize: 64,
|
|
937
|
-
fontWeight: "700"
|
|
938
|
-
}
|
|
939
|
-
});
|
|
940
|
-
CounterTemplate.displayName = "CounterTemplate";
|
|
941
|
-
|
|
942
|
-
// src/components/templates/GameTemplate.tsx
|
|
943
|
-
import React8 from "react";
|
|
944
|
-
import {
|
|
945
|
-
View as View8,
|
|
946
|
-
StyleSheet as StyleSheet8,
|
|
947
|
-
SafeAreaView as SafeAreaView4
|
|
948
|
-
} from "react-native";
|
|
949
|
-
var GameTemplate = ({
|
|
950
|
-
children,
|
|
951
|
-
title,
|
|
952
|
-
subtitle,
|
|
953
|
-
hud,
|
|
954
|
-
showHud = true,
|
|
955
|
-
menu,
|
|
956
|
-
showMenu = false,
|
|
957
|
-
actions,
|
|
958
|
-
style,
|
|
959
|
-
contentStyle,
|
|
960
|
-
backgroundColor,
|
|
961
|
-
isLoading,
|
|
962
|
-
error,
|
|
963
|
-
entity,
|
|
964
|
-
emptyMessage = "No game content available",
|
|
965
|
-
onAction
|
|
966
|
-
}) => {
|
|
967
|
-
const theme = useTheme();
|
|
968
|
-
const eventBus = useEventBus();
|
|
969
|
-
const handleAction = (action, payload) => {
|
|
970
|
-
eventBus.emit(`UI:${action}`, { ...payload, entity });
|
|
971
|
-
onAction?.(action, payload);
|
|
972
|
-
};
|
|
973
|
-
if (isLoading) {
|
|
974
|
-
return /* @__PURE__ */ React8.createElement(
|
|
975
|
-
SafeAreaView4,
|
|
976
|
-
{
|
|
977
|
-
style: [
|
|
978
|
-
styles8.container,
|
|
979
|
-
{ backgroundColor: backgroundColor || theme.colors.background },
|
|
980
|
-
style
|
|
981
|
-
]
|
|
982
|
-
},
|
|
983
|
-
/* @__PURE__ */ React8.createElement(LoadingState, { message: "Loading game..." })
|
|
984
|
-
);
|
|
985
|
-
}
|
|
986
|
-
if (error) {
|
|
987
|
-
return /* @__PURE__ */ React8.createElement(
|
|
988
|
-
SafeAreaView4,
|
|
989
|
-
{
|
|
990
|
-
style: [
|
|
991
|
-
styles8.container,
|
|
992
|
-
{ backgroundColor: backgroundColor || theme.colors.background },
|
|
993
|
-
style
|
|
994
|
-
]
|
|
995
|
-
},
|
|
996
|
-
/* @__PURE__ */ React8.createElement(
|
|
997
|
-
ErrorState,
|
|
998
|
-
{
|
|
999
|
-
message: error.message,
|
|
1000
|
-
onRetry: () => handleAction("GAME_RETRY")
|
|
1001
|
-
}
|
|
1002
|
-
)
|
|
1003
|
-
);
|
|
1004
|
-
}
|
|
1005
|
-
const shouldShowMenu = showMenu || !children && menu;
|
|
1006
|
-
if (shouldShowMenu && menu) {
|
|
1007
|
-
return /* @__PURE__ */ React8.createElement(
|
|
1008
|
-
SafeAreaView4,
|
|
1009
|
-
{
|
|
1010
|
-
style: [
|
|
1011
|
-
styles8.container,
|
|
1012
|
-
{ backgroundColor: backgroundColor || "#0f172a" },
|
|
1013
|
-
style
|
|
1014
|
-
]
|
|
1015
|
-
},
|
|
1016
|
-
/* @__PURE__ */ React8.createElement(
|
|
1017
|
-
GameMenu,
|
|
1018
|
-
{
|
|
1019
|
-
title: menu.title || title || "Game Menu",
|
|
1020
|
-
subtitle: menu.subtitle || subtitle,
|
|
1021
|
-
options: menu.options || menu.menuItems || [],
|
|
1022
|
-
onSelect: (option) => {
|
|
1023
|
-
if (option.event) {
|
|
1024
|
-
handleAction(option.event, { option });
|
|
1025
|
-
}
|
|
1026
|
-
if (option.navigatesTo) {
|
|
1027
|
-
handleAction("navigate", { to: option.navigatesTo });
|
|
1028
|
-
}
|
|
1029
|
-
menu.onSelect?.(option);
|
|
1030
|
-
},
|
|
1031
|
-
background: menu.background,
|
|
1032
|
-
logo: menu.logo,
|
|
1033
|
-
style: menu.style
|
|
1034
|
-
}
|
|
1035
|
-
)
|
|
1036
|
-
);
|
|
1037
|
-
}
|
|
1038
|
-
const hasContent = React8.Children.count(children) > 0;
|
|
1039
|
-
return /* @__PURE__ */ React8.createElement(
|
|
1040
|
-
SafeAreaView4,
|
|
1041
|
-
{
|
|
1042
|
-
style: [
|
|
1043
|
-
styles8.container,
|
|
1044
|
-
{ backgroundColor: backgroundColor || theme.colors.background },
|
|
1045
|
-
style
|
|
1046
|
-
]
|
|
1047
|
-
},
|
|
1048
|
-
showHud && hud && /* @__PURE__ */ React8.createElement(View8, { style: styles8.hudOverlay }, /* @__PURE__ */ React8.createElement(GameHud, { ...hud })),
|
|
1049
|
-
(title || subtitle) && /* @__PURE__ */ React8.createElement(View8, { style: styles8.header }, title && /* @__PURE__ */ React8.createElement(Typography, { variant: "h2", style: styles8.title }, title), subtitle && /* @__PURE__ */ React8.createElement(Typography, { variant: "body", color: theme.colors["muted-foreground"] }, subtitle)),
|
|
1050
|
-
/* @__PURE__ */ React8.createElement(View8, { style: [styles8.content, contentStyle] }, hasContent ? children : /* @__PURE__ */ React8.createElement(
|
|
1051
|
-
EmptyState,
|
|
1052
|
-
{
|
|
1053
|
-
message: emptyMessage,
|
|
1054
|
-
icon: /* @__PURE__ */ React8.createElement(Typography, { variant: "h1" }, "\u{1F3AE}")
|
|
1055
|
-
}
|
|
1056
|
-
)),
|
|
1057
|
-
actions && actions.length > 0 && /* @__PURE__ */ React8.createElement(View8, { style: styles8.actionBar }, /* @__PURE__ */ React8.createElement(Card, { variant: "elevated", style: styles8.actionCard }, /* @__PURE__ */ React8.createElement(HStack, { spacing: 8, justify: "center", style: styles8.actions }, actions.map((action, index) => /* @__PURE__ */ React8.createElement(
|
|
1058
|
-
Button,
|
|
1059
|
-
{
|
|
1060
|
-
key: index,
|
|
1061
|
-
variant: action.variant || "default",
|
|
1062
|
-
action: action.event,
|
|
1063
|
-
actionPayload: { ...action.payload, entity },
|
|
1064
|
-
onPress: () => handleAction(action.event, action.payload),
|
|
1065
|
-
disabled: action.disabled
|
|
1066
|
-
},
|
|
1067
|
-
action.label
|
|
1068
|
-
)))))
|
|
1069
|
-
);
|
|
1070
|
-
};
|
|
1071
|
-
var styles8 = StyleSheet8.create({
|
|
1072
|
-
container: {
|
|
1073
|
-
flex: 1
|
|
1074
|
-
},
|
|
1075
|
-
hudOverlay: {
|
|
1076
|
-
position: "absolute",
|
|
1077
|
-
top: 0,
|
|
1078
|
-
left: 0,
|
|
1079
|
-
right: 0,
|
|
1080
|
-
bottom: 0,
|
|
1081
|
-
pointerEvents: "box-none",
|
|
1082
|
-
zIndex: 10
|
|
1083
|
-
},
|
|
1084
|
-
header: {
|
|
1085
|
-
padding: 16,
|
|
1086
|
-
alignItems: "center",
|
|
1087
|
-
zIndex: 20
|
|
1088
|
-
},
|
|
1089
|
-
title: {
|
|
1090
|
-
fontWeight: "700"
|
|
1091
|
-
},
|
|
1092
|
-
content: {
|
|
1093
|
-
flex: 1,
|
|
1094
|
-
padding: 16
|
|
1095
|
-
},
|
|
1096
|
-
actionBar: {
|
|
1097
|
-
padding: 16,
|
|
1098
|
-
zIndex: 20
|
|
1099
|
-
},
|
|
1100
|
-
actionCard: {
|
|
1101
|
-
padding: 12
|
|
1102
|
-
},
|
|
1103
|
-
actions: {
|
|
1104
|
-
flexWrap: "wrap"
|
|
1105
|
-
}
|
|
1106
|
-
});
|
|
1107
|
-
GameTemplate.displayName = "GameTemplate";
|
|
1108
239
|
export {
|
|
1109
240
|
Accordion,
|
|
1110
241
|
ActionButtons,
|
|
@@ -1213,6 +344,7 @@ export {
|
|
|
1213
344
|
NegotiatorBoard,
|
|
1214
345
|
NumberStepper,
|
|
1215
346
|
ObjectRulePanel,
|
|
347
|
+
OrbitalGameCanvas,
|
|
1216
348
|
Overlay,
|
|
1217
349
|
PageHeader,
|
|
1218
350
|
Pagination,
|
|
@@ -1247,6 +379,7 @@ export {
|
|
|
1247
379
|
Split,
|
|
1248
380
|
SplitPane,
|
|
1249
381
|
Sprite,
|
|
382
|
+
VStack as Stack,
|
|
1250
383
|
StarRating,
|
|
1251
384
|
StatBadge,
|
|
1252
385
|
StatCard,
|