r-state-tree 0.6.2 → 0.7.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/types.d.ts CHANGED
@@ -45,11 +45,12 @@ export declare enum ObservableCfgTypes {
45
45
  computed = "computed"
46
46
  }
47
47
  export type ConfigurationTypes = CommonCfgTypes | ModelCfgTypes | StoreCfgTypes | ObservableCfgTypes;
48
- export type ConfigurationType = {
48
+ export type ConfigurationValue = {
49
49
  type: ConfigurationTypes;
50
50
  childType?: Function;
51
51
  [key: string]: unknown;
52
52
  };
53
+ export type ConfigurationType = ConfigurationValue | Function;
53
54
  export type ModelConfiguration<T> = Record<PropertyKey, ConfigurationType>;
54
55
  export type StoreConfiguration<T> = Record<PropertyKey, ConfigurationType>;
55
56
  export type Configuration<T> = ModelConfiguration<T> | StoreConfiguration<T>;
@@ -69,14 +70,14 @@ export type RefSnapshot = {
69
70
  [key: string]: IdType;
70
71
  [key: number]: IdType;
71
72
  };
72
- export declare const childType: ((childType: Function) => ConfigurationType) & {
73
+ export declare const childType: ((childType: Function) => ConfigurationValue) & {
73
74
  type: CommonCfgTypes;
74
75
  };
75
- export declare const stateType: ConfigurationType;
76
- export declare const modelRefType: ((childType: Function) => ConfigurationType) & {
76
+ export declare const stateType: ConfigurationValue;
77
+ export declare const modelRefType: ((childType: Function) => ConfigurationValue) & {
77
78
  type: ModelCfgTypes;
78
79
  };
79
- export declare const idType: ConfigurationType;
80
- export declare const modelType: ConfigurationType;
81
- export declare const computedType: ConfigurationType;
80
+ export declare const idType: ConfigurationValue;
81
+ export declare const modelType: ConfigurationValue;
82
+ export declare const computedType: ConfigurationValue;
82
83
  export {};
package/package.json CHANGED
@@ -1,58 +1,59 @@
1
1
  {
2
- "name": "r-state-tree",
3
- "version": "0.6.2",
4
- "description": "reactive state management library",
5
- "main": "dist/r-state-tree.cjs",
6
- "module": "dist/r-state-tree.js",
7
- "types": "dist/index.d.ts",
8
- "exports": {
9
- ".": {
10
- "types": "./dist/index.d.ts",
11
- "import": "./dist/r-state-tree.js",
12
- "require": "./dist/r-state-tree.cjs"
13
- }
14
- },
15
- "files": [
16
- "dist/*",
17
- "README.md",
18
- "LICENSE"
19
- ],
20
- "repository": {
21
- "type": "git",
22
- "url": "git+https://github.com/melnikov-s/r-state-tree.git"
23
- },
24
- "author": "Sergey Melnikov",
25
- "license": "MIT",
26
- "bugs": {
27
- "url": "https://github.com/melnikov-s/r-state-tree/issues"
28
- },
29
- "homepage": "https://github.com/melnikov-s/r-state-tree#readme",
30
- "devDependencies": {
31
- "@tsmetadata/polyfill": "^1.1.3",
32
- "@typescript-eslint/eslint-plugin": "^5.8.1",
33
- "@typescript-eslint/parser": "^5.8.1",
34
- "eslint": "^8.5.0",
35
- "eslint-config-airbnb": "^19.0.4",
36
- "eslint-config-prettier": "^8.3.0",
37
- "eslint-import-resolver-typescript": "^2.5.0",
38
- "eslint-plugin-import": "^2.25.3",
39
- "eslint-plugin-prettier": "^4.0.0",
40
- "prettier": "^2.8.4",
41
- "tslib": "^2.5.0",
42
- "typescript": "5.9.3",
43
- "vite": "7.1.9",
44
- "vitest": "3.2.4"
45
- },
46
- "dependencies": {
47
- "@preact/signals-core": "^1.12.1"
48
- },
49
- "scripts": {
50
- "test": "vitest run",
51
- "test:watch": "vitest",
52
- "test:cover": "vitest run --coverage",
53
- "build": "vite build && pnpm run build:types",
54
- "build:types": "tsc --emitDeclarationOnly",
55
- "lint": "eslint ./src ./tests --ext .ts",
56
- "format": "prettier --cache --write \"src/**/*.ts\" \"tests/**/*.ts\""
57
- }
58
- }
2
+ "name": "r-state-tree",
3
+ "version": "0.7.0",
4
+ "description": "reactive state management library",
5
+ "main": "dist/r-state-tree.cjs",
6
+ "module": "dist/r-state-tree.js",
7
+ "types": "dist/index.d.ts",
8
+ "exports": {
9
+ ".": {
10
+ "types": "./dist/index.d.ts",
11
+ "import": "./dist/r-state-tree.js",
12
+ "require": "./dist/r-state-tree.cjs"
13
+ }
14
+ },
15
+ "files": [
16
+ "dist/*",
17
+ "README.md",
18
+ "LICENSE"
19
+ ],
20
+ "scripts": {
21
+ "test": "vitest run",
22
+ "test:watch": "vitest",
23
+ "test:cover": "vitest run --coverage",
24
+ "build": "vite build && pnpm run build:types",
25
+ "build:types": "tsc --emitDeclarationOnly",
26
+ "lint": "eslint ./src ./tests --ext .ts",
27
+ "format": "prettier --cache --write \"src/**/*.ts\" \"tests/**/*.ts\"",
28
+ "prepublishOnly": "pnpm run build"
29
+ },
30
+ "repository": {
31
+ "type": "git",
32
+ "url": "git+https://github.com/melnikov-s/r-state-tree.git"
33
+ },
34
+ "author": "Sergey Melnikov",
35
+ "license": "MIT",
36
+ "bugs": {
37
+ "url": "https://github.com/melnikov-s/r-state-tree/issues"
38
+ },
39
+ "homepage": "https://github.com/melnikov-s/r-state-tree#readme",
40
+ "devDependencies": {
41
+ "@tsmetadata/polyfill": "^1.1.3",
42
+ "@typescript-eslint/eslint-plugin": "^5.8.1",
43
+ "@typescript-eslint/parser": "^5.8.1",
44
+ "eslint": "^8.5.0",
45
+ "eslint-config-airbnb": "^19.0.4",
46
+ "eslint-config-prettier": "^8.3.0",
47
+ "eslint-import-resolver-typescript": "^2.5.0",
48
+ "eslint-plugin-import": "^2.25.3",
49
+ "eslint-plugin-prettier": "^4.0.0",
50
+ "prettier": "^2.8.4",
51
+ "tslib": "^2.5.0",
52
+ "typescript": "5.9.3",
53
+ "vite": "7.1.9",
54
+ "vitest": "3.2.4"
55
+ },
56
+ "dependencies": {
57
+ "@preact/signals-core": "^1.12.1"
58
+ }
59
+ }