localdb-ces6q 0.2.12 → 0.2.15
Sign up to get free protection for your applications and to get access to all the features.
- package/LocalDBState.d.ts +2 -2
- package/LocalDBState.js +14 -14
- package/package.json +3 -3
package/LocalDBState.d.ts
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
import { SmartState } from 'util-3gcvv/class/
|
1
|
+
import type { SmartState } from 'util-3gcvv/class/SmartStateTypes.js';
|
2
2
|
import type { IDBOperationHistoryItem } from './types.js';
|
3
3
|
export interface ILocalDBStateProps {
|
4
4
|
history: IDBOperationHistoryItem[][];
|
@@ -9,6 +9,6 @@ export interface ILocalDBStateProps {
|
|
9
9
|
undoItem: IDBOperationHistoryItem[] | undefined;
|
10
10
|
}
|
11
11
|
type ComputedKeys = 'canUndo' | 'canRedo' | 'redoItem' | 'undoItem';
|
12
|
-
export declare const LocalDBState: import("util-3gcvv/class/
|
12
|
+
export declare const LocalDBState: import("util-3gcvv/class/SmartStateTypes.js").SmartStateConstructor<ILocalDBStateProps, ComputedKeys, {}, import("util-3gcvv/types/types.js").IEmptyInterface>;
|
13
13
|
export type LocalDBState = SmartState<ILocalDBStateProps, ComputedKeys, {}>;
|
14
14
|
export {};
|
package/LocalDBState.js
CHANGED
@@ -11,20 +11,6 @@ export const LocalDBState = defineSmartState({
|
|
11
11
|
computed: {
|
12
12
|
// []
|
13
13
|
// [a, b, c, d]
|
14
|
-
canRedo: {
|
15
|
-
type: 'boolean',
|
16
|
-
deps: ['redoItem'],
|
17
|
-
get({ redoItem }) {
|
18
|
-
return redoItem != null;
|
19
|
-
},
|
20
|
-
},
|
21
|
-
canUndo: {
|
22
|
-
type: 'boolean',
|
23
|
-
deps: ['undoItem'],
|
24
|
-
get({ undoItem }) {
|
25
|
-
return undoItem != null;
|
26
|
-
},
|
27
|
-
},
|
28
14
|
redoItem: {
|
29
15
|
type: 'array',
|
30
16
|
item: 'object',
|
@@ -41,6 +27,20 @@ export const LocalDBState = defineSmartState({
|
|
41
27
|
return history[historyIndex - 1];
|
42
28
|
},
|
43
29
|
},
|
30
|
+
canRedo: {
|
31
|
+
type: 'boolean',
|
32
|
+
deps: ['redoItem'],
|
33
|
+
get({ redoItem }) {
|
34
|
+
return redoItem != null;
|
35
|
+
},
|
36
|
+
},
|
37
|
+
canUndo: {
|
38
|
+
type: 'boolean',
|
39
|
+
deps: ['undoItem'],
|
40
|
+
get({ undoItem }) {
|
41
|
+
return undoItem != null;
|
42
|
+
},
|
43
|
+
},
|
44
44
|
},
|
45
45
|
drafts: [],
|
46
46
|
});
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "localdb-ces6q",
|
3
|
-
"version": "0.2.
|
3
|
+
"version": "0.2.15",
|
4
4
|
"description": "TypeScript ECMAScript Module Library Template",
|
5
5
|
"type": "module",
|
6
6
|
"module": "dist/index.js",
|
@@ -27,7 +27,7 @@
|
|
27
27
|
"homepage": "https://github.com/joonhocho/localdb#readme",
|
28
28
|
"dependencies": {
|
29
29
|
"bplustree-mq4uj": "^0.1.0",
|
30
|
-
"util-3gcvv": "^0.
|
30
|
+
"util-3gcvv": "^0.6.3"
|
31
31
|
},
|
32
32
|
"devDependencies": {
|
33
33
|
"@babel/core": "^7.21.3",
|
@@ -37,7 +37,7 @@
|
|
37
37
|
"@types/jest": "^29.5.0",
|
38
38
|
"@types/react": "^18.0.28",
|
39
39
|
"jest-ts-webcompat-resolver": "^1.0.0",
|
40
|
-
"prettier": "^2.8.
|
40
|
+
"prettier": "^2.8.6",
|
41
41
|
"react": "^18.2.0",
|
42
42
|
"shelljs": "^0.8.5",
|
43
43
|
"ts-jest": "^29.0.5",
|