@react-text-game/core 0.5.7 → 0.5.8
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/hooks/index.d.ts +1 -0
- package/dist/hooks/index.d.ts.map +1 -1
- package/dist/hooks/index.js +1 -0
- package/dist/hooks/index.js.map +1 -1
- package/dist/hooks/useIsStoryMode.d.ts +11 -0
- package/dist/hooks/useIsStoryMode.d.ts.map +1 -0
- package/dist/hooks/useIsStoryMode.js +15 -0
- package/dist/hooks/useIsStoryMode.js.map +1 -0
- package/package.json +1 -1
package/dist/hooks/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/hooks/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAC3B,cAAc,mBAAmB,CAAC;AAClC,cAAc,qBAAqB,CAAC;AACpC,cAAc,iBAAiB,CAAC;AAChC,cAAc,oBAAoB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/hooks/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAC3B,cAAc,mBAAmB,CAAC;AAClC,cAAc,qBAAqB,CAAC;AACpC,cAAc,iBAAiB,CAAC;AAChC,cAAc,oBAAoB,CAAC;AACnC,cAAc,kBAAkB,CAAC"}
|
package/dist/hooks/index.js
CHANGED
package/dist/hooks/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/hooks/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAC3B,cAAc,mBAAmB,CAAC;AAClC,cAAc,qBAAqB,CAAC;AACpC,cAAc,iBAAiB,CAAC;AAChC,cAAc,oBAAoB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/hooks/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAC3B,cAAc,mBAAmB,CAAC;AAClC,cAAc,qBAAqB,CAAC;AACpC,cAAc,iBAAiB,CAAC;AAChC,cAAc,oBAAoB,CAAC;AACnC,cAAc,kBAAkB,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Determines if the current passage is in "story" mode.
|
|
3
|
+
*
|
|
4
|
+
* This function uses the `useCurrentPassage` hook to retrieve the current
|
|
5
|
+
* passage and evaluates its type to check if it represents a "story."
|
|
6
|
+
*
|
|
7
|
+
* @function
|
|
8
|
+
* @returns {boolean} Returns `true` if the current passage type is "story", otherwise `false`.
|
|
9
|
+
*/
|
|
10
|
+
export declare const useIsStoryMode: () => boolean;
|
|
11
|
+
//# sourceMappingURL=useIsStoryMode.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useIsStoryMode.d.ts","sourceRoot":"","sources":["../../src/hooks/useIsStoryMode.ts"],"names":[],"mappings":"AAEA;;;;;;;;GAQG;AACH,eAAO,MAAM,cAAc,QAAO,OAIjC,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { useCurrentPassage } from "./useCurrentPassage";
|
|
2
|
+
/**
|
|
3
|
+
* Determines if the current passage is in "story" mode.
|
|
4
|
+
*
|
|
5
|
+
* This function uses the `useCurrentPassage` hook to retrieve the current
|
|
6
|
+
* passage and evaluates its type to check if it represents a "story."
|
|
7
|
+
*
|
|
8
|
+
* @function
|
|
9
|
+
* @returns {boolean} Returns `true` if the current passage type is "story", otherwise `false`.
|
|
10
|
+
*/
|
|
11
|
+
export const useIsStoryMode = () => {
|
|
12
|
+
const [currentPassage] = useCurrentPassage();
|
|
13
|
+
return currentPassage?.type === "story";
|
|
14
|
+
};
|
|
15
|
+
//# sourceMappingURL=useIsStoryMode.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useIsStoryMode.js","sourceRoot":"","sources":["../../src/hooks/useIsStoryMode.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAExD;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG,GAAY,EAAE;IACxC,MAAM,CAAC,cAAc,CAAC,GAAG,iBAAiB,EAAE,CAAC;IAE7C,OAAO,cAAc,EAAE,IAAI,KAAK,OAAO,CAAC;AAC5C,CAAC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@react-text-game/core",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.8",
|
|
4
4
|
"description": "A powerful React-based text game engine with reactive state management, passage-based navigation, and persistent save system for building interactive narrative experiences",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.js",
|