narraleaf-react 0.0.1-beta.11 → 0.0.1-beta.13

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.
@@ -58,6 +58,7 @@ export declare class EventDispatcher<T extends EventTypes, Type extends T & {
58
58
  emit<K extends keyof Type>(event: K, ...args: Type[K]): void;
59
59
  once<K extends keyof Type>(event: K, listener: EventListener<Type[K]>): EventListener<Type[K]>;
60
60
  any<K extends keyof T>(event: K, ...args: Type[K]): Promise<any>;
61
+ reset(): void;
61
62
  }
62
63
  /**
63
64
  * Get the call stack
@@ -69,7 +70,7 @@ export declare function sleep(ms: number): Promise<void>;
69
70
  export declare function deepEqual(obj1: any, obj2: any): boolean;
70
71
  export declare class Logger {
71
72
  private game;
72
- private prefix;
73
+ private readonly prefix;
73
74
  constructor(game: Game, prefix?: string);
74
75
  log(tag: string, ...args: any[]): void;
75
76
  info(tag: string, ...args: any[]): void;
@@ -96,4 +97,8 @@ export declare class SkipController<T = any, U extends Array<any> = any[]> {
96
97
  cancel(): void;
97
98
  }
98
99
  export declare function throttle<T extends (...args: any[]) => any>(fn: T, delay: number): T;
100
+ export type PublicProperties<T> = {
101
+ [K in keyof T]: T[K] extends Function ? never : K;
102
+ }[keyof T];
103
+ export type PublicOnly<T> = Pick<T, PublicProperties<T>>;
99
104
  export {};
package/package.json CHANGED
@@ -1,80 +1,82 @@
1
- {
2
- "name": "narraleaf-react",
3
- "version": "0.0.1-beta.11",
4
- "description": "A React visual novel player framework",
5
- "main": "./dist/main.js",
6
- "types": "./dist/index.d.ts",
7
- "scripts": {
8
- "prebuild": "rimraf dist",
9
- "build": "webpack --config webpack.config.js",
10
- "build:prod": "rimraf dist && webpack --config webpack.config.js && tsc-alias -p tsconfig.json",
11
- "build:analyze": "rimraf dist && webpack --config webpack.config.js",
12
- "postbuild": "tsc-alias -p tsconfig.json",
13
- "lint": "eslint \"./src/**/*.{ts,tsx,js,jsx}\"",
14
- "lint:fix": "eslint --fix \"./src/**/*.{ts,tsx,js,jsx}\"",
15
- "prepublish": "npm run lint && rimraf dist && webpack --config webpack.config.js && tsc-alias -p tsconfig.json",
16
- "publish": "npm publish",
17
- "typedoc": "typedoc src/index.ts --out doc"
18
- },
19
- "devDependencies": {
20
- "@babel/core": "^7.25.2",
21
- "@babel/preset-env": "^7.25.4",
22
- "@babel/preset-react": "^7.24.7",
23
- "@babel/preset-typescript": "^7.14.5",
24
- "@eslint/eslintrc": "^3.1.0",
25
- "@eslint/js": "^9.10.0",
26
- "@types/howler": "^2.2.11",
27
- "@types/lodash": "^4.17.7",
28
- "@types/react": "^18.3.5",
29
- "@typescript-eslint/eslint-plugin": "^8.5.0",
30
- "@typescript-eslint/parser": "^8.5.0",
31
- "autoprefixer": "^10.4.20",
32
- "babel-loader": "^8.3.0",
33
- "css-loader": "^7.1.2",
34
- "eslint": "^9.10.0",
35
- "eslint-plugin-react": "^7.35.2",
36
- "globals": "^15.9.0",
37
- "jest": "^27.0.6",
38
- "postcss-loader": "^8.1.1",
39
- "react": "^18.3.1",
40
- "react-dom": "^18.3.1",
41
- "rimraf": "^6.0.1",
42
- "style-loader": "^4.0.0",
43
- "tailwindcss": "^3.4.11",
44
- "terser-webpack-plugin": "^5.3.10",
45
- "ts-loader": "^9.5.1",
46
- "tsc-alias": "^1.8.10",
47
- "tsconfig-paths": "^4.2.0",
48
- "tsconfig-paths-webpack-plugin": "^4.1.0",
49
- "typedoc": "^0.26.7",
50
- "typescript": "^4.9.5",
51
- "webpack": "^5.94.0",
52
- "webpack-bundle-analyzer": "^4.10.2",
53
- "webpack-cli": "^4.10.0",
54
- "webpack-dev-server": "^5.1.0"
55
- },
56
- "peerDependencies": {
57
- "react": "^17.0.0 || ^18.0.0",
58
- "react-dom": "^17.0.0 || ^18.0.0"
59
- },
60
- "files": [
61
- "dist"
62
- ],
63
- "keywords": [
64
- "react",
65
- "visual-novel",
66
- "typescript",
67
- "component",
68
- "narraleaf",
69
- "nvl"
70
- ],
71
- "author": "helloyork@icloud.com",
72
- "license": "MIT",
73
- "dependencies": {
74
- "@emotion/is-prop-valid": "^1.3.0",
75
- "client-only": "^0.0.1",
76
- "clsx": "^2.1.1",
77
- "framer-motion": "^11.5.4",
78
- "howler": "^2.2.4"
79
- }
80
- }
1
+ {
2
+ "name": "narraleaf-react",
3
+ "version": "0.0.1-beta.13",
4
+ "description": "A React visual novel player framework",
5
+ "main": "./dist/main.js",
6
+ "types": "./dist/index.d.ts",
7
+ "scripts": {
8
+ "prebuild": "rimraf dist",
9
+ "build": "webpack --config webpack.config.js",
10
+ "build:prod": "rimraf dist && webpack --config webpack.config.js && tsc-alias -p tsconfig.json",
11
+ "build:analyze": "rimraf dist && webpack --config webpack.config.js",
12
+ "postbuild": "tsc-alias -p tsconfig.json",
13
+ "lint": "eslint \"./src/**/*.{ts,tsx,js,jsx}\"",
14
+ "lint:fix": "eslint --fix \"./src/**/*.{ts,tsx,js,jsx}\"",
15
+ "prepublish": "npm run lint && rimraf dist && webpack --config webpack.config.js && tsc-alias -p tsconfig.json",
16
+ "publish": "npm publish",
17
+ "typedoc": "typedoc src/index.ts --out doc",
18
+ "prepare": "husky"
19
+ },
20
+ "devDependencies": {
21
+ "@babel/core": "^7.25.2",
22
+ "@babel/preset-env": "^7.25.4",
23
+ "@babel/preset-react": "^7.24.7",
24
+ "@babel/preset-typescript": "^7.14.5",
25
+ "@eslint/eslintrc": "^3.1.0",
26
+ "@eslint/js": "^9.10.0",
27
+ "@types/howler": "^2.2.11",
28
+ "@types/lodash": "^4.17.7",
29
+ "@types/react": "^18.3.5",
30
+ "@typescript-eslint/eslint-plugin": "^8.5.0",
31
+ "@typescript-eslint/parser": "^8.5.0",
32
+ "autoprefixer": "^10.4.20",
33
+ "babel-loader": "^8.3.0",
34
+ "css-loader": "^7.1.2",
35
+ "eslint": "^9.10.0",
36
+ "eslint-plugin-react": "^7.35.2",
37
+ "globals": "^15.9.0",
38
+ "husky": "^9.1.6",
39
+ "jest": "^27.0.6",
40
+ "postcss-loader": "^8.1.1",
41
+ "react": "^18.3.1",
42
+ "react-dom": "^18.3.1",
43
+ "rimraf": "^6.0.1",
44
+ "style-loader": "^4.0.0",
45
+ "tailwindcss": "^3.4.11",
46
+ "terser-webpack-plugin": "^5.3.10",
47
+ "ts-loader": "^9.5.1",
48
+ "tsc-alias": "^1.8.10",
49
+ "tsconfig-paths": "^4.2.0",
50
+ "tsconfig-paths-webpack-plugin": "^4.1.0",
51
+ "typedoc": "^0.26.7",
52
+ "typescript": "^4.9.5",
53
+ "webpack": "^5.94.0",
54
+ "webpack-bundle-analyzer": "^4.10.2",
55
+ "webpack-cli": "^4.10.0",
56
+ "webpack-dev-server": "^5.1.0"
57
+ },
58
+ "peerDependencies": {
59
+ "react": "^17.0.0 || ^18.0.0",
60
+ "react-dom": "^17.0.0 || ^18.0.0"
61
+ },
62
+ "files": [
63
+ "dist"
64
+ ],
65
+ "keywords": [
66
+ "react",
67
+ "visual-novel",
68
+ "typescript",
69
+ "component",
70
+ "narraleaf",
71
+ "nvl"
72
+ ],
73
+ "author": "helloyork@icloud.com",
74
+ "license": "MIT",
75
+ "dependencies": {
76
+ "@emotion/is-prop-valid": "^1.3.0",
77
+ "client-only": "^0.0.1",
78
+ "clsx": "^2.1.1",
79
+ "framer-motion": "^11.5.4",
80
+ "howler": "^2.2.4"
81
+ }
82
+ }