@react-text-game/ui 0.1.2 → 0.2.1

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 (90) hide show
  1. package/README.md +126 -3
  2. package/dist/components/GameProvider/GameProvider.d.ts +3 -5
  3. package/dist/components/GameProvider/GameProvider.d.ts.map +1 -1
  4. package/dist/components/GameProvider/GameProvider.js +5 -5
  5. package/dist/components/GameProvider/GameProvider.js.map +1 -1
  6. package/dist/components/MainMenu.js +1 -1
  7. package/dist/components/MainMenu.js.map +1 -1
  8. package/dist/components/SaveButton.d.ts +1 -1
  9. package/dist/components/SaveButton.d.ts.map +1 -1
  10. package/dist/components/SaveButton.js +1 -1
  11. package/dist/components/SaveButton.js.map +1 -1
  12. package/dist/components/SaveLoadModal/SaveLoadModal.d.ts +1 -1
  13. package/dist/components/SaveLoadModal/SaveLoadModal.d.ts.map +1 -1
  14. package/dist/components/StoryComponent/StoryComponent.d.ts.map +1 -1
  15. package/dist/components/StoryComponent/StoryComponent.js +3 -2
  16. package/dist/components/StoryComponent/StoryComponent.js.map +1 -1
  17. package/dist/components/StoryComponent/components/Actions.d.ts +1 -2
  18. package/dist/components/StoryComponent/components/Actions.d.ts.map +1 -1
  19. package/dist/components/StoryComponent/components/Conversation.d.ts +1 -2
  20. package/dist/components/StoryComponent/components/Conversation.d.ts.map +1 -1
  21. package/dist/components/StoryComponent/components/Heading.d.ts +6 -0
  22. package/dist/components/StoryComponent/components/Heading.d.ts.map +1 -0
  23. package/dist/components/StoryComponent/components/{Header.js → Heading.js} +2 -2
  24. package/dist/components/StoryComponent/components/Heading.js.map +1 -0
  25. package/dist/components/StoryComponent/components/Image.d.ts +3 -2
  26. package/dist/components/StoryComponent/components/Image.d.ts.map +1 -1
  27. package/dist/components/StoryComponent/components/Image.js.map +1 -1
  28. package/dist/components/StoryComponent/components/Text.d.ts +1 -2
  29. package/dist/components/StoryComponent/components/Text.d.ts.map +1 -1
  30. package/dist/components/StoryComponent/components/Video.d.ts +1 -2
  31. package/dist/components/StoryComponent/components/Video.d.ts.map +1 -1
  32. package/dist/components/StoryComponent/components/index.d.ts +1 -1
  33. package/dist/components/StoryComponent/components/index.d.ts.map +1 -1
  34. package/dist/components/StoryComponent/components/index.js +1 -1
  35. package/dist/components/StoryComponent/components/index.js.map +1 -1
  36. package/dist/context/ComponentsContext/ComponentsContext.d.ts +3 -0
  37. package/dist/context/ComponentsContext/ComponentsContext.d.ts.map +1 -0
  38. package/dist/context/ComponentsContext/ComponentsContext.js +3 -0
  39. package/dist/context/ComponentsContext/ComponentsContext.js.map +1 -0
  40. package/dist/context/ComponentsContext/ComponentsProvider.d.ts +8 -0
  41. package/dist/context/ComponentsContext/ComponentsProvider.d.ts.map +1 -0
  42. package/dist/context/ComponentsContext/ComponentsProvider.js +21 -0
  43. package/dist/context/ComponentsContext/ComponentsProvider.js.map +1 -0
  44. package/dist/context/ComponentsContext/index.d.ts +3 -0
  45. package/dist/context/ComponentsContext/index.d.ts.map +1 -0
  46. package/dist/context/ComponentsContext/index.js +3 -0
  47. package/dist/context/ComponentsContext/index.js.map +1 -0
  48. package/dist/context/ComponentsContext/types.d.ts +18 -0
  49. package/dist/context/ComponentsContext/types.d.ts.map +1 -0
  50. package/dist/context/ComponentsContext/types.js +2 -0
  51. package/dist/context/ComponentsContext/types.js.map +1 -0
  52. package/dist/context/ComponentsContext/useComponents.d.ts +2 -0
  53. package/dist/context/ComponentsContext/useComponents.d.ts.map +1 -0
  54. package/dist/context/ComponentsContext/useComponents.js +11 -0
  55. package/dist/context/ComponentsContext/useComponents.js.map +1 -0
  56. package/dist/{components/GameProvider → context/SaveLoadMenuContext}/SaveLoadMenuContext.d.ts +1 -1
  57. package/dist/context/SaveLoadMenuContext/SaveLoadMenuContext.d.ts.map +1 -0
  58. package/dist/{components/GameProvider → context/SaveLoadMenuContext}/SaveLoadMenuContext.js +1 -0
  59. package/dist/context/SaveLoadMenuContext/SaveLoadMenuContext.js.map +1 -0
  60. package/dist/context/SaveLoadMenuContext/SaveLoadMenuProvider.d.ts.map +1 -0
  61. package/dist/context/SaveLoadMenuContext/SaveLoadMenuProvider.js.map +1 -0
  62. package/dist/context/SaveLoadMenuContext/index.d.ts +4 -0
  63. package/dist/context/SaveLoadMenuContext/index.d.ts.map +1 -0
  64. package/dist/context/SaveLoadMenuContext/index.js +4 -0
  65. package/dist/context/SaveLoadMenuContext/index.js.map +1 -0
  66. package/dist/context/SaveLoadMenuContext/useSaveLoadMenu.d.ts +2 -0
  67. package/dist/context/SaveLoadMenuContext/useSaveLoadMenu.d.ts.map +1 -0
  68. package/dist/{hooks → context/SaveLoadMenuContext}/useSaveLoadMenu.js +1 -1
  69. package/dist/context/SaveLoadMenuContext/useSaveLoadMenu.js.map +1 -0
  70. package/dist/hooks/index.d.ts +0 -1
  71. package/dist/hooks/index.d.ts.map +1 -1
  72. package/dist/hooks/index.js +0 -1
  73. package/dist/hooks/index.js.map +1 -1
  74. package/dist/index.d.ts +1 -1
  75. package/dist/index.d.ts.map +1 -1
  76. package/dist/index.js +1 -1
  77. package/dist/index.js.map +1 -1
  78. package/package.json +1 -1
  79. package/dist/components/GameProvider/SaveLoadMenuContext.d.ts.map +0 -1
  80. package/dist/components/GameProvider/SaveLoadMenuContext.js.map +0 -1
  81. package/dist/components/GameProvider/SaveLoadMenuProvider.d.ts.map +0 -1
  82. package/dist/components/GameProvider/SaveLoadMenuProvider.js.map +0 -1
  83. package/dist/components/StoryComponent/components/Header.d.ts +0 -7
  84. package/dist/components/StoryComponent/components/Header.d.ts.map +0 -1
  85. package/dist/components/StoryComponent/components/Header.js.map +0 -1
  86. package/dist/hooks/useSaveLoadMenu.d.ts +0 -2
  87. package/dist/hooks/useSaveLoadMenu.d.ts.map +0 -1
  88. package/dist/hooks/useSaveLoadMenu.js.map +0 -1
  89. /package/dist/{components/GameProvider → context/SaveLoadMenuContext}/SaveLoadMenuProvider.d.ts +0 -0
  90. /package/dist/{components/GameProvider → context/SaveLoadMenuContext}/SaveLoadMenuProvider.js +0 -0
package/README.md CHANGED
@@ -2,12 +2,61 @@
2
2
 
3
3
  UI components library for react-text-game built with React 19, TypeScript, and Tailwind CSS v4.
4
4
 
5
+ > Install this package inside your own React project. It depends on `@react-text-game/core` for game state and Tailwind CSS v4 for styling tokens.
6
+
5
7
  ## Installation
6
8
 
9
+ ### 1. Install and configure Tailwind CSS
10
+
11
+ Follow the official Tailwind installation guide for your stack: [tailwindcss.com/docs/installation](https://tailwindcss.com/docs/installation).
12
+
13
+ ### 2. Add react-text-game packages
14
+
7
15
  ```bash
8
- bun install
16
+ # Bun (repo default)
17
+ bun add @react-text-game/core @react-text-game/ui
18
+
19
+ # npm
20
+ npm install @react-text-game/core @react-text-game/ui
21
+
22
+ # yarn
23
+ yarn add @react-text-game/core @react-text-game/ui
24
+ ```
25
+
26
+ ### 3. Import the UI theme tokens
27
+
28
+ Import the shared styles once in your global stylesheet (for example `src/index.css`, `src/main.css`, or whichever file you feed into your bundler):
29
+
30
+ ```css
31
+ @import "@react-text-game/ui/styles";
32
+
33
+ @theme {
34
+ --color-primary-500: oklch(0.65 0.25 265); /* optional override */
35
+ }
9
36
  ```
10
37
 
38
+ ### Minimal implementation
39
+
40
+ Once Tailwind is wired up and packages are installed, the lightest viable setup only needs two pieces:
41
+
42
+ 1. Wrap your React tree with `GameProvider` and pass the core engine options.
43
+ 2. Render `PassageController` somewhere inside the provider.
44
+
45
+ ```tsx
46
+ // src/App.tsx
47
+ import { GameProvider, PassageController } from '@react-text-game/ui';
48
+
49
+ export function App() {
50
+ return (
51
+ <GameProvider options={{ gameName: 'My Text Adventure', isDevMode: true }}>
52
+ <PassageController />
53
+ </GameProvider>
54
+ );
55
+ }
56
+ ```
57
+
58
+ With those two components in place, the UI handles menus, passage rendering, and save/load modals. You can immediately start defining entities and passages through `@react-text-game/core`.
59
+
11
60
  ## Development
12
61
 
13
62
  ```bash
@@ -29,16 +78,19 @@ All components use semantic color names (like `primary`, `secondary`, `success`,
29
78
  ### Available Semantic Colors
30
79
 
31
80
  #### Brand Colors
81
+
32
82
  - `primary-*` (50-950) - Main brand color
33
83
  - `secondary-*` (50-950) - Secondary brand color
34
84
 
35
85
  #### Semantic State Colors
86
+
36
87
  - `success-*` (50-950) - Success states
37
88
  - `warning-*` (50-950) - Warning states
38
89
  - `danger-*` (50-950) - Error/danger states
39
90
  - `info-*` (50-950) - Informational states
40
91
 
41
92
  #### Neutral/UI Colors
93
+
42
94
  - `muted-*` (50-950) - Muted/subtle UI elements
43
95
  - `background` - Main background color
44
96
  - `foreground` - Main text color
@@ -127,20 +179,73 @@ You can override any theme color in your application's CSS file:
127
179
  }
128
180
  ```
129
181
 
130
- 2. **Import components** in your React code:
182
+ 1. **Import components** in your React code:
131
183
 
132
184
  ```tsx
133
185
  import { Button, MainMenu, StoryComponent } from '@react-text-game/ui';
134
186
  ```
135
187
 
188
+ ### Custom Component Overrides
189
+
190
+ You can override any built-in component with your own implementation using the `ComponentsProvider`:
191
+
192
+ ```tsx
193
+ import { GameProvider, ComponentsProvider, type Components } from '@react-text-game/ui';
194
+
195
+ // Create your custom components
196
+ const CustomHeading = ({ text }: { text: string }) => (
197
+ <h1 className="text-4xl font-bold my-custom-class">{text}</h1>
198
+ );
199
+
200
+ const CustomMainMenu = () => (
201
+ <div className="my-custom-menu">
202
+ {/* Your custom menu implementation */}
203
+ </div>
204
+ );
205
+
206
+ // Define which components to override
207
+ const customComponents: Components = {
208
+ MainMenu: CustomMainMenu,
209
+ story: {
210
+ Heading: CustomHeading,
211
+ // Text, Image, Video, Actions, Conversation can also be overridden
212
+ },
213
+ };
214
+
215
+ // Wrap your game with ComponentsProvider
216
+ function App() {
217
+ return (
218
+ <GameProvider>
219
+ <ComponentsProvider components={customComponents}>
220
+ {/* Your game content */}
221
+ </ComponentsProvider>
222
+ </GameProvider>
223
+ );
224
+ }
225
+ ```
226
+
227
+ **Available component overrides:**
228
+
229
+ - `MainMenu` - Main game menu
230
+ - `story.Heading` - Story passage heading
231
+ - `story.Text` - Story text content
232
+ - `story.Image` - Story images
233
+ - `story.Video` - Story videos
234
+ - `story.Actions` - Story action buttons
235
+ - `story.Conversation` - Story conversation dialogs
236
+
237
+ Any components not specified will use the default implementation.
238
+
136
239
  ### Color Format: oklch()
137
240
 
138
241
  This package uses the `oklch()` color format from Tailwind CSS v4, which provides:
242
+
139
243
  - **Perceptually uniform** colors
140
244
  - **Better dark mode** transitions
141
245
  - **Predictable lightness** control
142
246
 
143
247
  Format: `oklch(lightness chroma hue)`
248
+
144
249
  - `lightness`: 0-1 (0 = black, 1 = white)
145
250
  - `chroma`: 0-0.4 (saturation intensity)
146
251
  - `hue`: 0-360 (color angle)
@@ -175,6 +280,7 @@ Components also accept `className` props for additional styling:
175
280
  This package uses **global CSS variables** (like `--color-primary-500`, `--color-background`, etc.) that may conflict with other design systems if you're mixing multiple component libraries.
176
281
 
177
282
  **Example conflict:**
283
+
178
284
  ```css
179
285
  /* Both systems try to define the same variables */
180
286
  @import "@react-text-game/ui/styles"; /* Uses --color-primary-500 */
@@ -217,6 +323,7 @@ function App() {
217
323
  ```
218
324
 
219
325
  Then create scoped overrides:
326
+
220
327
  ```css
221
328
  /* app.css */
222
329
  @import "@react-text-game/ui/styles";
@@ -258,6 +365,7 @@ If you need fine-grained control, manually remap variables:
258
365
  ```
259
366
 
260
367
  Then create wrapper components:
368
+
261
369
  ```tsx
262
370
  // CustomButton.tsx
263
371
  import { Button as RTGButton } from '@react-text-game/ui';
@@ -282,15 +390,30 @@ export const GameButton = (props) => (
282
390
 
283
391
  ## Components
284
392
 
393
+ ### Core Components
394
+
285
395
  - `Button` - Customizable button with multiple variants (solid, faded, bordered, light, flat, ghost, shadow)
286
396
  - `Spinner` - Loading spinner
287
397
  - `GameProvider` - Main game wrapper with dev tools
398
+ - `ComponentsProvider` - Provider for custom component overrides (new in 0.2.0)
288
399
  - `MainMenu` - Game menu with save/load functionality
289
400
  - `StoryComponent` - Story passage renderer
290
401
  - `InteractiveMapComponent` - Interactive map renderer
291
402
  - `SaveLoadModal` - Save/Load game modal
292
403
  - `Tooltip` - Tooltip component
293
- - And more...
404
+
405
+ ### Story Components (Overridable)
406
+
407
+ - `Heading` - Story passage heading (formerly `Header`)
408
+ - `Text` - Story text content
409
+ - `Image` - Story images
410
+ - `Video` - Story videos
411
+ - `Actions` - Story action buttons
412
+ - `Conversation` - Story conversation dialogs
413
+
414
+ ### Hooks & Context
415
+
416
+ - `useSaveLoadMenu` - Hook to control save/load modal (exported from main package)
294
417
 
295
418
  ## License
296
419
 
@@ -1,12 +1,10 @@
1
1
  import { NewOptions } from "@react-text-game/core";
2
- import { PropsWithChildren, ReactNode } from "react";
3
- type Components = Readonly<{
4
- MainMenu?: (() => ReactNode) | undefined;
5
- }>;
2
+ import { PropsWithChildren } from "react";
3
+ import { Components } from "../../context/ComponentsContext";
6
4
  type GameProviderProps = PropsWithChildren<{
7
5
  options: NewOptions;
8
6
  components?: Components;
9
7
  }>;
10
- export declare const GameProvider: ({ children, options, components }: GameProviderProps) => import("react/jsx-runtime").JSX.Element | null;
8
+ export declare const GameProvider: ({ children, options, components, }: GameProviderProps) => import("react/jsx-runtime").JSX.Element | null;
11
9
  export {};
12
10
  //# sourceMappingURL=GameProvider.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"GameProvider.d.ts","sourceRoot":"","sources":["../../../src/components/GameProvider/GameProvider.tsx"],"names":[],"mappings":"AAEA,OAAO,EAEH,UAAU,EAGb,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,iBAAiB,EAAE,SAAS,EAAuB,MAAM,OAAO,CAAC;AAW1E,KAAK,UAAU,GAAG,QAAQ,CAAC;IACvB,QAAQ,CAAC,EAAE,CAAC,MAAM,SAAS,CAAC,GAAG,SAAS,CAAC;CAC5C,CAAC,CAAC;AAEH,KAAK,iBAAiB,GAAG,iBAAiB,CAAC;IACvC,OAAO,EAAE,UAAU,CAAC;IACpB,UAAU,CAAC,EAAE,UAAU,CAAC;CAC3B,CAAC,CAAC;AAOH,eAAO,MAAM,YAAY,GAAI,mCAAmC,iBAAiB,mDAuChF,CAAC"}
1
+ {"version":3,"file":"GameProvider.d.ts","sourceRoot":"","sources":["../../../src/components/GameProvider/GameProvider.tsx"],"names":[],"mappings":"AAEA,OAAO,EAEH,UAAU,EAGb,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,iBAAiB,EAAuB,MAAM,OAAO,CAAC;AAK/D,OAAO,EAAE,UAAU,EAAsB,MAAM,4BAA4B,CAAC;AAS5E,KAAK,iBAAiB,GAAG,iBAAiB,CAAC;IACvC,OAAO,EAAE,UAAU,CAAC;IACpB,UAAU,CAAC,EAAE,UAAU,CAAC;CAC3B,CAAC,CAAC;AAOH,eAAO,MAAM,YAAY,GAAI,oCAI1B,iBAAiB,mDA4CnB,CAAC"}
@@ -1,19 +1,19 @@
1
- 'use client';
1
+ "use client";
2
2
  import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
3
3
  import { Game, newWidget, SYSTEM_PASSAGE_NAMES, } from "@react-text-game/core";
4
4
  import { useEffect, useState } from "react";
5
5
  import { ErrorBoundary } from "../../components/ErrorBoundary";
6
6
  import { MainMenu } from "../../components/MainMenu";
7
7
  import { SaveLoadModal } from "../../components/SaveLoadModal";
8
- import { useSaveLoadMenu } from "../../hooks";
8
+ import { ComponentsProvider } from "../../context/ComponentsContext";
9
+ import { SaveLoadMenuProvider, useSaveLoadMenu, } from "../../context/SaveLoadMenuContext";
9
10
  import { DevModeDrawer } from "../DevModeDrawer";
10
11
  import { AppIconMenu } from "./AppIconMenu";
11
- import { SaveLoadMenuProvider } from "./SaveLoadMenuProvider";
12
12
  const SaveLoadModalWrapper = () => {
13
13
  const { isOpen, mode, close } = useSaveLoadMenu();
14
14
  return _jsx(SaveLoadModal, { isOpen: isOpen, onClose: close, mode: mode });
15
15
  };
16
- export const GameProvider = ({ children, options, components }) => {
16
+ export const GameProvider = ({ children, options, components = {}, }) => {
17
17
  const [internalOptions, setInternalOptions] = useState(options);
18
18
  const [isInitialized, setIsInitialized] = useState(false);
19
19
  useEffect(() => {
@@ -31,6 +31,6 @@ export const GameProvider = ({ children, options, components }) => {
31
31
  if (!isInitialized) {
32
32
  return null;
33
33
  }
34
- return (_jsx(SaveLoadMenuProvider, { children: _jsxs(ErrorBoundary, { children: [children, options.isDevMode && (_jsxs(_Fragment, { children: [_jsx(AppIconMenu, { options: internalOptions, setOptions: setInternalOptions }), _jsx(DevModeDrawer, { options: internalOptions })] })), _jsx(SaveLoadModalWrapper, {})] }) }));
34
+ return (_jsx(ErrorBoundary, { children: _jsx(ComponentsProvider, { components: components, children: _jsxs(SaveLoadMenuProvider, { children: [children, options.isDevMode && (_jsxs(_Fragment, { children: [_jsx(AppIconMenu, { options: internalOptions, setOptions: setInternalOptions }), _jsx(DevModeDrawer, { options: internalOptions })] })), _jsx(SaveLoadModalWrapper, {})] }) }) }));
35
35
  };
36
36
  //# sourceMappingURL=GameProvider.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"GameProvider.js","sourceRoot":"","sources":["../../../src/components/GameProvider/GameProvider.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,EACH,IAAI,EAEJ,SAAS,EACT,oBAAoB,GACvB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAgC,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAE1E,OAAO,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAC1D,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAChD,OAAO,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAC1D,OAAO,EAAE,eAAe,EAAE,MAAM,QAAQ,CAAC;AAEzC,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAW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s as _jsxs } from "react/jsx-runtime";
2
2
  import { Game, SYSTEM_PASSAGE_NAMES } from "@react-text-game/core";
3
3
  import { useLastLoadGame } from "@react-text-game/core/saves";
4
- import { useSaveLoadMenu } from "../hooks";
4
+ import { useSaveLoadMenu } from "../context/SaveLoadMenuContext";
5
5
  import { Button } from "./common";
6
6
  export const MainMenu = () => {
7
7
  const { hasLastSave, loadLastGame } = useLastLoadGame();
@@ -1 +1 @@
1
- {"version":3,"file":"MainMenu.js","sourceRoot":"","sources":["../../src/components/MainMenu.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AACnE,OAAO,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAE9D,OAAO,EAAE,eAAe,EAAE,MAAM,QAAQ,CAAC;AAEzC,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAElC,MAAM,CAAC,MAAM,QAAQ,GAAG,GAAG,EAAE;IACzB,MAAM,EAAE,WAAW,EAAE,YAAY,EAAE,GAAG,eAAe,EAAE,CAAC;IACxD,MAAM,EAAE,YAAY,EAAE,GAAG,eAAe,EAAE,CAAC;IAE3C,MAAM,gBAAgB,GAAG,KAAK,IAAI,EAAE;QAChC,MAAM,MAAM,GAAG,MAAM,YAAY,EAAE,CAAC;QAEpC,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IACxB,CAAC,CAAC;IAEF,OAAO,CACH,eAAK,SAAS,EAAC,8DAA8D,aACzE,eAAK,SAAS,EAAC,gDAAgD,aAC3D,cAAI,SAAS,EAAC,qBAAqB,aAC/B,eAAM,SAAS,EAAC,gCAAgC,YAC3C,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,WAAW,EAAE,GACjC,EACP,gBAAM,SAAS,EAAC,yCAAyC,kBACnD,IAAI,CAAC,OAAO,CAAC,WAAW,IACvB,IACN,EACJ,IAAI,CAAC,OAAO,CAAC,MAAM,IAAI,CACpB,c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AAgC,YAC3C,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,WAAW,EAAE,GACjC,EACP,gBAAM,SAAS,EAAC,yCAAyC,kBACnD,IAAI,CAAC,OAAO,CAAC,WAAW,IACvB,IACN,EACJ,IAAI,CAAC,OAAO,CAAC,MAAM,IAAI,CACpB,cAAI,SAAS,EAAC,uCAAuC,oBAC7C,IAAI,CAAC,OAAO,CAAC,MAAM,IACtB,CACR,IACC,EACN,aAAI,SAAS,EAAC,qCAAqC,0BAAe,EAClE,eAAK,SAAS,EAAC,0BAA0B,aACrC,KAAC,MAAM,IAAC,OAAO,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,YAAY,IAAI,oBAAoB,CAAC,KAAK,CAAC,yBAElF,EACT,KAAC,MAAM,IAAC,QAAQ,EAAE,CAAC,WAAW,EAAE,OAAO,EAAE,gBAAgB,yBAEhD,EACT,KAAC,MAAM,IAAC,OAAO,EAAE,YAAY,0BAEpB,IACP,IACJ,CACT,CAAC;AACN,CAAC,CAAC"}
@@ -1,5 +1,5 @@
1
1
  import { ButtonProps } from "../components/common";
2
- import { SaveLoadMode } from "../components/GameProvider/SaveLoadMenuProvider";
2
+ import { SaveLoadMode } from "../context/SaveLoadMenuContext";
3
3
  type SaveButtonProps = Omit<ButtonProps, "children" | "onClick"> & Readonly<{
4
4
  /**
5
5
  * If true, the button will display only the icon without any text.
@@ -1 +1 @@
1
- {"version":3,"file":"SaveButton.d.ts","sourceRoot":"","sources":["../../src/components/SaveButton.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAU,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACzD,OAAO,EAAE,YAAY,EAAE,MAAM,+CAA+C,CAAC;AAG7E,KAAK,eAAe,GAAG,IAAI,CAAC,WAAW,EAAE,UAAU,GAAG,SAAS,CAAC,GAC5D,QAAQ,CAAC;IACL;;;;OAIG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB;;;;;;OAMG;IACH,IAAI,CAAC,EAAE,IAAI,CAAC,YAAY,EAAE,MAAM,CAAC,CAAC;CACrC,CAAC,CAAC;AAkBP,eAAO,MAAM,UAAU,GAAI,2CAKxB,eAAe,4CAajB,CAAC"}
1
+ {"version":3,"file":"SaveButton.d.ts","sourceRoot":"","sources":["../../src/components/SaveButton.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAU,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACzD,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAG5D,KAAK,eAAe,GAAG,IAAI,CAAC,WAAW,EAAE,UAAU,GAAG,SAAS,CAAC,GAC5D,QAAQ,CAAC;IACL;;;;OAIG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB;;;;;;OAMG;IACH,IAAI,CAAC,EAAE,IAAI,CAAC,YAAY,EAAE,MAAM,CAAC,CAAC;CACrC,CAAC,CAAC;AAkBP,eAAO,MAAM,UAAU,GAAI,2CAKxB,eAAe,4CAajB,CAAC"}
@@ -1,7 +1,7 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { twMerge } from "tailwind-merge";
3
3
  import { Button } from "../components/common";
4
- import { useSaveLoadMenu } from "../hooks";
4
+ import { useSaveLoadMenu } from "../context/SaveLoadMenuContext";
5
5
  const Icon = ({ className }) => (_jsx("svg", { xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 48 48", className: className, children: _jsx("path", { fill: "currentColor", fillRule: "evenodd", d: "M35.28 4.88A3 3 0 0 0 33.16 4H7a3 3 0 0 0-3 3v34a3 3 0 0 0 3 3h34a3 3 0 0 0 3-3V14.89a3 3 0 0 0-.87-2.12l-7.85-7.89ZM7 6h6v9.95c0 1.13.92 2.05 2.05 2.05h17.9c1.13 0 2.05-.92 2.05-2.05V11.2a1 1 0 1 0-2 0v4.75c0 .03-.02.05-.05.05h-17.9a.05.05 0 0 1-.05-.05V6h18.16a1 1 0 0 1 .7.3l7.85 7.88a1 1 0 0 1 .29.7V41a1 1 0 0 1-1 1H7a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1Zm21 24.02a4 4 0 0 0-4-4 1 1 0 0 1 0-2 6 6 0 1 1-6 6 1 1 0 0 1 2 0 4 4 0 1 0 8 0Z", clipRule: "evenodd" }) }));
6
6
  export const SaveButton = ({ isIconOnly, className, mode, ...props }) => {
7
7
  const { openSaveMenu, openSaveLoadMenu } = useSaveLoadMenu();
@@ -1 +1 @@
1
- {"version":3,"file":"SaveButton.js","sourceRoot":"","sources":["../../src/components/SaveButton.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AAEzC,OAAO,EAAE,MAAM,EAAe,MAAM,oBAAoB,CAAC;AAEzD,OAAO,EAAE,eAAe,EAAE,MAAM,QAAQ,CAAC;AAoBzC,MAAM,IAAI,GAAG,CAAC,EAAE,SAAS,EAA0B,EAAE,EAAE,CAAC,CACpD,cACI,KAAK,EAAC,4BAA4B,EAClC,IAAI,EAAC,MAAM,EACX,OAAO,EAAC,WAAW,EACnB,SAAS,EAAE,SAAS,YAEpB,eACI,IAAI,EAAC,cAAc,EACnB,QAAQ,EAAC,SAAS,EAClB,CAAC,EAAC,mbAAmb,EACrb,QAAQ,EAAC,SAAS,GACpB,GACA,CACT,CAAC;AAEF,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,EACvB,UAAU,EACV,SAAS,EACT,IAAI,EACJ,GAAG,KAAK,EACM,EAAE,EAAE;IAClB,MAAM,EAAE,YAAY,EAAE,gBAAgB,EAAE,GAAG,eAAe,EAAE,CAAC;IAE7D,OAAO,CACH,MAAC,MAAM,IACH,SAAS,EAAE,OAAO,CAAC,yBAAyB,EAAE,SAAS,CAAC,EACxD,OAAO,EAAE,IAAI,KAAK,MAAM,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,gBAAgB,KACtD,KAAK,aAET,KAAC,IAAI,IAAC,SAAS,EAAC,SAAS,GAAG,EAC3B,CAAC,UAAU,IAAI,uCAAsB,IACjC,CACZ,CAAC;AACN,CAAC,CAAC"}
1
+ {"version":3,"file":"SaveButton.js","sourceRoot":"","sources":["../../src/components/SaveButton.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AAEzC,OAAO,EAAE,MAAM,EAAe,MAAM,oBAAoB,CAAC;AAEzD,OAAO,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAoB/D,MAAM,IAAI,GAAG,CAAC,EAAE,SAAS,EAA0B,EAAE,EAAE,CAAC,CACpD,cACI,KAAK,EAAC,4BAA4B,EAClC,IAAI,EAAC,MAAM,EACX,OAAO,EAAC,WAAW,EACnB,SAAS,EAAE,SAAS,YAEpB,eACI,IAAI,EAAC,cAAc,EACnB,QAAQ,EAAC,SAAS,EAClB,CAAC,EAAC,mbAAmb,EACrb,QAAQ,EAAC,SAAS,GACpB,GACA,CACT,CAAC;AAEF,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,EACvB,UAAU,EACV,SAAS,EACT,IAAI,EACJ,GAAG,KAAK,EACM,EAAE,EAAE;IAClB,MAAM,EAAE,YAAY,EAAE,gBAAgB,EAAE,GAAG,eAAe,EAAE,CAAC;IAE7D,OAAO,CACH,MAAC,MAAM,IACH,SAAS,EAAE,OAAO,CAAC,yBAAyB,EAAE,SAAS,CAAC,EACxD,OAAO,EAAE,IAAI,KAAK,MAAM,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,gBAAgB,KACtD,KAAK,aAET,KAAC,IAAI,IAAC,SAAS,EAAC,SAAS,GAAG,EAC3B,CAAC,UAAU,IAAI,uCAAsB,IACjC,CACZ,CAAC;AACN,CAAC,CAAC"}
@@ -1,4 +1,4 @@
1
- import { SaveLoadMode } from "../../components/GameProvider/SaveLoadMenuProvider";
1
+ import { SaveLoadMode } from "../../context/SaveLoadMenuContext";
2
2
  interface SaveLoadModalProps {
3
3
  isOpen: boolean;
4
4
  onClose: () => void;
@@ -1 +1 @@
1
- {"version":3,"file":"SaveLoadModal.d.ts","sourceRoot":"","sources":["../../../src/components/SaveLoadModal/SaveLoadModal.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,YAAY,EAAE,MAAM,+CAA+C,CAAC;AAE7E,UAAU,kBAAkB;IACxB,MAAM,EAAE,OAAO,CAAC;IAChB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,IAAI,CAAC,EAAE,YAAY,CAAC;CACvB;AAED,eAAO,MAAM,aAAa,GAAI,2BAAwC,kBAAkB,mDA2KvF,CAAC"}
1
+ {"version":3,"file":"SaveLoadModal.d.ts","sourceRoot":"","sources":["../../../src/components/SaveLoadModal/SaveLoadModal.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAE5D,UAAU,kBAAkB;IACxB,MAAM,EAAE,OAAO,CAAC;IAChB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,IAAI,CAAC,EAAE,YAAY,CAAC;CACvB;AAED,eAAO,MAAM,aAAa,GAAI,2BAAwC,kBAAkB,mDA2KvF,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"StoryComponent.d.ts","sourceRoot":"","sources":["../../../src/components/StoryComponent/StoryComponent.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAQ,KAAK,EAAE,MAAM,uBAAuB,CAAC;AAapD,KAAK,mBAAmB,GAAG;IACvB,KAAK,EAAE,KAAK,CAAC;CAChB,CAAC;AAEF,eAAO,MAAM,cAAc,GAAI,WAAW,mBAAmB,4CA2E5D,CAAC"}
1
+ {"version":3,"file":"StoryComponent.d.ts","sourceRoot":"","sources":["../../../src/components/StoryComponent/StoryComponent.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAQ,KAAK,EAAE,MAAM,uBAAuB,CAAC;AAMpD,KAAK,mBAAmB,GAAG;IACvB,KAAK,EAAE,KAAK,CAAC;CAChB,CAAC;AAEF,eAAO,MAAM,cAAc,GAAI,WAAW,mBAAmB,4CA4E5D,CAAC"}
@@ -3,13 +3,14 @@ import { jsx as _jsx } from "react/jsx-runtime";
3
3
  import { Game } from "@react-text-game/core";
4
4
  import { useMemo } from "react";
5
5
  import { twMerge } from "tailwind-merge";
6
- import { Actions, Conversation, Header, Image, Text, Video, } from "./components";
6
+ import { useComponents } from "../../context/ComponentsContext/useComponents";
7
7
  export const StoryComponent = ({ story }) => {
8
8
  const displayable = useMemo(() => story.display(), [story]);
9
+ const { story: { Heading, Conversation, Actions, Video, Image, Text } } = useComponents();
9
10
  return (_jsx("div", { className: twMerge("w-full h-full flex flex-col content-center items-center", displayable.options?.classNames?.base), children: _jsx("div", { className: "px-4 w-full flex flex-col content-center items-center", children: _jsx("div", { className: twMerge("w-full overflow-x-hidden max-w-[1200px] flex flex-col gap-4 my-4", displayable.options?.classNames?.container), children: displayable.components.map((component, index) => {
10
11
  switch (component.type) {
11
12
  case "header":
12
- return (_jsx(Header, { component: component }, index));
13
+ return (_jsx(Heading, { component: component }, index));
13
14
  case "text":
14
15
  return (_jsx(Text, { component: component }, index));
15
16
  case "image":
@@ -1 +1 @@
1
- {"version":3,"file":"StoryComponent.js","sourceRoot":"","sources":["../../../src/components/StoryComponent/StoryComponent.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,EAAE,IAAI,EAAS,MAAM,uBAAuB,CAAC;AACpD,OAAO,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAChC,OAAO,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AAEzC,OAAO,EACH,OAAO,EACP,YAAY,EACZ,MAAM,EACN,KAAK,EACL,IAAI,EACJ,KAAK,GACR,MAAM,cAAc,CAAC;AAMtB,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,EAAE,KAAK,EAAuB,EAAE,EAAE;IAC7D,MAAM,WAAW,GAAG,OAAO,CAAC,GAAG,EAAE,CAAC,KAA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,SAAS,IAA3B,KAAK,CAA0B,CAC7C,CAAC;wBAEN,KAAK,OAAO;4BACR,OAAO,CACH,KAAC,KAAK,IAAa,SAAS,EAAE,SAAS,IAA3B,KAAK,CAA0B,CAC9C,CAAC;wBAEN,KAAK,OAAO;4BACR,OAAO,CACH,KAAC,KAAK,IAAa,SAAS,EAAE,SAAS,IAA3B,KAAK,CAA0B,CAC9C,CAAC;wBAEN,KAAK,SAAS;4BACV,OAAO,CACH,KAAC,OAAO,IAEJ,SAAS,EAAE,SAAS,IADf,KAAK,CAEZ,CACL,CAAC;wBAEN,KAAK,cAAc;4BACf,OAAO,CACH,KAAC,YAAY,IAET,SAAS,EAAE,SAAS,IADf,KAAK,CAEZ,CACL,CAAC;wBAEN,KAAK,cAAc;4BACf,OAAO,CACH,KAAC,cAAc,IAEX,KAAK,EACD,IAAI,CAAC,cAAc,CACf,SAAS,CAAC,OAAO,CACX,IAJT,KAAK,CAMZ,CACL,CAAC;wBAEN;4BACI,OAAO,IAAI,CAAC;oBACpB,CAAC;gBACL,CAAC,CAAC,GACA,GACJ,GACJ,CACT,CAAC;AACN,CAAC,CAAC"}
@@ -1,7 +1,6 @@
1
1
  import { ActionsComponent } from "@react-text-game/core/passages";
2
- type ActionsProps = Readonly<{
2
+ export type ActionsProps = Readonly<{
3
3
  component: ActionsComponent;
4
4
  }>;
5
5
  export declare const Actions: ({ component }: ActionsProps) => import("react/jsx-runtime").JSX.Element;
6
- export {};
7
6
  //# sourceMappingURL=Actions.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Actions.d.ts","sourceRoot":"","sources":["../../../../src/components/StoryComponent/components/Actions.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAMlE,KAAK,YAAY,GAAG,QAAQ,CAAC;IACzB,SAAS,EAAE,gBAAgB,CAAC;CAC/B,CAAC,CAAC;AAEH,eAAO,MAAM,OAAO,GAAI,eAAe,YAAY,4CA8BlD,CAAC"}
1
+ {"version":3,"file":"Actions.d.ts","sourceRoot":"","sources":["../../../../src/components/StoryComponent/components/Actions.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAMlE,MAAM,MAAM,YAAY,GAAG,QAAQ,CAAC;IAChC,SAAS,EAAE,gBAAgB,CAAC;CAC/B,CAAC,CAAC;AAEH,eAAO,MAAM,OAAO,GAAI,eAAe,YAAY,4CA8BlD,CAAC"}
@@ -1,7 +1,6 @@
1
1
  import { ConversationComponent } from "@react-text-game/core/passages";
2
- type ConversationProps = Readonly<{
2
+ export type ConversationProps = Readonly<{
3
3
  component: ConversationComponent;
4
4
  }>;
5
5
  export declare const Conversation: ({ component }: ConversationProps) => import("react/jsx-runtime").JSX.Element;
6
- export {};
7
6
  //# sourceMappingURL=Conversation.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Conversation.d.ts","sourceRoot":"","sources":["../../../../src/components/StoryComponent/components/Conversation.tsx"],"names":[],"mappings":"AAEA,OAAO,EAGH,qBAAqB,EAExB,MAAM,gCAAgC,CAAC;AA0ExC,KAAK,iBAAiB,GAAG,QAAQ,CAAC;IAC9B,SAAS,EAAE,qBAAqB,CAAC;CACpC,CAAC,CAAC;AAEH,eAAO,MAAM,YAAY,GAAI,eAAe,iBAAiB,4CAwC5D,CAAC"}
1
+ {"version":3,"file":"Conversation.d.ts","sourceRoot":"","sources":["../../../../src/components/StoryComponent/components/Conversation.tsx"],"names":[],"mappings":"AAEA,OAAO,EAGH,qBAAqB,EAExB,MAAM,gCAAgC,CAAC;AA0ExC,MAAM,MAAM,iBAAiB,GAAG,QAAQ,CAAC;IACrC,SAAS,EAAE,qBAAqB,CAAC;CACpC,CAAC,CAAC;AAEH,eAAO,MAAM,YAAY,GAAI,eAAe,iBAAiB,4CAwC5D,CAAC"}
@@ -0,0 +1,6 @@
1
+ import { HeaderComponent } from "@react-text-game/core/passages";
2
+ export type HeadingProps = Readonly<{
3
+ component: HeaderComponent;
4
+ }>;
5
+ export declare const Heading: ({ component: { props, content } }: HeadingProps) => import("react/jsx-runtime").JSX.Element;
6
+ //# sourceMappingURL=Heading.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Heading.d.ts","sourceRoot":"","sources":["../../../../src/components/StoryComponent/components/Heading.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAe,MAAM,gCAAgC,CAAC;AAG9E,MAAM,MAAM,YAAY,GAAG,QAAQ,CAAC;IAChC,SAAS,EAAE,eAAe,CAAC;CAC9B,CAAC,CAAC;AAWH,eAAO,MAAM,OAAO,GAAI,mCAAmC,YAAY,4CAItE,CAAC"}
@@ -8,5 +8,5 @@ const headerMapper = {
8
8
  5: "text-lg",
9
9
  6: "text-base text-bold",
10
10
  };
11
- export const Header = ({ component: { props, content } }) => (_jsx("div", { className: twMerge(headerMapper[props?.level ?? 1], props?.className), children: content }));
12
- //# sourceMappingURL=Header.js.map
11
+ export const Heading = ({ component: { props, content } }) => (_jsx("div", { className: twMerge(headerMapper[props?.level ?? 1], props?.className), children: content }));
12
+ //# sourceMappingURL=Heading.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Heading.js","sourceRoot":"","sources":["../../../../src/components/StoryComponent/components/Heading.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AAMzC,MAAM,YAAY,GAAG;IACjB,CAAC,EAAE,UAAU;IACb,CAAC,EAAE,UAAU;IACb,CAAC,EAAE,UAAU;IACb,CAAC,EAAE,SAAS;IACZ,CAAC,EAAE,SAAS;IACZ,CAAC,EAAE,qBAAqB;CACoB,CAAC;AAEjD,MAAM,CAAC,MAAM,OAAO,GAAG,CAAC,EAAE,SAAS,EAAE,EAAE,KAAK,EAAE,OAAO,EAAE,EAAgB,EAAE,EAAE,CAAC,CACxE,cAAK,SAAS,EAAE,OAAO,CAAC,YAAY,CAAC,KAAK,EAAE,KAAK,IAAI,CAAC,CAAC,EAAE,KAAK,EAAE,SAAS,CAAC,YACrE,OAAO,GACN,CACT,CAAC"}
@@ -1,5 +1,6 @@
1
1
  import { ImageComponent } from "@react-text-game/core/passages";
2
- export declare const Image: ({ component }: {
2
+ export type ImageProps = Readonly<{
3
3
  component: ImageComponent;
4
- }) => import("react/jsx-runtime").JSX.Element;
4
+ }>;
5
+ export declare const Image: ({ component }: ImageProps) => import("react/jsx-runtime").JSX.Element;
5
6
  //# sourceMappingURL=Image.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Image.d.ts","sourceRoot":"","sources":["../../../../src/components/StoryComponent/components/Image.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAC;AAIhE,eAAO,MAAM,KAAK,GAAI,eAAe;IAAE,SAAS,EAAE,cAAc,CAAA;CAAE,4CAsGjE,CAAC"}
1
+ {"version":3,"file":"Image.d.ts","sourceRoot":"","sources":["../../../../src/components/StoryComponent/components/Image.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAC;AAIhE,MAAM,MAAM,UAAU,GAAG,QAAQ,CAAC;IAAC,SAAS,EAAE,cAAc,CAAA;CAAC,CAAC,CAAC;AAE/D,eAAO,MAAM,KAAK,GAAI,eAAe,UAAU,4CAsG9C,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"Image.js","sourceRoot":"","sources":["../../../../src/components/StoryComponent/components/Image.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAGb,OAAO,EAAE,SAAS,EAAC,KAAK,EAAE,MAAM,OAAO,CAAC;AACxC,OAAO,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AAEzC,MAAM,CAAC,MAAM,KAAK,GAAG,CAAC,EAAE,SAAS,EAAiC,EAAE,EAAE;IAClE,MAAM,OAAO,GAAG,KAAK,EAAE,CAAC;IACxB,MAAM,iBAAiB,GACnB,OAAO,CAAC,SAAS,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mBAAmB,iBACjB,MAAM,GACpB,EAEF,gBAAO,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,WAAW,YACzC,cACI,GAAG,EAAE,SAAS,CAAC,OAAO,EACtB,GAAG,EAAE,SAAS,CAAC,KAAK,EAAE,GAAG,IAAI,OAAO,EACpC,SAAS,EAAE,OAAO,CACd,2DAA2D,EAC3D,SAAS,CAAC,KAAK,EAAE,SAAS,CAC7B,GACH,GACE,EAGR,eAAK,SAAS,EAAC,yNAAyN,aAEpO,eAAK,SAAS,EAAC,+EAA+E,aAC1F,cACI,GAAG,EAAE,SAAS,CAAC,OAAO,EACtB,GAAG,EAAE,SAAS,CAAC,KAAK,EAAE,GAAG,IAAI,OAAO,EACpC,SAAS,EAAC,sDAAsD,GAClE,EAGF,gBACI,OAAO,EAAE,OAAO,EAChB,SAAS,EAAC,+IAA+I,gBAC9I,aAAa,YAExB,cACI,SAAS,EAAC,oBAAoB,EAC9B,IAAI,EAAC,MAAM,EACX,MAAM,EAAC,cAAc,EACrB,OAAO,EAAC,WAAW,YAEnB,eACI,aAAa,EAAC,OAAO,EACrB,cAAc,EAAC,OAAO,EACtB,WAAW,EAAE,CAAC,EACd,CAAC,EAAC,sBAAsB,GAC1B,GACA,GACF,IACN,EAGN,gBACI,OAAO,EAAE,OAAO,EAChB,SAAS,EAAC,uCAAuC,gBACtC,aAAa,GAC1B,IACA,IACP,CACN,CAAC;AACN,CAAC,CAAC"}
1
+ {"version":3,"file":"Image.js","sourceRoot":"","sources":["../../../../src/components/StoryComponent/components/Image.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAGb,OAAO,EAAE,SAAS,EAAC,KAAK,EAAE,MAAM,OAAO,CAAC;AACxC,OAAO,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AAIzC,MAAM,CAAC,MAAM,KAAK,GAAG,CAAC,EAAE,SAAS,EAAc,EAAE,EAAE;IAC/C,MAAM,OAAO,GAAG,KAAK,EAAE,CAAC;IACxB,MAAM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AAE,EAAE,OAAO,EACX,SAAS,EAAC,mBAAmB,iBACjB,MAAM,GACpB,EAEF,gBAAO,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,WAAW,YACzC,cACI,GAAG,EAAE,SAAS,CAAC,OAAO,EACtB,GAAG,EAAE,SAAS,CAAC,KAAK,EAAE,GAAG,IAAI,OAAO,EACpC,SAAS,EAAE,OAAO,CACd,2DAA2D,EAC3D,SAAS,CAAC,KAAK,EAAE,SAAS,CAC7B,GACH,GACE,EAGR,eAAK,SAAS,EAAC,yNAAyN,aAEpO,eAAK,SAAS,EAAC,+EAA+E,aAC1F,cACI,GAAG,EAAE,SAAS,CAAC,OAAO,EACtB,GAAG,EAAE,SAAS,CAAC,KAAK,EAAE,GAAG,IAAI,OAAO,EACpC,SAAS,EAAC,sDAAsD,GAClE,EAGF,gBACI,OAAO,EAAE,OAAO,EAChB,SAAS,EAAC,+IAA+I,gBAC9I,aAAa,YAExB,cACI,SAAS,EAAC,oBAAoB,EAC9B,IAAI,EAAC,MAAM,EACX,MAAM,EAAC,cAAc,EACrB,OAAO,EAAC,WAAW,YAEnB,eACI,aAAa,EAAC,OAAO,EACrB,cAAc,EAAC,OAAO,EACtB,WAAW,EAAE,CAAC,EACd,CAAC,EAAC,sBAAsB,GAC1B,GACA,GACF,IACN,EAGN,gBACI,OAAO,EAAE,OAAO,EAChB,SAAS,EAAC,uCAAuC,gBACtC,aAAa,GAC1B,IACA,IACP,CACN,CAAC;AACN,CAAC,CAAC"}
@@ -1,7 +1,6 @@
1
1
  import { TextComponent } from "@react-text-game/core/passages";
2
- type TextProps = Readonly<{
2
+ export type TextProps = Readonly<{
3
3
  component: TextComponent;
4
4
  }>;
5
5
  export declare const Text: ({ component: { props, content } }: TextProps) => import("react/jsx-runtime").JSX.Element;
6
- export {};
7
6
  //# sourceMappingURL=Text.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Text.d.ts","sourceRoot":"","sources":["../../../../src/components/StoryComponent/components/Text.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,gCAAgC,CAAC;AAG/D,KAAK,SAAS,GAAG,QAAQ,CAAC;IACtB,SAAS,EAAE,aAAa,CAAC;CAC5B,CAAC,CAAC;AAEH,eAAO,MAAM,IAAI,GAAI,mCAAmC,SAAS,4CAShE,CAAC"}
1
+ {"version":3,"file":"Text.d.ts","sourceRoot":"","sources":["../../../../src/components/StoryComponent/components/Text.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,gCAAgC,CAAC;AAG/D,MAAM,MAAM,SAAS,GAAG,QAAQ,CAAC;IAC7B,SAAS,EAAE,aAAa,CAAC;CAC5B,CAAC,CAAC;AAEH,eAAO,MAAM,IAAI,GAAI,mCAAmC,SAAS,4CAShE,CAAC"}
@@ -1,7 +1,6 @@
1
1
  import { VideoComponent } from "@react-text-game/core/passages";
2
- type VideoProps = Readonly<{
2
+ export type VideoProps = Readonly<{
3
3
  component: VideoComponent;
4
4
  }>;
5
5
  export declare const Video: ({ component: { props, content } }: VideoProps) => import("react/jsx-runtime").JSX.Element;
6
- export {};
7
6
  //# sourceMappingURL=Video.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Video.d.ts","sourceRoot":"","sources":["../../../../src/components/StoryComponent/components/Video.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAC;AAGhE,KAAK,UAAU,GAAG,QAAQ,CAAC;IACvB,SAAS,EAAE,cAAc,CAAC;CAC7B,CAAC,CAAC;AAEH,eAAO,MAAM,KAAK,GAAI,mCAAmC,UAAU,4CAWlE,CAAC"}
1
+ {"version":3,"file":"Video.d.ts","sourceRoot":"","sources":["../../../../src/components/StoryComponent/components/Video.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAC;AAGhE,MAAM,MAAM,UAAU,GAAG,QAAQ,CAAC;IAC9B,SAAS,EAAE,cAAc,CAAC;CAC7B,CAAC,CAAC;AAEH,eAAO,MAAM,KAAK,GAAI,mCAAmC,UAAU,4CAWlE,CAAC"}
@@ -1,6 +1,6 @@
1
1
  export * from "./Actions";
2
2
  export * from "./Conversation";
3
- export * from "./Header";
3
+ export * from "./Heading";
4
4
  export * from "./Image";
5
5
  export * from "./Text";
6
6
  export * from "./Video";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/StoryComponent/components/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC;AAC1B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,QAAQ,CAAC;AACvB,cAAc,SAAS,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/StoryComponent/components/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC;AAC1B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,WAAW,CAAC;AAC1B,cAAc,SAAS,CAAC;AACxB,cAAc,QAAQ,CAAC;AACvB,cAAc,SAAS,CAAC"}
@@ -1,6 +1,6 @@
1
1
  export * from "./Actions";
2
2
  export * from "./Conversation";
3
- export * from "./Header";
3
+ export * from "./Heading";
4
4
  export * from "./Image";
5
5
  export * from "./Text";
6
6
  export * from "./Video";
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/StoryComponent/components/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC;AAC1B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,QAAQ,CAAC;AACvB,cAAc,SAAS,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/StoryComponent/components/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC;AAC1B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,WAAW,CAAC;AAC1B,cAAc,SAAS,CAAC;AACxB,cAAc,QAAQ,CAAC;AACvB,cAAc,SAAS,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { RequiredComponents } from "./types";
2
+ export declare const ComponentsContext: import("react").Context<RequiredComponents | undefined>;
3
+ //# sourceMappingURL=ComponentsContext.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ComponentsContext.d.ts","sourceRoot":"","sources":["../../../src/context/ComponentsContext/ComponentsContext.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAE7C,eAAO,MAAM,iBAAiB,yDAE7B,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { createContext } from "react";
2
+ export const ComponentsContext = createContext(undefined);
3
+ //# sourceMappingURL=ComponentsContext.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ComponentsContext.js","sourceRoot":"","sources":["../../../src/context/ComponentsContext/ComponentsContext.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAItC,MAAM,CAAC,MAAM,iBAAiB,GAAG,aAAa,CAC1C,SAAS,CACZ,CAAC"}
@@ -0,0 +1,8 @@
1
+ import { PropsWithChildren } from "react";
2
+ import { Components } from "./types";
3
+ type ComponentsProviderProps = PropsWithChildren<{
4
+ components: Components;
5
+ }>;
6
+ export declare const ComponentsProvider: ({ children, components, }: ComponentsProviderProps) => import("react/jsx-runtime").JSX.Element;
7
+ export {};
8
+ //# sourceMappingURL=ComponentsProvider.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ComponentsProvider.d.ts","sourceRoot":"","sources":["../../../src/context/ComponentsContext/ComponentsProvider.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,iBAAiB,EAAW,MAAM,OAAO,CAAC;AAanD,OAAO,EAAE,UAAU,EAAsB,MAAM,SAAS,CAAC;AAEzD,KAAK,uBAAuB,GAAG,iBAAiB,CAAC;IAAE,UAAU,EAAE,UAAU,CAAA;CAAE,CAAC,CAAC;AAE7E,eAAO,MAAM,kBAAkB,GAAI,2BAGhC,uBAAuB,4CAqBzB,CAAC"}
@@ -0,0 +1,21 @@
1
+ "use client";
2
+ import { jsx as _jsx } from "react/jsx-runtime";
3
+ import { useMemo } from "react";
4
+ import { MainMenu } from "../../components/MainMenu";
5
+ import { Actions, Conversation, Heading, Image, Text, Video, } from "../../components/StoryComponent/components";
6
+ import { ComponentsContext } from "./ComponentsContext";
7
+ export const ComponentsProvider = ({ children, components, }) => {
8
+ const required = useMemo(() => ({
9
+ MainMenu: components?.MainMenu || MainMenu,
10
+ story: {
11
+ Heading: components?.story?.Heading || Heading,
12
+ Text: components?.story?.Text || Text,
13
+ Image: components?.story?.Image || Image,
14
+ Video: components?.story?.Video || Video,
15
+ Actions: components?.story?.Actions || Actions,
16
+ Conversation: components?.story?.Conversation || Conversation,
17
+ },
18
+ }), [components]);
19
+ return (_jsx(ComponentsContext.Provider, { value: required, children: children }));
20
+ };
21
+ //# sourceMappingURL=ComponentsProvider.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ComponentsProvider.js","sourceRoot":"","sources":["../../../src/context/ComponentsContext/ComponentsProvider.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,EAAqB,OAAO,EAAE,MAAM,OAAO,CAAC;AAEnD,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAChD,OAAO,EACH,OAAO,EACP,YAAY,EACZ,OAAO,EACP,KAAK,EACL,IAAI,EACJ,KAAK,GACR,MAAM,uCAAuC,CAAC;AAE/C,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAKxD,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,EAC/B,QAAQ,EACR,UAAU,GACY,EAAE,EAAE;IAC1B,MAAM,QAAQ,GAAuB,OAAO,CACxC,GAAG,EAAE,CAAC,CAAC;QACH,QAAQ,EAAE,UAAU,EAAE,QAAQ,IAAI,QAAQ;QAC1C,KAAK,EAAE;YACH,OAAO,EAAE,UAAU,EAAE,KAAK,EAAE,OAAO,IAAI,OAAO;YAC9C,IAAI,EAAE,UAAU,EAAE,KAAK,EAAE,IAAI,IAAI,IAAI;YACrC,KAAK,EAAE,UAAU,EAAE,KAAK,EAAE,KAAK,IAAI,KAAK;YACxC,KAAK,EAAE,UAAU,EAAE,KAAK,EAAE,KAAK,IAAI,KAAK;YACxC,OAAO,EAAE,UAAU,EAAE,KAAK,EAAE,OAAO,IAAI,OAAO;YAC9C,YAAY,EAAE,UAAU,EAAE,KAAK,EAAE,YAAY,IAAI,YAAY;SAChE;KACJ,CAAC,EACF,CAAC,UAAU,CAAC,CACf,CAAC;IAEF,OAAO,CACH,KAAC,iBAAiB,CAAC,QAAQ,IAAC,KAAK,EAAE,QAAQ,YACtC,QAAQ,GACgB,CAChC,CAAC;AACN,CAAC,CAAC"}
@@ -0,0 +1,3 @@
1
+ export * from './ComponentsProvider';
2
+ export * from './types';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/context/ComponentsContext/index.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAC;AACrC,cAAc,SAAS,CAAC"}
@@ -0,0 +1,3 @@
1
+ export * from './ComponentsProvider';
2
+ export * from './types';
3
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/context/ComponentsContext/index.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAC;AACrC,cAAc,SAAS,CAAC"}
@@ -0,0 +1,18 @@
1
+ import { ReactNode } from "react";
2
+ import { ActionsProps, ConversationProps, HeadingProps, ImageProps, TextProps, VideoProps } from "../../components/StoryComponent/components";
3
+ export type StoryComponents = Readonly<{
4
+ Heading?: (props: HeadingProps) => ReactNode;
5
+ Text?: (props: TextProps) => ReactNode;
6
+ Image?: (props: ImageProps) => ReactNode;
7
+ Video?: (props: VideoProps) => ReactNode;
8
+ Actions?: (props: ActionsProps) => ReactNode;
9
+ Conversation?: (props: ConversationProps) => ReactNode;
10
+ }>;
11
+ export type Components = Readonly<{
12
+ MainMenu?: () => ReactNode;
13
+ story?: StoryComponents;
14
+ }>;
15
+ export type RequiredComponents = Omit<Required<Components>, "story"> & Readonly<{
16
+ story: Required<StoryComponents>;
17
+ }>;
18
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/context/ComponentsContext/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAElC,OAAO,EACH,YAAY,EACE,iBAAiB,EAC/B,YAAY,EACZ,UAAU,EACV,SAAS,EACT,UAAU,EACb,MAAM,uCAAuC,CAAC;AAE/C,MAAM,MAAM,eAAe,GAAG,QAAQ,CAAC;IACnC,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,YAAY,KAAK,SAAS,CAAC;IAC7C,IAAI,CAAC,EAAE,CAAC,KAAK,EAAE,SAAS,KAAK,SAAS,CAAC;IACvC,KAAK,CAAC,EAAE,CAAC,KAAK,EAAE,UAAU,KAAK,SAAS,CAAC;IACzC,KAAK,CAAC,EAAE,CAAC,KAAK,EAAE,UAAU,KAAK,SAAS,CAAC;IACzC,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,YAAY,KAAK,SAAS,CAAC;IAC7C,YAAY,CAAC,EAAE,CAAC,KAAK,EAAE,iBAAiB,KAAK,SAAS,CAAC;CAC1D,CAAC,CAAC;AAEH,MAAM,MAAM,UAAU,GAAG,QAAQ,CAAC;IAC9B,QAAQ,CAAC,EAAE,MAAM,SAAS,CAAC;IAC3B,KAAK,CAAC,EAAE,eAAe,CAAC;CAC3B,CAAC,CAAC;AAEH,MAAM,MAAM,kBAAkB,GAAG,IAAI,CAAC,QAAQ,CAAC,UAAU,CAAC,EAAE,OAAO,CAAC,GAChE,QAAQ,CAAC;IAAE,KAAK,EAAE,QAAQ,CAAC,eAAe,CAAC,CAAA;CAAE,CAAC,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/context/ComponentsContext/types.ts"],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export declare const useComponents: () => import("./types").RequiredComponents;
2
+ //# sourceMappingURL=useComponents.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useComponents.d.ts","sourceRoot":"","sources":["../../../src/context/ComponentsContext/useComponents.tsx"],"names":[],"mappings":"AAMA,eAAO,MAAM,aAAa,4CAOzB,CAAC"}
@@ -0,0 +1,11 @@
1
+ "use client";
2
+ import { useContext } from "react";
3
+ import { ComponentsContext } from "./ComponentsContext";
4
+ export const useComponents = () => {
5
+ const components = useContext(ComponentsContext);
6
+ if (!components) {
7
+ throw new Error("useComponents must be used within ComponentsProvider");
8
+ }
9
+ return components;
10
+ };
11
+ //# sourceMappingURL=useComponents.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useComponents.js","sourceRoot":"","sources":["../../../src/context/ComponentsContext/useComponents.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;AAEb,OAAO,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAEnC,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAExD,MAAM,CAAC,MAAM,aAAa,GAAG,GAAG,EAAE;IAC9B,MAAM,UAAU,GAAG,UAAU,CAAC,iBAAiB,CAAC,CAAC;IACjD,IAAI,CAAC,UAAU,EAAE,CAAC;QACd,MAAM,IAAI,KAAK,CAAC,sDAAsD,CAAC,CAAC;IAC5E,CAAC;IAED,OAAO,UAAU,CAAC;AACtB,CAAC,CAAC"}
@@ -1,4 +1,4 @@
1
- import { SaveLoadMode } from "../../components/GameProvider/SaveLoadMenuProvider";
1
+ import { SaveLoadMode } from "../../context/SaveLoadMenuContext";
2
2
  export interface SaveLoadMenuContextType {
3
3
  isOpen: boolean;
4
4
  mode: SaveLoadMode;
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SaveLoadMenuContext.d.ts","sourceRoot":"","sources":["../../../src/context/SaveLoadMenuContext/SaveLoadMenuContext.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAE5D,MAAM,WAAW,uBAAuB;IACpC,MAAM,EAAE,OAAO,CAAC;IAChB,IAAI,EAAE,YAAY,CAAC;IACnB,YAAY,EAAE,MAAM,IAAI,CAAC;IACzB,YAAY,EAAE,MAAM,IAAI,CAAC;IACzB,gBAAgB,EAAE,MAAM,IAAI,CAAC;IAC7B,KAAK,EAAE,MAAM,IAAI,CAAC;CACrB;AAED,eAAO,MAAM,mBAAmB,8DAEpB,CAAC"}
@@ -1,3 +1,4 @@
1
+ "use client";
1
2
  import { createContext } from "react";
2
3
  export const SaveLoadMenuContext = createContext(undefined);
3
4
  //# sourceMappingURL=SaveLoadMenuContext.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SaveLoadMenuContext.js","sourceRoot":"","sources":["../../../src/context/SaveLoadMenuContext/SaveLoadMenuContext.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;AAEb,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAatC,MAAM,CAAC,MAAM,mBAAmB,GAAG,aAAa,CAE9C,SAAS,CAAC,CAAC"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SaveLoadMenuProvider.d.ts","sourceRoot":"","sources":["../../../src/context/SaveLoadMenuContext/SaveLoadMenuProvider.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,iBAAiB,EAAY,MAAM,OAAO,CAAC;AAIpD,MAAM,MAAM,YAAY,GAAG,MAAM,GAAG,MAAM,GAAG,UAAU,CAA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 @@
1
+ export * from './SaveLoadMenuContext';
2
+ export * from './SaveLoadMenuProvider';
3
+ export * from './useSaveLoadMenu';
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/context/SaveLoadMenuContext/index.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAC;AACtC,cAAc,wBAAwB,CAAC;AACvC,cAAc,mBAAmB,CAAC"}
@@ -0,0 +1,4 @@
1
+ export * from './SaveLoadMenuContext';
2
+ export * from './SaveLoadMenuProvider';
3
+ export * from './useSaveLoadMenu';
4
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/context/SaveLoadMenuContext/index.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAC;AACtC,cAAc,wBAAwB,CAAC;AACvC,cAAc,mBAAmB,CAAC"}
@@ -0,0 +1,2 @@
1
+ export declare const useSaveLoadMenu: () => import("./SaveLoadMenuContext").SaveLoadMenuContextType;
2
+ //# sourceMappingURL=useSaveLoadMenu.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useSaveLoadMenu.d.ts","sourceRoot":"","sources":["../../../src/context/SaveLoadMenuContext/useSaveLoadMenu.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,eAAe,+DAQ3B,CAAC"}
@@ -1,6 +1,6 @@
1
1
  "use client";
2
2
  import { useContext } from "react";
3
- import { SaveLoadMenuContext } from "../components/GameProvider/SaveLoadMenuContext";
3
+ import { SaveLoadMenuContext } from "./SaveLoadMenuContext";
4
4
  export const useSaveLoadMenu = () => {
5
5
  const context = useContext(SaveLoadMenuContext);
6
6
  if (!context) {
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useSaveLoadMenu.js","sourceRoot":"","sources":["../../../src/context/SaveLoadMenuContext/useSaveLoadMenu.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;AAEb,OAAO,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAEnC,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAE5D,MAAM,CAAC,MAAM,eAAe,GAAG,GAAG,EAAE;IAChC,MAAM,OAAO,GAAG,UAAU,CAAC,mBAAmB,CAAC,CAAC;IAChD,IAAI,CAAC,OAAO,EAAE,CAAC;QACX,MAAM,IAAI,KAAK,CACX,0DAA0D,CAC7D,CAAC;IACN,CAAC;IACD,OAAO,OAAO,CAAC;AACnB,CAAC,CAAC"}
@@ -1,3 +1,2 @@
1
1
  export * from './useLocalStorage';
2
- export * from './useSaveLoadMenu';
3
2
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/hooks/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/hooks/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC"}
@@ -1,3 +1,2 @@
1
1
  export * from './useLocalStorage';
2
- export * from './useSaveLoadMenu';
3
2
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/hooks/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/hooks/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC"}
package/dist/index.d.ts CHANGED
@@ -1,3 +1,3 @@
1
1
  export * from './components';
2
- export { useSaveLoadMenu } from './hooks';
2
+ export { useSaveLoadMenu } from './context/SaveLoadMenuContext';
3
3
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,OAAO,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC"}
package/dist/index.js CHANGED
@@ -1,3 +1,3 @@
1
1
  export * from './components';
2
- export { useSaveLoadMenu } from './hooks';
2
+ export { useSaveLoadMenu } from './context/SaveLoadMenuContext';
3
3
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,OAAO,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@react-text-game/ui",
3
- "version": "0.1.2",
3
+ "version": "0.2.1",
4
4
  "description": "UI components library for react-text-game",
5
5
  "private": false,
6
6
  "type": "module",
@@ -1 +0,0 @@
1
- {"version":3,"file":"SaveLoadMenuContext.d.ts","sourceRoot":"","sources":["../../../src/components/GameProvider/SaveLoadMenuContext.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAAE,MAAM,+CAA+C,CAAC;AAE7E,MAAM,WAAW,uBAAuB;IACpC,MAAM,EAAE,OAAO,CAAC;IAChB,IAAI,EAAE,YAAY,CAAC;IACnB,YAAY,EAAE,MAAM,IAAI,CAAC;IACzB,YAAY,EAAE,MAAM,IAAI,CAAC;IACzB,gBAAgB,EAAE,MAAM,IAAI,CAAC;IAC7B,KAAK,EAAE,MAAM,IAAI,CAAC;CACrB;AAED,eAAO,MAAM,mBAAmB,8DAEpB,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"SaveLoadMenuContext.js","sourceRoot":"","sources":["../../../src/components/GameProvider/SaveLoadMenuContext.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAatC,MAAM,CAAC,MAAM,mBAAmB,GAAG,aAAa,CAE9C,SAAS,CAAC,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"SaveLoadMenuProvider.d.ts","sourceRoot":"","sources":["../../../src/components/GameProvider/SaveLoadMenuProvider.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,iBAAiB,EAAY,MAAM,OAAO,CAAC;AAIpD,MAAM,MAAM,YAAY,GAAG,MAAM,GAAG,MAAM,GAAG,UAAU,CAAC;AAExD,eAAO,MAAM,oBAAoB,GAAI,cAAc,iBAAiB,4CAqCnE,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"SaveLoadMenuProvider.js","sourceRoot":"","sources":["../../../src/components/GameProvider/SaveLoadMenuProvider.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,EAAqB,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEpD,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAI5D,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,EAAE,QAAQ,EAAqB,EAAE,EAAE;IACpE,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IAC5C,MAAM,CAAC,IAAI,EAAE,OAAO,CAAC,GAAG,QAAQ,CAAe,UAAU,CAAC,CAAC;IAE3D,MAAM,YAAY,GAAG,GAAG,EAAE;QACtB,OAAO,CAAC,MAAM,CAAC,CAAC;QAChB,SAAS,CAAC,IAAI,CAAC,CAAC;IACpB,CAAC,CAAC;IAEF,MAAM,YAAY,GAAG,GAAG,EAAE;QACtB,OAAO,CAAC,MAAM,CAAC,CAAC;QAChB,SAAS,CAAC,IAAI,CAAC,CAAC;IACpB,CAAC,CAAC;IAEF,MAAM,gBAAgB,GAAG,GAAG,EAAE;QAC1B,OAAO,CAAC,UAAU,CAAC,CAAC;QACpB,SAAS,CAAC,IAAI,CAAC,CAAC;IACpB,CAAC,CAAC;IAEF,MAAM,KAAK,GAAG,GAAG,EAAE;QACf,SAAS,CAAC,KAAK,CAAC,CAAC;IACrB,CAAC,CAAC;IAEF,OAAO,CACH,KAAC,mBAAmB,CAAC,QAAQ,IACzB,KAAK,EAAE;YACH,MAAM;YACN,IAAI;YACJ,YAAY;YACZ,YAAY;YACZ,gBAAgB;YAChB,KAAK;SACR,YAEA,QAAQ,GACkB,CAClC,CAAC;AACN,CAAC,CAAC"}
@@ -1,7 +0,0 @@
1
- import { HeaderComponent } from "@react-text-game/core/passages";
2
- type Props = Readonly<{
3
- component: HeaderComponent;
4
- }>;
5
- export declare const Header: ({ component: { props, content } }: Props) => import("react/jsx-runtime").JSX.Element;
6
- export {};
7
- //# sourceMappingURL=Header.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Header.d.ts","sourceRoot":"","sources":["../../../../src/components/StoryComponent/components/Header.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAe,MAAM,gCAAgC,CAAC;AAG9E,KAAK,KAAK,GAAG,QAAQ,CAAC;IAClB,SAAS,EAAE,eAAe,CAAC;CAC9B,CAAC,CAAC;AAWH,eAAO,MAAM,MAAM,GAAI,mCAAmC,KAAK,4CAI9D,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"Header.js","sourceRoot":"","sources":["../../../../src/components/StoryComponent/components/Header.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AAMzC,MAAM,YAAY,GAAG;IACjB,CAAC,EAAE,UAAU;IACb,CAAC,EAAE,UAAU;IACb,CAAC,EAAE,UAAU;IACb,CAAC,EAAE,SAAS;IACZ,CAAC,EAAE,SAAS;IACZ,CAAC,EAAE,qBAAqB;CACoB,CAAC;AAEjD,MAAM,CAAC,MAAM,MAAM,GAAG,CAAC,EAAE,SAAS,EAAE,EAAE,KAAK,EAAE,OAAO,EAAE,EAAS,EAAE,EAAE,CAAC,CAChE,cAAK,SAAS,EAAE,OAAO,CAAC,YAAY,CAAC,KAAK,EAAE,KAAK,IAAI,CAAC,CAAC,EAAE,KAAK,EAAE,SAAS,CAAC,YACrE,OAAO,GACN,CACT,CAAC"}
@@ -1,2 +0,0 @@
1
- export declare const useSaveLoadMenu: () => import("../components/GameProvider/SaveLoadMenuContext").SaveLoadMenuContextType;
2
- //# sourceMappingURL=useSaveLoadMenu.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useSaveLoadMenu.d.ts","sourceRoot":"","sources":["../../src/hooks/useSaveLoadMenu.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,eAAe,sFAQ3B,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"useSaveLoadMenu.js","sourceRoot":"","sources":["../../src/hooks/useSaveLoadMenu.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;AAEb,OAAO,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAEnC,OAAO,EAAE,mBAAmB,EAAE,MAAM,8CAA8C,CAAC;AAEnF,MAAM,CAAC,MAAM,eAAe,GAAG,GAAG,EAAE;IAChC,MAAM,OAAO,GAAG,UAAU,CAAC,mBAAmB,CAAC,CAAC;IAChD,IAAI,CAAC,OAAO,EAAE,CAAC;QACX,MAAM,IAAI,KAAK,CACX,0DAA0D,CAC7D,CAAC;IACN,CAAC;IACD,OAAO,OAAO,CAAC;AACnB,CAAC,CAAC"}