@encorejs/saaz 1.0.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.
Files changed (50) hide show
  1. package/LICENSE +203 -0
  2. package/README.md +1 -0
  3. package/dist/back/BackMemoryAdapter.d.ts +18 -0
  4. package/dist/back/BackMemoryAdapter.d.ts.map +1 -0
  5. package/dist/back/BackMemoryAdapter.js +69 -0
  6. package/dist/back/BackStorage.d.ts +20 -0
  7. package/dist/back/BackStorage.d.ts.map +1 -0
  8. package/dist/back/BackStorage.js +22 -0
  9. package/dist/back/SaazBack.d.ts +60 -0
  10. package/dist/back/SaazBack.d.ts.map +1 -0
  11. package/dist/back/SaazBack.js +188 -0
  12. package/dist/front/FrontIdbAdapter.d.ts +15 -0
  13. package/dist/front/FrontIdbAdapter.d.ts.map +1 -0
  14. package/dist/front/FrontIdbAdapter.js +159 -0
  15. package/dist/front/FrontMemoryAdapter.d.ts +16 -0
  16. package/dist/front/FrontMemoryAdapter.d.ts.map +1 -0
  17. package/dist/front/FrontMemoryAdapter.js +156 -0
  18. package/dist/front/FrontStorage.d.ts +23 -0
  19. package/dist/front/FrontStorage.d.ts.map +1 -0
  20. package/dist/front/FrontStorage.js +85 -0
  21. package/dist/front/SaazFront.d.ts +113 -0
  22. package/dist/front/SaazFront.d.ts.map +1 -0
  23. package/dist/front/SaazFront.js +756 -0
  24. package/dist/index.d.ts +8 -0
  25. package/dist/index.d.ts.map +1 -0
  26. package/dist/index.js +9295 -0
  27. package/dist/index.js.map +7 -0
  28. package/dist/index.test.d.ts +2 -0
  29. package/dist/index.test.d.ts.map +1 -0
  30. package/dist/index.test.js +166 -0
  31. package/dist/rogue.d.ts +63 -0
  32. package/dist/rogue.d.ts.map +1 -0
  33. package/dist/rogue.js +548 -0
  34. package/dist/rogue.test.d.ts +2 -0
  35. package/dist/rogue.test.d.ts.map +1 -0
  36. package/dist/rogue.test.js +248 -0
  37. package/dist/shared/GeneratorSpy.d.ts +4 -0
  38. package/dist/shared/GeneratorSpy.d.ts.map +1 -0
  39. package/dist/shared/GeneratorSpy.js +41 -0
  40. package/dist/shared/transactions.d.ts +4 -0
  41. package/dist/shared/transactions.d.ts.map +1 -0
  42. package/dist/shared/transactions.js +131 -0
  43. package/dist/shared/utils.d.ts +5 -0
  44. package/dist/shared/utils.d.ts.map +1 -0
  45. package/dist/shared/utils.js +21 -0
  46. package/dist/tsdoc-metadata.json +11 -0
  47. package/dist/types.d.ts +240 -0
  48. package/dist/types.d.ts.map +1 -0
  49. package/dist/types.js +1 -0
  50. package/package.json +54 -0
@@ -0,0 +1,240 @@
1
+ import type { Cell, Ops } from './rogue';
2
+ export type $IntentionalAny = any;
3
+ export type $FixMe = any;
4
+ type SerializablePrimitive = null | string | boolean | number;
5
+ export type SerializableValue = SerializablePrimitive | ReadonlyArray<SerializableValue> | SerialzableMap;
6
+ export type SerialzableMap = {
7
+ readonly [key: string]: SerializableValue | undefined;
8
+ };
9
+ export type EditorDefinitionFn = (state: $IntentionalAny, generators: $IntentionalAny, opts: $IntentionalAny) => $IntentionalAny;
10
+ /**
11
+ * An editor definition is either a function or an object of editor definitions.
12
+ * ```ts
13
+ * {
14
+ * foo: (state, ctx, opts) => {},
15
+ * nested: {
16
+ * a: {
17
+ * b: {c: (state, ctx, opts) => {}},
18
+ * },
19
+ * },
20
+ * }
21
+ * ```
22
+ */
23
+ export type EditorDefinitions = EditorDefinitionFn | {
24
+ [key: string]: EditorDefinitions;
25
+ };
26
+ /**
27
+ * Takes an editor definition and returns a function that can be used to invoke it.
28
+ * ```ts
29
+ * // input
30
+ * (state, ctx, opts) => {}
31
+ * // output
32
+ * (opts) => {}
33
+ *
34
+ * // OR:
35
+ * // input
36
+ * {foo: (state, ctx, opts) => {}}
37
+ * // output
38
+ * {foo: (opts) => {}}
39
+ * ```
40
+ */
41
+ export type EditorDefinitionToEditorInvocable<Editors extends EditorDefinitions> = Editors extends EditorDefinitionFn ? (opts: Parameters<Editors>[2]) => void : Editors extends {
42
+ [key: string]: EditorDefinitions;
43
+ } ? {
44
+ [K in keyof Editors]: EditorDefinitionToEditorInvocable<Editors[K]>;
45
+ } : never;
46
+ export type ValidGenerators = {
47
+ [key: string]: (() => SerializableValue) | ((opts: SerializableValue) => SerializableValue);
48
+ };
49
+ export type Invokations = Array<[fn: string, opts: SerialzableMap]>;
50
+ export type Transaction = {
51
+ invokations: Invokations;
52
+ generatorRecordings: GeneratorRecordings;
53
+ peerId: string;
54
+ peerClock: number;
55
+ draftOps: Ops;
56
+ };
57
+ export type GeneratorRecordings = {
58
+ [key in string]?: SerializableValue[];
59
+ };
60
+ export type OnDiskSnapshot<OpSnapshot> = {
61
+ origin: string;
62
+ dbName: string;
63
+ clock: number;
64
+ snapshot: FullSnapshot<OpSnapshot>;
65
+ };
66
+ export type SessionState<OpSnapshot> = {
67
+ /**
68
+ * Unix timestamp of the last time the client synced with backend. Timestamp is produced on
69
+ * the client, so it may be inaccurate. Null means never synced.
70
+ */
71
+ lastSyncTime: number | null;
72
+ /**
73
+ * The clock of the backend. null means unknown.
74
+ */
75
+ backendClock: number | null;
76
+ /**
77
+ * The clock of the last optimistic update the backend has applied from this peer.
78
+ * The state (below) is calculated after this optimistic update has run.
79
+ */
80
+ lastIncorporatedPeerClock: number | null;
81
+ /**
82
+ * The state of the backend.
83
+ */
84
+ snapshot: FullSnapshot<OpSnapshot> | null;
85
+ peerId: string;
86
+ };
87
+ export type BackStateUpdateDescriptor = {
88
+ clock: number;
89
+ snapshot: {
90
+ type: 'Snapshot';
91
+ value: FullSnapshot<$IntentionalAny>;
92
+ } | {
93
+ type: 'Diff';
94
+ diff: 'todo';
95
+ };
96
+ lastIncorporatedPeerClock: number | null;
97
+ peerId: string;
98
+ };
99
+ export type BackApplyUpdateOps = {
100
+ peerId: string;
101
+ backendClock: number | null;
102
+ updates: Transaction[];
103
+ };
104
+ export type BackGetUpdateSinceClockResult = ({
105
+ hasUpdates: false;
106
+ } & Omit<BackStateUpdateDescriptor, 'snapshot'>) | ({
107
+ hasUpdates: true;
108
+ } & BackStateUpdateDescriptor);
109
+ export type PeerPresenceState = {
110
+ tempTransactions: Array<Omit<Transaction, 'peerClock'>>;
111
+ };
112
+ export type AllPeersPresenceState = {
113
+ [peerId in string]?: PeerPresenceState;
114
+ };
115
+ export type PeerSubscribeCallback = (opts: {
116
+ presence: AllPeersPresenceState;
117
+ shouldCheckForUpdates: boolean;
118
+ }) => void;
119
+ export interface SaazBackInterface {
120
+ getUpdatesSinceClock(opts: {
121
+ clock: number | null;
122
+ peerId: string;
123
+ }): Promise<BackGetUpdateSinceClockResult>;
124
+ getLastIncorporatedPeerClock(opts: {
125
+ peerId: string;
126
+ }): Promise<{
127
+ lastIncorporatedPeerClock: null | number;
128
+ peerId: string;
129
+ }>;
130
+ closePeer(opts: {
131
+ peerId: string;
132
+ }): Promise<{
133
+ ok: boolean;
134
+ }>;
135
+ applyUpdates(opts: BackApplyUpdateOps): Promise<({
136
+ ok: true;
137
+ } & BackGetUpdateSinceClockResult) | {
138
+ ok: false;
139
+ error: unknown;
140
+ }>;
141
+ updatePresence(opts: {
142
+ peerId: string;
143
+ presence: PeerPresenceState;
144
+ }): Promise<{
145
+ ok: true;
146
+ } | {
147
+ ok: false;
148
+ error: unknown;
149
+ }>;
150
+ subscribe(opts: {
151
+ peerId: string;
152
+ }, onUpdate: PeerSubscribeCallback): Promise<() => void>;
153
+ }
154
+ export type FrontStorageAdapterTransaction = {
155
+ /**
156
+ * Gets a singular value.
157
+ */
158
+ get<T>(key: string, session: string): Promise<T | void>;
159
+ /**
160
+ * Like `get()`, but returns the value for each session
161
+ */
162
+ getAll<T>(key: string): Promise<Record<string, T>>;
163
+ /**
164
+ * Sets a singular value.
165
+ */
166
+ set<T>(key: string, value: T, session: string): Promise<void>;
167
+ deleteSession(session: string): Promise<void>;
168
+ /**
169
+ * Pushes one or more rows to a list.
170
+ */
171
+ pushToList<T extends {
172
+ id: string;
173
+ }>(key: string, rows: T[], session: string): Promise<void>;
174
+ /**
175
+ * Reads all the rows from a list.
176
+ */
177
+ getList<T extends {
178
+ id: string;
179
+ }>(key: string, session: string): Promise<T[]>;
180
+ /**
181
+ * Removes one or more rows from a list.
182
+ */
183
+ pluckFromList<T extends {
184
+ id: string;
185
+ }>(key: string, ids: Array<string>, session: string): Promise<Array<T | undefined>>;
186
+ };
187
+ export interface FrontStorageAdapter {
188
+ /**
189
+ * Transaction.
190
+ * Example:
191
+ * ```ts
192
+ * const newCount = await s.transaction(async ({get, set}) => {
193
+ * const count = await get<number>('count')
194
+ * await set('count', count + 1)
195
+ * return count + 1
196
+ * })
197
+ * ```
198
+ */
199
+ transaction<T>(fn: (opts: FrontStorageAdapterTransaction) => Promise<T>): Promise<T>;
200
+ /**
201
+ * Gets a singular value.
202
+ */
203
+ get<T>(key: string, session: string): Promise<T | void>;
204
+ /**
205
+ * Sets a singular value.
206
+ */
207
+ getList<T extends {
208
+ id: string;
209
+ }>(key: string, session: string): Promise<T[]>;
210
+ }
211
+ export interface BackStorageAdapter {
212
+ }
213
+ export type Schema<OpSnapshot extends {
214
+ $schemaVersion: number;
215
+ }, Editors extends {} = {}, Generators extends ValidGenerators = {}, CellShape extends {} = {}> = {
216
+ editors: Editors;
217
+ generators: Generators;
218
+ opShape: OpSnapshot;
219
+ cellShape: CellShape;
220
+ version: number;
221
+ };
222
+ export type ValidOpSnapshot = {
223
+ $schemaVersion: number;
224
+ };
225
+ export type TempTransaction = Omit<Transaction, 'peerClock'> & {
226
+ tempId: number;
227
+ backwardOps: Ops;
228
+ };
229
+ export type TempTransactionApi<Editors extends {}, CellShape extends {}> = {
230
+ commit: () => void;
231
+ discard: () => void;
232
+ recapture: (editorFn?: (editors: EditorDefinitionToEditorInvocable<Editors>) => void, draftFn?: (draft: CellShape) => void) => void;
233
+ reset: () => void;
234
+ };
235
+ export type FullSnapshot<OpSnapshot> = {
236
+ op: OpSnapshot;
237
+ cell: Cell | {};
238
+ };
239
+ export {};
240
+ //# sourceMappingURL=types.d.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AAO,EAAE,OAAO,CAAA;IAChB,UAAU,EAAE,UAAU,CAAA;IACtB,OAAO,EAAE,UAAU,CAAA;IACnB,SAAS,EAAE,SAAS,CAAA;IACpB,OAAO,EAAE,MAAM,CAAA;CAChB,CAAA;AAED,MAAM,MAAM,eAAe,GAAG;IAC5B,cAAc,EAAE,MAAM,CAAA;CACvB,CAAA;AAED,MAAM,MAAM,eAAe,GAAG,IAAI,CAAC,WAAW,EAAE,WAAW,CAAC,GAAG;IAC7D,MAAM,EAAE,MAAM,CAAA;IACd,WAAW,EAAE,GAAG,CAAA;CACjB,CAAA;AAED,MAAM,MAAM,kBAAkB,CAAC,OAAO,SAAS,EAAE,EAAE,SAAS,SAAS,EAAE,IAAI;IACzE,MAAM,EAAE,MAAM,IAAI,CAAA;IAClB,OAAO,EAAE,MAAM,IAAI,CAAA;IACnB,SAAS,EAAE,CACT,QAAQ,CAAC,EAAE,CAAC,OAAO,EAAE,iCAAiC,CAAC,OAAO,CAAC,KAAK,IAAI,EACxE,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,SAAS,KAAK,IAAI,KACjC,IAAI,CAAA;IACT,KAAK,EAAE,MAAM,IAAI,CAAA;CAClB,CAAA;AAED,MAAM,MAAM,YAAY,CAAC,UAAU,IAAI;IAAC,EAAE,EAAE,UAAU,CAAC;IAAC,IAAI,EAAE,IAAI,GAAG,EAAE,CAAA;CAAC,CAAA"}
package/dist/types.js ADDED
@@ -0,0 +1 @@
1
+ export {};
package/package.json ADDED
@@ -0,0 +1,54 @@
1
+ {
2
+ "name": "@encorejs/saaz",
3
+ "version": "1.0.0",
4
+ "license": "Apache-2.0",
5
+ "author": {
6
+ "name": "Aria Minaei",
7
+ "email": "aria@theatrejs.com",
8
+ "url": "https://github.com/AriaMinaei"
9
+ },
10
+ "repository": {
11
+ "type": "git",
12
+ "url": "https://github.com/ikanishakm/encore",
13
+ "directory": "packages/saaz"
14
+ },
15
+ "main": "dist/index.js",
16
+ "types": "dist/index.d.ts",
17
+ "files": [
18
+ "dist/**/*"
19
+ ],
20
+ "scripts": {
21
+ "prepack": "node ../../devEnv/ensurePublishing.js",
22
+ "typecheck": "yarn run build:ts",
23
+ "build": "run-s build:ts build:js build:api-json",
24
+ "build:ts": "tsc --build ./tsconfig.json",
25
+ "build:js": "tsx ./devEnv/build.ts",
26
+ "build:api-json": "api-extractor run --local --config devEnv/api-extractor.json",
27
+ "prepublish": "node ../../devEnv/ensurePublishing.js",
28
+ "clean": "rm -rf ./dist && rm -f tsconfig.tsbuildinfo",
29
+ "docs": "typedoc src/index.ts --out api --plugin typedoc-plugin-markdown --readme none",
30
+ "precommit": "yarn run docs"
31
+ },
32
+ "devDependencies": {
33
+ "@encorejs/dataverse": "1.0.0",
34
+ "@encorejs/utils": "0.7.0",
35
+ "@microsoft/api-extractor": "^7.36.4",
36
+ "@types/jest": "^26.0.23",
37
+ "@types/lodash-es": "^4.17.4",
38
+ "@types/node": "^15.6.2",
39
+ "esbuild": "^0.12.15",
40
+ "fast-deep-equal": "^3.1.3",
41
+ "immer": "^9.0.6",
42
+ "jest-diff": "^29.6.4",
43
+ "lodash-es": "^4.17.21",
44
+ "nanoid": "^4.0.2",
45
+ "npm-run-all": "^4.1.5",
46
+ "tsx": "4.7.0",
47
+ "typedoc": "^0.24.8",
48
+ "typedoc-plugin-markdown": "^3.15.4",
49
+ "typescript": "5.1.6"
50
+ },
51
+ "dependencies": {
52
+ "idb": "^7.1.1"
53
+ }
54
+ }