document-drive 0.0.19 → 0.0.21

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "document-drive",
3
- "version": "0.0.19",
3
+ "version": "0.0.21",
4
4
  "license": "AGPL-3.0-only",
5
5
  "type": "module",
6
6
  "module": "./src/index.ts",
@@ -25,27 +25,25 @@
25
25
  "test:watch": "vitest watch"
26
26
  },
27
27
  "peerDependencies": {
28
- "document-model": "^1.0.13",
29
- "document-model-libs": "^1.1.21",
28
+ "document-model": "^1.0.17",
29
+ "document-model-libs": "^1.1.26",
30
30
  "localforage": "^1.10.0"
31
31
  },
32
32
  "dependencies": {
33
33
  "sanitize-filename": "^1.6.3"
34
34
  },
35
35
  "devDependencies": {
36
- "@types/proper-lockfile": "^4.1.4",
37
36
  "@typescript-eslint/eslint-plugin": "^6.12.0",
38
37
  "@typescript-eslint/parser": "^6.12.0",
39
38
  "@vitest/coverage-v8": "^0.34.6",
40
- "document-model": "^1.0.16",
41
- "document-model-libs": "^1.1.24",
39
+ "document-model": "^1.0.17",
40
+ "document-model-libs": "^1.1.26",
42
41
  "eslint": "^8.54.0",
43
42
  "eslint-config-prettier": "^9.0.0",
44
43
  "fake-indexeddb": "^5.0.1",
45
44
  "localforage": "^1.10.0",
46
45
  "prettier": "^3.1.0",
47
46
  "prettier-plugin-organize-imports": "^3.2.4",
48
- "tsx": "^4.6.2",
49
47
  "typescript": "^5.3.2",
50
48
  "vitest": "^0.34.6"
51
49
  }
@@ -41,7 +41,7 @@ export class DocumentDriveServer implements IDocumentDriveServer {
41
41
 
42
42
  addDrive(drive: DriveInput) {
43
43
  const document = utils.createDocument({
44
- state: { global: drive, local: {} }
44
+ state: drive
45
45
  });
46
46
  return this.storage.saveDrive(document);
47
47
  }
@@ -1,16 +1,21 @@
1
1
  import type {
2
2
  DocumentDriveAction,
3
3
  DocumentDriveDocument,
4
+ DocumentDriveLocalState,
4
5
  DocumentDriveState
5
6
  } from 'document-model-libs/document-drive';
6
7
  import type {
7
8
  BaseAction,
8
9
  Document,
9
10
  Operation,
10
- Signal
11
+ Signal,
12
+ State
11
13
  } from 'document-model/document';
12
14
 
13
- export type DriveInput = Omit<DocumentDriveState, '__typename' | 'nodes'>;
15
+ export type DriveInput = State<
16
+ Omit<DocumentDriveState, '__typename' | 'nodes'>,
17
+ DocumentDriveLocalState
18
+ >;
14
19
 
15
20
  export type CreateDocumentInput = {
16
21
  id: string;